From d74bed545a73d42b919c540ad74b5d7fe3548683 Mon Sep 17 00:00:00 2001 From: laurent Date: Fri, 3 Aug 2018 20:28:34 +0200 Subject: [PATCH 001/379] generate 7.5KHz tables --- cmake_targets/CMakeLists.txt | 1 + openair1/PHY/MODULATION/gen_75KHz.cpp | 78 ++++++++++++++ openair1/PHY/MODULATION/gen_7_5_kHz.m | 107 -------------------- openair1/PHY/MODULATION/kHz_7_5.h | 45 -------- openair1/PHY/MODULATION/modulation_extern.h | 24 ++--- openair1/PHY/MODULATION/modulation_vars.h | 1 - 6 files changed, 91 insertions(+), 165 deletions(-) create mode 100644 openair1/PHY/MODULATION/gen_75KHz.cpp delete mode 100644 openair1/PHY/MODULATION/gen_7_5_kHz.m delete mode 100644 openair1/PHY/MODULATION/kHz_7_5.h diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index f59792894e..afdbade718 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -1137,6 +1137,7 @@ set(PHY_SRC_RU ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if5_tools.c ${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_ul.c ${OPENAIR1_DIR}/PHY/MODULATION/ul_7_5_kHz.c + ${OPENAIR1_DIR}/PHY/MODULATION/gen_75KHz.cpp ${OPENAIR1_DIR}/PHY/MODULATION/beamforming.c ${OPENAIR1_DIR}/PHY/MODULATION/compute_bf_weights.c ${OPENAIR1_DIR}/PHY/INIT/lte_init_ru.c diff --git a/openair1/PHY/MODULATION/gen_75KHz.cpp b/openair1/PHY/MODULATION/gen_75KHz.cpp new file mode 100644 index 0000000000..31c6af2a1f --- /dev/null +++ b/openair1/PHY/MODULATION/gen_75KHz.cpp @@ -0,0 +1,78 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +using namespace std; + +void gen_sig(int RB, int len, double ratio, int16_t *table_n, int16_t *table_e ) { + double samplerate = 30.72e6*ratio; + double ofdm_size = 2048*ratio; + double PI = std::acos(-1); + std::complex tt; + complex t[len]; + int index=0; + + double cp0 = 160*ratio; + double cp = 144*ratio; + for (int i=-cp0; i tables_7_5KHz={{6,1.0/16},{15,1.0/8},{25,1.0/4},{50,1.0/2},{75,3.0/4},{100,1.0}}; + + int tables_idx=0; + for (auto it=tables_7_5KHz.begin(); it!=tables_7_5KHz.end(); ++it) { + int len=15360*it->second; + tables_size_bytes[tables_idx]=sizeof(int16_t)*2*len; + tables_size_bytes[tables_idx+1]=sizeof(int16_t)*2*len; + MyAssert(0==posix_memalign((void**)tables[tables_idx], + 16,tables_size_bytes[tables_idx])); + MyAssert(0==posix_memalign((void**)tables[tables_idx+1], + 16,tables_size_bytes[tables_idx+1])); + gen_sig(it->first, len, it->second, *tables[tables_idx], *tables[tables_idx+1]); + tables_idx+=2; + } +} diff --git a/openair1/PHY/MODULATION/gen_7_5_kHz.m b/openair1/PHY/MODULATION/gen_7_5_kHz.m deleted file mode 100644 index 39bc600336..0000000000 --- a/openair1/PHY/MODULATION/gen_7_5_kHz.m +++ /dev/null @@ -1,107 +0,0 @@ - -function [] = gen_7_5_kHz() -[s6_n2, s6_e2] = gen_sig(6); -[s15_n2, s15_e2] = gen_sig(15); -[s25_n2, s25_e2] = gen_sig(25); -[s50_n2, s50_e2] = gen_sig(50); -[s75_n2, s75_e2] = gen_sig(75); -[s100_n2, s100_e2] = gen_sig(100); - - -fd=fopen("kHz_7_5.h","w"); -fprintf(fd,"s16 s6n_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s6_n2)); -fprintf(fd,"%d,",s6_n2(1:(end-1))); -fprintf(fd,"%d};\n\n",s6_n2(end)); - -fprintf(fd,"s16 s6e_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s6_e2)); -fprintf(fd,"%d,",s6_e2(1:(end-1))); -fprintf(fd,"%d};\n\n",s6_e2(end)); - -fprintf(fd,"s16 s15n_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s15_n2)); -fprintf(fd,"%d,",s15_n2(1:(end-1))); -fprintf(fd,"%d};\n\n",s15_n2(end)); - -fprintf(fd,"s16 s15e_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s15_e2)); -fprintf(fd,"%d,",s15_e2(1:(end-1))); -fprintf(fd,"%d};\n\n",s15_e2(end)); - -fprintf(fd,"s16 s25n_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s25_n2)); -fprintf(fd,"%d,",s25_n2(1:(end-1))); -fprintf(fd,"%d};\n\n",s25_n2(end)); - -fprintf(fd,"s16 s25e_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s25_e2)); -fprintf(fd,"%d,",s25_e2(1:(end-1))); -fprintf(fd,"%d};\n\n",s25_e2(end)); - -fprintf(fd,"s16 s50n_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s50_n2)); -fprintf(fd,"%d,",s50_n2(1:(end-1))); -fprintf(fd,"%d};\n\n",s50_n2(end)); - -fprintf(fd,"s16 s50e_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s50_e2)); -fprintf(fd,"%d,",s50_e2(1:(end-1))); -fprintf(fd,"%d};\n\n",s50_e2(end)); - -fprintf(fd,"s16 s75n_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s75_n2)); -fprintf(fd,"%d,",s75_n2(1:(end-1))); -fprintf(fd,"%d};\n\n",s75_n2(end)); - -fprintf(fd,"s16 s75e_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s75_e2)); -fprintf(fd,"%d,",s75_e2(1:(end-1))); -fprintf(fd,"%d};\n\n",s75_e2(end)); - -fprintf(fd,"s16 s100n_kHz_7_5[%d]__attribute__((aligned(16)))= {",length(s100_n2)); -fprintf(fd,"%d,",s100_n2(1:(end-1))); -fprintf(fd,"%d};\n\n",s100_n2(end)); - -fprintf(fd,"s16 s100e_kHz_7_5[%d]__attribute__((aligned(16)))= {",length(s100_n2)); -fprintf(fd,"%d,",s100_e2(1:(end-1))); -fprintf(fd,"%d};\n\n",s100_e2(end)); - -fclose(fd); -end - - -function [s_n2, s_e2] = gen_sig(RB) - % 20MHz BW - cp0 = 160; - cp = 144; - cpe = 512; - samplerate = 30.72e6; - ofdm_size = 2048; - len = 15360; - switch(RB) - case 6 - ratio = 1/16; - case 15 - ratio = 1/8; - case 25 - ratio = 1/4; - case 50 - ratio = 1/2; - case 75 - ratio = 3/4; - case 100 - ratio = 1; - otherwise - disp("Wrong Number of RB"); - end - cp0 = cp0*ratio; - cp = cp*ratio; - cpe = cpe*ratio; - samplerate = samplerate*ratio; - ofdm_size = ofdm_size*ratio; - len = len*ratio; - - s_n0 = floor(32767*exp(-sqrt(-1)*2*pi*(-cp0:ofdm_size-1)*7.5e3/samplerate)); - s_n1 = floor(32767*exp(-sqrt(-1)*2*pi*(-cp:ofdm_size-1)*7.5e3/samplerate)); - s_n = [s_n0 s_n1 s_n1 s_n1 s_n1 s_n1 s_n1]; - s_n2 = zeros(1, 2*len); - s_n2(1:2:end) = real(s_n); - s_n2(2:2:end) = imag(s_n); - s_e = floor(32767*exp(-sqrt(-1)*2*pi*(-cpe:ofdm_size-1)*7.5e3/samplerate)); - s_e = [s_e s_e s_e s_e s_e s_e]; - s_e2 = zeros(1, 2*len); - s_e2(1:2:end) = real(s_e); - s_e2(2:2:end) = imag(s_e); -end - diff --git a/openair1/PHY/MODULATION/kHz_7_5.h b/openair1/PHY/MODULATION/kHz_7_5.h deleted file mode 100644 index ce2f0d5f2c..0000000000 --- a/openair1/PHY/MODULATION/kHz_7_5.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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.1 (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 - */ - -int16_t s6n_kHz_7_5[1920]__attribute__((aligned(16))) = {31785,7961,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805}; - -int16_t s6e_kHz_7_5[1920]__attribute__((aligned(16))) = {23169,23169,23731,22594,24278,22004,24811,21402,25329,20787,25831,20159,26318,19519,26789,18867,27244,18204,27683,17530,28105,16845,28510,16150,28897,15446,29268,14732,29621,14009,29955,13278,30272,12539,30571,11792,30851,11038,31113,10278,31356,9511,31580,8739,31785,7961,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,23169,23169,23731,22594,24278,22004,24811,21402,25329,20787,25831,20159,26318,19519,26789,18867,27244,18204,27683,17530,28105,16845,28510,16150,28897,15446,29268,14732,29621,14009,29955,13278,30272,12539,30571,11792,30851,11038,31113,10278,31356,9511,31580,8739,31785,7961,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,23169,23169,23731,22594,24278,22004,24811,21402,25329,20787,25831,20159,26318,19519,26789,18867,27244,18204,27683,17530,28105,16845,28510,16150,28897,15446,29268,14732,29621,14009,29955,13278,30272,12539,30571,11792,30851,11038,31113,10278,31356,9511,31580,8739,31785,7961,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,23169,23169,23731,22594,24278,22004,24811,21402,25329,20787,25831,20159,26318,19519,26789,18867,27244,18204,27683,17530,28105,16845,28510,16150,28897,15446,29268,14732,29621,14009,29955,13278,30272,12539,30571,11792,30851,11038,31113,10278,31356,9511,31580,8739,31785,7961,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,23169,23169,23731,22594,24278,22004,24811,21402,25329,20787,25831,20159,26318,19519,26789,18867,27244,18204,27683,17530,28105,16845,28510,16150,28897,15446,29268,14732,29621,14009,29955,13278,30272,12539,30571,11792,30851,11038,31113,10278,31356,9511,31580,8739,31785,7961,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,23169,23169,23731,22594,24278,22004,24811,21402,25329,20787,25831,20159,26318,19519,26789,18867,27244,18204,27683,17530,28105,16845,28510,16150,28897,15446,29268,14732,29621,14009,29955,13278,30272,12539,30571,11792,30851,11038,31113,10278,31356,9511,31580,8739,31785,7961,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805}; - -int16_t s15n_kHz_7_5[3840]__attribute__((aligned(16))) = {31785,7961,31880,7571,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403}; - -int16_t s15e_kHz_7_5[3840]__attribute__((aligned(16))) = {23169,23169,23452,22883,23731,22594,24006,22301,24278,22004,24546,21705,24811,21402,25072,21096,25329,20787,25582,20474,25831,20159,26077,19840,26318,19519,26556,19194,26789,18867,27019,18537,27244,18204,27466,17868,27683,17530,27896,17189,28105,16845,28309,16499,28510,16150,28706,15799,28897,15446,29085,15090,29268,14732,29446,14372,29621,14009,29790,13645,29955,13278,30116,12909,30272,12539,30424,12166,30571,11792,30713,11416,30851,11038,30984,10659,31113,10278,31236,9895,31356,9511,31470,9126,31580,8739,31684,8351,31785,7961,31880,7571,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,23169,23169,23452,22883,23731,22594,24006,22301,24278,22004,24546,21705,24811,21402,25072,21096,25329,20787,25582,20474,25831,20159,26077,19840,26318,19519,26556,19194,26789,18867,27019,18537,27244,18204,27466,17868,27683,17530,27896,17189,28105,16845,28309,16499,28510,16150,28706,15799,28897,15446,29085,15090,29268,14732,29446,14372,29621,14009,29790,13645,29955,13278,30116,12909,30272,12539,30424,12166,30571,11792,30713,11416,30851,11038,30984,10659,31113,10278,31236,9895,31356,9511,31470,9126,31580,8739,31684,8351,31785,7961,31880,7571,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,23169,23169,23452,22883,23731,22594,24006,22301,24278,22004,24546,21705,24811,21402,25072,21096,25329,20787,25582,20474,25831,20159,26077,19840,26318,19519,26556,19194,26789,18867,27019,18537,27244,18204,27466,17868,27683,17530,27896,17189,28105,16845,28309,16499,28510,16150,28706,15799,28897,15446,29085,15090,29268,14732,29446,14372,29621,14009,29790,13645,29955,13278,30116,12909,30272,12539,30424,12166,30571,11792,30713,11416,30851,11038,30984,10659,31113,10278,31236,9895,31356,9511,31470,9126,31580,8739,31684,8351,31785,7961,31880,7571,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,23169,23169,23452,22883,23731,22594,24006,22301,24278,22004,24546,21705,24811,21402,25072,21096,25329,20787,25582,20474,25831,20159,26077,19840,26318,19519,26556,19194,26789,18867,27019,18537,27244,18204,27466,17868,27683,17530,27896,17189,28105,16845,28309,16499,28510,16150,28706,15799,28897,15446,29085,15090,29268,14732,29446,14372,29621,14009,29790,13645,29955,13278,30116,12909,30272,12539,30424,12166,30571,11792,30713,11416,30851,11038,30984,10659,31113,10278,31236,9895,31356,9511,31470,9126,31580,8739,31684,8351,31785,7961,31880,7571,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,23169,23169,23452,22883,23731,22594,24006,22301,24278,22004,24546,21705,24811,21402,25072,21096,25329,20787,25582,20474,25831,20159,26077,19840,26318,19519,26556,19194,26789,18867,27019,18537,27244,18204,27466,17868,27683,17530,27896,17189,28105,16845,28309,16499,28510,16150,28706,15799,28897,15446,29085,15090,29268,14732,29446,14372,29621,14009,29790,13645,29955,13278,30116,12909,30272,12539,30424,12166,30571,11792,30713,11416,30851,11038,30984,10659,31113,10278,31236,9895,31356,9511,31470,9126,31580,8739,31684,8351,31785,7961,31880,7571,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,23169,23169,23452,22883,23731,22594,24006,22301,24278,22004,24546,21705,24811,21402,25072,21096,25329,20787,25582,20474,25831,20159,26077,19840,26318,19519,26556,19194,26789,18867,27019,18537,27244,18204,27466,17868,27683,17530,27896,17189,28105,16845,28309,16499,28510,16150,28706,15799,28897,15446,29085,15090,29268,14732,29446,14372,29621,14009,29790,13645,29955,13278,30116,12909,30272,12539,30424,12166,30571,11792,30713,11416,30851,11038,30984,10659,31113,10278,31236,9895,31356,9511,31470,9126,31580,8739,31684,8351,31785,7961,31880,7571,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403}; - -int16_t s25n_kHz_7_5[7680]__attribute__((aligned(16))) = {31785,7961,31833,7766,31880,7571,31926,7375,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202}; - -int16_t s25e_kHz_7_5[7680]__attribute__((aligned(16))) = {23169,23169,23311,23027,23452,22883,23592,22739,23731,22594,23869,22448,24006,22301,24143,22153,24278,22004,24413,21855,24546,21705,24679,21554,24811,21402,24942,21249,25072,21096,25201,20942,25329,20787,25456,20631,25582,20474,25707,20317,25831,20159,25954,20000,26077,19840,26198,19680,26318,19519,26437,19357,26556,19194,26673,19031,26789,18867,26905,18702,27019,18537,27132,18371,27244,18204,27355,18036,27466,17868,27575,17699,27683,17530,27790,17360,27896,17189,28001,17017,28105,16845,28208,16672,28309,16499,28410,16325,28510,16150,28608,15975,28706,15799,28802,15623,28897,15446,28992,15268,29085,15090,29177,14911,29268,14732,29358,14552,29446,14372,29534,14191,29621,14009,29706,13827,29790,13645,29873,13462,29955,13278,30036,13094,30116,12909,30195,12724,30272,12539,30349,12353,30424,12166,30498,11980,30571,11792,30643,11604,30713,11416,30783,11227,30851,11038,30918,10849,30984,10659,31049,10469,31113,10278,31175,10087,31236,9895,31297,9703,31356,9511,31413,9319,31470,9126,31525,8932,31580,8739,31633,8545,31684,8351,31735,8156,31785,7961,31833,7766,31880,7571,31926,7375,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,23169,23169,23311,23027,23452,22883,23592,22739,23731,22594,23869,22448,24006,22301,24143,22153,24278,22004,24413,21855,24546,21705,24679,21554,24811,21402,24942,21249,25072,21096,25201,20942,25329,20787,25456,20631,25582,20474,25707,20317,25831,20159,25954,20000,26077,19840,26198,19680,26318,19519,26437,19357,26556,19194,26673,19031,26789,18867,26905,18702,27019,18537,27132,18371,27244,18204,27355,18036,27466,17868,27575,17699,27683,17530,27790,17360,27896,17189,28001,17017,28105,16845,28208,16672,28309,16499,28410,16325,28510,16150,28608,15975,28706,15799,28802,15623,28897,15446,28992,15268,29085,15090,29177,14911,29268,14732,29358,14552,29446,14372,29534,14191,29621,14009,29706,13827,29790,13645,29873,13462,29955,13278,30036,13094,30116,12909,30195,12724,30272,12539,30349,12353,30424,12166,30498,11980,30571,11792,30643,11604,30713,11416,30783,11227,30851,11038,30918,10849,30984,10659,31049,10469,31113,10278,31175,10087,31236,9895,31297,9703,31356,9511,31413,9319,31470,9126,31525,8932,31580,8739,31633,8545,31684,8351,31735,8156,31785,7961,31833,7766,31880,7571,31926,7375,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,23169,23169,23311,23027,23452,22883,23592,22739,23731,22594,23869,22448,24006,22301,24143,22153,24278,22004,24413,21855,24546,21705,24679,21554,24811,21402,24942,21249,25072,21096,25201,20942,25329,20787,25456,20631,25582,20474,25707,20317,25831,20159,25954,20000,26077,19840,26198,19680,26318,19519,26437,19357,26556,19194,26673,19031,26789,18867,26905,18702,27019,18537,27132,18371,27244,18204,27355,18036,27466,17868,27575,17699,27683,17530,27790,17360,27896,17189,28001,17017,28105,16845,28208,16672,28309,16499,28410,16325,28510,16150,28608,15975,28706,15799,28802,15623,28897,15446,28992,15268,29085,15090,29177,14911,29268,14732,29358,14552,29446,14372,29534,14191,29621,14009,29706,13827,29790,13645,29873,13462,29955,13278,30036,13094,30116,12909,30195,12724,30272,12539,30349,12353,30424,12166,30498,11980,30571,11792,30643,11604,30713,11416,30783,11227,30851,11038,30918,10849,30984,10659,31049,10469,31113,10278,31175,10087,31236,9895,31297,9703,31356,9511,31413,9319,31470,9126,31525,8932,31580,8739,31633,8545,31684,8351,31735,8156,31785,7961,31833,7766,31880,7571,31926,7375,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,23169,23169,23311,23027,23452,22883,23592,22739,23731,22594,23869,22448,24006,22301,24143,22153,24278,22004,24413,21855,24546,21705,24679,21554,24811,21402,24942,21249,25072,21096,25201,20942,25329,20787,25456,20631,25582,20474,25707,20317,25831,20159,25954,20000,26077,19840,26198,19680,26318,19519,26437,19357,26556,19194,26673,19031,26789,18867,26905,18702,27019,18537,27132,18371,27244,18204,27355,18036,27466,17868,27575,17699,27683,17530,27790,17360,27896,17189,28001,17017,28105,16845,28208,16672,28309,16499,28410,16325,28510,16150,28608,15975,28706,15799,28802,15623,28897,15446,28992,15268,29085,15090,29177,14911,29268,14732,29358,14552,29446,14372,29534,14191,29621,14009,29706,13827,29790,13645,29873,13462,29955,13278,30036,13094,30116,12909,30195,12724,30272,12539,30349,12353,30424,12166,30498,11980,30571,11792,30643,11604,30713,11416,30783,11227,30851,11038,30918,10849,30984,10659,31049,10469,31113,10278,31175,10087,31236,9895,31297,9703,31356,9511,31413,9319,31470,9126,31525,8932,31580,8739,31633,8545,31684,8351,31735,8156,31785,7961,31833,7766,31880,7571,31926,7375,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,23169,23169,23311,23027,23452,22883,23592,22739,23731,22594,23869,22448,24006,22301,24143,22153,24278,22004,24413,21855,24546,21705,24679,21554,24811,21402,24942,21249,25072,21096,25201,20942,25329,20787,25456,20631,25582,20474,25707,20317,25831,20159,25954,20000,26077,19840,26198,19680,26318,19519,26437,19357,26556,19194,26673,19031,26789,18867,26905,18702,27019,18537,27132,18371,27244,18204,27355,18036,27466,17868,27575,17699,27683,17530,27790,17360,27896,17189,28001,17017,28105,16845,28208,16672,28309,16499,28410,16325,28510,16150,28608,15975,28706,15799,28802,15623,28897,15446,28992,15268,29085,15090,29177,14911,29268,14732,29358,14552,29446,14372,29534,14191,29621,14009,29706,13827,29790,13645,29873,13462,29955,13278,30036,13094,30116,12909,30195,12724,30272,12539,30349,12353,30424,12166,30498,11980,30571,11792,30643,11604,30713,11416,30783,11227,30851,11038,30918,10849,30984,10659,31049,10469,31113,10278,31175,10087,31236,9895,31297,9703,31356,9511,31413,9319,31470,9126,31525,8932,31580,8739,31633,8545,31684,8351,31735,8156,31785,7961,31833,7766,31880,7571,31926,7375,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,23169,23169,23311,23027,23452,22883,23592,22739,23731,22594,23869,22448,24006,22301,24143,22153,24278,22004,24413,21855,24546,21705,24679,21554,24811,21402,24942,21249,25072,21096,25201,20942,25329,20787,25456,20631,25582,20474,25707,20317,25831,20159,25954,20000,26077,19840,26198,19680,26318,19519,26437,19357,26556,19194,26673,19031,26789,18867,26905,18702,27019,18537,27132,18371,27244,18204,27355,18036,27466,17868,27575,17699,27683,17530,27790,17360,27896,17189,28001,17017,28105,16845,28208,16672,28309,16499,28410,16325,28510,16150,28608,15975,28706,15799,28802,15623,28897,15446,28992,15268,29085,15090,29177,14911,29268,14732,29358,14552,29446,14372,29534,14191,29621,14009,29706,13827,29790,13645,29873,13462,29955,13278,30036,13094,30116,12909,30195,12724,30272,12539,30349,12353,30424,12166,30498,11980,30571,11792,30643,11604,30713,11416,30783,11227,30851,11038,30918,10849,30984,10659,31049,10469,31113,10278,31175,10087,31236,9895,31297,9703,31356,9511,31413,9319,31470,9126,31525,8932,31580,8739,31633,8545,31684,8351,31735,8156,31785,7961,31833,7766,31880,7571,31926,7375,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202}; - -int16_t s50n_kHz_7_5[15360]__attribute__((aligned(16))) = {31785,7961,31809,7864,31833,7766,31856,7668,31880,7571,31903,7473,31926,7375,31948,7277,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101}; - -int16_t s50e_kHz_7_5[15360]__attribute__((aligned(16))) = {23169,23169,23240,23098,23311,23027,23382,22955,23452,22883,23522,22811,23592,22739,23661,22666,23731,22594,23800,22521,23869,22448,23938,22374,24006,22301,24075,22227,24143,22153,24211,22079,24278,22004,24346,21930,24413,21855,24480,21780,24546,21705,24613,21629,24679,21554,24745,21478,24811,21402,24877,21326,24942,21249,25007,21173,25072,21096,25136,21019,25201,20942,25265,20864,25329,20787,25392,20709,25456,20631,25519,20553,25582,20474,25645,20396,25707,20317,25769,20238,25831,20159,25893,20079,25954,20000,26016,19920,26077,19840,26137,19760,26198,19680,26258,19599,26318,19519,26378,19438,26437,19357,26497,19276,26556,19194,26615,19113,26673,19031,26731,18949,26789,18867,26847,18785,26905,18702,26962,18620,27019,18537,27076,18454,27132,18371,27188,18287,27244,18204,27300,18120,27355,18036,27411,17952,27466,17868,27520,17784,27575,17699,27629,17615,27683,17530,27736,17445,27790,17360,27843,17274,27896,17189,27948,17103,28001,17017,28053,16931,28105,16845,28156,16759,28208,16672,28259,16586,28309,16499,28360,16412,28410,16325,28460,16238,28510,16150,28559,16063,28608,15975,28657,15887,28706,15799,28754,15711,28802,15623,28850,15534,28897,15446,28945,15357,28992,15268,29038,15179,29085,15090,29131,15001,29177,14911,29222,14822,29268,14732,29313,14642,29358,14552,29402,14462,29446,14372,29490,14281,29534,14191,29577,14100,29621,14009,29663,13918,29706,13827,29748,13736,29790,13645,29832,13553,29873,13462,29915,13370,29955,13278,29996,13186,30036,13094,30076,13002,30116,12909,30156,12817,30195,12724,30234,12632,30272,12539,30311,12446,30349,12353,30386,12260,30424,12166,30461,12073,30498,11980,30535,11886,30571,11792,30607,11698,30643,11604,30678,11510,30713,11416,30748,11322,30783,11227,30817,11133,30851,11038,30885,10944,30918,10849,30951,10754,30984,10659,31017,10564,31049,10469,31081,10373,31113,10278,31144,10182,31175,10087,31206,9991,31236,9895,31267,9799,31297,9703,31326,9607,31356,9511,31385,9415,31413,9319,31442,9222,31470,9126,31498,9029,31525,8932,31553,8836,31580,8739,31606,8642,31633,8545,31659,8448,31684,8351,31710,8253,31735,8156,31760,8059,31785,7961,31809,7864,31833,7766,31856,7668,31880,7571,31903,7473,31926,7375,31948,7277,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,23169,23169,23240,23098,23311,23027,23382,22955,23452,22883,23522,22811,23592,22739,23661,22666,23731,22594,23800,22521,23869,22448,23938,22374,24006,22301,24075,22227,24143,22153,24211,22079,24278,22004,24346,21930,24413,21855,24480,21780,24546,21705,24613,21629,24679,21554,24745,21478,24811,21402,24877,21326,24942,21249,25007,21173,25072,21096,25136,21019,25201,20942,25265,20864,25329,20787,25392,20709,25456,20631,25519,20553,25582,20474,25645,20396,25707,20317,25769,20238,25831,20159,25893,20079,25954,20000,26016,19920,26077,19840,26137,19760,26198,19680,26258,19599,26318,19519,26378,19438,26437,19357,26497,19276,26556,19194,26615,19113,26673,19031,26731,18949,26789,18867,26847,18785,26905,18702,26962,18620,27019,18537,27076,18454,27132,18371,27188,18287,27244,18204,27300,18120,27355,18036,27411,17952,27466,17868,27520,17784,27575,17699,27629,17615,27683,17530,27736,17445,27790,17360,27843,17274,27896,17189,27948,17103,28001,17017,28053,16931,28105,16845,28156,16759,28208,16672,28259,16586,28309,16499,28360,16412,28410,16325,28460,16238,28510,16150,28559,16063,28608,15975,28657,15887,28706,15799,28754,15711,28802,15623,28850,15534,28897,15446,28945,15357,28992,15268,29038,15179,29085,15090,29131,15001,29177,14911,29222,14822,29268,14732,29313,14642,29358,14552,29402,14462,29446,14372,29490,14281,29534,14191,29577,14100,29621,14009,29663,13918,29706,13827,29748,13736,29790,13645,29832,13553,29873,13462,29915,13370,29955,13278,29996,13186,30036,13094,30076,13002,30116,12909,30156,12817,30195,12724,30234,12632,30272,12539,30311,12446,30349,12353,30386,12260,30424,12166,30461,12073,30498,11980,30535,11886,30571,11792,30607,11698,30643,11604,30678,11510,30713,11416,30748,11322,30783,11227,30817,11133,30851,11038,30885,10944,30918,10849,30951,10754,30984,10659,31017,10564,31049,10469,31081,10373,31113,10278,31144,10182,31175,10087,31206,9991,31236,9895,31267,9799,31297,9703,31326,9607,31356,9511,31385,9415,31413,9319,31442,9222,31470,9126,31498,9029,31525,8932,31553,8836,31580,8739,31606,8642,31633,8545,31659,8448,31684,8351,31710,8253,31735,8156,31760,8059,31785,7961,31809,7864,31833,7766,31856,7668,31880,7571,31903,7473,31926,7375,31948,7277,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,23169,23169,23240,23098,23311,23027,23382,22955,23452,22883,23522,22811,23592,22739,23661,22666,23731,22594,23800,22521,23869,22448,23938,22374,24006,22301,24075,22227,24143,22153,24211,22079,24278,22004,24346,21930,24413,21855,24480,21780,24546,21705,24613,21629,24679,21554,24745,21478,24811,21402,24877,21326,24942,21249,25007,21173,25072,21096,25136,21019,25201,20942,25265,20864,25329,20787,25392,20709,25456,20631,25519,20553,25582,20474,25645,20396,25707,20317,25769,20238,25831,20159,25893,20079,25954,20000,26016,19920,26077,19840,26137,19760,26198,19680,26258,19599,26318,19519,26378,19438,26437,19357,26497,19276,26556,19194,26615,19113,26673,19031,26731,18949,26789,18867,26847,18785,26905,18702,26962,18620,27019,18537,27076,18454,27132,18371,27188,18287,27244,18204,27300,18120,27355,18036,27411,17952,27466,17868,27520,17784,27575,17699,27629,17615,27683,17530,27736,17445,27790,17360,27843,17274,27896,17189,27948,17103,28001,17017,28053,16931,28105,16845,28156,16759,28208,16672,28259,16586,28309,16499,28360,16412,28410,16325,28460,16238,28510,16150,28559,16063,28608,15975,28657,15887,28706,15799,28754,15711,28802,15623,28850,15534,28897,15446,28945,15357,28992,15268,29038,15179,29085,15090,29131,15001,29177,14911,29222,14822,29268,14732,29313,14642,29358,14552,29402,14462,29446,14372,29490,14281,29534,14191,29577,14100,29621,14009,29663,13918,29706,13827,29748,13736,29790,13645,29832,13553,29873,13462,29915,13370,29955,13278,29996,13186,30036,13094,30076,13002,30116,12909,30156,12817,30195,12724,30234,12632,30272,12539,30311,12446,30349,12353,30386,12260,30424,12166,30461,12073,30498,11980,30535,11886,30571,11792,30607,11698,30643,11604,30678,11510,30713,11416,30748,11322,30783,11227,30817,11133,30851,11038,30885,10944,30918,10849,30951,10754,30984,10659,31017,10564,31049,10469,31081,10373,31113,10278,31144,10182,31175,10087,31206,9991,31236,9895,31267,9799,31297,9703,31326,9607,31356,9511,31385,9415,31413,9319,31442,9222,31470,9126,31498,9029,31525,8932,31553,8836,31580,8739,31606,8642,31633,8545,31659,8448,31684,8351,31710,8253,31735,8156,31760,8059,31785,7961,31809,7864,31833,7766,31856,7668,31880,7571,31903,7473,31926,7375,31948,7277,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,23169,23169,23240,23098,23311,23027,23382,22955,23452,22883,23522,22811,23592,22739,23661,22666,23731,22594,23800,22521,23869,22448,23938,22374,24006,22301,24075,22227,24143,22153,24211,22079,24278,22004,24346,21930,24413,21855,24480,21780,24546,21705,24613,21629,24679,21554,24745,21478,24811,21402,24877,21326,24942,21249,25007,21173,25072,21096,25136,21019,25201,20942,25265,20864,25329,20787,25392,20709,25456,20631,25519,20553,25582,20474,25645,20396,25707,20317,25769,20238,25831,20159,25893,20079,25954,20000,26016,19920,26077,19840,26137,19760,26198,19680,26258,19599,26318,19519,26378,19438,26437,19357,26497,19276,26556,19194,26615,19113,26673,19031,26731,18949,26789,18867,26847,18785,26905,18702,26962,18620,27019,18537,27076,18454,27132,18371,27188,18287,27244,18204,27300,18120,27355,18036,27411,17952,27466,17868,27520,17784,27575,17699,27629,17615,27683,17530,27736,17445,27790,17360,27843,17274,27896,17189,27948,17103,28001,17017,28053,16931,28105,16845,28156,16759,28208,16672,28259,16586,28309,16499,28360,16412,28410,16325,28460,16238,28510,16150,28559,16063,28608,15975,28657,15887,28706,15799,28754,15711,28802,15623,28850,15534,28897,15446,28945,15357,28992,15268,29038,15179,29085,15090,29131,15001,29177,14911,29222,14822,29268,14732,29313,14642,29358,14552,29402,14462,29446,14372,29490,14281,29534,14191,29577,14100,29621,14009,29663,13918,29706,13827,29748,13736,29790,13645,29832,13553,29873,13462,29915,13370,29955,13278,29996,13186,30036,13094,30076,13002,30116,12909,30156,12817,30195,12724,30234,12632,30272,12539,30311,12446,30349,12353,30386,12260,30424,12166,30461,12073,30498,11980,30535,11886,30571,11792,30607,11698,30643,11604,30678,11510,30713,11416,30748,11322,30783,11227,30817,11133,30851,11038,30885,10944,30918,10849,30951,10754,30984,10659,31017,10564,31049,10469,31081,10373,31113,10278,31144,10182,31175,10087,31206,9991,31236,9895,31267,9799,31297,9703,31326,9607,31356,9511,31385,9415,31413,9319,31442,9222,31470,9126,31498,9029,31525,8932,31553,8836,31580,8739,31606,8642,31633,8545,31659,8448,31684,8351,31710,8253,31735,8156,31760,8059,31785,7961,31809,7864,31833,7766,31856,7668,31880,7571,31903,7473,31926,7375,31948,7277,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,23169,23169,23240,23098,23311,23027,23382,22955,23452,22883,23522,22811,23592,22739,23661,22666,23731,22594,23800,22521,23869,22448,23938,22374,24006,22301,24075,22227,24143,22153,24211,22079,24278,22004,24346,21930,24413,21855,24480,21780,24546,21705,24613,21629,24679,21554,24745,21478,24811,21402,24877,21326,24942,21249,25007,21173,25072,21096,25136,21019,25201,20942,25265,20864,25329,20787,25392,20709,25456,20631,25519,20553,25582,20474,25645,20396,25707,20317,25769,20238,25831,20159,25893,20079,25954,20000,26016,19920,26077,19840,26137,19760,26198,19680,26258,19599,26318,19519,26378,19438,26437,19357,26497,19276,26556,19194,26615,19113,26673,19031,26731,18949,26789,18867,26847,18785,26905,18702,26962,18620,27019,18537,27076,18454,27132,18371,27188,18287,27244,18204,27300,18120,27355,18036,27411,17952,27466,17868,27520,17784,27575,17699,27629,17615,27683,17530,27736,17445,27790,17360,27843,17274,27896,17189,27948,17103,28001,17017,28053,16931,28105,16845,28156,16759,28208,16672,28259,16586,28309,16499,28360,16412,28410,16325,28460,16238,28510,16150,28559,16063,28608,15975,28657,15887,28706,15799,28754,15711,28802,15623,28850,15534,28897,15446,28945,15357,28992,15268,29038,15179,29085,15090,29131,15001,29177,14911,29222,14822,29268,14732,29313,14642,29358,14552,29402,14462,29446,14372,29490,14281,29534,14191,29577,14100,29621,14009,29663,13918,29706,13827,29748,13736,29790,13645,29832,13553,29873,13462,29915,13370,29955,13278,29996,13186,30036,13094,30076,13002,30116,12909,30156,12817,30195,12724,30234,12632,30272,12539,30311,12446,30349,12353,30386,12260,30424,12166,30461,12073,30498,11980,30535,11886,30571,11792,30607,11698,30643,11604,30678,11510,30713,11416,30748,11322,30783,11227,30817,11133,30851,11038,30885,10944,30918,10849,30951,10754,30984,10659,31017,10564,31049,10469,31081,10373,31113,10278,31144,10182,31175,10087,31206,9991,31236,9895,31267,9799,31297,9703,31326,9607,31356,9511,31385,9415,31413,9319,31442,9222,31470,9126,31498,9029,31525,8932,31553,8836,31580,8739,31606,8642,31633,8545,31659,8448,31684,8351,31710,8253,31735,8156,31760,8059,31785,7961,31809,7864,31833,7766,31856,7668,31880,7571,31903,7473,31926,7375,31948,7277,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,23169,23169,23240,23098,23311,23027,23382,22955,23452,22883,23522,22811,23592,22739,23661,22666,23731,22594,23800,22521,23869,22448,23938,22374,24006,22301,24075,22227,24143,22153,24211,22079,24278,22004,24346,21930,24413,21855,24480,21780,24546,21705,24613,21629,24679,21554,24745,21478,24811,21402,24877,21326,24942,21249,25007,21173,25072,21096,25136,21019,25201,20942,25265,20864,25329,20787,25392,20709,25456,20631,25519,20553,25582,20474,25645,20396,25707,20317,25769,20238,25831,20159,25893,20079,25954,20000,26016,19920,26077,19840,26137,19760,26198,19680,26258,19599,26318,19519,26378,19438,26437,19357,26497,19276,26556,19194,26615,19113,26673,19031,26731,18949,26789,18867,26847,18785,26905,18702,26962,18620,27019,18537,27076,18454,27132,18371,27188,18287,27244,18204,27300,18120,27355,18036,27411,17952,27466,17868,27520,17784,27575,17699,27629,17615,27683,17530,27736,17445,27790,17360,27843,17274,27896,17189,27948,17103,28001,17017,28053,16931,28105,16845,28156,16759,28208,16672,28259,16586,28309,16499,28360,16412,28410,16325,28460,16238,28510,16150,28559,16063,28608,15975,28657,15887,28706,15799,28754,15711,28802,15623,28850,15534,28897,15446,28945,15357,28992,15268,29038,15179,29085,15090,29131,15001,29177,14911,29222,14822,29268,14732,29313,14642,29358,14552,29402,14462,29446,14372,29490,14281,29534,14191,29577,14100,29621,14009,29663,13918,29706,13827,29748,13736,29790,13645,29832,13553,29873,13462,29915,13370,29955,13278,29996,13186,30036,13094,30076,13002,30116,12909,30156,12817,30195,12724,30234,12632,30272,12539,30311,12446,30349,12353,30386,12260,30424,12166,30461,12073,30498,11980,30535,11886,30571,11792,30607,11698,30643,11604,30678,11510,30713,11416,30748,11322,30783,11227,30817,11133,30851,11038,30885,10944,30918,10849,30951,10754,30984,10659,31017,10564,31049,10469,31081,10373,31113,10278,31144,10182,31175,10087,31206,9991,31236,9895,31267,9799,31297,9703,31326,9607,31356,9511,31385,9415,31413,9319,31442,9222,31470,9126,31498,9029,31525,8932,31553,8836,31580,8739,31606,8642,31633,8545,31659,8448,31684,8351,31710,8253,31735,8156,31760,8059,31785,7961,31809,7864,31833,7766,31856,7668,31880,7571,31903,7473,31926,7375,31948,7277,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101}; - -int16_t s75n_kHz_7_5[23040]__attribute__((aligned(16))) = {31785,7961,31801,7896,31817,7831,31833,7766,31849,7701,31864,7636,31880,7571,31895,7505,31911,7440,31926,7375,31941,7310,31956,7244,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68}; - -int16_t s75e_kHz_7_5[23040]__attribute__((aligned(16))) = {23169,23169,23217,23122,23264,23074,23311,23027,23358,22979,23405,22931,23452,22883,23499,22835,23545,22787,23592,22739,23638,22691,23685,22642,23731,22594,23777,22545,23823,22496,23869,22448,23915,22399,23961,22350,24006,22301,24052,22252,24097,22202,24143,22153,24188,22104,24233,22054,24278,22004,24323,21955,24368,21905,24413,21855,24457,21805,24502,21755,24546,21705,24591,21655,24635,21604,24679,21554,24723,21503,24767,21453,24811,21402,24855,21351,24898,21300,24942,21249,24985,21198,25029,21147,25072,21096,25115,21045,25158,20993,25201,20942,25243,20890,25286,20838,25329,20787,25371,20735,25414,20683,25456,20631,25498,20579,25540,20527,25582,20474,25624,20422,25665,20369,25707,20317,25749,20264,25790,20212,25831,20159,25872,20106,25913,20053,25954,20000,25995,19947,26036,19894,26077,19840,26117,19787,26158,19733,26198,19680,26238,19626,26278,19573,26318,19519,26358,19465,26398,19411,26437,19357,26477,19303,26516,19249,26556,19194,26595,19140,26634,19086,26673,19031,26712,18976,26751,18922,26789,18867,26828,18812,26866,18757,26905,18702,26943,18647,26981,18592,27019,18537,27057,18482,27094,18426,27132,18371,27170,18315,27207,18260,27244,18204,27281,18148,27319,18092,27355,18036,27392,17980,27429,17924,27466,17868,27502,17812,27538,17756,27575,17699,27611,17643,27647,17586,27683,17530,27719,17473,27754,17416,27790,17360,27825,17303,27861,17246,27896,17189,27931,17132,27966,17074,28001,17017,28036,16960,28070,16903,28105,16845,28139,16788,28173,16730,28208,16672,28242,16615,28275,16557,28309,16499,28343,16441,28377,16383,28410,16325,28443,16267,28477,16209,28510,16150,28543,16092,28575,16034,28608,15975,28641,15917,28673,15858,28706,15799,28738,15740,28770,15682,28802,15623,28834,15564,28866,15505,28897,15446,28929,15387,28960,15327,28992,15268,29023,15209,29054,15149,29085,15090,29116,15030,29146,14971,29177,14911,29207,14852,29238,14792,29268,14732,29298,14672,29328,14612,29358,14552,29387,14492,29417,14432,29446,14372,29476,14311,29505,14251,29534,14191,29563,14130,29592,14070,29621,14009,29649,13949,29678,13888,29706,13827,29734,13766,29762,13706,29790,13645,29818,13584,29846,13523,29873,13462,29901,13400,29928,13339,29955,13278,29983,13217,30009,13155,30036,13094,30063,13033,30090,12971,30116,12909,30142,12848,30169,12786,30195,12724,30221,12663,30247,12601,30272,12539,30298,12477,30323,12415,30349,12353,30374,12291,30399,12229,30424,12166,30449,12104,30473,12042,30498,11980,30522,11917,30547,11855,30571,11792,30595,11730,30619,11667,30643,11604,30666,11542,30690,11479,30713,11416,30737,11353,30760,11290,30783,11227,30806,11164,30828,11101,30851,11038,30874,10975,30896,10912,30918,10849,30940,10786,30962,10722,30984,10659,31006,10596,31028,10532,31049,10469,31070,10405,31092,10342,31113,10278,31134,10214,31154,10151,31175,10087,31196,10023,31216,9959,31236,9895,31257,9831,31277,9767,31297,9703,31316,9639,31336,9575,31356,9511,31375,9447,31394,9383,31413,9319,31432,9254,31451,9190,31470,9126,31489,9061,31507,8997,31525,8932,31544,8868,31562,8803,31580,8739,31597,8674,31615,8610,31633,8545,31650,8480,31667,8415,31684,8351,31701,8286,31718,8221,31735,8156,31752,8091,31768,8026,31785,7961,31801,7896,31817,7831,31833,7766,31849,7701,31864,7636,31880,7571,31895,7505,31911,7440,31926,7375,31941,7310,31956,7244,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,23169,23169,23217,23122,23264,23074,23311,23027,23358,22979,23405,22931,23452,22883,23499,22835,23545,22787,23592,22739,23638,22691,23685,22642,23731,22594,23777,22545,23823,22496,23869,22448,23915,22399,23961,22350,24006,22301,24052,22252,24097,22202,24143,22153,24188,22104,24233,22054,24278,22004,24323,21955,24368,21905,24413,21855,24457,21805,24502,21755,24546,21705,24591,21655,24635,21604,24679,21554,24723,21503,24767,21453,24811,21402,24855,21351,24898,21300,24942,21249,24985,21198,25029,21147,25072,21096,25115,21045,25158,20993,25201,20942,25243,20890,25286,20838,25329,20787,25371,20735,25414,20683,25456,20631,25498,20579,25540,20527,25582,20474,25624,20422,25665,20369,25707,20317,25749,20264,25790,20212,25831,20159,25872,20106,25913,20053,25954,20000,25995,19947,26036,19894,26077,19840,26117,19787,26158,19733,26198,19680,26238,19626,26278,19573,26318,19519,26358,19465,26398,19411,26437,19357,26477,19303,26516,19249,26556,19194,26595,19140,26634,19086,26673,19031,26712,18976,26751,18922,26789,18867,26828,18812,26866,18757,26905,18702,26943,18647,26981,18592,27019,18537,27057,18482,27094,18426,27132,18371,27170,18315,27207,18260,27244,18204,27281,18148,27319,18092,27355,18036,27392,17980,27429,17924,27466,17868,27502,17812,27538,17756,27575,17699,27611,17643,27647,17586,27683,17530,27719,17473,27754,17416,27790,17360,27825,17303,27861,17246,27896,17189,27931,17132,27966,17074,28001,17017,28036,16960,28070,16903,28105,16845,28139,16788,28173,16730,28208,16672,28242,16615,28275,16557,28309,16499,28343,16441,28377,16383,28410,16325,28443,16267,28477,16209,28510,16150,28543,16092,28575,16034,28608,15975,28641,15917,28673,15858,28706,15799,28738,15740,28770,15682,28802,15623,28834,15564,28866,15505,28897,15446,28929,15387,28960,15327,28992,15268,29023,15209,29054,15149,29085,15090,29116,15030,29146,14971,29177,14911,29207,14852,29238,14792,29268,14732,29298,14672,29328,14612,29358,14552,29387,14492,29417,14432,29446,14372,29476,14311,29505,14251,29534,14191,29563,14130,29592,14070,29621,14009,29649,13949,29678,13888,29706,13827,29734,13766,29762,13706,29790,13645,29818,13584,29846,13523,29873,13462,29901,13400,29928,13339,29955,13278,29983,13217,30009,13155,30036,13094,30063,13033,30090,12971,30116,12909,30142,12848,30169,12786,30195,12724,30221,12663,30247,12601,30272,12539,30298,12477,30323,12415,30349,12353,30374,12291,30399,12229,30424,12166,30449,12104,30473,12042,30498,11980,30522,11917,30547,11855,30571,11792,30595,11730,30619,11667,30643,11604,30666,11542,30690,11479,30713,11416,30737,11353,30760,11290,30783,11227,30806,11164,30828,11101,30851,11038,30874,10975,30896,10912,30918,10849,30940,10786,30962,10722,30984,10659,31006,10596,31028,10532,31049,10469,31070,10405,31092,10342,31113,10278,31134,10214,31154,10151,31175,10087,31196,10023,31216,9959,31236,9895,31257,9831,31277,9767,31297,9703,31316,9639,31336,9575,31356,9511,31375,9447,31394,9383,31413,9319,31432,9254,31451,9190,31470,9126,31489,9061,31507,8997,31525,8932,31544,8868,31562,8803,31580,8739,31597,8674,31615,8610,31633,8545,31650,8480,31667,8415,31684,8351,31701,8286,31718,8221,31735,8156,31752,8091,31768,8026,31785,7961,31801,7896,31817,7831,31833,7766,31849,7701,31864,7636,31880,7571,31895,7505,31911,7440,31926,7375,31941,7310,31956,7244,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,23169,23169,23217,23122,23264,23074,23311,23027,23358,22979,23405,22931,23452,22883,23499,22835,23545,22787,23592,22739,23638,22691,23685,22642,23731,22594,23777,22545,23823,22496,23869,22448,23915,22399,23961,22350,24006,22301,24052,22252,24097,22202,24143,22153,24188,22104,24233,22054,24278,22004,24323,21955,24368,21905,24413,21855,24457,21805,24502,21755,24546,21705,24591,21655,24635,21604,24679,21554,24723,21503,24767,21453,24811,21402,24855,21351,24898,21300,24942,21249,24985,21198,25029,21147,25072,21096,25115,21045,25158,20993,25201,20942,25243,20890,25286,20838,25329,20787,25371,20735,25414,20683,25456,20631,25498,20579,25540,20527,25582,20474,25624,20422,25665,20369,25707,20317,25749,20264,25790,20212,25831,20159,25872,20106,25913,20053,25954,20000,25995,19947,26036,19894,26077,19840,26117,19787,26158,19733,26198,19680,26238,19626,26278,19573,26318,19519,26358,19465,26398,19411,26437,19357,26477,19303,26516,19249,26556,19194,26595,19140,26634,19086,26673,19031,26712,18976,26751,18922,26789,18867,26828,18812,26866,18757,26905,18702,26943,18647,26981,18592,27019,18537,27057,18482,27094,18426,27132,18371,27170,18315,27207,18260,27244,18204,27281,18148,27319,18092,27355,18036,27392,17980,27429,17924,27466,17868,27502,17812,27538,17756,27575,17699,27611,17643,27647,17586,27683,17530,27719,17473,27754,17416,27790,17360,27825,17303,27861,17246,27896,17189,27931,17132,27966,17074,28001,17017,28036,16960,28070,16903,28105,16845,28139,16788,28173,16730,28208,16672,28242,16615,28275,16557,28309,16499,28343,16441,28377,16383,28410,16325,28443,16267,28477,16209,28510,16150,28543,16092,28575,16034,28608,15975,28641,15917,28673,15858,28706,15799,28738,15740,28770,15682,28802,15623,28834,15564,28866,15505,28897,15446,28929,15387,28960,15327,28992,15268,29023,15209,29054,15149,29085,15090,29116,15030,29146,14971,29177,14911,29207,14852,29238,14792,29268,14732,29298,14672,29328,14612,29358,14552,29387,14492,29417,14432,29446,14372,29476,14311,29505,14251,29534,14191,29563,14130,29592,14070,29621,14009,29649,13949,29678,13888,29706,13827,29734,13766,29762,13706,29790,13645,29818,13584,29846,13523,29873,13462,29901,13400,29928,13339,29955,13278,29983,13217,30009,13155,30036,13094,30063,13033,30090,12971,30116,12909,30142,12848,30169,12786,30195,12724,30221,12663,30247,12601,30272,12539,30298,12477,30323,12415,30349,12353,30374,12291,30399,12229,30424,12166,30449,12104,30473,12042,30498,11980,30522,11917,30547,11855,30571,11792,30595,11730,30619,11667,30643,11604,30666,11542,30690,11479,30713,11416,30737,11353,30760,11290,30783,11227,30806,11164,30828,11101,30851,11038,30874,10975,30896,10912,30918,10849,30940,10786,30962,10722,30984,10659,31006,10596,31028,10532,31049,10469,31070,10405,31092,10342,31113,10278,31134,10214,31154,10151,31175,10087,31196,10023,31216,9959,31236,9895,31257,9831,31277,9767,31297,9703,31316,9639,31336,9575,31356,9511,31375,9447,31394,9383,31413,9319,31432,9254,31451,9190,31470,9126,31489,9061,31507,8997,31525,8932,31544,8868,31562,8803,31580,8739,31597,8674,31615,8610,31633,8545,31650,8480,31667,8415,31684,8351,31701,8286,31718,8221,31735,8156,31752,8091,31768,8026,31785,7961,31801,7896,31817,7831,31833,7766,31849,7701,31864,7636,31880,7571,31895,7505,31911,7440,31926,7375,31941,7310,31956,7244,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,23169,23169,23217,23122,23264,23074,23311,23027,23358,22979,23405,22931,23452,22883,23499,22835,23545,22787,23592,22739,23638,22691,23685,22642,23731,22594,23777,22545,23823,22496,23869,22448,23915,22399,23961,22350,24006,22301,24052,22252,24097,22202,24143,22153,24188,22104,24233,22054,24278,22004,24323,21955,24368,21905,24413,21855,24457,21805,24502,21755,24546,21705,24591,21655,24635,21604,24679,21554,24723,21503,24767,21453,24811,21402,24855,21351,24898,21300,24942,21249,24985,21198,25029,21147,25072,21096,25115,21045,25158,20993,25201,20942,25243,20890,25286,20838,25329,20787,25371,20735,25414,20683,25456,20631,25498,20579,25540,20527,25582,20474,25624,20422,25665,20369,25707,20317,25749,20264,25790,20212,25831,20159,25872,20106,25913,20053,25954,20000,25995,19947,26036,19894,26077,19840,26117,19787,26158,19733,26198,19680,26238,19626,26278,19573,26318,19519,26358,19465,26398,19411,26437,19357,26477,19303,26516,19249,26556,19194,26595,19140,26634,19086,26673,19031,26712,18976,26751,18922,26789,18867,26828,18812,26866,18757,26905,18702,26943,18647,26981,18592,27019,18537,27057,18482,27094,18426,27132,18371,27170,18315,27207,18260,27244,18204,27281,18148,27319,18092,27355,18036,27392,17980,27429,17924,27466,17868,27502,17812,27538,17756,27575,17699,27611,17643,27647,17586,27683,17530,27719,17473,27754,17416,27790,17360,27825,17303,27861,17246,27896,17189,27931,17132,27966,17074,28001,17017,28036,16960,28070,16903,28105,16845,28139,16788,28173,16730,28208,16672,28242,16615,28275,16557,28309,16499,28343,16441,28377,16383,28410,16325,28443,16267,28477,16209,28510,16150,28543,16092,28575,16034,28608,15975,28641,15917,28673,15858,28706,15799,28738,15740,28770,15682,28802,15623,28834,15564,28866,15505,28897,15446,28929,15387,28960,15327,28992,15268,29023,15209,29054,15149,29085,15090,29116,15030,29146,14971,29177,14911,29207,14852,29238,14792,29268,14732,29298,14672,29328,14612,29358,14552,29387,14492,29417,14432,29446,14372,29476,14311,29505,14251,29534,14191,29563,14130,29592,14070,29621,14009,29649,13949,29678,13888,29706,13827,29734,13766,29762,13706,29790,13645,29818,13584,29846,13523,29873,13462,29901,13400,29928,13339,29955,13278,29983,13217,30009,13155,30036,13094,30063,13033,30090,12971,30116,12909,30142,12848,30169,12786,30195,12724,30221,12663,30247,12601,30272,12539,30298,12477,30323,12415,30349,12353,30374,12291,30399,12229,30424,12166,30449,12104,30473,12042,30498,11980,30522,11917,30547,11855,30571,11792,30595,11730,30619,11667,30643,11604,30666,11542,30690,11479,30713,11416,30737,11353,30760,11290,30783,11227,30806,11164,30828,11101,30851,11038,30874,10975,30896,10912,30918,10849,30940,10786,30962,10722,30984,10659,31006,10596,31028,10532,31049,10469,31070,10405,31092,10342,31113,10278,31134,10214,31154,10151,31175,10087,31196,10023,31216,9959,31236,9895,31257,9831,31277,9767,31297,9703,31316,9639,31336,9575,31356,9511,31375,9447,31394,9383,31413,9319,31432,9254,31451,9190,31470,9126,31489,9061,31507,8997,31525,8932,31544,8868,31562,8803,31580,8739,31597,8674,31615,8610,31633,8545,31650,8480,31667,8415,31684,8351,31701,8286,31718,8221,31735,8156,31752,8091,31768,8026,31785,7961,31801,7896,31817,7831,31833,7766,31849,7701,31864,7636,31880,7571,31895,7505,31911,7440,31926,7375,31941,7310,31956,7244,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,23169,23169,23217,23122,23264,23074,23311,23027,23358,22979,23405,22931,23452,22883,23499,22835,23545,22787,23592,22739,23638,22691,23685,22642,23731,22594,23777,22545,23823,22496,23869,22448,23915,22399,23961,22350,24006,22301,24052,22252,24097,22202,24143,22153,24188,22104,24233,22054,24278,22004,24323,21955,24368,21905,24413,21855,24457,21805,24502,21755,24546,21705,24591,21655,24635,21604,24679,21554,24723,21503,24767,21453,24811,21402,24855,21351,24898,21300,24942,21249,24985,21198,25029,21147,25072,21096,25115,21045,25158,20993,25201,20942,25243,20890,25286,20838,25329,20787,25371,20735,25414,20683,25456,20631,25498,20579,25540,20527,25582,20474,25624,20422,25665,20369,25707,20317,25749,20264,25790,20212,25831,20159,25872,20106,25913,20053,25954,20000,25995,19947,26036,19894,26077,19840,26117,19787,26158,19733,26198,19680,26238,19626,26278,19573,26318,19519,26358,19465,26398,19411,26437,19357,26477,19303,26516,19249,26556,19194,26595,19140,26634,19086,26673,19031,26712,18976,26751,18922,26789,18867,26828,18812,26866,18757,26905,18702,26943,18647,26981,18592,27019,18537,27057,18482,27094,18426,27132,18371,27170,18315,27207,18260,27244,18204,27281,18148,27319,18092,27355,18036,27392,17980,27429,17924,27466,17868,27502,17812,27538,17756,27575,17699,27611,17643,27647,17586,27683,17530,27719,17473,27754,17416,27790,17360,27825,17303,27861,17246,27896,17189,27931,17132,27966,17074,28001,17017,28036,16960,28070,16903,28105,16845,28139,16788,28173,16730,28208,16672,28242,16615,28275,16557,28309,16499,28343,16441,28377,16383,28410,16325,28443,16267,28477,16209,28510,16150,28543,16092,28575,16034,28608,15975,28641,15917,28673,15858,28706,15799,28738,15740,28770,15682,28802,15623,28834,15564,28866,15505,28897,15446,28929,15387,28960,15327,28992,15268,29023,15209,29054,15149,29085,15090,29116,15030,29146,14971,29177,14911,29207,14852,29238,14792,29268,14732,29298,14672,29328,14612,29358,14552,29387,14492,29417,14432,29446,14372,29476,14311,29505,14251,29534,14191,29563,14130,29592,14070,29621,14009,29649,13949,29678,13888,29706,13827,29734,13766,29762,13706,29790,13645,29818,13584,29846,13523,29873,13462,29901,13400,29928,13339,29955,13278,29983,13217,30009,13155,30036,13094,30063,13033,30090,12971,30116,12909,30142,12848,30169,12786,30195,12724,30221,12663,30247,12601,30272,12539,30298,12477,30323,12415,30349,12353,30374,12291,30399,12229,30424,12166,30449,12104,30473,12042,30498,11980,30522,11917,30547,11855,30571,11792,30595,11730,30619,11667,30643,11604,30666,11542,30690,11479,30713,11416,30737,11353,30760,11290,30783,11227,30806,11164,30828,11101,30851,11038,30874,10975,30896,10912,30918,10849,30940,10786,30962,10722,30984,10659,31006,10596,31028,10532,31049,10469,31070,10405,31092,10342,31113,10278,31134,10214,31154,10151,31175,10087,31196,10023,31216,9959,31236,9895,31257,9831,31277,9767,31297,9703,31316,9639,31336,9575,31356,9511,31375,9447,31394,9383,31413,9319,31432,9254,31451,9190,31470,9126,31489,9061,31507,8997,31525,8932,31544,8868,31562,8803,31580,8739,31597,8674,31615,8610,31633,8545,31650,8480,31667,8415,31684,8351,31701,8286,31718,8221,31735,8156,31752,8091,31768,8026,31785,7961,31801,7896,31817,7831,31833,7766,31849,7701,31864,7636,31880,7571,31895,7505,31911,7440,31926,7375,31941,7310,31956,7244,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,23169,23169,23217,23122,23264,23074,23311,23027,23358,22979,23405,22931,23452,22883,23499,22835,23545,22787,23592,22739,23638,22691,23685,22642,23731,22594,23777,22545,23823,22496,23869,22448,23915,22399,23961,22350,24006,22301,24052,22252,24097,22202,24143,22153,24188,22104,24233,22054,24278,22004,24323,21955,24368,21905,24413,21855,24457,21805,24502,21755,24546,21705,24591,21655,24635,21604,24679,21554,24723,21503,24767,21453,24811,21402,24855,21351,24898,21300,24942,21249,24985,21198,25029,21147,25072,21096,25115,21045,25158,20993,25201,20942,25243,20890,25286,20838,25329,20787,25371,20735,25414,20683,25456,20631,25498,20579,25540,20527,25582,20474,25624,20422,25665,20369,25707,20317,25749,20264,25790,20212,25831,20159,25872,20106,25913,20053,25954,20000,25995,19947,26036,19894,26077,19840,26117,19787,26158,19733,26198,19680,26238,19626,26278,19573,26318,19519,26358,19465,26398,19411,26437,19357,26477,19303,26516,19249,26556,19194,26595,19140,26634,19086,26673,19031,26712,18976,26751,18922,26789,18867,26828,18812,26866,18757,26905,18702,26943,18647,26981,18592,27019,18537,27057,18482,27094,18426,27132,18371,27170,18315,27207,18260,27244,18204,27281,18148,27319,18092,27355,18036,27392,17980,27429,17924,27466,17868,27502,17812,27538,17756,27575,17699,27611,17643,27647,17586,27683,17530,27719,17473,27754,17416,27790,17360,27825,17303,27861,17246,27896,17189,27931,17132,27966,17074,28001,17017,28036,16960,28070,16903,28105,16845,28139,16788,28173,16730,28208,16672,28242,16615,28275,16557,28309,16499,28343,16441,28377,16383,28410,16325,28443,16267,28477,16209,28510,16150,28543,16092,28575,16034,28608,15975,28641,15917,28673,15858,28706,15799,28738,15740,28770,15682,28802,15623,28834,15564,28866,15505,28897,15446,28929,15387,28960,15327,28992,15268,29023,15209,29054,15149,29085,15090,29116,15030,29146,14971,29177,14911,29207,14852,29238,14792,29268,14732,29298,14672,29328,14612,29358,14552,29387,14492,29417,14432,29446,14372,29476,14311,29505,14251,29534,14191,29563,14130,29592,14070,29621,14009,29649,13949,29678,13888,29706,13827,29734,13766,29762,13706,29790,13645,29818,13584,29846,13523,29873,13462,29901,13400,29928,13339,29955,13278,29983,13217,30009,13155,30036,13094,30063,13033,30090,12971,30116,12909,30142,12848,30169,12786,30195,12724,30221,12663,30247,12601,30272,12539,30298,12477,30323,12415,30349,12353,30374,12291,30399,12229,30424,12166,30449,12104,30473,12042,30498,11980,30522,11917,30547,11855,30571,11792,30595,11730,30619,11667,30643,11604,30666,11542,30690,11479,30713,11416,30737,11353,30760,11290,30783,11227,30806,11164,30828,11101,30851,11038,30874,10975,30896,10912,30918,10849,30940,10786,30962,10722,30984,10659,31006,10596,31028,10532,31049,10469,31070,10405,31092,10342,31113,10278,31134,10214,31154,10151,31175,10087,31196,10023,31216,9959,31236,9895,31257,9831,31277,9767,31297,9703,31316,9639,31336,9575,31356,9511,31375,9447,31394,9383,31413,9319,31432,9254,31451,9190,31470,9126,31489,9061,31507,8997,31525,8932,31544,8868,31562,8803,31580,8739,31597,8674,31615,8610,31633,8545,31650,8480,31667,8415,31684,8351,31701,8286,31718,8221,31735,8156,31752,8091,31768,8026,31785,7961,31801,7896,31817,7831,31833,7766,31849,7701,31864,7636,31880,7571,31895,7505,31911,7440,31926,7375,31941,7310,31956,7244,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68}; - -int16_t s100n_kHz_7_5[30720]__attribute__((aligned(16)))= {31785,7961,31797,7912,31809,7864,31821,7815,31833,7766,31845,7717,31856,7668,31868,7619,31880,7571,31891,7522,31903,7473,31914,7424,31926,7375,31937,7326,31948,7277,31959,7228,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51}; - -int16_t s100e_kHz_7_5[30720]__attribute__((aligned(16)))= {23169,23169,23205,23134,23240,23098,23276,23062,23311,23027,23346,22991,23382,22955,23417,22919,23452,22883,23487,22847,23522,22811,23557,22775,23592,22739,23627,22703,23661,22666,23696,22630,23731,22594,23766,22557,23800,22521,23835,22484,23869,22448,23903,22411,23938,22374,23972,22338,24006,22301,24041,22264,24075,22227,24109,22190,24143,22153,24177,22116,24211,22079,24244,22042,24278,22004,24312,21967,24346,21930,24379,21893,24413,21855,24446,21818,24480,21780,24513,21743,24546,21705,24580,21667,24613,21629,24646,21592,24679,21554,24712,21516,24745,21478,24778,21440,24811,21402,24844,21364,24877,21326,24909,21288,24942,21249,24974,21211,25007,21173,25039,21134,25072,21096,25104,21057,25136,21019,25169,20980,25201,20942,25233,20903,25265,20864,25297,20825,25329,20787,25361,20748,25392,20709,25424,20670,25456,20631,25487,20592,25519,20553,25550,20513,25582,20474,25613,20435,25645,20396,25676,20356,25707,20317,25738,20277,25769,20238,25800,20198,25831,20159,25862,20119,25893,20079,25924,20040,25954,20000,25985,19960,26016,19920,26046,19880,26077,19840,26107,19800,26137,19760,26168,19720,26198,19680,26228,19640,26258,19599,26288,19559,26318,19519,26348,19478,26378,19438,26408,19397,26437,19357,26467,19316,26497,19276,26526,19235,26556,19194,26585,19154,26615,19113,26644,19072,26673,19031,26702,18990,26731,18949,26760,18908,26789,18867,26818,18826,26847,18785,26876,18744,26905,18702,26933,18661,26962,18620,26990,18578,27019,18537,27047,18495,27076,18454,27104,18412,27132,18371,27160,18329,27188,18287,27216,18246,27244,18204,27272,18162,27300,18120,27328,18078,27355,18036,27383,17994,27411,17952,27438,17910,27466,17868,27493,17826,27520,17784,27548,17742,27575,17699,27602,17657,27629,17615,27656,17572,27683,17530,27710,17487,27736,17445,27763,17402,27790,17360,27816,17317,27843,17274,27869,17232,27896,17189,27922,17146,27948,17103,27975,17060,28001,17017,28027,16974,28053,16931,28079,16888,28105,16845,28131,16802,28156,16759,28182,16716,28208,16672,28233,16629,28259,16586,28284,16542,28309,16499,28335,16455,28360,16412,28385,16368,28410,16325,28435,16281,28460,16238,28485,16194,28510,16150,28534,16107,28559,16063,28584,16019,28608,15975,28633,15931,28657,15887,28681,15843,28706,15799,28730,15755,28754,15711,28778,15667,28802,15623,28826,15579,28850,15534,28874,15490,28897,15446,28921,15401,28945,15357,28968,15313,28992,15268,29015,15224,29038,15179,29062,15135,29085,15090,29108,15045,29131,15001,29154,14956,29177,14911,29200,14866,29222,14822,29245,14777,29268,14732,29290,14687,29313,14642,29335,14597,29358,14552,29380,14507,29402,14462,29424,14417,29446,14372,29468,14326,29490,14281,29512,14236,29534,14191,29556,14145,29577,14100,29599,14055,29621,14009,29642,13964,29663,13918,29685,13873,29706,13827,29727,13782,29748,13736,29769,13690,29790,13645,29811,13599,29832,13553,29853,13507,29873,13462,29894,13416,29915,13370,29935,13324,29955,13278,29976,13232,29996,13186,30016,13140,30036,13094,30056,13048,30076,13002,30096,12956,30116,12909,30136,12863,30156,12817,30175,12771,30195,12724,30214,12678,30234,12632,30253,12585,30272,12539,30291,12492,30311,12446,30330,12399,30349,12353,30368,12306,30386,12260,30405,12213,30424,12166,30442,12120,30461,12073,30480,12026,30498,11980,30516,11933,30535,11886,30553,11839,30571,11792,30589,11745,30607,11698,30625,11651,30643,11604,30660,11557,30678,11510,30696,11463,30713,11416,30731,11369,30748,11322,30766,11275,30783,11227,30800,11180,30817,11133,30834,11086,30851,11038,30868,10991,30885,10944,30902,10896,30918,10849,30935,10801,30951,10754,30968,10706,30984,10659,31001,10611,31017,10564,31033,10516,31049,10469,31065,10421,31081,10373,31097,10326,31113,10278,31128,10230,31144,10182,31160,10135,31175,10087,31191,10039,31206,9991,31221,9943,31236,9895,31252,9847,31267,9799,31282,9751,31297,9703,31311,9655,31326,9607,31341,9559,31356,9511,31370,9463,31385,9415,31399,9367,31413,9319,31428,9270,31442,9222,31456,9174,31470,9126,31484,9077,31498,9029,31512,8981,31525,8932,31539,8884,31553,8836,31566,8787,31580,8739,31593,8690,31606,8642,31619,8593,31633,8545,31646,8496,31659,8448,31672,8399,31684,8351,31697,8302,31710,8253,31723,8205,31735,8156,31748,8107,31760,8059,31772,8010,31785,7961,31797,7912,31809,7864,31821,7815,31833,7766,31845,7717,31856,7668,31868,7619,31880,7571,31891,7522,31903,7473,31914,7424,31926,7375,31937,7326,31948,7277,31959,7228,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,23169,23169,23205,23134,23240,23098,23276,23062,23311,23027,23346,22991,23382,22955,23417,22919,23452,22883,23487,22847,23522,22811,23557,22775,23592,22739,23627,22703,23661,22666,23696,22630,23731,22594,23766,22557,23800,22521,23835,22484,23869,22448,23903,22411,23938,22374,23972,22338,24006,22301,24041,22264,24075,22227,24109,22190,24143,22153,24177,22116,24211,22079,24244,22042,24278,22004,24312,21967,24346,21930,24379,21893,24413,21855,24446,21818,24480,21780,24513,21743,24546,21705,24580,21667,24613,21629,24646,21592,24679,21554,24712,21516,24745,21478,24778,21440,24811,21402,24844,21364,24877,21326,24909,21288,24942,21249,24974,21211,25007,21173,25039,21134,25072,21096,25104,21057,25136,21019,25169,20980,25201,20942,25233,20903,25265,20864,25297,20825,25329,20787,25361,20748,25392,20709,25424,20670,25456,20631,25487,20592,25519,20553,25550,20513,25582,20474,25613,20435,25645,20396,25676,20356,25707,20317,25738,20277,25769,20238,25800,20198,25831,20159,25862,20119,25893,20079,25924,20040,25954,20000,25985,19960,26016,19920,26046,19880,26077,19840,26107,19800,26137,19760,26168,19720,26198,19680,26228,19640,26258,19599,26288,19559,26318,19519,26348,19478,26378,19438,26408,19397,26437,19357,26467,19316,26497,19276,26526,19235,26556,19194,26585,19154,26615,19113,26644,19072,26673,19031,26702,18990,26731,18949,26760,18908,26789,18867,26818,18826,26847,18785,26876,18744,26905,18702,26933,18661,26962,18620,26990,18578,27019,18537,27047,18495,27076,18454,27104,18412,27132,18371,27160,18329,27188,18287,27216,18246,27244,18204,27272,18162,27300,18120,27328,18078,27355,18036,27383,17994,27411,17952,27438,17910,27466,17868,27493,17826,27520,17784,27548,17742,27575,17699,27602,17657,27629,17615,27656,17572,27683,17530,27710,17487,27736,17445,27763,17402,27790,17360,27816,17317,27843,17274,27869,17232,27896,17189,27922,17146,27948,17103,27975,17060,28001,17017,28027,16974,28053,16931,28079,16888,28105,16845,28131,16802,28156,16759,28182,16716,28208,16672,28233,16629,28259,16586,28284,16542,28309,16499,28335,16455,28360,16412,28385,16368,28410,16325,28435,16281,28460,16238,28485,16194,28510,16150,28534,16107,28559,16063,28584,16019,28608,15975,28633,15931,28657,15887,28681,15843,28706,15799,28730,15755,28754,15711,28778,15667,28802,15623,28826,15579,28850,15534,28874,15490,28897,15446,28921,15401,28945,15357,28968,15313,28992,15268,29015,15224,29038,15179,29062,15135,29085,15090,29108,15045,29131,15001,29154,14956,29177,14911,29200,14866,29222,14822,29245,14777,29268,14732,29290,14687,29313,14642,29335,14597,29358,14552,29380,14507,29402,14462,29424,14417,29446,14372,29468,14326,29490,14281,29512,14236,29534,14191,29556,14145,29577,14100,29599,14055,29621,14009,29642,13964,29663,13918,29685,13873,29706,13827,29727,13782,29748,13736,29769,13690,29790,13645,29811,13599,29832,13553,29853,13507,29873,13462,29894,13416,29915,13370,29935,13324,29955,13278,29976,13232,29996,13186,30016,13140,30036,13094,30056,13048,30076,13002,30096,12956,30116,12909,30136,12863,30156,12817,30175,12771,30195,12724,30214,12678,30234,12632,30253,12585,30272,12539,30291,12492,30311,12446,30330,12399,30349,12353,30368,12306,30386,12260,30405,12213,30424,12166,30442,12120,30461,12073,30480,12026,30498,11980,30516,11933,30535,11886,30553,11839,30571,11792,30589,11745,30607,11698,30625,11651,30643,11604,30660,11557,30678,11510,30696,11463,30713,11416,30731,11369,30748,11322,30766,11275,30783,11227,30800,11180,30817,11133,30834,11086,30851,11038,30868,10991,30885,10944,30902,10896,30918,10849,30935,10801,30951,10754,30968,10706,30984,10659,31001,10611,31017,10564,31033,10516,31049,10469,31065,10421,31081,10373,31097,10326,31113,10278,31128,10230,31144,10182,31160,10135,31175,10087,31191,10039,31206,9991,31221,9943,31236,9895,31252,9847,31267,9799,31282,9751,31297,9703,31311,9655,31326,9607,31341,9559,31356,9511,31370,9463,31385,9415,31399,9367,31413,9319,31428,9270,31442,9222,31456,9174,31470,9126,31484,9077,31498,9029,31512,8981,31525,8932,31539,8884,31553,8836,31566,8787,31580,8739,31593,8690,31606,8642,31619,8593,31633,8545,31646,8496,31659,8448,31672,8399,31684,8351,31697,8302,31710,8253,31723,8205,31735,8156,31748,8107,31760,8059,31772,8010,31785,7961,31797,7912,31809,7864,31821,7815,31833,7766,31845,7717,31856,7668,31868,7619,31880,7571,31891,7522,31903,7473,31914,7424,31926,7375,31937,7326,31948,7277,31959,7228,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,23169,23169,23205,23134,23240,23098,23276,23062,23311,23027,23346,22991,23382,22955,23417,22919,23452,22883,23487,22847,23522,22811,23557,22775,23592,22739,23627,22703,23661,22666,23696,22630,23731,22594,23766,22557,23800,22521,23835,22484,23869,22448,23903,22411,23938,22374,23972,22338,24006,22301,24041,22264,24075,22227,24109,22190,24143,22153,24177,22116,24211,22079,24244,22042,24278,22004,24312,21967,24346,21930,24379,21893,24413,21855,24446,21818,24480,21780,24513,21743,24546,21705,24580,21667,24613,21629,24646,21592,24679,21554,24712,21516,24745,21478,24778,21440,24811,21402,24844,21364,24877,21326,24909,21288,24942,21249,24974,21211,25007,21173,25039,21134,25072,21096,25104,21057,25136,21019,25169,20980,25201,20942,25233,20903,25265,20864,25297,20825,25329,20787,25361,20748,25392,20709,25424,20670,25456,20631,25487,20592,25519,20553,25550,20513,25582,20474,25613,20435,25645,20396,25676,20356,25707,20317,25738,20277,25769,20238,25800,20198,25831,20159,25862,20119,25893,20079,25924,20040,25954,20000,25985,19960,26016,19920,26046,19880,26077,19840,26107,19800,26137,19760,26168,19720,26198,19680,26228,19640,26258,19599,26288,19559,26318,19519,26348,19478,26378,19438,26408,19397,26437,19357,26467,19316,26497,19276,26526,19235,26556,19194,26585,19154,26615,19113,26644,19072,26673,19031,26702,18990,26731,18949,26760,18908,26789,18867,26818,18826,26847,18785,26876,18744,26905,18702,26933,18661,26962,18620,26990,18578,27019,18537,27047,18495,27076,18454,27104,18412,27132,18371,27160,18329,27188,18287,27216,18246,27244,18204,27272,18162,27300,18120,27328,18078,27355,18036,27383,17994,27411,17952,27438,17910,27466,17868,27493,17826,27520,17784,27548,17742,27575,17699,27602,17657,27629,17615,27656,17572,27683,17530,27710,17487,27736,17445,27763,17402,27790,17360,27816,17317,27843,17274,27869,17232,27896,17189,27922,17146,27948,17103,27975,17060,28001,17017,28027,16974,28053,16931,28079,16888,28105,16845,28131,16802,28156,16759,28182,16716,28208,16672,28233,16629,28259,16586,28284,16542,28309,16499,28335,16455,28360,16412,28385,16368,28410,16325,28435,16281,28460,16238,28485,16194,28510,16150,28534,16107,28559,16063,28584,16019,28608,15975,28633,15931,28657,15887,28681,15843,28706,15799,28730,15755,28754,15711,28778,15667,28802,15623,28826,15579,28850,15534,28874,15490,28897,15446,28921,15401,28945,15357,28968,15313,28992,15268,29015,15224,29038,15179,29062,15135,29085,15090,29108,15045,29131,15001,29154,14956,29177,14911,29200,14866,29222,14822,29245,14777,29268,14732,29290,14687,29313,14642,29335,14597,29358,14552,29380,14507,29402,14462,29424,14417,29446,14372,29468,14326,29490,14281,29512,14236,29534,14191,29556,14145,29577,14100,29599,14055,29621,14009,29642,13964,29663,13918,29685,13873,29706,13827,29727,13782,29748,13736,29769,13690,29790,13645,29811,13599,29832,13553,29853,13507,29873,13462,29894,13416,29915,13370,29935,13324,29955,13278,29976,13232,29996,13186,30016,13140,30036,13094,30056,13048,30076,13002,30096,12956,30116,12909,30136,12863,30156,12817,30175,12771,30195,12724,30214,12678,30234,12632,30253,12585,30272,12539,30291,12492,30311,12446,30330,12399,30349,12353,30368,12306,30386,12260,30405,12213,30424,12166,30442,12120,30461,12073,30480,12026,30498,11980,30516,11933,30535,11886,30553,11839,30571,11792,30589,11745,30607,11698,30625,11651,30643,11604,30660,11557,30678,11510,30696,11463,30713,11416,30731,11369,30748,11322,30766,11275,30783,11227,30800,11180,30817,11133,30834,11086,30851,11038,30868,10991,30885,10944,30902,10896,30918,10849,30935,10801,30951,10754,30968,10706,30984,10659,31001,10611,31017,10564,31033,10516,31049,10469,31065,10421,31081,10373,31097,10326,31113,10278,31128,10230,31144,10182,31160,10135,31175,10087,31191,10039,31206,9991,31221,9943,31236,9895,31252,9847,31267,9799,31282,9751,31297,9703,31311,9655,31326,9607,31341,9559,31356,9511,31370,9463,31385,9415,31399,9367,31413,9319,31428,9270,31442,9222,31456,9174,31470,9126,31484,9077,31498,9029,31512,8981,31525,8932,31539,8884,31553,8836,31566,8787,31580,8739,31593,8690,31606,8642,31619,8593,31633,8545,31646,8496,31659,8448,31672,8399,31684,8351,31697,8302,31710,8253,31723,8205,31735,8156,31748,8107,31760,8059,31772,8010,31785,7961,31797,7912,31809,7864,31821,7815,31833,7766,31845,7717,31856,7668,31868,7619,31880,7571,31891,7522,31903,7473,31914,7424,31926,7375,31937,7326,31948,7277,31959,7228,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,23169,23169,23205,23134,23240,23098,23276,23062,23311,23027,23346,22991,23382,22955,23417,22919,23452,22883,23487,22847,23522,22811,23557,22775,23592,22739,23627,22703,23661,22666,23696,22630,23731,22594,23766,22557,23800,22521,23835,22484,23869,22448,23903,22411,23938,22374,23972,22338,24006,22301,24041,22264,24075,22227,24109,22190,24143,22153,24177,22116,24211,22079,24244,22042,24278,22004,24312,21967,24346,21930,24379,21893,24413,21855,24446,21818,24480,21780,24513,21743,24546,21705,24580,21667,24613,21629,24646,21592,24679,21554,24712,21516,24745,21478,24778,21440,24811,21402,24844,21364,24877,21326,24909,21288,24942,21249,24974,21211,25007,21173,25039,21134,25072,21096,25104,21057,25136,21019,25169,20980,25201,20942,25233,20903,25265,20864,25297,20825,25329,20787,25361,20748,25392,20709,25424,20670,25456,20631,25487,20592,25519,20553,25550,20513,25582,20474,25613,20435,25645,20396,25676,20356,25707,20317,25738,20277,25769,20238,25800,20198,25831,20159,25862,20119,25893,20079,25924,20040,25954,20000,25985,19960,26016,19920,26046,19880,26077,19840,26107,19800,26137,19760,26168,19720,26198,19680,26228,19640,26258,19599,26288,19559,26318,19519,26348,19478,26378,19438,26408,19397,26437,19357,26467,19316,26497,19276,26526,19235,26556,19194,26585,19154,26615,19113,26644,19072,26673,19031,26702,18990,26731,18949,26760,18908,26789,18867,26818,18826,26847,18785,26876,18744,26905,18702,26933,18661,26962,18620,26990,18578,27019,18537,27047,18495,27076,18454,27104,18412,27132,18371,27160,18329,27188,18287,27216,18246,27244,18204,27272,18162,27300,18120,27328,18078,27355,18036,27383,17994,27411,17952,27438,17910,27466,17868,27493,17826,27520,17784,27548,17742,27575,17699,27602,17657,27629,17615,27656,17572,27683,17530,27710,17487,27736,17445,27763,17402,27790,17360,27816,17317,27843,17274,27869,17232,27896,17189,27922,17146,27948,17103,27975,17060,28001,17017,28027,16974,28053,16931,28079,16888,28105,16845,28131,16802,28156,16759,28182,16716,28208,16672,28233,16629,28259,16586,28284,16542,28309,16499,28335,16455,28360,16412,28385,16368,28410,16325,28435,16281,28460,16238,28485,16194,28510,16150,28534,16107,28559,16063,28584,16019,28608,15975,28633,15931,28657,15887,28681,15843,28706,15799,28730,15755,28754,15711,28778,15667,28802,15623,28826,15579,28850,15534,28874,15490,28897,15446,28921,15401,28945,15357,28968,15313,28992,15268,29015,15224,29038,15179,29062,15135,29085,15090,29108,15045,29131,15001,29154,14956,29177,14911,29200,14866,29222,14822,29245,14777,29268,14732,29290,14687,29313,14642,29335,14597,29358,14552,29380,14507,29402,14462,29424,14417,29446,14372,29468,14326,29490,14281,29512,14236,29534,14191,29556,14145,29577,14100,29599,14055,29621,14009,29642,13964,29663,13918,29685,13873,29706,13827,29727,13782,29748,13736,29769,13690,29790,13645,29811,13599,29832,13553,29853,13507,29873,13462,29894,13416,29915,13370,29935,13324,29955,13278,29976,13232,29996,13186,30016,13140,30036,13094,30056,13048,30076,13002,30096,12956,30116,12909,30136,12863,30156,12817,30175,12771,30195,12724,30214,12678,30234,12632,30253,12585,30272,12539,30291,12492,30311,12446,30330,12399,30349,12353,30368,12306,30386,12260,30405,12213,30424,12166,30442,12120,30461,12073,30480,12026,30498,11980,30516,11933,30535,11886,30553,11839,30571,11792,30589,11745,30607,11698,30625,11651,30643,11604,30660,11557,30678,11510,30696,11463,30713,11416,30731,11369,30748,11322,30766,11275,30783,11227,30800,11180,30817,11133,30834,11086,30851,11038,30868,10991,30885,10944,30902,10896,30918,10849,30935,10801,30951,10754,30968,10706,30984,10659,31001,10611,31017,10564,31033,10516,31049,10469,31065,10421,31081,10373,31097,10326,31113,10278,31128,10230,31144,10182,31160,10135,31175,10087,31191,10039,31206,9991,31221,9943,31236,9895,31252,9847,31267,9799,31282,9751,31297,9703,31311,9655,31326,9607,31341,9559,31356,9511,31370,9463,31385,9415,31399,9367,31413,9319,31428,9270,31442,9222,31456,9174,31470,9126,31484,9077,31498,9029,31512,8981,31525,8932,31539,8884,31553,8836,31566,8787,31580,8739,31593,8690,31606,8642,31619,8593,31633,8545,31646,8496,31659,8448,31672,8399,31684,8351,31697,8302,31710,8253,31723,8205,31735,8156,31748,8107,31760,8059,31772,8010,31785,7961,31797,7912,31809,7864,31821,7815,31833,7766,31845,7717,31856,7668,31868,7619,31880,7571,31891,7522,31903,7473,31914,7424,31926,7375,31937,7326,31948,7277,31959,7228,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,23169,23169,23205,23134,23240,23098,23276,23062,23311,23027,23346,22991,23382,22955,23417,22919,23452,22883,23487,22847,23522,22811,23557,22775,23592,22739,23627,22703,23661,22666,23696,22630,23731,22594,23766,22557,23800,22521,23835,22484,23869,22448,23903,22411,23938,22374,23972,22338,24006,22301,24041,22264,24075,22227,24109,22190,24143,22153,24177,22116,24211,22079,24244,22042,24278,22004,24312,21967,24346,21930,24379,21893,24413,21855,24446,21818,24480,21780,24513,21743,24546,21705,24580,21667,24613,21629,24646,21592,24679,21554,24712,21516,24745,21478,24778,21440,24811,21402,24844,21364,24877,21326,24909,21288,24942,21249,24974,21211,25007,21173,25039,21134,25072,21096,25104,21057,25136,21019,25169,20980,25201,20942,25233,20903,25265,20864,25297,20825,25329,20787,25361,20748,25392,20709,25424,20670,25456,20631,25487,20592,25519,20553,25550,20513,25582,20474,25613,20435,25645,20396,25676,20356,25707,20317,25738,20277,25769,20238,25800,20198,25831,20159,25862,20119,25893,20079,25924,20040,25954,20000,25985,19960,26016,19920,26046,19880,26077,19840,26107,19800,26137,19760,26168,19720,26198,19680,26228,19640,26258,19599,26288,19559,26318,19519,26348,19478,26378,19438,26408,19397,26437,19357,26467,19316,26497,19276,26526,19235,26556,19194,26585,19154,26615,19113,26644,19072,26673,19031,26702,18990,26731,18949,26760,18908,26789,18867,26818,18826,26847,18785,26876,18744,26905,18702,26933,18661,26962,18620,26990,18578,27019,18537,27047,18495,27076,18454,27104,18412,27132,18371,27160,18329,27188,18287,27216,18246,27244,18204,27272,18162,27300,18120,27328,18078,27355,18036,27383,17994,27411,17952,27438,17910,27466,17868,27493,17826,27520,17784,27548,17742,27575,17699,27602,17657,27629,17615,27656,17572,27683,17530,27710,17487,27736,17445,27763,17402,27790,17360,27816,17317,27843,17274,27869,17232,27896,17189,27922,17146,27948,17103,27975,17060,28001,17017,28027,16974,28053,16931,28079,16888,28105,16845,28131,16802,28156,16759,28182,16716,28208,16672,28233,16629,28259,16586,28284,16542,28309,16499,28335,16455,28360,16412,28385,16368,28410,16325,28435,16281,28460,16238,28485,16194,28510,16150,28534,16107,28559,16063,28584,16019,28608,15975,28633,15931,28657,15887,28681,15843,28706,15799,28730,15755,28754,15711,28778,15667,28802,15623,28826,15579,28850,15534,28874,15490,28897,15446,28921,15401,28945,15357,28968,15313,28992,15268,29015,15224,29038,15179,29062,15135,29085,15090,29108,15045,29131,15001,29154,14956,29177,14911,29200,14866,29222,14822,29245,14777,29268,14732,29290,14687,29313,14642,29335,14597,29358,14552,29380,14507,29402,14462,29424,14417,29446,14372,29468,14326,29490,14281,29512,14236,29534,14191,29556,14145,29577,14100,29599,14055,29621,14009,29642,13964,29663,13918,29685,13873,29706,13827,29727,13782,29748,13736,29769,13690,29790,13645,29811,13599,29832,13553,29853,13507,29873,13462,29894,13416,29915,13370,29935,13324,29955,13278,29976,13232,29996,13186,30016,13140,30036,13094,30056,13048,30076,13002,30096,12956,30116,12909,30136,12863,30156,12817,30175,12771,30195,12724,30214,12678,30234,12632,30253,12585,30272,12539,30291,12492,30311,12446,30330,12399,30349,12353,30368,12306,30386,12260,30405,12213,30424,12166,30442,12120,30461,12073,30480,12026,30498,11980,30516,11933,30535,11886,30553,11839,30571,11792,30589,11745,30607,11698,30625,11651,30643,11604,30660,11557,30678,11510,30696,11463,30713,11416,30731,11369,30748,11322,30766,11275,30783,11227,30800,11180,30817,11133,30834,11086,30851,11038,30868,10991,30885,10944,30902,10896,30918,10849,30935,10801,30951,10754,30968,10706,30984,10659,31001,10611,31017,10564,31033,10516,31049,10469,31065,10421,31081,10373,31097,10326,31113,10278,31128,10230,31144,10182,31160,10135,31175,10087,31191,10039,31206,9991,31221,9943,31236,9895,31252,9847,31267,9799,31282,9751,31297,9703,31311,9655,31326,9607,31341,9559,31356,9511,31370,9463,31385,9415,31399,9367,31413,9319,31428,9270,31442,9222,31456,9174,31470,9126,31484,9077,31498,9029,31512,8981,31525,8932,31539,8884,31553,8836,31566,8787,31580,8739,31593,8690,31606,8642,31619,8593,31633,8545,31646,8496,31659,8448,31672,8399,31684,8351,31697,8302,31710,8253,31723,8205,31735,8156,31748,8107,31760,8059,31772,8010,31785,7961,31797,7912,31809,7864,31821,7815,31833,7766,31845,7717,31856,7668,31868,7619,31880,7571,31891,7522,31903,7473,31914,7424,31926,7375,31937,7326,31948,7277,31959,7228,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,23169,23169,23205,23134,23240,23098,23276,23062,23311,23027,23346,22991,23382,22955,23417,22919,23452,22883,23487,22847,23522,22811,23557,22775,23592,22739,23627,22703,23661,22666,23696,22630,23731,22594,23766,22557,23800,22521,23835,22484,23869,22448,23903,22411,23938,22374,23972,22338,24006,22301,24041,22264,24075,22227,24109,22190,24143,22153,24177,22116,24211,22079,24244,22042,24278,22004,24312,21967,24346,21930,24379,21893,24413,21855,24446,21818,24480,21780,24513,21743,24546,21705,24580,21667,24613,21629,24646,21592,24679,21554,24712,21516,24745,21478,24778,21440,24811,21402,24844,21364,24877,21326,24909,21288,24942,21249,24974,21211,25007,21173,25039,21134,25072,21096,25104,21057,25136,21019,25169,20980,25201,20942,25233,20903,25265,20864,25297,20825,25329,20787,25361,20748,25392,20709,25424,20670,25456,20631,25487,20592,25519,20553,25550,20513,25582,20474,25613,20435,25645,20396,25676,20356,25707,20317,25738,20277,25769,20238,25800,20198,25831,20159,25862,20119,25893,20079,25924,20040,25954,20000,25985,19960,26016,19920,26046,19880,26077,19840,26107,19800,26137,19760,26168,19720,26198,19680,26228,19640,26258,19599,26288,19559,26318,19519,26348,19478,26378,19438,26408,19397,26437,19357,26467,19316,26497,19276,26526,19235,26556,19194,26585,19154,26615,19113,26644,19072,26673,19031,26702,18990,26731,18949,26760,18908,26789,18867,26818,18826,26847,18785,26876,18744,26905,18702,26933,18661,26962,18620,26990,18578,27019,18537,27047,18495,27076,18454,27104,18412,27132,18371,27160,18329,27188,18287,27216,18246,27244,18204,27272,18162,27300,18120,27328,18078,27355,18036,27383,17994,27411,17952,27438,17910,27466,17868,27493,17826,27520,17784,27548,17742,27575,17699,27602,17657,27629,17615,27656,17572,27683,17530,27710,17487,27736,17445,27763,17402,27790,17360,27816,17317,27843,17274,27869,17232,27896,17189,27922,17146,27948,17103,27975,17060,28001,17017,28027,16974,28053,16931,28079,16888,28105,16845,28131,16802,28156,16759,28182,16716,28208,16672,28233,16629,28259,16586,28284,16542,28309,16499,28335,16455,28360,16412,28385,16368,28410,16325,28435,16281,28460,16238,28485,16194,28510,16150,28534,16107,28559,16063,28584,16019,28608,15975,28633,15931,28657,15887,28681,15843,28706,15799,28730,15755,28754,15711,28778,15667,28802,15623,28826,15579,28850,15534,28874,15490,28897,15446,28921,15401,28945,15357,28968,15313,28992,15268,29015,15224,29038,15179,29062,15135,29085,15090,29108,15045,29131,15001,29154,14956,29177,14911,29200,14866,29222,14822,29245,14777,29268,14732,29290,14687,29313,14642,29335,14597,29358,14552,29380,14507,29402,14462,29424,14417,29446,14372,29468,14326,29490,14281,29512,14236,29534,14191,29556,14145,29577,14100,29599,14055,29621,14009,29642,13964,29663,13918,29685,13873,29706,13827,29727,13782,29748,13736,29769,13690,29790,13645,29811,13599,29832,13553,29853,13507,29873,13462,29894,13416,29915,13370,29935,13324,29955,13278,29976,13232,29996,13186,30016,13140,30036,13094,30056,13048,30076,13002,30096,12956,30116,12909,30136,12863,30156,12817,30175,12771,30195,12724,30214,12678,30234,12632,30253,12585,30272,12539,30291,12492,30311,12446,30330,12399,30349,12353,30368,12306,30386,12260,30405,12213,30424,12166,30442,12120,30461,12073,30480,12026,30498,11980,30516,11933,30535,11886,30553,11839,30571,11792,30589,11745,30607,11698,30625,11651,30643,11604,30660,11557,30678,11510,30696,11463,30713,11416,30731,11369,30748,11322,30766,11275,30783,11227,30800,11180,30817,11133,30834,11086,30851,11038,30868,10991,30885,10944,30902,10896,30918,10849,30935,10801,30951,10754,30968,10706,30984,10659,31001,10611,31017,10564,31033,10516,31049,10469,31065,10421,31081,10373,31097,10326,31113,10278,31128,10230,31144,10182,31160,10135,31175,10087,31191,10039,31206,9991,31221,9943,31236,9895,31252,9847,31267,9799,31282,9751,31297,9703,31311,9655,31326,9607,31341,9559,31356,9511,31370,9463,31385,9415,31399,9367,31413,9319,31428,9270,31442,9222,31456,9174,31470,9126,31484,9077,31498,9029,31512,8981,31525,8932,31539,8884,31553,8836,31566,8787,31580,8739,31593,8690,31606,8642,31619,8593,31633,8545,31646,8496,31659,8448,31672,8399,31684,8351,31697,8302,31710,8253,31723,8205,31735,8156,31748,8107,31760,8059,31772,8010,31785,7961,31797,7912,31809,7864,31821,7815,31833,7766,31845,7717,31856,7668,31868,7619,31880,7571,31891,7522,31903,7473,31914,7424,31926,7375,31937,7326,31948,7277,31959,7228,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51}; - diff --git a/openair1/PHY/MODULATION/modulation_extern.h b/openair1/PHY/MODULATION/modulation_extern.h index 2834aa00f5..5dfa73857e 100644 --- a/openair1/PHY/MODULATION/modulation_extern.h +++ b/openair1/PHY/MODULATION/modulation_extern.h @@ -19,18 +19,18 @@ * contact@openairinterface.org */ -extern int16_t s6n_kHz_7_5[1920]; -extern int16_t s6e_kHz_7_5[1920]; -extern int16_t s15n_kHz_7_5[3840]; -extern int16_t s15e_kHz_7_5[3840]; -extern int16_t s25n_kHz_7_5[7680]; -extern int16_t s25e_kHz_7_5[7680]; -extern int16_t s50n_kHz_7_5[15360]; -extern int16_t s50e_kHz_7_5[15360]; -extern int16_t s75n_kHz_7_5[23040]; -extern int16_t s75e_kHz_7_5[23040]; -extern int16_t s100n_kHz_7_5[30720]; -extern int16_t s100e_kHz_7_5[30720]; +extern int16_t *s6n_kHz_7_5; +extern int16_t *s6e_kHz_7_5; +extern int16_t *s15n_kHz_7_5; +extern int16_t *s15e_kHz_7_5; +extern int16_t *s25n_kHz_7_5; +extern int16_t *s25e_kHz_7_5; +extern int16_t *s50n_kHz_7_5; +extern int16_t *s50e_kHz_7_5; +extern int16_t *s75n_kHz_7_5; +extern int16_t *s75e_kHz_7_5; +extern int16_t *s100n_kHz_7_5; +extern int16_t *s100e_kHz_7_5; extern short conjugate75[8]; diff --git a/openair1/PHY/MODULATION/modulation_vars.h b/openair1/PHY/MODULATION/modulation_vars.h index dbea92ab3f..1428d5f975 100644 --- a/openair1/PHY/MODULATION/modulation_vars.h +++ b/openair1/PHY/MODULATION/modulation_vars.h @@ -19,7 +19,6 @@ * contact@openairinterface.org */ -#include "kHz_7_5.h" short conjugate75[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1} ; short conjugate75_2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1} ; From 4c475c429b9dd8e9847ace40a28287aa76cba252 Mon Sep 17 00:00:00 2001 From: laurent Date: Mon, 6 Aug 2018 16:52:27 +0200 Subject: [PATCH 002/379] first commit new itti --- cmake_targets/CMakeLists.txt | 18 +- common/utils/assertions.h | 71 +- common/utils/{itti => }/backtrace.c | 0 common/utils/{itti => }/backtrace.h | 0 common/utils/itti/Makefile.am | 32 - common/utils/itti/assertions.h | 90 -- common/utils/itti/intertask_interface.c | 930 ------------------ common/utils/itti/intertask_interface.h | 235 ----- common/utils/itti/intertask_interface_init.h | 73 -- common/utils/itti/intertask_interface_types.h | 143 --- common/utils/itti/intertask_messages_def.h | 49 - common/utils/itti/intertask_messages_types.h | 40 - common/utils/itti/itti_types.h | 82 -- common/utils/itti/messages_def.h | 26 - common/utils/itti/messages_types.h | 37 - common/utils/itti/signals.c | 141 --- common/utils/itti/signals.h | 29 - common/utils/itti/tasks_def.h | 25 - common/utils/itti/timer.c | 255 ----- common/utils/itti/timer.h | 69 -- common/utils/itti/timer_messages_def.h | 22 - common/utils/itti/timer_messages_types.h | 35 - common/utils/{itti => }/memory_pools.c | 0 common/utils/{itti => }/memory_pools.h | 0 common/utils/msc/msc.c | 1 - openair1/PHY/LTE_TRANSPORT/if5_tools.c | 2 +- openair1/PHY/defs_common.h | 2 + openair1/SIMULATION/LTE_PHY/pucchsim.c | 1 - openair2/COMMON/platform_types.h | 3 - openair2/ENB_APP/enb_app.c | 1 - openair2/ENB_APP/enb_config.h | 1 - openair2/ENB_APP/flexran_agent_common.h | 1 - openair2/ENB_APP/flexran_agent_timer.h | 1 - openair2/UTIL/MEM/mem_block.h | 9 +- openair3/GTPV1-U/gtpv1u_eNB.c | 1 - openair3/GTPV1-U/gtpv1u_eNB_task.h | 1 - openair3/GTPV1-U/gtpv1u_task.c | 1 - openair3/NAS/COMMON/UTIL/nas_timer.c | 1 - openair3/TEST/EPC_TEST/play_scenario.c | 2 - openair3/TEST/EPC_TEST/play_scenario_fsm.c | 1 - openair3/TEST/EPC_TEST/play_scenario_s1ap.c | 1 - .../EPC_TEST/play_scenario_s1ap_compare_ie.c | 1 - openair3/TEST/oaisim_mme_itti_test.c | 3 +- openair3/TEST/oaisim_mme_test_s1c.c | 2 - openair3/UDP/udp_eNB_task.c | 2 +- openair3/UDP/udp_eNB_task.h | 1 - targets/RT/USER/lte-enb.c | 1 - targets/RT/USER/lte-softmodem.c | 1 - targets/RT/USER/lte-uesoftmodem.c | 1 - 49 files changed, 88 insertions(+), 2356 deletions(-) rename common/utils/{itti => }/backtrace.c (100%) rename common/utils/{itti => }/backtrace.h (100%) delete mode 100644 common/utils/itti/Makefile.am delete mode 100644 common/utils/itti/assertions.h delete mode 100644 common/utils/itti/intertask_interface.c delete mode 100644 common/utils/itti/intertask_interface.h delete mode 100644 common/utils/itti/intertask_interface_init.h delete mode 100644 common/utils/itti/intertask_interface_types.h delete mode 100644 common/utils/itti/intertask_messages_def.h delete mode 100644 common/utils/itti/intertask_messages_types.h delete mode 100644 common/utils/itti/itti_types.h delete mode 100644 common/utils/itti/messages_def.h delete mode 100644 common/utils/itti/messages_types.h delete mode 100644 common/utils/itti/signals.c delete mode 100644 common/utils/itti/signals.h delete mode 100644 common/utils/itti/tasks_def.h delete mode 100644 common/utils/itti/timer.c delete mode 100644 common/utils/itti/timer.h delete mode 100644 common/utils/itti/timer_messages_def.h delete mode 100644 common/utils/itti/timer_messages_types.h rename common/utils/{itti => }/memory_pools.c (100%) rename common/utils/{itti => }/memory_pools.h (100%) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 92a5b1ba04..666caeb828 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -170,11 +170,12 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC ") # add autotools definitions that were maybe used! set(CMAKE_C_FLAGS - "${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -DASN_DISABLE_OER_SUPPORT -D'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'" + "${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'" ) set(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -std=c++11 " + "${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -std=c++11 -D'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'" ) +add_definitions("-DASN_DISABLE_OER_SUPPORT") ######################### @@ -256,16 +257,13 @@ add_boolean_option(BASIC_SIMULATOR False "Has to be True when building the b add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering") add_boolean_option(ENABLE_ITTI True "ITTI is internal messaging, should remain enabled for most targets") -set (ITTI_DIR ${OPENAIR_DIR}/common/utils/itti) +set (OCP_ITTI ${OPENAIR_DIR}/common/utils/ocp_itti) if (${ENABLE_ITTI}) add_library(ITTI # add .h files if depend on (this one is generated) - ${ITTI_DIR}/intertask_interface.h - ${ITTI_DIR}/intertask_interface.c - ${ITTI_DIR}/backtrace.c - ${ITTI_DIR}/memory_pools.c - ${ITTI_DIR}/signals.c - ${ITTI_DIR}/timer.c + ${OCP_ITTI}/intertask_interface.cpp + ${OPENAIR_DIR}/common/utils/backtrace.c + ${OPENAIR_DIR}/common/utils/memory_pools.c ) set(ITTI_LIB ITTI) set(GTPU_need_ITTI ${OPENAIR3_DIR}/GTPV1-U/gtpv1u_eNB.c) @@ -744,7 +742,7 @@ include_directories("${OPENAIR2_DIR}/LAYER2/PDCP_v10.1.0") include_directories("${OPENAIR2_DIR}/RRC/LTE/MESSAGES") include_directories("${OPENAIR2_DIR}/RRC/LTE") include_directories("${OPENAIR_DIR}/common/utils") -include_directories("${OPENAIR_DIR}/common/utils/itti") +include_directories("${OPENAIR_DIR}/common/utils/ocp_itti") include_directories("${OPENAIR3_DIR}/NAS/COMMON") include_directories("${OPENAIR3_DIR}/NAS/COMMON/API/NETWORK") include_directories("${OPENAIR3_DIR}/NAS/COMMON/EMM/MSG") diff --git a/common/utils/assertions.h b/common/utils/assertions.h index f6728caf7b..b872b009e2 100644 --- a/common/utils/assertions.h +++ b/common/utils/assertions.h @@ -19,9 +19,72 @@ * contact@openairinterface.org */ -#ifndef UTILS_ASSERTIONS_H_ -#define UTILS_ASSERTIONS_H_ +#include +#include +#include +#ifdef CMAKER +#include +#endif -#include "./itti/assertions.h" +#if defined(ENB_MODE) +# define display_backtrace() +#else +# include "backtrace.h" +#endif -#endif /* UTILS_ASSERTIONS_H_ */ +#ifndef ASSERTIONS_H_ +#define ASSERTIONS_H_ + +void output_log_mem(void); +#define _Assert_Exit_ \ +{ \ + fprintf(stderr, "\nExiting execution\n"); \ + display_backtrace(); \ + fflush(stdout); \ + fflush(stderr); \ + exit(EXIT_FAILURE); \ +} + +#define _Assert_(cOND, aCTION, fORMAT, aRGS...) \ +do { \ + if (!(cOND)) { \ + fprintf(stderr, "\nAssertion ("#cOND") failed!\n" \ + "In %s() %s:%d\n" fORMAT, \ + __FUNCTION__, __FILE__, __LINE__, ##aRGS); \ + aCTION; \ + } \ +} while(0) + +#define AssertFatal(cOND, fORMAT, aRGS...) _Assert_(cOND, _Assert_Exit_, fORMAT, ##aRGS) + +#define AssertError(cOND, aCTION, fORMAT, aRGS...) _Assert_(cOND, aCTION, fORMAT, ##aRGS) + + + +#define DevCheck(cOND, vALUE1, vALUE2, vALUE3) \ +_Assert_(cOND, _Assert_Exit_, #vALUE1 ": %" PRIdMAX "\n" #vALUE2 ": %" PRIdMAX "\n" #vALUE3 ": %" PRIdMAX "\n\n", \ + (intmax_t)vALUE1, (intmax_t)vALUE2, (intmax_t)vALUE3) + +#define DevCheck4(cOND, vALUE1, vALUE2, vALUE3, vALUE4) \ +_Assert_(cOND, _Assert_Exit_, #vALUE1": %" PRIdMAX "\n" #vALUE2 ": %" PRIdMAX "\n" #vALUE3 ": %" PRIdMAX "\n" #vALUE4 ": %" PRIdMAX "\n\n", \ + (intmax_t)vALUE1, (intmax_t)vALUE2, (intmax_t)vALUE3, (intmax_t)vALUE4) + +#define DevParam(vALUE1, vALUE2, vALUE3) DevCheck(0, vALUE1, vALUE2, vALUE3) + +#define DevAssert(cOND) _Assert_(cOND, _Assert_Exit_, "") + +#define DevMessage(mESSAGE) _Assert_(0, _Assert_Exit_, #mESSAGE) + +#define CHECK_INIT_RETURN(fCT) \ +do { \ + int fct_ret; \ + if ((fct_ret = (fCT)) != 0) { \ + fprintf(stderr, "Function "#fCT" has failed\n" \ + "returning %d\n", fct_ret); \ + fflush(stdout); \ + fflush(stderr); \ + exit(EXIT_FAILURE); \ + } \ +} while(0) + +#endif /* ASSERTIONS_H_ */ diff --git a/common/utils/itti/backtrace.c b/common/utils/backtrace.c similarity index 100% rename from common/utils/itti/backtrace.c rename to common/utils/backtrace.c diff --git a/common/utils/itti/backtrace.h b/common/utils/backtrace.h similarity index 100% rename from common/utils/itti/backtrace.h rename to common/utils/backtrace.h diff --git a/common/utils/itti/Makefile.am b/common/utils/itti/Makefile.am deleted file mode 100644 index 93f5704603..0000000000 --- a/common/utils/itti/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -AM_CFLAGS = @ADD_CFLAGS@ \ - -I$(top_srcdir)/UTILS \ - -I$(top_srcdir)/COMMON \ - -I$(OPENAIR2_DIR)/UTIL/LFDS/liblfds6.1.1/liblfds611/inc \ - -DENABLE_EVENT_FD - -noinst_LTLIBRARIES = libitti.la - -BUILT_SOURCES = $(abs_top_builddir)/INTERTASK_INTERFACE/UTIL/LFDS/liblfds6.1.1/liblfds611/bin/liblfds611.a - -$(abs_top_builddir)/INTERTASK_INTERFACE/UTIL/LFDS/liblfds6.1.1/liblfds611/bin/liblfds611.a: - @if [ ! -d $(abs_top_builddir)/INTERTASK_INTERFACE/UTIL/LFDS/liblfds6.1.1/liblfds611/bin ]; then mkdir -p $(abs_top_builddir)/INTERTASK_INTERFACE/UTIL/LFDS/liblfds6.1.1/liblfds611/bin; fi; - @if [ ! -d $(abs_top_builddir)/INTERTASK_INTERFACE/UTIL/LFDS/liblfds6.1.1/liblfds611/obj ]; then mkdir -p $(abs_top_builddir)/INTERTASK_INTERFACE/UTIL/LFDS/liblfds6.1.1/liblfds611/obj; fi; - @$(MAKE) -C $(OPENAIR2_DIR)/UTIL/LFDS/liblfds6.1.1/liblfds611/ -f makefile.linux OUTDIR=$(abs_top_builddir)/INTERTASK_INTERFACE/UTIL/LFDS/liblfds6.1.1/liblfds611 - -libitti_la_LDFLAGS = -all-static -libitti_la_SOURCES = \ - gtpv1_u_messages_def.h gtpv1_u_messages_types.h \ - nas_messages_def.h nas_messages_types.h \ - timer_messages_def.h timer_messages_types.h \ - s11_messages_def.h s11_messages_types.h \ - s1ap_messages_def.h s1ap_messages_types.h \ - s6a_messages_def.h s6a_messages_types.h \ - sgw_lite_def.h sgw_lite_messages_types.h \ - sctp_messages_def.h sctp_messages_types.h \ - udp_message_def.h udp_messages_types.h \ - intertask_interface.c intertask_interface.h \ - intertask_interface_dump.c intertask_interface_dump.h \ - assertions.h \ - backtrace.c backtrace.h \ - signals.c signals.h \ - timer.c timer.h diff --git a/common/utils/itti/assertions.h b/common/utils/itti/assertions.h deleted file mode 100644 index b872b009e2..0000000000 --- a/common/utils/itti/assertions.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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.1 (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 - */ - -#include -#include -#include -#ifdef CMAKER -#include -#endif - -#if defined(ENB_MODE) -# define display_backtrace() -#else -# include "backtrace.h" -#endif - -#ifndef ASSERTIONS_H_ -#define ASSERTIONS_H_ - -void output_log_mem(void); -#define _Assert_Exit_ \ -{ \ - fprintf(stderr, "\nExiting execution\n"); \ - display_backtrace(); \ - fflush(stdout); \ - fflush(stderr); \ - exit(EXIT_FAILURE); \ -} - -#define _Assert_(cOND, aCTION, fORMAT, aRGS...) \ -do { \ - if (!(cOND)) { \ - fprintf(stderr, "\nAssertion ("#cOND") failed!\n" \ - "In %s() %s:%d\n" fORMAT, \ - __FUNCTION__, __FILE__, __LINE__, ##aRGS); \ - aCTION; \ - } \ -} while(0) - -#define AssertFatal(cOND, fORMAT, aRGS...) _Assert_(cOND, _Assert_Exit_, fORMAT, ##aRGS) - -#define AssertError(cOND, aCTION, fORMAT, aRGS...) _Assert_(cOND, aCTION, fORMAT, ##aRGS) - - - -#define DevCheck(cOND, vALUE1, vALUE2, vALUE3) \ -_Assert_(cOND, _Assert_Exit_, #vALUE1 ": %" PRIdMAX "\n" #vALUE2 ": %" PRIdMAX "\n" #vALUE3 ": %" PRIdMAX "\n\n", \ - (intmax_t)vALUE1, (intmax_t)vALUE2, (intmax_t)vALUE3) - -#define DevCheck4(cOND, vALUE1, vALUE2, vALUE3, vALUE4) \ -_Assert_(cOND, _Assert_Exit_, #vALUE1": %" PRIdMAX "\n" #vALUE2 ": %" PRIdMAX "\n" #vALUE3 ": %" PRIdMAX "\n" #vALUE4 ": %" PRIdMAX "\n\n", \ - (intmax_t)vALUE1, (intmax_t)vALUE2, (intmax_t)vALUE3, (intmax_t)vALUE4) - -#define DevParam(vALUE1, vALUE2, vALUE3) DevCheck(0, vALUE1, vALUE2, vALUE3) - -#define DevAssert(cOND) _Assert_(cOND, _Assert_Exit_, "") - -#define DevMessage(mESSAGE) _Assert_(0, _Assert_Exit_, #mESSAGE) - -#define CHECK_INIT_RETURN(fCT) \ -do { \ - int fct_ret; \ - if ((fct_ret = (fCT)) != 0) { \ - fprintf(stderr, "Function "#fCT" has failed\n" \ - "returning %d\n", fct_ret); \ - fflush(stdout); \ - fflush(stderr); \ - exit(EXIT_FAILURE); \ - } \ -} while(0) - -#endif /* ASSERTIONS_H_ */ diff --git a/common/utils/itti/intertask_interface.c b/common/utils/itti/intertask_interface.c deleted file mode 100644 index 2e38b660d7..0000000000 --- a/common/utils/itti/intertask_interface.c +++ /dev/null @@ -1,930 +0,0 @@ -/* - * 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.1 (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 - */ - -#define _GNU_SOURCE -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#if !defined(TRUE) -#define TRUE 1 -#endif - -#include "liblfds611.h" - -#include "assertions.h" -#include "intertask_interface.h" - -#if T_TRACER -#include "T.h" -#endif - -/* Includes "intertask_interface_init.h" to check prototype coherence, but - * disable threads and messages information generation. - */ -#define CHECK_PROTOTYPE_ONLY -#include "intertask_interface_init.h" -#undef CHECK_PROTOTYPE_ONLY - -#include "signals.h" -#include "timer.h" - -/* ITTI DEBUG groups */ -#define ITTI_DEBUG_POLL (1<<0) -#define ITTI_DEBUG_SEND (1<<1) -#define ITTI_DEBUG_EVEN_FD (1<<2) -#define ITTI_DEBUG_INIT (1<<3) -#define ITTI_DEBUG_EXIT (1<<4) -#define ITTI_DEBUG_ISSUES (1<<5) -#define ITTI_DEBUG_MP_STATISTICS (1<<6) - -const int itti_debug = (ITTI_DEBUG_ISSUES | ITTI_DEBUG_MP_STATISTICS); - -# define ITTI_DEBUG(m, x, args...) do { if ((m) & itti_debug) {fprintf(stdout, "[ITTI][D]"x, ##args); fflush (stdout);} } while(0); -#define ITTI_ERROR(x, args...) do { fprintf(stdout, "[ITTI][E]"x, ##args); fflush (stdout); } while(0); - -/* Global message size */ -#define MESSAGE_SIZE(mESSAGEiD) (sizeof(MessageHeader) + itti_desc.messages_info[mESSAGEiD].size) - - -extern int emulate_rf; - -typedef enum task_state_s { - TASK_STATE_NOT_CONFIGURED, TASK_STATE_STARTING, TASK_STATE_READY, TASK_STATE_ENDED, TASK_STATE_MAX, -} task_state_t; - -/* This list acts as a FIFO of messages received by tasks (RRC, NAS, ...) */ -typedef struct message_list_s { - MessageDef *msg; ///< Pointer to the message - - message_number_t message_number; ///< Unique message number - uint32_t message_priority; ///< Message priority -} message_list_t; - -typedef struct thread_desc_s { - /* pthread associated with the thread */ - pthread_t task_thread; - - /* State of the thread */ - volatile task_state_t task_state; - - /* This fd is used internally by ITTI. */ - int epoll_fd; - - /* The thread fd */ - int task_event_fd; - - /* Number of events to monitor */ - uint16_t nb_events; - - - /* Array of events monitored by the task. - * By default only one fd is monitored (the one used to received messages - * from other tasks). - * More events can be suscribed later by the task itself. - */ - struct epoll_event *events; - - int epoll_nb_events; - - /* Flag to mark real time thread */ - unsigned real_time; - - /* Counter to indicate that messages are pending for the thread */ - unsigned messages_pending; -} thread_desc_t; - -typedef struct task_desc_s { - /* Queue of messages belonging to the task */ - struct lfds611_queue_state *message_queue; -} task_desc_t; - -typedef struct itti_desc_s { - thread_desc_t *threads; - task_desc_t *tasks; - - /* Current message number. Incremented every call to send_msg_to_task */ - message_number_t message_number __attribute__((aligned(8))); - - thread_id_t thread_max; - task_id_t task_max; - MessagesIds messages_id_max; - - boolean_t thread_handling_signals; - pthread_t thread_ref; - - const task_info_t *tasks_info; - const message_info_t *messages_info; - - itti_lte_time_t lte_time; - - int running; - - volatile uint32_t created_tasks; - volatile uint32_t ready_tasks; - volatile int wait_tasks; -} itti_desc_t; - -static itti_desc_t itti_desc; - -void *itti_malloc(task_id_t origin_task_id, task_id_t destination_task_id, ssize_t size) -{ - void *ptr = NULL; - - ptr = malloc (size); - if (ptr) memset(ptr,0,size); - - AssertFatal (ptr != NULL, "Memory allocation of %d bytes failed (%d -> %d)!\n", (int) size, origin_task_id, destination_task_id); - - return ptr; -} - -int itti_free(task_id_t task_id, void *ptr) -{ - int result = EXIT_SUCCESS; - AssertFatal (ptr != NULL, "Trying to free a NULL pointer (%d)!\n", task_id); - - free (ptr); - - return (result); -} - -static inline message_number_t itti_increment_message_number(void) -{ - /* Atomic operation supported by GCC: returns the current message number - * and then increment it by 1. - * This can be done without mutex. - */ - return __sync_fetch_and_add (&itti_desc.message_number, 1); -} - -static inline uint32_t itti_get_message_priority(MessagesIds message_id) -{ - AssertFatal (message_id < itti_desc.messages_id_max, "Message id (%d) is out of range (%d)!\n", message_id, itti_desc.messages_id_max); - - return (itti_desc.messages_info[message_id].priority); -} - -const char *itti_get_message_name(MessagesIds message_id) -{ - AssertFatal (message_id < itti_desc.messages_id_max, "Message id (%d) is out of range (%d)!\n", message_id, itti_desc.messages_id_max); - - return (itti_desc.messages_info[message_id].name); -} - -const char *itti_get_task_name(task_id_t task_id) -{ - if (itti_desc.task_max > 0) { - AssertFatal (task_id < itti_desc.task_max, "Task id (%d) is out of range (%d)!\n", task_id, itti_desc.task_max); - } else { - return ("ITTI NOT INITIALIZED !!!"); - } - - return (itti_desc.tasks_info[task_id].name); -} - -static task_id_t itti_get_current_task_id(void) -{ - task_id_t task_id; - thread_id_t thread_id; - pthread_t thread = pthread_self (); - - for (task_id = TASK_FIRST; task_id < itti_desc.task_max; task_id++) { - thread_id = TASK_GET_THREAD_ID(task_id); - - if (itti_desc.threads[thread_id].task_thread == thread) { - return task_id; - } - } - - return TASK_UNKNOWN; -} - -void itti_update_lte_time(uint32_t frame, uint8_t slot) -{ - itti_desc.lte_time.frame = frame; - itti_desc.lte_time.slot = slot; -} - -int itti_send_broadcast_message(MessageDef *message_p) -{ - task_id_t destination_task_id; - task_id_t origin_task_id; - thread_id_t origin_thread_id; - uint32_t thread_id; - int ret = 0; - int result; - - AssertFatal (message_p != NULL, "Trying to broadcast a NULL message!\n"); - - origin_task_id = message_p->ittiMsgHeader.originTaskId; - origin_thread_id = TASK_GET_THREAD_ID(origin_task_id); - - destination_task_id = TASK_FIRST; - - for (thread_id = THREAD_FIRST; thread_id < itti_desc.thread_max; thread_id++) { - MessageDef *new_message_p; - - while (thread_id != TASK_GET_THREAD_ID(destination_task_id)) { - destination_task_id++; - } - - /* Skip task that broadcast the message */ - if (thread_id != origin_thread_id) { - /* Skip tasks which are not running */ - if (itti_desc.threads[thread_id].task_state == TASK_STATE_READY) { - size_t size = sizeof(MessageHeader) + message_p->ittiMsgHeader.ittiMsgSize; - new_message_p = itti_malloc( origin_task_id, destination_task_id, size ); - AssertFatal (new_message_p != NULL, "New message allocation failed!\n"); - - memcpy( new_message_p, message_p, size ); - result = itti_send_msg_to_task (destination_task_id, INSTANCE_DEFAULT, new_message_p); - AssertFatal (result >= 0, "Failed to send message %d to thread %d (task %d)!\n", message_p->ittiMsgHeader.messageId, thread_id, destination_task_id); - } - } - } - - result = itti_free (ITTI_MSG_ORIGIN_ID(message_p), message_p); - AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); - - return ret; -} - -MessageDef *itti_alloc_new_message_sized(task_id_t origin_task_id, MessagesIds message_id, MessageHeaderSize size) -{ - MessageDef *temp = NULL; - - AssertFatal (message_id < itti_desc.messages_id_max, "Message id (%d) is out of range (%d)!\n", message_id, itti_desc.messages_id_max); - - if (origin_task_id == TASK_UNKNOWN) { - /* Try to identify real origin task ID */ - origin_task_id = itti_get_current_task_id(); - } - - temp = itti_malloc (origin_task_id, TASK_UNKNOWN, sizeof(MessageHeader) + size); - - temp->ittiMsgHeader.messageId = message_id; - temp->ittiMsgHeader.originTaskId = origin_task_id; - temp->ittiMsgHeader.ittiMsgSize = size; - - return temp; -} - -MessageDef *itti_alloc_new_message(task_id_t origin_task_id, MessagesIds message_id) -{ - return itti_alloc_new_message_sized(origin_task_id, message_id, itti_desc.messages_info[message_id].size); -} - -int itti_send_msg_to_task(task_id_t destination_task_id, instance_t instance, MessageDef *message) -{ - thread_id_t destination_thread_id; - task_id_t origin_task_id; - message_list_t *new; - uint32_t priority; - message_number_t message_number; - uint32_t message_id; - - AssertFatal (message != NULL, "Message is NULL!\n"); - AssertFatal (destination_task_id < itti_desc.task_max, "Destination task id (%d) is out of range (%d)\n", destination_task_id, itti_desc.task_max); - - destination_thread_id = TASK_GET_THREAD_ID(destination_task_id); - message->ittiMsgHeader.destinationTaskId = destination_task_id; - message->ittiMsgHeader.instance = instance; - message->ittiMsgHeader.lte_time.frame = itti_desc.lte_time.frame; - message->ittiMsgHeader.lte_time.slot = itti_desc.lte_time.slot; - message_id = message->ittiMsgHeader.messageId; - AssertFatal (message_id < itti_desc.messages_id_max, "Message id (%d) is out of range (%d)!\n", message_id, itti_desc.messages_id_max); - - origin_task_id = ITTI_MSG_ORIGIN_ID(message); - - priority = itti_get_message_priority (message_id); - - /* Increment the global message number */ - message_number = itti_increment_message_number (); - - if (destination_task_id != TASK_UNKNOWN) { - - if (itti_desc.threads[destination_thread_id].task_state == TASK_STATE_ENDED || - itti_desc.threads[destination_thread_id].task_state == TASK_STATE_NOT_CONFIGURED) { - ITTI_DEBUG(ITTI_DEBUG_ISSUES, " Message %s, number %lu with priority %d can not be sent from %s to queue (%u:%s), unconfigured or ended destination task!\n", - itti_desc.messages_info[message_id].name, - message_number, - priority, - itti_get_task_name(origin_task_id), - destination_task_id, - itti_get_task_name(destination_task_id)); - } else { - if(!emulate_rf){ - /* We cannot send a message if the task is not running */ - AssertFatal (itti_desc.threads[destination_thread_id].task_state == TASK_STATE_READY, - "Task %s Cannot send message %s (%d) to thread %d, it is not in ready state (%d)!\n", - itti_get_task_name(origin_task_id), - itti_desc.messages_info[message_id].name, - message_id, - destination_thread_id, - itti_desc.threads[destination_thread_id].task_state); - } - - /* Allocate new list element */ - new = (message_list_t *) itti_malloc (origin_task_id, destination_task_id, sizeof(struct message_list_s)); - - /* Fill in members */ - new->msg = message; - new->message_number = message_number; - new->message_priority = priority; - - /* Enqueue message in destination task queue */ - if (lfds611_queue_enqueue(itti_desc.tasks[destination_task_id].message_queue, new) == 0) { - AssertFatal(0, "Error: lfds611_queue_enqueue returns 0, queue is full, exiting\n"); - } - - { - /* Only use event fd for tasks, subtasks will pool the queue */ - if (TASK_GET_PARENT_TASK_ID(destination_task_id) == TASK_UNKNOWN) { - ssize_t write_ret; - eventfd_t sem_counter = 1; - - /* Call to write for an event fd must be of 8 bytes */ - write_ret = write (itti_desc.threads[destination_thread_id].task_event_fd, &sem_counter, sizeof(sem_counter)); - AssertFatal (write_ret == sizeof(sem_counter), "Write to task message FD (%d) failed (%d/%d)\n", - destination_thread_id, (int) write_ret, (int) sizeof(sem_counter)); - } - } - - ITTI_DEBUG(ITTI_DEBUG_SEND, " Message %s, number %lu with priority %d successfully sent from %s to queue (%u:%s)\n", - itti_desc.messages_info[message_id].name, - message_number, - priority, - itti_get_task_name(origin_task_id), - destination_task_id, - itti_get_task_name(destination_task_id)); - } - } else { - /* This is a debug message to TASK_UNKNOWN, we can release safely release it */ - int result = itti_free(origin_task_id, message); - AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); - } - - return 0; -} - -/* same as itti_send_msg_to_task but returns -1 in case of failure instead of crashing */ -/* TODO: this is a hack - the whole logic needs a proper rework. */ -/* look for HACK_RLC_UM_LIMIT for others places related to the hack. Please do not remove this comment. */ -int itti_try_send_msg_to_task(task_id_t destination_task_id, instance_t instance, MessageDef *message) -{ - thread_id_t destination_thread_id; - task_id_t origin_task_id; - message_list_t *new; - uint32_t priority; - message_number_t message_number; - uint32_t message_id; - - AssertFatal (message != NULL, "Message is NULL!\n"); - AssertFatal (destination_task_id < itti_desc.task_max, "Destination task id (%d) is out of range (%d)\n", destination_task_id, itti_desc.task_max); - - destination_thread_id = TASK_GET_THREAD_ID(destination_task_id); - message->ittiMsgHeader.destinationTaskId = destination_task_id; - message->ittiMsgHeader.instance = instance; - message->ittiMsgHeader.lte_time.frame = itti_desc.lte_time.frame; - message->ittiMsgHeader.lte_time.slot = itti_desc.lte_time.slot; - message_id = message->ittiMsgHeader.messageId; - AssertFatal (message_id < itti_desc.messages_id_max, "Message id (%d) is out of range (%d)!\n", message_id, itti_desc.messages_id_max); - - origin_task_id = ITTI_MSG_ORIGIN_ID(message); - - priority = itti_get_message_priority (message_id); - - /* Increment the global message number */ - message_number = itti_increment_message_number (); - - if (destination_task_id != TASK_UNKNOWN) { - - if (itti_desc.threads[destination_thread_id].task_state == TASK_STATE_ENDED || - itti_desc.threads[destination_thread_id].task_state == TASK_STATE_NOT_CONFIGURED) { - ITTI_DEBUG(ITTI_DEBUG_ISSUES, " Message %s, number %lu with priority %d can not be sent from %s to queue (%u:%s), unconfigured or ended destination task!\n", - itti_desc.messages_info[message_id].name, - message_number, - priority, - itti_get_task_name(origin_task_id), - destination_task_id, - itti_get_task_name(destination_task_id)); - } else { - /* We cannot send a message if the task is not running */ - AssertFatal (itti_desc.threads[destination_thread_id].task_state == TASK_STATE_READY, - "Task %s Cannot send message %s (%d) to thread %d, it is not in ready state (%d)!\n", - itti_get_task_name(origin_task_id), - itti_desc.messages_info[message_id].name, - message_id, - destination_thread_id, - itti_desc.threads[destination_thread_id].task_state); - - /* Allocate new list element */ - new = (message_list_t *) itti_malloc (origin_task_id, destination_task_id, sizeof(struct message_list_s)); - - /* Fill in members */ - new->msg = message; - new->message_number = message_number; - new->message_priority = priority; - - /* Enqueue message in destination task queue */ - if (lfds611_queue_enqueue(itti_desc.tasks[destination_task_id].message_queue, new) == 0) { - itti_free(origin_task_id, new); - return -1; - } - - { - /* Only use event fd for tasks, subtasks will pool the queue */ - if (TASK_GET_PARENT_TASK_ID(destination_task_id) == TASK_UNKNOWN) { - ssize_t write_ret; - eventfd_t sem_counter = 1; - - /* Call to write for an event fd must be of 8 bytes */ - write_ret = write (itti_desc.threads[destination_thread_id].task_event_fd, &sem_counter, sizeof(sem_counter)); - AssertFatal (write_ret == sizeof(sem_counter), "Write to task message FD (%d) failed (%d/%d)\n", - destination_thread_id, (int) write_ret, (int) sizeof(sem_counter)); - } - } - - ITTI_DEBUG(ITTI_DEBUG_SEND, " Message %s, number %lu with priority %d successfully sent from %s to queue (%u:%s)\n", - itti_desc.messages_info[message_id].name, - message_number, - priority, - itti_get_task_name(origin_task_id), - destination_task_id, - itti_get_task_name(destination_task_id)); - } - } else { - /* This is a debug message to TASK_UNKNOWN, we can release safely release it */ - int result = itti_free(origin_task_id, message); - AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); - } - - return 0; -} - -void itti_subscribe_event_fd(task_id_t task_id, int fd) -{ - thread_id_t thread_id; - struct epoll_event event; - - AssertFatal (task_id < itti_desc.task_max, "Task id (%d) is out of range (%d)!\n", task_id, itti_desc.task_max); - - thread_id = TASK_GET_THREAD_ID(task_id); - itti_desc.threads[thread_id].nb_events++; - - /* Reallocate the events */ - itti_desc.threads[thread_id].events = realloc( - itti_desc.threads[thread_id].events, - itti_desc.threads[thread_id].nb_events * sizeof(struct epoll_event)); - - event.events = EPOLLIN | EPOLLERR; - event.data.u64 = 0; - event.data.fd = fd; - - /* Add the event fd to the list of monitored events */ - if (epoll_ctl(itti_desc.threads[thread_id].epoll_fd, EPOLL_CTL_ADD, fd, - &event) != 0) { - /* Always assert on this condition */ - AssertFatal (0, "epoll_ctl (EPOLL_CTL_ADD) failed for task %s, fd %d: %s!\n", - itti_get_task_name(task_id), fd, strerror(errno)); - } - - ITTI_DEBUG(ITTI_DEBUG_EVEN_FD, " Successfully subscribed fd %d for task %s\n", fd, itti_get_task_name(task_id)); -} - -void itti_unsubscribe_event_fd(task_id_t task_id, int fd) -{ - thread_id_t thread_id; - - AssertFatal (task_id < itti_desc.task_max, "Task id (%d) is out of range (%d)!\n", task_id, itti_desc.task_max); - AssertFatal (fd >= 0, "File descriptor (%d) is invalid!\n", fd); - - thread_id = TASK_GET_THREAD_ID(task_id); - - /* Add the event fd to the list of monitored events */ - if (epoll_ctl(itti_desc.threads[thread_id].epoll_fd, EPOLL_CTL_DEL, fd, NULL) != 0) { - /* Always assert on this condition */ - AssertFatal (0, "epoll_ctl (EPOLL_CTL_DEL) failed for task %s, fd %d: %s!\n", - itti_get_task_name(task_id), fd, strerror(errno)); - } - - itti_desc.threads[thread_id].nb_events--; - itti_desc.threads[thread_id].events = realloc( - itti_desc.threads[thread_id].events, - itti_desc.threads[thread_id].nb_events * sizeof(struct epoll_event)); -} - -int itti_get_events(task_id_t task_id, struct epoll_event **events) -{ - thread_id_t thread_id; - - AssertFatal (task_id < itti_desc.task_max, "Task id (%d) is out of range (%d)\n", task_id, itti_desc.task_max); - - thread_id = TASK_GET_THREAD_ID(task_id); - *events = itti_desc.threads[thread_id].events; - - return itti_desc.threads[thread_id].epoll_nb_events; -} - -static inline void itti_receive_msg_internal_event_fd(task_id_t task_id, uint8_t polling, MessageDef **received_msg) -{ - thread_id_t thread_id; - int epoll_ret = 0; - int epoll_timeout = 0; - int i; - - AssertFatal (task_id < itti_desc.task_max, "Task id (%d) is out of range (%d)!\n", task_id, itti_desc.task_max); - AssertFatal (received_msg != NULL, "Received message is NULL!\n"); - - thread_id = TASK_GET_THREAD_ID(task_id); - *received_msg = NULL; - - if (polling) { - /* In polling mode we set the timeout to 0 causing epoll_wait to return - * immediately. - */ - epoll_timeout = 0; - } else { - /* timeout = -1 causes the epoll_wait to wait indefinitely. - */ - epoll_timeout = -1; - } - - do { - epoll_ret = epoll_wait(itti_desc.threads[thread_id].epoll_fd, - itti_desc.threads[thread_id].events, - itti_desc.threads[thread_id].nb_events, - epoll_timeout); - } while (epoll_ret < 0 && errno == EINTR); - - if (epoll_ret < 0) { - AssertFatal (0, "epoll_wait failed for task %s: %s!\n", itti_get_task_name(task_id), strerror(errno)); - } - - if (epoll_ret == 0 && polling) { - /* No data to read -> return */ - return; - } - - itti_desc.threads[thread_id].epoll_nb_events = epoll_ret; - - for (i = 0; i < epoll_ret; i++) { - /* Check if there is an event for ITTI for the event fd */ - if ((itti_desc.threads[thread_id].events[i].events & EPOLLIN) && - (itti_desc.threads[thread_id].events[i].data.fd == itti_desc.threads[thread_id].task_event_fd)) { - struct message_list_s *message = NULL; - eventfd_t sem_counter; - ssize_t read_ret; - int result; - - /* Read will always return 1 */ - read_ret = read (itti_desc.threads[thread_id].task_event_fd, &sem_counter, sizeof(sem_counter)); - AssertFatal (read_ret == sizeof(sem_counter), "Read from task message FD (%d) failed (%d/%d)!\n", thread_id, (int) read_ret, (int) sizeof(sem_counter)); - - if (lfds611_queue_dequeue (itti_desc.tasks[task_id].message_queue, (void **) &message) == 0) { - /* No element in list -> this should not happen */ - AssertFatal (0, "No message in queue for task %d while there are %d events and some for the messages queue!\n", task_id, epoll_ret); - } - - AssertFatal(message != NULL, "Message from message queue is NULL!\n"); - *received_msg = message->msg; - - - result = itti_free (ITTI_MSG_ORIGIN_ID(*received_msg), message); - AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); - - - /* Mark that the event has been processed */ - itti_desc.threads[thread_id].events[i].events &= ~EPOLLIN; - return; - } - } -} - -void itti_receive_msg(task_id_t task_id, MessageDef **received_msg) -{ - - itti_receive_msg_internal_event_fd(task_id, 0, received_msg); - -} - -void itti_poll_msg(task_id_t task_id, MessageDef **received_msg) -{ - AssertFatal (task_id < itti_desc.task_max, "Task id (%d) is out of range (%d)!\n", task_id, itti_desc.task_max); - - *received_msg = NULL; - - { - struct message_list_s *message; - - if (lfds611_queue_dequeue (itti_desc.tasks[task_id].message_queue, (void **) &message) == 1) { - int result; - - *received_msg = message->msg; - result = itti_free (ITTI_MSG_ORIGIN_ID(*received_msg), message); - AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); - } - } - - if (*received_msg == NULL) { - ITTI_DEBUG(ITTI_DEBUG_POLL, " No message in queue[(%u:%s)]\n", task_id, itti_get_task_name(task_id)); - } - -} - -int itti_create_task(task_id_t task_id, void *(*start_routine)(void *), void *args_p) -{ - thread_id_t thread_id = TASK_GET_THREAD_ID(task_id); - int result; - - AssertFatal (start_routine != NULL, "Start routine is NULL!\n"); - AssertFatal (thread_id < itti_desc.thread_max, "Thread id (%d) is out of range (%d)!\n", thread_id, itti_desc.thread_max); - AssertFatal (itti_desc.threads[thread_id].task_state == TASK_STATE_NOT_CONFIGURED, "Task %d, thread %d state is not correct (%d)!\n", - task_id, thread_id, itti_desc.threads[thread_id].task_state); - - itti_desc.threads[thread_id].task_state = TASK_STATE_STARTING; - - ITTI_DEBUG(ITTI_DEBUG_INIT, " Creating thread for task %s ...\n", itti_get_task_name(task_id)); - - result = pthread_create (&itti_desc.threads[thread_id].task_thread, NULL, start_routine, args_p); - AssertFatal (result >= 0, "Thread creation for task %d, thread %d failed (%d)!\n", task_id, thread_id, result); - char name[16]; - snprintf( name, sizeof(name), "ITTI %d", thread_id ); - pthread_setname_np( itti_desc.threads[thread_id].task_thread, name ); - - itti_desc.created_tasks ++; - - /* Wait till the thread is completely ready */ - while (itti_desc.threads[thread_id].task_state != TASK_STATE_READY) - usleep (1000); - - return 0; -} - -void itti_set_task_real_time(task_id_t task_id) -{ - thread_id_t thread_id = TASK_GET_THREAD_ID(task_id); - - DevCheck(thread_id < itti_desc.thread_max, thread_id, itti_desc.thread_max, 0); - - itti_desc.threads[thread_id].real_time = TRUE; -} - -void itti_wait_ready(int wait_tasks) -{ - itti_desc.wait_tasks = wait_tasks; - - ITTI_DEBUG(ITTI_DEBUG_INIT, - " wait for tasks: %s, created tasks %d, ready tasks %d\n", - itti_desc.wait_tasks ? "yes" : "no", - itti_desc.created_tasks, - itti_desc.ready_tasks); - - AssertFatal (itti_desc.created_tasks == itti_desc.ready_tasks, "Number of created tasks (%d) does not match ready tasks (%d), wait task %d!\n", - itti_desc.created_tasks, itti_desc.ready_tasks, itti_desc.wait_tasks); -} - -void itti_mark_task_ready(task_id_t task_id) -{ - thread_id_t thread_id = TASK_GET_THREAD_ID(task_id); - - AssertFatal (thread_id < itti_desc.thread_max, "Thread id (%d) is out of range (%d)!\n", thread_id, itti_desc.thread_max); - - /* Mark the thread as using LFDS queue */ - lfds611_queue_use(itti_desc.tasks[task_id].message_queue); - -#if defined(UE_EXPANSION) || defined(RTAI) - /* Assign low priority to created threads */ - { - struct sched_param sched_param; - sched_param.sched_priority = sched_get_priority_min(SCHED_FIFO) + 1; - sched_setscheduler(0, SCHED_FIFO, &sched_param); - } -#endif - - itti_desc.threads[thread_id].task_state = TASK_STATE_READY; - itti_desc.ready_tasks ++; - - while (itti_desc.wait_tasks != 0) { - usleep (10000); - } - - ITTI_DEBUG(ITTI_DEBUG_INIT, " task %s started\n", itti_get_task_name(task_id)); -} - -void itti_exit_task(void) -{ - task_id_t task_id = itti_get_current_task_id(); - thread_id_t thread_id = TASK_GET_THREAD_ID(task_id); - -#if defined(OAI_EMU) || defined(RTAI) - if (task_id > TASK_UNKNOWN) { - VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLE_ITTI_RECV_MSG, - __sync_and_and_fetch (&itti_desc.vcd_receive_msg, ~(1L << task_id))); - } -#endif - - itti_desc.threads[thread_id].task_state = TASK_STATE_NOT_CONFIGURED; - itti_desc.created_tasks--; - ITTI_DEBUG(ITTI_DEBUG_EXIT, "Thread for task %s (%d) exits\n", itti_get_task_name(task_id), task_id); - pthread_exit (NULL); -} - -void itti_terminate_tasks(task_id_t task_id) -{ - // Sends Terminate signals to all tasks. - itti_send_terminate_message (task_id); - - if (itti_desc.thread_handling_signals) { - pthread_kill (itti_desc.thread_ref, SIGUSR1); - } - - pthread_exit (NULL); -} - -int itti_init(task_id_t task_max, thread_id_t thread_max, MessagesIds messages_id_max, const task_info_t *tasks_info, - const message_info_t *messages_info) -{ - task_id_t task_id; - thread_id_t thread_id; - int ret; - - itti_desc.message_number = 1; - - ITTI_DEBUG(ITTI_DEBUG_INIT, " Init: %d tasks, %d threads, %d messages\n", task_max, thread_max, messages_id_max); - - CHECK_INIT_RETURN(signal_mask()); - - /* Saves threads and messages max values */ - itti_desc.task_max = task_max; - itti_desc.thread_max = thread_max; - itti_desc.messages_id_max = messages_id_max; - itti_desc.thread_handling_signals = FALSE; - itti_desc.tasks_info = tasks_info; - itti_desc.messages_info = messages_info; - - /* Allocates memory for tasks info */ - itti_desc.tasks = calloc (itti_desc.task_max, sizeof(task_desc_t)); - - /* Allocates memory for threads info */ - itti_desc.threads = calloc (itti_desc.thread_max, sizeof(thread_desc_t)); - - /* Initializing each queue and related stuff */ - for (task_id = TASK_FIRST; task_id < itti_desc.task_max; task_id++) { - ITTI_DEBUG(ITTI_DEBUG_INIT, " Initializing %stask %s%s%s\n", - itti_desc.tasks_info[task_id].parent_task != TASK_UNKNOWN ? "sub-" : "", - itti_desc.tasks_info[task_id].name, - itti_desc.tasks_info[task_id].parent_task != TASK_UNKNOWN ? " with parent " : "", - itti_desc.tasks_info[task_id].parent_task != TASK_UNKNOWN ? - itti_get_task_name(itti_desc.tasks_info[task_id].parent_task) : ""); - - ITTI_DEBUG(ITTI_DEBUG_INIT, " Creating queue of message of size %u\n", itti_desc.tasks_info[task_id].queue_size); - - ret = lfds611_queue_new(&itti_desc.tasks[task_id].message_queue, itti_desc.tasks_info[task_id].queue_size); - - if (0 == ret) { - AssertFatal (0, "lfds611_queue_new failed for task %s!\n", itti_get_task_name(task_id)); - } - } - - /* Initializing each thread */ - for (thread_id = THREAD_FIRST; thread_id < itti_desc.thread_max; thread_id++) { - itti_desc.threads[thread_id].task_state = TASK_STATE_NOT_CONFIGURED; - - itti_desc.threads[thread_id].epoll_fd = epoll_create1(0); - - if (itti_desc.threads[thread_id].epoll_fd == -1) { - /* Always assert on this condition */ - AssertFatal (0, "Failed to create new epoll fd: %s!\n", strerror(errno)); - } - - itti_desc.threads[thread_id].task_event_fd = eventfd(0, EFD_SEMAPHORE); - - if (itti_desc.threads[thread_id].task_event_fd == -1) { - /* Always assert on this condition */ - AssertFatal (0, " eventfd failed: %s!\n", strerror(errno)); - } - - itti_desc.threads[thread_id].nb_events = 1; - - itti_desc.threads[thread_id].events = calloc(1, sizeof(struct epoll_event)); - - itti_desc.threads[thread_id].events->events = EPOLLIN | EPOLLERR; - itti_desc.threads[thread_id].events->data.fd = itti_desc.threads[thread_id].task_event_fd; - - /* Add the event fd to the list of monitored events */ - if (epoll_ctl(itti_desc.threads[thread_id].epoll_fd, EPOLL_CTL_ADD, - itti_desc.threads[thread_id].task_event_fd, itti_desc.threads[thread_id].events) != 0) { - /* Always assert on this condition */ - AssertFatal (0, " epoll_ctl (EPOLL_CTL_ADD) failed: %s!\n", strerror(errno)); - } - - ITTI_DEBUG(ITTI_DEBUG_EVEN_FD, " Successfully subscribed fd %d for thread %d\n", - itti_desc.threads[thread_id].task_event_fd, thread_id); - - } - - itti_desc.running = 1; - itti_desc.wait_tasks = 0; - itti_desc.created_tasks = 0; - itti_desc.ready_tasks = 0; - CHECK_INIT_RETURN(timer_init ()); - - return 0; -} - -void itti_wait_tasks_end(void) -{ - int end = 0; - int thread_id; - task_id_t task_id; - int ready_tasks; - int result; - int retries = 10; - - itti_desc.thread_handling_signals = TRUE; - itti_desc.thread_ref=pthread_self (); - - /* Handle signals here */ - while (end == 0) { - signal_handle (&end); - } - - printf("closing all tasks\n"); - sleep(1); - - do { - ready_tasks = 0; - - task_id = TASK_FIRST; - - for (thread_id = THREAD_FIRST; thread_id < itti_desc.thread_max; thread_id++) { - /* Skip tasks which are not running */ - if (itti_desc.threads[thread_id].task_state == TASK_STATE_READY) { - while (thread_id != TASK_GET_THREAD_ID(task_id)) { - task_id++; - } - - result = pthread_tryjoin_np (itti_desc.threads[thread_id].task_thread, NULL); - - ITTI_DEBUG(ITTI_DEBUG_EXIT, " Thread %s join status %d\n", itti_get_task_name(task_id), result); - - if (result == 0) { - /* Thread has terminated */ - itti_desc.threads[thread_id].task_state = TASK_STATE_ENDED; - } else { - /* Thread is still running, count it */ - ready_tasks++; - } - } - } - - if (ready_tasks > 0) { - usleep (100 * 1000); - } - } while ((ready_tasks > 0) && (retries--)&& (!end) ); - - printf("ready_tasks %d\n",ready_tasks); - - itti_desc.running = 0; - - if (ready_tasks > 0) { - ITTI_DEBUG(ITTI_DEBUG_ISSUES, " Some threads are still running, force exit\n"); - exit (0); - } -} - -void itti_send_terminate_message(task_id_t task_id) -{ - MessageDef *terminate_message_p; - - terminate_message_p = itti_alloc_new_message (task_id, TERMINATE_MESSAGE); - - itti_send_broadcast_message (terminate_message_p); -} diff --git a/common/utils/itti/intertask_interface.h b/common/utils/itti/intertask_interface.h deleted file mode 100644 index ada34ce1b7..0000000000 --- a/common/utils/itti/intertask_interface.h +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 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.1 (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 - */ - -/** @defgroup _intertask_interface_impl_ Intertask Interface Mechanisms - * Implementation - * @ingroup _ref_implementation_ - * @{ - */ - -#include - -#ifndef INTERTASK_INTERFACE_H_ -#define INTERTASK_INTERFACE_H_ - -#include -#include -#include - -#include "intertask_interface_conf.h" -#include "intertask_interface_types.h" - -#define ITTI_MSG_ID(mSGpTR) ((mSGpTR)->ittiMsgHeader.messageId) -#define ITTI_MSG_ORIGIN_ID(mSGpTR) ((mSGpTR)->ittiMsgHeader.originTaskId) -#define ITTI_MSG_DESTINATION_ID(mSGpTR) ((mSGpTR)->ittiMsgHeader.destinationTaskId) -#define ITTI_MSG_INSTANCE(mSGpTR) ((mSGpTR)->ittiMsgHeader.instance) -#define ITTI_MSG_NAME(mSGpTR) itti_get_message_name(ITTI_MSG_ID(mSGpTR)) -#define ITTI_MSG_ORIGIN_NAME(mSGpTR) itti_get_task_name(ITTI_MSG_ORIGIN_ID(mSGpTR)) -#define ITTI_MSG_DESTINATION_NAME(mSGpTR) itti_get_task_name(ITTI_MSG_DESTINATION_ID(mSGpTR)) - -/* Make the message number platform specific */ -typedef unsigned long message_number_t; -#define MESSAGE_NUMBER_SIZE (sizeof(unsigned long)) - -typedef enum message_priorities_e { - MESSAGE_PRIORITY_MAX = 100, - MESSAGE_PRIORITY_MAX_LEAST = 85, - MESSAGE_PRIORITY_MED_PLUS = 70, - MESSAGE_PRIORITY_MED = 55, - MESSAGE_PRIORITY_MED_LEAST = 40, - MESSAGE_PRIORITY_MIN_PLUS = 25, - MESSAGE_PRIORITY_MIN = 10, -} message_priorities_t; - -typedef struct message_info_s { - task_id_t id; - message_priorities_t priority; - /* Message payload size */ - MessageHeaderSize size; - /* Printable name */ - const char * const name; -} message_info_t; - -typedef enum task_priorities_e { - TASK_PRIORITY_MAX = 100, - TASK_PRIORITY_MAX_LEAST = 85, - TASK_PRIORITY_MED_PLUS = 70, - TASK_PRIORITY_MED = 55, - TASK_PRIORITY_MED_LEAST = 40, - TASK_PRIORITY_MIN_PLUS = 25, - TASK_PRIORITY_MIN = 10, -} task_priorities_t; - -typedef struct task_info_s { - thread_id_t thread; - task_id_t parent_task; - task_priorities_t priority; - unsigned int queue_size; - /* Printable name */ - const char * const name; -} task_info_t; - -/** \brief Update the itti LTE time reference for messages - \param current reference frame - \param current reference slot - @returns < 0 on failure, 0 otherwise - **/ -void itti_update_lte_time(uint32_t frame, uint8_t slot); - -/** \brief Send a broadcast message to every task - \param message_p Pointer to the message to send - @returns < 0 on failure, 0 otherwise - **/ -int itti_send_broadcast_message(MessageDef *message_p); - -/** \brief Send a message to a task (could be itself) - \param task_id Task ID - \param instance Instance of the task used for virtualization - \param message Pointer to the message to send - @returns -1 on failure, 0 otherwise - **/ -int itti_send_msg_to_task(task_id_t task_id, instance_t instance, MessageDef *message); - -/* TODO: this is a hack. Almost no caller of itti_send_msg_to_task checks - * the return value so it has been changed to crash the program in case - * of failure instead of returning -1 as the documentation above says. - * The RLC UM code may receive too much data when doing UDP at a higher - * throughput than the link allows and so for this specific case we need - * a version that actually returns -1 on failure. - * - * This needs to be cleaned at some point. - */ -/* look for HACK_RLC_UM_LIMIT for others places related to the hack. Please do not remove this comment. */ -int itti_try_send_msg_to_task(task_id_t task_id, instance_t instance, MessageDef *message); - -/** \brief Add a new fd to monitor. - * NOTE: it is up to the user to read data associated with the fd - * \param task_id Task ID of the receiving task - * \param fd The file descriptor to monitor - **/ -void itti_subscribe_event_fd(task_id_t task_id, int fd); - -/** \brief Remove a fd from the list of fd to monitor - * \param task_id Task ID of the task - * \param fd The file descriptor to remove - **/ -void itti_unsubscribe_event_fd(task_id_t task_id, int fd); - -/** \brief Return the list of events excluding the fd associated with itti - * \param task_id Task ID of the task - * \param events events list - * @returns number of events to handle - **/ -int itti_get_events(task_id_t task_id, struct epoll_event **events); - -/** \brief Retrieves a message in the queue associated to task_id. - * If the queue is empty, the thread is blocked till a new message arrives. - \param task_id Task ID of the receiving task - \param received_msg Pointer to the allocated message - **/ -void itti_receive_msg(task_id_t task_id, MessageDef **received_msg); - -/** \brief Try to retrieves a message in the queue associated to task_id. - \param task_id Task ID of the receiving task - \param received_msg Pointer to the allocated message - **/ -void itti_poll_msg(task_id_t task_id, MessageDef **received_msg); - -/** \brief Start thread associated to the task - * \param task_id task to start - * \param start_routine entry point for the task - * \param args_p Optional argument to pass to the start routine - * @returns -1 on failure, 0 otherwise - **/ -int itti_create_task(task_id_t task_id, - void *(*start_routine) (void *), - void *args_p); - -/** \brief Mark the task as a real time task - * \param task_id task to mark as real time - **/ -void itti_set_task_real_time(task_id_t task_id); - -/** \brief Indicates to ITTI if newly created tasks should wait for all tasks to be ready - * \param wait_tasks non 0 to make new created tasks to wait, 0 to let created tasks to run - **/ -void itti_wait_ready(int wait_tasks); - -/** \brief Mark the task as in ready state - * \param task_id task to mark as ready - **/ -void itti_mark_task_ready(task_id_t task_id); - -/** \brief Exit the current task. - **/ -void itti_exit_task(void); - -/** \brief Indicate that the task is completed and initiate termination of all tasks. - * \param task_id task that is completed - **/ -void itti_terminate_tasks(task_id_t task_id); - -/** \brief Return the printable string associated with the message - * \param message_id Id of the message - **/ -const char *itti_get_message_name(MessagesIds message_id); - -/** \brief Return the printable string associated with a task id - * \param thread_id Id of the task - **/ -const char *itti_get_task_name(task_id_t task_id); - -/** \brief Alloc and memset(0) a new itti message. - * \param origin_task_id Task ID of the sending task - * \param message_id Message ID - * @returns NULL in case of failure or newly allocated mesage ref - **/ -MessageDef *itti_alloc_new_message( - task_id_t origin_task_id, - MessagesIds message_id); - -/** \brief Alloc and memset(0) a new itti message. - * \param origin_task_id Task ID of the sending task - * \param message_id Message ID - * \param size size of the payload to send - * @returns NULL in case of failure or newly allocated mesage ref - **/ -MessageDef *itti_alloc_new_message_sized( - task_id_t origin_task_id, - MessagesIds message_id, - MessageHeaderSize size); - -/** \brief handle signals and wait for all threads to join when the process complete. - * This function should be called from the main thread after having created all ITTI tasks. - **/ -void itti_wait_tasks_end(void); - -/** \brief Send a termination message to all tasks. - * \param task_id task that is broadcasting the message. - **/ -void itti_send_terminate_message(task_id_t task_id); - -void *itti_malloc(task_id_t origin_task_id, task_id_t destination_task_id, ssize_t size); - -int itti_free(task_id_t task_id, void *ptr); - -#endif /* INTERTASK_INTERFACE_H_ */ -/* @} */ diff --git a/common/utils/itti/intertask_interface_init.h b/common/utils/itti/intertask_interface_init.h deleted file mode 100644 index dbd4e1b2ec..0000000000 --- a/common/utils/itti/intertask_interface_init.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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.1 (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 - */ - -/** @defgroup _intertask_interface_impl_ Intertask Interface Mechanisms - * Implementation - * @ingroup _ref_implementation_ - * @{ - */ - -/******************************************************************************** - * - * !!! This header should only be included by the file that initialize - * the intertask interface module for the process !!! - * - * Other files should include "intertask_interface.h" - * - *******************************************************************************/ - -#ifndef INTERTASK_INTERFACE_INIT_H_ -#define INTERTASK_INTERFACE_INIT_H_ - -#include "intertask_interface.h" - -#ifndef CHECK_PROTOTYPE_ONLY - -/* Map task id to printable name. */ -const task_info_t tasks_info[] = { - {0, TASK_UNKNOWN, 0, 0, "TASK_UNKNOWN"}, -#define TASK_DEF(tHREADiD, pRIO, qUEUEsIZE) { tHREADiD##_THREAD, TASK_UNKNOWN, pRIO, qUEUEsIZE, #tHREADiD }, -#define SUB_TASK_DEF(tHREADiD, sUBtASKiD, qUEUEsIZE) { sUBtASKiD##_THREAD, tHREADiD##_THREAD, 0, qUEUEsIZE, #sUBtASKiD }, -#include -#undef SUB_TASK_DEF -#undef TASK_DEF -}; - -/* Map message id to message information */ -const message_info_t messages_info[] = { -#define MESSAGE_DEF(iD, pRIO, sTRUCT, fIELDnAME) { iD, pRIO, sizeof(sTRUCT), #iD }, -#include -#undef MESSAGE_DEF -}; - -#endif - -/** \brief Init function for the intertask interface. Init queues, Mutexes and Cond vars. - * \param thread_max Maximum number of threads - * \param messages_id_max Maximum message id - * \param threads_name Pointer on the threads name information as created by this include file - * \param messages_info Pointer on messages information as created by this include file - **/ -int itti_init(task_id_t task_max, thread_id_t thread_max, MessagesIds messages_id_max, const task_info_t *tasks_info, - const message_info_t *messages_info); - -#endif /* INTERTASK_INTERFACE_INIT_H_ */ -/* @} */ diff --git a/common/utils/itti/intertask_interface_types.h b/common/utils/itti/intertask_interface_types.h deleted file mode 100644 index af1b4e9aa9..0000000000 --- a/common/utils/itti/intertask_interface_types.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * 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.1 (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 - */ - -/** @defgroup _intertask_interface_impl_ Intertask Interface Mechanisms - * Implementation - * @ingroup _ref_implementation_ - * @{ - */ - -#ifndef INTERTASK_INTERFACE_TYPES_H_ -#define INTERTASK_INTERFACE_TYPES_H_ - -#include "itti_types.h" -#include "platform_types.h" - -/* Defines to handle bit fields on unsigned long values */ -#define UL_BIT_MASK(lENGTH) ((1UL << (lENGTH)) - 1UL) -#define UL_BIT_SHIFT(vALUE, oFFSET) ((vALUE) << (oFFSET)) -#define UL_BIT_UNSHIFT(vALUE, oFFSET) ((vALUE) >> (oFFSET)) - -#define UL_FIELD_MASK(oFFSET, lENGTH) UL_BIT_SHIFT(UL_BIT_MASK(lENGTH), (oFFSET)) -#define UL_FIELD_INSERT(vALUE, fIELD, oFFSET, lENGTH) (((vALUE) & (~UL_FIELD_MASK(oFFSET, lENGTH))) | UL_BIT_SHIFT(((fIELD) & UL_BIT_MASK(lENGTH)), oFFSET)) -#define UL_FIELD_EXTRACT(vALUE, oFFSET, lENGTH) (UL_BIT_UNSHIFT((vALUE), (oFFSET)) & UL_BIT_MASK(lENGTH)) - -/* Definitions of task ID fields */ -#define TASK_THREAD_ID_OFFSET 8 -#define TASK_THREAD_ID_LENGTH 8 - -#define TASK_SUB_TASK_ID_OFFSET 0 -#define TASK_SUB_TASK_ID_LENGTH 8 - -/* Defines to extract task ID fields */ -#define TASK_GET_THREAD_ID(tASKiD) (itti_desc.tasks_info[tASKiD].thread) -#define TASK_GET_PARENT_TASK_ID(tASKiD) (itti_desc.tasks_info[tASKiD].parent_task) -/* Extract the instance from a message */ -#define ITTI_MESSAGE_GET_INSTANCE(mESSAGE) ((mESSAGE)->ittiMsgHeader.instance) - -#include - -/* This enum defines messages ids. Each one is unique. */ -typedef enum { -#define MESSAGE_DEF(iD, pRIO, sTRUCT, fIELDnAME) iD, -#include -#undef MESSAGE_DEF - - MESSAGES_ID_MAX, -} MessagesIds; - -//! Thread id of each task -typedef enum { - THREAD_NULL = 0, - -#define TASK_DEF(tHREADiD, pRIO, qUEUEsIZE) THREAD_##tHREADiD, -#define SUB_TASK_DEF(tHREADiD, sUBtASKiD, qUEUEsIZE) -#include -#undef SUB_TASK_DEF -#undef TASK_DEF - - THREAD_MAX, - THREAD_FIRST = 1, -} thread_id_t; - -//! Sub-tasks id, to defined offset form thread id -typedef enum { -#define TASK_DEF(tHREADiD, pRIO, qUEUEsIZE) tHREADiD##_THREAD = THREAD_##tHREADiD, -#define SUB_TASK_DEF(tHREADiD, sUBtASKiD, qUEUEsIZE) sUBtASKiD##_THREAD = THREAD_##tHREADiD, -#include -#undef SUB_TASK_DEF -#undef TASK_DEF -} task_thread_id_t; - -//! Tasks id of each task -typedef enum { - TASK_UNKNOWN = 0, - -#define TASK_DEF(tHREADiD, pRIO, qUEUEsIZE) tHREADiD, -#define SUB_TASK_DEF(tHREADiD, sUBtASKiD, qUEUEsIZE) sUBtASKiD, -#include -#undef SUB_TASK_DEF -#undef TASK_DEF - - TASK_MAX, - TASK_FIRST = 1, -} task_id_t; - -typedef union msg_s { -#define MESSAGE_DEF(iD, pRIO, sTRUCT, fIELDnAME) sTRUCT fIELDnAME; -#include -#undef MESSAGE_DEF -} msg_t; - -typedef uint16_t MessageHeaderSize; - -typedef struct itti_lte_time_s { - uint32_t frame; - uint8_t slot; -} itti_lte_time_t; - -/** @struct MessageHeader - * @brief Message Header structure for inter-task communication. - */ -typedef struct MessageHeader_s { - MessagesIds messageId; /**< Unique message id as referenced in enum MessagesIds */ - - task_id_t originTaskId; /**< ID of the sender task */ - task_id_t destinationTaskId; /**< ID of the destination task */ - instance_t instance; /**< Task instance for virtualization */ - - MessageHeaderSize ittiMsgSize; /**< Message size (not including header size) */ - - itti_lte_time_t lte_time; /**< Reference LTE time */ -} MessageHeader; - -/** @struct MessageDef - * @brief Message structure for inter-task communication. - * \internal - * The attached attribute \c __packed__ is neccessary, because the memory allocation code expects \ref ittiMsg directly following \ref ittiMsgHeader. - */ -typedef struct __attribute__ ((__packed__)) MessageDef_s { - MessageHeader ittiMsgHeader; /**< Message header */ - msg_t ittiMsg; /**< Union of payloads as defined in x_messages_def.h headers */ -} MessageDef; - -#endif /* INTERTASK_INTERFACE_TYPES_H_ */ -/* @} */ diff --git a/common/utils/itti/intertask_messages_def.h b/common/utils/itti/intertask_messages_def.h deleted file mode 100644 index 57c344c813..0000000000 --- a/common/utils/itti/intertask_messages_def.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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.1 (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 - */ - -/* This message asks for task initialization */ -MESSAGE_DEF(INITIALIZE_MESSAGE, MESSAGE_PRIORITY_MED, IttiMsgEmpty, initialize_message) - -/* This message asks for task activation */ -MESSAGE_DEF(ACTIVATE_MESSAGE, MESSAGE_PRIORITY_MED, IttiMsgEmpty, activate_message) - -/* This message asks for task deactivation */ -MESSAGE_DEF(DEACTIVATE_MESSAGE, MESSAGE_PRIORITY_MED, IttiMsgEmpty, deactivate_message) - -/* This message asks for task termination */ -MESSAGE_DEF(TERMINATE_MESSAGE, MESSAGE_PRIORITY_MAX, IttiMsgEmpty, terminate_message) - -/* Test message used for debug */ -MESSAGE_DEF(MESSAGE_TEST, MESSAGE_PRIORITY_MED, IttiMsgEmpty, message_test) - -/* Error message */ -MESSAGE_DEF(ERROR_LOG, MESSAGE_PRIORITY_MAX, IttiMsgEmpty, error_log) -/* Warning message */ -MESSAGE_DEF(WARNING_LOG, MESSAGE_PRIORITY_MAX, IttiMsgEmpty, warning_log) -/* Notice message */ -MESSAGE_DEF(NOTICE_LOG, MESSAGE_PRIORITY_MED, IttiMsgEmpty, notice_log) -/* Info message */ -MESSAGE_DEF(INFO_LOG, MESSAGE_PRIORITY_MED, IttiMsgEmpty, info_log) -/* Debug message */ -MESSAGE_DEF(DEBUG_LOG, MESSAGE_PRIORITY_MED, IttiMsgEmpty, debug_log) - -/* Generic log message for text */ -MESSAGE_DEF(GENERIC_LOG, MESSAGE_PRIORITY_MED, IttiMsgEmpty, generic_log) diff --git a/common/utils/itti/intertask_messages_types.h b/common/utils/itti/intertask_messages_types.h deleted file mode 100644 index 145f57648f..0000000000 --- a/common/utils/itti/intertask_messages_types.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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.1 (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 - */ - -/* - * intertask_messages_types.h - * - * Created on: Jan 14, 2014 - * Author: laurent winckel - */ - -#ifndef INTERTASK_MESSAGES_TYPES_H_ -#define INTERTASK_MESSAGES_TYPES_H_ - -typedef struct IttiMsgEmpty_s { -} IttiMsgEmpty; - -typedef struct IttiMsgText_s { - uint32_t size; - char text[]; -} IttiMsgText; - -#endif /* INTERTASK_MESSAGES_TYPES_H_ */ diff --git a/common/utils/itti/itti_types.h b/common/utils/itti/itti_types.h deleted file mode 100644 index 2607c003b1..0000000000 --- a/common/utils/itti/itti_types.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * 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.1 (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 - */ - -/** @brief Intertask Interface common types - * Contains type definitions used for generating and parsing ITTI messages. - * @author Laurent Winckel - */ - -#ifndef _ITTI_TYPES_H_ -#define _ITTI_TYPES_H_ - -/* The current file is included in the ue_ip.ko compilation. - * For it to work we need to include linux/types.h and - * not stdint.h. - * A solution to this problem is to use #ifndef __KERNEL__. - * Maybe a better solution would be to clean things up - * so that ue_ip.ko does not include the current file. - */ -#ifndef __KERNEL__ -# include -#else -# include -#endif - -#define CHARS_TO_UINT32(c1, c2, c3, c4) (((c4) << 24) | ((c3) << 16) | ((c2) << 8) | (c1)) - -#define MESSAGE_NUMBER_CHAR_FORMAT "%11u" - -/* Intertask message types */ -enum itti_message_types_e { - ITTI_DUMP_XML_DEFINITION = CHARS_TO_UINT32 ('\n', 'I', 'x', 'd'), - ITTI_DUMP_XML_DEFINITION_END = CHARS_TO_UINT32 ('i', 'X', 'D', '\n'), - - ITTI_DUMP_MESSAGE_TYPE = CHARS_TO_UINT32 ('\n', 'I', 'm', 's'), - ITTI_DUMP_MESSAGE_TYPE_END = CHARS_TO_UINT32 ('i', 'M', 'S', '\n'), - - ITTI_STATISTIC_MESSAGE_TYPE = CHARS_TO_UINT32 ('\n', 'I', 's', 't'), - ITTI_STATISTIC_MESSAGE_TYPE_END = CHARS_TO_UINT32 ('i', 'S', 'T', '\n'), - - /* This signal is not meant to be used by remote analyzer */ - ITTI_DUMP_EXIT_SIGNAL = CHARS_TO_UINT32 ('e', 'X', 'I', 'T'), -}; - -typedef uint32_t itti_message_types_t; - -/* Message header is the common part that should never change between - * remote process and this one. - */ -typedef struct { - /* The size of this structure */ - uint32_t message_size; - itti_message_types_t message_type; -} itti_socket_header_t; - -typedef struct { - char message_number_char[12]; /* 9 chars are needed to store an unsigned 32 bits value in decimal, but must be a multiple of 32 bits to avoid alignment issues */ -} itti_signal_header_t; - - -#define INSTANCE_DEFAULT (UINT16_MAX - 1) -#define INSTANCE_ALL (UINT16_MAX) - -#endif - diff --git a/common/utils/itti/messages_def.h b/common/utils/itti/messages_def.h deleted file mode 100644 index f312669848..0000000000 --- a/common/utils/itti/messages_def.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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.1 (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 - */ - -// These messages files are mandatory and must always be placed in first position -#include "intertask_messages_def.h" -#include "timer_messages_def.h" - -// Dummy file for the generic intertask interface definition. Actual definition should be in top level build directory. diff --git a/common/utils/itti/messages_types.h b/common/utils/itti/messages_types.h deleted file mode 100644 index d390bf0159..0000000000 --- a/common/utils/itti/messages_types.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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.1 (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 - */ - -/* - * messages_types.h - * - * Created on: Oct 14, 2013 - * Author: winckel - */ - -#ifndef MESSAGES_TYPES_H_ -#define MESSAGES_TYPES_H_ - -#include "intertask_messages_types.h" -#include "timer_messages_types.h" - -// Dummy file for the generic intertask interface definition. Actual definition should be in top level build directory. - -#endif /* MESSAGES_TYPES_H_ */ diff --git a/common/utils/itti/signals.c b/common/utils/itti/signals.c deleted file mode 100644 index 5dd667ae65..0000000000 --- a/common/utils/itti/signals.c +++ /dev/null @@ -1,141 +0,0 @@ -/* - * 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.1 (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 - */ - -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "intertask_interface.h" -#include "timer.h" -#include "backtrace.h" -#include "assertions.h" - -#include "signals.h" -#include "log.h" - -#if defined (LOG_D) && defined (LOG_E) -# define SIG_DEBUG(x, args...) LOG_D(RRC, x, ##args) -# define SIG_ERROR(x, args...) LOG_E(RRC, x, ##args) -#endif - -#ifndef SIG_DEBUG -# define SIG_DEBUG(x, args...) do { fprintf(stdout, "[SIG][D]"x, ##args); } while(0) -#endif -#ifndef SIG_ERROR -# define SIG_ERROR(x, args...) do { fprintf(stdout, "[SIG][E]"x, ##args); } while(0) -#endif - -static sigset_t set; - -int signal_mask(void) -{ - /* We set the signal mask to avoid threads other than the main thread - * to receive the timer signal. Note that threads created will inherit this - * configuration. - */ - sigemptyset(&set); - - sigaddset (&set, SIGTIMER); - sigaddset (&set, SIGUSR1); - sigaddset (&set, SIGABRT); - sigaddset (&set, SIGSEGV); - sigaddset (&set, SIGINT); - - if (sigprocmask(SIG_BLOCK, &set, NULL) < 0) { - perror ("sigprocmask"); - return -1; - } - - return 0; -} - -int signal_handle(int *end) -{ - int ret; - siginfo_t info; - - sigemptyset(&set); - - sigaddset (&set, SIGTIMER); - sigaddset (&set, SIGUSR1); - sigaddset (&set, SIGABRT); - sigaddset (&set, SIGSEGV); - sigaddset (&set, SIGINT); - - if (sigprocmask(SIG_BLOCK, &set, NULL) < 0) { - perror ("sigprocmask"); - return -1; - } - - /* Block till a signal is received. - * NOTE: The signals defined by set are required to be blocked at the time - * of the call to sigwait() otherwise sigwait() is not successful. - */ - if ((ret = sigwaitinfo(&set, &info)) == -1) { - perror ("sigwait"); - return ret; - } - - //printf("Received signal %d\n", info.si_signo); - - /* Real-time signals are non constant and are therefore not suitable for - * use in switch. - */ - if (info.si_signo == SIGTIMER) { - timer_handle_signal(&info); - } else { - /* Dispatch the signal to sub-handlers */ - switch(info.si_signo) { - case SIGUSR1: - SIG_DEBUG("Received SIGUSR1\n"); - *end = 1; - break; - - case SIGSEGV: /* Fall through */ - case SIGABRT: - SIG_DEBUG("Received SIGABORT\n"); - backtrace_handle_signal(&info); - break; - - case SIGINT: - printf("Received SIGINT\n"); - itti_send_terminate_message(TASK_UNKNOWN); - *end = 1; - break; - - default: - SIG_ERROR("Received unknown signal %d\n", info.si_signo); - break; - } - } - - return 0; -} diff --git a/common/utils/itti/signals.h b/common/utils/itti/signals.h deleted file mode 100644 index 5277e216a3..0000000000 --- a/common/utils/itti/signals.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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.1 (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 - */ - -#ifndef SIGNALS_H_ -#define SIGNALS_H_ - -int signal_mask(void); - -int signal_handle(int *end); - -#endif /* SIGNALS_H_ */ diff --git a/common/utils/itti/tasks_def.h b/common/utils/itti/tasks_def.h deleted file mode 100644 index d54d09a26a..0000000000 --- a/common/utils/itti/tasks_def.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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.1 (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 - */ - -// This task is mandatory and must always be placed in first position -TASK_DEF(TASK_TIMER, TASK_PRIORITY_MED, 10) - -// Dummy file for the generic intertask interface definition. Actual definition should be in top level build directory. diff --git a/common/utils/itti/timer.c b/common/utils/itti/timer.c deleted file mode 100644 index 6327aeacfb..0000000000 --- a/common/utils/itti/timer.c +++ /dev/null @@ -1,255 +0,0 @@ -/* - * 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.1 (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 - */ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "assertions.h" -#include "intertask_interface.h" -#include "timer.h" -#include "log.h" -#include "queue.h" - -#if defined (LOG_D) && defined (LOG_E) -# define TMR_DEBUG(x, args...) LOG_D(TMR, x, ##args) -# define TMR_ERROR(x, args...) LOG_E(TMR, x, ##args) -#endif - -#ifndef TMR_DEBUG -# define TMR_DEBUG(x, args...) do { fprintf(stdout, "[TMR][D]"x, ##args); } while(0) -#endif -#ifndef TMR_ERROR -# define TMR_ERROR(x, args...) do { fprintf(stdout, "[TMR][E]"x, ##args); } while(0) -#endif - -int timer_handle_signal(siginfo_t *info); - -struct timer_elm_s { - task_id_t task_id; ///< Task ID which has requested the timer - int32_t instance; ///< Instance of the task which has requested the timer - timer_t timer; ///< Unique timer id - timer_type_t type; ///< Timer type - void *timer_arg; ///< Optional argument that will be passed when timer expires - STAILQ_ENTRY(timer_elm_s) entries; ///< Pointer to next element -}; - -typedef struct timer_desc_s { - STAILQ_HEAD(timer_list_head, timer_elm_s) timer_queue; - pthread_mutex_t timer_list_mutex; - struct timespec timeout; -} timer_desc_t; - -static timer_desc_t timer_desc; - -#define TIMER_SEARCH(vAR, tIMERfIELD, tIMERvALUE, tIMERqUEUE) \ -do { \ - STAILQ_FOREACH(vAR, tIMERqUEUE, entries) { \ - if (((vAR)->tIMERfIELD == tIMERvALUE)) \ - break; \ - } \ -} while(0) - -int timer_handle_signal(siginfo_t *info) -{ - struct timer_elm_s *timer_p; - MessageDef *message_p; - timer_has_expired_t *timer_expired_p; - task_id_t task_id; - int32_t instance; - - /* Get back pointer to timer list element */ - timer_p = (struct timer_elm_s *)info->si_ptr; - - // LG: To many traces for msc timer: - TMR_DEBUG("Timer with id 0x%lx has expired\n", (long)timer_p->timer); - - task_id = timer_p->task_id; - instance = timer_p->instance; - message_p = itti_alloc_new_message(TASK_TIMER, TIMER_HAS_EXPIRED); - - timer_expired_p = &message_p->ittiMsg.timer_has_expired; - - timer_expired_p->timer_id = (long)timer_p->timer; - timer_expired_p->arg = timer_p->timer_arg; - - /* Timer is a one shot timer, remove it */ - if (timer_p->type == TIMER_ONE_SHOT) { - // if (timer_delete(timer_p->timer) < 0) { - // TMR_DEBUG("Failed to delete timer 0x%lx\n", (long)timer_p->timer); - // } - // TMR_DEBUG("Removed timer 0x%lx\n", (long)timer_p->timer); - // pthread_mutex_lock(&timer_desc.timer_list_mutex); - // STAILQ_REMOVE(&timer_desc.timer_queue, timer_p, timer_elm_s, entries); - // pthread_mutex_unlock(&timer_desc.timer_list_mutex); - // free(timer_p); - // timer_p = NULL; - if (timer_remove((long)timer_p->timer) != 0) { - TMR_DEBUG("Failed to delete timer 0x%lx\n", (long)timer_p->timer); - } - } - - /* Notify task of timer expiry */ - if (itti_send_msg_to_task(task_id, instance, message_p) < 0) { - TMR_DEBUG("Failed to send msg TIMER_HAS_EXPIRED to task %u\n", task_id); - free(message_p); - return -1; - } - -#if defined(ENB_AGENT_SB_IF) - -#endif - - return 0; -} - -int timer_setup( - uint32_t interval_sec, - uint32_t interval_us, - task_id_t task_id, - int32_t instance, - timer_type_t type, - void *timer_arg, - long *timer_id) -{ - struct sigevent se; - struct itimerspec its; - struct timer_elm_s *timer_p; - timer_t timer; - - if (timer_id == NULL) { - return -1; - } - - AssertFatal (type < TIMER_TYPE_MAX, "Invalid timer type (%d/%d)!\n", type, TIMER_TYPE_MAX); - - /* Allocate new timer list element */ - timer_p = malloc(sizeof(struct timer_elm_s)); - - if (timer_p == NULL) { - TMR_ERROR("Failed to create new timer element\n"); - return -1; - } - - memset(&timer, 0, sizeof(timer_t)); - memset(&se, 0, sizeof(struct sigevent)); - - timer_p->task_id = task_id; - timer_p->instance = instance; - timer_p->type = type; - timer_p->timer_arg = timer_arg; - - /* Setting up alarm */ - /* Set and enable alarm */ - se.sigev_notify = SIGEV_SIGNAL; - se.sigev_signo = SIGTIMER; - se.sigev_value.sival_ptr = timer_p; - - /* At the timer creation, the timer structure will be filled in with timer_id, - * which is unique for this process. This id is allocated by kernel and the - * value might be used to distinguish timers. - */ - if (timer_create(CLOCK_REALTIME, &se, &timer) < 0) { - TMR_ERROR("Failed to create timer: (%s:%d)\n", strerror(errno), errno); - free(timer_p); - return -1; - } - - /* Fill in the first expiration value. */ - its.it_value.tv_sec = interval_sec; - its.it_value.tv_nsec = interval_us * 1000; - - if (type == TIMER_PERIODIC) { - /* Asked for periodic timer. We set the interval time */ - its.it_interval.tv_sec = interval_sec; - its.it_interval.tv_nsec = interval_us * 1000; - } else { - /* Asked for one-shot timer. Do not set the interval field */ - its.it_interval.tv_sec = 0; - its.it_interval.tv_nsec = 0; - } - - timer_settime(timer, 0, &its, NULL); - /* Simply set the timer_id argument. so it can be used by caller */ - *timer_id = (long)timer; - TMR_DEBUG("Requesting new %s timer with id 0x%lx that expires within " - "%d sec and %d usec\n", - type == TIMER_PERIODIC ? "periodic" : "single shot", - *timer_id, interval_sec, interval_us); - - timer_p->timer = timer; - - /* Lock the queue and insert the timer at the tail */ - pthread_mutex_lock(&timer_desc.timer_list_mutex); - STAILQ_INSERT_TAIL(&timer_desc.timer_queue, timer_p, entries); - pthread_mutex_unlock(&timer_desc.timer_list_mutex); - - return 0; -} - -int timer_remove(long timer_id) -{ - int rc = 0; - struct timer_elm_s *timer_p; - - TMR_DEBUG("Removing timer 0x%lx\n", timer_id); - - pthread_mutex_lock(&timer_desc.timer_list_mutex); - TIMER_SEARCH(timer_p, timer, ((timer_t)timer_id), &timer_desc.timer_queue); - - /* We didn't find the timer in list */ - if (timer_p == NULL) { - pthread_mutex_unlock(&timer_desc.timer_list_mutex); - TMR_ERROR("Didn't find timer 0x%lx in list\n", timer_id); - return -1; - } - - STAILQ_REMOVE(&timer_desc.timer_queue, timer_p, timer_elm_s, entries); - pthread_mutex_unlock(&timer_desc.timer_list_mutex); - - if (timer_delete(timer_p->timer) < 0) { - TMR_ERROR("Failed to delete timer 0x%lx\n", (long)timer_p->timer); - rc = -1; - } - - free(timer_p); - timer_p = NULL; - return rc; -} - -int timer_init(void) -{ - TMR_DEBUG("Initializing TIMER task interface\n"); - - memset(&timer_desc, 0, sizeof(timer_desc_t)); - - STAILQ_INIT(&timer_desc.timer_queue); - pthread_mutex_init(&timer_desc.timer_list_mutex, NULL); - - TMR_DEBUG("Initializing TIMER task interface: DONE\n"); - return 0; -} diff --git a/common/utils/itti/timer.h b/common/utils/itti/timer.h deleted file mode 100644 index 4f568a348c..0000000000 --- a/common/utils/itti/timer.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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.1 (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 - */ - -#ifndef TIMER_H_ -#define TIMER_H_ - -#include - -#define SIGTIMER SIGRTMIN - -typedef enum timer_type_s { - TIMER_PERIODIC, - TIMER_ONE_SHOT, - TIMER_TYPE_MAX, -} timer_type_t; - -int timer_handle_signal(siginfo_t *info); - -/** \brief Request a new timer - * \param interval_sec timer interval in seconds - * \param interval_us timer interval in micro seconds - * \param task_id task id of the task requesting the timer - * \param instance instance of the task requesting the timer - * \param type timer type - * \param timer_id unique timer identifier - * @returns -1 on failure, 0 otherwise - **/ -int timer_setup( - uint32_t interval_sec, - uint32_t interval_us, - task_id_t task_id, - int32_t instance, - timer_type_t type, - void *timer_arg, - long *timer_id); - -/** \brief Remove the timer from list - * \param timer_id unique timer id - * @returns -1 on failure, 0 otherwise - **/ - -int timer_remove(long timer_id); -#define timer_stop timer_remove - -/** \brief Initialize timer task and its API - * \param mme_config MME common configuration - * @returns -1 on failure, 0 otherwise - **/ -int timer_init(void); - -#endif diff --git a/common/utils/itti/timer_messages_def.h b/common/utils/itti/timer_messages_def.h deleted file mode 100644 index 761034730d..0000000000 --- a/common/utils/itti/timer_messages_def.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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.1 (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 - */ - -MESSAGE_DEF(TIMER_HAS_EXPIRED, MESSAGE_PRIORITY_MED_PLUS, timer_has_expired_t, timer_has_expired) diff --git a/common/utils/itti/timer_messages_types.h b/common/utils/itti/timer_messages_types.h deleted file mode 100644 index 0d06e3eebf..0000000000 --- a/common/utils/itti/timer_messages_types.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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.1 (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 - */ - -#ifndef TIMER_MESSAGES_TYPES_H_ -#define TIMER_MESSAGES_TYPES_H_ - -//-------------------------------------------------------------------------------------------// -// Defines to access message fields. -#define TIMER_HAS_EXPIRED(mSGpTR) (mSGpTR)->ittiMsg.timer_has_expired - -//-------------------------------------------------------------------------------------------// -typedef struct { - void *arg; - long timer_id; -} timer_has_expired_t; - -#endif /* TIMER_MESSAGES_TYPES_H_ */ diff --git a/common/utils/itti/memory_pools.c b/common/utils/memory_pools.c similarity index 100% rename from common/utils/itti/memory_pools.c rename to common/utils/memory_pools.c diff --git a/common/utils/itti/memory_pools.h b/common/utils/memory_pools.h similarity index 100% rename from common/utils/itti/memory_pools.h rename to common/utils/memory_pools.h diff --git a/common/utils/msc/msc.c b/common/utils/msc/msc.c index bb88b9b4b6..9e556a97de 100644 --- a/common/utils/msc/msc.c +++ b/common/utils/msc/msc.c @@ -34,7 +34,6 @@ #include "liblfds611.h" #include "intertask_interface.h" -#include "timer.h" #include "msc.h" #include "assertions.h" diff --git a/openair1/PHY/LTE_TRANSPORT/if5_tools.c b/openair1/PHY/LTE_TRANSPORT/if5_tools.c index 9f4ab3a580..77f060a433 100644 --- a/openair1/PHY/LTE_TRANSPORT/if5_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/if5_tools.c @@ -33,10 +33,10 @@ #include "PHY/defs_eNB.h" #include "PHY/TOOLS/alaw_lut.h" -#include "time_utils.h" //#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h" #include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h" +#include #include "common/utils/LOG/vcd_signal_dumper.h" //#define DEBUG_DL_MOBIPASS //#define DEBUG_UL_MOBIPASS diff --git a/openair1/PHY/defs_common.h b/openair1/PHY/defs_common.h index fce7f1b885..d0cc7e9ca4 100644 --- a/openair1/PHY/defs_common.h +++ b/openair1/PHY/defs_common.h @@ -33,7 +33,9 @@ #define __PHY_DEFS_COMMON_H__ +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #include #include #include diff --git a/openair1/SIMULATION/LTE_PHY/pucchsim.c b/openair1/SIMULATION/LTE_PHY/pucchsim.c index b9e059529b..ad236a6f75 100644 --- a/openair1/SIMULATION/LTE_PHY/pucchsim.c +++ b/openair1/SIMULATION/LTE_PHY/pucchsim.c @@ -30,7 +30,6 @@ #include "SCHED/defs.h" #include "SCHED/vars.h" #include "LAYER2/MAC/vars.h" -#include "intertask_interface_init.h" #include "OCG_vars.h" #include "UTIL/LOG/log_extern.h" diff --git a/openair2/COMMON/platform_types.h b/openair2/COMMON/platform_types.h index 3f736e5b3c..281092c2ca 100644 --- a/openair2/COMMON/platform_types.h +++ b/openair2/COMMON/platform_types.h @@ -34,9 +34,6 @@ #include #endif -#if defined(ENABLE_ITTI) -#include "itti_types.h" -#endif //----------------------------------------------------------------------------- // GENERIC TYPES //----------------------------------------------------------------------------- diff --git a/openair2/ENB_APP/enb_app.c b/openair2/ENB_APP/enb_app.c index 40c6aeac44..042d3fb395 100644 --- a/openair2/ENB_APP/enb_app.c +++ b/openair2/ENB_APP/enb_app.c @@ -39,7 +39,6 @@ #if defined(ENABLE_ITTI) # include "intertask_interface.h" -# include "timer.h" # if defined(ENABLE_USE_MME) # include "s1ap_eNB.h" # include "sctp_eNB_task.h" diff --git a/openair2/ENB_APP/enb_config.h b/openair2/ENB_APP/enb_config.h index 96156a4bc4..92a2447a38 100644 --- a/openair2/ENB_APP/enb_config.h +++ b/openair2/ENB_APP/enb_config.h @@ -46,7 +46,6 @@ #else #include "RRC/LTE/MESSAGES/SystemInformationBlockType2.h" #endif -#include "intertask_interface_types.h" #include "RRC/LTE/rrc_defs.h" #define IPV4_STR_ADDR_TO_INT_NWBO(AdDr_StR,NwBo,MeSsAgE ) do {\ diff --git a/openair2/ENB_APP/flexran_agent_common.h b/openair2/ENB_APP/flexran_agent_common.h index 057c5b9489..a43476fe4f 100644 --- a/openair2/ENB_APP/flexran_agent_common.h +++ b/openair2/ENB_APP/flexran_agent_common.h @@ -46,7 +46,6 @@ # include "tree.h" # include "intertask_interface.h" -# include "timer.h" #define FLEXRAN_VERSION 0 diff --git a/openair2/ENB_APP/flexran_agent_timer.h b/openair2/ENB_APP/flexran_agent_timer.h index 98d83c78a9..06443c14d1 100644 --- a/openair2/ENB_APP/flexran_agent_timer.h +++ b/openair2/ENB_APP/flexran_agent_timer.h @@ -37,7 +37,6 @@ # include "tree.h" # include "intertask_interface.h" -# include "timer.h" diff --git a/openair2/UTIL/MEM/mem_block.h b/openair2/UTIL/MEM/mem_block.h index a0455899e3..861e4a8ea4 100644 --- a/openair2/UTIL/MEM/mem_block.h +++ b/openair2/UTIL/MEM/mem_block.h @@ -32,12 +32,17 @@ # define __MEM_BLOCK_H__ #include +#include +#ifdef __cplusplus +extern "C" { +#endif #include "openair2/COMMON/platform_constants.h" //----------------------------------------------------------------------------- typedef struct mem_block_t { struct mem_block_t *next; struct mem_block_t *previous; + size_t size; unsigned char pool_id; unsigned char *data; } mem_block_t; @@ -175,5 +180,7 @@ typedef struct { mem_pool mem_block_var; - +#ifdef __cplusplus +} +#endif #endif diff --git a/openair3/GTPV1-U/gtpv1u_eNB.c b/openair3/GTPV1-U/gtpv1u_eNB.c index b9d81602c2..20c104ad1f 100644 --- a/openair3/GTPV1-U/gtpv1u_eNB.c +++ b/openair3/GTPV1-U/gtpv1u_eNB.c @@ -33,7 +33,6 @@ #include "assertions.h" #include "intertask_interface.h" -#include "timer.h" #include "msc.h" #include "gtpv1u.h" diff --git a/openair3/GTPV1-U/gtpv1u_eNB_task.h b/openair3/GTPV1-U/gtpv1u_eNB_task.h index 5a7822fe8c..6afea103ef 100644 --- a/openair3/GTPV1-U/gtpv1u_eNB_task.h +++ b/openair3/GTPV1-U/gtpv1u_eNB_task.h @@ -29,7 +29,6 @@ #ifndef GTPV1U_ENB_TASK_H_ #define GTPV1U_ENB_TASK_H_ -#include "messages_types.h" /* int diff --git a/openair3/GTPV1-U/gtpv1u_task.c b/openair3/GTPV1-U/gtpv1u_task.c index 287c22b7e7..e821885ab5 100644 --- a/openair3/GTPV1-U/gtpv1u_task.c +++ b/openair3/GTPV1-U/gtpv1u_task.c @@ -35,7 +35,6 @@ #include "assertions.h" #include "intertask_interface.h" -#include "timer.h" #include "gtpv1u.h" #include "NwGtpv1u.h" diff --git a/openair3/NAS/COMMON/UTIL/nas_timer.c b/openair3/NAS/COMMON/UTIL/nas_timer.c index 0b92ac4d9d..d92c48f483 100644 --- a/openair3/NAS/COMMON/UTIL/nas_timer.c +++ b/openair3/NAS/COMMON/UTIL/nas_timer.c @@ -46,7 +46,6 @@ Description Timer utilities #if defined(ENABLE_ITTI) # include "intertask_interface.h" -# include "timer.h" #else # include # include // clock_gettime diff --git a/openair3/TEST/EPC_TEST/play_scenario.c b/openair3/TEST/EPC_TEST/play_scenario.c index 9f922d8516..546878e576 100644 --- a/openair3/TEST/EPC_TEST/play_scenario.c +++ b/openair3/TEST/EPC_TEST/play_scenario.c @@ -46,8 +46,6 @@ #include -#include "intertask_interface_init.h" -#include "timer.h" #include "assertions.h" #include "s1ap_common.h" #include "intertask_interface.h" diff --git a/openair3/TEST/EPC_TEST/play_scenario_fsm.c b/openair3/TEST/EPC_TEST/play_scenario_fsm.c index 1589b83cae..a3963951dc 100644 --- a/openair3/TEST/EPC_TEST/play_scenario_fsm.c +++ b/openair3/TEST/EPC_TEST/play_scenario_fsm.c @@ -36,7 +36,6 @@ #include "play_scenario.h" #include "s1ap_ies_defs.h" #include "play_scenario_s1ap_eNB_defs.h" -#include "timer.h" //------------------------------------------------------------------------------ extern int g_max_speed; diff --git a/openair3/TEST/EPC_TEST/play_scenario_s1ap.c b/openair3/TEST/EPC_TEST/play_scenario_s1ap.c index 361b56100c..d2bf05c086 100644 --- a/openair3/TEST/EPC_TEST/play_scenario_s1ap.c +++ b/openair3/TEST/EPC_TEST/play_scenario_s1ap.c @@ -38,7 +38,6 @@ #include "intertask_interface.h" -#include "timer.h" #include "platform_types.h" #include "assertions.h" #include "conversions.h" diff --git a/openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c b/openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c index e0afbeb838..001834fcab 100644 --- a/openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c +++ b/openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c @@ -43,7 +43,6 @@ #include "intertask_interface.h" -#include "timer.h" #include "platform_types.h" #include "assertions.h" #include "conversions.h" diff --git a/openair3/TEST/oaisim_mme_itti_test.c b/openair3/TEST/oaisim_mme_itti_test.c index bf8ad44714..57cfd412ef 100644 --- a/openair3/TEST/oaisim_mme_itti_test.c +++ b/openair3/TEST/oaisim_mme_itti_test.c @@ -32,13 +32,12 @@ #include "mme_config.h" #include "gtpv1u_sgw_defs.h" -#include "intertask_interface_init.h" +#include "intertask_interface.h" #include "sctp_primitives_server.h" #include "udp_primitives_server.h" #include "s1ap_mme.h" #include "log.h" -#include "timer.h" #include "sgw_lite_defs.h" #include "ipv4_defs.h" diff --git a/openair3/TEST/oaisim_mme_test_s1c.c b/openair3/TEST/oaisim_mme_test_s1c.c index f006434b90..52623463c6 100644 --- a/openair3/TEST/oaisim_mme_test_s1c.c +++ b/openair3/TEST/oaisim_mme_test_s1c.c @@ -40,9 +40,7 @@ #include "UTIL/LOG/log_extern.h" #include "assertions.h" -#include "intertask_interface_init.h" #include "intertask_interface.h" -#include "timer.h" #include "sctp_eNB_task.h" #include "s1ap_eNB.h" #include "enb_config.h" diff --git a/openair3/UDP/udp_eNB_task.c b/openair3/UDP/udp_eNB_task.c index f61f614a14..fdcdeb037a 100644 --- a/openair3/UDP/udp_eNB_task.c +++ b/openair3/UDP/udp_eNB_task.c @@ -276,7 +276,7 @@ void udp_eNB_receiver(struct udp_socket_desc_s *udp_sock_pP) * if the queue is full. */ /* look for HACK_RLC_UM_LIMIT for others places related to the hack. Please do not remove this comment. */ - if (itti_try_send_msg_to_task(udp_sock_pP->task_id, INSTANCE_DEFAULT, message_p) < 0) { + if (itti_send_msg_to_task(udp_sock_pP->task_id, INSTANCE_DEFAULT, message_p) < 0) { LOG_E(UDP_, "Failed to send message %d to task %d\n", UDP_DATA_IND, udp_sock_pP->task_id); diff --git a/openair3/UDP/udp_eNB_task.h b/openair3/UDP/udp_eNB_task.h index 6585162125..8b783f7455 100644 --- a/openair3/UDP/udp_eNB_task.h +++ b/openair3/UDP/udp_eNB_task.h @@ -31,7 +31,6 @@ #ifndef UDP_ENB_TASK_H_ #define UDP_ENB_TASK_H_ #include "enb_config.h" -#include "intertask_interface_types.h" /** \brief UDP recv callback prototype. Will be called every time a payload is diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index de1a159c85..594ce2d3c7 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -33,7 +33,6 @@ #define _GNU_SOURCE #include -#include "time_utils.h" #undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 6c684a60aa..a7f1cfd1c7 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -83,7 +83,6 @@ unsigned short config_frames[4] = {2,9,11,13}; #endif #if defined(ENABLE_ITTI) -#include "intertask_interface_init.h" #include "create_tasks.h" #endif diff --git a/targets/RT/USER/lte-uesoftmodem.c b/targets/RT/USER/lte-uesoftmodem.c index 03283beb98..6a1199bf1a 100644 --- a/targets/RT/USER/lte-uesoftmodem.c +++ b/targets/RT/USER/lte-uesoftmodem.c @@ -84,7 +84,6 @@ #endif #if defined(ENABLE_ITTI) -#include "intertask_interface_init.h" #include "create_tasks.h" #endif From 0a9a636ceb89d22e26077594091d3ea14cfeae74 Mon Sep 17 00:00:00 2001 From: laurent Date: Mon, 6 Aug 2018 16:52:51 +0200 Subject: [PATCH 003/379] commit new itti code --- common/utils/ocp_itti/all_msg.h | 14 + common/utils/ocp_itti/intertask_interface.cpp | 394 +++++++++++++ common/utils/ocp_itti/intertask_interface.h | 536 ++++++++++++++++++ 3 files changed, 944 insertions(+) create mode 100644 common/utils/ocp_itti/all_msg.h create mode 100644 common/utils/ocp_itti/intertask_interface.cpp create mode 100644 common/utils/ocp_itti/intertask_interface.h diff --git a/common/utils/ocp_itti/all_msg.h b/common/utils/ocp_itti/all_msg.h new file mode 100644 index 0000000000..e296502909 --- /dev/null +++ b/common/utils/ocp_itti/all_msg.h @@ -0,0 +1,14 @@ +#include "openair2/COMMON/phy_messages_def.h" +#include "openair2/COMMON/mac_messages_def.h" +#include "openair2/COMMON/rlc_messages_def.h" +#include "openair2/COMMON/pdcp_messages_def.h" +#include "openair2/COMMON/rrc_messages_def.h" +#include "openair2/COMMON/nas_messages_def.h" +#if ENABLE_RAL + #include "openair2/COMMON/ral_messages_def.h" +#endif +#include "openair2/COMMON/s1ap_messages_def.h" +#include "openair2/COMMON/x2ap_messages_def.h" +#include "openair2/COMMON/sctp_messages_def.h" +#include "openair2/COMMON/udp_messages_def.h" +#include "openair2/COMMON/gtpv1_u_messages_def.h" diff --git a/common/utils/ocp_itti/intertask_interface.cpp b/common/utils/ocp_itti/intertask_interface.cpp new file mode 100644 index 0000000000..89353310b1 --- /dev/null +++ b/common/utils/ocp_itti/intertask_interface.cpp @@ -0,0 +1,394 @@ +/* + Author: Laurent THOMAS, Open Cells + copyleft: OpenAirInterface Software Alliance +*/ +#include +#include +#include + + +#include + +typedef struct timer_elm_s { + timer_type_t type; ///< Timer type + long instance; + long duration; + uint64_t timeout; + void *timer_arg; ///< Optional argument that will be passed when timer expires +} timer_elm_t ; + +typedef struct task_list_s { + task_info_t admin; + pthread_t thread; + pthread_mutex_t queue_cond_lock; + std::vector message_queue; + std::map timer_map; + uint64_t next_timer=UINT64_MAX; + struct epoll_event *events =NULL; + int nb_fd_epoll=0; + int nb_events=0; + int epoll_fd=-1; + int sem_fd=-1; +} task_list_t; + +int timer_expired(int fd); +task_list_t tasks[TASK_MAX]; + +extern "C" { + void *pool_buffer_init (void) { + return 0; + } + + void *pool_buffer_clean (void *arg) { + //----------------------------------------------------------------------------- + return 0; + } + + void free_mem_block (mem_block_t *leP, const char *caller) { + AssertFatal(leP!=NULL,""); + free(leP); + } + + mem_block_t *get_free_mem_block (uint32_t sizeP, const char *caller) { + mem_block_t *ptr=(mem_block_t *)malloc(sizeP+sizeof(mem_block_t)); + ptr->data=((unsigned char *)ptr)+sizeof(mem_block_t); + ptr->size=sizeP; + return ptr; + } + + void *itti_malloc(task_id_t origin_task_id, task_id_t destination_task_id, ssize_t size) { + void *ptr = NULL; + AssertFatal ((ptr=malloc (size)) != NULL, "Memory allocation of %zu bytes failed (%d -> %d)!\n", + size, origin_task_id, destination_task_id); + return ptr; + } + + int itti_free(task_id_t task_id, void *ptr) { + AssertFatal (ptr != NULL, "Trying to free a NULL pointer (%d)!\n", task_id); + free (ptr); + return (EXIT_SUCCESS); + } + + MessageDef *itti_alloc_new_message_sized(task_id_t origin_task_id, MessagesIds message_id, MessageHeaderSize size) { + MessageDef *temp = (MessageDef *)itti_malloc (origin_task_id, TASK_UNKNOWN, sizeof(MessageHeader) + size); + temp->ittiMsgHeader.messageId = message_id; + temp->ittiMsgHeader.originTaskId = origin_task_id; + temp->ittiMsgHeader.ittiMsgSize = size; + return temp; + } + + MessageDef *itti_alloc_new_message(task_id_t origin_task_id, MessagesIds message_id) { + int size=sizeof(MessageHeader) + messages_info[message_id].size; + MessageDef *temp = (MessageDef *)itti_malloc (origin_task_id, TASK_UNKNOWN, size); + temp->ittiMsgHeader.messageId = message_id; + temp->ittiMsgHeader.originTaskId = origin_task_id; + temp->ittiMsgHeader.ittiMsgSize = size; + return temp; + //return itti_alloc_new_message_sized(origin_task_id, message_id, messages_info[message_id].size); + } + + static inline int itti_send_msg_to_task_locked(task_id_t destination_task_id, instance_t instance, MessageDef *message) { + task_list_t *t=tasks+destination_task_id; + message->ittiMsgHeader.destinationTaskId = destination_task_id; + message->ittiMsgHeader.instance = instance; + message->ittiMsgHeader.lte_time.frame = 0; + message->ittiMsgHeader.lte_time.slot = 0; + int message_id = message->ittiMsgHeader.messageId; + size_t s=t->message_queue.size(); + + if ( s > t->admin.queue_size ) + LOG_E(TMR,"Queue for %s task contains %ld messages\n", itti_get_task_name(destination_task_id), s ); + + if ( s > 50 ) + LOG_I(TMR,"Queue for %s task size: %ld\n",itti_get_task_name(destination_task_id), s+1); + + t->message_queue.insert(t->message_queue.begin(), message); + eventfd_t sem_counter = 1; + AssertFatal ( sizeof(sem_counter) == write(t->sem_fd, &sem_counter, sizeof(sem_counter)), ""); + LOG_D(TMR,"sent messages id=%d to %s\n",message_id, t->admin.name); + return 0; + } + + int itti_send_msg_to_task(task_id_t destination_task_id, instance_t instance, MessageDef *message) { + task_list_t *t=&tasks[destination_task_id]; + pthread_mutex_lock (&t->queue_cond_lock); + int ret=itti_send_msg_to_task_locked(destination_task_id, instance, message); + pthread_mutex_unlock (&t->queue_cond_lock); + + while ( t->message_queue.size()>0 && t->admin.func != NULL ) + t->admin.func(NULL); + + return ret; + } + + void itti_subscribe_event_fd(task_id_t task_id, int fd) { + struct epoll_event event; + task_list_t *t=&tasks[task_id]; + t->nb_fd_epoll++; + t->events = (struct epoll_event *)realloc((void *)t->events, + t->nb_fd_epoll * sizeof(struct epoll_event)); + event.events = EPOLLIN | EPOLLERR; + event.data.u64 = 0; + event.data.fd = fd; + AssertFatal(epoll_ctl(t->epoll_fd, EPOLL_CTL_ADD, fd, &event) == 0, + "epoll_ctl (EPOLL_CTL_ADD) failed for task %s, fd %d: %s!\n", + itti_get_task_name(task_id), fd, strerror(errno)); + } + + void itti_unsubscribe_event_fd(task_id_t task_id, int fd) { + task_list_t *t=&tasks[task_id]; + AssertFatal (epoll_ctl(t->epoll_fd, EPOLL_CTL_DEL, fd, NULL) == 0, + "epoll_ctl (EPOLL_CTL_DEL) failed for task %s, fd %d: %s!\n", + itti_get_task_name(task_id), fd, strerror(errno)); + t->nb_fd_epoll--; + } + + static inline int itti_get_events_locked(task_id_t task_id, struct epoll_event **events) { + task_list_t *t=&tasks[task_id]; + uint64_t current_time=0; + + do { + if ( t->next_timer != UINT64_MAX ) { + struct timespec tp; + clock_gettime(CLOCK_MONOTONIC, &tp); + current_time=(uint64_t)tp.tv_sec*1000+tp.tv_nsec/(1000*1000); + + if ( t->next_timer < current_time) { + t->next_timer=UINT64_MAX; + + // Proceed expired timer + for ( auto it=t->timer_map.begin() ; it != t->timer_map.end() ; ++it ) { + if ( it->second.timeout < current_time ) { + MessageDef *message = itti_alloc_new_message(TASK_TIMER, TIMER_HAS_EXPIRED); + message->ittiMsg.timer_has_expired.timer_id=it->first; + message->ittiMsg.timer_has_expired.arg=it->second.timer_arg; + + if (itti_send_msg_to_task_locked(task_id, it->second.instance, message) < 0) { + LOG_W(TMR,"Failed to send msg TIMER_HAS_EXPIRED to task %u\n", task_id); + free(message); + t->timer_map.erase(it); + return -1; + } + + if ( it->second.type==TIMER_PERIODIC ) { + it->second.timeout+=it->second.duration; + + if (it->second.timeout < t->next_timer) + t->next_timer=it->second.timeout; + } else + t->timer_map.erase(it); + } else if (it->second.timeout < t->next_timer) + t->next_timer=it->second.timeout; + } + } + } + + int epoll_timeout = -1; + + if ( t->next_timer != UINT64_MAX ) + epoll_timeout = t->next_timer-current_time; + + pthread_mutex_unlock(&t->queue_cond_lock); + LOG_D(TMR,"enter blocking wait for %s\n", itti_get_task_name(task_id)); + t->nb_events = epoll_wait(t->epoll_fd,t->events,t->nb_fd_epoll, epoll_timeout); + } while (t->nb_events < 0 && (errno == EINTR || errno == EAGAIN ) ); + + AssertFatal (t->nb_events >=0, + "epoll_wait failed for task %s, nb fds %d, timeout %lu: %s!\n", + itti_get_task_name(task_id), t->nb_fd_epoll, t->next_timer != UINT64_MAX ? t->next_timer-current_time : -1, strerror(errno)); + LOG_D(TMR,"receive on %d descriptors for %s\n", t->nb_events, itti_get_task_name(task_id)); + + if (t->nb_events == 0) + /* No data to read -> return */ + return 0; + + for (int i = 0; i < t->nb_events; i++) { + /* Check if there is an event for ITTI for the event fd */ + if ((t->events[i].events & EPOLLIN) && + (t->events[i].data.fd == t->sem_fd)) { + eventfd_t sem_counter; + /* Read will always return 1 */ + AssertFatal( sizeof(sem_counter) == read (t->sem_fd, &sem_counter, sizeof(sem_counter)), ""); + /* Mark that the event has been processed */ + t->events[i].events &= ~EPOLLIN; + } + } + + *events = t->events; + return t->nb_events; + } + + int itti_get_events(task_id_t task_id, struct epoll_event **events) { + pthread_mutex_lock(&tasks[task_id].queue_cond_lock); + return itti_get_events_locked(task_id, events); + } + + void itti_receive_msg(task_id_t task_id, MessageDef **received_msg) { + // Reception of one message, blocking caller + task_list_t *t=&tasks[task_id]; + pthread_mutex_lock(&t->queue_cond_lock); + + // Weird condition to deal with crap legacy itti interface + if ( t->nb_fd_epoll == 1 ) { + while (t->message_queue.empty()) { + itti_get_events_locked(task_id, &t->events); + pthread_mutex_lock(&t->queue_cond_lock); + } + } else { + if (t->message_queue.empty()) { + itti_get_events_locked(task_id, &t->events); + pthread_mutex_lock(&t->queue_cond_lock); + } + } + + // Legacy design: we return even if we have no message + // in this case, *received_msg is NULL + if (t->message_queue.empty()) { + *received_msg=NULL; + LOG_D(TMR,"task %s received even from other fd (total fds: %d), returning msg NULL\n",t->admin.name, t->nb_fd_epoll); + } else { + *received_msg=t->message_queue.back(); + t->message_queue.pop_back(); + LOG_D(TMR,"task %s received a message\n",t->admin.name); + } + + pthread_mutex_unlock (&t->queue_cond_lock); + } + + void itti_poll_msg(task_id_t task_id, MessageDef **received_msg) { + //reception of one message, non-blocking + task_list_t *t=&tasks[task_id]; + pthread_mutex_lock(&t->queue_cond_lock); + + if (!t->message_queue.empty()) { + LOG_D(TMR,"task %s received a message in polling mode\n",t->admin.name); + *received_msg=t->message_queue.back(); + t->message_queue.pop_back(); + } else + *received_msg=NULL; + + pthread_mutex_unlock (&t->queue_cond_lock); + } + + int itti_create_task(task_id_t task_id, void *(*start_routine)(void *), void *args_p) { + task_list_t *t=&tasks[task_id]; + AssertFatal ( pthread_create (&t->thread, NULL, start_routine, args_p) ==0, + "Thread creation for task %d failed!\n", task_id); + pthread_setname_np( t->thread, itti_get_task_name(task_id) ); + LOG_I(TMR,"Created Posix thread %s\n", itti_get_task_name(task_id) ); + return 0; + } + + void itti_exit_task(void) { + pthread_exit (NULL); + } + + void itti_terminate_tasks(task_id_t task_id) { + // Sends Terminate signals to all tasks. + itti_send_terminate_message (task_id); + pthread_exit (NULL); + } + + int itti_init(task_id_t task_max, thread_id_t thread_max, MessagesIds messages_id_max, const task_info_t *tasks_info, + const message_info_t *messages_info) { + AssertFatal(TASK_MAX=0, ""); + AssertFatal( ( tasks[i].sem_fd = eventfd(0, EFD_SEMAPHORE) ) >=0, ""); + itti_subscribe_event_fd((task_id_t)i, tasks[i].sem_fd); + + if (tasks[i].admin.threadFunc != NULL) + itti_create_task((task_id_t)i, tasks[i].admin.threadFunc, NULL); + } + + return 0; + } + + int timer_setup( + uint32_t interval_sec, + uint32_t interval_us, + task_id_t task_id, + int32_t instance, + timer_type_t type, + void *timer_arg, + long *timer_id) { + task_list_t *t=&tasks[task_id]; + + do { + // set the taskid in the timer id to keep compatible with the legacy API + // timer_remove() takes only the timer id as parameter + *timer_id=(random()%UINT16_MAX) << 16 | task_id ; + } while ( t->timer_map.find(*timer_id) != t->timer_map.end()); + + /* Allocate new timer list element */ + timer_elm_t timer; + struct timespec tp; + clock_gettime(CLOCK_MONOTONIC, &tp); + + if (interval_us%1000 != 0) + LOG_W(TMR, "Can't set timer precision below 1ms, rounding it\n"); + + timer.duration = interval_sec*1000+interval_us/1000; + timer.timeout= ((uint64_t)tp.tv_sec*1000+tp.tv_nsec/(1000*1000)+timer.duration); + timer.instance = instance; + timer.type = type; + timer.timer_arg = timer_arg; + pthread_mutex_lock (&t->queue_cond_lock); + t->timer_map[*timer_id]= timer; + + if (timer.timeout < t->next_timer) + t->next_timer=timer.timeout; + + eventfd_t sem_counter = 1; + AssertFatal ( sizeof(sem_counter) == write(t->sem_fd, &sem_counter, sizeof(sem_counter)), ""); + pthread_mutex_unlock (&t->queue_cond_lock); + return 0; + } + + int timer_remove(long timer_id) { + task_id_t task_id=(task_id_t)(timer_id&0xffff); + int ret; + pthread_mutex_lock (&tasks[task_id].queue_cond_lock); + ret=tasks[task_id].timer_map.erase(timer_id); + pthread_mutex_unlock (&tasks[task_id].queue_cond_lock); + + if (ret==1) + return 0; + else { + LOG_W(TMR, "tried to remove a non existing timer\n"); + return 1; + } + } + + const char *itti_get_message_name(MessagesIds message_id) { + return messages_info[message_id].name; + } + + const char *itti_get_task_name(task_id_t task_id) { + return tasks[task_id].admin.name; + } + + // void for compatibility + void itti_send_terminate_message(task_id_t task_id) { + } + + void itti_wait_tasks_end(void) { + while(1) + sleep(24*3600); + } + + void itti_update_lte_time(uint32_t frame, uint8_t slot) {} + void itti_set_task_real_time(task_id_t task_id) {} + void itti_mark_task_ready(task_id_t task_id) { + // Function meaning is clear, but legacy implementation is wrong + // keep it void is fine: today implementation accepts messages in the queue before task is ready + } + void itti_wait_ready(int wait_tasks) { + // Stupid function, kept for compatibility (the parameter is meaningless!!!) + } + int signal_mask(void) { return 0;} +} diff --git a/common/utils/ocp_itti/intertask_interface.h b/common/utils/ocp_itti/intertask_interface.h new file mode 100644 index 0000000000..4a8402716b --- /dev/null +++ b/common/utils/ocp_itti/intertask_interface.h @@ -0,0 +1,536 @@ +/* + Author: Laurent THOMAS, Open Cells + Copyleft: OpenAirInterface software alliance +*/ +#ifndef INTERTASK_INTERFACE_H_ +#define INTERTASK_INTERFACE_H_ +#include +#include + +#include +#include + + +typedef enum timer_type_s { + TIMER_PERIODIC, + TIMER_ONE_SHOT, + TIMER_TYPE_MAX, +} timer_type_t; + +typedef struct { + void *arg; + long timer_id; +} timer_has_expired_t; + +typedef struct { + uint32_t interval_sec; + uint32_t interval_us; + long task_id; + int32_t instance; + timer_type_t type; + void *timer_arg; + long timer_id; +} timer_create_t; + +typedef struct { + long task_id; + long timer_id; +} timer_delete_t; + + +typedef struct itti_lte_time_s { + uint32_t frame; + uint8_t slot; +} itti_lte_time_t; + + +typedef struct IttiMsgEmpty_s { +} IttiMsgEmpty; + +typedef struct IttiMsgText_s { + uint32_t size; + char text[]; +} IttiMsgText; + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#if ENABLE_RAL + #include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include + +/* + static const char *const messages_definition_xml = { + #include + }; +*/ + +typedef uint32_t MessageHeaderSize; +typedef uint32_t itti_message_types_t; +typedef unsigned long message_number_t; +#define MESSAGE_NUMBER_SIZE (sizeof(unsigned long)) + +typedef enum task_priorities_e { + TASK_PRIORITY_MAX = 100, + TASK_PRIORITY_MAX_LEAST = 85, + TASK_PRIORITY_MED_PLUS = 70, + TASK_PRIORITY_MED = 55, + TASK_PRIORITY_MED_LEAST = 40, + TASK_PRIORITY_MIN_PLUS = 25, + TASK_PRIORITY_MIN = 10, +} task_priorities_t; + +typedef struct { + task_priorities_t priority; + unsigned int queue_size; + /* Printable name */ + char name[256]; + void *(*func)(void *) ; + void *(*threadFunc)(void *) ; +} task_info_t; +// +//TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200, NULL,NULL) +//TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) +//TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000,NULL, NULL) +//TASK_DEF(TASK_UDP, TASK_PRIORITY_MED, 1000, NULL, NULL) + +#define FOREACH_TASK(TASK_DEF) \ + TASK_DEF(TASK_UNKNOWN, TASK_PRIORITY_MED, 50, NULL, NULL) \ + TASK_DEF(TASK_TIMER, TASK_PRIORITY_MED, 10, NULL, NULL) \ + TASK_DEF(TASK_L2L1, TASK_PRIORITY_MAX, 200, NULL, NULL) \ + TASK_DEF(TASK_BM, TASK_PRIORITY_MED, 200, NULL, NULL) \ + TASK_DEF(TASK_PHY_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \ + TASK_DEF(TASK_MAC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \ + TASK_DEF(TASK_RLC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \ + TASK_DEF(TASK_RRC_ENB_NB_IoT, TASK_PRIORITY_MED, 200, NULL, NULL) \ + TASK_DEF(TASK_PDCP_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \ + TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200, NULL,NULL)\ + TASK_DEF(TASK_RAL_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \ + TASK_DEF(TASK_S1AP, TASK_PRIORITY_MED, 200, NULL, NULL) \ + TASK_DEF(TASK_X2AP, TASK_PRIORITY_MED, 200, NULL, NULL) \ + TASK_DEF(TASK_SCTP, TASK_PRIORITY_MED, 200, NULL, NULL) \ + TASK_DEF(TASK_ENB_APP, TASK_PRIORITY_MED, 200, NULL, NULL) \ + TASK_DEF(TASK_FLEXRAN_AGENT,TASK_PRIORITY_MED, 200, NULL, NULL) \ + TASK_DEF(TASK_PHY_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \ + TASK_DEF(TASK_MAC_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \ + TASK_DEF(TASK_RLC_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \ + TASK_DEF(TASK_PDCP_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \ + TASK_DEF(TASK_RRC_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \ + TASK_DEF(TASK_NAS_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \ + TASK_DEF(TASK_RAL_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \ + TASK_DEF(TASK_MSC, TASK_PRIORITY_MED, 200, NULL, NULL)\ + TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000,NULL, NULL)\ + TASK_DEF(TASK_UDP, TASK_PRIORITY_MED, 1000, NULL, NULL)\ + TASK_DEF(TASK_MAX, TASK_PRIORITY_MED, 200, NULL, NULL) + +#define TASK_DEF(TaskID, pRIO, qUEUEsIZE, FuNc, ThreadFunc) { pRIO, qUEUEsIZE, #TaskID, FuNc, ThreadFunc }, + +/* Map task id to printable name. */ +static const task_info_t tasks_info[] = { + FOREACH_TASK(TASK_DEF) +}; + +#define TASK_ENUM(TaskID, pRIO, qUEUEsIZE, FuNc,ThreadFunc ) TaskID, +//! Tasks id of each task +typedef enum { + FOREACH_TASK(TASK_ENUM) +} task_id_t; + + +typedef task_id_t thread_id_t; + +typedef enum message_priorities_e { + MESSAGE_PRIORITY_MAX = 100, + MESSAGE_PRIORITY_MAX_LEAST = 85, + MESSAGE_PRIORITY_MED_PLUS = 70, + MESSAGE_PRIORITY_MED = 55, + MESSAGE_PRIORITY_MED_LEAST = 40, + MESSAGE_PRIORITY_MIN_PLUS = 25, + MESSAGE_PRIORITY_MIN = 10, +} message_priorities_t; + + +#define FOREACH_MSG(INTERNAL_MSG) \ + INTERNAL_MSG(TIMER_HAS_EXPIRED, MESSAGE_PRIORITY_MED, timer_has_expired_t, timer_has_expired) \ + INTERNAL_MSG(INITIALIZE_MESSAGE, MESSAGE_PRIORITY_MED, IttiMsgEmpty, initialize_message) \ + INTERNAL_MSG(ACTIVATE_MESSAGE, MESSAGE_PRIORITY_MED, IttiMsgEmpty, activate_message) \ + INTERNAL_MSG(DEACTIVATE_MESSAGE, MESSAGE_PRIORITY_MED, IttiMsgEmpty, deactivate_message) \ + INTERNAL_MSG(TERMINATE_MESSAGE, MESSAGE_PRIORITY_MAX, IttiMsgEmpty, terminate_message) \ + INTERNAL_MSG(MESSAGE_TEST, MESSAGE_PRIORITY_MED, IttiMsgEmpty, message_test) + +/* This enum defines messages ids. Each one is unique. */ +typedef enum { +#define MESSAGE_DEF(iD, pRIO, sTRUCT, fIELDnAME) iD, + FOREACH_MSG(MESSAGE_DEF) +#include +#undef MESSAGE_DEF + MESSAGES_ID_MAX, +} MessagesIds; + +typedef union msg_s { +#define MESSAGE_DEF(iD, pRIO, sTRUCT, fIELDnAME) sTRUCT fIELDnAME; + FOREACH_MSG(MESSAGE_DEF) +#include +#undef MESSAGE_DEF +} msg_t; + +typedef struct MessageHeader_s { + MessagesIds messageId; /**< Unique message id as referenced in enum MessagesIds */ + task_id_t originTaskId; /**< ID of the sender task */ + task_id_t destinationTaskId; /**< ID of the destination task */ + instance_t instance; /**< Task instance for virtualization */ + itti_lte_time_t lte_time; + MessageHeaderSize ittiMsgSize; /**< Message size (not including header size) */ +} MessageHeader; + +typedef struct message_info_s { + int id; + message_priorities_t priority; + /* Message payload size */ + MessageHeaderSize size; + /* Printable name */ + const char name[256]; +} message_info_t; + +/* Map message id to message information */ +static const message_info_t messages_info[] = { +#define MESSAGE_DEF(iD, pRIO, sTRUCT, fIELDnAME) { iD, pRIO, sizeof(sTRUCT), #iD }, + FOREACH_MSG(MESSAGE_DEF) +#include +#undef MESSAGE_DEF +}; + +typedef struct __attribute__ ((__packed__)) MessageDef_s { + MessageHeader ittiMsgHeader; /**< Message header */ + msg_t ittiMsg; +} MessageDef; + + + +/* Extract the instance from a message */ +#define ITTI_MESSAGE_GET_INSTANCE(mESSAGE) ((mESSAGE)->ittiMsgHeader.instance) +#define ITTI_MSG_ID(mSGpTR) ((mSGpTR)->ittiMsgHeader.messageId) +#define ITTI_MSG_ORIGIN_ID(mSGpTR) ((mSGpTR)->ittiMsgHeader.originTaskId) +#define ITTI_MSG_DESTINATION_ID(mSGpTR) ((mSGpTR)->ittiMsgHeader.destinationTaskId) +#define ITTI_MSG_INSTANCE(mSGpTR) ((mSGpTR)->ittiMsgHeader.instance) +#define ITTI_MSG_NAME(mSGpTR) itti_get_message_name(ITTI_MSG_ID(mSGpTR)) +#define ITTI_MSG_ORIGIN_NAME(mSGpTR) itti_get_task_name(ITTI_MSG_ORIGIN_ID(mSGpTR)) +#define ITTI_MSG_DESTINATION_NAME(mSGpTR) itti_get_task_name(ITTI_MSG_DESTINATION_ID(mSGpTR)) +#define TIMER_HAS_EXPIRED(mSGpTR) (mSGpTR)->ittiMsg.timer_has_expired + +#define INSTANCE_DEFAULT (UINT16_MAX - 1) + +static inline int64_t clock_difftime_ns(struct timespec start, struct timespec end) { + return (int64_t)( end.tv_sec-start.tv_sec) * (int64_t)(1000*1000*1000) + end.tv_nsec-start.tv_nsec; +} + +#ifdef __cplusplus +extern "C" { +#endif + +/** \brief Send a message to a task (could be itself) + \param task_id Task ID + \param instance Instance of the task used for virtualization + \param message Pointer to the message to send + @returns -1 on failure, 0 otherwise + **/ +int itti_send_msg_to_task(task_id_t task_id, instance_t instance, MessageDef *message); + +/** \brief Add a new fd to monitor. + NOTE: it is up to the user to read data associated with the fd + \param task_id Task ID of the receiving task + \param fd The file descriptor to monitor + **/ +void itti_subscribe_event_fd(task_id_t task_id, int fd); + +/** \brief Remove a fd from the list of fd to monitor + \param task_id Task ID of the task + \param fd The file descriptor to remove + **/ +void itti_unsubscribe_event_fd(task_id_t task_id, int fd); + +/** \brief Return the list of events excluding the fd associated with itti + \param task_id Task ID of the task + \param events events list + @returns number of events to handle + **/ +int itti_get_events(task_id_t task_id, struct epoll_event **events); + +/** \brief Retrieves a message in the queue associated to task_id. + If the queue is empty, the thread is blocked till a new message arrives. + \param task_id Task ID of the receiving task + \param received_msg Pointer to the allocated message + **/ +void itti_receive_msg(task_id_t task_id, MessageDef **received_msg); + +/** \brief Try to retrieves a message in the queue associated to task_id. + \param task_id Task ID of the receiving task + \param received_msg Pointer to the allocated message + **/ +void itti_poll_msg(task_id_t task_id, MessageDef **received_msg); + +/** \brief Start thread associated to the task + \param task_id task to start + \param start_routine entry point for the task + \param args_p Optional argument to pass to the start routine + @returns -1 on failure, 0 otherwise + **/ +int itti_create_task(task_id_t task_id, + void *(*start_routine) (void *), + void *args_p); + +/** \brief Exit the current task. + **/ +void itti_exit_task(void); + +/** \brief Initiate termination of all tasks. + \param task_id task that is completed + **/ +void itti_terminate_tasks(task_id_t task_id); + +// Void for legacy compatibility +void itti_wait_ready(int wait_tasks); +void itti_mark_task_ready(task_id_t task_id); + +/** \brief Return the printable string associated with the message + \param message_id Id of the message + **/ +const char *itti_get_message_name(MessagesIds message_id); + +/** \brief Return the printable string associated with a task id + \param thread_id Id of the task + **/ +const char *itti_get_task_name(task_id_t task_id); + +/** \brief Alloc and memset(0) a new itti message. + \param origin_task_id Task ID of the sending task + \param message_id Message ID + @returns NULL in case of failure or newly allocated mesage ref + **/ +MessageDef *itti_alloc_new_message( + task_id_t origin_task_id, + MessagesIds message_id); + +/** \brief Alloc and memset(0) a new itti message. + \param origin_task_id Task ID of the sending task + \param message_id Message ID + \param size size of the payload to send + @returns NULL in case of failure or newly allocated mesage ref + **/ +MessageDef *itti_alloc_new_message_sized( + task_id_t origin_task_id, + MessagesIds message_id, + MessageHeaderSize size); + +/** \brief handle signals and wait for all threads to join when the process complete. + This function should be called from the main thread after having created all ITTI tasks. + **/ +void itti_wait_tasks_end(void); +#define THREAD_MAX 0 //for compatibility +void itti_set_task_real_time(task_id_t task_id); + +/** \brief Send a termination message to all tasks. + \param task_id task that is broadcasting the message. + **/ +void itti_send_terminate_message(task_id_t task_id); + +void *itti_malloc(task_id_t origin_task_id, task_id_t destination_task_id, ssize_t size); +void *calloc_or_fail(size_t size); +void *malloc_or_fail(size_t size); +int memory_read(const char *datafile, void *data, size_t size); +int itti_free(task_id_t task_id, void *ptr); + +int itti_init(task_id_t task_max, thread_id_t thread_max, MessagesIds messages_id_max, const task_info_t *tasks_info, + const message_info_t *messages_info); +int timer_setup( + uint32_t interval_sec, + uint32_t interval_us, + task_id_t task_id, + int32_t instance, + timer_type_t type, + void *timer_arg, + long *timer_id); + + +int timer_remove(long timer_id); +#define timer_stop timer_remove +int signal_handle(int *end); + +#ifdef __cplusplus +} +#endif +#endif /* INTERTASK_INTERFACE_H_ */ From 1603e99d7ef4cb7fc4b47a21f39691dcc25e9db4 Mon Sep 17 00:00:00 2001 From: laurent Date: Mon, 6 Aug 2018 17:54:34 +0200 Subject: [PATCH 004/379] fix other targets after CI trial --- cmake_targets/CMakeLists.txt | 3 +++ openair2/ENB_APP/enb_config.h | 1 + 2 files changed, 4 insertions(+) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 666caeb828..bb06364f10 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -747,6 +747,9 @@ include_directories("${OPENAIR3_DIR}/NAS/COMMON") include_directories("${OPENAIR3_DIR}/NAS/COMMON/API/NETWORK") include_directories("${OPENAIR3_DIR}/NAS/COMMON/EMM/MSG") include_directories("${OPENAIR3_DIR}/NAS/COMMON/ESM/MSG") +include_directories("${OPENAIR3_DIR}/NAS/UE/ESM") +include_directories("${OPENAIR3_DIR}/NAS/UE/EMM") +include_directories("${OPENAIR3_DIR}/NAS/UE/API/USER") include_directories("${OPENAIR3_DIR}/NAS/COMMON/IES") include_directories("${OPENAIR3_DIR}/NAS/COMMON/UTIL") include_directories("${OPENAIR3_DIR}/SECU") diff --git a/openair2/ENB_APP/enb_config.h b/openair2/ENB_APP/enb_config.h index 92a2447a38..6e89ec8fcc 100644 --- a/openair2/ENB_APP/enb_config.h +++ b/openair2/ENB_APP/enb_config.h @@ -47,6 +47,7 @@ #include "RRC/LTE/MESSAGES/SystemInformationBlockType2.h" #endif #include "RRC/LTE/rrc_defs.h" +#include #define IPV4_STR_ADDR_TO_INT_NWBO(AdDr_StR,NwBo,MeSsAgE ) do {\ struct in_addr inp;\ From 9dcade262c670a365417c0c5f413a1ed98e85874 Mon Sep 17 00:00:00 2001 From: laurent Date: Thu, 9 Aug 2018 18:13:09 +0200 Subject: [PATCH 005/379] generate sss tables --- cmake_targets/CMakeLists.txt | 2 + openair1/PHY/LTE_TRANSPORT/sss.h | 25 ------- openair1/PHY/LTE_TRANSPORT/sss_gen.c | 68 +++++++++++++++++++ openair1/PHY/LTE_TRANSPORT/sss_gen.m | 53 --------------- openair1/PHY/LTE_TRANSPORT/transport_extern.h | 2 +- openair1/PHY/LTE_TRANSPORT/transport_vars.h | 1 - 6 files changed, 71 insertions(+), 80 deletions(-) delete mode 100644 openair1/PHY/LTE_TRANSPORT/sss.h create mode 100644 openair1/PHY/LTE_TRANSPORT/sss_gen.c delete mode 100644 openair1/PHY/LTE_TRANSPORT/sss_gen.m diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 17e2072d00..ad88626a0f 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -1108,6 +1108,7 @@ set(PHY_SRC # actual source ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pss.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sss.c + ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sss_gen.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pilots.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pilots_mbsfn.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_coding.c @@ -1147,6 +1148,7 @@ set(PHY_SRC_RU set(PHY_SRC_UE # actual source ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/sss_ue.c + ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sss_gen.c ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation.c ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/linear_preprocessing_rec.c diff --git a/openair1/PHY/LTE_TRANSPORT/sss.h b/openair1/PHY/LTE_TRANSPORT/sss.h deleted file mode 100644 index 6d42acaefc..0000000000 --- a/openair1/PHY/LTE_TRANSPORT/sss.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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.1 (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 - */ - -int16_t d0_sss[504*62] = {1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1}; - -int16_t d5_sss[504*62] = {1,1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1}; - diff --git a/openair1/PHY/LTE_TRANSPORT/sss_gen.c b/openair1/PHY/LTE_TRANSPORT/sss_gen.c new file mode 100644 index 0000000000..9a0a947ca9 --- /dev/null +++ b/openair1/PHY/LTE_TRANSPORT/sss_gen.c @@ -0,0 +1,68 @@ +#include +#include +#include +#include +#include +#include + +int16_t *d0_sss; +int16_t *d5_sss; + +#define MyAssert(x) { if(!(x)) { printf("Error in table intialization: %s:%d\n",__FILE__,__LINE__); exit(1);}} +#define gen(table, formula) { \ + int x[31]= {0}; \ + x[4]=1; \ + for(int i=0; i<26; i++) \ + x[i+5]=formula; \ + for (int i=0; i<31; i++) \ + table[i]=1-2*x[i]; \ +} + +#define mod31(a) (a)%31 +#define mod2(a) (a)%2 +#define mod8(a) (a)%8 +__attribute__((constructor)) static void init_sss(void) { + MyAssert(0==posix_memalign((void **)&d0_sss, 16,504*31*2*sizeof(*d0_sss))); + MyAssert(0==posix_memalign((void **)&d5_sss, 16,504*31*2*sizeof(*d5_sss))); + int s[31]; + gen(s, mod2(x[i+2]+x[i])); + int z[31]; + gen(z, mod2(x[i+4]+x[i+2]+x[i+1]+x[i])); + int c[31]; + gen(c, mod2(x[i+3]+x[i])); + + for (int Nid2=0; Nid2<3; Nid2++) { + for (int Nid1=0; Nid1<168; Nid1++) { + int qprime = Nid1/30; + int q = (Nid1+(qprime*(qprime+1))/2)/30; + int mprime = Nid1 + q*(q+1)/2; + int m0 = mprime%31; + int m1 = (m0+mprime/31+1)%31; + int rowIndex=(Nid2+3*Nid1)*31*2; + for (int i=0; i<31; i++) { + d0_sss[rowIndex+i*2]= s[mod31(i+m0)] * c[mod31(i+Nid2)]; + d5_sss[rowIndex+i*2]= s[mod31(i+m1)] * c[mod31(i+Nid2)]; + d0_sss[rowIndex+i*2+1]= s[mod31(i+m1)] * c[mod31(i+Nid2+3)] * z[mod31(i+mod8(m0))]; + d5_sss[rowIndex+i*2+1]= s[mod31(i+m0)] * c[mod31(i+Nid2+3)] * z[mod31(i+mod8(m1))]; + } + } + } +} + +#ifdef SSS_TABLES_TEST +void main () { + printf("int16_t d0_sss[504*62] = {"); + + for (int i=0; i<504*62; i++) + printf("%d,\n",d0_sss[i]); + + printf("};\n\n"); + printf("int16_t d5_sss[504*62] = {"); + + for (int i=0; i<504*62; i++) + printf("%d,\n",d5_sss[i]); + + printf("};\n\n"); + +} +#endif diff --git a/openair1/PHY/LTE_TRANSPORT/sss_gen.m b/openair1/PHY/LTE_TRANSPORT/sss_gen.m deleted file mode 100644 index 65e5a5a0a1..0000000000 --- a/openair1/PHY/LTE_TRANSPORT/sss_gen.m +++ /dev/null @@ -1,53 +0,0 @@ -% generate s -x = zeros(1,30); -x(1:5) = [0 0 0 0 1]; -for i=1:26 - x(i+5) = rem(x(i+2) + x(i),2); -end -s = 1 - 2*x; - -% generate z -x = zeros(1,30); -x(1:5) = [0 0 0 0 1]; -for i=1:26 - x(i+5) = rem(x(i+4)+ x(i+2) + x(i+1) + x(i),2); -end -z = 1 - 2*x; -% generate c -x = zeros(1,30); -x(1:5) = [0 0 0 0 1]; -for i=1:26 - x(i+5) = rem(x(i+3) + x(i),2); -end -c = 1 - 2*x; -d0 = zeros(504,62); -d5 = zeros(504,62); -for Nid2=0:2, - c0 = [c((1+Nid2) : end) c(1:Nid2)]; - c1 = [c((4+Nid2) : end) c(1:(3+Nid2))]; - for Nid1=0:167, - qprime = floor(Nid1/30); - q = floor((Nid1+qprime*(qprime+1)/2)/30); - mprime = Nid1 + q*(q+1)/2; - m0 = rem(mprime,31); - m1 = rem(m0+floor(mprime/31)+1,31); - sm0 = [s((1+m0) : end) s(1:m0)]; - sm1 = [s((1+m1) : end) s(1:m1)]; - m0mod8 = rem(m0,8); - m1mod8 = rem(m1,8); - zm0 = [z((1+m0mod8) : end) z(1:m0mod8)]; - zm1 = [z((1+m1mod8) : end) z(1:m1mod8)]; - d0(1+Nid2+(3*Nid1),1:2:62) = sm0.*c0; - d5(1+Nid2+(3*Nid1),1:2:62) = sm1.*c0; - d0(1+Nid2+(3*Nid1),2:2:62) = sm1.*c1.*zm0; - d5(1+Nid2+(3*Nid1),2:2:62) = sm0.*c1.*zm1; - end -end -fd = fopen("sss.h","w"); -fprintf(fd,"s16 d0_sss[504*62] = {"); -fprintf(fd,"%d,",d0); -fprintf(fd,"};\n\n"); -fprintf(fd,"s16 d5_sss[504*62] = {"); -fprintf(fd,"%d,",d5); -fprintf(fd,"};\n\n"); -fclose(fd); \ No newline at end of file diff --git a/openair1/PHY/LTE_TRANSPORT/transport_extern.h b/openair1/PHY/LTE_TRANSPORT/transport_extern.h index 6a9fa49405..04b69d9402 100644 --- a/openair1/PHY/LTE_TRANSPORT/transport_extern.h +++ b/openair1/PHY/LTE_TRANSPORT/transport_extern.h @@ -44,7 +44,7 @@ extern unsigned short scfdma_amps[26]; extern char dci_format_strings[15][13]; -extern int16_t d0_sss[504*62],d5_sss[504*62]; +extern int16_t *d0_sss,*d5_sss; extern uint8_t wACK[5][4]; extern int8_t wACK_RX[5][4]; diff --git a/openair1/PHY/LTE_TRANSPORT/transport_vars.h b/openair1/PHY/LTE_TRANSPORT/transport_vars.h index 611028e1e9..02dfbc6a5e 100644 --- a/openair1/PHY/LTE_TRANSPORT/transport_vars.h +++ b/openair1/PHY/LTE_TRANSPORT/transport_vars.h @@ -21,7 +21,6 @@ #include "dlsch_tbs.h" //#include "dlsch_tbs_full.h" -#include "sss.h" unsigned short lte_cqi_eff1024[16] = {156, //-6, .15234 240, //-4 .234 From 977b7ebeb9d1f6309066d91180c6b5f190982586 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Thu, 17 May 2018 12:23:26 +0200 Subject: [PATCH 006/379] Perform timing sync adjustment in subframe 5 instead of 6 Subframe 6 may be an MBMS subframe, and timing sync does not (yet) work on MBMS subframes. This commit was developed at Fraunhofer IIS (https://www.iis.fraunhofer.de). --- openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c | 2 +- openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_ue.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c index e268a5b061..746ef1354f 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c @@ -81,7 +81,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, // do not filter to have proactive timing adjustment max_pos_fil = max_pos; - if(subframe == 6) + if(subframe == 5) { diff = max_pos_fil - (frame_parms->nb_prefix_samples>>3); diff --git a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_ue.c b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_ue.c index 732db1fa4e..19461d7cee 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_ue.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_ue.c @@ -82,7 +82,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, // do not filter to have proactive timing adjustment max_pos_fil = max_pos; - if(subframe == 6) + if(subframe == 5) { diff = max_pos_fil - (frame_parms->nb_prefix_samples>>3); From 71960795bf9a2d278043c897701875e75719801c Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Thu, 17 May 2018 12:26:53 +0200 Subject: [PATCH 007/379] Fix DCI format 1C This commit was developed at Fraunhofer IIS (https://www.iis.fraunhofer.de). --- openair1/PHY/LTE_UE_TRANSPORT/dci_tools_ue.c | 23 ++++++++++---------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/openair1/PHY/LTE_UE_TRANSPORT/dci_tools_ue.c b/openair1/PHY/LTE_UE_TRANSPORT/dci_tools_ue.c index b9fbcad9c9..e0ea796a82 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/dci_tools_ue.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/dci_tools_ue.c @@ -179,29 +179,29 @@ void extract_dci1C_info(uint8_t N_RB_DL, lte_frame_type_t frame_type, void *dci_ uint32_t rballoc=0; uint8_t mcs=0; + uint8_t Ngap=0; switch (N_RB_DL) { case 6: - mcs = ((DCI1C_5MHz_t *)dci_pdu)->mcs; - rballoc = conv_1C_RIV(((DCI1C_5MHz_t *)dci_pdu)->rballoc,6); - + mcs = ((DCI1C_1_5MHz_t *)dci_pdu)->mcs; + rballoc = conv_1C_RIV(((DCI1C_1_5MHz_t *)dci_pdu)->rballoc, 6); break; case 25: - mcs = ((DCI1C_5MHz_t *)dci_pdu)->mcs; - rballoc = conv_1C_RIV(((DCI1C_5MHz_t *)dci_pdu)->rballoc,6); - + mcs = ((DCI1C_5MHz_t *)dci_pdu)->mcs; + rballoc = conv_1C_RIV(((DCI1C_5MHz_t *)dci_pdu)->rballoc, 25); break; case 50: - mcs = ((DCI1C_10MHz_t *)dci_pdu)->mcs; - rballoc = conv_1C_RIV(((DCI1C_10MHz_t *)dci_pdu)->rballoc,6); - + mcs = ((DCI1C_10MHz_t *)dci_pdu)->mcs; + rballoc = conv_1C_RIV(((DCI1C_10MHz_t *)dci_pdu)->rballoc, 50); + Ngap = ((DCI1C_10MHz_t *)dci_pdu)->Ngap; break; case 100: - mcs = ((DCI1C_20MHz_t *)dci_pdu)->mcs; - rballoc = conv_1C_RIV(((DCI1C_20MHz_t *)dci_pdu)->rballoc,6); + mcs = ((DCI1C_20MHz_t *)dci_pdu)->mcs; + rballoc = conv_1C_RIV(((DCI1C_20MHz_t *)dci_pdu)->rballoc, 100); + Ngap = ((DCI1C_20MHz_t *)dci_pdu)->Ngap; break; default: @@ -211,6 +211,7 @@ void extract_dci1C_info(uint8_t N_RB_DL, lte_frame_type_t frame_type, void *dci_ pdci_info_extarcted->mcs1 = mcs; pdci_info_extarcted->rballoc = rballoc; + pdci_info_extarcted->Ngap = Ngap; } void extract_dci1_info(uint8_t N_RB_DL, lte_frame_type_t frame_type, void *dci_pdu, DCI_INFO_EXTRACTED_t *pdci_info_extarcted) From f935e09bbe81a17f1a5f341bdb32210536409f74 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Thu, 17 May 2018 15:58:47 +0200 Subject: [PATCH 008/379] Enable RA_RNTI decoding through format1C DCI This commit was developed at Fraunhofer IIS (https://www.iis.fraunhofer.de) by Javier Morgade, Ph.D. --- openair1/SCHED_UE/phy_procedures_lte_ue.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openair1/SCHED_UE/phy_procedures_lte_ue.c b/openair1/SCHED_UE/phy_procedures_lte_ue.c index ed258ed47c..93a0641a26 100644 --- a/openair1/SCHED_UE/phy_procedures_lte_ue.c +++ b/openair1/SCHED_UE/phy_procedures_lte_ue.c @@ -2982,18 +2982,18 @@ LOG_DEBUG_END else if ((ue->prach_resources[eNB_id]) && (dci_alloc_rx[i].rnti == ue->prach_resources[eNB_id]->ra_RNTI) && - (dci_alloc_rx[i].format == format1A)) { + ((dci_alloc_rx[i].format == format1A) || (dci_alloc_rx[i].format == format1C))) { LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - LOG_D(PHY,"[UE %d][RAPROC] subframe %d: Found RA rnti %x, format 1A, dci_cnt %d\n",ue->Mod_id,subframe_rx,dci_alloc_rx[i].rnti,i); + LOG_D(PHY,"[UE %d][RAPROC] subframe %d: Found RA rnti %x, format 1%s, dci_cnt %d\n",ue->Mod_id,subframe_rx,dci_alloc_rx[i].rnti,dci_alloc_rx[i].format==format1A?"A":"C",i); LOG_DEBUG_END if (generate_ue_dlsch_params_from_dci(frame_rx, subframe_rx, - (DCI1A_5MHz_TDD_1_6_t *)&dci_alloc_rx[i].dci_pdu, + (void *)&dci_alloc_rx[i].dci_pdu, ue->prach_resources[eNB_id]->ra_RNTI, - format1A, + dci_alloc_rx[i].format, ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id], ue->pdsch_vars_ra[eNB_id], &ue->dlsch_ra[eNB_id], From 68fae537dda67494c62599179cdf67a206494418 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Fri, 3 Nov 2017 17:54:25 +0100 Subject: [PATCH 009/379] Fixed MBSFN gold sequence generator This commit was developed at Fraunhofer IIS (https://www.iis.fraunhofer.de) by Javier Morgade, Ph.D. --- openair1/PHY/LTE_REFSIG/lte_gold_mbsfn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/LTE_REFSIG/lte_gold_mbsfn.c b/openair1/PHY/LTE_REFSIG/lte_gold_mbsfn.c index 14def309b7..69dbb705db 100644 --- a/openair1/PHY/LTE_REFSIG/lte_gold_mbsfn.c +++ b/openair1/PHY/LTE_REFSIG/lte_gold_mbsfn.c @@ -54,9 +54,9 @@ void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_tabl for (l=0; l<3; l++) { if (l==0) - x2 = (Nid_mbsfn) + (((1+(Nid_mbsfn<<1))*(1 + 2 + (7*(1+(sfn>>1)))))<<9); //cinit + x2 = (Nid_mbsfn) + (((1+(Nid_mbsfn<<1))*(1 + 2 + (7*(1+(sfn<<1)))))<<9); //cinit else - x2 = (Nid_mbsfn) + (((1+(Nid_mbsfn<<1))*(1 + ((l-1)<<2) + (7*(2+(sfn>>1)))))<<9); //cinit + x2 = (Nid_mbsfn) + (((1+(Nid_mbsfn<<1))*(1 + ((l-1)<<2) + (7*(2+(sfn<<1)))))<<9); //cinit //x2 = frame_parms->Ncp + (Nid_cell<<1) + (1+(Nid_cell<<1))*(1 + (3*l) + (7*(1+ns))); //cinit //n = 0 From 02f94bf35bc2ab0322354a068e7f7f2d3c6916de Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Fri, 3 Nov 2017 15:30:55 +0100 Subject: [PATCH 010/379] Fix 24-bit MBSFN subframe configuration This commit was developed at Fraunhofer IIS (https://www.iis.fraunhofer.de) by Javier Morgade, Ph.D. --- openair1/PHY/INIT/lte_init.c | 6 +- openair1/PHY/INIT/lte_init_ue.c | 6 +- openair1/PHY/LTE_TRANSPORT/pmch_common.c | 94 +++++++++++++++++++++++- 3 files changed, 97 insertions(+), 9 deletions(-) diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c index cbae84f56b..bec0873276 100644 --- a/openair1/PHY/INIT/lte_init.c +++ b/openair1/PHY/INIT/lte_init.c @@ -450,11 +450,11 @@ void phy_config_sib2_eNB(uint8_t Mod_id, } else if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames) { // 24-bit subframe configuration fp->MBSFN_config[i].fourFrames_flag = 1; fp->MBSFN_config[i].mbsfn_SubframeConfig = - mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]| + mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[2]| (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[1]<<8)| - (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[2]<<16); + (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]<<16); - LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %d\n", i, + LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %x\n", i, fp->MBSFN_config[i].mbsfn_SubframeConfig); } } diff --git a/openair1/PHY/INIT/lte_init_ue.c b/openair1/PHY/INIT/lte_init_ue.c index 62d768a50a..1ed9e20d60 100644 --- a/openair1/PHY/INIT/lte_init_ue.c +++ b/openair1/PHY/INIT/lte_init_ue.c @@ -165,11 +165,11 @@ void phy_config_sib2_ue(module_id_t Mod_id,int CC_id, } else if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames) { // 24-bit subframe configuration fp->MBSFN_config[i].fourFrames_flag = 1; fp->MBSFN_config[i].mbsfn_SubframeConfig = - mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]| + mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[2]| (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[1]<<8)| - (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[2]<<16); + (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]<<16); - LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %d\n", i, + LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %x\n", i, fp->MBSFN_config[i].mbsfn_SubframeConfig); } } diff --git a/openair1/PHY/LTE_TRANSPORT/pmch_common.c b/openair1/PHY/LTE_TRANSPORT/pmch_common.c index 1d12c79621..a4821a420f 100644 --- a/openair1/PHY/LTE_TRANSPORT/pmch_common.c +++ b/openair1/PHY/LTE_TRANSPORT/pmch_common.c @@ -27,6 +27,7 @@ int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_par uint32_t period; uint8_t i; + uint8_t j; // LOG_D(PHY,"is_pmch_subframe: frame %d, subframe %d, num_MBSFN_config %d\n", // frame,subframe,frame_parms->num_MBSFN_config); @@ -34,8 +35,8 @@ int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_par for (i=0; inum_MBSFN_config; i++) { // we have at least one MBSFN configuration period = 1<MBSFN_config[i].radioframeAllocationPeriod; - if ((frame % period) == frame_parms->MBSFN_config[i].radioframeAllocationOffset) { - if (frame_parms->MBSFN_config[i].fourFrames_flag == 0) { + if (frame_parms->MBSFN_config[i].fourFrames_flag == 0) { + if ((frame % period) == frame_parms->MBSFN_config[i].radioframeAllocationOffset) { if (frame_parms->frame_type == FDD) { switch (subframe) { @@ -108,9 +109,96 @@ int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_par break; } } + } - } else { // handle 4 frames case + } else { // handle 4 frames case + for(j=0;j<4;j++) { + if ((frame % period) == (frame_parms->MBSFN_config[i].radioframeAllocationOffset + j)) { + if (frame_parms->frame_type == FDD) { + switch (subframe) { + case 1: + if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x800000>>(j*6))) > 0) { + //LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x800000>>(j*6)); + return(1); + } + + break; + + case 2: + if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x400000>>(j*6))) > 0) { + //LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x400000>>(j*6)); + return(1); + } + + break; + + case 3: + if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x200000>>(j*6))) > 0) { + //LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x200000>>(j*6)); + return(1); + } + + break; + + case 6: + if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x100000>>(j*6))) > 0) { + //LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x100000>>(j*6)); + return(1); + } + + break; + + case 7: + if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x80000>>(j*6))) > 0) { + //LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x80000>>(j*6)); + return(1); + } + + break; + + case 8: + if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x40000>>(j*6))) > 0) { + //LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x40000>>(j*6)); + return(1); + } + + break; + } + } else { + switch (subframe) { + case 3: + if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF3) > 0) + return(1); + + break; + + case 4: + if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF4) > 0) + return(1); + + break; + + case 7: + if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF7) > 0) + return(1); + + break; + + case 8: + if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF8) > 0) + return(1); + + break; + + case 9: + if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF9) > 0) + return(1); + + break; + } + } + } } } } From 1b53fd402dcb7de7cbaac8a1e755b4a5457f04a8 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Fri, 1 Dec 2017 18:28:28 +0100 Subject: [PATCH 011/379] mcch logical channel properly decoded This commit was developed at Fraunhofer IIS (https://www.iis.fraunhofer.de) by Javier Morgade, Ph.D. --- openair1/SCHED_UE/phy_procedures_lte_ue.c | 17 +- openair2/LAYER2/MAC/mac.h | 13 +- openair2/LAYER2/MAC/ue_procedures.c | 968 +++++++++++++--------- openair2/RRC/LTE/rrc_UE.c | 20 + 4 files changed, 634 insertions(+), 384 deletions(-) diff --git a/openair1/SCHED_UE/phy_procedures_lte_ue.c b/openair1/SCHED_UE/phy_procedures_lte_ue.c index 93a0641a26..f4d3800724 100644 --- a/openair1/SCHED_UE/phy_procedures_lte_ue.c +++ b/openair1/SCHED_UE/phy_procedures_lte_ue.c @@ -3128,7 +3128,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs // LOG_D(PHY,"ue calling pmch subframe ..\n "); LOG_D(PHY,"[UE %d] Frame %d, subframe %d: Querying for PMCH demodulation\n", - ue->Mod_id,(subframe_rx==9?-1:0)+frame_rx,subframe_rx); + ue->Mod_id,frame_rx,subframe_rx); #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) pmch_mcs = ue_query_mch(ue->Mod_id, @@ -3147,9 +3147,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs LOG_D(PHY,"[UE %d] Frame %d, subframe %d: Programming PMCH demodulation for mcs %d\n",ue->Mod_id,frame_rx,subframe_rx,pmch_mcs); fill_UE_dlsch_MCH(ue,pmch_mcs,1,0,0); - for (l=2; l<12; l++) { - slot_fep_mbsfn(ue, l, subframe_rx, @@ -3164,6 +3162,8 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs } + ue->dlsch_MCH[0]->harq_processes[0]->Qm = get_Qm(pmch_mcs); + ue->dlsch_MCH[0]->harq_processes[0]->G = get_G(&ue->frame_parms, ue->dlsch_MCH[0]->harq_processes[0]->nb_rb, ue->dlsch_MCH[0]->harq_processes[0]->rb_alloc_even, @@ -3177,7 +3177,14 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs dlsch_unscrambling(&ue->frame_parms,1,ue->dlsch_MCH[0], ue->dlsch_MCH[0]->harq_processes[0]->G, ue->pdsch_vars_MCH[0]->llr[0],0,subframe_rx<<1); - + + LOG_D(PHY,"start turbo decode for MCH %d.%d --> nb_rb %d \n", frame_rx, subframe_rx, ue->dlsch_MCH[0]->harq_processes[0]->nb_rb); + LOG_D(PHY,"start turbo decode for MCH %d.%d --> rb_alloc_even %x \n", frame_rx, subframe_rx, (unsigned int)((intptr_t)ue->dlsch_MCH[0]->harq_processes[0]->rb_alloc_even)); + LOG_D(PHY,"start turbo decode for MCH %d.%d --> Qm %d \n", frame_rx, subframe_rx, ue->dlsch_MCH[0]->harq_processes[0]->Qm); + LOG_D(PHY,"start turbo decode for MCH %d.%d --> Nl %d \n", frame_rx, subframe_rx, ue->dlsch_MCH[0]->harq_processes[0]->Nl); + LOG_D(PHY,"start turbo decode for MCH %d.%d --> G %d \n", frame_rx, subframe_rx, ue->dlsch_MCH[0]->harq_processes[0]->G); + LOG_D(PHY,"start turbo decode for MCH %d.%d --> Kmimo %d \n", frame_rx, subframe_rx, ue->dlsch_MCH[0]->Kmimo); + ret = dlsch_decoding(ue, ue->pdsch_vars_MCH[0]->llr[0], &ue->frame_parms, @@ -3206,7 +3213,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs ue->dlsch_MCH[0]->harq_processes[0]->TBS>>3, ue->dlsch_MCH[0]->max_turbo_iterations, ue->dlsch_MCH[0]->harq_processes[0]->G); - dump_mch(ue,0,ue->dlsch_MCH[0]->harq_processes[0]->G,subframe_rx); + // dump_mch(ue,0,ue->dlsch_MCH[0]->harq_processes[0]->G,subframe_rx); LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) for (int i=0; idlsch_MCH[0]->harq_processes[0]->TBS>>3; i++) { diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h index d9e914f087..f8121310b1 100644 --- a/openair2/LAYER2/MAC/mac.h +++ b/openair2/LAYER2/MAC/mac.h @@ -442,7 +442,7 @@ typedef struct { /*!\brief LCID of MCCH for DL */ #define MCCH_LCHANID 0 /*!\brief LCID of MCH scheduling info for DL */ -#define MCH_SCHDL_INFO 3 +#define MCH_SCHDL_INFO 30 /*!\brief LCID of Carrier component activation/deactivation */ #define CC_ACT_DEACT 27 //TTN (for D2D) @@ -1502,7 +1502,16 @@ typedef struct { /// MCCH status uint8_t mcch_status; /// MSI status - uint8_t msi_status; // could be an array if there are >1 MCH in one MBSFN area + uint8_t msi_status_v[28]; + uint8_t msi_current_alloc; + uint8_t msi_pmch; + + struct MBSFN_SubframeConfig *commonSF_Alloc_r9_mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA? + uint8_t commonSF_AllocPeriod_r9; + int common_num_sf_alloc; + + uint8_t pmch_lcids[28]; + uint16_t pmch_stop_mtch[28]; #endif //#ifdef CBA /// CBA RNTI for each group diff --git a/openair2/LAYER2/MAC/ue_procedures.c b/openair2/LAYER2/MAC/ue_procedures.c index dd78da7275..581fe9587d 100644 --- a/openair2/LAYER2/MAC/ue_procedures.c +++ b/openair2/LAYER2/MAC/ue_procedures.c @@ -750,7 +750,7 @@ ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP, uint8_t sync_area) { - unsigned char num_sdu, i, *payload_ptr; + unsigned char num_sdu, i, j, *payload_ptr; unsigned char rx_lcids[NB_RB_MAX]; unsigned short rx_lengths[NB_RB_MAX]; #if UE_TIMING_TRACE @@ -771,47 +771,76 @@ ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP, num_sdu); for (i = 0; i < num_sdu; i++) { - if (rx_lcids[i] == MCH_SCHDL_INFO) { - if (UE_mac_inst[module_idP].mcch_status == 1) { - LOG_I(MAC, - "[UE %d] Frame %d : MCH->MSI for sync area %d (eNB %d, %d bytes)\n", - module_idP, frameP, sync_area, eNB_index, - rx_lengths[i]); - // ??store necessary scheduling info to ue_mac_inst in order to - // calculate exact position of interested service (for the complex case has >1 mtch) - // set msi_status to 1 - UE_mac_inst[module_idP].msi_status = 1; - } - } else if (rx_lcids[i] == MCCH_LCHANID) { - LOG_I(MAC, - "[UE %d] Frame %d : SDU %d MCH->MCCH for sync area %d (eNB %d, %d bytes)\n", - module_idP, frameP, i, sync_area, eNB_index, - rx_lengths[i]); - mac_rrc_data_ind_ue(module_idP, CC_id, frameP, 0, // unknown subframe - M_RNTI, - MCCH, - payload_ptr, rx_lengths[i], eNB_index, - sync_area); - } else if (rx_lcids[i] == MTCH) { - if (UE_mac_inst[module_idP].msi_status == 1) { - LOG_I(MAC, - "[UE %d] Frame %d : MCH->MTCH for sync area %d (eNB %d, %d bytes)\n", - module_idP, frameP, sync_area, eNB_index, - rx_lengths[i]); + if (rx_lcids[i] == MCH_SCHDL_INFO) { + if (rx_lengths[i] & 0x01) { + LOG_E(MAC,"MCH Scheduling Information MAC Control Element should have an even size\n"); + } - mac_rlc_data_ind(module_idP, UE_mac_inst[module_idP].crnti, eNB_index, frameP, ENB_FLAG_NO, MBMS_FLAG_YES, MTCH, /*+ (maxDRB + 3), */ - (char *) payload_ptr, rx_lengths[i], 1, - NULL); + LOG_D(MAC,"MCH Scheduling Information, len(%d)\n",rx_lengths[i]); - } - } else { - LOG_W(MAC, - "[UE %d] Frame %d : unknown sdu %d rx_lcids[%d]=%d mcch status %d eNB %d \n", - module_idP, frameP, rx_lengths[i], i, rx_lcids[i], - UE_mac_inst[module_idP].mcch_status, eNB_index); - } + for (j=0; j> 3; + UE_mac_inst[module_idP].pmch_stop_mtch[j] = stop_mtch_val; + LOG_D(MAC,"lcid(%d),stop_mtch_val %d frameP(%d)\n", UE_mac_inst[module_idP].pmch_lcids[j], stop_mtch_val, frameP); + + if ((stop_mtch_val >= 2043) && (stop_mtch_val <= 2046)) { + LOG_D(MAC,"(reserved)\n"); + } + + UE_mac_inst[module_idP].msi_status_v[j] = 0; + + if (UE_mac_inst[module_idP].mcch_status==1) { + LOG_D(MAC,"[UE %d] Frame %d : MCH->MSI for sync area %d (eNB %d, %d bytes), i(%d)\n", module_idP, frameP, sync_area, eNB_index, rx_lengths[i], UE_mac_inst[module_idP].pmch_stop_mtch[j]); + if (UE_mac_inst[module_idP].pmch_stop_mtch[j] < 2043) { + UE_mac_inst[module_idP].pmch_stop_mtch[j] += UE_mac_inst[module_idP].msi_current_alloc; + UE_mac_inst[module_idP].msi_status_v[j] = 1; + } + } + } + } else if (rx_lcids[i] == MCCH_LCHANID) { + LOG_D(MAC,"[UE %d] Frame %d : SDU %d MCH->MCCH for sync area %d (eNB %d, %d bytes)\n",module_idP,frameP, i, sync_area, eNB_index, rx_lengths[i]); + mac_rrc_data_ind_ue(module_idP, + CC_id, + frameP,0, // unknown subframe + M_RNTI, + MCCH, + payload_ptr + 1, // Skip RLC layer 1st byte + rx_lengths[i] - 1, + eNB_index, + sync_area); + } else if (rx_lcids[i] <= 28) { + for (j=0; j<28; j++) { + if (rx_lcids[i] == UE_mac_inst[module_idP].pmch_lcids[j]) + break; + } + + if (j<28 && UE_mac_inst[module_idP].msi_status_v[j]==1) { + LOG_D(MAC,"[UE %d] Frame %d : MCH->MTCH for sync area %d (eNB %d, %d bytes), j=%d\n", module_idP, frameP, sync_area, eNB_index, rx_lengths[i], j); + + mac_rlc_data_ind( + module_idP, + UE_mac_inst[module_idP].crnti, + eNB_index, + frameP, + ENB_FLAG_NO, + MBMS_FLAG_YES, + rx_lcids[i], /*+ (maxDRB + 3),*/ + (char *)payload_ptr, + rx_lengths[i], + 1, + NULL); + + } + } else { + LOG_W(MAC, + "[UE %d] Frame %d : unknown sdu %d rx_lcids[%d]=%d mcch status %d eNB %d \n", + module_idP, frameP, rx_lengths[i], i, rx_lcids[i], + UE_mac_inst[module_idP].mcch_status, eNB_index); + } + + payload_ptr += rx_lengths[i]; } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME @@ -916,406 +945,591 @@ int8_t ue_get_mbsfn_sf_alloction (module_id_t module_idP, uint8_t mbsfn_sync_are } } -int -ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, - uint32_t subframe, uint8_t eNB_index, uint8_t * sync_area, - uint8_t * mcch_active) +int ue_query_p_mch_info(module_id_t module_idP, uint32_t frameP, uint32_t subframe, int commonSFAlloc_period, int commonSFAlloc_offset, int num_sf_alloc, int *mtch_active, int *msi_active, uint8_t *mch_lcid) +{ + int i, mtch_mcs = -1; + int mtch_flag = 0; + int msi_flag = 0; + + for (i = 0; i < 4; i++) { + if (UE_mac_inst[module_idP].pmch_Config[i] == NULL) + continue; + + int mch_scheduling_period = 8 << UE_mac_inst[module_idP].pmch_Config[i]->mch_SchedulingPeriod_r9; + uint8_t sf_AllocEnd_r9 = UE_mac_inst[module_idP].pmch_Config[i]->sf_AllocEnd_r9; + + if (sf_AllocEnd_r9 == 2047) { + msi_flag = 1; + break; + } + + if ((frameP % mch_scheduling_period) == (commonSFAlloc_offset + (frameP % 4))) { + if (i == 0) { + //msi and mtch are mutally excluded then the break is safe + if ((num_sf_alloc == 0) && (sf_AllocEnd_r9 >= 1)) { + msi_flag = 1; + LOG_D(MAC,"msi(%d) should be allocated:frame(%d),submframe(%d),num_sf_alloc(%d),sf_AllocEnd_r9(%d),common_num_sf_alloc(%d)\n",i,frameP,subframe,num_sf_alloc,sf_AllocEnd_r9,UE_mac_inst[module_idP].common_num_sf_alloc); + UE_mac_inst[module_idP].msi_current_alloc = num_sf_alloc; + UE_mac_inst[module_idP].msi_pmch = i; + } + } else { //more that one MCH ?? check better this condition + //msi and mtch are mutally excluded then the break is safe + if ((num_sf_alloc == UE_mac_inst[module_idP].pmch_Config[i-1]->sf_AllocEnd_r9 + 1) && (sf_AllocEnd_r9 >= (num_sf_alloc+1))) { + //msi should be just after + msi_flag = 1; + LOG_D(MAC,"msi(%d) should be allocated:frame(%d),submframe(%d),num_sf_alloc(%d),sf_AllocEnd_r9(%d),common_num_sf_alloc(%d)\n",i,frameP,subframe,num_sf_alloc,sf_AllocEnd_r9,UE_mac_inst[module_idP].common_num_sf_alloc); + UE_mac_inst[module_idP].msi_current_alloc = num_sf_alloc; + UE_mac_inst[module_idP].msi_pmch = i; + } + } + } + } + + for (i = 0; i < 28; i++) { + if (UE_mac_inst[module_idP].pmch_stop_mtch[i] >= num_sf_alloc) { + if (UE_mac_inst[module_idP].pmch_stop_mtch[i] != 2047) { + mtch_flag = 1; + if (UE_mac_inst[module_idP].pmch_Config[UE_mac_inst[module_idP].msi_pmch] != NULL) + mtch_mcs = UE_mac_inst[module_idP].pmch_Config[UE_mac_inst[module_idP].msi_pmch]->dataMCS_r9; + else + mtch_mcs = -1; + *mch_lcid = (uint8_t)i; + LOG_D(MAC,"mtch should be allocated:frame(%d),submframe(%d),num_sf_alloc(%d),mtch_mcs(%d),pmch_stop_mtch(%d),lcid(%d),msi_pmch(%d)\n",frameP,subframe,num_sf_alloc,mtch_mcs,UE_mac_inst[module_idP].pmch_stop_mtch[i],UE_mac_inst[module_idP].pmch_lcids[i],UE_mac_inst[module_idP].msi_pmch); + break; + } + } + } + + *mtch_active = mtch_flag; + *msi_active = msi_flag; + + return mtch_mcs; +} + +int ue_query_p_mch(module_id_t module_idP, uint32_t frameP, uint32_t subframe, int *mtch_active, int *msi_active, uint8_t *mch_lcid) +{ + int i, j, mtch_mcs = -1; + int mtch_flag = 0; + + // Acount for sf_allocable in CSA + int num_sf_alloc = 0; + for (i = 0; i < 8; i++) { + if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i] == NULL) + continue; + + if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) // one-frameP format + continue; + + // four-frameP format + uint32_t common_mbsfn_SubframeConfig = UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[2] | + (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[1]<<8) | + (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[0]<<16); + for (j = 0; j < 24; j++) + num_sf_alloc += ((common_mbsfn_SubframeConfig & (0x800000 >> j)) == (0x800000 >> j)); + } + + for (i = 0; i < 8; i++ ) { + if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i] == NULL) + continue; + + if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) // one-frameP format + continue; + + // four-frameP format + int common_mbsfn_alloc_offset = UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->radioframeAllocationOffset; + int common_mbsfn_period = 1 << UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->radioframeAllocationPeriod; + int commonSF_AllocPeriod = 4 << UE_mac_inst[module_idP].commonSF_AllocPeriod_r9; + + uint32_t common_mbsfn_SubframeConfig = UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[2] | + (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[1]<<8) | + (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[0]<<16); + + int jj = frameP % 4; + if ((frameP % common_mbsfn_period) != (common_mbsfn_alloc_offset + jj)) + continue; + + if(UE_mac_inst[module_idP].tdd_Config == NULL){ + switch (subframe) { + case 1: + if ((common_mbsfn_SubframeConfig & (0x800000 >> (jj*6))) == (0x800000 >> (jj*6))) { + mtch_flag = 1; + mtch_mcs = ue_query_p_mch_info(module_idP,frameP,subframe,common_mbsfn_period,common_mbsfn_alloc_offset,UE_mac_inst[module_idP].common_num_sf_alloc,mtch_active,msi_active,mch_lcid); + UE_mac_inst[module_idP].common_num_sf_alloc++; + UE_mac_inst[module_idP].common_num_sf_alloc = UE_mac_inst[module_idP].common_num_sf_alloc % (num_sf_alloc * commonSF_AllocPeriod / common_mbsfn_period);//48; + } + break; + case 2: + if ((common_mbsfn_SubframeConfig & (0x400000 >> (jj*6))) == (0x400000 >> (jj*6))) { + mtch_flag = 1; + mtch_mcs = ue_query_p_mch_info(module_idP,frameP,subframe,common_mbsfn_period,common_mbsfn_alloc_offset,UE_mac_inst[module_idP].common_num_sf_alloc,mtch_active,msi_active,mch_lcid); + UE_mac_inst[module_idP].common_num_sf_alloc++; + UE_mac_inst[module_idP].common_num_sf_alloc = UE_mac_inst[module_idP].common_num_sf_alloc % (num_sf_alloc * commonSF_AllocPeriod / common_mbsfn_period);//48; + } + break; + case 3: + if ((common_mbsfn_SubframeConfig & (0x200000 >> (jj*6))) == (0x200000 >> (jj*6))) { + mtch_flag = 1; + mtch_mcs = ue_query_p_mch_info(module_idP,frameP,subframe,common_mbsfn_period,common_mbsfn_alloc_offset,UE_mac_inst[module_idP].common_num_sf_alloc,mtch_active,msi_active,mch_lcid); + UE_mac_inst[module_idP].common_num_sf_alloc++; + UE_mac_inst[module_idP].common_num_sf_alloc = UE_mac_inst[module_idP].common_num_sf_alloc % (num_sf_alloc * commonSF_AllocPeriod / common_mbsfn_period);//48; + } + break; + case 6: + if ((common_mbsfn_SubframeConfig & (0x100000 >> (jj*6))) == (0x100000 >> (jj*6))) { + mtch_flag = 1; + mtch_mcs = ue_query_p_mch_info(module_idP,frameP,subframe,common_mbsfn_period,common_mbsfn_alloc_offset,UE_mac_inst[module_idP].common_num_sf_alloc,mtch_active,msi_active,mch_lcid); + UE_mac_inst[module_idP].common_num_sf_alloc++; + UE_mac_inst[module_idP].common_num_sf_alloc = UE_mac_inst[module_idP].common_num_sf_alloc % (num_sf_alloc * commonSF_AllocPeriod / common_mbsfn_period);//48; + } + break; + case 7: + if ((common_mbsfn_SubframeConfig & (0x80000 >> (jj*6))) == (0x80000 >> (jj*6))) { + mtch_flag = 1; + mtch_mcs = ue_query_p_mch_info(module_idP,frameP,subframe,common_mbsfn_period,common_mbsfn_alloc_offset,UE_mac_inst[module_idP].common_num_sf_alloc,mtch_active,msi_active,mch_lcid); + UE_mac_inst[module_idP].common_num_sf_alloc++; + UE_mac_inst[module_idP].common_num_sf_alloc = UE_mac_inst[module_idP].common_num_sf_alloc % (num_sf_alloc * commonSF_AllocPeriod / common_mbsfn_period);//48; + } + break; + case 8: + if ((common_mbsfn_SubframeConfig & (0x40000 >> (jj*6))) == (0x40000 >> (jj*6))) { + mtch_flag = 1; + mtch_mcs = ue_query_p_mch_info(module_idP,frameP,subframe,common_mbsfn_period,common_mbsfn_alloc_offset,UE_mac_inst[module_idP].common_num_sf_alloc,mtch_active,msi_active,mch_lcid); + UE_mac_inst[module_idP].common_num_sf_alloc++; + UE_mac_inst[module_idP].common_num_sf_alloc = UE_mac_inst[module_idP].common_num_sf_alloc% ( num_sf_alloc*commonSF_AllocPeriod/common_mbsfn_period);//48; + } + break; + } + } else { + // TODO TDD + } + if (mtch_flag == 1) + break; + } + + return mtch_mcs; +} + +int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_t subframe, uint8_t eNB_index,uint8_t *sync_area, uint8_t *mcch_active) { - int i = 0, j = 0, ii = 0, msi_pos = 0, mcch_mcs = -1; - int mcch_flag = 0, mtch_flag = 0, msi_flag = 0; - int mbsfn_period = 0; // 1<<(UE_mac_inst[module_idP].mbsfn_SubframeConfig[0]->radioframeAllocationPeriod); - int mcch_period = 0; // 32<<(UE_mac_inst[module_idP].mbsfn_AreaInfo[0]->mcch_Config_r9.mcch_RepetitionPeriod_r9); - int mch_scheduling_period = -1; - - int frame_FDD = 1; - + int i = 0, j = 0, ii = 0, jj = 0, msi_pos = 0, mcch_mcs = -1, mtch_mcs = -1; + int mcch_flag = 0, mtch_flag = 0, msi_flag = 0; + long mch_scheduling_period = -1; + uint8_t mch_lcid = 0; #if UE_TIMING_TRACE - start_meas(&UE_mac_inst[module_idP].ue_query_mch); + start_meas(&UE_mac_inst[module_idP].ue_query_mch); #endif - if (UE_mac_inst[module_idP].pmch_Config[0]) { - mch_scheduling_period = - 8 << (UE_mac_inst[module_idP]. - pmch_Config[0]->mch_SchedulingPeriod_r9); + if (UE_mac_inst[module_idP].pmch_Config[0]) { + mch_scheduling_period = 8 << UE_mac_inst[module_idP].pmch_Config[0]->mch_SchedulingPeriod_r9; + } + + for (i = 0; + i < UE_mac_inst[module_idP].num_active_mbsfn_area; + i++ ) + { + // assume, that there is always a mapping + if ((j = ue_get_mbsfn_sf_alloction(module_idP,i,eNB_index)) == -1) { + return -1; // continue; } - for (i = 0; i < UE_mac_inst[module_idP].num_active_mbsfn_area; i++) { - // assume, that there is always a mapping - if ((j = - ue_get_mbsfn_sf_alloction(module_idP, i, eNB_index)) == -1) { - return -1; // continue; - } + ii = 0; + msi_pos = 0; + + long mbsfn_period = 1 << UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->radioframeAllocationPeriod; + long mbsfn_alloc_offset = UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->radioframeAllocationOffset; + long mcch_period = 32 << UE_mac_inst[module_idP].mbsfn_AreaInfo[j]->mcch_Config_r9.mcch_RepetitionPeriod_r9; + long mcch_offset = UE_mac_inst[module_idP].mbsfn_AreaInfo[j]->mcch_Config_r9.mcch_Offset_r9; - ii = 0; - msi_pos = 0; - mbsfn_period = - 1 << (UE_mac_inst[module_idP]. - mbsfn_SubframeConfig[0]->radioframeAllocationPeriod); - mcch_period = - 32 << (UE_mac_inst[module_idP]. - mbsfn_AreaInfo[0]->mcch_Config_r9. - mcch_RepetitionPeriod_r9); + LOG_D(MAC, + "[UE %d] Frame %d subframe %d: Checking MBSFN Sync Area %d/%d with SF allocation %d/%d for MCCH and MTCH (mbsfn period %ld, mcch period %ld,mac sched period (%ld,%ld))\n", + module_idP,frameP, subframe,i,UE_mac_inst[module_idP].num_active_mbsfn_area, + j,UE_mac_inst[module_idP].num_sf_allocation_pattern,mbsfn_period,mcch_period, + mcch_offset,mbsfn_alloc_offset); - LOG_D(MAC, - "[UE %d] Frame %d subframe %d: Checking MBSFN Sync Area %d/%d with SF allocation %d/%d for MCCH and MTCH (mbsfn period %d, mcch period %d,mac sched period (%d,%ld))\n", - module_idP, frameP, subframe, i, - UE_mac_inst[module_idP].num_active_mbsfn_area, j, - UE_mac_inst[module_idP].num_sf_allocation_pattern, - mbsfn_period, mcch_period, mch_scheduling_period, - UE_mac_inst[module_idP]. - mbsfn_SubframeConfig[j]->radioframeAllocationOffset); + // get the real MCS value + switch (UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.signallingMCS_r9) { + case 0: + mcch_mcs = 2; + break; - // get the real MCS value - switch (UE_mac_inst[module_idP].mbsfn_AreaInfo[i]-> - mcch_Config_r9.signallingMCS_r9) { - case 0: - mcch_mcs = 2; - break; + case 1: + mcch_mcs = 7; + break; - case 1: - mcch_mcs = 7; - break; + case 2: + mcch_mcs = 13; + break; - case 2: - mcch_mcs = 13; - break; + case 3: + mcch_mcs = 19; + break; + } - case 3: - mcch_mcs = 19; - break; - } + if (UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) { // one-frameP format + if (frameP % mbsfn_period == mbsfn_alloc_offset) { // MBSFN frameP - if (frameP % mbsfn_period == UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->radioframeAllocationOffset) { // MBSFN frameP - if (UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) { // one-frameP format + if (UE_mac_inst[module_idP].pmch_Config[0]) { + // Find the first subframe in this MCH to transmit MSI + if (frameP % mch_scheduling_period == mbsfn_alloc_offset) { + while (ii == 0) { + ii = UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & (0x80 >> msi_pos); + msi_pos++; + } + } + } - if (UE_mac_inst[module_idP].pmch_Config[0]) { - // Find the first subframe in this MCH to transmit MSI - if (frameP % mch_scheduling_period == - UE_mac_inst[module_idP]. - mbsfn_SubframeConfig - [j]->radioframeAllocationOffset) { - while (ii == 0) { - ii = UE_mac_inst[module_idP]. - mbsfn_SubframeConfig[j]-> - subframeAllocation.choice. - oneFrame.buf[0] & (0x80 >> msi_pos); - msi_pos++; - } - } - } + // Check if the subframe is for MSI, MCCH or MTCHs and Set the correspoding flag to 1 + switch (subframe) { + case 1: + if (UE_mac_inst[module_idP].tdd_Config == NULL) { + if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF1) == MBSFN_FDD_SF1) { + if (msi_pos == 1) { + msi_flag = 1; + } - if (UE_mac_inst[module_idP].tdd_Config == NULL) - frame_FDD = 1; - else - frame_FDD = 0; - // Check if the subframe is for MSI, MCCH or MTCHs and Set the correspoding flag to 1 - switch (subframe) { - case 1: - if (frame_FDD == 1) { - if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig - [j]->subframeAllocation.choice.oneFrame. - buf[0] & MBSFN_FDD_SF1) == MBSFN_FDD_SF1) { - if (msi_pos == 1) { - msi_flag = 1; - } + if ((frameP % mcch_period == mcch_offset) && + ((UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF1) == MBSFN_FDD_SF1)) { + mcch_flag = 1; + } - if ((frameP % mcch_period == - UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.mcch_Offset_r9) - && - ((UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.sf_AllocInfo_r9. - buf[0] & MBSFN_FDD_SF1) == - MBSFN_FDD_SF1)) { - mcch_flag = 1; - } + mtch_flag = 1; + } + } - mtch_flag = 1; - } - } + break; - break; + case 2: + if (UE_mac_inst[module_idP].tdd_Config == NULL) { + if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF2) == MBSFN_FDD_SF2) { + if (msi_pos == 2) { + msi_flag = 1; + } - case 2: - if (frame_FDD == 1) { - if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig - [j]->subframeAllocation.choice.oneFrame. - buf[0] & MBSFN_FDD_SF2) == MBSFN_FDD_SF2) { - if (msi_pos == 2) { - msi_flag = 1; - } + if ((frameP % mcch_period == mcch_offset) && + ((UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF2) == MBSFN_FDD_SF2)) { + mcch_flag = 1; + } - if ((frameP % mcch_period == - UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.mcch_Offset_r9) - && - ((UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.sf_AllocInfo_r9. - buf[0] & MBSFN_FDD_SF2) == - MBSFN_FDD_SF2)) { - mcch_flag = 1; - } + mtch_flag = 1; + } + } - mtch_flag = 1; - } - } + break; - break; + case 3: + if (UE_mac_inst[module_idP].tdd_Config != NULL) { // TDD + if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_TDD_SF3) == MBSFN_TDD_SF3) { + if (msi_pos == 1) { + msi_flag = 1; + } - case 3: - if (frame_FDD == 0) { //TDD - if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig - [j]->subframeAllocation.choice.oneFrame. - buf[0] & MBSFN_TDD_SF3) == MBSFN_TDD_SF3) { - if (msi_pos == 1) { - msi_flag = 1; - } + if ((frameP % mcch_period == mcch_offset) && + ((UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_TDD_SF3) == MBSFN_TDD_SF3)) { + mcch_flag = 1; + } - if ((frameP % mcch_period == - UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.mcch_Offset_r9) - && - ((UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.sf_AllocInfo_r9. - buf[0] & MBSFN_TDD_SF3) == - MBSFN_TDD_SF3)) { - mcch_flag = 1; - } + mtch_flag = 1; + } + } else { // FDD + if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF3) == MBSFN_FDD_SF3) { + if (msi_pos == 3) { + msi_flag = 1; + } - mtch_flag = 1; - } - } else { // FDD - if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig - [j]->subframeAllocation.choice.oneFrame. - buf[0] & MBSFN_FDD_SF3) == MBSFN_FDD_SF3) { - if (msi_pos == 3) { - msi_flag = 1; - } + if ((frameP % mcch_period == mcch_offset) && + ((UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF3) == MBSFN_FDD_SF3)) { + mcch_flag = 1; + } - if ((frameP % mcch_period == - UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.mcch_Offset_r9) - && - ((UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.sf_AllocInfo_r9. - buf[0] & MBSFN_FDD_SF3) == - MBSFN_FDD_SF3)) { - mcch_flag = 1; - } + mtch_flag = 1; + } + } - mtch_flag = 1; - } - } + break; - break; + case 4: + if (UE_mac_inst[module_idP].tdd_Config != NULL) { + if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_TDD_SF4) == MBSFN_TDD_SF4) { + if (msi_pos == 2) { + msi_flag = 1; + } - case 4: - if (frame_FDD == 0) { - if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig - [j]->subframeAllocation.choice.oneFrame. - buf[0] & MBSFN_TDD_SF4) == MBSFN_TDD_SF4) { - if (msi_pos == 2) { - msi_flag = 1; - } + if ((frameP % mcch_period == mcch_offset) && + ((UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_TDD_SF4) == MBSFN_TDD_SF4)) { + mcch_flag = 1; + } - if ((frameP % mcch_period == - UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.mcch_Offset_r9) - && - ((UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.sf_AllocInfo_r9. - buf[0] & MBSFN_TDD_SF4) == - MBSFN_TDD_SF4)) { - mcch_flag = 1; - } + mtch_flag = 1; + } + } - mtch_flag = 1; - } - } + break; - break; + case 6: + if (UE_mac_inst[module_idP].tdd_Config == NULL) { + if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF6) == MBSFN_FDD_SF6) { + if (msi_pos == 4) { + msi_flag = 1; + } - case 6: - if (frame_FDD == 1) { - if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig - [j]->subframeAllocation.choice.oneFrame. - buf[0] & MBSFN_FDD_SF6) == MBSFN_FDD_SF6) { - if (msi_pos == 4) { - msi_flag = 1; - } + if ((frameP % mcch_period == mcch_offset) && + ((UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF6) == MBSFN_FDD_SF6)) { + mcch_flag = 1; + } - if ((frameP % mcch_period == - UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.mcch_Offset_r9) - && - ((UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.sf_AllocInfo_r9. - buf[0] & MBSFN_FDD_SF6) == - MBSFN_FDD_SF6)) { - mcch_flag = 1; - } + mtch_flag = 1; + } + } - mtch_flag = 1; - } - } + break; - break; + case 7: + if (UE_mac_inst[module_idP].tdd_Config != NULL) { // TDD + if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_TDD_SF7) == MBSFN_TDD_SF7) { + if (msi_pos == 3) { + msi_flag = 1; + } - case 7: - if (frame_FDD == 0) { // TDD - if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig - [j]->subframeAllocation.choice.oneFrame. - buf[0] & MBSFN_TDD_SF7) == MBSFN_TDD_SF7) { - if (msi_pos == 3) { - msi_flag = 1; - } + if ((frameP % mcch_period == mcch_offset) && + ((UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_TDD_SF7) == MBSFN_TDD_SF7)) { + mcch_flag = 1; + } - if ((frameP % mcch_period == - UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.mcch_Offset_r9) - && - ((UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.sf_AllocInfo_r9. - buf[0] & MBSFN_TDD_SF7) == - MBSFN_TDD_SF7)) { - mcch_flag = 1; - } + mtch_flag = 1; + } + } else { // FDD + if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF7) == MBSFN_FDD_SF7) { + if (msi_pos == 5) { + msi_flag = 1; + } - mtch_flag = 1; - } - } else { // FDD - if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig - [j]->subframeAllocation.choice.oneFrame. - buf[0] & MBSFN_FDD_SF7) == MBSFN_FDD_SF7) { - if (msi_pos == 5) { - msi_flag = 1; - } + if ((frameP % mcch_period == mcch_offset) && + ((UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF7) == MBSFN_FDD_SF7)) { + mcch_flag = 1; + } - if ((frameP % mcch_period == - UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.mcch_Offset_r9) - && - ((UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.sf_AllocInfo_r9. - buf[0] & MBSFN_FDD_SF7) == - MBSFN_FDD_SF7)) { - mcch_flag = 1; - } + mtch_flag = 1; + } + } - mtch_flag = 1; - } - } + break; - break; + case 8: + if (UE_mac_inst[module_idP].tdd_Config != NULL) { //TDD + if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_TDD_SF8) == MBSFN_TDD_SF8) { + if (msi_pos == 4) { + msi_flag = 1; + } - case 8: - if (frame_FDD == 0) { //TDD - if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig - [j]->subframeAllocation.choice.oneFrame. - buf[0] & MBSFN_TDD_SF8) == MBSFN_TDD_SF8) { - if (msi_pos == 4) { - msi_flag = 1; - } + if ((frameP % mcch_period == mcch_offset) && + ((UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_TDD_SF8) == MBSFN_TDD_SF8)) { + mcch_flag = 1; + } - if ((frameP % mcch_period == - UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.mcch_Offset_r9) - && - ((UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.sf_AllocInfo_r9. - buf[0] & MBSFN_TDD_SF8) == - MBSFN_TDD_SF8)) { - mcch_flag = 1; - } + mtch_flag = 1; + } + } else { // FDD + if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF8) == MBSFN_FDD_SF8) { + if (msi_pos == 6) { + msi_flag = 1; + } - mtch_flag = 1; - } - } else { // FDD - if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig - [j]->subframeAllocation.choice.oneFrame. - buf[0] & MBSFN_FDD_SF8) == MBSFN_FDD_SF8) { - if (msi_pos == 6) { - msi_flag = 1; - } + if ((frameP % mcch_period == mcch_offset) && + ((UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF8) == MBSFN_FDD_SF8)) { + mcch_flag = 1; + } - if ((frameP % mcch_period == - UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.mcch_Offset_r9) - && - ((UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.sf_AllocInfo_r9. - buf[0] & MBSFN_FDD_SF8) == - MBSFN_FDD_SF8)) { - mcch_flag = 1; - } + mtch_flag = 1; + } + } - mtch_flag = 1; - } - } + break; - break; + case 9: + if (UE_mac_inst[module_idP].tdd_Config != NULL) { + if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_TDD_SF9) == MBSFN_TDD_SF9) { + if (msi_pos == 5) { + msi_flag = 1; + } - case 9: - if (frame_FDD == 0) { - if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig - [j]->subframeAllocation.choice.oneFrame. - buf[0] & MBSFN_TDD_SF9) == MBSFN_TDD_SF9) { - if (msi_pos == 5) { - msi_flag = 1; - } + if ((frameP % mcch_period == mcch_offset) && + ((UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_TDD_SF9) == MBSFN_TDD_SF9)) { + mcch_flag = 1; + } - if ((frameP % mcch_period == - UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.mcch_Offset_r9) - && - ((UE_mac_inst[module_idP].mbsfn_AreaInfo - [i]->mcch_Config_r9.sf_AllocInfo_r9. - buf[0] & MBSFN_TDD_SF9) == - MBSFN_TDD_SF9)) { - mcch_flag = 1; - } + mtch_flag = 1; + } + } - mtch_flag = 1; - } - } + break; + }// end switch - break; - } // end switch + // Acount for sf_allocable in CSA + int num_sf_alloc = 0; + for (i = 0; i < 8; i++) { + if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i] == NULL) + continue; - // sf allocation is non-overlapping - if ((msi_flag == 1) || (mcch_flag == 1) - || (mtch_flag == 1)) { - LOG_D(MAC, - "[UE %d] Frame %d Subframe %d: sync area %d SF alloc %d: msi flag %d, mcch flag %d, mtch flag %d\n", - module_idP, frameP, subframe, i, j, msi_flag, - mcch_flag, mtch_flag); + if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.present != MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) + continue; + + uint32_t common_mbsfn_SubframeConfig = UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[0]; + for (j = 0; j < 6; j++) + num_sf_alloc += ((common_mbsfn_SubframeConfig & (0x80 >> j)) == (0x80 >> j)); + } + + for (i = 0; i < 28; i++) { + if (UE_mac_inst[module_idP].pmch_stop_mtch[i] >= num_sf_alloc) { + if (UE_mac_inst[module_idP].pmch_stop_mtch[i] != 2047) { + if (UE_mac_inst[module_idP].pmch_Config[UE_mac_inst[module_idP].msi_pmch] != NULL) + mtch_mcs = UE_mac_inst[module_idP].pmch_Config[UE_mac_inst[module_idP].msi_pmch]->dataMCS_r9; + else + mtch_mcs = -1; + mch_lcid = (uint8_t)i; + break; + } + } + } + + // sf allocation is non-overlapping + if ((msi_flag==1) || (mcch_flag==1) || (mtch_flag==1)) { + LOG_D(MAC,"[UE %d] Frame %d Subframe %d: sync area %d SF alloc %d: msi flag %d, mcch flag %d, mtch flag %d\n", + module_idP, frameP, subframe,i,j,msi_flag,mcch_flag,mtch_flag); + + *sync_area=i; + break; + } + } + } else { // four-frameP format + uint32_t mbsfn_SubframeConfig = UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[2] | + (UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[1]<<8) | + (UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0]<<16); + uint32_t MCCH_mbsfn_SubframeConfig = /* UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[2] | + (UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[1]<<8) | */ + (UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0]<<16); + + jj=frameP%4; + if ((frameP % mbsfn_period) == (mbsfn_alloc_offset+jj)) { + if (UE_mac_inst[module_idP].tdd_Config == NULL) { + switch (subframe) { + case 1: + if ((mbsfn_SubframeConfig & (0x800000>>(jj*6))) == (0x800000>>(jj*6))) { + if ((frameP % mcch_period == (mcch_offset+jj)) && ((MCCH_mbsfn_SubframeConfig & (0x800000>>(jj*6))) == (0x800000>>(jj*6)))) { + mcch_flag=1; + LOG_D(MAC,"frameP(%d),mcch_period(%ld),mbsfn_SubframeConfig(%x),MCCH_mbsfn_SubframeConfig(%x),mask(%x),jj(%d),num_sf_alloc(%d)\n", + frameP, mcch_period, mbsfn_SubframeConfig, MCCH_mbsfn_SubframeConfig, (0x800000>>(jj*6)), jj, UE_mac_inst[module_idP].common_num_sf_alloc); + if(UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[0]==NULL) + UE_mac_inst[module_idP].common_num_sf_alloc++; + } + } + break; + case 2: + if ((mbsfn_SubframeConfig & (0x400000>>(jj*6))) == (0x400000>>(jj*6))) { + if ((frameP % mcch_period == (mcch_offset+jj)) && ((MCCH_mbsfn_SubframeConfig & (0x400000>>(jj*6))) == (0x400000>>(jj*6)))) { + mcch_flag=1; + LOG_D(MAC,"frameP(%d),mcch_period(%ld),mbsfn_SubframeConfig(%x),MCCH_mbsfn_SubframeConfig(%x),mask(%x),jj(%d),num_sf_alloc(%d)\n", + frameP, mcch_period, mbsfn_SubframeConfig, MCCH_mbsfn_SubframeConfig, (0x400000>>(jj*6)), jj, UE_mac_inst[module_idP].common_num_sf_alloc); + if(UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[0]==NULL) + UE_mac_inst[module_idP].common_num_sf_alloc++; + } + } + break; + case 3: + if ((mbsfn_SubframeConfig & (0x200000>>(jj*6))) == (0x200000>>(jj*6))) { + if ((frameP % mcch_period == (mcch_offset+jj)) && ((MCCH_mbsfn_SubframeConfig & (0x200000>>(jj*6))) == (0x200000>>(jj*6)))) { + LOG_D(MAC,"frameP(%d),mcch_period(%ld),mbsfn_SubframeConfig(%x),MCCH_mbsfn_SubframeConfig(%x),mask(%x),jj(%d),num_sf_alloc(%d)\n", + frameP, mcch_period, mbsfn_SubframeConfig, MCCH_mbsfn_SubframeConfig, (0x200000>>(jj*6)), jj, UE_mac_inst[module_idP].common_num_sf_alloc); + mcch_flag=1; + if(UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[0]==NULL) + UE_mac_inst[module_idP].common_num_sf_alloc++; + } + } + break; + case 6: + if ((mbsfn_SubframeConfig & (0x100000>>(jj*6))) == (0x100000>>(jj*6))) { + if ((frameP % mcch_period == (mcch_offset+jj)) && ((MCCH_mbsfn_SubframeConfig & (0x100000>>(jj*6))) == (0x100000>>(jj*6)))) { + LOG_D(MAC,"frameP(%d),mcch_period(%ld),mbsfn_SubframeConfig(%x),MCCH_mbsfn_SubframeConfig(%x),mask(%x),jj(%d),num_sf_alloc(%d)\n", + frameP, mcch_period, mbsfn_SubframeConfig, MCCH_mbsfn_SubframeConfig, (0x100000>>(jj*6)), jj, UE_mac_inst[module_idP].common_num_sf_alloc); + mcch_flag=1; + if(UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[0]==NULL) + UE_mac_inst[module_idP].common_num_sf_alloc++; + } + } + break; + case 7: + if ((mbsfn_SubframeConfig & (0x80000>>(jj*6))) == (0x80000>>(jj*6))) { + if ((frameP % mcch_period == (mcch_offset+jj)) && ((MCCH_mbsfn_SubframeConfig & (0x80000>>(jj*6))) == (0x80000>>(jj*6)))) { + LOG_D(MAC,"frameP(%d),mcch_period(%ld),mbsfn_SubframeConfig(%x),MCCH_mbsfn_SubframeConfig(%x),mask(%x),jj(%d),num_sf_alloc(%d)\n", + frameP, mcch_period, mbsfn_SubframeConfig, MCCH_mbsfn_SubframeConfig, (0x80000>>(jj*6)), jj, UE_mac_inst[module_idP].common_num_sf_alloc); + if(UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[0]==NULL) + UE_mac_inst[module_idP].common_num_sf_alloc++; + mcch_flag=1; + } + } + break; + case 8: + if ((mbsfn_SubframeConfig & (0x40000>>(jj*6))) == (0x40000>>(jj*6))) { + if ((frameP % mcch_period == (mcch_offset+jj)) && ((MCCH_mbsfn_SubframeConfig & (0x40000>>(jj*6))) == (0x40000>>(jj*6)))) { + LOG_D(MAC,"frameP(%d),mcch_period(%ld),mbsfn_SubframeConfig(%x),MCCH_mbsfn_SubframeConfig(%x),mask(%x),jj(%d),num_sf_alloc(%d)\n", + frameP, mcch_period, mbsfn_SubframeConfig, MCCH_mbsfn_SubframeConfig, (0x40000>>(jj*6)), jj, UE_mac_inst[module_idP].common_num_sf_alloc); + if(UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[0]==NULL) + UE_mac_inst[module_idP].common_num_sf_alloc++; + mcch_flag=1; + } + } + break; + }// end switch + } else { + // TODO TDD + } + + mtch_mcs = ue_query_p_mch(module_idP, frameP, subframe, &mtch_flag, &msi_flag, &mch_lcid); + + // sf allocation is non-overlapping + if ((msi_flag==1) || (mcch_flag==1) || (mtch_flag==1)) { + LOG_D(MAC,"[UE %d] Frame %d Subframe %d: sync area %d SF alloc %d: msi flag %d, mcch flag %d, mtch flag %d\n", + module_idP, frameP, subframe,i,j,msi_flag,mcch_flag,mtch_flag); + *sync_area=i; + break; + } + } + } + } // end of for - *sync_area = i; - break; - } - } else { // four-frameP format - } - } - } // end of for #if UE_TIMING_TRACE - stop_meas(&UE_mac_inst[module_idP].ue_query_mch); + stop_meas(&UE_mac_inst[module_idP].ue_query_mch); #endif - if ((mcch_flag == 1)) { // || (msi_flag==1)) - *mcch_active = 1; - } + if ((mcch_flag == 1)) { // || (msi_flag==1)) + *mcch_active = 1; + } - if ((mcch_flag == 1) - || ((msi_flag == 1) && (UE_mac_inst[module_idP].mcch_status == 1))) { - return mcch_mcs; - } else if ((mtch_flag == 1) - && (UE_mac_inst[module_idP].msi_status == 1)) { - return UE_mac_inst[module_idP].pmch_Config[0]->dataMCS_r9; + if ( (mcch_flag==1) || ((msi_flag==1) && (UE_mac_inst[module_idP].mcch_status==1)) ) { + if (msi_flag!=1) { + for (i=0; i<8; i++) + UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i] = NULL; + for (i=0; i<15; i++) + UE_mac_inst[module_idP].pmch_Config[i] = NULL; + for (i=0; i<28 ;i++) { + UE_mac_inst[module_idP].pmch_lcids[i] = -1; + UE_mac_inst[module_idP].pmch_stop_mtch[i] = 2047; + UE_mac_inst[module_idP].msi_status_v[i] = 0; + } } else { - return -1; + for (i=0; i<28; i++) { + UE_mac_inst[module_idP].pmch_lcids[i] = -1; + UE_mac_inst[module_idP].pmch_stop_mtch[i] = 2047; + UE_mac_inst[module_idP].msi_status_v[i] = 0; + } } + return mcch_mcs; + } else if ((mtch_flag==1) && (UE_mac_inst[module_idP].msi_status_v[(mch_lcid > 27) ? 27 : mch_lcid] == 1)) { + return mtch_mcs; + } else { + return -1; + } } #endif diff --git a/openair2/RRC/LTE/rrc_UE.c b/openair2/RRC/LTE/rrc_UE.c index c23bf12d52..ecdc451eee 100644 --- a/openair2/RRC/LTE/rrc_UE.c +++ b/openair2/RRC/LTE/rrc_UE.c @@ -4594,10 +4594,30 @@ int decode_MCCH_Message( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB //----------------------------------------------------------------------------- void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_index, frame_t frameP, uint8_t mbsfn_sync_area ) { + uint8_t i; protocol_ctxt_t ctxt; LOG_I(RRC,"[UE %d] Frame %d : Number of MCH(s) in the MBSFN Sync Area %d is %d\n", ue_mod_idP, frameP, mbsfn_sync_area, UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->pmch_InfoList_r9.list.count); + + // Configure commonSF_Alloc + for(i=0; i< UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->commonSF_Alloc_r9.list.count;i++){ + LOG_W(RRC,"[UE %d] Frame %d, commonSF_Alloc_r9: radioframeAllocationPeriod(%ldn),radioframeAllocationOffset(%ld), subframeAllocation(%x,%x,%x)\n", + ue_mod_idP, frameP, + UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->commonSF_Alloc_r9.list.array[i]->radioframeAllocationPeriod<<1, + UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->commonSF_Alloc_r9.list.array[i]->radioframeAllocationOffset, + UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->commonSF_Alloc_r9.list.array[i]->subframeAllocation.choice.oneFrame.buf[0], + UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->commonSF_Alloc_r9.list.array[i]->subframeAllocation.choice.oneFrame.buf[1], + UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->commonSF_Alloc_r9.list.array[i]->subframeAllocation.choice.oneFrame.buf[2]); + UE_mac_inst[ue_mod_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i] = UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->commonSF_Alloc_r9.list.array[i]; + } + LOG_W(RRC,"[UE %d] Frame %d, commonSF_AllocPeriod_r9 %drf \n", + ue_mod_idP, frameP, + 4<commonSF_AllocPeriod_r9); + + // Configure commonSF_AllocPeriod + UE_mac_inst[ue_mod_idP].commonSF_AllocPeriod_r9 = UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->commonSF_AllocPeriod_r9; + // store to MAC/PHY necessary parameters for receiving MTCHs rrc_mac_config_req_ue(ue_mod_idP,0,eNB_index, From 96903ed59ff0c0ecaa20b4eb37d4b37742af8f5d Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Thu, 17 May 2018 12:50:47 +0200 Subject: [PATCH 012/379] Use logical && instead of binary & in phy_procedures_UE_RX() This commit was developed at Fraunhofer IIS (https://www.iis.fraunhofer.de). --- openair1/SCHED_UE/phy_procedures_lte_ue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/SCHED_UE/phy_procedures_lte_ue.c b/openair1/SCHED_UE/phy_procedures_lte_ue.c index f4d3800724..d578ef2a76 100644 --- a/openair1/SCHED_UE/phy_procedures_lte_ue.c +++ b/openair1/SCHED_UE/phy_procedures_lte_ue.c @@ -4716,7 +4716,7 @@ LOG_DEBUG_END if (do_pdcch_flag) { if ((l==pilot1) || - ((pmch_flag==1)&(l==l2))) { + ((pmch_flag==1)&&(l==l2))) { LOG_D(PHY,"[UE %d] Frame %d: Calling pdcch procedures (eNB %d)\n",ue->Mod_id,frame_rx,eNB_id); //start_meas(&ue->rx_pdcch_stats[ue->current_thread_id[subframe_rx]]); From 390c5011a55eebcaa3d59276ceea57c378087e06 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Thu, 17 May 2018 12:54:14 +0200 Subject: [PATCH 013/379] Call ue_measurement_procedures() even for last OFDM sybol in second slot. Also for PMCH subframes, call slot_fep() for first OFDM symbol of next subframe. This commit was developed at Fraunhofer IIS (https://www.iis.fraunhofer.de). --- openair1/SCHED_UE/phy_procedures_lte_ue.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/openair1/SCHED_UE/phy_procedures_lte_ue.c b/openair1/SCHED_UE/phy_procedures_lte_ue.c index d578ef2a76..33c69d7c78 100644 --- a/openair1/SCHED_UE/phy_procedures_lte_ue.c +++ b/openair1/SCHED_UE/phy_procedures_lte_ue.c @@ -2516,7 +2516,7 @@ void ue_measurement_procedures( T_INT((int)ue->common_vars.freq_offset)); } - if (l==(6-ue->frame_parms.Ncp)) { + if (( (slot%2) == 0) && (l==(6-ue->frame_parms.Ncp))) { // make sure we have signal from PSS/SSS for N0 measurement // LOG_I(PHY," l==(6-ue->frame_parms.Ncp) ue_rrc_measurements\n"); @@ -4736,9 +4736,22 @@ LOG_DEBUG_END ue_measurement_procedures(l-1,ue,proc,eNB_id,(subframe_rx<<1),abstraction_flag,mode); 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 this is PMCH, call procedures, do channel estimation for first symbol of next DL subframe and return if (pmch_flag == 1) { ue_pmch_procedures(ue,proc,eNB_id,abstraction_flag); + + int next_subframe_rx = (1+subframe_rx)%10; + if (subframe_select(&ue->frame_parms,next_subframe_rx) != SF_UL) + { + slot_fep(ue, + 0, + (next_subframe_rx<<1), + 0, + 0, + 0); + } + return 0; } @@ -4848,6 +4861,7 @@ LOG_DEBUG_END ue_measurement_procedures(l-1,ue,proc,eNB_id,1+(subframe_rx<<1),abstraction_flag,mode); } // for l=1..l2 + ue_measurement_procedures(l-1,ue,proc,eNB_id,1+(subframe_rx<<1),abstraction_flag,mode); // do first symbol of next downlink subframe for channel estimation int next_subframe_rx = (1+subframe_rx)%10; From 8dd3a1306ad2003c6a2dad229ba3f9725e8bcaab Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Thu, 17 May 2018 12:47:52 +0200 Subject: [PATCH 014/379] Also send MTCH using mac_xface->ue_send_mch_sdu() This commit was developed at Fraunhofer IIS (https://www.iis.fraunhofer.de). --- openair1/SCHED_UE/phy_procedures_lte_ue.c | 35 +++++++++++------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/openair1/SCHED_UE/phy_procedures_lte_ue.c b/openair1/SCHED_UE/phy_procedures_lte_ue.c index 33c69d7c78..ec296a058d 100644 --- a/openair1/SCHED_UE/phy_procedures_lte_ue.c +++ b/openair1/SCHED_UE/phy_procedures_lte_ue.c @@ -3229,25 +3229,24 @@ LOG_DEBUG_END } else { // decoding successful #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) - if (mcch_active == 1) { - ue_send_mch_sdu(ue->Mod_id, - CC_id, - frame_rx, - ue->dlsch_MCH[0]->harq_processes[0]->b, - ue->dlsch_MCH[0]->harq_processes[0]->TBS>>3, - eNB_id,// not relevant in eMBMS context - sync_area); + ue_send_mch_sdu(ue->Mod_id, + CC_id, + frame_rx, + ue->dlsch_MCH[0]->harq_processes[0]->b, + ue->dlsch_MCH[0]->harq_processes[0]->TBS>>3, + eNB_id,// not relevant in eMBMS context + sync_area); + + if (mcch_active == 1) ue->dlsch_mcch_received[sync_area][0]++; - - - if (ue->dlsch_mch_received_sf[subframe_rx%5][0] == 1 ) { - ue->dlsch_mch_received_sf[subframe_rx%5][0]=0; - } else { - ue->dlsch_mch_received[0]+=1; - ue->dlsch_mch_received_sf[subframe_rx][0]=1; - } - - + else + ue->dlsch_mtch_received[sync_area][0]++; + + if (ue->dlsch_mch_received_sf[subframe_rx%5][0] == 1 ) { + ue->dlsch_mch_received_sf[subframe_rx%5][0]=0; + } else { + ue->dlsch_mch_received[0]+=1; + ue->dlsch_mch_received_sf[subframe_rx][0]=1; } #endif // #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) From e239e94154beab5b78b1a61a975f9b207a2b6b83 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Thu, 17 May 2018 13:00:50 +0200 Subject: [PATCH 015/379] Fix PDCP and RLC for MBMS Also add output of MBMS multicast IP packets to the network. This commit was developed at Fraunhofer IIS (https://www.iis.fraunhofer.de) by Javier Morgade, Ph.D. --- openair2/LAYER2/PDCP_v10.1.0/pdcp.c | 68 +++++++++++++++++++++++++---- openair2/LAYER2/RLC/rlc.h | 2 +- openair2/LAYER2/RLC/rlc_rrc.c | 6 ++- 3 files changed, 66 insertions(+), 10 deletions(-) diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index e12fb80e1b..04999bab38 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -30,6 +30,8 @@ #define PDCP_C //#define DEBUG_PDCP_FIFO_FLUSH_SDU +#define MBMS_MULTICAST_OUT + #include "assertions.h" #include "hashtable.h" #include "pdcp.h" @@ -66,6 +68,17 @@ extern int otg_enabled; #include "common/ran_context.h" extern RAN_CONTEXT_t RC; +#ifdef MBMS_MULTICAST_OUT +# include +# include +# include +# include +# include +# include + +static int mbms_socket = -1; +#endif + //----------------------------------------------------------------------------- /* * If PDCP_UNIT_TEST is set here then data flow between PDCP and RLC is broken @@ -758,11 +771,26 @@ pdcp_data_ind( packet_forwarded = FALSE; #endif +#ifdef MBMS_MULTICAST_OUT + if ((MBMS_flagP != 0) && (mbms_socket != -1)) { + struct iphdr *ip_header = (struct iphdr*)&sdu_buffer_pP->data[payload_offset]; + struct udphdr *udp_header = (struct udphdr*)&sdu_buffer_pP->data[payload_offset + sizeof(struct iphdr)]; + struct sockaddr_in dest_addr; + + dest_addr.sin_family = AF_INET; + dest_addr.sin_port = udp_header->dest; + dest_addr.sin_addr.s_addr = ip_header->daddr; + + sendto(mbms_socket, &sdu_buffer_pP->data[payload_offset], sdu_buffer_sizeP - payload_offset, MSG_DONTWAIT, (struct sockaddr*)&dest_addr, sizeof(dest_addr)); + packet_forwarded = TRUE; + } +#endif + if (FALSE == packet_forwarded) { new_sdu_p = get_free_mem_block(sdu_buffer_sizeP - payload_offset + sizeof (pdcp_data_ind_header_t), __func__); if (new_sdu_p) { - if (pdcp_p->rlc_mode == RLC_MODE_AM ) { + if ((MBMS_flagP == 0) && (pdcp_p->rlc_mode == RLC_MODE_AM)) { pdcp_p->last_submitted_pdcp_rx_sn = sequence_number; } @@ -803,7 +831,6 @@ pdcp_data_ind( } - } /* Print octets of incoming data in hexadecimal form */ LOG_D(PDCP, "Following content has been received from RLC (%d,%d)(PDCP header has already been removed):\n", @@ -839,13 +866,14 @@ pdcp_data_ind( #if defined(STOP_ON_IP_TRAFFIC_OVERLOAD) - else { - AssertFatal(0, PROTOCOL_PDCP_CTXT_FMT" PDCP_DATA_IND SDU DROPPED, OUT OF MEMORY \n", - PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p)); - } - + else { + AssertFatal(0, PROTOCOL_PDCP_CTXT_FMT" PDCP_DATA_IND SDU DROPPED, OUT OF MEMORY \n", + PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p)); + } #endif + } + free_mem_block(sdu_buffer_pP, __func__); if (ctxt_pP->enb_flag) { @@ -1458,8 +1486,12 @@ rrc_pdcp_config_asn1_req ( for (j=0; jlist.count; j++) { MBMS_SessionInfo_p = mbms_SessionInfoList_r9_p->list.array[j]; - lc_id = MBMS_SessionInfo_p->sessionId_r9->buf[0]; + if (MBMS_SessionInfo_p->sessionId_r9) + lc_id = MBMS_SessionInfo_p->sessionId_r9->buf[0]; + else + lc_id = MBMS_SessionInfo_p->logicalChannelIdentity_r9; mch_id = MBMS_SessionInfo_p->tmgi_r9.serviceId_r9.buf[2]; //serviceId is 3-octet string +// mch_id = j; // can set the mch_id = i if (ctxt_pP->enb_flag) { @@ -1480,6 +1512,14 @@ rrc_pdcp_config_asn1_req ( } } + LOG_D(PDCP, "lc_id (%02ld) mch_id(%02x,%02x,%02x) drb_id(%ld) action(%d)\n", + lc_id, + MBMS_SessionInfo_p->tmgi_r9.serviceId_r9.buf[0], + MBMS_SessionInfo_p->tmgi_r9.serviceId_r9.buf[1], + MBMS_SessionInfo_p->tmgi_r9.serviceId_r9.buf[2], + drb_id, + action); + pdcp_config_req_asn1 ( ctxt_pP, NULL, // unused for MBMS @@ -2018,6 +2058,12 @@ void pdcp_layer_init(void) #endif } +#ifdef MBMS_MULTICAST_OUT + mbms_socket = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); + if (mbms_socket == -1) + LOG_W(PDCP, "Could not create RAW socket, MBMS packets will not be put to the network\n"); +#endif + LOG_I(PDCP, "PDCP layer has been initialized\n"); pdcp_output_sdu_bytes_to_write=0; @@ -2068,6 +2114,12 @@ void pdcp_layer_cleanup (void) { list_free (&pdcp_sdu_list); hashtable_destroy(pdcp_coll_p); +#ifdef MBMS_MULTICAST_OUT + if(mbms_socket != -1) { + close(mbms_socket); + mbms_socket = -1; + } +#endif } #ifdef PDCP_USE_RT_FIFO diff --git a/openair2/LAYER2/RLC/rlc.h b/openair2/LAYER2/RLC/rlc.h index ff49b2d056..8c557188a2 100644 --- a/openair2/LAYER2/RLC/rlc.h +++ b/openair2/LAYER2/RLC/rlc.h @@ -208,7 +208,7 @@ rlc_mbms_id_t rlc_mbms_lcid2service_session_id_eNB[MAX_eNB][RLC_MAX_MBMS_ #define rlc_mbms_ue_get_lcid_by_rb_id(uE_mOD,rB_iD) rlc_mbms_rbid2lcid_ue[uE_mOD][rB_iD] #define rlc_mbms_ue_set_lcid_by_rb_id(uE_mOD,rB_iD,lOG_cH_iD) do { \ - AssertFatal(rB_iDlist.count; j++) { MBMS_SessionInfo_p = mbms_SessionInfoList_r9_p->list.array[j]; - mbms_session_id = MBMS_SessionInfo_p->sessionId_r9->buf[0]; + if (MBMS_SessionInfo_p->sessionId_r9) + mbms_session_id = MBMS_SessionInfo_p->sessionId_r9->buf[0]; + else + mbms_session_id = MBMS_SessionInfo_p->logicalChannelIdentity_r9; lc_id = mbms_session_id; mbms_service_id = MBMS_SessionInfo_p->tmgi_r9.serviceId_r9.buf[2]; //serviceId is 3-octet string +// mbms_service_id = j; // can set the mch_id = i if (ctxt_pP->enb_flag) { From 93f494f10655a6c27d8e7d9f756f6da5fe68d528 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Thu, 17 May 2018 12:21:39 +0200 Subject: [PATCH 016/379] Fix channel impulse response peak detection when adjusting the timing sync This commit was developed at Fraunhofer IIS (https://www.iis.fraunhofer.de). --- openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c | 4 ++-- openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_ue.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c index 746ef1354f..516cb32999 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c @@ -61,8 +61,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, temp = 0; for (aa=0; aanb_antennas_rx; aa++) { - Re = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[(i<<2)]; - Im = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[1+(i<<2)]; + Re = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[(i<<1)]; + Im = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[1+(i<<1)]; temp += (Re*Re/2) + (Im*Im/2); } diff --git a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_ue.c b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_ue.c index 19461d7cee..c912c88934 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_ue.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_ue.c @@ -62,8 +62,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, temp = 0; for (aa=0; aanb_antennas_rx; aa++) { - Re = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[(i<<2)]; - Im = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[1+(i<<2)]; + Re = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[(i<<1)]; + Im = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[1+(i<<1)]; temp += (Re*Re/2) + (Im*Im/2); } From 781fb9b9ca7232fe8c5a1852e1ee75e2134a0a87 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Thu, 17 May 2018 13:02:31 +0200 Subject: [PATCH 017/379] Reduce network latency by using netif_rx_ni() instead of netif_rx() in non-interrupt context This commit was developed at Fraunhofer IIS (https://www.iis.fraunhofer.de). --- openair2/NETWORK_DRIVER/LITE/common.c | 2 +- openair2/NETWORK_DRIVER/MESH/common.c | 2 +- openair2/NETWORK_DRIVER/UE_IP/common.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openair2/NETWORK_DRIVER/LITE/common.c b/openair2/NETWORK_DRIVER/LITE/common.c index 0d616d5764..2ae6f5279d 100644 --- a/openair2/NETWORK_DRIVER/LITE/common.c +++ b/openair2/NETWORK_DRIVER/LITE/common.c @@ -333,7 +333,7 @@ void oai_nw_drv_common_class_wireless2ip(uint16_t dlen, printk("\n"); #endif //OAI_DRV_DEBUG_RECEIVE - netif_rx(skb); + netif_rx_ni(skb); #ifdef OAI_DRV_DEBUG_RECEIVE printk("[OAI_IP_DRV][%s] end\n",__FUNCTION__); #endif diff --git a/openair2/NETWORK_DRIVER/MESH/common.c b/openair2/NETWORK_DRIVER/MESH/common.c index d380b8a4d8..1c7b8e4d12 100644 --- a/openair2/NETWORK_DRIVER/MESH/common.c +++ b/openair2/NETWORK_DRIVER/MESH/common.c @@ -309,7 +309,7 @@ void nas_COMMON_receive(uint16_t dlen, printk("\n"); #endif //NAS_DEBUG_RECEIVE - netif_rx(skb); + netif_rx_ni(skb); #ifdef NAS_DEBUG_RECEIVE printk("NAS_COMMON_RECEIVE: end\n"); #endif diff --git a/openair2/NETWORK_DRIVER/UE_IP/common.c b/openair2/NETWORK_DRIVER/UE_IP/common.c index 84f425ef3c..b21ca5f2dc 100644 --- a/openair2/NETWORK_DRIVER/UE_IP/common.c +++ b/openair2/NETWORK_DRIVER/UE_IP/common.c @@ -222,7 +222,7 @@ skb_p->mark = rb_idP; printk("\n"); #endif //OAI_DRV_DEBUG_RECEIVE - netif_rx(skb_p); + netif_rx_ni(skb_p); #ifdef OAI_DRV_DEBUG_RECEIVE printk("[UE_IP_DRV][%s] end\n",__FUNCTION__); #endif From cd79a52c2281aa119e5c8ca1519ad64c074d6bb4 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Thu, 17 May 2018 13:15:53 +0200 Subject: [PATCH 018/379] In phy_procedures_UE_RX() really only process the first 5 (not 6) OFDM symbols for S-subframes This commit was developed at Fraunhofer IIS (https://www.iis.fraunhofer.de). --- openair1/SCHED_UE/phy_procedures_lte_ue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair1/SCHED_UE/phy_procedures_lte_ue.c b/openair1/SCHED_UE/phy_procedures_lte_ue.c index ec296a058d..02f3e5aaac 100644 --- a/openair1/SCHED_UE/phy_procedures_lte_ue.c +++ b/openair1/SCHED_UE/phy_procedures_lte_ue.c @@ -4185,7 +4185,7 @@ LOG_DEBUG_END if (subframe_select(&ue->frame_parms,subframe_rx) == SF_S) { // S-subframe, do first 5 symbols only - l2 = 5; + l2 = 4; } else if (pmch_flag == 1) { // do first 2 symbols only l2 = 1; } else { // normal subframe, last symbol to be processed is the first of the second slot @@ -4671,7 +4671,7 @@ LOG_DEBUG_END if (subframe_select(&ue->frame_parms,subframe_rx) == SF_S) { // S-subframe, do first 5 symbols only - l2 = 5; + l2 = 4; } else if (pmch_flag == 1) { // do first 2 symbols only l2 = 1; } else { // normal subframe, last symbol to be processed is the first of the second slot From be0e409594752f15205db38960e02a509caf2706 Mon Sep 17 00:00:00 2001 From: Eino Virtanen Date: Tue, 24 Jul 2018 15:17:36 +0200 Subject: [PATCH 019/379] USRP addressess and clock sources can be configured in the configuration file with the RU section with comma separated IP addresses in 'sdr_addrs' and with strings "internal"/"external"/"gpsdo" in 'clock_src'. TODO: Currently the driver picks the two first RX and TX channels when nb_tx and nb_rx are both set to 2. If a developers wants to force usage of two devices, 'set_rx_subdev_spec' and 'set_tx_subdev_spec' can be used to indicate to the driver so that antennas from separate devices will be used. To rephrase: until 4 antennas are supported by OAI, testing with two devices, so that antennas from both devices are used, requires manual configuration of which subdevices' antennas are used. Conflicts: targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp --- openair2/ENB_APP/enb_paramdef.h | 6 ++ targets/ARCH/COMMON/common_lib.h | 2 + targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 69 +++++++++++++++----- targets/RT/USER/lte-ru.c | 18 +++++ 4 files changed, 77 insertions(+), 18 deletions(-) diff --git a/openair2/ENB_APP/enb_paramdef.h b/openair2/ENB_APP/enb_paramdef.h index 23b4c2a837..32f7f28a37 100755 --- a/openair2/ENB_APP/enb_paramdef.h +++ b/openair2/ENB_APP/enb_paramdef.h @@ -102,6 +102,8 @@ typedef enum { #define CONFIG_STRING_RU_MAX_RXGAIN "max_rxgain" #define CONFIG_STRING_RU_IF_COMPRESSION "if_compression" #define CONFIG_STRING_RU_NBIOTRRC_LIST "NbIoT_RRC_instances" +#define CONFIG_STRING_RU_SDR_ADDRS "sdr_addrs" +#define CONFIG_STRING_RU_SDR_CLK_SRC "clock_src" #define RU_LOCAL_IF_NAME_IDX 0 #define RU_LOCAL_ADDRESS_IDX 1 @@ -121,6 +123,8 @@ typedef enum { #define RU_ATT_TX_IDX 15 #define RU_ATT_RX_IDX 16 #define RU_NBIOTRRC_LIST_IDX 17 +#define RU_SDR_ADDRS 18 +#define RU_SDR_CLK_SRC 19 @@ -147,6 +151,8 @@ typedef enum { {CONFIG_STRING_RU_ATT_TX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ {CONFIG_STRING_RU_ATT_RX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ {CONFIG_STRING_RU_NBIOTRRC_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFENBS, TYPE_INTARRAY, 1}, \ +{CONFIG_STRING_RU_SDR_ADDRS, NULL, 0, strptr:NULL, defstrval:"0.0.0.0", TYPE_STRING, 0}, \ +{CONFIG_STRING_RU_SDR_CLK_SRC, NULL, 0, strptr:NULL, defstrval:"internal", TYPE_STRING, 0}, \ } /*---------------------------------------------------------------------------------------------------------------------------------------*/ diff --git a/targets/ARCH/COMMON/common_lib.h b/targets/ARCH/COMMON/common_lib.h index 433e29e97d..0ef3cd233f 100644 --- a/targets/ARCH/COMMON/common_lib.h +++ b/targets/ARCH/COMMON/common_lib.h @@ -199,6 +199,8 @@ typedef struct { double tx_bw; //! clock source clock_source_t clock_source; + //! Manual SDR IP address + char *sdr_addrs; //! Auto calibration flag int autocal[4]; //! rf devices work with x bits iqs when oai have its own iq format diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index e2ecaed044..0c02075a1d 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -950,11 +950,15 @@ int trx_usrp_recplay_config_init(paramdef_t *usrp_recplay_params) { #endif extern "C" { - /*! \brief Initialize Openair USRP target. It returns 0 if OK - * \param device the hardware to use - * \param openair0_cfg RF frontend parameters set by application - */ - int device_init(openair0_device* device, openair0_config_t *openair0_cfg) { + /*! \brief Initialize Openair USRP target. It returns 0 if OK + * \param device the hardware to use + * \param openair0_cfg RF frontend parameters set by application + */ + int device_init(openair0_device* device, openair0_config_t *openair0_cfg) { + + LOG_D(PHY, "openair0_cfg[0].sdr_addrs == '%s'\n", openair0_cfg[0].sdr_addrs); + LOG_D(PHY, "openair0_cfg[0].clock_source == '%d'\n", openair0_cfg[0].clock_source); + #if defined(USRP_REC_PLAY) paramdef_t usrp_recplay_params[7]; struct sysinfo systeminfo; @@ -1022,8 +1026,30 @@ extern "C" { // Initialize USRP device device->openair0_cfg = openair0_cfg; - std::string args = "type=b200"; - uhd::device_addrs_t device_adds = uhd::device::find(args); + std::string args = "type=b200"; + + char *addr_args = NULL; + // Check whether sdr_addrs is set in the config or not + if (openair0_cfg[0].sdr_addrs != NULL) { + if (strcmp(openair0_cfg[0].sdr_addrs, "0.0.0.0") != 0) { + // Check whether sdr_addrs contains multiple IP addresses + // and split and add them to addr_args + if (strstr(openair0_cfg[0].sdr_addrs, ",") != NULL) { + char *addr0 = openair0_cfg[0].sdr_addrs; + // Replace , with \0 + strsep(&openair0_cfg[0].sdr_addrs, ","); + char *addr1 = openair0_cfg[0].sdr_addrs; + // Allocate memory for ",addr0=,addr1=\0" and the addresses + size_t addr_args_len = sizeof(char)*(15 + strlen(addr0) + strlen(addr1)); + addr_args = (char *)malloc(addr_args_len); + snprintf(addr_args, addr_args_len, ",addr0=%s,addr1=%s", addr0, addr1); + args += addr_args; + LOG_D(PHY, "addr_args == '%s'\n", addr_args); + } + } + } + + uhd::device_addrs_t device_adds = uhd::device::find(args); int vers=0,subvers=0,subsubvers=0; int bw_gain_adjust=0; @@ -1037,12 +1063,17 @@ extern "C" { LOG_I(PHY,"Checking for USRPs : UHD %s (%d.%d.%d)\n", uhd::get_version_string().c_str(),vers,subvers,subsubvers); - if(device_adds.size() == 0) { - double usrp_master_clock = 184.32e6; - std::string args = "type=x300"; + if(device_adds.size() == 0) { - // workaround for an api problem, master clock has to be set with the constructor not via set_master_clock_rate - args += boost::str(boost::format(",master_clock_rate=%f") % usrp_master_clock); + double usrp_master_clock = 184.32e6; + std::string args = "type=x300"; + + if (addr_args) { + args += addr_args; + } + + // workaround for an api problem, master clock has to be set with the constructor not via set_master_clock_rate + args += boost::str(boost::format(",master_clock_rate=%f") % usrp_master_clock); // args += ",num_send_frames=256,num_recv_frames=256, send_frame_size=4096, recv_frame_size=4096"; uhd::device_addrs_t device_adds = uhd::device::find(args); @@ -1232,12 +1263,14 @@ extern "C" { } } - for(int i=0; iusrp->get_tx_num_channels(); i++) { - ::uhd::gain_range_t gain_range_tx = s->usrp->get_tx_gain_range(i); - if (iusrp->set_tx_rate(openair0_cfg[0].sample_rate,i); - s->usrp->set_tx_freq(openair0_cfg[0].tx_freq[i],i); - s->usrp->set_tx_gain(gain_range_tx.stop()-openair0_cfg[0].tx_gain[i],i); + LOG_D(PHY, "usrp->get_tx_num_channels() == %d\n", s->usrp->get_tx_num_channels()); + LOG_D(PHY, "openair0_cfg[0].tx_num_channels == %d\n", openair0_cfg[0].tx_num_channels); + for(int i=0; iusrp->get_tx_num_channels(); i++) { + ::uhd::gain_range_t gain_range_tx = s->usrp->get_tx_gain_range(i); + if (iusrp->set_tx_rate(openair0_cfg[0].sample_rate,i); + s->usrp->set_tx_freq(openair0_cfg[0].tx_freq[i],i); + s->usrp->set_tx_gain(gain_range_tx.stop()-openair0_cfg[0].tx_gain[i],i); LOG_I(PHY,"USRP TX_GAIN:%3.2lf gain_range:%3.2lf tx_gain:%3.2lf\n", gain_range_tx.stop()-openair0_cfg[0].tx_gain[i], gain_range_tx.stop(), openair0_cfg[0].tx_gain[i]); } diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index 891dd9e272..40906f09ce 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -2837,6 +2837,24 @@ void RCconfig_RU(void) { RC.ru[j]->num_eNB = 0; for (i=0;inum_eNB;i++) RC.ru[j]->eNB_list[i] = RC.eNB[RUParamList.paramarray[j][RU_ENB_LIST_IDX].iptr[i]][0]; + if (config_isparamset(RUParamList.paramarray[j], RU_SDR_ADDRS)) { + RC.ru[j]->openair0_cfg.sdr_addrs = strdup(*(RUParamList.paramarray[j][RU_SDR_ADDRS].strptr)); + } + + if (config_isparamset(RUParamList.paramarray[j], RU_SDR_CLK_SRC)) { + if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "internal") == 0) { + RC.ru[j]->openair0_cfg.clock_source = internal; + LOG_D(PHY, "RU clock source set as internal\n"); + } else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "external") == 0) { + RC.ru[j]->openair0_cfg.clock_source = external; + LOG_D(PHY, "RU clock source set as external\n"); + } else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "gpsdo") == 0) { + RC.ru[j]->openair0_cfg.clock_source = gpsdo; + LOG_D(PHY, "RU clock source set as gpsdo\n"); + } else { + LOG_E(PHY, "Erroneous RU clock source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr)); + } + } if (strcmp(*(RUParamList.paramarray[j][RU_LOCAL_RF_IDX].strptr), "yes") == 0) { if ( !(config_isparamset(RUParamList.paramarray[j],RU_LOCAL_IF_NAME_IDX)) ) { From 86f4d8c18f626bf62acf8b49fc72b2d03307990e Mon Sep 17 00:00:00 2001 From: Rajeev Gangula Date: Mon, 20 Aug 2018 14:17:19 +0200 Subject: [PATCH 020/379] Remiving CQI scheduling on special SFs. --- openair2/LAYER2/MAC/eNB_scheduler_fairRR.c | 32 ++++++++++++++++------ openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 20 ++++++++++++-- 2 files changed, 41 insertions(+), 11 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c index 1acf657220..eda84adbab 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c @@ -1696,9 +1696,9 @@ schedule_ue_spec_fairRR(module_id_t module_idP, // this is the normalized RX power eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id]; - /* TODO: fix how we deal with power, unit is not dBm, it's special from nfapi */ - normalized_rx_power = ue_sched_ctl->pucch1_snr[CC_id]; - target_rx_power = 208; + /* Unit is not dBm, it's special from nfapi */ + normalized_rx_power = (5*ue_sched_ctl->pucch1_snr[CC_id]-640)/10+30;//(+eNB->measurements.n0_power_dB[0]) + target_rx_power= eNB->puCch10xSnr/10 + 30;//(+eNB->measurements.n0_power_dB[0]) // this assumes accumulated tpc // make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out @@ -2690,9 +2690,25 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, if (status < RRC_CONNECTED) cqi_req = 0; else if (UE_sched_ctrl->cqi_req_timer>30) { - cqi_req = 1; - UE_sched_ctrl->cqi_req_timer=0; - UE_sched_ctrl->cqi_req_flag |= 1 << sched_subframeP; + cqi_req = 1; + // To be safe , do not ask CQI in special SFs:36.213/7.2.3 CQI definition + if (cc->tdd_Config) { + switch (cc->tdd_Config->subframeAssignment) { + case 1: + if( subframeP == 1 || subframeP == 6 ) cqi_req=0; + break; + case 3: + if( subframeP == 1 ) cqi_req=0; + break; + default: + LOG_E(MAC," TDD config not supported\n"); + break; + } + } + if(cqi_req == 1){ + UE_sched_ctrl->cqi_req_timer=0; + UE_sched_ctrl->cqi_req_flag |= 1 << sched_subframeP; + } } else cqi_req = 0; @@ -2701,8 +2717,8 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, //compute the expected ULSCH RX power (for the stats) // this is the normalized RX power and this should be constant (regardless of mcs - normalized_rx_power = UE_sched_ctrl->pusch_snr[CC_id]; - target_rx_power = 178; + normalized_rx_power = (5*UE_sched_ctrl->pusch_snr[CC_id]-640)/10+30; //(+eNB->measurements.n0_power_dB[0]) + target_rx_power= eNB->puSch10xSnr/10 + 30; //(+eNB->measurements.n0_power_dB[0]) // this assumes accumulated tpc // make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 04415a8386..caed575b48 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -1337,10 +1337,24 @@ schedule_ulsch_rnti(module_id_t module_idP, if (status >= RRC_CONNECTED && UE_sched_ctrl->cqi_req_timer > 30) { if (UE_sched_ctrl->cqi_received == 0) { if (nfapi_mode) { - cqi_req = 0; + cqi_req = 0; } else { - cqi_req = 1; - UE_sched_ctrl->cqi_req_flag |= 1 << sched_subframeP; + cqi_req = 1; + // To be safe , do not ask CQI in special Subframes:36.213/7.2.3 CQI definition + if (cc[CC_id].tdd_Config) { + switch (cc[CC_id].tdd_Config->subframeAssignment) { + case 1: + if( subframeP == 1 || subframeP == 6 ) cqi_req=0; + break; + case 3: + if( subframeP == 1 ) cqi_req=0; + break; + default: + LOG_E(MAC," TDD config not supported\n"); + break; + } + } + if(cqi_req == 1) UE_sched_ctrl->cqi_req_flag |= 1 << sched_subframeP; } } else if (UE_sched_ctrl->cqi_received == 1) { From f1e041ad98ecfef28f4571557ca47ce114a1e432 Mon Sep 17 00:00:00 2001 From: WANG Tsu-Han Date: Tue, 21 Aug 2018 15:18:05 +0200 Subject: [PATCH 021/379] bug fix for 25RBs with new modulation scheme and add config for 5 & 10 MHz with phy-test --- openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c | 7 ++++--- openair2/LAYER2/MAC/eNB_scheduler_phytest.c | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c index 6f1913ff91..0bd28b6827 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c @@ -2423,7 +2423,7 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, * with above code that needs to be analyzed and fixed. In the * meantime, let's use the generic function. */ - allocate_REs = allocate_REs_in_RB; + //allocate_REs = allocate_REs_in_RB; break; } @@ -2432,7 +2432,7 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, * previous version. Some more work/validation is needed before * we switch to the new version. */ - allocate_REs = allocate_REs_in_RB; + //allocate_REs = allocate_REs_in_RB; switch (mod_order1) { case 2: @@ -2485,7 +2485,8 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, skip_half = check_skiphalf(rb,subframe_offset,frame_parms,l,nsymb); skip_dc = check_skip_dc(rb,frame_parms); - + if(skip_half>0) + allocate_REs = allocate_REs_in_RB; if (dlsch0) { diff --git a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c index 49cc68b06a..71449e3cd4 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c @@ -202,7 +202,8 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s int32_t normalized_rx_power; int32_t target_rx_power= 178; int CC_id = 0; - int nb_rb = 96; + int nb_rb; + int N_RB_UL; eNB_MAC_INST *mac = RC.mac[module_idP]; COMMON_channels_t *cc = &mac->common_channels[0]; UE_list_t *UE_list=&mac->UE_list; @@ -222,6 +223,18 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s //nfapi_ul_config_request_pdu_t *ul_config_pdu = &ul_req->ul_config_pdu_list[0];; nfapi_ul_config_request_body_t *ul_req = &mac->UL_req[CC_id].ul_config_request_body; + N_RB_UL = to_prb(cc->mib->message.dl_Bandwidth); + switch(N_RB_UL){ + case 100: + nb_rb = 96; + break; + case 50: + nb_rb = 48; + break; + case 25: + nb_rb = 24; + break; + } mac->UL_req[CC_id].sfn_sf = (sched_frame<<4) + sched_subframe; hi_dci0_req->sfn_sf = (frameP << 4) + subframeP; From 7fed2bec9d59d2f3d0ba62a07c084941216e2200 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Tue, 21 Aug 2018 08:03:14 -0700 Subject: [PATCH 022/379] disabling new modulation for 25PRB --- openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c index 0bd28b6827..d18f0c2cd3 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c @@ -2432,7 +2432,8 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, * previous version. Some more work/validation is needed before * we switch to the new version. */ - //allocate_REs = allocate_REs_in_RB; + if (frame_parms->N_RB_DL==25) + allocate_REs = allocate_REs_in_RB; switch (mod_order1) { case 2: @@ -2485,9 +2486,6 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, skip_half = check_skiphalf(rb,subframe_offset,frame_parms,l,nsymb); skip_dc = check_skip_dc(rb,frame_parms); - if(skip_half>0) - allocate_REs = allocate_REs_in_RB; - if (dlsch0) { if (dlsch0_harq->Nlayers>1) { From 40942e34a0d7d65725f853d4745f7c71b09d410e Mon Sep 17 00:00:00 2001 From: Konstantinos Alexandris Date: Wed, 22 Aug 2018 15:32:22 +0200 Subject: [PATCH 023/379] Initial commit on X2AP (add target eNBs as input) --- cmake_targets/CMakeLists.txt | 14 ++- openair2/COMMON/x2ap_messages_def.h | 21 ++++ openair2/COMMON/x2ap_messages_types.h | 152 ++++++++++++++++++++++++++ openair2/ENB_APP/enb_app.c | 35 ++++++ openair2/ENB_APP/enb_config.c | 145 ++++++++++++++++++++++++ openair2/ENB_APP/enb_config.h | 1 + openair2/ENB_APP/enb_paramdef.h | 49 ++++++++- openair2/X2AP/x2ap_common.c | 6 +- 8 files changed, 416 insertions(+), 7 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 17e2072d00..4c33eee8e4 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -474,6 +474,16 @@ add_library(X2AP_LIB include_directories ("${X2AP_C_DIR}") include_directories ("${X2AP_DIR}") +#add_library(X2AP_ENB + # ${X2AP_DIR}/x2ap_eNB.c + # ${X2AP_DIR}/x2ap_eNB_decoder.c + # ${X2AP_DIR}/x2ap_eNB_encoder.c + # ${X2AP_DIR}/x2ap_eNB_handler.c + # ${X2AP_DIR}/x2ap_eNB_itti_messaging.c + # ${X2AP_DIR}/x2ap_eNB_management_procedures.c + # ${X2AP_DIR}/x2ap_eNB_generate_messages.c + # ) + # Hardware dependant options ################################### add_list1_option(NB_ANTENNAS_RX "2" "Number of antennas in reception" "1" "2" "4") @@ -1933,7 +1943,7 @@ add_executable(lte-softmodem target_link_libraries (lte-softmodem -Wl,--start-group - RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2 + RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -Wl,--end-group z dl) @@ -2009,7 +2019,7 @@ add_executable(lte-uesoftmodem target_link_libraries (lte-uesoftmodem -Wl,--start-group - RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU + RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -Wl,--end-group z dl) diff --git a/openair2/COMMON/x2ap_messages_def.h b/openair2/COMMON/x2ap_messages_def.h index 4690bba42e..36842c13d0 100644 --- a/openair2/COMMON/x2ap_messages_def.h +++ b/openair2/COMMON/x2ap_messages_def.h @@ -19,3 +19,24 @@ * contact@openairinterface.org */ +/* eNB application layer -> X2AP messages */ +/* ITTI LOG messages */ +/* ENCODER */ +MESSAGE_DEF(X2AP_RESET_REQUST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , x2ap_reset_request_log) +MESSAGE_DEF(X2AP_RESOURCE_STATUS_RESPONSE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , x2ap_resource_status_response_log) +MESSAGE_DEF(X2AP_RESOURCE_STATUS_FAILURE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , x2ap_resource_status_failure_log) + +/* Messages for X2AP logging */ +MESSAGE_DEF(X2AP_SETUP_REQUEST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , x2ap_setup_request_log) + + +/* eNB application layer -> X2AP messages */ +MESSAGE_DEF(X2AP_REGISTER_ENB_REQ , MESSAGE_PRIORITY_MED, x2ap_register_enb_req_t , x2ap_register_enb_req) + +/* X2AP -> eNB application layer messages */ +MESSAGE_DEF(X2AP_REGISTER_ENB_CNF , MESSAGE_PRIORITY_MED, x2ap_register_enb_cnf_t , x2ap_register_enb_cnf) +MESSAGE_DEF(X2AP_DEREGISTERED_ENB_IND , MESSAGE_PRIORITY_MED, x2ap_deregistered_enb_ind_t , x2ap_deregistered_enb_ind) + +/* handover messages X2AP <-> RRC */ +MESSAGE_DEF(X2AP_HANDOVER_REQ , MESSAGE_PRIORITY_MED, x2ap_handover_req_t , x2ap_handover_req) +MESSAGE_DEF(X2AP_HANDOVER_REQ_ACK , MESSAGE_PRIORITY_MED, x2ap_handover_req_ack_t , x2ap_handover_req_ack) diff --git a/openair2/COMMON/x2ap_messages_types.h b/openair2/COMMON/x2ap_messages_types.h index 4690bba42e..d3c324a35c 100644 --- a/openair2/COMMON/x2ap_messages_types.h +++ b/openair2/COMMON/x2ap_messages_types.h @@ -19,3 +19,155 @@ * contact@openairinterface.org */ +#ifndef X2AP_MESSAGES_TYPES_H_ +#define X2AP_MESSAGES_TYPES_H_ + +#include "PhysCellId.h" + +//-------------------------------------------------------------------------------------------// +// Defines to access message fields. + +#define X2AP_REGISTER_ENB_REQ(mSGpTR) (mSGpTR)->ittiMsg.x2ap_register_enb_req +#define X2AP_HANDOVER_REQ(mSGpTR) (mSGpTR)->ittiMsg.x2ap_handover_req +#define X2AP_HANDOVER_REQ_ACK(mSGpTR) (mSGpTR)->ittiMsg.x2ap_handover_req_ack +#define X2AP_REGISTER_ENB_CNF(mSGpTR) (mSGpTR)->ittiMsg.x2ap_register_enb_cnf +#define X2AP_DEREGISTERED_ENB_IND(mSGpTR) (mSGpTR)->ittiMsg.x2ap_deregistered_enb_ind + + +#define X2AP_MAX_NB_ENB_IP_ADDRESS 2 + +// eNB application layer -> X2AP messages +typedef struct x2ap_register_enb_req_s { + /* Unique eNB_id to identify the eNB within EPC. + * For macro eNB ids this field should be 20 bits long. + * For home eNB ids this field should be 28 bits long. + */ + uint32_t eNB_id; + /* The type of the cell */ + enum cell_type_e cell_type; + + /* Optional name for the cell + * NOTE: the name can be NULL (i.e no name) and will be cropped to 150 + * characters. + */ + char *eNB_name; + + /* Tracking area code */ + uint16_t tac; + + /* Mobile Country Code + * Mobile Network Code + */ + uint16_t mcc; + uint16_t mnc; + uint8_t mnc_digit_length; + + /* + * EARFCN + */ + uint16_t fdd_uL_EARFCN; + uint16_t fdd_dL_EARFCN; + uint16_t tdd_EARFCN; + + + uint16_t fdd_uL_Transmission_Bandwidth; + uint16_t fdd_dL_Transmission_Bandwidth; + uint16_t tdd_Transmission_Bandwidth; + + + /* The local eNB IP address to bind */ + net_ip_address_t enb_x2_ip_address; + + /* Nb of MME to connect to */ + uint8_t nb_x2; + + /* List of target eNB to connect to for X2*/ + net_ip_address_t target_enb_x2_ip_address[X2AP_MAX_NB_ENB_IP_ADDRESS]; + + /* Number of SCTP streams used for associations */ + uint16_t sctp_in_streams; + uint16_t sctp_out_streams; +} x2ap_register_enb_req_t; + +//-------------------------------------------------------------------------------------------// +// X2AP -> eNB application layer messages +typedef struct x2ap_register_enb_cnf_s { + /* Nb of connected eNBs*/ + uint8_t nb_x2; +} x2ap_register_enb_cnf_t; + +typedef struct x2ap_deregistered_enb_ind_s { + /* Nb of connected eNBs */ + uint8_t nb_x2; +} x2ap_deregistered_enb_ind_t; + +//-------------------------------------------------------------------------------------------// +// X2AP <-> RRC +typedef struct x2ap_gummei_s { + uint16_t mcc; + uint16_t mnc; + uint8_t mnc_len; + uint8_t mme_code; + uint16_t mme_group_id; +} x2ap_gummei_t; + +typedef struct x2ap_lastvisitedcell_info_s { + uint16_t mcc; + uint16_t mnc; + uint8_t mnc_len; + PhysCellId_t target_physCellId; + cell_type_t cell_type; + uint64_t time_UE_StayedInCell; +}x2ap_lastvisitedcell_info_t; + +//used for src +typedef struct x2ap_handover_req_s { + int source_rnti; /* TODO: to be fixed/remove */ + int source_x2id; /* TODO: to be fixed/remove */ + + unsigned old_eNB_ue_s1ap_id:24; + + PhysCellId_t target_physCellId; + + x2ap_gummei_t ue_gummei; + + /*UE-ContextInformation */ + + /* MME UE id */ + uint32_t mme_ue_s1ap_id; + + security_capabilities_t security_capabilities; + + uint8_t kenb[32]; // keNB or keNB* + + /*next_hop_chaining_coun */ + long int kenb_ncc; + + /* UE aggregate maximum bitrate */ + ambr_t ue_ambr; + + uint8_t nb_e_rabs_tobesetup; + + /* list of e_rab setup-ed by RRC layers */ + e_rab_setup_t e_rabs_tobesetup[S1AP_MAX_E_RAB]; + + /* ue_context_pP->ue_context.e_rab[i].param.sgw_addr; */ + + x2ap_lastvisitedcell_info_t lastvisitedcell_info; + + /* TODO: this parameter has to be removed */ + int target_mod_id; +} x2ap_handover_req_t; + +typedef struct x2ap_handover_req_ack_s { + int source_rnti; /* TODO: to be fixed/remove */ + int source_x2id; /* TODO: to be fixed/remove */ + /* TODO: this parameter has to be removed */ + int target_mod_id; + uint8_t rrc_buffer[1024 /* arbitrary, big enough */]; + int rrc_buffer_size; + + uint32_t mme_ue_s1ap_id; +} x2ap_handover_req_ack_t; + +#endif /* X2AP_MESSAGES_TYPES_H_ */ diff --git a/openair2/ENB_APP/enb_app.c b/openair2/ENB_APP/enb_app.c index 40c6aeac44..2857c5e3d4 100644 --- a/openair2/ENB_APP/enb_app.c +++ b/openair2/ENB_APP/enb_app.c @@ -46,6 +46,10 @@ # include "gtpv1u_eNB_task.h" # endif +//# include "x2ap_eNB.h" +# include "x2ap_messages_types.h" +# define X2AP_ENB_REGISTER_RETRY_DELAY 10 + #include "openair1/PHY/INIT/phy_init.h" extern unsigned char NB_eNB_INST; #endif @@ -135,6 +139,30 @@ static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end)//, # endif #endif +/*------------------------------------------------------------------------------*/ +static uint32_t eNB_app_register_x2(uint32_t enb_id_start, uint32_t enb_id_end) +{ + uint32_t enb_id; + MessageDef *msg_p; + uint32_t register_enb_x2_pending = 0; + + for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) { + + { + + msg_p = itti_alloc_new_message (TASK_ENB_APP, X2AP_REGISTER_ENB_REQ); + + RCconfig_X2(msg_p, enb_id); + + //itti_send_msg_to_task (TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p); + + register_enb_x2_pending++; + } + } + + return register_enb_x2_pending; +} + /*------------------------------------------------------------------------------*/ void *eNB_app_task(void *args_p) { @@ -147,6 +175,9 @@ void *eNB_app_task(void *args_p) uint32_t registered_enb; long enb_register_retry_timer_id; # endif + uint32_t x2_register_enb_pending; + //uint32_t x2_registered_enb; + //long x2_enb_register_retry_timer_id; uint32_t enb_id; MessageDef *msg_p = NULL; instance_t instance; @@ -192,6 +223,10 @@ void *eNB_app_task(void *args_p) itti_send_msg_to_task(TASK_L2L1, INSTANCE_DEFAULT, msg_p); # endif + /* Try to register each eNB with each other */ + // x2_registered_enb = 0; + x2_register_enb_pending = eNB_app_register_x2 (enb_id_start, enb_id_end); + do { // Wait for a message itti_receive_msg (TASK_ENB_APP, &msg_p); diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 2b6931effa..9f2b4137a4 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -2419,6 +2419,151 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i) { return 0; } +int RCconfig_X2(MessageDef *msg_p, uint32_t i) +{ + int j, k, l; + + int enb_id; + + char *address = NULL; + char *cidr = NULL; + + paramdef_t ENBSParams[] = ENBSPARAMS_DESC; + paramdef_t ENBParams[] = ENBPARAMS_DESC; + paramlist_def_t ENBParamList = {ENB_CONFIG_STRING_ENB_LIST,NULL,0}; + + /* get global parameters, defined outside any section in the config file */ + config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); +/*#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME) + if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) { + asn_debug = 0; + asn1_xer_print = 0; + } else if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO) == 0) { + asn_debug = 1; + asn1_xer_print = 1; + } else if (strcasecmp(*(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr) , ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING) == 0) { + asn_debug = 1; + asn1_xer_print = 2; + } else { + asn_debug = 0; + asn1_xer_print = 0; + } +#endif */ + + AssertFatal(i < ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt, + "Failed to parse config file %s, %uth attribute %s \n", + RC.config_file_name, i, ENB_CONFIG_STRING_ACTIVE_ENBS); + + if (ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt > 0) { + // Output a list of all eNBs. + config_getlist( &ENBParamList,ENBParams,sizeof(ENBParams)/sizeof(paramdef_t),NULL); + if (ENBParamList.numelt > 0) { + for (k = 0; k < ENBParamList.numelt; k++) { + if (ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr == NULL) { + // Calculate a default eNB ID +# if defined(ENABLE_USE_MME) + uint32_t hash; + + hash = s1ap_generate_eNB_id (); + enb_id = k + (hash & 0xFFFF8); +# else + enb_id = k; +# endif + } else { + enb_id = *(ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr); + } + + // search if in active list + for (j = 0; j < ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt; j++) { + if (strcmp(ENBSParams[ENB_ACTIVE_ENBS_IDX].strlistptr[j], *(ENBParamList.paramarray[k][ENB_ENB_NAME_IDX].strptr)) == 0) { + + paramdef_t X2Params[] = X2PARAMS_DESC; + paramlist_def_t X2ParamList = {ENB_CONFIG_STRING_TARGET_ENB_X2_IP_ADDRESS,NULL,0}; + + paramdef_t SCTPParams[] = SCTPPARAMS_DESC; + paramdef_t NETParams[] = NETPARAMS_DESC; + char aprefix[MAX_OPTNAME_SIZE*2 + 8]; + + /* Some default/random parameters */ + + X2AP_REGISTER_ENB_REQ (msg_p).eNB_id = enb_id; + + if (strcmp(*(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr), "CELL_MACRO_ENB") == 0) { + X2AP_REGISTER_ENB_REQ (msg_p).cell_type = CELL_MACRO_ENB; + } else if (strcmp(*(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr), "CELL_HOME_ENB") == 0) { + X2AP_REGISTER_ENB_REQ (msg_p).cell_type = CELL_HOME_ENB; + } else { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n", + RC.config_file_name, i, *(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr)); + } + + X2AP_REGISTER_ENB_REQ (msg_p).eNB_name = strdup(*(ENBParamList.paramarray[k][ENB_ENB_NAME_IDX].strptr)); + X2AP_REGISTER_ENB_REQ (msg_p).tac = (uint16_t)atoi(*(ENBParamList.paramarray[k][ENB_TRACKING_AREA_CODE_IDX].strptr)); + X2AP_REGISTER_ENB_REQ (msg_p).mcc = (uint16_t)atoi(*(ENBParamList.paramarray[k][ENB_MOBILE_COUNTRY_CODE_IDX].strptr)); + X2AP_REGISTER_ENB_REQ (msg_p).mnc = (uint16_t)atoi(*(ENBParamList.paramarray[k][ENB_MOBILE_NETWORK_CODE_IDX].strptr)); + X2AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length = strlen(*(ENBParamList.paramarray[k][ENB_MOBILE_NETWORK_CODE_IDX].strptr)); + + AssertFatal((X2AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length == 2) || + (X2AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length == 3), + "BAD MNC DIGIT LENGTH %d", + X2AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length); + + sprintf(aprefix,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k); + config_getlist( &X2ParamList,X2Params,sizeof(X2Params)/sizeof(paramdef_t),aprefix); + + if(X2ParamList.numelt>X2AP_MAX_NB_ENB_IP_ADDRESS){ + LOG_E(RRC,"value of X2ParamList.numelt %d must be lower than X2AP_MAX_NB_ENB_IP_ADDRESS %d value: reconsider to increase X2AP_MAX_NB_ENB_IP_ADDRESS\n",X2ParamList.numelt,X2AP_MAX_NB_ENB_IP_ADDRESS); + exit(1); + } + + X2AP_REGISTER_ENB_REQ (msg_p).nb_x2 = 0; + for (l = 0; l < X2ParamList.numelt; l++) { + X2AP_REGISTER_ENB_REQ (msg_p).nb_x2 += 1; + + strcpy(X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv4_address,*(X2ParamList.paramarray[l][ENB_X2_IPV4_ADDRESS_IDX].strptr)); + strcpy(X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv6_address,*(X2ParamList.paramarray[l][ENB_X2_IPV6_ADDRESS_IDX].strptr)); + + if (strcmp(*(X2ParamList.paramarray[l][ENB_X2_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv4") == 0) { + X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv4 = 1; + } else if (strcmp(*(X2ParamList.paramarray[l][ENB_X2_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv6") == 0) { + X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv6 = 1; + } else if (strcmp(*(X2ParamList.paramarray[l][ENB_X2_IP_ADDRESS_PREFERENCE_IDX].strptr), "no") == 0) { + X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv4 = 1; + X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv6 = 1; + } + } + + // SCTP SETTING + X2AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = SCTP_OUT_STREAMS; + X2AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = SCTP_IN_STREAMS; +# if defined(ENABLE_USE_MME) + sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_SCTP_CONFIG); + config_get( SCTPParams,sizeof(SCTPParams)/sizeof(paramdef_t),aprefix); + X2AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[ENB_SCTP_INSTREAMS_IDX].uptr); + X2AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = (uint16_t)*(SCTPParams[ENB_SCTP_OUTSTREAMS_IDX].uptr); +#endif + + sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG); + + // NETWORK_INTERFACES + config_get( NETParams,sizeof(NETParams)/sizeof(paramdef_t),aprefix); + + cidr = *(NETParams[ENB_IPV4_ADDR_FOR_X2C_IDX].strptr); + address = strtok(cidr, "/"); + + X2AP_REGISTER_ENB_REQ (msg_p).enb_x2_ip_address.ipv6 = 0; + X2AP_REGISTER_ENB_REQ (msg_p).enb_x2_ip_address.ipv4 = 1; + + strcpy(X2AP_REGISTER_ENB_REQ (msg_p).enb_x2_ip_address.ipv4_address, address); + } + } + } + } + } +return 0; +} + void RCConfig(void) { paramlist_def_t MACRLCParamList = {CONFIG_STRING_MACRLC_LIST,NULL,0}; diff --git a/openair2/ENB_APP/enb_config.h b/openair2/ENB_APP/enb_config.h index 96156a4bc4..c6359f1563 100644 --- a/openair2/ENB_APP/enb_config.h +++ b/openair2/ENB_APP/enb_config.h @@ -106,6 +106,7 @@ void ru_config_display(void); int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc); int RCconfig_S1(MessageDef *msg_p, uint32_t i); +int RCconfig_X2(MessageDef *msg_p, uint32_t i); #endif /* ENB_CONFIG_H_ */ /** @} */ diff --git a/openair2/ENB_APP/enb_paramdef.h b/openair2/ENB_APP/enb_paramdef.h index 23b4c2a837..71d7d634c0 100755 --- a/openair2/ENB_APP/enb_paramdef.h +++ b/openair2/ENB_APP/enb_paramdef.h @@ -704,6 +704,31 @@ typedef enum { #define ENB_MME_IP_ADDRESS_ACTIVE_IDX 2 #define ENB_MME_IP_ADDRESS_PREFERENCE_IDX 3 /*---------------------------------------------------------------------------------------------------------------------------------------*/ + +/* X2 configuration parameters section name */ +#define ENB_CONFIG_STRING_TARGET_ENB_X2_IP_ADDRESS "target_enb_x2_ip_address" + +/* X2 configuration parameters names */ + + +#define ENB_CONFIG_STRING_TARGET_ENB_X2_IPV4_ADDRESS "ipv4" +#define ENB_CONFIG_STRING_TARGET_ENB_X2_IPV6_ADDRESS "ipv6" +#define ENB_CONFIG_STRING_TARGET_ENB_X2_IP_ADDRESS_PREFERENCE "preference" + + +/*-------------------------------------------------------------------------------------------------------------------------------------*/ +/* X2 configuration parameters */ +/* optname helpstr paramflags XXXptr defXXXval type numelt */ +/*-------------------------------------------------------------------------------------------------------------------------------------*/ +#define X2PARAMS_DESC { \ +{ENB_CONFIG_STRING_TARGET_ENB_X2_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_TARGET_ENB_X2_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_TARGET_ENB_X2_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ +} + +#define ENB_X2_IPV4_ADDRESS_IDX 0 +#define ENB_X2_IPV6_ADDRESS_IDX 1 +#define ENB_X2_IP_ADDRESS_PREFERENCE_IDX 2 /*---------------------------------------------------------------------------------------------------------------------------------------*/ /* SCTP configuration parameters section name */ #define ENB_CONFIG_STRING_SCTP_CONFIG "SCTP" @@ -735,6 +760,12 @@ typedef enum { #define ENB_INTERFACE_NAME_FOR_S1U_IDX 2 #define ENB_IPV4_ADDR_FOR_S1U_IDX 3 #define ENB_PORT_FOR_S1U_IDX 4 +#define ENB_INTERFACE_NAME_FOR_X2C 5 +#define ENB_IPV4_ADDR_FOR_X2C_IDX 6 +#define ENB_PORT_FOR_X2C 7 +#define ENB_INTERFACE_NAME_FOR_X2U 8 +#define ENB_IPV4_ADDR_FOR_X2U 9 +#define ENB_PORT_FOR_X2U 10 /* S1 interface configuration parameters names */ #define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME "ENB_INTERFACE_NAME_FOR_S1_MME" @@ -743,8 +774,16 @@ typedef enum { #define ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U "ENB_IPV4_ADDRESS_FOR_S1U" #define ENB_CONFIG_STRING_ENB_PORT_FOR_S1U "ENB_PORT_FOR_S1U" +/* X2 interface configuration parameters names */ +#define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_X2C "ENB_INTERFACE_NAME_FOR_X2C" +#define ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C "ENB_IPV4_ADDRESS_FOR_X2C" +#define ENB_CONFIG_STRING_ENB_PORT_FOR_X2C "ENB_PORT_FOR_X2C" +#define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_X2U "ENB_INTERFACE_NAME_FOR_X2U" +#define ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2U "ENB_IPV4_ADDRESS_FOR_X2U" +#define ENB_CONFIG_STRING_ENB_PORT_FOR_X2U "ENB_PORT_FOR_X2U" + /*--------------------------------------------------------------------------------------------------------------------------------------------------*/ -/* S1 interface configuration parameters */ +/* S1/X2 interface configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*--------------------------------------------------------------------------------------------------------------------------------------------------*/ #define NETPARAMS_DESC { \ @@ -752,7 +791,13 @@ typedef enum { {ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, NULL, 0, uptr:NULL, defintval:2152L, TYPE_UINT, 0} \ +{ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, NULL, 0, uptr:NULL, defintval:2152L, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_X2C, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_ENB_PORT_FOR_X2C, NULL, 0, uptr:NULL, defintval:2152L, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_X2U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_ENB_PORT_FOR_X2U, NULL, 0, uptr:NULL, defintval:2152L, TYPE_UINT, 0} \ } diff --git a/openair2/X2AP/x2ap_common.c b/openair2/X2AP/x2ap_common.c index 2ac875155d..cc2954f77b 100644 --- a/openair2/X2AP/x2ap_common.c +++ b/openair2/X2AP/x2ap_common.c @@ -66,7 +66,7 @@ ssize_t x2ap_generate_initiating_message( pdu.present = X2AP_X2AP_PDU_PR_initiatingMessage; pdu.choice.initiatingMessage.procedureCode = procedureCode; pdu.choice.initiatingMessage.criticality = criticality; - ANY_fromType_aper(&pdu.choice.initiatingMessage.value, td, sptr); + ANY_fromType_aper((ANY_t *)&pdu.choice.initiatingMessage.value, td, sptr); if (asn1_xer_print) { xer_fprint(stdout, &asn_DEF_X2AP_X2AP_PDU, (void *)&pdu); @@ -98,7 +98,7 @@ ssize_t x2ap_generate_successfull_outcome( pdu.present = X2AP_X2AP_PDU_PR_successfulOutcome; pdu.choice.successfulOutcome.procedureCode = procedureCode; pdu.choice.successfulOutcome.criticality = criticality; - ANY_fromType_aper(&pdu.choice.successfulOutcome.value, td, sptr); + ANY_fromType_aper((ANY_t *)&pdu.choice.successfulOutcome.value, td, sptr); if (asn1_xer_print) { xer_fprint(stdout, &asn_DEF_X2AP_X2AP_PDU, (void *)&pdu); @@ -130,7 +130,7 @@ ssize_t x2ap_generate_unsuccessfull_outcome( pdu.present = X2AP_X2AP_PDU_PR_unsuccessfulOutcome; pdu.choice.successfulOutcome.procedureCode = procedureCode; pdu.choice.successfulOutcome.criticality = criticality; - ANY_fromType_aper(&pdu.choice.successfulOutcome.value, td, sptr); + ANY_fromType_aper((ANY_t *)&pdu.choice.successfulOutcome.value, td, sptr); if (asn1_xer_print) { xer_fprint(stdout, &asn_DEF_X2AP_X2AP_PDU, (void *)&pdu); From 30cc9c1c66a749484a6c0842dc6f2d5669127319 Mon Sep 17 00:00:00 2001 From: WANG Tsu-Han Date: Wed, 22 Aug 2018 15:36:43 +0200 Subject: [PATCH 024/379] adding half fill mechanism into accelorated modulation --- openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c | 203 +++++++++++++----- openair2/LAYER2/MAC/eNB_scheduler_phytest.c | 6 +- 2 files changed, 156 insertions(+), 53 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c index 0bd28b6827..19fefc845e 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c @@ -165,10 +165,19 @@ int allocate_REs_in_RB_no_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB, uint32_t tti_offset; uint8_t re; uint8_t *x0p; + uint8_t first_re,last_re; + + last_re=12; + first_re=0; + if (skip_half==1) + last_re=6; + else if (skip_half==2) + first_re=6; + re=first_re; if (skip_dc == 0) { - for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset,re=0; - re<12; + for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+re; + re0) + /*if(skip_half>0) allocate_REs = allocate_REs_in_RB; - + */ if (dlsch0) { if (dlsch0_harq->Nlayers>1) { diff --git a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c index 71449e3cd4..19570c6e10 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c @@ -71,7 +71,7 @@ schedule_ue_spec_phy_test( uint16_t rnti = 0x1235; uint32_t rb_alloc = 0x1FFFFF; int32_t tpc = 1; - int32_t mcs = 28; + int32_t mcs = 10; int32_t cqi = 15; int32_t ndi = (frameP*10+subframeP)/8; int32_t dai = 0; @@ -202,7 +202,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s int32_t normalized_rx_power; int32_t target_rx_power= 178; int CC_id = 0; - int nb_rb; + int nb_rb = 24; int N_RB_UL; eNB_MAC_INST *mac = RC.mac[module_idP]; COMMON_channels_t *cc = &mac->common_channels[0]; @@ -319,7 +319,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s hi_dci0_req_body->number_of_dci++; ul_req_index = 0; - dlsch_flag = 0; + dlsch_flag = 0; for(ul_req_index = 0;ul_req_index < ul_req->number_of_pdus;ul_req_index++){ if(ul_req->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE){ dlsch_flag = 1; From d12a54a7746720ab0f7e74933f40474e8d733db0 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Thu, 23 Aug 2018 10:40:28 +0200 Subject: [PATCH 025/379] Removed unused variable Signed-off-by: Raphael Defosseux --- openair2/LAYER2/MAC/eNB_scheduler_phytest.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c index 49cc68b06a..24333a06a5 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c @@ -211,7 +211,6 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s int sched_frame=frameP; int sched_subframe = (subframeP+4)%10; uint16_t ul_req_index; - uint8_t dlsch_flag; if (sched_subframenumber_of_dci++; ul_req_index = 0; - dlsch_flag = 0; for(ul_req_index = 0;ul_req_index < ul_req->number_of_pdus;ul_req_index++){ if(ul_req->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE){ - dlsch_flag = 1; LOG_D(MAC,"Frame %d, Subframe %d:rnti %x ul_req_index %d Switched UCI HARQ to ULSCH HARQ(first)\n",frameP,subframeP,rnti,ul_req_index); break; } From d5f28018edb585b4cfe1e5dd0a22bbeb858adf5b Mon Sep 17 00:00:00 2001 From: laurent Date: Thu, 23 Aug 2018 13:06:17 +0200 Subject: [PATCH 026/379] fix 344 --- openair1/SCHED_UE/phy_procedures_lte_ue.c | 2 +- openair2/LAYER2/MAC/eNB_scheduler_RA.c | 10 +- openair2/LAYER2/MAC/eNB_scheduler_bch.c | 12 +- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 8 +- openair2/LAYER2/MAC/eNB_scheduler_fairRR.c | 4 +- openair2/LAYER2/MAC/eNB_scheduler_mch.c | 2 +- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 2 +- openair2/LAYER2/MAC/ra_procedures.c | 6 +- openair2/LAYER2/MAC/rar_tools.c | 4 +- openair2/LAYER2/MAC/rar_tools_ue.c | 4 +- openair2/LAYER2/MAC/ue_procedures.c | 12 +- openair2/UTIL/OPT/README.txt | 6 +- openair2/UTIL/OPT/mac_pcap.h | 9 +- openair2/UTIL/OPT/opt.h | 14 +- openair2/UTIL/OPT/packet-mac-lte.h | 400 ++++++++++++++------- openair2/UTIL/OPT/probe.c | 74 ++-- openair2/UTIL/OPT/ws_compiler_tests.h | 138 +++++++ openair2/UTIL/OPT/ws_symbol_export.h | 202 +++++++++++ targets/RT/USER/lte-softmodem.c | 9 +- targets/RT/USER/lte-uesoftmodem.c | 9 +- 20 files changed, 701 insertions(+), 226 deletions(-) create mode 100644 openair2/UTIL/OPT/ws_compiler_tests.h create mode 100644 openair2/UTIL/OPT/ws_symbol_export.h diff --git a/openair1/SCHED_UE/phy_procedures_lte_ue.c b/openair1/SCHED_UE/phy_procedures_lte_ue.c index ed258ed47c..e695be29db 100644 --- a/openair1/SCHED_UE/phy_procedures_lte_ue.c +++ b/openair1/SCHED_UE/phy_procedures_lte_ue.c @@ -2617,7 +2617,7 @@ void ue_pbch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, uin dummy[0] = ue->pbch_vars[eNB_id]->decoded_output[2]; dummy[1] = ue->pbch_vars[eNB_id]->decoded_output[1]; dummy[2] = ue->pbch_vars[eNB_id]->decoded_output[0]; - trace_pdu(1, dummy, 3, ue->Mod_id, 0, 0, + trace_pdu( DIRECTION_DOWNLINK, dummy, WS_C_RNTI, ue->Mod_id, 0, 0, frame_rx, subframe_rx, 0, 0); LOG_D(OPT,"[UE %d][PBCH] Frame %d trace pdu for PBCH\n", ue->Mod_id, subframe_rx); diff --git a/openair2/LAYER2/MAC/eNB_scheduler_RA.c b/openair2/LAYER2/MAC/eNB_scheduler_RA.c index 35590ec896..b637a92a96 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_RA.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_RA.c @@ -988,9 +988,10 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP, payload[0], ra->msg4_TBsize)); if (opt_enabled == 1) { - trace_pdu(1, + trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) mac-> - UE_list.DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0], rrc_sdu_length, UE_id, 3, + UE_list.DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0], + rrc_sdu_length, UE_id, WS_C_RNTI, UE_RNTI(module_idP, UE_id), mac->frame, mac->subframe, 0, 0); LOG_D(OPT, @@ -1193,9 +1194,10 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP, payload[0], ra->msg4_TBsize)); if (opt_enabled == 1) { - trace_pdu(1, + trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) mac-> - UE_list.DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0], rrc_sdu_length, UE_id, 3, + UE_list.DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0], + rrc_sdu_length, UE_id, WS_C_RNTI, UE_RNTI(module_idP, UE_id), mac->frame, mac->subframe, 0, 0); LOG_D(OPT, diff --git a/openair2/LAYER2/MAC/eNB_scheduler_bch.c b/openair2/LAYER2/MAC/eNB_scheduler_bch.c index d965bc811b..b2b59691f8 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_bch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_bch.c @@ -281,10 +281,10 @@ schedule_SIB1_BR(module_id_t module_idP, eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST; if (opt_enabled == 1) { - trace_pdu(1, + trace_pdu(DIRECTION_DOWNLINK, &cc->BCCH_BR_pdu[0].payload[0], bcch_sdu_length, - 0xffff, 4, 0xffff, eNB->frame, eNB->subframe, 0, 0); + 0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0); LOG_D(OPT, "[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n", module_idP, frameP, CC_id, 0xffff, bcch_sdu_length); @@ -472,11 +472,11 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP, eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST; if (opt_enabled == 1) { - trace_pdu(1, + trace_pdu(DIRECTION_DOWNLINK, &cc->BCCH_BR_pdu[i + 1].payload[0], bcch_sdu_length, 0xffff, - 4, + WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0); LOG_D(OPT, @@ -759,11 +759,11 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) } if (opt_enabled == 1) { - trace_pdu(1, + trace_pdu(DIRECTION_DOWNLINK, &cc->BCCH_pdu.payload[0], bcch_sdu_length, 0xffff, - 4, 0xffff, eNB->frame, eNB->subframe, 0, 0); + WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0); LOG_D(OPT, "[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n", module_idP, frameP, CC_id, 0xffff, diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index df52b83d72..da52a8fedc 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -1359,9 +1359,9 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, } if (opt_enabled == 1) { - trace_pdu(1, (uint8_t *) - UE_list->DLSCH_pdu[CC_id][0][UE_id]. - payload[0], TBS, module_idP, 3, + trace_pdu(DIRECTION_DOWNLINK, + (uint8_t *) UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0], + TBS, module_idP, WS_C_RNTI, UE_RNTI(module_idP, UE_id), eNB->frame, eNB->subframe, 0, 0); LOG_D(OPT, @@ -2085,7 +2085,7 @@ void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) } if (opt_enabled == 1) { - trace_pdu(1, + trace_pdu(DIRECTION_DOWNLINK, &eNB->common_channels[CC_id].PCCH_pdu.payload[0], pcch_sdu_length, 0xffff, diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c index 1acf657220..e9fdf964e7 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c @@ -1655,8 +1655,8 @@ schedule_ue_spec_fairRR(module_id_t module_idP, } if (opt_enabled == 1) { - trace_pdu(1, (uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0], - TBS, module_idP, 3, UE_RNTI(module_idP,UE_id), + trace_pdu(DIRECTION_DOWNLINK, (uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0], + TBS, module_idP, WS_RA_RNTI, UE_RNTI(module_idP,UE_id), eNB->frame, eNB->subframe,0,0); LOG_D(OPT,"[eNB %d][DLSCH] CC_id %d Frame %d rnti %x with size %d\n", module_idP, CC_id, frameP, UE_RNTI(module_idP,UE_id), TBS); diff --git a/openair2/LAYER2/MAC/eNB_scheduler_mch.c b/openair2/LAYER2/MAC/eNB_scheduler_mch.c index 63a4711778..16953e958a 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_mch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_mch.c @@ -767,7 +767,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, /* Tracing of PDU is done on UE side */ if (opt_enabled == 1) { - trace_pdu(1, (uint8_t *) cc->MCH_pdu.payload, TBS, module_idP, 6, 0xffff, // M_RNTI = 6 in wirehsark + trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) cc->MCH_pdu.payload, TBS, module_idP, WS_M_RNTI , 0xffff, // M_RNTI = 6 in wirehsark RC.mac[module_idP]->frame, RC.mac[module_idP]->subframe, 0, 0); LOG_D(OPT, diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 04415a8386..1fe21090db 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -150,7 +150,7 @@ rx_sdu(const module_id_t enb_mod_idP, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME (VCD_SIGNAL_DUMPER_FUNCTIONS_RX_SDU, 1); if (opt_enabled == 1) { - trace_pdu(0, sduP, sdu_lenP, 0, 3, current_rnti, frameP, subframeP, + trace_pdu(DIRECTION_UPLINK, sduP, sdu_lenP, 0, WS_C_RNTI, current_rnti, frameP, subframeP, 0, 0); LOG_D(OPT, "[eNB %d][ULSCH] Frame %d rnti %x with size %d\n", enb_mod_idP, frameP, current_rnti, sdu_lenP); diff --git a/openair2/LAYER2/MAC/ra_procedures.c b/openair2/LAYER2/MAC/ra_procedures.c index f5df67ab64..aeabbd092a 100644 --- a/openair2/LAYER2/MAC/ra_procedures.c +++ b/openair2/LAYER2/MAC/ra_procedures.c @@ -248,7 +248,7 @@ Msg1_transmitted(module_id_t module_idP, uint8_t CC_id, UE_mac_inst[module_idP].RA_attempt_number++; if (opt_enabled) { - trace_pdu(0, NULL, 0, module_idP, 0, + trace_pdu(DIRECTION_UPLINK, NULL, 0, module_idP, WS_NO_RNTI, UE_mac_inst[module_idP].RA_prach_resources. ra_PreambleIndex, UE_mac_inst[module_idP].txFrame, UE_mac_inst[module_idP].txSubframe, 0, @@ -277,8 +277,8 @@ Msg3_transmitted(module_id_t module_idP, uint8_t CC_id, UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 1; if (opt_enabled) { // msg3 - trace_pdu(0, &UE_mac_inst[module_idP].CCCH_pdu.payload[0], - UE_mac_inst[module_idP].RA_Msg3_size, module_idP, 3, + trace_pdu(DIRECTION_UPLINK , &UE_mac_inst[module_idP].CCCH_pdu.payload[0], + UE_mac_inst[module_idP].RA_Msg3_size, module_idP, WS_C_RNTI, UE_mac_inst[module_idP].crnti, UE_mac_inst[module_idP].txFrame, UE_mac_inst[module_idP].txSubframe, 0, 0); diff --git a/openair2/LAYER2/MAC/rar_tools.c b/openair2/LAYER2/MAC/rar_tools.c index b70b382494..2e6b47ff60 100644 --- a/openair2/LAYER2/MAC/rar_tools.c +++ b/openair2/LAYER2/MAC/rar_tools.c @@ -96,7 +96,7 @@ fill_rar(const module_id_t module_idP, ((ra->msg3_ULdelay & 1) << 1) | (ra->msg3_cqireq & 1); if (opt_enabled) { - trace_pdu(1, dlsch_buffer, input_buffer_length, module_idP, 2, 1, + trace_pdu(DIRECTION_DOWNLINK , dlsch_buffer, input_buffer_length, module_idP, WS_RA_RNTI , 1, RC.mac[module_idP]->frame, RC.mac[module_idP]->subframe, 0, 0); LOG_D(OPT, @@ -181,7 +181,7 @@ fill_rar_br(eNB_MAC_INST * eNB, ra->preamble_index, ra->timing_offset); if (opt_enabled) { - trace_pdu(1, dlsch_buffer, input_buffer_length, eNB->Mod_id, 2, 1, + trace_pdu(DIRECTION_DOWNLINK , dlsch_buffer, input_buffer_length, eNB->Mod_id, WS_RA_RNTI , 1, eNB->frame, eNB->subframe, 0, 0); LOG_D(OPT, "[RAPROC] RAR Frame %d trace pdu for rnti %x and rapid %d size %d\n", diff --git a/openair2/LAYER2/MAC/rar_tools_ue.c b/openair2/LAYER2/MAC/rar_tools_ue.c index 991eaae052..35d1f7925e 100644 --- a/openair2/LAYER2/MAC/rar_tools_ue.c +++ b/openair2/LAYER2/MAC/rar_tools_ue.c @@ -119,8 +119,8 @@ uint16_t ue_process_rar(const module_id_t module_idP, const int CC_id, const fra LOG_D(OPT, "[UE %d][RAPROC] CC_id %d RAR Frame %d trace pdu for ra-RNTI %x\n", module_idP, CC_id, frameP, ra_rnti); - trace_pdu(1, (uint8_t *) dlsch_buffer, n_rarh + n_rarpy * 6, - module_idP, 2, ra_rnti, UE_mac_inst[module_idP].rxFrame, + trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) dlsch_buffer, n_rarh + n_rarpy * 6, + module_idP, WS_RA_RNTI, ra_rnti, UE_mac_inst[module_idP].rxFrame, UE_mac_inst[module_idP].rxSubframe, 0, 0); } diff --git a/openair2/LAYER2/MAC/ue_procedures.c b/openair2/LAYER2/MAC/ue_procedures.c index dd78da7275..9558aa596f 100644 --- a/openair2/LAYER2/MAC/ue_procedures.c +++ b/openair2/LAYER2/MAC/ue_procedures.c @@ -420,7 +420,7 @@ ue_send_sdu(module_id_t module_idP, //LOG_D(MAC,"sdu: %x.%x.%x\n",sdu[0],sdu[1],sdu[2]); if (opt_enabled) { - trace_pdu(1, sdu, sdu_len, module_idP, 3, + trace_pdu(DIRECTION_DOWNLINK, sdu, sdu_len, module_idP, WS_C_RNTI, UE_mac_inst[module_idP].crnti, frameP, subframeP, 0, 0); LOG_D(OPT, "[UE %d][DLSCH] Frame %d trace pdu for rnti %x with size %d\n", @@ -637,11 +637,11 @@ ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP, stop_meas(&UE_mac_inst[module_idP].rx_si); #endif if (opt_enabled == 1) { - trace_pdu(0, + trace_pdu(DIRECTION_UPLINK, (uint8_t *) pdu, len, module_idP, - 4, + WS_SI_RNTI, 0xffff, UE_mac_inst[module_idP].rxFrame, UE_mac_inst[module_idP].rxSubframe, 0, 0); @@ -675,11 +675,11 @@ ue_decode_p(module_id_t module_idP, int CC_id, frame_t frameP, stop_meas(&UE_mac_inst[module_idP].rx_p); #endif if (opt_enabled == 1) { - trace_pdu(0, + trace_pdu(DIRECTION_UPLINK , (uint8_t *) pdu, len, module_idP, - 4, + WS_SI_RNTI, P_RNTI, UE_mac_inst[module_idP].rxFrame, UE_mac_inst[module_idP].rxSubframe, 0, 0); @@ -2255,7 +2255,7 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP, #endif if (opt_enabled) { - trace_pdu(0, ulsch_buffer, buflen, module_idP, 3, + trace_pdu(DIRECTION_UPLINK, ulsch_buffer, buflen, module_idP, WS_C_RNTI, UE_mac_inst[module_idP].crnti, UE_mac_inst[module_idP].txFrame, UE_mac_inst[module_idP].txSubframe, 0, 0); diff --git a/openair2/UTIL/OPT/README.txt b/openair2/UTIL/OPT/README.txt index 7193733d00..c56aeda93d 100644 --- a/openair2/UTIL/OPT/README.txt +++ b/openair2/UTIL/OPT/README.txt @@ -1,9 +1,13 @@ -2012 07 10 - Working version How to configure wireshark for dissecting LTE protocols: - start the wireshark as a sudoers +- goto analyze->enabled prototols + => enable mac_lte_udp and rlc_lte_udp - goto edit/preferences and expand Protocols - select UDP and check "try heuristic sub-dissectors first" - select MAC-LTE, and check all the options (checkboxes), and set the "which layer info to show in info column" to "MAC info" - select RLC-LTE, and check all the options except the "May see RLC headers only", and set the "call PDCP dissector for DRB PDUs" to "12-bit SN". Optionally you may select the sequence analysis for RLC AM/UM. + +How to use +- start eNB or UE with option -W (or -P if you want to make a pcap file) - capture on local interface "lo" - filter out the ICMP/DNS/TCP messages (e.g. "!icmp && !dns && !tcp") diff --git a/openair2/UTIL/OPT/mac_pcap.h b/openair2/UTIL/OPT/mac_pcap.h index f1d4b32492..48b31bb3c0 100644 --- a/openair2/UTIL/OPT/mac_pcap.h +++ b/openair2/UTIL/OPT/mac_pcap.h @@ -42,11 +42,4 @@ typedef struct MAC_Context_Info_t { unsigned int subframesSinceCaptureStart; } MAC_Context_Info_t; -pcap_hdr_t file_header = { - 0xa1b2c3d4, /* magic number */ - 2, 4, /* version number is 2.4 */ - 0, /* timezone */ - 0, /* sigfigs - apparently all tools do this */ - 65535, /* snaplen - this should be long enough */ - MAC_LTE_DLT /* Data Link Type (DLT). Set as unused value 147 for now */ -}; + diff --git a/openair2/UTIL/OPT/opt.h b/openair2/UTIL/OPT/opt.h index c9340f258e..b4ff3b5006 100644 --- a/openair2/UTIL/OPT/opt.h +++ b/openair2/UTIL/OPT/opt.h @@ -55,6 +55,16 @@ This header file must be included */ #include "PHY/impl_defs_lte.h" #endif +#define PACKET_MAC_LTE_DEFAULT_UDP_PORT (9999) + +typedef uint8_t guint8; +typedef uint16_t guint16; +typedef uint32_t guint32; +typedef guint8 gboolean; + +#include "packet-mac-lte.h" +#include "mac_pcap.h" + #ifdef OCP_FRAMEWORK #include #else @@ -74,7 +84,7 @@ typedef enum radio_type_e { extern trace_mode_t opt_type; extern char in_ip[40]; -extern char in_path[100]; +extern char in_path[FILENAME_MAX]; /** * function def @@ -84,7 +94,7 @@ void trace_pdu(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size, int ueid, int rntiType, int rnti, uint16_t sysFrame, uint8_t subframe, int oob_event, int oob_event_value); -int init_opt(char *path, char *ip, char *port, radio_type_t radio_type_p); +int init_opt(char *path, char *ip); void terminate_opt(void); diff --git a/openair2/UTIL/OPT/packet-mac-lte.h b/openair2/UTIL/OPT/packet-mac-lte.h index d0bb60f6b5..4dfbe7912e 100644 --- a/openair2/UTIL/OPT/packet-mac-lte.h +++ b/openair2/UTIL/OPT/packet-mac-lte.h @@ -1,41 +1,36 @@ /* packet-mac-lte.h * * Martin Mathieson - * $Id: packet-mac-lte.h 42240 2012-04-25 20:02:12Z pascal $ * * Wireshark - Network traffic analyzer * By Gerald Combs * Copyright 1998 Gerald Combs * + * SPDX-License-Identifier: GPL-2.0-or-later + * * This header file may also be distributed under * the terms of the BSD Licence as follows: * * Copyright (C) 2009 Martin Mathieson. All rights reserved. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE + * SPDX-License-Identifier: BSD-2-Clause + */ + + /* + this is wireshark, commit: commit eda834b6e29c36e05a63a6056afa98390ff79357 + Date: Wed Aug 22 14:36:20 2018 +0200 + modified to be used in OpenAir to create the LTE MAC/RLC encapsulated in UDP as per Wireshark feature */ -#ifndef PACKET_MAC_LTE_H_ -#define PACKET_MAC_LTE_H_ + +#include "ws_symbol_export.h" + +/** data structure to hold time values with nanosecond resolution*/ +typedef struct { + time_t secs; + int nsecs; +} nstime_t; + /* radioType */ #define FDD_RADIO 1 @@ -45,105 +40,190 @@ #define DIRECTION_UPLINK 0 #define DIRECTION_DOWNLINK 1 -/* SR: no need to declare following part: */ +/* rntiType */ +#define WS_NO_RNTI 0 +#define WS_P_RNTI 1 +#define WS_RA_RNTI 2 +#define WS_C_RNTI 3 +#define WS_SI_RNTI 4 +#define WS_SPS_RNTI 5 +#define WS_M_RNTI 6 +#define WS_SL_BCH_RNTI 7 +#define WS_SL_RNTI 8 +#define WS_SC_RNTI 9 +#define WS_G_RNTI 10 + typedef enum mac_lte_oob_event { - ltemac_send_preamble, - ltemac_send_sr, - ltemac_sr_failure + ltemac_send_preamble, + ltemac_send_sr, + ltemac_sr_failure } mac_lte_oob_event; typedef enum mac_lte_dl_retx { - dl_retx_no, - dl_retx_yes, - dl_retx_unknown + dl_retx_no, + dl_retx_yes, + dl_retx_unknown } mac_lte_dl_retx; typedef enum mac_lte_crc_status { - crc_fail = 0, - crc_success = 1, - crc_high_code_rate = 2, - crc_pdsch_lost = 3, - crc_duplicate_nonzero_rv = 4 + crc_fail = 0, + crc_success = 1, + crc_high_code_rate = 2, + crc_pdsch_lost = 3, + crc_duplicate_nonzero_rv = 4, + crc_false_dci = 5 } mac_lte_crc_status; +/* N.B. for SCellIndex-r13 extends to 31 */ +typedef enum mac_lte_carrier_id { + carrier_id_primary, + carrier_id_secondary_1, + carrier_id_secondary_2, + carrier_id_secondary_3, + carrier_id_secondary_4, + carrier_id_secondary_5, + carrier_id_secondary_6, + carrier_id_secondary_7 +} mac_lte_carrier_id; + +typedef enum mac_lte_ce_mode { + no_ce_mode = 0, + ce_mode_a = 1, + ce_mode_b = 2 +} mac_lte_ce_mode; + +typedef enum mac_lte_nb_mode { + no_nb_mode = 0, + nb_mode = 1 +} mac_lte_nb_mode; + /* Context info attached to each LTE MAC frame */ -typedef struct mac_lte_info { - /* Needed for decode */ - guint8 radioType; - guint8 direction; - guint8 rntiType; +typedef struct mac_lte_info +{ + /* Needed for decode */ + guint8 radioType; + guint8 direction; + guint8 rntiType; - /* Extra info to display */ - guint16 rnti; - guint16 ueid; + /* Extra info to display */ + guint16 rnti; + guint16 ueid; - /* Timing info */ - guint16 sysframeNumber; - guint16 subframeNumber; + /* Timing info */ + guint16 sysframeNumber; + guint16 subframeNumber; - /* Optional field. More interesting for TDD (FDD is always -4 subframeNumber) */ - gboolean subframeNumberOfGrantPresent; - guint16 subframeNumberOfGrant; + /* Optional field. More interesting for TDD (FDD is always -4 subframeNumber) */ + gboolean subframeNumberOfGrantPresent; + guint16 subframeNumberOfGrant; - /* Flag set only if doing PHY-level data test - i.e. there may not be a - well-formed MAC PDU so just show as raw data */ - gboolean isPredefinedData; + /* Flag set only if doing PHY-level data test - i.e. there may not be a + well-formed MAC PDU so just show as raw data */ + gboolean isPredefinedData; - /* Length of DL PDU or UL grant size in bytes */ - guint16 length; + /* Length of DL PDU or UL grant size in bytes */ + guint16 length; - /* UL only. 0=newTx, 1=first-retx, etc */ - guint8 reTxCount; - guint8 isPHICHNACK; /* FALSE=PDCCH retx grant, TRUE=PHICH NACK */ + /* 0=newTx, 1=first-retx, etc */ + guint8 reTxCount; + guint8 isPHICHNACK; /* FALSE=PDCCH retx grant, TRUE=PHICH NACK */ - /* UL only. Indicates if the R10 extendedBSR-Sizes parameter is set */ - gboolean isExtendedBSRSizes; + /* UL only. Indicates if the R10 extendedBSR-Sizes parameter is set */ + gboolean isExtendedBSRSizes; - /* DL only. Status of CRC check */ - mac_lte_crc_status crcStatusValid; + /* UL only. Indicates if the R10 simultaneousPUCCH-PUSCH parameter is set for PCell */ + gboolean isSimultPUCCHPUSCHPCell; - /* DL only. Is this known to be a retransmission? */ - mac_lte_dl_retx dl_retx; + /* UL only. Indicates if the R10 extendedBSR-Sizes parameter is set for PSCell */ + gboolean isSimultPUCCHPUSCHPSCell; - /* More Physical layer info (see direction above for which side of union to use) */ - union { - struct mac_lte_ul_phy_info { - guint8 present; /* Remaining UL fields are present and should be displayed */ - guint8 modulation_type; - guint8 tbs_index; - guint8 resource_block_length; - guint8 resource_block_start; - guint8 harq_id; - gboolean ndi; - } ul_info; - struct mac_lte_dl_phy_info { - guint8 present; /* Remaining UL fields are present and should be displayed */ - guint8 dci_format; - guint8 resource_allocation_type; - guint8 aggregation_level; - guint8 mcs_index; - guint8 redundancy_version_index; - guint8 resource_block_length; - mac_lte_crc_status crc_status; - guint8 harq_id; - gboolean ndi; - guint8 transport_block; /* 1..2 */ - } dl_info; - } detailed_phy_info; + /* Status of CRC check. For UE it is DL only. For eNodeB it is UL + only. For an analyzer, it is present for both DL and UL. */ + gboolean crcStatusValid; + mac_lte_crc_status crcStatus; - /* Relating to out-of-band events */ - /* N.B. dissector will only look to these fields if length is 0... */ - mac_lte_oob_event oob_event; - guint8 rapid; - guint8 rach_attempt_number; -#define MAX_SRs 20 - guint16 number_of_srs; - guint16 oob_ueid[MAX_SRs]; - guint16 oob_rnti[MAX_SRs]; + /* Carrier ID */ + mac_lte_carrier_id carrierId; + + /* DL only. Is this known to be a retransmission? */ + mac_lte_dl_retx dl_retx; + + /* DL only. CE mode to be used for RAR decoding */ + mac_lte_ce_mode ceMode; + + /* DL and UL. NB-IoT mode of the UE */ + mac_lte_nb_mode nbMode; + + /* UL only, for now used for CE mode A RAR decoding */ + guint8 nUlRb; + + /* More Physical layer info (see direction above for which side of union to use) */ + union { + struct mac_lte_ul_phy_info + { + guint8 present; /* Remaining UL fields are present and should be displayed */ + guint8 modulation_type; + guint8 tbs_index; + guint8 resource_block_length; + guint8 resource_block_start; + guint8 harq_id; + gboolean ndi; + } ul_info; + struct mac_lte_dl_phy_info + { + guint8 present; /* Remaining DL fields are present and should be displayed */ + guint8 dci_format; + guint8 resource_allocation_type; + guint8 aggregation_level; + guint8 mcs_index; + guint8 redundancy_version_index; + guint8 resource_block_length; + guint8 harq_id; + gboolean ndi; + guint8 transport_block; /* 0..1 */ + } dl_info; + } detailed_phy_info; + + /* Relating to out-of-band events */ + /* N.B. dissector will only look to these fields if length is 0... */ + mac_lte_oob_event oob_event; + guint8 rapid; + guint8 rach_attempt_number; + #define MAX_SRs 20 + guint16 number_of_srs; + guint16 oob_ueid[MAX_SRs]; + guint16 oob_rnti[MAX_SRs]; } mac_lte_info; -/* Accessor function to check if a frame was considered to be ReTx */ -//int is_mac_lte_frame_retx(packet_info *pinfo, guint8 direction); + +typedef struct mac_lte_tap_info { + /* Info from context */ + guint16 rnti; + guint16 ueid; + guint8 rntiType; + guint8 isPredefinedData; + gboolean crcStatusValid; + mac_lte_crc_status crcStatus; + guint8 direction; + + guint8 isPHYRetx; + guint16 ueInTTI; + + nstime_t mac_lte_time; + + /* Number of bytes (which part is used depends upon context settings) */ + guint32 single_number_of_bytes; + guint32 bytes_for_lcid[11]; + guint32 sdus_for_lcid[11]; + guint8 number_of_rars; + guint8 number_of_paging_ids; + + /* Number of padding bytes includes padding subheaders and trailing padding */ + guint16 padding_bytes; + guint16 raw_length; +} mac_lte_tap_info; + + /*****************************************************************/ /* UDP framing format */ @@ -153,12 +233,10 @@ typedef struct mac_lte_info { /* and implemented by this dissector, using the definitions */ /* below. A link to an example program showing you how to encode */ /* these headers and send LTE MAC PDUs on a UDP socket is */ -/* provided at http://wiki.wireshark.org/MAC-LTE */ +/* provided at https://wiki.wireshark.org/MAC-LTE */ /* */ -/* A heuristic dissecter (enabled by a preference) will */ -/* recognise a signature at the beginning of these frames . */ -/* Until someone is using this format, suggestions for changes */ -/* are welcome. */ +/* A heuristic dissector (enabled by a preference) will */ +/* recognise a signature at the beginning of these frames. */ /*****************************************************************/ @@ -177,7 +255,7 @@ typedef struct mac_lte_info { to show you display/filter/plot/add-custom-columns on these fields, so should be added if available. The format is to have the tag, followed by the value (there is no length field, - its implicit from the tag) */ + it's implicit from the tag) */ #define MAC_LTE_RNTI_TAG 0x02 /* 2 bytes, network order */ @@ -185,8 +263,8 @@ typedef struct mac_lte_info { #define MAC_LTE_UEID_TAG 0x03 /* 2 bytes, network order */ -#define MAC_LTE_SUBFRAME_TAG 0x04 -/* 2 bytes, network order */ +#define MAC_LTE_FRAME_SUBFRAME_TAG 0x04 +/* 2 bytes, network order, SFN is stored in 12 MSB and SF in 4 LSB */ #define MAC_LTE_PREDEFINED_DATA_TAG 0x05 /* 1 byte */ @@ -200,29 +278,101 @@ typedef struct mac_lte_info { #define MAC_LTE_EXT_BSR_SIZES_TAG 0x08 /* 0 byte */ -#define MAC_LTE_OOB_EVENT_TAG 0x09 -/* 3 byte */ +#define MAC_LTE_SEND_PREAMBLE_TAG 0x09 +/* 2 bytes, RAPID value (1 byte) followed by RACH attempt number (1 byte) */ + +#define MAC_LTE_CARRIER_ID_TAG 0x0A +/* 1 byte */ + +#define MAC_LTE_PHY_TAG 0x0B +/* variable length, length (1 byte) then depending on direction + in UL: modulation type (1 byte), TBS index (1 byte), RB length (1 byte), + RB start (1 byte), HARQ id (1 byte), NDI (1 byte) + in DL: DCI format (1 byte), resource allocation type (1 byte), aggregation level (1 byte), + MCS index (1 byte), redundancy version (1 byte), resource block length (1 byte), + HARQ id (1 byte), NDI (1 byte), TB (1 byte), DL reTx (1 byte) */ + +#define MAC_LTE_SIMULT_PUCCH_PUSCH_PCELL_TAG 0x0C +/* 0 byte */ + +#define MAC_LTE_SIMULT_PUCCH_PUSCH_PSCELL_TAG 0x0D +/* 0 byte */ + +#define MAC_LTE_CE_MODE_TAG 0x0E +/* 1 byte containing mac_lte_ce_mode enum value */ + +#define MAC_LTE_NB_MODE_TAG 0x0F +/* 1 byte containing mac_lte_nb_mode enum value */ + +#define MAC_LTE_N_UL_RB_TAG 0x10 +/* 1 byte containing the number of UL resource blocks: 6, 15, 25, 50, 75 or 100 */ + +#define MAC_LTE_SR_TAG 0x11 +/* 2 bytes for the number of items, followed by that number of ueid, rnti (2 bytes each) */ + /* MAC PDU. Following this tag comes the actual MAC PDU (there is no length, the PDU continues until the end of the frame) */ #define MAC_LTE_PAYLOAD_TAG 0x01 -/* Set details of an LCID -> drb channel mapping. To be called from - configuration protocol (e.g. RRC) */ -/*void set_mac_lte_channel_mapping(guint16 ueid, guint8 lcid, - guint8 srbid, guint8 drbid, - guint8 rlcMode, guint8 um_sn_length, - guint8 ul_priority); -*/ -/* Functions to be called from outside this module (e.g. in a plugin, where mac_lte_info - isn't available) to get/set per-packet data */ -//mac_lte_info *get_mac_lte_proto_data(packet_info *pinfo); -//void set_mac_lte_proto_data(packet_info *pinfo, mac_lte_info *p_mac_lte_info); +/* Type to store parameters for configuring LCID->RLC channel settings for DRB */ +/* Some are optional, and may not be seen (e.g. on reestablishment) */ +typedef struct drb_mapping_t +{ + guint16 ueid; /* Mandatory */ + guint8 drbid; /* Mandatory */ + gboolean lcid_present; + guint8 lcid; /* Part of LogicalChannelConfig - optional */ + gboolean rlcMode_present; + guint8 rlcMode; /* Part of RLC config - optional */ + gboolean rlc_ul_ext_li_field; /* Part of RLC config - optional */ + gboolean rlc_dl_ext_li_field; /* Part of RLC config - optional */ + gboolean rlc_ul_ext_am_sn; /* Part of RLC config - optional */ + gboolean rlc_dl_ext_am_sn; /* Part of RLC config - optional */ + gboolean um_sn_length_present; + guint8 um_sn_length; /* Part of RLC config - optional */ + gboolean ul_priority_present; + guint8 ul_priority; /* Part of LogicalChannelConfig - optional */ + gboolean pdcp_sn_size_present; + guint8 pdcp_sn_size; /* Part of pdcp-Config - optional */ +} drb_mapping_t; -/* Function to attempt to populate p_mac_lte_info using framing definition above */ -/*gboolean dissect_mac_lte_context_fields(struct mac_lte_info *p_mac_lte_info, tvbuff_t *tvb, - gint *p_offset); -*/ -#endif /* PACKET_MAC_LTE_H_ */ + +/* Dedicated DRX config. Used to verify that a sensible config is given. + Also, beginning to configure MAC with this config and (optionally) show + DRX config and state (cycles/timers) attached to each UL/DL PDU! */ +typedef struct drx_config_t { + gboolean configured; + guint32 frameNum; + guint32 previousFrameNum; + + guint32 onDurationTimer; + guint32 inactivityTimer; + guint32 retransmissionTimer; + guint32 longCycle; + guint32 cycleOffset; + /* Optional Short cycle */ + gboolean shortCycleConfigured; + guint32 shortCycle; + guint32 shortCycleTimer; +} drx_config_t; + +/* RRC can indicate whether simultaneous PUCCH/PUSCH is used */ +typedef enum { + SIMULT_PUCCH_PUSCH_PCELL = 0, + SIMULT_PUCCH_PUSCH_PSCELL +} simult_pucch_pusch_cell_type; +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ diff --git a/openair2/UTIL/OPT/probe.c b/openair2/UTIL/OPT/probe.c index 2f7dac3d1e..a1e5367168 100644 --- a/openair2/UTIL/OPT/probe.c +++ b/openair2/UTIL/OPT/probe.c @@ -95,26 +95,22 @@ what about the implementation int opt_enabled=0; -#define PACKET_MAC_LTE_DEFAULT_UDP_PORT (9999) - -typedef uint8_t guint8; -typedef uint16_t guint16; -typedef uint32_t guint32; -typedef guint8 gboolean; - -#include "packet-mac-lte.h" -#include "mac_pcap.h" - //static unsigned char g_PDUBuffer[1600]; //static unsigned int g_PDUOffset; - char in_ip[40]; -char in_path[100]; +char in_path[FILENAME_MAX]; FILE *file_fd = NULL; +pcap_hdr_t file_header = { + 0xa1b2c3d4, /* magic number */ + 2, 4, /* version number is 2.4 */ + 0, /* timezone */ + 0, /* sigfigs - apparently all tools do this */ + 65535, /* snaplen - this should be long enough */ + MAC_LTE_DLT /* Data Link Type (DLT). Set as unused value 147 for now */ +}; trace_mode_t opt_type = OPT_NONE; -static radio_type_t radio_type; static unsigned int subframesSinceCaptureStart; static int g_socksd = -1;/* UDP socket used for sending frames */ @@ -237,22 +233,13 @@ static void SendFrame(guint8 radioType, guint8 direction, guint8 rntiType, guint8 oob_event, guint8 oob_event_value, uint8_t *pdu_buffer, unsigned int pdu_buffer_size) { - #ifdef JUMBO_FRAME - static unsigned char frameBuffer[9000]; - #else - static unsigned char frameBuffer[1600]; - #endif - static unsigned int frameOffset; + unsigned char frameBuffer[9000]; + unsigned int frameOffset; ssize_t bytesSent; frameOffset = 0; uint16_t tmp16; - /********************************************************************/ - /* Fixed start to each frame (allowing heuristic dissector to work) */ - /* Not NULL terminated */ - memset(frameBuffer+frameOffset, 0, sizeof(mac_lte_info)+pdu_buffer_size + 8); - memcpy(frameBuffer+frameOffset, MAC_LTE_START_STRING, strlen(MAC_LTE_START_STRING)); frameOffset += strlen(MAC_LTE_START_STRING); @@ -279,7 +266,7 @@ static void SendFrame(guint8 radioType, guint8 direction, guint8 rntiType, frameOffset += 2; /* Subframe number */ - frameBuffer[frameOffset++] = MAC_LTE_SUBFRAME_TAG; + frameBuffer[frameOffset++] = MAC_LTE_FRAME_SUBFRAME_TAG; tmp16 = htons(sfnSf); // frame counter : this will give an expert info as wireshark expects SF and not F memcpy(frameBuffer+frameOffset, &tmp16, 2); frameOffset += 2; @@ -313,26 +300,29 @@ static void SendFrame(guint8 radioType, guint8 direction, guint8 rntiType, if (pdu_buffer_size==0) { switch (oob_event) { case ltemac_send_preamble : - LOG_D(OPT,"oob ltemac_send_preamble event %02x." + LOG_D(OPT,"ltemac_send_preamble event %02x." //"%02x." "%02x.%02x\n", - MAC_LTE_OOB_EVENT_TAG, + MAC_LTE_SEND_PREAMBLE_TAG, //ltemac_send_preamble, rnti, oob_event_value); //frameBuffer[frameOffset++]=0; //frameBuffer[frameOffset++]=0; //frameBuffer[frameOffset++]=0; - frameBuffer[frameOffset++] = MAC_LTE_OOB_EVENT_TAG; + frameBuffer[frameOffset++] = MAC_LTE_SEND_PREAMBLE_TAG; //frameBuffer[frameOffset++]=ltemac_send_preamble; frameBuffer[frameOffset++]=rnti; // is the preamble frameBuffer[frameOffset++]=oob_event_value; break; case ltemac_send_sr: - frameBuffer[frameOffset++]=ltemac_send_sr; + frameBuffer[frameOffset++]=MAC_LTE_SR_TAG ; frameOffset+=2; + frameBuffer[frameOffset++]=rnti; + frameOffset++; frameBuffer[frameOffset++]=oob_event_value; + frameOffset++; break; case ltemac_sr_failure: @@ -394,7 +384,7 @@ static int MAC_LTE_PCAP_WritePDU(MAC_Context_Info_t *context, offset += 2; /* Subframe number */ - context_header[offset++] = MAC_LTE_SUBFRAME_TAG; + context_header[offset++] = MAC_LTE_FRAME_SUBFRAME_TAG; tmp16 = htons(context->subFrameNumber); memcpy(context_header+offset, &tmp16, 2); offset += 2; @@ -423,21 +413,27 @@ static int MAC_LTE_PCAP_WritePDU(MAC_Context_Info_t *context, return 1; } - +#include +extern RAN_CONTEXT_t RC; +#include /* Remote serveraddress (where Wireshark is running) */ void trace_pdu(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size, int ueid, int rntiType, int rnti, uint16_t sysFrameNumber, uint8_t subFrameNumber, int oob_event, int oob_event_value) { MAC_Context_Info_t pdu_context; - + int radioType=FDD_RADIO; + if (RC.eNB[0][0]!=NULL) + radioType=RC.eNB[0][0]->frame_parms.frame_type== FDD ? FDD_RADIO:TDD_RADIO; + if (PHY_vars_UE_g[0][0] != NULL) + radioType=PHY_vars_UE_g[0][0]->frame_parms.frame_type== FDD ? FDD_RADIO:TDD_RADIO; switch (opt_type) { case OPT_WIRESHARK : if (g_socksd == -1) { return; } - SendFrame(radio_type, + SendFrame( radioType, (direction == DIRECTION_DOWNLINK) ? DIRECTION_DOWNLINK : DIRECTION_UPLINK, rntiType, rnti, ueid, (sysFrameNumber<<4) + subFrameNumber, 1, 0, 1, //guint8 isPredefinedData, guint8 retx, guint8 crcStatus @@ -450,7 +446,7 @@ void trace_pdu(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size, return; } - pdu_context.radioType = radio_type; + pdu_context.radioType = radioType; pdu_context.direction = (direction == DIRECTION_DOWNLINK) ? DIRECTION_DOWNLINK : DIRECTION_UPLINK; pdu_context.rntiType = rntiType; @@ -470,7 +466,7 @@ void trace_pdu(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size, } } /*---------------------------------------------------*/ -int init_opt(char *path, char *ip, char *port, radio_type_t radio_type_p) +int init_opt(char *path, char *ip) { uint16_t in_port; subframesSinceCaptureStart = 0; @@ -489,13 +485,7 @@ int init_opt(char *path, char *ip, char *port, radio_type_t radio_type_p) strcpy( in_ip, "127.0.0.1" ); } - if (port != NULL) { - in_port = atoi(port); - } else { - in_port = PACKET_MAC_LTE_DEFAULT_UDP_PORT; - } - - radio_type = radio_type_p; + in_port = PACKET_MAC_LTE_DEFAULT_UDP_PORT; // trace_mode switch (opt_type) { diff --git a/openair2/UTIL/OPT/ws_compiler_tests.h b/openair2/UTIL/OPT/ws_compiler_tests.h new file mode 100644 index 0000000000..46a4ab6099 --- /dev/null +++ b/openair2/UTIL/OPT/ws_compiler_tests.h @@ -0,0 +1,138 @@ +/* ws_compiler_tests.h + * + * Wireshark - Network traffic analyzer + * By Gerald Combs + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef __WS_COMPILER_TESTS_H__ +#define __WS_COMPILER_TESTS_H__ + +/* + * This was introduced by Clang: + * + * http://clang.llvm.org/docs/LanguageExtensions.html#has-attribute + * + * in some version (which version?); it has been picked up by GCC 5.0. + */ +#ifndef __has_attribute + /* + * It's a macro, so you can check whether it's defined to check + * whether it's supported. + * + * If it's not, define it to always return 0, so that we move on to + * the fallback checks. + */ + #define __has_attribute(x) 0 +#endif + +/* + * Note that the C90 spec's "6.8.1 Conditional inclusion" and the + * C99 spec's and C11 spec's "6.10.1 Conditional inclusion" say: + * + * Prior to evaluation, macro invocations in the list of preprocessing + * tokens that will become the controlling constant expression are + * replaced (except for those macro names modified by the defined unary + * operator), just as in normal text. If the token "defined" is + * generated as a result of this replacement process or use of the + * "defined" unary operator does not match one of the two specified + * forms prior to macro replacement, the behavior is undefined. + * + * so you shouldn't use defined() in a #define that's used in #if or + * #elif. Some versions of Clang, for example, will warn about this. + * + * Instead, we check whether the pre-defined macros for particular + * compilers are defined and, if not, define the "is this version XXX + * or a later version of this compiler" macros as 0. + */ + +/* + * Check whether this is GCC major.minor or a later release, or some + * compiler that claims to be "just like GCC" of that version or a + * later release. + */ + +#if !defined(__GNUC__) + #define WS_IS_AT_LEAST_GNUC_VERSION(major, minor) 0 +#else + #define WS_IS_AT_LEAST_GNUC_VERSION(major, minor) \ + (__GNUC__ > (major) || \ + (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))) +#endif + +/* + * Check whether this is Clang major.minor or a later release. + */ + +#if !defined(__clang__) + #define WS_IS_AT_LEAST_CLANG_VERSION(major, minor) 0 +#else + #define WS_IS_AT_LEAST_CLANG_VERSION(major, minor) \ + (__clang_major__ > (major) || \ + (__clang_major__ == (major) && __clang_minor__ >= (minor))) +#endif + +/* + * Check whether this is Sun C/SunPro C/Oracle Studio major.minor + * or a later release. + * + * The version number in __SUNPRO_C is encoded in hex BCD, with the + * uppermost hex digit being the major version number, the next + * one or two hex digits being the minor version number, and + * the last digit being the patch version. + * + * It represents the *compiler* version, not the product version; + * see + * + * https://sourceforge.net/p/predef/wiki/Compilers/ + * + * for a partial mapping, which we assume continues for later + * 12.x product releases. + */ + +#if !defined(__SUNPRO_C) + #define WS_IS_AT_LEAST_SUNC_VERSION(major, minor) 0 +#else + #define WS_SUNPRO_VERSION_TO_BCD(major, minor) \ + (((minor) >= 10) ? \ + (((major) << 12) | (((minor)/10) << 8) | (((minor)%10) << 4)) : \ + (((major) << 8) | ((minor) << 4))) + #define WS_IS_AT_LEAST_SUNC_VERSION(major, minor) \ + (__SUNPRO_C >= WS_SUNPRO_VERSION_TO_BCD((major), (minor))) +#endif + +/* + * Check whether this is IBM XL C major.minor or a later release. + * + * The version number in __xlC__ has the major version in the + * upper 8 bits and the minor version in the lower 8 bits. + */ + +#if !defined(__xlC__) + #define WS_IS_AT_LEAST_XL_C_VERSION(major, minor) 0 +#else + #define WS_IS_AT_LEAST_XL_C_VERSION(major, minor) \ + (__xlC__ >= (((major) << 8) | (minor))) +#endif + +/* + * Check whether this is HP aC++/HP C major.minor or a later release. + * + * The version number in __HP_aCC is encoded in zero-padded decimal BCD, + * with the "A." stripped off, the uppermost two decimal digits being + * the major version number, the next two decimal digits being the minor + * version number, and the last two decimal digits being the patch version. + * (Strip off the A., remove the . between the major and minor version + * number, and add two digits of patch.) + */ + +#if !defined(__HP_aCC) + #define WS_IS_AT_LEAST_HP_C_VERSION(major, minor) 0 +#else + #define WS_IS_AT_LEAST_HP_C_VERSION(major, minor) \ + (__HP_aCC >= ((major)*10000 + (minor)*100)) +#endif + +#endif /* __WS_COMPILER_TESTS_H__ */ diff --git a/openair2/UTIL/OPT/ws_symbol_export.h b/openair2/UTIL/OPT/ws_symbol_export.h new file mode 100644 index 0000000000..4c7a2f710a --- /dev/null +++ b/openair2/UTIL/OPT/ws_symbol_export.h @@ -0,0 +1,202 @@ +/* + * Cross platform defines for exporting symbols from shared libraries + * + * Wireshark - Network traffic analyzer + * By Balint Reczey + * Copyright 2013 Balint Reczey + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "ws_compiler_tests.h" + +/** Reset symbol export behavior. + * If you {un}define WS_BUILD_DLL on the fly you'll have to define this + * as well. + */ +#ifdef RESET_SYMBOL_EXPORT + +#ifdef SYMBOL_EXPORT_H +#undef SYMBOL_EXPORT_H +#endif + +#ifdef WS_DLL_PUBLIC +#undef WS_DLL_PUBLIC +#endif + +#ifdef WS_DLL_PUBLIC_DEF +#undef WS_DLL_PUBLIC_DEF +#endif + +#ifdef WS_DLL_LOCAL +#undef WS_DLL_LOCAL +#endif + +#endif /* RESET_SYMBOL_EXPORT */ + +#ifndef SYMBOL_EXPORT_H +#define SYMBOL_EXPORT_H + +/* + * NOTE: G_HAVE_GNUC_VISIBILITY is defined only if all of + * + * __attribute__ ((visibility ("hidden"))) + * + * __attribute__ ((visibility ("internal"))) + * + * __attribute__ ((visibility ("protected"))) + * + * __attribute__ ((visibility ("default"))) + * + * are supported, and at least some versions of GCC from Apple support + * "default" and "hidden" but not "internal" or "protected", so it + * shouldn't be used to determine whether "hidden" or "default" is + * supported. + * + * This also means that we shouldn't use G_GNUC_INTERNAL instead of + * WS_DLL_LOCAL, as GLib uses G_HAVE_GNUC_VISIBILITY to determine + * whether to use __attribute__ ((visibility ("hidden"))) for + * G_GNUC_INTERNAL, and that will not use it even with compilers + * that support it. + */ + +/* Originally copied from GCC Wiki at http://gcc.gnu.org/wiki/Visibility */ +#if defined _WIN32 || defined __CYGWIN__ + /* Compiling for Windows, so we use the Windows DLL declarations. */ + #ifdef WS_BUILD_DLL + /* + * Building a DLL; for all definitions, we want dllexport, and + * (presumably so source from DLL and source from a program using the + * DLL can both include a header that declares APIs and exported data + * for the DLL), for declarations, either dllexport or dllimport will + * work (they mean the same thing for a declaration when building a DLL). + */ + #ifdef __GNUC__ + /* GCC */ + #define WS_DLL_PUBLIC_DEF __attribute__ ((dllexport)) + #else /* ! __GNUC__ */ + /* + * Presumably MSVC. + * Note: actually gcc seems to also support this syntax. + */ + #define WS_DLL_PUBLIC_DEF __declspec(dllexport) + #endif /* __GNUC__ */ + #else /* WS_BUILD_DLL */ + /* + * Building a program; we should only see declarations, not definitions, + * with WS_DLL_PUBLIC, and they all represent APIs or data imported + * from a DLL, so use dllimport. + * + * For functions, export shouldn't be necessary; for data, it might + * be necessary, e.g. if what's declared is an array whose size is + * not given in the declaration. + */ + #ifdef __GNUC__ + /* GCC */ + #define WS_DLL_PUBLIC_DEF __attribute__ ((dllimport)) + #elif ! (defined ENABLE_STATIC) /* ! __GNUC__ */ + /* + * Presumably MSVC, and we're not building all-static. + * Note: actually gcc seems to also support this syntax. + */ + #define WS_DLL_PUBLIC_DEF __declspec(dllimport) + #else /* ! __GNUC__ && ENABLE_STATIC */ + /* + * Presumably MSVC, and we're building all-static, so we're + * not building any DLLs. + */ + #define WS_DLL_PUBLIC_DEF + #endif /* __GNUC__ */ + #endif /* WS_BUILD_DLL */ + + /* + * Symbols in a DLL are *not* exported unless they're specifically + * flagged as exported, so, for a non-static but non-exported + * symbol, we don't have to do anything. + */ + #define WS_DLL_LOCAL +#else /* defined _WIN32 || defined __CYGWIN__ */ + /* + * Compiling for UN*X, where the dllimport and dllexport stuff + * is neither necessary nor supported; just specify the + * visibility if we have a compiler that supports doing so. + */ + #if WS_IS_AT_LEAST_GNUC_VERSION(3,4) \ + || WS_IS_AT_LEAST_XL_C_VERSION(12,0) + /* + * GCC 3.4 or later, or some compiler asserting compatibility with + * GCC 3.4 or later, or XL C 13.0 or later, so we have + * __attribute__((visibility()). + */ + + /* + * Symbols exported from libraries. + */ + #define WS_DLL_PUBLIC_DEF __attribute__ ((visibility ("default"))) + + /* + * Non-static symbols *not* exported from libraries. + */ + #define WS_DLL_LOCAL __attribute__ ((visibility ("hidden"))) + #elif WS_IS_AT_LEAST_SUNC_VERSION(5,5) + /* + * Sun C 5.5 or later, so we have __global and __hidden. + * (Sun C 5.9 and later also have __attribute__((visibility()), + * but there's no reason to prefer it with Sun C.) + */ + + /* + * Symbols exported from libraries. + */ + #define WS_DLL_PUBLIC_DEF __global + + /* + * Non-static symbols *not* exported from libraries. + */ + #define WS_DLL_LOCAL __hidden + #else + /* + * We have neither a way to make stuff not explicitly marked as + * visible invisible outside a library nor a way to make stuff + * explicitly marked as local invisible outside the library. + */ + + /* + * Symbols exported from libraries. + */ + #define WS_DLL_PUBLIC_DEF + + /* + * Non-static symbols *not* exported from libraries. + */ + #define WS_DLL_LOCAL + #endif +#endif + +/* + * You *must* use this for exported data *declarations*; if you use + * WS_DLL_PUBLIC_DEF, some compilers, such as MSVC++, will complain + * about array definitions with no size. + * + * You must *not* use this for exported data *definitions*, as that + * will, for some compilers, cause warnings about items being initialized + * and declared extern. + * + * Either can be used for exported *function* declarations and definitions. + */ +#define WS_DLL_PUBLIC WS_DLL_PUBLIC_DEF extern + +#endif /* SYMBOL_EXPORT_H */ + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local Variables: + * c-basic-offset: 2 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=2 tabstop=8 expandtab: + * :indentSize=2:tabSize=8:noTabs=true: + */ diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index e84f99e67f..628bcc1bee 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -975,14 +975,7 @@ int main( int argc, char **argv ) #endif if (opt_type != OPT_NONE) { - radio_type_t radio_type; - - if (frame_parms[0]->frame_type == FDD) - radio_type = RADIO_TYPE_FDD; - else - radio_type = RADIO_TYPE_TDD; - - if (init_opt(in_path, in_ip, NULL, radio_type) == -1) + if (init_opt(in_path, in_ip) == -1) LOG_E(OPT,"failed to run OPT \n"); } diff --git a/targets/RT/USER/lte-uesoftmodem.c b/targets/RT/USER/lte-uesoftmodem.c index a2a12f9dd9..ce18ca7456 100644 --- a/targets/RT/USER/lte-uesoftmodem.c +++ b/targets/RT/USER/lte-uesoftmodem.c @@ -862,14 +862,7 @@ int main( int argc, char **argv ) #endif if (opt_type != OPT_NONE) { - radio_type_t radio_type; - - if (frame_parms[0]->frame_type == FDD) - radio_type = RADIO_TYPE_FDD; - else - radio_type = RADIO_TYPE_TDD; - - if (init_opt(in_path, in_ip, NULL, radio_type) == -1) + if (init_opt(in_path, in_ip) == -1) LOG_E(OPT,"failed to run OPT \n"); } From 3b3b97180709a6893dd9501665c5a5016b122ad9 Mon Sep 17 00:00:00 2001 From: Konstantinos Alexandris Date: Thu, 23 Aug 2018 16:15:14 +0200 Subject: [PATCH 027/379] minor fixes for x2 + modify conf files The configuration file has now to contain ENB_IPV4_ADDRESS_FOR_X2C and ENB_PORT_FOR_X2C in the NETWORK_INTERFACES section. For example: NETWORK_INTERFACES : { ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24"; ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; --- .../enb.band7.tm1.100PRB.usrpb210.conf | 4 +++- .../enb.band7.tm1.25PRB.usrpb210.conf | 4 +++- .../enb.band7.tm1.50PRB.usrpb210.conf | 4 +++- .../enb.band38.tm1.usrpb210.tdd.10MHz.conf | 4 +++- .../enb.band38.tm1.usrpb210.tdd.20MHz.conf | 4 +++- .../enb.band38.tm1.usrpb210.tdd.5MHz.conf | 4 +++- .../enb.band7.tm1.usrpb210.fdd.10MHz.conf | 4 +++- .../enb.band7.tm1.usrpb210.fdd.20MHz.conf | 4 +++- .../enb.band7.tm1.usrpb210.fdd.5MHz.conf | 4 +++- .../v2/config/rcc.band7.tm1.if4p5.10MHz.conf | 4 +++- .../v2/config/rcc.band7.tm1.if4p5.20MHz.conf | 4 +++- .../v2/config/rcc.band7.tm1.if4p5.5MHz.conf | 4 +++- ...rru.band7.tm1.if4p5.10MHz.udp.usrpb210.conf | 4 +++- ...rru.band7.tm1.if4p5.20MHz.udp.usrpb210.conf | 4 +++- .../rru.band7.tm1.if4p5.5MHz.udp.usrpb210.conf | 4 +++- openair2/COMMON/x2ap_messages_types.h | 3 +++ openair2/ENB_APP/enb_config.c | 7 +++++++ openair2/ENB_APP/enb_paramdef.h | 18 +++--------------- .../CONF/enb.centos.calisson.conf | 3 +++ .../CONF/enb.centos.memphis.conf | 3 +++ .../CONF/enb.centos.nord.conf | 3 +++ .../CONF/enb.band38.tm1.100PRB.usrpx310.conf | 3 +++ .../CONF/enb.band38.tm1.usrpx310.conf | 3 +++ .../CONF/enb.band7.tm1.100PRB.usrpx310.conf | 4 +++- .../enb.band7.tm1.25PRB.usrpb210.replay.conf | 4 +++- .../CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf | 6 +++--- .../CONF/enb.band7.tm1.50PRB.usrpb210.conf | 4 +++- ....band7.tm1.50PRB.usrpb210_ue_expansion.conf | 4 +++- .../CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf | 4 +++- .../CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf | 4 +++- .../CONF/rcc.band7.tm1.50PRB.nfapi.conf | 4 +++- .../CONF/rcc.band7.tm1.if4p5.50PRB.conf | 4 +++- .../CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf | 4 +++- 33 files changed, 103 insertions(+), 42 deletions(-) diff --git a/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf index 2bd28a60df..633b3c091a 100644 --- a/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf @@ -183,12 +183,14 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; } ); diff --git a/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf index 102fc89a13..e0c5f757cf 100644 --- a/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf @@ -183,12 +183,14 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; } ); diff --git a/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf index fe6e2f0b59..af54f439f4 100644 --- a/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf @@ -183,12 +183,14 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; } ); 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 index e2ea056ea1..08eb76e09d 100644 --- 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 @@ -146,12 +146,14 @@ eNBs = 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 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.82/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; log_config : 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 index b2ac3ccf42..eff42040ad 100644 --- 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 @@ -146,12 +146,14 @@ eNBs = 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 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.82/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; log_config : 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 index 006d59d2a5..8eb66d4643 100644 --- 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 @@ -146,12 +146,14 @@ eNBs = 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 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.82/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; log_config : diff --git a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.10MHz.conf b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.10MHz.conf index 8c76d95d4c..dc3b3bc4f0 100644 --- a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.10MHz.conf +++ b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.10MHz.conf @@ -146,12 +146,14 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.19/24"; ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.19/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.19/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; log_config : diff --git a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.20MHz.conf b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.20MHz.conf index 0d2bb27dcc..6af71831f5 100644 --- a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.20MHz.conf +++ b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.20MHz.conf @@ -146,12 +146,14 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.19/24"; ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.19/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.19/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; log_config : diff --git a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.5MHz.conf b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.5MHz.conf index c418f355f2..077b6e4ead 100644 --- a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.5MHz.conf +++ b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.5MHz.conf @@ -146,12 +146,14 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.19/24"; ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.19/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.19/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; log_config : 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 index 89e06d2b1e..e2f5981418 100644 --- a/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.10MHz.conf +++ b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.10MHz.conf @@ -146,12 +146,14 @@ eNBs = 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 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.18/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; rrh_gw_config = ( 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 index c8e6c861e0..9e08414ab3 100644 --- a/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.20MHz.conf +++ b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.20MHz.conf @@ -146,12 +146,14 @@ eNBs = 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 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.18/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; rrh_gw_config = ( 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 index cc00f4f3ea..2a598c31d3 100644 --- a/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.5MHz.conf +++ b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.5MHz.conf @@ -146,12 +146,14 @@ eNBs = 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 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.18/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; rrh_gw_config = ( 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 index 6e1e776fed..4966108d03 100644 --- 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 @@ -148,12 +148,14 @@ eNBs = 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 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.215/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; rrh_gw_config = ( 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 index 7e7c3c185d..4f3b25349a 100644 --- 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 @@ -148,12 +148,14 @@ eNBs = 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 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.215/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; rrh_gw_config = ( 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 index 3098660c8d..54e5a327cd 100644 --- 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 @@ -148,12 +148,14 @@ eNBs = 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 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.215/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; rrh_gw_config = ( diff --git a/openair2/COMMON/x2ap_messages_types.h b/openair2/COMMON/x2ap_messages_types.h index d3c324a35c..6c4031b981 100644 --- a/openair2/COMMON/x2ap_messages_types.h +++ b/openair2/COMMON/x2ap_messages_types.h @@ -87,6 +87,9 @@ typedef struct x2ap_register_enb_req_s { /* Number of SCTP streams used for associations */ uint16_t sctp_in_streams; uint16_t sctp_out_streams; + + /* eNB port for X2C*/ + uint32_t enb_port_for_X2C; } x2ap_register_enb_req_t; //-------------------------------------------------------------------------------------------// diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 7591bc3d07..a275d0c766 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -2549,6 +2549,13 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) // NETWORK_INTERFACES config_get( NETParams,sizeof(NETParams)/sizeof(paramdef_t),aprefix); + X2AP_REGISTER_ENB_REQ (msg_p).enb_port_for_X2C = (uint32_t)*(NETParams[ENB_PORT_FOR_X2C_IDX].uptr); + + if ((NETParams[ENB_IPV4_ADDR_FOR_X2C_IDX].strptr == NULL) || (X2AP_REGISTER_ENB_REQ (msg_p).enb_port_for_X2C == 0)) { + LOG_E(RRC,"Add eNB IPv4 address and/or port for X2C in the CONF file!\n"); + exit(1); + } + cidr = *(NETParams[ENB_IPV4_ADDR_FOR_X2C_IDX].strptr); address = strtok(cidr, "/"); diff --git a/openair2/ENB_APP/enb_paramdef.h b/openair2/ENB_APP/enb_paramdef.h index 71d7d634c0..c540e63db1 100755 --- a/openair2/ENB_APP/enb_paramdef.h +++ b/openair2/ENB_APP/enb_paramdef.h @@ -760,12 +760,8 @@ typedef enum { #define ENB_INTERFACE_NAME_FOR_S1U_IDX 2 #define ENB_IPV4_ADDR_FOR_S1U_IDX 3 #define ENB_PORT_FOR_S1U_IDX 4 -#define ENB_INTERFACE_NAME_FOR_X2C 5 -#define ENB_IPV4_ADDR_FOR_X2C_IDX 6 -#define ENB_PORT_FOR_X2C 7 -#define ENB_INTERFACE_NAME_FOR_X2U 8 -#define ENB_IPV4_ADDR_FOR_X2U 9 -#define ENB_PORT_FOR_X2U 10 +#define ENB_IPV4_ADDR_FOR_X2C_IDX 5 +#define ENB_PORT_FOR_X2C_IDX 6 /* S1 interface configuration parameters names */ #define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME "ENB_INTERFACE_NAME_FOR_S1_MME" @@ -775,12 +771,8 @@ typedef enum { #define ENB_CONFIG_STRING_ENB_PORT_FOR_S1U "ENB_PORT_FOR_S1U" /* X2 interface configuration parameters names */ -#define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_X2C "ENB_INTERFACE_NAME_FOR_X2C" #define ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C "ENB_IPV4_ADDRESS_FOR_X2C" #define ENB_CONFIG_STRING_ENB_PORT_FOR_X2C "ENB_PORT_FOR_X2C" -#define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_X2U "ENB_INTERFACE_NAME_FOR_X2U" -#define ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2U "ENB_IPV4_ADDRESS_FOR_X2U" -#define ENB_CONFIG_STRING_ENB_PORT_FOR_X2U "ENB_PORT_FOR_X2U" /*--------------------------------------------------------------------------------------------------------------------------------------------------*/ /* S1/X2 interface configuration parameters */ @@ -792,12 +784,8 @@ typedef enum { {ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, NULL, 0, uptr:NULL, defintval:2152L, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_X2C, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_ENB_PORT_FOR_X2C, NULL, 0, uptr:NULL, defintval:2152L, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_X2U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_ENB_PORT_FOR_X2U, NULL, 0, uptr:NULL, defintval:2152L, TYPE_UINT, 0} \ +{ENB_CONFIG_STRING_ENB_PORT_FOR_X2C, NULL, 0, uptr:NULL, defintval:0L, TYPE_UINT, 0}, \ } diff --git a/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.calisson.conf b/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.calisson.conf index 09406d98cf..7ec670d568 100755 --- a/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.calisson.conf +++ b/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.calisson.conf @@ -47,6 +47,9 @@ eNBs = ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24"; + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.13.10/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; } diff --git a/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.memphis.conf b/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.memphis.conf index 47c12a7926..e3a0ea3c56 100755 --- a/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.memphis.conf +++ b/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.memphis.conf @@ -59,6 +59,9 @@ eNBs = ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24"; + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.13.10/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; # available options for level: error, warn, notice, info, debug, trace # available options for verbosity: none, low, medium, high, full diff --git a/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.nord.conf b/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.nord.conf index 4360884c1d..591257ff71 100755 --- a/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.nord.conf +++ b/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.nord.conf @@ -46,6 +46,9 @@ eNBs = ENB_INTERFACE_NAME_FOR_S1U = "eth1"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24"; + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.13.10/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; } diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.100PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.100PRB.usrpx310.conf index 73da2a8b3f..bec9c2c6dd 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.100PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.100PRB.usrpx310.conf @@ -151,6 +151,9 @@ eNBs = ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; log_config : diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf index bd0503a466..834b6cf044 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf @@ -151,6 +151,9 @@ eNBs = ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; log_config : diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf index 9a2ca88257..6b3614f490 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf @@ -149,12 +149,14 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth6"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; ENB_INTERFACE_NAME_FOR_S1U = "eth6"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; } ); diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf index 99df987b43..fb184549c5 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf @@ -183,12 +183,14 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24"; ENB_INTERFACE_NAME_FOR_S1U = "lo"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.13.10/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; } ); diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf index 7d73e55c6c..c6ace3b68f 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf @@ -183,14 +183,14 @@ 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_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.4/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 - - + + ENB_IPV4_ADDRESS_FOR_X2C = "127.0.0.2/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; } ); diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf index 69166672d7..c2f10e20ae 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf @@ -183,12 +183,14 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; } ); diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf index 1197c4ad93..e46467598e 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf @@ -150,12 +150,14 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.19/24"; ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.19/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.19/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; } ); diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf index c4d23bac42..a6efe74283 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf @@ -152,12 +152,14 @@ 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_S1U = "lo"; ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.5/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "127.0.0.2/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; } ); diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf index 71a163209d..fefb4b11de 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf @@ -153,12 +153,14 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "vboxnet0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.56.1/24"; ENB_INTERFACE_NAME_FOR_S1U = "vboxnet0"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.56.1/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.56.1/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; } diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf index a6da42c2f5..cd21fb935e 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf @@ -183,12 +183,14 @@ 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_S1U = "lo"; ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.5/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "127.0.0.2/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; } ); diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf index 550de4e1a2..581012d7d3 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf @@ -152,12 +152,14 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.19/24"; ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.5/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.19/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; } ); diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf index 2b5a0ca684..5f9f8c4d7b 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf @@ -151,12 +151,14 @@ 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_S1U = "lo"; ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.5/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "127.0.0.2/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; } ); From f65c39022643925c50ca0ab9668f15f784cf204c Mon Sep 17 00:00:00 2001 From: WANG Tsu-Han Date: Thu, 23 Aug 2018 18:34:50 +0200 Subject: [PATCH 028/379] warning removal --- openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c | 9 +++------ openair2/LAYER2/MAC/eNB_scheduler_phytest.c | 3 --- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c index c8ed5319ed..d924d5117d 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c @@ -549,13 +549,10 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB, uint32_t tti_offset; uint8_t re; uint8_t *x0p; - uint8_t first_re,last_re; + uint8_t first_re; - last_re=12; first_re=0; - if (skip_half==1) - last_re=6; - else if (skip_half==2) + if (skip_half==2) first_re=6; re=first_re; @@ -614,7 +611,7 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB, ((int16_t *)&txdataF[0][tti_offset])[16]=qam_table_s0[qam64_table_offset_re]; ((int16_t *)&txdataF[0][tti_offset])[17]=qam_table_s0[qam64_table_offset_im]; - qam64_table_offset_re=(x0p[54]<<2)|(x0p[56]<<1)|x0p[58]; + qam64_table_offset_re=(x0p[54]<<2)|(x0p[56]<<1)|x0p[58]; qam64_table_offset_im=(x0p[55]<<2)|(x0p[57]<<1)|x0p[59]; ((int16_t *)&txdataF[0][tti_offset])[18]=qam_table_s0[qam64_table_offset_re]; ((int16_t *)&txdataF[0][tti_offset])[19]=qam_table_s0[qam64_table_offset_im]; diff --git a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c index 19570c6e10..25a15781ad 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c @@ -212,7 +212,6 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s int sched_frame=frameP; int sched_subframe = (subframeP+4)%10; uint16_t ul_req_index; - uint8_t dlsch_flag; if (sched_subframenumber_of_dci++; ul_req_index = 0; - dlsch_flag = 0; for(ul_req_index = 0;ul_req_index < ul_req->number_of_pdus;ul_req_index++){ if(ul_req->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE){ - dlsch_flag = 1; LOG_D(MAC,"Frame %d, Subframe %d:rnti %x ul_req_index %d Switched UCI HARQ to ULSCH HARQ(first)\n",frameP,subframeP,rnti,ul_req_index); break; } From 8b46aea34d7b942aa2a27e073c3a096f425b2968 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Fri, 24 Aug 2018 11:57:13 +0200 Subject: [PATCH 029/379] CI: optimization on scripts Signed-off-by: Raphael Defosseux --- .../enb.band7.tm1.100PRB.usrpb210.conf | 2 +- .../enb.band7.tm1.25PRB.usrpb210.conf | 2 +- .../enb.band7.tm1.50PRB.usrpb210.conf | 2 +- ci-scripts/main.py | 18 ++++++++++++++---- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf index 2bd28a60df..4380bd30be 100644 --- a/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf @@ -33,7 +33,7 @@ eNBs = tdd_config_s = 0; prefix_type = "NORMAL"; eutra_band = 7; - downlink_frequency = 2685000000L; + downlink_frequency = 2680000000L; uplink_frequency_offset = -120000000; Nid_cell = 0; N_RB_DL = 100; diff --git a/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf index 102fc89a13..dded9cfdeb 100644 --- a/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf @@ -33,7 +33,7 @@ eNBs = tdd_config_s = 0; prefix_type = "NORMAL"; eutra_band = 7; - downlink_frequency = 2685000000L; + downlink_frequency = 2680000000L; uplink_frequency_offset = -120000000; Nid_cell = 0; N_RB_DL = 25; diff --git a/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf index fe6e2f0b59..7c4292eb61 100644 --- a/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf @@ -33,7 +33,7 @@ eNBs = tdd_config_s = 0; prefix_type = "NORMAL"; eutra_band = 7; - downlink_frequency = 2685000000L; + downlink_frequency = 2680000000L; uplink_frequency_offset = -120000000; Nid_cell = 0; N_RB_DL = 50; diff --git a/ci-scripts/main.py b/ci-scripts/main.py index c453558790..c08db90946 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -308,17 +308,25 @@ class SSHConnection(): loopCounter = loopCounter - 1 if (loopCounter == 0): doLoop = False + # Checking if process is still alive + self.command('stdbuf -o0 ps -aux | grep -v grep | grep --color=never lte-softmodem', '\$', 5) + result = re.search('lte-softmodem', str(self.ssh.before)) + if result is None: + logging.debug('\u001B[1;37;41m eNB process is already down \u001B[0m') + self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'KO', 0) + self.CreateHtmlFooter() + sys.exit(1) logging.debug('\u001B[1;30;43m eNB logging system did not show got sync! See with attach later \u001B[0m') - self.CreateHtmlTestRow(config_file, 'eNB not showing got sync!', 0) + self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'eNB not showing got sync!', 0) # Not getting got sync is bypassed for the moment #sys.exit(1) - self.command('stdbuf -o0 cat enb_' + SSH.testCase_id + '.log | grep -i sync', '\$', 10) + self.command('stdbuf -o0 cat enb_' + SSH.testCase_id + '.log | grep --color=never -i sync', '\$', 10) result = re.search('got sync', str(self.ssh.before)) if result is None: time.sleep(6) else: doLoop = False - self.CreateHtmlTestRow(config_file, 'OK', 0) + self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'OK', 0) logging.debug('\u001B[1m Initialize eNB Completed\u001B[0m') self.close() @@ -650,6 +658,7 @@ class SSHConnection(): if (status_queue.empty()): self.CreateHtmlTestRow(self.ping_args, 'KO', len(self.UEDevices)) + self.CreateHtmlFooter() sys.exit(1) else: ping_status = True @@ -695,7 +704,7 @@ class SSHConnection(): else: iperf_bandwidth_new = residualBW iperf_bandwidth_str = '-b ' + iperf_bandwidth - iperf_bandwidth_str_new = '-b ' + str(iperf_bandwidth_new) + iperf_bandwidth_str_new = '-b ' + ('%.2f' % iperf_bandwidth_new) result = re.sub(iperf_bandwidth_str, iperf_bandwidth_str_new, str(self.iperf_args)) if result is None: logging.debug('\u001B[1;37;41m Calculate Iperf bandwidth Failed! \u001B[0m') @@ -1074,6 +1083,7 @@ class SSHConnection(): if (status_queue.empty()): self.CreateHtmlTestRow(self.iperf_args, 'KO', len(self.UEDevices)) + self.CreateHtmlFooter() sys.exit(1) else: iperf_status = True From b5435440cd448f862fb07ab8bf0860922448ac7e Mon Sep 17 00:00:00 2001 From: WANG Tsu-Han Date: Fri, 24 Aug 2018 12:14:51 +0200 Subject: [PATCH 030/379] bug fix for QPSK modulation with pilot --- openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c index d924d5117d..bfdcdc1e94 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c @@ -285,8 +285,8 @@ int allocate_REs_in_RB_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB, re<6; x0p+=2) { - qpsk_table_offset_re+=x0p[0]; - qpsk_table_offset_im+=x0p[1]; + qpsk_table_offset_re=x0p[0]; + qpsk_table_offset_im=x0p[1]; ((int16_t *)&txdataF[0][tti_offset])[0]=qam_table_s0[qpsk_table_offset_re]; ((int16_t *)&txdataF[0][tti_offset])[1]=qam_table_s0[qpsk_table_offset_im]; tti_offset+=P1_SHIFT[re+1]; @@ -297,8 +297,8 @@ int allocate_REs_in_RB_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB, re<12; x0p+=2) { - qpsk_table_offset_re+=x0p[0]; - qpsk_table_offset_im+=x0p[1]; + qpsk_table_offset_re=x0p[0]; + qpsk_table_offset_im=x0p[1]; ((int16_t *)&txdataF[0][tti_offset])[0]=qam_table_s0[qpsk_table_offset_re]; ((int16_t *)&txdataF[0][tti_offset])[1]=qam_table_s0[qpsk_table_offset_im]; tti_offset+=P1_SHIFT[re+1]; From e469680d8049a01bad372238a0b9e95c3aa43403 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Fri, 24 Aug 2018 14:37:40 +0200 Subject: [PATCH 031/379] CI: fix in python Signed-off-by: Raphael Defosseux --- ci-scripts/main.py | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index c08db90946..d172d66545 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -300,6 +300,7 @@ class SSHConnection(): self.command('cd cmake_targets', '\$', 5) self.command('echo "./lte_build_oai/build/lte-softmodem -O ' + self.eNBSourceCodePath + '/' + ci_full_config_file + extra_options + '" > ./my-lte-softmodem-run.sh ', '\$', 5) self.command('chmod 775 ./my-lte-softmodem-run.sh ', '\$', 5) + self.command('echo ' + self.eNBPassword + ' | sudo -S rm -Rf enb_' + SSH.testCase_id + '.log', '\$', 5) self.command('echo ' + self.eNBPassword + ' | sudo -S -E daemon --inherit --unsafe --name=enb_daemon --chdir=' + self.eNBSourceCodePath + '/cmake_targets -o ' + self.eNBSourceCodePath + '/cmake_targets/enb_' + SSH.testCase_id + '.log ./my-lte-softmodem-run.sh', '\$', 5) time.sleep(6) doLoop = True @@ -309,26 +310,34 @@ class SSHConnection(): if (loopCounter == 0): doLoop = False # Checking if process is still alive - self.command('stdbuf -o0 ps -aux | grep -v grep | grep --color=never lte-softmodem', '\$', 5) - result = re.search('lte-softmodem', str(self.ssh.before)) - if result is None: - logging.debug('\u001B[1;37;41m eNB process is already down \u001B[0m') - self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'KO', 0) - self.CreateHtmlFooter() - sys.exit(1) + #self.command('stdbuf -o0 ps -aux | grep -v grep | grep --color=never lte-softmodem', '\$', 5) + #result = re.search('lte-softmodem', str(self.ssh.before)) + #if result is None: + # self.command('rsync -v enb_' + SSH.testCase_id + '.log enb_' + SSH.testCase_id + '.txt; stdbuf -o0 cat enb_' + SSH.testCase_id + '.log | egrep --color=never -i "segmentation fault"', '\$', 5) + # result = re.search('egmentation fault', str(self.ssh.before)) + # logging.debug('\u001B[1;37;41m eNB process is already down \u001B[0m') + # if result is not None: + # logging.debug('\u001B[1;37;41m Segmentation fault \u001B[0m') + # logging.debug(str(self.ssh.before)) + # self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'KO', 0) + # self.CreateHtmlFooter() + # self.close() + # sys.exit(1) logging.debug('\u001B[1;30;43m eNB logging system did not show got sync! See with attach later \u001B[0m') self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'eNB not showing got sync!', 0) # Not getting got sync is bypassed for the moment #sys.exit(1) - self.command('stdbuf -o0 cat enb_' + SSH.testCase_id + '.log | grep --color=never -i sync', '\$', 10) - result = re.search('got sync', str(self.ssh.before)) - if result is None: - time.sleep(6) else: - doLoop = False - self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'OK', 0) - logging.debug('\u001B[1m Initialize eNB Completed\u001B[0m') + self.command('rsync -v enb_' + SSH.testCase_id + '.log enb_' + SSH.testCase_id + '.txt; stdbuf -o0 cat enb_' + SSH.testCase_id + '.log | grep --color=never -i sync', '\$', 4) + result = re.search('got sync', str(self.ssh.before)) + if result is None: + time.sleep(6) + else: + doLoop = False + self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'OK', 0) + logging.debug('\u001B[1m Initialize eNB Completed\u001B[0m') + self.command('rm -f enb_' + SSH.testCase_id + '.txt', '\$', 5) self.close() def InitializeUE_common(self, device_id): From 79588a494e118178ecf305ce4f3037d911cdaf2e Mon Sep 17 00:00:00 2001 From: frtabu Date: Tue, 14 Aug 2018 14:59:41 +0200 Subject: [PATCH 032/379] LOG_F replaced by LOG_DUMPMSG. Add a generic function to dump a buffer or message. Go on with LOG_M implementation improvement. Remove redundant options to enable/disable logs. --- common/utils/LOG/log.c | 192 ++-- common/utils/LOG/log.h | 114 +- common/utils/load_module_shlib.c | 4 +- common/utils/load_module_shlib.h | 12 +- common/utils/telnetsrv/telnetsrv_proccmd.c | 72 +- common/utils/telnetsrv/telnetsrv_proccmd.h | 12 +- openair1/PHY/LTE_ESTIMATION/lte_sync_time.c | 30 +- openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c | 71 +- openair1/PHY/LTE_TRANSPORT/dci_tools.c | 2 +- openair1/PHY/LTE_TRANSPORT/prach.c | 206 ++-- .../PHY/LTE_TRANSPORT/ulsch_demodulation.c | 93 +- openair1/PHY/TOOLS/lte_dfts.c | 127 ++- openair1/SCHED_UE/phy_procedures_lte_ue.c | 1008 ++++++++--------- openair1/SIMULATION/LTE_PHY/dlsim.c | 21 +- openair1/SIMULATION/LTE_PHY/dlsim_tm4.c | 21 +- openair1/SIMULATION/LTE_PHY/dlsim_tm7.c | 21 +- openair1/SIMULATION/LTE_PHY/ulsim.c | 19 +- openair2/ENB_APP/enb_app.c | 104 +- openair2/ENB_APP/enb_config.c | 158 +-- openair2/ENB_APP/enb_paramdef.h | 18 +- openair2/LAYER2/PDCP_v10.1.0/pdcp.c | 23 +- openair2/RRC/LTE/L2_interface.c | 57 +- openair2/RRC/LTE/L2_interface_ue.c | 6 +- openair2/RRC/LTE/MESSAGES/asn1_msg_NB_IoT.c | 18 +- openair2/RRC/LTE/rrc_UE.c | 96 +- openair2/RRC/LTE/rrc_common.c | 1 - openair2/RRC/LTE/rrc_eNB.c | 509 +++------ openair2/RRC/LTE/rrc_eNB_S1AP.c | 10 +- targets/COMMON/create_tasks.c | 4 +- targets/RT/USER/lte-ru.c | 14 +- targets/RT/USER/lte-softmodem.c | 4 +- targets/RT/USER/lte-uesoftmodem.c | 18 +- 32 files changed, 1405 insertions(+), 1660 deletions(-) diff --git a/common/utils/LOG/log.c b/common/utils/LOG/log.c index 02ee849202..0eecd655d1 100644 --- a/common/utils/LOG/log.c +++ b/common/utils/LOG/log.c @@ -54,7 +54,6 @@ mapping log_level_names[] = { {"error", OAILOG_ERR}, - {"file", OAILOG_FILE}, {"warn", OAILOG_WARNING}, {"info", OAILOG_INFO}, {"debug", OAILOG_DEBUG}, @@ -70,18 +69,10 @@ mapping log_options[] = { }; -mapping log_maskmap[] = { - {"prach", DEBUG_PRACH}, - {"RU", DEBUG_RU}, - {"LTEESTIM", DEBUG_LTEESTIM}, - {"ctrlsocket", DEBUG_CTRLSOCKET}, - {"UE_PHYPROC", DEBUG_UE_PHYPROC}, - {"UE_TIMING", UE_TIMING}, - {NULL,-1} -}; +mapping log_maskmap[] = LOG_MASKMAP_INIT; -char *log_level_highlight_start[] = {LOG_RED, LOG_GREEN, LOG_ORANGE, "", LOG_BLUE, LOG_CYBL}; /*!< \brief Optional start-format strings for highlighting */ -char *log_level_highlight_end[] = {LOG_RESET,LOG_RESET,LOG_RESET,LOG_RESET, LOG_RESET,LOG_RESET}; /*!< \brief Optional end-format strings for highlighting */ +char *log_level_highlight_start[] = {LOG_RED, LOG_ORANGE, "", LOG_BLUE, LOG_CYBL}; /*!< \brief Optional start-format strings for highlighting */ +char *log_level_highlight_end[] = {LOG_RESET,LOG_RESET,LOG_RESET, LOG_RESET,LOG_RESET}; /*!< \brief Optional end-format strings for highlighting */ int write_file_matlab(const char *fname,const char *vname,void *data,int length,int dec,char format) @@ -243,6 +234,7 @@ int write_file_matlab(const char *fname,const char *vname,void *data,int length, /* get log parameters from configuration file */ void log_getconfig(log_t *g_log) { char *gloglevel = NULL; + int consolelog ; int level; @@ -250,7 +242,7 @@ void log_getconfig(log_t *g_log) { paramdef_t logparams_level[MAX_LOG_PREDEF_COMPONENTS]; paramdef_t logparams_logfile[MAX_LOG_PREDEF_COMPONENTS]; paramdef_t logparams_debug[sizeof(log_maskmap)/sizeof(mapping)]; - paramdef_t logparams_matlab[sizeof(log_maskmap)/sizeof(mapping)]; + paramdef_t logparams_genfile[sizeof(log_maskmap)/sizeof(mapping)]; int ret = config_get( logparams_defaults,sizeof(logparams_defaults)/sizeof(paramdef_t),CONFIG_STRING_LOG_PREFIX); if (ret <0) { @@ -258,6 +250,7 @@ void log_getconfig(log_t *g_log) { return; } +/* set LOG display options (enable/disable color, thread name, level ) */ for(int i=0; idebug_mask = g_log->debug_mask | log_maskmap[i].value; - if (*(logparams_matlab[i].uptr) ) - g_log->matlab_mask = g_log->matlab_mask | log_maskmap[i].value; + if (*(logparams_genfile[i].uptr) ) + g_log->genfile_mask = g_log->genfile_mask | log_maskmap[i].value; } +/* log globally enabled/disabled */ + set_glog_onlinelog(consolelog); } int register_log_component(char *name, char *fext, int compidx) @@ -354,9 +349,8 @@ int computed_compidx=compidx; } if (computed_compidx >= 0 && computed_compidx log_component[computed_compidx].name = strdup(name); - g_log->log_component[computed_compidx].level = LOG_ERR; - g_log->log_component[computed_compidx].interval = 1; - g_log->log_component[computed_compidx].stream = NULL; + g_log->log_component[computed_compidx].savedlevel = LOG_ERR; + g_log->log_component[computed_compidx].stream = stdout; g_log->log_component[computed_compidx].filelog = 0; g_log->log_component[computed_compidx].filelog_name = malloc(strlen(name)+16);/* /tmp/.%s rounded to ^2 */ sprintf(g_log->log_component[computed_compidx].filelog_name,"/tmp/%s.%s",name,fext); @@ -432,12 +426,9 @@ int logInit (void) g_log->level2string[OAILOG_WARNING] = "W"; // WARNING g_log->level2string[OAILOG_INFO] = "I"; //INFO g_log->level2string[OAILOG_DEBUG] = "D"; // DEBUG - g_log->level2string[OAILOG_FILE] = "F"; // file +// g_log->level2string[OAILOG_FILE] = "F"; // file g_log->level2string[OAILOG_TRACE] = "T"; // TRACE - - g_log->onlinelog = 1; //online log file - g_log->filelog = 0; @@ -446,19 +437,6 @@ int logInit (void) log_getconfig(g_log); - // could put a loop here to check for all comps - for (i=MIN_LOG_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) { - if (g_log->log_component[i].filelog == 1 ) { - g_log->log_component[i].stream = fopen(g_log->log_component[i].filelog_name,"w"); - g_log->log_component[i].fwrite = vfprintf; - } else if (g_log->log_component[i].filelog == 1 ) { - g_log->log_component[i].stream = fopen(g_log->filelog_name,"w"); - g_log->log_component[i].fwrite = vfprintf; - } else if (g_log->onlinelog == 1 ) { - g_log->log_component[i].stream = stdout; - g_log->log_component[i].fwrite = vfprintf; - } - } // set all unused component items to 0, they are for non predefined components for (i=MAX_LOG_PREDEF_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) { @@ -470,8 +448,6 @@ int logInit (void) } - - char *log_getthreadname(char *threadname, int bufsize) { int rt = pthread_getname_np(pthread_self(), threadname,bufsize) ; @@ -506,27 +482,58 @@ void logRecord_mt(const char *file, const char *func, int line, int comp, int le ( (g_log->flag & FLAG_THREAD)?log_getthreadname(threadname,PR_SET_NAME+1):""), format); - g_log->log_component[comp].fwrite(g_log->log_component[comp].stream,log_buffer, args); + g_log->log_component[comp].vprint(g_log->log_component[comp].stream,log_buffer, args); va_end(args); } +void log_dump(int component, void *buffer, int buffsize,int datatype, const char* format, ... ) { +va_list args; +char *wbuf; + switch(datatype) { + case LOG_DUMP_DOUBLE: + wbuf=malloc((buffsize * 10) + 64 ); + break; + case LOG_DUMP_CHAR: + default: + wbuf=malloc((buffsize * 3 ) + 64 ); + break; + } + va_start(args, format); + g_log->log_component[component].vprint(g_log->log_component[component].stream,format, args); + va_end(args); + if (wbuf != NULL) { + int pos=0; + for (int i=0; ilog_component[component].print(g_log->log_component[component].stream,wbuf); + free(wbuf); + } +} -int set_log(int component, int level, int interval) +int set_log(int component, int level) { /* Checking parameters */ DevCheck((component >= MIN_LOG_COMPONENTS) && (component < MAX_LOG_COMPONENTS), component, MIN_LOG_COMPONENTS, MAX_LOG_COMPONENTS); DevCheck((level < NUM_LOG_LEVEL) && (level >= OAILOG_ERR), level, NUM_LOG_LEVEL, OAILOG_ERR); - DevCheck((interval >= 0) && (interval <= 0xFF), interval, 0, 0xFF); + g_log->log_component[component].level = level; - - - g_log->log_component[component].interval = interval; + g_log->log_component[component].savedlevel = level; return 0; } @@ -536,32 +543,67 @@ int set_log(int component, int level, int interval) void set_glog(int level) { for (int c=0; c< MAX_LOG_COMPONENTS; c++ ) { - g_log->log_component[c].level = level; + set_log(c, level); } } void set_glog_onlinelog(int enable) { - g_log->onlinelog = enable; + for (int c=0; c< MAX_LOG_COMPONENTS; c++ ) { + if ( enable ) { + g_log->log_component[c].level = g_log->log_component[c].savedlevel; + g_log->log_component[c].vprint = vfprintf; + g_log->log_component[c].print = fprintf; + g_log->log_component[c].stream = stdout; + } else { + g_log->log_component[c].level = -1; + } + } } void set_glog_filelog(int enable) { - g_log->filelog = enable; +static FILE *fptr; + + if ( enable ) { + fptr = fopen(g_log->filelog_name,"w"); + + for (int c=0; c< MAX_LOG_COMPONENTS; c++ ) { + close_component_filelog(c); + g_log->log_component[c].stream = fptr; + g_log->log_component[c].filelog = 1; + } + } else { + for (int c=0; c< MAX_LOG_COMPONENTS; c++ ) { + g_log->log_component[c].filelog = 0; + if (fptr != NULL) { + fclose(fptr); + } + g_log->log_component[c].stream = stdout; + } + } } void set_component_filelog(int comp) { - if (g_log->log_component[comp].filelog == 0) { - g_log->log_component[comp].filelog = 1; - - if (g_log->log_component[comp].stream == NULL) { + if (g_log->log_component[comp].stream == NULL || g_log->log_component[comp].stream == stdout) { g_log->log_component[comp].stream = fopen(g_log->log_component[comp].filelog_name,"w"); } - } + g_log->log_component[comp].vprint = vfprintf; + g_log->log_component[comp].print = fprintf; + g_log->log_component[comp].filelog = 1; +} +void close_component_filelog(int comp) +{ + g_log->log_component[comp].filelog = 0; + if (g_log->log_component[comp].stream != NULL && g_log->log_component[comp].stream != stdout ) { + fclose(g_log->log_component[comp].stream); + g_log->log_component[comp].stream = stdout; + } + g_log->log_component[comp].vprint = vfprintf; + g_log->log_component[comp].print = fprintf; + } - - /* * for the two functions below, the passed array must have a final entry @@ -616,15 +658,13 @@ int is_newline( char *str, int size) void logClean (void) { int i; - LOG_I(PHY,"\n"); + LOG_UI(PHY,"\n"); for (i=MIN_LOG_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) { - if (g_log->log_component[i].stream != NULL) { - fclose(g_log->log_component[i].stream); - } + close_component_filelog(i); } } @@ -650,8 +690,8 @@ int test_log(void) LOG_D(MAC, "1 debug MAC \n"); LOG_W(MAC, "1 warning MAC \n"); - set_log(EMU, OAILOG_INFO, FLAG_ONLINE); - set_log(MAC, OAILOG_WARNING, 0); + set_log(EMU, OAILOG_INFO); + set_log(MAC, OAILOG_WARNING); LOG_I(EMU, "2 Starting OAI logs version %s Build date: %s on %s\n", BUILD_VERSION, BUILD_DATE, BUILD_HOST); @@ -661,7 +701,7 @@ int test_log(void) LOG_I(MAC, "2 info MAC \n"); - set_log(MAC, OAILOG_NOTICE, 1); + set_log(MAC, OAILOG_NOTICE); LOG_ENTER(MAC); LOG_I(EMU, "3 Starting OAI logs version %s Build date: %s on %s\n", @@ -670,8 +710,8 @@ int test_log(void) LOG_W(MAC, "3 warning MAC \n"); LOG_I(MAC, "3 info MAC \n"); - set_log(MAC, LOG_DEBUG,1); - set_log(EMU, LOG_DEBUG,1); + set_log(MAC, LOG_DEBUG); + set_log(EMU, LOG_DEBUG); LOG_ENTER(MAC); LOG_I(EMU, "4 Starting OAI logs version %s Build date: %s on %s\n", @@ -681,8 +721,8 @@ int test_log(void) LOG_I(MAC, "4 info MAC \n"); - set_log(MAC, LOG_DEBUG,0); - set_log(EMU, LOG_DEBUG,0); + set_log(MAC, LOG_DEBUG); + set_log(EMU, LOG_DEBUG); LOG_I(LOG, "5 Starting OAI logs version %s Build date: %s on %s\n", BUILD_VERSION, BUILD_DATE, BUILD_HOST); @@ -691,8 +731,8 @@ int test_log(void) LOG_I(MAC, "5 info MAC \n"); - set_log(MAC, LOG_TRACE,0X07F); - set_log(EMU, LOG_TRACE,0X07F); + set_log(MAC, LOG_TRACE); + set_log(EMU, LOG_TRACE); LOG_ENTER(MAC); LOG_I(LOG, "6 Starting OAI logs version %s Build date: %s on %s\n", diff --git a/common/utils/LOG/log.h b/common/utils/LOG/log.h index 4a0552d494..7b2764b30c 100644 --- a/common/utils/LOG/log.h +++ b/common/utils/LOG/log.h @@ -83,11 +83,10 @@ extern "C" { * @{*/ # define OAILOG_ERR 0 /*!< \brief critical error conditions, impact on "must have" fuctinalities */ -# define OAILOG_FILE 1 /*!< \brief important informational messages, but everything OK */ -# define OAILOG_WARNING 2 /*!< \brief warning conditions, shouldn't happen but doesn't impact "must have" functionalities */ -# define OAILOG_INFO 3 /*!< \brief informational messages most people don't need, shouldn't impact real-time behavior */ -# define OAILOG_DEBUG 4 /*!< \brief first level debug-level messages, for developers , may impact real-time behavior */ -# define OAILOG_TRACE 5 /*!< \brief second level debug-level messages, for developers ,likely impact real-time behavior*/ +# define OAILOG_WARNING 1 /*!< \brief warning conditions, shouldn't happen but doesn't impact "must have" functionalities */ +# define OAILOG_INFO 2 /*!< \brief informational messages most people don't need, shouldn't impact real-time behavior */ +# define OAILOG_DEBUG 3 /*!< \brief first level debug-level messages, for developers , may impact real-time behavior */ +# define OAILOG_TRACE 4 /*!< \brief second level debug-level messages, for developers ,likely impact real-time behavior*/ #define NUM_LOG_LEVEL 6 /*!< \brief the number of message levels users have with LOG */ /* @}*/ @@ -128,21 +127,47 @@ extern "C" { /** @defgroup macros to identify a debug entity * @ingroup each macro is a bit mask where the unique bit set identifies an entity to be debugged - * it allows to dynamically activate or not blocks of code + * it allows to dynamically activate or not blocks of code. The LOG_MASKMAP_INIT macro + * is used to map a character string name to each debug bit, it allows to set or clear + * the corresponding bit via the defined name, from the configuration or from the telnet + * server. * @brief * @{*/ #define DEBUG_PRACH (1<<0) #define DEBUG_RU (1<<1) #define DEBUG_UE_PHYPROC (1<<2) #define DEBUG_LTEESTIM (1<<3) +#define DEBUG_DLCELLSPEC (1<<4) +#define DEBUG_ULSCH (1<<5) +#define DEBUG_RRC (1<<6) +#define DEBUG_PDCP (1<<7) +#define DEBUG_DFT (1<<8) #define DEBUG_CTRLSOCKET (1<<10) #define UE_TIMING (1<<20) -#define SET_LOG_DEBUG(O) g_log->debug_mask = (g_log->debug_mask | O) -#define CLEAR_LOG_DEBUG(O) g_log->debug_mask = (g_log->debug_mask & (~O)) -#define SET_LOG_MATLAB(O) g_log->matlab_mask = (g_log->matlab_mask | O) -#define CLEAR_LOG_MATLAB(O) g_log->matlab_mask = (g_log->matlab_mask & (~O)) +#define LOG_MASKMAP_INIT {\ + {"PRACH", DEBUG_PRACH},\ + {"RU", DEBUG_RU},\ + {"LTEESTIM", DEBUG_LTEESTIM},\ + {"CTRLSOCKET", DEBUG_CTRLSOCKET},\ + {"UE_PHYPROC", DEBUG_UE_PHYPROC},\ + {"DLCELLSPEC", DEBUG_DLCELLSPEC},\ + {"ULSCH", DEBUG_ULSCH},\ + {"RRC", DEBUG_RRC},\ + {"PDCP", DEBUG_PDCP},\ + {"DFT", DEBUG_DFT},\ + {"UE_TIMING", UE_TIMING},\ + {NULL,-1}\ +} + + + +#define SET_LOG_DEBUG(B) g_log->debug_mask = (g_log->debug_mask | B) +#define CLEAR_LOG_DEBUG(B) g_log->debug_mask = (g_log->debug_mask & (~B)) + +#define SET_LOG_DUMP(B) g_log->genfile_mask = (g_log->genfile_mask | B) +#define CLEAR_LOG_DUMP(B) g_log->genfile_mask = (g_log->genfile_mask & (~B)) @@ -199,17 +224,18 @@ typedef struct { int value; /*!< \brief integer value of mapping */ } mapping; -typedef int(*log_write_func_t)(FILE *stream, const char *format, va_list ap ); - +typedef int(*log_vprint_func_t)(FILE *stream, const char *format, va_list ap ); +typedef int(*log_print_func_t)(FILE *stream, const char *format, ... ); typedef struct { - const char *name; - int level; - int flag; - int interval; - int filelog; - char *filelog_name; - FILE *stream; - log_write_func_t fwrite; + const char *name; + int level; + int savedlevel; + int flag; + int filelog; + char *filelog_name; + FILE *stream; + log_vprint_func_t vprint; + log_print_func_t print; /* SR: make the log buffer component relative */ char log_buffer[MAX_LOG_TOTAL]; } log_component_t; @@ -218,12 +244,10 @@ typedef struct { typedef struct { log_component_t log_component[MAX_LOG_COMPONENTS]; char* level2string[NUM_LOG_LEVEL]; - int onlinelog; int flag; - int filelog; char* filelog_name; uint64_t debug_mask; - uint64_t matlab_mask; + uint64_t genfile_mask; } log_t; @@ -254,14 +278,15 @@ extern log_t *g_log; /*----------------------------------------------------------------------------*/ int logInit (void); void logRecord_mt(const char *file, const char *func, int line,int comp, int level, const char *format, ...) __attribute__ ((format (printf, 6, 7))); - -int set_log(int component, int level, int interval); +void log_dump(int component, void *buffer, int buffsize,int datatype, const char* format, ... ); +int set_log(int component, int level); void set_glog(int level); void set_glog_onlinelog(int enable); void set_glog_filelog(int enable); void set_component_filelog(int comp); - +void close_component_filelog(int comp); +void set_component_consolelog(int comp); int map_str_to_int(mapping *map, const char *str); char *map_int_to_str(mapping *map, int val); void logClean (void); @@ -293,7 +318,7 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int #define LOG_CONFIG_LEVEL_FORMAT "%s_log_level" #define LOG_CONFIG_LOGFILE_FORMAT "%s_log_infile" #define LOG_CONFIG_DEBUG_FORMAT "%s_debug" -#define LOG_CONFIG_MATLAB_FORMAT "%s_matlab" +#define LOG_CONFIG_GENFILE_FORMAT "%s_genfile" #define LOG_CONFIG_HELP_OPTIONS " list of comma separated options to enable log module behavior. Available options: \n"\ " nocolor: disable color usage in log messages\n"\ @@ -309,7 +334,7 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int /*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ #define LOG_GLOBALPARAMS_DESC { \ {LOG_CONFIG_STRING_GLOBAL_LOG_LEVEL, "Default log level for all componemts\n", 0, strptr:(char **)&gloglevel, defstrval:log_level_names[2].name, TYPE_STRING, 0}, \ -{LOG_CONFIG_STRING_GLOBAL_LOG_ONLINE, "Default console output option, for all components\n", 0, iptr:&(g_log->onlinelog), defintval:1, TYPE_INT, 0}, \ +{LOG_CONFIG_STRING_GLOBAL_LOG_ONLINE, "Default console output option, for all components\n", 0, iptr:&(consolelog), defintval:1, TYPE_INT, 0}, \ {LOG_CONFIG_STRING_GLOBAL_LOG_OPTIONS, LOG_CONFIG_HELP_OPTIONS, 0, strlistptr:NULL, defstrlistval:NULL, TYPE_STRINGLIST,0} \ } @@ -319,23 +344,25 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int * @ingroup _macro * @brief Macro used to call logIt function with different message levels * @{*/ - -// debugging macros(g_log->log_component[component].interval?logRecord_mt(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args):(void)0) +#define LOG_DUMP_CHAR 0 +#define LOG_DUMP_DOUBLE 1 +// debugging macros +#define LOG_F LOG_I /* because LOG_F was originaly to dump a message or buffer but is also used as a regular level...., to dump use LOG_DUMPMSG */ # if T_TRACER /* per component, level dependant macros */ -# define LOG_I(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} else { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ;}} while (0) -# define LOG_W(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_WARNING) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ;} else { T(T_LEGACY_ ## c ## _WARNING, T_PRINTF(x)) ;}} while (0) # define LOG_E(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_ERR ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ;} else { T(T_LEGACY_ ## c ## _ERROR, T_PRINTF(x)) ;}} while (0) +# define LOG_W(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_WARNING) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ;} else { T(T_LEGACY_ ## c ## _WARNING, T_PRINTF(x)) ;}} while (0) +# define LOG_I(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} else { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ;}} while (0) # define LOG_D(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} else { T(T_LEGACY_ ## c ## _DEBUG, T_PRINTF(x)) ;}} while (0) # define LOG_T(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} else { T(T_LEGACY_ ## c ## _TRACE, T_PRINTF(x)) ;}} while (0) -# define LOG_F(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_FILE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_FILE, x) ;}} while (0) /* */ + /* macro used to dump a buffer or a message as in openair2/RRC/LTE/RRC_eNB.c, replaces LOG_F macro */ +# define LOG_DUMPMSG(c, f, b, s, x...) do { if(g_log->genfile_mask & f) log_dump(c, b, s, LOG_DUMP_CHAR, x) ;} while (0) /* */ # define nfapi_log(FILE, FNC, LN, COMP, LVL, F...) do { if (T_stdout) { logRecord_mt(__FILE__, __FUNCTION__, __LINE__,COMP, LVL, F) ;}} while (0) /* */ /* bitmask dependant macros, to isolate debugging code */ -# define LOG_DEBUG_BEGIN(D) if (g_log->debug_mask & D) { -# define LOG_DEBUG_END } - /* bitmask dependant macros, to generate matlab files */ -# define LOG_M_BEGIN(D) if (g_log->matlab_mask & D) { -# define LOG_M_END } +# define LOG_DEBUGFLAG(D) (g_log->debug_mask & D) + + /* bitmask dependant macros, to generate debug file such as matlab file or message dump */ +# define LOG_GENFILEFLAG(D) (g_log->genfile_mask & D) # define LOG_M(file, vector, data, len, dec, format) do { write_file_matlab(file, vector, data, len, dec, format);} while(0)/* */ /* define variable only used in LOG macro's */ # define LOG_VAR(A,B) A B @@ -345,12 +372,11 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int # define LOG_E(c, x...) /* */ # define LOG_D(c, x...) /* */ # define LOG_T(c, x...) /* */ -# define LOG_F(c, x...) /* */ + +# define LOG_DUMPMSG(c, b, s, x...) /* */ # define nfapi_log(FILE, FNC, LN, COMP, LVL, FMT...) -# define LOG_DEBUG_BEGIN(D) if (0) { -# define LOG_DEBUG_END } -# define LOG_M_BEGIN(D) if (0) { -# define LOG_M_END } +# define LOG_DEBUGFLAG(D) ( 0 ) +# define LOG_GENFILEFLAG(D) ( 0 ) # define LOG_M(file, vector, data, len, dec, format) # define LOG_VAR(A,B) # endif /* T_TRACER */ @@ -359,8 +385,8 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int /* unfiltered macros, usefull for simulators or messages at init time, before log is configured */ #define LOG_UM(file, vector, data, len, dec, format) do { write_file_matlab(file, vector, data, len, dec, format);} while(0) - #define LOG_UI(c, x...) do {logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ; } while(0) +#define LOG_UDUMPMSG(c, b, s, f, x...) do { log_dump(c, b, s, f, x) ;} while (0) /* */ /* @}*/ diff --git a/common/utils/load_module_shlib.c b/common/utils/load_module_shlib.c index 656f6a8852..c8a293f279 100644 --- a/common/utils/load_module_shlib.c +++ b/common/utils/load_module_shlib.c @@ -70,8 +70,8 @@ char *tmpstr; char *shlibpath =NULL; char *shlibversion=NULL; char *cfgprefix; -paramdef_t LoaderParams[] ={{"shlibpath", NULL, 0, strptr:&shlibpath, defstrval:NULL, TYPE_STRING, 0}, - {"shlibversion", NULL, 0, strptr:&shlibversion, defstrval:"", TYPE_STRING, 0}}; +paramdef_t LoaderParams[] ={{"shlibpath", NULL, 0, strptr:&shlibpath, defstrval:NULL, TYPE_STRING, 0, NULL}, + {"shlibversion", NULL, 0, strptr:&shlibversion, defstrval:"", TYPE_STRING, 0, NULL}}; int ret; diff --git a/common/utils/load_module_shlib.h b/common/utils/load_module_shlib.h index ffbad66570..6cfd41ac78 100644 --- a/common/utils/load_module_shlib.h +++ b/common/utils/load_module_shlib.h @@ -72,13 +72,13 @@ typedef int(*getfarrayfunc_t)(loader_shlibfunc_t **funcarray); #define DEFAULT_MAXSHLIBS 10 loader_data_t loader_data; -/*------------------------------------------------------------------------------------------------------------------------------------------------*/ -/* LOADER parameters */ -/* optname helpstr paramflags XXXptr defXXXval type numelt */ -/*------------------------------------------------------------------------------------------------------------------------------------------------*/ +/*----------------------------------------------------------------------------------------------------------------------------------------------------------*/ +/* LOADER parameters */ +/* optname helpstr paramflags XXXptr defXXXval type numelt check func*/ +/*----------------------------------------------------------------------------------------------------------------------------------------------------------*/ #define LOADER_PARAMS_DESC { \ -{"shlibpath", NULL, PARAMFLAG_NOFREE, strptr:(char **)&(loader_data.shlibpath), defstrval:DEFAULT_PATH, TYPE_STRING, 0}, \ -{"maxshlibs", NULL, 0, uptr:&(loader_data.maxshlibs), defintval:DEFAULT_MAXSHLIBS, TYPE_UINT32, 0}, \ +{"shlibpath", NULL, PARAMFLAG_NOFREE, strptr:(char **)&(loader_data.shlibpath), defstrval:DEFAULT_PATH, TYPE_STRING, 0, NULL},\ +{"maxshlibs", NULL, 0, uptr:&(loader_data.maxshlibs), defintval:DEFAULT_MAXSHLIBS, TYPE_UINT32, 0, NULL}\ } /*-------------------------------------------------------------------------------------------------------------*/ diff --git a/common/utils/telnetsrv/telnetsrv_proccmd.c b/common/utils/telnetsrv/telnetsrv_proccmd.c index 519c222114..3576fd004a 100644 --- a/common/utils/telnetsrv/telnetsrv_proccmd.c +++ b/common/utils/telnetsrv/telnetsrv_proccmd.c @@ -199,28 +199,29 @@ int proccmd_show(char *buf, int debug, telnet_printfunc_t prnt) print_threads(buf,debug,prnt); } if (strcasestr(buf,"loglvl") != NULL) { - prnt(" component level enabled\n"); + prnt("\n component level enabled output\n"); for (int i=MIN_LOG_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) { if (g_log->log_component[i].name != NULL) { - prnt("%02i %17.17s:%10.10s %s\n",i ,g_log->log_component[i].name, - map_int_to_str(log_level_names,g_log->log_component[i].level), - ((g_log->log_component[i].interval>0)?"Y":"N") ); + prnt("%02i %17.17s:%10.10s %s %s\n",i ,g_log->log_component[i].name, + map_int_to_str(log_level_names,(g_log->log_component[i].level>=0)?g_log->log_component[i].level:g_log->log_component[i].savedlevel), + ((g_log->log_component[i].level>=0)?"Y":"N"), + ((g_log->log_component[i].filelog>0)?g_log->log_component[i].filelog_name:"stdout")); } } } if (strcasestr(buf,"logopt") != NULL) { - prnt(" option enabled\n"); + prnt("\n option enabled\n"); for (int i=0; log_options[i].name != NULL; i++) { prnt("%02i %17.17s %10.10s \n",i ,log_options[i].name, ((g_log->flag & log_options[i].value)?"Y":"N") ); } } if (strcasestr(buf,"dbgopt") != NULL) { - prnt(" option debug matlab\n"); + prnt("\n module debug dumpfile\n"); for (int i=0; log_maskmap[i].name != NULL ; i++) { - prnt("%02i %17.17s %5.5s %5.5s\n",i ,log_maskmap[i].name, + prnt("%02i %17.17s %5.5s %5.5s\n",i ,log_maskmap[i].name, ((g_log->debug_mask & log_maskmap[i].value)?"Y":"N"), - ((g_log->matlab_mask & log_maskmap[i].value)?"Y":"N") ); + ((g_log->genfile_mask & log_maskmap[i].value)?"Y":"N") ); } } if (strcasestr(buf,"config") != NULL) { @@ -337,15 +338,15 @@ int s = sscanf(buf,"%ms %i-%i\n",&logsubcmd, &idx1,&idx2); prnt("Available log levels: \n "); for (int i=0; log_level_names[i].name != NULL; i++) prnt("%s ",log_level_names[i].name); - prnt("\n"); + prnt("\n\n"); prnt("Available display options: \n "); for (int i=0; log_options[i].name != NULL; i++) prnt("%s ",log_options[i].name); - prnt("\n"); - prnt("Available debug or matlab options: \n "); + prnt("\n\n"); + prnt("Available debug or genfile options: \n "); for (int i=0; log_maskmap[i].name != NULL; i++) prnt("%s ",log_maskmap[i].name); - prnt("\n"); + prnt("\n\n"); proccmd_show("loglvl",debug,prnt); proccmd_show("logopt",debug,prnt); proccmd_show("dbgopt",debug,prnt); @@ -377,7 +378,7 @@ int s = sscanf(buf,"%ms %i-%i\n",&logsubcmd, &idx1,&idx2); else if (l == 2 && strcmp(logparam,"debug") == 0){ optbit=map_str_to_int(log_maskmap,opt); if (optbit < 0) { - prnt("debug flag %s unknown\n",opt); + prnt("module %s unknown\n",opt); } else { if (idx1 > 0) SET_LOG_DEBUG(optbit); @@ -386,27 +387,27 @@ int s = sscanf(buf,"%ms %i-%i\n",&logsubcmd, &idx1,&idx2); proccmd_show("dbgopt",debug,prnt); } } - else if (l == 2 && strcmp(logparam,"matlab") == 0){ + else if (l == 2 && strcmp(logparam,"dump") == 0){ optbit=map_str_to_int(log_maskmap,opt); if (optbit < 0) { - prnt("matlab flag %s unknown\n",opt); + prnt("module %s unknown\n",opt); } else { if (idx1 > 0) - SET_LOG_MATLAB(optbit); + SET_LOG_DUMP(optbit); else - CLEAR_LOG_MATLAB(optbit); + CLEAR_LOG_DUMP(optbit); proccmd_show("dbgopt",debug,prnt); } } if (logparam != NULL) free(logparam); if (opt != NULL) free(opt); } else if ( s == 3 && logsubcmd != NULL) { - int level, interval; + int level, enable, filelog; char *tmpstr=NULL; char *logparam=NULL; int l; - level = interval = -1; + level = enable = filelog = -1; l=sscanf(logsubcmd,"%m[^'_']_%m[^'_']",&logparam,&tmpstr); if (debug > 0) prnt("l=%i, %s %s\n",l,((logparam==NULL)?"\"\"":logparam), ((tmpstr==NULL)?"\"\"":tmpstr)); @@ -419,9 +420,13 @@ int s = sscanf(buf,"%ms %i-%i\n",&logsubcmd, &idx1,&idx2); } } else if (l ==1 ) { if (strcmp(logparam,"enable") == 0) { - interval = 1; + enable = 1; } else if (strcmp(logparam,"disable") == 0) { - interval = 0; + enable = 0; + } else if (strcmp(logparam,"file") == 0) { + filelog = 1 ; + } else if (strcmp(logparam,"nofile") == 0) { + filelog = 0 ; } else { prnt("%s%s unknown log sub command \n",logparam, tmpstr); } @@ -431,19 +436,26 @@ int s = sscanf(buf,"%ms %i-%i\n",&logsubcmd, &idx1,&idx2); if (logparam != NULL) free(logparam); if (tmpstr != NULL) free(tmpstr); for (int i=idx1; i<=idx2 ; i++) { + if ( level >= 0 || enable >= 0) { if (level < 0) { level=g_log->log_component[i].level; } - if (interval < 0) { - interval=g_log->log_component[i].interval; + if (enable < 0) { + level= -1; } - set_log(i, level, interval); - prnt("log level comp %i %s set to %s (%s)\n", - i,((g_log->log_component[i].name==NULL)?"":g_log->log_component[i].name), - map_int_to_str(log_level_names,g_log->log_component[i].level), - ((g_log->log_component[i].interval>0)?"enabled":"disabled")); - - + set_log(i, level); + } + if ( filelog == 1 ) { + set_component_filelog(i); + } + if ( filelog == 0 ) { + close_component_filelog(i); + } + prnt("log level comp %i %s set to %s (%s) output: %s\n", + i,((g_log->log_component[i].name==NULL)?"":g_log->log_component[i].name), + map_int_to_str(log_level_names,g_log->log_component[i].level), + ((g_log->log_component[i].level>=0)?"enabled":"disabled"), + ((g_log->log_component[i].filelog>0)?g_log->log_component[i].filelog_name:"stdout")); } } else { prnt("%s: wrong log command...\n",buf); diff --git a/common/utils/telnetsrv/telnetsrv_proccmd.h b/common/utils/telnetsrv/telnetsrv_proccmd.h index 409484455c..1a0a8d25dc 100644 --- a/common/utils/telnetsrv/telnetsrv_proccmd.h +++ b/common/utils/telnetsrv/telnetsrv_proccmd.h @@ -48,13 +48,15 @@ telnetshell_vardef_t proc_vardef[] = { show: display current log configuration \n\ online, noonline: enable or disable console logs \n\ enable, disable id1-id2: enable or disable logs for components index id1 to id2 \n\ + file, nofile id1-id2: enable or disable redirecting logs to file for components index id1 to id2 \n\ + logfile name depends on component name and is printed in the show command \n\ level_ id1-id2: set log level to for components index id1 to id2 \n\ -use the show command to get the authorized values for and the list of component \ -indexes that can be used for id1 and id2 \n\ + use the show command to get the authorized values for \n\ + and the list of component indexes that can be used for id1 and id2 \n\ print_ <0|1> disable or enable the \"opt\" log option, use the show command to get \ -the available options\n\ - matlab_ debug_ disable or enable the debug code or matlab file generation \ -for \"func\" function. use the show command to get the available options\n" + the available options\n\ + dump_ debug_ disable or enable the debug file generation or debug code\ + for \"mod\" module. use the show command to get the available modules\n" #define PROCCMD_THREAD_HELP_STRING " thread sub commands: \n\ aff : set affinity of thread to core \n\ diff --git a/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c b/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c index ae33722c90..aca5a5303d 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c @@ -274,11 +274,11 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com -LOG_M_BEGIN(DEBUG_LTEESTIM); - LOG_M("primary_sync0.m","psync0",primary_synch0_time,frame_parms->ofdm_symbol_size,1,1); - LOG_M("primary_sync1.m","psync1",primary_synch1_time,frame_parms->ofdm_symbol_size,1,1); - LOG_M("primary_sync2.m","psync2",primary_synch2_time,frame_parms->ofdm_symbol_size,1,1); -LOG_M_END + if ( LOG_GENFILEFLAG(DEBUG_LTEESTIM)){ + LOG_M("primary_sync0.m","psync0",primary_synch0_time,frame_parms->ofdm_symbol_size,1,1); + LOG_M("primary_sync1.m","psync1",primary_synch1_time,frame_parms->ofdm_symbol_size,1,1); + LOG_M("primary_sync2.m","psync2",primary_synch2_time,frame_parms->ofdm_symbol_size,1,1); + } return (1); } @@ -460,18 +460,18 @@ int lte_sync_time(int **rxdata, ///rx data in time domain LOG_I(PHY,"[UE] lte_sync_time: Sync source = %d, Peak found at pos %d, val = %d (%d dB)\n",sync_source,peak_pos,peak_val,dB_fixed(peak_val)/2); -LOG_M_BEGIN(DEBUG_LTEESTIM) -static int debug_cnt; - if (debug_cnt == 0) { - LOG_M("sync_corr0_ue.m","synccorr0",sync_corr_ue0,2*length,1,2); - LOG_M("sync_corr1_ue.m","synccorr1",sync_corr_ue1,2*length,1,2); - LOG_M("sync_corr2_ue.m","synccorr2",sync_corr_ue2,2*length,1,2); - LOG_M("rxdata0.m","rxd0",rxdata[0],length<<1,1,1); - // exit(-1); - } else { + if ( LOG_GENFILEFLAG(DEBUG_LTEESTIM)){ + static int debug_cnt; + if (debug_cnt == 0) { + LOG_M("sync_corr0_ue.m","synccorr0",sync_corr_ue0,2*length,1,2); + LOG_M("sync_corr1_ue.m","synccorr1",sync_corr_ue1,2*length,1,2); + LOG_M("sync_corr2_ue.m","synccorr2",sync_corr_ue2,2*length,1,2); + LOG_M("rxdata0.m","rxd0",rxdata[0],length<<1,1,1); + // exit(-1); + } else { debug_cnt++; } -LOG_M_END +} return(peak_pos); diff --git a/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c b/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c index 1eabfd6c36..284a22e2e6 100644 --- a/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c +++ b/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c @@ -25,9 +25,9 @@ #include "PHY/defs_eNB.h" #include "PHY/defs_UE.h" #include "PHY/impl_defs_top.h" - +#include "common/utils/LOG/log.h" //extern unsigned int lte_gold_table[3][20][2][14]; -//#define DEBUG_DL_CELL_SPEC + @@ -64,7 +64,7 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *eNB, else if ((p==1) && (l>0)) nu = 0; else { - printf("lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l); + LOG_E(PHY,"lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l); return(-1); } @@ -85,19 +85,19 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *eNB, // this is r_mprime from 3GPP 36-211 6.10.1.2 output[k] = qpsk[(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3]; //output[k] = (lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3; -#ifdef DEBUG_DL_CELL_SPEC - printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n", - Ns,l,m,mprime_dword,mprime_qpsk_symb); - printf("index = %d (k %d)\n",(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k); -#endif + if (LOG_DEBUGFLAG(DEBUG_DLCELLSPEC)) { + LOG_I(PHY,"Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n", + Ns,l,m,mprime_dword,mprime_qpsk_symb); + LOG_I(PHY,"index = %d (k %d)\n",(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k); + } mprime++; -#ifdef DEBUG_DL_CELL_SPEC + if (LOG_DEBUGFLAG(DEBUG_DLCELLSPEC)) { if (m<4) - printf("Ns %d, l %d output[%d] = (%d,%d)\n",Ns,l,k,((short *)&output[k])[0],((short *)&output[k])[1]); + LOG_I(PHY,"Ns %d, l %d output[%d] = (%d,%d)\n",Ns,l,k,((short *)&output[k])[0],((short *)&output[k])[1]); -#endif + } k+=6;//b if (k >= eNB->frame_parms.ofdm_symbol_size) { @@ -105,7 +105,7 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *eNB, k-=eNB->frame_parms.ofdm_symbol_size; } - // printf("** k %d\n",k); + // LOG_I(PHY,"** k %d\n",k); } return(0); @@ -143,7 +143,7 @@ int lte_dl_cell_spec(PHY_VARS_eNB *eNB, else if ((p==1) && (l>0)) nu = 0; else { - printf("lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l); + LOG_E(PHY,"lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l); return(-1); } @@ -168,27 +168,24 @@ int lte_dl_cell_spec(PHY_VARS_eNB *eNB, // this is r_mprime from 3GPP 36-211 6.10.1.2 output[k] = qpsk[(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3]; //output[k] = (lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3; -#ifdef DEBUG_DL_CELL_SPEC - printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n", - Ns,l,m,mprime_dword,mprime_qpsk_symb); - printf("index = %d (k %d)\n",(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k); -#endif - + if (LOG_DEBUGFLAG(DEBUG_DLCELLSPEC)) { + LOG_I(PHY,"Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n", + Ns,l,m,mprime_dword,mprime_qpsk_symb); + LOG_I(PHY,"index = %d (k %d)\n",(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k); + } mprime++; -#ifdef DEBUG_DL_CELL_SPEC + if (LOG_DEBUGFLAG(DEBUG_DLCELLSPEC)) { + if (m<4) + LOG_I(PHY,"Ns %d, l %d output[%d] = (%d,%d)\n",Ns,l,k,((short *)&output[k])[0],((short *)&output[k])[1]); + } - if (m<4) - printf("Ns %d, l %d output[%d] = (%d,%d)\n",Ns,l,k,((short *)&output[k])[0],((short *)&output[k])[1]); - -#endif k+=6; - if (k >= eNB->frame_parms.ofdm_symbol_size) { k++; // skip DC carrier k-=eNB->frame_parms.ofdm_symbol_size; } - // printf("** k %d\n",k); + // LOG_I(PHY,"** k %d\n",k); } return(0); @@ -231,21 +228,21 @@ int lte_dl_cell_spec_rx(PHY_VARS_UE *ue, // this is r_mprime from 3GPP 36-211 6.10.1.2 output[k] = qpsk[(ue->lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3]; -#ifdef DEBUG_DL_CELL_SPEC - printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n", - Ns,l,m,mprime_dword,mprime_qpsk_symb); - printf("index = %d (k %d)\n",(ue->lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k); -#endif + if (LOG_DEBUGFLAG(DEBUG_DLCELLSPEC)) { + LOG_I(PHY,"Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n", + Ns,l,m,mprime_dword,mprime_qpsk_symb); + LOG_I(PHY,"index = %d (k %d)\n",(ue->lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k); + } mprime++; -#ifdef DEBUG_DL_CELL_SPEC + if (LOG_DEBUGFLAG(DEBUG_DLCELLSPEC)) { - if (m<4) - printf("Ns %d l %d output[%d] = (%d,%d)\n",Ns,l,k,((short *)&output[k])[0],((short *)&output[k])[1]); + if (m<4) + LOG_I(PHY,"Ns %d l %d output[%d] = (%d,%d)\n",Ns,l,k,((short *)&output[k])[0],((short *)&output[k])[1]); -#endif - k++; - // printf("** k %d\n",k); + } + k++; + // LOG_I(PHY,"** k %d\n",k); } return(0); diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index c3a309a424..53b1bd4ac3 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -220,7 +220,7 @@ void fill_pdcch_order(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_a break; } - LOG_I(PHY,"%d.%d: DCI 1A: rnti %x, PDCCH order to do PRACH\n", + LOG_T(PHY,"%d.%d: DCI 1A: rnti %x, PDCCH order to do PRACH\n", proc->frame_tx, proc->subframe_tx, rel8->rnti); } diff --git a/openair1/PHY/LTE_TRANSPORT/prach.c b/openair1/PHY/LTE_TRANSPORT/prach.c index db6f04f788..99563ce133 100644 --- a/openair1/PHY/LTE_TRANSPORT/prach.c +++ b/openair1/PHY/LTE_TRANSPORT/prach.c @@ -153,25 +153,24 @@ void rx_prach0(PHY_VARS_eNB *eNB, subframe = eNB->proc.subframe_prach_br; prachF = eNB->prach_vars_br.prachF; rxsigF = eNB->prach_vars_br.rxsigF[ce_level]; -LOG_DEBUG_BEGIN(PRACH) - if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d, rootSequenceIndex %d, repetition number %d,numRepetitionsPrePreambleAttempt %d\n", - br_flag,ce_level,ru->proc.frame_prach,subframe, - fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level], - prach_ConfigIndex,rootSequenceIndex, - eNB->prach_vars_br.repetition_number[ce_level], - fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level]); -LOG_DEBUG_END - } - else + if (LOG_DEBUGFLAG(PRACH)){ + if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d, rootSequenceIndex %d, repetition number %d,numRepetitionsPrePreambleAttempt %d\n", + br_flag,ce_level,ru->proc.frame_prach,subframe, + fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level], + prach_ConfigIndex,rootSequenceIndex, + eNB->prach_vars_br.repetition_number[ce_level], + fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level]); + } + } else #endif { prach_ifftp = eNB->prach_vars.prach_ifft[0]; subframe = eNB->proc.subframe_prach; prachF = eNB->prach_vars.prachF; rxsigF = eNB->prach_vars.rxsigF[0]; -LOG_DEBUG_BEGIN(PRACH) - if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d , rootSequenceIndex %d\n", subframe,fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex,rootSequenceIndex); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(PRACH)){ + if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d , rootSequenceIndex %d\n", subframe,fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex,rootSequenceIndex); + } } } else { @@ -179,20 +178,19 @@ LOG_DEBUG_END if (br_flag == 1) { subframe = ru->proc.subframe_prach_br; rxsigF = ru->prach_rxsigF_br[ce_level]; -LOG_DEBUG_BEGIN(PRACH) - if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n", - br_flag,ce_level,ru->proc.frame_prach,subframe,fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],prach_ConfigIndex); -LOG_DEBUG_END - } - else + if (LOG_DEBUGFLAG(PRACH)){ + if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n", + br_flag,ce_level,ru->proc.frame_prach,subframe,fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],prach_ConfigIndex); + } + } else #endif { subframe = ru->proc.subframe_prach; rxsigF = ru->prach_rxsigF; -LOG_DEBUG_BEGIN(PRACH) - if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n", - subframe,fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(PRACH)){ + if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n", + subframe,fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex); + } } } @@ -204,27 +202,25 @@ LOG_DEBUG_END // DJP - indexing below in subframe zero takes us off the beginning of the array??? prach[aa] = (int16_t*)&ru->common.rxdata[aa][(subframe*fp->samples_per_tti)-ru->N_TA_offset]; -LOG_M_BEGIN(PRACH) - int32_t en0=signal_energy((int32_t*)prach[aa],fp->samples_per_tti); - int8_t dbEn0 = dB_fixed(en0); - int8_t rach_dBm = dbEn0 - ru->rx_total_gain_dB; - char buffer[80]; - if (dbEn0>32 && prach[0]!= NULL) - { - static int counter=0; - sprintf(buffer, "%s%d", "/tmp/prach_rx",counter); - LOG_M(buffer,"prach_rx",prach[0],fp->samples_per_tti,1,13); + if (LOG_GENFILEFLAG(PRACH)){ + int32_t en0=signal_energy((int32_t*)prach[aa],fp->samples_per_tti); + int8_t dbEn0 = dB_fixed(en0); + int8_t rach_dBm = dbEn0 - ru->rx_total_gain_dB; + char buffer[80]; + if (dbEn0>32 && prach[0]!= NULL) { + static int counter=0; + sprintf(buffer, "%s%d", "/tmp/prach_rx",counter); + LOG_M(buffer,"prach_rx",prach[0],fp->samples_per_tti,1,13); + } + if (dB_fixed(en0)>32) { + sprintf(buffer, "rach_dBm:%d",rach_dBm); + if (prach[0]!= NULL) LOG_M("prach_rx","prach_rx",prach[0],fp->samples_per_tti,1,1); + LOG_I(PHY,"RU %d, br_flag %d ce_level %d frame %d subframe %d per_tti:%d prach:%p (energy %d) TA:%d %s rxdata:%p index:%d\n", + ru->idx,br_flag,ce_level,ru->proc.frame_prach,subframe,fp->samples_per_tti, + prach[aa],dbEn0,ru->N_TA_offset,buffer,ru->common.rxdata[aa], + (subframe*fp->samples_per_tti)-ru->N_TA_offset); } - if (dB_fixed(en0)>32) - { - sprintf(buffer, "rach_dBm:%d",rach_dBm); - if (prach[0]!= NULL) LOG_M("prach_rx","prach_rx",prach[0],fp->samples_per_tti,1,1); - LOG_I(PHY,"RU %d, br_flag %d ce_level %d frame %d subframe %d per_tti:%d prach:%p (energy %d) TA:%d %s rxdata:%p index:%d\n", - ru->idx,br_flag,ce_level,ru->proc.frame_prach,subframe,fp->samples_per_tti, - prach[aa],dbEn0,ru->N_TA_offset,buffer,ru->common.rxdata[aa], - (subframe*fp->samples_per_tti)-ru->N_TA_offset); - } -LOG_M_END + } } } @@ -306,9 +302,9 @@ LOG_M_END if (((eNB!=NULL) && (ru->function != NGFI_RAU_IF4p5))|| ((eNB==NULL) && (ru->function == NGFI_RRU_IF4p5))) { // compute the DFTs of the PRACH temporal resources // Do forward transform -LOG_DEBUG_BEGIN(PRACH) - LOG_D(PHY,"rx_prach: Doing FFT for N_RB_UL %d nb_rx:%d Ncp:%d\n",fp->N_RB_UL, nb_rx, Ncp); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(PRACH)) { + LOG_D(PHY,"rx_prach: Doing FFT for N_RB_UL %d nb_rx:%d Ncp:%d\n",fp->N_RB_UL, nb_rx, Ncp); + } for (aa=0; aa 60)&&(br_flag==1)) LOG_I(PHY,"PRACH (br_flag %d,ce_level %d, n_ra_prb %d, k %d): Frame %d, Subframe %d => %d dB\n",br_flag,ce_level,n_ra_prb,k,eNB->proc.frame_rx,eNB->proc.subframe_rx,en); -LOG_DEBUG_END + if ( LOG_DEBUGFLAG(PRACH)) { + int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840)); + if ((en > 60)&&(br_flag==1)) LOG_I(PHY,"PRACH (br_flag %d,ce_level %d, n_ra_prb %d, k %d): Frame %d, Subframe %d => %d dB\n",br_flag,ce_level,n_ra_prb,k,eNB->proc.frame_rx,eNB->proc.subframe_rx,en); + } } // in case of RAU and prach received rx_thread wakes up prach @@ -477,10 +473,10 @@ LOG_DEBUG_END *max_preamble_energy=0; for (preamble_index=0 ; preamble_index<64 ; preamble_index++) { -LOG_DEBUG_BEGIN(PRACH) - int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840)); - if (en>60) LOG_I(PHY,"frame %d, subframe %d : Trying preamble %d (br_flag %d)\n",ru->proc.frame_prach,subframe,preamble_index,br_flag); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(PRACH)){ + int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840)); + if (en>60) LOG_I(PHY,"frame %d, subframe %d : Trying preamble %d (br_flag %d)\n",ru->proc.frame_prach,subframe,preamble_index,br_flag); + } if (restricted_set == 0) { // This is the relative offset in the root sequence table (5.7.2-4 from 36.211) for the given preamble index preamble_offset = ((NCS==0)? preamble_index : (preamble_index/(N_ZC/NCS))); @@ -563,11 +559,11 @@ LOG_DEBUG_END } // Compute DFT of RX signal (conjugate input, results in conjugate output) for each new rootSequenceIndex -LOG_DEBUG_BEGIN(PRACH) - int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840)); - if (en>60) LOG_I(PHY,"frame %d, subframe %d : preamble index %d: offset %d, preamble shift %d (br_flag %d, en %d)\n", - ru->proc.frame_prach,subframe,preamble_index,preamble_offset,preamble_shift,br_flag,en); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(PRACH)) { + int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840)); + if (en>60) LOG_I(PHY,"frame %d, subframe %d : preamble index %d: offset %d, preamble shift %d (br_flag %d, en %d)\n", + ru->proc.frame_prach,subframe,preamble_index,preamble_offset,preamble_shift,br_flag,en); + } log2_ifft_size = 10; fft_size = 6144; @@ -589,13 +585,13 @@ LOG_DEBUG_END } memset(prachF, 0, sizeof(int16_t)*2*1024 ); -LOG_M_BEGIN(PRACH) - if (prach[0]!= NULL) LOG_M("prach_rx0.m","prach_rx0",prach[0],6144+792,1,1); - LOG_M("prach_rx1.m","prach_rx1",prach[1],6144+792,1,1); - LOG_M("prach_rxF0.m","prach_rxF0",rxsigF[0],24576,1,1); - LOG_M("prach_rxF1.m","prach_rxF1",rxsigF[1],6144,1,1); -LOG_M_END - + if (LOG_GENFILEFLAG(PRACH)) { + if (prach[0]!= NULL) LOG_M("prach_rx0.m","prach_rx0",prach[0],6144+792,1,1); + LOG_M("prach_rx1.m","prach_rx1",prach[1],6144+792,1,1); + LOG_M("prach_rxF0.m","prach_rxF0",rxsigF[0],24576,1,1); + LOG_M("prach_rxF1.m","prach_rxF1",rxsigF[1],6144,1,1); + } + for (aa=0;aa>10; } -LOG_M_BEGIN(PRACH) - if (aa==0) LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1); - if (aa==1) LOG_M("prach_rxF_comp1.m","prach_rxF_comp1",prachF,1024,1,1); -LOG_M_END + if (LOG_GENFILEFLAG(PRACH)) { + if (aa==0) LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1); + if (aa==1) LOG_M("prach_rxF_comp1.m","prach_rxF_comp1",prachF,1024,1,1); + } }// antennas_rx } // new dft @@ -637,10 +633,10 @@ LOG_M_END eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level])) #endif { -LOG_DEBUG_BEGIN(PRACH) + if (LOG_DEBUGFLAG(PRACH)){ int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840)); if (en>60) LOG_I(PHY,"frame %d, subframe %d: Checking for peak in time-domain (br_flag %d, en %d)\n",ru->proc.frame_prach,subframe,br_flag,en); -LOG_DEBUG_END + } preamble_shift2 = ((preamble_shift==0) ? 0 : ((preamble_shift<>log2_ifft_size)*update_TA/update_TA2; *max_preamble = preamble_index; -LOG_DEBUG_BEGIN(PRACH) - int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840)); - if ((en>60) && (br_flag==1)) LOG_D(PHY,"frame %d, subframe %d : max_preamble_energy %d, max_preamble_delay %d, max_preamble %d (br_flag %d,ce_level %d, levdB %d, lev %d)\n",ru->proc.frame_prach,subframe,*max_preamble_energy,*max_preamble_delay,*max_preamble,br_flag,ce_level,levdB,lev); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(PRACH)){ + int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840)); + if ((en>60) && (br_flag==1)) + LOG_D(PHY,"frame %d, subframe %d : max_preamble_energy %d, max_preamble_delay %d, max_preamble %d (br_flag %d,ce_level %d, levdB %d, lev %d)\n", + ru->proc.frame_prach,subframe, + *max_preamble_energy,*max_preamble_delay, + *max_preamble,br_flag,ce_level,levdB,lev); + } } } } }// preamble_index -LOG_M_BEGIN(PRACH) - int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840)); - if (en>60) { - k = (12*n_ra_prb) - 6*fp->N_RB_UL; - - if (k<0) k+=fp->ofdm_symbol_size; - - k*=12; - k+=13; - k*=2; - - if (br_flag == 0) { - LOG_M("rxsigF.m","prach_rxF",&rxsigF[0][0],12288,1,1); - LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1); - LOG_M("Xu.m","xu",Xu,N_ZC,1,1); - LOG_M("prach_ifft0.m","prach_t0",prach_ifft,1024,1,1); - } - else { - LOG_E(PHY,"Dumping prach (br_flag %d), k = %d (n_ra_prb %d)\n",br_flag,k,n_ra_prb); - LOG_M("rxsigF_br.m","prach_rxF_br",&rxsigF[0][0],12288,1,1); - LOG_M("prach_rxF_comp0_br.m","prach_rxF_comp0_br",prachF,1024,1,1); - LOG_M("Xu_br.m","xu_br",Xu,N_ZC,1,1); - LOG_M("prach_ifft0_br.m","prach_t0_br",prach_ifft,1024,1,1); - exit(-1); - } + if (LOG_GENFILEFLAG(PRACH)) { + int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840)); + if (en>60) { + k = (12*n_ra_prb) - 6*fp->N_RB_UL; + + if (k<0) k+=fp->ofdm_symbol_size; + + k*=12; + k+=13; + k*=2; + + if (br_flag == 0) { + LOG_M("rxsigF.m","prach_rxF",&rxsigF[0][0],12288,1,1); + LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1); + LOG_M("Xu.m","xu",Xu,N_ZC,1,1); + LOG_M("prach_ifft0.m","prach_t0",prach_ifft,1024,1,1); + } + else { + LOG_E(PHY,"Dumping prach (br_flag %d), k = %d (n_ra_prb %d)\n",br_flag,k,n_ra_prb); + LOG_M("rxsigF_br.m","prach_rxF_br",&rxsigF[0][0],12288,1,1); + LOG_M("prach_rxF_comp0_br.m","prach_rxF_comp0_br",prachF,1024,1,1); + LOG_M("Xu_br.m","xu_br",Xu,N_ZC,1,1); + LOG_M("prach_ifft0_br.m","prach_t0_br",prach_ifft,1024,1,1); + exit(-1); + } - } -LOG_M_END + } + } /* LOG_GENFILEFLAG(PRACH) */ if (eNB) stop_meas(&eNB->rx_prach); } diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c index 619d84cee2..adb0d1576f 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c @@ -33,7 +33,6 @@ #include "PHY/defs_eNB.h" #include "PHY/phy_extern.h" #include "transport_eNB.h" -//#define DEBUG_ULSCH #include "PHY/sse_intrin.h" #include "transport_common_proto.h" #include "PHY/LTE_ESTIMATION/lte_estimation.h" @@ -67,7 +66,7 @@ void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH) - // printf("Doing lte_idft for Msc_PUSCH %d\n",Msc_PUSCH); + LOG_T(PHY,"Doing lte_idft for Msc_PUSCH %d\n",Msc_PUSCH); if (frame_parms->Ncp == 0) { // Normal prefix z0 = z; @@ -388,13 +387,13 @@ void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH) for (i=0,ip=0; iN_RB_DL*12),llr128U-(__m128i*)ulsch_llr); - for (i=0; i<(nb_rb*3); i++) { - //printf("%d,%d,%d,%d,%d,%d,%d,%d\n",((int16_t *)rxF)[0],((int16_t *)rxF)[1],((int16_t *)rxF)[2],((int16_t *)rxF)[3],((int16_t *)rxF)[4],((int16_t *)rxF)[5],((int16_t *)rxF)[6],((int16_t *)rxF)[7]); *(*llrp128) = *rxF; rxF++; (*llrp128)++; @@ -593,7 +589,9 @@ void ulsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, ch_mag =(int16x8_t*)&ul_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)]; ch_magb =(int16x8_t*)&ul_ch_magb[0][(symbol*frame_parms->N_RB_DL*12)]; #endif - // printf("symbol %d: mag %d, magb %d\n",symbol,_mm_extract_epi16(ch_mag[0],0),_mm_extract_epi16(ch_magb[0],0)); + if(LOG_DEBUGFLAG(DEBUG_ULSCH)) { + LOG_UI(PHY,"symbol %d: mag %d, magb %d\n",symbol,_mm_extract_epi16(ch_mag[0],0),_mm_extract_epi16(ch_magb[0],0)); + } for (i=0; i<(nb_rb*3); i++) { @@ -736,9 +734,9 @@ void ulsch_extract_rbs_single(int32_t **rxdataF, nb_rb1 = cmin(cmax((int)(frame_parms->N_RB_UL) - (int)(2*first_rb),(int)0),(int)(2*nb_rb)); // 2 times no. RBs before the DC nb_rb2 = 2*nb_rb - nb_rb1; // 2 times no. RBs after the DC -#ifdef DEBUG_ULSCH - printf("ulsch_extract_rbs_single: 2*nb_rb1 = %d, 2*nb_rb2 = %d\n",nb_rb1,nb_rb2); -#endif + if(LOG_DEBUGFLAG(DEBUG_ULSCH)) { + LOG_UI(PHY,"ulsch_extract_rbs_single: 2*nb_rb1 = %d, 2*nb_rb2 = %d\n",nb_rb1,nb_rb2); + } rxF_ext = &rxdataF_ext[aarx][(symbol*frame_parms->N_RB_UL*12)]; @@ -838,7 +836,7 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext, #endif for (rb=0; rb %d,%d,%d (output_shift %d)\n",symbol,rb,*((int16_t*)&ul_ch_mag128[0]),*((int16_t*)&ul_ch_mag128[1]),*((int16_t*)&ul_ch_mag128[2]),output_shift); + LOG_D(PHY,"comp: symbol %d rb %d => %d,%d,%d (output_shift %d)\n",symbol,rb,*((int16_t*)&ul_ch_mag128[0]),*((int16_t*)&ul_ch_mag128[1]),*((int16_t*)&ul_ch_mag128[2]),output_shift); #elif defined(__arm__) @@ -1125,10 +1123,9 @@ void rx_ulsch(PHY_VARS_eNB *eNB, harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe); Qm = ulsch[UE_id]->harq_processes[harq_pid]->Qm; -#ifdef DEBUG_ULSCH - printf("rx_ulsch: harq_pid %d, nb_rb %d first_rb %d\n",harq_pid,ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,ulsch[UE_id]->harq_processes[harq_pid]->first_rb); - -#endif //DEBUG_ULSCH + if(LOG_DEBUGFLAG(DEBUG_ULSCH)) { + LOG_I(PHY,"rx_ulsch: harq_pid %d, nb_rb %d first_rb %d\n",harq_pid,ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,ulsch[UE_id]->harq_processes[harq_pid]->first_rb); + } if (ulsch[UE_id]->harq_processes[harq_pid]->nb_rb == 0) { LOG_E(PHY,"PUSCH (%d/%x) nb_rb=0!\n", harq_pid,ulsch[UE_id]->rnti); @@ -1137,13 +1134,13 @@ void rx_ulsch(PHY_VARS_eNB *eNB, for (l=0; l<(frame_parms->symbols_per_tti-ulsch[UE_id]->harq_processes[harq_pid]->srs_active); l++) { -#ifdef DEBUG_ULSCH - printf("rx_ulsch : symbol %d (first_rb %d,nb_rb %d), rxdataF %p, rxdataF_ext %p\n",l, + if(LOG_DEBUGFLAG(DEBUG_ULSCH)) { + LOG_I(PHY,"rx_ulsch : symbol %d (first_rb %d,nb_rb %d), rxdataF %p, rxdataF_ext %p\n",l, ulsch[UE_id]->harq_processes[harq_pid]->first_rb, ulsch[UE_id]->harq_processes[harq_pid]->nb_rb, common_vars->rxdataF, pusch_vars->rxdataF_ext); -#endif //DEBUG_ULSCH + } ulsch_extract_rbs_single(common_vars->rxdataF, pusch_vars->rxdataF_ext, @@ -1179,21 +1176,16 @@ void rx_ulsch(PHY_VARS_eNB *eNB, pusch_vars->ulsch_power[i] = signal_energy_nodc(pusch_vars->drs_ch_estimates[i], ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12)/correction_factor; - /* printf("%4.4d.%d power harq_pid %d rb %2.2d TBS %2.2d (MPR_times_Ks %d correction %d) power %d dBtimes10\n", proc->frame_rx, proc->subframe_rx, harq_pid, ulsch[UE_id]->harq_processes[harq_pid]->nb_rb, ulsch[UE_id]->harq_processes[harq_pid]->TBS,MPR_times_100Ks,correction_factor,dB_fixed_times10(pusch_vars->ulsch_power[i])); - */ + LOG_D(PHY,"%4.4d.%d power harq_pid %d rb %2.2d TBS %2.2d (MPR_times_Ks %d correction %d) power %d dBtimes10\n", proc->frame_rx, proc->subframe_rx, harq_pid, ulsch[UE_id]->harq_processes[harq_pid]->nb_rb, ulsch[UE_id]->harq_processes[harq_pid]->TBS,MPR_times_100Ks,correction_factor,dB_fixed_times10(pusch_vars->ulsch_power[i])); + } - - //LOG_M("rxdataF_ext.m","rxF_ext",pusch_vars->rxdataF_ext[eNB_id][0],300*(frame_parms->symbols_per_tti-ulsch[UE_id]->srs_active),1,1); - //LOG_M("ulsch_chest.m","drs_est",pusch_vars->drs_ch_estimates[eNB_id][0],300*(frame_parms->symbols_per_tti-ulsch[UE_id]->srs_active),1,1); - - ulsch_channel_level(pusch_vars->drs_ch_estimates, frame_parms, avgU, ulsch[UE_id]->harq_processes[harq_pid]->nb_rb); - // printf("[ULSCH] avg[0] %d\n",avgU[0]); + LOG_D(PHY,"[ULSCH] avg[0] %d\n",avgU[0]); avgs = 0; @@ -1205,9 +1197,9 @@ void rx_ulsch(PHY_VARS_eNB *eNB, log2_maxh = (log2_approx(avgs)/2)+ log2_approx(frame_parms->nb_antennas_rx-1)+4; -#ifdef DEBUG_ULSCH - printf("[ULSCH] log2_maxh = %d (%d,%d)\n",log2_maxh,avgU[0],avgs); -#endif + + LOG_D(PHY,"[ULSCH] log2_maxh = %d (%d,%d)\n",log2_maxh,avgU[0],avgs); + for (l=0; l<(frame_parms->symbols_per_tti-ulsch[UE_id]->harq_processes[harq_pid]->srs_active); l++) { @@ -1229,9 +1221,6 @@ void rx_ulsch(PHY_VARS_eNB *eNB, ulsch[UE_id]->harq_processes[harq_pid]->nb_rb, log2_maxh); // log2_maxh+I0_shift - - - if (frame_parms->nb_antennas_rx > 1) ulsch_detection_mrc(frame_parms, pusch_vars->rxdataF_comp, @@ -1240,9 +1229,7 @@ void rx_ulsch(PHY_VARS_eNB *eNB, l, ulsch[UE_id]->harq_processes[harq_pid]->nb_rb); - - - // if ((eNB->measurements.n0_power_dB[0]+3)ulsch_power[0]) { + // if ((eNB->measurements.n0_power_dB[0]+3)ulsch_power[0]) if (23ulsch_power[0]) { freq_equalization(frame_parms, pusch_vars->rxdataF_comp, @@ -1254,22 +1241,9 @@ void rx_ulsch(PHY_VARS_eNB *eNB, } } - - - - - //#ifdef DEBUG_ULSCH - // Inverse-Transform equalized outputs - // printf("Doing IDFTs\n"); lte_idft(frame_parms, (uint32_t*)pusch_vars->rxdataF_comp[0], ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12); - // printf("Done\n"); - //#endif //DEBUG_ULSCH - - - - llrp = (int16_t*)&pusch_vars->llr[0]; @@ -1316,9 +1290,8 @@ void rx_ulsch(PHY_VARS_eNB *eNB, break; default: -#ifdef DEBUG_ULSCH - printf("ulsch_demodulation.c (rx_ulsch): Unknown Qm!!!!\n"); -#endif //DEBUG_ULSCH + LOG_E(PHY,"ulsch_demodulation.c (rx_ulsch): Unknown Qm!!!!\n"); + break; } } @@ -1329,7 +1302,7 @@ void rx_ulsch_emul(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc, uint8_t UE_index) { - printf("[PHY] EMUL eNB %d rx_ulsch_emul : subframe %d, UE_index %d\n",eNB->Mod_id,proc->subframe_rx,UE_index); + LOG_I(PHY,"[PHY] EMUL eNB %d rx_ulsch_emul : subframe %d, UE_index %d\n",eNB->Mod_id,proc->subframe_rx,UE_index); eNB->pusch_vars[UE_index]->ulsch_power[0] = 31622; //=45dB; eNB->pusch_vars[UE_index]->ulsch_power[1] = 31622; //=45dB; @@ -1344,7 +1317,7 @@ void rx_ulsch_emul(PHY_VARS_eNB *eNB, harq_pid = subframe2harq_pid(&eNB->frame_parms,frame,subframe); - printf("Dumping ULSCH in subframe %d with harq_pid %d, round %d for NB_rb %d, TBS %d, Qm %d, N_symb %d\n", + LOG_UI(PHY,"Dumping ULSCH in subframe %d with harq_pid %d, round %d for NB_rb %d, TBS %d, Qm %d, N_symb %d\n", subframe,harq_pid,round,eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb, eNB->ulsch[UE_id]->harq_processes[harq_pid]->TBS,eNB->ulsch[UE_id]->harq_processes[harq_pid]->Qm, eNB->ulsch[UE_id]->harq_processes[harq_pid]->Nsymb_pusch); diff --git a/openair1/PHY/TOOLS/lte_dfts.c b/openair1/PHY/TOOLS/lte_dfts.c index e7a7f1a259..ca1a6d1262 100644 --- a/openair1/PHY/TOOLS/lte_dfts.c +++ b/openair1/PHY/TOOLS/lte_dfts.c @@ -2035,7 +2035,7 @@ static inline void transpose4_ooff(int16x4_t *x,int16x4_t *y,int off) #endif -// 16-point optimized DFT kernel +// 16-point optimized DEBUG_DFT kernel const static int16_t tw16[24] __attribute__((aligned(32))) = { 32767,0,30272,-12540,23169 ,-23170,12539 ,-30273, 32767,0,23169,-23170,0 ,-32767,-23170,-23170, @@ -3097,10 +3097,10 @@ void dft128(int16_t *x,int16_t *y,int scale) dft64((int16_t*)(xtmp),(int16_t*)ytmp,1); dft64((int16_t*)(xtmp+32),(int16_t*)(ytmp+16),1); - - /* LOG_M("dft128a.m","dfta",ytmp,64,1,1); - LOG_M("dft128b.m","dftb",ytmp+16,64,1,1);*/ - + if (LOG_GENFILEFLAG(DEBUG_DFT)) { + LOG_M("dft128a.m","dfta",ytmp,64,1,1); + LOG_M("dft128b.m","dftb",ytmp+16,64,1,1);*/ + } for (i=0; i<16; i++) { bfly2_16(ytmpp,ytmpp+16, y128p,y128p+16, @@ -3149,9 +3149,10 @@ void dft128(int16_t *x,int16_t *y,int scale) } - - /* LOG_M("dft128out.m","dft128",y,128,1,1); - exit(-1);*/ + if (LOG_GENFILEFLAG(DEBUG_DFT)) { + LOG_M("dft128out.m","dft128",y,128,1,1); + exit(-1); + } _mm_empty(); _m_empty(); @@ -3176,17 +3177,17 @@ void dft128(int16_t *x,int16_t *y,int scale) transpose4_ooff_simd256(x256+10,xtmp+5,8); transpose4_ooff_simd256(x256+12,xtmp+6,8); transpose4_ooff_simd256(x256+14,xtmp+7,8); - - /* LOG_M("dft128ina_256.m","dftina",xtmp,64,1,1); - LOG_M("dft128inb_256.m","dftinb",xtmp+8,64,1,1); - */ + if (LOG_GENFILEFLAG(DEBUG_DFT)) { + LOG_M("dft128ina_256.m","dftina",xtmp,64,1,1); + LOG_M("dft128inb_256.m","dftinb",xtmp+8,64,1,1); + } dft64((int16_t*)(xtmp),(int16_t*)ytmp,1); dft64((int16_t*)(xtmp+8),(int16_t*)(ytmp+8),1); - - /*LOG_M("dft128outa_256.m","dftouta",ytmp,64,1,1); - LOG_M("dft128outb_256.m","dftoutb",ytmp+8,64,1,1); - */ + if (LOG_GENFILEFLAG(DEBUG_DFT)) { + LOG_M("dft128outa_256.m","dftouta",ytmp,64,1,1); + LOG_M("dft128outb_256.m","dftoutb",ytmp+8,64,1,1); + } for (i=0; i<8; i++) { bfly2_16_256(ytmpp,ytmpp+8, @@ -3219,9 +3220,10 @@ void dft128(int16_t *x,int16_t *y,int scale) y256[15] = mulhi_int16_simd256(y256[15],ONE_OVER_SQRT2_Q15_256); } - - /* LOG_M("dft128.m","dft",y256,128,1,1); - exit(-1);*/ + if (LOG_GENFILEFLAG(DEBUG_DFT)) { + LOG_M("dft128.m","dft",y256,128,1,1); + exit(-1); + } } #endif @@ -5422,10 +5424,11 @@ void dft1536(int16_t *input, int16_t *output, int scale) tmpo[1][i] = tmpo[1][i<<1]; tmpo[2][i] = tmpo[2][i<<1]; }*/ - - // LOG_M("out0.m","o0",tmpo[0],2048,1,1); - // LOG_M("out1.m","o1",tmpo[1],2048,1,1); - // LOG_M("out2.m","o2",tmpo[2],2048,1,1); + if (LOG_GENFILEFLAG(DEBUG_DFT)) { + LOG_M("dft1536out0.m","o0",tmpo[0],2048,1,1); + LOG_M("dft1536out1.m","o1",tmpo[1],2048,1,1); + LOG_M("dft1536out2.m","o2",tmpo[2],2048,1,1); + } for (i=0,i2=0; i<1024; i+=8,i2+=4) { bfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),(simd_q15_t*)(&tmpo[2][i2]), (simd_q15_t*)(output+i),(simd_q15_t*)(output+1024+i),(simd_q15_t*)(output+2048+i), @@ -5585,12 +5588,20 @@ void idft6144(int16_t *input, int16_t *output,int scale) idft2048((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),1); idft2048((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),1); + if (LOG_GENFILEFLAG(DEBUG_DFT)) { + LOG_M("idft6144in.m","in",input,6144,1,1); + LOG_M("idft6144out0.m","o0",tmpo[0],2048,1,1); + LOG_M("idft6144out1.m","o1",tmpo[1],2048,1,1); + LOG_M("idft6144out2.m","o2",tmpo[2],2048,1,1); + } + for (i=0,i2=0; i<4096; i+=8,i2+=4) { ibfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),((simd_q15_t*)&tmpo[2][i2]), (simd_q15_t*)(output+i),(simd_q15_t*)(output+4096+i),(simd_q15_t*)(output+8192+i), (simd_q15_t*)(twa6144+i),(simd_q15_t*)(twb6144+i)); } + if (scale==1) { for (i=0; i<96; i++) { y128p[0] = mulhi_int16(y128p[0],ONE_OVER_SQRT3_Q15_128); @@ -5613,6 +5624,9 @@ void idft6144(int16_t *input, int16_t *output,int scale) } } + if (LOG_GENFILEFLAG(DEBUG_DFT)) { + LOG_M("idft6144out.m","out",output,6144,1,1); + } _mm_empty(); _m_empty(); @@ -5643,10 +5657,11 @@ void dft6144(int16_t *input, int16_t *output,int scale) tmpo[1][i] = tmpo[1][i<<1]; tmpo[2][i] = tmpo[2][i<<1]; }*/ - - // LOG_M("out0.m","o0",tmpo[0],2048,1,1); - // LOG_M("out1.m","o1",tmpo[1],2048,1,1); - // LOG_M("out2.m","o2",tmpo[2],2048,1,1); + if (LOG_GENFILEFLAG(DEBUG_DFT)) { + LOG_M("ft6144out0.m","o0",tmpo[0],2048,1,1); + LOG_M("ft6144out1.m","o1",tmpo[1],2048,1,1); + LOG_M("ft6144out2.m","o2",tmpo[2],2048,1,1); + } for (i=0,i2=0; i<4096; i+=8,i2+=4) { bfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),(simd_q15_t*)(&tmpo[2][i2]), (simd_q15_t*)(output+i),(simd_q15_t*)(output+4096+i),(simd_q15_t*)(output+8192+i), @@ -5707,10 +5722,11 @@ void dft12288(int16_t *input, int16_t *output,int scale) tmpo[1][i] = tmpo[1][i<<1]; tmpo[2][i] = tmpo[2][i<<1]; }*/ - - // LOG_M("out0.m","o0",tmpo[0],4096,1,1); - // LOG_M("out1.m","o1",tmpo[1],4096,1,1); - // LOG_M("out2.m","o2",tmpo[2],4096,1,1); + if (LOG_GENFILEFLAG(DEBUG_DFT)) { + LOG_M("dft12288out0.m","o0",tmpo[0],4096,1,1); + LOG_M("dft12288out1.m","o1",tmpo[1],4096,1,1); + LOG_M("dft12288out2.m","o2",tmpo[2],4096,1,1); + } for (i=0,i2=0; i<8192; i+=8,i2+=4) { bfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),(simd_q15_t*)(&tmpo[2][i2]), (simd_q15_t*)(output+i),(simd_q15_t*)(output+8192+i),(simd_q15_t*)(output+16384+i), @@ -5758,9 +5774,18 @@ void idft12288(int16_t *input, int16_t *output,int scale) } + idft4096((int16_t*)(tmp[0]),(int16_t*)(tmpo[0]),scale); idft4096((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),scale); idft4096((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),scale); + + if (LOG_GENFILEFLAG(DEBUG_DFT)) { + LOG_M("idft12288in.m","in",input,12288,1,1); + LOG_M("idft12288out0.m","o0",tmpo[0],4096,1,1); + LOG_M("idft12288out1.m","o1",tmpo[1],4096,1,1); + LOG_M("idft12288out2.m","o2",tmpo[2],4096,1,1); + } + for (i=0,i2=0; i<8192; i+=8,i2+=4) { ibfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),((simd_q15_t*)&tmpo[2][i2]), (simd_q15_t*)(output+i),(simd_q15_t*)(output+8192+i),(simd_q15_t*)(output+16384+i), @@ -5790,8 +5815,9 @@ void idft12288(int16_t *input, int16_t *output,int scale) } _mm_empty(); _m_empty(); - - // LOG_M("out.m","out",output,6144,1,1); + if (LOG_GENFILEFLAG(DEBUG_DFT)) { + LOG_M("idft12288out.m","out",output,6144,1,1); + } } int16_t twa18432[12288] __attribute__((aligned(32))); @@ -5920,16 +5946,18 @@ void dft24576(int16_t *input, int16_t *output,int scale) tmpo[1][i] = tmpo[1][i<<1]; tmpo[2][i] = tmpo[2][i<<1]; }*/ - - // LOG_M("out0.m","o0",tmpo[0],8192,1,1); - // LOG_M("out1.m","o1",tmpo[1],8192,1,1); - // LOG_M("out2.m","o2",tmpo[2],8192,1,1); + if (LOG_GENFILEFLAG(DEBUG_DFT)) { + LOG_M("dft24576out0.m","o0",tmpo[0],8192,1,1); + LOG_M("dft24576out1.m","o1",tmpo[1],8192,1,1); + LOG_M("dft24576out2.m","o2",tmpo[2],8192,1,1); + } for (i=0,i2=0; i<16384; i+=8,i2+=4) { bfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),(simd_q15_t*)(&tmpo[2][i2]), (simd_q15_t*)(output+i),(simd_q15_t*)(output+16384+i),(simd_q15_t*)(output+32768+i), (simd_q15_t*)(twa24576+i),(simd_q15_t*)(twb24576+i)); } + if (scale==1) { for (i=0; i<384; i++) { y128p[0] = mulhi_int16(y128p[0],ONE_OVER_SQRT3_Q15_128); @@ -5953,11 +5981,14 @@ void dft24576(int16_t *input, int16_t *output,int scale) } _mm_empty(); _m_empty(); - - // LOG_M("out.m","out",output,24576,1,1); + if (LOG_GENFILEFLAG(DEBUG_DFT)) { + LOG_M("out.m","out",output,24576,1,1); + } } -void idft24576(int16_t *input, int16_t *output,int scale) + + +void idft24576(int16_t *input, int16_t *output) { int i,i2,j; uint32_t tmp[3][8192] __attribute__((aligned(32))); @@ -5975,12 +6006,12 @@ void idft24576(int16_t *input, int16_t *output,int scale) idft8192((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),1); idft8192((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),1); - /* - LOG_M("in.m","in",input,24576,1,1); - LOG_M("out0.m","o0",tmpo[0],8192,1,1); - LOG_M("out1.m","o1",tmpo[1],8192,1,1); - LOG_M("out2.m","o2",tmpo[2],8192,1,1); - */ + if (LOG_GENFILEFLAG(DEBUG_DFT)) { + LOG_M("idft24576in.m","in",input,24576,1,1); + LOG_M("idft24576out0.m","o0",tmpo[0],8192,1,1); + LOG_M("idft24576out1.m","o1",tmpo[1],8192,1,1); + LOG_M("idft24576out2.m","o2",tmpo[2],8192,1,1); + } for (i=0,i2=0; i<16384; i+=8,i2+=4) { ibfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),((simd_q15_t*)&tmpo[2][i2]), @@ -6011,7 +6042,9 @@ void idft24576(int16_t *input, int16_t *output,int scale) _mm_empty(); _m_empty(); - // LOG_M("out.m","out",output,24576,1,1); + if (LOG_GENFILEFLAG(DEBUG_DFT)) { + LOG_M("idft24576out.m","out",output,24576,1,1); + } } /// THIS SECTION IS FOR ALL PUSCH DFTS (i.e. radix 2^a * 3^b * 4^c * 5^d) diff --git a/openair1/SCHED_UE/phy_procedures_lte_ue.c b/openair1/SCHED_UE/phy_procedures_lte_ue.c index ed258ed47c..2b35ad936b 100644 --- a/openair1/SCHED_UE/phy_procedures_lte_ue.c +++ b/openair1/SCHED_UE/phy_procedures_lte_ue.c @@ -99,77 +99,77 @@ void get_dumpparam(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id, uint8_t void dump_dlsch(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t subframe,uint8_t harq_pid) { -LOG_M_BEGIN(DEBUG_UE_PHYPROC) - unsigned int coded_bits_per_codeword; - uint8_t nsymb ; + if (LOG_GENFILEFLAG(DEBUG_UE_PHYPROC)) { + unsigned int coded_bits_per_codeword; + uint8_t nsymb ; - get_dumpparam(ue, proc, eNB_id, - ue->dlsch[ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->nb_rb , - ue->dlsch[ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even, - subframe, - ue->dlsch[ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->Qm, - ue->dlsch[ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->Nl, - ue->transmission_mode[eNB_id]<7?0:ue->transmission_mode[eNB_id], - &nsymb, &coded_bits_per_codeword); + get_dumpparam(ue, proc, eNB_id, + ue->dlsch[ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->nb_rb , + ue->dlsch[ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even, + subframe, + ue->dlsch[ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->Qm, + ue->dlsch[ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->Nl, + ue->transmission_mode[eNB_id]<7?0:ue->transmission_mode[eNB_id], + &nsymb, &coded_bits_per_codeword); - LOG_M("rxsigF0.m","rxsF0", ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[0],2*nsymb*ue->frame_parms.ofdm_symbol_size,2,1); - LOG_M("rxsigF0_ext.m","rxsF0_ext", ue->pdsch_vars[ue->current_thread_id[subframe]][0]->rxdataF_ext[0],2*nsymb*ue->frame_parms.ofdm_symbol_size,1,1); - LOG_M("dlsch00_ch0_ext.m","dl00_ch0_ext", ue->pdsch_vars[ue->current_thread_id[subframe]][0]->dl_ch_estimates_ext[0],300*nsymb,1,1); - /* - LOG_M("dlsch01_ch0_ext.m","dl01_ch0_ext",pdsch_vars[0]->dl_ch_estimates_ext[1],300*12,1,1); - LOG_M("dlsch10_ch0_ext.m","dl10_ch0_ext",pdsch_vars[0]->dl_ch_estimates_ext[2],300*12,1,1); - LOG_M("dlsch11_ch0_ext.m","dl11_ch0_ext",pdsch_vars[0]->dl_ch_estimates_ext[3],300*12,1,1); - LOG_M("dlsch_rho.m","dl_rho",pdsch_vars[0]->rho[0],300*12,1,1); - */ - LOG_M("dlsch_rxF_comp0.m","dlsch0_rxF_comp0", ue->pdsch_vars[ue->current_thread_id[subframe]][0]->rxdataF_comp0[0],300*12,1,1); - LOG_M("dlsch_rxF_llr.m","dlsch_llr", ue->pdsch_vars[ue->current_thread_id[subframe]][0]->llr[0],coded_bits_per_codeword,1,0); + LOG_M("rxsigF0.m","rxsF0", ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[0],2*nsymb*ue->frame_parms.ofdm_symbol_size,2,1); + LOG_M("rxsigF0_ext.m","rxsF0_ext", ue->pdsch_vars[ue->current_thread_id[subframe]][0]->rxdataF_ext[0],2*nsymb*ue->frame_parms.ofdm_symbol_size,1,1); + LOG_M("dlsch00_ch0_ext.m","dl00_ch0_ext", ue->pdsch_vars[ue->current_thread_id[subframe]][0]->dl_ch_estimates_ext[0],300*nsymb,1,1); + /* + LOG_M("dlsch01_ch0_ext.m","dl01_ch0_ext",pdsch_vars[0]->dl_ch_estimates_ext[1],300*12,1,1); + LOG_M("dlsch10_ch0_ext.m","dl10_ch0_ext",pdsch_vars[0]->dl_ch_estimates_ext[2],300*12,1,1); + LOG_M("dlsch11_ch0_ext.m","dl11_ch0_ext",pdsch_vars[0]->dl_ch_estimates_ext[3],300*12,1,1); + LOG_M("dlsch_rho.m","dl_rho",pdsch_vars[0]->rho[0],300*12,1,1); + */ + LOG_M("dlsch_rxF_comp0.m","dlsch0_rxF_comp0", ue->pdsch_vars[ue->current_thread_id[subframe]][0]->rxdataF_comp0[0],300*12,1,1); + LOG_M("dlsch_rxF_llr.m","dlsch_llr", ue->pdsch_vars[ue->current_thread_id[subframe]][0]->llr[0],coded_bits_per_codeword,1,0); - LOG_M("dlsch_mag1.m","dlschmag1",ue->pdsch_vars[ue->current_thread_id[subframe]][0]->dl_ch_mag0,300*12,1,1); - LOG_M("dlsch_mag2.m","dlschmag2",ue->pdsch_vars[ue->current_thread_id[subframe]][0]->dl_ch_magb0,300*12,1,1); -LOG_M_END + LOG_M("dlsch_mag1.m","dlschmag1",ue->pdsch_vars[ue->current_thread_id[subframe]][0]->dl_ch_mag0,300*12,1,1); + LOG_M("dlsch_mag2.m","dlschmag2",ue->pdsch_vars[ue->current_thread_id[subframe]][0]->dl_ch_magb0,300*12,1,1); + } } void dump_dlsch_SI(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t subframe) { -LOG_M_BEGIN(DEBUG_UE_PHYPROC) - unsigned int coded_bits_per_codeword; - uint8_t nsymb; + if (LOG_GENFILEFLAG(DEBUG_UE_PHYPROC)){ + unsigned int coded_bits_per_codeword; + uint8_t nsymb; - get_dumpparam(ue, proc, eNB_id, - ue->dlsch_SI[eNB_id]->harq_processes[0]->nb_rb, - ue->dlsch_SI[eNB_id]->harq_processes[0]->rb_alloc_even, - subframe,2,1,0, - &nsymb, &coded_bits_per_codeword); + get_dumpparam(ue, proc, eNB_id, + ue->dlsch_SI[eNB_id]->harq_processes[0]->nb_rb, + ue->dlsch_SI[eNB_id]->harq_processes[0]->rb_alloc_even, + subframe,2,1,0, + &nsymb, &coded_bits_per_codeword); - LOG_D(PHY,"[UE %d] Dumping dlsch_SI : ofdm_symbol_size %d, nsymb %d, nb_rb %d, mcs %d, nb_rb %d, num_pdcch_symbols %d,G %d\n", - ue->Mod_id, - ue->frame_parms.ofdm_symbol_size, - nsymb, - 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[0%RX_NB_TH][eNB_id]->num_pdcch_symbols, - coded_bits_per_codeword); + LOG_D(PHY,"[UE %d] Dumping dlsch_SI : ofdm_symbol_size %d, nsymb %d, nb_rb %d, mcs %d, nb_rb %d, num_pdcch_symbols %d,G %d\n", + ue->Mod_id, + ue->frame_parms.ofdm_symbol_size, + nsymb, + 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[0%RX_NB_TH][eNB_id]->num_pdcch_symbols, + coded_bits_per_codeword); - LOG_M("rxsig0.m","rxs0", &ue->common_vars.rxdata[0][subframe*ue->frame_parms.samples_per_tti],ue->frame_parms.samples_per_tti,1,1); + LOG_M("rxsig0.m","rxs0", &ue->common_vars.rxdata[0][subframe*ue->frame_parms.samples_per_tti],ue->frame_parms.samples_per_tti,1,1); - LOG_M("rxsigF0.m","rxsF0", ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[0],nsymb*ue->frame_parms.ofdm_symbol_size,1,1); - LOG_M("rxsigF0_ext.m","rxsF0_ext", ue->pdsch_vars_SI[0]->rxdataF_ext[0],2*nsymb*ue->frame_parms.ofdm_symbol_size,1,1); - LOG_M("dlsch00_ch0_ext.m","dl00_ch0_ext", ue->pdsch_vars_SI[0]->dl_ch_estimates_ext[0],ue->frame_parms.N_RB_DL*12*nsymb,1,1); - /* - LOG_M("dlsch01_ch0_ext.m","dl01_ch0_ext",pdsch_vars[0]->dl_ch_estimates_ext[1],300*12,1,1); - LOG_M("dlsch10_ch0_ext.m","dl10_ch0_ext",pdsch_vars[0]->dl_ch_estimates_ext[2],300*12,1,1); - LOG_M("dlsch11_ch0_ext.m","dl11_ch0_ext",pdsch_vars[0]->dl_ch_estimates_ext[3],300*12,1,1); - LOG_M("dlsch_rho.m","dl_rho",pdsch_vars[0]->rho[0],300*12,1,1); - */ - LOG_M("dlsch_rxF_comp0.m","dlsch0_rxF_comp0", ue->pdsch_vars_SI[0]->rxdataF_comp0[0],ue->frame_parms.N_RB_DL*12*nsymb,1,1); - LOG_M("dlsch_rxF_llr.m","dlsch_llr", ue->pdsch_vars_SI[0]->llr[0],coded_bits_per_codeword,1,0); + LOG_M("rxsigF0.m","rxsF0", ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[0],nsymb*ue->frame_parms.ofdm_symbol_size,1,1); + LOG_M("rxsigF0_ext.m","rxsF0_ext", ue->pdsch_vars_SI[0]->rxdataF_ext[0],2*nsymb*ue->frame_parms.ofdm_symbol_size,1,1); + LOG_M("dlsch00_ch0_ext.m","dl00_ch0_ext", ue->pdsch_vars_SI[0]->dl_ch_estimates_ext[0],ue->frame_parms.N_RB_DL*12*nsymb,1,1); + /* + LOG_M("dlsch01_ch0_ext.m","dl01_ch0_ext",pdsch_vars[0]->dl_ch_estimates_ext[1],300*12,1,1); + LOG_M("dlsch10_ch0_ext.m","dl10_ch0_ext",pdsch_vars[0]->dl_ch_estimates_ext[2],300*12,1,1); + LOG_M("dlsch11_ch0_ext.m","dl11_ch0_ext",pdsch_vars[0]->dl_ch_estimates_ext[3],300*12,1,1); + LOG_M("dlsch_rho.m","dl_rho",pdsch_vars[0]->rho[0],300*12,1,1); + */ + LOG_M("dlsch_rxF_comp0.m","dlsch0_rxF_comp0", ue->pdsch_vars_SI[0]->rxdataF_comp0[0],ue->frame_parms.N_RB_DL*12*nsymb,1,1); + LOG_M("dlsch_rxF_llr.m","dlsch_llr", ue->pdsch_vars_SI[0]->llr[0],coded_bits_per_codeword,1,0); - LOG_M("dlsch_mag1.m","dlschmag1",ue->pdsch_vars_SI[0]->dl_ch_mag0,300*nsymb,1,1); - LOG_M("dlsch_mag2.m","dlschmag2",ue->pdsch_vars_SI[0]->dl_ch_magb0,300*nsymb,1,1); - sleep(1); - exit(-1); -LOG_M_END + LOG_M("dlsch_mag1.m","dlschmag1",ue->pdsch_vars_SI[0]->dl_ch_mag0,300*nsymb,1,1); + LOG_M("dlsch_mag2.m","dlschmag2",ue->pdsch_vars_SI[0]->dl_ch_magb0,300*nsymb,1,1); + sleep(1); + exit(-1); + } } #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) @@ -234,40 +234,40 @@ unsigned int get_tx_amp(int power_dBm, int power_max_dBm, int N_RB_UL, int nb_rb void dump_dlsch_ra(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t subframe) { -LOG_M_BEGIN(DEBUG_UE_PHYPROC) - unsigned int coded_bits_per_codeword; - uint8_t nsymb ; + if (LOG_GENFILEFLAG(DEBUG_UE_PHYPROC)){ + unsigned int coded_bits_per_codeword; + uint8_t nsymb ; - get_dumpparam(ue, proc, eNB_id, - ue->dlsch_SI[eNB_id]->harq_processes[0]->nb_rb, - ue->dlsch_SI[eNB_id]->harq_processes[0]->rb_alloc_even, - subframe,2,1,0, - &nsymb, &coded_bits_per_codeword); + get_dumpparam(ue, proc, eNB_id, + ue->dlsch_SI[eNB_id]->harq_processes[0]->nb_rb, + ue->dlsch_SI[eNB_id]->harq_processes[0]->rb_alloc_even, + subframe,2,1,0, + &nsymb, &coded_bits_per_codeword); - LOG_D(PHY,"[UE %d] Dumping dlsch_ra : nb_rb %d, mcs %d, nb_rb %d, num_pdcch_symbols %d,G %d\n", - ue->Mod_id, - 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[0%RX_NB_TH][eNB_id]->num_pdcch_symbols, - coded_bits_per_codeword); + LOG_D(PHY,"[UE %d] Dumping dlsch_ra : nb_rb %d, mcs %d, nb_rb %d, num_pdcch_symbols %d,G %d\n", + ue->Mod_id, + 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[0%RX_NB_TH][eNB_id]->num_pdcch_symbols, + coded_bits_per_codeword); - LOG_M("rxsigF0.m","rxsF0", ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[0],2*12*ue->frame_parms.ofdm_symbol_size,2,1); - LOG_M("rxsigF0_ext.m","rxsF0_ext", ue->pdsch_vars_ra[0]->rxdataF_ext[0],2*12*ue->frame_parms.ofdm_symbol_size,1,1); - LOG_M("dlsch00_ch0_ext.m","dl00_ch0_ext", ue->pdsch_vars_ra[0]->dl_ch_estimates_ext[0],300*nsymb,1,1); - /* - LOG_M("dlsch01_ch0_ext.m","dl01_ch0_ext",pdsch_vars[0]->dl_ch_estimates_ext[1],300*12,1,1); - LOG_M("dlsch10_ch0_ext.m","dl10_ch0_ext",pdsch_vars[0]->dl_ch_estimates_ext[2],300*12,1,1); - LOG_M("dlsch11_ch0_ext.m","dl11_ch0_ext",pdsch_vars[0]->dl_ch_estimates_ext[3],300*12,1,1); - LOG_M("dlsch_rho.m","dl_rho",pdsch_vars[0]->rho[0],300*12,1,1); - */ - LOG_M("dlsch_rxF_comp0.m","dlsch0_rxF_comp0", ue->pdsch_vars_ra[0]->rxdataF_comp0[0],300*nsymb,1,1); - LOG_M("dlsch_rxF_llr.m","dlsch_llr", ue->pdsch_vars_ra[0]->llr[0],coded_bits_per_codeword,1,0); + LOG_M("rxsigF0.m","rxsF0", ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[0],2*12*ue->frame_parms.ofdm_symbol_size,2,1); + LOG_M("rxsigF0_ext.m","rxsF0_ext", ue->pdsch_vars_ra[0]->rxdataF_ext[0],2*12*ue->frame_parms.ofdm_symbol_size,1,1); + LOG_M("dlsch00_ch0_ext.m","dl00_ch0_ext", ue->pdsch_vars_ra[0]->dl_ch_estimates_ext[0],300*nsymb,1,1); + /* + LOG_M("dlsch01_ch0_ext.m","dl01_ch0_ext",pdsch_vars[0]->dl_ch_estimates_ext[1],300*12,1,1); + LOG_M("dlsch10_ch0_ext.m","dl10_ch0_ext",pdsch_vars[0]->dl_ch_estimates_ext[2],300*12,1,1); + LOG_M("dlsch11_ch0_ext.m","dl11_ch0_ext",pdsch_vars[0]->dl_ch_estimates_ext[3],300*12,1,1); + LOG_M("dlsch_rho.m","dl_rho",pdsch_vars[0]->rho[0],300*12,1,1); + */ + LOG_M("dlsch_rxF_comp0.m","dlsch0_rxF_comp0", ue->pdsch_vars_ra[0]->rxdataF_comp0[0],300*nsymb,1,1); + LOG_M("dlsch_rxF_llr.m","dlsch_llr", ue->pdsch_vars_ra[0]->llr[0],coded_bits_per_codeword,1,0); - LOG_M("dlsch_mag1.m","dlschmag1",ue->pdsch_vars_ra[0]->dl_ch_mag0,300*nsymb,1,1); - LOG_M("dlsch_mag2.m","dlschmag2",ue->pdsch_vars_ra[0]->dl_ch_magb0,300*nsymb,1,1); -LOG_M_END + LOG_M("dlsch_mag1.m","dlschmag1",ue->pdsch_vars_ra[0]->dl_ch_mag0,300*nsymb,1,1); + LOG_M("dlsch_mag2.m","dlschmag2",ue->pdsch_vars_ra[0]->dl_ch_magb0,300*nsymb,1,1); + } } void phy_reset_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index) @@ -362,11 +362,11 @@ void process_timing_advance_rar(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint16_t ti ue->timing_advance = timing_advance*4; -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { /* TODO: fix this log, what is 'HW timing advance'? */ /*LOG_I(PHY,"[UE %d] AbsoluteSubFrame %d.%d, received (rar) timing_advance %d, HW timing advance %d\n",ue->Mod_id,proc->frame_rx, proc->subframe_rx, ue->timing_advance);*/ - LOG_I(PHY,"[UE %d] AbsoluteSubFrame %d.%d, received (rar) timing_advance %d\n",ue->Mod_id,proc->frame_rx, proc->subframe_rx, ue->timing_advance); -LOG_DEBUG_END + LOG_UI(PHY,"[UE %d] AbsoluteSubFrame %d.%d, received (rar) timing_advance %d\n",ue->Mod_id,proc->frame_rx, proc->subframe_rx, ue->timing_advance); + } } @@ -740,17 +740,17 @@ uint16_t get_n1_pucch(PHY_VARS_UE *ue, } else { bundling_flag = ue->pucch_config_dedicated[eNB_id].tdd_AckNackFeedbackMode; -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { - if (bundling_flag==bundling) { - LOG_D(PHY,"[UE%d] Frame %d subframe %d : get_n1_pucch, bundling, SR %d/%d\n",ue->Mod_id,proc->frame_tx,subframe,SR, - ue->scheduling_request_config[eNB_id].sr_PUCCH_ResourceIndex); - } else { - LOG_D(PHY,"[UE%d] Frame %d subframe %d : get_n1_pucch, multiplexing, SR %d/%d\n",ue->Mod_id,proc->frame_tx,subframe,SR, - ue->scheduling_request_config[eNB_id].sr_PUCCH_ResourceIndex); + if (bundling_flag==bundling) { + LOG_D(PHY,"[UE%d] Frame %d subframe %d : get_n1_pucch, bundling, SR %d/%d\n",ue->Mod_id,proc->frame_tx,subframe,SR, + ue->scheduling_request_config[eNB_id].sr_PUCCH_ResourceIndex); + } else { + LOG_D(PHY,"[UE%d] Frame %d subframe %d : get_n1_pucch, multiplexing, SR %d/%d\n",ue->Mod_id,proc->frame_tx,subframe,SR, + ue->scheduling_request_config[eNB_id].sr_PUCCH_ResourceIndex); + } } -LOG_DEBUG_END switch (frame_parms->tdd_config) { case 1: // DL:S:UL:UL:DL:DL:S:UL:UL:DL @@ -1226,9 +1226,9 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt #endif VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_ULSCH_COMMON,VCD_FUNCTION_IN); -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->ofdm_mod_stats); -LOG_DEBUG_END + if ( LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->ofdm_mod_stats); + } nsymb = (frame_parms->Ncp == 0) ? 14 : 12; #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)//this is the EXPRESS MIMO case @@ -1345,9 +1345,9 @@ LOG_DEBUG_END } //nb_antennas_tx -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->ofdm_mod_stats); -LOG_DEBUG_END + if ( LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->ofdm_mod_stats); + } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_ULSCH_COMMON,VCD_FUNCTION_OUT); @@ -1634,30 +1634,30 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB } -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - 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(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti), - T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][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(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti), - T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->current_harq_pid)); - } - 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, - ue->ulsch[eNB_id]->o_ACK[0],ue->ulsch[eNB_id]->o_ACK[1], - ue->ulsch[eNB_id]->harq_processes[harq_pid]->O_ACK); -LOG_DEBUG_END + if ( LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { + 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(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti), + T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][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(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti), + T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->current_harq_pid)); + } + 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, + ue->ulsch[eNB_id]->o_ACK[0],ue->ulsch[eNB_id]->o_ACK[1], + ue->ulsch[eNB_id]->harq_processes[harq_pid]->O_ACK); } + } -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) + if ( LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)){ 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, ack_status_cw0 %d ack_status_cw1 %d bundling %d, Nbundled %d, CQI %d, RI %d\n", @@ -1679,7 +1679,7 @@ LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) ue->ulsch[eNB_id]->bundling, Nbundled, cqi_status, ri_status); -LOG_DEBUG_END + } @@ -1701,9 +1701,9 @@ LOG_DEBUG_END ue->prach_resources[eNB_id]->Msg3[6], ue->prach_resources[eNB_id]->Msg3[7], ue->prach_resources[eNB_id]->Msg3[8]); -LOG_DEBUG_BEGIN(UE_TIMING) + if ( LOG_DEBUGFLAG(UE_TIMING)) { start_meas(&ue->ulsch_encoding_stats); -LOG_DEBUG_END + } AssertFatal(ulsch_encoding(ue->prach_resources[eNB_id]->Msg3, ue, @@ -1713,11 +1713,11 @@ LOG_DEBUG_END ue->transmission_mode[eNB_id],0,0)==0, "ulsch_coding.c: FATAL ERROR: returning\n"); -LOG_DEBUG_BEGIN(UE_TIMING) + if ( LOG_DEBUGFLAG(UE_TIMING)) { stop_meas(&ue->phy_proc_tx); LOG_UI(PHY,"------FULL TX PROC : %5.2f ------\n",ue->phy_proc_tx.p_time/(cpuf*1000.0)); stop_meas(&ue->ulsch_encoding_stats); -LOG_DEBUG_END + } if (ue->mac_enabled == 1) { @@ -1752,26 +1752,25 @@ LOG_DEBUG_END -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { LOG_D(PHY,"[UE] Frame %d, subframe %d : ULSCH SDU (TX harq_pid %d) (%d bytes) : \n",frame_tx,subframe_tx,harq_pid, ue->ulsch[eNB_id]->harq_processes[harq_pid]->TBS>>3); for (i=0; iulsch[eNB_id]->harq_processes[harq_pid]->TBS>>3; i++) LOG_T(PHY,"%x.",ulsch_input_buffer[i]); LOG_T(PHY,"\n"); -LOG_DEBUG_END } - else { + } else { unsigned int taus(void); for (i=0; iulsch_encoding_stats); -LOG_DEBUG_END + } if (abstraction_flag==0) { if (ulsch_encoding(ulsch_input_buffer, @@ -1783,16 +1782,16 @@ LOG_DEBUG_END Nbundled)!=0) { LOG_E(PHY,"ulsch_coding.c: FATAL ERROR: returning\n"); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX, VCD_FUNCTION_OUT); -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->phy_proc_tx); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->phy_proc_tx); + } return; } } -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->ulsch_encoding_stats); -LOG_DEBUG_END + if(LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->ulsch_encoding_stats); + } } if (abstraction_flag == 0) { @@ -1817,13 +1816,13 @@ LOG_DEBUG_END T(T_UE_PHY_PUSCH_TX_POWER, T_INT(eNB_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)); -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - 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_DEBUG_END -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->ulsch_modulation_stats); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { + 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); + } + if (LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->ulsch_modulation_stats); + } ulsch_modulation(ue->common_vars.txdataF, tx_amp, frame_tx, @@ -1840,9 +1839,9 @@ LOG_DEBUG_END nb_rb, aa); -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->ulsch_modulation_stats); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->ulsch_modulation_stats); + } } @@ -2219,18 +2218,18 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin } -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - 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(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti), - T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->current_harq_pid)); + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { + 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(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti), + T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][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(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti), + T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][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(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti), - T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->current_harq_pid)); - } -LOG_DEBUG_END generate_pucch1x(ue->common_vars.txdataF, &ue->frame_parms, @@ -2268,15 +2267,15 @@ LOG_DEBUG_END #endif T(T_UE_PHY_PUCCH_TX_POWER, T_INT(eNB_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[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->g_pucch),T_INT(get_PL(ue->Mod_id,ue->CC_id,eNB_id))); -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - LOG_D(PHY,"[UE %d][RNTI %x] AbsSubFrame %d.%d Generating PUCCH 2 (RI or CQI), Po_PUCCH %d, isShortenPucch %d, amp %d\n", - Mod_id, - ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti, - frame_tx%1024, subframe_tx, - Po_PUCCH, - isShortenPucch, - tx_amp); -LOG_DEBUG_END + if( LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { + LOG_D(PHY,"[UE %d][RNTI %x] AbsSubFrame %d.%d Generating PUCCH 2 (RI or CQI), Po_PUCCH %d, isShortenPucch %d, amp %d\n", + Mod_id, + ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti, + frame_tx%1024, subframe_tx, + Po_PUCCH, + isShortenPucch, + tx_amp); + } generate_pucch2x(ue->common_vars.txdataF, &ue->frame_parms, ue->ncs_cell, @@ -2354,9 +2353,9 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,ui ue->generate_ul_signal[eNB_id] = 0; -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->phy_proc_tx); -LOG_DEBUG_END + if ( LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->phy_proc_tx); + } ue->tx_power_dBm[subframe_tx]=-127; @@ -2449,9 +2448,9 @@ LOG_DEBUG_END LOG_D(PHY,"****** end TX-Chain for AbsSubframe %d.%d ******\n", frame_tx, subframe_tx); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX, VCD_FUNCTION_OUT); -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->phy_proc_tx); -LOG_DEBUG_END + if ( LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->phy_proc_tx); + } } void phy_procedures_UE_S_TX(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t abstraction_flag) @@ -2693,40 +2692,36 @@ void ue_pbch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, uin } -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { - LOG_UI(PHY,"[UE %d] frame %d, subframe %d, Received PBCH (MIB): nb_antenna_ports_eNB %d, tx_ant %d, frame_tx %d. N_RB_DL %d, phich_duration %d, phich_resource %d/6!\n", - ue->Mod_id, - frame_rx, - subframe_rx, - ue->frame_parms.nb_antenna_ports_eNB, - pbch_tx_ant, - frame_tx, - ue->frame_parms.N_RB_DL, - ue->frame_parms.phich_config_common.phich_duration, - ue->frame_parms.phich_config_common.phich_resource); -LOG_DEBUG_END + LOG_UI(PHY,"[UE %d] frame %d, subframe %d, Received PBCH (MIB): nb_antenna_ports_eNB %d, tx_ant %d, frame_tx %d. N_RB_DL %d, phich_duration %d, phich_resource %d/6!\n", + ue->Mod_id, + frame_rx, + subframe_rx, + ue->frame_parms.nb_antenna_ports_eNB, + pbch_tx_ant, + frame_tx, + ue->frame_parms.N_RB_DL, + ue->frame_parms.phich_config_common.phich_duration, + ue->frame_parms.phich_config_common.phich_resource); + } } else { - /* - LOG_E(PHY,"[UE %d] frame %d, subframe %d, Error decoding PBCH!\n", - ue->Mod_id,frame_rx, subframe_rx); + if (LOG_GENFILEFLAG(DEBUG_UE_PHYPROC)) { + LOG_E(PHY,"[UE %d] frame %d, subframe %d, Error decoding PBCH!\n", + ue->Mod_id,frame_rx, subframe_rx); - LOG_I(PHY,"[UE %d] rx_offset %d\n",ue->Mod_id,ue->rx_offset); + LOG_I(PHY,"[UE %d] rx_offset %d\n",ue->Mod_id,ue->rx_offset); - LOG_M("rxsig0.m","rxs0", ue->common_vars.rxdata[0],ue->frame_parms.samples_per_tti,1,1); + LOG_M("rxsig0.m","rxs0", ue->common_vars.rxdata[0],ue->frame_parms.samples_per_tti,1,1); - LOG_M("H00.m","h00",&(ue->common_vars.dl_ch_estimates[0][0][0]),((ue->frame_parms.Ncp==0)?7:6)*(ue->frame_parms.ofdm_symbol_size),1,1); - LOG_M("H10.m","h10",&(ue->common_vars.dl_ch_estimates[0][2][0]),((ue->frame_parms.Ncp==0)?7:6)*(ue->frame_parms.ofdm_symbol_size),1,1); - - LOG_M("rxsigF0.m","rxsF0", ue->common_vars.rxdataF[0],8*ue->frame_parms.ofdm_symbol_size,1,1); - LOG_M("PBCH_rxF0_ext.m","pbch0_ext",ue->pbch_vars[0]->rxdataF_ext[0],12*4*6,1,1); - LOG_M("PBCH_rxF0_comp.m","pbch0_comp",ue->pbch_vars[0]->rxdataF_comp[0],12*4*6,1,1); - LOG_M("PBCH_rxF_llr.m","pbch_llr",ue->pbch_vars[0]->llr,(ue->frame_parms.Ncp==0) ? 1920 : 1728,1,4); - exit(-1); - */ + LOG_M("PBCH_rxF0_ext.m","pbch0_ext",ue->pbch_vars[0]->rxdataF_ext[0],12*4*6,1,1); + LOG_M("PBCH_rxF0_comp.m","pbch0_comp",ue->pbch_vars[0]->rxdataF_comp[0],12*4*6,1,1); + LOG_M("PBCH_rxF_llr.m","pbch_llr",ue->pbch_vars[0]->llr,(ue->frame_parms.Ncp==0) ? 1920 : 1728,1,4); + exit(-1); + } ue->pbch_vars[eNB_id]->pdu_errors_conseq++; ue->pbch_vars[eNB_id]->pdu_errors++; @@ -2742,12 +2737,12 @@ LOG_DEBUG_END ue->pbch_vars[eNB_id]->pdu_errors_last = ue->pbch_vars[eNB_id]->pdu_errors; } -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - LOG_UI(PHY,"[UE %d] frame %d, slot %d, PBCH errors = %d, consecutive errors = %d!\n", - ue->Mod_id,frame_rx, subframe_rx, - ue->pbch_vars[eNB_id]->pdu_errors, - ue->pbch_vars[eNB_id]->pdu_errors_conseq); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { + LOG_UI(PHY,"[UE %d] frame %d, slot %d, PBCH errors = %d, consecutive errors = %d!\n", + ue->Mod_id,frame_rx, subframe_rx, + ue->pbch_vars[eNB_id]->pdu_errors, + ue->pbch_vars[eNB_id]->pdu_errors_conseq); + } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PBCH_PROCEDURES, VCD_FUNCTION_OUT); } @@ -2767,9 +2762,9 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint LOG_D(PHY,"DCI Decoding procedure in %d.%d\n",frame_rx,subframe_rx); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PDCCH_PROCEDURES, VCD_FUNCTION_IN); -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->dlsch_rx_pdcch_stats); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->dlsch_rx_pdcch_stats); + } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH, VCD_FUNCTION_IN); rx_pdcch(ue, @@ -2896,17 +2891,17 @@ LOG_DEBUG_END ue->dlsch_received[eNB_id]++; -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - 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[ue->current_thread_id[subframe_rx]][eNB_id][0]->active); -LOG_DEBUG_END + if ( LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { + 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[ue->current_thread_id[subframe_rx]][eNB_id][0]->active); + } // we received a CRNTI, so we're in PUSCH if (ue->UE_mode[eNB_id] != PUSCH) { -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { 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); -LOG_DEBUG_END + } //dump_dci(&ue->frame_parms, &dci_alloc_rx[i]); ue->UE_mode[eNB_id] = PUSCH; @@ -2921,9 +2916,9 @@ LOG_DEBUG_END ((dci_alloc_rx[i].format == format1A) || (dci_alloc_rx[i].format == format1C))) { -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - LOG_D(PHY,"[UE %d] subframe %d: Found rnti %x, format 1%s, dci_cnt %d\n",ue->Mod_id,subframe_rx,dci_alloc_rx[i].rnti,dci_alloc_rx[i].format==format1A?"A":"C",i); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { + LOG_D(PHY,"[UE %d] subframe %d: Found rnti %x, format 1%s, dci_cnt %d\n",ue->Mod_id,subframe_rx,dci_alloc_rx[i].rnti,dci_alloc_rx[i].format==format1A?"A":"C",i); + } if (generate_ue_dlsch_params_from_dci(frame_rx, subframe_rx, @@ -2952,9 +2947,9 @@ LOG_DEBUG_END else if ((dci_alloc_rx[i].rnti == P_RNTI) && ((dci_alloc_rx[i].format == format1A) || (dci_alloc_rx[i].format == format1C))) { -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - LOG_D(PHY,"[UE %d] subframe %d: Found rnti %x, format 1%s, dci_cnt %d\n",ue->Mod_id,subframe_rx,dci_alloc_rx[i].rnti,dci_alloc_rx[i].format==format1A?"A":"C",i); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { + LOG_D(PHY,"[UE %d] subframe %d: Found rnti %x, format 1%s, dci_cnt %d\n",ue->Mod_id,subframe_rx,dci_alloc_rx[i].rnti,dci_alloc_rx[i].format==format1A?"A":"C",i); + } if (generate_ue_dlsch_params_from_dci(frame_rx, @@ -2984,9 +2979,9 @@ LOG_DEBUG_END (dci_alloc_rx[i].rnti == ue->prach_resources[eNB_id]->ra_RNTI) && (dci_alloc_rx[i].format == format1A)) { -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - LOG_D(PHY,"[UE %d][RAPROC] subframe %d: Found RA rnti %x, format 1A, dci_cnt %d\n",ue->Mod_id,subframe_rx,dci_alloc_rx[i].rnti,i); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { + LOG_D(PHY,"[UE %d][RAPROC] subframe %d: Found RA rnti %x, format 1A, dci_cnt %d\n",ue->Mod_id,subframe_rx,dci_alloc_rx[i].rnti,i); + } if (generate_ue_dlsch_params_from_dci(frame_rx, @@ -3005,20 +3000,20 @@ LOG_DEBUG_END ue->transmission_mode[eNB_id]<7?0:ue->transmission_mode[eNB_id], 0)==0) { - ue->dlsch_ra_received[eNB_id]++; + ue->dlsch_ra_received[eNB_id]++; -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - LOG_D(PHY,"[UE %d] Generate UE DLSCH RA_RNTI format 1A, rb_alloc %x, dlsch_ra[eNB_id] %p\n", - ue->Mod_id,ue->dlsch_ra[eNB_id]->harq_processes[0]->rb_alloc_even[0],ue->dlsch_ra[eNB_id]); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { + LOG_D(PHY,"[UE %d] Generate UE DLSCH RA_RNTI format 1A, rb_alloc %x, dlsch_ra[eNB_id] %p\n", + ue->Mod_id,ue->dlsch_ra[eNB_id]->harq_processes[0]->rb_alloc_even[0],ue->dlsch_ra[eNB_id]); + } } } else if( (dci_alloc_rx[i].rnti == ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->crnti) && (dci_alloc_rx[i].format == format0)) { -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - LOG_D(PHY,"[UE %d][PUSCH] Frame %d subframe %d: Found rnti %x, format 0, dci_cnt %d\n", - ue->Mod_id,frame_rx,subframe_rx,dci_alloc_rx[i].rnti,i); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { + LOG_D(PHY,"[UE %d][PUSCH] Frame %d subframe %d: Found rnti %x, format 0, dci_cnt %d\n", + ue->Mod_id,frame_rx,subframe_rx,dci_alloc_rx[i].rnti,i); + } ue->ulsch_no_allocation_counter[eNB_id] = 0; //dump_dci(&ue->frame_parms,&dci_alloc_rx[i]); @@ -3036,42 +3031,41 @@ LOG_DEBUG_END CBA_RNTI, eNB_id, 0)==0)) { -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { - LOG_USEDINLOG_VAR(int8_t,harq_pid) = subframe2harq_pid(&ue->frame_parms, - pdcch_alloc2ul_frame(&ue->frame_parms,proc->frame_rx,proc->subframe_rx), - pdcch_alloc2ul_subframe(&ue->frame_parms,proc->subframe_rx)); - T(T_UE_PHY_ULSCH_UE_DCI, T_INT(eNB_id), T_INT(proc->frame_rx%1024), T_INT(proc->subframe_rx), - T_INT(dci_alloc_rx[i].rnti), - T_INT(harq_pid), - T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->mcs), - T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->round), - T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->first_rb), - T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->nb_rb), - T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->TBS)); - - LOG_D(PHY,"[UE %d] Generate UE ULSCH C_RNTI format 0 (subframe %d)\n",ue->Mod_id,subframe_rx); -LOG_DEBUG_END + LOG_USEDINLOG_VAR(int8_t,harq_pid) = subframe2harq_pid(&ue->frame_parms, + pdcch_alloc2ul_frame(&ue->frame_parms,proc->frame_rx,proc->subframe_rx), + pdcch_alloc2ul_subframe(&ue->frame_parms,proc->subframe_rx)); + T(T_UE_PHY_ULSCH_UE_DCI, T_INT(eNB_id), T_INT(proc->frame_rx%1024), T_INT(proc->subframe_rx), + T_INT(dci_alloc_rx[i].rnti), + T_INT(harq_pid), + T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->mcs), + T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->round), + T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->first_rb), + T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->nb_rb), + T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->TBS)); + LOG_D(PHY,"[UE %d] Generate UE ULSCH C_RNTI format 0 (subframe %d)\n",ue->Mod_id,subframe_rx); + } } } else if( (dci_alloc_rx[i].rnti == ue->ulsch[eNB_id]->cba_rnti[0]) && (dci_alloc_rx[i].format == format0)) { // UE could belong to more than one CBA group // ue->Mod_id%ue->ulsch[eNB_id]->num_active_cba_groups] -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - LOG_D(PHY,"[UE %d][PUSCH] Frame %d subframe %d: Found cba rnti %x, format 0, dci_cnt %d\n", - ue->Mod_id,frame_rx,subframe_rx,dci_alloc_rx[i].rnti,i); + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { + LOG_D(PHY,"[UE %d][PUSCH] Frame %d subframe %d: Found cba rnti %x, format 0, dci_cnt %d\n", + ue->Mod_id,frame_rx,subframe_rx,dci_alloc_rx[i].rnti,i); /* if (((frame_rx%100) == 0) || (frame_rx < 20)) dump_dci(&ue->frame_parms, &dci_alloc_rx[i]); */ -LOG_DEBUG_END + } ue->ulsch_no_allocation_counter[eNB_id] = 0; //dump_dci(&ue->frame_parms,&dci_alloc_rx[i]); if ((ue->UE_mode[eNB_id] > PRACH) && - (generate_ue_ulsch_params_from_dci((void *)&dci_alloc_rx[i].dci_pdu, + (generate_ue_ulsch_params_from_dci((void *)&dci_alloc_rx[i].dci_pdu, ue->ulsch[eNB_id]->cba_rnti[0], subframe_rx, format0, @@ -3084,28 +3078,28 @@ LOG_DEBUG_END eNB_id, 0)==0)) { -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - LOG_D(PHY,"[UE %d] Generate UE ULSCH CBA_RNTI format 0 (subframe %d)\n",ue->Mod_id,subframe_rx); -LOG_DEBUG_END - ue->ulsch[eNB_id]->num_cba_dci[(subframe_rx+4)%10]++; + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { + LOG_D(PHY,"[UE %d] Generate UE ULSCH CBA_RNTI format 0 (subframe %d)\n",ue->Mod_id,subframe_rx); + } + ue->ulsch[eNB_id]->num_cba_dci[(subframe_rx+4)%10]++; } } else { -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - 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[ue->current_thread_id[subframe_rx]][eNB_id]->crnti, - ue->ulsch[eNB_id]->cba_rnti[0], + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { + 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[ue->current_thread_id[subframe_rx]][eNB_id]->crnti, + ue->ulsch[eNB_id]->cba_rnti[0], dci_alloc_rx[i].format); // dump_dci(&ue->frame_parms, &dci_alloc_rx[i]); -LOG_DEBUG_END + } } } -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->dlsch_rx_pdcch_stats); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->dlsch_rx_pdcch_stats); + } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PDCCH_PROCEDURES, VCD_FUNCTION_OUT); return(0); } @@ -3207,14 +3201,15 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs ue->dlsch_MCH[0]->max_turbo_iterations, ue->dlsch_MCH[0]->harq_processes[0]->G); dump_mch(ue,0,ue->dlsch_MCH[0]->harq_processes[0]->G,subframe_rx); -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) + + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { - for (int i=0; idlsch_MCH[0]->harq_processes[0]->TBS>>3; i++) { - LOG_T(PHY,"%02x.",ue->dlsch_MCH[0]->harq_processes[0]->c[0][i]); - } + for (int i=0; idlsch_MCH[0]->harq_processes[0]->TBS>>3; i++) { + LOG_T(PHY,"%02x.",ue->dlsch_MCH[0]->harq_processes[0]->c[0][i]); + } - LOG_T(PHY,"\n"); -LOG_DEBUG_END + LOG_T(PHY,"\n"); + } // if (subframe_rx==9) @@ -3345,12 +3340,12 @@ void ue_pdsch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, PDSC else first_symbol_flag = 0; -LOG_DEBUG_BEGIN(UE_TIMING) - uint8_t slot = 0; - if(m >= ue->frame_parms.symbols_per_tti>>1) + if (LOG_DEBUGFLAG(UE_TIMING)) { + uint8_t slot = 0; + if(m >= ue->frame_parms.symbols_per_tti>>1) slot = 1; - start_meas(&ue->dlsch_llr_stats_parallelization[ue->current_thread_id[subframe_rx]][slot]); -LOG_DEBUG_END + start_meas(&ue->dlsch_llr_stats_parallelization[ue->current_thread_id[subframe_rx]][slot]); + } // process DLSCH received in first slot rx_pdsch(ue, pdsch, @@ -3363,13 +3358,13 @@ LOG_DEBUG_END dual_stream_UE, i_mod, dlsch0->current_harq_pid); -LOG_DEBUG_BEGIN(UE_TIMING) - uint8_t slot = 0; - if(m >= ue->frame_parms.symbols_per_tti>>1) - slot = 1; - stop_meas(&ue->dlsch_llr_stats_parallelization[ue->current_thread_id[subframe_rx]][slot]); - LOG_UI(PHY, "[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f \n",proc->frame_rx,subframe_rx,m,ue->dlsch_llr_stats_parallelization[ue->current_thread_id[subframe_rx]][slot].p_time/(cpuf*1000.0)); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + uint8_t slot = 0; + if(m >= ue->frame_parms.symbols_per_tti>>1) + slot = 1; + stop_meas(&ue->dlsch_llr_stats_parallelization[ue->current_thread_id[subframe_rx]][slot]); + LOG_UI(PHY, "[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f \n",proc->frame_rx,subframe_rx,m,ue->dlsch_llr_stats_parallelization[ue->current_thread_id[subframe_rx]][slot].p_time/(cpuf*1000.0)); + } @@ -3564,9 +3559,9 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, frame_rx, subframe_rx, ue->transmission_mode[eNB_id]<7?0:ue->transmission_mode[eNB_id]); -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->dlsch_unscrambling_stats); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->dlsch_unscrambling_stats); + } dlsch_unscrambling(&ue->frame_parms, 0, dlsch0, @@ -3574,9 +3569,9 @@ LOG_DEBUG_END pdsch_vars->llr[0], 0, subframe_rx<<1); -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->dlsch_unscrambling_stats); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->dlsch_unscrambling_stats); + } LOG_D(PHY," ------ start turbo decoder for AbsSubframe %d.%d / %d ------ \n", frame_rx, subframe_rx, harq_pid); LOG_D(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); @@ -3587,9 +3582,9 @@ LOG_DEBUG_END LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> Kmimo %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->Kmimo); LOG_D(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[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols); -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]]); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]]); + } ret = dlsch_decoding(ue, pdsch_vars->llr[0], &ue->frame_parms, @@ -3601,14 +3596,14 @@ LOG_DEBUG_END pdsch==PDSCH?1:0, dlsch0->harq_processes[harq_pid]->TBS>256?1:0); -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]]); - LOG_UI(PHY, " --> Unscrambling for CW0 %5.3f\n", - (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); - LOG_UI(PHY, "AbsSubframe %d.%d --> Turbo Decoding for CW0 %5.3f\n", - frame_rx%1024, subframe_rx,(ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]].p_time)/(cpuf*1000.0)); + if (LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]]); + LOG_UI(PHY, " --> Unscrambling for CW0 %5.3f\n", + (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); + LOG_UI(PHY, "AbsSubframe %d.%d --> Turbo Decoding for CW0 %5.3f\n", + frame_rx%1024, subframe_rx,(ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]].p_time)/(cpuf*1000.0)); -LOG_DEBUG_END + } if(is_cw1_active) { // start turbo decode for CW 1 @@ -3621,9 +3616,9 @@ LOG_DEBUG_END frame_rx, subframe_rx, ue->transmission_mode[eNB_id]<7?0:ue->transmission_mode[eNB_id]); -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->dlsch_unscrambling_stats); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->dlsch_unscrambling_stats); + } dlsch_unscrambling(&ue->frame_parms, 0, dlsch1, @@ -3631,9 +3626,9 @@ LOG_DEBUG_END pdsch_vars->llr[1], 1, subframe_rx<<1); -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->dlsch_unscrambling_stats); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->dlsch_unscrambling_stats); + } LOG_D(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_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> rb_alloc_even %x \n", frame_rx, subframe_rx, harq_pid, (uint16_t)((intptr_t)dlsch1->harq_processes[harq_pid]->rb_alloc_even)); @@ -3643,9 +3638,9 @@ LOG_DEBUG_END LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> Kmimo %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->Kmimo); LOG_D(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[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols); -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]]); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]]); + } ret1 = dlsch_decoding(ue, pdsch_vars->llr[1], @@ -3658,13 +3653,13 @@ LOG_DEBUG_END pdsch==PDSCH?1:0, dlsch1->harq_processes[harq_pid]->TBS>256?1:0); -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]]); - LOG_UI(PHY, " --> Unscrambling for CW1 %5.3f\n", - (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); - LOG_UI(PHY, "AbsSubframe %d.%d --> Turbo Decoding for CW1 %5.3f\n", - frame_rx%1024, subframe_rx,(ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]].p_time)/(cpuf*1000.0)); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]]); + LOG_UI(PHY, " --> Unscrambling for CW1 %5.3f\n", + (ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0)); + LOG_UI(PHY, "AbsSubframe %d.%d --> Turbo Decoding for CW1 %5.3f\n", + frame_rx%1024, subframe_rx,(ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]].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[ue->current_thread_id[subframe_rx]].p_time)/(cpuf*1000.0)); @@ -3703,15 +3698,15 @@ LOG_DEBUG_END dlsch0->harq_processes[harq_pid]->TBS); } -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - int j; - LOG_D(PHY,"dlsch harq_pid %d (rx): \n",dlsch0->current_harq_pid); + if ( LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)){ + int j; + LOG_D(PHY,"dlsch harq_pid %d (rx): \n",dlsch0->current_harq_pid); - for (j=0; jharq_processes[dlsch0->current_harq_pid]->TBS>>3; j++) - LOG_T(PHY,"%x.",dlsch0->harq_processes[dlsch0->current_harq_pid]->b[j]); + for (j=0; jharq_processes[dlsch0->current_harq_pid]->TBS>>3; j++) + LOG_T(PHY,"%x.",dlsch0->harq_processes[dlsch0->current_harq_pid]->b[j]); - LOG_T(PHY,"\n"); -LOG_DEBUG_END + LOG_T(PHY,"\n"); + } if (ue->mac_enabled == 1) { @@ -3804,26 +3799,26 @@ LOG_DEBUG_END } } -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d: PDSCH/DLSCH decoding iter %d (mcs %d, rv %d, TBS %d)\n", - ue->Mod_id, - dlsch0->rnti,harq_pid, - frame_rx,subframe_rx,ret, - dlsch0->harq_processes[harq_pid]->mcs, - dlsch0->harq_processes[harq_pid]->rvidx, - dlsch0->harq_processes[harq_pid]->TBS); + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { + LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d: PDSCH/DLSCH decoding iter %d (mcs %d, rv %d, TBS %d)\n", + ue->Mod_id, + dlsch0->rnti,harq_pid, + frame_rx,subframe_rx,ret, + dlsch0->harq_processes[harq_pid]->mcs, + dlsch0->harq_processes[harq_pid]->rvidx, + dlsch0->harq_processes[harq_pid]->TBS); + + if (frame_rx%100==0) { + LOG_D(PHY,"[UE %d][PDSCH %x] Frame %d subframe %d dlsch_errors %d, dlsch_received %d, dlsch_fer %d, current_dlsch_cqi %d\n", + ue->Mod_id,dlsch0->rnti, + frame_rx,subframe_rx, + ue->dlsch_errors[eNB_id], + ue->dlsch_received[eNB_id], + ue->dlsch_fer[eNB_id], + ue->measurements.wideband_cqi_tot[eNB_id]); + } - if (frame_rx%100==0) { - LOG_D(PHY,"[UE %d][PDSCH %x] Frame %d subframe %d dlsch_errors %d, dlsch_received %d, dlsch_fer %d, current_dlsch_cqi %d\n", - ue->Mod_id,dlsch0->rnti, - frame_rx,subframe_rx, - ue->dlsch_errors[eNB_id], - ue->dlsch_received[eNB_id], - ue->dlsch_fer[eNB_id], - ue->measurements.wideband_cqi_tot[eNB_id]); - } - -LOG_DEBUG_END + } /*LOG_DEBUGFLAG(DEBUG_UE_PHYPROC) */ } @@ -3909,9 +3904,9 @@ void *UE_thread_slot1_dl_processing(void *arg) { } /**** Slot1 FE Processing ****/ -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][1]); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][1]); + } // I- start dl slot1 processing // do first symbol of next downlink subframe for channel estimation /* @@ -3936,9 +3931,9 @@ LOG_DEBUG_END { //if( (l != pilot0) && (l != pilot1)) { -LOG_DEBUG_BEGIN(UE_TIMING) + if (LOG_DEBUGFLAG(UE_TIMING)) { start_meas(&ue->ofdm_demod_stats); -LOG_DEBUG_END + } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_IN); //printf("AbsSubframe %d.%d FFT slot %d, symbol %d\n", frame_rx,subframe_rx,slot1,l); front_end_fft(ue, @@ -3947,9 +3942,9 @@ LOG_DEBUG_END 0, 0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_OUT); -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->ofdm_demod_stats); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->ofdm_demod_stats); + } } } // for l=1..l2 @@ -4002,11 +3997,10 @@ LOG_DEBUG_END //printf(" [slot1 dl processing] ==> Start LLR Comuptation slot1 for AbsSubframe %d.%d \n", proc->frame_rx, proc->subframe_rx); -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][1]); - LOG_UI(PHY, "[AbsSFN %d.%d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][1].p_time/(cpuf*1000.0)); - -LOG_DEBUG_END + if ( LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][1]); + LOG_UI(PHY, "[AbsSFN %d.%d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][1].p_time/(cpuf*1000.0)); + } //wait until pdcch is decoded @@ -4025,9 +4019,9 @@ LOG_DEBUG_END //printf("AbsSubframe %d.%d Pdsch Procedure (slot1)\n",frame_rx,subframe_rx); -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][1]); -LOG_DEBUG_END + if ( LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][1]); + } // start slave thread for Pdsch Procedure (slot1) // do procedures for C-RNTI uint8_t eNB_id = 0; @@ -4097,10 +4091,10 @@ LOG_DEBUG_END proc->llr_slot1_available=1; //printf("Set available LLR slot1 to 1 AbsSubframe %d.%d \n",frame_rx,subframe_rx); -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][1]); - LOG_UI(PHY, "[AbsSFN %d.%d] Slot1: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][1].p_time/(cpuf*1000.0)); -LOG_DEBUG_END + if ( LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][1]); + LOG_UI(PHY, "[AbsSFN %d.%d] Slot1: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][1].p_time/(cpuf*1000.0)); + } if (pthread_mutex_lock(&proc->mutex_slot1_dl_processing) != 0) { @@ -4144,14 +4138,14 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr // start timers -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - LOG_D(PHY," ****** start RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, subframe_rx); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { + LOG_D(PHY," ****** start RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, subframe_rx); + } -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->phy_proc_rx[ue->current_thread_id[subframe_rx]]); - start_meas(&ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]]); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->phy_proc_rx[ue->current_thread_id[subframe_rx]]); + start_meas(&ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]]); + } pmch_flag = is_pmch_subframe(frame_rx,subframe_rx,&ue->frame_parms) ? 1 : 0; @@ -4170,10 +4164,10 @@ LOG_DEBUG_END ue->dlsch_ra[eNB_id]->active = 0; } -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - LOG_D(PHY,"[UE %d] Frame %d subframe %d: Doing phy_procedures_UE_RX\n", - ue->Mod_id,frame_rx, subframe_rx); -LOG_DEBUG_END + if ( LOG_DEBUG_FLAG(DEBUG_UE_PHYPROC)) { + LOG_D(PHY,"[UE %d] Frame %d subframe %d: Doing phy_procedures_UE_RX\n", + ue->Mod_id,frame_rx, subframe_rx); + } @@ -4247,9 +4241,9 @@ LOG_DEBUG_END /**** Slot0 FE Processing ****/ // I- start main thread for FFT/ChanEst symbol: 0/1 --> 7 -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0]); -LOG_DEBUG_END + if ( LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0]); + } // 1- perform FFT for pilot ofdm symbols first (ofdmSym7 ofdmSym4 or (ofdmSym6 ofdmSym3)) //printf("AbsSubframe %d.%d FFT slot %d, symbol %d\n", frame_rx,subframe_rx,slot1,pilot0); front_end_fft(ue, @@ -4282,9 +4276,9 @@ LOG_DEBUG_END if( (l != pilot0) && (l != pilot1)) { //printf("AbsSubframe %d.%d FFT slot %d, symbol %d\n", frame_rx,subframe_rx,slot0,l); -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->ofdm_demod_stats); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->ofdm_demod_stats); + } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_IN); front_end_fft(ue, l, @@ -4292,9 +4286,9 @@ LOG_DEBUG_END 0, 0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_OUT); -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->ofdm_demod_stats); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->ofdm_demod_stats); + } } } // for l=1..l2 @@ -4313,32 +4307,32 @@ LOG_DEBUG_END } if (do_pdcch_flag) { -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]]); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]]); + } if (ue_pdcch_procedures(eNB_id,ue,proc,abstraction_flag) == -1) { LOG_E(PHY,"[UE %d] Frame %d, subframe %d: Error in pdcch procedures\n",ue->Mod_id,frame_rx,subframe_rx); -LOG_DEBUG_BEGIN(UE_TIMING) + if (LOG_DEBUGFLAG(UE_TIMING)) { LOG_UI(PHY, "[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0)); -LOG_DEBUG_END + } //proc->dci_slot0_available = 1; return(-1); } //proc->dci_slot0_available=1; -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]]); - LOG_UI(PHY, "[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0)); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]]); + LOG_UI(PHY, "[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0)); + } } //printf("num_pdcch_symbols %d\n",ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols); // first slot has been processed (FFTs + Channel Estimation, PCFICH/PHICH/PDCCH) -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0]); - LOG_UI(PHY, "[AbsSFN %d.%d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0)); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0]); + LOG_UI(PHY, "[AbsSFN %d.%d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0)); + } //wait until slot1 FE is done uint32_t wait = 0; @@ -4348,10 +4342,10 @@ LOG_DEBUG_END wait++; } -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]]); - LOG_UI(PHY, "[AbsSFN %d.%d] FULL FE Processing %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0)); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]]); + LOG_UI(PHY, "[AbsSFN %d.%d] FULL FE Processing %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0)); + } /**** End Subframe FE Processing ****/ @@ -4365,13 +4359,13 @@ LOG_DEBUG_END //printf("AbsSubframe %d.%d Pdsch Procedure (slot0)\n",frame_rx%1024,subframe_rx); //printf("AbsSubframe %d.%d Pdsch Procedure PDSCH Active %d \n",frame_rx%1024,subframe_rx, ue->dlsch[ue->current_thread_id[subframe_rx]][0][0]->active); -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]]); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]]); + } -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][0]); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][0]); + } if (ue->dlsch[ue->current_thread_id[subframe_rx]][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, @@ -4437,10 +4431,10 @@ LOG_DEBUG_END //printf("Set available dci slot0 to 1 AbsSubframe %d.%d \n",frame_rx%1024,subframe_rx); -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][0]); - LOG_UI(PHY, "[AbsSFN %d.%d] Slot0: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0)); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)){ + stop_meas(&ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][0]); + LOG_UI(PHY, "[AbsSFN %d.%d] Slot0: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0)); + } //wait until LLR Slot1 is done @@ -4453,16 +4447,16 @@ LOG_DEBUG_END -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]]); - LOG_UI(PHY, "[AbsSFN %d.%d] Full LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0)); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)){ + stop_meas(&ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]]); + LOG_UI(PHY, "[AbsSFN %d.%d] Full LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0)); + } //=====================================================================// -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)){ + start_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]); + } LOG_D(PHY,"==> Start Turbo Decoder active dlsch %d SI %d RA %d \n",ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->active, ue->dlsch_SI[eNB_id]->active, @@ -4524,10 +4518,10 @@ LOG_DEBUG_END ue->dlsch_ra[eNB_id]->active = 0; } -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]); - LOG_UI(PHY, "[AbsSFN %d.%d] Channel Decoder: %5.2f \n",frame_rx,subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0)); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING) + stop_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]); + LOG_UI(PHY, "[AbsSFN %d.%d] Channel Decoder: %5.2f \n",frame_rx,subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0)); + } // duplicate harq structure uint8_t current_harq_pid = ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->current_harq_pid; @@ -4587,10 +4581,10 @@ LOG_DEBUG_END VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT); -LOG_DEBUG_BEGIN(UE_TIMING) + if (LOG_DEBUGFLAG(UE_TIMING)){ stop_meas(&ue->phy_proc_rx[ue->current_thread_id[subframe_rx]]); LOG_UI(PHY, "------FULL RX PROC [AbsSFN %d.%d]: %5.2f ------\n",frame_rx,subframe_rx,ue->phy_proc_rx[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0)); -LOG_DEBUG_END + } LOG_D(PHY," ****** end RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, subframe_rx); return (0); @@ -4626,14 +4620,14 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id, // start timers -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - LOG_I(PHY," ****** start RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, subframe_rx); -LOG_DEBUG_END + if ( LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { + LOG_I(PHY," ****** start RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, subframe_rx); + } -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->phy_proc_rx[ue->current_thread_id[subframe_rx]]); - start_meas(&ue->generic_stat); -LOG_DEBUG_END + if(LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->phy_proc_rx[ue->current_thread_id[subframe_rx]]); + start_meas(&ue->generic_stat); + } pmch_flag = is_pmch_subframe(frame_rx,subframe_rx,&ue->frame_parms) ? 1 : 0; @@ -4652,10 +4646,10 @@ LOG_DEBUG_END ue->dlsch_ra[eNB_id]->active = 0; } -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - LOG_D(PHY,"[UE %d] Frame %d subframe %d: Doing phy_procedures_UE_RX\n", - ue->Mod_id,frame_rx, subframe_rx); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { + LOG_D(PHY,"[UE %d] Frame %d subframe %d: Doing phy_procedures_UE_RX\n", + ue->Mod_id,frame_rx, subframe_rx); + } if (ue->frame_parms.Ncp == 0) { // normal prefix pilot1 = 4; @@ -4689,9 +4683,9 @@ LOG_DEBUG_END 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) { -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->ofdm_demod_stats); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->ofdm_demod_stats); + } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_IN); slot_fep(ue, l, @@ -4700,9 +4694,9 @@ LOG_DEBUG_END 0, 0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_OUT); -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->ofdm_demod_stats); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->ofdm_demod_stats); + } } ue_measurement_procedures(l-1,ue,proc,eNB_id,(subframe_rx<<1),abstraction_flag,mode); @@ -4743,16 +4737,16 @@ LOG_DEBUG_END 0); // first slot has been processed (FFTs + Channel Estimation, PCFICH/PHICH/PDCCH) -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->generic_stat); - LOG_UI(PHY, "[SFN %d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0)); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->generic_stat); + LOG_UI(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_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->generic_stat); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->generic_stat); + } // do procedures for C-RNTI if (ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->active == 1) { VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN); @@ -4822,9 +4816,9 @@ LOG_DEBUG_END 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) { -LOG_DEBUG_BEGIN(UE_TIMING) + if (LOG_DEBUGFLAG(UE_TIMING)) { start_meas(&ue->ofdm_demod_stats); -LOG_DEBUG_END + } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_IN); slot_fep(ue, l, @@ -4833,9 +4827,9 @@ LOG_DEBUG_END 0, 0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_OUT); -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->ofdm_demod_stats); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->ofdm_demod_stats); + } } ue_measurement_procedures(l-1,ue,proc,eNB_id,1+(subframe_rx<<1),abstraction_flag,mode); @@ -4854,10 +4848,10 @@ LOG_DEBUG_END 0); } } // not an S-subframe -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->generic_stat); - LOG_UI(PHY, "[SFN %d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0)); -LOG_DEBUG_END + if(LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->generic_stat); + LOG_UI(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); @@ -4872,9 +4866,9 @@ LOG_DEBUG_END LOG_D(PHY," ------ --> PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); if (ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->active == 1) { VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN); -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]]); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]]); + } ue_pdsch_procedures(ue, proc, eNB_id, @@ -4886,10 +4880,10 @@ LOG_DEBUG_END abstraction_flag); 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); -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]]); - start_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]]); + start_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]); + } ue_dlsch_procedures(ue, proc, eNB_id, @@ -4899,38 +4893,38 @@ LOG_DEBUG_END &ue->dlsch_errors[eNB_id], mode, abstraction_flag); -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]); - LOG_UI(PHY, "[SFN %d] Slot1: Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0)); - LOG_UI(PHY, "[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0)); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]); + LOG_UI(PHY, "[SFN %d] Slot1: Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0)); + LOG_UI(PHY, "[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0)); + } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT); } -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->generic_stat); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->generic_stat); + } -LOG_M_BEGIN(DEBUG_UE_PHYPROC) - if(subframe_rx==5 && ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->harq_processes[ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->current_harq_pid]->nb_rb > 20){ - //LOG_M("decoder_llr.m","decllr",dlsch_llr,G,1,0); - //LOG_M("llr.m","llr", &ue->pdsch_vars[eNB_id]->llr[0][0],(14*nb_rb*12*dlsch1_harq->Qm) - 4*(nb_rb*4*dlsch1_harq->Qm),1,0); + if (LOG_GENFILEFLAG(DEBUG_UE_PHYPROC)) { + if(subframe_rx==5 && ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->harq_processes[ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->current_harq_pid]->nb_rb > 20){ + //LOG_M("decoder_llr.m","decllr",dlsch_llr,G,1,0); + //LOG_M("llr.m","llr", &ue->pdsch_vars[eNB_id]->llr[0][0],(14*nb_rb*12*dlsch1_harq->Qm) - 4*(nb_rb*4*dlsch1_harq->Qm),1,0); - LOG_M("rxdataF0_current.m" , "rxdataF0", &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF[0][0],14*ue->frame_parms.ofdm_symbol_size,1,1); - //LOG_M("rxdataF0_previous.m" , "rxdataF0_prev_sss", &ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF[0][0],14*ue->frame_parms.ofdm_symbol_size,1,1); + LOG_M("rxdataF0_current.m" , "rxdataF0", &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF[0][0],14*ue->frame_parms.ofdm_symbol_size,1,1); + //LOG_M("rxdataF0_previous.m" , "rxdataF0_prev_sss", &ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF[0][0],14*ue->frame_parms.ofdm_symbol_size,1,1); - //LOG_M("rxdataF0_previous.m" , "rxdataF0_prev", &ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF[0][0],14*ue->frame_parms.ofdm_symbol_size,1,1); + //LOG_M("rxdataF0_previous.m" , "rxdataF0_prev", &ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF[0][0],14*ue->frame_parms.ofdm_symbol_size,1,1); - LOG_M("dl_ch_estimates.m", "dl_ch_estimates_sfn5", &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].dl_ch_estimates[0][0][0],14*ue->frame_parms.ofdm_symbol_size,1,1); - LOG_M("dl_ch_estimates_ext.m", "dl_ch_estimatesExt_sfn5", &ue->pdsch_vars[ue->current_thread_id[subframe_rx]][0]->dl_ch_estimates_ext[0][0],14*ue->frame_parms.N_RB_DL*12,1,1); - LOG_M("rxdataF_comp00.m","rxdataF_comp00", &ue->pdsch_vars[ue->current_thread_id[subframe_rx]][0]->rxdataF_comp0[0][0],14*ue->frame_parms.N_RB_DL*12,1,1); - //LOG_M("magDLFirst.m", "magDLFirst", &phy_vars_ue->pdsch_vars[ue->current_thread_id[subframe_rx]][0]->dl_ch_mag0[0][0],14*frame_parms->N_RB_DL*12,1,1); - //LOG_M("magDLSecond.m", "magDLSecond", &phy_vars_ue->pdsch_vars[ue->current_thread_id[subframe_rx]][0]->dl_ch_magb0[0][0],14*frame_parms->N_RB_DL*12,1,1); + LOG_M("dl_ch_estimates.m", "dl_ch_estimates_sfn5", &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].dl_ch_estimates[0][0][0],14*ue->frame_parms.ofdm_symbol_size,1,1); + LOG_M("dl_ch_estimates_ext.m", "dl_ch_estimatesExt_sfn5", &ue->pdsch_vars[ue->current_thread_id[subframe_rx]][0]->dl_ch_estimates_ext[0][0],14*ue->frame_parms.N_RB_DL*12,1,1); + LOG_M("rxdataF_comp00.m","rxdataF_comp00", &ue->pdsch_vars[ue->current_thread_id[subframe_rx]][0]->rxdataF_comp0[0][0],14*ue->frame_parms.N_RB_DL*12,1,1); + //LOG_M("magDLFirst.m", "magDLFirst", &phy_vars_ue->pdsch_vars[ue->current_thread_id[subframe_rx]][0]->dl_ch_mag0[0][0],14*frame_parms->N_RB_DL*12,1,1); + //LOG_M("magDLSecond.m", "magDLSecond", &phy_vars_ue->pdsch_vars[ue->current_thread_id[subframe_rx]][0]->dl_ch_magb0[0][0],14*frame_parms->N_RB_DL*12,1,1); - AssertFatal (0,""); + AssertFatal (0,""); + } } -LOG_M_END // do procedures for SI-RNTI if ((ue->dlsch_SI[eNB_id]) && (ue->dlsch_SI[eNB_id]->active == 1)) { @@ -5035,25 +5029,25 @@ LOG_M_END ue->Mod_id,frame_rx,ue->total_TBS[eNB_id], ue->total_TBS_last[eNB_id],(float) ue->bitrate[eNB_id]/1000.0); -LOG_DEBUG_BEGIN(DEBUG_UE_PHYPROC) - if ((frame_rx % 100 == 0)) { - LOG_I(PHY,"[UE %d] AUTOTEST Metric : UE_DLSCH_BITRATE = %5.2f kbps (frame = %d) \n", ue->Mod_id, (float) ue->bitrate[eNB_id]/1000.0, frame_rx); + if ( LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) { + if ((frame_rx % 100 == 0)) { + LOG_UI(PHY,"[UE %d] AUTOTEST Metric : UE_DLSCH_BITRATE = %5.2f kbps (frame = %d) \n", ue->Mod_id, (float) ue->bitrate[eNB_id]/1000.0, frame_rx); + } } -LOG_DEBUG_END } -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->generic_stat); - printf("after tubo until end of Rx %5.2f \n",ue->generic_stat.p_time/(cpuf*1000.0)); -LOG_DEBUG_END + if ( LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->generic_stat); + LOG_UI(PHY,"after tubo until end of Rx %5.2f \n",ue->generic_stat.p_time/(cpuf*1000.0)); + } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT); -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->phy_proc_rx[ue->current_thread_id[subframe_rx]]); - LOG_UI(PHY, "------FULL RX PROC [SFN %d]: %5.2f ------\n",subframe_rx,ue->phy_proc_rx[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0)); -LOG_DEBUG_END + if ( LOG_DEBUGFLAG(UE_TIMING) ) { + stop_meas(&ue->phy_proc_rx[ue->current_thread_id[subframe_rx]]); + LOG_UI(PHY, "------FULL RX PROC [SFN %d]: %5.2f ------\n",subframe_rx,ue->phy_proc_rx[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0)); + } LOG_D(PHY," ****** end RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, subframe_rx); return (0); @@ -5083,9 +5077,9 @@ void phy_procedures_UE_lte(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,u VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_LTE,1); -LOG_DEBUG_BEGIN(UE_TIMING) - start_meas(&ue->phy_proc[ue->current_thread_id[subframe_rx]]); -LOG_DEBUG_END + if ( LOG_DEBUGFLAG(UE_TIMING)) { + start_meas(&ue->phy_proc[ue->current_thread_id[subframe_rx]]); + } #if defined(ENABLE_ITTI) @@ -5168,9 +5162,9 @@ LOG_DEBUG_END } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_LTE,0); -LOG_DEBUG_BEGIN(UE_TIMING) - stop_meas(&ue->phy_proc[ue->current_thread_id[subframe_rx]]); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(UE_TIMING)) { + stop_meas(&ue->phy_proc[ue->current_thread_id[subframe_rx]]); + } } // slot } diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index 7e2f1ad2e0..559540e49d 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -2046,24 +2046,9 @@ int main(int argc, char **argv) qsort (table_rx, time_vector_rx.size, sizeof(double), &compare); if (dump_table == 1 ) { - set_component_filelog(USIM); // file located in /tmp/usim.txt - int n; - LOG_F(USIM,"The transmitter raw data: \n"); - - for (n=0; n< time_vector_tx.size; n++) { - printf("%f ", table_tx[n]); - LOG_F(USIM,"%f ", table_tx[n]); - } - - LOG_F(USIM,"\n"); - LOG_F(USIM,"The receiver raw data: \n"); - - for (n=0; n< time_vector_rx.size; n++) { - // printf("%f ", table_rx[n]); - LOG_F(USIM,"%f ", table_rx[n]); - } - - LOG_F(USIM,"\n"); + set_component_filelog(SIM); // file located in /tmp/usim.txt + LOG_UDUMPMSG(SIM,table_tx,time_vector_tx.size,LOG_DUMP_DOUBLE,"The transmitter raw data: \n"); + LOG_UDUMPMSG(SIM,table_rx,time_vector_rx.size,LOG_DUMP_DOUBLE,"Thereceiver raw data: \n"); } double tx_median = table_tx[time_vector_tx.size/2]; diff --git a/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c b/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c index 0c942df275..2176e272c8 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c @@ -5016,24 +5016,11 @@ int main(int argc, char **argv) if (dump_table == 1 ) { set_component_filelog(USIM); // file located in /tmp/usim.txt - int n; - LOG_F(USIM,"The transmitter raw data: \n"); + LOG_UDUMPMSG(RRC,(char *)table_tx,time_vector_tx.size,LOG_DUMP_DOUBLE, + "The transmitter raw data: \n"); + LOG_UDUMPMSG(RRC,(char *)table_rx,time_vector_rx.size,LOG_DUMP_DOUBLE, + "The receiver raw data: \n"); - for (n=0; n< time_vector_tx.size; n++) { - printf("%f ", table_tx[n]); - LOG_F(USIM,"%f ", table_tx[n]); - } - - LOG_F(USIM,"\n"); - LOG_F(USIM,"The receiver raw data: \n"); - - for (n=0; n< time_vector_rx.size; n++) { - // printf("%f ", table_rx[n]); - LOG_F(USIM,"%f ", table_rx[n]); - } - - LOG_F(USIM,"\n"); - } double tx_median = table_tx[time_vector_tx.size/2]; double tx_q1 = table_tx[time_vector_tx.size/4]; diff --git a/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c b/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c index b41dd5536c..570c13c0b6 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c @@ -3851,24 +3851,9 @@ PMI_FEEDBACK: qsort (table_rx, time_vector_rx.size, sizeof(double), &compare); if (dump_table == 1 ) { - set_component_filelog(USIM); // file located in /tmp/usim.txt - int n; - LOG_F(USIM,"The transmitter raw data: \n"); - - for (n=0; n< time_vector_tx.size; n++) { - printf("%f ", table_tx[n]); - LOG_F(USIM,"%f ", table_tx[n]); - } - - LOG_F(USIM,"\n"); - LOG_F(USIM,"The receiver raw data: \n"); - - for (n=0; n< time_vector_rx.size; n++) { - // printf("%f ", table_rx[n]); - LOG_F(USIM,"%f ", table_rx[n]); - } - - LOG_F(USIM,"\n"); + set_component_filelog(SIM); // file located in /tmp/usim.txt + LOG_UDUMPMSG(SIM,table_tx,time_vector_tx.size,LOG_DUMP_DOUBLE,"The transmitter raw data: \n"); + LOG_UDUMPMSG(SIM,table_rx,time_vector_rx.size,LOG_DUMP_DOUBLE,"The receiver raw data: \n"); } double tx_median = table_tx[time_vector_tx.size/2]; diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index ab7a29b096..3fcb010685 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -1491,24 +1491,9 @@ int main(int argc, char **argv) qsort (table_rx, time_vector_rx.size, sizeof(double), &compare); if (dump_table == 1 ) { - int n; set_component_filelog(SIM); // file located in /tmp/usim.txt - LOG_F(SIM,"The transmitter raw data: \n"); - - for (n=0; n< time_vector_tx.size; n++) { - // printf("%f ", table_tx[n]); - LOG_F(SIM,"%f ", table_tx[n]); - } - - LOG_F(SIM,"\n"); - LOG_F(SIM,"The receiver raw data: \n"); - - for (n=0; n< time_vector_rx.size; n++) { - // printf("%f ", table_rx[n]); - LOG_F(SIM,"%f ", table_rx[n]); - } - - LOG_F(SIM,"\n"); + LOG_UDUMPMSG(SIM,table_tx,time_vector_tx.size,LOG_DUMP_DOUBLE,"The transmitter raw data: \n"); + LOG_UDUMPMSG(SIM,table_rx,time_vector_rx.size,LOG_DUMP_DOUBLE,"The receiver raw data: \n"); } double tx_median = table_tx[time_vector_tx.size/2]; diff --git a/openair2/ENB_APP/enb_app.c b/openair2/ENB_APP/enb_app.c index 40c6aeac44..6f1b66c6d0 100644 --- a/openair2/ENB_APP/enb_app.c +++ b/openair2/ENB_APP/enb_app.c @@ -143,7 +143,7 @@ void *eNB_app_task(void *args_p) uint32_t enb_id_start = 0; uint32_t enb_id_end = enb_id_start + enb_nb; # if defined(ENABLE_USE_MME) - uint32_t register_enb_pending; + uint32_t register_enb_pending=0; uint32_t registered_enb; long enb_register_retry_timer_id; # endif @@ -182,15 +182,15 @@ void *eNB_app_task(void *args_p) configure_rrc(enb_id); } -# if defined(ENABLE_USE_MME) + if (EPC_MODE_ENABLED) { /* Try to register each eNB */ - registered_enb = 0; - register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p); -# else + registered_enb = 0; + register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p); + } else { /* Start L2L1 task */ - msg_p = itti_alloc_new_message(TASK_ENB_APP, INITIALIZE_MESSAGE); - itti_send_msg_to_task(TASK_L2L1, INSTANCE_DEFAULT, msg_p); -# endif + msg_p = itti_alloc_new_message(TASK_ENB_APP, INITIALIZE_MESSAGE); + itti_send_msg_to_task(TASK_L2L1, INSTANCE_DEFAULT, msg_p); + } do { // Wait for a message @@ -208,66 +208,68 @@ void *eNB_app_task(void *args_p) LOG_I(ENB_APP, "Received %s\n", ITTI_MSG_NAME(msg_p)); break; -# if defined(ENABLE_USE_MME) - case S1AP_REGISTER_ENB_CNF: - LOG_I(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p), - S1AP_REGISTER_ENB_CNF(msg_p).nb_mme); + if (EPC_MODE_ENABLED) { + LOG_I(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p), + S1AP_REGISTER_ENB_CNF(msg_p).nb_mme); - DevAssert(register_enb_pending > 0); - register_enb_pending--; + DevAssert(register_enb_pending > 0); + register_enb_pending--; - /* Check if at least eNB is registered with one MME */ - if (S1AP_REGISTER_ENB_CNF(msg_p).nb_mme > 0) { - registered_enb++; - } + /* Check if at least eNB is registered with one MME */ + if (S1AP_REGISTER_ENB_CNF(msg_p).nb_mme > 0) { + registered_enb++; + } - /* Check if all register eNB requests have been processed */ - if (register_enb_pending == 0) { - if (registered_enb == enb_nb) { - /* If all eNB are registered, start L2L1 task */ - MessageDef *msg_init_p; + /* Check if all register eNB requests have been processed */ + if (register_enb_pending == 0) { + if (registered_enb == enb_nb) { + /* If all eNB are registered, start L2L1 task */ + MessageDef *msg_init_p; - msg_init_p = itti_alloc_new_message (TASK_ENB_APP, INITIALIZE_MESSAGE); - itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p); + msg_init_p = itti_alloc_new_message (TASK_ENB_APP, INITIALIZE_MESSAGE); + itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p); - } else { - LOG_W(ENB_APP, " %d eNB not associated with a MME, retrying registration in %d seconds ...\n", - enb_nb - registered_enb, ENB_REGISTER_RETRY_DELAY); + } else { + LOG_W(ENB_APP, " %d eNB not associated with a MME, retrying registration in %d seconds ...\n", + enb_nb - registered_enb, ENB_REGISTER_RETRY_DELAY); - /* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */ - if (timer_setup (ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT, - NULL, &enb_register_retry_timer_id) < 0) { - LOG_E(ENB_APP, " Can not start eNB register retry timer, use \"sleep\" instead!\n"); - - sleep(ENB_REGISTER_RETRY_DELAY); - /* Restart the registration process */ - registered_enb = 0; - register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p); - } - } - } + /* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */ + if (timer_setup (ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT, + NULL, &enb_register_retry_timer_id) < 0) { + LOG_E(ENB_APP, " Can not start eNB register retry timer, use \"sleep\" instead!\n"); + sleep(ENB_REGISTER_RETRY_DELAY); + /* Restart the registration process */ + registered_enb = 0; + register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p); + } + } + } + } /*if (EPC_MODE_ENABLED) */ break; case S1AP_DEREGISTERED_ENB_IND: - LOG_W(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p), - S1AP_DEREGISTERED_ENB_IND(msg_p).nb_mme); + if (EPC_MODE_ENABLED) { + LOG_W(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p), + S1AP_DEREGISTERED_ENB_IND(msg_p).nb_mme); - /* TODO handle recovering of registration */ + /* TODO handle recovering of registration */ + } break; case TIMER_HAS_EXPIRED: - LOG_I(ENB_APP, " Received %s: timer_id %ld\n", ITTI_MSG_NAME (msg_p), TIMER_HAS_EXPIRED(msg_p).timer_id); - - if (TIMER_HAS_EXPIRED (msg_p).timer_id == enb_register_retry_timer_id) { - /* Restart the registration process */ - registered_enb = 0; - register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p); - } + if (EPC_MODE_ENABLED) { + LOG_I(ENB_APP, " Received %s: timer_id %ld\n", ITTI_MSG_NAME (msg_p), TIMER_HAS_EXPIRED(msg_p).timer_id); + if (TIMER_HAS_EXPIRED (msg_p).timer_id == enb_register_retry_timer_id) { + /* Restart the registration process */ + registered_enb = 0; + register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p); + } + } /*if (EPC_MODE_ENABLED) */ break; -# endif + default: LOG_E(ENB_APP, "Received unexpected message %s\n", ITTI_MSG_NAME (msg_p)); diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 737397d8d4..07eb5c57c7 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -37,7 +37,7 @@ #include "UTIL/OTG/otg_externs.h" #if defined(ENABLE_ITTI) # include "intertask_interface.h" -# if defined(ENABLE_USE_MME) +# if defined(ENABLE_USE_MME) # include "s1ap_eNB.h" # include "sctp_eNB_task.h" # endif @@ -198,11 +198,10 @@ void RCconfig_flexran() /* eNB ID from configuration, as read in by RCconfig_RRC() */ if (!ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr) { // Calculate a default eNB ID -# if defined(ENABLE_USE_MME) - enb_id = i + (s1ap_generate_eNB_id () & 0xFFFF8); -# else - enb_id = i; -# endif + if (EPC_MODE_ENABLED) + enb_id = i + (s1ap_generate_eNB_id () & 0xFFFF8); + else + enb_id = i; } else { enb_id = *(ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr); } @@ -546,32 +545,6 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { int32_t srb1_max_retx_threshold = 0; int32_t my_int; - - - -/* - int32_t otg_ue_id = 0; - char* otg_app_type = NULL; - char* otg_bg_traffic = NULL; - char* glog_level = NULL; - char* glog_verbosity = NULL; - char* hw_log_level = NULL; - char* hw_log_verbosity = NULL; - char* phy_log_level = NULL; - char* phy_log_verbosity = NULL; - char* mac_log_level = NULL; - char* mac_log_verbosity = NULL; - char* rlc_log_level = NULL; - char* rlc_log_verbosity = NULL; - char* pdcp_log_level = NULL; - char* pdcp_log_verbosity = NULL; - char* rrc_log_level = NULL; - char* rrc_log_verbosity = NULL; - char* udp_log_verbosity = NULL; - char* osa_log_level = NULL; - char* osa_log_verbosity = NULL; -*/ - // for no gcc warnings (void)my_int; @@ -591,15 +564,16 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { CCsParams[I].chkPptr = &(config_check_CCparams[I]); } /* get global parameters, defined outside any section in the config file */ - + config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); + num_enbs = ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt; AssertFatal (i 0) { RC.nb_CC = (int *)malloc((1+RC.nb_inst)*sizeof(int)); for (int i=0;idata)[i]); - } + LOG_DUMPMSG(PDCP,DEBUG_PDCP,(char *)pdcp_pdu_p->data,pdcp_pdu_size, + "[MSG] PDCP DL %s PDU on rb_id %d\n",(srb_flagP)? "CONTROL" : "DATA", rb_idP); - LOG_F(PDCP,"\n"); -#endif rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) ,sourceL2Id @@ -461,17 +455,8 @@ pdcp_data_ind( VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_IN); - -#ifdef PDCP_MSG_PRINT - int i=0; - LOG_F(PDCP,"[MSG] PDCP UL %s PDU on rb_id %d\n", (srb_flagP)? "CONTROL" : "DATA", rb_idP); - - for (i = 0; i < sdu_buffer_sizeP; i++) { - LOG_F(PDCP,"%02x ", ((uint8_t*)sdu_buffer_pP->data)[i]); - } - - LOG_F(PDCP,"\n"); -#endif + LOG_DUMPMSG(PDCP,DEBUG_PDCP,(char *)sdu_buffer_pP->data,sdu_buffer_sizeP, + "[MSG] PDCP UL %s PDU on rb_id %d\n", (srb_flagP)? "CONTROL" : "DATA", rb_idP); #if T_TRACER if (ctxt_pP->enb_flag != ENB_FLAG_NO) diff --git a/openair2/RRC/LTE/L2_interface.c b/openair2/RRC/LTE/L2_interface.c index a7c96a8a22..8c65e6c41c 100644 --- a/openair2/RRC/LTE/L2_interface.c +++ b/openair2/RRC/LTE/L2_interface.c @@ -43,9 +43,6 @@ #include "flexran_agent_extern.h" -//#define RRC_DATA_REQ_DEBUG -//#define DEBUG_RRC 1 - extern RAN_CONTEXT_t RC; @@ -68,10 +65,9 @@ mac_rrc_data_req( uint8_t sfn = (uint8_t)((frameP>>2)&0xff); -#ifdef DEBUG_RRC - int i; - LOG_I(RRC,"[eNB %d] mac_rrc_data_req to SRB ID=%d\n",Mod_idP,Srb_id); -#endif + if (LOG_DEBUGFLAG(DEBUG_RRC)) { + LOG_D(RRC,"[eNB %d] mac_rrc_data_req to SRB ID=%d\n",Mod_idP,Srb_id); + } eNB_RRC_INST *rrc; rrc_eNB_carrier_data_t *carrier; @@ -96,15 +92,15 @@ mac_rrc_data_req( RC.rrc[Mod_idP]->carrier[CC_id].SIB1, RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1); -#ifdef DEBUG_RRC - LOG_T(RRC,"[eNB %d] Frame %d : BCCH request => SIB 1\n",Mod_idP,frameP); + if (LOG_DEBUGFLAG(DEBUG_RRC)) { + LOG_T(RRC,"[eNB %d] Frame %d : BCCH request => SIB 1\n",Mod_idP,frameP); - for (i=0; icarrier[CC_id].sizeof_SIB1; i++) { - LOG_T(RRC,"%x.",buffer_pP[i]); - } + for (int i=0; icarrier[CC_id].sizeof_SIB1; i++) { + LOG_T(RRC,"%x.",buffer_pP[i]); + } - LOG_T(RRC,"\n"); -#endif + LOG_T(RRC,"\n"); + } /* LOG_DEBUGFLAG(DEBUG_RRC) */ return (RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1); } // All RFN mod 8 transmit SIB2-3 in SF 5 @@ -113,15 +109,15 @@ mac_rrc_data_req( RC.rrc[Mod_idP]->carrier[CC_id].SIB23, RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB23); -#ifdef DEBUG_RRC - LOG_T(RRC,"[eNB %d] Frame %d BCCH request => SIB 2-3\n",Mod_idP,frameP); + if (LOG_DEBUGFLAG(DEBUG_RRC)) { + LOG_T(RRC,"[eNB %d] Frame %d BCCH request => SIB 2-3\n",Mod_idP,frameP); - for (i=0; icarrier[CC_id].sizeof_SIB23; i++) { - LOG_T(RRC,"%x.",buffer_pP[i]); - } + for (int i=0; icarrier[CC_id].sizeof_SIB23; i++) { + LOG_T(RRC,"%x.",buffer_pP[i]); + } - LOG_T(RRC,"\n"); -#endif + LOG_T(RRC,"\n"); + } /* LOG_DEBUGFLAG(DEBUG_RRC) */ return(RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB23); } else { return(0); @@ -193,20 +189,17 @@ mac_rrc_data_req( RC.rrc[Mod_idP]->carrier[CC_id].MCCH_MESSAGE[mbsfn_sync_area], RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]); -#ifdef DEBUG_RRC - LOG_D(RRC,"[eNB %d] Frame %d : MCCH request => MCCH_MESSAGE \n",Mod_idP,frameP); + if (LOG_DEBUGFLAG(DEBUG_RRC)) { + LOG_D(RRC,"[eNB %d] Frame %d : MCCH request => MCCH_MESSAGE \n",Mod_idP,frameP); - for (i=0; icarrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]; i++) { - LOG_T(RRC,"%x.",buffer_pP[i]); - } + for (int i=0; icarrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]; i++) { + LOG_T(RRC,"%x.",buffer_pP[i]); + } - LOG_T(RRC,"\n"); -#endif + LOG_T(RRC,"\n"); + } /* LOG_DEBUGFLAG(DEBUG_RRC) */ - return (RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]); - // } - //else - //return(0); + return (RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]); } #endif // #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) diff --git a/openair2/RRC/LTE/L2_interface_ue.c b/openair2/RRC/LTE/L2_interface_ue.c index d3527b8a17..3b7219af42 100644 --- a/openair2/RRC/LTE/L2_interface_ue.c +++ b/openair2/RRC/LTE/L2_interface_ue.c @@ -42,7 +42,6 @@ #endif //#define RRC_DATA_REQ_DEBUG -//#define DEBUG_RRC 1 @@ -61,10 +60,7 @@ mac_rrc_data_req_ue( //-------------------------------------------------------------------------- { -#ifdef DEBUG_RRC - int i; - LOG_I(RRC,"[eNB %d] mac_rrc_data_req to SRB ID=%d\n",Mod_idP,Srb_id); -#endif + LOG_D(RRC,"[eNB %d] mac_rrc_data_req to SRB ID=%d\n",Mod_idP,Srb_id); #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) diff --git a/openair2/RRC/LTE/MESSAGES/asn1_msg_NB_IoT.c b/openair2/RRC/LTE/MESSAGES/asn1_msg_NB_IoT.c index cdfc1ac0f3..3ad955928a 100644 --- a/openair2/RRC/LTE/MESSAGES/asn1_msg_NB_IoT.c +++ b/openair2/RRC/LTE/MESSAGES/asn1_msg_NB_IoT.c @@ -136,7 +136,7 @@ uint8_t do_MIB_NB_IoT( carrier->MIB_NB_IoT, 100); if(enc_rval.encoded <= 0) { - LOG_F(RRC, "ASN1 message encoding failed (%s, %lu)!\n", + LOG_E(RRC, "ASN1 message encoding failed (%s, %lu)!\n", enc_rval.failed_type->name, enc_rval.encoded); } @@ -394,7 +394,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id, 100); if (enc_rval.encoded > 0){ - LOG_F(RRC,"ASN1 message encoding failed (%s, %lu)!\n", + LOG_E(RRC,"ASN1 message encoding failed (%s, %lu)!\n", enc_rval.failed_type->name, enc_rval.encoded); } @@ -897,7 +897,7 @@ uint8_t do_RRCConnectionSetup_NB_IoT( 100); if (enc_rval.encoded <= 0) { - LOG_F(RRC, "ASN1 message encoding failed (%s, %lu)!\n", + LOG_E(RRC, "ASN1 message encoding failed (%s, %lu)!\n", enc_rval.failed_type->name, enc_rval.encoded); } @@ -948,7 +948,7 @@ uint8_t do_SecurityModeCommand_NB_IoT( buffer, 100); if (enc_rval.encoded <= 0) { - LOG_F(RRC, "ASN1 message encoding failed (%s, %lu)!\n", + LOG_E(RRC, "ASN1 message encoding failed (%s, %lu)!\n", enc_rval.failed_type->name, enc_rval.encoded); } @@ -1010,7 +1010,7 @@ uint8_t do_UECapabilityEnquiry_NB_IoT( buffer, 100); if (enc_rval.encoded <= 0) { - LOG_F(RRC, "ASN1 message encoding failed (%s, %lu)!\n", + LOG_E(RRC, "ASN1 message encoding failed (%s, %lu)!\n", enc_rval.failed_type->name, enc_rval.encoded); } @@ -1105,7 +1105,7 @@ uint16_t do_RRCConnectionReconfiguration_NB_IoT( buffer, RRC_BUF_SIZE); if (enc_rval.encoded <= 0) { - LOG_F(RRC, "ASN1 message encoding failed %s, %li\n", + LOG_E(RRC, "ASN1 message encoding failed %s, %li\n", enc_rval.failed_type->name, enc_rval.encoded); } @@ -1152,7 +1152,7 @@ uint8_t do_RRCConnectionReestablishmentReject_NB_IoT( buffer, 100); if (enc_rval.encoded <= 0) { - LOG_F(RRC,"ASN1 message encoding failed (%s, %lu)!\n", + LOG_E(RRC,"ASN1 message encoding failed (%s, %lu)!\n", enc_rval.failed_type->name, enc_rval.encoded); } @@ -1223,7 +1223,7 @@ uint8_t do_RRCConnectionReject_NB_IoT( buffer, 100); if (enc_rval.encoded <= 0) { - LOG_F(RRC, "ASN1 message encoding failed (%s, %ld)!\n", + LOG_E(RRC, "ASN1 message encoding failed (%s, %ld)!\n", enc_rval.failed_type->name, enc_rval.encoded); } @@ -1351,7 +1351,7 @@ uint8_t do_RRCConnectionReestablishment_NB_IoT( RRC_BUF_SIZE); if (enc_rval.encoded <= 0) { - LOG_F(RRC, "ASN1 message encoding failed (%s, %li)!\n", + LOG_E(RRC, "ASN1 message encoding failed (%s, %li)!\n", enc_rval.failed_type->name, enc_rval.encoded); } diff --git a/openair2/RRC/LTE/rrc_UE.c b/openair2/RRC/LTE/rrc_UE.c index c23bf12d52..8f25cd6287 100644 --- a/openair2/RRC/LTE/rrc_UE.c +++ b/openair2/RRC/LTE/rrc_UE.c @@ -5558,9 +5558,9 @@ void *rrc_control_socket_thread_fct(void *arg) //process the message switch (sl_ctrl_msg_recv->type) { case SESSION_INIT_REQ: -LOG_DEBUG_BEGIN(DEBUG_CTRLSOCKET) - LOG_UI(RRC,"Received SessionInitializationRequest on socket from ProSe App (msg type: %d)\n", sl_ctrl_msg_recv->type); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(DEBUG_CTRLSOCKET)){ + LOG_UI(RRC,"Received SessionInitializationRequest on socket from ProSe App (msg type: %d)\n", sl_ctrl_msg_recv->type); + } //TODO: get SL_UE_STATE from lower layer LOG_I(RRC,"Send UEStateInformation to ProSe App \n"); @@ -5579,12 +5579,12 @@ LOG_DEBUG_END exit(EXIT_FAILURE); } -LOG_DEBUG_BEGIN(DEBUG_CTRLSOCKET) - struct sidelink_ctrl_element *ptr_ctrl_msg = NULL; - ptr_ctrl_msg = (struct sidelink_ctrl_element *) send_buf; - LOG_UI(RRC,"[UEStateInformation] msg type: %d\n",ptr_ctrl_msg->type); - LOG_UI(RRC,"[UEStateInformation] UE state: %d\n",ptr_ctrl_msg->sidelinkPrimitive.ue_state); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(DEBUG_CTRLSOCKET)){ + struct sidelink_ctrl_element *ptr_ctrl_msg = NULL; + ptr_ctrl_msg = (struct sidelink_ctrl_element *) send_buf; + LOG_UI(RRC,"[UEStateInformation] msg type: %d\n",ptr_ctrl_msg->type); + LOG_UI(RRC,"[UEStateInformation] UE state: %d\n",ptr_ctrl_msg->sidelinkPrimitive.ue_state); + } /* if (enable_notification > 0) { //create thread to send status notification (for testing purpose, status notification will be sent e.g., every 20 seconds) pthread_t notification_thread; @@ -5599,12 +5599,12 @@ LOG_DEBUG_END sourceL2Id = sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.sourceL2Id; groupL2Id = sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupL2Id; -LOG_DEBUG_BEGIN(DEBUG_CTRLSOCKET) - LOG_UI(RRC,"[GroupCommunicationEstablishReq] Received on socket from ProSe App (msg type: %d)\n",sl_ctrl_msg_recv->type); - LOG_UI(RRC,"[GroupCommunicationEstablishReq] source Id: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.sourceL2Id); - LOG_UI(RRC,"[GroupCommunicationEstablishReq] group Id: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupL2Id); - LOG_UI(RRC,"[GroupCommunicationEstablishReq] group IP Address: " IPV4_ADDR "\n",IPV4_ADDR_FORMAT(sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupIpAddress)); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(DEBUG_CTRLSOCKET)){ + LOG_UI(RRC,"[GroupCommunicationEstablishReq] Received on socket from ProSe App (msg type: %d)\n",sl_ctrl_msg_recv->type); + LOG_UI(RRC,"[GroupCommunicationEstablishReq] source Id: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.sourceL2Id); + LOG_UI(RRC,"[GroupCommunicationEstablishReq] group Id: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupL2Id); + LOG_UI(RRC,"[GroupCommunicationEstablishReq] group IP Address: " IPV4_ADDR "\n",IPV4_ADDR_FORMAT(sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupIpAddress)); + } //store sourceL2Id/groupL2Id UE_rrc_inst[module_id].sourceL2Id = sourceL2Id; @@ -5764,20 +5764,20 @@ LOG_DEBUG_END exit(EXIT_FAILURE); } -LOG_DEBUG_BEGIN(DEBUG_CTRLSOCKET) - struct sidelink_ctrl_element *ptr_ctrl_msg = NULL; - ptr_ctrl_msg = (struct sidelink_ctrl_element *) send_buf; - LOG_UI(RRC,"[GroupCommunicationEstablishResponse] msg type: %d\n",ptr_ctrl_msg->type); - LOG_UI(RRC,"[GroupCommunicationEstablishResponse] slrb_id: %d\n",ptr_ctrl_msg->sidelinkPrimitive.slrb_id); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(DEBUG_CTRLSOCKET)){ + struct sidelink_ctrl_element *ptr_ctrl_msg = NULL; + ptr_ctrl_msg = (struct sidelink_ctrl_element *) send_buf; + LOG_UI(RRC,"[GroupCommunicationEstablishResponse] msg type: %d\n",ptr_ctrl_msg->type); + LOG_UI(RRC,"[GroupCommunicationEstablishResponse] slrb_id: %d\n",ptr_ctrl_msg->sidelinkPrimitive.slrb_id); + } break; case GROUP_COMMUNICATION_RELEASE_REQ: printf("-----------------------------------\n"); -LOG_DEBUG_BEGIN(DEBUG_CTRLSOCKET) - LOG_UI(RRC,"[GroupCommunicationReleaseRequest] Received on socket from ProSe App (msg type: %d)\n",sl_ctrl_msg_recv->type); - LOG_UI(RRC,"[GroupCommunicationReleaseRequest] Slrb Id: %i\n",sl_ctrl_msg_recv->sidelinkPrimitive.slrb_id); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(DEBUG_CTRLSOCKET)){ + LOG_UI(RRC,"[GroupCommunicationReleaseRequest] Received on socket from ProSe App (msg type: %d)\n",sl_ctrl_msg_recv->type); + LOG_UI(RRC,"[GroupCommunicationReleaseRequest] Slrb Id: %i\n",sl_ctrl_msg_recv->sidelinkPrimitive.slrb_id); + } //reset groupL2ID from MAC LAYER UE_rrc_inst[module_id].groupL2Id = 0x00000000; sourceL2Id = UE_rrc_inst[module_id].sourceL2Id; @@ -5849,11 +5849,11 @@ LOG_DEBUG_END sourceL2Id = sl_ctrl_msg_recv->sidelinkPrimitive.direct_comm_establish_req.sourceL2Id; destinationL2Id = sl_ctrl_msg_recv->sidelinkPrimitive.direct_comm_establish_req.destinationL2Id; -LOG_DEBUG_BEGIN(DEBUG_CTRLSOCKET) - LOG_UI(RRC,"[DirectCommunicationEstablishReq] Received on socket from ProSe App (msg type: %d)\n",sl_ctrl_msg_recv->type); - LOG_UI(RRC,"[DirectCommunicationEstablishReq] source Id: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.sourceL2Id); - LOG_UI(RRC,"[DirectCommunicationEstablishReq] destination Id: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupL2Id); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(DEBUG_CTRLSOCKET)){ + LOG_UI(RRC,"[DirectCommunicationEstablishReq] Received on socket from ProSe App (msg type: %d)\n",sl_ctrl_msg_recv->type); + LOG_UI(RRC,"[DirectCommunicationEstablishReq] source Id: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.sourceL2Id); + LOG_UI(RRC,"[DirectCommunicationEstablishReq] destination Id: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupL2Id); + } //store sourceL2Id/destinationL2Id UE_rrc_inst[module_id].sourceL2Id = sourceL2Id; @@ -6013,27 +6013,27 @@ LOG_DEBUG_END } -LOG_DEBUG_BEGIN(DEBUG_CTRLSOCKET) - struct sidelink_ctrl_element *ptr_ctrl_msg = NULL; - ptr_ctrl_msg = (struct sidelink_ctrl_element *) send_buf; - LOG_UI(RRC,"[DirectCommunicationEstablishResponse] msg type: %d\n",ptr_ctrl_msg->type); - LOG_UI(RRC,"[DirectCommunicationEstablishResponse] slrb_id: %d\n",ptr_ctrl_msg->sidelinkPrimitive.slrb_id); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(DEBUG_CTRLSOCKET)){ + struct sidelink_ctrl_element *ptr_ctrl_msg = NULL; + ptr_ctrl_msg = (struct sidelink_ctrl_element *) send_buf; + LOG_UI(RRC,"[DirectCommunicationEstablishResponse] msg type: %d\n",ptr_ctrl_msg->type); + LOG_UI(RRC,"[DirectCommunicationEstablishResponse] slrb_id: %d\n",ptr_ctrl_msg->sidelinkPrimitive.slrb_id); + } break; case PC5S_ESTABLISH_REQ: - type = sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.type; - sourceL2Id = sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.sourceL2Id; -LOG_DEBUG_BEGIN(DEBUG_CTRLSOCKET) - LOG_UI(RRC,"[PC5EstablishReq] Received on socket from ProSe App (msg type: %d)\n",sl_ctrl_msg_recv->type); - LOG_UI(RRC,"[PC5EstablishReq] type: %d\n",sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.type); //RX/TX - LOG_UI(RRC,"[PC5EstablishReq] source Id: 0x%08x \n",sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.sourceL2Id); -LOG_DEBUG_END + type = sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.type; + sourceL2Id = sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.sourceL2Id; + if (LOG_DEBUGFLAG(DEBUG_CTRLSOCKET)){ + LOG_UI(RRC,"[PC5EstablishReq] Received on socket from ProSe App (msg type: %d)\n",sl_ctrl_msg_recv->type); + LOG_UI(RRC,"[PC5EstablishReq] type: %d\n",sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.type); //RX/TX + LOG_UI(RRC,"[PC5EstablishReq] source Id: 0x%08x \n",sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.sourceL2Id); + } if (type > 0) { destinationL2Id = sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.destinationL2Id; -LOG_DEBUG_BEGIN(DEBUG_CTRLSOCKET) - LOG_UI(RRC,"[PC5EstablishReq] destination Id: 0x%08x \n",sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.destinationL2Id); -LOG_DEBUG_END + if (LOG_DEBUGFLAG(DEBUG_CTRLSOCKET)){ + LOG_UI(RRC,"[PC5EstablishReq] destination Id: 0x%08x \n",sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.destinationL2Id); + } } //store sourceL2Id/destinationL2Id @@ -6244,9 +6244,9 @@ LOG_DEBUG_END case PC5_DISCOVERY_MESSAGE: -LOG_DEBUG_BEGIN(DEBUG_CTRLSOCKET) + if (LOG_DEBUGFLAG(DEBUG_CTRLSOCKET)){ LOG_UI(RRC,"[PC5DiscoveryMessage] Received on socket from ProSe App (msg type: %d)\n",sl_ctrl_msg_recv->type); -LOG_DEBUG_END + } //prepare SL_Discovery buffer if (UE_rrc_inst) { memcpy((void*)&UE_rrc_inst[module_id].SL_Discovery[0].Tx_buffer.Payload[0], (void*)&sl_ctrl_msg_recv->sidelinkPrimitive.pc5_discovery_message.payload[0], PC5_DISCOVERY_PAYLOAD_SIZE); diff --git a/openair2/RRC/LTE/rrc_common.c b/openair2/RRC/LTE/rrc_common.c index d18c43d6cf..cf0196441e 100644 --- a/openair2/RRC/LTE/rrc_common.c +++ b/openair2/RRC/LTE/rrc_common.c @@ -43,7 +43,6 @@ #include "rrc_eNB_UE_context.h" #include "common/ran_context.h" -#define DEBUG_RRC 1 extern RAN_CONTEXT_t RC; extern UE_MAC_INST *UE_mac_inst; diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index b0b444084c..e34758843d 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -839,11 +839,6 @@ rrc_eNB_free_UE(const module_id_t enb_mod_idP,const struct rrc_eNB_ue_context_s* protocol_ctxt_t ctxt; -#if !defined(ENABLE_USE_MME) - module_id_t ue_module_id; - /* avoid gcc warnings */ - (void)ue_module_id; -#endif rnti_t rnti = ue_context_pP->ue_context.rnti; if (enb_mod_idP >= NB_eNB_INST) { LOG_I(RRC, "eNB inst invalid (%d/%d) for UE %x!\n",enb_mod_idP, NB_eNB_INST,rnti); @@ -858,20 +853,21 @@ rrc_eNB_free_UE(const module_id_t enb_mod_idP,const struct rrc_eNB_ue_context_s* PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, enb_mod_idP, ENB_FLAG_YES, rnti, 0, 0,enb_mod_idP); LOG_W(RRC, "[eNB %d] Removing UE RNTI %x\n", enb_mod_idP, rnti); -#if defined(ENABLE_USE_MME) - if((ue_context_pP->ue_context.ul_failure_timer >= 20000) && - (mac_eNB_get_rrc_status(enb_mod_idP,rnti) >= RRC_CONNECTED)) { - LOG_I(RRC, "[eNB %d] S1AP_UE_CONTEXT_RELEASE_REQ RNTI %x\n", enb_mod_idP, rnti); - rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(enb_mod_idP, ue_context_pP, S1AP_CAUSE_RADIO_NETWORK, 21); // send cause 21: connection with ue lost - /* From 3GPP 36300v10 p129 : 19.2.2.2.2 S1 UE Context Release Request (eNB triggered) - * If the E-UTRAN internal reason is a radio link failure detected in the eNB, the eNB shall wait a sufficient time before - * triggering the S1 UE Context Release Request procedure - * in order to allow the UE to perform the NAS recovery - * procedure, see TS 23.401 [17]. - */ - return; + if(EPC_MODE_ENABLED) { + + if((ue_context_pP->ue_context.ul_failure_timer >= 20000) && + (mac_eNB_get_rrc_status(enb_mod_idP,rnti) >= RRC_CONNECTED)) { + LOG_I(RRC, "[eNB %d] S1AP_UE_CONTEXT_RELEASE_REQ RNTI %x\n", enb_mod_idP, rnti); + rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(enb_mod_idP, ue_context_pP, S1AP_CAUSE_RADIO_NETWORK, 21); // send cause 21: connection with ue lost + /* From 3GPP 36300v10 p129 : 19.2.2.2.2 S1 UE Context Release Request (eNB triggered) + * If the E-UTRAN internal reason is a radio link failure detected in the eNB, the eNB shall wait a sufficient time before + * triggering the S1 UE Context Release Request procedure + * in order to allow the UE to perform the NAS recovery + * procedure, see TS 23.401 [17]. + */ + return; } -#endif + } // add UE info to freeList LOG_I(RRC, "put UE %x into freeList\n", rnti); put_UE_in_freelist(enb_mod_idP, rnti, 1); @@ -1018,17 +1014,13 @@ rrc_eNB_process_RRCConnectionSetupComplete( T(T_ENB_RRC_CONNECTION_SETUP_COMPLETE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti)); -#if defined(ENABLE_USE_MME) - if (EPC_MODE_ENABLED == 1) { // Forward message to S1AP layer rrc_eNB_send_S1AP_NAS_FIRST_REQ( ctxt_pP, ue_context_pP, rrcConnectionSetupComplete); - } else -#endif - { + } else { // RRC loop back (no S1AP), send SecurityModeCommand to UE rrc_eNB_generate_SecurityModeCommand( ctxt_pP, @@ -1058,16 +1050,8 @@ rrc_eNB_generate_SecurityModeCommand( ue_context_pP->ue_context.ciphering_algorithm, ue_context_pP->ue_context.integrity_algorithm); -#ifdef RRC_MSG_PRINT - uint16_t i=0; - LOG_F(RRC,"[MSG] RRC Security Mode Command\n"); - for (i = 0; i < size; i++) { - LOG_F(RRC,"%02x ", ((uint8_t*)buffer)[i]); - } - - LOG_F(RRC,"\n"); -#endif + LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,size,"[MSG] RRC Security Mode Command\n"); LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Logical Channel DL-DCCH, Generate SecurityModeCommand (bytes %d)\n", @@ -1166,9 +1150,6 @@ rrc_eNB_generate_RRCConnectionReject( ) //----------------------------------------------------------------------------- { -#ifdef RRC_MSG_PRINT - int cnt; -#endif T(T_ENB_RRC_CONNECTION_REJECT, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti)); @@ -1177,15 +1158,10 @@ rrc_eNB_generate_RRCConnectionReject( do_RRCConnectionReject(ctxt_pP->module_id, (uint8_t*) RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload); -#ifdef RRC_MSG_PRINT - LOG_F(RRC,"[MSG] RRCConnectionReject\n"); - - for (cnt = 0; cnt < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size; cnt++) { - LOG_F(RRC,"%02x ", ((uint8_t*)RC.rrc[ctxt_pP->module_id]->Srb0.Tx_buffer.Payload)[cnt]); - } - - LOG_F(RRC,"\n"); -#endif + LOG_DUMPMSG(RRC,DEBUG_RRC, + (char *)(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload), + RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size, + "[MSG] RRCConnectionReject\n"); MSC_LOG_TX_MESSAGE( MSC_RRC_ENB, @@ -1230,17 +1206,11 @@ rrc_eNB_generate_RRCConnectionReestablishment( rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id), SRB_configList, &ue_context_pP->ue_context.physicalConfigDedicated); - -#ifdef RRC_MSG_PRINT - LOG_F(RRC,"[MSG] RRCConnectionReestablishment\n"); - - for (cnt = 0; cnt < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size; cnt++) { - LOG_F(RRC,"%02x ", ((uint8_t*)RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload)[cnt]); - } - - LOG_F(RRC,"\n"); -#endif - + LOG_DUMPMSG(RRC,DEBUG_RRC, + (char *)(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload), + RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size, + "[MSG] RRCConnectionReestablishment\n" + ); // configure SRB1 for UE if (*SRB_configList != NULL) { @@ -1356,10 +1326,6 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete( struct SRB_ToAddMod *SRB2_config = NULL; struct DRB_ToAddMod *DRB_config = NULL; int i = 0; -# if defined(ENABLE_USE_MME) - int j = 0; - hashtable_rc_t h_rc; -#endif uint8_t buffer[RRC_BUF_SIZE]; uint16_t size; MeasObjectToAddModList_t *MeasObj_list = NULL; @@ -1450,60 +1416,62 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete( ue_context_pP->ue_context.Srb1.Active = 1; //ue_context_pP->ue_context.Srb2.Srb_info.Srb_id = 2; -# if defined(ENABLE_USE_MME) - rrc_ue_s1ap_ids_t* rrc_ue_s1ap_ids_p = NULL; - uint16_t ue_initial_id = ue_context_pP->ue_context.ue_initial_id; - uint32_t eNB_ue_s1ap_id = ue_context_pP->ue_context.eNB_ue_s1ap_id; - eNB_RRC_INST *rrc_instance_p = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]; - if (eNB_ue_s1ap_id > 0) { - h_rc = hashtable_get(rrc_instance_p->s1ap_id2_s1ap_ids, (hash_key_t)eNB_ue_s1ap_id, (void**)&rrc_ue_s1ap_ids_p); - if (h_rc == HASH_TABLE_OK) { - rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rnti; + if (EPC_MODE_ENABLED) { + hashtable_rc_t h_rc; + int j; + rrc_ue_s1ap_ids_t* rrc_ue_s1ap_ids_p = NULL; + uint16_t ue_initial_id = ue_context_pP->ue_context.ue_initial_id; + uint32_t eNB_ue_s1ap_id = ue_context_pP->ue_context.eNB_ue_s1ap_id; + eNB_RRC_INST *rrc_instance_p = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]; + if (eNB_ue_s1ap_id > 0) { + h_rc = hashtable_get(rrc_instance_p->s1ap_id2_s1ap_ids, (hash_key_t)eNB_ue_s1ap_id, (void**)&rrc_ue_s1ap_ids_p); + if (h_rc == HASH_TABLE_OK) { + rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rnti; + } } - } - if (ue_initial_id != 0) { - h_rc = hashtable_get(rrc_instance_p->initial_id2_s1ap_ids, (hash_key_t)ue_initial_id, (void**)&rrc_ue_s1ap_ids_p); - if (h_rc == HASH_TABLE_OK) { - rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rnti; + if (ue_initial_id != 0) { + h_rc = hashtable_get(rrc_instance_p->initial_id2_s1ap_ids, (hash_key_t)ue_initial_id, (void**)&rrc_ue_s1ap_ids_p); + if (h_rc == HASH_TABLE_OK) { + rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rnti; + } } - } - gtpv1u_enb_create_tunnel_req_t create_tunnel_req; + gtpv1u_enb_create_tunnel_req_t create_tunnel_req; - /* Save e RAB information for later */ - memset(&create_tunnel_req, 0 , sizeof(create_tunnel_req)); + /* Save e RAB information for later */ + memset(&create_tunnel_req, 0 , sizeof(create_tunnel_req)); - for (j = 0, i = 0; i < NB_RB_MAX; i++) { - if (ue_context_pP->ue_context.e_rab[i].status == E_RAB_STATUS_ESTABLISHED || ue_context_pP->ue_context.e_rab[i].status == E_RAB_STATUS_DONE) { - create_tunnel_req.eps_bearer_id[j] = ue_context_pP->ue_context.e_rab[i].param.e_rab_id; - create_tunnel_req.sgw_S1u_teid[j] = ue_context_pP->ue_context.e_rab[i].param.gtp_teid; + for ( j = 0, i = 0; i < NB_RB_MAX; i++) { + if (ue_context_pP->ue_context.e_rab[i].status == E_RAB_STATUS_ESTABLISHED || ue_context_pP->ue_context.e_rab[i].status == E_RAB_STATUS_DONE) { + create_tunnel_req.eps_bearer_id[j] = ue_context_pP->ue_context.e_rab[i].param.e_rab_id; + create_tunnel_req.sgw_S1u_teid[j] = ue_context_pP->ue_context.e_rab[i].param.gtp_teid; - memcpy(&create_tunnel_req.sgw_addr[j], - &ue_context_pP->ue_context.e_rab[i].param.sgw_addr, - sizeof(transport_layer_addr_t)); - j++; + memcpy(&create_tunnel_req.sgw_addr[j], + &ue_context_pP->ue_context.e_rab[i].param.sgw_addr, + sizeof(transport_layer_addr_t)); + j++; + } } - } - create_tunnel_req.rnti = ctxt_pP->rnti; // warning put zero above - create_tunnel_req.num_tunnels = j; + create_tunnel_req.rnti = ctxt_pP->rnti; // warning put zero above + create_tunnel_req.num_tunnels = j; - gtpv1u_update_s1u_tunnel( - ctxt_pP->instance, - &create_tunnel_req, - reestablish_rnti); -#endif + gtpv1u_update_s1u_tunnel( + ctxt_pP->instance, + &create_tunnel_req, + reestablish_rnti); + } /* EPC_MODE_ENABLED */ /* Update RNTI in ue_context */ ue_context_pP->ue_id_rnti = ctxt_pP->rnti; // here ue_id_rnti is just a key, may be something else ue_context_pP->ue_context.rnti = ctxt_pP->rnti; -# if defined(ENABLE_USE_MME) - uint8_t send_security_mode_command = FALSE; - rrc_pdcp_config_security( - ctxt_pP, - ue_context_pP, - send_security_mode_command); - LOG_D(RRC, "set security successfully \n"); -#endif + if(EPC_MODE_ENABLED) { + uint8_t send_security_mode_command = FALSE; + rrc_pdcp_config_security( + ctxt_pP, + ue_context_pP, + send_security_mode_command); + LOG_D(RRC, "set security successfully \n"); + } // Measurement ID list MeasId_list = CALLOC(1, sizeof(*MeasId_list)); memset((void *)MeasId_list, 0, sizeof(*MeasId_list)); @@ -1869,15 +1837,9 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete( , (SCellToAddMod_r10_t*)NULL #endif ); + LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,size, + "[MSG] RRC Connection Reconfiguration\n"); -#ifdef RRC_MSG_PRINT - LOG_F(RRC,"[MSG] RRC Connection Reconfiguration\n"); - for (i = 0; i < size; i++) { - LOG_F(RRC,"%02x ", ((uint8_t*)buffer)[i]); - } - LOG_F(RRC,"\n"); - //////////////////////////////////////// -#endif #if defined(ENABLE_ITTI) @@ -1977,9 +1939,6 @@ rrc_eNB_generate_RRCConnectionReestablishmentReject( ) //----------------------------------------------------------------------------- { -#ifdef RRC_MSG_PRINT - int cnt; -#endif int UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti); if(UE_id != -1){ RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1; @@ -1997,15 +1956,11 @@ rrc_eNB_generate_RRCConnectionReestablishmentReject( do_RRCConnectionReestablishmentReject(ctxt_pP->module_id, (uint8_t*) RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload); -#ifdef RRC_MSG_PRINT - LOG_F(RRC,"[MSG] RRCConnectionReestablishmentReject\n"); + LOG_DUMPMSG(RRC,DEBUG_RRC, + (char *)(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload), + RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size, + "[MSG] RRCConnectionReestablishmentReject\n"); - for (cnt = 0; cnt < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size; cnt++) { - LOG_F(RRC,"%02x ", ((uint8_t*)RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload)[cnt]); - } - - LOG_F(RRC,"\n"); -#endif MSC_LOG_TX_MESSAGE( MSC_RRC_ENB, @@ -2336,15 +2291,8 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co #endif ); + LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,size,"[MSG] RRC Connection Reconfiguration\n"); -#ifdef RRC_MSG_PRINT - LOG_F(RRC,"[MSG] RRC Connection Reconfiguration\n"); - for (i = 0; i < size; i++) { - LOG_F(RRC,"%02x ", ((uint8_t*)buffer)[i]); - } - LOG_F(RRC,"\n"); - //////////////////////////////////////// -#endif #if defined(ENABLE_ITTI) @@ -2606,15 +2554,8 @@ rrc_eNB_modify_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* cons #endif ); - -#ifdef RRC_MSG_PRINT - LOG_F(RRC,"[MSG] RRC Connection Reconfiguration\n"); - for (i = 0; i < size; i++) { - LOG_F(RRC,"%02x ", ((uint8_t*)buffer)[i]); - } - LOG_F(RRC,"\n"); - //////////////////////////////////////// -#endif + LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,size, + "[MSG] RRC Connection Reconfiguration\n"); #if defined(ENABLE_ITTI) @@ -2731,15 +2672,8 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration_release( const protocol_ #endif ); ue_context_pP->ue_context.e_rab_release_command_flag = 1; - -#ifdef RRC_MSG_PRINT - LOG_F(RRC,"[MSG] RRC Connection Reconfiguration\n"); - for (i = 0; i < size; i++) { - LOG_F(RRC,"%02x ", ((uint8_t*)buffer)[i]); - } - LOG_F(RRC,"\n"); - //////////////////////////////////////// -#endif + LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,size, + "[MSG] RRC Connection Reconfiguration\n"); #if defined(ENABLE_ITTI) /* Free all NAS PDUs */ @@ -3460,15 +3394,8 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons , (SCellToAddMod_r10_t*)NULL #endif ); - -#ifdef RRC_MSG_PRINT - LOG_F(RRC,"[MSG] RRC Connection Reconfiguration\n"); - for (i = 0; i < size; i++) { - LOG_F(RRC,"%02x ", ((uint8_t*)buffer)[i]); - } - LOG_F(RRC,"\n"); - //////////////////////////////////////// -#endif + LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,size, + "[MSG] RRC Connection Reconfiguration\n"); #if defined(ENABLE_ITTI) @@ -4052,15 +3979,8 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt , (SCellToAddMod_r10_t*)NULL #endif ); - -#ifdef RRC_MSG_PRINT - LOG_F(RRC,"[MSG] RRC Connection Reconfiguration\n"); - for (i = 0; i < size; i++) { - LOG_F(RRC,"%02x ", ((uint8_t*)buffer)[i]); - } - LOG_F(RRC,"\n"); - //////////////////////////////////////// -#endif + LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,size, + "[MSG] RRC Connection Reconfiguration\n"); #if defined(ENABLE_ITTI) @@ -5438,11 +5358,9 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( #ifdef PDCP_USE_NETLINK int oip_ifup = 0; int dest_ip_offset = 0; - module_id_t ue_module_id = -1; /* avoid gcc warnings */ (void)oip_ifup; (void)dest_ip_offset; - (void)ue_module_id; #endif uint8_t *kRRCenc = NULL; @@ -5585,6 +5503,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( ctxt_pP->module_id + 1); // fourth octet if (oip_ifup == 0) { // interface is up --> send a config the DRB + module_id_t ue_module_id; dest_ip_offset = 8; LOG_I(OIP, "[eNB %d] Config the oai%d to send/receive pkt on DRB %ld to/from the protocol stack\n", @@ -5754,16 +5673,10 @@ rrc_eNB_generate_RRCConnectionSetup( SRB_configList, &ue_context_pP->ue_context.physicalConfigDedicated); -#ifdef RRC_MSG_PRINT - LOG_F(RRC,"[MSG] RRC Connection Setup\n"); - - for (cnt = 0; cnt < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size; cnt++) { - LOG_F(RRC,"%02x ", ((uint8_t*)RC.rrc[ctxt_pP->module_id]->Srb0.Tx_buffer.Payload)[cnt]); - } - - LOG_F(RRC,"\n"); - ////////////////////////////////// -#endif + LOG_DUMPMSG(RRC,DEBUG_RRC, + (char *)(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload), + RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size, + "[MSG] RRC Connection Setup\n"); // configure SRB1/SRB2, PhysicalConfigDedicated, MAC_MainConfig for UE @@ -6111,15 +6024,10 @@ rrc_eNB_decode_ccch( T(T_ENB_RRC_CONNECTION_REESTABLISHMENT_REQUEST, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti)); -#ifdef RRC_MSG_PRINT - LOG_F(RRC,"[MSG] RRC Connection Reestablishment Request\n"); + LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)(Srb_info->Rx_buffer.Payload), + Srb_info->Rx_buffer.payload_size, + "[MSG] RRC Connection Reestablishment Request\n"); - for (i = 0; i < Srb_info->Rx_buffer.payload_size; i++) { - LOG_F(RRC,"%02x ", ((uint8_t*)Srb_info->Rx_buffer.Payload)[i]); - } - - LOG_F(RRC,"\n"); -#endif LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT"MAC_eNB--- MAC_DATA_IND (rrcConnectionReestablishmentRequest on SRB0) --> RRC_eNB\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP)); @@ -6336,15 +6244,10 @@ rrc_eNB_decode_ccch( T(T_ENB_RRC_CONNECTION_REQUEST, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti)); -#ifdef RRC_MSG_PRINT - LOG_F(RRC,"[MSG] RRC Connection Request\n"); + LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)(Srb_info->Rx_buffer.Payload), + Srb_info->Rx_buffer.payload_size, + "[MSG] RRC Connection Request\n"); - for (i = 0; i < Srb_info->Rx_buffer.payload_size; i++) { - LOG_F(RRC,"%02x ", ((uint8_t*)Srb_info->Rx_buffer.Payload)[i]); - } - - LOG_F(RRC,"\n"); -#endif LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT"MAC_eNB --- MAC_DATA_IND (rrcConnectionRequest on SRB0) --> RRC_eNB\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP)); @@ -6631,36 +6534,7 @@ rrc_eNB_decode_dcch( sdu_sizeP, 0, 0); - /* -#if defined(ENABLE_ITTI) -# if defined(DISABLE_ITTI_XER_PRINT) - { - MessageDef *message_p; - message_p = itti_alloc_new_message(TASK_RRC_ENB, RRC_UL_DCCH_MESSAGE); - memcpy(&message_p->ittiMsg, (void *)ul_dcch_msg, sizeof(RrcUlDcchMessage)); - - itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->instance, message_p); - } -# else - { - char message_string[10000]; - size_t message_string_size; - - if ((message_string_size = - xer_sprint(message_string, sizeof(message_string), &asn_DEF_UL_DCCH_Message, (void *)ul_dcch_msg)) >= 0) { - MessageDef *msg_p; - - msg_p = itti_alloc_new_message_sized(TASK_RRC_ENB, RRC_UL_DCCH, message_string_size + sizeof(IttiMsgText)); - msg_p->ittiMsg.rrc_ul_dcch.size = message_string_size; - memcpy(&msg_p->ittiMsg.rrc_ul_dcch.text, message_string, message_string_size); - - itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->instance, msg_p); - } - } -# endif -#endif - */ { for (i = 0; i < sdu_sizeP; i++) { LOG_T(RRC, "%x.", Rx_sdu[i]); @@ -6714,15 +6588,9 @@ rrc_eNB_decode_dcch( LOG_I(RRC, "Processing RRCConnectionReconfigurationComplete UE %x, ue_context_p is NULL\n", ctxt_pP->rnti); break; } -#ifdef RRC_MSG_PRINT - LOG_F(RRC,"[MSG] RRC Connection Reconfiguration Complete\n"); + LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)(Rx_sdu),sdu_sizeP, + "[MSG] RRC Connection Reconfiguration Complete\n"); - for (i = 0; i < sdu_sizeP; i++) { - LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]); - } - - LOG_F(RRC,"\n"); -#endif MSC_LOG_RX_MESSAGE( MSC_RRC_ENB, MSC_RRC_UE, @@ -6745,42 +6613,42 @@ rrc_eNB_decode_dcch( RRCConnectionReconfigurationComplete__criticalExtensions_PR_rrcConnectionReconfigurationComplete_r8) { /*NN: revise the condition */ /*FK: left the condition as is for the case MME is used (S1 mode) but setting dedicated_DRB = 1 otherwise (noS1 mode) so that no second RRCReconfiguration message activationg more DRB is sent as this causes problems with the nasmesh driver.*/ -#if defined(ENABLE_USE_MME) - if (ue_context_p->ue_context.Status == RRC_RECONFIGURED){ - dedicated_DRB = 1; - LOG_I(RRC, - PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)\n", - PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier); - //clear - int16_t UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti); - if(UE_id == -1){ - LOG_E(RRC, - PROTOCOL_RRC_CTXT_UE_FMT" RRCConnectionReconfigurationComplete without rnti %x, fault\n", - PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ctxt_pP->rnti); - break; - } - if(RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag == 1){ - LOG_I(RRC, - PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld) C-RNTI Complete\n", - PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier); - dedicated_DRB = 2; - RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0; - } - } else { - dedicated_DRB = 0; - ue_context_p->ue_context.Status = RRC_RECONFIGURED; - LOG_I(RRC, - PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (default DRB, xid %ld)\n", - PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier); - } - ue_context_p->ue_context.reestablishment_xid = -1; -#else - dedicated_DRB = 1; - ue_context_p->ue_context.Status = RRC_RECONFIGURED; - LOG_I(RRC, - PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)\n", - PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier); -#endif + if (EPC_MODE_ENABLED) { + if (ue_context_p->ue_context.Status == RRC_RECONFIGURED){ + dedicated_DRB = 1; + LOG_I(RRC, + PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)\n", + PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier); + //clear + int16_t UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti); + if(UE_id == -1){ + LOG_E(RRC, + PROTOCOL_RRC_CTXT_UE_FMT" RRCConnectionReconfigurationComplete without rnti %x, fault\n", + PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ctxt_pP->rnti); + break; + } + if(RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag == 1){ + LOG_I(RRC, + PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld) C-RNTI Complete\n", + PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier); + dedicated_DRB = 2; + RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0; + } + } else { + dedicated_DRB = 0; + ue_context_p->ue_context.Status = RRC_RECONFIGURED; + LOG_I(RRC, + PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (default DRB, xid %ld)\n", + PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier); + } + ue_context_p->ue_context.reestablishment_xid = -1; + } else { + dedicated_DRB = 1; + ue_context_p->ue_context.Status = RRC_RECONFIGURED; + LOG_I(RRC, + PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)\n", + PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier); + } rrc_eNB_process_RRCConnectionReconfigurationComplete( ctxt_pP, @@ -6795,7 +6663,6 @@ rrc_eNB_decode_dcch( } } #if defined(ENABLE_ITTI) -# if defined(ENABLE_USE_MME) if (EPC_MODE_ENABLED == 1) { if (dedicated_DRB == 1){ // rrc_eNB_send_S1AP_E_RAB_SETUP_RESP(ctxt_pP, @@ -6867,8 +6734,6 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { // ue_context_p->ue_context.e_rab[0].status = E_RAB_STATUS_ESTABLISHED; rrc_eNB_reconfigure_DRBs(ctxt_pP,ue_context_p); } - -#endif #endif break; @@ -6876,15 +6741,8 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { T(T_ENB_RRC_CONNECTION_REESTABLISHMENT_COMPLETE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti)); -#ifdef RRC_MSG_PRINT - LOG_F(RRC,"[MSG] RRC Connection Reestablishment Complete\n"); - - for (i = 0; i < sdu_sizeP; i++) { - LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]); - } - - LOG_F(RRC,"\n"); -#endif + LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP, + "[MSG] RRC Connection Reestablishment Complete\n"); MSC_LOG_RX_MESSAGE( MSC_RRC_ENB, @@ -6963,15 +6821,8 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { LOG_I(RRC, "Processing RRCConnectionSetupComplete UE %x, ue_context_p is NULL\n", ctxt_pP->rnti); break; } -#ifdef RRC_MSG_PRINT - LOG_F(RRC,"[MSG] RRC Connection SetupComplete\n"); - - for (i = 0; i < sdu_sizeP; i++) { - LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]); - } - - LOG_F(RRC,"\n"); -#endif + LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP, + "[MSG] RRC Connection SetupComplete\n"); MSC_LOG_RX_MESSAGE( MSC_RRC_ENB, @@ -7023,15 +6874,9 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { LOG_I(RRC, "Processing securityModeComplete UE %x, ue_context_p is NULL\n", ctxt_pP->rnti); break; } -#ifdef RRC_MSG_PRINT - LOG_F(RRC,"[MSG] RRC Security Mode Complete\n"); + LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP, + "[MSG] RRC Security Mode Complete\n"); - for (i = 0; i < sdu_sizeP; i++) eNB->pusch_vars[UE_id]{ - LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]); - } - - LOG_F(RRC,"\n"); -#endif MSC_LOG_RX_MESSAGE( MSC_RRC_ENB, @@ -7068,15 +6913,8 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { T(T_ENB_RRC_SECURITY_MODE_FAILURE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti)); -#ifdef RRC_MSG_PRINT - LOG_F(RRC,"[MSG] RRC Security Mode Failure\n"); - - for (i = 0; i < sdu_sizeP; i++) { - LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]); - } - - LOG_F(RRC,"\n"); -#endif + LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP, + "[MSG] RRC Security Mode Failure\n"); MSC_LOG_RX_MESSAGE( MSC_RRC_ENB, @@ -7112,15 +6950,9 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { LOG_I(RRC, "Processing ueCapabilityInformation UE %x, ue_context_p is NULL\n", ctxt_pP->rnti); break; } -#ifdef RRC_MSG_PRINT - LOG_F(RRC,"[MSG] RRC UECapablility Information \n"); - for (i = 0; i < sdu_sizeP; i++) { - LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]); - } - - LOG_F(RRC,"\n"); -#endif + LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP, + "[MSG] RRC UECapablility Information\n"); MSC_LOG_RX_MESSAGE( MSC_RRC_ENB, @@ -7174,22 +7006,22 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { ue_context_p->ue_context.UE_Capability = 0; } -#if defined(ENABLE_USE_MME) + if (EPC_MODE_ENABLED) { - if (EPC_MODE_ENABLED == 1) { - rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(ctxt_pP, - ue_context_p, - ul_dcch_msg); + if (EPC_MODE_ENABLED == 1) { + rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(ctxt_pP, + ue_context_p, + ul_dcch_msg); + } + } else { + ue_context_p->ue_context.nb_of_e_rabs = 1; + for (i = 0; i < ue_context_p->ue_context.nb_of_e_rabs; i++){ + ue_context_p->ue_context.e_rab[i].status = E_RAB_STATUS_NEW; + ue_context_p->ue_context.e_rab[i].param.e_rab_id = 1+i; + ue_context_p->ue_context.e_rab[i].param.qos.qci=9; + } + ue_context_p->ue_context.setup_e_rabs =ue_context_p->ue_context.nb_of_e_rabs; } -#else - ue_context_p->ue_context.nb_of_e_rabs = 1; - for (i = 0; i < ue_context_p->ue_context.nb_of_e_rabs; i++){ - ue_context_p->ue_context.e_rab[i].status = E_RAB_STATUS_NEW; - ue_context_p->ue_context.e_rab[i].param.e_rab_id = 1+i; - ue_context_p->ue_context.e_rab[i].param.qos.qci=9; - } - ue_context_p->ue_context.setup_e_rabs =ue_context_p->ue_context.nb_of_e_rabs; -#endif rrc_eNB_generate_defaultRRCConnectionReconfiguration(ctxt_pP, ue_context_p, @@ -7212,16 +7044,8 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { } LOG_D(RRC,"[MSG] RRC UL Information Transfer \n"); -#ifdef RRC_MSG_PRINT - LOG_F(RRC,"[MSG] RRC UL Information Transfer \n"); - - for (i = 0; i < sdu_sizeP; i++) { - LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]); - } - - LOG_F(RRC,"\n"); -#endif - + LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP, + "[MSG] RRC UL Information Transfer \n"); MSC_LOG_RX_MESSAGE( MSC_RRC_ENB, @@ -7233,15 +7057,11 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { ue_context_p->ue_context.rnti, sdu_sizeP); -#if defined(ENABLE_USE_MME) - if (EPC_MODE_ENABLED == 1) { rrc_eNB_send_S1AP_UPLINK_NAS(ctxt_pP, ue_context_p, ul_dcch_msg); } - -#endif break; case UL_DCCH_MessageType__c1_PR_counterCheckResponse: @@ -7307,15 +7127,8 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { //case UL_DCCH_MessageType__messageClassExtension__c2_PR_sidelinkUEInformation_r12: //SidelinkUEInformation LOG_I(RRC,"THINH [UL_DCCH_MessageType__messageClassExtension_PR_c2]\n"); -#ifdef RRC_MSG_PRINT - LOG_F(RRC,"[MSG] SidelinkUEInformation\n"); - - for (i = 0; i < sdu_sizeP; i++) { - LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]); - } - - LOG_F(RRC,"\n"); -#endif + LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP, + "[MSG] RRC SidelinkUEInformation \n"); MSC_LOG_RX_MESSAGE( MSC_RRC_ENB, diff --git a/openair2/RRC/LTE/rrc_eNB_S1AP.c b/openair2/RRC/LTE/rrc_eNB_S1AP.c index 36e0645795..60b3c55c79 100644 --- a/openair2/RRC/LTE/rrc_eNB_S1AP.c +++ b/openair2/RRC/LTE/rrc_eNB_S1AP.c @@ -945,16 +945,8 @@ rrc_eNB_process_S1AP_DOWNLINK_NAS( S1AP_DOWNLINK_NAS (msg_p).nas_pdu.length, S1AP_DOWNLINK_NAS (msg_p).nas_pdu.buffer); -#ifdef RRC_MSG_PRINT - int i=0; - LOG_F(RRC,"[MSG] RRC DL Information Transfer\n"); + LOG_DUMPMSG(RRC,DEBUG_RRC,buffer,length,"[MSG] RRC DL Information Transfer\n"); - for (i = 0; i < length; i++) { - LOG_F(RRC,"%02x ", ((uint8_t*)buffer)[i]); - } - - LOG_F(RRC,"\n"); -#endif /* * switch UL or DL NAS message without RRC piggybacked to SRB2 if active. */ diff --git a/targets/COMMON/create_tasks.c b/targets/COMMON/create_tasks.c index 391e448deb..4a790b8806 100644 --- a/targets/COMMON/create_tasks.c +++ b/targets/COMMON/create_tasks.c @@ -60,7 +60,7 @@ int create_tasks(uint32_t enb_nb) } } -# if defined(ENABLE_USE_MME) + if (EPC_MODE_ENABLED) { if (enb_nb > 0) { if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) { LOG_E(SCTP, "Create task for SCTP failed\n"); @@ -84,7 +84,7 @@ int create_tasks(uint32_t enb_nb) } } -# endif + } /* if (EPC_MODE_ENABLED) */ if (enb_nb > 0) { LOG_I(RRC,"Creating RRC eNB Task\n"); diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index a0339e8f0f..e7593b8fa8 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -1882,13 +1882,13 @@ void *ru_thread_synch(void *arg) { LOG_I(PHY,"Estimated sync_pos %d, peak_val %d => timing offset %d\n",sync_pos,peak_val,ru->rx_offset); -LOG_M_BEGIN(RU) - if ((peak_val > 300000) && (sync_pos > 0)) { - LOG_M("ru_sync.m","sync",(void*)&sync_corr[0],fp->samples_per_tti*5,1,2); - LOG_M("ru_rx.m","rxs",&(ru->eNB_list[0]->common_vars.rxdata[0][0]),fp->samples_per_tti*10,1,1); - exit(-1); - } -LOG_M_END + if (LOG_DEBUGFLAG(RU)) { + if ((peak_val > 300000) && (sync_pos > 0)) { + LOG_M("ru_sync.m","sync",(void*)&sync_corr[0],fp->samples_per_tti*5,1,2); + LOG_M("ru_rx.m","rxs",&(ru->eNB_list[0]->common_vars.rxdata[0][0]),fp->samples_per_tti*10,1,1); + exit(-1); + } + } ru->in_synch=1; } } diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index e84f99e67f..c74cd3b443 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -788,7 +788,7 @@ int stop_L1L2(module_id_t enb_id) oai_exit = 1; if (!RC.ru) { - LOG_F(ENB_APP, "no RU configured\n"); + LOG_UI(ENB_APP, "no RU configured\n"); return -1; } @@ -967,7 +967,7 @@ int main( int argc, char **argv ) #if defined(ENABLE_ITTI) - printf("ITTI init\n"); + printf("ITTI init, useMME: %i\n" ,EPC_MODE_ENABLED); itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info); // initialize mscgen log after ITTI diff --git a/targets/RT/USER/lte-uesoftmodem.c b/targets/RT/USER/lte-uesoftmodem.c index a2a12f9dd9..bf0abf1507 100644 --- a/targets/RT/USER/lte-uesoftmodem.c +++ b/targets/RT/USER/lte-uesoftmodem.c @@ -831,17 +831,17 @@ int main( int argc, char **argv ) set_taus_seed (0); - set_log(HW, OAILOG_DEBUG, 1); - set_log(PHY, OAILOG_INFO, 1); - set_log(MAC, OAILOG_INFO, 1); - set_log(RLC, OAILOG_INFO, 1); - set_log(PDCP, OAILOG_INFO, 1); - set_log(OTG, OAILOG_INFO, 1); - set_log(RRC, OAILOG_INFO, 1); + set_log(HW, OAILOG_DEBUG ); + set_log(PHY, OAILOG_INFO ); + set_log(MAC, OAILOG_INFO ); + set_log(RLC, OAILOG_INFO ); + set_log(PDCP, OAILOG_INFO ); + set_log(OTG, OAILOG_INFO ); + set_log(RRC, OAILOG_INFO ); #if defined(ENABLE_ITTI) - set_log(SIM, OAILOG_INFO, 1); + set_log(SIM, OAILOG_INFO ); # if defined(ENABLE_USE_MME) - set_log(NAS, OAILOG_INFO, 1); + set_log(NAS, OAILOG_INFO ); # endif #endif From 24f8fcf346fba9c70ee5b7efb23dcbcf817264c3 Mon Sep 17 00:00:00 2001 From: frtabu Date: Thu, 23 Aug 2018 11:33:39 +0200 Subject: [PATCH 033/379] Use common log mechanism in layer 3, mapping specific macros to common ones and extending common log utilities to support specific layer3 requirements --- cmake_targets/CMakeLists.txt | 2 - common/config/config_cmdline.c | 6 +- common/utils/LOG/log.c | 98 +++---- common/utils/LOG/log.h | 54 ++-- common/utils/T/T_messages.txt | 21 ++ common/utils/itti/signals.c | 2 +- common/utils/itti/timer.c | 2 +- common/utils/telnetsrv/telnetsrv_proccmd.c | 50 ++-- openair1/PHY/INIT/lte_parms.c | 2 +- openair1/PHY/LTE_ESTIMATION/lte_sync_time.c | 4 +- .../PHY/LTE_ESTIMATION/lte_ue_measurements.c | 2 +- openair1/PHY/LTE_REFSIG/lte_dl_uespec.c | 2 +- openair1/PHY/LTE_TRANSPORT/prach.c | 10 +- openair1/PHY/TOOLS/lte_dfts.c | 39 ++- openair1/PHY/defs_L1_NB_IoT.h | 2 +- openair1/PHY/defs_UE.h | 2 +- openair1/SCHED_UE/phy_procedures_lte_ue.c | 10 +- .../CONTROL_MODULES/MAC/flexran_agent_mac.c | 2 +- .../CONTROL_MODULES/RRC/flexran_agent_rrc.c | 2 +- openair2/ENB_APP/enb_app.c | 2 +- openair2/ENB_APP/enb_config.c | 37 --- openair2/ENB_APP/enb_paramdef.h | 5 - openair2/ENB_APP/flexran_agent.h | 2 +- openair2/ENB_APP/flexran_agent_common.c | 2 +- openair2/ENB_APP/flexran_agent_handler.c | 2 +- openair2/ENB_APP/flexran_agent_ran_api.h | 2 +- openair2/LAYER2/MAC/eNB_scheduler_phytest.c | 5 +- openair2/RRC/LTE/MESSAGES/asn1_msg.c | 73 +++-- openair2/RRC/LTE/MESSAGES/asn1_msg_NB_IoT.c | 54 ++-- openair2/RRC/LTE/rrc_UE.c | 34 +-- openair2/RRC/LTE/rrc_eNB.c | 25 +- openair2/RRC/LTE/rrc_eNB_S1AP.c | 37 +-- openair2/X2AP/x2ap_common.h | 1 - openair3/NAS/COMMON/UTIL/nas_log.c | 273 ------------------ openair3/NAS/COMMON/UTIL/nas_log.h | 53 +--- openair3/NAS/UE/EMM/SAP/emm_fsm.c | 3 +- openair3/S1AP/s1ap_common.c | 19 +- openair3/S1AP/s1ap_common.h | 13 +- openair3/UTILS/log.c | 43 --- openair3/UTILS/log.h | 37 --- targets/COMMON/create_tasks.c | 2 +- targets/COMMON/create_tasks_ue.c | 2 +- targets/RT/USER/lte-softmodem.h | 2 +- targets/RT/USER/lte-uesoftmodem.c | 15 - 44 files changed, 291 insertions(+), 764 deletions(-) delete mode 100644 openair3/NAS/COMMON/UTIL/nas_log.c delete mode 100644 openair3/UTILS/log.c delete mode 100644 openair3/UTILS/log.h diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 5efb13594f..7ad0a2d620 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -1382,7 +1382,6 @@ include_directories(${NFAPI_USER_DIR}) add_library(CN_UTILS ${OPENAIR3_DIR}/UTILS/conversions.c ${OPENAIR3_DIR}/UTILS/enum_string.c - ${OPENAIR3_DIR}/UTILS/log.c ${OPENAIR3_DIR}/UTILS/mcc_mnc_itu.c ) @@ -1557,7 +1556,6 @@ set(libnas_ies_OBJS set (libnas_utils_OBJS ${NAS_SRC}COMMON/UTIL/device.c ${NAS_SRC}COMMON/UTIL/memory.c - ${NAS_SRC}COMMON/UTIL/nas_log.c ${NAS_SRC}COMMON/UTIL/nas_timer.c ${NAS_SRC}COMMON/UTIL/socket.c ${NAS_SRC}COMMON/UTIL/stty.c diff --git a/common/config/config_cmdline.c b/common/config/config_cmdline.c index 8b3026c22b..c9b1c32378 100644 --- a/common/config/config_cmdline.c +++ b/common/config/config_cmdline.c @@ -38,7 +38,7 @@ #include "config_userapi.h" -void parse_stringlist(paramdef_t *cfgoptions, char *val) +int parse_stringlist(paramdef_t *cfgoptions, char *val) { char *atoken; char *tokctx; @@ -63,7 +63,7 @@ int numelt=0; printf_params("[LIBCONFIG] %s[%i]: %s\n", cfgoptions->optname,i,cfgoptions->strlistptr[i]); atoken=strtok_r(NULL, ",",&tokctx); } - cfgoptions->numelt=numelt; + return (cfgoptions->numelt > 0); } int processoption(paramdef_t *cfgoptions, char *value) @@ -95,7 +95,7 @@ char defbool[2]="1"; break; case TYPE_STRINGLIST: - parse_stringlist(cfgoptions,tmpval); + optisset=parse_stringlist(cfgoptions,tmpval); break; case TYPE_UINT32: case TYPE_INT32: diff --git a/common/utils/LOG/log.c b/common/utils/LOG/log.c index 0eecd655d1..7a840f22e2 100644 --- a/common/utils/LOG/log.c +++ b/common/utils/LOG/log.c @@ -235,14 +235,13 @@ int write_file_matlab(const char *fname,const char *vname,void *data,int length, void log_getconfig(log_t *g_log) { char *gloglevel = NULL; int consolelog ; - int level; paramdef_t logparams_defaults[] = LOG_GLOBALPARAMS_DESC; paramdef_t logparams_level[MAX_LOG_PREDEF_COMPONENTS]; paramdef_t logparams_logfile[MAX_LOG_PREDEF_COMPONENTS]; paramdef_t logparams_debug[sizeof(log_maskmap)/sizeof(mapping)]; - paramdef_t logparams_genfile[sizeof(log_maskmap)/sizeof(mapping)]; + paramdef_t logparams_dump[sizeof(log_maskmap)/sizeof(mapping)]; int ret = config_get( logparams_defaults,sizeof(logparams_defaults)/sizeof(paramdef_t),CONFIG_STRING_LOG_PREFIX); if (ret <0) { @@ -296,37 +295,37 @@ void log_getconfig(log_t *g_log) { config_get( logparams_logfile, MAX_LOG_PREDEF_COMPONENTS,CONFIG_STRING_LOG_PREFIX); /* now set the log levels and infile option, according to what we read */ for (int i=MIN_LOG_COMPONENTS; i < MAX_LOG_PREDEF_COMPONENTS; i++) { - level = map_str_to_int(log_level_names, *(logparams_level[i].strptr)); - set_log(i, level); + g_log->log_component[i].level = map_str_to_int(log_level_names, *(logparams_level[i].strptr)); + set_log(i, g_log->log_component[i].level); if (*(logparams_logfile[i].uptr) == 1) set_component_filelog(i); } -/* build then read the debug and genfile parameter array */ +/* build then read the debug and dump parameter array */ for (int i=0;log_maskmap[i].name != NULL ; i++) { - sprintf(logparams_debug[i].optname, LOG_CONFIG_DEBUG_FORMAT, log_maskmap[i].name); - sprintf(logparams_genfile[i].optname, LOG_CONFIG_GENFILE_FORMAT, log_maskmap[i].name); + sprintf(logparams_debug[i].optname, LOG_CONFIG_DEBUG_FORMAT, log_maskmap[i].name); + sprintf(logparams_dump[i].optname, LOG_CONFIG_DUMP_FORMAT, log_maskmap[i].name); logparams_debug[i].defuintval = 0; logparams_debug[i].type = TYPE_UINT; logparams_debug[i].paramflags = PARAMFLAG_BOOL; logparams_debug[i].uptr = NULL; logparams_debug[i].chkPptr = NULL; logparams_debug[i].numelt = 0; - logparams_genfile[i].defuintval = 0; - logparams_genfile[i].type = TYPE_UINT; - logparams_genfile[i].paramflags = PARAMFLAG_BOOL; - logparams_genfile[i].uptr = NULL; - logparams_genfile[i].chkPptr = NULL; - logparams_genfile[i].numelt = 0; + logparams_dump[i].defuintval = 0; + logparams_dump[i].type = TYPE_UINT; + logparams_dump[i].paramflags = PARAMFLAG_BOOL; + logparams_dump[i].uptr = NULL; + logparams_dump[i].chkPptr = NULL; + logparams_dump[i].numelt = 0; } config_get( logparams_debug,(sizeof(log_maskmap)/sizeof(mapping)) - 1 ,CONFIG_STRING_LOG_PREFIX); - config_get( logparams_genfile,(sizeof(log_maskmap)/sizeof(mapping)) - 1 ,CONFIG_STRING_LOG_PREFIX); + config_get( logparams_dump,(sizeof(log_maskmap)/sizeof(mapping)) - 1 ,CONFIG_STRING_LOG_PREFIX); /* set the debug mask according to the debug parameters values */ for (int i=0; log_maskmap[i].name != NULL ; i++) { if (*(logparams_debug[i].uptr) ) g_log->debug_mask = g_log->debug_mask | log_maskmap[i].value; - if (*(logparams_genfile[i].uptr) ) - g_log->genfile_mask = g_log->genfile_mask | log_maskmap[i].value; + if (*(logparams_dump[i].uptr) ) + g_log->dump_mask = g_log->dump_mask | log_maskmap[i].value; } /* log globally enabled/disabled */ set_glog_onlinelog(consolelog); @@ -349,10 +348,9 @@ int computed_compidx=compidx; } if (computed_compidx >= 0 && computed_compidx log_component[computed_compidx].name = strdup(name); - g_log->log_component[computed_compidx].savedlevel = LOG_ERR; g_log->log_component[computed_compidx].stream = stdout; g_log->log_component[computed_compidx].filelog = 0; - g_log->log_component[computed_compidx].filelog_name = malloc(strlen(name)+16);/* /tmp/.%s rounded to ^2 */ + g_log->log_component[computed_compidx].filelog_name = malloc(strlen(name)+16);/* /tmp/.%s */ sprintf(g_log->log_component[computed_compidx].filelog_name,"/tmp/%s.%s",name,fext); } else { fprintf(stderr,"{LOG} %s %d Couldn't register componemt %s\n",__FILE__,__LINE__,name); @@ -415,19 +413,15 @@ int logInit (void) register_log_component("SCTP","",SCTP); - register_log_component("RRH","",RRH); - - + register_log_component("X2AP","",X2AP); + register_log_component("LOADER","log",LOADER); + register_log_component("ASN","log",ASN); + for (int i=0 ; log_level_names[i].name != NULL ; i++) + g_log->level2string[i] = toupper(log_level_names[i].name[0]); // uppercased first letter of level name - g_log->level2string[OAILOG_ERR] = "E"; // ERROR - g_log->level2string[OAILOG_WARNING] = "W"; // WARNING - g_log->level2string[OAILOG_INFO] = "I"; //INFO - g_log->level2string[OAILOG_DEBUG] = "D"; // DEBUG -// g_log->level2string[OAILOG_FILE] = "F"; // file - g_log->level2string[OAILOG_TRACE] = "T"; // TRACE @@ -459,11 +453,19 @@ int rt = pthread_getname_np(pthread_self(), threadname,bufsize) ; } } +int inline log_header(char *log_buffer, int buffsize, int comp, int level,const char *format) { + char threadname[PR_SET_NAME]; +return snprintf(log_buffer, buffsize , "%s%s[%s]%c %s %s", + log_level_highlight_end[level], + ( (g_log->flag & FLAG_NOCOLOR)?"":log_level_highlight_start[level]), + g_log->log_component[comp].name, + ( (g_log->flag & FLAG_LEVEL)?g_log->level2string[level]:' '), + ( (g_log->flag & FLAG_THREAD)?log_getthreadname(threadname,PR_SET_NAME+1):""), + format); +} void logRecord_mt(const char *file, const char *func, int line, int comp, int level, const char* format, ... ) { - - char threadname[PR_SET_NAME]; char log_buffer[MAX_LOG_TOTAL]; va_list args; @@ -472,16 +474,7 @@ void logRecord_mt(const char *file, const char *func, int line, int comp, int le - - - snprintf(log_buffer, MAX_LOG_TOTAL , "%s%s[%s]%s %s %s", - log_level_highlight_end[level], - ( (g_log->flag & FLAG_NOCOLOR)?"":log_level_highlight_start[level]), - g_log->log_component[comp].name, - ( (g_log->flag & FLAG_LEVEL)?g_log->level2string[level]:""), - ( (g_log->flag & FLAG_THREAD)?log_getthreadname(threadname,PR_SET_NAME+1):""), - format); - + log_header(log_buffer,MAX_LOG_TOTAL ,comp, level,format); g_log->log_component[comp].vprint(g_log->log_component[comp].stream,log_buffer, args); va_end(args); @@ -492,20 +485,23 @@ void log_dump(int component, void *buffer, int buffsize,int datatype, const char va_list args; char *wbuf; + switch(datatype) { case LOG_DUMP_DOUBLE: - wbuf=malloc((buffsize * 10) + 64 ); + wbuf=malloc((buffsize * 10) + 64 + MAX_LOG_TOTAL); break; case LOG_DUMP_CHAR: default: - wbuf=malloc((buffsize * 3 ) + 64 ); + wbuf=malloc((buffsize * 3 ) + 64 + MAX_LOG_TOTAL); break; - } - va_start(args, format); - g_log->log_component[component].vprint(g_log->log_component[component].stream,format, args); - va_end(args); - if (wbuf != NULL) { - int pos=0; + } + if (wbuf != NULL) { + va_start(args, format); + int pos=log_header(wbuf,MAX_LOG_TOTAL ,component, OAILOG_INFO,""); + int pos2=vsprintf(wbuf+pos,format, args); + pos=pos+pos2; + va_end(args); + for (int i=0; i= MIN_LOG_COMPONENTS) && (component < MAX_LOG_COMPONENTS), component, MIN_LOG_COMPONENTS, MAX_LOG_COMPONENTS); - DevCheck((level < NUM_LOG_LEVEL) && (level >= OAILOG_ERR), level, NUM_LOG_LEVEL, + DevCheck((level < NUM_LOG_LEVEL) && (level >= OAILOG_DISABLE), level, NUM_LOG_LEVEL, OAILOG_ERR); - + if ( g_log->log_component[component].level != OAILOG_DISABLE ) + g_log->log_component[component].savedlevel = g_log->log_component[component].level; g_log->log_component[component].level = level; - g_log->log_component[component].savedlevel = level; return 0; } @@ -557,7 +553,7 @@ void set_glog_onlinelog(int enable) g_log->log_component[c].print = fprintf; g_log->log_component[c].stream = stdout; } else { - g_log->log_component[c].level = -1; + g_log->log_component[c].level = OAILOG_DISABLE; } } } diff --git a/common/utils/LOG/log.h b/common/utils/LOG/log.h index 7b2764b30c..767c1dbb35 100644 --- a/common/utils/LOG/log.h +++ b/common/utils/LOG/log.h @@ -81,14 +81,14 @@ extern "C" { * @ingroup _macro * @brief LOG defines 9 levels of messages for users. Importance of these levels decrease gradually from 0 to 8 * @{*/ +# define OAILOG_DISABLE -1 /*!< \brief disable all LOG messages, cannot be used in LOG macros, use only in LOG module */ +# define OAILOG_ERR 0 /*!< \brief critical error conditions, impact on "must have" fuctinalities */ +# define OAILOG_WARNING 1 /*!< \brief warning conditions, shouldn't happen but doesn't impact "must have" functionalities */ +# define OAILOG_INFO 2 /*!< \brief informational messages most people don't need, shouldn't impact real-time behavior */ +# define OAILOG_DEBUG 3 /*!< \brief first level debug-level messages, for developers , may impact real-time behavior */ +# define OAILOG_TRACE 4 /*!< \brief second level debug-level messages, for developers ,likely impact real-time behavior*/ -# define OAILOG_ERR 0 /*!< \brief critical error conditions, impact on "must have" fuctinalities */ -# define OAILOG_WARNING 1 /*!< \brief warning conditions, shouldn't happen but doesn't impact "must have" functionalities */ -# define OAILOG_INFO 2 /*!< \brief informational messages most people don't need, shouldn't impact real-time behavior */ -# define OAILOG_DEBUG 3 /*!< \brief first level debug-level messages, for developers , may impact real-time behavior */ -# define OAILOG_TRACE 4 /*!< \brief second level debug-level messages, for developers ,likely impact real-time behavior*/ - -#define NUM_LOG_LEVEL 6 /*!< \brief the number of message levels users have with LOG */ +#define NUM_LOG_LEVEL 5 /*!< \brief the number of message levels users have with LOG (OAILOG_DISABLE is not available to user as a level, so it is not included)*/ /* @}*/ @@ -142,21 +142,27 @@ extern "C" { #define DEBUG_RRC (1<<6) #define DEBUG_PDCP (1<<7) #define DEBUG_DFT (1<<8) +#define DEBUG_ASN1 (1<<9) #define DEBUG_CTRLSOCKET (1<<10) +#define DEBUG_SECURITY (1<<11) +#define DEBUG_NAS (1<<12) #define UE_TIMING (1<<20) #define LOG_MASKMAP_INIT {\ {"PRACH", DEBUG_PRACH},\ {"RU", DEBUG_RU},\ - {"LTEESTIM", DEBUG_LTEESTIM},\ - {"CTRLSOCKET", DEBUG_CTRLSOCKET},\ {"UE_PHYPROC", DEBUG_UE_PHYPROC},\ + {"LTEESTIM", DEBUG_LTEESTIM},\ {"DLCELLSPEC", DEBUG_DLCELLSPEC},\ {"ULSCH", DEBUG_ULSCH},\ {"RRC", DEBUG_RRC},\ {"PDCP", DEBUG_PDCP},\ {"DFT", DEBUG_DFT},\ + {"ASN1", DEBUG_ASN1},\ + {"CTRLSOCKET", DEBUG_CTRLSOCKET},\ + {"SECURITY", DEBUG_SECURITY},\ + {"NAS", DEBUG_NAS},\ {"UE_TIMING", UE_TIMING},\ {NULL,-1}\ } @@ -166,8 +172,8 @@ extern "C" { #define SET_LOG_DEBUG(B) g_log->debug_mask = (g_log->debug_mask | B) #define CLEAR_LOG_DEBUG(B) g_log->debug_mask = (g_log->debug_mask & (~B)) -#define SET_LOG_DUMP(B) g_log->genfile_mask = (g_log->genfile_mask | B) -#define CLEAR_LOG_DUMP(B) g_log->genfile_mask = (g_log->genfile_mask & (~B)) +#define SET_LOG_DUMP(B) g_log->dump_mask = (g_log->dump_mask | B) +#define CLEAR_LOG_DUMP(B) g_log->dump_mask = (g_log->dump_mask & (~B)) @@ -208,9 +214,9 @@ typedef enum { TMR, USIM, LOCALIZE, - RRH, X2AP, LOADER, + ASN, MAX_LOG_PREDEF_COMPONENTS, } comp_name_t; @@ -243,11 +249,11 @@ typedef struct { typedef struct { log_component_t log_component[MAX_LOG_COMPONENTS]; - char* level2string[NUM_LOG_LEVEL]; + char level2string[NUM_LOG_LEVEL]; int flag; char* filelog_name; uint64_t debug_mask; - uint64_t genfile_mask; + uint64_t dump_mask; } log_t; @@ -318,7 +324,7 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int #define LOG_CONFIG_LEVEL_FORMAT "%s_log_level" #define LOG_CONFIG_LOGFILE_FORMAT "%s_log_infile" #define LOG_CONFIG_DEBUG_FORMAT "%s_debug" -#define LOG_CONFIG_GENFILE_FORMAT "%s_genfile" +#define LOG_CONFIG_DUMP_FORMAT "%s_dump" #define LOG_CONFIG_HELP_OPTIONS " list of comma separated options to enable log module behavior. Available options: \n"\ " nocolor: disable color usage in log messages\n"\ @@ -356,13 +362,13 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int # define LOG_D(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} else { T(T_LEGACY_ ## c ## _DEBUG, T_PRINTF(x)) ;}} while (0) # define LOG_T(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} else { T(T_LEGACY_ ## c ## _TRACE, T_PRINTF(x)) ;}} while (0) /* macro used to dump a buffer or a message as in openair2/RRC/LTE/RRC_eNB.c, replaces LOG_F macro */ -# define LOG_DUMPMSG(c, f, b, s, x...) do { if(g_log->genfile_mask & f) log_dump(c, b, s, LOG_DUMP_CHAR, x) ;} while (0) /* */ +# define LOG_DUMPMSG(c, f, b, s, x...) do { if(g_log->dump_mask & f) log_dump(c, b, s, LOG_DUMP_CHAR, x) ;} while (0) /* */ # define nfapi_log(FILE, FNC, LN, COMP, LVL, F...) do { if (T_stdout) { logRecord_mt(__FILE__, __FUNCTION__, __LINE__,COMP, LVL, F) ;}} while (0) /* */ /* bitmask dependant macros, to isolate debugging code */ # define LOG_DEBUGFLAG(D) (g_log->debug_mask & D) /* bitmask dependant macros, to generate debug file such as matlab file or message dump */ -# define LOG_GENFILEFLAG(D) (g_log->genfile_mask & D) +# define LOG_DUMPFLAG(D) (g_log->dump_mask & D) # define LOG_M(file, vector, data, len, dec, format) do { write_file_matlab(file, vector, data, len, dec, format);} while(0)/* */ /* define variable only used in LOG macro's */ # define LOG_VAR(A,B) A B @@ -376,12 +382,13 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int # define LOG_DUMPMSG(c, b, s, x...) /* */ # define nfapi_log(FILE, FNC, LN, COMP, LVL, FMT...) # define LOG_DEBUGFLAG(D) ( 0 ) -# define LOG_GENFILEFLAG(D) ( 0 ) +# define LOG_DUMPFLAG(D) ( 0 ) # define LOG_M(file, vector, data, len, dec, format) # define LOG_VAR(A,B) # endif /* T_TRACER */ /* avoid warnings for variables only used in LOG macro's but set outside debug section */ -#define LOG_USEDINLOG_VAR(A,B) __attribute__((unused)) A B +#define GCC_NOTUSED __attribute__((unused)) +#define LOG_USEDINLOG_VAR(A,B) GCC_NOTUSED A B /* unfiltered macros, usefull for simulators or messages at init time, before log is configured */ #define LOG_UM(file, vector, data, len, dec, format) do { write_file_matlab(file, vector, data, len, dec, format);} while(0) @@ -394,9 +401,12 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int * @ingroup _macro * @brief Macro of some useful functions defined by LOG * @{*/ -#define LOG_ENTER(c) do {LOG_T(c, "Entering\n");}while(0) /*!< \brief Macro to log a message with severity DEBUG when entering a function */ -#define LOG_EXIT(c) do {LOG_T(c,"Exiting\n"); return;}while(0) /*!< \brief Macro to log a message with severity TRACE when exiting a function */ -#define LOG_RETURN(c,x) do {uint32_t __rv;__rv=(unsigned int)(x);LOG_T(c,"Returning %08x\n", __rv);return((typeof(x))__rv);}while(0) /*!< \brief Macro to log a function exit, including integer value, then to return a value to the calling function */ +#define LOG_ENTER(c) do {LOG_T(c, "Entering %s\n",__FUNCTION__);}while(0) /*!< \brief Macro to log a message with severity DEBUG when entering a function */ +#define LOG_END(c) do {LOG_T(c, "End of %s\n",__FUNCTION__);}while(0) /*!< \brief Macro to log a message with severity DEBUG when entering a function */ +#define LOG_EXIT(c) do { LOG_END(c); return;}while(0) /*!< \brief Macro to log a message with severity TRACE when exiting a function */ +#define LOG_RETURN(c,r) do {LOG_T(c,"Leaving %s (rc = %08lx)\n", __FUNCTION__ , (unsigned long)(r) );return(r);}while(0) /*!< \brief Macro to log a function exit, including integer value, then to return a value to the calling function */ + + /* @}*/ static __inline__ uint64_t rdtsc(void) { diff --git a/common/utils/T/T_messages.txt b/common/utils/T/T_messages.txt index 676f329a0e..2bce891ac9 100644 --- a/common/utils/T/T_messages.txt +++ b/common/utils/T/T_messages.txt @@ -750,6 +750,27 @@ ID = LEGACY_OSA_TRACE GROUP = ALL:LEGACY_OSA:LEGACY_GROUP_TRACE:LEGACY FORMAT = string,log +ID = LEGACY_ASN_INFO + DESC = ASN legacy logs - info level + GROUP = ALL:LEGACY_ASN:LEGACY_GROUP_INFO:LEGACY + FORMAT = string,log +ID = LEGACY_ASN_ERROR + DESC = ASN legacy logs - error level + GROUP = ALL:LEGACY_ASN:LEGACY_GROUP_ERROR:LEGACY + FORMAT = string,log +ID = LEGACY_ASN_WARNING + DESC = ASN legacy logs - warning level + GROUP = ALL:LEGACY_ASN:LEGACY_GROUP_WARNING:LEGACY + FORMAT = string,log +ID = LEGACY_ASN_DEBUG + DESC = ASN legacy logs - debug level + GROUP = ALL:LEGACY_ASN:LEGACY_GROUP_DEBUG:LEGACY + FORMAT = string,log +ID = LEGACY_ASN_TRACE + DESC = ASN legacy logs - trace level + GROUP = ALL:LEGACY_ASN:LEGACY_GROUP_TRACE:LEGACY + FORMAT = string,log + ID = LEGACY_SIM_INFO DESC = SIM legacy logs - info level GROUP = ALL:LEGACY_SIM:LEGACY_GROUP_INFO:LEGACY diff --git a/common/utils/itti/signals.c b/common/utils/itti/signals.c index 5dd667ae65..f8dfe2d49b 100644 --- a/common/utils/itti/signals.c +++ b/common/utils/itti/signals.c @@ -39,7 +39,7 @@ #include "assertions.h" #include "signals.h" -#include "log.h" +#include "common/utils/LOG/log.h" #if defined (LOG_D) && defined (LOG_E) # define SIG_DEBUG(x, args...) LOG_D(RRC, x, ##args) diff --git a/common/utils/itti/timer.c b/common/utils/itti/timer.c index 6327aeacfb..720cf70d1f 100644 --- a/common/utils/itti/timer.c +++ b/common/utils/itti/timer.c @@ -32,7 +32,7 @@ #include "assertions.h" #include "intertask_interface.h" #include "timer.h" -#include "log.h" +#include "common/utils/LOG/log.h" #include "queue.h" #if defined (LOG_D) && defined (LOG_E) diff --git a/common/utils/telnetsrv/telnetsrv_proccmd.c b/common/utils/telnetsrv/telnetsrv_proccmd.c index 3576fd004a..ba1b011513 100644 --- a/common/utils/telnetsrv/telnetsrv_proccmd.c +++ b/common/utils/telnetsrv/telnetsrv_proccmd.c @@ -221,7 +221,7 @@ int proccmd_show(char *buf, int debug, telnet_printfunc_t prnt) for (int i=0; log_maskmap[i].name != NULL ; i++) { prnt("%02i %17.17s %5.5s %5.5s\n",i ,log_maskmap[i].name, ((g_log->debug_mask & log_maskmap[i].value)?"Y":"N"), - ((g_log->genfile_mask & log_maskmap[i].value)?"Y":"N") ); + ((g_log->dump_mask & log_maskmap[i].value)?"Y":"N") ); } } if (strcasestr(buf,"config") != NULL) { @@ -343,7 +343,7 @@ int s = sscanf(buf,"%ms %i-%i\n",&logsubcmd, &idx1,&idx2); for (int i=0; log_options[i].name != NULL; i++) prnt("%s ",log_options[i].name); prnt("\n\n"); - prnt("Available debug or genfile options: \n "); + prnt("Available debug and dump options: \n "); for (int i=0; log_maskmap[i].name != NULL; i++) prnt("%s ",log_maskmap[i].name); prnt("\n\n"); @@ -402,31 +402,36 @@ int s = sscanf(buf,"%ms %i-%i\n",&logsubcmd, &idx1,&idx2); if (logparam != NULL) free(logparam); if (opt != NULL) free(opt); } else if ( s == 3 && logsubcmd != NULL) { - int level, enable, filelog; + int level, enable,filelog; char *tmpstr=NULL; char *logparam=NULL; int l; - level = enable = filelog = -1; + level = OAILOG_DISABLE - 1; + filelog = -1; + enable=-1; l=sscanf(logsubcmd,"%m[^'_']_%m[^'_']",&logparam,&tmpstr); if (debug > 0) prnt("l=%i, %s %s\n",l,((logparam==NULL)?"\"\"":logparam), ((tmpstr==NULL)?"\"\"":tmpstr)); if (l ==2 ) { if (strcmp(logparam,"level") == 0) { level=map_str_to_int(log_level_names,tmpstr); - if (level < 0) prnt("level %s unknown\n",tmpstr); + if (level < 0) { + prnt("level %s unknown\n",tmpstr); + level=OAILOG_DISABLE - 1; + } } else { prnt("%s%s unknown log sub command \n",logparam, tmpstr); } } else if (l ==1 ) { if (strcmp(logparam,"enable") == 0) { - enable = 1; + enable=1; } else if (strcmp(logparam,"disable") == 0) { - enable = 0; + level=OAILOG_DISABLE; } else if (strcmp(logparam,"file") == 0) { - filelog = 1 ; + filelog = 1 ; } else if (strcmp(logparam,"nofile") == 0) { - filelog = 0 ; + filelog = 0 ; } else { prnt("%s%s unknown log sub command \n",logparam, tmpstr); } @@ -436,27 +441,18 @@ int s = sscanf(buf,"%ms %i-%i\n",&logsubcmd, &idx1,&idx2); if (logparam != NULL) free(logparam); if (tmpstr != NULL) free(tmpstr); for (int i=idx1; i<=idx2 ; i++) { - if ( level >= 0 || enable >= 0) { - if (level < 0) { - level=g_log->log_component[i].level; - } - if (enable < 0) { - level= -1; - } - set_log(i, level); - } - if ( filelog == 1 ) { + if (level >= OAILOG_DISABLE) + set_log(i, level); + else if ( enable == 1) + set_log(i,g_log->log_component[i].savedlevel); + else if ( filelog == 1 ) { set_component_filelog(i); - } - if ( filelog == 0 ) { + } else if ( filelog == 0 ) { close_component_filelog(i); } - prnt("log level comp %i %s set to %s (%s) output: %s\n", - i,((g_log->log_component[i].name==NULL)?"":g_log->log_component[i].name), - map_int_to_str(log_level_names,g_log->log_component[i].level), - ((g_log->log_component[i].level>=0)?"enabled":"disabled"), - ((g_log->log_component[i].filelog>0)?g_log->log_component[i].filelog_name:"stdout")); - } + + } + proccmd_show("loglvl",debug,prnt); } else { prnt("%s: wrong log command...\n",buf); } diff --git a/openair1/PHY/INIT/lte_parms.c b/openair1/PHY/INIT/lte_parms.c index 3b8a26125d..03f226c637 100644 --- a/openair1/PHY/INIT/lte_parms.c +++ b/openair1/PHY/INIT/lte_parms.c @@ -20,7 +20,7 @@ */ #include "phy_init.h" -#include "log.h" +#include "common/utils/LOG/log.h" uint16_t dl_S_table_normal[10]={3,9,10,11,12,3,9,10,11,6}; uint16_t dl_S_table_extended[10]={3,8,9,10,3,8,9,5,0,0}; diff --git a/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c b/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c index aca5a5303d..87abdfe19c 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c @@ -274,7 +274,7 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com - if ( LOG_GENFILEFLAG(DEBUG_LTEESTIM)){ + if ( LOG_DUMPFLAG(DEBUG_LTEESTIM)){ LOG_M("primary_sync0.m","psync0",primary_synch0_time,frame_parms->ofdm_symbol_size,1,1); LOG_M("primary_sync1.m","psync1",primary_synch1_time,frame_parms->ofdm_symbol_size,1,1); LOG_M("primary_sync2.m","psync2",primary_synch2_time,frame_parms->ofdm_symbol_size,1,1); @@ -460,7 +460,7 @@ int lte_sync_time(int **rxdata, ///rx data in time domain LOG_I(PHY,"[UE] lte_sync_time: Sync source = %d, Peak found at pos %d, val = %d (%d dB)\n",sync_source,peak_pos,peak_val,dB_fixed(peak_val)/2); - if ( LOG_GENFILEFLAG(DEBUG_LTEESTIM)){ + if ( LOG_DUMPFLAG(DEBUG_LTEESTIM)){ static int debug_cnt; if (debug_cnt == 0) { LOG_M("sync_corr0_ue.m","synccorr0",sync_corr_ue0,2*length,1,2); diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c b/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c index bf22802145..2e4f3e6036 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c @@ -23,7 +23,7 @@ #include "PHY/defs_UE.h" #include "PHY/phy_extern_ue.h" -#include "log.h" +#include "common/utils/LOG/log.h" #include "PHY/sse_intrin.h" //#define k1 1000 diff --git a/openair1/PHY/LTE_REFSIG/lte_dl_uespec.c b/openair1/PHY/LTE_REFSIG/lte_dl_uespec.c index 2c5240e143..1b9c17133c 100644 --- a/openair1/PHY/LTE_REFSIG/lte_dl_uespec.c +++ b/openair1/PHY/LTE_REFSIG/lte_dl_uespec.c @@ -36,7 +36,7 @@ #include "lte_refsig.h" #include "PHY/defs_eNB.h" #include "PHY/defs_UE.h" -#include "log.h" +#include "common/utils/LOG/log.h" #include "PHY/impl_defs_top.h" //extern unsigned int lte_gold_table[3][20][2][14]; diff --git a/openair1/PHY/LTE_TRANSPORT/prach.c b/openair1/PHY/LTE_TRANSPORT/prach.c index 99563ce133..ec0b7db4ad 100644 --- a/openair1/PHY/LTE_TRANSPORT/prach.c +++ b/openair1/PHY/LTE_TRANSPORT/prach.c @@ -202,7 +202,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, // DJP - indexing below in subframe zero takes us off the beginning of the array??? prach[aa] = (int16_t*)&ru->common.rxdata[aa][(subframe*fp->samples_per_tti)-ru->N_TA_offset]; - if (LOG_GENFILEFLAG(PRACH)){ + if (LOG_DUMPFLAG(PRACH)){ int32_t en0=signal_energy((int32_t*)prach[aa],fp->samples_per_tti); int8_t dbEn0 = dB_fixed(en0); int8_t rach_dBm = dbEn0 - ru->rx_total_gain_dB; @@ -585,7 +585,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, } memset(prachF, 0, sizeof(int16_t)*2*1024 ); - if (LOG_GENFILEFLAG(PRACH)) { + if (LOG_DUMPFLAG(PRACH)) { if (prach[0]!= NULL) LOG_M("prach_rx0.m","prach_rx0",prach[0],6144+792,1,1); LOG_M("prach_rx1.m","prach_rx1",prach[1],6144+792,1,1); LOG_M("prach_rxF0.m","prach_rxF0",rxsigF[0],24576,1,1); @@ -619,7 +619,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, prach_ifft[i] += (prach_ifft_tmp[i<<1]*prach_ifft_tmp[(i<<1)] + prach_ifft_tmp[1+(i<<1)]*prach_ifft_tmp[1+(i<<1)])>>10; } - if (LOG_GENFILEFLAG(PRACH)) { + if (LOG_DUMPFLAG(PRACH)) { if (aa==0) LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1); if (aa==1) LOG_M("prach_rxF_comp1.m","prach_rxF_comp1",prachF,1024,1,1); } @@ -662,7 +662,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, } }// preamble_index - if (LOG_GENFILEFLAG(PRACH)) { + if (LOG_DUMPFLAG(PRACH)) { int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840)); if (en>60) { k = (12*n_ra_prb) - 6*fp->N_RB_UL; @@ -689,7 +689,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, } } - } /* LOG_GENFILEFLAG(PRACH) */ + } /* LOG_DUMPFLAG(PRACH) */ if (eNB) stop_meas(&eNB->rx_prach); } diff --git a/openair1/PHY/TOOLS/lte_dfts.c b/openair1/PHY/TOOLS/lte_dfts.c index ca1a6d1262..7e24af179d 100644 --- a/openair1/PHY/TOOLS/lte_dfts.c +++ b/openair1/PHY/TOOLS/lte_dfts.c @@ -2035,7 +2035,7 @@ static inline void transpose4_ooff(int16x4_t *x,int16x4_t *y,int off) #endif -// 16-point optimized DEBUG_DFT kernel +// 16-point optimized DFT kernel const static int16_t tw16[24] __attribute__((aligned(32))) = { 32767,0,30272,-12540,23169 ,-23170,12539 ,-30273, 32767,0,23169,-23170,0 ,-32767,-23170,-23170, @@ -3097,7 +3097,7 @@ void dft128(int16_t *x,int16_t *y,int scale) dft64((int16_t*)(xtmp),(int16_t*)ytmp,1); dft64((int16_t*)(xtmp+32),(int16_t*)(ytmp+16),1); - if (LOG_GENFILEFLAG(DEBUG_DFT)) { + if (LOG_DUMPFLAG(DEBUG_DFT)) { LOG_M("dft128a.m","dfta",ytmp,64,1,1); LOG_M("dft128b.m","dftb",ytmp+16,64,1,1);*/ } @@ -3149,7 +3149,7 @@ void dft128(int16_t *x,int16_t *y,int scale) } - if (LOG_GENFILEFLAG(DEBUG_DFT)) { + if (LOG_DUMPFLAG(DEBUG_DFT)) { LOG_M("dft128out.m","dft128",y,128,1,1); exit(-1); } @@ -3177,14 +3177,14 @@ void dft128(int16_t *x,int16_t *y,int scale) transpose4_ooff_simd256(x256+10,xtmp+5,8); transpose4_ooff_simd256(x256+12,xtmp+6,8); transpose4_ooff_simd256(x256+14,xtmp+7,8); - if (LOG_GENFILEFLAG(DEBUG_DFT)) { + if (LOG_DUMPFLAG(DEBUG_DFT)) { LOG_M("dft128ina_256.m","dftina",xtmp,64,1,1); LOG_M("dft128inb_256.m","dftinb",xtmp+8,64,1,1); } dft64((int16_t*)(xtmp),(int16_t*)ytmp,1); dft64((int16_t*)(xtmp+8),(int16_t*)(ytmp+8),1); - if (LOG_GENFILEFLAG(DEBUG_DFT)) { + if (LOG_DUMPFLAG(DEBUG_DFT)) { LOG_M("dft128outa_256.m","dftouta",ytmp,64,1,1); LOG_M("dft128outb_256.m","dftoutb",ytmp+8,64,1,1); } @@ -3220,7 +3220,7 @@ void dft128(int16_t *x,int16_t *y,int scale) y256[15] = mulhi_int16_simd256(y256[15],ONE_OVER_SQRT2_Q15_256); } - if (LOG_GENFILEFLAG(DEBUG_DFT)) { + if (LOG_DUMPFLAG(DEBUG_DFT)) { LOG_M("dft128.m","dft",y256,128,1,1); exit(-1); } @@ -5424,7 +5424,7 @@ void dft1536(int16_t *input, int16_t *output, int scale) tmpo[1][i] = tmpo[1][i<<1]; tmpo[2][i] = tmpo[2][i<<1]; }*/ - if (LOG_GENFILEFLAG(DEBUG_DFT)) { + if (LOG_DUMPFLAG(DEBUG_DFT)) { LOG_M("dft1536out0.m","o0",tmpo[0],2048,1,1); LOG_M("dft1536out1.m","o1",tmpo[1],2048,1,1); LOG_M("dft1536out2.m","o2",tmpo[2],2048,1,1); @@ -5588,7 +5588,7 @@ void idft6144(int16_t *input, int16_t *output,int scale) idft2048((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),1); idft2048((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),1); - if (LOG_GENFILEFLAG(DEBUG_DFT)) { + if (LOG_DUMPFLAG(DEBUG_DFT)) { LOG_M("idft6144in.m","in",input,6144,1,1); LOG_M("idft6144out0.m","o0",tmpo[0],2048,1,1); LOG_M("idft6144out1.m","o1",tmpo[1],2048,1,1); @@ -5624,9 +5624,6 @@ void idft6144(int16_t *input, int16_t *output,int scale) } } - if (LOG_GENFILEFLAG(DEBUG_DFT)) { - LOG_M("idft6144out.m","out",output,6144,1,1); - } _mm_empty(); _m_empty(); @@ -5657,7 +5654,7 @@ void dft6144(int16_t *input, int16_t *output,int scale) tmpo[1][i] = tmpo[1][i<<1]; tmpo[2][i] = tmpo[2][i<<1]; }*/ - if (LOG_GENFILEFLAG(DEBUG_DFT)) { + if (LOG_DUMPFLAG(DEBUG_DFT)) { LOG_M("ft6144out0.m","o0",tmpo[0],2048,1,1); LOG_M("ft6144out1.m","o1",tmpo[1],2048,1,1); LOG_M("ft6144out2.m","o2",tmpo[2],2048,1,1); @@ -5722,7 +5719,7 @@ void dft12288(int16_t *input, int16_t *output,int scale) tmpo[1][i] = tmpo[1][i<<1]; tmpo[2][i] = tmpo[2][i<<1]; }*/ - if (LOG_GENFILEFLAG(DEBUG_DFT)) { + if (LOG_DUMPFLAG(DEBUG_DFT)) { LOG_M("dft12288out0.m","o0",tmpo[0],4096,1,1); LOG_M("dft12288out1.m","o1",tmpo[1],4096,1,1); LOG_M("dft12288out2.m","o2",tmpo[2],4096,1,1); @@ -5779,7 +5776,7 @@ void idft12288(int16_t *input, int16_t *output,int scale) idft4096((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),scale); idft4096((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),scale); - if (LOG_GENFILEFLAG(DEBUG_DFT)) { + if (LOG_DUMPFLAG(DEBUG_DFT)) { LOG_M("idft12288in.m","in",input,12288,1,1); LOG_M("idft12288out0.m","o0",tmpo[0],4096,1,1); LOG_M("idft12288out1.m","o1",tmpo[1],4096,1,1); @@ -5815,7 +5812,7 @@ void idft12288(int16_t *input, int16_t *output,int scale) } _mm_empty(); _m_empty(); - if (LOG_GENFILEFLAG(DEBUG_DFT)) { + if (LOG_DUMPFLAG(DEBUG_DFT)) { LOG_M("idft12288out.m","out",output,6144,1,1); } } @@ -5946,7 +5943,7 @@ void dft24576(int16_t *input, int16_t *output,int scale) tmpo[1][i] = tmpo[1][i<<1]; tmpo[2][i] = tmpo[2][i<<1]; }*/ - if (LOG_GENFILEFLAG(DEBUG_DFT)) { + if (LOG_DUMPFLAG(DEBUG_DFT)) { LOG_M("dft24576out0.m","o0",tmpo[0],8192,1,1); LOG_M("dft24576out1.m","o1",tmpo[1],8192,1,1); LOG_M("dft24576out2.m","o2",tmpo[2],8192,1,1); @@ -5981,14 +5978,12 @@ void dft24576(int16_t *input, int16_t *output,int scale) } _mm_empty(); _m_empty(); - if (LOG_GENFILEFLAG(DEBUG_DFT)) { + if (LOG_DUMPFLAG(DEBUG_DFT)) { LOG_M("out.m","out",output,24576,1,1); } } - - -void idft24576(int16_t *input, int16_t *output) +void idft24576(int16_t *input, int16_t *output,int scale) { int i,i2,j; uint32_t tmp[3][8192] __attribute__((aligned(32))); @@ -6006,7 +6001,7 @@ void idft24576(int16_t *input, int16_t *output) idft8192((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),1); idft8192((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),1); - if (LOG_GENFILEFLAG(DEBUG_DFT)) { + if (LOG_DUMPFLAG(DEBUG_DFT)) { LOG_M("idft24576in.m","in",input,24576,1,1); LOG_M("idft24576out0.m","o0",tmpo[0],8192,1,1); LOG_M("idft24576out1.m","o1",tmpo[1],8192,1,1); @@ -6042,7 +6037,7 @@ void idft24576(int16_t *input, int16_t *output) _mm_empty(); _m_empty(); - if (LOG_GENFILEFLAG(DEBUG_DFT)) { + if (LOG_DUMPFLAG(DEBUG_DFT)) { LOG_M("idft24576out.m","out",output,24576,1,1); } } diff --git a/openair1/PHY/defs_L1_NB_IoT.h b/openair1/PHY/defs_L1_NB_IoT.h index bb08d5122d..8a7c853df5 100644 --- a/openair1/PHY/defs_L1_NB_IoT.h +++ b/openair1/PHY/defs_L1_NB_IoT.h @@ -52,7 +52,7 @@ # include "COMMON/ral_messages_types.h" # include "UTIL/queue.h" # endif -# include "log.h" +# include "common/utils/LOG/log.h" # define msg(aRGS...) LOG_D(PHY, ##aRGS) # else # define msg printf diff --git a/openair1/PHY/defs_UE.h b/openair1/PHY/defs_UE.h index f079794a34..55f8c9639a 100644 --- a/openair1/PHY/defs_UE.h +++ b/openair1/PHY/defs_UE.h @@ -93,7 +93,7 @@ # include "COMMON/ral_messages_types.h" # include "UTIL/queue.h" # endif -# include "log.h" +# include "common/utils/LOG/log.h" # define msg(aRGS...) LOG_D(PHY, ##aRGS) # else # define msg printf diff --git a/openair1/SCHED_UE/phy_procedures_lte_ue.c b/openair1/SCHED_UE/phy_procedures_lte_ue.c index 2b35ad936b..f8d1a3bae8 100644 --- a/openair1/SCHED_UE/phy_procedures_lte_ue.c +++ b/openair1/SCHED_UE/phy_procedures_lte_ue.c @@ -99,7 +99,7 @@ void get_dumpparam(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id, uint8_t void dump_dlsch(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t subframe,uint8_t harq_pid) { - if (LOG_GENFILEFLAG(DEBUG_UE_PHYPROC)) { + if (LOG_DUMPFLAG(DEBUG_UE_PHYPROC)) { unsigned int coded_bits_per_codeword; uint8_t nsymb ; @@ -131,7 +131,7 @@ void dump_dlsch(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t subf void dump_dlsch_SI(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t subframe) { - if (LOG_GENFILEFLAG(DEBUG_UE_PHYPROC)){ + if (LOG_DUMPFLAG(DEBUG_UE_PHYPROC)){ unsigned int coded_bits_per_codeword; uint8_t nsymb; @@ -234,7 +234,7 @@ unsigned int get_tx_amp(int power_dBm, int power_max_dBm, int N_RB_UL, int nb_rb void dump_dlsch_ra(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t subframe) { - if (LOG_GENFILEFLAG(DEBUG_UE_PHYPROC)){ + if (LOG_DUMPFLAG(DEBUG_UE_PHYPROC)){ unsigned int coded_bits_per_codeword; uint8_t nsymb ; @@ -2708,7 +2708,7 @@ void ue_pbch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, uin } else { - if (LOG_GENFILEFLAG(DEBUG_UE_PHYPROC)) { + if (LOG_DUMPFLAG(DEBUG_UE_PHYPROC)) { LOG_E(PHY,"[UE %d] frame %d, subframe %d, Error decoding PBCH!\n", ue->Mod_id,frame_rx, subframe_rx); @@ -4906,7 +4906,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id, start_meas(&ue->generic_stat); } - if (LOG_GENFILEFLAG(DEBUG_UE_PHYPROC)) { + if (LOG_DUMPFLAG(DEBUG_UE_PHYPROC)) { if(subframe_rx==5 && ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->harq_processes[ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->current_harq_pid]->nb_rb > 20){ //LOG_M("decoder_llr.m","decllr",dlsch_llr,G,1,0); //LOG_M("llr.m","llr", &ue->pdsch_vars[eNB_id]->llr[0][0],(14*nb_rb*12*dlsch1_harq->Qm) - 4*(nb_rb*4*dlsch1_harq->Qm),1,0); diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c index 0545eeb3be..549c7eaa22 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c @@ -38,7 +38,7 @@ #include "liblfds700.h" -#include "log.h" +#include "common/utils/LOG/log.h" /*Flags showing if a mac agent has already been registered*/ unsigned int mac_agent_registered[NUM_MAX_ENB]; diff --git a/openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c b/openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c index e5e242232c..b4bf029373 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c +++ b/openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c @@ -31,7 +31,7 @@ #include "liblfds700.h" -#include "log.h" +#include "common/utils/LOG/log.h" /*Trigger boolean for RRC measurement*/ bool triggered_rrc = false; diff --git a/openair2/ENB_APP/enb_app.c b/openair2/ENB_APP/enb_app.c index 6f1b66c6d0..9490c3f5d8 100644 --- a/openair2/ENB_APP/enb_app.c +++ b/openair2/ENB_APP/enb_app.c @@ -35,7 +35,7 @@ #include "assertions.h" #include "common/ran_context.h" -#include "log.h" +#include "common/utils/LOG/log.h" #if defined(ENABLE_ITTI) # include "intertask_interface.h" diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 07eb5c57c7..4cca5ff8fe 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -571,26 +571,6 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { AssertFatal (i0) { @@ -2231,24 +2211,7 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i) { config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); -#if defined(ENABLE_ITTI) - if (EPC_MODE_ENABLED) { - if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) { - asn_debug = 0; - asn1_xer_print = 0; - } else if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO) == 0) { - asn_debug = 1; - asn1_xer_print = 1; - } else if (strcasecmp(*(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr) , ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING) == 0) { - asn_debug = 1; - asn1_xer_print = 2; - } else { - asn_debug = 0; - asn1_xer_print = 0; - } - } -#endif AssertFatal (inumber_of_dci++; ul_req_index = 0; - dlsch_flag = 0; + for(ul_req_index = 0;ul_req_index < ul_req->number_of_pdus;ul_req_index++){ if(ul_req->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE){ - dlsch_flag = 1; LOG_D(MAC,"Frame %d, Subframe %d:rnti %x ul_req_index %d Switched UCI HARQ to ULSCH HARQ(first)\n",frameP,subframeP,rnti,ul_req_index); break; } diff --git a/openair2/RRC/LTE/MESSAGES/asn1_msg.c b/openair2/RRC/LTE/MESSAGES/asn1_msg.c index 66aae4237a..3a1e7eed87 100644 --- a/openair2/RRC/LTE/MESSAGES/asn1_msg.c +++ b/openair2/RRC/LTE/MESSAGES/asn1_msg.c @@ -91,7 +91,6 @@ #define msg printf #endif -//#define XER_PRINT typedef struct xer_sprint_string_s { char *string; @@ -1353,9 +1352,9 @@ uint8_t do_SIB23(uint8_t Mod_id, } #endif -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message); + } enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message, NULL, (void*)bcch_message, @@ -1607,9 +1606,9 @@ uint8_t do_SidelinkUEInformation(uint8_t Mod_id, uint8_t *buffer, SL_Destinatio break; } -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void*)&ul_dcch_msg); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void*)&ul_dcch_msg); + } enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message, @@ -2165,9 +2164,9 @@ do_RRCConnectionSetup( #endif -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg); + } enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message, NULL, (void*)&dl_ccch_msg, @@ -2240,9 +2239,9 @@ do_SecurityModeCommand( dl_dcch_msg.message.choice.c1.choice.securityModeCommand.criticalExtensions.choice.c1.choice.securityModeCommand_r8.securityConfigSMC.securityAlgorithmConfig.integrityProtAlgorithm = (e_SecurityAlgorithmConfig__integrityProtAlgorithm)integrityProtAlgorithm; -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_DL_DCCH_Message, (void*)&dl_dcch_msg); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_DL_DCCH_Message, (void*)&dl_dcch_msg); + } enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message, NULL, (void*)&dl_dcch_msg, @@ -2320,9 +2319,9 @@ do_UECapabilityEnquiry( ASN_SEQUENCE_ADD(&dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list, &rat); -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_DL_DCCH_Message, (void*)&dl_dcch_msg); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_DL_DCCH_Message, (void*)&dl_dcch_msg); + } enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message, NULL, (void*)&dl_dcch_msg, @@ -2539,9 +2538,9 @@ do_RRCConnectionReconfiguration( enc_rval.failed_type->name, enc_rval.encoded); return -1; } -#ifdef XER_PRINT - xer_fprint(stdout,&asn_DEF_DL_DCCH_Message,(void*)&dl_dcch_msg); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout,&asn_DEF_DL_DCCH_Message,(void*)&dl_dcch_msg); + } #if defined(ENABLE_ITTI) # if !defined(DISABLE_XER_SPRINT) @@ -2742,9 +2741,9 @@ do_RRCConnectionReestablishment( rrcConnectionReestablishment->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r8.nonCriticalExtension = NULL; -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg); + } enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message, NULL, (void*)&dl_ccch_msg, @@ -2804,9 +2803,9 @@ do_RRCConnectionReestablishmentReject( // RRCConnectionReestablishmentReject rrcConnectionReestablishmentReject->criticalExtensions.present = RRCConnectionReestablishmentReject__criticalExtensions_PR_rrcConnectionReestablishmentReject_r8; -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg); + } enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message, NULL, (void*)&dl_ccch_msg, @@ -2867,9 +2866,9 @@ do_RRCConnectionReject( /* let's put a wait time of 1s for the moment */ rrcConnectionReject->criticalExtensions.choice.c1.choice.rrcConnectionReject_r8.waitTime = 1; -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg); + } enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message, NULL, (void*)&dl_ccch_msg, @@ -3061,9 +3060,9 @@ uint8_t do_MBSFNAreaConfig(uint8_t Mod_id, */ ASN_SEQUENCE_ADD(&(*mbsfnAreaConfiguration)->pmch_InfoList_r9.list,pmch_Info_1); -#ifdef XER_PRINT - xer_fprint(stdout,&asn_DEF_MCCH_Message,(void*)mcch_message); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout,&asn_DEF_MCCH_Message,(void*)mcch_message); + } enc_rval = uper_encode_to_buffer(&asn_DEF_MCCH_Message, NULL, (void*)mcch_message, @@ -3339,9 +3338,9 @@ uint8_t do_Paging(uint8_t Mod_id, uint8_t *buffer, ue_paging_identity_t ue_pagin enc_rval.failed_type->name, enc_rval.encoded); return -1; } -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_PCCH_Message, (void*)&pcch_msg); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_PCCH_Message, (void*)&pcch_msg); + } return((enc_rval.encoded+7)/8); } @@ -3504,9 +3503,9 @@ OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname) } UECapability.UE_EUTRA_Capability = UE_EUTRA_Capability; -#ifdef XER_PRINT - xer_fprint(stdout,&asn_DEF_UE_EUTRA_Capability,(void *)UE_EUTRA_Capability); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout,&asn_DEF_UE_EUTRA_Capability,(void *)UE_EUTRA_Capability); + } enc_rval = uper_encode_to_buffer(&asn_DEF_UE_EUTRA_Capability, NULL, (void*)UE_EUTRA_Capability, diff --git a/openair2/RRC/LTE/MESSAGES/asn1_msg_NB_IoT.c b/openair2/RRC/LTE/MESSAGES/asn1_msg_NB_IoT.c index 3ad955928a..20962f3ca1 100644 --- a/openair2/RRC/LTE/MESSAGES/asn1_msg_NB_IoT.c +++ b/openair2/RRC/LTE/MESSAGES/asn1_msg_NB_IoT.c @@ -382,9 +382,9 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id, ASN_SEQUENCE_ADD(&(*sib1_NB_IoT)->systemInfoValueTagList_r13->list,&systemInfoValueTagSI); -#ifdef XER_PRINT //generate xml files - xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message_NB, (void*)bcch_message); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message_NB, (void*)bcch_message); + } enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message_NB, @@ -667,9 +667,9 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id, ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list, sib3_NB_part); -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message_NB, (void*)bcch_message); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message_NB, (void*)bcch_message); + } enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message_NB, NULL, (void*)bcch_message, @@ -887,9 +887,9 @@ uint8_t do_RRCConnectionSetup_NB_IoT( rrcConnectionSetup_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r13.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13 = physicalConfigDedicated2_NB_IoT; rrcConnectionSetup_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r13.radioResourceConfigDedicated_r13.mac_MainConfig_r13 = NULL; -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_DL_CCCH_Message_NB, (void*)&dl_ccch_msg_NB_IoT); + } enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB, NULL, (void*)&dl_ccch_msg_NB_IoT, @@ -939,9 +939,9 @@ uint8_t do_SecurityModeCommand_NB_IoT( = (e_SecurityAlgorithmConfig__integrityProtAlgorithm)integrityProtAlgorithm; //only changed "asn_DEF_DL_DCCH_Message_NB" -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_DL_DCCH_Message_NB, (void*)&dl_dcch_msg_NB_IoT); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_DL_DCCH_Message_NB, (void*)&dl_dcch_msg_NB_IoT); + } enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message_NB, NULL, (void*)&dl_dcch_msg_NB_IoT, @@ -1001,9 +1001,9 @@ uint8_t do_UECapabilityEnquiry_NB_IoT( //no ue_CapabilityRequest (list of RAT_Type) //only changed "asn_DEF_DL_DCCH_Message_NB" -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_DL_DCCH_Message_NB, (void*)&dl_dcch_msg_NB_IoT); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_DL_DCCH_Message_NB, (void*)&dl_dcch_msg_NB_IoT); + } enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message_NB, NULL, (void*)&dl_dcch_msg_NB_IoT, @@ -1110,9 +1110,9 @@ uint16_t do_RRCConnectionReconfiguration_NB_IoT( } //changed only asn_DEF_DL_DCCH_Message_NB -#ifdef XER_PRINT - xer_fprint(stdout,&asn_DEF_DL_DCCH_Message_NB,(void*)&dl_dcch_msg_NB_IoT); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout,&asn_DEF_DL_DCCH_Message_NB,(void*)&dl_dcch_msg_NB_IoT); + } //#if defined(ENABLE_ITTI) //# if !defined(DISABLE_XER_SPRINT)... @@ -1143,9 +1143,9 @@ uint8_t do_RRCConnectionReestablishmentReject_NB_IoT( rrcConnectionReestablishmentReject->criticalExtensions.present = RRCConnectionReestablishmentReject__criticalExtensions_PR_rrcConnectionReestablishmentReject_r8; //Only change in "asn_DEF_DL_CCCH_Message_NB" -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_DL_CCCH_Message_NB, (void*)&dl_ccch_msg_NB_IoT); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_DL_CCCH_Message_NB, (void*)&dl_ccch_msg_NB_IoT); + } enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB, NULL, (void*)&dl_ccch_msg_NB_IoT, @@ -1214,9 +1214,9 @@ uint8_t do_RRCConnectionReject_NB_IoT( RRCConnectionReject_NB_r13_IEs__rrc_SuspendIndication_r13_true; //Only Modified "asn_DEF_DL_CCCH_Message_NB" -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_DL_CCCH_Message_NB, (void*)&dl_ccch_msg); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_DL_CCCH_Message_NB, (void*)&dl_ccch_msg_NB_IoT); + } enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB, NULL, (void*)&dl_ccch_msg_NB_IoT, @@ -1355,9 +1355,9 @@ uint8_t do_RRCConnectionReestablishment_NB_IoT( enc_rval.failed_type->name, enc_rval.encoded); } -#ifdef XER_PRINT - xer_fprint(stdout,&asn_DEF_DL_CCCH_Message_NB,(void*)&dl_ccch_msg_NB_IoT); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout,&asn_DEF_DL_CCCH_Message_NB,(void*)&dl_ccch_msg_NB_IoT); + } #if defined(ENABLE_ITTI) # if !defined(DISABLE_XER_SPRINT) diff --git a/openair2/RRC/LTE/rrc_UE.c b/openair2/RRC/LTE/rrc_UE.c index 8f25cd6287..362306943d 100644 --- a/openair2/RRC/LTE/rrc_UE.c +++ b/openair2/RRC/LTE/rrc_UE.c @@ -99,10 +99,6 @@ int send_ue_information = 0; // for malloc_clear #include "PHY/defs_UE.h" -//#define XER_PRINT - - - extern void pdcp_config_set_security( const protocol_ctxt_t* const ctxt_pP, pdcp_t * const pdcp_pP, @@ -733,9 +729,9 @@ int rrc_ue_decode_ccch( const protocol_ctxt_t* const ctxt_pP, const SRB_INFO* co (uint8_t*)Srb_info->Rx_buffer.Payload, 100,0,0); -#ifdef XER_PRINT - xer_fprint(stdout,&asn_DEF_DL_CCCH_Message,(void*)dl_ccch_msg); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout,&asn_DEF_DL_CCCH_Message,(void*)dl_ccch_msg); + } #if defined(ENABLE_ITTI) # if defined(DISABLE_ITTI_XER_PRINT) @@ -1931,9 +1927,9 @@ rrc_ue_process_securityModeCommand( AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %jd)!\n", enc_rval.failed_type->name, enc_rval.encoded); -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void*)&ul_dcch_msg); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void*)&ul_dcch_msg); + } #if defined(ENABLE_ITTI) # if !defined(DISABLE_XER_SPRINT) @@ -2042,9 +2038,9 @@ rrc_ue_process_ueCapabilityEnquiry( AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %jd)!\n", enc_rval.failed_type->name, enc_rval.encoded); -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void*)&ul_dcch_msg); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void*)&ul_dcch_msg); + } #if defined(ENABLE_ITTI) # if !defined(DISABLE_XER_SPRINT) @@ -2429,9 +2425,9 @@ rrc_ue_decode_dcch( (uint8_t*)Buffer, RRC_BUF_SIZE,0,0); -#ifdef XER_PRINT - xer_fprint(stdout,&asn_DEF_DL_DCCH_Message,(void*)dl_dcch_msg); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout,&asn_DEF_DL_DCCH_Message,(void*)dl_dcch_msg); + } #if defined(ENABLE_ITTI) # if defined(DISABLE_ITTI_XER_PRINT) @@ -4560,9 +4556,9 @@ int decode_MCCH_Message( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB return -1; } -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_MCCH_Message, (void*)mcch); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_MCCH_Message, (void*)mcch); + } if (mcch->message.present == MCCH_MessageType_PR_c1) { LOG_D(RRC,"[UE %d] Found mcch message \n", diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index e34758843d..cac49690af 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -100,7 +100,6 @@ #include "SIMULATION/TOOLS/sim.h" // for taus -//#define XER_PRINT extern RAN_CONTEXT_t RC; @@ -6898,9 +6897,9 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), DCCH, sdu_sizeP); -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void *)ul_dcch_msg); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void *)ul_dcch_msg); + } // confirm with PDCP about the security mode for DCCH //rrc_pdcp_config_req (enb_mod_idP, frameP, 1,CONFIG_ACTION_SET_SECURITY_MODE, (ue_mod_idP * NB_RB_MAX) + DCCH, 0x77); // continue the procedure @@ -6932,9 +6931,9 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), DCCH, sdu_sizeP); -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void *)ul_dcch_msg); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void *)ul_dcch_msg); + } // cancel the security mode in PDCP // followup with the remaining procedure @@ -6974,9 +6973,9 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), DCCH, sdu_sizeP); -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void *)ul_dcch_msg); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void *)ul_dcch_msg); + } LOG_I(RRC, "got UE capabilities for UE %x\n", ctxt_pP->rnti); if (ue_context_p->ue_context.UE_Capability) { LOG_I(RRC, "freeing old UE capabilities for UE %x\n", ctxt_pP->rnti); @@ -6993,9 +6992,9 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { ul_dcch_msg->message.choice.c1.choice.ueCapabilityInformation.criticalExtensions. choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList.list. array[0]->ueCapabilityRAT_Container.size, 0, 0); -#ifdef XER_PRINT - xer_fprint(stdout, &asn_DEF_UE_EUTRA_Capability, ue_context_p->ue_context.UE_Capability); -#endif + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_UE_EUTRA_Capability, ue_context_p->ue_context.UE_Capability); + } if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)) { LOG_E(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Failed to decode UE capabilities (%zu bytes)\n", diff --git a/openair2/RRC/LTE/rrc_eNB_S1AP.c b/openair2/RRC/LTE/rrc_eNB_S1AP.c index 60b3c55c79..7d24228602 100644 --- a/openair2/RRC/LTE/rrc_eNB_S1AP.c +++ b/openair2/RRC/LTE/rrc_eNB_S1AP.c @@ -467,43 +467,20 @@ rrc_pdcp_config_security( &kRRCint); #if !defined(USRP_REC_PLAY) -#define DEBUG_SECURITY 1 + SET_LOG_DUMP(DEBUG_SECURITY) ; #endif -#if defined (DEBUG_SECURITY) -#undef msg -#define msg printf - if (print_keys ==1 ) { - print_keys =0; - int i; - msg("\nKeNB:"); + if ( LOG_DUMPFLAG( DEBUG_SECURITY ) ) { + if (print_keys ==1 ) { + print_keys =0; - for(i = 0; i < 32; i++) { - msg("%02x", ue_context_pP->ue_context.kenb[i]); + LOG_DUMPMSG(RRC, DEBUG_SECURITY, ue_context_pP->ue_context.kenb, 32,"\nKeNB:" ); + LOG_DUMPMSG(RRC, DEBUG_SECURITY, kRRCenc, 32,"\nKRRCenc:" ); + LOG_DUMPMSG(RRC, DEBUG_SECURITY, kRRCint, 32,"\nKRRCint:" ); } - - msg("\n"); - - msg("\nKRRCenc:"); - - for(i = 0; i < 32; i++) { - msg("%02x", kRRCenc[i]); - } - - msg("\n"); - - msg("\nKRRCint:"); - - for(i = 0; i < 32; i++) { - msg("%02x", kRRCint[i]); - } - - msg("\n"); - } -#endif //DEBUG_SECURITY key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, DCCH, SRB_FLAG_YES); h_rc = hashtable_get(pdcp_coll_p, key, (void**)&pdcp_p); diff --git a/openair2/X2AP/x2ap_common.h b/openair2/X2AP/x2ap_common.h index 1a4889f0f0..d2ff3b40d1 100644 --- a/openair2/X2AP/x2ap_common.h +++ b/openair2/X2AP/x2ap_common.h @@ -57,7 +57,6 @@ #define FALSE 0 #endif -extern int asn_debug; extern int asn1_xer_print; #if defined(ENB_MODE) diff --git a/openair3/NAS/COMMON/UTIL/nas_log.c b/openair3/NAS/COMMON/UTIL/nas_log.c deleted file mode 100644 index 6af90c4be8..0000000000 --- a/openair3/NAS/COMMON/UTIL/nas_log.c +++ /dev/null @@ -1,273 +0,0 @@ -/* - * 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.1 (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 - */ - -/***************************************************************************** -Source nas_log.c - -Version 0.1 - -Date 2012/02/28 - -Product NAS stack - -Subsystem Utilities - -Author Frederic Maurel - -Description Usefull logging functions - -*****************************************************************************/ - -#include "nas_log.h" -#if defined(NAS_BUILT_IN_UE) && defined(NAS_UE) -int nas_log_func_indent; -#else -#include // stderr, sprintf, fprintf, vfprintf -#include // va_list, va_start, va_end -#include // strlen - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/* ANSI escape codes for colored display */ -#define LOG_BLACK "\033[30m" -#define LOG_RED "\033[31m" -#define LOG_GREEN "\033[32m" -#define LOG_YELLOW "\033[33m" -#define LOG_BLUE "\033[34m" -#define LOG_MAGENTA "\033[35m" -#define LOG_CYAN "\033[36m" -#define LOG_WHITE "\033[37m" -#define LOG_END "\033[0m" -#define LOG_AUTO LOG_END - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/* ------------------------ - * Internal logging context - * ------------------------ - * Internal logging context consists on: - * - The file name and the line number from where the data have been - * logged. These information are gathered into a string that will - * be displayed as a prefix of the logging trace with the format - * filename[line] - * - The severity level filter - * - The indentation level to convey FUNC logging traces - * - The data definition of each logging trace level: name and mask - * (the mask is used against the severity level filter to enable - * or disable specific logging traces) - */ -typedef struct { -#define LOG_PREFIX_SIZE 118 - char prefix[LOG_PREFIX_SIZE]; - unsigned char filter; - int indent; - const struct { - char* name; - unsigned char mask; - char* color; - } level[]; -} log_context_t; - -/* - * Definition of the logging context - */ -static log_context_t _log_context = { - "", /* prefix */ - 0x00, /* filter */ - 0, /* indent */ - { - { "DEBUG", NAS_LOG_DEBUG, LOG_GREEN }, /* DEBUG */ - { "INFO", NAS_LOG_INFO, LOG_AUTO }, /* INFO */ - { "WARNING", NAS_LOG_WARNING, LOG_BLUE }, /* WARNING */ - { "ERROR", NAS_LOG_ERROR, LOG_RED }, /* ERROR */ - { "", NAS_LOG_FUNC, LOG_AUTO }, /* FUNC_IN */ - { "", NAS_LOG_FUNC, LOG_AUTO }, /* FUNC_OUT */ - } /* level[] */ -}; - -/* Maximum number of bytes into a line of dump logging data */ -#define LOG_DUMP_LINE_SIZE 16 - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: log_init() ** - ** ** - ** Description: Initializes internal logging data ** - ** ** - ** Inputs: filter: Value of the severity level that will be ** - ** used as a filter to enable or disable ** - ** specific logging traces ** - ** Others: None ** - ** ** - ** Outputs: Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -void nas_log_init(char filter) -{ - _log_context.filter = filter; -} - -/**************************************************************************** - ** ** - ** Name: log_data() ** - ** ** - ** Description: Defines internal logging data ** - ** ** - ** Inputs: filename: Name of the file from where the data have ** - ** been logged ** - ** line: Number of the line in the file ** - ** Others: None ** - ** ** - ** Outputs: Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -void log_data(const char* filename, int line) -{ - int len = strlen(filename) + 2 + 1; //2:[], 1:/0 - if (line > 9999) len+=5; - else if (line > 999) len+=4; - else if (line > 99) len+=3; - else if (line > 9) len+=2; - else len+=1; - if (len > LOG_PREFIX_SIZE) { - snprintf(_log_context.prefix, LOG_PREFIX_SIZE, "%s:%d", &filename[len - LOG_PREFIX_SIZE], line); - } else { - snprintf(_log_context.prefix, LOG_PREFIX_SIZE, "%s:%d", filename, line); - } -} - -/**************************************************************************** - ** ** - ** Name: log_trace() ** - ** ** - ** Description: Displays logging data ** - ** ** - ** Inputs: severity: Severity level of the logging data ** - ** data: Formated logging data to display ** - ** Others: None ** - ** ** - ** Outputs: Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -void log_trace(log_severity_t severity, const char* data, ...) -{ - int i; - - /* Sanity check */ - if (severity > LOG_SEVERITY_MAX) return; - - /* Display only authorized logging traces */ - if (_log_context.level[severity].mask & _log_context.filter) { - va_list argp; - - /* - * First, display internal logging data (logging trace prefix: file - * name and line number from where the data have been logged) and - * the severity level. - */ - fprintf(stderr, "%s%-120.118s%-10s", _log_context.level[severity].color, - _log_context.prefix, _log_context.level[severity].name); - { - /* Next, perform indentation for FUNC logging trace */ - if (severity == FUNC_OUT) { - _log_context.indent--; - } - - for (i=0; i<_log_context.indent; i++) { - fprintf(stderr, " "); - } - - if (severity == FUNC_IN) { - _log_context.indent++; - } - } - - /* Finally, display logging data */ - va_start(argp, data); - vfprintf(stderr, data, argp); - - /* Terminate with line feed character */ - fprintf(stderr, "%s\n", LOG_END); - - va_end(argp); - } -} - -/**************************************************************************** - ** ** - ** Name: log_dump() ** - ** ** - ** Description: Dump logging data ** - ** ** - ** Inputs: data: Logging data to dump ** - ** len: Number of bytes to be dumped ** - ** Others: None ** - ** ** - ** Outputs: Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -void log_dump(const char* data, int len) -{ - int i; - - /* Display only authorized logging traces */ - if ( (len > 0) && (NAS_LOG_HEX & _log_context.filter) ) { - int bytes = 0; - - fprintf(stderr, "\n\t"); - - for (i=0; i < len; i++) { - fprintf(stderr, "%.2hx ", (const unsigned char) data[i]); - - /* Add new line when the number of displayed bytes exceeds - * the line's size */ - if ( ++bytes > (LOG_DUMP_LINE_SIZE - 1) ) { - bytes = 0; - fprintf(stderr, "\n\t"); - } - } - - if (bytes % LOG_DUMP_LINE_SIZE) { - fprintf(stderr, "\n"); - } - - fprintf(stderr, "\n"); - fflush(stderr); - } -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ -#endif - diff --git a/openair3/NAS/COMMON/UTIL/nas_log.h b/openair3/NAS/COMMON/UTIL/nas_log.h index c36e0795c7..b41e34c51b 100644 --- a/openair3/NAS/COMMON/UTIL/nas_log.h +++ b/openair3/NAS/COMMON/UTIL/nas_log.h @@ -95,7 +95,7 @@ typedef enum { /****************** E X P O R T E D F U N C T I O N S ******************/ /****************************************************************************/ -#if defined(NAS_BUILT_IN_UE) && defined(NAS_UE) +#ifdef LOG_E # define LOG_TRACE(s, x, args...) \ do { \ switch (s) { \ @@ -106,54 +106,21 @@ do { \ } \ } while (0) -# define LOG_DUMP(dATA, lEN) \ -do { \ - char buffer[3*lEN + 1]; \ - int i; \ - for (i = 0; i < lEN; i++) \ - sprintf (&buffer[3*i], "%02x ", dATA[i]); \ - LOG_D(NAS, " Dump %d: %s\n", lEN, buffer); \ -} while (0) - -# define LOG_FUNC_IN \ -do { \ - LOG_D(NAS, " %s:%d %*sEntering %s()\n", __FILE__, __LINE__, nas_log_func_indent, "", __FUNCTION__); \ - nas_log_func_indent += 2; \ -} while (0) - -# define LOG_FUNC_OUT \ -do { \ - nas_log_func_indent -= 2; \ - LOG_D(NAS, " %s:%d %*sLeaving %s()\n", __FILE__, __LINE__, nas_log_func_indent, "", __FUNCTION__); \ -} while (0) - -# define LOG_FUNC_RETURN(rETURNcODE) \ -do { \ - nas_log_func_indent -= 2; \ - LOG_D(NAS, " %s:%d %*sLeaving %s(rc = %ld)\n", __FILE__, __LINE__, nas_log_func_indent, "", \ - __FUNCTION__, (long) (rETURNcODE)); \ - return (rETURNcODE); \ -} while (0) +# define LOG_DUMP(dATA, lEN) LOG_DUMPMSG(NAS, DEBUG_NAS,dATA, lEN, " Dump %d:\n", lEN) +# define LOG_FUNC_IN LOG_ENTER(NAS) +# define LOG_FUNC_OUT LOG_END(NAS) +# define LOG_FUNC_RETURN(rETURNcODE) LOG_RETURN(NAS,rETURNcODE) extern int nas_log_func_indent; #else -# define LOG_TRACE log_data(__FILE__, __LINE__); log_trace -# define LOG_DUMP(a, b) log_dump((a),(b)); +# define LOG_TRACE(s, x, args...) +# define LOG_DUMP(dATA, lEN) LOG_DUMPMSG(NAS, LOG_DUMP_CHAR,dATA, lEN, " Dump %d:\n", lEN) -# define LOG_FUNC_IN LOG_TRACE(FUNC_IN, "Entering %s()", __FUNCTION__) -# define LOG_FUNC_OUT LOG_TRACE(FUNC_OUT, "Leaving %s()", __FUNCTION__) -# define LOG_FUNC_RETURN(rETURNcODE) \ -do { \ - LOG_TRACE(FUNC_OUT, "Leaving %s(rc = %ld)", __FUNCTION__, \ - (long) (rETURNcODE)); \ - return (rETURNcODE); \ -} while(0) +# define LOG_FUNC_IN +# define LOG_FUNC_OUT +# define LOG_FUNC_RETURN(rETURNcODE) return rETURNcODE \ -void nas_log_init(char filter); -void log_data(const char* filename, int line); -void log_trace(log_severity_t severity, const char* data, ...); -void log_dump(const char* data, int len); #endif #endif /* __NAS_LOG_H__*/ diff --git a/openair3/NAS/UE/EMM/SAP/emm_fsm.c b/openair3/NAS/UE/EMM/SAP/emm_fsm.c index d614b9ec7e..5a715727ad 100644 --- a/openair3/NAS/UE/EMM/SAP/emm_fsm.c +++ b/openair3/NAS/UE/EMM/SAP/emm_fsm.c @@ -208,8 +208,7 @@ emm_fsm_state_t emm_fsm_initialize() { LOG_FUNC_IN; - LOG_FUNC_OUT; - return EMM_NULL; + LOG_FUNC_RETURN(EMM_NULL); } /**************************************************************************** diff --git a/openair3/S1AP/s1ap_common.c b/openair3/S1AP/s1ap_common.c index 7c4f970af2..d31c6e5839 100644 --- a/openair3/S1AP/s1ap_common.c +++ b/openair3/S1AP/s1ap_common.c @@ -32,26 +32,9 @@ #include "s1ap_common.h" #include "S1AP_S1AP-PDU.h" -int asn_debug = 0; + int asn1_xer_print = 0; -#if defined(EMIT_ASN_DEBUG_EXTERN) -inline void ASN_DEBUG(const char *fmt, ...) -{ - if (asn_debug) { - int adi = asn_debug_indent; - va_list ap; - va_start(ap, fmt); - fprintf(stderr, "[ASN1]"); - - while(adi--) fprintf(stderr, " "); - - vfprintf(stderr, fmt, ap); - fprintf(stderr, "\n"); - va_end(ap); - } -} -#endif void s1ap_handle_criticality(S1AP_Criticality_t criticality) { diff --git a/openair3/S1AP/s1ap_common.h b/openair3/S1AP/s1ap_common.h index 8a2faa311f..94b3e43bc6 100644 --- a/openair3/S1AP/s1ap_common.h +++ b/openair3/S1AP/s1ap_common.h @@ -31,13 +31,16 @@ #ifndef S1AP_COMMON_H_ #define S1AP_COMMON_H_ -/* Defined in asn_internal.h */ -// extern int asn_debug_indent; -extern int asn_debug; -#if defined(EMIT_ASN_DEBUG_EXTERN) -inline void ASN_DEBUG(const char *fmt, ...); +#include "common/utils/LOG/log.h" +/* replace ASN_DEBUG defined in asn_internal.h by oai tracing system + Would be cleaner to modify asn_internal.h but it seems to come + from non oai source, with BSD license, so prefer to do that here.. +*/ +#ifdef ASN_DEBUG +# undef ASN_DEBUG #endif +#define ASN_DEBUG( x... ) LOG_I(ASN, x) #include "S1AP_ProtocolIE-Field.h" #include "S1AP_S1AP-PDU.h" diff --git a/openair3/UTILS/log.c b/openair3/UTILS/log.c deleted file mode 100644 index 5ddebd415c..0000000000 --- a/openair3/UTILS/log.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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.1 (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 - */ - -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include "log.h" - -/* mme log */ -int log_enabled = 0; - -int log_init(const mme_config_t *mme_config_p, - log_specific_init_t specific_init) -{ - if (mme_config_p->verbosity_level == 1) { - log_enabled = 1; - } else if (mme_config_p->verbosity_level == 2) { - log_enabled = 1; - } else { - log_enabled = 0; - } - - return specific_init(mme_config_p->verbosity_level); -} diff --git a/openair3/UTILS/log.h b/openair3/UTILS/log.h deleted file mode 100644 index 7b712df755..0000000000 --- a/openair3/UTILS/log.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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.1 (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 - */ - -#include "mme_config.h" - -#ifndef LOG_H_ -#define LOG_H_ - -/* asn1c debug */ -extern int asn_debug; -extern int asn1_xer_print; -extern int fd_g_debug_lvl; - -typedef int (*log_specific_init_t)(int log_level); - -int log_init(const mme_config_t *mme_config, - log_specific_init_t specific_init); - -#endif /* LOG_H_ */ diff --git a/targets/COMMON/create_tasks.c b/targets/COMMON/create_tasks.c index 4a790b8806..f8230928dd 100644 --- a/targets/COMMON/create_tasks.c +++ b/targets/COMMON/create_tasks.c @@ -22,7 +22,7 @@ #if defined(ENABLE_ITTI) # include "intertask_interface.h" # include "create_tasks.h" -# include "log.h" +# include "common/utils/LOG/log.h" # ifdef OPENAIR2 # if defined(ENABLE_USE_MME) diff --git a/targets/COMMON/create_tasks_ue.c b/targets/COMMON/create_tasks_ue.c index db531b0e9d..20b5979f31 100644 --- a/targets/COMMON/create_tasks_ue.c +++ b/targets/COMMON/create_tasks_ue.c @@ -22,7 +22,7 @@ #if defined(ENABLE_ITTI) # include "intertask_interface.h" # include "create_tasks.h" -# include "log.h" +# include "common/utils/LOG/log.h" # ifdef OPENAIR2 # if defined(ENABLE_USE_MME) diff --git a/targets/RT/USER/lte-softmodem.h b/targets/RT/USER/lte-softmodem.h index 2f8209f2d3..a1f26de5dc 100644 --- a/targets/RT/USER/lte-softmodem.h +++ b/targets/RT/USER/lte-softmodem.h @@ -192,7 +192,7 @@ } #define CONFIG_HLP_FLOG "Enable online log \n" -#define CONFIG_HLP_LOGL "Set the global log level, valide options: (9:trace, 8/7:debug, 6:info, 4:warn, 3:error)\n" +#define CONFIG_HLP_LOGL "Set the global log level, valide options: (4:trace, 3:debug, 2:info, 1:warn, (0:error))\n" #define CONFIG_HLP_TELN "Start embedded telnet server \n" /*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ /* command line parameters for LOG utility */ diff --git a/targets/RT/USER/lte-uesoftmodem.c b/targets/RT/USER/lte-uesoftmodem.c index bf0abf1507..57b1dfb105 100644 --- a/targets/RT/USER/lte-uesoftmodem.c +++ b/targets/RT/USER/lte-uesoftmodem.c @@ -830,21 +830,6 @@ int main( int argc, char **argv ) //randominit (0); set_taus_seed (0); - - set_log(HW, OAILOG_DEBUG ); - set_log(PHY, OAILOG_INFO ); - set_log(MAC, OAILOG_INFO ); - set_log(RLC, OAILOG_INFO ); - set_log(PDCP, OAILOG_INFO ); - set_log(OTG, OAILOG_INFO ); - set_log(RRC, OAILOG_INFO ); -#if defined(ENABLE_ITTI) - set_log(SIM, OAILOG_INFO ); -# if defined(ENABLE_USE_MME) - set_log(NAS, OAILOG_INFO ); -# endif -#endif - cpuf=get_cpu_freq_GHz(); pthread_cond_init(&sync_cond,NULL); From 77f70e77eaff2e29a39dc69680ea47a019d54d95 Mon Sep 17 00:00:00 2001 From: frtabu Date: Fri, 24 Aug 2018 17:40:14 +0200 Subject: [PATCH 034/379] MSC logging utility as a config option --- cmake_targets/CMakeLists.txt | 19 ++++----- cmake_targets/build_oai | 19 ++++++++- cmake_targets/nas_sim_tools/CMakeLists.txt | 1 - common/utils/LOG/log.c | 5 ++- common/utils/load_module_shlib.c | 4 +- common/utils/load_module_shlib.h | 5 ++- common/utils/msc/msc.c | 29 ++++++++++--- common/utils/msc/msc.h | 47 +++++++++++++--------- openair1/PHY/CODING/coding_load.c | 2 +- openair1/SCHED/phy_procedures_lte_eNb.c | 12 +++--- openair2/ENB_APP/NB_IoT_interface.c | 2 +- openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c | 12 +++--- openair3/S1AP/s1ap_eNB_handlers.c | 2 +- openair3/S1AP/s1ap_eNB_nas_procedures.c | 13 ++---- targets/ARCH/COMMON/common_lib.c | 2 +- targets/RT/USER/lte-softmodem.c | 13 +++--- targets/RT/USER/lte-softmodem.h | 2 + targets/RT/USER/lte-uesoftmodem.c | 10 +++-- 18 files changed, 122 insertions(+), 77 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 7ad0a2d620..b38bb05642 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -882,12 +882,9 @@ add_library(HASHTABLE ) include_directories(${OPENAIR_DIR}/common/utils/hashtable) -if (MESSAGE_CHART_GENERATOR) - add_library(MSC - ${OPENAIR_DIR}/common/utils/msc/msc.c - ) - set(MSC_LIB MSC) -endif() +add_library(msc MODULE ${OPENAIR_DIR}/common/utils/msc/msc.c ) +target_link_libraries (msc LFDS) + include_directories(${OPENAIR_DIR}/common/utils/msc) set(UTIL_SRC @@ -1936,7 +1933,7 @@ add_executable(lte-softmodem target_link_libraries (lte-softmodem -Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2 - ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 + ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -Wl,--end-group z dl) @@ -1972,7 +1969,7 @@ add_executable(lte-softmodem-nos1 ) target_link_libraries (lte-softmodem-nos1 -Wl,--start-group - RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2 ${MSC_LIB} ${RAL_LIB} ${ITTI_LIB} + RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2 ${RAL_LIB} ${ITTI_LIB} ${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -Wl,--end-group z dl ) @@ -2012,7 +2009,7 @@ add_executable(lte-uesoftmodem target_link_libraries (lte-uesoftmodem -Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU - ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} + ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -Wl,--end-group z dl) @@ -2050,7 +2047,7 @@ add_executable(lte-uesoftmodem-nos1 target_link_libraries (lte-uesoftmodem-nos1 -Wl,--start-group - RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU ${MSC_LIB} ${RAL_LIB} ${ITTI_LIB} + RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU ${RAL_LIB} ${ITTI_LIB} ${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -Wl,--end-group z dl ) @@ -2128,7 +2125,7 @@ add_executable(test_epc_generate_scenario ${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h ) target_link_libraries (test_epc_generate_scenario - -Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} + -Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS ${ITTI_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} ) add_executable(test_epc_play_scenario diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index c15e1e8ec7..3954827c09 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -40,7 +40,7 @@ set_openair_env gen_nvram_path=$OPENAIR_DIR/targets/bin conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf -MSC_GEN="False" +MSC_GEN=0 XFORMS="True" UE_EXPANSION="False" PRINT_STATS="False" @@ -155,6 +155,10 @@ Options Disable all LOG_* macros --build-eclipse Build eclipse project files. Paths are auto corrected by fixprj.sh +--build-telnet + Build telnet server, specify --telnetsrv on command line to start it (eNB only) +--build-msc + Build MSC tracing utility, specify --msc on command line to start it (eNB and UE) --usrp-recplay Build for I/Q record-playback modes --ue-nas-use-tun @@ -345,6 +349,10 @@ function main() { --build-telnetsrv) BUILD_TELNETSRV=1 echo_info "Build embedded telnet server" + shift ;; + --build-msc) + MSC_GEN=1 + echo_info "Build MSC tracing utility" shift ;; --usrp-recplay) USRP_REC_PLAY="True" @@ -690,6 +698,15 @@ function main() { $build_dir telnetsrv \ libtelnetsrv.so $dbin/libtelnetsrv.so + fi + # Telnet server compilation + ##################### + if [ "$MSC_GEN" = "1" ] ; then + build_dir=$lte_build_dir + compilations \ + $build_dir msc \ + libmsc.so $dbin/libmsc.so + fi # build RF device and transport protocol libraries ##################################### diff --git a/cmake_targets/nas_sim_tools/CMakeLists.txt b/cmake_targets/nas_sim_tools/CMakeLists.txt index 81e3fe4b3c..c1a0bb419b 100644 --- a/cmake_targets/nas_sim_tools/CMakeLists.txt +++ b/cmake_targets/nas_sim_tools/CMakeLists.txt @@ -27,7 +27,6 @@ set(CONF2UEDATA_LIB_SRC ${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/usim_api.c ${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/aka_functions.c ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/memory.c - ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/nas_log.c ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/OctetString.c ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/TLVEncoder.c ${OPENAIR_DIR}/common/utils/utils.c diff --git a/common/utils/LOG/log.c b/common/utils/LOG/log.c index 7a840f22e2..c1f11c0bfd 100644 --- a/common/utils/LOG/log.c +++ b/common/utils/LOG/log.c @@ -455,13 +455,14 @@ int rt = pthread_getname_np(pthread_self(), threadname,bufsize) ; int inline log_header(char *log_buffer, int buffsize, int comp, int level,const char *format) { char threadname[PR_SET_NAME]; -return snprintf(log_buffer, buffsize , "%s%s[%s]%c %s %s", +return snprintf(log_buffer, buffsize , "%s%s[%s]%c %s %s%s", log_level_highlight_end[level], ( (g_log->flag & FLAG_NOCOLOR)?"":log_level_highlight_start[level]), g_log->log_component[comp].name, ( (g_log->flag & FLAG_LEVEL)?g_log->level2string[level]:' '), ( (g_log->flag & FLAG_THREAD)?log_getthreadname(threadname,PR_SET_NAME+1):""), - format); + format, + log_level_highlight_end[level]); } void logRecord_mt(const char *file, const char *func, int line, int comp, int level, const char* format, ... ) diff --git a/common/utils/load_module_shlib.c b/common/utils/load_module_shlib.c index c8a293f279..c0afdb0b64 100644 --- a/common/utils/load_module_shlib.c +++ b/common/utils/load_module_shlib.c @@ -118,7 +118,7 @@ int ret; return tmpstr; } -int load_module_shlib(char *modname,loader_shlibfunc_t *farray, int numf) +int load_module_shlib(char *modname,loader_shlibfunc_t *farray, int numf, void *autoinit_arg) { void *lib_handle; initfunc_t fpi; @@ -155,7 +155,7 @@ int load_module_shlib(char *modname,loader_shlibfunc_t *farray, int numf) fpi = dlsym(lib_handle,afname); if (fpi != NULL ) { - fpi(); + fpi(autoinit_arg); } if (farray != NULL) { diff --git a/common/utils/load_module_shlib.h b/common/utils/load_module_shlib.h index 6cfd41ac78..685b3d1b65 100644 --- a/common/utils/load_module_shlib.h +++ b/common/utils/load_module_shlib.h @@ -59,7 +59,8 @@ typedef struct { /* function type of functions which may be implemented by a module */ /* 1: init function, called when loading, if found in the shared lib */ -typedef int(*initfunc_t)(void); +typedef int(*initfunc_t)(void *); + /* 2: version checking function, called when loading, if it returns -1, trigger main exec abort */ typedef int(*checkverfunc_t)(char * mainexec_version, char ** shlib_version); /* 3: get function array function, called when loading when a module doesn't provide */ @@ -83,7 +84,7 @@ loader_data_t loader_data; /*-------------------------------------------------------------------------------------------------------------*/ #else /* LOAD_MODULE_SHLIB_MAIN */ -extern int load_module_shlib(char *modname, loader_shlibfunc_t *farray, int numf); +extern int load_module_shlib(char *modname, loader_shlibfunc_t *farray, int numf, void *initfunc_arg); extern void * get_shlibmodule_fptr(char *modname, char *fname); extern loader_data_t loader_data; #endif /* LOAD_MODULE_SHLIB_MAIN */ diff --git a/common/utils/msc/msc.c b/common/utils/msc/msc.c index bb88b9b4b6..8ff8846b70 100644 --- a/common/utils/msc/msc.c +++ b/common/utils/msc/msc.c @@ -32,11 +32,15 @@ #include #include +#define MSC_LIBRARY +#include "msc.h" + #include "liblfds611.h" #include "intertask_interface.h" #include "timer.h" -#include "msc.h" + + #include "assertions.h" //------------------------------- @@ -67,8 +71,8 @@ void *msc_task(void *args_p) //------------------------------------------------------------------------------ { MessageDef *received_message_p = NULL; - const char *msg_name = NULL; - instance_t instance = 0; +// const char *msg_name = NULL; +// instance_t instance = 0; long timer_id; itti_mark_task_ready(TASK_MSC); @@ -88,9 +92,9 @@ void *msc_task(void *args_p) itti_receive_msg(TASK_MSC, &received_message_p); if (received_message_p != NULL) { - msg_name = ITTI_MSG_NAME (received_message_p); - instance = ITTI_MSG_INSTANCE (received_message_p); - +// msg_name = ITTI_MSG_NAME (received_message_p); +// instance = ITTI_MSG_INSTANCE (received_message_p); + switch (ITTI_MSG_ID(received_message_p)) { case TIMER_HAS_EXPIRED: { @@ -571,4 +575,17 @@ error_event: free(new_item_p); } +//------------------------------------------------------------------------------ +// function called when oai loader loads the msc shared lib +int msc_autoinit(msc_interface_t *msc_interface) +//------------------------------------------------------------------------------ + { + msc_interface->msc_init = msc_init; + msc_interface->msc_start_use = msc_start_use; + msc_interface->msc_end = msc_end; + msc_interface->msc_log_event = msc_log_event; + msc_interface->msc_log_message = msc_log_message; + msc_interface->msc_loaded = 1; + return 0; + } diff --git a/common/utils/msc/msc.h b/common/utils/msc/msc.h index 4493a5239a..78eb6cdb08 100644 --- a/common/utils/msc/msc.h +++ b/common/utils/msc/msc.h @@ -73,7 +73,23 @@ typedef enum { #define MSC_AS_TIME_ARGS(CTXT_Pp) \ (CTXT_Pp)->frame, \ (CTXT_Pp)->subframe -#if defined(MESSAGE_CHART_GENERATOR) + +typedef int(*msc_init_t)(const msc_env_t, const int ); +typedef void(*msc_start_use_t)(void ); +typedef void(*msc_end_t)(void); +typedef void(*msc_log_event_t)(const msc_proto_t,char *, ...); +typedef void(*msc_log_message_t)(const char * const, const msc_proto_t, const msc_proto_t, + const uint8_t* const, const unsigned int, char * , ...); +typedef struct msc_interface { + int msc_loaded; + msc_init_t msc_init; + msc_start_use_t msc_start_use; + msc_end_t msc_end; + msc_log_event_t msc_log_event; + msc_log_message_t msc_log_message; +} msc_interface_t; + +#ifdef MSC_LIBRARY int msc_init(const msc_env_t envP, const int max_threadsP); void msc_start_use(void); void msc_flush_messages(void); @@ -88,22 +104,17 @@ void msc_log_message( const unsigned int num_bytes, char *format, ...); -#define MSC_INIT(arg1,arg2) msc_init(arg1,arg2) -#define MSC_START_USE msc_start_use -#define MSC_END msc_end -#define MSC_LOG_EVENT(mScPaRaMs, fORMAT, aRGS...) msc_log_event(mScPaRaMs, fORMAT, ##aRGS) -#define MSC_LOG_RX_MESSAGE(rECEIVER, sENDER, bYTES, nUMbYTES, fORMAT, aRGS...) msc_log_message("<-",rECEIVER, sENDER, bYTES, nUMbYTES, fORMAT, ##aRGS) -#define MSC_LOG_RX_DISCARDED_MESSAGE(rECEIVER, sENDER, bYTES, nUMbYTES, fORMAT, aRGS...) msc_log_message("x-",rECEIVER, sENDER, bYTES, nUMbYTES, fORMAT, ##aRGS) -#define MSC_LOG_TX_MESSAGE(sENDER, rECEIVER, bYTES, nUMbYTES, fORMAT, aRGS...) msc_log_message("->",sENDER, rECEIVER, bYTES, nUMbYTES, fORMAT, ##aRGS) -#define MSC_LOG_TX_MESSAGE_FAILED(sENDER, rECEIVER, bYTES, nUMbYTES, fORMAT, aRGS...) msc_log_message("-x",sENDER, rECEIVER, bYTES, nUMbYTES, fORMAT, ##aRGS) #else -#define MSC_INIT(arg1,arg2) -#define MSC_START_USE(mScPaRaMs) -#define MSC_END(mScPaRaMs) -#define MSC_LOG_EVENT(mScPaRaMs, fORMAT, aRGS...) -#define MSC_LOG_RX_MESSAGE(mScPaRaMs, fORMAT, aRGS...) -#define MSC_LOG_RX_DISCARDED_MESSAGE(mScPaRaMs, fORMAT, aRGS...) -#define MSC_LOG_TX_MESSAGE(mScPaRaMs, fORMAT, aRGS...) -#define MSC_LOG_TX_MESSAGE_FAILED(mScPaRaMs, fORMAT, aRGS...) -#endif + +msc_interface_t msc_interface; +#define MSC_INIT(arg1,arg2) if(msc_interface.msc_loaded) msc_interface.msc_init(arg1,arg2) +#define MSC_START_USE if(msc_interface.msc_loaded) msc_interface.msc_start_use +#define MSC_END if(msc_interface.msc_loaded) msc_interface.msc_end +#define MSC_LOG_EVENT(mScPaRaMs, fORMAT, aRGS...) if(msc_interface.msc_loaded) msc_interface.msc_log_event(mScPaRaMs, fORMAT, ##aRGS) +#define MSC_LOG_RX_MESSAGE(rECEIVER, sENDER, bYTES, nUMbYTES, fORMAT, aRGS...) if(msc_interface.msc_loaded) msc_interface.msc_log_message("<-",rECEIVER, sENDER, (const uint8_t *)bYTES, nUMbYTES, fORMAT, ##aRGS) +#define MSC_LOG_RX_DISCARDED_MESSAGE(rECEIVER, sENDER, bYTES, nUMbYTES, fORMAT, aRGS...) if(msc_interface.msc_loaded) msc_interface.msc_log_message("x-",rECEIVER, sENDER, (const uint8_t *)bYTES, nUMbYTES, fORMAT, ##aRGS) +#define MSC_LOG_TX_MESSAGE(sENDER, rECEIVER, bYTES, nUMbYTES, fORMAT, aRGS...) if(msc_interface.msc_loaded) msc_interface.msc_log_message("->",sENDER, rECEIVER, (const uint8_t *)bYTES, nUMbYTES, fORMAT, ##aRGS) +#define MSC_LOG_TX_MESSAGE_FAILED(sENDER, rECEIVER, bYTES, nUMbYTES, fORMAT, aRGS...) if(msc_interface.msc_loaded) msc_interface.msc_log_message("-x",sENDER, rECEIVER, (const uint8_t *)bYTES, nUMbYTES, fORMAT, ##aRGS) #endif + +#endif diff --git a/openair1/PHY/CODING/coding_load.c b/openair1/PHY/CODING/coding_load.c index a895d9648e..30b876c654 100644 --- a/openair1/PHY/CODING/coding_load.c +++ b/openair1/PHY/CODING/coding_load.c @@ -130,7 +130,7 @@ int load_codinglib(void) { shlib_fdesc[ENCODE_SSE_FPTRIDX].fname= "threegpplte_turbo_encoder_sse"; shlib_fdesc[ENCODE_C_FPTRIDX].fname= "threegpplte_turbo_encoder"; shlib_fdesc[ENCODE_INIT_SSE_FPTRIDX].fname= "init_encoder_sse"; - ret=load_module_shlib("coding",shlib_fdesc,DECODE_NUM_FPTR); + ret=load_module_shlib("coding",shlib_fdesc,DECODE_NUM_FPTR,NULL); if (ret < 0) exit_fun("Error loading coding library"); /* execute encoder/decoder init functions */ diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index a6a44c66e2..2a3f22cd51 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -347,7 +347,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB, dlsch_harq->rvidx, dlsch_harq->round); } -#if defined(MESSAGE_CHART_GENERATOR_PHY) + MSC_LOG_TX_MESSAGE( MSC_PHY_ENB,MSC_PHY_UE, NULL,0, @@ -368,7 +368,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB, pmi2hex_2Ar1(dlsch_harq->pmi_alloc), dlsch_harq->rvidx, dlsch_harq->round); -#endif + if (ue_stats) ue_stats->dlsch_sliding_cnt++; @@ -1375,7 +1375,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ulsch->harq_mask &= ~(1 << harq_pid); ulsch_harq->round = 0; } -#if defined(MESSAGE_CHART_GENERATOR_PHY) + MSC_LOG_RX_DISCARDED_MESSAGE( MSC_PHY_ENB,MSC_PHY_UE, NULL,0, @@ -1384,7 +1384,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ulsch->rnti,harq_pid, ulsch_harq->round-1 ); -#endif + /* Mark the HARQ process to release it later if max transmission reached * (see below). @@ -1403,7 +1403,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) T(T_ENB_PHY_ULSCH_UE_ACK, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe), T_INT(ulsch->rnti), T_INT(harq_pid)); -#if defined(MESSAGE_CHART_GENERATOR_PHY) + MSC_LOG_RX_MESSAGE( MSC_PHY_ENB,MSC_PHY_UE, NULL,0, @@ -1411,7 +1411,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) frame,subframe, ulsch->rnti,harq_pid ); -#endif + #ifdef DEBUG_PHY_PROC #ifdef DEBUG_ULSCH diff --git a/openair2/ENB_APP/NB_IoT_interface.c b/openair2/ENB_APP/NB_IoT_interface.c index c4884453c2..7355233d71 100644 --- a/openair2/ENB_APP/NB_IoT_interface.c +++ b/openair2/ENB_APP/NB_IoT_interface.c @@ -43,7 +43,7 @@ int load_NB_IoT(void) { RCConfig_NbIoT_f_t RCConfig; loader_shlibfunc_t shlib_fdesc[]=NBIOT_INTERFACE_FLIST; - ret=load_module_shlib(NBIOT_MODULENAME,shlib_fdesc,sizeof(shlib_fdesc)/sizeof(loader_shlibfunc_t)); + ret=load_module_shlib(NBIOT_MODULENAME,shlib_fdesc,sizeof(shlib_fdesc)/sizeof(loader_shlibfunc_t),NULL); if (ret) { return ret; } diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c index b9e605ca24..92409d96dc 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c @@ -760,10 +760,10 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) 0, MSC_AS_TIME_FMT" DATA-REQ inst %u rb %u rab %u size %u", MSC_AS_TIME_ARGS(ctxt_pP), - pc5s_header.inst, - pc5s_header.rb_id, + pc5s_header->inst, + pc5s_header->rb_id, rab_id, - pc5s_header.data_size); + pc5s_header->data_size); pdcp_data_req( &ctxt, @@ -787,10 +787,10 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) 0, MSC_AS_TIME_FMT" DATA-REQ inst %u rb %u rab %u size %u", MSC_AS_TIME_ARGS(ctxt_pP), - pc5s_header.inst, - pc5s_header.rb_id, + pc5s_header->inst, + pc5s_header->rb_id, rab_id, - pc5s_header.data_size); + pc5s_header->data_size); LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %u][RB %u] NON INSTANCIATED INSTANCE key 0x%"PRIx64", DROPPED\n", ctxt.frame, diff --git a/openair3/S1AP/s1ap_eNB_handlers.c b/openair3/S1AP/s1ap_eNB_handlers.c index 9b150fe751..5c6b208b87 100644 --- a/openair3/S1AP/s1ap_eNB_handlers.c +++ b/openair3/S1AP/s1ap_eNB_handlers.c @@ -1043,7 +1043,7 @@ int s1ap_eNB_handle_paging(uint32_t assoc_id, /* Paging procedure -> stream != 0 */ if (stream == 0) { - S1AP_ERROR("[SCTP %d] Received Paging procedure on stream (%d)\n", + LOG_W(S1AP,"[SCTP %d] Received Paging procedure on stream (%d)\n", assoc_id, stream); return -1; } diff --git a/openair3/S1AP/s1ap_eNB_nas_procedures.c b/openair3/S1AP/s1ap_eNB_nas_procedures.c index f2f84de32d..ebd5bab4fd 100644 --- a/openair3/S1AP/s1ap_eNB_nas_procedures.c +++ b/openair3/S1AP/s1ap_eNB_nas_procedures.c @@ -473,17 +473,11 @@ int s1ap_eNB_handle_nas_downlink(uint32_t assoc_id, MSC_LOG_RX_DISCARDED_MESSAGE( MSC_S1AP_ENB, MSC_S1AP_MME, - (const char *)NULL, NULL, + 0, MSC_AS_TIME_FMT" downlinkNASTransport eNB_ue_s1ap_id %u mme_ue_s1ap_id %u", - 0,0,//MSC_AS_TIME_ARGS(ctxt_pP), enb_ue_s1ap_id, mme_ue_s1ap_id); - /* TODO: fix this log - the original version is suspicious (twice downlink_NAS_transport_p->eNB_UE_S1AP_ID?) */ - /*S1AP_ERROR("[SCTP %d] Received NAS downlink message for non existing UE context eNB_UE_S1AP_ID: 0x%"PRIx32" %u\n", - assoc_id, - downlink_NAS_transport_p->eNB_UE_S1AP_ID, - downlink_NAS_transport_p->eNB_UE_S1AP_ID);*/ S1AP_ERROR("[SCTP %d] Received NAS downlink message for non existing UE context eNB_UE_S1AP_ID: 0x%lx\n", assoc_id, enb_ue_s1ap_id); @@ -518,11 +512,10 @@ int s1ap_eNB_handle_nas_downlink(uint32_t assoc_id, MSC_LOG_RX_MESSAGE( MSC_S1AP_ENB, MSC_S1AP_MME, - (const char *)NULL, NULL, + 0, MSC_AS_TIME_FMT" downlinkNASTransport eNB_ue_s1ap_id %u mme_ue_s1ap_id %u", - 0,0,//MSC_AS_TIME_ARGS(ctxt_pP), - enb_ue_s1ap_id, + assoc_id, mme_ue_s1ap_id); S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_DownlinkNASTransport_IEs_t, ie, container, diff --git a/targets/ARCH/COMMON/common_lib.c b/targets/ARCH/COMMON/common_lib.c index 7ff3b820dc..d25826e82e 100644 --- a/targets/ARCH/COMMON/common_lib.c +++ b/targets/ARCH/COMMON/common_lib.c @@ -100,7 +100,7 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param libname=OAI_TP_LIBNAME; shlib_fdesc[0].fname="transport_init"; } - ret=load_module_shlib(libname,shlib_fdesc,1); + ret=load_module_shlib(libname,shlib_fdesc,1,NULL); if (ret < 0) { fprintf(stderr,"Library %s couldn't be loaded\n",libname); } else { diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index c74cd3b443..a011a6253b 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -514,7 +514,7 @@ void *l2l1_task(void *arg) { #endif -static void get_options(void) { +static void get_options(unsigned int *start_msc) { int tddflag, nonbiotflag; @@ -548,11 +548,9 @@ static void get_options(void) { set_glog(glog_level); } if (start_telnetsrv) { - load_module_shlib("telnetsrv",NULL,0); + load_module_shlib("telnetsrv",NULL,0,NULL); } - - if ( !(CONFIG_ISFLAGSET(CONFIG_ABORT)) ) { memset((void*)&RC,0,sizeof(RC)); /* Read RC configuration file */ @@ -925,6 +923,7 @@ int main( int argc, char **argv ) #if defined (XFORMS) int ret; #endif + unsigned int start_msc=0; if ( load_configmodule(argc,argv) == NULL) { exit_fun("[SOFTMODEM] Error, configuration module init failed\n"); @@ -942,7 +941,7 @@ int main( int argc, char **argv ) printf("Reading in command-line options\n"); - get_options (); + get_options (&start_msc); if (CONFIG_ISFLAGSET(CONFIG_ABORT) ) { fprintf(stderr,"Getting configuration failed\n"); exit(-1); @@ -968,9 +967,13 @@ int main( int argc, char **argv ) #if defined(ENABLE_ITTI) printf("ITTI init, useMME: %i\n" ,EPC_MODE_ENABLED); + itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info); // initialize mscgen log after ITTI + if (start_msc) { + load_module_shlib("msc",NULL,0,&msc_interface); + } MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX); #endif diff --git a/targets/RT/USER/lte-softmodem.h b/targets/RT/USER/lte-softmodem.h index a1f26de5dc..2eb4b0d60d 100644 --- a/targets/RT/USER/lte-softmodem.h +++ b/targets/RT/USER/lte-softmodem.h @@ -194,6 +194,7 @@ #define CONFIG_HLP_FLOG "Enable online log \n" #define CONFIG_HLP_LOGL "Set the global log level, valide options: (4:trace, 3:debug, 2:info, 1:warn, (0:error))\n" #define CONFIG_HLP_TELN "Start embedded telnet server \n" +#define CONFIG_HLP_MSC "Enable the MSC tracing utility \n" /*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ /* command line parameters for LOG utility */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ @@ -202,6 +203,7 @@ {"R" , CONFIG_HLP_FLOG, 0, uptr:&online_log_messages, defintval:1, TYPE_INT, 0}, \ {"g" , CONFIG_HLP_LOGL, 0, uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \ {"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL, uptr:&start_telnetsrv, defintval:0, TYPE_UINT, 0}, \ +{"msc", CONFIG_HLP_MSC, PARAMFLAG_BOOL, uptr:start_msc, defintval:0, TYPE_UINT, 0}, \ } #define CMDLINE_ONLINELOG_IDX 0 #define CMDLINE_GLOGLEVEL_IDX 1 diff --git a/targets/RT/USER/lte-uesoftmodem.c b/targets/RT/USER/lte-uesoftmodem.c index 57b1dfb105..3ee4283404 100644 --- a/targets/RT/USER/lte-uesoftmodem.c +++ b/targets/RT/USER/lte-uesoftmodem.c @@ -470,7 +470,7 @@ void *l2l1_task(void *arg) { extern int16_t dlsch_demod_shift; -static void get_options(void) { +static void get_options(unsigned int *start_msc) { int CC_id; int tddflag, nonbiotflag; char *loopfile=NULL; @@ -505,7 +505,7 @@ static void get_options(void) { set_glog(glog_level); } if (start_telnetsrv) { - load_module_shlib("telnetsrv",NULL,0); + load_module_shlib("telnetsrv",NULL,0,NULL); } paramdef_t cmdline_uemodeparams[] =CMDLINE_UEMODEPARAMS_DESC; @@ -770,6 +770,7 @@ int main( int argc, char **argv ) int CC_id; uint8_t abstraction_flag=0; + unsigned int start_msc=0; // Default value for the number of UEs. It will hold, // if not changed from the command line option --num-ues @@ -797,7 +798,7 @@ int main( int argc, char **argv ) printf("Reading in command-line options\n"); for (int i=0;i Date: Fri, 24 Aug 2018 20:06:02 +0200 Subject: [PATCH 035/379] fix noS1 build failure --- openair2/ENB_APP/enb_app.c | 16 +++++++++------- openair2/ENB_APP/enb_config.c | 6 +++++- openair2/RRC/LTE/rrc_eNB.c | 14 ++++++++------ targets/COMMON/create_tasks.c | 6 ++++-- targets/RT/USER/lte-softmodem.c | 4 ++++ 5 files changed, 30 insertions(+), 16 deletions(-) diff --git a/openair2/ENB_APP/enb_app.c b/openair2/ENB_APP/enb_app.c index 9490c3f5d8..0f38b62c29 100644 --- a/openair2/ENB_APP/enb_app.c +++ b/openair2/ENB_APP/enb_app.c @@ -44,6 +44,8 @@ # include "s1ap_eNB.h" # include "sctp_eNB_task.h" # include "gtpv1u_eNB_task.h" +# else +# define EPC_MODE_ENABLED 0 # endif #include "openair1/PHY/INIT/phy_init.h" @@ -182,15 +184,15 @@ void *eNB_app_task(void *args_p) configure_rrc(enb_id); } - if (EPC_MODE_ENABLED) { +# if defined(ENABLE_USE_MME) /* Try to register each eNB */ registered_enb = 0; register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p); - } else { +#else /* Start L2L1 task */ msg_p = itti_alloc_new_message(TASK_ENB_APP, INITIALIZE_MESSAGE); itti_send_msg_to_task(TASK_L2L1, INSTANCE_DEFAULT, msg_p); - } +#endif do { // Wait for a message @@ -209,7 +211,7 @@ void *eNB_app_task(void *args_p) break; case S1AP_REGISTER_ENB_CNF: - if (EPC_MODE_ENABLED) { +# if defined(ENABLE_USE_MME) LOG_I(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p), S1AP_REGISTER_ENB_CNF(msg_p).nb_mme); @@ -246,7 +248,7 @@ void *eNB_app_task(void *args_p) } } } - } /*if (EPC_MODE_ENABLED) */ +#endif break; case S1AP_DEREGISTERED_ENB_IND: @@ -259,7 +261,7 @@ void *eNB_app_task(void *args_p) break; case TIMER_HAS_EXPIRED: - if (EPC_MODE_ENABLED) { +# if defined(ENABLE_USE_MME) LOG_I(ENB_APP, " Received %s: timer_id %ld\n", ITTI_MSG_NAME (msg_p), TIMER_HAS_EXPIRED(msg_p).timer_id); if (TIMER_HAS_EXPIRED (msg_p).timer_id == enb_register_retry_timer_id) { @@ -267,7 +269,7 @@ void *eNB_app_task(void *args_p) registered_enb = 0; register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p); } - } /*if (EPC_MODE_ENABLED) */ +#endif break; diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 4cca5ff8fe..488286f595 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -40,7 +40,9 @@ # if defined(ENABLE_USE_MME) # include "s1ap_eNB.h" # include "sctp_eNB_task.h" -# endif +# else +# define EPC_MODE_ENABLED 0 +# endif #endif #include "sctp_default_values.h" #include "SystemInformationBlockType2.h" @@ -2350,7 +2352,9 @@ void RCConfig(void) { printf("Getting ENBSParams\n"); config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); +# if defined(ENABLE_USE_MME) EPC_MODE_ENABLED = ((*ENBSParams[ENB_NOS1_IDX].uptr) == 0); +#endif RC.nb_inst = ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt; if (RC.nb_inst > 0) { diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index cac49690af..10590bc019 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -85,6 +85,8 @@ # else # include "../../S1AP/s1ap_eNB.h" # endif +#else +# define EPC_MODE_ENABLED 0 #endif #include "pdcp.h" @@ -1415,7 +1417,7 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete( ue_context_pP->ue_context.Srb1.Active = 1; //ue_context_pP->ue_context.Srb2.Srb_info.Srb_id = 2; - if (EPC_MODE_ENABLED) { +#if defined(ENABLE_USE_MME) hashtable_rc_t h_rc; int j; rrc_ue_s1ap_ids_t* rrc_ue_s1ap_ids_p = NULL; @@ -1459,18 +1461,18 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete( ctxt_pP->instance, &create_tunnel_req, reestablish_rnti); - } /* EPC_MODE_ENABLED */ +#endif /* Update RNTI in ue_context */ ue_context_pP->ue_id_rnti = ctxt_pP->rnti; // here ue_id_rnti is just a key, may be something else ue_context_pP->ue_context.rnti = ctxt_pP->rnti; - if(EPC_MODE_ENABLED) { +#if defined(ENABLE_USE_MME) uint8_t send_security_mode_command = FALSE; rrc_pdcp_config_security( ctxt_pP, ue_context_pP, send_security_mode_command); LOG_D(RRC, "set security successfully \n"); - } +#endif // Measurement ID list MeasId_list = CALLOC(1, sizeof(*MeasId_list)); memset((void *)MeasId_list, 0, sizeof(*MeasId_list)); @@ -6662,7 +6664,7 @@ rrc_eNB_decode_dcch( } } #if defined(ENABLE_ITTI) - if (EPC_MODE_ENABLED == 1) { +#if defined(ENABLE_USE_MME) if (dedicated_DRB == 1){ // rrc_eNB_send_S1AP_E_RAB_SETUP_RESP(ctxt_pP, // ue_context_p, @@ -6727,7 +6729,7 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { } } } - } +#endif #else // establish a dedicated bearer if (dedicated_DRB == 0 ) { // ue_context_p->ue_context.e_rab[0].status = E_RAB_STATUS_ESTABLISHED; diff --git a/targets/COMMON/create_tasks.c b/targets/COMMON/create_tasks.c index f8230928dd..df3ce8992f 100644 --- a/targets/COMMON/create_tasks.c +++ b/targets/COMMON/create_tasks.c @@ -31,6 +31,8 @@ # include "nas_ue_task.h" # include "udp_eNB_task.h" # include "gtpv1u_eNB_task.h" +# else +# define EPC_MODE_ENABLED 0 # endif # if ENABLE_RAL # include "lteRALue.h" @@ -59,7 +61,7 @@ int create_tasks(uint32_t enb_nb) return -1; } } - +# if defined(ENABLE_USE_MME) if (EPC_MODE_ENABLED) { if (enb_nb > 0) { if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) { @@ -85,7 +87,7 @@ int create_tasks(uint32_t enb_nb) } } /* if (EPC_MODE_ENABLED) */ - +#endif if (enb_nb > 0) { LOG_I(RRC,"Creating RRC eNB Task\n"); diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index a011a6253b..dc9400a971 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -108,6 +108,10 @@ unsigned char scope_enb_num_ue = 2; static pthread_t forms_thread; //xforms #endif //XFORMS +#ifndef ENABLE_USE_MME +#define EPC_MODE_ENABLED 0 +#endif + pthread_cond_t nfapi_sync_cond; pthread_mutex_t nfapi_sync_mutex; int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex From 82c3f06da333c7415a8d3ee298c96c30a8e9b746 Mon Sep 17 00:00:00 2001 From: frtabu Date: Fri, 24 Aug 2018 23:53:58 +0200 Subject: [PATCH 036/379] fix dlsim tests failures in CI ( log level improperly set due to log modifications) --- openair1/SIMULATION/LTE_PHY/dlsim.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index 559540e49d..a03ce34bca 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -523,7 +523,7 @@ int main(int argc, char **argv) int c; int k,i,j,aa; int re; - + int loglvl=OAILOG_DEBUG; int s,Kr,Kr_bytes; @@ -1001,7 +1001,7 @@ int main(int argc, char **argv) break; case 'L': - set_glog(atoi(optarg)); + loglvl = atoi(optarg); break; case 'h': @@ -1049,7 +1049,7 @@ int main(int argc, char **argv) "cannot load configuration module, exiting\n"); logInit(); // enable these lines if you need debug info - set_glog(LOG_DEBUG); + set_glog(loglvl); // moreover you need to init itti with the following line // however itti will catch all signals, so ctrl-c won't work anymore // alternatively you can disable ITTI completely in CMakeLists.txt From 9399dd97355a4194ea5c93971e2ab548b3946ce4 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Sat, 25 Aug 2018 02:22:44 +0200 Subject: [PATCH 037/379] try to merge with issue 341 to pass USRP/FDD test --- openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c | 211 +++++++++++++----- openair2/LAYER2/MAC/eNB_scheduler_phytest.c | 19 +- 2 files changed, 170 insertions(+), 60 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c index 6f1913ff91..d6a1605577 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c @@ -165,10 +165,19 @@ int allocate_REs_in_RB_no_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB, uint32_t tti_offset; uint8_t re; uint8_t *x0p; + uint8_t first_re,last_re; + + last_re=12; + first_re=0; + if (skip_half==1) + last_re=6; + else if (skip_half==2) + first_re=6; + re=first_re; if (skip_dc == 0) { - for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset,re=0; - re<12; + for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+re; + reNlayers>1) { LOG_E(PHY,"Nlayers %d: re_offset %d, symbol %d offset %d\n",dlsch0_harq->Nlayers,re_offset,l,symbol_offset); diff --git a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c index 111e0d4161..12ea45e98d 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c @@ -71,7 +71,7 @@ schedule_ue_spec_phy_test( uint16_t rnti = 0x1235; uint32_t rb_alloc = 0x1FFFFF; int32_t tpc = 1; - int32_t mcs = 28; + int32_t mcs = 10; int32_t cqi = 15; int32_t ndi = (frameP*10+subframeP)/8; int32_t dai = 0; @@ -202,7 +202,8 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s int32_t normalized_rx_power; int32_t target_rx_power= 178; int CC_id = 0; - int nb_rb = 96; + int nb_rb=24; + int N_RB_UL; eNB_MAC_INST *mac = RC.mac[module_idP]; COMMON_channels_t *cc = &mac->common_channels[0]; UE_list_t *UE_list=&mac->UE_list; @@ -212,7 +213,6 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s int sched_subframe = (subframeP+4)%10; uint16_t ul_req_index; - if (sched_subframeHI_DCI0_req[CC_id][subframeP]; @@ -222,6 +222,18 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s //nfapi_ul_config_request_pdu_t *ul_config_pdu = &ul_req->ul_config_pdu_list[0];; nfapi_ul_config_request_body_t *ul_req = &mac->UL_req[CC_id].ul_config_request_body; + N_RB_UL = to_prb(cc->mib->message.dl_Bandwidth); + switch(N_RB_UL){ + case 100: + nb_rb = 96; + break; + case 50: + nb_rb = 48; + break; + case 25: + nb_rb = 24; + break; + } mac->UL_req[CC_id].sfn_sf = (sched_frame<<4) + sched_subframe; hi_dci0_req->sfn_sf = (frameP << 4) + subframeP; @@ -306,7 +318,6 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s hi_dci0_req_body->number_of_dci++; ul_req_index = 0; - for(ul_req_index = 0;ul_req_index < ul_req->number_of_pdus;ul_req_index++){ if(ul_req->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE){ LOG_D(MAC,"Frame %d, Subframe %d:rnti %x ul_req_index %d Switched UCI HARQ to ULSCH HARQ(first)\n",frameP,subframeP,rnti,ul_req_index); From 37bab74e061723b7dc7d3c124e5dff9b47866a53 Mon Sep 17 00:00:00 2001 From: Haruki NAOI Date: Mon, 27 Aug 2018 19:26:39 +0900 Subject: [PATCH 038/379] Fix: dlcqi re-transmission timing. --- openair1/SCHED/phy_procedures_lte_eNb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index a6a44c66e2..80d0a8b4a7 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -1351,7 +1351,13 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) fill_ulsch_cqi_indication(eNB,frame,subframe, ulsch_harq, ulsch->rnti); - + RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_flag &= (~(1 << subframe)); + } else { + if(RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_flag & (1 << subframe) ){ + RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_flag &= (~(1 << subframe)); + RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_timer=30; + LOG_D(PHY,"Frame %d,Subframe %d, We're supposed to get a cqi here. Set cqi_req_timer to 30.\n",frame,subframe); + } } if (ret == (1+MAX_TURBO_ITERATIONS)) { From 8ec16092c4b7ddd6805be2e6065905d6b6ccbb5d Mon Sep 17 00:00:00 2001 From: Haruki NAOI Date: Mon, 27 Aug 2018 19:38:02 +0900 Subject: [PATCH 039/379] Fix: fairRR scheduler allocates Resource Block only to one UE when multiple UEs are selected. --- openair2/LAYER2/MAC/eNB_scheduler_fairRR.c | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c index 1acf657220..87b832c238 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c @@ -787,13 +787,11 @@ schedule_ue_spec_fairRR(module_id_t module_idP, // unsigned char aggregation; mac_rlc_status_resp_t rlc_status; unsigned char header_len_dcch = 0, header_len_dcch_tmp = 0; - unsigned char header_len_dtch = 0, header_len_dtch_tmp = - 0, header_len_dtch_last = 0; + unsigned char header_len_dtch = 0, header_len_dtch_tmp = 0, header_len_dtch_last = 0; unsigned char ta_len = 0; unsigned char sdu_lcids[NB_RB_MAX], lcid, offset, num_sdus = 0; uint16_t nb_rb, nb_rb_temp, nb_available_rb; - uint16_t TBS, j, sdu_lengths[NB_RB_MAX], rnti, padding = - 0, post_padding = 0; + uint16_t TBS, j, sdu_lengths[NB_RB_MAX], rnti, padding = 0, post_padding = 0; unsigned char dlsch_buffer[MAX_DLSCH_PAYLOAD_BYTES]; unsigned char round = 0; unsigned char harq_pid = 0; @@ -818,7 +816,10 @@ schedule_ue_spec_fairRR(module_id_t module_idP, nfapi_dl_config_request_pdu_t *dl_config_pdu; int tdd_sfa; int ta_update; - +#ifdef DEBUG_eNB_SCHEDULER + int k; +#endif + start_meas(&eNB->schedule_dlsch); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME (VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, VCD_FUNCTION_IN); @@ -1335,8 +1336,8 @@ schedule_ue_spec_fairRR(module_id_t module_idP, "[eNB %d][DCCH] CC_id %d Got %d bytes :", module_idP, CC_id, sdu_lengths[0]); - for (j = 0; j < sdu_lengths[0]; j++) { - LOG_T(MAC, "%x ", dlsch_buffer[j]); + for (k = 0; k < sdu_lengths[0]; k++) { + LOG_T(MAC, "%x ", dlsch_buffer[k]); } LOG_T(MAC, "\n"); @@ -1389,8 +1390,8 @@ schedule_ue_spec_fairRR(module_id_t module_idP, "[eNB %d][DCCH1] CC_id %d Got %d bytes :", module_idP, CC_id, sdu_lengths[num_sdus]); - for (j = 0; j < sdu_lengths[num_sdus]; j++) { - LOG_T(MAC, "%x ", dlsch_buffer[j]); + for (k = 0; k < sdu_lengths[num_sdus]; k++) { + LOG_T(MAC, "%x ", dlsch_buffer[k]); } LOG_T(MAC, "\n"); @@ -1638,8 +1639,8 @@ schedule_ue_spec_fairRR(module_id_t module_idP, #ifdef DEBUG_eNB_SCHEDULER LOG_T(MAC, "[eNB %d] First 16 bytes of DLSCH : \n",module_idP ); - for (i = 0; i < 16; i++) { - LOG_T(MAC, "%x.", dlsch_buffer[i]); + for (k = 0; k < 16; k++) { + LOG_T(MAC, "%x.", dlsch_buffer[k]); } LOG_T(MAC, "\n"); From 9f6d466fff9a86418b254c1ee1cdb28d280dfa9b Mon Sep 17 00:00:00 2001 From: Rajeev Gangula Date: Mon, 27 Aug 2018 14:43:32 +0200 Subject: [PATCH 040/379] Uncommemnt rrc_mac remove function. --- openair2/LAYER2/MAC/eNB_scheduler.c | 4 ++-- openair2/RRC/LTE/L2_interface.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler.c b/openair2/LAYER2/MAC/eNB_scheduler.c index dc7cbd409c..a2988f26d8 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler.c +++ b/openair2/LAYER2/MAC/eNB_scheduler.c @@ -538,8 +538,8 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, 0 ? "in synch" : "out of sync", UE_list->UE_template[CC_id][i].phr_info, UE_list->UE_sched_ctrl[i].dl_cqi[CC_id], - (UE_list->UE_sched_ctrl[i].pusch_snr[CC_id] - 128) / 2, - (UE_list->UE_sched_ctrl[i].pucch1_snr[CC_id] - 128) / 2); + (5*UE_list->UE_sched_ctrl[i].pusch_snr[CC_id] - 640) / 10, + (5*UE_list->UE_sched_ctrl[i].pucch1_snr[CC_id] - 640) / 10); } RC.eNB[module_idP][CC_id]->pusch_stats_bsr[i][(frameP * 10) + diff --git a/openair2/RRC/LTE/L2_interface.c b/openair2/RRC/LTE/L2_interface.c index a7c96a8a22..efbcf0f142 100644 --- a/openair2/RRC/LTE/L2_interface.c +++ b/openair2/RRC/LTE/L2_interface.c @@ -329,7 +329,7 @@ void mac_eNB_rrc_ul_failure(const module_id_t Mod_instP, rntiP, PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED); } -// rrc_mac_remove_ue(Mod_instP,rntiP); + rrc_mac_remove_ue(Mod_instP,rntiP); } void mac_eNB_rrc_uplane_failure(const module_id_t Mod_instP, From 2276996f74302c6b5a44b279fb4ca96d7ce125f7 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 27 Aug 2018 17:28:50 +0200 Subject: [PATCH 041/379] basic simulator: minor bugfix: clear memory before use --- targets/ARCH/tcp_bridge/tcp_bridge_oai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/ARCH/tcp_bridge/tcp_bridge_oai.c b/targets/ARCH/tcp_bridge/tcp_bridge_oai.c index ba6d96db93..4d7d49d9c7 100644 --- a/targets/ARCH/tcp_bridge/tcp_bridge_oai.c +++ b/targets/ARCH/tcp_bridge/tcp_bridge_oai.c @@ -253,7 +253,7 @@ int tcp_bridge_ue_first_read(openair0_device *device, openair0_timestamp *timest tcp_bridge_state_t *t = device->priv; uint32_t b[t->samples_per_subframe * 12]; - memset(b, 0, nsamps * 4); + memset(b, 0, t->samples_per_subframe * 12 * 4); int n = fullwrite(t->sock, b, t->samples_per_subframe * 12 * 4); if (n != t->samples_per_subframe * 12 * 4) { printf("tcp_bridge: write error ret %d error %s\n", n, strerror(errno)); From 97ddf5ea28e6bac5a2ff037f34a3a568dd067913 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 27 Aug 2018 17:32:00 +0200 Subject: [PATCH 042/379] basic simulator: bugfix: wait for synch ready at the right time Before this commit we were checking for UE->is_synchronized == 0 then we were waiting for a potentially active synch routine to finish and then we were starting the synch routine again but the synch routine that was running may have set UE->is_synchronized to 1. This was leading to various problems, most notably the following message repeated over and over in the UE log and the UE unable to connect properly: [RRC] [UE 0] Frame 377: OUT OF SYNC FROM eNB 0 (T310 active 0 : T310 0, N310 345, N311 0) So let's wait for a potentially active synch routine to finish before anything else. --- targets/RT/USER/lte-ue.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c index ab84249f9f..fbf0eff1cd 100644 --- a/targets/RT/USER/lte-ue.c +++ b/targets/RT/USER/lte-ue.c @@ -1459,18 +1459,19 @@ void *UE_thread(void *arg) { while (!oai_exit) { +#if BASIC_SIMULATOR + while (!(UE->proc.instance_cnt_synch < 0)) { + printf("ue sync not ready\n"); + usleep(500*1000); + } +#endif + AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), ""); int instance_cnt_synch = UE->proc.instance_cnt_synch; int is_synchronized = UE->is_synchronized; AssertFatal ( 0== pthread_mutex_unlock(&UE->proc.mutex_synch), ""); if (is_synchronized == 0) { -#if BASIC_SIMULATOR - while (!((instance_cnt_synch = UE->proc.instance_cnt_synch) < 0)) { - printf("ue sync not ready\n"); - usleep(500*1000); - } -#endif if (instance_cnt_synch < 0) { // we can invoke the synch // grab 10 ms of signal and wakeup synch thread for (int i=0; iframe_parms.nb_antennas_rx; i++) From 164bbc65eba44b37d15207a5c39e631a06023145 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 27 Aug 2018 17:38:47 +0200 Subject: [PATCH 043/379] basic simulator: bugfix: do not put random data in DCI when not used With 50 RBs and 100 RBs the UE crashes in the basic simulator because of false detection of DCIs. Putting nothing in the unused REs in the DCI instead of random bits solves this issue and let the basic simulator run with 50 RBs and 100 RBs. Note that in the real UE the problem needs to be solved because the channel may lead to false DCI detection and the consequent crashes have to be solved. This commit sort of "hides" the issue to have the basic simulator functional. Note also that putting nothing in the unused REs in the DCI should be the normal general case. But it has not been tested with anything but the basic simulator so the previous code is left. --- openair1/PHY/LTE_TRANSPORT/dci.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openair1/PHY/LTE_TRANSPORT/dci.c b/openair1/PHY/LTE_TRANSPORT/dci.c index 1c015b1c84..520488664d 100755 --- a/openair1/PHY/LTE_TRANSPORT/dci.c +++ b/openair1/PHY/LTE_TRANSPORT/dci.c @@ -346,6 +346,13 @@ uint8_t generate_dci_top(uint8_t num_pdcch_symbols, y[0] = &yseq0[0]; y[1] = &yseq1[0]; +#if BASIC_SIMULATOR + /* this should be the normal case + * but it has to be validated for all the various cases + * so let's just do it for the basic simulator + */ + memset(e, 2, DCI_BITS_MAX); +#else #if 1 // reset all bits to , here we set elements as 2 // memset(e, 2, DCI_BITS_MAX); @@ -358,6 +365,7 @@ uint8_t generate_dci_top(uint8_t num_pdcch_symbols, * (not sure about this, to be checked somehow) */ //memset(e, 0, DCI_BITS_MAX); +#endif /* BASIC_SIMULATOR */ e_ptr = e; From a48c36582ffa93f38b2b9cd18b16b4b1e3e831ca Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 27 Aug 2018 17:46:03 +0200 Subject: [PATCH 044/379] bugfix: fix threading in the UE Various problems were found with the basic simulator. Variables used by various threads for synchronization need to be initialized properly. That is before the various threads start using them. This goes for: - UE->is_synchronized - UE->proc.instance_cnt_synch - UE->proc.instance_cnt_rxtx The function "UE->rfdevice.trx_start_func" was called in "UE_thread_synch" but should be called in "UE_thread" because "UE_thread" is the one that calls "UE->rfdevice.trx_read_func" and there is no guaranty that the call to "UE->rfdevice.trx_start_func" is done before as it has to (it's in another thread). And finally "pthread_cond_signal(&proc->cond_rxtx)" was called twice, which may not be a problem but was certainly not intended. Plus removing one call simplifies the code by removing some "if" logic, which is a good thing per se. This commit was not tested with a real UE and may thus introduce some issues. Hopefully not! --- targets/RT/USER/lte-ue.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c index fbf0eff1cd..66107d79a4 100644 --- a/targets/RT/USER/lte-ue.c +++ b/targets/RT/USER/lte-ue.c @@ -446,7 +446,6 @@ static void *UE_thread_synch(void *arg) int freq_offset=0; char threadname[128]; - UE->is_synchronized = 0; printf("UE_thread_sync in with PHY_vars_UE %p\n",arg); cpu_set_t cpuset; @@ -522,11 +521,6 @@ static void *UE_thread_synch(void *arg) printf("Started device, unlocked sync_mutex (UE_sync_thread)\n"); - if (UE->rfdevice.trx_start_func(&UE->rfdevice) != 0 ) { - LOG_E(HW,"Could not start the device\n"); - oai_exit=1; - } - while (oai_exit==0) { AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), ""); while (UE->proc.instance_cnt_synch < 0) @@ -755,7 +749,6 @@ static void *UE_thread_rxn_txnp4(void *arg) { UE_rxtx_proc_t *proc = rtd->proc; PHY_VARS_UE *UE = rtd->UE; - proc->instance_cnt_rxtx=-1; proc->subframe_rx=proc->sub_frame_start; char threadname[256]; @@ -1457,6 +1450,10 @@ void *UE_thread(void *arg) { int sub_frame=-1; //int cumulated_shift=0; + if (UE->rfdevice.trx_start_func(&UE->rfdevice) != 0 ) { + LOG_E(HW,"Could not start the device\n"); + oai_exit=1; + } while (!oai_exit) { #if BASIC_SIMULATOR @@ -1662,12 +1659,7 @@ void *UE_thread(void *arg) { proc->instance_cnt_rxtx++; LOG_D( PHY, "[SCHED][UE %d] UE RX instance_cnt_rxtx %d subframe %d !!\n", UE->Mod_id, proc->instance_cnt_rxtx,proc->subframe_rx); - if (proc->instance_cnt_rxtx == 0) { - if (pthread_cond_signal(&proc->cond_rxtx) != 0) { - LOG_E( PHY, "[SCHED][UE %d] ERROR pthread_cond_signal for UE RX thread\n", UE->Mod_id); - exit_fun("nothing to add"); - } - } else { + if (proc->instance_cnt_rxtx != 0) { LOG_E( PHY, "[SCHED][UE %d] UE RX thread busy (IC %d)!!\n", UE->Mod_id, proc->instance_cnt_rxtx); if (proc->instance_cnt_rxtx > 2) exit_fun("instance_cnt_rxtx > 2"); @@ -1718,6 +1710,8 @@ void init_UE_threads(int inst) { pthread_mutex_init(&UE->proc.mutex_synch,NULL); pthread_cond_init(&UE->proc.cond_synch,NULL); + UE->proc.instance_cnt_synch = -1; + UE->is_synchronized = 0; // the threads are not yet active, therefore access is allowed without locking int nb_threads=RX_NB_TH; @@ -1729,6 +1723,7 @@ void init_UE_threads(int inst) { pthread_mutex_init(&UE->proc.proc_rxtx[i].mutex_rxtx,NULL); pthread_cond_init(&UE->proc.proc_rxtx[i].cond_rxtx,NULL); + UE->proc.proc_rxtx[i].instance_cnt_rxtx = -1; UE->proc.proc_rxtx[i].sub_frame_start=i; UE->proc.proc_rxtx[i].sub_frame_step=nb_threads; printf("Init_UE_threads rtd %d proc %d nb_threads %d i %d\n",rtd->proc->sub_frame_start, UE->proc.proc_rxtx[i].sub_frame_start,nb_threads, i); From 24c1c6e18b578433225a5468fd74bc4465fd40bf Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 27 Aug 2018 12:22:21 +0200 Subject: [PATCH 045/379] CI: better reporting -- URL of jenkins build included in top of HTML report -- when one of the needed processes not present, reported in HTML Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-tmp-ran | 2 +- ci-scripts/main.py | 111 ++++++++++++++++++++++++--------- 2 files changed, 84 insertions(+), 29 deletions(-) diff --git a/ci-scripts/Jenkinsfile-tmp-ran b/ci-scripts/Jenkinsfile-tmp-ran index 78f62cd8eb..4db4ec0b2d 100644 --- a/ci-scripts/Jenkinsfile-tmp-ran +++ b/ci-scripts/Jenkinsfile-tmp-ran @@ -320,7 +320,7 @@ pipeline { } if(fileExists("ci-scripts/test_results.html")) { sh "mv ci-scripts/test_results.html test_results-${JOB_NAME}.html" - sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's#TEMPLATE_BUILD_ID#${BUILD_ID}#' test_results-${JOB_NAME}.html" + sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's#TEMPLATE_BUILD_ID#${BUILD_ID}#' test_results-${JOB_NAME}.html" archiveArtifacts "test_results-${JOB_NAME}.html" } } diff --git a/ci-scripts/main.py b/ci-scripts/main.py index d172d66545..e66d25204b 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -277,7 +277,11 @@ class SSHConnection(): Usage() sys.exit('Insufficient Parameter') initialize_eNB_flag = True - self.CheckProcessExist(initialize_eNB_flag) + pStatus = self.CheckProcessExist(initialize_eNB_flag) + if (pStatus < 0): + self.CreateHtmlTestRow(self.Initialize_eNB_args, 'KO', pStatus) + self.CreateHtmlFooter() + sys.exit(1) self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword) self.command('cd ' + self.eNBSourceCodePath, '\$', 5) # Initialize_eNB_args usually start with -O and followed by the location in repository @@ -422,7 +426,11 @@ class SSHConnection(): Usage() sys.exit('Insufficient Parameter') initialize_eNB_flag = False - self.CheckProcessExist(initialize_eNB_flag) + pStatus = self.CheckProcessExist(initialize_eNB_flag) + if (pStatus < 0): + self.CreateHtmlTestRow('N/A', 'KO', pStatus) + self.CreateHtmlFooter() + sys.exit(1) multi_jobs = [] status_queue = SimpleQueue() lock = Lock() @@ -435,7 +443,7 @@ class SSHConnection(): job.join() if (status_queue.empty()): - self.CreateHtmlTestRow('N/A', 'KO', len(self.UEDevices)) + self.CreateHtmlTestRow('N/A', 'KO', 0) sys.exit(1) else: attach_status = True @@ -472,7 +480,11 @@ class SSHConnection(): Usage() sys.exit('Insufficient Parameter') initialize_eNB_flag = False - self.CheckProcessExist(initialize_eNB_flag) + pStatus = self.CheckProcessExist(initialize_eNB_flag) + if (pStatus < 0): + self.CreateHtmlTestRow('N/A', 'KO', pStatus) + self.CreateHtmlFooter() + sys.exit(1) multi_jobs = [] for device_id in self.UEDevices: p = Process(target = SSH.DetachUE_common, args = (device_id,)) @@ -527,7 +539,11 @@ class SSHConnection(): Usage() sys.exit('Insufficient Parameter') initialize_eNB_flag = False - self.CheckProcessExist(initialize_eNB_flag) + pStatus = self.CheckProcessExist(initialize_eNB_flag) + if (pStatus < 0): + self.CreateHtmlTestRow('N/A', 'KO', pStatus) + self.CreateHtmlFooter() + sys.exit(1) multi_jobs = [] for device_id in self.UEDevices: p = Process(target = SSH.RebootUE_common, args = (device_id,)) @@ -649,7 +665,11 @@ class SSHConnection(): Usage() sys.exit('Insufficient Parameter') initialize_eNB_flag = False - self.CheckProcessExist(initialize_eNB_flag) + pStatus = self.CheckProcessExist(initialize_eNB_flag) + if (pStatus < 0): + self.CreateHtmlTestRow(self.ping_args, 'KO', pStatus) + self.CreateHtmlFooter() + sys.exit(1) self.GetAllUEIPAddresses() multi_jobs = [] i = 0 @@ -666,7 +686,7 @@ class SSHConnection(): job.join() if (status_queue.empty()): - self.CreateHtmlTestRow(self.ping_args, 'KO', len(self.UEDevices)) + self.CreateHtmlTestRow(self.ping_args, 'KO', 0) self.CreateHtmlFooter() sys.exit(1) else: @@ -1073,7 +1093,11 @@ class SSHConnection(): Usage() sys.exit('Insufficient Parameter') initialize_eNB_flag = False - self.CheckProcessExist(initialize_eNB_flag) + pStatus = self.CheckProcessExist(initialize_eNB_flag) + if (pStatus < 0): + self.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus) + self.CreateHtmlFooter() + sys.exit(1) self.GetAllUEIPAddresses() multi_jobs = [] i = 0 @@ -1091,7 +1115,7 @@ class SSHConnection(): job.join() if (status_queue.empty()): - self.CreateHtmlTestRow(self.iperf_args, 'KO', len(self.UEDevices)) + self.CreateHtmlTestRow(self.iperf_args, 'KO', 0) self.CreateHtmlFooter() sys.exit(1) else: @@ -1120,39 +1144,53 @@ class SSHConnection(): def CheckProcessExist(self, initialize_eNB_flag): multi_jobs = [] - p = Process(target = SSH.CheckHSSProcess, args = ()) + status_queue = SimpleQueue() + p = Process(target = SSH.CheckHSSProcess, args = (status_queue,)) p.daemon = True p.start() multi_jobs.append(p) - p = Process(target = SSH.CheckMMEProcess, args = ()) + p = Process(target = SSH.CheckMMEProcess, args = (status_queue,)) p.daemon = True p.start() multi_jobs.append(p) - p = Process(target = SSH.CheckSPGWProcess, args = ()) + p = Process(target = SSH.CheckSPGWProcess, args = (status_queue,)) p.daemon = True p.start() multi_jobs.append(p) if initialize_eNB_flag == False: - p = Process(target = SSH.CheckeNBProcess, args = ()) + p = Process(target = SSH.CheckeNBProcess, args = (status_queue,)) p.daemon = True p.start() multi_jobs.append(p) for job in multi_jobs: job.join() - def CheckeNBProcess(self): + if (status_queue.empty()): + return -15 + else: + result = 0 + while (not status_queue.empty()): + status = status_queue.get() + if (status < 0): + result = status + return result + + def CheckeNBProcess(self, status_queue): try: self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword) self.command('stdbuf -o0 ps -aux | grep -v grep | grep --color=never lte-softmodem', '\$', 5) result = re.search('lte-softmodem', str(self.ssh.before)) if result is None: logging.debug('\u001B[1;37;41m eNB Process Not Found! \u001B[0m') - sys.exit(1) + #sys.exit(1) + status_queue.put(-1) + else: + status_queue.put(1) self.close() except: os.kill(os.getppid(),signal.SIGUSR1) - def CheckHSSProcess(self): + def CheckHSSProcess(self, status_queue): try: self.open(self.EPCIPAddress, self.EPCUserName, self.EPCPassword) self.command('stdbuf -o0 ps -aux | grep -v grep | grep --color=never hss', '\$', 5) @@ -1162,12 +1200,15 @@ class SSHConnection(): result = re.search('hss_sim s6as diam_hss', str(self.ssh.before)) if result is None: logging.debug('\u001B[1;37;41m HSS Process Not Found! \u001B[0m') - sys.exit(1) + status_queue.put(-2) + #sys.exit(1) + else: + status_queue.put(2) self.close() except: os.kill(os.getppid(),signal.SIGUSR1) - def CheckMMEProcess(self): + def CheckMMEProcess(self, status_queue): try: self.open(self.EPCIPAddress, self.EPCUserName, self.EPCPassword) self.command('stdbuf -o0 ps -aux | grep -v grep | grep --color=never mme', '\$', 5) @@ -1177,12 +1218,15 @@ class SSHConnection(): result = re.search('mme', str(self.ssh.before)) if result is None: logging.debug('\u001B[1;37;41m MME Process Not Found! \u001B[0m') - sys.exit(1) + status_queue.put(-3) + #sys.exit(1) + else: + status_queue.put(3) self.close() except: os.kill(os.getppid(),signal.SIGUSR1) - def CheckSPGWProcess(self): + def CheckSPGWProcess(self, status_queue): try: self.open(self.EPCIPAddress, self.EPCUserName, self.EPCPassword) if re.match('OAI', self.EPCType, re.IGNORECASE): @@ -1193,7 +1237,10 @@ class SSHConnection(): result = re.search('xGw', str(self.ssh.before)) if result is None: logging.debug('\u001B[1;37;41m SPGW Process Not Found! \u001B[0m') - sys.exit(1) + status_queue.put(-4) + #sys.exit(1) + else: + status_queue.put(4) self.close() except: os.kill(os.getppid(),signal.SIGUSR1) @@ -1396,7 +1443,7 @@ class SSHConnection(): self.htmlFile.write(' \n') self.htmlFile.write(' \n') self.htmlFile.write(' \n') - self.htmlFile.write(' \n') + self.htmlFile.write(' \n') self.htmlFile.write(' \n') self.htmlFile.write(' \n') self.htmlFile.write(' \n') @@ -1454,7 +1501,7 @@ class SSHConnection(): self.htmlFile.close() self.htmlFooterCreated = False - def CreateHtmlTestRow(self, options, status, ue_status): + def CreateHtmlTestRow(self, options, status, processesStatus): if ((not self.htmlFooterCreated) and (self.htmlHeaderCreated)): self.htmlFile.write(' \n') self.htmlFile.write(' \n') @@ -1463,15 +1510,23 @@ class SSHConnection(): if (str(status) == 'OK'): self.htmlFile.write(' \n') elif (str(status) == 'KO'): - self.htmlFile.write(' \n') + if (processesStatus == 0): + self.htmlFile.write(' \n') + elif (processesStatus == -1): + self.htmlFile.write(' \n') + elif (processesStatus == -2): + self.htmlFile.write(' \n') + elif (processesStatus == -3): + self.htmlFile.write(' \n') + elif (processesStatus == -4): + self.htmlFile.write(' \n') + else: + self.htmlFile.write(' \n') else: self.htmlFile.write(' \n') i = 0 while (i < self.htmlUEConnected): - if (i < ue_status): - self.htmlFile.write(' \n') - else: - self.htmlFile.write(' \n') + self.htmlFile.write(' \n') i += 1 self.htmlFile.write(' \n') From d44ef56e3b0c326e9a448f1e2dba924c65ff210e Mon Sep 17 00:00:00 2001 From: Haruki NAOI Date: Tue, 28 Aug 2018 16:55:45 +0900 Subject: [PATCH 046/379] Fix: UE dose not respond to paging message. --- openair1/SCHED/fapi_l1.c | 4 ++-- openair2/RRC/LTE/MESSAGES/asn1_msg.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/openair1/SCHED/fapi_l1.c b/openair1/SCHED/fapi_l1.c index ad72c3d9f5..4c2f8d53d5 100644 --- a/openair1/SCHED/fapi_l1.c +++ b/openair1/SCHED/fapi_l1.c @@ -300,9 +300,9 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr dlsch0_harq->pdsch_start = rel10->pdsch_start; } #ifdef PHY_TX_THREAD - dlsch0_harq->i0 = rel13->initial_transmission_sf_io; + dlsch0_harq->i0 = 0xFFFF; #else - dlsch0->i0 = rel13->initial_transmission_sf_io; + dlsch0->i0 = 0xFFFF; #endif #endif diff --git a/openair2/RRC/LTE/MESSAGES/asn1_msg.c b/openair2/RRC/LTE/MESSAGES/asn1_msg.c index 66aae4237a..3dd50b06ef 100644 --- a/openair2/RRC/LTE/MESSAGES/asn1_msg.c +++ b/openair2/RRC/LTE/MESSAGES/asn1_msg.c @@ -3314,6 +3314,7 @@ uint8_t do_Paging(uint8_t Mod_id, uint8_t *buffer, ue_paging_identity_t ue_pagin &paging_record_p->ue_Identity.choice.s_TMSI.m_TMSI); paging_record_p->ue_Identity.choice.s_TMSI.m_TMSI.bits_unused = 0; } else if (ue_paging_identity.presenceMask == UE_PAGING_IDENTITY_imsi) { + paging_record_p->ue_Identity.present = PagingUE_Identity_PR_imsi; IMSI_Digit_t imsi_digit[21]; for (j = 0; j< ue_paging_identity.choice.imsi.length; j++) { /* IMSI size */ imsi_digit[j] = (IMSI_Digit_t)ue_paging_identity.choice.imsi.buffer[j]; From fdea649ddf09392fc518c01344a4855c1eada6fa Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 28 Aug 2018 17:17:06 +0200 Subject: [PATCH 047/379] CI: Adding skeleton to perform basic-simulator testing Signed-off-by: Raphael Defosseux --- ci-scripts/buildOnVM.sh | 3 + ci-scripts/conf_files/lte-basic-sim.conf | 256 +++++++++++++++++++++++ ci-scripts/runTestOnVM.sh | 226 +++++++++++++++++++- 3 files changed, 483 insertions(+), 2 deletions(-) create mode 100644 ci-scripts/conf_files/lte-basic-sim.conf diff --git a/ci-scripts/buildOnVM.sh b/ci-scripts/buildOnVM.sh index 76a11c6d38..eab2f7c624 100755 --- a/ci-scripts/buildOnVM.sh +++ b/ci-scripts/buildOnVM.sh @@ -135,6 +135,7 @@ case $key in LOG_PATTERN=basic_simulator NB_PATTERN_FILES=2 BUILD_OPTIONS="--basic-simulator" + VM_MEMORY=8192 shift ;; -v3) @@ -186,6 +187,7 @@ case $key in LOG_PATTERN=basic_simulator NB_PATTERN_FILES=2 BUILD_OPTIONS="--basic-simulator" + VM_MEMORY=8192 ;; phy-sim) VM_NAME=ci-phy-sim @@ -289,6 +291,7 @@ echo "############################################################" echo "Running install and build script on VM ($VM_NAME)" echo "############################################################" echo "sudo cp 01proxy /etc/apt/apt.conf.d/" > $VM_CMDS +echo "touch /home/ubuntu/.hushlogin" >> $VM_CMDS if [[ "$VM_NAME" == *"-cppcheck"* ]] then echo "echo \"sudo apt-get --yes --quiet install zip cppcheck \"" >> $VM_CMDS diff --git a/ci-scripts/conf_files/lte-basic-sim.conf b/ci-scripts/conf_files/lte-basic-sim.conf new file mode 100644 index 0000000000..febf24257c --- /dev/null +++ b/ci-scripts/conf_files/lte-basic-sim.conf @@ -0,0 +1,256 @@ +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"; + + tr_s_preference = "local_mac" + + ////////// Physical parameters: + + component_carriers = ( + { + node_function = "3GPP_eNODEB"; + 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 = 90; + rx_gain = 125; + pbch_repetition = "FALSE"; + 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 = 0; + pucch_nCS_AN = 0; + pucch_n1_AN = 0; + pdsch_referenceSignalPower = -27; + 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; + + //Parameters for SIB18 + rxPool_sc_CP_Len = "normal"; + rxPool_sc_Period = "sf40"; + rxPool_data_CP_Len = "normal"; + rxPool_ResourceConfig_prb_Num = 20; + rxPool_ResourceConfig_prb_Start = 5; + rxPool_ResourceConfig_prb_End = 44; + rxPool_ResourceConfig_offsetIndicator_present = "prSmall"; + rxPool_ResourceConfig_offsetIndicator_choice = 0; + rxPool_ResourceConfig_subframeBitmap_present = "prBs40"; + rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000"; + rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5; + rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; +/* rxPool_dataHoppingConfig_hoppingParameter = 0; + rxPool_dataHoppingConfig_numSubbands = "ns1"; + rxPool_dataHoppingConfig_rbOffset = 0; + rxPool_commTxResourceUC-ReqAllowed = "TRUE"; +*/ + // Parameters for SIB19 + discRxPool_cp_Len = "normal" + discRxPool_discPeriod = "rf32" + discRxPool_numRetx = 1; + discRxPool_numRepetition = 2; + discRxPool_ResourceConfig_prb_Num = 5; + discRxPool_ResourceConfig_prb_Start = 3; + discRxPool_ResourceConfig_prb_End = 21; + discRxPool_ResourceConfig_offsetIndicator_present = "prSmall"; + discRxPool_ResourceConfig_offsetIndicator_choice = 0; + discRxPool_ResourceConfig_subframeBitmap_present = "prBs40"; + discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff"; + discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5; + discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; + + } + ); + + + 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 = "CI_MME_IP_ADDR"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + + ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + }; + } +); + +MACRLCs = ( + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + phy_test_mode = 0; + puSch10xSnr = 200; + puCch10xSnr = 200; + } +); + +L1s = ( + { + num_cc = 1; + tr_n_preference = "local_mac"; + } +); + +RUs = ( + { + local_rf = "yes" + nb_tx = 1 + nb_rx = 1 + att_tx = 0 + att_rx = 0; + bands = [7]; + max_pdschReferenceSignalPower = -27; + max_rxgain = 125; + eNB_instances = [0]; + + } +); + +NETWORK_CONTROLLER : +{ + FLEXRAN_ENABLED = "no"; + FLEXRAN_INTERFACE_NAME = "lo"; + FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; + FLEXRAN_PORT = 2210; + FLEXRAN_CACHE = "/mnt/oai_agent_cache"; + FLEXRAN_AWAIT_RECONF = "no"; +}; + + 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/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index 68438758f5..578b6d2ebd 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -122,6 +122,8 @@ case $key in ;; -v2) VM_NAME=ci-basic-sim + RUN_OPTIONS="complex" + ARCHIVES_LOC=basic_sim/test shift ;; -v3) @@ -150,6 +152,8 @@ case $key in ;; basic-sim) VM_NAME=ci-basic-sim + RUN_OPTIONS="complex" + ARCHIVES_LOC=basic_sim/test ;; phy-sim) VM_NAME=ci-phy-sim @@ -210,8 +214,11 @@ echo "$VM_NAME has for IP addr = $VM_IP_ADDR" if [ "$RUN_OPTIONS" == "none" ] then echo "No run on VM testing for this variant currently" -else + exit $STATUS +fi +if [[ $RUN_OPTIONS =~ .*run_exec_autotests.* ]] +then echo "############################################################" echo "Running test script on VM ($VM_NAME)" echo "############################################################" @@ -271,7 +278,7 @@ else rm -f $VM_CMDS echo "############################################################" - echo "Checking build status" + echo "Checking run status" echo "############################################################" LOG_FILES=`ls $ARCHIVES_LOC/results_autotests*.xml` @@ -315,4 +322,219 @@ else fi +if [[ "$RUN_OPTIONS" == "complex" ]] && [[ $VM_NAME =~ .*-basic-sim.* ]] +then + if [ -d $ARCHIVES_LOC ] + then + rm -Rf $ARCHIVES_LOC + fi + mkdir --parents $ARCHIVES_LOC + + EPC_VM_NAME=`echo $VM_NAME | sed -e "s#basic-sim#epc#"` + LTEBOX=0 + if [ -d /opt/ltebox-archives/ ] + then + # Checking if all ltebox archives are available to run ltebx epc on a brand new VM + if [ -f /opt/ltebox-archives/ltebox_2.2.70_16_04_amd64.deb ] && [ -f /opt/ltebox-archives/etc-conf.zip ] && [ -f /opt/ltebox-archives/hss-sim.zip ] + then + echo "############################################################" + echo "Test EPC on VM ($EPC_VM_NAME) will be using ltebox" + echo "############################################################" + LTEBOX=1 + fi + fi + # Here we could have other types of EPC detection + + # Do we need to start the EPC VM + EPC_VM_CMDS=`echo $VM_CMDS | sed -e "s#cmds#epc-cmds#"` + echo "EPC_VM_CMD_FILE = $EPC_VM_CMDS" + IS_EPC_VM_ALIVE=`uvt-kvm list | grep -c $EPC_VM_NAME` + if [ $IS_EPC_VM_ALIVE -eq 0 ] + then + echo "############################################################" + echo "Creating test EPC VM ($EPC_VM_NAME) on Ubuntu Cloud Image base" + echo "############################################################" + uvt-kvm create $EPC_VM_NAME release=xenial --unsafe-caching + fi + + uvt-kvm wait $EPC_VM_NAME --insecure + EPC_VM_IP_ADDR=`uvt-kvm ip $EPC_VM_NAME` + echo "$EPC_VM_NAME has for IP addr = $EPC_VM_IP_ADDR" + scp -o StrictHostKeyChecking=no /etc/apt/apt.conf.d/01proxy ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu + + # ltebox specific actions (install and start) + if [ $LTEBOX -eq 2 ] + then + echo "############################################################" + echo "Copying ltebox archives into EPC VM ($EPC_VM_NAME)" + echo "############################################################" + scp -o StrictHostKeyChecking=no /opt/ltebox-archives/ltebox_2.2.70_16_04_amd64.deb ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu + scp -o StrictHostKeyChecking=no /opt/ltebox-archives/etc-conf.zip ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu + scp -o StrictHostKeyChecking=no /opt/ltebox-archives/hss-sim.zip ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu + + echo "############################################################" + echo "Running install and start EPC on EPC VM ($EPC_VM_NAME)" + echo "############################################################" + echo "sudo cp 01proxy /etc/apt/apt.conf.d/" > $EPC_VM_CMDS + echo "touch /home/ubuntu/.hushlogin" >> $EPC_VM_CMDS + echo "echo \"sudo apt-get --yes --quiet install zip openjdk-8-jre libconfuse-dev libreadline-dev liblog4c-dev libgcrypt-dev libsctp-dev python2.7 python2.7-dev daemon iperf\"" >> $EPC_VM_CMDS + echo "sudo apt-get update > zip-install.txt 2>&1" >> $EPC_VM_CMDS + echo "sudo apt-get --yes install zip openjdk-8-jre libconfuse-dev libreadline-dev liblog4c-dev libgcrypt-dev libsctp-dev python2.7 python2.7-dev daemon iperf >> zip-install.txt 2>&1" >> $EPC_VM_CMDS + + # Installing and Starting HSS + echo "echo \"cd /opt\"" >> $EPC_VM_CMDS + echo "cd /opt" >> $EPC_VM_CMDS + echo "echo \"sudo unzip -qq /home/ubuntu/hss-sim.zip\"" >> $EPC_VM_CMDS + echo "sudo unzip -qq /home/ubuntu/hss-sim.zip" >> $EPC_VM_CMDS + echo "echo \"cd /opt/hss_sim0609\"" >> $EPC_VM_CMDS + echo "cd /opt/hss_sim0609" >> $EPC_VM_CMDS + + echo "echo \"sudo daemon --unsafe --name=simulated_hss --chdir=/opt/hss_sim0609 ./starthss_real\"" >> $EPC_VM_CMDS + echo "sudo daemon --unsafe --name=simulated_hss --chdir=/opt/hss_sim0609 ./starthss_real" >> $EPC_VM_CMDS + + # Installing and Starting ltebox + echo "echo \"cd /home/ubuntu\"" >> $EPC_VM_CMDS + echo "cd /home/ubuntu" >> $EPC_VM_CMDS + echo "echo \"sudo dpkg -i ltebox_2.2.70_16_04_amd64.deb \"" >> $EPC_VM_CMDS + echo "sudo dpkg -i ltebox_2.2.70_16_04_amd64.deb >> zip-install.txt 2>&1" >> $EPC_VM_CMDS + + echo "echo \"cd /opt/ltebox/etc/\"" >> $EPC_VM_CMDS + echo "cd /opt/ltebox/etc/" >> $EPC_VM_CMDS + echo "echo \"sudo unzip -qq -o /home/ubuntu/etc-conf.zip\"" >> $EPC_VM_CMDS + echo "sudo unzip -qq -o /home/ubuntu/etc-conf.zip" >> $EPC_VM_CMDS + echo "sudo sed -i -e 's#EPC_VM_IP_ADDRESS#$EPC_VM_IP_ADDR#' gw.conf" >> $EPC_VM_CMDS + echo "sudo sed -i -e 's#EPC_VM_IP_ADDRESS#$EPC_VM_IP_ADDR#' mme.conf" >> $EPC_VM_CMDS + + echo "echo \"cd /opt/ltebox/tools/\"" >> $EPC_VM_CMDS + echo "cd /opt/ltebox/tools/" >> $EPC_VM_CMDS + echo "echo \"sudo ./start_ltebox\"" >> $EPC_VM_CMDS + echo "nohup sudo ./start_ltebox > /home/ubuntu/ltebox.txt" >> $EPC_VM_CMDS + + ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS + rm -f $EPC_VM_CMDS + + # We may have some adaptation to do + if [ -f /opt/ltebox-archives/adapt_ue_sim.txt ] + then + echo "############################################################" + echo "Doing some adaptation on UE side" + echo "############################################################" + ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < /opt/ltebox-archives/adapt_ue_sim.txt + fi + fi + + # HERE ADD any install actions for another EPC + + # Retrieve EPC real IP address + if [ $LTEBOX -eq 1 ] + then + # in our configuration file, we are using pool 5 + echo "ifconfig tun5 | egrep \"inet addr\" | sed -e 's#^.*inet addr:##' -e 's# P-t-P:.*\$##'" > $EPC_VM_CMDS + REAL_EPC_IP_ADDR=`ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS` + echo "EPC IP Address is : $REAL_EPC_IP_ADDR" + rm $EPC_VM_CMDS + fi + + echo "############################################################" + echo "Starting the eNB" + echo "############################################################" + echo "cd /home/ubuntu/tmp" > $VM_CMDS + echo "echo \"sudo apt-get --yes --quiet install daemon \"" >> $VM_CMDS + echo "sudo apt-get --yes install daemon >> /home/ubuntu/tmp/cmake_targets/log/daemon-install.txt 2>&1" >> $VM_CMDS + echo "echo \"export ENODEB=1\"" >> $VM_CMDS + echo "export ENODEB=1" >> $VM_CMDS + echo "echo \"source oaienv\"" >> $VM_CMDS + echo "source oaienv" >> $VM_CMDS + echo "cd ci-scripts/conf_files/" >> $VM_CMDS + echo "cp lte-basic-sim.conf ci-lte-basic-sim.conf" >> $VM_CMDS + echo "sed -i -e 's#CI_MME_IP_ADDR#$EPC_VM_IP_ADDR#' -e 's#CI_ENB_IP_ADDR#$VM_IP_ADDR#' ci-lte-basic-sim.conf" >> $VM_CMDS + echo "echo \"cd /home/ubuntu/tmp/cmake_targets/basic_simulator/enb/\"" >> $VM_CMDS + echo "cd /home/ubuntu/tmp/cmake_targets/basic_simulator/enb/" >> $VM_CMDS + echo "echo \"./lte-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-lte-basic-sim.conf\" > ./my-lte-softmodem-run.sh " >> $VM_CMDS + echo "chmod 775 ./my-lte-softmodem-run.sh" >> $VM_CMDS + echo "cat ./my-lte-softmodem-run.sh" >> $VM_CMDS + echo "sudo -E daemon --inherit --unsafe --name=enb_daemon --chdir=/home/ubuntu/tmp/cmake_targets/basic_simulator/enb -o /home/ubuntu/tmp/cmake_targets/log/enb.log ./my-lte-softmodem-run.sh" >> $VM_CMDS + + ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS + + echo "############################################################" + echo "Starting the UE" + echo "############################################################" + echo "echo \"cd /home/ubuntu/tmp/cmake_targets/basic_simulator/ue\"" > $VM_CMDS + echo "cd /home/ubuntu/tmp/cmake_targets/basic_simulator/ue" > $VM_CMDS + echo "echo \"./lte-uesoftmodem -C 2680000000 -r 25 --ue-rxgain 140\" > ./my-lte-uesoftmodem-run.sh" >> $VM_CMDS + echo "chmod 775 ./my-lte-uesoftmodem-run.sh" >> $VM_CMDS + echo "cat ./my-lte-uesoftmodem-run.sh" >> $VM_CMDS + echo "sudo -E daemon --inherit --unsafe --name=ue_daemon --chdir=/home/ubuntu/tmp/cmake_targets/basic_simulator/ue -o /home/ubuntu/tmp/cmake_targets/log/ue.log ./my-lte-uesoftmodem-run.sh" >> $VM_CMDS + + ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS + rm $VM_CMDS + sleep 10 + echo "ifconfig oip1 | egrep \"inet addr\" | sed -e 's#^.*inet addr:##' -e 's# P-t-P:.*\$##'" > $VM_CMDS + UE_IP_ADDR=`ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS` + echo "UE IP Address for EPC is : $UE_IP_ADDR" + rm $VM_CMDS + + echo "############################################################" + echo "Pinging the UE" + echo "############################################################" + echo "echo \"ping -c 20 $UE_IP_ADDR\"" > $EPC_VM_CMDS + echo "ping -c 20 $UE_IP_ADDR | tee -a ping_ue.txt" >> $EPC_VM_CMDS + ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS + rm -f $EPC_VM_CMDS + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/ping_ue.txt $ARCHIVES_LOC + + echo "############################################################" + echo "Iperf DL" + echo "############################################################" + echo "echo \"iperf -u -s -i 1\"" > $VM_CMDS + echo "nohup iperf -u -s -i 1 > tmp/cmake_targets/log/iperf_dl_server.txt &" >> $VM_CMDS + ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS + rm $VM_CMDS + + echo "echo \"iperf -c $UE_IP_ADDR -u -t 30 -b 15M -i 1\"" > $EPC_VM_CMDS + echo "iperf -c $UE_IP_ADDR -u -t 30 -b 15M -i 1 | tee -a iperf_dl_client.txt" >> $EPC_VM_CMDS + ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS + rm -f $EPC_VM_CMDS + + echo "killall --signal SIGKILL iperf" >> $VM_CMDS + ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS + rm $VM_CMDS + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/iperf_dl_client.txt $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/iperf_dl_server.txt $ARCHIVES_LOC + + echo "############################################################" + echo "Iperf UL" + echo "############################################################" + echo "echo \"iperf -u -s -i 1\"" > $EPC_VM_CMDS + echo "nohup iperf -u -s -i 1 > iperf_ul_server.txt &" >> $EPC_VM_CMDS + ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS + rm $EPC_VM_CMDS + + echo "echo \"iperf -c $REAL_EPC_IP_ADDR -u -t 30 -b 4M -i 1\"" > $VM_CMDS + echo "iperf -c $REAL_EPC_IP_ADDR -u -t 30 -b 4M -i 1 | tee -a /home/ubuntu/tmp/cmake_targets/log/iperf_ul_client.txt" >> $VM_CMDS + ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS + rm -f $VM_CMDS + + echo "killall --signal SIGKILL iperf" >> $EPC_VM_CMDS + ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS + rm $EPC_VM_CMDS + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/iperf_ul_server.txt $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/iperf_ul_client.txt $ARCHIVES_LOC + + echo "############################################################" + echo "Terminate enb/ue simulators" + echo "############################################################" + echo "echo \"sudo daemon --name=enb_daemon --stop\"" > $VM_CMDS + echo "sudo daemon --name=enb_daemon --stop" >> $VM_CMDS + echo "echo \"sudo daemon --name=ue_daemon --stop\"" >> $VM_CMDS + echo "sudo daemon --name=ue_daemon --stop" >> $VM_CMDS + echo "echo \"sudo killall --signal SIGKILL lte-softmodem\"" >> $VM_CMDS + echo "sudo killall --signal SIGKILL lte-softmodem" >> $VM_CMDS + ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS + rm -f $VM_CMDS + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/enb.log $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/ue.log $ARCHIVES_LOC +fi + exit $STATUS From d57024162a21796bb10c546021cc50a6cb4076fb Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 28 Aug 2018 17:27:35 +0200 Subject: [PATCH 048/379] CI: fix bypass Signed-off-by: Raphael Defosseux --- ci-scripts/runTestOnVM.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index 578b6d2ebd..a842f9932e 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -363,7 +363,7 @@ then scp -o StrictHostKeyChecking=no /etc/apt/apt.conf.d/01proxy ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu # ltebox specific actions (install and start) - if [ $LTEBOX -eq 2 ] + if [ $LTEBOX -eq 1 ] then echo "############################################################" echo "Copying ltebox archives into EPC VM ($EPC_VM_NAME)" From 16314f041f7433f21d4efa116c8c75d826bdcfb0 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 29 Aug 2018 10:27:10 +0200 Subject: [PATCH 049/379] CI: fix EPC IP address retrieve and zip of test-files Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 2 +- ci-scripts/runTestOnVM.sh | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index d4fe0d8555..d7279d7c46 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -319,7 +319,7 @@ pipeline { always { script { dir ('archives') { - sh "if [ -d */test ]; then zip -r -qq vm_tests_logs.zip */test ; fi" + sh "if [ -d basic_sim/test ] || [ -d phy_sim/test]; then zip -r -qq vm_tests_logs.zip */test ; fi" } if(fileExists('archives/vm_tests_logs.zip')) { archiveArtifacts artifacts: 'archives/vm_tests_logs.zip' diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index a842f9932e..9bb67803ab 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -421,6 +421,10 @@ then echo "############################################################" ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < /opt/ltebox-archives/adapt_ue_sim.txt fi + + # for the moment, just a plain sleep + # TODO: more sophiscated way to detect EPC is started + sleep 5 fi # HERE ADD any install actions for another EPC @@ -469,6 +473,8 @@ then ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS rm $VM_CMDS + # for the moment, just a plain sleep + # TODO: more sophiscated way to detect eNB is started and that UE is connected sleep 10 echo "ifconfig oip1 | egrep \"inet addr\" | sed -e 's#^.*inet addr:##' -e 's# P-t-P:.*\$##'" > $VM_CMDS UE_IP_ADDR=`ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS` From 3182183860680bb07fea0881a5f52b1191dbea3e Mon Sep 17 00:00:00 2001 From: Haruki NAOI Date: Wed, 29 Aug 2018 21:46:05 +0900 Subject: [PATCH 050/379] Fix: --log-mem options is erased. --- common/utils/LOG/log.c | 299 ++++++++++++++++++++++++++++++-- common/utils/LOG/log.h | 14 ++ common/utils/LOG/log_extern.h | 2 + common/utils/itti/assertions.h | 1 - common/utils/itti/signals.c | 3 + targets/RT/USER/lte-softmodem.c | 10 +- targets/RT/USER/lte-softmodem.h | 1 + 7 files changed, 310 insertions(+), 20 deletions(-) diff --git a/common/utils/LOG/log.c b/common/utils/LOG/log.c index 02ee849202..d67cda7afe 100644 --- a/common/utils/LOG/log.c +++ b/common/utils/LOG/log.c @@ -49,7 +49,18 @@ #include "common/config/config_userapi.h" // main log variables - +log_mem_cnt_t log_mem_d[2]; +int log_mem_flag=0; +int log_mem_multi=1; +volatile int log_mem_side=0; +pthread_mutex_t log_mem_lock; +pthread_cond_t log_mem_notify; +pthread_t log_mem_thread; +int log_mem_file_cnt=0; +volatile int log_mem_write_flag=0; +volatile int log_mem_write_side=0; +char __log_mem_filename[1024]={0}; +char * log_mem_filename = &__log_mem_filename[0]; mapping log_level_names[] = { @@ -485,7 +496,7 @@ int rt = pthread_getname_np(pthread_self(), threadname,bufsize) ; void logRecord_mt(const char *file, const char *func, int line, int comp, int level, const char* format, ... ) - { +{ char threadname[PR_SET_NAME]; char log_buffer[MAX_LOG_TOTAL]; @@ -493,23 +504,23 @@ void logRecord_mt(const char *file, const char *func, int line, int comp, int le va_start(args, format); + if(log_mem_flag == 1) { + log_output_memory(file,func,line,comp,level, format,args); + } + else { + snprintf(log_buffer, MAX_LOG_TOTAL , "%s%s[%s]%s %s %s", + log_level_highlight_end[level], + ( (g_log->flag & FLAG_NOCOLOR)?"":log_level_highlight_start[level]), + g_log->log_component[comp].name, + ( (g_log->flag & FLAG_LEVEL)?g_log->level2string[level]:""), + ( (g_log->flag & FLAG_THREAD)?log_getthreadname(threadname,PR_SET_NAME+1):""), + format); - - - - snprintf(log_buffer, MAX_LOG_TOTAL , "%s%s[%s]%s %s %s", - log_level_highlight_end[level], - ( (g_log->flag & FLAG_NOCOLOR)?"":log_level_highlight_start[level]), - g_log->log_component[comp].name, - ( (g_log->flag & FLAG_LEVEL)?g_log->level2string[level]:""), - ( (g_log->flag & FLAG_THREAD)?log_getthreadname(threadname,PR_SET_NAME+1):""), - format); - - g_log->log_component[comp].fwrite(g_log->log_component[comp].stream,log_buffer, args); + g_log->log_component[comp].fwrite(g_log->log_component[comp].stream,log_buffer, args); + } va_end(args); - } @@ -531,8 +542,6 @@ int set_log(int component, int level, int interval) return 0; } - - void set_glog(int level) { for (int c=0; c< MAX_LOG_COMPONENTS; c++ ) { @@ -628,6 +637,262 @@ void logClean (void) } } + +extern int oai_exit; +void flush_mem_to_file(void) +{ + int fp; + char f_name[1024]; + struct timespec slp_tm; + slp_tm.tv_sec = 0; + slp_tm.tv_nsec = 10000; + + pthread_setname_np( pthread_self(), "flush_mem_to_file"); + + while (!oai_exit) { + pthread_mutex_lock(&log_mem_lock); + log_mem_write_flag=0; + pthread_cond_wait(&log_mem_notify, &log_mem_lock); + log_mem_write_flag=1; + pthread_mutex_unlock(&log_mem_lock); + // write! + if(log_mem_d[log_mem_write_side].enable_flag==0){ + if(log_mem_file_cnt>1){ + log_mem_file_cnt=1; + printf("log over write!!!\n"); + } + snprintf(f_name,1024, "%s_%d.log",log_mem_filename,log_mem_file_cnt); + fp=open(f_name, O_WRONLY | O_CREAT, 0666); + int ret = write(fp, log_mem_d[log_mem_write_side].buf_p, log_mem_d[log_mem_write_side].buf_index); + if ( ret < 0) { + fprintf(stderr,"{LOG} %s %d Couldn't write in %s \n",__FILE__,__LINE__,f_name); + exit(EXIT_FAILURE); + } + close(fp); + log_mem_file_cnt++; + log_mem_d[log_mem_write_side].buf_index=0; + log_mem_d[log_mem_write_side].enable_flag=1; + }else{ + printf("If you'd like to write log, you should set enable flag to 0!!!\n"); + nanosleep(&slp_tm,NULL); + } + } +} + +void log_output_memory(const char *file, const char *func, int line, int comp, int level, const char* format,va_list args) +{ + //logRecord_mt(file,func,line, pthread_self(), comp, level, format, ##args) + int len = 0; + log_component_t *c; + char *log_start; + char *log_end; + /* The main difference with the version above is the use of this local log_buffer. + * The other difference is the return value of snprintf which was not used + * correctly. It was not a big problem because in practice MAX_LOG_TOTAL is + * big enough so that the buffer is never full. + */ + char log_buffer[MAX_LOG_TOTAL]; + + /* for no gcc warnings */ + (void)log_start; + (void)log_end; + + + c = &g_log->log_component[comp]; + + //VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_LOG_RECORD, VCD_FUNCTION_IN); + + // make sure that for log trace the extra info is only printed once, reset when the level changes + if ((level == OAILOG_FILE) || (level == OAILOG_TRACE)) { + log_start = log_buffer; + len = vsnprintf(log_buffer, MAX_LOG_TOTAL, format, args); + if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL; + log_end = log_buffer + len; + } else { + if ( (g_log->flag & 0x001) || (c->flag & 0x001) ) { + len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "%s", + log_level_highlight_start[level]); + if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL; + } + + log_start = log_buffer + len; + +// if ( (g_log->flag & 0x004) || (c->flag & 0x004) ) { + len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s]", + g_log->log_component[comp].name); + if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL; +// } + +// if ( (g_log->flag & FLAG_LEVEL) || (c->flag & FLAG_LEVEL) ) { + len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s]", + g_log->level2string[level]); + if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL; +// } + + if ( (g_log->flag & FLAG_THREAD) || (c->flag & FLAG_THREAD) ) { +# define THREAD_NAME_LEN 128 + char threadname[THREAD_NAME_LEN]; + if (pthread_getname_np(pthread_self(), threadname, THREAD_NAME_LEN) != 0) + { + perror("pthread_getname_np : "); + } else { + len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s]", threadname); + if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL; + } +# undef THREAD_NAME_LEN + } + + if ( (g_log->flag & FLAG_FUNCT) || (c->flag & FLAG_FUNCT) ) { + len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s] ", + func); + if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL; + } + + if ( (g_log->flag & FLAG_FILE_LINE) || (c->flag & FLAG_FILE_LINE) ) { + len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s:%d]", + file, line); + if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL; + } + + //len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%08lx]", thread_id); + //if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL; + + len += vsnprintf(&log_buffer[len], MAX_LOG_TOTAL - len, format, args); + if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL; + log_end = log_buffer + len; + + if ( (g_log->flag & FLAG_NOCOLOR) || (c->flag & FLAG_NOCOLOR) ) { + len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "%s", + log_level_highlight_end[level]); + if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL; + } + } + + //va_end(args); + + // OAI printf compatibility + if ((g_log->onlinelog == 1) && (level != OAILOG_FILE)) { + if(log_mem_flag==1){ + if(log_mem_d[log_mem_side].enable_flag==1){ + int temp_index; + temp_index=log_mem_d[log_mem_side].buf_index; + if(temp_index+len+1 < LOG_MEM_SIZE){ + log_mem_d[log_mem_side].buf_index+=len; + memcpy(&log_mem_d[log_mem_side].buf_p[temp_index],log_buffer,len); + }else{ + log_mem_d[log_mem_side].enable_flag=0; + if(log_mem_d[1-log_mem_side].enable_flag==1){ + temp_index=log_mem_d[1-log_mem_side].buf_index; + if(temp_index+len+1 < LOG_MEM_SIZE){ + log_mem_d[1-log_mem_side].buf_index+=len; + log_mem_side=1-log_mem_side; + memcpy(&log_mem_d[log_mem_side].buf_p[temp_index],log_buffer,len); + /* write down !*/ + if (pthread_mutex_lock(&log_mem_lock) != 0) { + return; + } + if(log_mem_write_flag==0){ + log_mem_write_side=1-log_mem_side; + if(pthread_cond_signal(&log_mem_notify) != 0) { + } + } + if(pthread_mutex_unlock(&log_mem_lock) != 0) { + return; + } + }else{ + log_mem_d[1-log_mem_side].enable_flag=0; + } + } + } + } + }else{ + fwrite(log_buffer, len, 1, stdout); + } + } +} + +int logInit_log_mem (void) +{ + if(log_mem_flag==1){ + if(log_mem_multi==1){ + printf("log-mem multi!!!\n"); + log_mem_d[0].buf_p = malloc(LOG_MEM_SIZE); + log_mem_d[0].buf_index=0; + log_mem_d[0].enable_flag=1; + log_mem_d[1].buf_p = malloc(LOG_MEM_SIZE); + log_mem_d[1].buf_index=0; + log_mem_d[1].enable_flag=1; + log_mem_side=0; + if ((pthread_mutex_init (&log_mem_lock, NULL) != 0) + || (pthread_cond_init (&log_mem_notify, NULL) != 0)) { + log_mem_d[1].enable_flag=0; + return -1; + } + pthread_create(&log_mem_thread, NULL, (void *(*)(void *))flush_mem_to_file, (void*)NULL); + }else{ + printf("log-mem single!!!\n"); + log_mem_d[0].buf_p = malloc(LOG_MEM_SIZE); + log_mem_d[0].buf_index=0; + log_mem_d[0].enable_flag=1; + log_mem_d[1].enable_flag=0; + log_mem_side=0; + } + }else{ + log_mem_d[0].buf_p=NULL; + log_mem_d[1].buf_p=NULL; + log_mem_d[0].enable_flag=0; + log_mem_d[1].enable_flag=0; + } + + printf("log init done\n"); + + return 0; +} + +void close_log_mem(void){ + int fp; + char f_name[1024]; + + if(log_mem_flag==1){ + log_mem_d[0].enable_flag=0; + log_mem_d[1].enable_flag=0; + usleep(10); // wait for log writing + while(log_mem_write_flag==1){ + usleep(100); + } + if(log_mem_multi==1){ + snprintf(f_name,1024, "%s_%d.log",log_mem_filename,log_mem_file_cnt); + fp=open(f_name, O_WRONLY | O_CREAT, 0666); + int ret = write(fp, log_mem_d[0].buf_p, log_mem_d[0].buf_index); + if ( ret < 0) { + fprintf(stderr,"{LOG} %s %d Couldn't write in %s \n",__FILE__,__LINE__,f_name); + exit(EXIT_FAILURE); + } + close(fp); + free(log_mem_d[0].buf_p); + + snprintf(f_name,1024, "%s_%d.log",log_mem_filename,log_mem_file_cnt); + fp=open(f_name, O_WRONLY | O_CREAT, 0666); + ret = write(fp, log_mem_d[1].buf_p, log_mem_d[1].buf_index); + if ( ret < 0) { + fprintf(stderr,"{LOG} %s %d Couldn't write in %s \n",__FILE__,__LINE__,f_name); + exit(EXIT_FAILURE); + } + close(fp); + free(log_mem_d[1].buf_p); + }else{ + fp=open(log_mem_filename, O_WRONLY | O_CREAT, 0666); + int ret = write(fp, log_mem_d[0].buf_p, log_mem_d[0].buf_index); + if ( ret < 0) { + fprintf(stderr,"{LOG} %s %d Couldn't write in %s \n",__FILE__,__LINE__,log_mem_filename); + exit(EXIT_FAILURE); + } + close(fp); + free(log_mem_d[0].buf_p); + } + } + } + #ifdef LOG_TEST diff --git a/common/utils/LOG/log.h b/common/utils/LOG/log.h index 4a0552d494..edff0a5eeb 100644 --- a/common/utils/LOG/log.h +++ b/common/utils/LOG/log.h @@ -269,6 +269,20 @@ int is_newline( char *str, int size); int register_log_component(char *name, char *fext, int compidx); +#define LOG_MEM_SIZE 500*1024*1024 +#define LOG_MEM_FILE "./logmem.log" +void flush_mem_to_file(void); +void log_output_memory(const char *file, const char *func, int line, int comp, int level, const char* format,va_list args); +int logInit_log_mem(void); +void close_log_mem(void); + +typedef struct { + char* buf_p; + int buf_index; + int enable_flag; +} log_mem_cnt_t; + + /* @}*/ /*!\fn int32_t write_file_matlab(const char *fname, const char *vname, void *data, int length, int dec, char format); diff --git a/common/utils/LOG/log_extern.h b/common/utils/LOG/log_extern.h index 3c93d517ca..449333d92f 100644 --- a/common/utils/LOG/log_extern.h +++ b/common/utils/LOG/log_extern.h @@ -28,3 +28,5 @@ extern mapping log_level_names[]; extern mapping log_options[]; extern mapping log_maskmap[]; +extern int log_mem_flag; +extern char * log_mem_filename; diff --git a/common/utils/itti/assertions.h b/common/utils/itti/assertions.h index b872b009e2..bb6c27cbab 100644 --- a/common/utils/itti/assertions.h +++ b/common/utils/itti/assertions.h @@ -35,7 +35,6 @@ #ifndef ASSERTIONS_H_ #define ASSERTIONS_H_ -void output_log_mem(void); #define _Assert_Exit_ \ { \ fprintf(stderr, "\nExiting execution\n"); \ diff --git a/common/utils/itti/signals.c b/common/utils/itti/signals.c index 5dd667ae65..cfc902552e 100644 --- a/common/utils/itti/signals.c +++ b/common/utils/itti/signals.c @@ -117,18 +117,21 @@ int signal_handle(int *end) case SIGUSR1: SIG_DEBUG("Received SIGUSR1\n"); *end = 1; + close_log_mem(); break; case SIGSEGV: /* Fall through */ case SIGABRT: SIG_DEBUG("Received SIGABORT\n"); backtrace_handle_signal(&info); + close_log_mem(); break; case SIGINT: printf("Received SIGINT\n"); itti_send_terminate_message(TASK_UNKNOWN); *end = 1; + close_log_mem(); break; default: diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index e84f99e67f..49639c4937 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -70,6 +70,7 @@ unsigned short config_frames[4] = {2,9,11,13}; #endif #include "common/utils/LOG/log.h" +#include "common/utils/LOG/log_extern.h" #include "UTIL/OTG/otg_tx.h" #include "UTIL/OTG/otg_externs.h" #include "UTIL/MATH/oml.h" @@ -141,7 +142,7 @@ static int8_t threequarter_fs=0; uint32_t downlink_frequency[MAX_NUM_CCs][4]; int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; - +char logmem_filename[1024] = {0}; // This is a dummy declaration (dlsch_demodulation.c is no longer compiled for eNodeB) int16_t dlsch_demod_shift = 0; @@ -550,7 +551,12 @@ static void get_options(void) { if (start_telnetsrv) { load_module_shlib("telnetsrv",NULL,0); } - + if (strlen(logmem_filename) > 0) { + log_mem_filename = &logmem_filename[0]; + log_mem_flag = 1; + printf("Enabling OPT for log save at memory %s\n",log_mem_filename); + logInit_log_mem(); + } if ( !(CONFIG_ISFLAGSET(CONFIG_ABORT)) ) { diff --git a/targets/RT/USER/lte-softmodem.h b/targets/RT/USER/lte-softmodem.h index 2f8209f2d3..5412de6365 100644 --- a/targets/RT/USER/lte-softmodem.h +++ b/targets/RT/USER/lte-softmodem.h @@ -202,6 +202,7 @@ {"R" , CONFIG_HLP_FLOG, 0, uptr:&online_log_messages, defintval:1, TYPE_INT, 0}, \ {"g" , CONFIG_HLP_LOGL, 0, uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \ {"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL, uptr:&start_telnetsrv, defintval:0, TYPE_UINT, 0}, \ +{"log-mem", NULL, 0, strptr:(char **)&logmem_filename, defstrval:"./logmem.log", TYPE_STRING, sizeof(logmem_filename)}, \ } #define CMDLINE_ONLINELOG_IDX 0 #define CMDLINE_GLOGLEVEL_IDX 1 From 8fc3c48d857d06d6b07a375e0aeaf759fb70fb77 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 29 Aug 2018 16:53:17 +0200 Subject: [PATCH 051/379] CI: better reporting for simulator testing Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 16 +- ci-scripts/reportTestLocally.sh | 504 ++++++++++++++++++++++++++++++++ ci-scripts/runTestOnVM.sh | 143 ++++++++- 3 files changed, 642 insertions(+), 21 deletions(-) create mode 100755 ci-scripts/reportTestLocally.sh diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index d7279d7c46..5417ad12aa 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -41,7 +41,7 @@ pipeline { disableConcurrentBuilds() timestamps() gitLabConnection('OAI GitLab') - gitlabBuilds(builds: ["Build eNb-USRP", "Build basic-sim", "Build phy-sim", "Build eNb-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test-FDD-Band7"]) + gitlabBuilds(builds: ["Build eNb-USRP", "Build basic-sim", "Build phy-sim", "Build eNb-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test basic-sim", "Test-FDD-Band7"]) ansiColor('xterm') } @@ -256,9 +256,9 @@ pipeline { } stage ("Test basic simulator") { steps { - //gitlabCommitStatus(name: "Test basic-sim") { + gitlabCommitStatus(name: "Test basic-sim") { sh "./ci-scripts/runTestOnVM.sh --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" - //} + } } } stage ("Test FDD - Band 7 - B210") { @@ -323,8 +323,14 @@ pipeline { } if(fileExists('archives/vm_tests_logs.zip')) { archiveArtifacts artifacts: 'archives/vm_tests_logs.zip' - archiveArtifacts artifacts: 'archives/*/test/results_autotests*.xml' - archiveArtifacts artifacts: 'archives/*/test/*.xsl' + if ("MERGE".equals(env.gitlabActionType)) { + sh "./ci-scripts/reportTestLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger merge-request --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}" + } else { + sh "./ci-scripts/reportTestLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}" + } + if(fileExists('test_simulator_results.html')) { + archiveArtifacts artifacts: 'test_simulator_results.html' + } } } } diff --git a/ci-scripts/reportTestLocally.sh b/ci-scripts/reportTestLocally.sh new file mode 100755 index 0000000000..113fc1e1e5 --- /dev/null +++ b/ci-scripts/reportTestLocally.sh @@ -0,0 +1,504 @@ +#!/bin/bash +#/* +# * 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.1 (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 +# */ + +function usage { + echo "OAI Test Report script" + echo " Original Author: Raphael Defosseux" + echo "" + echo "Usage:" + echo "------" + echo "" + echo " reportTestLocally.sh [OPTIONS]" + echo "" + echo "Options:" + echo "--------" + echo "" + echo " --help OR -h" + echo " Print this help message." + echo "" + echo "Job Options:" + echo "------------" + echo "" + echo " --git-url #### OR -gu ####" + echo " Specify the URL of the GIT Repository." + echo "" + echo " --job-name #### OR -jn ####" + echo " Specify the name of the Jenkins job." + echo "" + echo " --build-id #### OR -id ####" + echo " Specify the build ID of the Jenkins job." + echo "" + echo " --trigger merge-request OR -mr" + echo " --trigger push OR -pu" + echo " Specify trigger action of the Jenkins job. Either a merge-request event or a push event." + echo "" + echo "Merge-Request Options:" + echo "----------------------" + echo "" + echo " --src-branch #### OR -sb ####" + echo " Specify the source branch of the merge request." + echo "" + echo " --src-commit #### OR -sc ####" + echo " Specify the source commit ID (SHA-1) of the merge request." + echo "" + echo " --target-branch #### OR -tb ####" + echo " Specify the target branch of the merge request (usually develop)." + echo "" + echo " --target-commit #### OR -tc ####" + echo " Specify the target commit ID (SHA-1) of the merge request." + echo "" + echo "Push Options:" + echo "----------------------" + echo "" + echo " --branch #### OR -br ####" + echo " Specify the branch of the push event." + echo "" + echo " --commit #### OR -co ####" + echo " Specify the commit ID (SHA-1) of the push event." + echo "" + echo "" +} + +function trigger_usage { + echo "OAI Test Report script" + echo " Original Author: Raphael Defosseux" + echo "" + echo " --trigger merge-request OR -mr" + echo " --trigger push OR -pu" + echo " Specify trigger action of the Jenkins job. Either a merge-request event or a push event." + echo "" +} + +jb_checker=0 +mr_checker=0 +pu_checker=0 +MR_TRIG=0 +PU_TRIG=0 +while [[ $# -gt 0 ]] +do +key="$1" + +case $key in + -h|--help) + shift + usage + exit 0 + ;; + -gu|--git-url) + GIT_URL="$2" + let "jb_checker|=0x1" + shift + shift + ;; + -jn|--job-name) + JOB_NAME="$2" + let "jb_checker|=0x2" + shift + shift + ;; + -id|--build-id) + BUILD_ID="$2" + let "jb_checker|=0x4" + shift + shift + ;; + --trigger) + TRIG="$2" + case $TRIG in + merge-request) + MR_TRIG=1 + ;; + push) + PU_TRIG=1 + ;; + *) + echo "" + echo "Syntax Error: Invalid Trigger option -> $TRIG" + echo "" + trigger_usage + exit + ;; + esac + let "jb_checker|=0x8" + shift + shift + ;; + -mr) + MR_TRIG=1 + let "jb_checker|=0x8" + shift + ;; + -pu) + PU_TRIG=1 + let "jb_checker|=0x8" + shift + ;; + -sb|--src-branch) + SOURCE_BRANCH="$2" + let "mr_checker|=0x1" + shift + shift + ;; + -sc|--src-commit) + SOURCE_COMMIT_ID="$2" + let "mr_checker|=0x2" + shift + shift + ;; + -tb|--target-branch) + TARGET_BRANCH="$2" + let "mr_checker|=0x4" + shift + shift + ;; + -tc|--target-commit) + TARGET_COMMIT_ID="$2" + let "mr_checker|=0x8" + shift + shift + ;; + -br|--branch) + SOURCE_BRANCH="$2" + let "pu_checker|=0x1" + shift + shift + ;; + -co|--commit) + SOURCE_COMMIT_ID="$2" + let "pu_checker|=0x2" + shift + shift + ;; + *) + echo "Syntax Error: unknown option: $key" + echo "" + usage + exit 1 + ;; +esac + +done + +if [ $jb_checker -ne 15 ] +then + echo "" + echo "Syntax Error: missing job information." + # TODO : list missing info + echo "" + exit 1 +fi + +if [ $PU_TRIG -eq 1 ] && [ $MR_TRIG -eq 1 ] +then + echo "" + echo "Syntax Error: trigger action incoherent." + echo "" + trigger_usage + exit 1 +fi + +if [ $PU_TRIG -eq 1 ] +then + if [ $pu_checker -ne 3 ] + then + echo "" + echo "Syntax Error: missing push information." + # TODO : list missing info + echo "" + exit 1 + fi +fi + +if [ $MR_TRIG -eq 1 ] +then + if [ $mr_checker -ne 15 ] + then + echo "" + echo "Syntax Error: missing merge-request information." + # TODO : list missing info + echo "" + exit 1 + fi +fi + +echo "" > ./test_simulator_results.html +echo "" >> ./test_simulator_results.html +echo "" >> ./test_simulator_results.html +echo " Simulator Results for $JOB_NAME job build #$BUILD_ID" >> ./test_simulator_results.html +echo " " >> ./test_simulator_results.html +echo "" >> ./test_simulator_results.html +echo "" >> ./test_simulator_results.html +echo "
GIT Repository' + SSH.eNBRepository + '' + SSH.eNBRepository + '
Job Trigger
' + SSH.testCase_id + '' + str(status) + '' + str(status) + '' + str(status) + 'KO - eNB process not foundKO - HSS process not foundKO - MME process not foundKO - SPGW process not found' + str(status) + '' + str(status) + '---
" >> ./test_simulator_results.html +echo " " >> ./test_simulator_results.html +echo " " >> ./test_simulator_results.html +echo " " >> ./test_simulator_results.html +echo " " >> ./test_simulator_results.html +echo "
" >> ./test_simulator_results.html +echo " " >> ./test_simulator_results.html +echo " \"\"" >> ./test_simulator_results.html +echo " " >> ./test_simulator_results.html +echo " " >> ./test_simulator_results.html +echo " " >> ./test_simulator_results.html +echo " Job Summary -- Job: $JOB_NAME -- Build-ID: $BUILD_ID" >> ./test_simulator_results.html +echo "
" >> ./test_simulator_results.html +echo "
" >> ./test_simulator_results.html +echo " " >> ./test_simulator_results.html +echo " " >> ./test_simulator_results.html +echo " " >> ./test_simulator_results.html +echo " " >> ./test_simulator_results.html +echo " " >> ./test_simulator_results.html +echo " " >> ./test_simulator_results.html +echo " " >> ./test_simulator_results.html +if [ $PU_TRIG -eq 1 ]; then echo " " >> ./test_simulator_results.html; fi +if [ $MR_TRIG -eq 1 ]; then echo " " >> ./test_simulator_results.html; fi +echo " " >> ./test_simulator_results.html +if [ $PU_TRIG -eq 1 ] +then + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html +fi +if [ $MR_TRIG -eq 1 ] +then + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html +fi +echo "
GIT Repository$GIT_URL
Job TriggerPush EventMerge-Request
Branch$SOURCE_BRANCH
Commit ID$SOURCE_COMMIT_ID
Source Branch$SOURCE_BRANCH
Source Commit ID$SOURCE_COMMIT_ID
Target Branch$TARGET_BRANCH
Target Commit ID$TARGET_COMMIT_ID
" >> ./test_simulator_results.html +echo "

Test Summary

" >> ./test_simulator_results.html + +ARCHIVES_LOC=archives/basic_sim/test +if [ -d $ARCHIVES_LOC ] +then + echo "

Basic Simulator Check

" >> ./test_simulator_results.html + + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + + PING_TESTS=`ls $ARCHIVES_LOC/ping*txt` + for PING_CASE in $PING_TESTS + do + echo " " >> ./test_simulator_results.html + NAME=`echo $PING_CASE | sed -e "s#$ARCHIVES_LOC/##"` + echo " " >> ./test_simulator_results.html + CMD=`egrep "COMMAND IS" $PING_CASE | sed -e "s#COMMAND IS: ##"` + echo " " >> ./test_simulator_results.html + FILE_COMPLETE=`egrep -c "ping statistics" $PING_CASE` + if [ $FILE_COMPLETE -eq 0 ] + then + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + else + NB_TR_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s# packets transmitted.*##"` + NB_RC_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*packets transmitted, ##" -e "s# received,.*##"` + if [ $NB_TR_PACKETS -eq $NB_RC_PACKETS ] + then + echo " " >> ./test_simulator_results.html + else + echo " " >> ./test_simulator_results.html + fi + echo " " >> ./test_simulator_results.html + fi + echo " " >> ./test_simulator_results.html + done + + IPERF_TESTS=`ls $ARCHIVES_LOC/iperf*client*txt` + for IPERF_CASE in $IPERF_TESTS + do + echo " " >> ./test_simulator_results.html + NAME=`echo $IPERF_CASE | sed -e "s#$ARCHIVES_LOC/##"` + echo " " >> ./test_simulator_results.html + CMD=`egrep "COMMAND IS" $IPERF_CASE | sed -e "s#COMMAND IS: ##"` + echo " " >> ./test_simulator_results.html + FILE_COMPLETE=`egrep -c "Server Report" $IPERF_CASE` + if [ $FILE_COMPLETE -eq 0 ] + then + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + else + REQ_BITRATE=`echo $CMD | sed -e "s#^.*-b ##" -e "s#-i 1.*##"` + if [[ $REQ_BITRATE =~ .*K.* ]] + then + REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#K##"` + FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000.0" | bc -l` + fi + if [[ $REQ_BITRATE =~ .*M.* ]] + then + REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#M##"` + FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000.0" | bc -l` + fi + if [[ $REQ_BITRATE =~ .*G.* ]] + then + REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#G##"` + FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000000.0" | bc -l` + fi + EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"` + if [[ $EFFECTIVE_BITRATE =~ .*Kbits/sec.* ]] + then + EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Kbits/sec.*##"` + FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000" | bc -l` + fi + if [[ $EFFECTIVE_BITRATE =~ .*Mbits/sec.* ]] + then + EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Mbits/sec.*##"` + FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000" | bc -l` + fi + if [[ $EFFECTIVE_BITRATE =~ .*Gbits/sec.* ]] + then + EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Gbits/sec.*##"` + FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000000" | bc -l` + fi + PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'` + PERF_INT=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.0f", $0}'` + if [[ $PERF_INT -lt 90 ]] + then + echo " " >> ./test_simulator_results.html + else + echo " " >> ./test_simulator_results.html + fi + echo " " >> ./test_simulator_results.html + fi + echo " " >> ./test_simulator_results.html + done + + echo "
Log File NameCommandStatusStatistics
$NAME$CMDKON/AOKKO" >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html
+            STATS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*received, ##" -e "s#, time.*##" -e "s# packet loss##"`
+            echo "Packet Loss : $STATS" >> ./test_simulator_results.html
+            RTTMIN=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[1] " " $5}'`
+            echo "RTT Minimal : $RTTMIN" >> ./test_simulator_results.html
+            RTTAVG=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[2] " " $5}'`
+            echo "RTT Average : $RTTAVG" >> ./test_simulator_results.html
+            RTTMAX=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[3] " " $5}'`
+            echo "RTT Maximal : $RTTMAX" >> ./test_simulator_results.html
+            echo "            
" >> ./test_simulator_results.html + echo "
$NAME$CMDKON/AKOOK" >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html
+            EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"`
+            echo "Bitrate      : $EFFECTIVE_BITRATE" >> ./test_simulator_results.html
+            echo "Bitrate Perf : $PERF %" >> ./test_simulator_results.html
+            JITTER=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*Mbits/sec *##" -e "s#ms.*#ms#"`
+            echo "Jitter       : $JITTER" >> ./test_simulator_results.html
+            PACKETLOSS=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*(##" -e "s#).*##"`
+            echo "Packet Loss  : $PACKETLOSS" >> ./test_simulator_results.html
+            echo "            
" >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html +fi + +ARCHIVES_LOC=archives/phy_sim/test +if [ -d $ARCHIVES_LOC ] +then + echo "

Physical Simulators Check

" >> ./test_simulator_results.html + + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + + XML_TESTS=`ls $ARCHIVES_LOC/*xml` + for XML_FILE in $XML_TESTS + do + echo " " >> ./test_simulator_results.html + NAME=`echo $XML_FILE | sed -e "s#$ARCHIVES_LOC/##"` + NB_TESTS=`egrep "testsuite errors" $XML_FILE | sed -e "s#^.*tests='##" -e "s#' *time=.*##"` + NB_ERRORS=`egrep "testsuite errors" $XML_FILE | sed -e "s#^.*errors='##" -e "s#' *failures=.*##"` + NB_FAILURES=`egrep "testsuite errors" $XML_FILE | sed -e "s#^.*failures='##" -e "s#' *hostname=.*##"` + NB_SKIPPED=`egrep "testsuite errors" $XML_FILE | sed -e "s#^.*skipped='##" -e "s#' *tests=.*##"` + if [ $NB_ERRORS -eq 0 ] && [ $NB_FAILURES -eq 0 ] + then + echo " " >> ./test_simulator_results.html + else + echo " " >> ./test_simulator_results.html + fi + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + done + + echo "
Log File NameNb TestsNb ErrorsNb FailuresNb Failures
$NAME$NAME$NB_TESTS$NB_ERRORS$NB_FAILURES$NB_SKIPPED
" >> ./test_simulator_results.html + + echo "

Details

" >> ./test_simulator_results.html + for XML_FILE in $XML_TESTS + do + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + TESTCASES_LIST=`sed -e "s# #@#g" $XML_FILE | grep testcase` + for TESTCASE in $TESTCASES_LIST + do + echo " " >> ./test_simulator_results.html + NAME=`echo $TESTCASE | sed -e "s#^.*name='##" -e "s#'@description=.*##" | sed -e "s#@# #g"` + echo " " >> ./test_simulator_results.html + DESC=`echo $TESTCASE | sed -e "s#^.*description='##" -e "s#'@Run_result=.*##" | sed -e "s#@# #g"` + echo " " >> ./test_simulator_results.html + RESULT=`echo $TESTCASE | sed -e "s#^.*RESULT='##" -e "s#'.*##" | sed -e "s#@# #g"` + if [[ $RESULT =~ .*PASS.* ]] + then + echo " " >> ./test_simulator_results.html + else + echo " " >> ./test_simulator_results.html + fi + TIME=`echo $TESTCASE | sed -e "s#^.*time='##" -e "s#'@RESULT=.*##" | sed -e "s#@# #g"` + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + done + echo "
Test NameDescriptionResultTime
$NAME$DESC$RESULT$RESULT$TIME
" >> ./test_simulator_results.html + done +fi + +echo "" >> ./test_simulator_results.html +echo "" >> ./test_simulator_results.html + +exit 0 diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index 9bb67803ab..a489d92eaf 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -313,13 +313,6 @@ then if [ $NB_RUNS -eq 0 ]; then STATUS=-1; fi if [ $NB_FAILURES -ne 0 ]; then STATUS=-1; fi - if [ $STATUS -eq 0 ] - then - echo "STATUS seems OK" - else - echo "STATUS failed?" - fi - fi if [[ "$RUN_OPTIONS" == "complex" ]] && [[ $VM_NAME =~ .*-basic-sim.* ]] @@ -422,12 +415,28 @@ then ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < /opt/ltebox-archives/adapt_ue_sim.txt fi - # for the moment, just a plain sleep - # TODO: more sophiscated way to detect EPC is started - sleep 5 + i="0" + echo "ifconfig tun5 | egrep -c \"inet addr\"" > $EPC_VM_CMDS + while [ $i -lt 10 ] + do + sleep 2 + CONNECTED=`ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS` + if [ $CONNECTED -eq 1 ] + then + i="100" + else + i=$[$i+1] + fi + done + rm $EPC_VM_CMDS + if [ $i -lt 50 ] + then + echo "Problem w/ starting ltebox EPC" + exit -1 + fi fi - # HERE ADD any install actions for another EPC + # HERE ADD ANY INSTALL ACTIONS FOR ANOTHER EPC # Retrieve EPC real IP address if [ $LTEBOX -eq 1 ] @@ -473,9 +482,35 @@ then ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS rm $VM_CMDS - # for the moment, just a plain sleep - # TODO: more sophiscated way to detect eNB is started and that UE is connected - sleep 10 + i="0" + echo "ifconfig oip1 | egrep -c \"inet addr\"" > $VM_CMDS + while [ $i -lt 10 ] + do + sleep 5 + CONNECTED=`ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS` + if [ $CONNECTED -eq 1 ] + then + i="100" + else + i=$[$i+1] + fi + done + rm $VM_CMDS + if [ $i -lt 50 ] + then + echo "Problem w/ eNB and UE not syncing" + echo "echo \"sudo daemon --name=enb_daemon --stop\"" > $VM_CMDS + echo "sudo daemon --name=enb_daemon --stop" >> $VM_CMDS + echo "echo \"sudo daemon --name=ue_daemon --stop\"" >> $VM_CMDS + echo "sudo daemon --name=ue_daemon --stop" >> $VM_CMDS + echo "echo \"sudo killall --signal SIGKILL lte-softmodem\"" >> $VM_CMDS + echo "sudo killall --signal SIGKILL lte-softmodem" >> $VM_CMDS + ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS + rm -f $VM_CMDS + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/enb.log $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/ue.log $ARCHIVES_LOC + exit -1 + fi echo "ifconfig oip1 | egrep \"inet addr\" | sed -e 's#^.*inet addr:##' -e 's# P-t-P:.*\$##'" > $VM_CMDS UE_IP_ADDR=`ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS` echo "UE IP Address for EPC is : $UE_IP_ADDR" @@ -485,6 +520,7 @@ then echo "Pinging the UE" echo "############################################################" echo "echo \"ping -c 20 $UE_IP_ADDR\"" > $EPC_VM_CMDS + echo "echo \"COMMAND IS: ping -c 20 $UE_IP_ADDR\" > ping_ue.txt" > $EPC_VM_CMDS echo "ping -c 20 $UE_IP_ADDR | tee -a ping_ue.txt" >> $EPC_VM_CMDS ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS rm -f $EPC_VM_CMDS @@ -494,11 +530,13 @@ then echo "Iperf DL" echo "############################################################" echo "echo \"iperf -u -s -i 1\"" > $VM_CMDS - echo "nohup iperf -u -s -i 1 > tmp/cmake_targets/log/iperf_dl_server.txt &" >> $VM_CMDS + echo "echo \"COMMAND IS: iperf -u -s -i 1\" > tmp/cmake_targets/log/iperf_dl_server.txt" > $VM_CMDS + echo "nohup iperf -u -s -i 1 >> tmp/cmake_targets/log/iperf_dl_server.txt &" >> $VM_CMDS ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS rm $VM_CMDS echo "echo \"iperf -c $UE_IP_ADDR -u -t 30 -b 15M -i 1\"" > $EPC_VM_CMDS + echo "echo \"COMMAND IS: iperf -c $UE_IP_ADDR -u -t 30 -b 15M -i 1\" > iperf_dl_client.txt" > $EPC_VM_CMDS echo "iperf -c $UE_IP_ADDR -u -t 30 -b 15M -i 1 | tee -a iperf_dl_client.txt" >> $EPC_VM_CMDS ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS rm -f $EPC_VM_CMDS @@ -513,11 +551,13 @@ then echo "Iperf UL" echo "############################################################" echo "echo \"iperf -u -s -i 1\"" > $EPC_VM_CMDS - echo "nohup iperf -u -s -i 1 > iperf_ul_server.txt &" >> $EPC_VM_CMDS + echo "echo \"COMMAND IS: iperf -u -s -i 1\" > iperf_ul_server.txt" > $EPC_VM_CMDS + echo "nohup iperf -u -s -i 1 >> iperf_ul_server.txt &" >> $EPC_VM_CMDS ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS rm $EPC_VM_CMDS echo "echo \"iperf -c $REAL_EPC_IP_ADDR -u -t 30 -b 4M -i 1\"" > $VM_CMDS + echo "echo \"COMMAND IS: iperf -c $REAL_EPC_IP_ADDR -u -t 30 -b 4M -i 1\" > /home/ubuntu/tmp/cmake_targets/log/iperf_ul_client.txt" > $VM_CMDS echo "iperf -c $REAL_EPC_IP_ADDR -u -t 30 -b 4M -i 1 | tee -a /home/ubuntu/tmp/cmake_targets/log/iperf_ul_client.txt" >> $VM_CMDS ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS rm -f $VM_CMDS @@ -541,6 +581,77 @@ then rm -f $VM_CMDS scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/enb.log $ARCHIVES_LOC scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/ue.log $ARCHIVES_LOC + + echo "############################################################" + echo "Checking run status" + echo "############################################################" + + # checking ping result + if [ -f $ARCHIVES_LOC/ping_ue.txt ] + then + FILE_COMPLETE=`egrep -c "ping statistics" $ARCHIVES_LOC/ping_ue.txt` + if [ $FILE_COMPLETE -eq 0 ] + then + STATUS=-1 + else + ALL_PACKET_RECEIVED=`egrep -c "20 received" $ARCHIVES_LOC/ping_ue.txt` + if [ $ALL_PACKET_RECEIVED -eq 1 ] + then + echo "got all ping packets" + else + STATUS=-1 + fi + fi + else + STATUS=-1 + fi + + # checking dl iperf result + if [ -f $ARCHIVES_LOC/iperf_dl_client.txt ] + then + FILE_COMPLETE=`egrep -c "Server Report" $ARCHIVES_LOC/iperf_dl_client.txt` + if [ $FILE_COMPLETE -eq 0 ] + then + STATUS=-1 + else + EFFECTIVE_BANDWIDTH=`tail -n3 $ARCHIVES_LOC/iperf_dl_client.txt | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"` + if [[ $EFFECTIVE_BANDWIDTH =~ .*15.*Mbits.* ]] || [[ $EFFECTIVE_BANDWIDTH =~ .*14.*Mbits.* ]] + then + echo "got requested DL bandwidth: $EFFECTIVE_BANDWIDTH" + else + STATUS=-1 + fi + fi + else + STATUS=-1 + fi + + # checking ul iperf result + if [ -f $ARCHIVES_LOC/iperf_ul_client.txt ] + then + FILE_COMPLETE=`egrep -c "Server Report" $ARCHIVES_LOC/iperf_ul_client.txt` + if [ $FILE_COMPLETE -eq 0 ] + then + STATUS=-1 + else + EFFECTIVE_BANDWIDTH=`tail -n3 $ARCHIVES_LOC/iperf_ul_client.txt | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"` + if [[ $EFFECTIVE_BANDWIDTH =~ .*4.*Mbits.* ]] || [[ $EFFECTIVE_BANDWIDTH =~ .*3.*Mbits.* ]] + then + echo "got requested UL bandwidth: $EFFECTIVE_BANDWIDTH" + else + STATUS=-1 + fi + fi + else + STATUS=-1 + fi +fi + +if [ $STATUS -eq 0 ] +then + echo "STATUS seems OK" +else + echo "STATUS failed?" fi exit $STATUS From 92bf2133fcaf41fd9399761bdfca61cec0b5a440 Mon Sep 17 00:00:00 2001 From: Haruki NAOI Date: Thu, 30 Aug 2018 18:24:44 +0900 Subject: [PATCH 052/379] Fix: basic-sim and ue-ethernet compile error. --- common/utils/LOG/log.c | 2 +- common/utils/LOG/log_extern.h | 1 + targets/RT/USER/lte-softmodem.c | 1 - targets/RT/USER/lte-uesoftmodem.c | 1 + 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/utils/LOG/log.c b/common/utils/LOG/log.c index d67cda7afe..b020f19f01 100644 --- a/common/utils/LOG/log.c +++ b/common/utils/LOG/log.c @@ -61,7 +61,7 @@ volatile int log_mem_write_flag=0; volatile int log_mem_write_side=0; char __log_mem_filename[1024]={0}; char * log_mem_filename = &__log_mem_filename[0]; - +char logmem_filename[1024] = {0}; mapping log_level_names[] = { {"error", OAILOG_ERR}, diff --git a/common/utils/LOG/log_extern.h b/common/utils/LOG/log_extern.h index 449333d92f..b11486173a 100644 --- a/common/utils/LOG/log_extern.h +++ b/common/utils/LOG/log_extern.h @@ -30,3 +30,4 @@ extern mapping log_maskmap[]; extern int log_mem_flag; extern char * log_mem_filename; +extern char logmem_filename[1024]; diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 49639c4937..b9cefd4a57 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -142,7 +142,6 @@ static int8_t threequarter_fs=0; uint32_t downlink_frequency[MAX_NUM_CCs][4]; int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; -char logmem_filename[1024] = {0}; // This is a dummy declaration (dlsch_demodulation.c is no longer compiled for eNodeB) int16_t dlsch_demod_shift = 0; diff --git a/targets/RT/USER/lte-uesoftmodem.c b/targets/RT/USER/lte-uesoftmodem.c index a2a12f9dd9..53d700d076 100644 --- a/targets/RT/USER/lte-uesoftmodem.c +++ b/targets/RT/USER/lte-uesoftmodem.c @@ -71,6 +71,7 @@ #include "PHY_INTERFACE/phy_interface_vars.h" #include "common/utils/LOG/log.h" +#include "common/utils/LOG/log_extern.h" #include "UTIL/OTG/otg_tx.h" #include "UTIL/OTG/otg_externs.h" #include "UTIL/MATH/oml.h" From 620d50d798c988b8f90a185577bc74729444a17f Mon Sep 17 00:00:00 2001 From: Haruki NAOI Date: Thu, 30 Aug 2018 20:47:40 +0900 Subject: [PATCH 053/379] Fix: ulsim segmentation fault. --- openair1/SCHED/phy_procedures_lte_eNb.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index 80d0a8b4a7..beba9721bf 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -1342,21 +1342,20 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) //compute the expected ULSCH RX power (for the stats) ulsch_harq->delta_TF = get_hundred_times_delta_IF_eNB(eNB,i,harq_pid, 0); // 0 means bw_factor is not considered - if (ulsch_harq->cqi_crc_status == 1) { + if (RC.mac != NULL) { /* ulsim dose not use RC.mac context. */ + if (ulsch_harq->cqi_crc_status == 1) { #ifdef DEBUG_PHY_PROC //if (((frame%10) == 0) || (frame < 50)) print_CQI(ulsch_harq->o,ulsch_harq->uci_format,0,fp->N_RB_DL); #endif - - fill_ulsch_cqi_indication(eNB,frame,subframe, - ulsch_harq, - ulsch->rnti); - RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_flag &= (~(1 << subframe)); - } else { - if(RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_flag & (1 << subframe) ){ + fill_ulsch_cqi_indication(eNB,frame,subframe,ulsch_harq,ulsch->rnti); RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_flag &= (~(1 << subframe)); - RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_timer=30; - LOG_D(PHY,"Frame %d,Subframe %d, We're supposed to get a cqi here. Set cqi_req_timer to 30.\n",frame,subframe); + } else { + if(RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_flag & (1 << subframe) ){ + RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_flag &= (~(1 << subframe)); + RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_timer=30; + LOG_D(PHY,"Frame %d,Subframe %d, We're supposed to get a cqi here. Set cqi_req_timer to 30.\n",frame,subframe); + } } } From 31e472d2350d2fe95b7664ef40cec878ca78ddcb Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Thu, 30 Aug 2018 14:23:52 +0200 Subject: [PATCH 054/379] T tracer: fix traces for TDD --- openair1/PHY/LTE_TRANSPORT/dci_tools.c | 2 +- openair1/SCHED/phy_procedures_lte_eNb.c | 59 ++++++++++--------------- 2 files changed, 24 insertions(+), 37 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index c3a309a424..b0c904a0fc 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -1791,7 +1791,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t *proc, #ifdef T_TRACER T(T_ENB_PHY_ULSCH_UE_DCI, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe), - T_INT(pdu->dci_pdu_rel8.rnti), T_INT(((frame*10+subframe+4) % 8) /* TODO: correct harq pid */), + T_INT(pdu->dci_pdu_rel8.rnti), T_INT(pdu->dci_pdu_rel8.harq_pid), T_INT(mcs), T_INT(-1 /* TODO: remove round? */), T_INT(pdu->dci_pdu_rel8.resource_block_start), T_INT(pdu->dci_pdu_rel8.number_of_resource_block), diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index a6a44c66e2..47683ac2d1 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -1604,6 +1604,16 @@ static void do_release_harq(PHY_VARS_eNB *eNB,int UE_id,int tb,uint16_t frame,ui dlsch1_harq = dlsch1->harq_processes[harq_pid]; AssertFatal(dlsch0_harq!=NULL,"dlsch0_harq is null\n"); +#if T_TRACER + if (after_rounds != -1) { + T(T_ENB_PHY_DLSCH_UE_NACK, T_INT(0), T_INT(frame), T_INT(subframe), + T_INT(dlsch0->rnti), T_INT(harq_pid)); + } else { + T(T_ENB_PHY_DLSCH_UE_ACK, T_INT(0), T_INT(frame), T_INT(subframe), + T_INT(dlsch0->rnti), T_INT(harq_pid)); + } +#endif + if (dlsch0_harq->round >= after_rounds) { dlsch0_harq->status = SCH_IDLE; /*if ((dlsch1_harq == NULL)|| @@ -1631,6 +1641,15 @@ static void do_release_harq(PHY_VARS_eNB *eNB,int UE_id,int tb,uint16_t frame,ui dlsch1_harq = dlsch1->harq_processes[harq_pid]; AssertFatal(dlsch0_harq!=NULL,"dlsch0_harq is null\n"); +#if T_TRACER + if (after_rounds != -1) { + T(T_ENB_PHY_DLSCH_UE_NACK, T_INT(0), T_INT(frame), T_INT(subframe), + T_INT(dlsch0->rnti), T_INT(harq_pid)); + } else { + T(T_ENB_PHY_DLSCH_UE_ACK, T_INT(0), T_INT(frame), T_INT(subframe), + T_INT(dlsch0->rnti), T_INT(harq_pid)); + } +#endif if (dlsch0_harq->round >= after_rounds) { dlsch0_harq->status = SCH_IDLE; if ((dlsch1_harq == NULL)|| @@ -1753,22 +1772,6 @@ void fill_ulsch_harq_indication(PHY_VARS_eNB *eNB,LTE_UL_eNB_HARQ_t *ulsch_harq, pdu->harq_indication_fdd_rel13.harq_tb_n[i] = 2-ulsch_harq->o_ACK[i]; // release DLSCH if needed release_harq(eNB,UE_id,i,frame,subframe,0xffff, ulsch_harq->o_ACK[i] == 1); - - -#if T_TRACER - /* TODO: get correct harq pid */ - { - int subframe_tx = (subframe+6)%10; - int frame_tx = subframe_tx >= 6 ? (frame+1023)%1024 : frame; - if (ulsch_harq->o_ACK[i] != 1) { - T(T_ENB_PHY_DLSCH_UE_NACK, T_INT(0), T_INT(frame), T_INT(subframe), - T_INT(rnti), T_INT(eNB->dlsch[UE_id][0]->harq_ids[frame_tx%2][subframe_tx])); - } else { - T(T_ENB_PHY_DLSCH_UE_ACK, T_INT(0), T_INT(frame), T_INT(subframe), - T_INT(rnti), T_INT(eNB->dlsch[UE_id][0]->harq_ids[frame_tx%2][subframe_tx])); - } - } -#endif } } else { // TDD @@ -1857,21 +1860,6 @@ void fill_uci_harq_indication(PHY_VARS_eNB *eNB, pdu->harq_indication_fdd_rel13.harq_tb_n[0] = harq_ack[0]; // release DLSCH if needed release_harq(eNB,UE_id,0,frame,subframe,0xffff, harq_ack[0] == 1); - - -#if T_TRACER - { - int subframe_tx = (subframe+6)%10; - int frame_tx = subframe_tx >= 6 ? (frame+1023)%1024 : frame; - if (harq_ack[0] != 1) { - T(T_ENB_PHY_DLSCH_UE_NACK, T_INT(0), T_INT(frame), T_INT(subframe), - T_INT(uci->rnti), T_INT(eNB->dlsch[UE_id][0]->harq_ids[frame_tx%2][subframe_tx])); - } else { - T(T_ENB_PHY_DLSCH_UE_ACK, T_INT(0), T_INT(frame), T_INT(subframe), - T_INT(uci->rnti), T_INT(eNB->dlsch[UE_id][0]->harq_ids[frame_tx%2][subframe_tx])); - } - } -#endif } else if (uci->pucch_fmt == pucch_format1b) { pdu->harq_indication_fdd_rel13.tl.tag = NFAPI_HARQ_INDICATION_FDD_REL13_TAG; @@ -2041,16 +2029,15 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) const int subframe = proc->subframe_rx; const int frame = proc->frame_rx; - - if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) return; - - T(T_ENB_PHY_UL_TICK, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe)); - /* TODO: use correct rxdata */ T(T_ENB_PHY_INPUT_SIGNAL, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe), T_INT(0), T_BUFFER(&eNB->RU_list[0]->common.rxdata[0][subframe*eNB->frame_parms.samples_per_tti], eNB->frame_parms.samples_per_tti * 4)); + if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) return; + + T(T_ENB_PHY_UL_TICK, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe)); + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC, 1 ); LOG_D(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_uespec_RX(%d)\n",eNB->Mod_id,frame, subframe); From b8093f509efdbd975172fcd8cdaa3c3642cbe057 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Thu, 30 Aug 2018 14:25:20 +0200 Subject: [PATCH 055/379] T tracer: fix problem with some displays This commit attempts to fix the error: no good visual found --- common/utils/T/tracer/gui/x.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/common/utils/T/tracer/gui/x.c b/common/utils/T/tracer/gui/x.c index 94448eb666..ef5334767c 100644 --- a/common/utils/T/tracer/gui/x.c +++ b/common/utils/T/tracer/gui/x.c @@ -150,7 +150,17 @@ x_image *x_create_image(x_connection *_x, unsigned char *data, vs = XGetVisualInfo(x->d, VisualDepthMask | VisualClassMask | VisualRedMaskMask | VisualGreenMaskMask | VisualBlueMaskMask | VisualBitsPerRGBMask, &template, &nvs); - if (vs == NULL || nvs == 0) ERR("no good visual found\n"); + + if (vs == NULL) { + /* try again with 32 bpp */ + template.depth = 32; + vs = XGetVisualInfo(x->d, VisualDepthMask | VisualClassMask | + VisualRedMaskMask | VisualGreenMaskMask | VisualBlueMaskMask | + VisualBitsPerRGBMask, &template, &nvs); + } + + if (vs == NULL) ERR("no good visual found\n"); + v = vs[0].visual; XFree(vs); From caa5ad6e4b0bfae8c9083283269e26f255448002 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Thu, 30 Aug 2018 15:57:42 +0200 Subject: [PATCH 056/379] CI: improvements on basic-simulator testing Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 6 +-- ci-scripts/buildOnVM.sh | 5 ++- ci-scripts/createVM.sh | 6 ++- ci-scripts/runTestOnVM.sh | 84 +++++++++++++++++++++++++---------- 4 files changed, 73 insertions(+), 28 deletions(-) diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index 5417ad12aa..bbe429f1e2 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -154,14 +154,14 @@ pipeline { stage ("Analysis with cppcheck") { steps { gitlabCommitStatus(name: "Analysis with cppcheck") { - sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}" } } } stage ("Build eNb-USRP") { steps { gitlabCommitStatus(name: "Build eNb-USRP") { - sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}" } } } @@ -250,7 +250,7 @@ pipeline { stage ("Test physical simulators") { steps { gitlabCommitStatus(name: "Test phy-sim") { - sh "./ci-scripts/runTestOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + sh "./ci-scripts/runTestOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" } } } diff --git a/ci-scripts/buildOnVM.sh b/ci-scripts/buildOnVM.sh index eab2f7c624..3eb24932bf 100755 --- a/ci-scripts/buildOnVM.sh +++ b/ci-scripts/buildOnVM.sh @@ -86,6 +86,7 @@ JOB_NAME=XX BUILD_ID=XX VM_NAME=ci-enb-usrp VM_MEMORY=2048 +VM_CPU=4 ARCHIVES_LOC=enb_usrp LOG_PATTERN=.Rel14.txt NB_PATTERN_FILES=4 @@ -136,6 +137,7 @@ case $key in NB_PATTERN_FILES=2 BUILD_OPTIONS="--basic-simulator" VM_MEMORY=8192 + VM_CPU=4 shift ;; -v3) @@ -188,6 +190,7 @@ case $key in NB_PATTERN_FILES=2 BUILD_OPTIONS="--basic-simulator" VM_MEMORY=8192 + VM_CPU=4 ;; phy-sim) VM_NAME=ci-phy-sim @@ -272,7 +275,7 @@ then echo "############################################################" echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base" echo "############################################################" - uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu 4 --unsafe-caching --template ci-scripts/template-host.xml + uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu $VM_CPU --unsafe-caching --template ci-scripts/template-host.xml fi echo "Waiting for VM to be started" diff --git a/ci-scripts/createVM.sh b/ci-scripts/createVM.sh index 1c3099e843..a1383ab499 100755 --- a/ci-scripts/createVM.sh +++ b/ci-scripts/createVM.sh @@ -80,6 +80,7 @@ JOB_NAME=XX BUILD_ID=XX VM_NAME=ci-enb-usrp VM_MEMORY=2048 +VM_CPU=4 while [[ $# -gt 0 ]] do @@ -116,6 +117,7 @@ case $key in -v4) VM_NAME=ci-cppcheck VM_MEMORY=4096 + VM_CPU=4 shift ;; -v7) @@ -141,6 +143,7 @@ case $key in cppcheck) VM_NAME=ci-cppcheck VM_MEMORY=4096 + VM_CPU=4 ;; enb-ethernet) VM_NAME=ci-enb-ethernet @@ -178,11 +181,12 @@ VM_CMDS=${VM_NAME}_cmds.txt echo "VM_NAME = $VM_NAME" echo "VM_MEMORY = $VM_MEMORY MBytes" +echo "VM_CPU = $VM_CPU" echo "############################################################" echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base" echo "############################################################" -uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu 4 --unsafe-caching --template ci-scripts/template-host.xml +uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu $VM_CPU --unsafe-caching --template ci-scripts/template-host.xml echo "Waiting for VM to be started" uvt-kvm wait $VM_NAME --insecure diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index a489d92eaf..db92ec4aad 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -70,6 +70,30 @@ function variant_usage { echo "" } +function terminate_enb_ue_basic_sim { + echo "echo \"sudo daemon --name=enb_daemon --stop\"" > $1 + echo "sudo daemon --name=enb_daemon --stop" >> $1 + echo "echo \"sudo daemon --name=ue_daemon --stop\"" >> $1 + echo "sudo daemon --name=ue_daemon --stop" >> $1 + echo "echo \"sudo killall --signal SIGKILL lte-softmodem\"" >> $1 + echo "sudo killall --signal SIGKILL lte-softmodem" >> $1 + ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1 + rm -f $1 +} + +function terminate_ltebox_epc { + echo "echo \"cd /opt/ltebox/tools\"" > $1 + echo "cd /opt/ltebox/tools" >> $1 + echo "echo \"sudo ./stop_ltebox\"" >> $1 + echo "sudo ./stop_ltebox" >> $1 + echo "echo \"sudo daemon --name=simulated_hss --stop\"" >> $1 + echo "sudo daemon --name=simulated_hss --stop" >> $1 + echo "echo \"sudo killall --signal SIGKILL hss_sim\"" >> $1 + echo "sudo killall --signal SIGKILL hss_sim" >> $1 + ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1 + rm $1 +} + if [ $# -lt 1 ] || [ $# -gt 9 ] then echo "Syntax Error: not the correct number of arguments" @@ -356,7 +380,16 @@ then scp -o StrictHostKeyChecking=no /etc/apt/apt.conf.d/01proxy ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu # ltebox specific actions (install and start) + LTE_BOX_TO_INSTALL=1 if [ $LTEBOX -eq 1 ] + then + echo "ls -ls /opt/ltebox/tools/start_ltebox" > $EPC_VM_CMDS + RESPONSE=`ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS` + NB_EXES=`echo $RESPONSE | grep -c ltebox` + if [ $NB_EXES -eq 1 ]; then LTE_BOX_TO_INSTALL=0; fi + fi + + if [ $LTEBOX -eq 1 ] && [ $LTE_BOX_TO_INSTALL -eq 1 ] then echo "############################################################" echo "Copying ltebox archives into EPC VM ($EPC_VM_NAME)" @@ -366,7 +399,7 @@ then scp -o StrictHostKeyChecking=no /opt/ltebox-archives/hss-sim.zip ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu echo "############################################################" - echo "Running install and start EPC on EPC VM ($EPC_VM_NAME)" + echo "Install EPC on EPC VM ($EPC_VM_NAME)" echo "############################################################" echo "sudo cp 01proxy /etc/apt/apt.conf.d/" > $EPC_VM_CMDS echo "touch /home/ubuntu/.hushlogin" >> $EPC_VM_CMDS @@ -374,7 +407,7 @@ then echo "sudo apt-get update > zip-install.txt 2>&1" >> $EPC_VM_CMDS echo "sudo apt-get --yes install zip openjdk-8-jre libconfuse-dev libreadline-dev liblog4c-dev libgcrypt-dev libsctp-dev python2.7 python2.7-dev daemon iperf >> zip-install.txt 2>&1" >> $EPC_VM_CMDS - # Installing and Starting HSS + # Installing HSS echo "echo \"cd /opt\"" >> $EPC_VM_CMDS echo "cd /opt" >> $EPC_VM_CMDS echo "echo \"sudo unzip -qq /home/ubuntu/hss-sim.zip\"" >> $EPC_VM_CMDS @@ -382,10 +415,7 @@ then echo "echo \"cd /opt/hss_sim0609\"" >> $EPC_VM_CMDS echo "cd /opt/hss_sim0609" >> $EPC_VM_CMDS - echo "echo \"sudo daemon --unsafe --name=simulated_hss --chdir=/opt/hss_sim0609 ./starthss_real\"" >> $EPC_VM_CMDS - echo "sudo daemon --unsafe --name=simulated_hss --chdir=/opt/hss_sim0609 ./starthss_real" >> $EPC_VM_CMDS - - # Installing and Starting ltebox + # Installing ltebox echo "echo \"cd /home/ubuntu\"" >> $EPC_VM_CMDS echo "cd /home/ubuntu" >> $EPC_VM_CMDS echo "echo \"sudo dpkg -i ltebox_2.2.70_16_04_amd64.deb \"" >> $EPC_VM_CMDS @@ -397,6 +427,18 @@ then echo "sudo unzip -qq -o /home/ubuntu/etc-conf.zip" >> $EPC_VM_CMDS echo "sudo sed -i -e 's#EPC_VM_IP_ADDRESS#$EPC_VM_IP_ADDR#' gw.conf" >> $EPC_VM_CMDS echo "sudo sed -i -e 's#EPC_VM_IP_ADDRESS#$EPC_VM_IP_ADDR#' mme.conf" >> $EPC_VM_CMDS + fi + + # Starting EPC + if [ $LTEBOX -eq 1 ] + then + echo "############################################################" + echo "Start EPC on EPC VM ($EPC_VM_NAME)" + echo "############################################################" + echo "echo \"cd /opt/hss_sim0609\"" >> $EPC_VM_CMDS + echo "cd /opt/hss_sim0609" >> $EPC_VM_CMDS + echo "echo \"sudo daemon --unsafe --name=simulated_hss --chdir=/opt/hss_sim0609 ./starthss_real\"" >> $EPC_VM_CMDS + echo "sudo daemon --unsafe --name=simulated_hss --chdir=/opt/hss_sim0609 ./starthss_real" >> $EPC_VM_CMDS echo "echo \"cd /opt/ltebox/tools/\"" >> $EPC_VM_CMDS echo "cd /opt/ltebox/tools/" >> $EPC_VM_CMDS @@ -484,7 +526,7 @@ then rm $VM_CMDS i="0" echo "ifconfig oip1 | egrep -c \"inet addr\"" > $VM_CMDS - while [ $i -lt 10 ] + while [ $i -lt 40 ] do sleep 5 CONNECTED=`ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS` @@ -499,16 +541,10 @@ then if [ $i -lt 50 ] then echo "Problem w/ eNB and UE not syncing" - echo "echo \"sudo daemon --name=enb_daemon --stop\"" > $VM_CMDS - echo "sudo daemon --name=enb_daemon --stop" >> $VM_CMDS - echo "echo \"sudo daemon --name=ue_daemon --stop\"" >> $VM_CMDS - echo "sudo daemon --name=ue_daemon --stop" >> $VM_CMDS - echo "echo \"sudo killall --signal SIGKILL lte-softmodem\"" >> $VM_CMDS - echo "sudo killall --signal SIGKILL lte-softmodem" >> $VM_CMDS - ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS - rm -f $VM_CMDS + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/enb.log $ARCHIVES_LOC scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/ue.log $ARCHIVES_LOC + terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR exit -1 fi echo "ifconfig oip1 | egrep \"inet addr\" | sed -e 's#^.*inet addr:##' -e 's# P-t-P:.*\$##'" > $VM_CMDS @@ -571,17 +607,19 @@ then echo "############################################################" echo "Terminate enb/ue simulators" echo "############################################################" - echo "echo \"sudo daemon --name=enb_daemon --stop\"" > $VM_CMDS - echo "sudo daemon --name=enb_daemon --stop" >> $VM_CMDS - echo "echo \"sudo daemon --name=ue_daemon --stop\"" >> $VM_CMDS - echo "sudo daemon --name=ue_daemon --stop" >> $VM_CMDS - echo "echo \"sudo killall --signal SIGKILL lte-softmodem\"" >> $VM_CMDS - echo "sudo killall --signal SIGKILL lte-softmodem" >> $VM_CMDS - ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS - rm -f $VM_CMDS + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/enb.log $ARCHIVES_LOC scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/ue.log $ARCHIVES_LOC + echo "############################################################" + echo "Terminate EPC" + echo "############################################################" + + if [ $LTEBOX -eq 1 ] + then + terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR + fi + echo "############################################################" echo "Checking run status" echo "############################################################" From 4221816f5eab6652bb97456b8add8d5f084c9236 Mon Sep 17 00:00:00 2001 From: laurent Date: Fri, 3 Aug 2018 20:28:34 +0200 Subject: [PATCH 057/379] generate 7.5KHz tables --- cmake_targets/CMakeLists.txt | 1 + openair1/PHY/MODULATION/gen_75KHz.cpp | 78 ++++++++++++++ openair1/PHY/MODULATION/gen_7_5_kHz.m | 107 -------------------- openair1/PHY/MODULATION/kHz_7_5.h | 45 -------- openair1/PHY/MODULATION/modulation_extern.h | 24 ++--- openair1/PHY/MODULATION/modulation_vars.h | 1 - 6 files changed, 91 insertions(+), 165 deletions(-) create mode 100644 openair1/PHY/MODULATION/gen_75KHz.cpp delete mode 100644 openair1/PHY/MODULATION/gen_7_5_kHz.m delete mode 100644 openair1/PHY/MODULATION/kHz_7_5.h diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 5efb13594f..c9a76b4216 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -1137,6 +1137,7 @@ set(PHY_SRC_RU ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if5_tools.c ${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_ul.c ${OPENAIR1_DIR}/PHY/MODULATION/ul_7_5_kHz.c + ${OPENAIR1_DIR}/PHY/MODULATION/gen_75KHz.cpp ${OPENAIR1_DIR}/PHY/MODULATION/beamforming.c ${OPENAIR1_DIR}/PHY/MODULATION/compute_bf_weights.c ${OPENAIR1_DIR}/PHY/INIT/lte_init_ru.c diff --git a/openair1/PHY/MODULATION/gen_75KHz.cpp b/openair1/PHY/MODULATION/gen_75KHz.cpp new file mode 100644 index 0000000000..31c6af2a1f --- /dev/null +++ b/openair1/PHY/MODULATION/gen_75KHz.cpp @@ -0,0 +1,78 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +using namespace std; + +void gen_sig(int RB, int len, double ratio, int16_t *table_n, int16_t *table_e ) { + double samplerate = 30.72e6*ratio; + double ofdm_size = 2048*ratio; + double PI = std::acos(-1); + std::complex tt; + complex t[len]; + int index=0; + + double cp0 = 160*ratio; + double cp = 144*ratio; + for (int i=-cp0; i tables_7_5KHz={{6,1.0/16},{15,1.0/8},{25,1.0/4},{50,1.0/2},{75,3.0/4},{100,1.0}}; + + int tables_idx=0; + for (auto it=tables_7_5KHz.begin(); it!=tables_7_5KHz.end(); ++it) { + int len=15360*it->second; + tables_size_bytes[tables_idx]=sizeof(int16_t)*2*len; + tables_size_bytes[tables_idx+1]=sizeof(int16_t)*2*len; + MyAssert(0==posix_memalign((void**)tables[tables_idx], + 16,tables_size_bytes[tables_idx])); + MyAssert(0==posix_memalign((void**)tables[tables_idx+1], + 16,tables_size_bytes[tables_idx+1])); + gen_sig(it->first, len, it->second, *tables[tables_idx], *tables[tables_idx+1]); + tables_idx+=2; + } +} diff --git a/openair1/PHY/MODULATION/gen_7_5_kHz.m b/openair1/PHY/MODULATION/gen_7_5_kHz.m deleted file mode 100644 index 39bc600336..0000000000 --- a/openair1/PHY/MODULATION/gen_7_5_kHz.m +++ /dev/null @@ -1,107 +0,0 @@ - -function [] = gen_7_5_kHz() -[s6_n2, s6_e2] = gen_sig(6); -[s15_n2, s15_e2] = gen_sig(15); -[s25_n2, s25_e2] = gen_sig(25); -[s50_n2, s50_e2] = gen_sig(50); -[s75_n2, s75_e2] = gen_sig(75); -[s100_n2, s100_e2] = gen_sig(100); - - -fd=fopen("kHz_7_5.h","w"); -fprintf(fd,"s16 s6n_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s6_n2)); -fprintf(fd,"%d,",s6_n2(1:(end-1))); -fprintf(fd,"%d};\n\n",s6_n2(end)); - -fprintf(fd,"s16 s6e_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s6_e2)); -fprintf(fd,"%d,",s6_e2(1:(end-1))); -fprintf(fd,"%d};\n\n",s6_e2(end)); - -fprintf(fd,"s16 s15n_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s15_n2)); -fprintf(fd,"%d,",s15_n2(1:(end-1))); -fprintf(fd,"%d};\n\n",s15_n2(end)); - -fprintf(fd,"s16 s15e_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s15_e2)); -fprintf(fd,"%d,",s15_e2(1:(end-1))); -fprintf(fd,"%d};\n\n",s15_e2(end)); - -fprintf(fd,"s16 s25n_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s25_n2)); -fprintf(fd,"%d,",s25_n2(1:(end-1))); -fprintf(fd,"%d};\n\n",s25_n2(end)); - -fprintf(fd,"s16 s25e_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s25_e2)); -fprintf(fd,"%d,",s25_e2(1:(end-1))); -fprintf(fd,"%d};\n\n",s25_e2(end)); - -fprintf(fd,"s16 s50n_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s50_n2)); -fprintf(fd,"%d,",s50_n2(1:(end-1))); -fprintf(fd,"%d};\n\n",s50_n2(end)); - -fprintf(fd,"s16 s50e_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s50_e2)); -fprintf(fd,"%d,",s50_e2(1:(end-1))); -fprintf(fd,"%d};\n\n",s50_e2(end)); - -fprintf(fd,"s16 s75n_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s75_n2)); -fprintf(fd,"%d,",s75_n2(1:(end-1))); -fprintf(fd,"%d};\n\n",s75_n2(end)); - -fprintf(fd,"s16 s75e_kHz_7_5[%d]__attribute__((aligned(16))) = {",length(s75_e2)); -fprintf(fd,"%d,",s75_e2(1:(end-1))); -fprintf(fd,"%d};\n\n",s75_e2(end)); - -fprintf(fd,"s16 s100n_kHz_7_5[%d]__attribute__((aligned(16)))= {",length(s100_n2)); -fprintf(fd,"%d,",s100_n2(1:(end-1))); -fprintf(fd,"%d};\n\n",s100_n2(end)); - -fprintf(fd,"s16 s100e_kHz_7_5[%d]__attribute__((aligned(16)))= {",length(s100_n2)); -fprintf(fd,"%d,",s100_e2(1:(end-1))); -fprintf(fd,"%d};\n\n",s100_e2(end)); - -fclose(fd); -end - - -function [s_n2, s_e2] = gen_sig(RB) - % 20MHz BW - cp0 = 160; - cp = 144; - cpe = 512; - samplerate = 30.72e6; - ofdm_size = 2048; - len = 15360; - switch(RB) - case 6 - ratio = 1/16; - case 15 - ratio = 1/8; - case 25 - ratio = 1/4; - case 50 - ratio = 1/2; - case 75 - ratio = 3/4; - case 100 - ratio = 1; - otherwise - disp("Wrong Number of RB"); - end - cp0 = cp0*ratio; - cp = cp*ratio; - cpe = cpe*ratio; - samplerate = samplerate*ratio; - ofdm_size = ofdm_size*ratio; - len = len*ratio; - - s_n0 = floor(32767*exp(-sqrt(-1)*2*pi*(-cp0:ofdm_size-1)*7.5e3/samplerate)); - s_n1 = floor(32767*exp(-sqrt(-1)*2*pi*(-cp:ofdm_size-1)*7.5e3/samplerate)); - s_n = [s_n0 s_n1 s_n1 s_n1 s_n1 s_n1 s_n1]; - s_n2 = zeros(1, 2*len); - s_n2(1:2:end) = real(s_n); - s_n2(2:2:end) = imag(s_n); - s_e = floor(32767*exp(-sqrt(-1)*2*pi*(-cpe:ofdm_size-1)*7.5e3/samplerate)); - s_e = [s_e s_e s_e s_e s_e s_e]; - s_e2 = zeros(1, 2*len); - s_e2(1:2:end) = real(s_e); - s_e2(2:2:end) = imag(s_e); -end - diff --git a/openair1/PHY/MODULATION/kHz_7_5.h b/openair1/PHY/MODULATION/kHz_7_5.h deleted file mode 100644 index ce2f0d5f2c..0000000000 --- a/openair1/PHY/MODULATION/kHz_7_5.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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.1 (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 - */ - -int16_t s6n_kHz_7_5[1920]__attribute__((aligned(16))) = {31785,7961,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805}; - -int16_t s6e_kHz_7_5[1920]__attribute__((aligned(16))) = {23169,23169,23731,22594,24278,22004,24811,21402,25329,20787,25831,20159,26318,19519,26789,18867,27244,18204,27683,17530,28105,16845,28510,16150,28897,15446,29268,14732,29621,14009,29955,13278,30272,12539,30571,11792,30851,11038,31113,10278,31356,9511,31580,8739,31785,7961,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,23169,23169,23731,22594,24278,22004,24811,21402,25329,20787,25831,20159,26318,19519,26789,18867,27244,18204,27683,17530,28105,16845,28510,16150,28897,15446,29268,14732,29621,14009,29955,13278,30272,12539,30571,11792,30851,11038,31113,10278,31356,9511,31580,8739,31785,7961,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,23169,23169,23731,22594,24278,22004,24811,21402,25329,20787,25831,20159,26318,19519,26789,18867,27244,18204,27683,17530,28105,16845,28510,16150,28897,15446,29268,14732,29621,14009,29955,13278,30272,12539,30571,11792,30851,11038,31113,10278,31356,9511,31580,8739,31785,7961,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,23169,23169,23731,22594,24278,22004,24811,21402,25329,20787,25831,20159,26318,19519,26789,18867,27244,18204,27683,17530,28105,16845,28510,16150,28897,15446,29268,14732,29621,14009,29955,13278,30272,12539,30571,11792,30851,11038,31113,10278,31356,9511,31580,8739,31785,7961,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,23169,23169,23731,22594,24278,22004,24811,21402,25329,20787,25831,20159,26318,19519,26789,18867,27244,18204,27683,17530,28105,16845,28510,16150,28897,15446,29268,14732,29621,14009,29955,13278,30272,12539,30571,11792,30851,11038,31113,10278,31356,9511,31580,8739,31785,7961,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805,23169,23169,23731,22594,24278,22004,24811,21402,25329,20787,25831,20159,26318,19519,26789,18867,27244,18204,27683,17530,28105,16845,28510,16150,28897,15446,29268,14732,29621,14009,29955,13278,30272,12539,30571,11792,30851,11038,31113,10278,31356,9511,31580,8739,31785,7961,31970,7179,32137,6392,32284,5601,32412,4807,32520,4011,32609,3211,32678,2410,32727,1607,32757,804,32767,0,32757,-805,32727,-1608,32678,-2411,32609,-3212,32520,-4012,32412,-4808,32284,-5602,32137,-6393,31970,-7180,31785,-7962,31580,-8740,31356,-9512,31113,-10279,30851,-11039,30571,-11793,30272,-12540,29955,-13279,29621,-14010,29268,-14733,28897,-15447,28510,-16151,28105,-16846,27683,-17531,27244,-18205,26789,-18868,26318,-19520,25831,-20160,25329,-20788,24811,-21403,24278,-22005,23731,-22595,23169,-23170,22594,-23732,22004,-24279,21402,-24812,20787,-25330,20159,-25832,19519,-26319,18867,-26790,18204,-27245,17530,-27684,16845,-28106,16150,-28511,15446,-28898,14732,-29269,14009,-29622,13278,-29956,12539,-30273,11792,-30572,11038,-30852,10278,-31114,9511,-31357,8739,-31581,7961,-31786,7179,-31971,6392,-32138,5601,-32285,4807,-32413,4011,-32521,3211,-32610,2410,-32679,1607,-32728,804,-32758,0,-32767,-805,-32758,-1608,-32728,-2411,-32679,-3212,-32610,-4012,-32521,-4808,-32413,-5602,-32285,-6393,-32138,-7180,-31971,-7962,-31786,-8740,-31581,-9512,-31357,-10279,-31114,-11039,-30852,-11793,-30572,-12540,-30273,-13279,-29956,-14010,-29622,-14733,-29269,-15447,-28898,-16151,-28511,-16846,-28106,-17531,-27684,-18205,-27245,-18868,-26790,-19520,-26319,-20160,-25832,-20788,-25330,-21403,-24812,-22005,-24279,-22595,-23732,-23170,-23170,-23732,-22595,-24279,-22005,-24812,-21403,-25330,-20788,-25832,-20160,-26319,-19520,-26790,-18868,-27245,-18205,-27684,-17531,-28106,-16846,-28511,-16151,-28898,-15447,-29269,-14733,-29622,-14010,-29956,-13279,-30273,-12540,-30572,-11793,-30852,-11039,-31114,-10279,-31357,-9512,-31581,-8740,-31786,-7962,-31971,-7180,-32138,-6393,-32285,-5602,-32413,-4808,-32521,-4012,-32610,-3212,-32679,-2411,-32728,-1608,-32758,-805}; - -int16_t s15n_kHz_7_5[3840]__attribute__((aligned(16))) = {31785,7961,31880,7571,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403}; - -int16_t s15e_kHz_7_5[3840]__attribute__((aligned(16))) = {23169,23169,23452,22883,23731,22594,24006,22301,24278,22004,24546,21705,24811,21402,25072,21096,25329,20787,25582,20474,25831,20159,26077,19840,26318,19519,26556,19194,26789,18867,27019,18537,27244,18204,27466,17868,27683,17530,27896,17189,28105,16845,28309,16499,28510,16150,28706,15799,28897,15446,29085,15090,29268,14732,29446,14372,29621,14009,29790,13645,29955,13278,30116,12909,30272,12539,30424,12166,30571,11792,30713,11416,30851,11038,30984,10659,31113,10278,31236,9895,31356,9511,31470,9126,31580,8739,31684,8351,31785,7961,31880,7571,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,23169,23169,23452,22883,23731,22594,24006,22301,24278,22004,24546,21705,24811,21402,25072,21096,25329,20787,25582,20474,25831,20159,26077,19840,26318,19519,26556,19194,26789,18867,27019,18537,27244,18204,27466,17868,27683,17530,27896,17189,28105,16845,28309,16499,28510,16150,28706,15799,28897,15446,29085,15090,29268,14732,29446,14372,29621,14009,29790,13645,29955,13278,30116,12909,30272,12539,30424,12166,30571,11792,30713,11416,30851,11038,30984,10659,31113,10278,31236,9895,31356,9511,31470,9126,31580,8739,31684,8351,31785,7961,31880,7571,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,23169,23169,23452,22883,23731,22594,24006,22301,24278,22004,24546,21705,24811,21402,25072,21096,25329,20787,25582,20474,25831,20159,26077,19840,26318,19519,26556,19194,26789,18867,27019,18537,27244,18204,27466,17868,27683,17530,27896,17189,28105,16845,28309,16499,28510,16150,28706,15799,28897,15446,29085,15090,29268,14732,29446,14372,29621,14009,29790,13645,29955,13278,30116,12909,30272,12539,30424,12166,30571,11792,30713,11416,30851,11038,30984,10659,31113,10278,31236,9895,31356,9511,31470,9126,31580,8739,31684,8351,31785,7961,31880,7571,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,23169,23169,23452,22883,23731,22594,24006,22301,24278,22004,24546,21705,24811,21402,25072,21096,25329,20787,25582,20474,25831,20159,26077,19840,26318,19519,26556,19194,26789,18867,27019,18537,27244,18204,27466,17868,27683,17530,27896,17189,28105,16845,28309,16499,28510,16150,28706,15799,28897,15446,29085,15090,29268,14732,29446,14372,29621,14009,29790,13645,29955,13278,30116,12909,30272,12539,30424,12166,30571,11792,30713,11416,30851,11038,30984,10659,31113,10278,31236,9895,31356,9511,31470,9126,31580,8739,31684,8351,31785,7961,31880,7571,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,23169,23169,23452,22883,23731,22594,24006,22301,24278,22004,24546,21705,24811,21402,25072,21096,25329,20787,25582,20474,25831,20159,26077,19840,26318,19519,26556,19194,26789,18867,27019,18537,27244,18204,27466,17868,27683,17530,27896,17189,28105,16845,28309,16499,28510,16150,28706,15799,28897,15446,29085,15090,29268,14732,29446,14372,29621,14009,29790,13645,29955,13278,30116,12909,30272,12539,30424,12166,30571,11792,30713,11416,30851,11038,30984,10659,31113,10278,31236,9895,31356,9511,31470,9126,31580,8739,31684,8351,31785,7961,31880,7571,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403,23169,23169,23452,22883,23731,22594,24006,22301,24278,22004,24546,21705,24811,21402,25072,21096,25329,20787,25582,20474,25831,20159,26077,19840,26318,19519,26556,19194,26789,18867,27019,18537,27244,18204,27466,17868,27683,17530,27896,17189,28105,16845,28309,16499,28510,16150,28706,15799,28897,15446,29085,15090,29268,14732,29446,14372,29621,14009,29790,13645,29955,13278,30116,12909,30272,12539,30424,12166,30571,11792,30713,11416,30851,11038,30984,10659,31113,10278,31236,9895,31356,9511,31470,9126,31580,8739,31684,8351,31785,7961,31880,7571,31970,7179,32056,6786,32137,6392,32213,5997,32284,5601,32350,5205,32412,4807,32468,4409,32520,4011,32567,3611,32609,3211,32646,2811,32678,2410,32705,2009,32727,1607,32744,1206,32757,804,32764,402,32767,0,32764,-403,32757,-805,32744,-1207,32727,-1608,32705,-2010,32678,-2411,32646,-2812,32609,-3212,32567,-3612,32520,-4012,32468,-4410,32412,-4808,32350,-5206,32284,-5602,32213,-5998,32137,-6393,32056,-6787,31970,-7180,31880,-7572,31785,-7962,31684,-8352,31580,-8740,31470,-9127,31356,-9512,31236,-9896,31113,-10279,30984,-10660,30851,-11039,30713,-11417,30571,-11793,30424,-12167,30272,-12540,30116,-12910,29955,-13279,29790,-13646,29621,-14010,29446,-14373,29268,-14733,29085,-15091,28897,-15447,28706,-15800,28510,-16151,28309,-16500,28105,-16846,27896,-17190,27683,-17531,27466,-17869,27244,-18205,27019,-18538,26789,-18868,26556,-19195,26318,-19520,26077,-19841,25831,-20160,25582,-20475,25329,-20788,25072,-21097,24811,-21403,24546,-21706,24278,-22005,24006,-22302,23731,-22595,23452,-22884,23169,-23170,22883,-23453,22594,-23732,22301,-24007,22004,-24279,21705,-24547,21402,-24812,21096,-25073,20787,-25330,20474,-25583,20159,-25832,19840,-26078,19519,-26319,19194,-26557,18867,-26790,18537,-27020,18204,-27245,17868,-27467,17530,-27684,17189,-27897,16845,-28106,16499,-28310,16150,-28511,15799,-28707,15446,-28898,15090,-29086,14732,-29269,14372,-29447,14009,-29622,13645,-29791,13278,-29956,12909,-30117,12539,-30273,12166,-30425,11792,-30572,11416,-30714,11038,-30852,10659,-30985,10278,-31114,9895,-31237,9511,-31357,9126,-31471,8739,-31581,8351,-31685,7961,-31786,7571,-31881,7179,-31971,6786,-32057,6392,-32138,5997,-32214,5601,-32285,5205,-32351,4807,-32413,4409,-32469,4011,-32521,3611,-32568,3211,-32610,2811,-32647,2410,-32679,2009,-32706,1607,-32728,1206,-32745,804,-32758,402,-32765,0,-32767,-403,-32765,-805,-32758,-1207,-32745,-1608,-32728,-2010,-32706,-2411,-32679,-2812,-32647,-3212,-32610,-3612,-32568,-4012,-32521,-4410,-32469,-4808,-32413,-5206,-32351,-5602,-32285,-5998,-32214,-6393,-32138,-6787,-32057,-7180,-31971,-7572,-31881,-7962,-31786,-8352,-31685,-8740,-31581,-9127,-31471,-9512,-31357,-9896,-31237,-10279,-31114,-10660,-30985,-11039,-30852,-11417,-30714,-11793,-30572,-12167,-30425,-12540,-30273,-12910,-30117,-13279,-29956,-13646,-29791,-14010,-29622,-14373,-29447,-14733,-29269,-15091,-29086,-15447,-28898,-15800,-28707,-16151,-28511,-16500,-28310,-16846,-28106,-17190,-27897,-17531,-27684,-17869,-27467,-18205,-27245,-18538,-27020,-18868,-26790,-19195,-26557,-19520,-26319,-19841,-26078,-20160,-25832,-20475,-25583,-20788,-25330,-21097,-25073,-21403,-24812,-21706,-24547,-22005,-24279,-22302,-24007,-22595,-23732,-22884,-23453,-23170,-23170,-23453,-22884,-23732,-22595,-24007,-22302,-24279,-22005,-24547,-21706,-24812,-21403,-25073,-21097,-25330,-20788,-25583,-20475,-25832,-20160,-26078,-19841,-26319,-19520,-26557,-19195,-26790,-18868,-27020,-18538,-27245,-18205,-27467,-17869,-27684,-17531,-27897,-17190,-28106,-16846,-28310,-16500,-28511,-16151,-28707,-15800,-28898,-15447,-29086,-15091,-29269,-14733,-29447,-14373,-29622,-14010,-29791,-13646,-29956,-13279,-30117,-12910,-30273,-12540,-30425,-12167,-30572,-11793,-30714,-11417,-30852,-11039,-30985,-10660,-31114,-10279,-31237,-9896,-31357,-9512,-31471,-9127,-31581,-8740,-31685,-8352,-31786,-7962,-31881,-7572,-31971,-7180,-32057,-6787,-32138,-6393,-32214,-5998,-32285,-5602,-32351,-5206,-32413,-4808,-32469,-4410,-32521,-4012,-32568,-3612,-32610,-3212,-32647,-2812,-32679,-2411,-32706,-2010,-32728,-1608,-32745,-1207,-32758,-805,-32765,-403}; - -int16_t s25n_kHz_7_5[7680]__attribute__((aligned(16))) = {31785,7961,31833,7766,31880,7571,31926,7375,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202}; - -int16_t s25e_kHz_7_5[7680]__attribute__((aligned(16))) = {23169,23169,23311,23027,23452,22883,23592,22739,23731,22594,23869,22448,24006,22301,24143,22153,24278,22004,24413,21855,24546,21705,24679,21554,24811,21402,24942,21249,25072,21096,25201,20942,25329,20787,25456,20631,25582,20474,25707,20317,25831,20159,25954,20000,26077,19840,26198,19680,26318,19519,26437,19357,26556,19194,26673,19031,26789,18867,26905,18702,27019,18537,27132,18371,27244,18204,27355,18036,27466,17868,27575,17699,27683,17530,27790,17360,27896,17189,28001,17017,28105,16845,28208,16672,28309,16499,28410,16325,28510,16150,28608,15975,28706,15799,28802,15623,28897,15446,28992,15268,29085,15090,29177,14911,29268,14732,29358,14552,29446,14372,29534,14191,29621,14009,29706,13827,29790,13645,29873,13462,29955,13278,30036,13094,30116,12909,30195,12724,30272,12539,30349,12353,30424,12166,30498,11980,30571,11792,30643,11604,30713,11416,30783,11227,30851,11038,30918,10849,30984,10659,31049,10469,31113,10278,31175,10087,31236,9895,31297,9703,31356,9511,31413,9319,31470,9126,31525,8932,31580,8739,31633,8545,31684,8351,31735,8156,31785,7961,31833,7766,31880,7571,31926,7375,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,23169,23169,23311,23027,23452,22883,23592,22739,23731,22594,23869,22448,24006,22301,24143,22153,24278,22004,24413,21855,24546,21705,24679,21554,24811,21402,24942,21249,25072,21096,25201,20942,25329,20787,25456,20631,25582,20474,25707,20317,25831,20159,25954,20000,26077,19840,26198,19680,26318,19519,26437,19357,26556,19194,26673,19031,26789,18867,26905,18702,27019,18537,27132,18371,27244,18204,27355,18036,27466,17868,27575,17699,27683,17530,27790,17360,27896,17189,28001,17017,28105,16845,28208,16672,28309,16499,28410,16325,28510,16150,28608,15975,28706,15799,28802,15623,28897,15446,28992,15268,29085,15090,29177,14911,29268,14732,29358,14552,29446,14372,29534,14191,29621,14009,29706,13827,29790,13645,29873,13462,29955,13278,30036,13094,30116,12909,30195,12724,30272,12539,30349,12353,30424,12166,30498,11980,30571,11792,30643,11604,30713,11416,30783,11227,30851,11038,30918,10849,30984,10659,31049,10469,31113,10278,31175,10087,31236,9895,31297,9703,31356,9511,31413,9319,31470,9126,31525,8932,31580,8739,31633,8545,31684,8351,31735,8156,31785,7961,31833,7766,31880,7571,31926,7375,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,23169,23169,23311,23027,23452,22883,23592,22739,23731,22594,23869,22448,24006,22301,24143,22153,24278,22004,24413,21855,24546,21705,24679,21554,24811,21402,24942,21249,25072,21096,25201,20942,25329,20787,25456,20631,25582,20474,25707,20317,25831,20159,25954,20000,26077,19840,26198,19680,26318,19519,26437,19357,26556,19194,26673,19031,26789,18867,26905,18702,27019,18537,27132,18371,27244,18204,27355,18036,27466,17868,27575,17699,27683,17530,27790,17360,27896,17189,28001,17017,28105,16845,28208,16672,28309,16499,28410,16325,28510,16150,28608,15975,28706,15799,28802,15623,28897,15446,28992,15268,29085,15090,29177,14911,29268,14732,29358,14552,29446,14372,29534,14191,29621,14009,29706,13827,29790,13645,29873,13462,29955,13278,30036,13094,30116,12909,30195,12724,30272,12539,30349,12353,30424,12166,30498,11980,30571,11792,30643,11604,30713,11416,30783,11227,30851,11038,30918,10849,30984,10659,31049,10469,31113,10278,31175,10087,31236,9895,31297,9703,31356,9511,31413,9319,31470,9126,31525,8932,31580,8739,31633,8545,31684,8351,31735,8156,31785,7961,31833,7766,31880,7571,31926,7375,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,23169,23169,23311,23027,23452,22883,23592,22739,23731,22594,23869,22448,24006,22301,24143,22153,24278,22004,24413,21855,24546,21705,24679,21554,24811,21402,24942,21249,25072,21096,25201,20942,25329,20787,25456,20631,25582,20474,25707,20317,25831,20159,25954,20000,26077,19840,26198,19680,26318,19519,26437,19357,26556,19194,26673,19031,26789,18867,26905,18702,27019,18537,27132,18371,27244,18204,27355,18036,27466,17868,27575,17699,27683,17530,27790,17360,27896,17189,28001,17017,28105,16845,28208,16672,28309,16499,28410,16325,28510,16150,28608,15975,28706,15799,28802,15623,28897,15446,28992,15268,29085,15090,29177,14911,29268,14732,29358,14552,29446,14372,29534,14191,29621,14009,29706,13827,29790,13645,29873,13462,29955,13278,30036,13094,30116,12909,30195,12724,30272,12539,30349,12353,30424,12166,30498,11980,30571,11792,30643,11604,30713,11416,30783,11227,30851,11038,30918,10849,30984,10659,31049,10469,31113,10278,31175,10087,31236,9895,31297,9703,31356,9511,31413,9319,31470,9126,31525,8932,31580,8739,31633,8545,31684,8351,31735,8156,31785,7961,31833,7766,31880,7571,31926,7375,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,23169,23169,23311,23027,23452,22883,23592,22739,23731,22594,23869,22448,24006,22301,24143,22153,24278,22004,24413,21855,24546,21705,24679,21554,24811,21402,24942,21249,25072,21096,25201,20942,25329,20787,25456,20631,25582,20474,25707,20317,25831,20159,25954,20000,26077,19840,26198,19680,26318,19519,26437,19357,26556,19194,26673,19031,26789,18867,26905,18702,27019,18537,27132,18371,27244,18204,27355,18036,27466,17868,27575,17699,27683,17530,27790,17360,27896,17189,28001,17017,28105,16845,28208,16672,28309,16499,28410,16325,28510,16150,28608,15975,28706,15799,28802,15623,28897,15446,28992,15268,29085,15090,29177,14911,29268,14732,29358,14552,29446,14372,29534,14191,29621,14009,29706,13827,29790,13645,29873,13462,29955,13278,30036,13094,30116,12909,30195,12724,30272,12539,30349,12353,30424,12166,30498,11980,30571,11792,30643,11604,30713,11416,30783,11227,30851,11038,30918,10849,30984,10659,31049,10469,31113,10278,31175,10087,31236,9895,31297,9703,31356,9511,31413,9319,31470,9126,31525,8932,31580,8739,31633,8545,31684,8351,31735,8156,31785,7961,31833,7766,31880,7571,31926,7375,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202,23169,23169,23311,23027,23452,22883,23592,22739,23731,22594,23869,22448,24006,22301,24143,22153,24278,22004,24413,21855,24546,21705,24679,21554,24811,21402,24942,21249,25072,21096,25201,20942,25329,20787,25456,20631,25582,20474,25707,20317,25831,20159,25954,20000,26077,19840,26198,19680,26318,19519,26437,19357,26556,19194,26673,19031,26789,18867,26905,18702,27019,18537,27132,18371,27244,18204,27355,18036,27466,17868,27575,17699,27683,17530,27790,17360,27896,17189,28001,17017,28105,16845,28208,16672,28309,16499,28410,16325,28510,16150,28608,15975,28706,15799,28802,15623,28897,15446,28992,15268,29085,15090,29177,14911,29268,14732,29358,14552,29446,14372,29534,14191,29621,14009,29706,13827,29790,13645,29873,13462,29955,13278,30036,13094,30116,12909,30195,12724,30272,12539,30349,12353,30424,12166,30498,11980,30571,11792,30643,11604,30713,11416,30783,11227,30851,11038,30918,10849,30984,10659,31049,10469,31113,10278,31175,10087,31236,9895,31297,9703,31356,9511,31413,9319,31470,9126,31525,8932,31580,8739,31633,8545,31684,8351,31735,8156,31785,7961,31833,7766,31880,7571,31926,7375,31970,7179,32014,6982,32056,6786,32097,6589,32137,6392,32176,6195,32213,5997,32249,5799,32284,5601,32318,5403,32350,5205,32382,5006,32412,4807,32441,4608,32468,4409,32495,4210,32520,4011,32544,3811,32567,3611,32588,3411,32609,3211,32628,3011,32646,2811,32662,2610,32678,2410,32692,2209,32705,2009,32717,1808,32727,1607,32736,1406,32744,1206,32751,1005,32757,804,32761,603,32764,402,32766,201,32767,0,32766,-202,32764,-403,32761,-604,32757,-805,32751,-1006,32744,-1207,32736,-1407,32727,-1608,32717,-1809,32705,-2010,32692,-2210,32678,-2411,32662,-2611,32646,-2812,32628,-3012,32609,-3212,32588,-3412,32567,-3612,32544,-3812,32520,-4012,32495,-4211,32468,-4410,32441,-4609,32412,-4808,32382,-5007,32350,-5206,32318,-5404,32284,-5602,32249,-5800,32213,-5998,32176,-6196,32137,-6393,32097,-6590,32056,-6787,32014,-6983,31970,-7180,31926,-7376,31880,-7572,31833,-7767,31785,-7962,31735,-8157,31684,-8352,31633,-8546,31580,-8740,31525,-8933,31470,-9127,31413,-9320,31356,-9512,31297,-9704,31236,-9896,31175,-10088,31113,-10279,31049,-10470,30984,-10660,30918,-10850,30851,-11039,30783,-11228,30713,-11417,30643,-11605,30571,-11793,30498,-11981,30424,-12167,30349,-12354,30272,-12540,30195,-12725,30116,-12910,30036,-13095,29955,-13279,29873,-13463,29790,-13646,29706,-13828,29621,-14010,29534,-14192,29446,-14373,29358,-14553,29268,-14733,29177,-14912,29085,-15091,28992,-15269,28897,-15447,28802,-15624,28706,-15800,28608,-15976,28510,-16151,28410,-16326,28309,-16500,28208,-16673,28105,-16846,28001,-17018,27896,-17190,27790,-17361,27683,-17531,27575,-17700,27466,-17869,27355,-18037,27244,-18205,27132,-18372,27019,-18538,26905,-18703,26789,-18868,26673,-19032,26556,-19195,26437,-19358,26318,-19520,26198,-19681,26077,-19841,25954,-20001,25831,-20160,25707,-20318,25582,-20475,25456,-20632,25329,-20788,25201,-20943,25072,-21097,24942,-21250,24811,-21403,24679,-21555,24546,-21706,24413,-21856,24278,-22005,24143,-22154,24006,-22302,23869,-22449,23731,-22595,23592,-22740,23452,-22884,23311,-23028,23169,-23170,23027,-23312,22883,-23453,22739,-23593,22594,-23732,22448,-23870,22301,-24007,22153,-24144,22004,-24279,21855,-24414,21705,-24547,21554,-24680,21402,-24812,21249,-24943,21096,-25073,20942,-25202,20787,-25330,20631,-25457,20474,-25583,20317,-25708,20159,-25832,20000,-25955,19840,-26078,19680,-26199,19519,-26319,19357,-26438,19194,-26557,19031,-26674,18867,-26790,18702,-26906,18537,-27020,18371,-27133,18204,-27245,18036,-27356,17868,-27467,17699,-27576,17530,-27684,17360,-27791,17189,-27897,17017,-28002,16845,-28106,16672,-28209,16499,-28310,16325,-28411,16150,-28511,15975,-28609,15799,-28707,15623,-28803,15446,-28898,15268,-28993,15090,-29086,14911,-29178,14732,-29269,14552,-29359,14372,-29447,14191,-29535,14009,-29622,13827,-29707,13645,-29791,13462,-29874,13278,-29956,13094,-30037,12909,-30117,12724,-30196,12539,-30273,12353,-30350,12166,-30425,11980,-30499,11792,-30572,11604,-30644,11416,-30714,11227,-30784,11038,-30852,10849,-30919,10659,-30985,10469,-31050,10278,-31114,10087,-31176,9895,-31237,9703,-31298,9511,-31357,9319,-31414,9126,-31471,8932,-31526,8739,-31581,8545,-31634,8351,-31685,8156,-31736,7961,-31786,7766,-31834,7571,-31881,7375,-31927,7179,-31971,6982,-32015,6786,-32057,6589,-32098,6392,-32138,6195,-32177,5997,-32214,5799,-32250,5601,-32285,5403,-32319,5205,-32351,5006,-32383,4807,-32413,4608,-32442,4409,-32469,4210,-32496,4011,-32521,3811,-32545,3611,-32568,3411,-32589,3211,-32610,3011,-32629,2811,-32647,2610,-32663,2410,-32679,2209,-32693,2009,-32706,1808,-32718,1607,-32728,1406,-32737,1206,-32745,1005,-32752,804,-32758,603,-32762,402,-32765,201,-32767,0,-32767,-202,-32767,-403,-32765,-604,-32762,-805,-32758,-1006,-32752,-1207,-32745,-1407,-32737,-1608,-32728,-1809,-32718,-2010,-32706,-2210,-32693,-2411,-32679,-2611,-32663,-2812,-32647,-3012,-32629,-3212,-32610,-3412,-32589,-3612,-32568,-3812,-32545,-4012,-32521,-4211,-32496,-4410,-32469,-4609,-32442,-4808,-32413,-5007,-32383,-5206,-32351,-5404,-32319,-5602,-32285,-5800,-32250,-5998,-32214,-6196,-32177,-6393,-32138,-6590,-32098,-6787,-32057,-6983,-32015,-7180,-31971,-7376,-31927,-7572,-31881,-7767,-31834,-7962,-31786,-8157,-31736,-8352,-31685,-8546,-31634,-8740,-31581,-8933,-31526,-9127,-31471,-9320,-31414,-9512,-31357,-9704,-31298,-9896,-31237,-10088,-31176,-10279,-31114,-10470,-31050,-10660,-30985,-10850,-30919,-11039,-30852,-11228,-30784,-11417,-30714,-11605,-30644,-11793,-30572,-11981,-30499,-12167,-30425,-12354,-30350,-12540,-30273,-12725,-30196,-12910,-30117,-13095,-30037,-13279,-29956,-13463,-29874,-13646,-29791,-13828,-29707,-14010,-29622,-14192,-29535,-14373,-29447,-14553,-29359,-14733,-29269,-14912,-29178,-15091,-29086,-15269,-28993,-15447,-28898,-15624,-28803,-15800,-28707,-15976,-28609,-16151,-28511,-16326,-28411,-16500,-28310,-16673,-28209,-16846,-28106,-17018,-28002,-17190,-27897,-17361,-27791,-17531,-27684,-17700,-27576,-17869,-27467,-18037,-27356,-18205,-27245,-18372,-27133,-18538,-27020,-18703,-26906,-18868,-26790,-19032,-26674,-19195,-26557,-19358,-26438,-19520,-26319,-19681,-26199,-19841,-26078,-20001,-25955,-20160,-25832,-20318,-25708,-20475,-25583,-20632,-25457,-20788,-25330,-20943,-25202,-21097,-25073,-21250,-24943,-21403,-24812,-21555,-24680,-21706,-24547,-21856,-24414,-22005,-24279,-22154,-24144,-22302,-24007,-22449,-23870,-22595,-23732,-22740,-23593,-22884,-23453,-23028,-23312,-23170,-23170,-23312,-23028,-23453,-22884,-23593,-22740,-23732,-22595,-23870,-22449,-24007,-22302,-24144,-22154,-24279,-22005,-24414,-21856,-24547,-21706,-24680,-21555,-24812,-21403,-24943,-21250,-25073,-21097,-25202,-20943,-25330,-20788,-25457,-20632,-25583,-20475,-25708,-20318,-25832,-20160,-25955,-20001,-26078,-19841,-26199,-19681,-26319,-19520,-26438,-19358,-26557,-19195,-26674,-19032,-26790,-18868,-26906,-18703,-27020,-18538,-27133,-18372,-27245,-18205,-27356,-18037,-27467,-17869,-27576,-17700,-27684,-17531,-27791,-17361,-27897,-17190,-28002,-17018,-28106,-16846,-28209,-16673,-28310,-16500,-28411,-16326,-28511,-16151,-28609,-15976,-28707,-15800,-28803,-15624,-28898,-15447,-28993,-15269,-29086,-15091,-29178,-14912,-29269,-14733,-29359,-14553,-29447,-14373,-29535,-14192,-29622,-14010,-29707,-13828,-29791,-13646,-29874,-13463,-29956,-13279,-30037,-13095,-30117,-12910,-30196,-12725,-30273,-12540,-30350,-12354,-30425,-12167,-30499,-11981,-30572,-11793,-30644,-11605,-30714,-11417,-30784,-11228,-30852,-11039,-30919,-10850,-30985,-10660,-31050,-10470,-31114,-10279,-31176,-10088,-31237,-9896,-31298,-9704,-31357,-9512,-31414,-9320,-31471,-9127,-31526,-8933,-31581,-8740,-31634,-8546,-31685,-8352,-31736,-8157,-31786,-7962,-31834,-7767,-31881,-7572,-31927,-7376,-31971,-7180,-32015,-6983,-32057,-6787,-32098,-6590,-32138,-6393,-32177,-6196,-32214,-5998,-32250,-5800,-32285,-5602,-32319,-5404,-32351,-5206,-32383,-5007,-32413,-4808,-32442,-4609,-32469,-4410,-32496,-4211,-32521,-4012,-32545,-3812,-32568,-3612,-32589,-3412,-32610,-3212,-32629,-3012,-32647,-2812,-32663,-2611,-32679,-2411,-32693,-2210,-32706,-2010,-32718,-1809,-32728,-1608,-32737,-1407,-32745,-1207,-32752,-1006,-32758,-805,-32762,-604,-32765,-403,-32767,-202}; - -int16_t s50n_kHz_7_5[15360]__attribute__((aligned(16))) = {31785,7961,31809,7864,31833,7766,31856,7668,31880,7571,31903,7473,31926,7375,31948,7277,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101}; - -int16_t s50e_kHz_7_5[15360]__attribute__((aligned(16))) = {23169,23169,23240,23098,23311,23027,23382,22955,23452,22883,23522,22811,23592,22739,23661,22666,23731,22594,23800,22521,23869,22448,23938,22374,24006,22301,24075,22227,24143,22153,24211,22079,24278,22004,24346,21930,24413,21855,24480,21780,24546,21705,24613,21629,24679,21554,24745,21478,24811,21402,24877,21326,24942,21249,25007,21173,25072,21096,25136,21019,25201,20942,25265,20864,25329,20787,25392,20709,25456,20631,25519,20553,25582,20474,25645,20396,25707,20317,25769,20238,25831,20159,25893,20079,25954,20000,26016,19920,26077,19840,26137,19760,26198,19680,26258,19599,26318,19519,26378,19438,26437,19357,26497,19276,26556,19194,26615,19113,26673,19031,26731,18949,26789,18867,26847,18785,26905,18702,26962,18620,27019,18537,27076,18454,27132,18371,27188,18287,27244,18204,27300,18120,27355,18036,27411,17952,27466,17868,27520,17784,27575,17699,27629,17615,27683,17530,27736,17445,27790,17360,27843,17274,27896,17189,27948,17103,28001,17017,28053,16931,28105,16845,28156,16759,28208,16672,28259,16586,28309,16499,28360,16412,28410,16325,28460,16238,28510,16150,28559,16063,28608,15975,28657,15887,28706,15799,28754,15711,28802,15623,28850,15534,28897,15446,28945,15357,28992,15268,29038,15179,29085,15090,29131,15001,29177,14911,29222,14822,29268,14732,29313,14642,29358,14552,29402,14462,29446,14372,29490,14281,29534,14191,29577,14100,29621,14009,29663,13918,29706,13827,29748,13736,29790,13645,29832,13553,29873,13462,29915,13370,29955,13278,29996,13186,30036,13094,30076,13002,30116,12909,30156,12817,30195,12724,30234,12632,30272,12539,30311,12446,30349,12353,30386,12260,30424,12166,30461,12073,30498,11980,30535,11886,30571,11792,30607,11698,30643,11604,30678,11510,30713,11416,30748,11322,30783,11227,30817,11133,30851,11038,30885,10944,30918,10849,30951,10754,30984,10659,31017,10564,31049,10469,31081,10373,31113,10278,31144,10182,31175,10087,31206,9991,31236,9895,31267,9799,31297,9703,31326,9607,31356,9511,31385,9415,31413,9319,31442,9222,31470,9126,31498,9029,31525,8932,31553,8836,31580,8739,31606,8642,31633,8545,31659,8448,31684,8351,31710,8253,31735,8156,31760,8059,31785,7961,31809,7864,31833,7766,31856,7668,31880,7571,31903,7473,31926,7375,31948,7277,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,23169,23169,23240,23098,23311,23027,23382,22955,23452,22883,23522,22811,23592,22739,23661,22666,23731,22594,23800,22521,23869,22448,23938,22374,24006,22301,24075,22227,24143,22153,24211,22079,24278,22004,24346,21930,24413,21855,24480,21780,24546,21705,24613,21629,24679,21554,24745,21478,24811,21402,24877,21326,24942,21249,25007,21173,25072,21096,25136,21019,25201,20942,25265,20864,25329,20787,25392,20709,25456,20631,25519,20553,25582,20474,25645,20396,25707,20317,25769,20238,25831,20159,25893,20079,25954,20000,26016,19920,26077,19840,26137,19760,26198,19680,26258,19599,26318,19519,26378,19438,26437,19357,26497,19276,26556,19194,26615,19113,26673,19031,26731,18949,26789,18867,26847,18785,26905,18702,26962,18620,27019,18537,27076,18454,27132,18371,27188,18287,27244,18204,27300,18120,27355,18036,27411,17952,27466,17868,27520,17784,27575,17699,27629,17615,27683,17530,27736,17445,27790,17360,27843,17274,27896,17189,27948,17103,28001,17017,28053,16931,28105,16845,28156,16759,28208,16672,28259,16586,28309,16499,28360,16412,28410,16325,28460,16238,28510,16150,28559,16063,28608,15975,28657,15887,28706,15799,28754,15711,28802,15623,28850,15534,28897,15446,28945,15357,28992,15268,29038,15179,29085,15090,29131,15001,29177,14911,29222,14822,29268,14732,29313,14642,29358,14552,29402,14462,29446,14372,29490,14281,29534,14191,29577,14100,29621,14009,29663,13918,29706,13827,29748,13736,29790,13645,29832,13553,29873,13462,29915,13370,29955,13278,29996,13186,30036,13094,30076,13002,30116,12909,30156,12817,30195,12724,30234,12632,30272,12539,30311,12446,30349,12353,30386,12260,30424,12166,30461,12073,30498,11980,30535,11886,30571,11792,30607,11698,30643,11604,30678,11510,30713,11416,30748,11322,30783,11227,30817,11133,30851,11038,30885,10944,30918,10849,30951,10754,30984,10659,31017,10564,31049,10469,31081,10373,31113,10278,31144,10182,31175,10087,31206,9991,31236,9895,31267,9799,31297,9703,31326,9607,31356,9511,31385,9415,31413,9319,31442,9222,31470,9126,31498,9029,31525,8932,31553,8836,31580,8739,31606,8642,31633,8545,31659,8448,31684,8351,31710,8253,31735,8156,31760,8059,31785,7961,31809,7864,31833,7766,31856,7668,31880,7571,31903,7473,31926,7375,31948,7277,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,23169,23169,23240,23098,23311,23027,23382,22955,23452,22883,23522,22811,23592,22739,23661,22666,23731,22594,23800,22521,23869,22448,23938,22374,24006,22301,24075,22227,24143,22153,24211,22079,24278,22004,24346,21930,24413,21855,24480,21780,24546,21705,24613,21629,24679,21554,24745,21478,24811,21402,24877,21326,24942,21249,25007,21173,25072,21096,25136,21019,25201,20942,25265,20864,25329,20787,25392,20709,25456,20631,25519,20553,25582,20474,25645,20396,25707,20317,25769,20238,25831,20159,25893,20079,25954,20000,26016,19920,26077,19840,26137,19760,26198,19680,26258,19599,26318,19519,26378,19438,26437,19357,26497,19276,26556,19194,26615,19113,26673,19031,26731,18949,26789,18867,26847,18785,26905,18702,26962,18620,27019,18537,27076,18454,27132,18371,27188,18287,27244,18204,27300,18120,27355,18036,27411,17952,27466,17868,27520,17784,27575,17699,27629,17615,27683,17530,27736,17445,27790,17360,27843,17274,27896,17189,27948,17103,28001,17017,28053,16931,28105,16845,28156,16759,28208,16672,28259,16586,28309,16499,28360,16412,28410,16325,28460,16238,28510,16150,28559,16063,28608,15975,28657,15887,28706,15799,28754,15711,28802,15623,28850,15534,28897,15446,28945,15357,28992,15268,29038,15179,29085,15090,29131,15001,29177,14911,29222,14822,29268,14732,29313,14642,29358,14552,29402,14462,29446,14372,29490,14281,29534,14191,29577,14100,29621,14009,29663,13918,29706,13827,29748,13736,29790,13645,29832,13553,29873,13462,29915,13370,29955,13278,29996,13186,30036,13094,30076,13002,30116,12909,30156,12817,30195,12724,30234,12632,30272,12539,30311,12446,30349,12353,30386,12260,30424,12166,30461,12073,30498,11980,30535,11886,30571,11792,30607,11698,30643,11604,30678,11510,30713,11416,30748,11322,30783,11227,30817,11133,30851,11038,30885,10944,30918,10849,30951,10754,30984,10659,31017,10564,31049,10469,31081,10373,31113,10278,31144,10182,31175,10087,31206,9991,31236,9895,31267,9799,31297,9703,31326,9607,31356,9511,31385,9415,31413,9319,31442,9222,31470,9126,31498,9029,31525,8932,31553,8836,31580,8739,31606,8642,31633,8545,31659,8448,31684,8351,31710,8253,31735,8156,31760,8059,31785,7961,31809,7864,31833,7766,31856,7668,31880,7571,31903,7473,31926,7375,31948,7277,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,23169,23169,23240,23098,23311,23027,23382,22955,23452,22883,23522,22811,23592,22739,23661,22666,23731,22594,23800,22521,23869,22448,23938,22374,24006,22301,24075,22227,24143,22153,24211,22079,24278,22004,24346,21930,24413,21855,24480,21780,24546,21705,24613,21629,24679,21554,24745,21478,24811,21402,24877,21326,24942,21249,25007,21173,25072,21096,25136,21019,25201,20942,25265,20864,25329,20787,25392,20709,25456,20631,25519,20553,25582,20474,25645,20396,25707,20317,25769,20238,25831,20159,25893,20079,25954,20000,26016,19920,26077,19840,26137,19760,26198,19680,26258,19599,26318,19519,26378,19438,26437,19357,26497,19276,26556,19194,26615,19113,26673,19031,26731,18949,26789,18867,26847,18785,26905,18702,26962,18620,27019,18537,27076,18454,27132,18371,27188,18287,27244,18204,27300,18120,27355,18036,27411,17952,27466,17868,27520,17784,27575,17699,27629,17615,27683,17530,27736,17445,27790,17360,27843,17274,27896,17189,27948,17103,28001,17017,28053,16931,28105,16845,28156,16759,28208,16672,28259,16586,28309,16499,28360,16412,28410,16325,28460,16238,28510,16150,28559,16063,28608,15975,28657,15887,28706,15799,28754,15711,28802,15623,28850,15534,28897,15446,28945,15357,28992,15268,29038,15179,29085,15090,29131,15001,29177,14911,29222,14822,29268,14732,29313,14642,29358,14552,29402,14462,29446,14372,29490,14281,29534,14191,29577,14100,29621,14009,29663,13918,29706,13827,29748,13736,29790,13645,29832,13553,29873,13462,29915,13370,29955,13278,29996,13186,30036,13094,30076,13002,30116,12909,30156,12817,30195,12724,30234,12632,30272,12539,30311,12446,30349,12353,30386,12260,30424,12166,30461,12073,30498,11980,30535,11886,30571,11792,30607,11698,30643,11604,30678,11510,30713,11416,30748,11322,30783,11227,30817,11133,30851,11038,30885,10944,30918,10849,30951,10754,30984,10659,31017,10564,31049,10469,31081,10373,31113,10278,31144,10182,31175,10087,31206,9991,31236,9895,31267,9799,31297,9703,31326,9607,31356,9511,31385,9415,31413,9319,31442,9222,31470,9126,31498,9029,31525,8932,31553,8836,31580,8739,31606,8642,31633,8545,31659,8448,31684,8351,31710,8253,31735,8156,31760,8059,31785,7961,31809,7864,31833,7766,31856,7668,31880,7571,31903,7473,31926,7375,31948,7277,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,23169,23169,23240,23098,23311,23027,23382,22955,23452,22883,23522,22811,23592,22739,23661,22666,23731,22594,23800,22521,23869,22448,23938,22374,24006,22301,24075,22227,24143,22153,24211,22079,24278,22004,24346,21930,24413,21855,24480,21780,24546,21705,24613,21629,24679,21554,24745,21478,24811,21402,24877,21326,24942,21249,25007,21173,25072,21096,25136,21019,25201,20942,25265,20864,25329,20787,25392,20709,25456,20631,25519,20553,25582,20474,25645,20396,25707,20317,25769,20238,25831,20159,25893,20079,25954,20000,26016,19920,26077,19840,26137,19760,26198,19680,26258,19599,26318,19519,26378,19438,26437,19357,26497,19276,26556,19194,26615,19113,26673,19031,26731,18949,26789,18867,26847,18785,26905,18702,26962,18620,27019,18537,27076,18454,27132,18371,27188,18287,27244,18204,27300,18120,27355,18036,27411,17952,27466,17868,27520,17784,27575,17699,27629,17615,27683,17530,27736,17445,27790,17360,27843,17274,27896,17189,27948,17103,28001,17017,28053,16931,28105,16845,28156,16759,28208,16672,28259,16586,28309,16499,28360,16412,28410,16325,28460,16238,28510,16150,28559,16063,28608,15975,28657,15887,28706,15799,28754,15711,28802,15623,28850,15534,28897,15446,28945,15357,28992,15268,29038,15179,29085,15090,29131,15001,29177,14911,29222,14822,29268,14732,29313,14642,29358,14552,29402,14462,29446,14372,29490,14281,29534,14191,29577,14100,29621,14009,29663,13918,29706,13827,29748,13736,29790,13645,29832,13553,29873,13462,29915,13370,29955,13278,29996,13186,30036,13094,30076,13002,30116,12909,30156,12817,30195,12724,30234,12632,30272,12539,30311,12446,30349,12353,30386,12260,30424,12166,30461,12073,30498,11980,30535,11886,30571,11792,30607,11698,30643,11604,30678,11510,30713,11416,30748,11322,30783,11227,30817,11133,30851,11038,30885,10944,30918,10849,30951,10754,30984,10659,31017,10564,31049,10469,31081,10373,31113,10278,31144,10182,31175,10087,31206,9991,31236,9895,31267,9799,31297,9703,31326,9607,31356,9511,31385,9415,31413,9319,31442,9222,31470,9126,31498,9029,31525,8932,31553,8836,31580,8739,31606,8642,31633,8545,31659,8448,31684,8351,31710,8253,31735,8156,31760,8059,31785,7961,31809,7864,31833,7766,31856,7668,31880,7571,31903,7473,31926,7375,31948,7277,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101,23169,23169,23240,23098,23311,23027,23382,22955,23452,22883,23522,22811,23592,22739,23661,22666,23731,22594,23800,22521,23869,22448,23938,22374,24006,22301,24075,22227,24143,22153,24211,22079,24278,22004,24346,21930,24413,21855,24480,21780,24546,21705,24613,21629,24679,21554,24745,21478,24811,21402,24877,21326,24942,21249,25007,21173,25072,21096,25136,21019,25201,20942,25265,20864,25329,20787,25392,20709,25456,20631,25519,20553,25582,20474,25645,20396,25707,20317,25769,20238,25831,20159,25893,20079,25954,20000,26016,19920,26077,19840,26137,19760,26198,19680,26258,19599,26318,19519,26378,19438,26437,19357,26497,19276,26556,19194,26615,19113,26673,19031,26731,18949,26789,18867,26847,18785,26905,18702,26962,18620,27019,18537,27076,18454,27132,18371,27188,18287,27244,18204,27300,18120,27355,18036,27411,17952,27466,17868,27520,17784,27575,17699,27629,17615,27683,17530,27736,17445,27790,17360,27843,17274,27896,17189,27948,17103,28001,17017,28053,16931,28105,16845,28156,16759,28208,16672,28259,16586,28309,16499,28360,16412,28410,16325,28460,16238,28510,16150,28559,16063,28608,15975,28657,15887,28706,15799,28754,15711,28802,15623,28850,15534,28897,15446,28945,15357,28992,15268,29038,15179,29085,15090,29131,15001,29177,14911,29222,14822,29268,14732,29313,14642,29358,14552,29402,14462,29446,14372,29490,14281,29534,14191,29577,14100,29621,14009,29663,13918,29706,13827,29748,13736,29790,13645,29832,13553,29873,13462,29915,13370,29955,13278,29996,13186,30036,13094,30076,13002,30116,12909,30156,12817,30195,12724,30234,12632,30272,12539,30311,12446,30349,12353,30386,12260,30424,12166,30461,12073,30498,11980,30535,11886,30571,11792,30607,11698,30643,11604,30678,11510,30713,11416,30748,11322,30783,11227,30817,11133,30851,11038,30885,10944,30918,10849,30951,10754,30984,10659,31017,10564,31049,10469,31081,10373,31113,10278,31144,10182,31175,10087,31206,9991,31236,9895,31267,9799,31297,9703,31326,9607,31356,9511,31385,9415,31413,9319,31442,9222,31470,9126,31498,9029,31525,8932,31553,8836,31580,8739,31606,8642,31633,8545,31659,8448,31684,8351,31710,8253,31735,8156,31760,8059,31785,7961,31809,7864,31833,7766,31856,7668,31880,7571,31903,7473,31926,7375,31948,7277,31970,7179,31992,7081,32014,6982,32035,6884,32056,6786,32077,6688,32097,6589,32117,6491,32137,6392,32156,6293,32176,6195,32194,6096,32213,5997,32231,5898,32249,5799,32267,5700,32284,5601,32301,5502,32318,5403,32334,5304,32350,5205,32366,5106,32382,5006,32397,4907,32412,4807,32426,4708,32441,4608,32455,4509,32468,4409,32482,4310,32495,4210,32508,4110,32520,4011,32532,3911,32544,3811,32556,3711,32567,3611,32578,3511,32588,3411,32599,3311,32609,3211,32618,3111,32628,3011,32637,2911,32646,2811,32654,2711,32662,2610,32670,2510,32678,2410,32685,2310,32692,2209,32699,2109,32705,2009,32711,1908,32717,1808,32722,1708,32727,1607,32732,1507,32736,1406,32740,1306,32744,1206,32748,1105,32751,1005,32754,904,32757,804,32759,703,32761,603,32763,502,32764,402,32765,301,32766,201,32766,100,32767,0,32766,-101,32766,-202,32765,-302,32764,-403,32763,-503,32761,-604,32759,-704,32757,-805,32754,-905,32751,-1006,32748,-1106,32744,-1207,32740,-1307,32736,-1407,32732,-1508,32727,-1608,32722,-1709,32717,-1809,32711,-1909,32705,-2010,32699,-2110,32692,-2210,32685,-2311,32678,-2411,32670,-2511,32662,-2611,32654,-2712,32646,-2812,32637,-2912,32628,-3012,32618,-3112,32609,-3212,32599,-3312,32588,-3412,32578,-3512,32567,-3612,32556,-3712,32544,-3812,32532,-3912,32520,-4012,32508,-4111,32495,-4211,32482,-4311,32468,-4410,32455,-4510,32441,-4609,32426,-4709,32412,-4808,32397,-4908,32382,-5007,32366,-5107,32350,-5206,32334,-5305,32318,-5404,32301,-5503,32284,-5602,32267,-5701,32249,-5800,32231,-5899,32213,-5998,32194,-6097,32176,-6196,32156,-6294,32137,-6393,32117,-6492,32097,-6590,32077,-6689,32056,-6787,32035,-6885,32014,-6983,31992,-7082,31970,-7180,31948,-7278,31926,-7376,31903,-7474,31880,-7572,31856,-7669,31833,-7767,31809,-7865,31785,-7962,31760,-8060,31735,-8157,31710,-8254,31684,-8352,31659,-8449,31633,-8546,31606,-8643,31580,-8740,31553,-8837,31525,-8933,31498,-9030,31470,-9127,31442,-9223,31413,-9320,31385,-9416,31356,-9512,31326,-9608,31297,-9704,31267,-9800,31236,-9896,31206,-9992,31175,-10088,31144,-10183,31113,-10279,31081,-10374,31049,-10470,31017,-10565,30984,-10660,30951,-10755,30918,-10850,30885,-10945,30851,-11039,30817,-11134,30783,-11228,30748,-11323,30713,-11417,30678,-11511,30643,-11605,30607,-11699,30571,-11793,30535,-11887,30498,-11981,30461,-12074,30424,-12167,30386,-12261,30349,-12354,30311,-12447,30272,-12540,30234,-12633,30195,-12725,30156,-12818,30116,-12910,30076,-13003,30036,-13095,29996,-13187,29955,-13279,29915,-13371,29873,-13463,29832,-13554,29790,-13646,29748,-13737,29706,-13828,29663,-13919,29621,-14010,29577,-14101,29534,-14192,29490,-14282,29446,-14373,29402,-14463,29358,-14553,29313,-14643,29268,-14733,29222,-14823,29177,-14912,29131,-15002,29085,-15091,29038,-15180,28992,-15269,28945,-15358,28897,-15447,28850,-15535,28802,-15624,28754,-15712,28706,-15800,28657,-15888,28608,-15976,28559,-16064,28510,-16151,28460,-16239,28410,-16326,28360,-16413,28309,-16500,28259,-16587,28208,-16673,28156,-16760,28105,-16846,28053,-16932,28001,-17018,27948,-17104,27896,-17190,27843,-17275,27790,-17361,27736,-17446,27683,-17531,27629,-17616,27575,-17700,27520,-17785,27466,-17869,27411,-17953,27355,-18037,27300,-18121,27244,-18205,27188,-18288,27132,-18372,27076,-18455,27019,-18538,26962,-18621,26905,-18703,26847,-18786,26789,-18868,26731,-18950,26673,-19032,26615,-19114,26556,-19195,26497,-19277,26437,-19358,26378,-19439,26318,-19520,26258,-19600,26198,-19681,26137,-19761,26077,-19841,26016,-19921,25954,-20001,25893,-20080,25831,-20160,25769,-20239,25707,-20318,25645,-20397,25582,-20475,25519,-20554,25456,-20632,25392,-20710,25329,-20788,25265,-20865,25201,-20943,25136,-21020,25072,-21097,25007,-21174,24942,-21250,24877,-21327,24811,-21403,24745,-21479,24679,-21555,24613,-21630,24546,-21706,24480,-21781,24413,-21856,24346,-21931,24278,-22005,24211,-22080,24143,-22154,24075,-22228,24006,-22302,23938,-22375,23869,-22449,23800,-22522,23731,-22595,23661,-22667,23592,-22740,23522,-22812,23452,-22884,23382,-22956,23311,-23028,23240,-23099,23169,-23170,23098,-23241,23027,-23312,22955,-23383,22883,-23453,22811,-23523,22739,-23593,22666,-23662,22594,-23732,22521,-23801,22448,-23870,22374,-23939,22301,-24007,22227,-24076,22153,-24144,22079,-24212,22004,-24279,21930,-24347,21855,-24414,21780,-24481,21705,-24547,21629,-24614,21554,-24680,21478,-24746,21402,-24812,21326,-24878,21249,-24943,21173,-25008,21096,-25073,21019,-25137,20942,-25202,20864,-25266,20787,-25330,20709,-25393,20631,-25457,20553,-25520,20474,-25583,20396,-25646,20317,-25708,20238,-25770,20159,-25832,20079,-25894,20000,-25955,19920,-26017,19840,-26078,19760,-26138,19680,-26199,19599,-26259,19519,-26319,19438,-26379,19357,-26438,19276,-26498,19194,-26557,19113,-26616,19031,-26674,18949,-26732,18867,-26790,18785,-26848,18702,-26906,18620,-26963,18537,-27020,18454,-27077,18371,-27133,18287,-27189,18204,-27245,18120,-27301,18036,-27356,17952,-27412,17868,-27467,17784,-27521,17699,-27576,17615,-27630,17530,-27684,17445,-27737,17360,-27791,17274,-27844,17189,-27897,17103,-27949,17017,-28002,16931,-28054,16845,-28106,16759,-28157,16672,-28209,16586,-28260,16499,-28310,16412,-28361,16325,-28411,16238,-28461,16150,-28511,16063,-28560,15975,-28609,15887,-28658,15799,-28707,15711,-28755,15623,-28803,15534,-28851,15446,-28898,15357,-28946,15268,-28993,15179,-29039,15090,-29086,15001,-29132,14911,-29178,14822,-29223,14732,-29269,14642,-29314,14552,-29359,14462,-29403,14372,-29447,14281,-29491,14191,-29535,14100,-29578,14009,-29622,13918,-29664,13827,-29707,13736,-29749,13645,-29791,13553,-29833,13462,-29874,13370,-29916,13278,-29956,13186,-29997,13094,-30037,13002,-30077,12909,-30117,12817,-30157,12724,-30196,12632,-30235,12539,-30273,12446,-30312,12353,-30350,12260,-30387,12166,-30425,12073,-30462,11980,-30499,11886,-30536,11792,-30572,11698,-30608,11604,-30644,11510,-30679,11416,-30714,11322,-30749,11227,-30784,11133,-30818,11038,-30852,10944,-30886,10849,-30919,10754,-30952,10659,-30985,10564,-31018,10469,-31050,10373,-31082,10278,-31114,10182,-31145,10087,-31176,9991,-31207,9895,-31237,9799,-31268,9703,-31298,9607,-31327,9511,-31357,9415,-31386,9319,-31414,9222,-31443,9126,-31471,9029,-31499,8932,-31526,8836,-31554,8739,-31581,8642,-31607,8545,-31634,8448,-31660,8351,-31685,8253,-31711,8156,-31736,8059,-31761,7961,-31786,7864,-31810,7766,-31834,7668,-31857,7571,-31881,7473,-31904,7375,-31927,7277,-31949,7179,-31971,7081,-31993,6982,-32015,6884,-32036,6786,-32057,6688,-32078,6589,-32098,6491,-32118,6392,-32138,6293,-32157,6195,-32177,6096,-32195,5997,-32214,5898,-32232,5799,-32250,5700,-32268,5601,-32285,5502,-32302,5403,-32319,5304,-32335,5205,-32351,5106,-32367,5006,-32383,4907,-32398,4807,-32413,4708,-32427,4608,-32442,4509,-32456,4409,-32469,4310,-32483,4210,-32496,4110,-32509,4011,-32521,3911,-32533,3811,-32545,3711,-32557,3611,-32568,3511,-32579,3411,-32589,3311,-32600,3211,-32610,3111,-32619,3011,-32629,2911,-32638,2811,-32647,2711,-32655,2610,-32663,2510,-32671,2410,-32679,2310,-32686,2209,-32693,2109,-32700,2009,-32706,1908,-32712,1808,-32718,1708,-32723,1607,-32728,1507,-32733,1406,-32737,1306,-32741,1206,-32745,1105,-32749,1005,-32752,904,-32755,804,-32758,703,-32760,603,-32762,502,-32764,402,-32765,301,-32766,201,-32767,100,-32767,0,-32767,-101,-32767,-202,-32767,-302,-32766,-403,-32765,-503,-32764,-604,-32762,-704,-32760,-805,-32758,-905,-32755,-1006,-32752,-1106,-32749,-1207,-32745,-1307,-32741,-1407,-32737,-1508,-32733,-1608,-32728,-1709,-32723,-1809,-32718,-1909,-32712,-2010,-32706,-2110,-32700,-2210,-32693,-2311,-32686,-2411,-32679,-2511,-32671,-2611,-32663,-2712,-32655,-2812,-32647,-2912,-32638,-3012,-32629,-3112,-32619,-3212,-32610,-3312,-32600,-3412,-32589,-3512,-32579,-3612,-32568,-3712,-32557,-3812,-32545,-3912,-32533,-4012,-32521,-4111,-32509,-4211,-32496,-4311,-32483,-4410,-32469,-4510,-32456,-4609,-32442,-4709,-32427,-4808,-32413,-4908,-32398,-5007,-32383,-5107,-32367,-5206,-32351,-5305,-32335,-5404,-32319,-5503,-32302,-5602,-32285,-5701,-32268,-5800,-32250,-5899,-32232,-5998,-32214,-6097,-32195,-6196,-32177,-6294,-32157,-6393,-32138,-6492,-32118,-6590,-32098,-6689,-32078,-6787,-32057,-6885,-32036,-6983,-32015,-7082,-31993,-7180,-31971,-7278,-31949,-7376,-31927,-7474,-31904,-7572,-31881,-7669,-31857,-7767,-31834,-7865,-31810,-7962,-31786,-8060,-31761,-8157,-31736,-8254,-31711,-8352,-31685,-8449,-31660,-8546,-31634,-8643,-31607,-8740,-31581,-8837,-31554,-8933,-31526,-9030,-31499,-9127,-31471,-9223,-31443,-9320,-31414,-9416,-31386,-9512,-31357,-9608,-31327,-9704,-31298,-9800,-31268,-9896,-31237,-9992,-31207,-10088,-31176,-10183,-31145,-10279,-31114,-10374,-31082,-10470,-31050,-10565,-31018,-10660,-30985,-10755,-30952,-10850,-30919,-10945,-30886,-11039,-30852,-11134,-30818,-11228,-30784,-11323,-30749,-11417,-30714,-11511,-30679,-11605,-30644,-11699,-30608,-11793,-30572,-11887,-30536,-11981,-30499,-12074,-30462,-12167,-30425,-12261,-30387,-12354,-30350,-12447,-30312,-12540,-30273,-12633,-30235,-12725,-30196,-12818,-30157,-12910,-30117,-13003,-30077,-13095,-30037,-13187,-29997,-13279,-29956,-13371,-29916,-13463,-29874,-13554,-29833,-13646,-29791,-13737,-29749,-13828,-29707,-13919,-29664,-14010,-29622,-14101,-29578,-14192,-29535,-14282,-29491,-14373,-29447,-14463,-29403,-14553,-29359,-14643,-29314,-14733,-29269,-14823,-29223,-14912,-29178,-15002,-29132,-15091,-29086,-15180,-29039,-15269,-28993,-15358,-28946,-15447,-28898,-15535,-28851,-15624,-28803,-15712,-28755,-15800,-28707,-15888,-28658,-15976,-28609,-16064,-28560,-16151,-28511,-16239,-28461,-16326,-28411,-16413,-28361,-16500,-28310,-16587,-28260,-16673,-28209,-16760,-28157,-16846,-28106,-16932,-28054,-17018,-28002,-17104,-27949,-17190,-27897,-17275,-27844,-17361,-27791,-17446,-27737,-17531,-27684,-17616,-27630,-17700,-27576,-17785,-27521,-17869,-27467,-17953,-27412,-18037,-27356,-18121,-27301,-18205,-27245,-18288,-27189,-18372,-27133,-18455,-27077,-18538,-27020,-18621,-26963,-18703,-26906,-18786,-26848,-18868,-26790,-18950,-26732,-19032,-26674,-19114,-26616,-19195,-26557,-19277,-26498,-19358,-26438,-19439,-26379,-19520,-26319,-19600,-26259,-19681,-26199,-19761,-26138,-19841,-26078,-19921,-26017,-20001,-25955,-20080,-25894,-20160,-25832,-20239,-25770,-20318,-25708,-20397,-25646,-20475,-25583,-20554,-25520,-20632,-25457,-20710,-25393,-20788,-25330,-20865,-25266,-20943,-25202,-21020,-25137,-21097,-25073,-21174,-25008,-21250,-24943,-21327,-24878,-21403,-24812,-21479,-24746,-21555,-24680,-21630,-24614,-21706,-24547,-21781,-24481,-21856,-24414,-21931,-24347,-22005,-24279,-22080,-24212,-22154,-24144,-22228,-24076,-22302,-24007,-22375,-23939,-22449,-23870,-22522,-23801,-22595,-23732,-22667,-23662,-22740,-23593,-22812,-23523,-22884,-23453,-22956,-23383,-23028,-23312,-23099,-23241,-23170,-23170,-23241,-23099,-23312,-23028,-23383,-22956,-23453,-22884,-23523,-22812,-23593,-22740,-23662,-22667,-23732,-22595,-23801,-22522,-23870,-22449,-23939,-22375,-24007,-22302,-24076,-22228,-24144,-22154,-24212,-22080,-24279,-22005,-24347,-21931,-24414,-21856,-24481,-21781,-24547,-21706,-24614,-21630,-24680,-21555,-24746,-21479,-24812,-21403,-24878,-21327,-24943,-21250,-25008,-21174,-25073,-21097,-25137,-21020,-25202,-20943,-25266,-20865,-25330,-20788,-25393,-20710,-25457,-20632,-25520,-20554,-25583,-20475,-25646,-20397,-25708,-20318,-25770,-20239,-25832,-20160,-25894,-20080,-25955,-20001,-26017,-19921,-26078,-19841,-26138,-19761,-26199,-19681,-26259,-19600,-26319,-19520,-26379,-19439,-26438,-19358,-26498,-19277,-26557,-19195,-26616,-19114,-26674,-19032,-26732,-18950,-26790,-18868,-26848,-18786,-26906,-18703,-26963,-18621,-27020,-18538,-27077,-18455,-27133,-18372,-27189,-18288,-27245,-18205,-27301,-18121,-27356,-18037,-27412,-17953,-27467,-17869,-27521,-17785,-27576,-17700,-27630,-17616,-27684,-17531,-27737,-17446,-27791,-17361,-27844,-17275,-27897,-17190,-27949,-17104,-28002,-17018,-28054,-16932,-28106,-16846,-28157,-16760,-28209,-16673,-28260,-16587,-28310,-16500,-28361,-16413,-28411,-16326,-28461,-16239,-28511,-16151,-28560,-16064,-28609,-15976,-28658,-15888,-28707,-15800,-28755,-15712,-28803,-15624,-28851,-15535,-28898,-15447,-28946,-15358,-28993,-15269,-29039,-15180,-29086,-15091,-29132,-15002,-29178,-14912,-29223,-14823,-29269,-14733,-29314,-14643,-29359,-14553,-29403,-14463,-29447,-14373,-29491,-14282,-29535,-14192,-29578,-14101,-29622,-14010,-29664,-13919,-29707,-13828,-29749,-13737,-29791,-13646,-29833,-13554,-29874,-13463,-29916,-13371,-29956,-13279,-29997,-13187,-30037,-13095,-30077,-13003,-30117,-12910,-30157,-12818,-30196,-12725,-30235,-12633,-30273,-12540,-30312,-12447,-30350,-12354,-30387,-12261,-30425,-12167,-30462,-12074,-30499,-11981,-30536,-11887,-30572,-11793,-30608,-11699,-30644,-11605,-30679,-11511,-30714,-11417,-30749,-11323,-30784,-11228,-30818,-11134,-30852,-11039,-30886,-10945,-30919,-10850,-30952,-10755,-30985,-10660,-31018,-10565,-31050,-10470,-31082,-10374,-31114,-10279,-31145,-10183,-31176,-10088,-31207,-9992,-31237,-9896,-31268,-9800,-31298,-9704,-31327,-9608,-31357,-9512,-31386,-9416,-31414,-9320,-31443,-9223,-31471,-9127,-31499,-9030,-31526,-8933,-31554,-8837,-31581,-8740,-31607,-8643,-31634,-8546,-31660,-8449,-31685,-8352,-31711,-8254,-31736,-8157,-31761,-8060,-31786,-7962,-31810,-7865,-31834,-7767,-31857,-7669,-31881,-7572,-31904,-7474,-31927,-7376,-31949,-7278,-31971,-7180,-31993,-7082,-32015,-6983,-32036,-6885,-32057,-6787,-32078,-6689,-32098,-6590,-32118,-6492,-32138,-6393,-32157,-6294,-32177,-6196,-32195,-6097,-32214,-5998,-32232,-5899,-32250,-5800,-32268,-5701,-32285,-5602,-32302,-5503,-32319,-5404,-32335,-5305,-32351,-5206,-32367,-5107,-32383,-5007,-32398,-4908,-32413,-4808,-32427,-4709,-32442,-4609,-32456,-4510,-32469,-4410,-32483,-4311,-32496,-4211,-32509,-4111,-32521,-4012,-32533,-3912,-32545,-3812,-32557,-3712,-32568,-3612,-32579,-3512,-32589,-3412,-32600,-3312,-32610,-3212,-32619,-3112,-32629,-3012,-32638,-2912,-32647,-2812,-32655,-2712,-32663,-2611,-32671,-2511,-32679,-2411,-32686,-2311,-32693,-2210,-32700,-2110,-32706,-2010,-32712,-1909,-32718,-1809,-32723,-1709,-32728,-1608,-32733,-1508,-32737,-1407,-32741,-1307,-32745,-1207,-32749,-1106,-32752,-1006,-32755,-905,-32758,-805,-32760,-704,-32762,-604,-32764,-503,-32765,-403,-32766,-302,-32767,-202,-32767,-101}; - -int16_t s75n_kHz_7_5[23040]__attribute__((aligned(16))) = {31785,7961,31801,7896,31817,7831,31833,7766,31849,7701,31864,7636,31880,7571,31895,7505,31911,7440,31926,7375,31941,7310,31956,7244,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68}; - -int16_t s75e_kHz_7_5[23040]__attribute__((aligned(16))) = {23169,23169,23217,23122,23264,23074,23311,23027,23358,22979,23405,22931,23452,22883,23499,22835,23545,22787,23592,22739,23638,22691,23685,22642,23731,22594,23777,22545,23823,22496,23869,22448,23915,22399,23961,22350,24006,22301,24052,22252,24097,22202,24143,22153,24188,22104,24233,22054,24278,22004,24323,21955,24368,21905,24413,21855,24457,21805,24502,21755,24546,21705,24591,21655,24635,21604,24679,21554,24723,21503,24767,21453,24811,21402,24855,21351,24898,21300,24942,21249,24985,21198,25029,21147,25072,21096,25115,21045,25158,20993,25201,20942,25243,20890,25286,20838,25329,20787,25371,20735,25414,20683,25456,20631,25498,20579,25540,20527,25582,20474,25624,20422,25665,20369,25707,20317,25749,20264,25790,20212,25831,20159,25872,20106,25913,20053,25954,20000,25995,19947,26036,19894,26077,19840,26117,19787,26158,19733,26198,19680,26238,19626,26278,19573,26318,19519,26358,19465,26398,19411,26437,19357,26477,19303,26516,19249,26556,19194,26595,19140,26634,19086,26673,19031,26712,18976,26751,18922,26789,18867,26828,18812,26866,18757,26905,18702,26943,18647,26981,18592,27019,18537,27057,18482,27094,18426,27132,18371,27170,18315,27207,18260,27244,18204,27281,18148,27319,18092,27355,18036,27392,17980,27429,17924,27466,17868,27502,17812,27538,17756,27575,17699,27611,17643,27647,17586,27683,17530,27719,17473,27754,17416,27790,17360,27825,17303,27861,17246,27896,17189,27931,17132,27966,17074,28001,17017,28036,16960,28070,16903,28105,16845,28139,16788,28173,16730,28208,16672,28242,16615,28275,16557,28309,16499,28343,16441,28377,16383,28410,16325,28443,16267,28477,16209,28510,16150,28543,16092,28575,16034,28608,15975,28641,15917,28673,15858,28706,15799,28738,15740,28770,15682,28802,15623,28834,15564,28866,15505,28897,15446,28929,15387,28960,15327,28992,15268,29023,15209,29054,15149,29085,15090,29116,15030,29146,14971,29177,14911,29207,14852,29238,14792,29268,14732,29298,14672,29328,14612,29358,14552,29387,14492,29417,14432,29446,14372,29476,14311,29505,14251,29534,14191,29563,14130,29592,14070,29621,14009,29649,13949,29678,13888,29706,13827,29734,13766,29762,13706,29790,13645,29818,13584,29846,13523,29873,13462,29901,13400,29928,13339,29955,13278,29983,13217,30009,13155,30036,13094,30063,13033,30090,12971,30116,12909,30142,12848,30169,12786,30195,12724,30221,12663,30247,12601,30272,12539,30298,12477,30323,12415,30349,12353,30374,12291,30399,12229,30424,12166,30449,12104,30473,12042,30498,11980,30522,11917,30547,11855,30571,11792,30595,11730,30619,11667,30643,11604,30666,11542,30690,11479,30713,11416,30737,11353,30760,11290,30783,11227,30806,11164,30828,11101,30851,11038,30874,10975,30896,10912,30918,10849,30940,10786,30962,10722,30984,10659,31006,10596,31028,10532,31049,10469,31070,10405,31092,10342,31113,10278,31134,10214,31154,10151,31175,10087,31196,10023,31216,9959,31236,9895,31257,9831,31277,9767,31297,9703,31316,9639,31336,9575,31356,9511,31375,9447,31394,9383,31413,9319,31432,9254,31451,9190,31470,9126,31489,9061,31507,8997,31525,8932,31544,8868,31562,8803,31580,8739,31597,8674,31615,8610,31633,8545,31650,8480,31667,8415,31684,8351,31701,8286,31718,8221,31735,8156,31752,8091,31768,8026,31785,7961,31801,7896,31817,7831,31833,7766,31849,7701,31864,7636,31880,7571,31895,7505,31911,7440,31926,7375,31941,7310,31956,7244,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,23169,23169,23217,23122,23264,23074,23311,23027,23358,22979,23405,22931,23452,22883,23499,22835,23545,22787,23592,22739,23638,22691,23685,22642,23731,22594,23777,22545,23823,22496,23869,22448,23915,22399,23961,22350,24006,22301,24052,22252,24097,22202,24143,22153,24188,22104,24233,22054,24278,22004,24323,21955,24368,21905,24413,21855,24457,21805,24502,21755,24546,21705,24591,21655,24635,21604,24679,21554,24723,21503,24767,21453,24811,21402,24855,21351,24898,21300,24942,21249,24985,21198,25029,21147,25072,21096,25115,21045,25158,20993,25201,20942,25243,20890,25286,20838,25329,20787,25371,20735,25414,20683,25456,20631,25498,20579,25540,20527,25582,20474,25624,20422,25665,20369,25707,20317,25749,20264,25790,20212,25831,20159,25872,20106,25913,20053,25954,20000,25995,19947,26036,19894,26077,19840,26117,19787,26158,19733,26198,19680,26238,19626,26278,19573,26318,19519,26358,19465,26398,19411,26437,19357,26477,19303,26516,19249,26556,19194,26595,19140,26634,19086,26673,19031,26712,18976,26751,18922,26789,18867,26828,18812,26866,18757,26905,18702,26943,18647,26981,18592,27019,18537,27057,18482,27094,18426,27132,18371,27170,18315,27207,18260,27244,18204,27281,18148,27319,18092,27355,18036,27392,17980,27429,17924,27466,17868,27502,17812,27538,17756,27575,17699,27611,17643,27647,17586,27683,17530,27719,17473,27754,17416,27790,17360,27825,17303,27861,17246,27896,17189,27931,17132,27966,17074,28001,17017,28036,16960,28070,16903,28105,16845,28139,16788,28173,16730,28208,16672,28242,16615,28275,16557,28309,16499,28343,16441,28377,16383,28410,16325,28443,16267,28477,16209,28510,16150,28543,16092,28575,16034,28608,15975,28641,15917,28673,15858,28706,15799,28738,15740,28770,15682,28802,15623,28834,15564,28866,15505,28897,15446,28929,15387,28960,15327,28992,15268,29023,15209,29054,15149,29085,15090,29116,15030,29146,14971,29177,14911,29207,14852,29238,14792,29268,14732,29298,14672,29328,14612,29358,14552,29387,14492,29417,14432,29446,14372,29476,14311,29505,14251,29534,14191,29563,14130,29592,14070,29621,14009,29649,13949,29678,13888,29706,13827,29734,13766,29762,13706,29790,13645,29818,13584,29846,13523,29873,13462,29901,13400,29928,13339,29955,13278,29983,13217,30009,13155,30036,13094,30063,13033,30090,12971,30116,12909,30142,12848,30169,12786,30195,12724,30221,12663,30247,12601,30272,12539,30298,12477,30323,12415,30349,12353,30374,12291,30399,12229,30424,12166,30449,12104,30473,12042,30498,11980,30522,11917,30547,11855,30571,11792,30595,11730,30619,11667,30643,11604,30666,11542,30690,11479,30713,11416,30737,11353,30760,11290,30783,11227,30806,11164,30828,11101,30851,11038,30874,10975,30896,10912,30918,10849,30940,10786,30962,10722,30984,10659,31006,10596,31028,10532,31049,10469,31070,10405,31092,10342,31113,10278,31134,10214,31154,10151,31175,10087,31196,10023,31216,9959,31236,9895,31257,9831,31277,9767,31297,9703,31316,9639,31336,9575,31356,9511,31375,9447,31394,9383,31413,9319,31432,9254,31451,9190,31470,9126,31489,9061,31507,8997,31525,8932,31544,8868,31562,8803,31580,8739,31597,8674,31615,8610,31633,8545,31650,8480,31667,8415,31684,8351,31701,8286,31718,8221,31735,8156,31752,8091,31768,8026,31785,7961,31801,7896,31817,7831,31833,7766,31849,7701,31864,7636,31880,7571,31895,7505,31911,7440,31926,7375,31941,7310,31956,7244,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,23169,23169,23217,23122,23264,23074,23311,23027,23358,22979,23405,22931,23452,22883,23499,22835,23545,22787,23592,22739,23638,22691,23685,22642,23731,22594,23777,22545,23823,22496,23869,22448,23915,22399,23961,22350,24006,22301,24052,22252,24097,22202,24143,22153,24188,22104,24233,22054,24278,22004,24323,21955,24368,21905,24413,21855,24457,21805,24502,21755,24546,21705,24591,21655,24635,21604,24679,21554,24723,21503,24767,21453,24811,21402,24855,21351,24898,21300,24942,21249,24985,21198,25029,21147,25072,21096,25115,21045,25158,20993,25201,20942,25243,20890,25286,20838,25329,20787,25371,20735,25414,20683,25456,20631,25498,20579,25540,20527,25582,20474,25624,20422,25665,20369,25707,20317,25749,20264,25790,20212,25831,20159,25872,20106,25913,20053,25954,20000,25995,19947,26036,19894,26077,19840,26117,19787,26158,19733,26198,19680,26238,19626,26278,19573,26318,19519,26358,19465,26398,19411,26437,19357,26477,19303,26516,19249,26556,19194,26595,19140,26634,19086,26673,19031,26712,18976,26751,18922,26789,18867,26828,18812,26866,18757,26905,18702,26943,18647,26981,18592,27019,18537,27057,18482,27094,18426,27132,18371,27170,18315,27207,18260,27244,18204,27281,18148,27319,18092,27355,18036,27392,17980,27429,17924,27466,17868,27502,17812,27538,17756,27575,17699,27611,17643,27647,17586,27683,17530,27719,17473,27754,17416,27790,17360,27825,17303,27861,17246,27896,17189,27931,17132,27966,17074,28001,17017,28036,16960,28070,16903,28105,16845,28139,16788,28173,16730,28208,16672,28242,16615,28275,16557,28309,16499,28343,16441,28377,16383,28410,16325,28443,16267,28477,16209,28510,16150,28543,16092,28575,16034,28608,15975,28641,15917,28673,15858,28706,15799,28738,15740,28770,15682,28802,15623,28834,15564,28866,15505,28897,15446,28929,15387,28960,15327,28992,15268,29023,15209,29054,15149,29085,15090,29116,15030,29146,14971,29177,14911,29207,14852,29238,14792,29268,14732,29298,14672,29328,14612,29358,14552,29387,14492,29417,14432,29446,14372,29476,14311,29505,14251,29534,14191,29563,14130,29592,14070,29621,14009,29649,13949,29678,13888,29706,13827,29734,13766,29762,13706,29790,13645,29818,13584,29846,13523,29873,13462,29901,13400,29928,13339,29955,13278,29983,13217,30009,13155,30036,13094,30063,13033,30090,12971,30116,12909,30142,12848,30169,12786,30195,12724,30221,12663,30247,12601,30272,12539,30298,12477,30323,12415,30349,12353,30374,12291,30399,12229,30424,12166,30449,12104,30473,12042,30498,11980,30522,11917,30547,11855,30571,11792,30595,11730,30619,11667,30643,11604,30666,11542,30690,11479,30713,11416,30737,11353,30760,11290,30783,11227,30806,11164,30828,11101,30851,11038,30874,10975,30896,10912,30918,10849,30940,10786,30962,10722,30984,10659,31006,10596,31028,10532,31049,10469,31070,10405,31092,10342,31113,10278,31134,10214,31154,10151,31175,10087,31196,10023,31216,9959,31236,9895,31257,9831,31277,9767,31297,9703,31316,9639,31336,9575,31356,9511,31375,9447,31394,9383,31413,9319,31432,9254,31451,9190,31470,9126,31489,9061,31507,8997,31525,8932,31544,8868,31562,8803,31580,8739,31597,8674,31615,8610,31633,8545,31650,8480,31667,8415,31684,8351,31701,8286,31718,8221,31735,8156,31752,8091,31768,8026,31785,7961,31801,7896,31817,7831,31833,7766,31849,7701,31864,7636,31880,7571,31895,7505,31911,7440,31926,7375,31941,7310,31956,7244,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,23169,23169,23217,23122,23264,23074,23311,23027,23358,22979,23405,22931,23452,22883,23499,22835,23545,22787,23592,22739,23638,22691,23685,22642,23731,22594,23777,22545,23823,22496,23869,22448,23915,22399,23961,22350,24006,22301,24052,22252,24097,22202,24143,22153,24188,22104,24233,22054,24278,22004,24323,21955,24368,21905,24413,21855,24457,21805,24502,21755,24546,21705,24591,21655,24635,21604,24679,21554,24723,21503,24767,21453,24811,21402,24855,21351,24898,21300,24942,21249,24985,21198,25029,21147,25072,21096,25115,21045,25158,20993,25201,20942,25243,20890,25286,20838,25329,20787,25371,20735,25414,20683,25456,20631,25498,20579,25540,20527,25582,20474,25624,20422,25665,20369,25707,20317,25749,20264,25790,20212,25831,20159,25872,20106,25913,20053,25954,20000,25995,19947,26036,19894,26077,19840,26117,19787,26158,19733,26198,19680,26238,19626,26278,19573,26318,19519,26358,19465,26398,19411,26437,19357,26477,19303,26516,19249,26556,19194,26595,19140,26634,19086,26673,19031,26712,18976,26751,18922,26789,18867,26828,18812,26866,18757,26905,18702,26943,18647,26981,18592,27019,18537,27057,18482,27094,18426,27132,18371,27170,18315,27207,18260,27244,18204,27281,18148,27319,18092,27355,18036,27392,17980,27429,17924,27466,17868,27502,17812,27538,17756,27575,17699,27611,17643,27647,17586,27683,17530,27719,17473,27754,17416,27790,17360,27825,17303,27861,17246,27896,17189,27931,17132,27966,17074,28001,17017,28036,16960,28070,16903,28105,16845,28139,16788,28173,16730,28208,16672,28242,16615,28275,16557,28309,16499,28343,16441,28377,16383,28410,16325,28443,16267,28477,16209,28510,16150,28543,16092,28575,16034,28608,15975,28641,15917,28673,15858,28706,15799,28738,15740,28770,15682,28802,15623,28834,15564,28866,15505,28897,15446,28929,15387,28960,15327,28992,15268,29023,15209,29054,15149,29085,15090,29116,15030,29146,14971,29177,14911,29207,14852,29238,14792,29268,14732,29298,14672,29328,14612,29358,14552,29387,14492,29417,14432,29446,14372,29476,14311,29505,14251,29534,14191,29563,14130,29592,14070,29621,14009,29649,13949,29678,13888,29706,13827,29734,13766,29762,13706,29790,13645,29818,13584,29846,13523,29873,13462,29901,13400,29928,13339,29955,13278,29983,13217,30009,13155,30036,13094,30063,13033,30090,12971,30116,12909,30142,12848,30169,12786,30195,12724,30221,12663,30247,12601,30272,12539,30298,12477,30323,12415,30349,12353,30374,12291,30399,12229,30424,12166,30449,12104,30473,12042,30498,11980,30522,11917,30547,11855,30571,11792,30595,11730,30619,11667,30643,11604,30666,11542,30690,11479,30713,11416,30737,11353,30760,11290,30783,11227,30806,11164,30828,11101,30851,11038,30874,10975,30896,10912,30918,10849,30940,10786,30962,10722,30984,10659,31006,10596,31028,10532,31049,10469,31070,10405,31092,10342,31113,10278,31134,10214,31154,10151,31175,10087,31196,10023,31216,9959,31236,9895,31257,9831,31277,9767,31297,9703,31316,9639,31336,9575,31356,9511,31375,9447,31394,9383,31413,9319,31432,9254,31451,9190,31470,9126,31489,9061,31507,8997,31525,8932,31544,8868,31562,8803,31580,8739,31597,8674,31615,8610,31633,8545,31650,8480,31667,8415,31684,8351,31701,8286,31718,8221,31735,8156,31752,8091,31768,8026,31785,7961,31801,7896,31817,7831,31833,7766,31849,7701,31864,7636,31880,7571,31895,7505,31911,7440,31926,7375,31941,7310,31956,7244,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,23169,23169,23217,23122,23264,23074,23311,23027,23358,22979,23405,22931,23452,22883,23499,22835,23545,22787,23592,22739,23638,22691,23685,22642,23731,22594,23777,22545,23823,22496,23869,22448,23915,22399,23961,22350,24006,22301,24052,22252,24097,22202,24143,22153,24188,22104,24233,22054,24278,22004,24323,21955,24368,21905,24413,21855,24457,21805,24502,21755,24546,21705,24591,21655,24635,21604,24679,21554,24723,21503,24767,21453,24811,21402,24855,21351,24898,21300,24942,21249,24985,21198,25029,21147,25072,21096,25115,21045,25158,20993,25201,20942,25243,20890,25286,20838,25329,20787,25371,20735,25414,20683,25456,20631,25498,20579,25540,20527,25582,20474,25624,20422,25665,20369,25707,20317,25749,20264,25790,20212,25831,20159,25872,20106,25913,20053,25954,20000,25995,19947,26036,19894,26077,19840,26117,19787,26158,19733,26198,19680,26238,19626,26278,19573,26318,19519,26358,19465,26398,19411,26437,19357,26477,19303,26516,19249,26556,19194,26595,19140,26634,19086,26673,19031,26712,18976,26751,18922,26789,18867,26828,18812,26866,18757,26905,18702,26943,18647,26981,18592,27019,18537,27057,18482,27094,18426,27132,18371,27170,18315,27207,18260,27244,18204,27281,18148,27319,18092,27355,18036,27392,17980,27429,17924,27466,17868,27502,17812,27538,17756,27575,17699,27611,17643,27647,17586,27683,17530,27719,17473,27754,17416,27790,17360,27825,17303,27861,17246,27896,17189,27931,17132,27966,17074,28001,17017,28036,16960,28070,16903,28105,16845,28139,16788,28173,16730,28208,16672,28242,16615,28275,16557,28309,16499,28343,16441,28377,16383,28410,16325,28443,16267,28477,16209,28510,16150,28543,16092,28575,16034,28608,15975,28641,15917,28673,15858,28706,15799,28738,15740,28770,15682,28802,15623,28834,15564,28866,15505,28897,15446,28929,15387,28960,15327,28992,15268,29023,15209,29054,15149,29085,15090,29116,15030,29146,14971,29177,14911,29207,14852,29238,14792,29268,14732,29298,14672,29328,14612,29358,14552,29387,14492,29417,14432,29446,14372,29476,14311,29505,14251,29534,14191,29563,14130,29592,14070,29621,14009,29649,13949,29678,13888,29706,13827,29734,13766,29762,13706,29790,13645,29818,13584,29846,13523,29873,13462,29901,13400,29928,13339,29955,13278,29983,13217,30009,13155,30036,13094,30063,13033,30090,12971,30116,12909,30142,12848,30169,12786,30195,12724,30221,12663,30247,12601,30272,12539,30298,12477,30323,12415,30349,12353,30374,12291,30399,12229,30424,12166,30449,12104,30473,12042,30498,11980,30522,11917,30547,11855,30571,11792,30595,11730,30619,11667,30643,11604,30666,11542,30690,11479,30713,11416,30737,11353,30760,11290,30783,11227,30806,11164,30828,11101,30851,11038,30874,10975,30896,10912,30918,10849,30940,10786,30962,10722,30984,10659,31006,10596,31028,10532,31049,10469,31070,10405,31092,10342,31113,10278,31134,10214,31154,10151,31175,10087,31196,10023,31216,9959,31236,9895,31257,9831,31277,9767,31297,9703,31316,9639,31336,9575,31356,9511,31375,9447,31394,9383,31413,9319,31432,9254,31451,9190,31470,9126,31489,9061,31507,8997,31525,8932,31544,8868,31562,8803,31580,8739,31597,8674,31615,8610,31633,8545,31650,8480,31667,8415,31684,8351,31701,8286,31718,8221,31735,8156,31752,8091,31768,8026,31785,7961,31801,7896,31817,7831,31833,7766,31849,7701,31864,7636,31880,7571,31895,7505,31911,7440,31926,7375,31941,7310,31956,7244,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68,23169,23169,23217,23122,23264,23074,23311,23027,23358,22979,23405,22931,23452,22883,23499,22835,23545,22787,23592,22739,23638,22691,23685,22642,23731,22594,23777,22545,23823,22496,23869,22448,23915,22399,23961,22350,24006,22301,24052,22252,24097,22202,24143,22153,24188,22104,24233,22054,24278,22004,24323,21955,24368,21905,24413,21855,24457,21805,24502,21755,24546,21705,24591,21655,24635,21604,24679,21554,24723,21503,24767,21453,24811,21402,24855,21351,24898,21300,24942,21249,24985,21198,25029,21147,25072,21096,25115,21045,25158,20993,25201,20942,25243,20890,25286,20838,25329,20787,25371,20735,25414,20683,25456,20631,25498,20579,25540,20527,25582,20474,25624,20422,25665,20369,25707,20317,25749,20264,25790,20212,25831,20159,25872,20106,25913,20053,25954,20000,25995,19947,26036,19894,26077,19840,26117,19787,26158,19733,26198,19680,26238,19626,26278,19573,26318,19519,26358,19465,26398,19411,26437,19357,26477,19303,26516,19249,26556,19194,26595,19140,26634,19086,26673,19031,26712,18976,26751,18922,26789,18867,26828,18812,26866,18757,26905,18702,26943,18647,26981,18592,27019,18537,27057,18482,27094,18426,27132,18371,27170,18315,27207,18260,27244,18204,27281,18148,27319,18092,27355,18036,27392,17980,27429,17924,27466,17868,27502,17812,27538,17756,27575,17699,27611,17643,27647,17586,27683,17530,27719,17473,27754,17416,27790,17360,27825,17303,27861,17246,27896,17189,27931,17132,27966,17074,28001,17017,28036,16960,28070,16903,28105,16845,28139,16788,28173,16730,28208,16672,28242,16615,28275,16557,28309,16499,28343,16441,28377,16383,28410,16325,28443,16267,28477,16209,28510,16150,28543,16092,28575,16034,28608,15975,28641,15917,28673,15858,28706,15799,28738,15740,28770,15682,28802,15623,28834,15564,28866,15505,28897,15446,28929,15387,28960,15327,28992,15268,29023,15209,29054,15149,29085,15090,29116,15030,29146,14971,29177,14911,29207,14852,29238,14792,29268,14732,29298,14672,29328,14612,29358,14552,29387,14492,29417,14432,29446,14372,29476,14311,29505,14251,29534,14191,29563,14130,29592,14070,29621,14009,29649,13949,29678,13888,29706,13827,29734,13766,29762,13706,29790,13645,29818,13584,29846,13523,29873,13462,29901,13400,29928,13339,29955,13278,29983,13217,30009,13155,30036,13094,30063,13033,30090,12971,30116,12909,30142,12848,30169,12786,30195,12724,30221,12663,30247,12601,30272,12539,30298,12477,30323,12415,30349,12353,30374,12291,30399,12229,30424,12166,30449,12104,30473,12042,30498,11980,30522,11917,30547,11855,30571,11792,30595,11730,30619,11667,30643,11604,30666,11542,30690,11479,30713,11416,30737,11353,30760,11290,30783,11227,30806,11164,30828,11101,30851,11038,30874,10975,30896,10912,30918,10849,30940,10786,30962,10722,30984,10659,31006,10596,31028,10532,31049,10469,31070,10405,31092,10342,31113,10278,31134,10214,31154,10151,31175,10087,31196,10023,31216,9959,31236,9895,31257,9831,31277,9767,31297,9703,31316,9639,31336,9575,31356,9511,31375,9447,31394,9383,31413,9319,31432,9254,31451,9190,31470,9126,31489,9061,31507,8997,31525,8932,31544,8868,31562,8803,31580,8739,31597,8674,31615,8610,31633,8545,31650,8480,31667,8415,31684,8351,31701,8286,31718,8221,31735,8156,31752,8091,31768,8026,31785,7961,31801,7896,31817,7831,31833,7766,31849,7701,31864,7636,31880,7571,31895,7505,31911,7440,31926,7375,31941,7310,31956,7244,31970,7179,31985,7113,31999,7048,32014,6982,32028,6917,32042,6851,32056,6786,32070,6720,32084,6655,32097,6589,32110,6523,32124,6458,32137,6392,32150,6326,32163,6261,32176,6195,32188,6129,32201,6063,32213,5997,32225,5931,32237,5865,32249,5799,32261,5733,32273,5667,32284,5601,32295,5535,32307,5469,32318,5403,32329,5337,32340,5271,32350,5205,32361,5139,32371,5072,32382,5006,32392,4940,32402,4874,32412,4807,32422,4741,32431,4675,32441,4608,32450,4542,32459,4476,32468,4409,32477,4343,32486,4276,32495,4210,32503,4144,32512,4077,32520,4011,32528,3944,32536,3877,32544,3811,32552,3744,32559,3678,32567,3611,32574,3545,32581,3478,32588,3411,32595,3345,32602,3278,32609,3211,32615,3145,32622,3078,32628,3011,32634,2944,32640,2878,32646,2811,32651,2744,32657,2677,32662,2610,32668,2544,32673,2477,32678,2410,32683,2343,32687,2276,32692,2209,32696,2143,32701,2076,32705,2009,32709,1942,32713,1875,32717,1808,32720,1741,32724,1674,32727,1607,32730,1540,32733,1473,32736,1406,32739,1339,32742,1273,32744,1206,32747,1139,32749,1072,32751,1005,32753,938,32755,871,32757,804,32758,737,32760,670,32761,603,32762,536,32763,469,32764,402,32765,335,32765,268,32766,201,32766,134,32766,67,32767,0,32766,-68,32766,-135,32766,-202,32765,-269,32765,-336,32764,-403,32763,-470,32762,-537,32761,-604,32760,-671,32758,-738,32757,-805,32755,-872,32753,-939,32751,-1006,32749,-1073,32747,-1140,32744,-1207,32742,-1274,32739,-1340,32736,-1407,32733,-1474,32730,-1541,32727,-1608,32724,-1675,32720,-1742,32717,-1809,32713,-1876,32709,-1943,32705,-2010,32701,-2077,32696,-2144,32692,-2210,32687,-2277,32683,-2344,32678,-2411,32673,-2478,32668,-2545,32662,-2611,32657,-2678,32651,-2745,32646,-2812,32640,-2879,32634,-2945,32628,-3012,32622,-3079,32615,-3146,32609,-3212,32602,-3279,32595,-3346,32588,-3412,32581,-3479,32574,-3546,32567,-3612,32559,-3679,32552,-3745,32544,-3812,32536,-3878,32528,-3945,32520,-4012,32512,-4078,32503,-4145,32495,-4211,32486,-4277,32477,-4344,32468,-4410,32459,-4477,32450,-4543,32441,-4609,32431,-4676,32422,-4742,32412,-4808,32402,-4875,32392,-4941,32382,-5007,32371,-5073,32361,-5140,32350,-5206,32340,-5272,32329,-5338,32318,-5404,32307,-5470,32295,-5536,32284,-5602,32273,-5668,32261,-5734,32249,-5800,32237,-5866,32225,-5932,32213,-5998,32201,-6064,32188,-6130,32176,-6196,32163,-6262,32150,-6327,32137,-6393,32124,-6459,32110,-6524,32097,-6590,32084,-6656,32070,-6721,32056,-6787,32042,-6852,32028,-6918,32014,-6983,31999,-7049,31985,-7114,31970,-7180,31956,-7245,31941,-7311,31926,-7376,31911,-7441,31895,-7506,31880,-7572,31864,-7637,31849,-7702,31833,-7767,31817,-7832,31801,-7897,31785,-7962,31768,-8027,31752,-8092,31735,-8157,31718,-8222,31701,-8287,31684,-8352,31667,-8416,31650,-8481,31633,-8546,31615,-8611,31597,-8675,31580,-8740,31562,-8804,31544,-8869,31525,-8933,31507,-8998,31489,-9062,31470,-9127,31451,-9191,31432,-9255,31413,-9320,31394,-9384,31375,-9448,31356,-9512,31336,-9576,31316,-9640,31297,-9704,31277,-9768,31257,-9832,31236,-9896,31216,-9960,31196,-10024,31175,-10088,31154,-10152,31134,-10215,31113,-10279,31092,-10343,31070,-10406,31049,-10470,31028,-10533,31006,-10597,30984,-10660,30962,-10723,30940,-10787,30918,-10850,30896,-10913,30874,-10976,30851,-11039,30828,-11102,30806,-11165,30783,-11228,30760,-11291,30737,-11354,30713,-11417,30690,-11480,30666,-11543,30643,-11605,30619,-11668,30595,-11731,30571,-11793,30547,-11856,30522,-11918,30498,-11981,30473,-12043,30449,-12105,30424,-12167,30399,-12230,30374,-12292,30349,-12354,30323,-12416,30298,-12478,30272,-12540,30247,-12602,30221,-12664,30195,-12725,30169,-12787,30142,-12849,30116,-12910,30090,-12972,30063,-13034,30036,-13095,30009,-13156,29983,-13218,29955,-13279,29928,-13340,29901,-13401,29873,-13463,29846,-13524,29818,-13585,29790,-13646,29762,-13707,29734,-13767,29706,-13828,29678,-13889,29649,-13950,29621,-14010,29592,-14071,29563,-14131,29534,-14192,29505,-14252,29476,-14312,29446,-14373,29417,-14433,29387,-14493,29358,-14553,29328,-14613,29298,-14673,29268,-14733,29238,-14793,29207,-14853,29177,-14912,29146,-14972,29116,-15031,29085,-15091,29054,-15150,29023,-15210,28992,-15269,28960,-15328,28929,-15388,28897,-15447,28866,-15506,28834,-15565,28802,-15624,28770,-15683,28738,-15741,28706,-15800,28673,-15859,28641,-15918,28608,-15976,28575,-16035,28543,-16093,28510,-16151,28477,-16210,28443,-16268,28410,-16326,28377,-16384,28343,-16442,28309,-16500,28275,-16558,28242,-16616,28208,-16673,28173,-16731,28139,-16789,28105,-16846,28070,-16904,28036,-16961,28001,-17018,27966,-17075,27931,-17133,27896,-17190,27861,-17247,27825,-17304,27790,-17361,27754,-17417,27719,-17474,27683,-17531,27647,-17587,27611,-17644,27575,-17700,27538,-17757,27502,-17813,27466,-17869,27429,-17925,27392,-17981,27355,-18037,27319,-18093,27281,-18149,27244,-18205,27207,-18261,27170,-18316,27132,-18372,27094,-18427,27057,-18483,27019,-18538,26981,-18593,26943,-18648,26905,-18703,26866,-18758,26828,-18813,26789,-18868,26751,-18923,26712,-18977,26673,-19032,26634,-19087,26595,-19141,26556,-19195,26516,-19250,26477,-19304,26437,-19358,26398,-19412,26358,-19466,26318,-19520,26278,-19574,26238,-19627,26198,-19681,26158,-19734,26117,-19788,26077,-19841,26036,-19895,25995,-19948,25954,-20001,25913,-20054,25872,-20107,25831,-20160,25790,-20213,25749,-20265,25707,-20318,25665,-20370,25624,-20423,25582,-20475,25540,-20528,25498,-20580,25456,-20632,25414,-20684,25371,-20736,25329,-20788,25286,-20839,25243,-20891,25201,-20943,25158,-20994,25115,-21046,25072,-21097,25029,-21148,24985,-21199,24942,-21250,24898,-21301,24855,-21352,24811,-21403,24767,-21454,24723,-21504,24679,-21555,24635,-21605,24591,-21656,24546,-21706,24502,-21756,24457,-21806,24413,-21856,24368,-21906,24323,-21956,24278,-22005,24233,-22055,24188,-22105,24143,-22154,24097,-22203,24052,-22253,24006,-22302,23961,-22351,23915,-22400,23869,-22449,23823,-22497,23777,-22546,23731,-22595,23685,-22643,23638,-22692,23592,-22740,23545,-22788,23499,-22836,23452,-22884,23405,-22932,23358,-22980,23311,-23028,23264,-23075,23217,-23123,23169,-23170,23122,-23218,23074,-23265,23027,-23312,22979,-23359,22931,-23406,22883,-23453,22835,-23500,22787,-23546,22739,-23593,22691,-23639,22642,-23686,22594,-23732,22545,-23778,22496,-23824,22448,-23870,22399,-23916,22350,-23962,22301,-24007,22252,-24053,22202,-24098,22153,-24144,22104,-24189,22054,-24234,22004,-24279,21955,-24324,21905,-24369,21855,-24414,21805,-24458,21755,-24503,21705,-24547,21655,-24592,21604,-24636,21554,-24680,21503,-24724,21453,-24768,21402,-24812,21351,-24856,21300,-24899,21249,-24943,21198,-24986,21147,-25030,21096,-25073,21045,-25116,20993,-25159,20942,-25202,20890,-25244,20838,-25287,20787,-25330,20735,-25372,20683,-25415,20631,-25457,20579,-25499,20527,-25541,20474,-25583,20422,-25625,20369,-25666,20317,-25708,20264,-25750,20212,-25791,20159,-25832,20106,-25873,20053,-25914,20000,-25955,19947,-25996,19894,-26037,19840,-26078,19787,-26118,19733,-26159,19680,-26199,19626,-26239,19573,-26279,19519,-26319,19465,-26359,19411,-26399,19357,-26438,19303,-26478,19249,-26517,19194,-26557,19140,-26596,19086,-26635,19031,-26674,18976,-26713,18922,-26752,18867,-26790,18812,-26829,18757,-26867,18702,-26906,18647,-26944,18592,-26982,18537,-27020,18482,-27058,18426,-27095,18371,-27133,18315,-27171,18260,-27208,18204,-27245,18148,-27282,18092,-27320,18036,-27356,17980,-27393,17924,-27430,17868,-27467,17812,-27503,17756,-27539,17699,-27576,17643,-27612,17586,-27648,17530,-27684,17473,-27720,17416,-27755,17360,-27791,17303,-27826,17246,-27862,17189,-27897,17132,-27932,17074,-27967,17017,-28002,16960,-28037,16903,-28071,16845,-28106,16788,-28140,16730,-28174,16672,-28209,16615,-28243,16557,-28276,16499,-28310,16441,-28344,16383,-28378,16325,-28411,16267,-28444,16209,-28478,16150,-28511,16092,-28544,16034,-28576,15975,-28609,15917,-28642,15858,-28674,15799,-28707,15740,-28739,15682,-28771,15623,-28803,15564,-28835,15505,-28867,15446,-28898,15387,-28930,15327,-28961,15268,-28993,15209,-29024,15149,-29055,15090,-29086,15030,-29117,14971,-29147,14911,-29178,14852,-29208,14792,-29239,14732,-29269,14672,-29299,14612,-29329,14552,-29359,14492,-29388,14432,-29418,14372,-29447,14311,-29477,14251,-29506,14191,-29535,14130,-29564,14070,-29593,14009,-29622,13949,-29650,13888,-29679,13827,-29707,13766,-29735,13706,-29763,13645,-29791,13584,-29819,13523,-29847,13462,-29874,13400,-29902,13339,-29929,13278,-29956,13217,-29984,13155,-30010,13094,-30037,13033,-30064,12971,-30091,12909,-30117,12848,-30143,12786,-30170,12724,-30196,12663,-30222,12601,-30248,12539,-30273,12477,-30299,12415,-30324,12353,-30350,12291,-30375,12229,-30400,12166,-30425,12104,-30450,12042,-30474,11980,-30499,11917,-30523,11855,-30548,11792,-30572,11730,-30596,11667,-30620,11604,-30644,11542,-30667,11479,-30691,11416,-30714,11353,-30738,11290,-30761,11227,-30784,11164,-30807,11101,-30829,11038,-30852,10975,-30875,10912,-30897,10849,-30919,10786,-30941,10722,-30963,10659,-30985,10596,-31007,10532,-31029,10469,-31050,10405,-31071,10342,-31093,10278,-31114,10214,-31135,10151,-31155,10087,-31176,10023,-31197,9959,-31217,9895,-31237,9831,-31258,9767,-31278,9703,-31298,9639,-31317,9575,-31337,9511,-31357,9447,-31376,9383,-31395,9319,-31414,9254,-31433,9190,-31452,9126,-31471,9061,-31490,8997,-31508,8932,-31526,8868,-31545,8803,-31563,8739,-31581,8674,-31598,8610,-31616,8545,-31634,8480,-31651,8415,-31668,8351,-31685,8286,-31702,8221,-31719,8156,-31736,8091,-31753,8026,-31769,7961,-31786,7896,-31802,7831,-31818,7766,-31834,7701,-31850,7636,-31865,7571,-31881,7505,-31896,7440,-31912,7375,-31927,7310,-31942,7244,-31957,7179,-31971,7113,-31986,7048,-32000,6982,-32015,6917,-32029,6851,-32043,6786,-32057,6720,-32071,6655,-32085,6589,-32098,6523,-32111,6458,-32125,6392,-32138,6326,-32151,6261,-32164,6195,-32177,6129,-32189,6063,-32202,5997,-32214,5931,-32226,5865,-32238,5799,-32250,5733,-32262,5667,-32274,5601,-32285,5535,-32296,5469,-32308,5403,-32319,5337,-32330,5271,-32341,5205,-32351,5139,-32362,5072,-32372,5006,-32383,4940,-32393,4874,-32403,4807,-32413,4741,-32423,4675,-32432,4608,-32442,4542,-32451,4476,-32460,4409,-32469,4343,-32478,4276,-32487,4210,-32496,4144,-32504,4077,-32513,4011,-32521,3944,-32529,3877,-32537,3811,-32545,3744,-32553,3678,-32560,3611,-32568,3545,-32575,3478,-32582,3411,-32589,3345,-32596,3278,-32603,3211,-32610,3145,-32616,3078,-32623,3011,-32629,2944,-32635,2878,-32641,2811,-32647,2744,-32652,2677,-32658,2610,-32663,2544,-32669,2477,-32674,2410,-32679,2343,-32684,2276,-32688,2209,-32693,2143,-32697,2076,-32702,2009,-32706,1942,-32710,1875,-32714,1808,-32718,1741,-32721,1674,-32725,1607,-32728,1540,-32731,1473,-32734,1406,-32737,1339,-32740,1273,-32743,1206,-32745,1139,-32748,1072,-32750,1005,-32752,938,-32754,871,-32756,804,-32758,737,-32759,670,-32761,603,-32762,536,-32763,469,-32764,402,-32765,335,-32766,268,-32766,201,-32767,134,-32767,67,-32767,-1,-32767,-68,-32767,-135,-32767,-202,-32767,-269,-32766,-336,-32766,-403,-32765,-470,-32764,-537,-32763,-604,-32762,-671,-32761,-738,-32759,-805,-32758,-872,-32756,-939,-32754,-1006,-32752,-1073,-32750,-1140,-32748,-1207,-32745,-1274,-32743,-1340,-32740,-1407,-32737,-1474,-32734,-1541,-32731,-1608,-32728,-1675,-32725,-1742,-32721,-1809,-32718,-1876,-32714,-1943,-32710,-2010,-32706,-2077,-32702,-2144,-32697,-2210,-32693,-2277,-32688,-2344,-32684,-2411,-32679,-2478,-32674,-2545,-32669,-2611,-32663,-2678,-32658,-2745,-32652,-2812,-32647,-2879,-32641,-2945,-32635,-3012,-32629,-3079,-32623,-3146,-32616,-3212,-32610,-3279,-32603,-3346,-32596,-3412,-32589,-3479,-32582,-3546,-32575,-3612,-32568,-3679,-32560,-3745,-32553,-3812,-32545,-3878,-32537,-3945,-32529,-4012,-32521,-4078,-32513,-4145,-32504,-4211,-32496,-4277,-32487,-4344,-32478,-4410,-32469,-4477,-32460,-4543,-32451,-4609,-32442,-4676,-32432,-4742,-32423,-4808,-32413,-4875,-32403,-4941,-32393,-5007,-32383,-5073,-32372,-5140,-32362,-5206,-32351,-5272,-32341,-5338,-32330,-5404,-32319,-5470,-32308,-5536,-32296,-5602,-32285,-5668,-32274,-5734,-32262,-5800,-32250,-5866,-32238,-5932,-32226,-5998,-32214,-6064,-32202,-6130,-32189,-6196,-32177,-6262,-32164,-6327,-32151,-6393,-32138,-6459,-32125,-6524,-32111,-6590,-32098,-6656,-32085,-6721,-32071,-6787,-32057,-6852,-32043,-6918,-32029,-6983,-32015,-7049,-32000,-7114,-31986,-7180,-31971,-7245,-31957,-7311,-31942,-7376,-31927,-7441,-31912,-7506,-31896,-7572,-31881,-7637,-31865,-7702,-31850,-7767,-31834,-7832,-31818,-7897,-31802,-7962,-31786,-8027,-31769,-8092,-31753,-8157,-31736,-8222,-31719,-8287,-31702,-8352,-31685,-8416,-31668,-8481,-31651,-8546,-31634,-8611,-31616,-8675,-31598,-8740,-31581,-8804,-31563,-8869,-31545,-8933,-31526,-8998,-31508,-9062,-31490,-9127,-31471,-9191,-31452,-9255,-31433,-9320,-31414,-9384,-31395,-9448,-31376,-9512,-31357,-9576,-31337,-9640,-31317,-9704,-31298,-9768,-31278,-9832,-31258,-9896,-31237,-9960,-31217,-10024,-31197,-10088,-31176,-10152,-31155,-10215,-31135,-10279,-31114,-10343,-31093,-10406,-31071,-10470,-31050,-10533,-31029,-10597,-31007,-10660,-30985,-10723,-30963,-10787,-30941,-10850,-30919,-10913,-30897,-10976,-30875,-11039,-30852,-11102,-30829,-11165,-30807,-11228,-30784,-11291,-30761,-11354,-30738,-11417,-30714,-11480,-30691,-11543,-30667,-11605,-30644,-11668,-30620,-11731,-30596,-11793,-30572,-11856,-30548,-11918,-30523,-11981,-30499,-12043,-30474,-12105,-30450,-12167,-30425,-12230,-30400,-12292,-30375,-12354,-30350,-12416,-30324,-12478,-30299,-12540,-30273,-12602,-30248,-12664,-30222,-12725,-30196,-12787,-30170,-12849,-30143,-12910,-30117,-12972,-30091,-13034,-30064,-13095,-30037,-13156,-30010,-13218,-29984,-13279,-29956,-13340,-29929,-13401,-29902,-13463,-29874,-13524,-29847,-13585,-29819,-13646,-29791,-13707,-29763,-13767,-29735,-13828,-29707,-13889,-29679,-13950,-29650,-14010,-29622,-14071,-29593,-14131,-29564,-14192,-29535,-14252,-29506,-14312,-29477,-14373,-29447,-14433,-29418,-14493,-29388,-14553,-29359,-14613,-29329,-14673,-29299,-14733,-29269,-14793,-29239,-14853,-29208,-14912,-29178,-14972,-29147,-15031,-29117,-15091,-29086,-15150,-29055,-15210,-29024,-15269,-28993,-15328,-28961,-15388,-28930,-15447,-28898,-15506,-28867,-15565,-28835,-15624,-28803,-15683,-28771,-15741,-28739,-15800,-28707,-15859,-28674,-15918,-28642,-15976,-28609,-16035,-28576,-16093,-28544,-16151,-28511,-16210,-28478,-16268,-28444,-16326,-28411,-16384,-28378,-16442,-28344,-16500,-28310,-16558,-28276,-16616,-28243,-16673,-28209,-16731,-28174,-16789,-28140,-16846,-28106,-16904,-28071,-16961,-28037,-17018,-28002,-17075,-27967,-17133,-27932,-17190,-27897,-17247,-27862,-17304,-27826,-17361,-27791,-17417,-27755,-17474,-27720,-17531,-27684,-17587,-27648,-17644,-27612,-17700,-27576,-17757,-27539,-17813,-27503,-17869,-27467,-17925,-27430,-17981,-27393,-18037,-27356,-18093,-27320,-18149,-27282,-18205,-27245,-18261,-27208,-18316,-27171,-18372,-27133,-18427,-27095,-18483,-27058,-18538,-27020,-18593,-26982,-18648,-26944,-18703,-26906,-18758,-26867,-18813,-26829,-18868,-26790,-18923,-26752,-18977,-26713,-19032,-26674,-19087,-26635,-19141,-26596,-19195,-26557,-19250,-26517,-19304,-26478,-19358,-26438,-19412,-26399,-19466,-26359,-19520,-26319,-19574,-26279,-19627,-26239,-19681,-26199,-19734,-26159,-19788,-26118,-19841,-26078,-19895,-26037,-19948,-25996,-20001,-25955,-20054,-25914,-20107,-25873,-20160,-25832,-20213,-25791,-20265,-25750,-20318,-25708,-20370,-25666,-20423,-25625,-20475,-25583,-20528,-25541,-20580,-25499,-20632,-25457,-20684,-25415,-20736,-25372,-20788,-25330,-20839,-25287,-20891,-25244,-20943,-25202,-20994,-25159,-21046,-25116,-21097,-25073,-21148,-25030,-21199,-24986,-21250,-24943,-21301,-24899,-21352,-24856,-21403,-24812,-21454,-24768,-21504,-24724,-21555,-24680,-21605,-24636,-21656,-24592,-21706,-24547,-21756,-24503,-21806,-24458,-21856,-24414,-21906,-24369,-21956,-24324,-22005,-24279,-22055,-24234,-22105,-24189,-22154,-24144,-22203,-24098,-22253,-24053,-22302,-24007,-22351,-23962,-22400,-23916,-22449,-23870,-22497,-23824,-22546,-23778,-22595,-23732,-22643,-23686,-22692,-23639,-22740,-23593,-22788,-23546,-22836,-23500,-22884,-23453,-22932,-23406,-22980,-23359,-23028,-23312,-23075,-23265,-23123,-23218,-23170,-23170,-23218,-23123,-23265,-23075,-23312,-23028,-23359,-22980,-23406,-22932,-23453,-22884,-23500,-22836,-23546,-22788,-23593,-22740,-23639,-22692,-23686,-22643,-23732,-22595,-23778,-22546,-23824,-22497,-23870,-22449,-23916,-22400,-23962,-22351,-24007,-22302,-24053,-22253,-24098,-22203,-24144,-22154,-24189,-22105,-24234,-22055,-24279,-22005,-24324,-21956,-24369,-21906,-24414,-21856,-24458,-21806,-24503,-21756,-24547,-21706,-24592,-21656,-24636,-21605,-24680,-21555,-24724,-21504,-24768,-21454,-24812,-21403,-24856,-21352,-24899,-21301,-24943,-21250,-24986,-21199,-25030,-21148,-25073,-21097,-25116,-21046,-25159,-20994,-25202,-20943,-25244,-20891,-25287,-20839,-25330,-20788,-25372,-20736,-25415,-20684,-25457,-20632,-25499,-20580,-25541,-20528,-25583,-20475,-25625,-20423,-25666,-20370,-25708,-20318,-25750,-20265,-25791,-20213,-25832,-20160,-25873,-20107,-25914,-20054,-25955,-20001,-25996,-19948,-26037,-19895,-26078,-19841,-26118,-19788,-26159,-19734,-26199,-19681,-26239,-19627,-26279,-19574,-26319,-19520,-26359,-19466,-26399,-19412,-26438,-19358,-26478,-19304,-26517,-19250,-26557,-19195,-26596,-19141,-26635,-19087,-26674,-19032,-26713,-18977,-26752,-18923,-26790,-18868,-26829,-18813,-26867,-18758,-26906,-18703,-26944,-18648,-26982,-18593,-27020,-18538,-27058,-18483,-27095,-18427,-27133,-18372,-27171,-18316,-27208,-18261,-27245,-18205,-27282,-18149,-27320,-18093,-27356,-18037,-27393,-17981,-27430,-17925,-27467,-17869,-27503,-17813,-27539,-17757,-27576,-17700,-27612,-17644,-27648,-17587,-27684,-17531,-27720,-17474,-27755,-17417,-27791,-17361,-27826,-17304,-27862,-17247,-27897,-17190,-27932,-17133,-27967,-17075,-28002,-17018,-28037,-16961,-28071,-16904,-28106,-16846,-28140,-16789,-28174,-16731,-28209,-16673,-28243,-16616,-28276,-16558,-28310,-16500,-28344,-16442,-28378,-16384,-28411,-16326,-28444,-16268,-28478,-16210,-28511,-16151,-28544,-16093,-28576,-16035,-28609,-15976,-28642,-15918,-28674,-15859,-28707,-15800,-28739,-15741,-28771,-15683,-28803,-15624,-28835,-15565,-28867,-15506,-28898,-15447,-28930,-15388,-28961,-15328,-28993,-15269,-29024,-15210,-29055,-15150,-29086,-15091,-29117,-15031,-29147,-14972,-29178,-14912,-29208,-14853,-29239,-14793,-29269,-14733,-29299,-14673,-29329,-14613,-29359,-14553,-29388,-14493,-29418,-14433,-29447,-14373,-29477,-14312,-29506,-14252,-29535,-14192,-29564,-14131,-29593,-14071,-29622,-14010,-29650,-13950,-29679,-13889,-29707,-13828,-29735,-13767,-29763,-13707,-29791,-13646,-29819,-13585,-29847,-13524,-29874,-13463,-29902,-13401,-29929,-13340,-29956,-13279,-29984,-13218,-30010,-13156,-30037,-13095,-30064,-13034,-30091,-12972,-30117,-12910,-30143,-12849,-30170,-12787,-30196,-12725,-30222,-12664,-30248,-12602,-30273,-12540,-30299,-12478,-30324,-12416,-30350,-12354,-30375,-12292,-30400,-12230,-30425,-12167,-30450,-12105,-30474,-12043,-30499,-11981,-30523,-11918,-30548,-11856,-30572,-11793,-30596,-11731,-30620,-11668,-30644,-11605,-30667,-11543,-30691,-11480,-30714,-11417,-30738,-11354,-30761,-11291,-30784,-11228,-30807,-11165,-30829,-11102,-30852,-11039,-30875,-10976,-30897,-10913,-30919,-10850,-30941,-10787,-30963,-10723,-30985,-10660,-31007,-10597,-31029,-10533,-31050,-10470,-31071,-10406,-31093,-10343,-31114,-10279,-31135,-10215,-31155,-10152,-31176,-10088,-31197,-10024,-31217,-9960,-31237,-9896,-31258,-9832,-31278,-9768,-31298,-9704,-31317,-9640,-31337,-9576,-31357,-9512,-31376,-9448,-31395,-9384,-31414,-9320,-31433,-9255,-31452,-9191,-31471,-9127,-31490,-9062,-31508,-8998,-31526,-8933,-31545,-8869,-31563,-8804,-31581,-8740,-31598,-8675,-31616,-8611,-31634,-8546,-31651,-8481,-31668,-8416,-31685,-8352,-31702,-8287,-31719,-8222,-31736,-8157,-31753,-8092,-31769,-8027,-31786,-7962,-31802,-7897,-31818,-7832,-31834,-7767,-31850,-7702,-31865,-7637,-31881,-7572,-31896,-7506,-31912,-7441,-31927,-7376,-31942,-7311,-31957,-7245,-31971,-7180,-31986,-7114,-32000,-7049,-32015,-6983,-32029,-6918,-32043,-6852,-32057,-6787,-32071,-6721,-32085,-6656,-32098,-6590,-32111,-6524,-32125,-6459,-32138,-6393,-32151,-6327,-32164,-6262,-32177,-6196,-32189,-6130,-32202,-6064,-32214,-5998,-32226,-5932,-32238,-5866,-32250,-5800,-32262,-5734,-32274,-5668,-32285,-5602,-32296,-5536,-32308,-5470,-32319,-5404,-32330,-5338,-32341,-5272,-32351,-5206,-32362,-5140,-32372,-5073,-32383,-5007,-32393,-4941,-32403,-4875,-32413,-4808,-32423,-4742,-32432,-4676,-32442,-4609,-32451,-4543,-32460,-4477,-32469,-4410,-32478,-4344,-32487,-4277,-32496,-4211,-32504,-4145,-32513,-4078,-32521,-4012,-32529,-3945,-32537,-3878,-32545,-3812,-32553,-3745,-32560,-3679,-32568,-3612,-32575,-3546,-32582,-3479,-32589,-3412,-32596,-3346,-32603,-3279,-32610,-3212,-32616,-3146,-32623,-3079,-32629,-3012,-32635,-2945,-32641,-2879,-32647,-2812,-32652,-2745,-32658,-2678,-32663,-2611,-32669,-2545,-32674,-2478,-32679,-2411,-32684,-2344,-32688,-2277,-32693,-2210,-32697,-2144,-32702,-2077,-32706,-2010,-32710,-1943,-32714,-1876,-32718,-1809,-32721,-1742,-32725,-1675,-32728,-1608,-32731,-1541,-32734,-1474,-32737,-1407,-32740,-1340,-32743,-1274,-32745,-1207,-32748,-1140,-32750,-1073,-32752,-1006,-32754,-939,-32756,-872,-32758,-805,-32759,-738,-32761,-671,-32762,-604,-32763,-537,-32764,-470,-32765,-403,-32766,-336,-32766,-269,-32767,-202,-32767,-135,-32767,-68}; - -int16_t s100n_kHz_7_5[30720]__attribute__((aligned(16)))= {31785,7961,31797,7912,31809,7864,31821,7815,31833,7766,31845,7717,31856,7668,31868,7619,31880,7571,31891,7522,31903,7473,31914,7424,31926,7375,31937,7326,31948,7277,31959,7228,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51}; - -int16_t s100e_kHz_7_5[30720]__attribute__((aligned(16)))= {23169,23169,23205,23134,23240,23098,23276,23062,23311,23027,23346,22991,23382,22955,23417,22919,23452,22883,23487,22847,23522,22811,23557,22775,23592,22739,23627,22703,23661,22666,23696,22630,23731,22594,23766,22557,23800,22521,23835,22484,23869,22448,23903,22411,23938,22374,23972,22338,24006,22301,24041,22264,24075,22227,24109,22190,24143,22153,24177,22116,24211,22079,24244,22042,24278,22004,24312,21967,24346,21930,24379,21893,24413,21855,24446,21818,24480,21780,24513,21743,24546,21705,24580,21667,24613,21629,24646,21592,24679,21554,24712,21516,24745,21478,24778,21440,24811,21402,24844,21364,24877,21326,24909,21288,24942,21249,24974,21211,25007,21173,25039,21134,25072,21096,25104,21057,25136,21019,25169,20980,25201,20942,25233,20903,25265,20864,25297,20825,25329,20787,25361,20748,25392,20709,25424,20670,25456,20631,25487,20592,25519,20553,25550,20513,25582,20474,25613,20435,25645,20396,25676,20356,25707,20317,25738,20277,25769,20238,25800,20198,25831,20159,25862,20119,25893,20079,25924,20040,25954,20000,25985,19960,26016,19920,26046,19880,26077,19840,26107,19800,26137,19760,26168,19720,26198,19680,26228,19640,26258,19599,26288,19559,26318,19519,26348,19478,26378,19438,26408,19397,26437,19357,26467,19316,26497,19276,26526,19235,26556,19194,26585,19154,26615,19113,26644,19072,26673,19031,26702,18990,26731,18949,26760,18908,26789,18867,26818,18826,26847,18785,26876,18744,26905,18702,26933,18661,26962,18620,26990,18578,27019,18537,27047,18495,27076,18454,27104,18412,27132,18371,27160,18329,27188,18287,27216,18246,27244,18204,27272,18162,27300,18120,27328,18078,27355,18036,27383,17994,27411,17952,27438,17910,27466,17868,27493,17826,27520,17784,27548,17742,27575,17699,27602,17657,27629,17615,27656,17572,27683,17530,27710,17487,27736,17445,27763,17402,27790,17360,27816,17317,27843,17274,27869,17232,27896,17189,27922,17146,27948,17103,27975,17060,28001,17017,28027,16974,28053,16931,28079,16888,28105,16845,28131,16802,28156,16759,28182,16716,28208,16672,28233,16629,28259,16586,28284,16542,28309,16499,28335,16455,28360,16412,28385,16368,28410,16325,28435,16281,28460,16238,28485,16194,28510,16150,28534,16107,28559,16063,28584,16019,28608,15975,28633,15931,28657,15887,28681,15843,28706,15799,28730,15755,28754,15711,28778,15667,28802,15623,28826,15579,28850,15534,28874,15490,28897,15446,28921,15401,28945,15357,28968,15313,28992,15268,29015,15224,29038,15179,29062,15135,29085,15090,29108,15045,29131,15001,29154,14956,29177,14911,29200,14866,29222,14822,29245,14777,29268,14732,29290,14687,29313,14642,29335,14597,29358,14552,29380,14507,29402,14462,29424,14417,29446,14372,29468,14326,29490,14281,29512,14236,29534,14191,29556,14145,29577,14100,29599,14055,29621,14009,29642,13964,29663,13918,29685,13873,29706,13827,29727,13782,29748,13736,29769,13690,29790,13645,29811,13599,29832,13553,29853,13507,29873,13462,29894,13416,29915,13370,29935,13324,29955,13278,29976,13232,29996,13186,30016,13140,30036,13094,30056,13048,30076,13002,30096,12956,30116,12909,30136,12863,30156,12817,30175,12771,30195,12724,30214,12678,30234,12632,30253,12585,30272,12539,30291,12492,30311,12446,30330,12399,30349,12353,30368,12306,30386,12260,30405,12213,30424,12166,30442,12120,30461,12073,30480,12026,30498,11980,30516,11933,30535,11886,30553,11839,30571,11792,30589,11745,30607,11698,30625,11651,30643,11604,30660,11557,30678,11510,30696,11463,30713,11416,30731,11369,30748,11322,30766,11275,30783,11227,30800,11180,30817,11133,30834,11086,30851,11038,30868,10991,30885,10944,30902,10896,30918,10849,30935,10801,30951,10754,30968,10706,30984,10659,31001,10611,31017,10564,31033,10516,31049,10469,31065,10421,31081,10373,31097,10326,31113,10278,31128,10230,31144,10182,31160,10135,31175,10087,31191,10039,31206,9991,31221,9943,31236,9895,31252,9847,31267,9799,31282,9751,31297,9703,31311,9655,31326,9607,31341,9559,31356,9511,31370,9463,31385,9415,31399,9367,31413,9319,31428,9270,31442,9222,31456,9174,31470,9126,31484,9077,31498,9029,31512,8981,31525,8932,31539,8884,31553,8836,31566,8787,31580,8739,31593,8690,31606,8642,31619,8593,31633,8545,31646,8496,31659,8448,31672,8399,31684,8351,31697,8302,31710,8253,31723,8205,31735,8156,31748,8107,31760,8059,31772,8010,31785,7961,31797,7912,31809,7864,31821,7815,31833,7766,31845,7717,31856,7668,31868,7619,31880,7571,31891,7522,31903,7473,31914,7424,31926,7375,31937,7326,31948,7277,31959,7228,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,23169,23169,23205,23134,23240,23098,23276,23062,23311,23027,23346,22991,23382,22955,23417,22919,23452,22883,23487,22847,23522,22811,23557,22775,23592,22739,23627,22703,23661,22666,23696,22630,23731,22594,23766,22557,23800,22521,23835,22484,23869,22448,23903,22411,23938,22374,23972,22338,24006,22301,24041,22264,24075,22227,24109,22190,24143,22153,24177,22116,24211,22079,24244,22042,24278,22004,24312,21967,24346,21930,24379,21893,24413,21855,24446,21818,24480,21780,24513,21743,24546,21705,24580,21667,24613,21629,24646,21592,24679,21554,24712,21516,24745,21478,24778,21440,24811,21402,24844,21364,24877,21326,24909,21288,24942,21249,24974,21211,25007,21173,25039,21134,25072,21096,25104,21057,25136,21019,25169,20980,25201,20942,25233,20903,25265,20864,25297,20825,25329,20787,25361,20748,25392,20709,25424,20670,25456,20631,25487,20592,25519,20553,25550,20513,25582,20474,25613,20435,25645,20396,25676,20356,25707,20317,25738,20277,25769,20238,25800,20198,25831,20159,25862,20119,25893,20079,25924,20040,25954,20000,25985,19960,26016,19920,26046,19880,26077,19840,26107,19800,26137,19760,26168,19720,26198,19680,26228,19640,26258,19599,26288,19559,26318,19519,26348,19478,26378,19438,26408,19397,26437,19357,26467,19316,26497,19276,26526,19235,26556,19194,26585,19154,26615,19113,26644,19072,26673,19031,26702,18990,26731,18949,26760,18908,26789,18867,26818,18826,26847,18785,26876,18744,26905,18702,26933,18661,26962,18620,26990,18578,27019,18537,27047,18495,27076,18454,27104,18412,27132,18371,27160,18329,27188,18287,27216,18246,27244,18204,27272,18162,27300,18120,27328,18078,27355,18036,27383,17994,27411,17952,27438,17910,27466,17868,27493,17826,27520,17784,27548,17742,27575,17699,27602,17657,27629,17615,27656,17572,27683,17530,27710,17487,27736,17445,27763,17402,27790,17360,27816,17317,27843,17274,27869,17232,27896,17189,27922,17146,27948,17103,27975,17060,28001,17017,28027,16974,28053,16931,28079,16888,28105,16845,28131,16802,28156,16759,28182,16716,28208,16672,28233,16629,28259,16586,28284,16542,28309,16499,28335,16455,28360,16412,28385,16368,28410,16325,28435,16281,28460,16238,28485,16194,28510,16150,28534,16107,28559,16063,28584,16019,28608,15975,28633,15931,28657,15887,28681,15843,28706,15799,28730,15755,28754,15711,28778,15667,28802,15623,28826,15579,28850,15534,28874,15490,28897,15446,28921,15401,28945,15357,28968,15313,28992,15268,29015,15224,29038,15179,29062,15135,29085,15090,29108,15045,29131,15001,29154,14956,29177,14911,29200,14866,29222,14822,29245,14777,29268,14732,29290,14687,29313,14642,29335,14597,29358,14552,29380,14507,29402,14462,29424,14417,29446,14372,29468,14326,29490,14281,29512,14236,29534,14191,29556,14145,29577,14100,29599,14055,29621,14009,29642,13964,29663,13918,29685,13873,29706,13827,29727,13782,29748,13736,29769,13690,29790,13645,29811,13599,29832,13553,29853,13507,29873,13462,29894,13416,29915,13370,29935,13324,29955,13278,29976,13232,29996,13186,30016,13140,30036,13094,30056,13048,30076,13002,30096,12956,30116,12909,30136,12863,30156,12817,30175,12771,30195,12724,30214,12678,30234,12632,30253,12585,30272,12539,30291,12492,30311,12446,30330,12399,30349,12353,30368,12306,30386,12260,30405,12213,30424,12166,30442,12120,30461,12073,30480,12026,30498,11980,30516,11933,30535,11886,30553,11839,30571,11792,30589,11745,30607,11698,30625,11651,30643,11604,30660,11557,30678,11510,30696,11463,30713,11416,30731,11369,30748,11322,30766,11275,30783,11227,30800,11180,30817,11133,30834,11086,30851,11038,30868,10991,30885,10944,30902,10896,30918,10849,30935,10801,30951,10754,30968,10706,30984,10659,31001,10611,31017,10564,31033,10516,31049,10469,31065,10421,31081,10373,31097,10326,31113,10278,31128,10230,31144,10182,31160,10135,31175,10087,31191,10039,31206,9991,31221,9943,31236,9895,31252,9847,31267,9799,31282,9751,31297,9703,31311,9655,31326,9607,31341,9559,31356,9511,31370,9463,31385,9415,31399,9367,31413,9319,31428,9270,31442,9222,31456,9174,31470,9126,31484,9077,31498,9029,31512,8981,31525,8932,31539,8884,31553,8836,31566,8787,31580,8739,31593,8690,31606,8642,31619,8593,31633,8545,31646,8496,31659,8448,31672,8399,31684,8351,31697,8302,31710,8253,31723,8205,31735,8156,31748,8107,31760,8059,31772,8010,31785,7961,31797,7912,31809,7864,31821,7815,31833,7766,31845,7717,31856,7668,31868,7619,31880,7571,31891,7522,31903,7473,31914,7424,31926,7375,31937,7326,31948,7277,31959,7228,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,23169,23169,23205,23134,23240,23098,23276,23062,23311,23027,23346,22991,23382,22955,23417,22919,23452,22883,23487,22847,23522,22811,23557,22775,23592,22739,23627,22703,23661,22666,23696,22630,23731,22594,23766,22557,23800,22521,23835,22484,23869,22448,23903,22411,23938,22374,23972,22338,24006,22301,24041,22264,24075,22227,24109,22190,24143,22153,24177,22116,24211,22079,24244,22042,24278,22004,24312,21967,24346,21930,24379,21893,24413,21855,24446,21818,24480,21780,24513,21743,24546,21705,24580,21667,24613,21629,24646,21592,24679,21554,24712,21516,24745,21478,24778,21440,24811,21402,24844,21364,24877,21326,24909,21288,24942,21249,24974,21211,25007,21173,25039,21134,25072,21096,25104,21057,25136,21019,25169,20980,25201,20942,25233,20903,25265,20864,25297,20825,25329,20787,25361,20748,25392,20709,25424,20670,25456,20631,25487,20592,25519,20553,25550,20513,25582,20474,25613,20435,25645,20396,25676,20356,25707,20317,25738,20277,25769,20238,25800,20198,25831,20159,25862,20119,25893,20079,25924,20040,25954,20000,25985,19960,26016,19920,26046,19880,26077,19840,26107,19800,26137,19760,26168,19720,26198,19680,26228,19640,26258,19599,26288,19559,26318,19519,26348,19478,26378,19438,26408,19397,26437,19357,26467,19316,26497,19276,26526,19235,26556,19194,26585,19154,26615,19113,26644,19072,26673,19031,26702,18990,26731,18949,26760,18908,26789,18867,26818,18826,26847,18785,26876,18744,26905,18702,26933,18661,26962,18620,26990,18578,27019,18537,27047,18495,27076,18454,27104,18412,27132,18371,27160,18329,27188,18287,27216,18246,27244,18204,27272,18162,27300,18120,27328,18078,27355,18036,27383,17994,27411,17952,27438,17910,27466,17868,27493,17826,27520,17784,27548,17742,27575,17699,27602,17657,27629,17615,27656,17572,27683,17530,27710,17487,27736,17445,27763,17402,27790,17360,27816,17317,27843,17274,27869,17232,27896,17189,27922,17146,27948,17103,27975,17060,28001,17017,28027,16974,28053,16931,28079,16888,28105,16845,28131,16802,28156,16759,28182,16716,28208,16672,28233,16629,28259,16586,28284,16542,28309,16499,28335,16455,28360,16412,28385,16368,28410,16325,28435,16281,28460,16238,28485,16194,28510,16150,28534,16107,28559,16063,28584,16019,28608,15975,28633,15931,28657,15887,28681,15843,28706,15799,28730,15755,28754,15711,28778,15667,28802,15623,28826,15579,28850,15534,28874,15490,28897,15446,28921,15401,28945,15357,28968,15313,28992,15268,29015,15224,29038,15179,29062,15135,29085,15090,29108,15045,29131,15001,29154,14956,29177,14911,29200,14866,29222,14822,29245,14777,29268,14732,29290,14687,29313,14642,29335,14597,29358,14552,29380,14507,29402,14462,29424,14417,29446,14372,29468,14326,29490,14281,29512,14236,29534,14191,29556,14145,29577,14100,29599,14055,29621,14009,29642,13964,29663,13918,29685,13873,29706,13827,29727,13782,29748,13736,29769,13690,29790,13645,29811,13599,29832,13553,29853,13507,29873,13462,29894,13416,29915,13370,29935,13324,29955,13278,29976,13232,29996,13186,30016,13140,30036,13094,30056,13048,30076,13002,30096,12956,30116,12909,30136,12863,30156,12817,30175,12771,30195,12724,30214,12678,30234,12632,30253,12585,30272,12539,30291,12492,30311,12446,30330,12399,30349,12353,30368,12306,30386,12260,30405,12213,30424,12166,30442,12120,30461,12073,30480,12026,30498,11980,30516,11933,30535,11886,30553,11839,30571,11792,30589,11745,30607,11698,30625,11651,30643,11604,30660,11557,30678,11510,30696,11463,30713,11416,30731,11369,30748,11322,30766,11275,30783,11227,30800,11180,30817,11133,30834,11086,30851,11038,30868,10991,30885,10944,30902,10896,30918,10849,30935,10801,30951,10754,30968,10706,30984,10659,31001,10611,31017,10564,31033,10516,31049,10469,31065,10421,31081,10373,31097,10326,31113,10278,31128,10230,31144,10182,31160,10135,31175,10087,31191,10039,31206,9991,31221,9943,31236,9895,31252,9847,31267,9799,31282,9751,31297,9703,31311,9655,31326,9607,31341,9559,31356,9511,31370,9463,31385,9415,31399,9367,31413,9319,31428,9270,31442,9222,31456,9174,31470,9126,31484,9077,31498,9029,31512,8981,31525,8932,31539,8884,31553,8836,31566,8787,31580,8739,31593,8690,31606,8642,31619,8593,31633,8545,31646,8496,31659,8448,31672,8399,31684,8351,31697,8302,31710,8253,31723,8205,31735,8156,31748,8107,31760,8059,31772,8010,31785,7961,31797,7912,31809,7864,31821,7815,31833,7766,31845,7717,31856,7668,31868,7619,31880,7571,31891,7522,31903,7473,31914,7424,31926,7375,31937,7326,31948,7277,31959,7228,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,23169,23169,23205,23134,23240,23098,23276,23062,23311,23027,23346,22991,23382,22955,23417,22919,23452,22883,23487,22847,23522,22811,23557,22775,23592,22739,23627,22703,23661,22666,23696,22630,23731,22594,23766,22557,23800,22521,23835,22484,23869,22448,23903,22411,23938,22374,23972,22338,24006,22301,24041,22264,24075,22227,24109,22190,24143,22153,24177,22116,24211,22079,24244,22042,24278,22004,24312,21967,24346,21930,24379,21893,24413,21855,24446,21818,24480,21780,24513,21743,24546,21705,24580,21667,24613,21629,24646,21592,24679,21554,24712,21516,24745,21478,24778,21440,24811,21402,24844,21364,24877,21326,24909,21288,24942,21249,24974,21211,25007,21173,25039,21134,25072,21096,25104,21057,25136,21019,25169,20980,25201,20942,25233,20903,25265,20864,25297,20825,25329,20787,25361,20748,25392,20709,25424,20670,25456,20631,25487,20592,25519,20553,25550,20513,25582,20474,25613,20435,25645,20396,25676,20356,25707,20317,25738,20277,25769,20238,25800,20198,25831,20159,25862,20119,25893,20079,25924,20040,25954,20000,25985,19960,26016,19920,26046,19880,26077,19840,26107,19800,26137,19760,26168,19720,26198,19680,26228,19640,26258,19599,26288,19559,26318,19519,26348,19478,26378,19438,26408,19397,26437,19357,26467,19316,26497,19276,26526,19235,26556,19194,26585,19154,26615,19113,26644,19072,26673,19031,26702,18990,26731,18949,26760,18908,26789,18867,26818,18826,26847,18785,26876,18744,26905,18702,26933,18661,26962,18620,26990,18578,27019,18537,27047,18495,27076,18454,27104,18412,27132,18371,27160,18329,27188,18287,27216,18246,27244,18204,27272,18162,27300,18120,27328,18078,27355,18036,27383,17994,27411,17952,27438,17910,27466,17868,27493,17826,27520,17784,27548,17742,27575,17699,27602,17657,27629,17615,27656,17572,27683,17530,27710,17487,27736,17445,27763,17402,27790,17360,27816,17317,27843,17274,27869,17232,27896,17189,27922,17146,27948,17103,27975,17060,28001,17017,28027,16974,28053,16931,28079,16888,28105,16845,28131,16802,28156,16759,28182,16716,28208,16672,28233,16629,28259,16586,28284,16542,28309,16499,28335,16455,28360,16412,28385,16368,28410,16325,28435,16281,28460,16238,28485,16194,28510,16150,28534,16107,28559,16063,28584,16019,28608,15975,28633,15931,28657,15887,28681,15843,28706,15799,28730,15755,28754,15711,28778,15667,28802,15623,28826,15579,28850,15534,28874,15490,28897,15446,28921,15401,28945,15357,28968,15313,28992,15268,29015,15224,29038,15179,29062,15135,29085,15090,29108,15045,29131,15001,29154,14956,29177,14911,29200,14866,29222,14822,29245,14777,29268,14732,29290,14687,29313,14642,29335,14597,29358,14552,29380,14507,29402,14462,29424,14417,29446,14372,29468,14326,29490,14281,29512,14236,29534,14191,29556,14145,29577,14100,29599,14055,29621,14009,29642,13964,29663,13918,29685,13873,29706,13827,29727,13782,29748,13736,29769,13690,29790,13645,29811,13599,29832,13553,29853,13507,29873,13462,29894,13416,29915,13370,29935,13324,29955,13278,29976,13232,29996,13186,30016,13140,30036,13094,30056,13048,30076,13002,30096,12956,30116,12909,30136,12863,30156,12817,30175,12771,30195,12724,30214,12678,30234,12632,30253,12585,30272,12539,30291,12492,30311,12446,30330,12399,30349,12353,30368,12306,30386,12260,30405,12213,30424,12166,30442,12120,30461,12073,30480,12026,30498,11980,30516,11933,30535,11886,30553,11839,30571,11792,30589,11745,30607,11698,30625,11651,30643,11604,30660,11557,30678,11510,30696,11463,30713,11416,30731,11369,30748,11322,30766,11275,30783,11227,30800,11180,30817,11133,30834,11086,30851,11038,30868,10991,30885,10944,30902,10896,30918,10849,30935,10801,30951,10754,30968,10706,30984,10659,31001,10611,31017,10564,31033,10516,31049,10469,31065,10421,31081,10373,31097,10326,31113,10278,31128,10230,31144,10182,31160,10135,31175,10087,31191,10039,31206,9991,31221,9943,31236,9895,31252,9847,31267,9799,31282,9751,31297,9703,31311,9655,31326,9607,31341,9559,31356,9511,31370,9463,31385,9415,31399,9367,31413,9319,31428,9270,31442,9222,31456,9174,31470,9126,31484,9077,31498,9029,31512,8981,31525,8932,31539,8884,31553,8836,31566,8787,31580,8739,31593,8690,31606,8642,31619,8593,31633,8545,31646,8496,31659,8448,31672,8399,31684,8351,31697,8302,31710,8253,31723,8205,31735,8156,31748,8107,31760,8059,31772,8010,31785,7961,31797,7912,31809,7864,31821,7815,31833,7766,31845,7717,31856,7668,31868,7619,31880,7571,31891,7522,31903,7473,31914,7424,31926,7375,31937,7326,31948,7277,31959,7228,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,23169,23169,23205,23134,23240,23098,23276,23062,23311,23027,23346,22991,23382,22955,23417,22919,23452,22883,23487,22847,23522,22811,23557,22775,23592,22739,23627,22703,23661,22666,23696,22630,23731,22594,23766,22557,23800,22521,23835,22484,23869,22448,23903,22411,23938,22374,23972,22338,24006,22301,24041,22264,24075,22227,24109,22190,24143,22153,24177,22116,24211,22079,24244,22042,24278,22004,24312,21967,24346,21930,24379,21893,24413,21855,24446,21818,24480,21780,24513,21743,24546,21705,24580,21667,24613,21629,24646,21592,24679,21554,24712,21516,24745,21478,24778,21440,24811,21402,24844,21364,24877,21326,24909,21288,24942,21249,24974,21211,25007,21173,25039,21134,25072,21096,25104,21057,25136,21019,25169,20980,25201,20942,25233,20903,25265,20864,25297,20825,25329,20787,25361,20748,25392,20709,25424,20670,25456,20631,25487,20592,25519,20553,25550,20513,25582,20474,25613,20435,25645,20396,25676,20356,25707,20317,25738,20277,25769,20238,25800,20198,25831,20159,25862,20119,25893,20079,25924,20040,25954,20000,25985,19960,26016,19920,26046,19880,26077,19840,26107,19800,26137,19760,26168,19720,26198,19680,26228,19640,26258,19599,26288,19559,26318,19519,26348,19478,26378,19438,26408,19397,26437,19357,26467,19316,26497,19276,26526,19235,26556,19194,26585,19154,26615,19113,26644,19072,26673,19031,26702,18990,26731,18949,26760,18908,26789,18867,26818,18826,26847,18785,26876,18744,26905,18702,26933,18661,26962,18620,26990,18578,27019,18537,27047,18495,27076,18454,27104,18412,27132,18371,27160,18329,27188,18287,27216,18246,27244,18204,27272,18162,27300,18120,27328,18078,27355,18036,27383,17994,27411,17952,27438,17910,27466,17868,27493,17826,27520,17784,27548,17742,27575,17699,27602,17657,27629,17615,27656,17572,27683,17530,27710,17487,27736,17445,27763,17402,27790,17360,27816,17317,27843,17274,27869,17232,27896,17189,27922,17146,27948,17103,27975,17060,28001,17017,28027,16974,28053,16931,28079,16888,28105,16845,28131,16802,28156,16759,28182,16716,28208,16672,28233,16629,28259,16586,28284,16542,28309,16499,28335,16455,28360,16412,28385,16368,28410,16325,28435,16281,28460,16238,28485,16194,28510,16150,28534,16107,28559,16063,28584,16019,28608,15975,28633,15931,28657,15887,28681,15843,28706,15799,28730,15755,28754,15711,28778,15667,28802,15623,28826,15579,28850,15534,28874,15490,28897,15446,28921,15401,28945,15357,28968,15313,28992,15268,29015,15224,29038,15179,29062,15135,29085,15090,29108,15045,29131,15001,29154,14956,29177,14911,29200,14866,29222,14822,29245,14777,29268,14732,29290,14687,29313,14642,29335,14597,29358,14552,29380,14507,29402,14462,29424,14417,29446,14372,29468,14326,29490,14281,29512,14236,29534,14191,29556,14145,29577,14100,29599,14055,29621,14009,29642,13964,29663,13918,29685,13873,29706,13827,29727,13782,29748,13736,29769,13690,29790,13645,29811,13599,29832,13553,29853,13507,29873,13462,29894,13416,29915,13370,29935,13324,29955,13278,29976,13232,29996,13186,30016,13140,30036,13094,30056,13048,30076,13002,30096,12956,30116,12909,30136,12863,30156,12817,30175,12771,30195,12724,30214,12678,30234,12632,30253,12585,30272,12539,30291,12492,30311,12446,30330,12399,30349,12353,30368,12306,30386,12260,30405,12213,30424,12166,30442,12120,30461,12073,30480,12026,30498,11980,30516,11933,30535,11886,30553,11839,30571,11792,30589,11745,30607,11698,30625,11651,30643,11604,30660,11557,30678,11510,30696,11463,30713,11416,30731,11369,30748,11322,30766,11275,30783,11227,30800,11180,30817,11133,30834,11086,30851,11038,30868,10991,30885,10944,30902,10896,30918,10849,30935,10801,30951,10754,30968,10706,30984,10659,31001,10611,31017,10564,31033,10516,31049,10469,31065,10421,31081,10373,31097,10326,31113,10278,31128,10230,31144,10182,31160,10135,31175,10087,31191,10039,31206,9991,31221,9943,31236,9895,31252,9847,31267,9799,31282,9751,31297,9703,31311,9655,31326,9607,31341,9559,31356,9511,31370,9463,31385,9415,31399,9367,31413,9319,31428,9270,31442,9222,31456,9174,31470,9126,31484,9077,31498,9029,31512,8981,31525,8932,31539,8884,31553,8836,31566,8787,31580,8739,31593,8690,31606,8642,31619,8593,31633,8545,31646,8496,31659,8448,31672,8399,31684,8351,31697,8302,31710,8253,31723,8205,31735,8156,31748,8107,31760,8059,31772,8010,31785,7961,31797,7912,31809,7864,31821,7815,31833,7766,31845,7717,31856,7668,31868,7619,31880,7571,31891,7522,31903,7473,31914,7424,31926,7375,31937,7326,31948,7277,31959,7228,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51,23169,23169,23205,23134,23240,23098,23276,23062,23311,23027,23346,22991,23382,22955,23417,22919,23452,22883,23487,22847,23522,22811,23557,22775,23592,22739,23627,22703,23661,22666,23696,22630,23731,22594,23766,22557,23800,22521,23835,22484,23869,22448,23903,22411,23938,22374,23972,22338,24006,22301,24041,22264,24075,22227,24109,22190,24143,22153,24177,22116,24211,22079,24244,22042,24278,22004,24312,21967,24346,21930,24379,21893,24413,21855,24446,21818,24480,21780,24513,21743,24546,21705,24580,21667,24613,21629,24646,21592,24679,21554,24712,21516,24745,21478,24778,21440,24811,21402,24844,21364,24877,21326,24909,21288,24942,21249,24974,21211,25007,21173,25039,21134,25072,21096,25104,21057,25136,21019,25169,20980,25201,20942,25233,20903,25265,20864,25297,20825,25329,20787,25361,20748,25392,20709,25424,20670,25456,20631,25487,20592,25519,20553,25550,20513,25582,20474,25613,20435,25645,20396,25676,20356,25707,20317,25738,20277,25769,20238,25800,20198,25831,20159,25862,20119,25893,20079,25924,20040,25954,20000,25985,19960,26016,19920,26046,19880,26077,19840,26107,19800,26137,19760,26168,19720,26198,19680,26228,19640,26258,19599,26288,19559,26318,19519,26348,19478,26378,19438,26408,19397,26437,19357,26467,19316,26497,19276,26526,19235,26556,19194,26585,19154,26615,19113,26644,19072,26673,19031,26702,18990,26731,18949,26760,18908,26789,18867,26818,18826,26847,18785,26876,18744,26905,18702,26933,18661,26962,18620,26990,18578,27019,18537,27047,18495,27076,18454,27104,18412,27132,18371,27160,18329,27188,18287,27216,18246,27244,18204,27272,18162,27300,18120,27328,18078,27355,18036,27383,17994,27411,17952,27438,17910,27466,17868,27493,17826,27520,17784,27548,17742,27575,17699,27602,17657,27629,17615,27656,17572,27683,17530,27710,17487,27736,17445,27763,17402,27790,17360,27816,17317,27843,17274,27869,17232,27896,17189,27922,17146,27948,17103,27975,17060,28001,17017,28027,16974,28053,16931,28079,16888,28105,16845,28131,16802,28156,16759,28182,16716,28208,16672,28233,16629,28259,16586,28284,16542,28309,16499,28335,16455,28360,16412,28385,16368,28410,16325,28435,16281,28460,16238,28485,16194,28510,16150,28534,16107,28559,16063,28584,16019,28608,15975,28633,15931,28657,15887,28681,15843,28706,15799,28730,15755,28754,15711,28778,15667,28802,15623,28826,15579,28850,15534,28874,15490,28897,15446,28921,15401,28945,15357,28968,15313,28992,15268,29015,15224,29038,15179,29062,15135,29085,15090,29108,15045,29131,15001,29154,14956,29177,14911,29200,14866,29222,14822,29245,14777,29268,14732,29290,14687,29313,14642,29335,14597,29358,14552,29380,14507,29402,14462,29424,14417,29446,14372,29468,14326,29490,14281,29512,14236,29534,14191,29556,14145,29577,14100,29599,14055,29621,14009,29642,13964,29663,13918,29685,13873,29706,13827,29727,13782,29748,13736,29769,13690,29790,13645,29811,13599,29832,13553,29853,13507,29873,13462,29894,13416,29915,13370,29935,13324,29955,13278,29976,13232,29996,13186,30016,13140,30036,13094,30056,13048,30076,13002,30096,12956,30116,12909,30136,12863,30156,12817,30175,12771,30195,12724,30214,12678,30234,12632,30253,12585,30272,12539,30291,12492,30311,12446,30330,12399,30349,12353,30368,12306,30386,12260,30405,12213,30424,12166,30442,12120,30461,12073,30480,12026,30498,11980,30516,11933,30535,11886,30553,11839,30571,11792,30589,11745,30607,11698,30625,11651,30643,11604,30660,11557,30678,11510,30696,11463,30713,11416,30731,11369,30748,11322,30766,11275,30783,11227,30800,11180,30817,11133,30834,11086,30851,11038,30868,10991,30885,10944,30902,10896,30918,10849,30935,10801,30951,10754,30968,10706,30984,10659,31001,10611,31017,10564,31033,10516,31049,10469,31065,10421,31081,10373,31097,10326,31113,10278,31128,10230,31144,10182,31160,10135,31175,10087,31191,10039,31206,9991,31221,9943,31236,9895,31252,9847,31267,9799,31282,9751,31297,9703,31311,9655,31326,9607,31341,9559,31356,9511,31370,9463,31385,9415,31399,9367,31413,9319,31428,9270,31442,9222,31456,9174,31470,9126,31484,9077,31498,9029,31512,8981,31525,8932,31539,8884,31553,8836,31566,8787,31580,8739,31593,8690,31606,8642,31619,8593,31633,8545,31646,8496,31659,8448,31672,8399,31684,8351,31697,8302,31710,8253,31723,8205,31735,8156,31748,8107,31760,8059,31772,8010,31785,7961,31797,7912,31809,7864,31821,7815,31833,7766,31845,7717,31856,7668,31868,7619,31880,7571,31891,7522,31903,7473,31914,7424,31926,7375,31937,7326,31948,7277,31959,7228,31970,7179,31981,7130,31992,7081,32003,7032,32014,6982,32024,6933,32035,6884,32046,6835,32056,6786,32066,6737,32077,6688,32087,6638,32097,6589,32107,6540,32117,6491,32127,6441,32137,6392,32147,6343,32156,6293,32166,6244,32176,6195,32185,6145,32194,6096,32204,6047,32213,5997,32222,5948,32231,5898,32240,5849,32249,5799,32258,5750,32267,5700,32275,5651,32284,5601,32293,5552,32301,5502,32310,5453,32318,5403,32326,5354,32334,5304,32342,5254,32350,5205,32358,5155,32366,5106,32374,5056,32382,5006,32389,4957,32397,4907,32404,4857,32412,4807,32419,4758,32426,4708,32434,4658,32441,4608,32448,4559,32455,4509,32462,4459,32468,4409,32475,4359,32482,4310,32488,4260,32495,4210,32501,4160,32508,4110,32514,4060,32520,4011,32526,3961,32532,3911,32538,3861,32544,3811,32550,3761,32556,3711,32561,3661,32567,3611,32572,3561,32578,3511,32583,3461,32588,3411,32594,3361,32599,3311,32604,3261,32609,3211,32614,3161,32618,3111,32623,3061,32628,3011,32632,2961,32637,2911,32641,2861,32646,2811,32650,2761,32654,2711,32658,2661,32662,2610,32666,2560,32670,2510,32674,2460,32678,2410,32681,2360,32685,2310,32688,2260,32692,2209,32695,2159,32699,2109,32702,2059,32705,2009,32708,1959,32711,1908,32714,1858,32717,1808,32719,1758,32722,1708,32725,1658,32727,1607,32729,1557,32732,1507,32734,1457,32736,1406,32738,1356,32740,1306,32742,1256,32744,1206,32746,1155,32748,1105,32750,1055,32751,1005,32753,954,32754,904,32755,854,32757,804,32758,753,32759,703,32760,653,32761,603,32762,552,32763,502,32763,452,32764,402,32765,351,32765,301,32766,251,32766,201,32766,150,32766,100,32766,50,32767,0,32766,-51,32766,-101,32766,-151,32766,-202,32766,-252,32765,-302,32765,-352,32764,-403,32763,-453,32763,-503,32762,-553,32761,-604,32760,-654,32759,-704,32758,-754,32757,-805,32755,-855,32754,-905,32753,-955,32751,-1006,32750,-1056,32748,-1106,32746,-1156,32744,-1207,32742,-1257,32740,-1307,32738,-1357,32736,-1407,32734,-1458,32732,-1508,32729,-1558,32727,-1608,32725,-1659,32722,-1709,32719,-1759,32717,-1809,32714,-1859,32711,-1909,32708,-1960,32705,-2010,32702,-2060,32699,-2110,32695,-2160,32692,-2210,32688,-2261,32685,-2311,32681,-2361,32678,-2411,32674,-2461,32670,-2511,32666,-2561,32662,-2611,32658,-2662,32654,-2712,32650,-2762,32646,-2812,32641,-2862,32637,-2912,32632,-2962,32628,-3012,32623,-3062,32618,-3112,32614,-3162,32609,-3212,32604,-3262,32599,-3312,32594,-3362,32588,-3412,32583,-3462,32578,-3512,32572,-3562,32567,-3612,32561,-3662,32556,-3712,32550,-3762,32544,-3812,32538,-3862,32532,-3912,32526,-3962,32520,-4012,32514,-4061,32508,-4111,32501,-4161,32495,-4211,32488,-4261,32482,-4311,32475,-4360,32468,-4410,32462,-4460,32455,-4510,32448,-4560,32441,-4609,32434,-4659,32426,-4709,32419,-4759,32412,-4808,32404,-4858,32397,-4908,32389,-4958,32382,-5007,32374,-5057,32366,-5107,32358,-5156,32350,-5206,32342,-5255,32334,-5305,32326,-5355,32318,-5404,32310,-5454,32301,-5503,32293,-5553,32284,-5602,32275,-5652,32267,-5701,32258,-5751,32249,-5800,32240,-5850,32231,-5899,32222,-5949,32213,-5998,32204,-6048,32194,-6097,32185,-6146,32176,-6196,32166,-6245,32156,-6294,32147,-6344,32137,-6393,32127,-6442,32117,-6492,32107,-6541,32097,-6590,32087,-6639,32077,-6689,32066,-6738,32056,-6787,32046,-6836,32035,-6885,32024,-6934,32014,-6983,32003,-7033,31992,-7082,31981,-7131,31970,-7180,31959,-7229,31948,-7278,31937,-7327,31926,-7376,31914,-7425,31903,-7474,31891,-7523,31880,-7572,31868,-7620,31856,-7669,31845,-7718,31833,-7767,31821,-7816,31809,-7865,31797,-7913,31785,-7962,31772,-8011,31760,-8060,31748,-8108,31735,-8157,31723,-8206,31710,-8254,31697,-8303,31684,-8352,31672,-8400,31659,-8449,31646,-8497,31633,-8546,31619,-8594,31606,-8643,31593,-8691,31580,-8740,31566,-8788,31553,-8837,31539,-8885,31525,-8933,31512,-8982,31498,-9030,31484,-9078,31470,-9127,31456,-9175,31442,-9223,31428,-9271,31413,-9320,31399,-9368,31385,-9416,31370,-9464,31356,-9512,31341,-9560,31326,-9608,31311,-9656,31297,-9704,31282,-9752,31267,-9800,31252,-9848,31236,-9896,31221,-9944,31206,-9992,31191,-10040,31175,-10088,31160,-10136,31144,-10183,31128,-10231,31113,-10279,31097,-10327,31081,-10374,31065,-10422,31049,-10470,31033,-10517,31017,-10565,31001,-10612,30984,-10660,30968,-10707,30951,-10755,30935,-10802,30918,-10850,30902,-10897,30885,-10945,30868,-10992,30851,-11039,30834,-11087,30817,-11134,30800,-11181,30783,-11228,30766,-11276,30748,-11323,30731,-11370,30713,-11417,30696,-11464,30678,-11511,30660,-11558,30643,-11605,30625,-11652,30607,-11699,30589,-11746,30571,-11793,30553,-11840,30535,-11887,30516,-11934,30498,-11981,30480,-12027,30461,-12074,30442,-12121,30424,-12167,30405,-12214,30386,-12261,30368,-12307,30349,-12354,30330,-12400,30311,-12447,30291,-12493,30272,-12540,30253,-12586,30234,-12633,30214,-12679,30195,-12725,30175,-12772,30156,-12818,30136,-12864,30116,-12910,30096,-12957,30076,-13003,30056,-13049,30036,-13095,30016,-13141,29996,-13187,29976,-13233,29955,-13279,29935,-13325,29915,-13371,29894,-13417,29873,-13463,29853,-13508,29832,-13554,29811,-13600,29790,-13646,29769,-13691,29748,-13737,29727,-13783,29706,-13828,29685,-13874,29663,-13919,29642,-13965,29621,-14010,29599,-14056,29577,-14101,29556,-14146,29534,-14192,29512,-14237,29490,-14282,29468,-14327,29446,-14373,29424,-14418,29402,-14463,29380,-14508,29358,-14553,29335,-14598,29313,-14643,29290,-14688,29268,-14733,29245,-14778,29222,-14823,29200,-14867,29177,-14912,29154,-14957,29131,-15002,29108,-15046,29085,-15091,29062,-15136,29038,-15180,29015,-15225,28992,-15269,28968,-15314,28945,-15358,28921,-15402,28897,-15447,28874,-15491,28850,-15535,28826,-15580,28802,-15624,28778,-15668,28754,-15712,28730,-15756,28706,-15800,28681,-15844,28657,-15888,28633,-15932,28608,-15976,28584,-16020,28559,-16064,28534,-16108,28510,-16151,28485,-16195,28460,-16239,28435,-16282,28410,-16326,28385,-16369,28360,-16413,28335,-16456,28309,-16500,28284,-16543,28259,-16587,28233,-16630,28208,-16673,28182,-16717,28156,-16760,28131,-16803,28105,-16846,28079,-16889,28053,-16932,28027,-16975,28001,-17018,27975,-17061,27948,-17104,27922,-17147,27896,-17190,27869,-17233,27843,-17275,27816,-17318,27790,-17361,27763,-17403,27736,-17446,27710,-17488,27683,-17531,27656,-17573,27629,-17616,27602,-17658,27575,-17700,27548,-17743,27520,-17785,27493,-17827,27466,-17869,27438,-17911,27411,-17953,27383,-17995,27355,-18037,27328,-18079,27300,-18121,27272,-18163,27244,-18205,27216,-18247,27188,-18288,27160,-18330,27132,-18372,27104,-18413,27076,-18455,27047,-18496,27019,-18538,26990,-18579,26962,-18621,26933,-18662,26905,-18703,26876,-18745,26847,-18786,26818,-18827,26789,-18868,26760,-18909,26731,-18950,26702,-18991,26673,-19032,26644,-19073,26615,-19114,26585,-19155,26556,-19195,26526,-19236,26497,-19277,26467,-19317,26437,-19358,26408,-19398,26378,-19439,26348,-19479,26318,-19520,26288,-19560,26258,-19600,26228,-19641,26198,-19681,26168,-19721,26137,-19761,26107,-19801,26077,-19841,26046,-19881,26016,-19921,25985,-19961,25954,-20001,25924,-20041,25893,-20080,25862,-20120,25831,-20160,25800,-20199,25769,-20239,25738,-20278,25707,-20318,25676,-20357,25645,-20397,25613,-20436,25582,-20475,25550,-20514,25519,-20554,25487,-20593,25456,-20632,25424,-20671,25392,-20710,25361,-20749,25329,-20788,25297,-20826,25265,-20865,25233,-20904,25201,-20943,25169,-20981,25136,-21020,25104,-21058,25072,-21097,25039,-21135,25007,-21174,24974,-21212,24942,-21250,24909,-21289,24877,-21327,24844,-21365,24811,-21403,24778,-21441,24745,-21479,24712,-21517,24679,-21555,24646,-21593,24613,-21630,24580,-21668,24546,-21706,24513,-21744,24480,-21781,24446,-21819,24413,-21856,24379,-21894,24346,-21931,24312,-21968,24278,-22005,24244,-22043,24211,-22080,24177,-22117,24143,-22154,24109,-22191,24075,-22228,24041,-22265,24006,-22302,23972,-22339,23938,-22375,23903,-22412,23869,-22449,23835,-22485,23800,-22522,23766,-22558,23731,-22595,23696,-22631,23661,-22667,23627,-22704,23592,-22740,23557,-22776,23522,-22812,23487,-22848,23452,-22884,23417,-22920,23382,-22956,23346,-22992,23311,-23028,23276,-23063,23240,-23099,23205,-23135,23169,-23170,23134,-23206,23098,-23241,23062,-23277,23027,-23312,22991,-23347,22955,-23383,22919,-23418,22883,-23453,22847,-23488,22811,-23523,22775,-23558,22739,-23593,22703,-23628,22666,-23662,22630,-23697,22594,-23732,22557,-23767,22521,-23801,22484,-23836,22448,-23870,22411,-23904,22374,-23939,22338,-23973,22301,-24007,22264,-24042,22227,-24076,22190,-24110,22153,-24144,22116,-24178,22079,-24212,22042,-24245,22004,-24279,21967,-24313,21930,-24347,21893,-24380,21855,-24414,21818,-24447,21780,-24481,21743,-24514,21705,-24547,21667,-24581,21629,-24614,21592,-24647,21554,-24680,21516,-24713,21478,-24746,21440,-24779,21402,-24812,21364,-24845,21326,-24878,21288,-24910,21249,-24943,21211,-24975,21173,-25008,21134,-25040,21096,-25073,21057,-25105,21019,-25137,20980,-25170,20942,-25202,20903,-25234,20864,-25266,20825,-25298,20787,-25330,20748,-25362,20709,-25393,20670,-25425,20631,-25457,20592,-25488,20553,-25520,20513,-25551,20474,-25583,20435,-25614,20396,-25646,20356,-25677,20317,-25708,20277,-25739,20238,-25770,20198,-25801,20159,-25832,20119,-25863,20079,-25894,20040,-25925,20000,-25955,19960,-25986,19920,-26017,19880,-26047,19840,-26078,19800,-26108,19760,-26138,19720,-26169,19680,-26199,19640,-26229,19599,-26259,19559,-26289,19519,-26319,19478,-26349,19438,-26379,19397,-26409,19357,-26438,19316,-26468,19276,-26498,19235,-26527,19194,-26557,19154,-26586,19113,-26616,19072,-26645,19031,-26674,18990,-26703,18949,-26732,18908,-26761,18867,-26790,18826,-26819,18785,-26848,18744,-26877,18702,-26906,18661,-26934,18620,-26963,18578,-26991,18537,-27020,18495,-27048,18454,-27077,18412,-27105,18371,-27133,18329,-27161,18287,-27189,18246,-27217,18204,-27245,18162,-27273,18120,-27301,18078,-27329,18036,-27356,17994,-27384,17952,-27412,17910,-27439,17868,-27467,17826,-27494,17784,-27521,17742,-27549,17699,-27576,17657,-27603,17615,-27630,17572,-27657,17530,-27684,17487,-27711,17445,-27737,17402,-27764,17360,-27791,17317,-27817,17274,-27844,17232,-27870,17189,-27897,17146,-27923,17103,-27949,17060,-27976,17017,-28002,16974,-28028,16931,-28054,16888,-28080,16845,-28106,16802,-28132,16759,-28157,16716,-28183,16672,-28209,16629,-28234,16586,-28260,16542,-28285,16499,-28310,16455,-28336,16412,-28361,16368,-28386,16325,-28411,16281,-28436,16238,-28461,16194,-28486,16150,-28511,16107,-28535,16063,-28560,16019,-28585,15975,-28609,15931,-28634,15887,-28658,15843,-28682,15799,-28707,15755,-28731,15711,-28755,15667,-28779,15623,-28803,15579,-28827,15534,-28851,15490,-28875,15446,-28898,15401,-28922,15357,-28946,15313,-28969,15268,-28993,15224,-29016,15179,-29039,15135,-29063,15090,-29086,15045,-29109,15001,-29132,14956,-29155,14911,-29178,14866,-29201,14822,-29223,14777,-29246,14732,-29269,14687,-29291,14642,-29314,14597,-29336,14552,-29359,14507,-29381,14462,-29403,14417,-29425,14372,-29447,14326,-29469,14281,-29491,14236,-29513,14191,-29535,14145,-29557,14100,-29578,14055,-29600,14009,-29622,13964,-29643,13918,-29664,13873,-29686,13827,-29707,13782,-29728,13736,-29749,13690,-29770,13645,-29791,13599,-29812,13553,-29833,13507,-29854,13462,-29874,13416,-29895,13370,-29916,13324,-29936,13278,-29956,13232,-29977,13186,-29997,13140,-30017,13094,-30037,13048,-30057,13002,-30077,12956,-30097,12909,-30117,12863,-30137,12817,-30157,12771,-30176,12724,-30196,12678,-30215,12632,-30235,12585,-30254,12539,-30273,12492,-30292,12446,-30312,12399,-30331,12353,-30350,12306,-30369,12260,-30387,12213,-30406,12166,-30425,12120,-30443,12073,-30462,12026,-30481,11980,-30499,11933,-30517,11886,-30536,11839,-30554,11792,-30572,11745,-30590,11698,-30608,11651,-30626,11604,-30644,11557,-30661,11510,-30679,11463,-30697,11416,-30714,11369,-30732,11322,-30749,11275,-30767,11227,-30784,11180,-30801,11133,-30818,11086,-30835,11038,-30852,10991,-30869,10944,-30886,10896,-30903,10849,-30919,10801,-30936,10754,-30952,10706,-30969,10659,-30985,10611,-31002,10564,-31018,10516,-31034,10469,-31050,10421,-31066,10373,-31082,10326,-31098,10278,-31114,10230,-31129,10182,-31145,10135,-31161,10087,-31176,10039,-31192,9991,-31207,9943,-31222,9895,-31237,9847,-31253,9799,-31268,9751,-31283,9703,-31298,9655,-31312,9607,-31327,9559,-31342,9511,-31357,9463,-31371,9415,-31386,9367,-31400,9319,-31414,9270,-31429,9222,-31443,9174,-31457,9126,-31471,9077,-31485,9029,-31499,8981,-31513,8932,-31526,8884,-31540,8836,-31554,8787,-31567,8739,-31581,8690,-31594,8642,-31607,8593,-31620,8545,-31634,8496,-31647,8448,-31660,8399,-31673,8351,-31685,8302,-31698,8253,-31711,8205,-31724,8156,-31736,8107,-31749,8059,-31761,8010,-31773,7961,-31786,7912,-31798,7864,-31810,7815,-31822,7766,-31834,7717,-31846,7668,-31857,7619,-31869,7571,-31881,7522,-31892,7473,-31904,7424,-31915,7375,-31927,7326,-31938,7277,-31949,7228,-31960,7179,-31971,7130,-31982,7081,-31993,7032,-32004,6982,-32015,6933,-32025,6884,-32036,6835,-32047,6786,-32057,6737,-32067,6688,-32078,6638,-32088,6589,-32098,6540,-32108,6491,-32118,6441,-32128,6392,-32138,6343,-32148,6293,-32157,6244,-32167,6195,-32177,6145,-32186,6096,-32195,6047,-32205,5997,-32214,5948,-32223,5898,-32232,5849,-32241,5799,-32250,5750,-32259,5700,-32268,5651,-32276,5601,-32285,5552,-32294,5502,-32302,5453,-32311,5403,-32319,5354,-32327,5304,-32335,5254,-32343,5205,-32351,5155,-32359,5106,-32367,5056,-32375,5006,-32383,4957,-32390,4907,-32398,4857,-32405,4807,-32413,4758,-32420,4708,-32427,4658,-32435,4608,-32442,4559,-32449,4509,-32456,4459,-32463,4409,-32469,4359,-32476,4310,-32483,4260,-32489,4210,-32496,4160,-32502,4110,-32509,4060,-32515,4011,-32521,3961,-32527,3911,-32533,3861,-32539,3811,-32545,3761,-32551,3711,-32557,3661,-32562,3611,-32568,3561,-32573,3511,-32579,3461,-32584,3411,-32589,3361,-32595,3311,-32600,3261,-32605,3211,-32610,3161,-32615,3111,-32619,3061,-32624,3011,-32629,2961,-32633,2911,-32638,2861,-32642,2811,-32647,2761,-32651,2711,-32655,2661,-32659,2610,-32663,2560,-32667,2510,-32671,2460,-32675,2410,-32679,2360,-32682,2310,-32686,2260,-32689,2209,-32693,2159,-32696,2109,-32700,2059,-32703,2009,-32706,1959,-32709,1908,-32712,1858,-32715,1808,-32718,1758,-32720,1708,-32723,1658,-32726,1607,-32728,1557,-32730,1507,-32733,1457,-32735,1406,-32737,1356,-32739,1306,-32741,1256,-32743,1206,-32745,1155,-32747,1105,-32749,1055,-32751,1005,-32752,954,-32754,904,-32755,854,-32756,804,-32758,753,-32759,703,-32760,653,-32761,603,-32762,552,-32763,502,-32764,452,-32764,402,-32765,351,-32766,301,-32766,251,-32767,201,-32767,150,-32767,100,-32767,50,-32767,0,-32767,-51,-32767,-101,-32767,-151,-32767,-202,-32767,-252,-32767,-302,-32766,-352,-32766,-403,-32765,-453,-32764,-503,-32764,-553,-32763,-604,-32762,-654,-32761,-704,-32760,-754,-32759,-805,-32758,-855,-32756,-905,-32755,-955,-32754,-1006,-32752,-1056,-32751,-1106,-32749,-1156,-32747,-1207,-32745,-1257,-32743,-1307,-32741,-1357,-32739,-1407,-32737,-1458,-32735,-1508,-32733,-1558,-32730,-1608,-32728,-1659,-32726,-1709,-32723,-1759,-32720,-1809,-32718,-1859,-32715,-1909,-32712,-1960,-32709,-2010,-32706,-2060,-32703,-2110,-32700,-2160,-32696,-2210,-32693,-2261,-32689,-2311,-32686,-2361,-32682,-2411,-32679,-2461,-32675,-2511,-32671,-2561,-32667,-2611,-32663,-2662,-32659,-2712,-32655,-2762,-32651,-2812,-32647,-2862,-32642,-2912,-32638,-2962,-32633,-3012,-32629,-3062,-32624,-3112,-32619,-3162,-32615,-3212,-32610,-3262,-32605,-3312,-32600,-3362,-32595,-3412,-32589,-3462,-32584,-3512,-32579,-3562,-32573,-3612,-32568,-3662,-32562,-3712,-32557,-3762,-32551,-3812,-32545,-3862,-32539,-3912,-32533,-3962,-32527,-4012,-32521,-4061,-32515,-4111,-32509,-4161,-32502,-4211,-32496,-4261,-32489,-4311,-32483,-4360,-32476,-4410,-32469,-4460,-32463,-4510,-32456,-4560,-32449,-4609,-32442,-4659,-32435,-4709,-32427,-4759,-32420,-4808,-32413,-4858,-32405,-4908,-32398,-4958,-32390,-5007,-32383,-5057,-32375,-5107,-32367,-5156,-32359,-5206,-32351,-5255,-32343,-5305,-32335,-5355,-32327,-5404,-32319,-5454,-32311,-5503,-32302,-5553,-32294,-5602,-32285,-5652,-32276,-5701,-32268,-5751,-32259,-5800,-32250,-5850,-32241,-5899,-32232,-5949,-32223,-5998,-32214,-6048,-32205,-6097,-32195,-6146,-32186,-6196,-32177,-6245,-32167,-6294,-32157,-6344,-32148,-6393,-32138,-6442,-32128,-6492,-32118,-6541,-32108,-6590,-32098,-6639,-32088,-6689,-32078,-6738,-32067,-6787,-32057,-6836,-32047,-6885,-32036,-6934,-32025,-6983,-32015,-7033,-32004,-7082,-31993,-7131,-31982,-7180,-31971,-7229,-31960,-7278,-31949,-7327,-31938,-7376,-31927,-7425,-31915,-7474,-31904,-7523,-31892,-7572,-31881,-7620,-31869,-7669,-31857,-7718,-31846,-7767,-31834,-7816,-31822,-7865,-31810,-7913,-31798,-7962,-31786,-8011,-31773,-8060,-31761,-8108,-31749,-8157,-31736,-8206,-31724,-8254,-31711,-8303,-31698,-8352,-31685,-8400,-31673,-8449,-31660,-8497,-31647,-8546,-31634,-8594,-31620,-8643,-31607,-8691,-31594,-8740,-31581,-8788,-31567,-8837,-31554,-8885,-31540,-8933,-31526,-8982,-31513,-9030,-31499,-9078,-31485,-9127,-31471,-9175,-31457,-9223,-31443,-9271,-31429,-9320,-31414,-9368,-31400,-9416,-31386,-9464,-31371,-9512,-31357,-9560,-31342,-9608,-31327,-9656,-31312,-9704,-31298,-9752,-31283,-9800,-31268,-9848,-31253,-9896,-31237,-9944,-31222,-9992,-31207,-10040,-31192,-10088,-31176,-10136,-31161,-10183,-31145,-10231,-31129,-10279,-31114,-10327,-31098,-10374,-31082,-10422,-31066,-10470,-31050,-10517,-31034,-10565,-31018,-10612,-31002,-10660,-30985,-10707,-30969,-10755,-30952,-10802,-30936,-10850,-30919,-10897,-30903,-10945,-30886,-10992,-30869,-11039,-30852,-11087,-30835,-11134,-30818,-11181,-30801,-11228,-30784,-11276,-30767,-11323,-30749,-11370,-30732,-11417,-30714,-11464,-30697,-11511,-30679,-11558,-30661,-11605,-30644,-11652,-30626,-11699,-30608,-11746,-30590,-11793,-30572,-11840,-30554,-11887,-30536,-11934,-30517,-11981,-30499,-12027,-30481,-12074,-30462,-12121,-30443,-12167,-30425,-12214,-30406,-12261,-30387,-12307,-30369,-12354,-30350,-12400,-30331,-12447,-30312,-12493,-30292,-12540,-30273,-12586,-30254,-12633,-30235,-12679,-30215,-12725,-30196,-12772,-30176,-12818,-30157,-12864,-30137,-12910,-30117,-12957,-30097,-13003,-30077,-13049,-30057,-13095,-30037,-13141,-30017,-13187,-29997,-13233,-29977,-13279,-29956,-13325,-29936,-13371,-29916,-13417,-29895,-13463,-29874,-13508,-29854,-13554,-29833,-13600,-29812,-13646,-29791,-13691,-29770,-13737,-29749,-13783,-29728,-13828,-29707,-13874,-29686,-13919,-29664,-13965,-29643,-14010,-29622,-14056,-29600,-14101,-29578,-14146,-29557,-14192,-29535,-14237,-29513,-14282,-29491,-14327,-29469,-14373,-29447,-14418,-29425,-14463,-29403,-14508,-29381,-14553,-29359,-14598,-29336,-14643,-29314,-14688,-29291,-14733,-29269,-14778,-29246,-14823,-29223,-14867,-29201,-14912,-29178,-14957,-29155,-15002,-29132,-15046,-29109,-15091,-29086,-15136,-29063,-15180,-29039,-15225,-29016,-15269,-28993,-15314,-28969,-15358,-28946,-15402,-28922,-15447,-28898,-15491,-28875,-15535,-28851,-15580,-28827,-15624,-28803,-15668,-28779,-15712,-28755,-15756,-28731,-15800,-28707,-15844,-28682,-15888,-28658,-15932,-28634,-15976,-28609,-16020,-28585,-16064,-28560,-16108,-28535,-16151,-28511,-16195,-28486,-16239,-28461,-16282,-28436,-16326,-28411,-16369,-28386,-16413,-28361,-16456,-28336,-16500,-28310,-16543,-28285,-16587,-28260,-16630,-28234,-16673,-28209,-16717,-28183,-16760,-28157,-16803,-28132,-16846,-28106,-16889,-28080,-16932,-28054,-16975,-28028,-17018,-28002,-17061,-27976,-17104,-27949,-17147,-27923,-17190,-27897,-17233,-27870,-17275,-27844,-17318,-27817,-17361,-27791,-17403,-27764,-17446,-27737,-17488,-27711,-17531,-27684,-17573,-27657,-17616,-27630,-17658,-27603,-17700,-27576,-17743,-27549,-17785,-27521,-17827,-27494,-17869,-27467,-17911,-27439,-17953,-27412,-17995,-27384,-18037,-27356,-18079,-27329,-18121,-27301,-18163,-27273,-18205,-27245,-18247,-27217,-18288,-27189,-18330,-27161,-18372,-27133,-18413,-27105,-18455,-27077,-18496,-27048,-18538,-27020,-18579,-26991,-18621,-26963,-18662,-26934,-18703,-26906,-18745,-26877,-18786,-26848,-18827,-26819,-18868,-26790,-18909,-26761,-18950,-26732,-18991,-26703,-19032,-26674,-19073,-26645,-19114,-26616,-19155,-26586,-19195,-26557,-19236,-26527,-19277,-26498,-19317,-26468,-19358,-26438,-19398,-26409,-19439,-26379,-19479,-26349,-19520,-26319,-19560,-26289,-19600,-26259,-19641,-26229,-19681,-26199,-19721,-26169,-19761,-26138,-19801,-26108,-19841,-26078,-19881,-26047,-19921,-26017,-19961,-25986,-20001,-25955,-20041,-25925,-20080,-25894,-20120,-25863,-20160,-25832,-20199,-25801,-20239,-25770,-20278,-25739,-20318,-25708,-20357,-25677,-20397,-25646,-20436,-25614,-20475,-25583,-20514,-25551,-20554,-25520,-20593,-25488,-20632,-25457,-20671,-25425,-20710,-25393,-20749,-25362,-20788,-25330,-20826,-25298,-20865,-25266,-20904,-25234,-20943,-25202,-20981,-25170,-21020,-25137,-21058,-25105,-21097,-25073,-21135,-25040,-21174,-25008,-21212,-24975,-21250,-24943,-21289,-24910,-21327,-24878,-21365,-24845,-21403,-24812,-21441,-24779,-21479,-24746,-21517,-24713,-21555,-24680,-21593,-24647,-21630,-24614,-21668,-24581,-21706,-24547,-21744,-24514,-21781,-24481,-21819,-24447,-21856,-24414,-21894,-24380,-21931,-24347,-21968,-24313,-22005,-24279,-22043,-24245,-22080,-24212,-22117,-24178,-22154,-24144,-22191,-24110,-22228,-24076,-22265,-24042,-22302,-24007,-22339,-23973,-22375,-23939,-22412,-23904,-22449,-23870,-22485,-23836,-22522,-23801,-22558,-23767,-22595,-23732,-22631,-23697,-22667,-23662,-22704,-23628,-22740,-23593,-22776,-23558,-22812,-23523,-22848,-23488,-22884,-23453,-22920,-23418,-22956,-23383,-22992,-23347,-23028,-23312,-23063,-23277,-23099,-23241,-23135,-23206,-23170,-23170,-23206,-23135,-23241,-23099,-23277,-23063,-23312,-23028,-23347,-22992,-23383,-22956,-23418,-22920,-23453,-22884,-23488,-22848,-23523,-22812,-23558,-22776,-23593,-22740,-23628,-22704,-23662,-22667,-23697,-22631,-23732,-22595,-23767,-22558,-23801,-22522,-23836,-22485,-23870,-22449,-23904,-22412,-23939,-22375,-23973,-22339,-24007,-22302,-24042,-22265,-24076,-22228,-24110,-22191,-24144,-22154,-24178,-22117,-24212,-22080,-24245,-22043,-24279,-22005,-24313,-21968,-24347,-21931,-24380,-21894,-24414,-21856,-24447,-21819,-24481,-21781,-24514,-21744,-24547,-21706,-24581,-21668,-24614,-21630,-24647,-21593,-24680,-21555,-24713,-21517,-24746,-21479,-24779,-21441,-24812,-21403,-24845,-21365,-24878,-21327,-24910,-21289,-24943,-21250,-24975,-21212,-25008,-21174,-25040,-21135,-25073,-21097,-25105,-21058,-25137,-21020,-25170,-20981,-25202,-20943,-25234,-20904,-25266,-20865,-25298,-20826,-25330,-20788,-25362,-20749,-25393,-20710,-25425,-20671,-25457,-20632,-25488,-20593,-25520,-20554,-25551,-20514,-25583,-20475,-25614,-20436,-25646,-20397,-25677,-20357,-25708,-20318,-25739,-20278,-25770,-20239,-25801,-20199,-25832,-20160,-25863,-20120,-25894,-20080,-25925,-20041,-25955,-20001,-25986,-19961,-26017,-19921,-26047,-19881,-26078,-19841,-26108,-19801,-26138,-19761,-26169,-19721,-26199,-19681,-26229,-19641,-26259,-19600,-26289,-19560,-26319,-19520,-26349,-19479,-26379,-19439,-26409,-19398,-26438,-19358,-26468,-19317,-26498,-19277,-26527,-19236,-26557,-19195,-26586,-19155,-26616,-19114,-26645,-19073,-26674,-19032,-26703,-18991,-26732,-18950,-26761,-18909,-26790,-18868,-26819,-18827,-26848,-18786,-26877,-18745,-26906,-18703,-26934,-18662,-26963,-18621,-26991,-18579,-27020,-18538,-27048,-18496,-27077,-18455,-27105,-18413,-27133,-18372,-27161,-18330,-27189,-18288,-27217,-18247,-27245,-18205,-27273,-18163,-27301,-18121,-27329,-18079,-27356,-18037,-27384,-17995,-27412,-17953,-27439,-17911,-27467,-17869,-27494,-17827,-27521,-17785,-27549,-17743,-27576,-17700,-27603,-17658,-27630,-17616,-27657,-17573,-27684,-17531,-27711,-17488,-27737,-17446,-27764,-17403,-27791,-17361,-27817,-17318,-27844,-17275,-27870,-17233,-27897,-17190,-27923,-17147,-27949,-17104,-27976,-17061,-28002,-17018,-28028,-16975,-28054,-16932,-28080,-16889,-28106,-16846,-28132,-16803,-28157,-16760,-28183,-16717,-28209,-16673,-28234,-16630,-28260,-16587,-28285,-16543,-28310,-16500,-28336,-16456,-28361,-16413,-28386,-16369,-28411,-16326,-28436,-16282,-28461,-16239,-28486,-16195,-28511,-16151,-28535,-16108,-28560,-16064,-28585,-16020,-28609,-15976,-28634,-15932,-28658,-15888,-28682,-15844,-28707,-15800,-28731,-15756,-28755,-15712,-28779,-15668,-28803,-15624,-28827,-15580,-28851,-15535,-28875,-15491,-28898,-15447,-28922,-15402,-28946,-15358,-28969,-15314,-28993,-15269,-29016,-15225,-29039,-15180,-29063,-15136,-29086,-15091,-29109,-15046,-29132,-15002,-29155,-14957,-29178,-14912,-29201,-14867,-29223,-14823,-29246,-14778,-29269,-14733,-29291,-14688,-29314,-14643,-29336,-14598,-29359,-14553,-29381,-14508,-29403,-14463,-29425,-14418,-29447,-14373,-29469,-14327,-29491,-14282,-29513,-14237,-29535,-14192,-29557,-14146,-29578,-14101,-29600,-14056,-29622,-14010,-29643,-13965,-29664,-13919,-29686,-13874,-29707,-13828,-29728,-13783,-29749,-13737,-29770,-13691,-29791,-13646,-29812,-13600,-29833,-13554,-29854,-13508,-29874,-13463,-29895,-13417,-29916,-13371,-29936,-13325,-29956,-13279,-29977,-13233,-29997,-13187,-30017,-13141,-30037,-13095,-30057,-13049,-30077,-13003,-30097,-12957,-30117,-12910,-30137,-12864,-30157,-12818,-30176,-12772,-30196,-12725,-30215,-12679,-30235,-12633,-30254,-12586,-30273,-12540,-30292,-12493,-30312,-12447,-30331,-12400,-30350,-12354,-30369,-12307,-30387,-12261,-30406,-12214,-30425,-12167,-30443,-12121,-30462,-12074,-30481,-12027,-30499,-11981,-30517,-11934,-30536,-11887,-30554,-11840,-30572,-11793,-30590,-11746,-30608,-11699,-30626,-11652,-30644,-11605,-30661,-11558,-30679,-11511,-30697,-11464,-30714,-11417,-30732,-11370,-30749,-11323,-30767,-11276,-30784,-11228,-30801,-11181,-30818,-11134,-30835,-11087,-30852,-11039,-30869,-10992,-30886,-10945,-30903,-10897,-30919,-10850,-30936,-10802,-30952,-10755,-30969,-10707,-30985,-10660,-31002,-10612,-31018,-10565,-31034,-10517,-31050,-10470,-31066,-10422,-31082,-10374,-31098,-10327,-31114,-10279,-31129,-10231,-31145,-10183,-31161,-10136,-31176,-10088,-31192,-10040,-31207,-9992,-31222,-9944,-31237,-9896,-31253,-9848,-31268,-9800,-31283,-9752,-31298,-9704,-31312,-9656,-31327,-9608,-31342,-9560,-31357,-9512,-31371,-9464,-31386,-9416,-31400,-9368,-31414,-9320,-31429,-9271,-31443,-9223,-31457,-9175,-31471,-9127,-31485,-9078,-31499,-9030,-31513,-8982,-31526,-8933,-31540,-8885,-31554,-8837,-31567,-8788,-31581,-8740,-31594,-8691,-31607,-8643,-31620,-8594,-31634,-8546,-31647,-8497,-31660,-8449,-31673,-8400,-31685,-8352,-31698,-8303,-31711,-8254,-31724,-8206,-31736,-8157,-31749,-8108,-31761,-8060,-31773,-8011,-31786,-7962,-31798,-7913,-31810,-7865,-31822,-7816,-31834,-7767,-31846,-7718,-31857,-7669,-31869,-7620,-31881,-7572,-31892,-7523,-31904,-7474,-31915,-7425,-31927,-7376,-31938,-7327,-31949,-7278,-31960,-7229,-31971,-7180,-31982,-7131,-31993,-7082,-32004,-7033,-32015,-6983,-32025,-6934,-32036,-6885,-32047,-6836,-32057,-6787,-32067,-6738,-32078,-6689,-32088,-6639,-32098,-6590,-32108,-6541,-32118,-6492,-32128,-6442,-32138,-6393,-32148,-6344,-32157,-6294,-32167,-6245,-32177,-6196,-32186,-6146,-32195,-6097,-32205,-6048,-32214,-5998,-32223,-5949,-32232,-5899,-32241,-5850,-32250,-5800,-32259,-5751,-32268,-5701,-32276,-5652,-32285,-5602,-32294,-5553,-32302,-5503,-32311,-5454,-32319,-5404,-32327,-5355,-32335,-5305,-32343,-5255,-32351,-5206,-32359,-5156,-32367,-5107,-32375,-5057,-32383,-5007,-32390,-4958,-32398,-4908,-32405,-4858,-32413,-4808,-32420,-4759,-32427,-4709,-32435,-4659,-32442,-4609,-32449,-4560,-32456,-4510,-32463,-4460,-32469,-4410,-32476,-4360,-32483,-4311,-32489,-4261,-32496,-4211,-32502,-4161,-32509,-4111,-32515,-4061,-32521,-4012,-32527,-3962,-32533,-3912,-32539,-3862,-32545,-3812,-32551,-3762,-32557,-3712,-32562,-3662,-32568,-3612,-32573,-3562,-32579,-3512,-32584,-3462,-32589,-3412,-32595,-3362,-32600,-3312,-32605,-3262,-32610,-3212,-32615,-3162,-32619,-3112,-32624,-3062,-32629,-3012,-32633,-2962,-32638,-2912,-32642,-2862,-32647,-2812,-32651,-2762,-32655,-2712,-32659,-2662,-32663,-2611,-32667,-2561,-32671,-2511,-32675,-2461,-32679,-2411,-32682,-2361,-32686,-2311,-32689,-2261,-32693,-2210,-32696,-2160,-32700,-2110,-32703,-2060,-32706,-2010,-32709,-1960,-32712,-1909,-32715,-1859,-32718,-1809,-32720,-1759,-32723,-1709,-32726,-1659,-32728,-1608,-32730,-1558,-32733,-1508,-32735,-1458,-32737,-1407,-32739,-1357,-32741,-1307,-32743,-1257,-32745,-1207,-32747,-1156,-32749,-1106,-32751,-1056,-32752,-1006,-32754,-955,-32755,-905,-32756,-855,-32758,-805,-32759,-754,-32760,-704,-32761,-654,-32762,-604,-32763,-553,-32764,-503,-32764,-453,-32765,-403,-32766,-352,-32766,-302,-32767,-252,-32767,-202,-32767,-151,-32767,-101,-32767,-51}; - diff --git a/openair1/PHY/MODULATION/modulation_extern.h b/openair1/PHY/MODULATION/modulation_extern.h index 2834aa00f5..5dfa73857e 100644 --- a/openair1/PHY/MODULATION/modulation_extern.h +++ b/openair1/PHY/MODULATION/modulation_extern.h @@ -19,18 +19,18 @@ * contact@openairinterface.org */ -extern int16_t s6n_kHz_7_5[1920]; -extern int16_t s6e_kHz_7_5[1920]; -extern int16_t s15n_kHz_7_5[3840]; -extern int16_t s15e_kHz_7_5[3840]; -extern int16_t s25n_kHz_7_5[7680]; -extern int16_t s25e_kHz_7_5[7680]; -extern int16_t s50n_kHz_7_5[15360]; -extern int16_t s50e_kHz_7_5[15360]; -extern int16_t s75n_kHz_7_5[23040]; -extern int16_t s75e_kHz_7_5[23040]; -extern int16_t s100n_kHz_7_5[30720]; -extern int16_t s100e_kHz_7_5[30720]; +extern int16_t *s6n_kHz_7_5; +extern int16_t *s6e_kHz_7_5; +extern int16_t *s15n_kHz_7_5; +extern int16_t *s15e_kHz_7_5; +extern int16_t *s25n_kHz_7_5; +extern int16_t *s25e_kHz_7_5; +extern int16_t *s50n_kHz_7_5; +extern int16_t *s50e_kHz_7_5; +extern int16_t *s75n_kHz_7_5; +extern int16_t *s75e_kHz_7_5; +extern int16_t *s100n_kHz_7_5; +extern int16_t *s100e_kHz_7_5; extern short conjugate75[8]; diff --git a/openair1/PHY/MODULATION/modulation_vars.h b/openair1/PHY/MODULATION/modulation_vars.h index dbea92ab3f..1428d5f975 100644 --- a/openair1/PHY/MODULATION/modulation_vars.h +++ b/openair1/PHY/MODULATION/modulation_vars.h @@ -19,7 +19,6 @@ * contact@openairinterface.org */ -#include "kHz_7_5.h" short conjugate75[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1} ; short conjugate75_2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1} ; From 8961e67ef4367aa68d0c12fb865bf0c203b96d83 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Fri, 31 Aug 2018 11:38:34 +0200 Subject: [PATCH 058/379] CI: fix syntax error in pipeline Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index bbe429f1e2..02a8df3af0 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -319,7 +319,7 @@ pipeline { always { script { dir ('archives') { - sh "if [ -d basic_sim/test ] || [ -d phy_sim/test]; then zip -r -qq vm_tests_logs.zip */test ; fi" + sh "if [ -d basic_sim/test ] || [ -d phy_sim/test ]; then zip -r -qq vm_tests_logs.zip */test ; fi" } if(fileExists('archives/vm_tests_logs.zip')) { archiveArtifacts artifacts: 'archives/vm_tests_logs.zip' From 3740f3d72e171325811abfd2c15205904db817b8 Mon Sep 17 00:00:00 2001 From: laurent Date: Fri, 31 Aug 2018 11:44:41 +0200 Subject: [PATCH 059/379] remove constructor key word --- openair1/PHY/INIT/init_top.c | 74 +++++------ openair1/PHY/MODULATION/gen_75KHz.cpp | 128 ++++++++++---------- openair1/PHY/MODULATION/modulation_extern.h | 44 ++++--- 3 files changed, 120 insertions(+), 126 deletions(-) diff --git a/openair1/PHY/INIT/init_top.c b/openair1/PHY/INIT/init_top.c index e64eda740c..8946b0765e 100644 --- a/openair1/PHY/INIT/init_top.c +++ b/openair1/PHY/INIT/init_top.c @@ -1,23 +1,23 @@ /* - * 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.1 (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 - */ + 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.1 (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 +*/ /*!\brief Initilization and reconfiguration routines for LTE PHY */ #include "phy_init.h" @@ -27,12 +27,9 @@ #include "PHY/LTE_REFSIG/lte_refsig.h" #include "PHY/LTE_TRANSPORT/transport_common_proto.h" -void generate_64qam_table(void) -{ - +void generate_64qam_table(void) { int a,b,c,index; - for (a=-1; a<=1; a+=2) for (b=-1; b<=1; b+=2) for (c=-1; c<=1; c+=2) { @@ -41,9 +38,7 @@ void generate_64qam_table(void) } } -void generate_16qam_table(void) -{ - +void generate_16qam_table(void) { int a,b,index; for (a=-1; a<=1; a+=2) @@ -53,54 +48,41 @@ void generate_16qam_table(void) } } -void generate_qpsk_table(void) -{ - +void generate_qpsk_table(void) { int a,index; for (a=-1; a<=1; a+=2) { index = (1+a)/2; - qpsk_table[index] = -a*QPSK; + qpsk_table[index] = -a*QPSK; } } -void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms) -{ - +void init_7_5KHz(void); +void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms) { ccodelte_init(); ccodelte_init_inv(); - init_dfts(); - - phy_generate_viterbi_tables_lte(); - load_codinglib(); lte_sync_time_init(frame_parms); - generate_ul_ref_sigs(); generate_ul_ref_sigs_rx(); - generate_64qam_table(); generate_16qam_table(); generate_qpsk_table(); generate_RIV_tables(); - init_unscrambling_lut(); init_scrambling_lut(); //set_taus_seed(1328); - - + init_7_5KHz(); } -void free_lte_top(void) -{ +void free_lte_top(void) { free_codinglib(); lte_sync_time_free(); - /* free_ul_ref_sigs() is called in phy_free_lte_eNB() */ } /* - * @}*/ + @}*/ diff --git a/openair1/PHY/MODULATION/gen_75KHz.cpp b/openair1/PHY/MODULATION/gen_75KHz.cpp index 31c6af2a1f..6efa3ddf2f 100644 --- a/openair1/PHY/MODULATION/gen_75KHz.cpp +++ b/openair1/PHY/MODULATION/gen_75KHz.cpp @@ -8,71 +8,77 @@ #include #include using namespace std; +extern "C" { + void gen_sig(int RB, int len, double ratio, int16_t *table_n, int16_t *table_e ) { + double samplerate = 30.72e6*ratio; + double ofdm_size = 2048*ratio; + double PI = std::acos(-1); + std::complex tt; + complex t[len]; + int index=0; + double cp0 = 160*ratio; + double cp = 144*ratio; -void gen_sig(int RB, int len, double ratio, int16_t *table_n, int16_t *table_e ) { - double samplerate = 30.72e6*ratio; - double ofdm_size = 2048*ratio; - double PI = std::acos(-1); - std::complex tt; - complex t[len]; - int index=0; - - double cp0 = 160*ratio; - double cp = 144*ratio; - for (int i=-cp0; i tables_7_5KHz={{6,1.0/16},{15,1.0/8},{25,1.0/4},{50,1.0/2},{75,3.0/4},{100,1.0}}; + void init_7_5KHz(void) { + const map tables_7_5KHz= {{6,1.0/16},{15,1.0/8},{25,1.0/4},{50,1.0/2},{75,3.0/4},{100,1.0}}; + int tables_idx=0; - int tables_idx=0; - for (auto it=tables_7_5KHz.begin(); it!=tables_7_5KHz.end(); ++it) { - int len=15360*it->second; - tables_size_bytes[tables_idx]=sizeof(int16_t)*2*len; - tables_size_bytes[tables_idx+1]=sizeof(int16_t)*2*len; - MyAssert(0==posix_memalign((void**)tables[tables_idx], - 16,tables_size_bytes[tables_idx])); - MyAssert(0==posix_memalign((void**)tables[tables_idx+1], - 16,tables_size_bytes[tables_idx+1])); - gen_sig(it->first, len, it->second, *tables[tables_idx], *tables[tables_idx+1]); - tables_idx+=2; + for (auto it=tables_7_5KHz.begin(); it!=tables_7_5KHz.end(); ++it) { + int len=15360*it->second; + tables_size_bytes[tables_idx]=sizeof(int16_t)*2*len; + tables_size_bytes[tables_idx+1]=sizeof(int16_t)*2*len; + MyAssert(0==posix_memalign((void **)tables[tables_idx], + 16,tables_size_bytes[tables_idx])); + MyAssert(0==posix_memalign((void **)tables[tables_idx+1], + 16,tables_size_bytes[tables_idx+1])); + gen_sig(it->first, len, it->second, *tables[tables_idx], *tables[tables_idx+1]); + tables_idx+=2; + } } } diff --git a/openair1/PHY/MODULATION/modulation_extern.h b/openair1/PHY/MODULATION/modulation_extern.h index 5dfa73857e..417ae5781b 100644 --- a/openair1/PHY/MODULATION/modulation_extern.h +++ b/openair1/PHY/MODULATION/modulation_extern.h @@ -1,23 +1,26 @@ /* - * 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.1 (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 - */ + 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.1 (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 +*/ +#ifdef __cplusplus +extern "C" { +#endif extern int16_t *s6n_kHz_7_5; extern int16_t *s6e_kHz_7_5; @@ -36,3 +39,6 @@ extern int16_t *s100e_kHz_7_5; extern short conjugate75[8]; extern short conjugate75_2[8]; extern short negate[8]; +#ifdef __cplusplus +} +#endif From cea4ef53729945e8e0c2b4c4dc9237c91fca67c2 Mon Sep 17 00:00:00 2001 From: laurent Date: Thu, 9 Aug 2018 18:13:09 +0200 Subject: [PATCH 060/379] generate sss tables --- cmake_targets/CMakeLists.txt | 2 + openair1/PHY/LTE_TRANSPORT/sss.h | 25 ------- openair1/PHY/LTE_TRANSPORT/sss_gen.c | 68 +++++++++++++++++++ openair1/PHY/LTE_TRANSPORT/sss_gen.m | 53 --------------- openair1/PHY/LTE_TRANSPORT/transport_extern.h | 2 +- openair1/PHY/LTE_TRANSPORT/transport_vars.h | 1 - 6 files changed, 71 insertions(+), 80 deletions(-) delete mode 100644 openair1/PHY/LTE_TRANSPORT/sss.h create mode 100644 openair1/PHY/LTE_TRANSPORT/sss_gen.c delete mode 100644 openair1/PHY/LTE_TRANSPORT/sss_gen.m diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 5efb13594f..9e2eac158e 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -1108,6 +1108,7 @@ set(PHY_SRC # actual source ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pss.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sss.c + ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sss_gen.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pilots.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pilots_mbsfn.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_coding.c @@ -1147,6 +1148,7 @@ set(PHY_SRC_RU set(PHY_SRC_UE # actual source ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/sss_ue.c + ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sss_gen.c ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation.c ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/linear_preprocessing_rec.c diff --git a/openair1/PHY/LTE_TRANSPORT/sss.h b/openair1/PHY/LTE_TRANSPORT/sss.h deleted file mode 100644 index 6d42acaefc..0000000000 --- a/openair1/PHY/LTE_TRANSPORT/sss.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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.1 (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 - */ - -int16_t d0_sss[504*62] = {1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1}; - -int16_t d5_sss[504*62] = {1,1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,1,1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1}; - diff --git a/openair1/PHY/LTE_TRANSPORT/sss_gen.c b/openair1/PHY/LTE_TRANSPORT/sss_gen.c new file mode 100644 index 0000000000..9a0a947ca9 --- /dev/null +++ b/openair1/PHY/LTE_TRANSPORT/sss_gen.c @@ -0,0 +1,68 @@ +#include +#include +#include +#include +#include +#include + +int16_t *d0_sss; +int16_t *d5_sss; + +#define MyAssert(x) { if(!(x)) { printf("Error in table intialization: %s:%d\n",__FILE__,__LINE__); exit(1);}} +#define gen(table, formula) { \ + int x[31]= {0}; \ + x[4]=1; \ + for(int i=0; i<26; i++) \ + x[i+5]=formula; \ + for (int i=0; i<31; i++) \ + table[i]=1-2*x[i]; \ +} + +#define mod31(a) (a)%31 +#define mod2(a) (a)%2 +#define mod8(a) (a)%8 +__attribute__((constructor)) static void init_sss(void) { + MyAssert(0==posix_memalign((void **)&d0_sss, 16,504*31*2*sizeof(*d0_sss))); + MyAssert(0==posix_memalign((void **)&d5_sss, 16,504*31*2*sizeof(*d5_sss))); + int s[31]; + gen(s, mod2(x[i+2]+x[i])); + int z[31]; + gen(z, mod2(x[i+4]+x[i+2]+x[i+1]+x[i])); + int c[31]; + gen(c, mod2(x[i+3]+x[i])); + + for (int Nid2=0; Nid2<3; Nid2++) { + for (int Nid1=0; Nid1<168; Nid1++) { + int qprime = Nid1/30; + int q = (Nid1+(qprime*(qprime+1))/2)/30; + int mprime = Nid1 + q*(q+1)/2; + int m0 = mprime%31; + int m1 = (m0+mprime/31+1)%31; + int rowIndex=(Nid2+3*Nid1)*31*2; + for (int i=0; i<31; i++) { + d0_sss[rowIndex+i*2]= s[mod31(i+m0)] * c[mod31(i+Nid2)]; + d5_sss[rowIndex+i*2]= s[mod31(i+m1)] * c[mod31(i+Nid2)]; + d0_sss[rowIndex+i*2+1]= s[mod31(i+m1)] * c[mod31(i+Nid2+3)] * z[mod31(i+mod8(m0))]; + d5_sss[rowIndex+i*2+1]= s[mod31(i+m0)] * c[mod31(i+Nid2+3)] * z[mod31(i+mod8(m1))]; + } + } + } +} + +#ifdef SSS_TABLES_TEST +void main () { + printf("int16_t d0_sss[504*62] = {"); + + for (int i=0; i<504*62; i++) + printf("%d,\n",d0_sss[i]); + + printf("};\n\n"); + printf("int16_t d5_sss[504*62] = {"); + + for (int i=0; i<504*62; i++) + printf("%d,\n",d5_sss[i]); + + printf("};\n\n"); + +} +#endif diff --git a/openair1/PHY/LTE_TRANSPORT/sss_gen.m b/openair1/PHY/LTE_TRANSPORT/sss_gen.m deleted file mode 100644 index 65e5a5a0a1..0000000000 --- a/openair1/PHY/LTE_TRANSPORT/sss_gen.m +++ /dev/null @@ -1,53 +0,0 @@ -% generate s -x = zeros(1,30); -x(1:5) = [0 0 0 0 1]; -for i=1:26 - x(i+5) = rem(x(i+2) + x(i),2); -end -s = 1 - 2*x; - -% generate z -x = zeros(1,30); -x(1:5) = [0 0 0 0 1]; -for i=1:26 - x(i+5) = rem(x(i+4)+ x(i+2) + x(i+1) + x(i),2); -end -z = 1 - 2*x; -% generate c -x = zeros(1,30); -x(1:5) = [0 0 0 0 1]; -for i=1:26 - x(i+5) = rem(x(i+3) + x(i),2); -end -c = 1 - 2*x; -d0 = zeros(504,62); -d5 = zeros(504,62); -for Nid2=0:2, - c0 = [c((1+Nid2) : end) c(1:Nid2)]; - c1 = [c((4+Nid2) : end) c(1:(3+Nid2))]; - for Nid1=0:167, - qprime = floor(Nid1/30); - q = floor((Nid1+qprime*(qprime+1)/2)/30); - mprime = Nid1 + q*(q+1)/2; - m0 = rem(mprime,31); - m1 = rem(m0+floor(mprime/31)+1,31); - sm0 = [s((1+m0) : end) s(1:m0)]; - sm1 = [s((1+m1) : end) s(1:m1)]; - m0mod8 = rem(m0,8); - m1mod8 = rem(m1,8); - zm0 = [z((1+m0mod8) : end) z(1:m0mod8)]; - zm1 = [z((1+m1mod8) : end) z(1:m1mod8)]; - d0(1+Nid2+(3*Nid1),1:2:62) = sm0.*c0; - d5(1+Nid2+(3*Nid1),1:2:62) = sm1.*c0; - d0(1+Nid2+(3*Nid1),2:2:62) = sm1.*c1.*zm0; - d5(1+Nid2+(3*Nid1),2:2:62) = sm0.*c1.*zm1; - end -end -fd = fopen("sss.h","w"); -fprintf(fd,"s16 d0_sss[504*62] = {"); -fprintf(fd,"%d,",d0); -fprintf(fd,"};\n\n"); -fprintf(fd,"s16 d5_sss[504*62] = {"); -fprintf(fd,"%d,",d5); -fprintf(fd,"};\n\n"); -fclose(fd); \ No newline at end of file diff --git a/openair1/PHY/LTE_TRANSPORT/transport_extern.h b/openair1/PHY/LTE_TRANSPORT/transport_extern.h index 6a9fa49405..04b69d9402 100644 --- a/openair1/PHY/LTE_TRANSPORT/transport_extern.h +++ b/openair1/PHY/LTE_TRANSPORT/transport_extern.h @@ -44,7 +44,7 @@ extern unsigned short scfdma_amps[26]; extern char dci_format_strings[15][13]; -extern int16_t d0_sss[504*62],d5_sss[504*62]; +extern int16_t *d0_sss,*d5_sss; extern uint8_t wACK[5][4]; extern int8_t wACK_RX[5][4]; diff --git a/openair1/PHY/LTE_TRANSPORT/transport_vars.h b/openair1/PHY/LTE_TRANSPORT/transport_vars.h index 611028e1e9..02dfbc6a5e 100644 --- a/openair1/PHY/LTE_TRANSPORT/transport_vars.h +++ b/openair1/PHY/LTE_TRANSPORT/transport_vars.h @@ -21,7 +21,6 @@ #include "dlsch_tbs.h" //#include "dlsch_tbs_full.h" -#include "sss.h" unsigned short lte_cqi_eff1024[16] = {156, //-6, .15234 240, //-4 .234 From 5d658c5e8223575b8209f0b6772cc39cd747ca09 Mon Sep 17 00:00:00 2001 From: laurent Date: Fri, 31 Aug 2018 12:00:15 +0200 Subject: [PATCH 061/379] remove constructor key word --- openair1/PHY/INIT/init_top.c | 73 +++++++++++----------------- openair1/PHY/LTE_TRANSPORT/sss_gen.c | 24 ++++----- 2 files changed, 40 insertions(+), 57 deletions(-) diff --git a/openair1/PHY/INIT/init_top.c b/openair1/PHY/INIT/init_top.c index e64eda740c..c4fa049b13 100644 --- a/openair1/PHY/INIT/init_top.c +++ b/openair1/PHY/INIT/init_top.c @@ -1,23 +1,23 @@ /* - * 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.1 (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 - */ + 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.1 (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 +*/ /*!\brief Initilization and reconfiguration routines for LTE PHY */ #include "phy_init.h" @@ -27,12 +27,11 @@ #include "PHY/LTE_REFSIG/lte_refsig.h" #include "PHY/LTE_TRANSPORT/transport_common_proto.h" -void generate_64qam_table(void) -{ +void init_sss(void); +void generate_64qam_table(void) { int a,b,c,index; - for (a=-1; a<=1; a+=2) for (b=-1; b<=1; b+=2) for (c=-1; c<=1; c+=2) { @@ -41,9 +40,7 @@ void generate_64qam_table(void) } } -void generate_16qam_table(void) -{ - +void generate_16qam_table(void) { int a,b,index; for (a=-1; a<=1; a+=2) @@ -53,54 +50,40 @@ void generate_16qam_table(void) } } -void generate_qpsk_table(void) -{ - +void generate_qpsk_table(void) { int a,index; for (a=-1; a<=1; a+=2) { index = (1+a)/2; - qpsk_table[index] = -a*QPSK; + qpsk_table[index] = -a*QPSK; } } -void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms) -{ - +void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms) { ccodelte_init(); ccodelte_init_inv(); - init_dfts(); - - phy_generate_viterbi_tables_lte(); - load_codinglib(); lte_sync_time_init(frame_parms); - generate_ul_ref_sigs(); generate_ul_ref_sigs_rx(); - generate_64qam_table(); generate_16qam_table(); generate_qpsk_table(); generate_RIV_tables(); - init_unscrambling_lut(); init_scrambling_lut(); //set_taus_seed(1328); - - + init_sss(); } -void free_lte_top(void) -{ +void free_lte_top(void) { free_codinglib(); lte_sync_time_free(); - /* free_ul_ref_sigs() is called in phy_free_lte_eNB() */ } /* - * @}*/ + @}*/ diff --git a/openair1/PHY/LTE_TRANSPORT/sss_gen.c b/openair1/PHY/LTE_TRANSPORT/sss_gen.c index 9a0a947ca9..b0b71d4f6b 100644 --- a/openair1/PHY/LTE_TRANSPORT/sss_gen.c +++ b/openair1/PHY/LTE_TRANSPORT/sss_gen.c @@ -9,19 +9,19 @@ int16_t *d0_sss; int16_t *d5_sss; #define MyAssert(x) { if(!(x)) { printf("Error in table intialization: %s:%d\n",__FILE__,__LINE__); exit(1);}} -#define gen(table, formula) { \ - int x[31]= {0}; \ - x[4]=1; \ - for(int i=0; i<26; i++) \ - x[i+5]=formula; \ - for (int i=0; i<31; i++) \ - table[i]=1-2*x[i]; \ -} +#define gen(table, formula) { \ + int x[31]= {0}; \ + x[4]=1; \ + for(int i=0; i<26; i++) \ + x[i+5]=formula; \ + for (int i=0; i<31; i++) \ + table[i]=1-2*x[i]; \ + } #define mod31(a) (a)%31 #define mod2(a) (a)%2 #define mod8(a) (a)%8 -__attribute__((constructor)) static void init_sss(void) { +void init_sss(void) { MyAssert(0==posix_memalign((void **)&d0_sss, 16,504*31*2*sizeof(*d0_sss))); MyAssert(0==posix_memalign((void **)&d5_sss, 16,504*31*2*sizeof(*d5_sss))); int s[31]; @@ -39,11 +39,12 @@ __attribute__((constructor)) static void init_sss(void) { int m0 = mprime%31; int m1 = (m0+mprime/31+1)%31; int rowIndex=(Nid2+3*Nid1)*31*2; + for (int i=0; i<31; i++) { d0_sss[rowIndex+i*2]= s[mod31(i+m0)] * c[mod31(i+Nid2)]; d5_sss[rowIndex+i*2]= s[mod31(i+m1)] * c[mod31(i+Nid2)]; d0_sss[rowIndex+i*2+1]= s[mod31(i+m1)] * c[mod31(i+Nid2+3)] * z[mod31(i+mod8(m0))]; - d5_sss[rowIndex+i*2+1]= s[mod31(i+m0)] * c[mod31(i+Nid2+3)] * z[mod31(i+mod8(m1))]; + d5_sss[rowIndex+i*2+1]= s[mod31(i+m0)] * c[mod31(i+Nid2+3)] * z[mod31(i+mod8(m1))]; } } } @@ -52,7 +53,7 @@ __attribute__((constructor)) static void init_sss(void) { #ifdef SSS_TABLES_TEST void main () { printf("int16_t d0_sss[504*62] = {"); - + for (int i=0; i<504*62; i++) printf("%d,\n",d0_sss[i]); @@ -63,6 +64,5 @@ void main () { printf("%d,\n",d5_sss[i]); printf("};\n\n"); - } #endif From 99535adacc57d5f27c0dfa2c54c9deba9ac49206 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 31 Aug 2018 12:02:04 +0200 Subject: [PATCH 062/379] integration: remove compilation warning --- targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index 0c02075a1d..47cd12d816 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -1263,7 +1263,7 @@ extern "C" { } } - LOG_D(PHY, "usrp->get_tx_num_channels() == %d\n", s->usrp->get_tx_num_channels()); + LOG_D(PHY, "usrp->get_tx_num_channels() == %zd\n", s->usrp->get_tx_num_channels()); LOG_D(PHY, "openair0_cfg[0].tx_num_channels == %d\n", openair0_cfg[0].tx_num_channels); for(int i=0; iusrp->get_tx_num_channels(); i++) { ::uhd::gain_range_t gain_range_tx = s->usrp->get_tx_gain_range(i); From ee04caab8a50890f04971d545a637d57b57110e1 Mon Sep 17 00:00:00 2001 From: Wang Tsu-Han Date: Fri, 31 Aug 2018 12:58:49 +0200 Subject: [PATCH 063/379] replacing judgment from get_nprocs() and worker flags by paralle_stage and worker_stage --- openair1/PHY/LTE_TRANSPORT/dlsch_coding.c | 39 ++++++++++++------ openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c | 4 +- openair1/PHY/defs_eNB.h | 6 +++ targets/RT/USER/lte-enb.c | 25 ++++++------ targets/RT/USER/lte-ru.c | 29 ++++++------- targets/RT/USER/lte-softmodem.c | 45 ++++++++++++++++++++- targets/RT/USER/lte-softmodem.h | 10 +++-- 7 files changed, 112 insertions(+), 46 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c index a766bb8202..045b4349a0 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c @@ -58,7 +58,6 @@ uint64_t deadline, uint64_t period);*/ -extern int codingw; void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch) { @@ -615,8 +614,10 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB, } } - if(C >= 8 && get_nprocs()>=16 && codingw)//one main three worker + if(get_thread_worker_stage()) { + if(C >= 8)//one main three worker + { encoding_return = dlsch_encoding_2threads(eNB, a, @@ -632,9 +633,9 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB, te_wakeup_stats1, i_stats, 3); - } - else if(C >= 6 && get_nprocs()>=8 && codingw)//one main two worker - { + } + else if(C >= 6)//one main two worker + { encoding_return = dlsch_encoding_2threads(eNB, a, @@ -650,9 +651,9 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB, te_wakeup_stats1, i_stats, 2); - } - else if(C >= 4 && get_nprocs()>=4 && codingw)//one main one worker - { + } + else if(C >= 4)//one main one worker + { encoding_return = dlsch_encoding_2threads(eNB, a, @@ -668,9 +669,9 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB, te_wakeup_stats1, i_stats, 1); - } - else - { + } + else + { encoding_return = dlsch_encoding(eNB, a, @@ -681,7 +682,21 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB, rm_stats, te_stats, i_stats); - } + } + } + else + { + encoding_return = + dlsch_encoding(eNB, + a, + num_pdcch_symbols, + dlsch, + frame, + subframe, + rm_stats, + te_stats, + i_stats); + } return encoding_return; } diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c index 851bcfff5a..ac928cdbdd 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c @@ -45,7 +45,7 @@ #include "targets/RT/USER/rt_wrapper.h" #include "transport_proto.h" -extern int codingw; +extern uint8_t get_thread_worker_stage(void); void free_eNB_ulsch(LTE_eNB_ULSCH_t *ulsch) { @@ -723,7 +723,7 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag) int ulsch_decoding_data_all(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag) { int ret = 0; - /*if(codingw) + /*if(get_thread_worker_stage()) { ret = ulsch_decoding_data_2thread(eNB,UE_id,harq_pid,llr8_flag); } diff --git a/openair1/PHY/defs_eNB.h b/openair1/PHY/defs_eNB.h index c58fffe0ef..cb30900f7b 100644 --- a/openair1/PHY/defs_eNB.h +++ b/openair1/PHY/defs_eNB.h @@ -888,6 +888,12 @@ typedef struct { int prach_I0; } PHY_MEASUREMENTS_eNB; +typedef struct THREAD_STRUCT_s { + uint8_t paralle_stage; + uint8_t worker_stage; + int core_number; +} THREAD_STRUCT; + /// Top-level PHY Data Structure for eNB typedef struct PHY_VARS_eNB_s { diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index c8c35cf2e8..8617c82cd6 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -153,7 +153,8 @@ void wakeup_prach_eNB(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe); #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe); #endif -extern int codingw; +extern uint8_t get_thread_paralle_stage(void); +extern uint8_t get_thread_worker_stage(void); extern uint8_t nfapi_mode; extern void oai_subframe_ind(uint16_t sfn, uint16_t sf); @@ -225,7 +226,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER , 1 ); - if(!eNB->single_thread_flag && get_nprocs() >= 8){ + if(get_thread_paralle_stage() == 2){ if(wait_on_condition(&proc[1].mutex_rxtx,&proc[1].cond_rxtx,&proc[1].pipe_ready,"wakeup_tx")<0) { LOG_E(PHY,"Frame %d, subframe %d: TX1 not ready\n",proc[1].frame_rx,proc[1].subframe_rx); return(-1); @@ -247,7 +248,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam /* CONFLICT RESOLUTION: BEGIN */ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER , 0 ); if(oai_exit) return(-1); - if(eNB->single_thread_flag || get_nprocs() <= 4){ + if(get_thread_paralle_stage() == 0){ #ifndef PHY_TX_THREAD phy_procedures_eNB_TX(eNB, proc, 1); #endif @@ -423,8 +424,8 @@ static void* eNB_thread_rxtx( void* param ) { } pthread_mutex_unlock( &proc->mutex_rxtx ); if (nfapi_mode!=2){ - if(get_nprocs() >= 8) wakeup_tx(eNB,eNB->proc.ru_proc); - else + if(get_thread_paralle_stage() == 2) wakeup_tx(eNB,eNB->proc.ru_proc); + else if(get_thread_paralle_stage() == 1) { phy_procedures_eNB_TX(eNB, proc, 1); wakeup_txfh(proc,eNB->proc.ru_proc); @@ -883,7 +884,7 @@ static void* process_stats_thread(void* param) { void init_eNB_proc(int inst) { - int i=0; + /*int i=0;*/ int CC_id; PHY_VARS_eNB *eNB; eNB_proc_t *proc; @@ -955,7 +956,7 @@ void init_eNB_proc(int inst) { // attr_te = &proc->attr_te; #endif - if(get_nprocs() > 2 && codingw) + if(get_thread_worker_stage()) { init_te_thread(eNB); init_td_thread(eNB); @@ -964,7 +965,7 @@ void init_eNB_proc(int inst) { LOG_I(PHY,"eNB->single_thread_flag:%d\n", eNB->single_thread_flag); - if (eNB->single_thread_flag==0 && nfapi_mode!=2) { + if (get_thread_paralle_stage()!=0 && nfapi_mode!=2) { pthread_create( &proc_rxtx[0].pthread_rxtx, attr0, eNB_thread_rxtx, proc ); pthread_create( &proc_rxtx[1].pthread_rxtx, attr1, tx_thread, proc); } @@ -972,13 +973,13 @@ void init_eNB_proc(int inst) { #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) pthread_create( &proc->pthread_prach_br, attr_prach_br, eNB_thread_prach_br, eNB ); #endif - char name[16]; + /*char name[16]; if (eNB->single_thread_flag==0) { snprintf( name, sizeof(name), "RXTX0 %d", i ); pthread_setname_np( proc_rxtx[0].pthread_rxtx, name ); snprintf( name, sizeof(name), "RXTX1 %d", i ); pthread_setname_np( proc_rxtx[1].pthread_rxtx, name ); - } + }*/ AssertFatal(proc->instance_cnt_prach == -1,"instance_cnt_prach = %d\n",proc->instance_cnt_prach); @@ -1311,8 +1312,8 @@ void init_eNB(int single_thread_flag,int wait_for_sync) { #endif - eNB->td = ulsch_decoding_data_all;//(get_nprocs()<=4) ? ulsch_decoding_data : ulsch_decoding_data_2thread; - eNB->te = dlsch_encoding_all;//(get_nprocs()<=4) ? dlsch_encoding : dlsch_encoding_2threads; + eNB->td = ulsch_decoding_data_all; + eNB->te = dlsch_encoding_all; LOG_I(PHY,"Registering with MAC interface module\n"); diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index a0339e8f0f..f3210ea85a 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -119,10 +119,11 @@ static int DEFENBS[] = {0}; extern volatile int oai_exit; extern int emulate_rf; extern int numerology; -extern int fepw; -extern int single_thread_flag; extern clock_source_t clock_source; +extern uint8_t get_thread_paralle_stage(void); +extern uint8_t get_thread_worker_stage(void); +extern int get_thread_core_number(void); extern void phy_init_RU(RU_t*); extern void phy_free_RU(RU_t*); @@ -1257,7 +1258,7 @@ void wakeup_eNBs(RU_t *ru) { LOG_D(PHY,"wakeup_eNBs (num %d) for RU %d ru->eNB_top:%p\n",ru->num_eNB,ru->idx, ru->eNB_top); - if (ru->num_eNB==1 && ru->eNB_top!=0 && (get_nprocs() <= 4 || single_thread_flag)) { + if (ru->num_eNB==1 && ru->eNB_top!=0 && get_thread_paralle_stage() == 0) { // call eNB function directly char string[20]; @@ -1782,7 +1783,7 @@ static void* ru_thread( void* param ) { if (ru->num_eNB>0) wakeup_eNBs(ru); #ifndef PHY_TX_THREAD - if(get_nprocs() <= 4 || ru->num_eNB==0 || single_thread_flag){ + if(get_thread_paralle_stage() == 0 || ru->num_eNB==0){ // do TX front-end processing if needed (precoding and/or IDFTs) if (ru->feptx_prec) ru->feptx_prec(ru); @@ -2195,7 +2196,7 @@ void init_RU_proc(RU_t *ru) { if(emulate_rf) pthread_create( &proc->pthread_emulateRF, attr_emulateRF, emulatedRF_thread, (void*)proc ); - if (!single_thread_flag && get_nprocs() > 4) + if (get_thread_paralle_stage() != 0) pthread_create( &proc->pthread_FH1, attr_FH1, ru_thread_tx, (void*)ru ); if (ru->function == NGFI_RRU_IF4p5) { @@ -2222,7 +2223,7 @@ void init_RU_proc(RU_t *ru) { pthread_create( &proc->pthread_prach, attr_prach, ru_thread_prach, (void*)ru ); } - if (get_nprocs()> 2 && fepw) { + if (get_thread_worker_stage()) { init_fep_thread(ru,NULL); init_feptx_thread(ru,NULL); } @@ -2235,7 +2236,7 @@ void kill_RU_proc(int inst) RU_t *ru = RC.ru[inst]; RU_proc_t *proc = &ru->proc; - if (get_nprocs() > 2 && fepw) { + if (get_thread_worker_stage()) { LOG_D(PHY, "killing FEP thread\n"); kill_fep_thread(ru); LOG_D(PHY, "killing FEP TX thread\n"); @@ -2554,8 +2555,8 @@ void set_function_spec_param(RU_t *ru) ru->fh_north_out = fh_if4p5_north_out; // send_IF4p5 on reception ru->fh_south_out = tx_rf; // send output to RF ru->fh_north_asynch_in = fh_if4p5_north_asynch_in; // TX packets come asynchronously - ru->feprx = (get_nprocs()<=2 || !fepw) ? fep_full :ru_fep_full_2thread; // RX DFTs - ru->feptx_ofdm = (get_nprocs()<=2 || !fepw) ? feptx_ofdm : feptx_ofdm_2thread; // this is fep with idft only (no precoding in RRU) + ru->feprx = (!get_thread_worker_stage()) ? fep_full :ru_fep_full_2thread; // RX DFTs + ru->feptx_ofdm = (!get_thread_worker_stage()) ? feptx_ofdm : feptx_ofdm_2thread; // this is fep with idft only (no precoding in RRU) ru->feptx_prec = NULL; ru->start_if = start_if; // need to start the if interface for if4p5 ru->ifdevice.host_type = RRU_HOST; @@ -2576,8 +2577,8 @@ void set_function_spec_param(RU_t *ru) } else if (ru->function == eNodeB_3GPP) { ru->do_prach = 0; // no prach processing in RU - ru->feprx = (get_nprocs()<=2 || !fepw) ? fep_full : ru_fep_full_2thread; // RX DFTs - ru->feptx_ofdm = (get_nprocs()<=2 || !fepw) ? feptx_ofdm : feptx_ofdm_2thread; // this is fep with idft and precoding + ru->feprx = (!get_thread_worker_stage()) ? fep_full : ru_fep_full_2thread; // RX DFTs + ru->feptx_ofdm = (!get_thread_worker_stage()) ? feptx_ofdm : feptx_ofdm_2thread; // this is fep with idft and precoding ru->feptx_prec = feptx_prec; // this is fep with idft and precoding ru->fh_north_in = NULL; // no incoming fronthaul from north ru->fh_north_out = NULL; // no outgoing fronthaul to north @@ -2605,9 +2606,9 @@ void set_function_spec_param(RU_t *ru) case REMOTE_IF5: // the remote unit is IF5 RRU ru->do_prach = 0; - ru->feprx = (get_nprocs()<=2 || !fepw) ? fep_full : fep_full; // this is frequency-shift + DFTs + ru->feprx = (!get_thread_worker_stage()) ? fep_full : fep_full; // this is frequency-shift + DFTs ru->feptx_prec = feptx_prec; // need to do transmit Precoding + IDFTs - ru->feptx_ofdm = (get_nprocs()<=2 || !fepw) ? feptx_ofdm : feptx_ofdm_2thread; // need to do transmit Precoding + IDFTs + ru->feptx_ofdm = (!get_thread_worker_stage()) ? feptx_ofdm : feptx_ofdm_2thread; // need to do transmit Precoding + IDFTs if (ru->if_timing == synch_to_other) { ru->fh_south_in = fh_slave_south_in; // synchronize to master ru->fh_south_out = fh_if5_mobipass_south_out; // use send_IF5 for mobipass @@ -2685,7 +2686,7 @@ void init_RU(char *rf_config_file) { // read in configuration file) printf("configuring RU from file\n"); RCconfig_RU(); - LOG_I(PHY,"number of L1 instances %d, number of RU %d, number of CPU cores %d\n",RC.nb_L1_inst,RC.nb_RU,get_nprocs()); + LOG_I(PHY,"number of L1 instances %d, number of RU %d, number of CPU cores %d\n",RC.nb_L1_inst,RC.nb_RU,get_thread_core_number()); if (RC.nb_CC != 0) for (i=0;i=8) + { + thread_struct.paralle_stage = 2; + thread_struct.worker_stage = 1; + } + else if(thread_struct.core_number>=4) + { + thread_struct.paralle_stage = 1; + thread_struct.worker_stage = 1; + } + else + { + thread_struct.paralle_stage = 0; + thread_struct.worker_stage = 0; + } + if(single_thread_flag) thread_struct.paralle_stage = 0; + if(dis_worker) thread_struct.worker_stage = 0; +printf("single_thread_flag=%d, dis_worker=%d \n" ,single_thread_flag, dis_worker); +printf("~~~~~~~~~~paralle_stage=%d, worker_stage=%d, core_number=%d ~~~~~~~~~~~~~~~~\n", + thread_struct.paralle_stage, + thread_struct.worker_stage, + thread_struct.core_number); +} + +uint8_t get_thread_paralle_stage(void) +{ + return thread_struct.paralle_stage; +} +uint8_t get_thread_worker_stage(void) +{ + return thread_struct.worker_stage; +} +int get_thread_core_number(void) +{ + return thread_struct.core_number; +} @@ -1174,6 +1214,7 @@ int main( int argc, char **argv ) printf("wait_eNBs()\n"); wait_eNBs(); + thread_structure_init(); printf("About to Init RU threads RC.nb_RU:%d\n", RC.nb_RU); if (RC.nb_RU >0) { diff --git a/targets/RT/USER/lte-softmodem.h b/targets/RT/USER/lte-softmodem.h index 2f8209f2d3..e27f743871 100644 --- a/targets/RT/USER/lte-softmodem.h +++ b/targets/RT/USER/lte-softmodem.h @@ -92,8 +92,7 @@ #define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n" #define CONFIG_HLP_NUMEROLOGY "adding numerology for 5G\n" -#define CONFIG_HLP_CODINGW "coding worker thread enable(disable by defult)\n" -#define CONFIG_HLP_FEPW "FEP worker thread enabled(disable by defult)\n" +#define CONFIG_HLP_WORKER "coding and FEP worker thread disable(enable by defult)\n" #define CONFIG_HLP_EMULATE_RF "Emulated RF enabled(disable by defult)\n" #define CONFIG_HLP_DISABLNBIOT "disable nb-iot, even if defined in config\n" @@ -186,8 +185,7 @@ {"s" , CONFIG_HLP_SNR, 0, iptr:&snr_dB, defintval:25, TYPE_INT, 0}, \ {"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&numerology, defintval:0, TYPE_INT, 0}, \ {"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&emulate_rf, defintval:0, TYPE_INT, 0}, \ -{"codingw" , CONFIG_HLP_CODINGW, PARAMFLAG_BOOL, iptr:&codingw, defintval:0, TYPE_INT, 0}, \ -{"fepw" , CONFIG_HLP_FEPW, PARAMFLAG_BOOL, iptr:&fepw, defintval:0, TYPE_INT, 0}, \ +{"worker-disable" , CONFIG_HLP_WORKER, PARAMFLAG_BOOL, iptr:&dis_worker, defintval:0, TYPE_INT, 0}, \ {"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, iptr:&nonbiotflag, defintval:0, TYPE_INT, 0} \ } @@ -278,6 +276,10 @@ PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms, uint8_t UE_id, uint8_t abstraction_flag); void init_eNB_afterRU(void); +void thread_structure_init(void); +uint8_t get_thread_paralle_stage(void); +uint8_t get_thread_worker_stage(void); +int get_thread_core_number(void); extern int stop_L1L2(module_id_t enb_id); extern int restart_L1L2(module_id_t enb_id); From d67d8617e702ea48c20155264aeb50891eeed1cc Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 31 Aug 2018 18:11:45 +0200 Subject: [PATCH 064/379] integration fix: fix compilation error --- openair2/X2AP/x2ap_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/X2AP/x2ap_common.h b/openair2/X2AP/x2ap_common.h index d2ff3b40d1..76cc92aed2 100644 --- a/openair2/X2AP/x2ap_common.h +++ b/openair2/X2AP/x2ap_common.h @@ -60,7 +60,7 @@ extern int asn1_xer_print; #if defined(ENB_MODE) -# include "log.h" +# include "common/utils/LOG/log.h" # define X2AP_ERROR(x, args...) LOG_E(X2AP, x, ##args) # define X2AP_WARN(x, args...) LOG_W(X2AP, x, ##args) # define X2AP_DEBUG(x, args...) LOG_D(X2AP, x, ##args) From 23e5ca206e08aa4677a81bab96662474f8e95e45 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 3 Sep 2018 11:09:56 +0200 Subject: [PATCH 065/379] fix for CI --- ci-scripts/conf_files/lte-basic-sim.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci-scripts/conf_files/lte-basic-sim.conf b/ci-scripts/conf_files/lte-basic-sim.conf index febf24257c..f0fab0bdcb 100644 --- a/ci-scripts/conf_files/lte-basic-sim.conf +++ b/ci-scripts/conf_files/lte-basic-sim.conf @@ -189,6 +189,9 @@ eNBs = ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; } ); From 0eb747718af50f213620faa3dff141eff40f0b4d Mon Sep 17 00:00:00 2001 From: Haruki NAOI Date: Mon, 3 Sep 2018 18:30:01 +0900 Subject: [PATCH 066/379] Fix: Paging fixes. dlsch->i0 for paging should be configured by PCH scheduler. --- openair1/SCHED/fapi_l1.c | 4 ++-- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 22 ++++++++++++---------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/openair1/SCHED/fapi_l1.c b/openair1/SCHED/fapi_l1.c index 4c2f8d53d5..ad72c3d9f5 100644 --- a/openair1/SCHED/fapi_l1.c +++ b/openair1/SCHED/fapi_l1.c @@ -300,9 +300,9 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr dlsch0_harq->pdsch_start = rel10->pdsch_start; } #ifdef PHY_TX_THREAD - dlsch0_harq->i0 = 0xFFFF; + dlsch0_harq->i0 = rel13->initial_transmission_sf_io; #else - dlsch0->i0 = 0xFFFF; + dlsch0->i0 = rel13->initial_transmission_sf_io; #endif #endif diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index df52b83d72..cb722686f5 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -2018,16 +2018,6 @@ void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs; - // Rel10 fields -#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) - dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = 3; -#endif - // Rel13 fields -#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) - dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 0; // regular UE - dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 2; // not BR - dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = 0xFFFF; -#endif if (!CCE_allocation_infeasible(module_idP, CC_id, 0, subframeP, dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level, P_RNTI)) { LOG_D(MAC,"Frame %d: Subframe %d : Adding common DCI for P_RNTI\n", frameP,subframeP); @@ -2068,6 +2058,18 @@ void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = 1; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1; // dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ; + + // Rel10 fields +#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) + dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = 3; +#endif + // Rel13 fields +#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) + dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 0; // regular UE + dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 2; // not BR + dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = 0xFFFF; +#endif + dl_req->number_pdu++; eNB->TX_req[CC_id].sfn_sf = (frameP<<4)+subframeP; From 966f6392c7548e5dcaaaa0c7ce22863058e8e6da Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 3 Sep 2018 12:31:45 +0200 Subject: [PATCH 067/379] CI: basic-sim, adding a pause between eNB start and UE start Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 2 ++ ci-scripts/runTestOnVM.sh | 1 + 2 files changed, 3 insertions(+) diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index 02a8df3af0..78099acdcb 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -238,6 +238,7 @@ pipeline { sh "./ci-scripts/reportBuildLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}" } if(fileExists('build_results.html')) { + sh "sed -i -e 's#Build-ID: ${BUILD_ID}#Build-ID: ${BUILD_ID}' build_results.html" archiveArtifacts artifacts: 'build_results.html' } } @@ -329,6 +330,7 @@ pipeline { sh "./ci-scripts/reportTestLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}" } if(fileExists('test_simulator_results.html')) { + sh "sed -i -e 's#Build-ID: ${BUILD_ID}#Build-ID: ${BUILD_ID}' test_simulator_results.html" archiveArtifacts artifacts: 'test_simulator_results.html' } } diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index db92ec4aad..f294a67455 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -511,6 +511,7 @@ then echo "sudo -E daemon --inherit --unsafe --name=enb_daemon --chdir=/home/ubuntu/tmp/cmake_targets/basic_simulator/enb -o /home/ubuntu/tmp/cmake_targets/log/enb.log ./my-lte-softmodem-run.sh" >> $VM_CMDS ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS + sleep 60 echo "############################################################" echo "Starting the UE" From 9f21c071084b53342cc46b33ea768d36752f8993 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 3 Sep 2018 13:42:55 +0200 Subject: [PATCH 068/379] CI : fix Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index 78099acdcb..e86e6fe51a 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -238,7 +238,7 @@ pipeline { sh "./ci-scripts/reportBuildLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}" } if(fileExists('build_results.html')) { - sh "sed -i -e 's#Build-ID: ${BUILD_ID}#Build-ID: ${BUILD_ID}' build_results.html" + sh "sed -i -e 's#Build-ID: ${BUILD_ID}#Build-ID: ${BUILD_ID}#' build_results.html" archiveArtifacts artifacts: 'build_results.html' } } @@ -330,7 +330,7 @@ pipeline { sh "./ci-scripts/reportTestLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}" } if(fileExists('test_simulator_results.html')) { - sh "sed -i -e 's#Build-ID: ${BUILD_ID}#Build-ID: ${BUILD_ID}' test_simulator_results.html" + sh "sed -i -e 's#Build-ID: ${BUILD_ID}#Build-ID: ${BUILD_ID}#' test_simulator_results.html" archiveArtifacts artifacts: 'test_simulator_results.html' } } From afa64a0d901645b230f847904d31d3294bf913e2 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 3 Sep 2018 15:56:28 +0200 Subject: [PATCH 069/379] CI: adding TDD setup to main CI on develop -- Configuration files for a Band-40 test setup -- XML file test on band-40 for 5 and 10 MHz in DL only Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 146 ++++++++---- ...d40.tm1.100PRB.FairScheduler.usrpb210.conf | 220 ++++++++++++++++++ ...nd40.tm1.25PRB.FairScheduler.usrpb210.conf | 220 ++++++++++++++++++ ...nd40.tm1.50PRB.FairScheduler.usrpb210.conf | 220 ++++++++++++++++++ ci-scripts/createVM.sh | 2 + ci-scripts/main.py | 1 + ci-scripts/xml_files/enb_usrpb210_band40.xml | 172 ++++++++++++++ 7 files changed, 937 insertions(+), 44 deletions(-) create mode 100644 ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf create mode 100644 ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf create mode 100644 ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf create mode 100644 ci-scripts/xml_files/enb_usrpb210_band40.xml diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index e86e6fe51a..587309d95c 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -32,6 +32,7 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) { def doRedHatBuild = false def FDD_Band7_B210_Status +def TDD_Band40_B210_Status pipeline { agent { @@ -41,7 +42,7 @@ pipeline { disableConcurrentBuilds() timestamps() gitLabConnection('OAI GitLab') - gitlabBuilds(builds: ["Build eNb-USRP", "Build basic-sim", "Build phy-sim", "Build eNb-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test basic-sim", "Test-FDD-Band7"]) + gitlabBuilds(builds: ["Build eNb-USRP", "Build basic-sim", "Build phy-sim", "Build eNb-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test basic-sim", "Test-FDD-Band7", "Test-TDD-Band40"]) ansiColor('xterm') } @@ -62,7 +63,7 @@ pipeline { allParametersPresent = false } if (allParametersPresent) { - echo "Performing Red Hat Build" + echo "Performing Red Hat Build" doRedHatBuild = true } else { doRedHatBuild = false @@ -262,53 +263,110 @@ pipeline { } } } - stage ("Test FDD - Band 7 - B210") { - steps { - gitlabCommitStatus(name: "Test-FDD-Band7") { - script { - if ("MERGE".equals(env.gitlabActionType)) { - FDD_Band7_B210_Status = build job: 'eNB-CI-FDD-Band7-B210', - parameters: [ - string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), - string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)), - string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)), - booleanParam(name: 'eNB_mergeRequest', value: true) - ] - } else { - FDD_Band7_B210_Status = build job: 'eNB-CI-FDD-Band7-B210', - parameters: [ - string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), - string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)), - string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)), - booleanParam(name: 'eNB_mergeRequest', value: false) - ] + stage ("Test on CI bench #1") { + stages { + stage ("Test FDD - Band 7 - B210") { + steps { + gitlabCommitStatus(name: "Test-FDD-Band7") { + script { + if ("MERGE".equals(env.gitlabActionType)) { + FDD_Band7_B210_Status = build job: 'eNB-CI-FDD-Band7-B210', + parameters: [ + string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), + string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)), + string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)), + booleanParam(name: 'eNB_mergeRequest', value: true) + ] + } else { + FDD_Band7_B210_Status = build job: 'eNB-CI-FDD-Band7-B210', + parameters: [ + string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), + string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)), + string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)), + booleanParam(name: 'eNB_mergeRequest', value: false) + ] + } + } + } + } + post { + // In case of success we really pick the report from the exact slave build number + success { + script { + copyArtifacts(projectName: 'eNB-CI-FDD-Band7-B210', + filter: 'test_results*.html', + selector: specific("${FDD_Band7_B210_Status.number}")) + if (fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) { + archiveArtifacts artifacts: 'test_results-eNB-CI-FDD-Band7-B210.html' + } + } + } + // In case of any non-success, we are retrieving the HTML report of the last completed + // slave job. Note that we could use that syntax also in case of success. + // The only drop-back is that we may retrieve the HTML report of a previous build + cleanup { + script { + if (!fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) { + copyArtifacts(projectName: 'eNB-CI-FDD-Band7-B210', + filter: 'test_results*.html', + selector: lastCompleted()) + if (fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) { + archiveArtifacts artifacts: 'test_results-eNB-CI-FDD-Band7-B210.html' + } + } + } } } } - } - post { - // In case of success we really pick the report from the exact slave build number - success { - script { - copyArtifacts(projectName: 'eNB-CI-FDD-Band7-B210', - filter: 'test_results*.html', - selector: specific("${FDD_Band7_B210_Status.number}")) - if (fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) { - archiveArtifacts artifacts: 'test_results-eNB-CI-FDD-Band7-B210.html' + stage ("Test TDD - Band 40 - B210") { + steps { + gitlabCommitStatus(name: "Test-TDD-Band40") { + script { + if ("MERGE".equals(env.gitlabActionType)) { + TDD_Band40_B210_Status = build job: 'eNB-CI-TDD-Band40-B210', + parameters: [ + string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), + string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)), + string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)), + booleanParam(name: 'eNB_mergeRequest', value: true) + ] + } else { + TDD_Band40_B210_Status = build job: 'eNB-CI-TDD-Band40-B210', + parameters: [ + string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), + string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)), + string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)), + booleanParam(name: 'eNB_mergeRequest', value: false) + ] + } + } } } - } - // In case of any non-success, we are retrieving the HTML report of the last completed - // slave job. Note that we could use that syntax also in case of success. - // The only drop-back is that we may retrieve the HTML report of a previous build - cleanup { - script { - if (!fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) { - copyArtifacts(projectName: 'eNB-CI-FDD-Band7-B210', - filter: 'test_results*.html', - selector: lastCompleted()) - if (fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) { - archiveArtifacts artifacts: 'test_results-eNB-CI-FDD-Band7-B210.html' + post { + // In case of success we really pick the report from the exact slave build number + success { + script { + copyArtifacts(projectName: 'eNB-CI-TDD-Band40-B210', + filter: 'test_results*.html', + selector: specific("${TDD_Band40_B210_Status.number}")) + if (fileExists('test_results-eNB-CI-TDD-Band40-B210.html')) { + archiveArtifacts artifacts: 'test_results-eNB-CI-TDD-Band40-B210.html' + } + } + } + // In case of any non-success, we are retrieving the HTML report of the last completed + // slave job. Note that we could use that syntax also in case of success. + // The only drop-back is that we may retrieve the HTML report of a previous build + cleanup { + script { + if (!fileExists('test_results-eNB-CI-TDD-Band40-B210.html')) { + copyArtifacts(projectName: 'eNB-CI-TDD-Band40-B210', + filter: 'test_results*.html', + selector: lastCompleted()) + if (fileExists('test_results-eNB-CI-TDD-Band40-B210.html')) { + archiveArtifacts artifacts: 'test_results-eNB-CI-TDD-Band40-B210.html' + } + } } } } diff --git a/ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf new file mode 100644 index 0000000000..14230c125f --- /dev/null +++ b/ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf @@ -0,0 +1,220 @@ +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 = 1; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 40; + downlink_frequency = 2350000000L; + 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 = 0; + 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 = -106; + msg3_delta_Preamble = 6; + pucch_deltaF_Format1 = "deltaF2"; + pucch_deltaF_Format1b = "deltaF3"; + pucch_deltaF_Format2 = "deltaF0"; + pucch_deltaF_Format2a = "deltaF0"; + pucch_deltaF_Format2b = "deltaF0"; + + rach_numberOfRA_Preambles = 64; + rach_preamblesGroupAConfig = "DISABLE"; + /* + rach_sizeOfRA_PreamblesGroupA = ; + rach_messageSizeGroupA = ; + rach_messagePowerOffsetGroupB = ; + */ + rach_powerRampingStep = 4; + rach_preambleInitialReceivedTargetPower = -108; + rach_preambleTransMax = 10; + rach_raResponseWindowSize = 10; + rach_macContentionResolutionTimer = 48; + rach_maxHARQ_Msg3Tx = 4; + + pcch_default_PagingCycle = 128; + pcch_nB = "oneT"; + bcch_modificationPeriodCoeff = 2; + ue_TimersAndConstants_t300 = 1000; + ue_TimersAndConstants_t301 = 1000; + ue_TimersAndConstants_t310 = 1000; + ue_TimersAndConstants_t311 = 10000; + ue_TimersAndConstants_n310 = 20; + ue_TimersAndConstants_n311 = 1; + + ue_TransmissionMode = 1; + } + ); + + + srb1_parameters : + { + # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] + timer_poll_retransmit = 80; + + # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] + timer_reordering = 35; + + # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] + timer_status_prohibit = 0; + + # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] + poll_pdu = 4; + + # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] + poll_byte = 99999; + + # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] + max_retx_threshold = 4; + } + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + ////////// MME parameters: + mme_ip_address = ( { ipv4 = "10.0.0.2"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.0.1/24"; + + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "10.0.0.1/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 + }; + + log_config : + { + global_log_level ="debug"; + global_log_verbosity ="medium"; + hw_log_level ="info"; + hw_log_verbosity ="medium"; + phy_log_level ="info"; + phy_log_verbosity ="medium"; + mac_log_level ="info"; + mac_log_verbosity ="high"; + rlc_log_level ="info"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="info"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="info"; + rrc_log_verbosity ="medium"; + }; + + } +); +MACRLCs = ( + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + scheduler_mode = "fairRR"; + puSch10xSnr = 200; + puCch10xSnr = 200; + } +); + +L1s = ( + { + num_cc = 1; + tr_n_preference = "local_mac"; + } +); + +RUs = ( + { + local_rf = "yes" + nb_tx = 1 + nb_rx = 1 + att_tx = 0 + att_rx = 0; + bands = [38]; + max_pdschReferenceSignalPower = -27; + max_rxgain = 115; + eNB_instances = [0]; + + } +); + +NETWORK_CONTROLLER : +{ + FLEXRAN_ENABLED = "no"; + FLEXRAN_INTERFACE_NAME = "lo"; + FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; + FLEXRAN_PORT = 2210; + FLEXRAN_CACHE = "/mnt/oai_agent_cache"; + FLEXRAN_AWAIT_RECONF = "no"; +}; diff --git a/ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf new file mode 100644 index 0000000000..8a66e3131f --- /dev/null +++ b/ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf @@ -0,0 +1,220 @@ +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 = 1; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 40; + downlink_frequency = 2350000000L; + uplink_frequency_offset = 0; + Nid_cell = 0; + N_RB_DL = 25; + Nid_cell_mbsfn = 0; + nb_antenna_ports = 1; + nb_antennas_tx = 1; + nb_antennas_rx = 1; + tx_gain = 90; + rx_gain = 125; + prach_root = 0; + prach_config_index = 0; + prach_high_speed = "DISABLE"; + prach_zero_correlation = 1; + prach_freq_offset = 2; + pucch_delta_shift = 1; + pucch_nRB_CQI = 1; + pucch_nCS_AN = 0; + pucch_n1_AN = 0; + pdsch_referenceSignalPower =-27; + pdsch_p_b = 0; + pusch_n_SB = 1; + pusch_enable64QAM = "DISABLE"; + pusch_hoppingMode = "interSubFrame"; + pusch_hoppingOffset = 0; + pusch_groupHoppingEnabled = "ENABLE"; + pusch_groupAssignment = 0; + pusch_sequenceHoppingEnabled = "DISABLE"; + pusch_nDMRS1 = 1; + phich_duration = "NORMAL"; + phich_resource = "ONESIXTH"; + srs_enable = "DISABLE"; + /* srs_BandwidthConfig =; + srs_SubframeConfig =; + srs_ackNackST =; + srs_MaxUpPts =;*/ + + pusch_p0_Nominal = -96; + pusch_alpha = "AL1"; + pucch_p0_Nominal = -106; + msg3_delta_Preamble = 6; + pucch_deltaF_Format1 = "deltaF2"; + pucch_deltaF_Format1b = "deltaF3"; + pucch_deltaF_Format2 = "deltaF0"; + pucch_deltaF_Format2a = "deltaF0"; + pucch_deltaF_Format2b = "deltaF0"; + + rach_numberOfRA_Preambles = 64; + rach_preamblesGroupAConfig = "DISABLE"; + /* + rach_sizeOfRA_PreamblesGroupA = ; + rach_messageSizeGroupA = ; + rach_messagePowerOffsetGroupB = ; + */ + rach_powerRampingStep = 4; + rach_preambleInitialReceivedTargetPower = -108; + rach_preambleTransMax = 10; + rach_raResponseWindowSize = 10; + rach_macContentionResolutionTimer = 48; + rach_maxHARQ_Msg3Tx = 4; + + pcch_default_PagingCycle = 128; + pcch_nB = "oneT"; + bcch_modificationPeriodCoeff = 2; + ue_TimersAndConstants_t300 = 1000; + ue_TimersAndConstants_t301 = 1000; + ue_TimersAndConstants_t310 = 1000; + ue_TimersAndConstants_t311 = 10000; + ue_TimersAndConstants_n310 = 20; + ue_TimersAndConstants_n311 = 1; + + ue_TransmissionMode = 1; + } + ); + + + srb1_parameters : + { + # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] + timer_poll_retransmit = 80; + + # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] + timer_reordering = 35; + + # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] + timer_status_prohibit = 0; + + # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] + poll_pdu = 4; + + # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] + poll_byte = 99999; + + # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] + max_retx_threshold = 4; + } + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + ////////// MME parameters: + mme_ip_address = ( { ipv4 = "10.0.0.2"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.0.1/24"; + + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "10.0.0.1/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 + }; + + log_config : + { + global_log_level ="debug"; + global_log_verbosity ="medium"; + hw_log_level ="info"; + hw_log_verbosity ="medium"; + phy_log_level ="info"; + phy_log_verbosity ="medium"; + mac_log_level ="info"; + mac_log_verbosity ="high"; + rlc_log_level ="info"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="info"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="info"; + rrc_log_verbosity ="medium"; + }; + + } +); +MACRLCs = ( + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + scheduler_mode = "fairRR"; + puSch10xSnr = 200; + puCch10xSnr = 200; + } +); + +L1s = ( + { + num_cc = 1; + tr_n_preference = "local_mac"; + } +); + +RUs = ( + { + local_rf = "yes" + nb_tx = 1 + nb_rx = 1 + att_tx = 0 + att_rx = 0; + bands = [38]; + max_pdschReferenceSignalPower = -27; + max_rxgain = 115; + eNB_instances = [0]; + + } +); + +NETWORK_CONTROLLER : +{ + FLEXRAN_ENABLED = "no"; + FLEXRAN_INTERFACE_NAME = "lo"; + FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; + FLEXRAN_PORT = 2210; + FLEXRAN_CACHE = "/mnt/oai_agent_cache"; + FLEXRAN_AWAIT_RECONF = "no"; +}; diff --git a/ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf new file mode 100644 index 0000000000..ede864b733 --- /dev/null +++ b/ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf @@ -0,0 +1,220 @@ +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 = 1; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 40; + downlink_frequency = 2350000000L; + 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 = 0; + pdsch_referenceSignalPower =-27; + pdsch_p_b = 0; + pusch_n_SB = 1; + pusch_enable64QAM = "DISABLE"; + pusch_hoppingMode = "interSubFrame"; + pusch_hoppingOffset = 0; + pusch_groupHoppingEnabled = "ENABLE"; + pusch_groupAssignment = 0; + pusch_sequenceHoppingEnabled = "DISABLE"; + pusch_nDMRS1 = 1; + phich_duration = "NORMAL"; + phich_resource = "ONESIXTH"; + srs_enable = "DISABLE"; + /* srs_BandwidthConfig =; + srs_SubframeConfig =; + srs_ackNackST =; + srs_MaxUpPts =;*/ + + pusch_p0_Nominal = -96; + pusch_alpha = "AL1"; + pucch_p0_Nominal = -106; + msg3_delta_Preamble = 6; + pucch_deltaF_Format1 = "deltaF2"; + pucch_deltaF_Format1b = "deltaF3"; + pucch_deltaF_Format2 = "deltaF0"; + pucch_deltaF_Format2a = "deltaF0"; + pucch_deltaF_Format2b = "deltaF0"; + + rach_numberOfRA_Preambles = 64; + rach_preamblesGroupAConfig = "DISABLE"; + /* + rach_sizeOfRA_PreamblesGroupA = ; + rach_messageSizeGroupA = ; + rach_messagePowerOffsetGroupB = ; + */ + rach_powerRampingStep = 4; + rach_preambleInitialReceivedTargetPower = -108; + rach_preambleTransMax = 10; + rach_raResponseWindowSize = 10; + rach_macContentionResolutionTimer = 48; + rach_maxHARQ_Msg3Tx = 4; + + pcch_default_PagingCycle = 128; + pcch_nB = "oneT"; + bcch_modificationPeriodCoeff = 2; + ue_TimersAndConstants_t300 = 1000; + ue_TimersAndConstants_t301 = 1000; + ue_TimersAndConstants_t310 = 1000; + ue_TimersAndConstants_t311 = 10000; + ue_TimersAndConstants_n310 = 20; + ue_TimersAndConstants_n311 = 1; + + ue_TransmissionMode = 1; + } + ); + + + srb1_parameters : + { + # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] + timer_poll_retransmit = 80; + + # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] + timer_reordering = 35; + + # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] + timer_status_prohibit = 0; + + # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] + poll_pdu = 4; + + # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] + poll_byte = 99999; + + # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] + max_retx_threshold = 4; + } + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + ////////// MME parameters: + mme_ip_address = ( { ipv4 = "10.0.0.2"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.0.1/24"; + + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "10.0.0.1/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 + }; + + log_config : + { + global_log_level ="debug"; + global_log_verbosity ="medium"; + hw_log_level ="info"; + hw_log_verbosity ="medium"; + phy_log_level ="info"; + phy_log_verbosity ="medium"; + mac_log_level ="info"; + mac_log_verbosity ="high"; + rlc_log_level ="info"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="info"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="info"; + rrc_log_verbosity ="medium"; + }; + + } +); +MACRLCs = ( + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + scheduler_mode = "fairRR"; + puSch10xSnr = 200; + puCch10xSnr = 200; + } +); + +L1s = ( + { + num_cc = 1; + tr_n_preference = "local_mac"; + } +); + +RUs = ( + { + local_rf = "yes" + nb_tx = 1 + nb_rx = 1 + att_tx = 0 + att_rx = 0; + bands = [38]; + max_pdschReferenceSignalPower = -27; + max_rxgain = 115; + eNB_instances = [0]; + + } +); + +NETWORK_CONTROLLER : +{ + FLEXRAN_ENABLED = "no"; + FLEXRAN_INTERFACE_NAME = "lo"; + FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; + FLEXRAN_PORT = 2210; + FLEXRAN_CACHE = "/mnt/oai_agent_cache"; + FLEXRAN_AWAIT_RECONF = "no"; +}; diff --git a/ci-scripts/createVM.sh b/ci-scripts/createVM.sh index a1383ab499..f972a921ac 100755 --- a/ci-scripts/createVM.sh +++ b/ci-scripts/createVM.sh @@ -108,6 +108,7 @@ case $key in ;; -v2) VM_NAME=ci-basic-sim + VM_MEMORY=8192 shift ;; -v3) @@ -136,6 +137,7 @@ case $key in ;; basic-sim) VM_NAME=ci-basic-sim + VM_MEMORY=8192 ;; phy-sim) VM_NAME=ci-phy-sim diff --git a/ci-scripts/main.py b/ci-scripts/main.py index e66d25204b..f210fd4518 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -299,6 +299,7 @@ class SSHConnection(): self.command('sed -i -e \'s/mme_ip_address.*$/mme_ip_address = ( { ipv4 = "' + self.EPCIPAddress + '";/\' ' + ci_full_config_file, '\$', 2); self.command('sed -i -e \'s/ENB_IPV4_ADDRESS_FOR_S1_MME.*$/ENB_IPV4_ADDRESS_FOR_S1_MME = "' + self.eNBIPAddress + '";/\' ' + ci_full_config_file, '\$', 2); self.command('sed -i -e \'s/ENB_IPV4_ADDRESS_FOR_S1U.*$/ENB_IPV4_ADDRESS_FOR_S1U = "' + self.eNBIPAddress + '";/\' ' + ci_full_config_file, '\$', 2); + self.command('sed -i -e \'s/ENB_IPV4_ADDRESS_FOR_X2C.*$/ENB_IPV4_ADDRESS_FOR_X2C = "' + self.eNBIPAddress + '";/\' ' + ci_full_config_file, '\$', 2); # Launch eNB with the modified config file self.command('source oaienv', '\$', 5) self.command('cd cmake_targets', '\$', 5) diff --git a/ci-scripts/xml_files/enb_usrpb210_band40.xml b/ci-scripts/xml_files/enb_usrpb210_band40.xml new file mode 100644 index 0000000000..03eca477e8 --- /dev/null +++ b/ci-scripts/xml_files/enb_usrpb210_band40.xml @@ -0,0 +1,172 @@ + + + 050101 060101 070101 040101 030105 040301 040501 040602 040601 040401 040201 030201 050201 060201 070201 050101 060101 070101 040101 030104 040301 040501 040702 040701 040401 040201 030201 050201 060201 070201 + 010101 + + + Build_eNB + Build eNB (USRP) + -w USRP -c --eNB + + + + Initialize_eNB + Initialize eNB (FDD/Band40/10MHz) + -O ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf --codingw --fepw + + + + Initialize_eNB + Initialize eNB (TDD/Band40/5MHz/info) + -O ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf --codingw --fepw + + + + Terminate_eNB + Terminate eNB + + + + Initialize_UE + Initialize UE + + + + Terminate_UE + Terminate UE + + + + Attach_UE + Attach UE + + + + Detach_UE + Detach UE + + + + Ping + ping (5MHz - 20 sec) + -c 20 + 25 + + + + Iperf + iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(balanced) + -u -b 6.5M -t 30 -i 1 + 50 + balanced + + + + Iperf + iperf (5MHz - DL/13.5Mbps/UDP)(30 sec)(single-ue) + -u -b 13.5M -t 30 -i 1 + 50 + single-ue + + + + Iperf + iperf (5MHz - DL/15Mbps/UDP)(30 sec)(unbalanced) + -u -b 15M -t 30 -i 1 + 50 + unbalanced + + + + Iperf + iperf (10MHz - DL/6.5Mbps/UDP)(30 sec)(balanced) + -u -b 6.5M -t 30 -i 1 + 50 + balanced + + + + Iperf + iperf (10MHz - DL/13.5Mbps/UDP)(30 sec)(single-ue) + -u -b 13.5M -t 30 -i 1 + 50 + single-ue + + + + + Iperf + iperf (5MHz - UL/1Mbps/UDP)(30 sec)(single-ue) + -u -b 1M -t 30 -i 1 -R + 50 + single-ue + + + + Iperf + iperf (5MHz - UL/1Mbps/UDP)(30 sec)(balanced) + -u -b 1M -t 30 -i 1 -R + 50 + balanced + + + + Iperf + iperf (5MHz - UL/8Mbps/UDP)(30 sec)(unbalanced) + -u -b 8M -t 30 -i 1 -R + 50 + unbalanced + + + + Initialize_HSS + Initialize HSS + + + + Initialize_MME + Initialize MME + + + + Initialize_SPGW + Initialize SPGW + + + + Terminate_HSS + Terminate HSS + + + + Terminate_MME + Terminate MME + + + + Terminate_SPGW + Terminate SPGW + + + From 0d67d44e05f42aa566c3ff988ef0f3dd03819e52 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 3 Sep 2018 17:16:51 +0200 Subject: [PATCH 070/379] CI: running TDD test even if FDD failed Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 102 +++++++++++++++------------------- ci-scripts/runTestOnVM.sh | 8 +-- 2 files changed, 48 insertions(+), 62 deletions(-) diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index 587309d95c..260daef225 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -269,42 +269,35 @@ pipeline { steps { gitlabCommitStatus(name: "Test-FDD-Band7") { script { - if ("MERGE".equals(env.gitlabActionType)) { - FDD_Band7_B210_Status = build job: 'eNB-CI-FDD-Band7-B210', - parameters: [ - string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), - string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)), - string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)), - booleanParam(name: 'eNB_mergeRequest', value: true) - ] - } else { - FDD_Band7_B210_Status = build job: 'eNB-CI-FDD-Band7-B210', - parameters: [ - string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), - string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)), - string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)), - booleanParam(name: 'eNB_mergeRequest', value: false) - ] + try { + if ("MERGE".equals(env.gitlabActionType)) { + FDD_Band7_B210_Status = build job: 'eNB-CI-FDD-Band7-B210', + parameters: [ + string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), + string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)), + string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)), + booleanParam(name: 'eNB_mergeRequest', value: true) + ] + } else { + FDD_Band7_B210_Status = build job: 'eNB-CI-FDD-Band7-B210', + parameters: [ + string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), + string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)), + string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)), + booleanParam(name: 'eNB_mergeRequest', value: false) + ] + } + } catch (Exception e) { + currentBuild.result = 'FAILURE' } } } } post { - // In case of success we really pick the report from the exact slave build number - success { - script { - copyArtifacts(projectName: 'eNB-CI-FDD-Band7-B210', - filter: 'test_results*.html', - selector: specific("${FDD_Band7_B210_Status.number}")) - if (fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) { - archiveArtifacts artifacts: 'test_results-eNB-CI-FDD-Band7-B210.html' - } - } - } // In case of any non-success, we are retrieving the HTML report of the last completed - // slave job. Note that we could use that syntax also in case of success. + // slave job. // The only drop-back is that we may retrieve the HTML report of a previous build - cleanup { + always { script { if (!fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) { copyArtifacts(projectName: 'eNB-CI-FDD-Band7-B210', @@ -322,42 +315,35 @@ pipeline { steps { gitlabCommitStatus(name: "Test-TDD-Band40") { script { - if ("MERGE".equals(env.gitlabActionType)) { - TDD_Band40_B210_Status = build job: 'eNB-CI-TDD-Band40-B210', - parameters: [ - string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), - string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)), - string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)), - booleanParam(name: 'eNB_mergeRequest', value: true) - ] - } else { - TDD_Band40_B210_Status = build job: 'eNB-CI-TDD-Band40-B210', - parameters: [ - string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), - string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)), - string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)), - booleanParam(name: 'eNB_mergeRequest', value: false) - ] + try { + if ("MERGE".equals(env.gitlabActionType)) { + TDD_Band40_B210_Status = build job: 'eNB-CI-TDD-Band40-B210', + parameters: [ + string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), + string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)), + string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)), + booleanParam(name: 'eNB_mergeRequest', value: true) + ] + } else { + TDD_Band40_B210_Status = build job: 'eNB-CI-TDD-Band40-B210', + parameters: [ + string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), + string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)), + string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)), + booleanParam(name: 'eNB_mergeRequest', value: false) + ] + } + } catch (Exception e) { + currentBuild.result = 'FAILURE' } } } } post { - // In case of success we really pick the report from the exact slave build number - success { - script { - copyArtifacts(projectName: 'eNB-CI-TDD-Band40-B210', - filter: 'test_results*.html', - selector: specific("${TDD_Band40_B210_Status.number}")) - if (fileExists('test_results-eNB-CI-TDD-Band40-B210.html')) { - archiveArtifacts artifacts: 'test_results-eNB-CI-TDD-Band40-B210.html' - } - } - } // In case of any non-success, we are retrieving the HTML report of the last completed - // slave job. Note that we could use that syntax also in case of success. + // slave job. // The only drop-back is that we may retrieve the HTML report of a previous build - cleanup { + always { script { if (!fileExists('test_results-eNB-CI-TDD-Band40-B210.html')) { copyArtifacts(projectName: 'eNB-CI-TDD-Band40-B210', diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index f294a67455..1595273d7f 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -593,9 +593,9 @@ then ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS rm $EPC_VM_CMDS - echo "echo \"iperf -c $REAL_EPC_IP_ADDR -u -t 30 -b 4M -i 1\"" > $VM_CMDS - echo "echo \"COMMAND IS: iperf -c $REAL_EPC_IP_ADDR -u -t 30 -b 4M -i 1\" > /home/ubuntu/tmp/cmake_targets/log/iperf_ul_client.txt" > $VM_CMDS - echo "iperf -c $REAL_EPC_IP_ADDR -u -t 30 -b 4M -i 1 | tee -a /home/ubuntu/tmp/cmake_targets/log/iperf_ul_client.txt" >> $VM_CMDS + echo "echo \"iperf -c $REAL_EPC_IP_ADDR -u -t 30 -b 2M -i 1\"" > $VM_CMDS + echo "echo \"COMMAND IS: iperf -c $REAL_EPC_IP_ADDR -u -t 30 -b 2M -i 1\" > /home/ubuntu/tmp/cmake_targets/log/iperf_ul_client.txt" > $VM_CMDS + echo "iperf -c $REAL_EPC_IP_ADDR -u -t 30 -b 2M -i 1 | tee -a /home/ubuntu/tmp/cmake_targets/log/iperf_ul_client.txt" >> $VM_CMDS ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS rm -f $VM_CMDS @@ -674,7 +674,7 @@ then STATUS=-1 else EFFECTIVE_BANDWIDTH=`tail -n3 $ARCHIVES_LOC/iperf_ul_client.txt | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"` - if [[ $EFFECTIVE_BANDWIDTH =~ .*4.*Mbits.* ]] || [[ $EFFECTIVE_BANDWIDTH =~ .*3.*Mbits.* ]] + if [[ $EFFECTIVE_BANDWIDTH =~ .*2.*Mbits.* ]] || [[ $EFFECTIVE_BANDWIDTH =~ .*1.*Mbits.* ]] then echo "got requested UL bandwidth: $EFFECTIVE_BANDWIDTH" else From 4f56f4ee956686348f548fd3958712dcc6a12ad1 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 3 Sep 2018 18:04:07 +0200 Subject: [PATCH 071/379] Remove comment end Bug only occurs when compiling without AVX2 --- openair1/PHY/TOOLS/lte_dfts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/TOOLS/lte_dfts.c b/openair1/PHY/TOOLS/lte_dfts.c index 7e24af179d..45373ab9e2 100644 --- a/openair1/PHY/TOOLS/lte_dfts.c +++ b/openair1/PHY/TOOLS/lte_dfts.c @@ -3099,7 +3099,7 @@ void dft128(int16_t *x,int16_t *y,int scale) dft64((int16_t*)(xtmp+32),(int16_t*)(ytmp+16),1); if (LOG_DUMPFLAG(DEBUG_DFT)) { LOG_M("dft128a.m","dfta",ytmp,64,1,1); - LOG_M("dft128b.m","dftb",ytmp+16,64,1,1);*/ + LOG_M("dft128b.m","dftb",ytmp+16,64,1,1); } for (i=0; i<16; i++) { bfly2_16(ytmpp,ytmpp+16, From 1fe75d1f0d8022295501b0eac3613010034dddef Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 3 Sep 2018 18:08:55 +0200 Subject: [PATCH 072/379] CI: little fixes to TDD scenario Signed-off-by: Raphael Defosseux --- ci-scripts/reportTestLocally.sh | 56 +++++++++++--------- ci-scripts/xml_files/enb_usrpb210_band40.xml | 14 ++--- 2 files changed, 38 insertions(+), 32 deletions(-) diff --git a/ci-scripts/reportTestLocally.sh b/ci-scripts/reportTestLocally.sh index 113fc1e1e5..55e8ff3412 100755 --- a/ci-scripts/reportTestLocally.sh +++ b/ci-scripts/reportTestLocally.sh @@ -363,28 +363,34 @@ then echo " $NAME" >> ./test_simulator_results.html CMD=`egrep "COMMAND IS" $IPERF_CASE | sed -e "s#COMMAND IS: ##"` echo " $CMD" >> ./test_simulator_results.html + REQ_BITRATE=`echo $CMD | sed -e "s#^.*-b ##" -e "s#-i 1.*##"` + if [[ $REQ_BITRATE =~ .*K.* ]] + then + REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#K##"` + FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000.0" | bc -l` + fi + if [[ $REQ_BITRATE =~ .*M.* ]] + then + REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#M##"` + FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000.0" | bc -l` + fi + if [[ $REQ_BITRATE =~ .*G.* ]] + then + REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#G##"` + FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000000.0" | bc -l` + fi FILE_COMPLETE=`egrep -c "Server Report" $IPERF_CASE` if [ $FILE_COMPLETE -eq 0 ] then echo " KO" >> ./test_simulator_results.html - echo " N/A" >> ./test_simulator_results.html + SERVER_FILE=`echo $IPERF_CASE | sed -e "s#client#server#"` + FLOAT_EFF_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000}; s=s+a}END{br=s/n; printf "%.0f", br}'` + EFFECTIVE_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000}; s=s+a}END{br=s/n; if(br>1000000){printf "%.2f MBits/sec", br/1000000}}'` + PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'` + JITTER=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*/sec *##" -e "s# *ms.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{jitter=s/n; printf "%.3f ms", jitter}'` + PACKETLOSS_NOSIGN=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*(##" -e "s#%.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{per=s/n; printf "%.1f", per}'` + PACKETLOSS=`echo "${PACKETLOSS_NOSIGN}%"` else - REQ_BITRATE=`echo $CMD | sed -e "s#^.*-b ##" -e "s#-i 1.*##"` - if [[ $REQ_BITRATE =~ .*K.* ]] - then - REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#K##"` - FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000.0" | bc -l` - fi - if [[ $REQ_BITRATE =~ .*M.* ]] - then - REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#M##"` - FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000.0" | bc -l` - fi - if [[ $REQ_BITRATE =~ .*G.* ]] - then - REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#G##"` - FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000000.0" | bc -l` - fi EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"` if [[ $EFFECTIVE_BITRATE =~ .*Kbits/sec.* ]] then @@ -409,18 +415,18 @@ then else echo " OK" >> ./test_simulator_results.html fi - echo " " >> ./test_simulator_results.html - echo "
" >> ./test_simulator_results.html
             EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"`
-            echo "Bitrate      : $EFFECTIVE_BITRATE" >> ./test_simulator_results.html
-            echo "Bitrate Perf : $PERF %" >> ./test_simulator_results.html
             JITTER=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*Mbits/sec *##" -e "s#ms.*#ms#"`
-            echo "Jitter       : $JITTER" >> ./test_simulator_results.html
             PACKETLOSS=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*(##" -e "s#).*##"`
-            echo "Packet Loss  : $PACKETLOSS" >> ./test_simulator_results.html
-            echo "            
" >> ./test_simulator_results.html - echo " " >> ./test_simulator_results.html fi + echo " " >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html
+        echo "Bitrate      : $EFFECTIVE_BITRATE" >> ./test_simulator_results.html
+        echo "Bitrate Perf : $PERF %" >> ./test_simulator_results.html
+        echo "Jitter       : $JITTER" >> ./test_simulator_results.html
+        echo "Packet Loss  : $PACKETLOSS" >> ./test_simulator_results.html
+        echo "            
" >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html done diff --git a/ci-scripts/xml_files/enb_usrpb210_band40.xml b/ci-scripts/xml_files/enb_usrpb210_band40.xml index 03eca477e8..3f51f2d34a 100644 --- a/ci-scripts/xml_files/enb_usrpb210_band40.xml +++ b/ci-scripts/xml_files/enb_usrpb210_band40.xml @@ -21,7 +21,7 @@ --> - 050101 060101 070101 040101 030105 040301 040501 040602 040601 040401 040201 030201 050201 060201 070201 050101 060101 070101 040101 030104 040301 040501 040702 040701 040401 040201 030201 050201 060201 070201 + 050101 060101 070101 040101 030105 040301 040501 040602 040601 040603 040401 040201 030201 050201 060201 070201 050101 060101 070101 040101 030104 040301 040501 040702 040701 040401 040201 030201 050201 060201 070201 010101 @@ -84,24 +84,24 @@ Iperf - iperf (5MHz - DL/13.5Mbps/UDP)(30 sec)(single-ue) - -u -b 13.5M -t 30 -i 1 + iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(single-ue) + -u -b 6.5M -t 30 -i 1 50 single-ue Iperf - iperf (5MHz - DL/15Mbps/UDP)(30 sec)(unbalanced) - -u -b 15M -t 30 -i 1 + iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(unbalanced) + -u -b 6.5M -t 30 -i 1 50 unbalanced Iperf - iperf (10MHz - DL/6.5Mbps/UDP)(30 sec)(balanced) - -u -b 6.5M -t 30 -i 1 + iperf (10MHz - DL/13.5Mbps/UDP)(30 sec)(balanced) + -u -b 13.5M -t 30 -i 1 50 balanced From 18ade8812aecb52eb10b8d9d3d849ea0e6e7e674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Iardella?= Date: Tue, 20 Feb 2018 16:23:26 +0100 Subject: [PATCH 073/379] Add positioning support for DL --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 84 ++++++++----- openair2/LAYER2/MAC/mac_proto.h | 2 +- openair2/LAYER2/MAC/pre_processor.c | 146 +++++++++++++--------- 3 files changed, 143 insertions(+), 89 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index da52a8fedc..f283140403 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -80,6 +80,10 @@ float slice_percentage_current[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; float total_slice_percentage = 0; float total_slice_percentage_current = 0; +// Frequency ranges for slice positioning +int slice_position[MAX_NUM_SLICES*2] = {0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX}; +int slice_position_current[MAX_NUM_SLICES*2] = {0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX}; + // MAX MCS for each slice for past and current time int slice_maxmcs[MAX_NUM_SLICES] = { 28, 28, 28, 28 }; int slice_maxmcs_current[MAX_NUM_SLICES] = { 28, 28, 28, 28 }; @@ -445,9 +449,7 @@ set_ul_DAI(int module_idP, int UE_idP, int CC_idP, int frameP, //------------------------------------------------------------------------------ void -schedule_dlsch(module_id_t module_idP, - frame_t frameP, sub_frame_t subframeP, int *mbsfn_flag) -//------------------------------------------------------------------------------{ +schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, int *mbsfn_flag) { int i = 0; @@ -462,7 +464,7 @@ schedule_dlsch(module_id_t module_idP, for (i = 0; i < n_active_slices; i++) { if (slice_percentage[i] < 0 ){ LOG_W(MAC, "[eNB %d] frame %d subframe %d:invalid slice %d percentage %f. resetting to zero", - module_idP, frameP, subframeP, i, slice_percentage[i]); + module_idP, frameP, subframeP, i, slice_percentage[i]); slice_percentage[i]=0; } total_slice_percentage+=slice_percentage[i]; @@ -482,37 +484,38 @@ schedule_dlsch(module_id_t module_idP, // check if the number of slices has changed, and log if (n_active_slices_current != n_active_slices ){ - if ((n_active_slices > 0) && (n_active_slices <= MAX_NUM_SLICES)) { - LOG_I(MAC,"[eNB %d]frame %d subframe %d: number of active DL slices has changed: %d-->%d\n", - module_idP, frameP, subframeP, n_active_slices_current, n_active_slices); - - n_active_slices_current = n_active_slices; - - } else { - LOG_W(MAC,"invalid number of DL slices %d, revert to the previous value %d\n",n_active_slices, n_active_slices_current); - n_active_slices = n_active_slices_current; - } + if ((n_active_slices > 0) && (n_active_slices <= MAX_NUM_SLICES)) { + LOG_I(MAC, "[eNB %d]frame %d subframe %d: number of active DL slices has changed: %d-->%d\n", + module_idP, frameP, subframeP, n_active_slices_current, n_active_slices); + n_active_slices_current = n_active_slices; + } else { + LOG_W(MAC, "invalid number of DL slices %d, revert to the previous value %d\n", + n_active_slices, n_active_slices_current); + n_active_slices = n_active_slices_current; + } } // check if the slice rb share has changed, and log the console - if (slice_percentage_current[i] != slice_percentage[i]){ // new slice percentage - LOG_I(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f\n", - module_idP, i, frameP, subframeP, total_slice_percentage_current, total_slice_percentage, slice_percentage_current[i], slice_percentage[i]); - total_slice_percentage_current= total_slice_percentage; - slice_percentage_current[i] = slice_percentage[i]; - + if (slice_percentage_current[i] != slice_percentage[i]) { // new slice percentage + LOG_I(MAC, + "[eNB %d][SLICE %d][DL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f\n", + module_idP, i, frameP, subframeP, total_slice_percentage_current, total_slice_percentage, + slice_percentage_current[i], slice_percentage[i]); + total_slice_percentage_current = total_slice_percentage; + slice_percentage_current[i] = slice_percentage[i]; } // check if the slice max MCS, and log the console - if (slice_maxmcs_current[i] != slice_maxmcs[i]){ - if ((slice_maxmcs[i] >= 0) && (slice_maxmcs[i] < 29)){ - LOG_I(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: slice MAX MCS has changed: %d-->%d\n", - module_idP, i, frameP, subframeP, slice_maxmcs_current[i], slice_maxmcs[i]); - slice_maxmcs_current[i] = slice_maxmcs[i]; - } else { - LOG_W(MAC,"[eNB %d][SLICE %d][DL] invalid slice max mcs %d, revert the previous value %d\n",module_idP, i, slice_maxmcs[i],slice_maxmcs_current[i]); - slice_maxmcs[i]= slice_maxmcs_current[i]; - } + if (slice_maxmcs_current[i] != slice_maxmcs[i]) { + if ((slice_maxmcs[i] >= 0) && (slice_maxmcs[i] < 29)) { + LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: slice MAX MCS has changed: %d-->%d\n", + module_idP, i, frameP, subframeP, slice_maxmcs_current[i], slice_maxmcs[i]); + slice_maxmcs_current[i] = slice_maxmcs[i]; + } else { + LOG_W(MAC, "[eNB %d][SLICE %d][DL] invalid slice max mcs %d, revert the previous value %d\n", + module_idP, i, slice_maxmcs[i], slice_maxmcs_current[i]); + slice_maxmcs[i] = slice_maxmcs_current[i]; + } } // check if a new scheduler, and log the console @@ -541,6 +544,29 @@ schedule_dlsch(module_id_t module_idP, } } + // Check for new slice positions + if (slice_position[i*2] > slice_position[i*2 + 1] || + slice_position[i*2] < 0 || + slice_position[i*2 + 1] > N_RBG_MAX) { + LOG_W(MAC, "[eNB %d][SLICE %d][DL] invalid slicing position (%d-%d), using previous values (%d-%d)\n", + module_idP, i, + slice_position[i*2], slice_position[i*2 + 1], + slice_position_current[i*2], slice_position_current[i*2 + 1]); + slice_position[i*2] = slice_position_current[i*2]; + slice_position[i*2 + 1] = slice_position_current[i*2 + 1]; + } else { + if (slice_position_current[i*2] != slice_position[i*2]) { + LOG_N(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: start frequency has changed (%d-->%d)\n", + module_idP, i, frameP, subframeP, slice_position_current[i*2], slice_position[i*2]); + slice_position_current[i*2] = slice_position[i*2]; + } + if (slice_position_current[i*2 + 1] != slice_position[i*2 + 1]) { + LOG_N(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: end frequency has changed (%d-->%d)\n", + module_idP, i, frameP, subframeP, slice_position_current[i*2 + 1], slice_position[i*2 + 1]); + slice_position_current[i*2 + 1] = slice_position[i*2 + 1]; + } + } + // Check for new sorting policy if (sorting_policy_current[i] != sorting_policy[i]) { LOG_I(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n", diff --git a/openair2/LAYER2/MAC/mac_proto.h b/openair2/LAYER2/MAC/mac_proto.h index aba8c26d92..ab3b535f22 100644 --- a/openair2/LAYER2/MAC/mac_proto.h +++ b/openair2/LAYER2/MAC/mac_proto.h @@ -242,10 +242,10 @@ void dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id, int N_RBG, int transmission_mode, int min_rb_unit, - uint8_t N_RB_DL, uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], uint16_t nb_rbs_required_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], unsigned char rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], + uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX], unsigned char MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]); /* \brief Function to trigger the eNB scheduling procedure. It is called by PHY at the beginning of each subframe, \f$n$\f diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 16cbd3fc19..c212418431 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -56,6 +56,7 @@ extern RAN_CONTEXT_t RC; extern float slice_percentage[MAX_NUM_SLICES]; extern float slice_percentage_uplink[MAX_NUM_SLICES]; +extern int slice_position[MAX_NUM_SLICES*2]; extern uint32_t sorting_policy[MAX_NUM_SLICES]; extern int slice_maxmcs[MAX_NUM_SLICES]; @@ -451,6 +452,28 @@ void decode_sorting_policy(module_id_t Mod_idP, slice_id_t slice_id) { } } +void decode_slice_positioning(module_id_t Mod_idP, + slice_id_t slice_id, + uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX]) { + uint8_t CC_id; + int RBG, start_frequency, end_frequency; + + // Init slice_alloc_mask + for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { + for (RBG = 0; RBG < N_RBG_MAX; ++RBG) { + slice_allocation_mask[CC_id][RBG] = 0; + } + } + + start_frequency = slice_position[slice_id*2]; + end_frequency = slice_position[slice_id*2 + 1]; + for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { + for (RBG = start_frequency; RBG <= end_frequency; ++RBG) { + slice_allocation_mask[CC_id][RBG] = 1; + } + } +} + // This fuction sorts the UE in order their dlsch buffer and CQI void sort_UEs(module_id_t Mod_idP, slice_id_t slice_id, int frameP, sub_frame_t subframeP) @@ -497,6 +520,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, int N_RBG[NFAPI_CC_MAX], int min_rb_unit[NFAPI_CC_MAX], uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], + uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX], uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX], uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]) { @@ -624,11 +648,9 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, // control channel or retransmission /* TODO: do we have to check for retransmission? */ if (mac_eNB_get_rrc_status(Mod_id, rnti) < RRC_RECONFIGURED || round != 8) { - nb_rbs_required_remaining_1[CC_id][UE_id] = - nb_rbs_required[CC_id][UE_id]; + nb_rbs_required_remaining_1[CC_id][UE_id] = nb_rbs_required[CC_id][UE_id]; } else { - nb_rbs_required_remaining_1[CC_id][UE_id] = - cmin(average_rbs_per_user[CC_id], nb_rbs_required[CC_id][UE_id]); + nb_rbs_required_remaining_1[CC_id][UE_id] = cmin(average_rbs_per_user[CC_id], nb_rbs_required[CC_id][UE_id]); } } } @@ -694,18 +716,17 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, // retransmission in data channels // control channel in the 1st transmission // data channel for all TM - LOG_T(MAC, - "calling dlsch_scheduler_pre_processor_allocate .. \n "); - dlsch_scheduler_pre_processor_allocate(Mod_id, UE_id, + LOG_T(MAC, "calling dlsch_scheduler_pre_processor_allocate .. \n "); + dlsch_scheduler_pre_processor_allocate(Mod_id, + UE_id, CC_id, N_RBG[CC_id], transmission_mode, - min_rb_unit - [CC_id], - to_prb(RC.mac[Mod_id]->common_channels[CC_id].mib->message.dl_Bandwidth), + min_rb_unit[CC_id], nb_rbs_required, nb_rbs_required_remaining, rballoc_sub, + slice_allocation_mask, MIMO_mode_indicator); #ifdef TM5 @@ -890,6 +911,7 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, uint16_t i, j; uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX]; + uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX]; uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]; // If TM5 is revisited, we can move this inside accounting int min_rb_unit[NFAPI_CC_MAX]; @@ -947,7 +969,11 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, // Sorts the user on the basis of dlsch logical channel buffer and CQI sort_UEs(Mod_id, slice_id, frameP, subframeP); - // This function does the main allocation of the number of RBs + // TODO: When accounting() is revised, this will be moved inside positioning() + decode_slice_positioning(Mod_id, slice_id, slice_allocation_mask); + + // ACCOUNTING + // This function does the main allocation of the *number* of RBs dlsch_scheduler_pre_processor_accounting(Mod_id, slice_id, frameP, @@ -955,6 +981,7 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, N_RBG, min_rb_unit, rballoc_sub, + slice_allocation_mask, MIMO_mode_indicator, nb_rbs_required); @@ -1220,65 +1247,66 @@ dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id, int N_RBG, int transmission_mode, int min_rb_unit, - uint8_t N_RB_DL, uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], uint16_t nb_rbs_required_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], unsigned char rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], + uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX], unsigned char MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]) { - int i; - UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; - UE_sched_ctrl *ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; + int i; + UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; + UE_sched_ctrl *ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; + int N_RB_DL = to_prb(RC.mac[Mod_id]->common_channels[CC_id].mib->message.dl_Bandwidth); - for (i = 0; i < N_RBG; i++) { + for (i = 0; i < N_RBG; i++) { - if ((rballoc_sub[CC_id][i] == 0) && - (ue_sched_ctl->rballoc_sub_UE[CC_id][i] == 0) && - (nb_rbs_required_remaining[CC_id][UE_id] > 0) && - (ue_sched_ctl->pre_nb_available_rbs[CC_id] < - nb_rbs_required[CC_id][UE_id])) { + if (rballoc_sub[CC_id][i] != 0) + continue; + if (ue_sched_ctl->rballoc_sub_UE[CC_id][i] != 0) + continue; + if (nb_rbs_required_remaining[CC_id][UE_id] <= 0) + continue; + if (ue_sched_ctl->pre_nb_available_rbs[CC_id] >= nb_rbs_required[CC_id][UE_id]) + continue; + if (ue_sched_ctl->dl_pow_off[CC_id] == 0) + continue; + if (slice_allocation_mask[CC_id][i] == 0) + continue; - // if this UE is not scheduled for TM5 - if (ue_sched_ctl->dl_pow_off[CC_id] != 0) { +// if ((rballoc_sub[CC_id][i] == 0) && +// (ue_sched_ctl->rballoc_sub_UE[CC_id][i] == 0) && +// (nb_rbs_required_remaining[CC_id][UE_id] > 0) && +// (ue_sched_ctl->pre_nb_available_rbs[CC_id] < nb_rbs_required[CC_id][UE_id])) { +// // if this UE is not scheduled for TM5 +// if (ue_sched_ctl->dl_pow_off[CC_id] != 0) { - if ((i == N_RBG - 1) - && ((N_RB_DL == 25) || (N_RB_DL == 50))) { - if (nb_rbs_required_remaining[CC_id][UE_id] >= - min_rb_unit - 1) { - rballoc_sub[CC_id][i] = 1; - ue_sched_ctl->rballoc_sub_UE[CC_id][i] = 1; - MIMO_mode_indicator[CC_id][i] = 1; - if (transmission_mode == 5) { - ue_sched_ctl->dl_pow_off[CC_id] = 1; - } - nb_rbs_required_remaining[CC_id][UE_id] = - nb_rbs_required_remaining[CC_id][UE_id] - - min_rb_unit + 1; - ue_sched_ctl->pre_nb_available_rbs[CC_id] = - ue_sched_ctl->pre_nb_available_rbs[CC_id] + - min_rb_unit - 1; - } - } else { - if (nb_rbs_required_remaining[CC_id][UE_id] >= - min_rb_unit) { - rballoc_sub[CC_id][i] = 1; - ue_sched_ctl->rballoc_sub_UE[CC_id][i] = 1; - MIMO_mode_indicator[CC_id][i] = 1; - if (transmission_mode == 5) { - ue_sched_ctl->dl_pow_off[CC_id] = 1; - } - nb_rbs_required_remaining[CC_id][UE_id] = - nb_rbs_required_remaining[CC_id][UE_id] - - min_rb_unit; - ue_sched_ctl->pre_nb_available_rbs[CC_id] = - ue_sched_ctl->pre_nb_available_rbs[CC_id] + - min_rb_unit; - } - } - } // dl_pow_off[CC_id][UE_id] ! = 0 - } + if ((i == N_RBG - 1) && ((N_RB_DL == 25) || (N_RB_DL == 50))) { + if (nb_rbs_required_remaining[CC_id][UE_id] >= min_rb_unit - 1) { + rballoc_sub[CC_id][i] = 1; + ue_sched_ctl->rballoc_sub_UE[CC_id][i] = 1; + MIMO_mode_indicator[CC_id][i] = 1; + if (transmission_mode == 5) { + ue_sched_ctl->dl_pow_off[CC_id] = 1; + } + nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required_remaining[CC_id][UE_id] - min_rb_unit + 1; + ue_sched_ctl->pre_nb_available_rbs[CC_id] = ue_sched_ctl->pre_nb_available_rbs[CC_id] + min_rb_unit - 1; + } + } else { + if (nb_rbs_required_remaining[CC_id][UE_id] >= min_rb_unit) { + rballoc_sub[CC_id][i] = 1; + ue_sched_ctl->rballoc_sub_UE[CC_id][i] = 1; + MIMO_mode_indicator[CC_id][i] = 1; + if (transmission_mode == 5) { + ue_sched_ctl->dl_pow_off[CC_id] = 1; + } + nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required_remaining[CC_id][UE_id] - min_rb_unit; + ue_sched_ctl->pre_nb_available_rbs[CC_id] = ue_sched_ctl->pre_nb_available_rbs[CC_id] + min_rb_unit; + } } +// } // dl_pow_off[CC_id][UE_id] ! = 0 +// } + } } From 490e24560af77bd143d18d894f8ea9e228fa5687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Iardella?= Date: Wed, 21 Feb 2018 16:14:17 +0100 Subject: [PATCH 074/379] Split accounting and positioning in pre_processor --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 1 - openair2/LAYER2/MAC/mac_proto.h | 50 +- openair2/LAYER2/MAC/pre_processor.c | 531 ++++++++++++---------- 3 files changed, 316 insertions(+), 266 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index f283140403..d090d9a05b 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -700,7 +700,6 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, slice_idP, frameP, subframeP, - N_RBG, mbsfn_flag); stop_meas(&eNB->schedule_dlsch_preprocessor); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME diff --git a/openair2/LAYER2/MAC/mac_proto.h b/openair2/LAYER2/MAC/mac_proto.h index ab3b535f22..1086d8eef7 100644 --- a/openair2/LAYER2/MAC/mac_proto.h +++ b/openair2/LAYER2/MAC/mac_proto.h @@ -204,20 +204,6 @@ void mac_UE_out_of_sync_ind(module_id_t module_idP, frame_t frameP, void clear_nfapi_information(eNB_MAC_INST * eNB, int CC_idP, frame_t frameP, sub_frame_t subframeP); -void dlsch_scheduler_pre_processor_reset(int module_idP, int UE_id, - uint8_t CC_id, - int frameP, - int subframeP, - int N_RBG, - uint16_t - nb_rbs_required[NFAPI_CC_MAX] - [MAX_MOBILES_PER_ENB], - unsigned char - rballoc_sub[NFAPI_CC_MAX] - [N_RBG_MAX], - unsigned char - MIMO_mode_indicator[NFAPI_CC_MAX] - [N_RBG_MAX]); // eNB functions /* \brief This function assigns pre-available RBS to each UE in specified sub-bands before scheduling is done @@ -229,12 +215,38 @@ void dlsch_scheduler_pre_processor_reset(int module_idP, int UE_id, void dlsch_scheduler_pre_processor(module_id_t module_idP, - slice_id_t slice_idP, - frame_t frameP, - sub_frame_t subframe, - int N_RBG[NFAPI_CC_MAX], - int *mbsfn_flag); + slice_id_t slice_idP, + frame_t frameP, + sub_frame_t subframe, + int *mbsfn_flag); +void dlsch_scheduler_pre_processor_reset(module_id_t module_idP, + slice_id_t slice_id, + frame_t frameP, + sub_frame_t subframeP, + int min_rb_unit[NFAPI_CC_MAX], + uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + unsigned char rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], + unsigned char MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX], + int *mbsfn_flag); + +void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, + slice_id_t slice_id, + frame_t frameP, + sub_frame_t subframeP, + int min_rb_unit[NFAPI_CC_MAX], + uint8_t total_ue_count[NFAPI_CC_MAX], + uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + uint16_t nb_rbs_required_remaining_1[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]); + +void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, + slice_id_t slice_id, + int min_rb_unit[NFAPI_CC_MAX], + uint8_t total_ue_count[NFAPI_CC_MAX], + uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + uint16_t nb_rbs_required_remaining_1[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], + uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]); void dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id, int UE_id, diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index c212418431..b299ad33ea 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -191,12 +191,11 @@ store_dlsch_buffer(module_id_t Mod_id, slice_id_t slice_id, frame_t frameP, // This function returns the estimated number of RBs required by each UE for downlink scheduling void assign_rbs_required(module_id_t Mod_id, - slice_id_t slice_id, - frame_t frameP, - sub_frame_t subframe, - uint16_t - nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], - int min_rb_unit[NFAPI_CC_MAX]) + slice_id_t slice_id, + frame_t frameP, + sub_frame_t subframe, + int min_rb_unit[NFAPI_CC_MAX], + uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]) { uint16_t TBS = 0; @@ -517,37 +516,29 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, slice_id_t slice_id, frame_t frameP, sub_frame_t subframeP, - int N_RBG[NFAPI_CC_MAX], int min_rb_unit[NFAPI_CC_MAX], - uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], - uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX], - uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX], - uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]) { - - + uint8_t total_ue_count[NFAPI_CC_MAX], + uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + uint16_t nb_rbs_required_remaining_1[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]) +{ int UE_id, CC_id; - int ii, r1; + int i; rnti_t rnti; uint8_t harq_pid, round, transmission_mode; uint8_t total_rbs_used[NFAPI_CC_MAX]; - uint8_t total_ue_count[NFAPI_CC_MAX]; uint16_t average_rbs_per_user[NFAPI_CC_MAX]; - uint16_t nb_rbs_required_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; - uint16_t nb_rbs_required_remaining_1[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; int N_RB_DL; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; UE_sched_ctrl *ue_sched_ctl; COMMON_channels_t *cc; + // Reset for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) { total_ue_count[CC_id] = 0; total_rbs_used[CC_id] = 0; average_rbs_per_user[CC_id] = 0; - for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; ++UE_id) { - nb_rbs_required_remaining[CC_id][UE_id] = 0; - } } // loop over all active UEs @@ -559,8 +550,8 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, if (!ue_slice_membership(UE_id, slice_id)) continue; - for (ii = 0; ii < UE_num_active_CC(UE_list, UE_id); ii++) { - CC_id = UE_list->ordered_CCids[ii][UE_id]; + for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { + CC_id = UE_list->ordered_CCids[i][UE_id]; ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; cc = &RC.mac[Mod_id]->common_channels[CC_id]; // TODO Can we use subframe2harqpid() here? @@ -595,8 +586,8 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, if (!ue_slice_membership(UE_id, slice_id)) continue; - for (ii = 0; ii < UE_num_active_CC(UE_list, UE_id); ii++) { - CC_id = UE_list->ordered_CCids[ii][UE_id]; + for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { + CC_id = UE_list->ordered_CCids[i][UE_id]; // hypothetical assignment /* @@ -638,8 +629,8 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, if (!ue_slice_membership(UE_id, slice_id)) continue; - for (ii = 0; ii < UE_num_active_CC(UE_list, UE_id); ii++) { - CC_id = UE_list->ordered_CCids[ii][UE_id]; + for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { + CC_id = UE_list->ordered_CCids[i][UE_id]; ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; cc = &RC.mac[Mod_id]->common_channels[CC_id]; harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP ,subframeP); @@ -654,15 +645,40 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, } } } +} + +void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, + slice_id_t slice_id, + int min_rb_unit[NFAPI_CC_MAX], + uint8_t total_ue_count[NFAPI_CC_MAX], + uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + uint16_t nb_rbs_required_remaining_1[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], + uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]) { + + int UE_id, CC_id; + int i; + uint8_t transmission_mode; + + uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX]; + uint16_t nb_rbs_required_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; + int N_RBG[NFAPI_CC_MAX]; + + rnti_t rnti; + UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; + + decode_slice_positioning(Mod_id, slice_id, slice_allocation_mask); //Allocation to UEs is done in 2 rounds, // 1st stage: average number of RBs allocated to each UE // 2nd stage: remaining RBs are allocated to high priority UEs - for (r1 = 0; r1 < 2; r1++) { + for (int r1 = 0; r1 < 2; r1++) { for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { - for (ii = 0; ii < UE_num_active_CC(UE_list, UE_id); ii++) { - CC_id = UE_list->ordered_CCids[ii][UE_id]; + for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { + CC_id = UE_list->ordered_CCids[i][UE_id]; + COMMON_channels_t *cc = &RC.mac[Mod_id]->common_channels[CC_id]; + N_RBG[i] = to_rbg(cc->mib->message.dl_Bandwidth); if (r1 == 0) { nb_rbs_required_remaining[CC_id][UE_id] = @@ -692,9 +708,9 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { - for (ii = 0; ii < UE_num_active_CC(UE_list, UE_id); ii++) { + for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { - CC_id = UE_list->ordered_CCids[ii][UE_id]; + CC_id = UE_list->ordered_CCids[i][UE_id]; // if there are UEs with traffic if (total_ue_count[CC_id] > 0) { // ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; @@ -749,10 +765,10 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, && (nb_rbs_required_remaining[CC_id][UE_id] > 0)) { - for (ii = UE_list->next[UE_id + 1]; ii >= 0; - ii = UE_list->next[ii]) { + for (i = UE_list->next[UE_id + 1]; i >= 0; + i = UE_list->next[i]) { - UE_id2 = ii; + UE_id2 = i; rnti2 = UE_RNTI(Mod_id, UE_id2); ue_sched_ctl2 = &UE_list->UE_sched_ctrl[UE_id2]; @@ -903,19 +919,19 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, slice_id_t slice_id, frame_t frameP, sub_frame_t subframeP, - int N_RBG[NFAPI_CC_MAX], - int *mbsfn_flag) { - + int *mbsfn_flag) +{ int UE_id; uint8_t CC_id; uint16_t i, j; uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX]; - uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX]; + uint8_t total_ue_count[NFAPI_CC_MAX]; uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]; // If TM5 is revisited, we can move this inside accounting int min_rb_unit[NFAPI_CC_MAX]; uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; + uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; UE_sched_ctrl *ue_sched_ctl; @@ -932,59 +948,41 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, UE_sched_ctrl *ue_sched_ctl1, *ue_sched_ctl2; #endif - for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) { - - if (mbsfn_flag[CC_id] > 0) // If this CC is allocated for MBSFN skip it here - continue; - - min_rb_unit[CC_id] = get_min_rb_unit(Mod_id, CC_id); - - for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; ++UE_id) { - if (UE_list->active[UE_id] != TRUE) - continue; - - if (!ue_slice_membership(UE_id, slice_id)) - continue; - - // Initialize scheduling information for all active UEs - dlsch_scheduler_pre_processor_reset(Mod_id, - UE_id, - CC_id, - frameP, - subframeP, - N_RBG[CC_id], - nb_rbs_required, - rballoc_sub, - MIMO_mode_indicator); - - } - } + // Initialize scheduling information for all active UEs + dlsch_scheduler_pre_processor_reset(Mod_id, slice_id, frameP, subframeP, + min_rb_unit, + nb_rbs_required, + rballoc_sub, + MIMO_mode_indicator, + mbsfn_flag); // TODO Not sure if useful // Store the DLSCH buffer for each logical channel store_dlsch_buffer(Mod_id, slice_id, frameP, subframeP); // Calculate the number of RBs required by each UE on the basis of logical channel's buffer - assign_rbs_required(Mod_id, slice_id, frameP, subframeP, nb_rbs_required, min_rb_unit); + assign_rbs_required(Mod_id, slice_id, frameP, subframeP, + min_rb_unit, + nb_rbs_required); // Sorts the user on the basis of dlsch logical channel buffer and CQI sort_UEs(Mod_id, slice_id, frameP, subframeP); - // TODO: When accounting() is revised, this will be moved inside positioning() - decode_slice_positioning(Mod_id, slice_id, slice_allocation_mask); - // ACCOUNTING - // This function does the main allocation of the *number* of RBs - dlsch_scheduler_pre_processor_accounting(Mod_id, - slice_id, - frameP, - subframeP, - N_RBG, + // This procedure decides the number of RBs to allocate + dlsch_scheduler_pre_processor_accounting(Mod_id, slice_id, frameP, subframeP, min_rb_unit, - rballoc_sub, - slice_allocation_mask, - MIMO_mode_indicator, - nb_rbs_required); - + total_ue_count, + nb_rbs_required, + nb_rbs_accounted); + // POSITIONING + // This procedure does the main allocation of the RBs + dlsch_scheduler_pre_processor_positioning(Mod_id, slice_id, + min_rb_unit, + total_ue_count, + nb_rbs_required, + nb_rbs_accounted, + rballoc_sub, + MIMO_mode_indicator); #ifdef TM5 // This has to be revisited!!!! @@ -1034,13 +1032,15 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; //PHY_vars_eNB_g[Mod_id]->mu_mimo_mode[UE_id].dl_pow_off = dl_pow_off[UE_id]; + COMMON_channels_t *cc = &RC.mac[Mod_id]->common_channels[CC_id]; + int N_RBG = to_rbg(cc->mib->message.dl_Bandwidth); if (ue_sched_ctl->pre_nb_available_rbs[CC_id] > 0) { LOG_D(MAC, "******************DL Scheduling Information for UE%d ************************\n", UE_id); LOG_D(MAC, "dl power offset UE%d = %d \n", UE_id, ue_sched_ctl->dl_pow_off[CC_id]); LOG_D(MAC, "***********RB Alloc for every subband for UE%d ***********\n", UE_id); - for (j = 0; j < N_RBG[CC_id]; j++) { + for (j = 0; j < N_RBG; j++) { //PHY_vars_eNB_g[Mod_id]->mu_mimo_mode[UE_id].rballoc_sub[UE_id] = rballoc_sub_UE[CC_id][UE_id][UE_id]; LOG_D(MAC, "RB Alloc for UE%d and Subband%d = %d\n", UE_id, j, ue_sched_ctl->rballoc_sub_UE[CC_id][j]); } @@ -1056,186 +1056,225 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, #define SF0_LIMIT 1 void -dlsch_scheduler_pre_processor_reset(int module_idP, - int UE_id, - uint8_t CC_id, - int frameP, - int subframeP, - int N_RBG, - uint16_t nb_rbs_required[NFAPI_CC_MAX] - [MAX_MOBILES_PER_ENB], - unsigned char - rballoc_sub[NFAPI_CC_MAX] - [N_RBG_MAX], - unsigned char - MIMO_mode_indicator[NFAPI_CC_MAX] - [N_RBG_MAX]) +dlsch_scheduler_pre_processor_reset(module_id_t module_idP, + slice_id_t slice_id, + frame_t frameP, + sub_frame_t subframeP, + int min_rb_unit[NFAPI_CC_MAX], + uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + unsigned char rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], + unsigned char MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX], + int *mbsfn_flag) { + + int UE_id; + uint8_t CC_id; int i, j; UE_list_t *UE_list = &RC.mac[module_idP]->UE_list; UE_sched_ctrl *ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; - - uint8_t *vrb_map = RC.mac[module_idP]->common_channels[CC_id].vrb_map; - int N_RB_DL = - to_prb(RC.mac[module_idP]->common_channels[CC_id].mib->message.dl_Bandwidth); - int RBGsize = N_RB_DL / N_RBG, RBGsize_last; -#ifdef SF0_LIMIT - int sf0_upper = -1, sf0_lower = -1; -#endif - - - LOG_D(MAC, "Running preprocessor for UE %d (%x)\n", UE_id,(int)(UE_RNTI(module_idP, UE_id))); - // initialize harq_pid and round - - if (ue_sched_ctl->ta_timer) - ue_sched_ctl->ta_timer--; - - /* - eNB_UE_stats *eNB_UE_stats; - - if (eNB_UE_stats == NULL) - return; - - - mac_xface->get_ue_active_harq_pid(module_idP,CC_id,rnti, - frameP,subframeP, - &ue_sched_ctl->harq_pid[CC_id], - &ue_sched_ctl->round[CC_id], - openair_harq_DL); - - if (ue_sched_ctl->ta_timer == 0) { - - // WE SHOULD PROTECT the eNB_UE_stats with a mutex here ... - - ue_sched_ctl->ta_timer = 20; // wait 20 subframes before taking TA measurement from PHY - switch (N_RB_DL) { - case 6: - ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update; - break; - - case 15: - ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update/2; - break; - - case 25: - ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update/4; - break; - - case 50: - ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update/8; - break; - - case 75: - ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update/12; - break; - - case 100: - ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update/16; - break; - } - // clear the update in case PHY does not have a new measurement after timer expiry - eNB_UE_stats->timing_advance_update = 0; - } - else { - ue_sched_ctl->ta_timer--; - ue_sched_ctl->ta_update =0; // don't trigger a timing advance command - } - - - if (UE_id==0) { - VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_TIMING_ADVANCE,ue_sched_ctl->ta_update); - } - */ - - nb_rbs_required[CC_id][UE_id] = 0; - ue_sched_ctl->pre_nb_available_rbs[CC_id] = 0; - ue_sched_ctl->dl_pow_off[CC_id] = 2; - - switch (N_RB_DL) { - case 6: - RBGsize = 1; - RBGsize_last = 1; - break; - case 15: - RBGsize = 2; - RBGsize_last = 1; - break; - case 25: - RBGsize = 2; - RBGsize_last = 1; - break; - case 50: - RBGsize = 3; - RBGsize_last = 2; - break; - case 75: - RBGsize = 4; - RBGsize_last = 3; - break; - case 100: - RBGsize = 4; - RBGsize_last = 4; - break; - default: - AssertFatal(1 == 0, "unsupported RBs (%d)\n", N_RB_DL); - } + int N_RB_DL, RBGsize, RBGsize_last; + int N_RBG[NFAPI_CC_MAX]; #ifdef SF0_LIMIT - switch (N_RBG) { - case 6: - sf0_lower = 0; - sf0_upper = 5; - break; - case 8: - sf0_lower = 2; - sf0_upper = 5; - break; - case 13: - sf0_lower = 4; - sf0_upper = 7; - break; - case 17: - sf0_lower = 7; - sf0_upper = 9; - break; - case 25: - sf0_lower = 11; - sf0_upper = 13; - break; - default: - AssertFatal(1 == 0, "unsupported RBs (%d)\n", N_RB_DL); - } + int sf0_lower, sf0_upper; #endif - // Initialize Subbands according to VRB map - for (i = 0; i < N_RBG; i++) { - int rb_size = i == N_RBG - 1 ? RBGsize_last : RBGsize; + rnti_t rnti; + UE_list_t *UE_list; + UE_sched_ctrl *ue_sched_ctl; + uint8_t *vrb_map; + COMMON_channels_t *cc; +// + for (CC_id = 0; CC_id < NFAPI_CC_MAX; CC_id++) { - ue_sched_ctl->rballoc_sub_UE[CC_id][i] = 0; - rballoc_sub[CC_id][i] = 0; + LOG_D(MAC, "Running preprocessor for UE %d (%x)\n", UE_id,(int)(UE_RNTI(module_idP, UE_id))); + // initialize harq_pid and round + cc = &RC.mac[module_idP]->common_channels[CC_id]; + N_RBG[CC_id] = to_rbg(cc->mib->message.dl_Bandwidth); + min_rb_unit[CC_id] = get_min_rb_unit(module_idP, CC_id); + + if (mbsfn_flag[CC_id] > 0) // If this CC is allocated for MBSFN skip it here + continue; + + for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; ++UE_id) { + + + UE_list = &RC.mac[module_idP]->UE_list; + ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; + rnti = UE_RNTI(module_idP, UE_id); + + + if (rnti == NOT_A_RNTI) + continue; + + if (UE_list->active[UE_id] != TRUE) + continue; + + if (!ue_slice_membership(UE_id, slice_id)) + continue; + + vrb_map = RC.mac[module_idP]->common_channels[CC_id].vrb_map; + N_RB_DL = to_prb(RC.mac[module_idP]->common_channels[CC_id].mib->message.dl_Bandwidth); #ifdef SF0_LIMIT - // for avoiding 6+ PRBs around DC in subframe 0 (avoid excessive errors) - /* TODO: make it proper - allocate those RBs, do not "protect" them, but - * compute number of available REs and limit MCS according to the - * TBS table 36.213 7.1.7.2.1-1 (can be done after pre-processor) - */ - if (subframeP == 0 && i >= sf0_lower && i <= sf0_upper) - rballoc_sub[CC_id][i] = 1; + sf0_lower = -1; + sf0_upper = -1; #endif - // for SI-RNTI,RA-RNTI and P-RNTI allocations - for (j = 0; j < rb_size; j++) { - if (vrb_map[j + (i * RBGsize)] != 0) { - rballoc_sub[CC_id][i] = 1; - LOG_D(MAC, "Frame %d, subframe %d : vrb %d allocated\n", - frameP, subframeP, j + (i * RBGsize)); - break; + LOG_D(MAC, "Running preprocessor for UE %d (%x)\n", UE_id, rnti); + // initialize harq_pid and round + if (ue_sched_ctl->ta_timer) + ue_sched_ctl->ta_timer--; + + + /* + eNB_UE_stats *eNB_UE_stats; + + if (eNB_UE_stats == NULL) + return; + + + mac_xface->get_ue_active_harq_pid(module_idP,CC_id,rnti, + frameP,subframeP, + &ue_sched_ctl->harq_pid[CC_id], + &ue_sched_ctl->round[CC_id], + openair_harq_DL); + + + if (ue_sched_ctl->ta_timer == 0) { + + // WE SHOULD PROTECT the eNB_UE_stats with a mutex here ... + + ue_sched_ctl->ta_timer = 20; // wait 20 subframes before taking TA measurement from PHY + switch (N_RB_DL) { + case 6: + ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update; + break; + + case 15: + ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update/2; + break; + + case 25: + ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update/4; + break; + + case 50: + ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update/8; + break; + + case 75: + ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update/12; + break; + + case 100: + ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update/16; + break; + } + // clear the update in case PHY does not have a new measurement after timer expiry + eNB_UE_stats->timing_advance_update = 0; + } + else { + ue_sched_ctl->ta_timer--; + ue_sched_ctl->ta_update =0; // don't trigger a timing advance command + } + + + if (UE_id==0) { + VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_TIMING_ADVANCE,ue_sched_ctl->ta_update); + } + */ + + nb_rbs_required[CC_id][UE_id] = 0; + ue_sched_ctl->pre_nb_available_rbs[CC_id] = 0; + ue_sched_ctl->dl_pow_off[CC_id] = 2; + + switch (N_RB_DL) { + case 6: + RBGsize = 1; + RBGsize_last = 1; + break; + case 15: + RBGsize = 2; + RBGsize_last = 1; + break; + case 25: + RBGsize = 2; + RBGsize_last = 1; + break; + case 50: + RBGsize = 3; + RBGsize_last = 2; + break; + case 75: + RBGsize = 4; + RBGsize_last = 3; + break; + case 100: + RBGsize = 4; + RBGsize_last = 4; + break; + default: + AssertFatal(1 == 0, "unsupported RBs (%d)\n", N_RB_DL); + } + +#ifdef SF0_LIMIT + switch (N_RBG[CC_id]) { + case 6: + sf0_lower = 0; + sf0_upper = 5; + break; + case 8: + sf0_lower = 2; + sf0_upper = 5; + break; + case 13: + sf0_lower = 4; + sf0_upper = 7; + break; + case 17: + sf0_lower = 7; + sf0_upper = 9; + break; + case 25: + sf0_lower = 11; + sf0_upper = 13; + break; + default: + AssertFatal(1 == 0, "unsupported RBs (%d)\n", N_RB_DL); + } +#endif + + // Initialize Subbands according to VRB map + for (i = 0; i < N_RBG[CC_id]; i++) { + int rb_size = i == N_RBG[CC_id] - 1 ? RBGsize_last : RBGsize; + + ue_sched_ctl->rballoc_sub_UE[CC_id][i] = 0; + rballoc_sub[CC_id][i] = 0; + +#ifdef SF0_LIMIT + // for avoiding 6+ PRBs around DC in subframe 0 (avoid excessive errors) + /* TODO: make it proper - allocate those RBs, do not "protect" them, but + * compute number of available REs and limit MCS according to the + * TBS table 36.213 7.1.7.2.1-1 (can be done after pre-processor) + */ + if (subframeP == 0 && i >= sf0_lower && i <= sf0_upper) + rballoc_sub[CC_id][i] = 1; +#endif + + // for SI-RNTI,RA-RNTI and P-RNTI allocations + for (j = 0; j < rb_size; j++) { + if (vrb_map[j + (i*RBGsize)] != 0) { + rballoc_sub[CC_id][i] = 1; + LOG_D(MAC, "Frame %d, subframe %d : vrb %d allocated\n", frameP, subframeP, j + (i*RBGsize)); + break; + } + } + LOG_D(MAC, "Frame %d Subframe %d CC_id %d RBG %i : rb_alloc %d\n", + frameP, subframeP, CC_id, i, rballoc_sub[CC_id][i]); + MIMO_mode_indicator[CC_id][i] = 2; } } - LOG_D(MAC, "Frame %d Subframe %d CC_id %d RBG %i : rb_alloc %d\n", - frameP, subframeP, CC_id, i, rballoc_sub[CC_id][i]); - MIMO_mode_indicator[CC_id][i] = 2; } } From 53c617cdcfb1fd375036be79e1298b9ea477e4c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Iardella?= Date: Fri, 23 Feb 2018 17:14:44 +0100 Subject: [PATCH 075/379] Move slicing configuration variables in header files --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 39 +- openair2/LAYER2/MAC/eNB_scheduler_dlsch.h | 77 +++ .../LAYER2/MAC/eNB_scheduler_primitives.c | 2 +- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 33 +- openair2/LAYER2/MAC/eNB_scheduler_ulsch.h | 71 +++ openair2/LAYER2/MAC/mac_proto.h | 11 +- openair2/LAYER2/MAC/pre_processor.c | 509 ++++++++++-------- 7 files changed, 435 insertions(+), 307 deletions(-) create mode 100644 openair2/LAYER2/MAC/eNB_scheduler_dlsch.h create mode 100644 openair2/LAYER2/MAC/eNB_scheduler_ulsch.h diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index d090d9a05b..e6989d676c 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -44,6 +44,7 @@ #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" //#include "LAYER2/MAC/pre_processor.c" +#include "eNB_scheduler_dlsch.h" #include "pdcp.h" #include "SIMULATION/TOOLS/sim.h" // for taus @@ -68,44 +69,6 @@ extern RAN_CONTEXT_t RC; extern uint8_t nfapi_mode; - -// number of active slices for past and current time -int n_active_slices = 1; -int n_active_slices_current = 1; - -// RB share for each slice for past and current time -float avg_slice_percentage=0.25; -float slice_percentage[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; -float slice_percentage_current[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; -float total_slice_percentage = 0; -float total_slice_percentage_current = 0; - -// Frequency ranges for slice positioning -int slice_position[MAX_NUM_SLICES*2] = {0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX}; -int slice_position_current[MAX_NUM_SLICES*2] = {0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX}; - -// MAX MCS for each slice for past and current time -int slice_maxmcs[MAX_NUM_SLICES] = { 28, 28, 28, 28 }; -int slice_maxmcs_current[MAX_NUM_SLICES] = { 28, 28, 28, 28 }; - -int update_dl_scheduler[MAX_NUM_SLICES] = { 1, 1, 1, 1 }; -int update_dl_scheduler_current[MAX_NUM_SLICES] = { 1, 1, 1, 1 }; - -// name of available scheduler -char *dl_scheduler_type[MAX_NUM_SLICES] = - { "schedule_ue_spec", - "schedule_ue_spec", - "schedule_ue_spec", - "schedule_ue_spec" - }; - -// The lists of criteria that enforce the sorting policies of the slices -uint32_t sorting_policy[MAX_NUM_SLICES] = {0x01234, 0x01234, 0x01234, 0x01234}; -uint32_t sorting_policy_current[MAX_NUM_SLICES] = {0x01234, 0x01234, 0x01234, 0x01234}; - -// pointer to the slice specific scheduler -slice_scheduler_dl slice_sched_dl[MAX_NUM_SLICES] = {0}; - //------------------------------------------------------------------------------ void add_ue_dlsch_info(module_id_t module_idP, diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h new file mode 100644 index 0000000000..29ce735b05 --- /dev/null +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h @@ -0,0 +1,77 @@ +/* + * 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.1 (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 LAYER2/MAC/eNB_scheduler_dlsch.h +* \brief DLSCH Scheduler policy variables used during different phases of scheduling +* \author Navid Nikaein and Niccolo' Iardella +* \date 2018 +* \version 0.2 +* \email navid.nikaein@eurecom.fr + +*/ +/** @defgroup _oai2 openair2 Reference Implementation + * @ingroup _ref_implementation_ + * @{ + */ + +/*@}*/ + +#ifndef __LAYER2_MAC_ENB_SCHEDULER_DLSCH_H__ +#define __LAYER2_MAC_ENB_SCHEDULER_DLSCH_H__ + +// number of active slices for past and current time +int n_active_slices = 1; +int n_active_slices_current = 1; + +// RB share for each slice for past and current time +float avg_slice_percentage=0.25; +float slice_percentage[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; +float slice_percentage_current[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; +float total_slice_percentage = 0; +float total_slice_percentage_current = 0; + +// Frequency ranges for slice positioning +int slice_position[MAX_NUM_SLICES*2] = {0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX}; +int slice_position_current[MAX_NUM_SLICES*2] = {0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX}; + +// MAX MCS for each slice for past and current time +int slice_maxmcs[MAX_NUM_SLICES] = { 28, 28, 28, 28 }; +int slice_maxmcs_current[MAX_NUM_SLICES] = { 28, 28, 28, 28 }; + +int update_dl_scheduler[MAX_NUM_SLICES] = { 1, 1, 1, 1 }; +int update_dl_scheduler_current[MAX_NUM_SLICES] = { 1, 1, 1, 1 }; + +// name of available scheduler +char *dl_scheduler_type[MAX_NUM_SLICES] = + { "schedule_ue_spec", + "schedule_ue_spec", + "schedule_ue_spec", + "schedule_ue_spec" + }; + +// The lists of criteria that enforce the sorting policies of the slices +uint32_t sorting_policy[MAX_NUM_SLICES] = {0x01234, 0x01234, 0x01234, 0x01234}; +uint32_t sorting_policy_current[MAX_NUM_SLICES] = {0x01234, 0x01234, 0x01234, 0x01234}; + +// pointer to the slice specific scheduler +slice_scheduler_dl slice_sched_dl[MAX_NUM_SLICES] = {0}; + +#endif //__LAYER2_MAC_ENB_SCHEDULER_DLSCH_H__ diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c index b85335caab..5328920af3 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c @@ -4536,7 +4536,7 @@ harq_indication(module_id_t mod_idP, int CC_idP, frame_t frameP, // Flexran Slicing functions -uint16_t flexran_nb_rbs_allowed_slice(float rb_percentage, int total_rbs) +uint16_t nb_rbs_allowed_slice(float rb_percentage, int total_rbs) { return (uint16_t) floor(rb_percentage * total_rbs); } diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index f48cf50bce..7c06a52909 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -48,6 +48,7 @@ #include "assertions.h" //#include "LAYER2/MAC/pre_processor.c" +#include "eNB_scheduler_ulsch.h" #include "pdcp.h" #if defined(ENABLE_ITTI) @@ -72,46 +73,14 @@ extern uint16_t sfnsf_add_subframe(uint16_t frameP, uint16_t subframeP, int offs extern int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req); extern uint8_t nfapi_mode; -extern uint8_t nfapi_mode; - // This table holds the allowable PRB sizes for ULSCH transmissions uint8_t rb_table[34] = { 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 25, 27, 30, 32, 36, 40, 45, 48, 50, 54, 60, 64, 72, 75, 80, 81, 90, 96, 100 }; -/* number of active slices for past and current time*/ -int n_active_slices_uplink = 1; -int n_active_slices_current_uplink = 1; - -/* RB share for each slice for past and current time*/ -float avg_slice_percentage_uplink=0.25; -float slice_percentage_uplink[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; -float slice_percentage_current_uplink[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; -float total_slice_percentage_uplink = 0; -float total_slice_percentage_current_uplink = 0; - -// MAX MCS for each slice for past and current time -int slice_maxmcs_uplink[MAX_NUM_SLICES] = {20, 20, 20, 20}; -int slice_maxmcs_current_uplink[MAX_NUM_SLICES] = {20,20,20,20}; - -/*resource blocks allowed*/ -uint16_t nb_rbs_allowed_slice_uplink[MAX_NUM_CCs][MAX_NUM_SLICES]; -/*Slice Update */ -int update_ul_scheduler[MAX_NUM_SLICES] = {1, 1, 1, 1}; -int update_ul_scheduler_current[MAX_NUM_SLICES] = {1, 1, 1, 1}; - -/* name of available scheduler*/ -char *ul_scheduler_type[MAX_NUM_SLICES] = {"schedule_ulsch_rnti", - "schedule_ulsch_rnti", - "schedule_ulsch_rnti", - "schedule_ulsch_rnti" -}; extern mui_t rrc_eNB_mui; -/* Slice Function Pointer */ -slice_scheduler_ul slice_sched_ul[MAX_NUM_SLICES] = {0}; - void rx_sdu(const module_id_t enb_mod_idP, const int CC_idP, diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.h b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.h new file mode 100644 index 0000000000..45d7a4e709 --- /dev/null +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.h @@ -0,0 +1,71 @@ +/* + * 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.1 (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 LAYER2/MAC/eNB_scheduler_ulsch.h +* \brief ULSCH Scheduler policy variables used during different phases of scheduling +* \author Navid Nikaein and Niccolo' Iardella +* \date 2018 +* \version 0.2 +* \email navid.nikaein@eurecom.fr + +*/ +/** @defgroup _oai2 openair2 Reference Implementation + * @ingroup _ref_implementation_ + * @{ + */ + +/*@}*/ + +#ifndef __LAYER2_MAC_ENB_SCHEDULER_ULSCH_H__ +#define __LAYER2_MAC_ENB_SCHEDULER_ULSCH_H__ + +/* number of active slices for past and current time*/ +int n_active_slices_uplink = 1; +int n_active_slices_current_uplink = 1; + +/* RB share for each slice for past and current time*/ +float avg_slice_percentage_uplink=0.25; +float slice_percentage_uplink[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; +float slice_percentage_current_uplink[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; +float total_slice_percentage_uplink = 0; +float total_slice_percentage_current_uplink = 0; + +// MAX MCS for each slice for past and current time +int slice_maxmcs_uplink[MAX_NUM_SLICES] = {20, 20, 20, 20}; +int slice_maxmcs_current_uplink[MAX_NUM_SLICES] = {20,20,20,20}; + +/*resource blocks allowed*/ +uint16_t nb_rbs_allowed_slice_uplink[NFAPI_CC_MAX][MAX_NUM_SLICES]; +/*Slice Update */ +int update_ul_scheduler[MAX_NUM_SLICES] = {1, 1, 1, 1}; +int update_ul_scheduler_current[MAX_NUM_SLICES] = {1, 1, 1, 1}; + +/* name of available scheduler*/ +char *ul_scheduler_type[MAX_NUM_SLICES] = {"schedule_ulsch_rnti", + "schedule_ulsch_rnti", + "schedule_ulsch_rnti", + "schedule_ulsch_rnti" +}; + +/* Slice Function Pointer */ +slice_scheduler_ul slice_sched_ul[MAX_NUM_SLICES] = {0}; + +#endif //__LAYER2_MAC_ENB_SCHEDULER_ULSCH_H__ diff --git a/openair2/LAYER2/MAC/mac_proto.h b/openair2/LAYER2/MAC/mac_proto.h index 1086d8eef7..85f6489e22 100644 --- a/openair2/LAYER2/MAC/mac_proto.h +++ b/openair2/LAYER2/MAC/mac_proto.h @@ -237,14 +237,14 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, int min_rb_unit[NFAPI_CC_MAX], uint8_t total_ue_count[NFAPI_CC_MAX], uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], - uint16_t nb_rbs_required_remaining_1[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]); + uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]); void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, slice_id_t slice_id, int min_rb_unit[NFAPI_CC_MAX], uint8_t total_ue_count[NFAPI_CC_MAX], uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], - uint16_t nb_rbs_required_remaining_1[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]); @@ -252,10 +252,10 @@ void dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id, int UE_id, uint8_t CC_id, int N_RBG, - int transmission_mode, + int tm, int min_rb_unit, uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], - uint16_t nb_rbs_required_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], unsigned char rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX], unsigned char MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]); @@ -1256,8 +1256,7 @@ void pre_scd_nb_rbs_required( module_id_t module_idP, #endif /*Slice related functions */ -uint16_t flexran_nb_rbs_allowed_slice(float rb_percentage, int total_rbs); - +uint16_t nb_rbs_allowed_slice(float rb_percentage, int total_rbs); int ue_slice_membership(int UE_id, int slice_id); /* from here: prototypes to get rid of compilation warnings: doc to be written by function author */ diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index b299ad33ea..ed91254c6a 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -271,7 +271,8 @@ assign_rbs_required(module_id_t Mod_id, to_prb(RC.mac[Mod_id]->common_channels[CC_id]. mib->message.dl_Bandwidth); - UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_id]= flexran_nb_rbs_allowed_slice(slice_percentage[slice_id],N_RB_DL); + UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_id] = + nb_rbs_allowed_slice(slice_percentage[slice_id], N_RB_DL); /* calculating required number of RBs for each UE */ while (TBS < @@ -477,39 +478,108 @@ void decode_slice_positioning(module_id_t Mod_idP, // This fuction sorts the UE in order their dlsch buffer and CQI void sort_UEs(module_id_t Mod_idP, slice_id_t slice_id, int frameP, sub_frame_t subframeP) { - int i; - int list[MAX_MOBILES_PER_ENB]; - int list_size = 0; - int rnti; - struct sort_ue_dl_params params = { Mod_idP, frameP, subframeP, slice_id }; + int i; + int list[MAX_MOBILES_PER_ENB]; + int list_size = 0; + struct sort_ue_dl_params params = {Mod_idP, frameP, subframeP, slice_id}; + + UE_list_t *UE_list = &RC.mac[Mod_idP]->UE_list; + + for (i = 0; i < MAX_MOBILES_PER_ENB; i++) { + + if (UE_list->active[i] == FALSE) continue; + if (UE_RNTI(Mod_idP, i) == NOT_A_RNTI) continue; + if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1) continue; + if (!ue_slice_membership(i, slice_id)) continue; + + list[list_size] = i; + list_size++; + } + + decode_sorting_policy(Mod_idP, slice_id); + + qsort_r(list, list_size, sizeof(int), ue_dl_compare, ¶ms); + + if (list_size) { + for (i = 0; i < list_size - 1; ++i) + UE_list->next[list[i]] = list[i + 1]; + UE_list->next[list[list_size - 1]] = -1; + UE_list->head = list[0]; + } else { + UE_list->head = -1; + } + +#if 0 + + + int UE_id1, UE_id2; + int pCC_id1, pCC_id2; + int cqi1, cqi2, round1, round2; + int i = 0, ii = 0; //,j=0; + rnti_t rnti1, rnti2; UE_list_t *UE_list = &RC.mac[Mod_idP]->UE_list; - for (i = 0; i < MAX_MOBILES_PER_ENB; i++) { + for (i = UE_list->head; i >= 0; i = UE_list->next[i]) { - if (UE_list->active[i] == FALSE) - continue; - if ((rnti = UE_RNTI(Mod_idP, i)) == NOT_A_RNTI) - continue; - if (!ue_slice_membership(i, slice_id)) - continue; + for (ii = UE_list->next[i]; ii >= 0; ii = UE_list->next[ii]) { - list[list_size] = i; - list_size++; - } + UE_id1 = i; + rnti1 = UE_RNTI(Mod_idP, UE_id1); + if (rnti1 == NOT_A_RNTI) + continue; + if (UE_list->UE_sched_ctrl[UE_id1].ul_out_of_sync == 1) + continue; + pCC_id1 = UE_PCCID(Mod_idP, UE_id1); + cqi1 = maxcqi(Mod_idP, UE_id1); // + round1 = maxround(Mod_idP, rnti1, frameP, subframeP, 0); - decode_sorting_policy(Mod_idP, slice_id); + UE_id2 = ii; + rnti2 = UE_RNTI(Mod_idP, UE_id2); + if (rnti2 == NOT_A_RNTI) + continue; + if (UE_list->UE_sched_ctrl[UE_id2].ul_out_of_sync == 1) + continue; + cqi2 = maxcqi(Mod_idP, UE_id2); + round2 = maxround(Mod_idP, rnti2, frameP, subframeP, 0); //mac_xface->get_ue_active_harq_pid(Mod_id,rnti2,subframe,&harq_pid2,&round2,0); + pCC_id2 = UE_PCCID(Mod_idP, UE_id2); - qsort_r(list, list_size, sizeof(int), ue_dl_compare, ¶ms); + if (round2 > round1) { // Check first if one of the UEs has an active HARQ process which needs service and swap order + swap_UEs(UE_list, UE_id1, UE_id2, 0); + } else if (round2 == round1) { + // RK->NN : I guess this is for fairness in the scheduling. This doesn't make sense unless all UEs have the same configuration of logical channels. This should be done on the sum of all information that has to be sent. And still it wouldn't ensure fairness. It should be based on throughput seen by each UE or maybe using the head_sdu_creation_time, i.e. swap UEs if one is waiting longer for service. + // for(j=0;jnext[list[i]] = list[i + 1]; - UE_list->next[list[list_size - 1]] = -1; - UE_list->head = list[0]; - } else { - UE_list->head = -1; + // first check the buffer status for SRB1 and SRB2 + + if ((UE_list->UE_template[pCC_id1][UE_id1]. + dl_buffer_info[1] + + UE_list->UE_template[pCC_id1][UE_id1]. + dl_buffer_info[2]) < + (UE_list->UE_template[pCC_id2][UE_id2]. + dl_buffer_info[1] + + UE_list->UE_template[pCC_id2][UE_id2]. + dl_buffer_info[2])) { + swap_UEs(UE_list, UE_id1, UE_id2, 0); + } else if (UE_list->UE_template[pCC_id1] + [UE_id1].dl_buffer_head_sdu_creation_time_max < + UE_list->UE_template[pCC_id2] + [UE_id2].dl_buffer_head_sdu_creation_time_max) { + swap_UEs(UE_list, UE_id1, UE_id2, 0); + } else if (UE_list->UE_template[pCC_id1][UE_id1]. + dl_buffer_total < + UE_list->UE_template[pCC_id2][UE_id2]. + dl_buffer_total) { + swap_UEs(UE_list, UE_id1, UE_id2, 0); + } else if (cqi1 < cqi2) { + swap_UEs(UE_list, UE_id1, UE_id2, 0); + } + } } + } +#endif } void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, @@ -519,7 +589,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, int min_rb_unit[NFAPI_CC_MAX], uint8_t total_ue_count[NFAPI_CC_MAX], uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], - uint16_t nb_rbs_required_remaining_1[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]) + uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]) { int UE_id, CC_id; int i; @@ -541,16 +611,15 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, average_rbs_per_user[CC_id] = 0; } - // loop over all active UEs + // Find total UE count, and account the RBs required for retransmissions for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { rnti = UE_RNTI(Mod_id, UE_id); - if (rnti == NOT_A_RNTI) - continue; - if (!ue_slice_membership(UE_id, slice_id)) - continue; + if (rnti == NOT_A_RNTI) continue; + if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; + if (!ue_slice_membership(UE_id, slice_id)) continue; - for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { + for (i = 0; i < UE_num_active_CC(UE_list, UE_id); ++i) { CC_id = UE_list->ordered_CCids[i][UE_id]; ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; cc = &RC.mac[Mod_id]->common_channels[CC_id]; @@ -579,12 +648,9 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { rnti = UE_RNTI(Mod_id, UE_id); - if (rnti == NOT_A_RNTI) - continue; - if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) - continue; - if (!ue_slice_membership(UE_id, slice_id)) - continue; + if (rnti == NOT_A_RNTI) continue; + if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; + if (!ue_slice_membership(UE_id, slice_id)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -603,8 +669,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, // recalculate based on the what is left after retransmission ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; - ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_id] = - flexran_nb_rbs_allowed_slice(slice_percentage[slice_id], N_RB_DL); + ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_id] = nb_rbs_allowed_slice(slice_percentage[slice_id], N_RB_DL); if (total_ue_count[CC_id] == 0) { average_rbs_per_user[CC_id] = 0; @@ -612,8 +677,8 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, (ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_id])) { average_rbs_per_user[CC_id] = (uint16_t) floor(ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_id] / total_ue_count[CC_id]); - } else { - // consider the total number of use that can be scheduled UE + } else { + // consider the total number of use that can be scheduled UE average_rbs_per_user[CC_id] = min_rb_unit[CC_id]; } } @@ -639,9 +704,9 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, // control channel or retransmission /* TODO: do we have to check for retransmission? */ if (mac_eNB_get_rrc_status(Mod_id, rnti) < RRC_RECONFIGURED || round != 8) { - nb_rbs_required_remaining_1[CC_id][UE_id] = nb_rbs_required[CC_id][UE_id]; + nb_rbs_accounted[CC_id][UE_id] = nb_rbs_required[CC_id][UE_id]; } else { - nb_rbs_required_remaining_1[CC_id][UE_id] = cmin(average_rbs_per_user[CC_id], nb_rbs_required[CC_id][UE_id]); + nb_rbs_accounted[CC_id][UE_id] = cmin(average_rbs_per_user[CC_id], nb_rbs_required[CC_id][UE_id]); } } } @@ -652,7 +717,7 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, int min_rb_unit[NFAPI_CC_MAX], uint8_t total_ue_count[NFAPI_CC_MAX], uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], - uint16_t nb_rbs_required_remaining_1[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]) { @@ -682,11 +747,11 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, if (r1 == 0) { nb_rbs_required_remaining[CC_id][UE_id] = - nb_rbs_required_remaining_1[CC_id][UE_id]; + nb_rbs_accounted[CC_id][UE_id]; } else { // rb required based only on the buffer - rb allocated in the 1st round + extra reaming rb form the 1st round nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required[CC_id][UE_id] - - nb_rbs_required_remaining_1[CC_id][UE_id] + + nb_rbs_accounted[CC_id][UE_id] + nb_rbs_required_remaining[CC_id][UE_id]; if (nb_rbs_required_remaining[CC_id][UE_id] < 0) abort(); @@ -697,7 +762,7 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, "round %d : nb_rbs_required_remaining[%d][%d]= %d (remaining_1 %d, required %d, pre_nb_available_rbs %d, N_RBG %d, rb_unit %d)\n", r1, CC_id, UE_id, nb_rbs_required_remaining[CC_id][UE_id], - nb_rbs_required_remaining_1[CC_id][UE_id], + nb_rbs_accounted[CC_id][UE_id], nb_rbs_required[CC_id][UE_id], UE_list->UE_sched_ctrl[UE_id].pre_nb_available_rbs[CC_id], N_RBG[CC_id], @@ -713,8 +778,6 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, CC_id = UE_list->ordered_CCids[i][UE_id]; // if there are UEs with traffic if (total_ue_count[CC_id] > 0) { - // ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; - // round = ue_sched_ctl->round[CC_id][harq_pid]; rnti = UE_RNTI(Mod_id, UE_id); @@ -725,9 +788,6 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, continue; transmission_mode = get_tmode(Mod_id, CC_id, UE_id); - // mac_xface->get_ue_active_harq_pid(Mod_id,CC_id,rnti,frameP,subframeP,&harq_pid,&round,0); - // rrc_status = mac_eNB_get_rrc_status(Mod_id,rnti); - /* 1st allocate for the retx */ // retransmission in data channels // control channel in the 1st transmission @@ -746,166 +806,166 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, MIMO_mode_indicator); #ifdef TM5 - // data chanel TM5: to be revisited - if ((round == 0) && - (transmission_mode == 5) && - (ue_sched_ctl->dl_pow_off[CC_id] != 1)) { + // data chanel TM5: to be revisited + if ((round == 0) && + (transmission_mode == 5) && + (ue_sched_ctl->dl_pow_off[CC_id] != 1)) { - for (j = 0; j < N_RBG[CC_id]; j += 2) { + for (j = 0; j < N_RBG[CC_id]; j += 2) { - if ((((j == (N_RBG[CC_id] - 1)) - && (rballoc_sub[CC_id][j] == 0) + if ((((j == (N_RBG[CC_id] - 1)) + && (rballoc_sub[CC_id][j] == 0) + && (ue_sched_ctl-> + rballoc_sub_UE[CC_id][j] == 0)) + || ((j < (N_RBG[CC_id] - 1)) + && (rballoc_sub[CC_id][j + 1] == 0) + && + (ue_sched_ctl->rballoc_sub_UE + [CC_id][j + 1] == 0))) + && (nb_rbs_remaining[CC_id][UE_id] + > 0)) { + + for (i = UE_list->next[UE_id + 1]; i >= 0; + i = UE_list->next[i]) { + + UE_id2 = i; + rnti2 = UE_RNTI(Mod_id, UE_id2); + ue_sched_ctl2 = + &UE_list->UE_sched_ctrl[UE_id2]; + round2 = ue_sched_ctl2->round[CC_id]; + if (rnti2 == NOT_A_RNTI) + continue; + if (UE_list-> + UE_sched_ctrl + [UE_id2].ul_out_of_sync == 1) + continue; + + eNB_UE_stats2 = + UE_list-> + eNB_UE_stats[CC_id][UE_id2]; + //mac_xface->get_ue_active_harq_pid(Mod_id,CC_id,rnti2,frameP,subframeP,&harq_pid2,&round2,0); + + if ((mac_eNB_get_rrc_status + (Mod_id, + rnti2) >= RRC_RECONFIGURED) + && (round2 == 0) + && + (get_tmode(Mod_id, CC_id, UE_id2) + == 5) && (ue_sched_ctl-> - rballoc_sub_UE[CC_id][j] == 0)) - || ((j < (N_RBG[CC_id] - 1)) - && (rballoc_sub[CC_id][j + 1] == 0) - && - (ue_sched_ctl->rballoc_sub_UE - [CC_id][j + 1] == 0))) - && (nb_rbs_required_remaining[CC_id][UE_id] - > 0)) { + dl_pow_off[CC_id] != 1)) { - for (i = UE_list->next[UE_id + 1]; i >= 0; - i = UE_list->next[i]) { - - UE_id2 = i; - rnti2 = UE_RNTI(Mod_id, UE_id2); - ue_sched_ctl2 = - &UE_list->UE_sched_ctrl[UE_id2]; - round2 = ue_sched_ctl2->round[CC_id]; - if (rnti2 == NOT_A_RNTI) - continue; - if (UE_list-> - UE_sched_ctrl - [UE_id2].ul_out_of_sync == 1) - continue; - - eNB_UE_stats2 = - UE_list-> - eNB_UE_stats[CC_id][UE_id2]; - //mac_xface->get_ue_active_harq_pid(Mod_id,CC_id,rnti2,frameP,subframeP,&harq_pid2,&round2,0); - - if ((mac_eNB_get_rrc_status - (Mod_id, - rnti2) >= RRC_RECONFIGURED) - && (round2 == 0) - && - (get_tmode(Mod_id, CC_id, UE_id2) - == 5) - && (ue_sched_ctl-> - dl_pow_off[CC_id] != 1)) { - - if ((((j == (N_RBG[CC_id] - 1)) - && - (ue_sched_ctl->rballoc_sub_UE - [CC_id][j] == 0)) - || ((j < (N_RBG[CC_id] - 1)) - && - (ue_sched_ctl-> - rballoc_sub_UE[CC_id][j + - 1] - == 0))) + if ((((j == (N_RBG[CC_id] - 1)) && - (nb_rbs_required_remaining - [CC_id] - [UE_id2] > 0)) { + (ue_sched_ctl->rballoc_sub_UE + [CC_id][j] == 0)) + || ((j < (N_RBG[CC_id] - 1)) + && + (ue_sched_ctl-> + rballoc_sub_UE[CC_id][j + + 1] + == 0))) + && + (nb_rbs_remaining + [CC_id] + [UE_id2] > 0)) { - if ((((eNB_UE_stats2-> - DL_pmi_single ^ - eNB_UE_stats1-> - DL_pmi_single) - << (14 - j)) & 0xc000) == 0x4000) { //MU-MIMO only for 25 RBs configuration + if ((((eNB_UE_stats2-> + DL_pmi_single ^ + eNB_UE_stats1-> + DL_pmi_single) + << (14 - j)) & 0xc000) == 0x4000) { //MU-MIMO only for 25 RBs configuration - rballoc_sub[CC_id][j] = 1; - ue_sched_ctl-> - rballoc_sub_UE[CC_id] - [j] = 1; - ue_sched_ctl2-> - rballoc_sub_UE[CC_id] - [j] = 1; - MIMO_mode_indicator[CC_id] - [j] = 0; + rballoc_sub[CC_id][j] = 1; + ue_sched_ctl-> + rballoc_sub_UE[CC_id] + [j] = 1; + ue_sched_ctl2-> + rballoc_sub_UE[CC_id] + [j] = 1; + MIMO_mode_indicator[CC_id] + [j] = 0; - if (j < N_RBG[CC_id] - 1) { - rballoc_sub[CC_id][j + - 1] = - 1; - ue_sched_ctl-> - rballoc_sub_UE - [CC_id][j + 1] = 1; - ue_sched_ctl2->rballoc_sub_UE - [CC_id][j + 1] = 1; - MIMO_mode_indicator - [CC_id][j + 1] - = 0; - } + if (j < N_RBG[CC_id] - 1) { + rballoc_sub[CC_id][j + + 1] = + 1; + ue_sched_ctl-> + rballoc_sub_UE + [CC_id][j + 1] = 1; + ue_sched_ctl2->rballoc_sub_UE + [CC_id][j + 1] = 1; + MIMO_mode_indicator + [CC_id][j + 1] + = 0; + } - ue_sched_ctl-> - dl_pow_off[CC_id] - = 0; - ue_sched_ctl2-> - dl_pow_off[CC_id] - = 0; + ue_sched_ctl-> + dl_pow_off[CC_id] + = 0; + ue_sched_ctl2-> + dl_pow_off[CC_id] + = 0; - if ((j == N_RBG[CC_id] - 1) - && ((N_RB_DL == 25) - || (N_RB_DL == - 50))) { + if ((j == N_RBG[CC_id] - 1) + && ((N_RB_DL == 25) + || (N_RB_DL == + 50))) { - nb_rbs_required_remaining - [CC_id][UE_id] = - nb_rbs_required_remaining - [CC_id][UE_id] - - min_rb_unit[CC_id] - + 1; - ue_sched_ctl->pre_nb_available_rbs - [CC_id] = - ue_sched_ctl->pre_nb_available_rbs - [CC_id] + - min_rb_unit[CC_id] - - 1; - nb_rbs_required_remaining - [CC_id][UE_id2] = - nb_rbs_required_remaining - [CC_id][UE_id2] - - min_rb_unit[CC_id] - + 1; - ue_sched_ctl2->pre_nb_available_rbs - [CC_id] = - ue_sched_ctl2->pre_nb_available_rbs - [CC_id] + - min_rb_unit[CC_id] - - 1; - } else { + nb_rbs_remaining + [CC_id][UE_id] = + nb_rbs_remaining + [CC_id][UE_id] - + min_rb_unit[CC_id] + + 1; + ue_sched_ctl->pre_nb_available_rbs + [CC_id] = + ue_sched_ctl->pre_nb_available_rbs + [CC_id] + + min_rb_unit[CC_id] + - 1; + nb_rbs_remaining + [CC_id][UE_id2] = + nb_rbs_remaining + [CC_id][UE_id2] - + min_rb_unit[CC_id] + + 1; + ue_sched_ctl2->pre_nb_available_rbs + [CC_id] = + ue_sched_ctl2->pre_nb_available_rbs + [CC_id] + + min_rb_unit[CC_id] + - 1; + } else { - nb_rbs_required_remaining - [CC_id][UE_id] = - nb_rbs_required_remaining - [CC_id][UE_id] - 4; - ue_sched_ctl->pre_nb_available_rbs - [CC_id] = - ue_sched_ctl->pre_nb_available_rbs - [CC_id] + 4; - nb_rbs_required_remaining - [CC_id][UE_id2] = - nb_rbs_required_remaining - [CC_id][UE_id2] - - 4; - ue_sched_ctl2->pre_nb_available_rbs - [CC_id] = - ue_sched_ctl2->pre_nb_available_rbs - [CC_id] + 4; - } + nb_rbs_remaining + [CC_id][UE_id] = + nb_rbs_remaining + [CC_id][UE_id] - 4; + ue_sched_ctl->pre_nb_available_rbs + [CC_id] = + ue_sched_ctl->pre_nb_available_rbs + [CC_id] + 4; + nb_rbs_remaining + [CC_id][UE_id2] = + nb_rbs_remaining + [CC_id][UE_id2] - + 4; + ue_sched_ctl2->pre_nb_available_rbs + [CC_id] = + ue_sched_ctl2->pre_nb_available_rbs + [CC_id] + 4; + } - break; - } - } - } - } - } - } - } + break; + } + } + } + } + } + } + } #endif } // total_ue_count } // CC @@ -1284,10 +1344,10 @@ dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id, int UE_id, uint8_t CC_id, int N_RBG, - int transmission_mode, + int tm, int min_rb_unit, uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], - uint16_t nb_rbs_required_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], unsigned char rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX], unsigned char MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]) @@ -1300,51 +1360,38 @@ dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id, for (i = 0; i < N_RBG; i++) { - if (rballoc_sub[CC_id][i] != 0) - continue; - if (ue_sched_ctl->rballoc_sub_UE[CC_id][i] != 0) - continue; - if (nb_rbs_required_remaining[CC_id][UE_id] <= 0) - continue; - if (ue_sched_ctl->pre_nb_available_rbs[CC_id] >= nb_rbs_required[CC_id][UE_id]) - continue; - if (ue_sched_ctl->dl_pow_off[CC_id] == 0) - continue; - if (slice_allocation_mask[CC_id][i] == 0) - continue; - -// if ((rballoc_sub[CC_id][i] == 0) && -// (ue_sched_ctl->rballoc_sub_UE[CC_id][i] == 0) && -// (nb_rbs_required_remaining[CC_id][UE_id] > 0) && -// (ue_sched_ctl->pre_nb_available_rbs[CC_id] < nb_rbs_required[CC_id][UE_id])) { -// // if this UE is not scheduled for TM5 -// if (ue_sched_ctl->dl_pow_off[CC_id] != 0) { + if (rballoc_sub[CC_id][i] != 0) continue; + if (ue_sched_ctl->rballoc_sub_UE[CC_id][i] != 0) continue; + if (nb_rbs_remaining[CC_id][UE_id] <= 0) continue; + if (ue_sched_ctl->pre_nb_available_rbs[CC_id] >= nb_rbs_required[CC_id][UE_id]) continue; + if (ue_sched_ctl->dl_pow_off[CC_id] == 0) continue; + if (slice_allocation_mask[CC_id][i] == 0) continue; if ((i == N_RBG - 1) && ((N_RB_DL == 25) || (N_RB_DL == 50))) { - if (nb_rbs_required_remaining[CC_id][UE_id] >= min_rb_unit - 1) { + // Allocating last, smaller RBG + if (nb_rbs_remaining[CC_id][UE_id] >= min_rb_unit - 1) { rballoc_sub[CC_id][i] = 1; ue_sched_ctl->rballoc_sub_UE[CC_id][i] = 1; MIMO_mode_indicator[CC_id][i] = 1; - if (transmission_mode == 5) { + if (tm == 5) { ue_sched_ctl->dl_pow_off[CC_id] = 1; } - nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required_remaining[CC_id][UE_id] - min_rb_unit + 1; + nb_rbs_remaining[CC_id][UE_id] = nb_rbs_remaining[CC_id][UE_id] - min_rb_unit + 1; ue_sched_ctl->pre_nb_available_rbs[CC_id] = ue_sched_ctl->pre_nb_available_rbs[CC_id] + min_rb_unit - 1; } } else { - if (nb_rbs_required_remaining[CC_id][UE_id] >= min_rb_unit) { + // Allocating a standard-sized RBG + if (nb_rbs_remaining[CC_id][UE_id] >= min_rb_unit) { rballoc_sub[CC_id][i] = 1; ue_sched_ctl->rballoc_sub_UE[CC_id][i] = 1; MIMO_mode_indicator[CC_id][i] = 1; - if (transmission_mode == 5) { + if (tm == 5) { ue_sched_ctl->dl_pow_off[CC_id] = 1; } - nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required_remaining[CC_id][UE_id] - min_rb_unit; + nb_rbs_remaining[CC_id][UE_id] = nb_rbs_remaining[CC_id][UE_id] - min_rb_unit; ue_sched_ctl->pre_nb_available_rbs[CC_id] = ue_sched_ctl->pre_nb_available_rbs[CC_id] + min_rb_unit; } } -// } // dl_pow_off[CC_id][UE_id] ! = 0 -// } } } @@ -1442,7 +1489,8 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, N_RB_UL = to_prb(RC.mac[module_idP]->common_channels[CC_id].ul_Bandwidth); ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; - ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id] = flexran_nb_rbs_allowed_slice(slice_percentage_uplink[slice_id],N_RB_UL); + ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id] = + nb_rbs_allowed_slice(slice_percentage_uplink[slice_id], N_RB_UL); if (total_ue_count[CC_id] == 0) { average_rbs_per_user[CC_id] = 0; @@ -1614,7 +1662,8 @@ assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP, Ncp = RC.mac[module_idP]->common_channels[CC_id].Ncp; N_RB_UL = to_prb(RC.mac[module_idP]->common_channels[CC_id].ul_Bandwidth); - ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id] = flexran_nb_rbs_allowed_slice(slice_percentage_uplink[slice_id],N_RB_UL); + ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id] = + nb_rbs_allowed_slice(slice_percentage_uplink[slice_id], N_RB_UL); int bytes_to_schedule = UE_template->estimated_ul_buffer - UE_template->scheduled_ul_bytes; if (bytes_to_schedule < 0) bytes_to_schedule = 0; From 71d1b1ab9a9aea726b8c0fa722a0760960b2db30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Iardella?= Date: Mon, 26 Feb 2018 11:49:03 +0100 Subject: [PATCH 076/379] Refactoring and optimization --- openair2/LAYER2/MAC/mac_proto.h | 19 +++--- openair2/LAYER2/MAC/pre_processor.c | 92 ++++++++++++++--------------- 2 files changed, 53 insertions(+), 58 deletions(-) diff --git a/openair2/LAYER2/MAC/mac_proto.h b/openair2/LAYER2/MAC/mac_proto.h index 85f6489e22..76bcc2c8f6 100644 --- a/openair2/LAYER2/MAC/mac_proto.h +++ b/openair2/LAYER2/MAC/mac_proto.h @@ -249,16 +249,15 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]); void dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id, - int UE_id, - uint8_t CC_id, - int N_RBG, - int tm, - int min_rb_unit, - uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], - uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], - unsigned char rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], - uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX], - unsigned char MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]); + int UE_id, + uint8_t CC_id, + int N_RBG, + int min_rb_unit, + uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + unsigned char rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], + uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX], + unsigned char MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]); /* \brief Function to trigger the eNB scheduling procedure. It is called by PHY at the beginning of each subframe, \f$n$\f and generates all DLSCH allocations for subframe \f$n\f$ and ULSCH allocations for subframe \f$n+k$\f. diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index ed91254c6a..cba110894f 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -595,9 +595,12 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, int i; rnti_t rnti; - uint8_t harq_pid, round, transmission_mode; - uint8_t total_rbs_used[NFAPI_CC_MAX]; + uint8_t harq_pid, round; + uint8_t rbs_retx[NFAPI_CC_MAX]; uint16_t average_rbs_per_user[NFAPI_CC_MAX]; + int ue_count_newtx[NFAPI_CC_MAX]; + int ue_count_retx[NFAPI_CC_MAX]; + uint8_t ue_retx_flag[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; int N_RB_DL; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; @@ -607,8 +610,13 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, // Reset for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) { total_ue_count[CC_id] = 0; - total_rbs_used[CC_id] = 0; + ue_count_newtx[CC_id] = 0; + ue_count_retx[CC_id] = 0; + rbs_retx[CC_id] = 0; average_rbs_per_user[CC_id] = 0; + for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; ++UE_id) { + ue_retx_flag[CC_id][UE_id] = 0; + } } // Find total UE count, and account the RBs required for retransmissions @@ -630,16 +638,17 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, harq_pid = ((frameP * 10) + subframeP) & 7; round = ue_sched_ctl->round[CC_id][harq_pid]; - average_rbs_per_user[CC_id] = 0; + if (nb_rbs_required[CC_id][UE_id] > 0) { + total_ue_count[CC_id]++; + } if (round != 8) { nb_rbs_required[CC_id][UE_id] = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid]; - total_rbs_used[CC_id] += nb_rbs_required[CC_id][UE_id]; - } - - //nb_rbs_required_remaining[UE_id] = nb_rbs_required[UE_id]; - if (nb_rbs_required[CC_id][UE_id] > 0) { - total_ue_count[CC_id] = total_ue_count[CC_id] + 1; + rbs_retx[CC_id] += nb_rbs_required[CC_id][UE_id]; + ue_count_retx[CC_id]++; + ue_retx_flag[CC_id][UE_id] = 1; + } else { + ue_count_newtx[CC_id]++; } } } @@ -652,20 +661,10 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; if (!ue_slice_membership(UE_id, slice_id)) continue; - for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { + for (i = 0; i < UE_num_active_CC(UE_list, UE_id); ++i) { CC_id = UE_list->ordered_CCids[i][UE_id]; - // hypothetical assignment - /* - * If schedule is enabled and if the priority of the UEs is modified - * The average rbs per logical channel per user will depend on the level of - * priority. Concerning the hypothetical assignement, we should assign more - * rbs to prioritized users. Maybe, we can do a mapping between the - * average rbs per user and the level of priority or multiply the average rbs - * per user by a coefficient which represents the degree of priority. - */ - - N_RB_DL = to_prb(RC.mac[Mod_id]->common_channels[CC_id].mib->message.dl_Bandwidth) - total_rbs_used[CC_id]; + N_RB_DL = to_prb(RC.mac[Mod_id]->common_channels[CC_id].mib->message.dl_Bandwidth) - rbs_retx[CC_id]; // recalculate based on the what is left after retransmission ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; @@ -679,7 +678,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, (uint16_t) floor(ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_id] / total_ue_count[CC_id]); } else { // consider the total number of use that can be scheduled UE - average_rbs_per_user[CC_id] = min_rb_unit[CC_id]; + average_rbs_per_user[CC_id] = (uint16_t)min_rb_unit[CC_id]; } } } @@ -688,11 +687,9 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, // extend nb_rbs_required to capture per LCID RB required for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { rnti = UE_RNTI(Mod_id, UE_id); - - if (rnti == NOT_A_RNTI) - continue; - if (!ue_slice_membership(UE_id, slice_id)) - continue; + if (rnti == NOT_A_RNTI) continue; + if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; + if (!ue_slice_membership(UE_id, slice_id)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -726,7 +723,7 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, uint8_t transmission_mode; uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX]; - uint16_t nb_rbs_required_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; + uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; int N_RBG[NFAPI_CC_MAX]; rnti_t rnti; @@ -746,22 +743,22 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, N_RBG[i] = to_rbg(cc->mib->message.dl_Bandwidth); if (r1 == 0) { - nb_rbs_required_remaining[CC_id][UE_id] = + nb_rbs_remaining[CC_id][UE_id] = nb_rbs_accounted[CC_id][UE_id]; } else { // rb required based only on the buffer - rb allocated in the 1st round + extra reaming rb form the 1st round - nb_rbs_required_remaining[CC_id][UE_id] = + nb_rbs_remaining[CC_id][UE_id] = nb_rbs_required[CC_id][UE_id] - nb_rbs_accounted[CC_id][UE_id] + - nb_rbs_required_remaining[CC_id][UE_id]; - if (nb_rbs_required_remaining[CC_id][UE_id] < 0) + nb_rbs_remaining[CC_id][UE_id]; + if (nb_rbs_remaining[CC_id][UE_id] < 0) abort(); } if (nb_rbs_required[CC_id][UE_id] > 0) LOG_D(MAC, - "round %d : nb_rbs_required_remaining[%d][%d]= %d (remaining_1 %d, required %d, pre_nb_available_rbs %d, N_RBG %d, rb_unit %d)\n", + "round %d : nb_rbs_remaining[%d][%d]= %d (accounted %d, required %d, pre_nb_available_rbs %d, N_RBG %d, rb_unit %d)\n", r1, CC_id, UE_id, - nb_rbs_required_remaining[CC_id][UE_id], + nb_rbs_remaining[CC_id][UE_id], nb_rbs_accounted[CC_id][UE_id], nb_rbs_required[CC_id][UE_id], UE_list->UE_sched_ctrl[UE_id].pre_nb_available_rbs[CC_id], @@ -797,10 +794,9 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, UE_id, CC_id, N_RBG[CC_id], - transmission_mode, min_rb_unit[CC_id], nb_rbs_required, - nb_rbs_required_remaining, + nb_rbs_remaining, rballoc_sub, slice_allocation_mask, MIMO_mode_indicator); @@ -1016,6 +1012,7 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, MIMO_mode_indicator, mbsfn_flag); // TODO Not sure if useful + // STATUS // Store the DLSCH buffer for each logical channel store_dlsch_buffer(Mod_id, slice_id, frameP, subframeP); @@ -1341,19 +1338,18 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP, void dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id, - int UE_id, - uint8_t CC_id, - int N_RBG, - int tm, - int min_rb_unit, - uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], - uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], - unsigned char rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], - uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX], - unsigned char MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]) + int UE_id, + uint8_t CC_id, + int N_RBG, + int min_rb_unit, + uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + unsigned char rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], + uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX], + unsigned char MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]) { - int i; + int tm = get_tmode(Mod_id, CC_id, UE_id); UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; UE_sched_ctrl *ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; int N_RB_DL = to_prb(RC.mac[Mod_id]->common_channels[CC_id].mib->message.dl_Bandwidth); From 89f5659586301c182f360cb3085a167c2f8114a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Iardella?= Date: Mon, 26 Feb 2018 14:29:55 +0100 Subject: [PATCH 077/379] Add accounting policy to pre_processor --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 13 +++ openair2/LAYER2/MAC/eNB_scheduler_dlsch.h | 4 + openair2/LAYER2/MAC/pre_processor.c | 98 ++++++++++++++++------- 3 files changed, 85 insertions(+), 30 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index e6989d676c..22ea114273 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -537,6 +537,19 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in sorting_policy_current[i] = sorting_policy[i]; } + // Check for new accounting policy + if (accounting_policy_current[i] != accounting_policy[i]) { + if (accounting_policy[i] > 1 || accounting_policy[i] < 0) { + LOG_W(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: invalid accounting policy (%d), revert to its previous value (%d)\n", + module_idP, i, frameP, subframeP, accounting_policy[i], accounting_policy_current[i]); + accounting_policy[i] = accounting_policy_current[i]; + } else { + LOG_N(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n", + module_idP, i, frameP, subframeP, accounting_policy_current[i], accounting_policy[i]); + accounting_policy_current[i] = accounting_policy[i]; + } + } + // Run each enabled slice-specific schedulers one by one slice_sched_dl[i](module_idP, i, frameP, subframeP, mbsfn_flag/*, dl_info*/); } diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h index 29ce735b05..2112bc4038 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h @@ -71,6 +71,10 @@ char *dl_scheduler_type[MAX_NUM_SLICES] = uint32_t sorting_policy[MAX_NUM_SLICES] = {0x01234, 0x01234, 0x01234, 0x01234}; uint32_t sorting_policy_current[MAX_NUM_SLICES] = {0x01234, 0x01234, 0x01234, 0x01234}; +// Accounting policy (just greedy(1) or fair(0) setting for now) +int accounting_policy[MAX_NUM_SLICES] = {0, 0, 0, 0}; +int accounting_policy_current[MAX_NUM_SLICES] = {0, 0, 0, 0}; + // pointer to the slice specific scheduler slice_scheduler_dl slice_sched_dl[MAX_NUM_SLICES] = {0}; diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index cba110894f..253f5736a6 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -58,6 +58,7 @@ extern float slice_percentage[MAX_NUM_SLICES]; extern float slice_percentage_uplink[MAX_NUM_SLICES]; extern int slice_position[MAX_NUM_SLICES*2]; extern uint32_t sorting_policy[MAX_NUM_SLICES]; +extern int accounting_policy[MAX_NUM_SLICES]; extern int slice_maxmcs[MAX_NUM_SLICES]; extern int slice_maxmcs_uplink[MAX_NUM_SLICES]; @@ -596,6 +597,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, rnti_t rnti; uint8_t harq_pid, round; + uint16_t available_rbs; uint8_t rbs_retx[NFAPI_CC_MAX]; uint16_t average_rbs_per_user[NFAPI_CC_MAX]; int ue_count_newtx[NFAPI_CC_MAX]; @@ -622,7 +624,6 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, // Find total UE count, and account the RBs required for retransmissions for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { rnti = UE_RNTI(Mod_id, UE_id); - if (rnti == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; if (!ue_slice_membership(UE_id, slice_id)) continue; @@ -653,38 +654,77 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, } } - // loop over all active UEs and calculate avg rb per user based on total active UEs - for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { - rnti = UE_RNTI(Mod_id, UE_id); + switch (accounting_policy[slice_id]) { - if (rnti == NOT_A_RNTI) continue; - if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(UE_id, slice_id)) continue; + // If greedy scheduling, try to account all the required RBs + case 1: + for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { + rnti = UE_RNTI(Mod_id, UE_id); + if (rnti == NOT_A_RNTI) continue; + if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; + if (!ue_slice_membership(UE_id, slice_id)) continue; - for (i = 0; i < UE_num_active_CC(UE_list, UE_id); ++i) { - CC_id = UE_list->ordered_CCids[i][UE_id]; - - N_RB_DL = to_prb(RC.mac[Mod_id]->common_channels[CC_id].mib->message.dl_Bandwidth) - rbs_retx[CC_id]; - - // recalculate based on the what is left after retransmission - ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; - ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_id] = nb_rbs_allowed_slice(slice_percentage[slice_id], N_RB_DL); - - if (total_ue_count[CC_id] == 0) { - average_rbs_per_user[CC_id] = 0; - } else if ((min_rb_unit[CC_id] * total_ue_count[CC_id]) <= - (ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_id])) { - average_rbs_per_user[CC_id] = - (uint16_t) floor(ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_id] / total_ue_count[CC_id]); - } else { - // consider the total number of use that can be scheduled UE - average_rbs_per_user[CC_id] = (uint16_t)min_rb_unit[CC_id]; + for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { + CC_id = UE_list->ordered_CCids[i][UE_id]; + nb_rbs_accounted[CC_id][UE_id] = nb_rbs_required[CC_id][UE_id]; + } } - } + break; + + // Use the old, fair algorithm + // Loop over all active UEs and account the avg number of RBs to each UE, based on all non-retx UEs. + default: + // FIXME: This is not ideal, why loop on UEs to find average_rbs_per_user[], that is per-CC? + // TODO: Look how to loop on active CCs only without using the UE_num_active_CC() function. + for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { + rnti = UE_RNTI(Mod_id, UE_id); + + if (rnti == NOT_A_RNTI) continue; + if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; + if (!ue_slice_membership(UE_id, slice_id)) continue; + + for (i = 0; i < UE_num_active_CC(UE_list, UE_id); ++i) { + CC_id = UE_list->ordered_CCids[i][UE_id]; + ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; + + N_RB_DL = to_prb(RC.mac[Mod_id]->common_channels[CC_id].mib->message.dl_Bandwidth) - rbs_retx[CC_id]; + // recalculate based on the what is left after retransmission + ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_id] = nb_rbs_allowed_slice(slice_percentage[slice_id], N_RB_DL); + + available_rbs = ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_id]; + + if (total_ue_count[CC_id] == 0) { + average_rbs_per_user[CC_id] = 0; + } else if ((min_rb_unit[CC_id] * total_ue_count[CC_id]) <= available_rbs) { + average_rbs_per_user[CC_id] = (uint16_t) floor(available_rbs / total_ue_count[CC_id]); + } else { + // consider the total number of use that can be scheduled UE + average_rbs_per_user[CC_id] = (uint16_t)min_rb_unit[CC_id]; + } + } + } + + // note: nb_rbs_required is assigned according to total_buffer_dl + // extend nb_rbs_required to capture per LCID RB required + for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { + rnti = UE_RNTI(Mod_id, UE_id); + if (rnti == NOT_A_RNTI) continue; + if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; + if (!ue_slice_membership(UE_id, slice_id)) continue; + + for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { + CC_id = UE_list->ordered_CCids[i][UE_id]; + nb_rbs_accounted[CC_id][UE_id] = cmin(average_rbs_per_user[CC_id], nb_rbs_required[CC_id][UE_id]); + } + } + break; } - // note: nb_rbs_required is assigned according to total_buffer_dl - // extend nb_rbs_required to capture per LCID RB required + + + + // Check retransmissions + // TODO: Do this once at the beginning for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { rnti = UE_RNTI(Mod_id, UE_id); if (rnti == NOT_A_RNTI) continue; @@ -702,8 +742,6 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, /* TODO: do we have to check for retransmission? */ if (mac_eNB_get_rrc_status(Mod_id, rnti) < RRC_RECONFIGURED || round != 8) { nb_rbs_accounted[CC_id][UE_id] = nb_rbs_required[CC_id][UE_id]; - } else { - nb_rbs_accounted[CC_id][UE_id] = cmin(average_rbs_per_user[CC_id], nb_rbs_required[CC_id][UE_id]); } } } From d5415b209685614f707f0a2e7a0e93f5f68097be Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 13 Jun 2018 14:47:17 +0200 Subject: [PATCH 078/379] Fix: provide N_RBG in TM5 mode --- openair2/LAYER2/MAC/pre_processor.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 253f5736a6..e4d8fde584 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -1082,11 +1082,13 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, #ifdef TM5 // This has to be revisited!!!! for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) { - i1 = 0; - i2 = 0; - i3 = 0; + COMMON_channels_t *cc = &RC.mac[Mod_id]->common_channels[CC_id]; + int N_RBG = to_rbg(cc->mib->message.dl_Bandwidth); + i1 = 0; + i2 = 0; + i3 = 0; - for (j = 0; j < N_RBG[CC_id]; j++) { + for (j = 0; j < N_RBG; j++) { if (MIMO_mode_indicator[CC_id][j] == 2) { i1 = i1 + 1; } else if (MIMO_mode_indicator[CC_id][j] == 1) { @@ -1094,27 +1096,27 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, } else if (MIMO_mode_indicator[CC_id][j] == 0) { i3 = i3 + 1; } - } + } - if ((i1 < N_RBG[CC_id]) && (i2 > 0) && (i3 == 0)) { + if ((i1 < N_RBG) && (i2 > 0) && (i3 == 0)) { PHY_vars_eNB_g[Mod_id][CC_id]->check_for_SUMIMO_transmissions = PHY_vars_eNB_g[Mod_id][CC_id]-> check_for_SUMIMO_transmissions + 1; - } + } - if (i3 == N_RBG[CC_id] && i1 == 0 && i2 == 0) { + if (i3 == N_RBG && i1 == 0 && i2 == 0) { PHY_vars_eNB_g[Mod_id][CC_id]->FULL_MUMIMO_transmissions = PHY_vars_eNB_g[Mod_id][CC_id]->FULL_MUMIMO_transmissions + 1; - } + } - if ((i1 < N_RBG[CC_id]) && (i3 > 0)) { + if ((i1 < N_RBG) && (i3 > 0)) { PHY_vars_eNB_g[Mod_id][CC_id]->check_for_MUMIMO_transmissions = PHY_vars_eNB_g[Mod_id][CC_id]-> check_for_MUMIMO_transmissions + 1; - } + } - PHY_vars_eNB_g[Mod_id][CC_id]->check_for_total_transmissions = + PHY_vars_eNB_g[Mod_id][CC_id]->check_for_total_transmissions = PHY_vars_eNB_g[Mod_id][CC_id]->check_for_total_transmissions + 1; From e80f64c8e5a47b4926842c2e89867b195d67862b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Iardella?= Date: Mon, 26 Feb 2018 15:09:36 +0100 Subject: [PATCH 079/379] Split positioning() in positioning() and intraslice_sharing() --- openair2/LAYER2/MAC/mac_proto.h | 12 +- openair2/LAYER2/MAC/pre_processor.c | 358 ++++++++++++++++++++++------ 2 files changed, 291 insertions(+), 79 deletions(-) diff --git a/openair2/LAYER2/MAC/mac_proto.h b/openair2/LAYER2/MAC/mac_proto.h index 76bcc2c8f6..2bfee4daa1 100644 --- a/openair2/LAYER2/MAC/mac_proto.h +++ b/openair2/LAYER2/MAC/mac_proto.h @@ -235,19 +235,27 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, frame_t frameP, sub_frame_t subframeP, int min_rb_unit[NFAPI_CC_MAX], - uint8_t total_ue_count[NFAPI_CC_MAX], uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]); void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, slice_id_t slice_id, int min_rb_unit[NFAPI_CC_MAX], - uint8_t total_ue_count[NFAPI_CC_MAX], uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]); +void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id, + slice_id_t slice_id, + int min_rb_unit[NFAPI_CC_MAX], + uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], + uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]); + void dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id, int UE_id, uint8_t CC_id, diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index e4d8fde584..1e5bb541a5 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -588,7 +588,6 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, frame_t frameP, sub_frame_t subframeP, int min_rb_unit[NFAPI_CC_MAX], - uint8_t total_ue_count[NFAPI_CC_MAX], uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]) { @@ -600,6 +599,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, uint16_t available_rbs; uint8_t rbs_retx[NFAPI_CC_MAX]; uint16_t average_rbs_per_user[NFAPI_CC_MAX]; + int total_ue_count[NFAPI_CC_MAX]; int ue_count_newtx[NFAPI_CC_MAX]; int ue_count_retx[NFAPI_CC_MAX]; uint8_t ue_retx_flag[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; @@ -750,94 +750,63 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, slice_id_t slice_id, int min_rb_unit[NFAPI_CC_MAX], - uint8_t total_ue_count[NFAPI_CC_MAX], uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], - uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]) { - + uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]) +{ int UE_id, CC_id; int i; uint8_t transmission_mode; uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX]; - uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; int N_RBG[NFAPI_CC_MAX]; - rnti_t rnti; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; decode_slice_positioning(Mod_id, slice_id, slice_allocation_mask); - //Allocation to UEs is done in 2 rounds, - // 1st stage: average number of RBs allocated to each UE - // 2nd stage: remaining RBs are allocated to high priority UEs - for (int r1 = 0; r1 < 2; r1++) { + for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) { + COMMON_channels_t *cc = &RC.mac[Mod_id]->common_channels[CC_id]; + N_RBG[CC_id] = to_rbg(cc->mib->message.dl_Bandwidth); + } - for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { - for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { - CC_id = UE_list->ordered_CCids[i][UE_id]; - COMMON_channels_t *cc = &RC.mac[Mod_id]->common_channels[CC_id]; - N_RBG[i] = to_rbg(cc->mib->message.dl_Bandwidth); + // Try to allocate accounted RBs + for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { - if (r1 == 0) { - nb_rbs_remaining[CC_id][UE_id] = - nb_rbs_accounted[CC_id][UE_id]; - } else { // rb required based only on the buffer - rb allocated in the 1st round + extra reaming rb form the 1st round - nb_rbs_remaining[CC_id][UE_id] = - nb_rbs_required[CC_id][UE_id] - - nb_rbs_accounted[CC_id][UE_id] + - nb_rbs_remaining[CC_id][UE_id]; - if (nb_rbs_remaining[CC_id][UE_id] < 0) - abort(); - } + if (UE_RNTI(Mod_id, UE_id) == NOT_A_RNTI) continue; + if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; + if (!ue_slice_membership(UE_id, slice_id)) continue; - if (nb_rbs_required[CC_id][UE_id] > 0) - LOG_D(MAC, - "round %d : nb_rbs_remaining[%d][%d]= %d (accounted %d, required %d, pre_nb_available_rbs %d, N_RBG %d, rb_unit %d)\n", - r1, CC_id, UE_id, - nb_rbs_remaining[CC_id][UE_id], - nb_rbs_accounted[CC_id][UE_id], - nb_rbs_required[CC_id][UE_id], - UE_list->UE_sched_ctrl[UE_id].pre_nb_available_rbs[CC_id], - N_RBG[CC_id], - min_rb_unit[CC_id]); + for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { + CC_id = UE_list->ordered_CCids[i][UE_id]; + nb_rbs_remaining[CC_id][UE_id] = nb_rbs_accounted[CC_id][UE_id]; + transmission_mode = get_tmode(Mod_id, CC_id, UE_id); - } - } + if (nb_rbs_required[CC_id][UE_id] > 0) + LOG_D(MAC, + "Step 1: nb_rbs_remaining[%d][%d]= %d (accounted %d, required %d, pre_nb_available_rbs %d, N_RBG %d, rb_unit %d)\n", + CC_id, + UE_id, + nb_rbs_remaining[CC_id][UE_id], + nb_rbs_accounted[CC_id][UE_id], + nb_rbs_required[CC_id][UE_id], + UE_list->UE_sched_ctrl[UE_id].pre_nb_available_rbs[CC_id], + N_RBG[CC_id], + min_rb_unit[CC_id]); - for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { - - for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { - - CC_id = UE_list->ordered_CCids[i][UE_id]; - // if there are UEs with traffic - if (total_ue_count[CC_id] > 0) { - - rnti = UE_RNTI(Mod_id, UE_id); - - // LOG_D(MAC,"UE %d rnti 0x\n", UE_id, rnti ); - if (rnti == NOT_A_RNTI) - continue; - if (!ue_slice_membership(UE_id, slice_id)) - continue; - - transmission_mode = get_tmode(Mod_id, CC_id, UE_id); - - // retransmission in data channels - // control channel in the 1st transmission - // data channel for all TM - LOG_T(MAC, "calling dlsch_scheduler_pre_processor_allocate .. \n "); - dlsch_scheduler_pre_processor_allocate(Mod_id, - UE_id, - CC_id, - N_RBG[CC_id], - min_rb_unit[CC_id], - nb_rbs_required, - nb_rbs_remaining, - rballoc_sub, - slice_allocation_mask, - MIMO_mode_indicator); + LOG_T(MAC, "calling dlsch_scheduler_pre_processor_allocate .. \n "); + dlsch_scheduler_pre_processor_allocate(Mod_id, + UE_id, + CC_id, + N_RBG[CC_id], + min_rb_unit[CC_id], + nb_rbs_required, + nb_rbs_remaining, + rballoc_sub, + slice_allocation_mask, + MIMO_mode_indicator); #ifdef TM5 // data chanel TM5: to be revisited @@ -1001,10 +970,236 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, } } #endif - } // total_ue_count - } // CC - } // UE - } // end of for for r1 and r2 + } + } +} + +void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id, + slice_id_t slice_id, + int min_rb_unit[NFAPI_CC_MAX], + uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], + uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]) { + + int UE_id, CC_id; + int i; + uint8_t transmission_mode; + uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX]; + UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; + int N_RBG[NFAPI_CC_MAX]; + + decode_slice_positioning(Mod_id, slice_id, slice_allocation_mask); + + for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) { + COMMON_channels_t *cc = &RC.mac[Mod_id]->common_channels[CC_id]; + N_RBG[CC_id] = to_rbg(cc->mib->message.dl_Bandwidth); + } + + // Remaining RBs are allocated to high priority UEs + for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { + + if (UE_RNTI(Mod_id, UE_id) == NOT_A_RNTI) continue; + if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; + if (!ue_slice_membership(UE_id, slice_id)) continue; + + for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { + CC_id = UE_list->ordered_CCids[i][UE_id]; + nb_rbs_remaining[CC_id][UE_id] = + nb_rbs_required[CC_id][UE_id] - nb_rbs_accounted[CC_id][UE_id] + nb_rbs_remaining[CC_id][UE_id]; + if (nb_rbs_remaining[CC_id][UE_id] < 0) + abort(); + transmission_mode = get_tmode(Mod_id, CC_id, UE_id); + + if (nb_rbs_required[CC_id][UE_id] > 0) + LOG_D(MAC, + "Step 2: nb_rbs_remaining[%d][%d]= %d (accounted %d, required %d, pre_nb_available_rbs %d, N_RBG %d, rb_unit %d)\n", + CC_id, + UE_id, + nb_rbs_remaining[CC_id][UE_id], + nb_rbs_accounted[CC_id][UE_id], + nb_rbs_required[CC_id][UE_id], + UE_list->UE_sched_ctrl[UE_id].pre_nb_available_rbs[CC_id], + N_RBG[CC_id], + min_rb_unit[CC_id]); + + LOG_T(MAC, "calling dlsch_scheduler_pre_processor_allocate .. \n "); + dlsch_scheduler_pre_processor_allocate(Mod_id, + UE_id, + CC_id, + N_RBG[CC_id], + min_rb_unit[CC_id], + nb_rbs_required, + nb_rbs_remaining, + rballoc_sub, + slice_allocation_mask, + MIMO_mode_indicator); + +#ifdef TM5 + // data chanel TM5: to be revisited + if ((round == 0) && + (transmission_mode == 5) && + (ue_sched_ctl->dl_pow_off[CC_id] != 1)) { + + for (j = 0; j < N_RBG[CC_id]; j += 2) { + + if ((((j == (N_RBG[CC_id] - 1)) + && (rballoc_sub[CC_id][j] == 0) + && (ue_sched_ctl-> + rballoc_sub_UE[CC_id][j] == 0)) + || ((j < (N_RBG[CC_id] - 1)) + && (rballoc_sub[CC_id][j + 1] == 0) + && + (ue_sched_ctl->rballoc_sub_UE + [CC_id][j + 1] == 0))) + && (nb_rbs_remaining[CC_id][UE_id] + > 0)) { + + for (i = UE_list->next[UE_id + 1]; i >= 0; + i = UE_list->next[i]) { + + UE_id2 = i; + rnti2 = UE_RNTI(Mod_id, UE_id2); + ue_sched_ctl2 = + &UE_list->UE_sched_ctrl[UE_id2]; + round2 = ue_sched_ctl2->round[CC_id]; + if (rnti2 == NOT_A_RNTI) + continue; + if (UE_list-> + UE_sched_ctrl + [UE_id2].ul_out_of_sync == 1) + continue; + + eNB_UE_stats2 = + UE_list-> + eNB_UE_stats[CC_id][UE_id2]; + //mac_xface->get_ue_active_harq_pid(Mod_id,CC_id,rnti2,frameP,subframeP,&harq_pid2,&round2,0); + + if ((mac_eNB_get_rrc_status + (Mod_id, + rnti2) >= RRC_RECONFIGURED) + && (round2 == 0) + && + (get_tmode(Mod_id, CC_id, UE_id2) + == 5) + && (ue_sched_ctl-> + dl_pow_off[CC_id] != 1)) { + + if ((((j == (N_RBG[CC_id] - 1)) + && + (ue_sched_ctl->rballoc_sub_UE + [CC_id][j] == 0)) + || ((j < (N_RBG[CC_id] - 1)) + && + (ue_sched_ctl-> + rballoc_sub_UE[CC_id][j + + 1] + == 0))) + && + (nb_rbs_remaining + [CC_id] + [UE_id2] > 0)) { + + if ((((eNB_UE_stats2-> + DL_pmi_single ^ + eNB_UE_stats1-> + DL_pmi_single) + << (14 - j)) & 0xc000) == 0x4000) { //MU-MIMO only for 25 RBs configuration + + rballoc_sub[CC_id][j] = 1; + ue_sched_ctl-> + rballoc_sub_UE[CC_id] + [j] = 1; + ue_sched_ctl2-> + rballoc_sub_UE[CC_id] + [j] = 1; + MIMO_mode_indicator[CC_id] + [j] = 0; + + if (j < N_RBG[CC_id] - 1) { + rballoc_sub[CC_id][j + + 1] = + 1; + ue_sched_ctl-> + rballoc_sub_UE + [CC_id][j + 1] = 1; + ue_sched_ctl2->rballoc_sub_UE + [CC_id][j + 1] = 1; + MIMO_mode_indicator + [CC_id][j + 1] + = 0; + } + + ue_sched_ctl-> + dl_pow_off[CC_id] + = 0; + ue_sched_ctl2-> + dl_pow_off[CC_id] + = 0; + + + if ((j == N_RBG[CC_id] - 1) + && ((N_RB_DL == 25) + || (N_RB_DL == + 50))) { + + nb_rbs_remaining + [CC_id][UE_id] = + nb_rbs_remaining + [CC_id][UE_id] - + min_rb_unit[CC_id] + + 1; + ue_sched_ctl->pre_nb_available_rbs + [CC_id] = + ue_sched_ctl->pre_nb_available_rbs + [CC_id] + + min_rb_unit[CC_id] + - 1; + nb_rbs_remaining + [CC_id][UE_id2] = + nb_rbs_remaining + [CC_id][UE_id2] - + min_rb_unit[CC_id] + + 1; + ue_sched_ctl2->pre_nb_available_rbs + [CC_id] = + ue_sched_ctl2->pre_nb_available_rbs + [CC_id] + + min_rb_unit[CC_id] + - 1; + } else { + + nb_rbs_remaining + [CC_id][UE_id] = + nb_rbs_remaining + [CC_id][UE_id] - 4; + ue_sched_ctl->pre_nb_available_rbs + [CC_id] = + ue_sched_ctl->pre_nb_available_rbs + [CC_id] + 4; + nb_rbs_remaining + [CC_id][UE_id2] = + nb_rbs_remaining + [CC_id][UE_id2] - + 4; + ue_sched_ctl2->pre_nb_available_rbs + [CC_id] = + ue_sched_ctl2->pre_nb_available_rbs + [CC_id] + 4; + } + + break; + } + } + } + } + } + } + } +#endif + } + } } // This function assigns pre-available RBS to each UE in specified sub-bands before scheduling is done @@ -1020,12 +1215,12 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, uint16_t i, j; uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX]; - uint8_t total_ue_count[NFAPI_CC_MAX]; uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]; // If TM5 is revisited, we can move this inside accounting int min_rb_unit[NFAPI_CC_MAX]; uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; + uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; UE_sched_ctrl *ue_sched_ctl; @@ -1066,19 +1261,28 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, // This procedure decides the number of RBs to allocate dlsch_scheduler_pre_processor_accounting(Mod_id, slice_id, frameP, subframeP, min_rb_unit, - total_ue_count, nb_rbs_required, nb_rbs_accounted); // POSITIONING // This procedure does the main allocation of the RBs dlsch_scheduler_pre_processor_positioning(Mod_id, slice_id, min_rb_unit, - total_ue_count, nb_rbs_required, nb_rbs_accounted, + nb_rbs_remaining, rballoc_sub, MIMO_mode_indicator); + // SHARING + // If there are available RBs left in the slice, allocate them to the highest priority UEs + dlsch_scheduler_pre_processor_intraslice_sharing(Mod_id, slice_id, + min_rb_unit, + nb_rbs_required, + nb_rbs_accounted, + nb_rbs_remaining, + rballoc_sub, + MIMO_mode_indicator); + #ifdef TM5 // This has to be revisited!!!! for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) { From ee4972cd2c65bdb99817eb953d408a3db5d6f325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Iardella?= Date: Mon, 26 Feb 2018 16:12:37 +0100 Subject: [PATCH 080/379] Add partitioning as a separate function --- openair2/LAYER2/MAC/mac_proto.h | 4 +++ openair2/LAYER2/MAC/pre_processor.c | 40 ++++++++++++++++++++++------- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/openair2/LAYER2/MAC/mac_proto.h b/openair2/LAYER2/MAC/mac_proto.h index 2bfee4daa1..23d7fb49d7 100644 --- a/openair2/LAYER2/MAC/mac_proto.h +++ b/openair2/LAYER2/MAC/mac_proto.h @@ -230,6 +230,10 @@ void dlsch_scheduler_pre_processor_reset(module_id_t module_idP, unsigned char MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX], int *mbsfn_flag); +void dlsch_scheduler_pre_processor_partitioning(module_id_t Mod_id, + slice_id_t slice_id, + const uint8_t rbs_retx[NFAPI_CC_MAX]); + void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, slice_id_t slice_id, frame_t frameP, diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 1e5bb541a5..24621f5874 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -583,6 +583,29 @@ void sort_UEs(module_id_t Mod_idP, slice_id_t slice_id, int frameP, sub_frame_t #endif } +void dlsch_scheduler_pre_processor_partitioning(module_id_t Mod_id, + slice_id_t slice_id, + const uint8_t rbs_retx[NFAPI_CC_MAX]) { + int UE_id, CC_id, N_RB_DL, i; + UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; + UE_sched_ctrl *ue_sched_ctl; + + for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { + + if (UE_RNTI(Mod_id, UE_id) == NOT_A_RNTI) continue; + if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; + if (!ue_slice_membership(UE_id, slice_id)) continue; + + ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; + + for (i = 0; i < UE_num_active_CC(UE_list, UE_id); ++i) { + CC_id = UE_list->ordered_CCids[i][UE_id]; + N_RB_DL = to_prb(RC.mac[Mod_id]->common_channels[CC_id].mib->message.dl_Bandwidth); + ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_id] = nb_rbs_allowed_slice(slice_percentage[slice_id], N_RB_DL) - rbs_retx[CC_id]; + } + } +} + void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, slice_id_t slice_id, frame_t frameP, @@ -604,7 +627,6 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, int ue_count_retx[NFAPI_CC_MAX]; uint8_t ue_retx_flag[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; - int N_RB_DL; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; UE_sched_ctrl *ue_sched_ctl; COMMON_channels_t *cc; @@ -654,6 +676,10 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, } } + // PARTITIONING + // Reduces the available RBs according to slicing configuration + dlsch_scheduler_pre_processor_partitioning(Mod_id, slice_id, rbs_retx); + switch (accounting_policy[slice_id]) { // If greedy scheduling, try to account all the required RBs @@ -684,19 +710,15 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, if (!ue_slice_membership(UE_id, slice_id)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); ++i) { + CC_id = UE_list->ordered_CCids[i][UE_id]; ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; - - N_RB_DL = to_prb(RC.mac[Mod_id]->common_channels[CC_id].mib->message.dl_Bandwidth) - rbs_retx[CC_id]; - // recalculate based on the what is left after retransmission - ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_id] = nb_rbs_allowed_slice(slice_percentage[slice_id], N_RB_DL); - available_rbs = ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_id]; - if (total_ue_count[CC_id] == 0) { + if (ue_count_newtx[CC_id] == 0) { average_rbs_per_user[CC_id] = 0; - } else if ((min_rb_unit[CC_id] * total_ue_count[CC_id]) <= available_rbs) { - average_rbs_per_user[CC_id] = (uint16_t) floor(available_rbs / total_ue_count[CC_id]); + } else if (min_rb_unit[CC_id]*ue_count_newtx[CC_id] <= available_rbs) { + average_rbs_per_user[CC_id] = (uint16_t)floor(available_rbs/ue_count_newtx[CC_id]); } else { // consider the total number of use that can be scheduled UE average_rbs_per_user[CC_id] = (uint16_t)min_rb_unit[CC_id]; From df36e3f054b960ae077d55c598a6e9888c1caa96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Iardella?= Date: Tue, 6 Mar 2018 11:16:59 +0100 Subject: [PATCH 081/379] Bugfix: value of available RBs per slice could be negative --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 38 +- openair2/LAYER2/MAC/eNB_scheduler_dlsch.h | 42 +-- openair2/LAYER2/MAC/pre_processor.c | 409 ++++++++++------------ 3 files changed, 232 insertions(+), 257 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 22ea114273..962c871c6b 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -417,8 +417,8 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in int i = 0; - total_slice_percentage=0; - avg_slice_percentage=1.0/n_active_slices; + slice_percentage_total=0; + slice_percentage_avg=1.0/n_active_slices; // reset the slice percentage for inactive slices for (i = n_active_slices; i< MAX_NUM_SLICES; i++) { @@ -430,7 +430,7 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in module_idP, frameP, subframeP, i, slice_percentage[i]); slice_percentage[i]=0; } - total_slice_percentage+=slice_percentage[i]; + slice_percentage_total+=slice_percentage[i]; } for (i = 0; i < n_active_slices; i++) { @@ -443,7 +443,7 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in LOG_I(MAC,"update dl scheduler slice %d\n", i); } - if (total_slice_percentage <= 1.0){ // the new total RB share is within the range + if (slice_percentage_total <= 1.0){ // the new total RB share is within the range // check if the number of slices has changed, and log if (n_active_slices_current != n_active_slices ){ @@ -462,9 +462,9 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in if (slice_percentage_current[i] != slice_percentage[i]) { // new slice percentage LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f\n", - module_idP, i, frameP, subframeP, total_slice_percentage_current, total_slice_percentage, + module_idP, i, frameP, subframeP, slice_percentage_total_current, slice_percentage_total, slice_percentage_current[i], slice_percentage[i]); - total_slice_percentage_current = total_slice_percentage; + slice_percentage_total_current = slice_percentage_total; slice_percentage_current[i] = slice_percentage[i]; } @@ -493,14 +493,14 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in if (n_active_slices == n_active_slices_current){ LOG_W(MAC,"[eNB %d][SLICE %d][DL] invalid total RB share (%f->%f), reduce proportionally the RB share by 0.1\n", - module_idP, i, total_slice_percentage_current, total_slice_percentage); - if (slice_percentage[i] >= avg_slice_percentage){ + module_idP, i, slice_percentage_total_current, slice_percentage_total); + if (slice_percentage[i] >= slice_percentage_avg){ slice_percentage[i]-=0.1; - total_slice_percentage-=0.1; + slice_percentage_total-=0.1; } } else { LOG_W(MAC,"[eNB %d][SLICE %d][DL] invalid total RB share (%f->%f), revert the number of slice to its previous value (%d->%d)\n", - module_idP, i, total_slice_percentage_current, total_slice_percentage, + module_idP, i, slice_percentage_total_current, slice_percentage_total, n_active_slices, n_active_slices_current ); n_active_slices = n_active_slices_current; slice_percentage[i] = slice_percentage_current[i]; @@ -531,22 +531,22 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in } // Check for new sorting policy - if (sorting_policy_current[i] != sorting_policy[i]) { + if (slice_sorting_policy_current[i] != slice_sorting_policy[i]) { LOG_I(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n", - module_idP, i, frameP, subframeP, sorting_policy_current[i], sorting_policy[i]); - sorting_policy_current[i] = sorting_policy[i]; + module_idP, i, frameP, subframeP, slice_sorting_policy_current[i], slice_sorting_policy[i]); + slice_sorting_policy_current[i] = slice_sorting_policy[i]; } // Check for new accounting policy - if (accounting_policy_current[i] != accounting_policy[i]) { - if (accounting_policy[i] > 1 || accounting_policy[i] < 0) { + if (slice_accounting_policy_current[i] != slice_accounting_policy[i]) { + if (slice_accounting_policy[i] > 1 || slice_accounting_policy[i] < 0) { LOG_W(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: invalid accounting policy (%d), revert to its previous value (%d)\n", - module_idP, i, frameP, subframeP, accounting_policy[i], accounting_policy_current[i]); - accounting_policy[i] = accounting_policy_current[i]; + module_idP, i, frameP, subframeP, slice_accounting_policy[i], slice_accounting_policy_current[i]); + slice_accounting_policy[i] = slice_accounting_policy_current[i]; } else { LOG_N(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n", - module_idP, i, frameP, subframeP, accounting_policy_current[i], accounting_policy[i]); - accounting_policy_current[i] = accounting_policy[i]; + module_idP, i, frameP, subframeP, slice_accounting_policy_current[i], slice_accounting_policy[i]); + slice_accounting_policy_current[i] = slice_accounting_policy[i]; } } diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h index 2112bc4038..8a5422a890 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h @@ -38,26 +38,34 @@ #define __LAYER2_MAC_ENB_SCHEDULER_DLSCH_H__ // number of active slices for past and current time -int n_active_slices = 1; -int n_active_slices_current = 1; +int n_active_slices = 1; +int n_active_slices_current = 1; // RB share for each slice for past and current time -float avg_slice_percentage=0.25; -float slice_percentage[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; -float slice_percentage_current[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; -float total_slice_percentage = 0; -float total_slice_percentage_current = 0; +float slice_percentage[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; +float slice_percentage_current[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; +float slice_percentage_total = 0; +float slice_percentage_total_current = 0; +float slice_percentage_avg = 0.25; // Frequency ranges for slice positioning -int slice_position[MAX_NUM_SLICES*2] = {0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX}; -int slice_position_current[MAX_NUM_SLICES*2] = {0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX}; +int slice_position[MAX_NUM_SLICES*2] = {0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX}; +int slice_position_current[MAX_NUM_SLICES*2] = {0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX}; // MAX MCS for each slice for past and current time -int slice_maxmcs[MAX_NUM_SLICES] = { 28, 28, 28, 28 }; -int slice_maxmcs_current[MAX_NUM_SLICES] = { 28, 28, 28, 28 }; +int slice_maxmcs[MAX_NUM_SLICES] = { 28, 28, 28, 28 }; +int slice_maxmcs_current[MAX_NUM_SLICES] = { 28, 28, 28, 28 }; -int update_dl_scheduler[MAX_NUM_SLICES] = { 1, 1, 1, 1 }; -int update_dl_scheduler_current[MAX_NUM_SLICES] = { 1, 1, 1, 1 }; +// The lists of criteria that enforce the sorting policies of the slices +uint32_t slice_sorting_policy[MAX_NUM_SLICES] = {0x01234, 0x01234, 0x01234, 0x01234}; +uint32_t slice_sorting_policy_current[MAX_NUM_SLICES] = {0x01234, 0x01234, 0x01234, 0x01234}; + +// Accounting policy (just greedy(1) or fair(0) setting for now) +int slice_accounting_policy[MAX_NUM_SLICES] = {0, 0, 0, 0}; +int slice_accounting_policy_current[MAX_NUM_SLICES] = {0, 0, 0, 0}; + +int update_dl_scheduler[MAX_NUM_SLICES] = { 1, 1, 1, 1 }; +int update_dl_scheduler_current[MAX_NUM_SLICES] = { 1, 1, 1, 1 }; // name of available scheduler char *dl_scheduler_type[MAX_NUM_SLICES] = @@ -67,14 +75,6 @@ char *dl_scheduler_type[MAX_NUM_SLICES] = "schedule_ue_spec" }; -// The lists of criteria that enforce the sorting policies of the slices -uint32_t sorting_policy[MAX_NUM_SLICES] = {0x01234, 0x01234, 0x01234, 0x01234}; -uint32_t sorting_policy_current[MAX_NUM_SLICES] = {0x01234, 0x01234, 0x01234, 0x01234}; - -// Accounting policy (just greedy(1) or fair(0) setting for now) -int accounting_policy[MAX_NUM_SLICES] = {0, 0, 0, 0}; -int accounting_policy_current[MAX_NUM_SLICES] = {0, 0, 0, 0}; - // pointer to the slice specific scheduler slice_scheduler_dl slice_sched_dl[MAX_NUM_SLICES] = {0}; diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 24621f5874..4f8510f49c 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -54,14 +54,13 @@ extern RAN_CONTEXT_t RC; #define DEBUG_HEADER_PARSING 1 //#define DEBUG_PACKET_TRACE 1 -extern float slice_percentage[MAX_NUM_SLICES]; -extern float slice_percentage_uplink[MAX_NUM_SLICES]; -extern int slice_position[MAX_NUM_SLICES*2]; -extern uint32_t sorting_policy[MAX_NUM_SLICES]; -extern int accounting_policy[MAX_NUM_SLICES]; - -extern int slice_maxmcs[MAX_NUM_SLICES]; -extern int slice_maxmcs_uplink[MAX_NUM_SLICES]; +extern float slice_percentage[MAX_NUM_SLICES]; +extern float slice_percentage_uplink[MAX_NUM_SLICES]; +extern int slice_position[MAX_NUM_SLICES*2]; +extern uint32_t slice_sorting_policy[MAX_NUM_SLICES]; +extern int slice_accounting_policy[MAX_NUM_SLICES]; +extern int slice_maxmcs[MAX_NUM_SLICES]; +extern int slice_maxmcs_uplink[MAX_NUM_SLICES]; //#define ICIC 0 @@ -97,95 +96,89 @@ int phy_stats_exist(module_id_t Mod_id, int rnti) // This function stores the downlink buffer for all the logical channels void -store_dlsch_buffer(module_id_t Mod_id, slice_id_t slice_id, frame_t frameP, - sub_frame_t subframeP) -{ +store_dlsch_buffer(module_id_t Mod_id, + slice_id_t slice_id, + frame_t frameP, + sub_frame_t subframeP) { - int UE_id, i; - rnti_t rnti; - mac_rlc_status_resp_t rlc_status; - UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; - UE_TEMPLATE *UE_template; + int UE_id, i; + rnti_t rnti; + mac_rlc_status_resp_t rlc_status; + UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; + UE_TEMPLATE *UE_template; - for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) { - if (UE_list->active[UE_id] != TRUE) + for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) { + if (UE_list->active[UE_id] != TRUE) continue; - if (!ue_slice_membership(UE_id, slice_id)) - continue; + if (!ue_slice_membership(UE_id, slice_id)) + continue; - UE_template = - &UE_list->UE_template[UE_PCCID(Mod_id, UE_id)][UE_id]; + UE_template = + &UE_list->UE_template[UE_PCCID(Mod_id, UE_id)][UE_id]; - // clear logical channel interface variables - UE_template->dl_buffer_total = 0; - UE_template->dl_pdus_total = 0; + // clear logical channel interface variables + UE_template->dl_buffer_total = 0; + UE_template->dl_pdus_total = 0; - for (i = 0; i < MAX_NUM_LCID; i++) { - UE_template->dl_buffer_info[i] = 0; - UE_template->dl_pdus_in_buffer[i] = 0; - UE_template->dl_buffer_head_sdu_creation_time[i] = 0; - UE_template->dl_buffer_head_sdu_remaining_size_to_send[i] = 0; - } + for (i = 0; i < MAX_NUM_LCID; i++) { + UE_template->dl_buffer_info[i] = 0; + UE_template->dl_pdus_in_buffer[i] = 0; + UE_template->dl_buffer_head_sdu_creation_time[i] = 0; + UE_template->dl_buffer_head_sdu_remaining_size_to_send[i] = 0; + } + rnti = UE_RNTI(Mod_id, UE_id); - rnti = UE_RNTI(Mod_id, UE_id); + for (i = 0; i < MAX_NUM_LCID; i++) { // loop over all the logical channels - for (i = 0; i < MAX_NUM_LCID; i++) { // loop over all the logical channels - - rlc_status = - mac_rlc_status_ind(Mod_id, rnti, Mod_id, frameP, subframeP, + rlc_status = mac_rlc_status_ind(Mod_id, rnti, Mod_id, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, i, 0 #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) ,0, 0 #endif ); - - UE_template->dl_buffer_info[i] = rlc_status.bytes_in_buffer; //storing the dlsch buffer for each logical channel - UE_template->dl_pdus_in_buffer[i] = rlc_status.pdus_in_buffer; - UE_template->dl_buffer_head_sdu_creation_time[i] = - rlc_status.head_sdu_creation_time; - UE_template->dl_buffer_head_sdu_creation_time_max = - cmax(UE_template->dl_buffer_head_sdu_creation_time_max, - rlc_status.head_sdu_creation_time); - UE_template->dl_buffer_head_sdu_remaining_size_to_send[i] = - rlc_status.head_sdu_remaining_size_to_send; - UE_template->dl_buffer_head_sdu_is_segmented[i] = - rlc_status.head_sdu_is_segmented; - UE_template->dl_buffer_total += UE_template->dl_buffer_info[i]; //storing the total dlsch buffer - UE_template->dl_pdus_total += - UE_template->dl_pdus_in_buffer[i]; + UE_template->dl_buffer_info[i] = rlc_status.bytes_in_buffer; //storing the dlsch buffer for each logical channel + UE_template->dl_pdus_in_buffer[i] = rlc_status.pdus_in_buffer; + UE_template->dl_buffer_head_sdu_creation_time[i] = rlc_status.head_sdu_creation_time; + UE_template->dl_buffer_head_sdu_creation_time_max = + cmax(UE_template->dl_buffer_head_sdu_creation_time_max, rlc_status.head_sdu_creation_time); + UE_template->dl_buffer_head_sdu_remaining_size_to_send[i] = + rlc_status.head_sdu_remaining_size_to_send; + UE_template->dl_buffer_head_sdu_is_segmented[i] = + rlc_status.head_sdu_is_segmented; + UE_template->dl_buffer_total += UE_template->dl_buffer_info[i]; //storing the total dlsch buffer + UE_template->dl_pdus_total += UE_template->dl_pdus_in_buffer[i]; #ifdef DEBUG_eNB_SCHEDULER - /* note for dl_buffer_head_sdu_remaining_size_to_send[i] : - * 0 if head SDU has not been segmented (yet), else remaining size not already segmented and sent - */ - if (UE_template->dl_buffer_info[i] > 0) - LOG_D(MAC, - "[eNB %d][SLICE %d] Frame %d Subframe %d : RLC status for UE %d in LCID%d: total of %d pdus and size %d, head sdu queuing time %d, remaining size %d, is segmeneted %d \n", - Mod_id, slice_id, frameP, subframeP, UE_id, - i, UE_template->dl_pdus_in_buffer[i], - UE_template->dl_buffer_info[i], - UE_template->dl_buffer_head_sdu_creation_time[i], - UE_template-> - dl_buffer_head_sdu_remaining_size_to_send[i], - UE_template->dl_buffer_head_sdu_is_segmented[i]); + /* note for dl_buffer_head_sdu_remaining_size_to_send[i] : + * 0 if head SDU has not been segmented (yet), else remaining size not already segmented and sent + */ + if (UE_template->dl_buffer_info[i] > 0) + LOG_D(MAC, + "[eNB %d][SLICE %d] Frame %d Subframe %d : RLC status for UE %d in LCID%d: total of %d pdus and size %d, head sdu queuing time %d, remaining size %d, is segmeneted %d \n", + Mod_id, slice_id, frameP, subframeP, UE_id, + i, UE_template->dl_pdus_in_buffer[i], + UE_template->dl_buffer_info[i], + UE_template->dl_buffer_head_sdu_creation_time[i], + UE_template->dl_buffer_head_sdu_remaining_size_to_send[i], + UE_template->dl_buffer_head_sdu_is_segmented[i]); #endif - } - - //#ifdef DEBUG_eNB_SCHEDULER - if (UE_template->dl_buffer_total > 0) - LOG_D(MAC, - "[eNB %d] Frame %d Subframe %d : RLC status for UE %d : total DL buffer size %d and total number of pdu %d \n", - Mod_id, frameP, subframeP, UE_id, - UE_template->dl_buffer_total, - UE_template->dl_pdus_total); - - //#endif } + + //#ifdef DEBUG_eNB_SCHEDULER + if (UE_template->dl_buffer_total > 0) + LOG_D(MAC, + "[eNB %d] Frame %d Subframe %d : RLC status for UE %d : total DL buffer size %d and total number of pdu %d \n", + Mod_id, frameP, subframeP, UE_id, + UE_template->dl_buffer_total, + UE_template->dl_pdus_total); + + //#endif + } } @@ -199,156 +192,133 @@ assign_rbs_required(module_id_t Mod_id, uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]) { - uint16_t TBS = 0; + uint16_t TBS = 0; - int UE_id, n, i, j, CC_id, pCCid, tmp; - UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; - eNB_UE_STATS *eNB_UE_stats, *eNB_UE_stats_i, *eNB_UE_stats_j; - int N_RB_DL; + int UE_id, n, i, j, CC_id, pCCid, tmp; + UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; + eNB_UE_STATS *eNB_UE_stats, *eNB_UE_stats_i, *eNB_UE_stats_j; + int N_RB_DL; - // clear rb allocations across all CC_id - for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) { - if (UE_list->active[UE_id] != TRUE) - continue; - if (!ue_slice_membership(UE_id, slice_id)) - continue; - pCCid = UE_PCCID(Mod_id, UE_id); + // clear rb allocations across all CC_id + for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) { + if (UE_list->active[UE_id] != TRUE) continue; + if (!ue_slice_membership(UE_id, slice_id)) continue; + pCCid = UE_PCCID(Mod_id, UE_id); - //update CQI information across component carriers - for (n = 0; n < UE_list->numactiveCCs[UE_id]; n++) { - CC_id = UE_list->ordered_CCids[n][UE_id]; - eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id]; + //update CQI information across component carriers + for (n = 0; n < UE_list->numactiveCCs[UE_id]; n++) { - eNB_UE_stats->dlsch_mcs1 =cmin(cqi_to_mcs[UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id]], - slice_maxmcs[slice_id]); + CC_id = UE_list->ordered_CCids[n][UE_id]; + eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id]; + eNB_UE_stats->dlsch_mcs1 = cmin(cqi_to_mcs[UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id]], slice_maxmcs[slice_id]); - } + } - // provide the list of CCs sorted according to MCS - for (i = 0; i < UE_list->numactiveCCs[UE_id]; i++) { - eNB_UE_stats_i = - &UE_list->eNB_UE_stats[UE_list-> - ordered_CCids[i][UE_id]][UE_id]; - for (j = i + 1; j < UE_list->numactiveCCs[UE_id]; j++) { - DevAssert(j < NFAPI_CC_MAX); - eNB_UE_stats_j = - &UE_list-> - eNB_UE_stats[UE_list->ordered_CCids[j][UE_id]][UE_id]; - if (eNB_UE_stats_j->dlsch_mcs1 > - eNB_UE_stats_i->dlsch_mcs1) { - tmp = UE_list->ordered_CCids[i][UE_id]; - UE_list->ordered_CCids[i][UE_id] = - UE_list->ordered_CCids[j][UE_id]; - UE_list->ordered_CCids[j][UE_id] = tmp; - } - } - } + // provide the list of CCs sorted according to MCS + for (i = 0; i < UE_list->numactiveCCs[UE_id]; ++i) { + eNB_UE_stats_i = &UE_list->eNB_UE_stats[UE_list->ordered_CCids[i][UE_id]][UE_id]; + for (j = i + 1; j < UE_list->numactiveCCs[UE_id]; j++) { + DevAssert(j < NFAPI_CC_MAX); + eNB_UE_stats_j = &UE_list->eNB_UE_stats[UE_list->ordered_CCids[j][UE_id]][UE_id]; + if (eNB_UE_stats_j->dlsch_mcs1 > eNB_UE_stats_i->dlsch_mcs1) { + tmp = UE_list->ordered_CCids[i][UE_id]; + UE_list->ordered_CCids[i][UE_id] = UE_list->ordered_CCids[j][UE_id]; + UE_list->ordered_CCids[j][UE_id] = tmp; + } + } + } - if (UE_list->UE_template[pCCid][UE_id].dl_buffer_total > 0) { - LOG_D(MAC, "[preprocessor] assign RB for UE %d\n", UE_id); + if (UE_list->UE_template[pCCid][UE_id].dl_buffer_total > 0) { + LOG_D(MAC, "[preprocessor] assign RB for UE %d\n", UE_id); - for (i = 0; i < UE_list->numactiveCCs[UE_id]; i++) { - CC_id = UE_list->ordered_CCids[i][UE_id]; - eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id]; + for (i = 0; i < UE_list->numactiveCCs[UE_id]; i++) { + CC_id = UE_list->ordered_CCids[i][UE_id]; + eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id]; - if (eNB_UE_stats->dlsch_mcs1 == 0) { - nb_rbs_required[CC_id][UE_id] = 4; // don't let the TBS get too small - } else { - nb_rbs_required[CC_id][UE_id] = min_rb_unit[CC_id]; - } + if (eNB_UE_stats->dlsch_mcs1 == 0) { + nb_rbs_required[CC_id][UE_id] = 4; // don't let the TBS get too small + } else { + nb_rbs_required[CC_id][UE_id] = min_rb_unit[CC_id]; + } - TBS = - get_TBS_DL(eNB_UE_stats->dlsch_mcs1, - nb_rbs_required[CC_id][UE_id]); + TBS = get_TBS_DL(eNB_UE_stats->dlsch_mcs1, nb_rbs_required[CC_id][UE_id]); - LOG_D(MAC, - "[preprocessor] start RB assignement for UE %d CC_id %d dl buffer %d (RB unit %d, MCS %d, TBS %d) \n", - UE_id, CC_id, - UE_list->UE_template[pCCid][UE_id].dl_buffer_total, - nb_rbs_required[CC_id][UE_id], - eNB_UE_stats->dlsch_mcs1, TBS); + LOG_D(MAC, + "[preprocessor] start RB assignement for UE %d CC_id %d dl buffer %d (RB unit %d, MCS %d, TBS %d) \n", + UE_id, CC_id, + UE_list->UE_template[pCCid][UE_id].dl_buffer_total, + nb_rbs_required[CC_id][UE_id], + eNB_UE_stats->dlsch_mcs1, TBS); - N_RB_DL = - to_prb(RC.mac[Mod_id]->common_channels[CC_id]. - mib->message.dl_Bandwidth); + N_RB_DL = to_prb(RC.mac[Mod_id]->common_channels[CC_id].mib->message.dl_Bandwidth); - UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_id] = + UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_id] = nb_rbs_allowed_slice(slice_percentage[slice_id], N_RB_DL); - /* calculating required number of RBs for each UE */ - while (TBS < - UE_list->UE_template[pCCid][UE_id]. - dl_buffer_total) { - nb_rbs_required[CC_id][UE_id] += min_rb_unit[CC_id]; + /* calculating required number of RBs for each UE */ + while (TBS < UE_list->UE_template[pCCid][UE_id].dl_buffer_total) { + nb_rbs_required[CC_id][UE_id] += min_rb_unit[CC_id]; - if (nb_rbs_required[CC_id][UE_id] > UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_id]) { - TBS = get_TBS_DL(eNB_UE_stats->dlsch_mcs1, UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_id]); - nb_rbs_required[CC_id][UE_id] = UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_id]; - break; - } + if (nb_rbs_required[CC_id][UE_id] > UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_id]) { + TBS = get_TBS_DL(eNB_UE_stats->dlsch_mcs1, UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_id]); + nb_rbs_required[CC_id][UE_id] = UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_id]; + break; + } + TBS = get_TBS_DL(eNB_UE_stats->dlsch_mcs1, nb_rbs_required[CC_id][UE_id]); + } // end of while - TBS = - get_TBS_DL(eNB_UE_stats->dlsch_mcs1, - nb_rbs_required[CC_id][UE_id]); - } // end of while - - LOG_D(MAC, - "[eNB %d] Frame %d: UE %d on CC %d: RB unit %d, nb_required RB %d (TBS %d, mcs %d)\n", - Mod_id, frameP, UE_id, CC_id, min_rb_unit[CC_id], - nb_rbs_required[CC_id][UE_id], TBS, - eNB_UE_stats->dlsch_mcs1); - } - } + LOG_D(MAC, + "[eNB %d] Frame %d: UE %d on CC %d: RB unit %d, nb_required RB %d (TBS %d, mcs %d)\n", + Mod_id, frameP, UE_id, CC_id, min_rb_unit[CC_id], + nb_rbs_required[CC_id][UE_id], TBS, + eNB_UE_stats->dlsch_mcs1); + } } + } } // This function scans all CC_ids for a particular UE to find the maximum round index of its HARQ processes - int maxround(module_id_t Mod_id, uint16_t rnti, int frame, - sub_frame_t subframe, uint8_t ul_flag) -{ + sub_frame_t subframe, uint8_t ul_flag) { - uint8_t round, round_max = 0, UE_id; - int CC_id, harq_pid; - UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; - COMMON_channels_t *cc; + uint8_t round, round_max = 0, UE_id; + int CC_id, harq_pid; + UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; + COMMON_channels_t *cc; - for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) { + for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) { + cc = &RC.mac[Mod_id]->common_channels[CC_id]; - cc = &RC.mac[Mod_id]->common_channels[CC_id]; + UE_id = find_UE_id(Mod_id, rnti); + harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frame ,subframe); - UE_id = find_UE_id(Mod_id, rnti); - - harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frame ,subframe); - - round = UE_list->UE_sched_ctrl[UE_id].round[CC_id][harq_pid]; - if (round > round_max) { - round_max = round; - } + round = UE_list->UE_sched_ctrl[UE_id].round[CC_id][harq_pid]; + if (round > round_max) { + round_max = round; } + } - return round_max; + return round_max; } // This function scans all CC_ids for a particular UE to find the maximum DL CQI // it returns -1 if the UE is not found in PHY layer (get_eNB_UE_stats gives NULL) -int maxcqi(module_id_t Mod_id, int32_t UE_id) -{ - UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; - int CC_id, n; - int CQI = 0; +int maxcqi(module_id_t Mod_id, int32_t UE_id) { + UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; + int CC_id, n; + int CQI = 0; - for (n = 0; n < UE_list->numactiveCCs[UE_id]; n++) { - CC_id = UE_list->ordered_CCids[n][UE_id]; + for (n = 0; n < UE_list->numactiveCCs[UE_id]; n++) { + CC_id = UE_list->ordered_CCids[n][UE_id]; - if (UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id] > CQI) { - CQI = UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id]; - } + if (UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id] > CQI) { + CQI = UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id]; } + } - return CQI; + return CQI; } struct sort_ue_dl_params { @@ -360,24 +330,24 @@ struct sort_ue_dl_params { static int ue_dl_compare(const void *_a, const void *_b, void *_params) { - struct sort_ue_dl_params *params = _params; - UE_list_t *UE_list = &RC.mac[params->Mod_idP]->UE_list; + struct sort_ue_dl_params *params = _params; + UE_list_t *UE_list = &RC.mac[params->Mod_idP]->UE_list; - int i; - int slice_id = params->slice_id; - int UE_id1 = *(const int *) _a; - int UE_id2 = *(const int *) _b; + int i; + int slice_id = params->slice_id; + int UE_id1 = *(const int *) _a; + int UE_id2 = *(const int *) _b; - int rnti1 = UE_RNTI(params->Mod_idP, UE_id1); - int pCC_id1 = UE_PCCID(params->Mod_idP, UE_id1); - int round1 = maxround(params->Mod_idP, rnti1, params->frameP, params->subframeP, 1); + int rnti1 = UE_RNTI(params->Mod_idP, UE_id1); + int pCC_id1 = UE_PCCID(params->Mod_idP, UE_id1); + int round1 = maxround(params->Mod_idP, rnti1, params->frameP, params->subframeP, 1); - int rnti2 = UE_RNTI(params->Mod_idP, UE_id2); - int pCC_id2 = UE_PCCID(params->Mod_idP, UE_id2); - int round2 = maxround(params->Mod_idP, rnti2, params->frameP, params->subframeP, 1); + int rnti2 = UE_RNTI(params->Mod_idP, UE_id2); + int pCC_id2 = UE_PCCID(params->Mod_idP, UE_id2); + int round2 = maxround(params->Mod_idP, rnti2, params->frameP, params->subframeP, 1); - int cqi1 = maxcqi(params->Mod_idP, UE_id1); - int cqi2 = maxcqi(params->Mod_idP, UE_id2); + int cqi1 = maxcqi(params->Mod_idP, UE_id1); + int cqi2 = maxcqi(params->Mod_idP, UE_id2); for (i = 0; i < CR_NUM; ++i) { switch (UE_list->sorting_criteria[slice_id][i]) { @@ -435,22 +405,22 @@ static int ue_dl_compare(const void *_a, const void *_b, void *_params) } void decode_sorting_policy(module_id_t Mod_idP, slice_id_t slice_id) { - int i; + int i; - UE_list_t *UE_list = &RC.mac[Mod_idP]->UE_list; - uint32_t policy = sorting_policy[slice_id]; - uint32_t mask = 0x0000000F; - uint16_t criterion; + UE_list_t *UE_list = &RC.mac[Mod_idP]->UE_list; + uint32_t policy = slice_sorting_policy[slice_id]; + uint32_t mask = 0x0000000F; + uint16_t criterion; - for(i = 0; i < CR_NUM; ++i) { - criterion = (uint16_t)(policy >> 4*(CR_NUM - 1 - i) & mask); - if (criterion >= CR_NUM) { - LOG_W(MAC, "Invalid criterion in slice %d policy, revert to default policy \n", slice_id); - sorting_policy[slice_id] = 0x1234; - break; - } - UE_list->sorting_criteria[slice_id][i] = criterion; - } + for (i = 0; i < CR_NUM; ++i) { + criterion = (uint16_t) (policy >> 4 * (CR_NUM - 1 - i) & mask); + if (criterion >= CR_NUM) { + LOG_W(MAC, "Invalid criterion in slice %d policy, revert to default policy \n", slice_id); + slice_sorting_policy[slice_id] = 0x1234; + break; + } + UE_list->sorting_criteria[slice_id][i] = criterion; + } } void decode_slice_positioning(module_id_t Mod_idP, @@ -589,6 +559,7 @@ void dlsch_scheduler_pre_processor_partitioning(module_id_t Mod_id, int UE_id, CC_id, N_RB_DL, i; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; UE_sched_ctrl *ue_sched_ctl; + uint16_t available_rbs; for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { @@ -601,7 +572,11 @@ void dlsch_scheduler_pre_processor_partitioning(module_id_t Mod_id, for (i = 0; i < UE_num_active_CC(UE_list, UE_id); ++i) { CC_id = UE_list->ordered_CCids[i][UE_id]; N_RB_DL = to_prb(RC.mac[Mod_id]->common_channels[CC_id].mib->message.dl_Bandwidth); - ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_id] = nb_rbs_allowed_slice(slice_percentage[slice_id], N_RB_DL) - rbs_retx[CC_id]; + available_rbs = nb_rbs_allowed_slice(slice_percentage[slice_id], N_RB_DL); + if (rbs_retx[CC_id] < available_rbs) + ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_id] = available_rbs - rbs_retx[CC_id]; + else + ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_id] = 0; } } } @@ -680,7 +655,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, // Reduces the available RBs according to slicing configuration dlsch_scheduler_pre_processor_partitioning(Mod_id, slice_id, rbs_retx); - switch (accounting_policy[slice_id]) { + switch (slice_accounting_policy[slice_id]) { // If greedy scheduling, try to account all the required RBs case 1: From e2c270ee948f52d09aa6b5f5da346168d6a36072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Iardella?= Date: Wed, 7 Mar 2018 11:23:20 +0100 Subject: [PATCH 082/379] Fix indentation in schedule_ue_spec() and pre_processor.c --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 709 +++++++++++----------- openair2/LAYER2/MAC/pre_processor.c | 52 +- 2 files changed, 365 insertions(+), 396 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 962c871c6b..db9ec66ef7 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -560,8 +560,8 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in //------------------------------------------------------------------------------ void -schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, - frame_t frameP, sub_frame_t subframeP, int *mbsfn_flag) +schedule_ue_spec(module_id_t module_idP, slice_id_t slice_idP, + frame_t frameP, sub_frame_t subframeP, int *mbsfn_flag) //------------------------------------------------------------------------------ { int CC_id; @@ -601,49 +601,46 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, int header_length_total; start_meas(&eNB->schedule_dlsch); - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME - (VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, VCD_FUNCTION_IN); - + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, VCD_FUNCTION_IN); // for TDD: check that we have to act here, otherwise return if (cc[0].tdd_Config) { tdd_sfa = cc[0].tdd_Config->subframeAssignment; switch (subframeP) { - case 0: - // always continue - break; - case 1: - return; - break; - case 2: - return; - break; - case 3: - if ((tdd_sfa != 2) && (tdd_sfa != 5)) - return; - break; - case 4: - if ((tdd_sfa != 1) && (tdd_sfa != 2) && (tdd_sfa != 4) - && (tdd_sfa != 5)) - return; - break; - case 5: - break; - case 6: - case 7: - if ((tdd_sfa != 3) && (tdd_sfa != 4) && (tdd_sfa != 5)) - return; - break; - case 8: - if ((tdd_sfa != 2) && (tdd_sfa != 3) && (tdd_sfa != 4) - && (tdd_sfa != 5)) - return; - break; - case 9: - if (tdd_sfa == 0) - return; - break; - + case 0: + // always continue + break; + case 1: + return; + break; + case 2: + return; + break; + case 3: + if ((tdd_sfa != 2) && (tdd_sfa != 5)) + return; + break; + case 4: + if ((tdd_sfa != 1) && (tdd_sfa != 2) && (tdd_sfa != 4) + && (tdd_sfa != 5)) + return; + break; + case 5: + break; + case 6: + case 7: + if ((tdd_sfa != 3) && (tdd_sfa != 4) && (tdd_sfa != 5)) + return; + break; + case 8: + if ((tdd_sfa != 2) && (tdd_sfa != 3) && (tdd_sfa != 4) + && (tdd_sfa != 5)) + return; + break; + case 9: + if (tdd_sfa == 0) + return; + break; } } //weight = get_ue_weight(module_idP,UE_id); @@ -655,7 +652,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, total_nb_available_rb[CC_id] = N_RB_DL[CC_id]; for (i = 0; i < N_RB_DL[CC_id]; i++) if (cc[CC_id].vrb_map[i] != 0) - total_nb_available_rb[CC_id]--; + total_nb_available_rb[CC_id]--; N_RBG[CC_id] = to_rbg(cc[CC_id].mib->message.dl_Bandwidth); @@ -667,10 +664,10 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, eNB->eNB_stats[CC_id].dlsch_pdus_tx = 0; } - /// CALLING Pre_Processor for downlink scheduling (Returns estimation of RBs required by each UE and the allocation on sub-band) + // CALLING Pre_Processor for downlink scheduling + // (Returns estimation of RBs required by each UE and the allocation on sub-band) + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR, VCD_FUNCTION_IN); - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME - (VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR, VCD_FUNCTION_IN); start_meas(&eNB->schedule_dlsch_preprocessor); dlsch_scheduler_pre_processor(module_idP, slice_idP, @@ -678,8 +675,8 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, subframeP, mbsfn_flag); stop_meas(&eNB->schedule_dlsch_preprocessor); - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME - (VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR, VCD_FUNCTION_OUT); + + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR, VCD_FUNCTION_OUT); for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { LOG_D(MAC, "doing schedule_ue_spec for CC_id %d\n", CC_id); @@ -689,49 +686,45 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, if (mbsfn_flag[CC_id] > 0) continue; - for (UE_id = UE_list->head; UE_id >= 0; - UE_id = UE_list->next[UE_id]) { - continue_flag = 0; // reset the flag to allow allocation for the remaining UEs + for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { + continue_flag = 0; // reset the flag to allow allocation for the remaining UEs rnti = UE_RNTI(module_idP, UE_id); eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id]; ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; - if (rnti == NOT_A_RNTI) { - LOG_D(MAC, "Cannot find rnti for UE_id %d (num_UEs %d)\n", - UE_id, UE_list->num_UEs); - continue_flag = 1; + LOG_D(MAC, "Cannot find rnti for UE_id %d (num_UEs %d)\n", UE_id, UE_list->num_UEs); + continue_flag = 1; } if (eNB_UE_stats == NULL) { - LOG_D(MAC, "[eNB] Cannot find eNB_UE_stats\n"); - continue_flag = 1; + LOG_D(MAC, "[eNB] Cannot find eNB_UE_stats\n"); + continue_flag = 1; } + if (!ue_slice_membership(UE_id, slice_idP)) - continue; + continue; if (continue_flag != 1) { - switch (get_tmode(module_idP, CC_id, UE_id)) { - case 1: - case 2: - case 7: - aggregation = - get_aggregation(get_bw_index(module_idP, CC_id), - ue_sched_ctl->dl_cqi[CC_id], - format1); - break; - case 3: - aggregation = - get_aggregation(get_bw_index(module_idP, CC_id), - ue_sched_ctl->dl_cqi[CC_id], - format2A); - break; - default: - LOG_W(MAC, "Unsupported transmission mode %d\n", - get_tmode(module_idP, CC_id, UE_id)); - aggregation = 2; - } + switch (get_tmode(module_idP, CC_id, UE_id)) { + case 1: + case 2: + case 7: + aggregation = get_aggregation(get_bw_index(module_idP, CC_id), + ue_sched_ctl->dl_cqi[CC_id], + format1); + break; + case 3: + aggregation = get_aggregation(get_bw_index(module_idP, CC_id), + ue_sched_ctl->dl_cqi[CC_id], + format2A); + break; + default: + LOG_W(MAC, "Unsupported transmission mode %d\n", get_tmode(module_idP, CC_id, UE_id)); + aggregation = 2; + } } + /* if (continue_flag != 1 */ if ((ue_sched_ctl->pre_nb_available_rbs[CC_id] == 0) || // no RBs allocated CCE_allocation_infeasible(module_idP, CC_id, 1, subframeP, @@ -742,78 +735,71 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, continue_flag = 1; //to next user (there might be rbs availiable for other UEs in TM5 } - if (cc[CC_id].tdd_Config != NULL) { //TDD - set_ue_dai(subframeP, - UE_id, - CC_id, - cc[CC_id].tdd_Config->subframeAssignment, - UE_list); - // update UL DAI after DLSCH scheduling - set_ul_DAI(module_idP, UE_id, CC_id, frameP, subframeP); + // If TDD + if (cc[CC_id].tdd_Config != NULL) { //TDD + set_ue_dai(subframeP, + UE_id, + CC_id, + cc[CC_id].tdd_Config->subframeAssignment, + UE_list); + // update UL DAI after DLSCH scheduling + set_ul_DAI(module_idP, UE_id, CC_id, frameP, subframeP); } if (continue_flag == 1) { - add_ue_dlsch_info(module_idP, - CC_id, UE_id, subframeP, S_DL_NONE); - continue; + add_ue_dlsch_info(module_idP, CC_id, UE_id, subframeP, S_DL_NONE); + continue; } nb_available_rb = ue_sched_ctl->pre_nb_available_rbs[CC_id]; - harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP ,subframeP); round = ue_sched_ctl->round[CC_id][harq_pid]; - UE_list->eNB_UE_stats[CC_id][UE_id].crnti = rnti; + UE_list->eNB_UE_stats[CC_id][UE_id].crnti = rnti; UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status = mac_eNB_get_rrc_status(module_idP, rnti); - UE_list->eNB_UE_stats[CC_id][UE_id].harq_pid = harq_pid; + UE_list->eNB_UE_stats[CC_id][UE_id].harq_pid = harq_pid; UE_list->eNB_UE_stats[CC_id][UE_id].harq_round = round; - - if (UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status < RRC_CONNECTED) continue; + if (UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status < RRC_CONNECTED) + continue; header_length_total = 0; sdu_length_total = 0; num_sdus = 0; /* - DevCheck(((eNB_UE_stats->dl_cqi < MIN_CQI_VALUE) || (eNB_UE_stats->dl_cqi > MAX_CQI_VALUE)), - eNB_UE_stats->dl_cqi, MIN_CQI_VALUE, MAX_CQI_VALUE); + DevCheck(((eNB_UE_stats->dl_cqi < MIN_CQI_VALUE) || + (eNB_UE_stats->dl_cqi > MAX_CQI_VALUE)), + eNB_UE_stats->dl_cqi, MIN_CQI_VALUE, MAX_CQI_VALUE); */ if (nfapi_mode) { - eNB_UE_stats->dlsch_mcs1 = 10;//cqi_to_mcs[ue_sched_ctl->dl_cqi[CC_id]]; - } - else { // this operation is also done in the preprocessor - eNB_UE_stats->dlsch_mcs1 = cmin(eNB_UE_stats->dlsch_mcs1, slice_maxmcs[slice_idP]); //cmin(eNB_UE_stats->dlsch_mcs1, openair_daq_vars.target_ue_dl_mcs); + eNB_UE_stats->dlsch_mcs1 = 10; // cqi_to_mcs[ue_sched_ctl->dl_cqi[CC_id]]; + } else { // this operation is also done in the preprocessor + eNB_UE_stats->dlsch_mcs1 = cmin(eNB_UE_stats->dlsch_mcs1, slice_maxmcs[slice_idP]); // cmin(eNB_UE_stats->dlsch_mcs1, openair_daq_vars.target_ue_dl_mcs); } + // Store stats + // UE_list->eNB_UE_stats[CC_id][UE_id].dl_cqi= eNB_UE_stats->dl_cqi; - - // store stats - //UE_list->eNB_UE_stats[CC_id][UE_id].dl_cqi= eNB_UE_stats->dl_cqi; - - // initializing the rb allocation indicator for each UE + // Initializing the rb allocation indicator for each UE for (j = 0; j < N_RBG[CC_id]; j++) { - UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = 0; + UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = 0; } LOG_D(MAC, - "[eNB %d] Frame %d: Scheduling UE %d on CC_id %d (rnti %x, harq_pid %d, round %d, rb %d, cqi %d, mcs %d, rrc %d)\n", - module_idP, frameP, UE_id, CC_id, rnti, harq_pid, round, - nb_available_rb, ue_sched_ctl->dl_cqi[CC_id], - eNB_UE_stats->dlsch_mcs1, - UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status); - - + "[eNB %d] Frame %d: Scheduling UE %d on CC_id %d (rnti %x, harq_pid %d, round %d, rb %d, cqi %d, mcs %d, rrc %d)\n", + module_idP, frameP, UE_id, CC_id, rnti, harq_pid, round, + nb_available_rb, ue_sched_ctl->dl_cqi[CC_id], + eNB_UE_stats->dlsch_mcs1, + UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status); /* process retransmission */ - if (round != 8) { - // get freq_allocation - nb_rb = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid]; - TBS = get_TBS_DL(UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid], - nb_rb); + // get freq_allocation + nb_rb = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid]; + TBS = get_TBS_DL(UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid], nb_rb); if (nb_rb <= nb_available_rb) { if (cc[CC_id].tdd_Config != NULL) { @@ -826,82 +812,82 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, UE_list->UE_template[CC_id][UE_id].DAI); } - if (nb_rb == ue_sched_ctl->pre_nb_available_rbs[CC_id]) { - for (j = 0; j < N_RBG[CC_id]; j++) { // for indicating the rballoc for each sub-band - UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = ue_sched_ctl->rballoc_sub_UE[CC_id][j]; - } - } else { - nb_rb_temp = nb_rb; - j = 0; + if (nb_rb == ue_sched_ctl->pre_nb_available_rbs[CC_id]) { + for (j = 0; j < N_RBG[CC_id]; ++j) { // for indicating the rballoc for each sub-band + UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = ue_sched_ctl->rballoc_sub_UE[CC_id][j]; + } + } else { + nb_rb_temp = nb_rb; + j = 0; - while ((nb_rb_temp > 0) && (j < N_RBG[CC_id])) { - if (ue_sched_ctl->rballoc_sub_UE[CC_id][j] == 1) { - if (UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j]) - printf("WARN: rballoc_subband not free for retrans?\n"); - UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = ue_sched_ctl->rballoc_sub_UE[CC_id][j]; + while ((nb_rb_temp > 0) && (j < N_RBG[CC_id])) { + if (ue_sched_ctl->rballoc_sub_UE[CC_id][j] == 1) { + if (UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j]) + printf("WARN: rballoc_subband not free for retrans?\n"); + UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = ue_sched_ctl->rballoc_sub_UE[CC_id][j]; - if ((j == N_RBG[CC_id] - 1) && - ((N_RB_DL[CC_id] == 25) || - (N_RB_DL[CC_id] == 50))) { - nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id] + 1; - } else { - nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id]; - } - } + if ((j == N_RBG[CC_id] - 1) && ((N_RB_DL[CC_id] == 25) || (N_RB_DL[CC_id] == 50))) { + nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id] + 1; + } else { + nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id]; + } + } - j = j + 1; - } - } + j = j + 1; + } + } - nb_available_rb -= nb_rb; - /* - eNB->mu_mimo_mode[UE_id].pre_nb_available_rbs = nb_rb; - eNB->mu_mimo_mode[UE_id].dl_pow_off = ue_sched_ctl->dl_pow_off[CC_id]; + nb_available_rb -= nb_rb; + /* + eNB->mu_mimo_mode[UE_id].pre_nb_available_rbs = nb_rb; + eNB->mu_mimo_mode[UE_id].dl_pow_off = ue_sched_ctl->dl_pow_off[CC_id]; - for(j=0; jmu_mimo_mode[UE_id].rballoc_sub[j] = UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j]; - } - */ + for(j = 0; j < N_RBG[CC_id]; ++j) { + eNB->mu_mimo_mode[UE_id].rballoc_sub[j] = UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j]; + } + */ - switch (get_tmode(module_idP, CC_id, UE_id)) { - case 1: - case 2: - case 7: - default: - LOG_D(MAC,"retransmission DL_REQ: rnti:%x\n",rnti); + switch (get_tmode(module_idP, CC_id, UE_id)) { + case 1: + case 2: + case 7: + default: + LOG_D(MAC, "retransmission DL_REQ: rnti:%x\n", rnti); - dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu]; - memset((void *) dl_config_pdu, 0, - sizeof(nfapi_dl_config_request_pdu_t)); - dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE; - dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu)); - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP, CC_id), - ue_sched_ctl->dl_cqi[CC_id], - format1); - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power + dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu]; + memset((void *) dl_config_pdu, 0, sizeof(nfapi_dl_config_request_pdu_t)); + dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE; + dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu)); + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = + get_aggregation(get_bw_index(module_idP, CC_id), + ue_sched_ctl->dl_cqi[CC_id], + format1); + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI: see Table 4-10 from SCF082 - nFAPI specifications + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = harq_pid; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // dont adjust power when retransmitting - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid]; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = round & 3; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = harq_pid; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // Don't adjust power when retransmitting + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid]; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = round & 3; - if (cc[CC_id].tdd_Config != NULL) { //TDD - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.downlink_assignment_index = (UE_list->UE_template[CC_id][UE_id].DAI - 1) & 3; - LOG_D(MAC, - "[eNB %d] Retransmission CC_id %d : harq_pid %d, round %d, dai %d, mcs %d\n", - module_idP, CC_id, harq_pid, round, - (UE_list->UE_template[CC_id][UE_id].DAI - 1), - UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid]); - } else { - LOG_D(MAC, - "[eNB %d] Retransmission CC_id %d : harq_pid %d, round %d, mcs %d\n", - module_idP, CC_id, harq_pid, round, - UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid]); + // TDD + if (cc[CC_id].tdd_Config != NULL) { + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.downlink_assignment_index = + (UE_list->UE_template[CC_id][UE_id].DAI - 1) & 3; + LOG_D(MAC, + "[eNB %d] Retransmission CC_id %d : harq_pid %d, round %d, dai %d, mcs %d\n", + module_idP, CC_id, harq_pid, round, + (UE_list->UE_template[CC_id][UE_id].DAI - 1), + UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid]); + } else { + LOG_D(MAC, + "[eNB %d] Retransmission CC_id %d : harq_pid %d, round %d, mcs %d\n", + module_idP, CC_id, harq_pid, round, + UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid]); } if (!CCE_allocation_infeasible(module_idP, CC_id, 1, subframeP, @@ -913,48 +899,44 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, eNB->DL_req[CC_id].sfn_sf = frameP<<4 | subframeP; eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST; - fill_nfapi_dlsch_config(eNB, dl_req, TBS, -1 - /* retransmission, no pdu_index */ - , rnti, 0, // type 0 allocation from 7.1.6 in 36.213 - 0, // virtual_resource_block_assignment_flag, unused here - 0, // resource_block_coding, to be filled in later - getQm(UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid]), round & 3, // redundancy version - 1, // transport blocks - 0, // transport block to codeword swap flag - cc[CC_id].p_eNB == 1 ? 0 : 1, // transmission_scheme - 1, // number of layers - 1, // number of subbands - // uint8_t codebook_index, - 4, // UE category capacity - UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->pdsch_ConfigDedicated->p_a, 0, // delta_power_offset for TM5 - 0, // ngap - 0, // nprb - cc[CC_id].p_eNB == 1 ? 1 : 2, // transmission mode - 0, //number of PRBs treated as one subband, not used here - 0 // number of beamforming vectors, not used here - ); + fill_nfapi_dlsch_config(eNB, dl_req, TBS, -1, + /* retransmission, no pdu_index */ + rnti, 0, // type 0 allocation from 7.1.6 in 36.213 + 0, // virtual_resource_block_assignment_flag, unused here + 0, // resource_block_coding, to be filled in later + getQm(UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid]), + round & 3, // redundancy version + 1, // transport blocks + 0, // transport block to codeword swap flag + cc[CC_id].p_eNB == 1 ? 0 : 1, // transmission_scheme + 1, // number of layers + 1, // number of subbands + // uint8_t codebook_index, + 4, // UE category capacity + UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->pdsch_ConfigDedicated->p_a, + 0, // delta_power_offset for TM5 + 0, // ngap + 0, // nprb + cc[CC_id].p_eNB == 1 ? 1 : 2, // transmission mode + 0, //number of PRBs treated as one subband, not used here + 0 // number of beamforming vectors, not used here + ); - LOG_D(MAC, - "Filled NFAPI configuration for DCI/DLSCH %d, retransmission round %d\n", - eNB->pdu_index[CC_id], round); + LOG_D(MAC, + "Filled NFAPI configuration for DCI/DLSCH %d, retransmission round %d\n", + eNB->pdu_index[CC_id], round); - program_dlsch_acknak(module_idP, CC_id, UE_id, - frameP, subframeP, - dl_config_pdu-> - dci_dl_pdu.dci_dl_pdu_rel8. - cce_idx); - // No TX request for retransmission (check if null request for FAPI) - } else { - LOG_W(MAC, - "Frame %d, Subframe %d: Dropping DLSCH allocation for UE %d\%x, infeasible CCE allocation\n", - frameP, subframeP, UE_id, rnti); - } - } + program_dlsch_acknak(module_idP, CC_id, UE_id, frameP, subframeP, + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.cce_idx); + // No TX request for retransmission (check if null request for FAPI) + } else { + LOG_W(MAC, + "Frame %d, Subframe %d: Dropping DLSCH allocation for UE %d\%x, infeasible CCE allocation\n", + frameP, subframeP, UE_id, rnti); + } + } - - add_ue_dlsch_info(module_idP, - CC_id, UE_id, subframeP, - S_DL_SCHEDULED); + add_ue_dlsch_info(module_idP, CC_id, UE_id, subframeP, S_DL_SCHEDULED); //eNB_UE_stats->dlsch_trials[round]++; UE_list->eNB_UE_stats[CC_id][UE_id].num_retransmission += 1; @@ -976,17 +958,18 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, // add the length for all the control elements (timing adv, drx, etc) : header + payload - if (ue_sched_ctl->ta_timer == 0) { - ta_update = ue_sched_ctl->ta_update; - /* if we send TA then set timer to not send it for a while */ - if (ta_update != 31) ue_sched_ctl->ta_timer = 20; - /* reset ta_update */ - ue_sched_ctl->ta_update = 31; - } else { - ta_update = 31; - } + if (ue_sched_ctl->ta_timer == 0) { + ta_update = ue_sched_ctl->ta_update; + /* if we send TA then set timer to not send it for a while */ + if (ta_update != 31) + ue_sched_ctl->ta_timer = 20; + /* reset ta_update */ + ue_sched_ctl->ta_update = 31; + } else { + ta_update = 31; + } - ta_len = (ta_update != 31) ? 2 : 0; + ta_len = (ta_update != 31) ? 2 : 0; // RLC data on DCCH if (TBS - ta_len - header_length_total - sdu_length_total - 3 > 0) { @@ -997,7 +980,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, #endif ); - sdu_lengths[0] = 0; + sdu_lengths[0] = 0; if (rlc_status.bytes_in_buffer > 0) { LOG_D(MAC, "[eNB %d] SFN/SF %d.%d, DL-DCCH->DLSCH CC_id %d, Requesting %d bytes from RLC (RRC message)\n", @@ -1063,10 +1046,10 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, } } - T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP), - T_INT(CC_id), T_INT(rnti), T_INT(frameP), - T_INT(subframeP), T_INT(harq_pid), T_INT(DCCH), - T_INT(sdu_lengths[0])); + T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP), + T_INT(CC_id), T_INT(rnti), T_INT(frameP), + T_INT(subframeP), T_INT(harq_pid), T_INT(DCCH), + T_INT(sdu_lengths[0])); LOG_D(MAC, "[eNB %d][DCCH] CC_id %d Got %d bytes from RLC\n", module_idP, CC_id, sdu_lengths[0]); @@ -1084,15 +1067,15 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, num_sdus = 1; #ifdef DEBUG_eNB_SCHEDULER - LOG_T(MAC, - "[eNB %d][DCCH] CC_id %d Got %d bytes :", - module_idP, CC_id, sdu_lengths[0]); + LOG_T(MAC, + "[eNB %d][DCCH] CC_id %d Got %d bytes :", + module_idP, CC_id, sdu_lengths[0]); - for (j = 0; j < sdu_lengths[0]; j++) { - LOG_T(MAC, "%x ", dlsch_buffer[j]); - } + for (j = 0; j < sdu_lengths[0]; ++j) { + LOG_T(MAC, "%x ", dlsch_buffer[j]); + } - LOG_T(MAC, "\n"); + LOG_T(MAC, "\n"); #endif } } @@ -1122,10 +1105,10 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, #endif ); - T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP), - T_INT(CC_id), T_INT(rnti), T_INT(frameP), - T_INT(subframeP), T_INT(harq_pid), - T_INT(DCCH + 1), T_INT(sdu_lengths[num_sdus])); + T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP), + T_INT(CC_id), T_INT(rnti), T_INT(frameP), + T_INT(subframeP), T_INT(harq_pid), + T_INT(DCCH + 1), T_INT(sdu_lengths[num_sdus])); sdu_lcids[num_sdus] = DCCH1; sdu_length_total += sdu_lengths[num_sdus]; @@ -1140,15 +1123,15 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, num_sdus++; #ifdef DEBUG_eNB_SCHEDULER - LOG_T(MAC, - "[eNB %d][DCCH1] CC_id %d Got %d bytes :", - module_idP, CC_id, sdu_lengths[num_sdus]); + LOG_T(MAC, + "[eNB %d][DCCH1] CC_id %d Got %d bytes :", + module_idP, CC_id, sdu_lengths[num_sdus]); - for (j = 0; j < sdu_lengths[num_sdus]; j++) { - LOG_T(MAC, "%x ", dlsch_buffer[j]); - } + for (j = 0; j < sdu_lengths[num_sdus]; ++j) { + LOG_T(MAC, "%x ", dlsch_buffer[j]); + } - LOG_T(MAC, "\n"); + LOG_T(MAC, "\n"); #endif } @@ -1237,15 +1220,14 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, // Now compute number of required RBs for total sdu length // Assume RAH format 2 - mcs = eNB_UE_stats->dlsch_mcs1; + mcs = eNB_UE_stats->dlsch_mcs1; - if (mcs == 0) { - nb_rb = 4; // don't let the TBS get too small - } else { - nb_rb = min_rb_unit[CC_id]; - } - - TBS = get_TBS_DL(mcs, nb_rb); + if (mcs == 0) { + nb_rb = 4; // don't let the TBS get too small + } else { + nb_rb = min_rb_unit[CC_id]; + } + TBS = get_TBS_DL(mcs, nb_rb); while (TBS < sdu_length_total + header_length_total + ta_len) { nb_rb += min_rb_unit[CC_id]; // @@ -1257,33 +1239,31 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, break; } - TBS = get_TBS_DL(eNB_UE_stats->dlsch_mcs1, nb_rb); - } + TBS = get_TBS_DL(eNB_UE_stats->dlsch_mcs1, nb_rb); + } - if (nb_rb == ue_sched_ctl->pre_nb_available_rbs[CC_id]) { - for (j = 0; j < N_RBG[CC_id]; j++) { // for indicating the rballoc for each sub-band - UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = ue_sched_ctl->rballoc_sub_UE[CC_id][j]; - } - } else { - nb_rb_temp = nb_rb; - j = 0; + if (nb_rb == ue_sched_ctl->pre_nb_available_rbs[CC_id]) { + for (j = 0; j < N_RBG[CC_id]; ++j) { // for indicating the rballoc for each sub-band + UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = ue_sched_ctl->rballoc_sub_UE[CC_id][j]; + } + } else { + nb_rb_temp = nb_rb; + j = 0; - while ((nb_rb_temp > 0) && (j < N_RBG[CC_id])) { - if (ue_sched_ctl->rballoc_sub_UE[CC_id][j] == 1) { - UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = ue_sched_ctl->rballoc_sub_UE[CC_id][j]; + while ((nb_rb_temp > 0) && (j < N_RBG[CC_id])) { + if (ue_sched_ctl->rballoc_sub_UE[CC_id][j] == 1) { + UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = ue_sched_ctl->rballoc_sub_UE[CC_id][j]; - if ((j == N_RBG[CC_id] - 1) && - ((N_RB_DL[CC_id] == 25) || - (N_RB_DL[CC_id] == 50))) { - nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id] + 1; - } else { - nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id]; - } - } + if ((j == N_RBG[CC_id] - 1) && ((N_RB_DL[CC_id] == 25) || (N_RB_DL[CC_id] == 50))) { + nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id] + 1; + } else { + nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id]; + } + } - j = j + 1; - } - } + j = j + 1; + } + } // decrease mcs until TBS falls below required length while ((TBS > sdu_length_total + header_length_total + ta_len) && (mcs > 0)) { @@ -1301,16 +1281,16 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, TBS = get_TBS_DL(mcs, nb_rb); } - LOG_D(MAC, - "dlsch_mcs before and after the rate matching = (%d, %d)\n", - eNB_UE_stats->dlsch_mcs1, mcs); + LOG_D(MAC, + "dlsch_mcs before and after the rate matching = (%d, %d)\n", + eNB_UE_stats->dlsch_mcs1, mcs); #ifdef DEBUG_eNB_SCHEDULER - LOG_D(MAC, - "[eNB %d] CC_id %d Generated DLSCH header (mcs %d, TBS %d, nb_rb %d)\n", - module_idP, CC_id, mcs, TBS, nb_rb); - // msg("[MAC][eNB ] Reminder of DLSCH with random data %d %d %d %d \n", - // TBS, sdu_length_total, offset, TBS-sdu_length_total-offset); + LOG_D(MAC, + "[eNB %d] CC_id %d Generated DLSCH header (mcs %d, TBS %d, nb_rb %d)\n", + module_idP, CC_id, mcs, TBS, nb_rb); + // msg("[MAC][eNB ] Reminder of DLSCH with random data %d %d %d %d \n", + // TBS, sdu_length_total, offset, TBS-sdu_length_total-offset); #endif if (TBS - header_length_total - sdu_length_total - ta_len <= 2) { @@ -1321,12 +1301,13 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, post_padding = 1; } - offset = generate_dlsch_header((unsigned char *) UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0], num_sdus, //num_sdus - sdu_lengths, // - sdu_lcids, 255, // no drx - ta_update, // timing advance - NULL, // contention res id - padding, post_padding); + offset = generate_dlsch_header((unsigned char *) UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0], + num_sdus, //num_sdus + sdu_lengths, // + sdu_lcids, 255, // no drx + ta_update, // timing advance + NULL, // contention res id + padding, post_padding); //#ifdef DEBUG_eNB_SCHEDULER if (ta_update != 31) { @@ -1340,19 +1321,18 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, } //#endif #ifdef DEBUG_eNB_SCHEDULER - LOG_T(MAC, "[eNB %d] First 16 bytes of DLSCH : \n"); + LOG_T(MAC, "[eNB %d] First 16 bytes of DLSCH : \n"); - for (i = 0; i < 16; i++) { - LOG_T(MAC, "%x.", dlsch_buffer[i]); - } + for (i = 0; i < 16; ++i) { + LOG_T(MAC, "%x.", dlsch_buffer[i]); + } - LOG_T(MAC, "\n"); + LOG_T(MAC, "\n"); #endif - // cycle through SDUs and place in dlsch_buffer - memcpy(&UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset], - dlsch_buffer, sdu_length_total); - // memcpy(RC.mac[0].DLSCH_pdu[0][0].payload[0][offset],dcch_buffer,sdu_lengths[0]); + // cycle through SDUs and place in dlsch_buffer + memcpy(&UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset], dlsch_buffer, sdu_length_total); + // memcpy(RC.mac[0].DLSCH_pdu[0][0].payload[0][offset],dcch_buffer,sdu_lengths[0]); // fill remainder of DLSCH with 0 for (j = 0; j < (TBS - sdu_length_total - offset); j++) { @@ -1376,14 +1356,12 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, T_INT(subframeP), T_INT(harq_pid), T_BUFFER(UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0], TBS)); - UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid] = nb_rb; + UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid] = nb_rb; - add_ue_dlsch_info(module_idP, - CC_id, UE_id, subframeP, - S_DL_SCHEDULED); - // store stats - eNB->eNB_stats[CC_id].dlsch_bytes_tx += sdu_length_total; - eNB->eNB_stats[CC_id].dlsch_pdus_tx += 1; + add_ue_dlsch_info(module_idP, CC_id, UE_id, subframeP, S_DL_SCHEDULED); + // store stats + eNB->eNB_stats[CC_id].dlsch_bytes_tx += sdu_length_total; + eNB->eNB_stats[CC_id].dlsch_pdus_tx += 1; UE_list->eNB_UE_stats[CC_id][UE_id].rbs_used = nb_rb; UE_list->eNB_UE_stats[CC_id][UE_id].num_mac_sdu_tx = num_sdus; @@ -1392,10 +1370,10 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs2 = mcs; UE_list->eNB_UE_stats[CC_id][UE_id].TBS = TBS; - UE_list->eNB_UE_stats[CC_id][UE_id].overhead_bytes = TBS - sdu_length_total; - UE_list->eNB_UE_stats[CC_id][UE_id].total_sdu_bytes += sdu_length_total; - UE_list->eNB_UE_stats[CC_id][UE_id].total_pdu_bytes += TBS; - UE_list->eNB_UE_stats[CC_id][UE_id].total_num_pdus += 1; + UE_list->eNB_UE_stats[CC_id][UE_id].overhead_bytes = TBS - sdu_length_total; + UE_list->eNB_UE_stats[CC_id][UE_id].total_sdu_bytes += sdu_length_total; + UE_list->eNB_UE_stats[CC_id][UE_id].total_pdu_bytes += TBS; + UE_list->eNB_UE_stats[CC_id][UE_id].total_num_pdus += 1; if (cc[CC_id].tdd_Config != NULL) { // TDD UE_list->UE_template[CC_id][UE_id].DAI++; @@ -1420,8 +1398,8 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, if (ue_sched_ctl->pucch1_cqi_update[CC_id] == 1) { ue_sched_ctl->pucch1_cqi_update[CC_id] = 0; - UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_frame = frameP; - UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_subframe = subframeP; + UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_frame = frameP; + UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_subframe = subframeP; if (normalized_rx_power > (target_rx_power + 4)) { tpc = 0; //-1 @@ -1444,39 +1422,40 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, tpc = 1; //0 } - dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu]; - memset((void *) dl_config_pdu, 0, - sizeof(nfapi_dl_config_request_pdu_t)); - dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE; - dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu)); - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP, CC_id), - ue_sched_ctl->dl_cqi[CC_id], - format1); - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power + dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu]; + memset((void *) dl_config_pdu, 0, sizeof(nfapi_dl_config_request_pdu_t)); + dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE; + dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu)); + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = + get_aggregation(get_bw_index(module_idP, CC_id), ue_sched_ctl->dl_cqi[CC_id], format1); + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = harq_pid; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = tpc; // dont adjust power when retransmitting - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 1 - UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 0; - //deactivate second codeword - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_2 = 0; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_2 = 1; - if (cc[CC_id].tdd_Config != NULL) { //TDD - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.downlink_assignment_index = (UE_list->UE_template[CC_id][UE_id].DAI - 1) & 3; - LOG_D(MAC, - "[eNB %d] Initial transmission CC_id %d : harq_pid %d, dai %d, mcs %d\n", - module_idP, CC_id, harq_pid, - (UE_list->UE_template[CC_id][UE_id].DAI - 1), - mcs); - } else { - LOG_D(MAC, - "[eNB %d] Initial transmission CC_id %d : harq_pid %d, mcs %d\n", - module_idP, CC_id, harq_pid, mcs); + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = harq_pid; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = tpc; // dont adjust power when retransmitting + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = + 1 - UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 0; + //deactivate second codeword + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_2 = 0; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_2 = 1; + + if (cc[CC_id].tdd_Config != NULL) { //TDD + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.downlink_assignment_index = + (UE_list->UE_template[CC_id][UE_id].DAI - 1) & 3; + LOG_D(MAC, + "[eNB %d] Initial transmission CC_id %d : harq_pid %d, dai %d, mcs %d\n", + module_idP, CC_id, harq_pid, + (UE_list->UE_template[CC_id][UE_id].DAI - 1), + mcs); + } else { + LOG_D(MAC, + "[eNB %d] Initial transmission CC_id %d : harq_pid %d, mcs %d\n", + module_idP, CC_id, harq_pid, mcs); } @@ -1491,16 +1470,14 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, dl_req->number_pdu++; dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG; - eNB->DL_req[CC_id].sfn_sf = frameP<<4 | subframeP; - eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST; + eNB->DL_req[CC_id].sfn_sf = frameP << 4 | subframeP; + eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST; - // Toggle NDI for next time - LOG_D(MAC, - "CC_id %d Frame %d, subframeP %d: Toggling Format1 NDI for UE %d (rnti %x/%d) oldNDI %d\n", - CC_id, frameP, subframeP, UE_id, rnti, - harq_pid, - UE_list-> - UE_template[CC_id][UE_id].oldNDI[harq_pid]); + // Toggle NDI for next time + LOG_D(MAC, + "CC_id %d Frame %d, subframeP %d: Toggling Format1 NDI for UE %d (rnti %x/%d) oldNDI %d\n", + CC_id, frameP, subframeP, UE_id, rnti, harq_pid, + UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]); UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid] = 1 - UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]; UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid] = mcs; @@ -1551,14 +1528,12 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, } } - if (cc[CC_id].tdd_Config != NULL) { // TDD - set_ul_DAI(module_idP, UE_id, CC_id, frameP, subframeP); + if (cc[CC_id].tdd_Config != NULL) { // TDD + set_ul_DAI(module_idP, UE_id, CC_id, frameP, subframeP); } - } // UE_id loop } // CC_id loop - fill_DLSCH_dci(module_idP, frameP, subframeP, mbsfn_flag); stop_meas(&eNB->schedule_dlsch); diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 4f8510f49c..e6bb773c86 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -101,7 +101,7 @@ store_dlsch_buffer(module_id_t Mod_id, frame_t frameP, sub_frame_t subframeP) { - int UE_id, i; + int UE_id, lcid; rnti_t rnti; mac_rlc_status_resp_t rlc_status; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; @@ -114,70 +114,64 @@ store_dlsch_buffer(module_id_t Mod_id, if (!ue_slice_membership(UE_id, slice_id)) continue; - UE_template = - &UE_list->UE_template[UE_PCCID(Mod_id, UE_id)][UE_id]; + UE_template = &UE_list->UE_template[UE_PCCID(Mod_id, UE_id)][UE_id]; // clear logical channel interface variables UE_template->dl_buffer_total = 0; UE_template->dl_pdus_total = 0; - for (i = 0; i < MAX_NUM_LCID; i++) { - UE_template->dl_buffer_info[i] = 0; - UE_template->dl_pdus_in_buffer[i] = 0; - UE_template->dl_buffer_head_sdu_creation_time[i] = 0; - UE_template->dl_buffer_head_sdu_remaining_size_to_send[i] = 0; + for (lcid = 0; lcid < MAX_NUM_LCID; ++lcid) { + UE_template->dl_buffer_info[lcid] = 0; + UE_template->dl_pdus_in_buffer[lcid] = 0; + UE_template->dl_buffer_head_sdu_creation_time[lcid] = 0; + UE_template->dl_buffer_head_sdu_remaining_size_to_send[lcid] = 0; } rnti = UE_RNTI(Mod_id, UE_id); - for (i = 0; i < MAX_NUM_LCID; i++) { // loop over all the logical channels + for (lcid = 0; lcid < MAX_NUM_LCID; ++lcid) { // loop over all the logical channels rlc_status = mac_rlc_status_ind(Mod_id, rnti, Mod_id, frameP, subframeP, - ENB_FLAG_YES, MBMS_FLAG_NO, i, 0 + ENB_FLAG_YES, MBMS_FLAG_NO, lcid, 0 #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) ,0, 0 #endif ); - UE_template->dl_buffer_info[i] = rlc_status.bytes_in_buffer; //storing the dlsch buffer for each logical channel - UE_template->dl_pdus_in_buffer[i] = rlc_status.pdus_in_buffer; - UE_template->dl_buffer_head_sdu_creation_time[i] = rlc_status.head_sdu_creation_time; + UE_template->dl_buffer_info[lcid] = rlc_status.bytes_in_buffer; //storing the dlsch buffer for each logical channel + UE_template->dl_pdus_in_buffer[lcid] = rlc_status.pdus_in_buffer; + UE_template->dl_buffer_head_sdu_creation_time[lcid] = rlc_status.head_sdu_creation_time; UE_template->dl_buffer_head_sdu_creation_time_max = cmax(UE_template->dl_buffer_head_sdu_creation_time_max, rlc_status.head_sdu_creation_time); - UE_template->dl_buffer_head_sdu_remaining_size_to_send[i] = - rlc_status.head_sdu_remaining_size_to_send; - UE_template->dl_buffer_head_sdu_is_segmented[i] = - rlc_status.head_sdu_is_segmented; - UE_template->dl_buffer_total += UE_template->dl_buffer_info[i]; //storing the total dlsch buffer - UE_template->dl_pdus_total += UE_template->dl_pdus_in_buffer[i]; + UE_template->dl_buffer_head_sdu_remaining_size_to_send[lcid] = rlc_status.head_sdu_remaining_size_to_send; + UE_template->dl_buffer_head_sdu_is_segmented[lcid] = rlc_status.head_sdu_is_segmented; + UE_template->dl_buffer_total += UE_template->dl_buffer_info[lcid]; //storing the total dlsch buffer + UE_template->dl_pdus_total += UE_template->dl_pdus_in_buffer[lcid]; #ifdef DEBUG_eNB_SCHEDULER - /* note for dl_buffer_head_sdu_remaining_size_to_send[i] : + /* note for dl_buffer_head_sdu_remaining_size_to_send[lcid] : * 0 if head SDU has not been segmented (yet), else remaining size not already segmented and sent */ - if (UE_template->dl_buffer_info[i] > 0) + if (UE_template->dl_buffer_info[lcid] > 0) LOG_D(MAC, "[eNB %d][SLICE %d] Frame %d Subframe %d : RLC status for UE %d in LCID%d: total of %d pdus and size %d, head sdu queuing time %d, remaining size %d, is segmeneted %d \n", Mod_id, slice_id, frameP, subframeP, UE_id, - i, UE_template->dl_pdus_in_buffer[i], - UE_template->dl_buffer_info[i], - UE_template->dl_buffer_head_sdu_creation_time[i], - UE_template->dl_buffer_head_sdu_remaining_size_to_send[i], - UE_template->dl_buffer_head_sdu_is_segmented[i]); + lcid, UE_template->dl_pdus_in_buffer[lcid], + UE_template->dl_buffer_info[lcid], + UE_template->dl_buffer_head_sdu_creation_time[lcid], + UE_template->dl_buffer_head_sdu_remaining_size_to_send[lcid], + UE_template->dl_buffer_head_sdu_is_segmented[lcid]); #endif } - //#ifdef DEBUG_eNB_SCHEDULER if (UE_template->dl_buffer_total > 0) LOG_D(MAC, "[eNB %d] Frame %d Subframe %d : RLC status for UE %d : total DL buffer size %d and total number of pdu %d \n", Mod_id, frameP, subframeP, UE_id, UE_template->dl_buffer_total, UE_template->dl_pdus_total); - - //#endif } } From 56405aeef08bd2734888ff0d8980bac634c9f583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Iardella?= Date: Fri, 9 Mar 2018 16:15:04 +0100 Subject: [PATCH 083/379] Implement interslice_multiplexing, add new constants --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 822 +++++++++++++--------- openair2/LAYER2/MAC/eNB_scheduler_dlsch.h | 4 + openair2/LAYER2/MAC/mac.h | 10 + openair2/LAYER2/MAC/mac_proto.h | 12 +- openair2/LAYER2/MAC/pre_processor.c | 24 +- openair2/RRC/LTE/rrc_extern.h | 2 +- openair2/RRC/LTE/rrc_vars.h | 2 +- 7 files changed, 527 insertions(+), 349 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index db9ec66ef7..44083a4610 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -68,18 +68,20 @@ extern RAN_CONTEXT_t RC; extern uint8_t nfapi_mode; +extern pre_processor_results_t pre_processor_results[MAX_NUM_SLICES]; +extern int slice_isolation[MAX_NUM_SLICES]; //------------------------------------------------------------------------------ void add_ue_dlsch_info(module_id_t module_idP, - int CC_id, - int UE_id, sub_frame_t subframeP, UE_DLSCH_STATUS status) + int CC_id, + int UE_id, sub_frame_t subframeP, UE_DLSCH_STATUS status) //------------------------------------------------------------------------------ { //LOG_D(MAC, "%s(module_idP:%d, CC_id:%d, UE_id:%d, subframeP:%d, status:%d) serving_num:%d rnti:%x\n", __FUNCTION__, module_idP, CC_id, UE_id, subframeP, status, eNB_dlsch_info[module_idP][CC_id][UE_id].serving_num, UE_RNTI(module_idP,UE_id)); eNB_dlsch_info[module_idP][CC_id][UE_id].rnti = - UE_RNTI(module_idP, UE_id); + UE_RNTI(module_idP, UE_id); // eNB_dlsch_info[module_idP][CC_id][ue_mod_idP].weight = weight; eNB_dlsch_info[module_idP][CC_id][UE_id].subframe = subframeP; eNB_dlsch_info[module_idP][CC_id][UE_id].status = status; @@ -91,7 +93,7 @@ add_ue_dlsch_info(module_id_t module_idP, //------------------------------------------------------------------------------ int schedule_next_dlue(module_id_t module_idP, int CC_id, - sub_frame_t subframeP) + sub_frame_t subframeP) //------------------------------------------------------------------------------ { @@ -101,7 +103,7 @@ schedule_next_dlue(module_id_t module_idP, int CC_id, for (next_ue = UE_list->head; next_ue >= 0; next_ue = UE_list->next[next_ue]) { if (eNB_dlsch_info[module_idP][CC_id][next_ue].status == - S_DL_WAITING) { + S_DL_WAITING) { return next_ue; } } @@ -113,21 +115,21 @@ schedule_next_dlue(module_id_t module_idP, int CC_id, } } - return (-1); //next_ue; + return (-1); //next_ue; } //------------------------------------------------------------------------------ int generate_dlsch_header(unsigned char *mac_header, - unsigned char num_sdus, - unsigned short *sdu_lengths, - unsigned char *sdu_lcids, - unsigned char drx_cmd, - unsigned short timing_advance_cmd, - unsigned char *ue_cont_res_id, - unsigned char short_padding, - unsigned short post_padding) + unsigned char num_sdus, + unsigned short *sdu_lengths, + unsigned char *sdu_lcids, + unsigned char drx_cmd, + unsigned short timing_advance_cmd, + unsigned char *ue_cont_res_id, + unsigned char short_padding, + unsigned short post_padding) //------------------------------------------------------------------------------ { @@ -185,10 +187,10 @@ generate_dlsch_header(unsigned char *mac_header, // msg("last_size %d,mac_header_ptr %p\n",last_size,mac_header_ptr); ((TIMING_ADVANCE_CMD *) ce_ptr)->R = 0; AssertFatal(timing_advance_cmd < 64, - "timing_advance_cmd %d > 63\n", timing_advance_cmd); - ((TIMING_ADVANCE_CMD *) ce_ptr)->TA = timing_advance_cmd; //(timing_advance_cmd+31)&0x3f; + "timing_advance_cmd %d > 63\n", timing_advance_cmd); + ((TIMING_ADVANCE_CMD *) ce_ptr)->TA = timing_advance_cmd; //(timing_advance_cmd+31)&0x3f; LOG_D(MAC, "timing advance =%d (%d)\n", timing_advance_cmd, - ((TIMING_ADVANCE_CMD *) ce_ptr)->TA); + ((TIMING_ADVANCE_CMD *) ce_ptr)->TA); ce_ptr += sizeof(TIMING_ADVANCE_CMD); //msg("offset %d\n",ce_ptr-mac_header_control_elements); } @@ -213,9 +215,9 @@ generate_dlsch_header(unsigned char *mac_header, last_size = 1; LOG_T(MAC, - "[eNB ][RAPROC] Generate contention resolution msg: %x.%x.%x.%x.%x.%x\n", - ue_cont_res_id[0], ue_cont_res_id[1], ue_cont_res_id[2], - ue_cont_res_id[3], ue_cont_res_id[4], ue_cont_res_id[5]); + "[eNB ][RAPROC] Generate contention resolution msg: %x.%x.%x.%x.%x.%x\n", + ue_cont_res_id[0], ue_cont_res_id[1], ue_cont_res_id[2], + ue_cont_res_id[3], ue_cont_res_id[4], ue_cont_res_id[5]); memcpy(ce_ptr, ue_cont_res_id, 6); ce_ptr += 6; @@ -225,7 +227,7 @@ generate_dlsch_header(unsigned char *mac_header, for (i = 0; i < num_sdus; i++) { LOG_T(MAC, "[eNB] Generate DLSCH header num sdu %d len sdu %d\n", - num_sdus, sdu_lengths[i]); + num_sdus, sdu_lengths[i]); if (first_element > 0) { mac_header_ptr->E = 1; @@ -258,10 +260,10 @@ generate_dlsch_header(unsigned char *mac_header, last_size = 3; #ifdef DEBUG_HEADER_PARSING LOG_D(MAC, - "[eNB] generate long sdu, size %x (MSB %x, LSB %x)\n", - sdu_lengths[i], - ((SCH_SUBHEADER_LONG *) mac_header_ptr)->L_MSB, - ((SCH_SUBHEADER_LONG *) mac_header_ptr)->L_LSB); + "[eNB] generate long sdu, size %x (MSB %x, LSB %x)\n", + sdu_lengths[i], + ((SCH_SUBHEADER_LONG *) mac_header_ptr)->L_MSB, + ((SCH_SUBHEADER_LONG *) mac_header_ptr)->L_LSB); #endif } } @@ -283,7 +285,7 @@ generate_dlsch_header(unsigned char *mac_header, printf("F = 1, sdu len (L field) %d\n",(((SCH_SUBHEADER_LONG*)mac_header_ptr)->L)); } */ - if (post_padding > 0) { // we have lots of padding at the end of the packet + if (post_padding > 0) { // we have lots of padding at the end of the packet mac_header_ptr->E = 1; mac_header_ptr += last_size; // add a padding element @@ -291,7 +293,7 @@ generate_dlsch_header(unsigned char *mac_header, mac_header_ptr->E = 0; mac_header_ptr->LCID = SHORT_PADDING; mac_header_ptr++; - } else { // no end of packet padding + } else { // no end of packet padding // last SDU subhead is of fixed type (sdu length implicitly to be computed at UE) mac_header_ptr++; } @@ -301,9 +303,9 @@ generate_dlsch_header(unsigned char *mac_header, if ((ce_ptr - mac_header_control_elements) > 0) { // printf("Copying %d bytes for control elements\n",ce_ptr-mac_header_control_elements); memcpy((void *) mac_header_ptr, mac_header_control_elements, - ce_ptr - mac_header_control_elements); + ce_ptr - mac_header_control_elements); mac_header_ptr += - (unsigned char) (ce_ptr - mac_header_control_elements); + (unsigned char) (ce_ptr - mac_header_control_elements); } //msg("After CEs %d\n",(uint8_t*)mac_header_ptr - mac_header); @@ -313,7 +315,7 @@ generate_dlsch_header(unsigned char *mac_header, //------------------------------------------------------------------------------ void set_ul_DAI(int module_idP, int UE_idP, int CC_idP, int frameP, - int subframeP) + int subframeP) //------------------------------------------------------------------------------ { @@ -321,132 +323,131 @@ set_ul_DAI(int module_idP, int UE_idP, int CC_idP, int frameP, UE_list_t *UE_list = &eNB->UE_list; unsigned char DAI; COMMON_channels_t *cc = &eNB->common_channels[CC_idP]; - if (cc->tdd_Config != NULL) { //TDD + if (cc->tdd_Config != NULL) { //TDD DAI = (UE_list->UE_template[CC_idP][UE_idP].DAI - 1) & 3; LOG_D(MAC, - "[eNB %d] CC_id %d Frame %d, subframe %d: DAI %d for UE %d\n", - module_idP, CC_idP, frameP, subframeP, DAI, UE_idP); + "[eNB %d] CC_id %d Frame %d, subframe %d: DAI %d for UE %d\n", + module_idP, CC_idP, frameP, subframeP, DAI, UE_idP); // Save DAI for Format 0 DCI switch (cc->tdd_Config->subframeAssignment) { - case 0: - // if ((subframeP==0)||(subframeP==1)||(subframeP==5)||(subframeP==6)) - break; - - case 1: - switch (subframeP) { case 0: + // if ((subframeP==0)||(subframeP==1)||(subframeP==5)||(subframeP==6)) + break; + case 1: - UE_list->UE_template[CC_idP][UE_idP].DAI_ul[7] = DAI; - break; + switch (subframeP) { + case 0: + case 1: + UE_list->UE_template[CC_idP][UE_idP].DAI_ul[7] = DAI; + break; + + case 4: + UE_list->UE_template[CC_idP][UE_idP].DAI_ul[8] = DAI; + break; + + case 5: + case 6: + UE_list->UE_template[CC_idP][UE_idP].DAI_ul[2] = DAI; + break; + + case 9: + UE_list->UE_template[CC_idP][UE_idP].DAI_ul[3] = DAI; + break; + } + + case 2: + // if ((subframeP==3)||(subframeP==8)) + // UE_list->UE_template[CC_idP][UE_idP].DAI_ul = DAI; + break; + + case 3: + + //if ((subframeP==6)||(subframeP==8)||(subframeP==0)) { + // LOG_D(MAC,"schedule_ue_spec: setting UL DAI to %d for subframeP %d => %d\n",DAI,subframeP, ((subframeP+8)%10)>>1); + // UE_list->UE_template[CC_idP][UE_idP].DAI_ul[((subframeP+8)%10)>>1] = DAI; + //} + switch (subframeP) { + case 5: + case 6: + case 1: + UE_list->UE_template[CC_idP][UE_idP].DAI_ul[2] = DAI; + break; + + case 7: + case 8: + UE_list->UE_template[CC_idP][UE_idP].DAI_ul[3] = DAI; + break; + + case 9: + case 0: + UE_list->UE_template[CC_idP][UE_idP].DAI_ul[4] = DAI; + break; + + default: + break; + } + + break; case 4: - UE_list->UE_template[CC_idP][UE_idP].DAI_ul[8] = DAI; + // if ((subframeP==8)||(subframeP==9)) + // UE_list->UE_template[CC_idP][UE_idP].DAI_ul = DAI; break; case 5: - case 6: - UE_list->UE_template[CC_idP][UE_idP].DAI_ul[2] = DAI; + // if (subframeP==8) + // UE_list->UE_template[CC_idP][UE_idP].DAI_ul = DAI; break; - case 9: - UE_list->UE_template[CC_idP][UE_idP].DAI_ul[3] = DAI; - break; - } - break; - - case 2: - // if ((subframeP==3)||(subframeP==8)) - // UE_list->UE_template[CC_idP][UE_idP].DAI_ul = DAI; - break; - - case 3: - - //if ((subframeP==6)||(subframeP==8)||(subframeP==0)) { - // LOG_D(MAC,"schedule_ue_spec: setting UL DAI to %d for subframeP %d => %d\n",DAI,subframeP, ((subframeP+8)%10)>>1); - // UE_list->UE_template[CC_idP][UE_idP].DAI_ul[((subframeP+8)%10)>>1] = DAI; - //} - switch (subframeP) { - case 5: case 6: - case 1: - UE_list->UE_template[CC_idP][UE_idP].DAI_ul[2] = DAI; - break; - - case 7: - case 8: - UE_list->UE_template[CC_idP][UE_idP].DAI_ul[3] = DAI; - break; - - case 9: - case 0: - UE_list->UE_template[CC_idP][UE_idP].DAI_ul[4] = DAI; - break; + // if ((subframeP==1)||(subframeP==4)||(subframeP==6)||(subframeP==9)) + // UE_list->UE_template[CC_idP][UE_idP].DAI_ul = DAI; + break; default: - break; - } - - break; - - case 4: - // if ((subframeP==8)||(subframeP==9)) - // UE_list->UE_template[CC_idP][UE_idP].DAI_ul = DAI; - break; - - case 5: - // if (subframeP==8) - // UE_list->UE_template[CC_idP][UE_idP].DAI_ul = DAI; - break; - - case 6: - // if ((subframeP==1)||(subframeP==4)||(subframeP==6)||(subframeP==9)) - // UE_list->UE_template[CC_idP][UE_idP].DAI_ul = DAI; - break; - - default: - break; + break; } } } //------------------------------------------------------------------------------ void -schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, int *mbsfn_flag) -{ +schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, int *mbsfn_flag) { int i = 0; - slice_percentage_total=0; - slice_percentage_avg=1.0/n_active_slices; + slice_percentage_total = 0; + slice_percentage_avg = 1.0 / n_active_slices; + slice_counter = n_active_slices; // reset the slice percentage for inactive slices - for (i = n_active_slices; i< MAX_NUM_SLICES; i++) { - slice_percentage[i]=0; + for (i = n_active_slices; i < MAX_NUM_SLICES; i++) { + slice_percentage[i] = 0; } for (i = 0; i < n_active_slices; i++) { - if (slice_percentage[i] < 0 ){ + if (slice_percentage[i] < 0) { LOG_W(MAC, "[eNB %d] frame %d subframe %d:invalid slice %d percentage %f. resetting to zero", module_idP, frameP, subframeP, i, slice_percentage[i]); - slice_percentage[i]=0; + slice_percentage[i] = 0; } - slice_percentage_total+=slice_percentage[i]; + slice_percentage_total += slice_percentage[i]; } for (i = 0; i < n_active_slices; i++) { // Load any updated functions - if (update_dl_scheduler[i] > 0 ) { + if (update_dl_scheduler[i] > 0) { slice_sched_dl[i] = dlsym(NULL, dl_scheduler_type[i]); - update_dl_scheduler[i] = 0 ; + update_dl_scheduler[i] = 0; update_dl_scheduler_current[i] = 0; - LOG_I(MAC,"update dl scheduler slice %d\n", i); + LOG_I(MAC, "update dl scheduler slice %d\n", i); } - if (slice_percentage_total <= 1.0){ // the new total RB share is within the range + if (slice_percentage_total <= 1.0) { // the new total RB share is within the range // check if the number of slices has changed, and log - if (n_active_slices_current != n_active_slices ){ + if (n_active_slices_current != n_active_slices) { if ((n_active_slices > 0) && (n_active_slices <= MAX_NUM_SLICES)) { LOG_I(MAC, "[eNB %d]frame %d subframe %d: number of active DL slices has changed: %d-->%d\n", module_idP, frameP, subframeP, n_active_slices_current, n_active_slices); @@ -483,56 +484,58 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in // check if a new scheduler, and log the console if (update_dl_scheduler_current[i] != update_dl_scheduler[i]){ - LOG_I(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: DL scheduler for this slice is updated: %s \n", - module_idP, i, frameP, subframeP, dl_scheduler_type[i]); - update_dl_scheduler_current[i] = update_dl_scheduler[i]; + LOG_N(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: DL scheduler for this slice is updated: %s \n", + module_idP, i, frameP, subframeP, dl_scheduler_type[i]); + update_dl_scheduler_current[i] = update_dl_scheduler[i]; } } else { // here we can correct the values, e.g. reduce proportionally - if (n_active_slices == n_active_slices_current){ - LOG_W(MAC,"[eNB %d][SLICE %d][DL] invalid total RB share (%f->%f), reduce proportionally the RB share by 0.1\n", - module_idP, i, slice_percentage_total_current, slice_percentage_total); - if (slice_percentage[i] >= slice_percentage_avg){ - slice_percentage[i]-=0.1; - slice_percentage_total-=0.1; - } + if (n_active_slices == n_active_slices_current) { + LOG_W(MAC, + "[eNB %d][SLICE %d][DL] invalid total RB share (%f->%f), reduce proportionally the RB share by 0.1\n", + module_idP, i, slice_percentage_total_current, slice_percentage_total); + if (slice_percentage[i] >= slice_percentage_avg) { + slice_percentage[i] -= 0.1; + slice_percentage_total -= 0.1; + } } else { - LOG_W(MAC,"[eNB %d][SLICE %d][DL] invalid total RB share (%f->%f), revert the number of slice to its previous value (%d->%d)\n", - module_idP, i, slice_percentage_total_current, slice_percentage_total, - n_active_slices, n_active_slices_current ); - n_active_slices = n_active_slices_current; - slice_percentage[i] = slice_percentage_current[i]; + LOG_W(MAC, + "[eNB %d][SLICE %d][DL] invalid total RB share (%f->%f), revert the number of slice to its previous value (%d->%d)\n", + module_idP, i, slice_percentage_total_current, slice_percentage_total, + n_active_slices, n_active_slices_current); + n_active_slices = n_active_slices_current; + slice_percentage[i] = slice_percentage_current[i]; } } // Check for new slice positions - if (slice_position[i*2] > slice_position[i*2 + 1] || - slice_position[i*2] < 0 || - slice_position[i*2 + 1] > N_RBG_MAX) { + if (slice_position[i * 2] > slice_position[i * 2 + 1] || + slice_position[i * 2] < 0 || + slice_position[i * 2 + 1] > N_RBG_MAX) { LOG_W(MAC, "[eNB %d][SLICE %d][DL] invalid slicing position (%d-%d), using previous values (%d-%d)\n", module_idP, i, - slice_position[i*2], slice_position[i*2 + 1], - slice_position_current[i*2], slice_position_current[i*2 + 1]); - slice_position[i*2] = slice_position_current[i*2]; - slice_position[i*2 + 1] = slice_position_current[i*2 + 1]; + slice_position[i * 2], slice_position[i * 2 + 1], + slice_position_current[i * 2], slice_position_current[i * 2 + 1]); + slice_position[i * 2] = slice_position_current[i * 2]; + slice_position[i * 2 + 1] = slice_position_current[i * 2 + 1]; } else { - if (slice_position_current[i*2] != slice_position[i*2]) { - LOG_N(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: start frequency has changed (%d-->%d)\n", - module_idP, i, frameP, subframeP, slice_position_current[i*2], slice_position[i*2]); - slice_position_current[i*2] = slice_position[i*2]; + if (slice_position_current[i * 2] != slice_position[i * 2]) { + LOG_N(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: start frequency has changed (%d-->%d)\n", + module_idP, i, frameP, subframeP, slice_position_current[i * 2], slice_position[i * 2]); + slice_position_current[i * 2] = slice_position[i * 2]; } - if (slice_position_current[i*2 + 1] != slice_position[i*2 + 1]) { - LOG_N(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: end frequency has changed (%d-->%d)\n", - module_idP, i, frameP, subframeP, slice_position_current[i*2 + 1], slice_position[i*2 + 1]); - slice_position_current[i*2 + 1] = slice_position[i*2 + 1]; + if (slice_position_current[i * 2 + 1] != slice_position[i * 2 + 1]) { + LOG_N(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: end frequency has changed (%d-->%d)\n", + module_idP, i, frameP, subframeP, slice_position_current[i * 2 + 1], slice_position[i * 2 + 1]); + slice_position_current[i * 2 + 1] = slice_position[i * 2 + 1]; } } // Check for new sorting policy if (slice_sorting_policy_current[i] != slice_sorting_policy[i]) { - LOG_I(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n", + LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n", module_idP, i, frameP, subframeP, slice_sorting_policy_current[i], slice_sorting_policy[i]); slice_sorting_policy_current[i] = slice_sorting_policy[i]; } @@ -540,11 +543,12 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in // Check for new accounting policy if (slice_accounting_policy_current[i] != slice_accounting_policy[i]) { if (slice_accounting_policy[i] > 1 || slice_accounting_policy[i] < 0) { - LOG_W(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: invalid accounting policy (%d), revert to its previous value (%d)\n", + LOG_W(MAC, + "[eNB %d][SLICE %d][DL] frame %d subframe %d: invalid accounting policy (%d), revert to its previous value (%d)\n", module_idP, i, frameP, subframeP, slice_accounting_policy[i], slice_accounting_policy_current[i]); slice_accounting_policy[i] = slice_accounting_policy_current[i]; } else { - LOG_N(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n", + LOG_N(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n", module_idP, i, frameP, subframeP, slice_accounting_policy_current[i], slice_accounting_policy[i]); slice_accounting_policy_current[i] = slice_accounting_policy[i]; } @@ -589,10 +593,10 @@ schedule_ue_spec(module_id_t module_idP, slice_id_t slice_idP, UE_sched_ctrl *ue_sched_ctl; int mcs; int i; - int min_rb_unit[MAX_NUM_CCs]; - int N_RB_DL[MAX_NUM_CCs]; - int total_nb_available_rb[MAX_NUM_CCs]; - int N_RBG[MAX_NUM_CCs]; + int min_rb_unit[NFAPI_CC_MAX]; + int N_RB_DL[NFAPI_CC_MAX]; + int total_nb_available_rb[NFAPI_CC_MAX]; + int N_RBG[NFAPI_CC_MAX]; nfapi_dl_config_request_body_t *dl_req; nfapi_dl_config_request_pdu_t *dl_config_pdu; int tdd_sfa; @@ -645,7 +649,7 @@ schedule_ue_spec(module_id_t module_idP, slice_id_t slice_idP, } //weight = get_ue_weight(module_idP,UE_id); aggregation = 2; - for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { + for (CC_id = 0; CC_id < NFAPI_CC_MAX; CC_id++) { N_RB_DL[CC_id] = to_prb(cc[CC_id].mib->message.dl_Bandwidth); min_rb_unit[CC_id] = get_min_rb_unit(module_idP, CC_id); // get number of PRBs less those used by common channels @@ -678,7 +682,17 @@ schedule_ue_spec(module_id_t module_idP, slice_id_t slice_idP, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR, VCD_FUNCTION_OUT); - for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { + slice_counter--; + // Do the multiplexing and actual allocation only when all slices have been pre-processed. + if (slice_counter > 0) { + stop_meas(&eNB->schedule_dlsch); + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, VCD_FUNCTION_OUT); + return; + } + + dlsch_scheduler_interslice_multiplexing(module_idP, frameP, subframeP); + + for (CC_id = 0; CC_id < NFAPI_CC_MAX; CC_id++) { LOG_D(MAC, "doing schedule_ue_spec for CC_id %d\n", CC_id); dl_req = &eNB->DL_req[CC_id].dl_config_request_body; @@ -776,7 +790,8 @@ schedule_ue_spec(module_id_t module_idP, slice_id_t slice_idP, if (nfapi_mode) { eNB_UE_stats->dlsch_mcs1 = 10; // cqi_to_mcs[ue_sched_ctl->dl_cqi[CC_id]]; } else { // this operation is also done in the preprocessor - eNB_UE_stats->dlsch_mcs1 = cmin(eNB_UE_stats->dlsch_mcs1, slice_maxmcs[slice_idP]); // cmin(eNB_UE_stats->dlsch_mcs1, openair_daq_vars.target_ue_dl_mcs); + eNB_UE_stats->dlsch_mcs1 = cmin(eNB_UE_stats->dlsch_mcs1, + slice_maxmcs[slice_idP]); // cmin(eNB_UE_stats->dlsch_mcs1, openair_daq_vars.target_ue_dl_mcs); } // Store stats @@ -1540,10 +1555,154 @@ schedule_ue_spec(module_id_t module_idP, slice_id_t slice_idP, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, VCD_FUNCTION_OUT); } +//------------------------------------------------------------------------------ +void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub_frame_t subframeP) +//------------------------------------------------------------------------------ +{ + // FIXME: I'm prototyping the algorithm, so there may be arrays and variables that carry redundant information here and in pre_processor_results struct. + + int UE_id, CC_id, rbg, i; + int N_RB_DL, min_rb_unit, tm; + int owned, used; + + UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; + UE_sched_ctrl *ue_sched_ctl; + COMMON_channels_t *cc; + int N_RBG[NFAPI_CC_MAX]; + + int8_t free_rbgs_map[NFAPI_CC_MAX][N_RBG_MAX]; + int has_traffic[NFAPI_CC_MAX][MAX_NUM_SLICES]; + uint8_t allocation_mask[NFAPI_CC_MAX][N_RBG_MAX]; + + uint16_t (*nb_rbs_remaining)[MAX_MOBILES_PER_ENB]; + uint16_t (*nb_rbs_required)[MAX_MOBILES_PER_ENB]; + uint8_t (*rballoc_sub)[N_RBG_MAX]; + uint8_t (*MIMO_mode_indicator)[N_RBG_MAX]; + + // Initialize the free RBGs map + // free_rbgs_map[CC_id][rbg] = -1 if RBG is allocated, + // otherwise it contains the id of the slice it belongs to. + // (Information about slicing must be retained to deal with isolation). + // FIXME: This method does not consider RBGs that are free and belong to no slices + for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { + cc = &RC.mac[Mod_id]->common_channels[CC_id]; + N_RBG[CC_id] = to_rbg(cc->mib->message.dl_Bandwidth); + for (rbg = 0; rbg < N_RBG[CC_id]; ++rbg) { + for (i = 0; i < n_active_slices; ++i) { + owned = pre_processor_results[i].slice_allocation_mask[CC_id][rbg]; + if (owned) { + used = pre_processor_results[i].slice_allocated_rbgs[CC_id][rbg]; + free_rbgs_map[CC_id][rbg] = used ? -1 : i; + break; + } + } + } + } + + // Find out which slices need other resources. + // FIXME: I don't think is really needed since we check nb_rbs_remaining later + for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { + for (i = 0; i < n_active_slices; ++i) { + has_traffic[CC_id][i] = 0; + for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; ++UE_id) { + if (pre_processor_results[i].nb_rbs_remaining[CC_id][UE_id] > 0) { + has_traffic[CC_id][i] = 1; + break; + } + } + } + } + + // TODO: Sort slices by priority and use the sorted list in the code below (For now we assume 0 = max_priority) + + // MULTIPLEXING + // This part is an adaptation of dlsch_scheduler_pre_processor_allocate() code + for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { + + N_RB_DL = to_prb(RC.mac[Mod_id]->common_channels[CC_id].mib->message.dl_Bandwidth); + min_rb_unit = get_min_rb_unit(Mod_id, CC_id); + + for (i = 0; i < n_active_slices; ++i) { + + if (has_traffic[CC_id][i] == 0) continue; + + // Build an ad-hoc allocation mask fo the slice + for (rbg = 0; rbg < N_RBG[CC_id]; ++rbg) { + if (free_rbgs_map[CC_id][rbg] == -1) { + // RBG is already allocated + allocation_mask[CC_id][rbg] = 0; + continue; + } + if (slice_isolation[free_rbgs_map[CC_id][rbg]] == 1) { + // RBG belongs to an isolated slice + allocation_mask[CC_id][rbg] = 0; + continue; + } + // RBG is free + allocation_mask[CC_id][rbg] = 1; + } + + // Sort UE again + // (UE list gets sorted every time pre_processor is called so it is probably dirty at this point) + sort_UEs(Mod_id, (slice_id_t) i, frameP, subframeP); + + nb_rbs_remaining = pre_processor_results[i].nb_rbs_remaining; + nb_rbs_required = pre_processor_results[i].nb_rbs_required; + rballoc_sub = pre_processor_results[i].slice_allocated_rbgs; + MIMO_mode_indicator = pre_processor_results[i].MIMO_mode_indicator; + + // Allocation + for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { + ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; + tm = get_tmode(Mod_id, CC_id, UE_id); + + for (rbg = 0; rbg < N_RBG[CC_id]; ++rbg) { + + // FIXME: I think that some of these checks are redundant + if (allocation_mask[CC_id][rbg] == 0) continue; + if (rballoc_sub[CC_id][rbg] != 0) continue; + if (ue_sched_ctl->rballoc_sub_UE[CC_id][rbg] != 0) continue; + if (nb_rbs_remaining[CC_id][UE_id] <= 0) continue; + if (ue_sched_ctl->pre_nb_available_rbs[CC_id] >= nb_rbs_required[CC_id][UE_id]) continue; + if (ue_sched_ctl->dl_pow_off[CC_id] == 0) continue; + + if ((rbg == N_RBG[CC_id] - 1) && ((N_RB_DL == 25) || (N_RB_DL == 50))) { + // Allocating last, smaller RBG + if (nb_rbs_remaining[CC_id][UE_id] >= min_rb_unit - 1) { + rballoc_sub[CC_id][rbg] = 1; + free_rbgs_map[CC_id][rbg] = -1; + ue_sched_ctl->rballoc_sub_UE[CC_id][rbg] = 1; + MIMO_mode_indicator[CC_id][rbg] = 1; + if (tm == 5) { + ue_sched_ctl->dl_pow_off[CC_id] = 1; + } + nb_rbs_remaining[CC_id][UE_id] = nb_rbs_remaining[CC_id][UE_id] - min_rb_unit + 1; + ue_sched_ctl->pre_nb_available_rbs[CC_id] = ue_sched_ctl->pre_nb_available_rbs[CC_id] + min_rb_unit - 1; + } + } else { + // Allocating a standard-sized RBG + if (nb_rbs_remaining[CC_id][UE_id] >= min_rb_unit) { + rballoc_sub[CC_id][rbg] = 1; + free_rbgs_map[CC_id][rbg] = -1; + ue_sched_ctl->rballoc_sub_UE[CC_id][rbg] = 1; + MIMO_mode_indicator[CC_id][rbg] = 1; + if (tm == 5) { + ue_sched_ctl->dl_pow_off[CC_id] = 1; + } + nb_rbs_remaining[CC_id][UE_id] = nb_rbs_remaining[CC_id][UE_id] - min_rb_unit; + ue_sched_ctl->pre_nb_available_rbs[CC_id] = ue_sched_ctl->pre_nb_available_rbs[CC_id] + min_rb_unit; + } + } + } + } + } + } +} + //------------------------------------------------------------------------------ void fill_DLSCH_dci(module_id_t module_idP, - frame_t frameP, sub_frame_t subframeP, int *mbsfn_flagP) + frame_t frameP, sub_frame_t subframeP, int *mbsfn_flagP) //------------------------------------------------------------------------------ { @@ -1567,9 +1726,9 @@ fill_DLSCH_dci(module_id_t module_idP, start_meas(&eNB->fill_DLSCH_dci); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME - (VCD_SIGNAL_DUMPER_FUNCTIONS_FILL_DLSCH_DCI, VCD_FUNCTION_IN); + (VCD_SIGNAL_DUMPER_FUNCTIONS_FILL_DLSCH_DCI, VCD_FUNCTION_IN); - for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { + for (CC_id = 0; CC_id < NFAPI_CC_MAX; CC_id++) { LOG_D(MAC, "Doing fill DCI for CC_id %d\n", CC_id); if (mbsfn_flagP[CC_id] > 0) @@ -1581,42 +1740,43 @@ fill_DLSCH_dci(module_id_t module_idP, // UE specific DCIs for (UE_id = UE_list->head; UE_id >= 0; - UE_id = UE_list->next[UE_id]) { + UE_id = UE_list->next[UE_id]) { LOG_T(MAC, "CC_id %d, UE_id: %d => status %d\n", CC_id, UE_id, - eNB_dlsch_info[module_idP][CC_id][UE_id].status); + eNB_dlsch_info[module_idP][CC_id][UE_id].status); if (eNB_dlsch_info[module_idP][CC_id][UE_id].status == S_DL_SCHEDULED) { - // clear scheduling flag - eNB_dlsch_info[module_idP][CC_id][UE_id].status = S_DL_WAITING; - rnti = UE_RNTI(module_idP, UE_id); + // clear scheduling flag + eNB_dlsch_info[module_idP][CC_id][UE_id].status = S_DL_WAITING; + rnti = UE_RNTI(module_idP, UE_id); harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP ,subframeP); - nb_rb = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid]; + nb_rb = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid]; - /// Synchronizing rballoc with rballoc_sub - for (i = 0; i < N_RBG; i++) { - rballoc_sub[i] = UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][i]; - } + /// Synchronizing rballoc with rballoc_sub + for (i = 0; i < N_RBG; i++) { + rballoc_sub[i] = UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][i]; + } - nfapi_dl_config_request_t *DL_req = &RC.mac[module_idP]->DL_req[0]; - nfapi_dl_config_request_pdu_t *dl_config_pdu; + nfapi_dl_config_request_t *DL_req = &RC.mac[module_idP]->DL_req[0]; + nfapi_dl_config_request_pdu_t *dl_config_pdu; - for (i = 0; - i < DL_req[CC_id].dl_config_request_body.number_pdu; - i++) { - dl_config_pdu = &DL_req[CC_id].dl_config_request_body.dl_config_pdu_list[i]; - if ((dl_config_pdu->pdu_type == NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE) - && (dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti == rnti) - && (dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format != 1)) { - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = allocate_prbs_sub(nb_rb, N_RB_DL, N_RBG,rballoc_sub); - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_allocation_type = 0; - } else - if ((dl_config_pdu->pdu_type == NFAPI_DL_CONFIG_DLSCH_PDU_TYPE) - && (dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti == rnti) - && (dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type == 0)) { - dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding =allocate_prbs_sub(nb_rb, N_RB_DL, N_RBG,rballoc_sub); - } - } + for (i = 0; + i < DL_req[CC_id].dl_config_request_body.number_pdu; + i++) { + dl_config_pdu = &DL_req[CC_id].dl_config_request_body.dl_config_pdu_list[i]; + if ((dl_config_pdu->pdu_type == NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE) + && (dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti == rnti) + && (dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format != 1)) { + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = allocate_prbs_sub(nb_rb, N_RB_DL, N_RBG, + rballoc_sub); + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_allocation_type = 0; + } else if ((dl_config_pdu->pdu_type == NFAPI_DL_CONFIG_DLSCH_PDU_TYPE) + && (dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti == rnti) + && (dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type == 0)) { + dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = allocate_prbs_sub(nb_rb, N_RB_DL, N_RBG, + rballoc_sub); + } + } } } @@ -1628,8 +1788,8 @@ fill_DLSCH_dci(module_id_t module_idP, //------------------------------------------------------------------------------ unsigned char *get_dlsch_sdu(module_id_t module_idP, - int CC_id, frame_t frameP, rnti_t rntiP, - uint8_t TBindex) + int CC_id, frame_t frameP, rnti_t rntiP, + uint8_t TBindex) //------------------------------------------------------------------------------ { @@ -1638,28 +1798,28 @@ unsigned char *get_dlsch_sdu(module_id_t module_idP, if (rntiP == SI_RNTI) { LOG_D(MAC, "[eNB %d] CC_id %d Frame %d Get DLSCH sdu for BCCH \n", - module_idP, CC_id, frameP); + module_idP, CC_id, frameP); return ((unsigned char *) &eNB->common_channels[CC_id].BCCH_pdu.payload[0]); } - if (rntiP==P_RNTI) { - LOG_D(MAC,"[eNB %d] CC_id %d Frame %d Get PCH sdu for PCCH \n", module_idP, CC_id, frameP); + if (rntiP == P_RNTI) { + LOG_D(MAC, "[eNB %d] CC_id %d Frame %d Get PCH sdu for PCCH \n", module_idP, CC_id, frameP); - return((unsigned char *)&eNB->common_channels[CC_id].PCCH_pdu.payload[0]); + return ((unsigned char *) &eNB->common_channels[CC_id].PCCH_pdu.payload[0]); } - UE_id = find_UE_id(module_idP,rntiP); + UE_id = find_UE_id(module_idP, rntiP); if (UE_id != -1) { LOG_D(MAC, - "[eNB %d] Frame %d: CC_id %d Get DLSCH sdu for rnti %x => UE_id %d\n", - module_idP, frameP, CC_id, rntiP, UE_id); + "[eNB %d] Frame %d: CC_id %d Get DLSCH sdu for rnti %x => UE_id %d\n", + module_idP, frameP, CC_id, rntiP, UE_id); return ((unsigned char *) &eNB->UE_list.DLSCH_pdu[CC_id][TBindex][UE_id].payload[0]); } else { LOG_E(MAC, - "[eNB %d] Frame %d: CC_id %d UE with RNTI %x does not exist\n", - module_idP, frameP, CC_id, rntiP); + "[eNB %d] Frame %d: CC_id %d UE with RNTI %x does not exist\n", + module_idP, frameP, CC_id, rntiP); return NULL; } @@ -1676,7 +1836,7 @@ update_ul_dci(module_id_t module_idP, nfapi_hi_dci0_request_t *HI_DCI0_req = &RC.mac[module_idP]->HI_DCI0_req[CC_idP][subframe]; nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu = - &HI_DCI0_req->hi_dci0_request_body.hi_dci0_pdu_list[0]; + &HI_DCI0_req->hi_dci0_request_body.hi_dci0_pdu_list[0]; COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_idP]; int i; @@ -1687,8 +1847,8 @@ update_ul_dci(module_id_t module_idP, i++) { if ((hi_dci0_pdu[i].pdu_type == NFAPI_HI_DCI0_DCI_PDU_TYPE) && - (hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.rnti == rntiP)) - hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.dl_assignment_index = (daiP - 1) & 3; + (hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.rnti == rntiP)) + hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.dl_assignment_index = (daiP - 1) & 3; } } @@ -1698,84 +1858,83 @@ update_ul_dci(module_id_t module_idP, //------------------------------------------------------------------------------ void set_ue_dai(sub_frame_t subframeP, - int UE_id, uint8_t CC_id, uint8_t tdd_config, - UE_list_t * UE_list) + int UE_id, uint8_t CC_id, uint8_t tdd_config, + UE_list_t *UE_list) //------------------------------------------------------------------------------ { switch (tdd_config) { - case 0: - if ((subframeP == 0) || (subframeP == 1) || (subframeP == 3) - || (subframeP == 5) || (subframeP == 6) || (subframeP == 8)) { + case 0: + if ((subframeP == 0) || (subframeP == 1) || (subframeP == 3) + || (subframeP == 5) || (subframeP == 6) || (subframeP == 8)) { + UE_list->UE_template[CC_id][UE_id].DAI = 0; + } + + break; + + case 1: + if ((subframeP == 0) || (subframeP == 4) || (subframeP == 5) + || (subframeP == 9)) { + UE_list->UE_template[CC_id][UE_id].DAI = 0; + } + + break; + + case 2: + if ((subframeP == 4) || (subframeP == 5)) { + UE_list->UE_template[CC_id][UE_id].DAI = 0; + } + + break; + + case 3: + if ((subframeP == 5) || (subframeP == 7) || (subframeP == 9)) { + UE_list->UE_template[CC_id][UE_id].DAI = 0; + } + + break; + + case 4: + if ((subframeP == 0) || (subframeP == 6)) { + UE_list->UE_template[CC_id][UE_id].DAI = 0; + } + + break; + + case 5: + if (subframeP == 9) { + UE_list->UE_template[CC_id][UE_id].DAI = 0; + } + + break; + + case 6: + if ((subframeP == 0) || (subframeP == 1) || (subframeP == 5) + || (subframeP == 6) || (subframeP == 9)) { + UE_list->UE_template[CC_id][UE_id].DAI = 0; + } + + break; + + default: UE_list->UE_template[CC_id][UE_id].DAI = 0; - } - - break; - - case 1: - if ((subframeP == 0) || (subframeP == 4) || (subframeP == 5) - || (subframeP == 9)) { - UE_list->UE_template[CC_id][UE_id].DAI = 0; - } - - break; - - case 2: - if ((subframeP == 4) || (subframeP == 5)) { - UE_list->UE_template[CC_id][UE_id].DAI = 0; - } - - break; - - case 3: - if ((subframeP == 5) || (subframeP == 7) || (subframeP == 9)) { - UE_list->UE_template[CC_id][UE_id].DAI = 0; - } - - break; - - case 4: - if ((subframeP == 0) || (subframeP == 6)) { - UE_list->UE_template[CC_id][UE_id].DAI = 0; - } - - break; - - case 5: - if (subframeP == 9) { - UE_list->UE_template[CC_id][UE_id].DAI = 0; - } - - break; - - case 6: - if ((subframeP == 0) || (subframeP == 1) || (subframeP == 5) - || (subframeP == 6) || (subframeP == 9)) { - UE_list->UE_template[CC_id][UE_id].DAI = 0; - } - - break; - - default: - UE_list->UE_template[CC_id][UE_id].DAI = 0; - LOG_I(MAC, "unknow TDD config %d\n", tdd_config); - break; + LOG_I(MAC, "unknown TDD config %d\n", tdd_config); + break; } } -void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) -{ +void schedule_PCH(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) { /* DCI:format 1A/1C P-RNTI:0xFFFE */ /* PDU:eNB_rrc_inst[Mod_idP].common_channels[CC_id].PCCH_pdu.payload */ - uint16_t pcch_sdu_length; - int mcs = -1; - int CC_id; - eNB_MAC_INST *eNB = RC.mac[module_idP]; - COMMON_channels_t *cc; - uint8_t *vrb_map; - int n_rb_dl; - int first_rb = -1; - nfapi_dl_config_request_pdu_t *dl_config_pdu; - nfapi_tx_request_pdu_t *TX_req; + uint16_t pcch_sdu_length; + int mcs = -1; + int CC_id; + eNB_MAC_INST *eNB = RC.mac[module_idP]; + COMMON_channels_t *cc; + uint8_t *vrb_map; + int n_rb_dl; + int first_rb = -1; + nfapi_dl_config_request_pdu_t *dl_config_pdu; + nfapi_tx_request_pdu_t *TX_req; nfapi_dl_config_request_body_t *dl_req; #ifdef FORMAT1C int gap_index = 0; /* indicate which gap(1st or 2nd) is used (0:1st) */ @@ -1799,9 +1958,9 @@ void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) start_meas(&eNB->schedule_pch); - for (CC_id=0; CC_idcommon_channels[CC_id]; - vrb_map = (void*)&cc->vrb_map; + vrb_map = (void *) &cc->vrb_map; n_rb_dl = to_prb(cc->mib->message.dl_Bandwidth); dl_req = &eNB->DL_req[CC_id].dl_config_request_body; for (uint16_t i = 0; i < MAX_MOBILES_PER_ENB; i++) { @@ -1809,17 +1968,18 @@ void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) continue; } if (frameP % UE_PF_PO[CC_id][i].T == UE_PF_PO[CC_id][i].PF_min && subframeP == UE_PF_PO[CC_id][i].PO) { - pcch_sdu_length = mac_rrc_data_req(module_idP, + pcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, - PCCH,1, + PCCH, 1, &cc->PCCH_pdu.payload[0], i); // used for ue index - if (pcch_sdu_length == 0) { - LOG_D(MAC,"[eNB %d] Frame %d subframe %d: PCCH not active(size = 0 byte)\n", module_idP,frameP, subframeP); - continue; - } - LOG_D(MAC,"[eNB %d] Frame %d subframe %d: PCCH->PCH CC_id %d UE_id %d, Received %d bytes \n", module_idP, frameP, subframeP, CC_id,i, pcch_sdu_length); + if (pcch_sdu_length == 0) { + LOG_D(MAC, "[eNB %d] Frame %d subframe %d: PCCH not active(size = 0 byte)\n", module_idP, frameP, subframeP); + continue; + } + LOG_D(MAC, "[eNB %d] Frame %d subframe %d: PCCH->PCH CC_id %d UE_id %d, Received %d bytes \n", module_idP, + frameP, subframeP, CC_id, i, pcch_sdu_length); #ifdef FORMAT1C //NO SIB if ((subframeP == 0 || subframeP == 1 || subframeP == 2 || subframeP == 4 || subframeP == 6 || subframeP == 9) || @@ -1944,65 +2104,65 @@ void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) } } - vrb_map[first_rb] = 1; - vrb_map[first_rb+1] = 1; - vrb_map[first_rb+2] = 1; - vrb_map[first_rb+3] = 1; - /* Get MCS for length of PCH */ - if (pcch_sdu_length <= get_TBS_DL(0,3)) { - mcs=0; - } else if (pcch_sdu_length <= get_TBS_DL(1,3)) { - mcs=1; - } else if (pcch_sdu_length <= get_TBS_DL(2,3)) { - mcs=2; - } else if (pcch_sdu_length <= get_TBS_DL(3,3)) { - mcs=3; - } else if (pcch_sdu_length <= get_TBS_DL(4,3)) { - mcs=4; - } else if (pcch_sdu_length <= get_TBS_DL(5,3)) { - mcs=5; - } else if (pcch_sdu_length <= get_TBS_DL(6,3)) { - mcs=6; - } else if (pcch_sdu_length <= get_TBS_DL(7,3)) { - mcs=7; - } else if (pcch_sdu_length <= get_TBS_DL(8,3)) { - mcs=8; - } else if (pcch_sdu_length <= get_TBS_DL(9,3)) { - mcs=9; - } + vrb_map[first_rb] = 1; + vrb_map[first_rb + 1] = 1; + vrb_map[first_rb + 2] = 1; + vrb_map[first_rb + 3] = 1; + /* Get MCS for length of PCH */ + if (pcch_sdu_length <= get_TBS_DL(0, 3)) { + mcs = 0; + } else if (pcch_sdu_length <= get_TBS_DL(1, 3)) { + mcs = 1; + } else if (pcch_sdu_length <= get_TBS_DL(2, 3)) { + mcs = 2; + } else if (pcch_sdu_length <= get_TBS_DL(3, 3)) { + mcs = 3; + } else if (pcch_sdu_length <= get_TBS_DL(4, 3)) { + mcs = 4; + } else if (pcch_sdu_length <= get_TBS_DL(5, 3)) { + mcs = 5; + } else if (pcch_sdu_length <= get_TBS_DL(6, 3)) { + mcs = 6; + } else if (pcch_sdu_length <= get_TBS_DL(7, 3)) { + mcs = 7; + } else if (pcch_sdu_length <= get_TBS_DL(8, 3)) { + mcs = 8; + } else if (pcch_sdu_length <= get_TBS_DL(9, 3)) { + mcs = 9; + } #endif - dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu]; - memset((void*)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t)); - dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE; - dl_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_dl_config_dci_dl_pdu)); + dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu]; + memset((void *) dl_config_pdu, 0, sizeof(nfapi_dl_config_request_pdu_t)); + dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE; + dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu)); #ifdef FORMAT1C - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1C; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = getRIV(n_vrb_dl/n_rb_step, first_rb/n_rb_step, Lcrbs/n_rb_step); - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.ngap = n_gap; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1C; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = getRIV(n_vrb_dl/n_rb_step, first_rb/n_rb_step, Lcrbs/n_rb_step); + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.ngap = n_gap; #else - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1A; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = 0; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // no TPC - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 1; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 1; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = getRIV(n_rb_dl,first_rb,4); - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.virtual_resource_block_assignment_flag = 0; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1A; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = 0; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // no TPC + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 1; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 1; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = getRIV(n_rb_dl, first_rb, 4); + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.virtual_resource_block_assignment_flag = 0; #endif - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = 4; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = 0xFFFE; // P-RNTI - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 2; // P-RNTI : see Table 4-10 from SCF082 - nFAPI specifications - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = 4; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = 0xFFFE; // P-RNTI + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 2; // P-RNTI : see Table 4-10 from SCF082 - nFAPI specifications + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs; - // Rel10 fields + // Rel10 fields #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) - dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = 3; + dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = 3; #endif - // Rel13 fields + // Rel13 fields #if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) - dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 0; // regular UE - dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 2; // not BR - dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = 0xFFFF; + dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 0; // regular UE + dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 2; // not BR + dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = 0xFFFF; #endif if (!CCE_allocation_infeasible(module_idP, CC_id, 0, subframeP, dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level, P_RNTI)) { @@ -2020,12 +2180,12 @@ void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index = eNB->pdu_index[CC_id]; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = 0xFFFE; #ifdef FORMAT1C - dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 3; // format 1C - dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(n_vrb_dl/n_rb_step, first_rb/n_rb_step, Lcrbs/n_rb_step); + dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 3; // format 1C + dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(n_vrb_dl/n_rb_step, first_rb/n_rb_step, Lcrbs/n_rb_step); #else - dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D - dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(n_rb_dl,first_rb,4); - dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized + dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D + dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(n_rb_dl, first_rb, 4); + dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized #endif dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; //QPSK dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version = 1; diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h index 8a5422a890..8bd227645c 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h @@ -40,6 +40,7 @@ // number of active slices for past and current time int n_active_slices = 1; int n_active_slices_current = 1; +int slice_counter = 0; // RB share for each slice for past and current time float slice_percentage[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; @@ -47,6 +48,7 @@ float slice_percentage_current[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; float slice_percentage_total = 0; float slice_percentage_total_current = 0; float slice_percentage_avg = 0.25; +int slice_isolation[MAX_NUM_SLICES] = {0, 0, 0, 0}; // Frequency ranges for slice positioning int slice_position[MAX_NUM_SLICES*2] = {0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX}; @@ -78,4 +80,6 @@ char *dl_scheduler_type[MAX_NUM_SLICES] = // pointer to the slice specific scheduler slice_scheduler_dl slice_sched_dl[MAX_NUM_SLICES] = {0}; +pre_processor_results_t pre_processor_results[MAX_NUM_SLICES]; + #endif //__LAYER2_MAC_ENB_SCHEDULER_DLSCH_H__ diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h index f8121310b1..7bc73e11b9 100644 --- a/openair2/LAYER2/MAC/mac.h +++ b/openair2/LAYER2/MAC/mac.h @@ -1571,6 +1571,16 @@ typedef struct { mui_t rrc_mui[128]; }mac_rlc_am_muilist_t; +/// Structure for saving the output of each pre_processor instance +typedef struct { + uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; + uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; + uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; + uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX]; + uint8_t slice_allocated_rbgs[NFAPI_CC_MAX][N_RBG_MAX]; + uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]; +} pre_processor_results_t; + #include "mac_proto.h" /*@}*/ diff --git a/openair2/LAYER2/MAC/mac_proto.h b/openair2/LAYER2/MAC/mac_proto.h index 23d7fb49d7..56bf7a25d4 100644 --- a/openair2/LAYER2/MAC/mac_proto.h +++ b/openair2/LAYER2/MAC/mac_proto.h @@ -226,8 +226,8 @@ void dlsch_scheduler_pre_processor_reset(module_id_t module_idP, sub_frame_t subframeP, int min_rb_unit[NFAPI_CC_MAX], uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], - unsigned char rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], - unsigned char MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX], + uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], + uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX], int *mbsfn_flag); void dlsch_scheduler_pre_processor_partitioning(module_id_t Mod_id, @@ -260,6 +260,10 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id, uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]); +void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, + int frameP, + sub_frame_t subframeP); + void dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id, int UE_id, uint8_t CC_id, @@ -267,9 +271,9 @@ void dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id, int min_rb_unit, uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], - unsigned char rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], + uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX], - unsigned char MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]); + uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]); /* \brief Function to trigger the eNB scheduling procedure. It is called by PHY at the beginning of each subframe, \f$n$\f and generates all DLSCH allocations for subframe \f$n\f$ and ULSCH allocations for subframe \f$n+k$\f. diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index e6bb773c86..73f9724c8a 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -61,7 +61,7 @@ extern uint32_t slice_sorting_policy[MAX_NUM_SLICES]; extern int slice_accounting_policy[MAX_NUM_SLICES]; extern int slice_maxmcs[MAX_NUM_SLICES]; extern int slice_maxmcs_uplink[MAX_NUM_SLICES]; - +extern pre_processor_results_t pre_processor_results[MAX_NUM_SLICES]; //#define ICIC 0 @@ -977,7 +977,7 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id, int UE_id, CC_id; int i; uint8_t transmission_mode; - uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX]; + uint8_t (*slice_allocation_mask)[N_RBG_MAX] = pre_processor_results[slice_id].slice_allocation_mask; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; int N_RBG[NFAPI_CC_MAX]; @@ -1205,13 +1205,13 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, uint8_t CC_id; uint16_t i, j; - uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX]; - uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]; // If TM5 is revisited, we can move this inside accounting - int min_rb_unit[NFAPI_CC_MAX]; - uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; - uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; - uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; + + uint16_t (*nb_rbs_required)[MAX_MOBILES_PER_ENB] = pre_processor_results[slice_id].nb_rbs_required; + uint16_t (*nb_rbs_accounted)[MAX_MOBILES_PER_ENB] = pre_processor_results[slice_id].nb_rbs_accounted; + uint16_t (*nb_rbs_remaining)[MAX_MOBILES_PER_ENB] = pre_processor_results[slice_id].nb_rbs_remaining; + uint8_t (*rballoc_sub)[N_RBG_MAX] = pre_processor_results[slice_id].slice_allocated_rbgs; + uint8_t (*MIMO_mode_indicator)[N_RBG_MAX] = pre_processor_results[slice_id].MIMO_mode_indicator; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; UE_sched_ctrl *ue_sched_ctl; @@ -1354,8 +1354,8 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP, sub_frame_t subframeP, int min_rb_unit[NFAPI_CC_MAX], uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], - unsigned char rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], - unsigned char MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX], + uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], + uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX], int *mbsfn_flag) { @@ -1579,9 +1579,9 @@ dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id, int min_rb_unit, uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], - unsigned char rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], + uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX], - unsigned char MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]) + uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]) { int i; int tm = get_tmode(Mod_id, CC_id, UE_id); diff --git a/openair2/RRC/LTE/rrc_extern.h b/openair2/RRC/LTE/rrc_extern.h index 6c19fa9c70..59200fb9cc 100644 --- a/openair2/RRC/LTE/rrc_extern.h +++ b/openair2/RRC/LTE/rrc_extern.h @@ -75,7 +75,7 @@ extern uint32_t timeToTrigger_ms[16]; extern float RSRP_meas_mapping[98]; extern float RSRQ_meas_mapping[35]; -extern UE_PF_PO_t UE_PF_PO[MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; +extern UE_PF_PO_t UE_PF_PO[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; extern pthread_mutex_t ue_pf_po_mutex; extern uint16_t reestablish_rnti_map[MAX_MOBILES_PER_ENB][2]; diff --git a/openair2/RRC/LTE/rrc_vars.h b/openair2/RRC/LTE/rrc_vars.h index 8a71858101..028a59f7d9 100644 --- a/openair2/RRC/LTE/rrc_vars.h +++ b/openair2/RRC/LTE/rrc_vars.h @@ -36,7 +36,7 @@ #include "COMMON/mac_rrc_primitives.h" #include "LAYER2/MAC/mac.h" -UE_PF_PO_t UE_PF_PO[MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; +UE_PF_PO_t UE_PF_PO[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; pthread_mutex_t ue_pf_po_mutex; UE_RRC_INST *UE_rrc_inst; #include "LAYER2/MAC/mac_extern.h" From 5634aa92a1a8549e697d77d781cc2d1fdc9099bc Mon Sep 17 00:00:00 2001 From: Navid Nikaein Date: Mon, 12 Mar 2018 16:39:00 +0100 Subject: [PATCH 084/379] Keep the LCID priority in MAC layer to sort the UE accordingly --- openair2/LAYER2/MAC/config.c | 17 +++++++++++------ openair2/LAYER2/MAC/mac.h | 3 +++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/openair2/LAYER2/MAC/config.c b/openair2/LAYER2/MAC/config.c index 8fd85e7811..a7bf532b09 100644 --- a/openair2/LAYER2/MAC/config.c +++ b/openair2/LAYER2/MAC/config.c @@ -852,16 +852,21 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP, LOG_E(MAC, "%s:%d:%s: ERROR, UE_id == -1\n", __FILE__, __LINE__, __FUNCTION__); } else { - if (logicalChannelConfig) + if (logicalChannelConfig) { UE_list-> UE_template[CC_idP][UE_id].lcgidmap [logicalChannelIdentity] = *logicalChannelConfig-> - ul_SpecificParameters->logicalChannelGroup; - else - UE_list-> - UE_template[CC_idP][UE_id].lcgidmap - [logicalChannelIdentity] = 0; + ul_SpecificParameters->logicalChannelGroup; + UE_list-> + UE_template[CC_idP][UE_id].lcgidpriority + [logicalChannelIdentity]= + logicalChannelConfig->ul_SpecificParameters->priority; + + } else + UE_list-> + UE_template[CC_idP][UE_id].lcgidmap + [logicalChannelIdentity] = 0; } } diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h index 7bc73e11b9..8fa2e3bdc9 100644 --- a/openair2/LAYER2/MAC/mac.h +++ b/openair2/LAYER2/MAC/mac.h @@ -849,6 +849,9 @@ typedef struct { /// LCGID mapping long lcgidmap[11]; + ///UE logical channel priority + long lcgidpriority[11]; + /// phr information int8_t phr_info; From 8d9a8ab59a40cf4aa73bf464ddb2184d519bb530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Iardella?= Date: Tue, 13 Mar 2018 15:22:14 +0100 Subject: [PATCH 085/379] Add UE sorting on LCID priority --- openair2/COMMON/platform_types.h | 3 +- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 104 ++++++++++++++++++---- openair2/LAYER2/MAC/eNB_scheduler_dlsch.h | 12 ++- openair2/LAYER2/MAC/mac_proto.h | 6 ++ openair2/LAYER2/MAC/pre_processor.c | 33 +++++-- 5 files changed, 132 insertions(+), 26 deletions(-) diff --git a/openair2/COMMON/platform_types.h b/openair2/COMMON/platform_types.h index 3f736e5b3c..a94d785bee 100644 --- a/openair2/COMMON/platform_types.h +++ b/openair2/COMMON/platform_types.h @@ -110,7 +110,8 @@ typedef enum { CR_HOL = 2, CR_LC = 3, CR_CQI = 4, - CR_NUM = 5 + CR_LCP = 5, + CR_NUM = 6 } sorting_criterion_t; //----------------------------------------------------------------------------- diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 44083a4610..472c4e2a11 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -70,6 +70,7 @@ extern RAN_CONTEXT_t RC; extern uint8_t nfapi_mode; extern pre_processor_results_t pre_processor_results[MAX_NUM_SLICES]; extern int slice_isolation[MAX_NUM_SLICES]; +extern int slice_priority[MAX_NUM_SLICES]; //------------------------------------------------------------------------------ void @@ -534,23 +535,44 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in } // Check for new sorting policy - if (slice_sorting_policy_current[i] != slice_sorting_policy[i]) { + if (slice_sorting_current[i] != slice_sorting[i]) { LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n", - module_idP, i, frameP, subframeP, slice_sorting_policy_current[i], slice_sorting_policy[i]); - slice_sorting_policy_current[i] = slice_sorting_policy[i]; + module_idP, i, frameP, subframeP, slice_sorting_current[i], slice_sorting[i]); + slice_sorting_current[i] = slice_sorting[i]; + } + + // Check for new slice isolation + if (slice_isolation_current[i] != slice_isolation[i]) { + if (slice_isolation[i] != 1 && slice_isolation[i] != 0) { + LOG_W(MAC, + "[eNB %d][SLICE %d][DL] frame %d subframe %d: invalid slice isolation setting (%d), revert to its previous value (%d)\n", + module_idP, i, frameP, subframeP, slice_isolation[i], slice_isolation_current[i]); + slice_isolation[i] = slice_isolation_current[i]; + } else { + LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: slice isolation setting has changed (%x-->%x)\n", + module_idP, i, frameP, subframeP, slice_isolation_current[i], slice_isolation[i]); + slice_isolation_current[i] = slice_isolation[i]; + } + } + + // Check for new slice priority + if (slice_priority_current[i] != slice_priority[i]) { + LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: slice priority setting has changed (%x-->%x)\n", + module_idP, i, frameP, subframeP, slice_priority_current[i], slice_priority[i]); + slice_priority_current[i] = slice_priority[i]; } // Check for new accounting policy - if (slice_accounting_policy_current[i] != slice_accounting_policy[i]) { - if (slice_accounting_policy[i] > 1 || slice_accounting_policy[i] < 0) { + if (slice_accounting_current[i] != slice_accounting[i]) { + if (slice_accounting[i] > 1 || slice_accounting[i] < 0) { LOG_W(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: invalid accounting policy (%d), revert to its previous value (%d)\n", - module_idP, i, frameP, subframeP, slice_accounting_policy[i], slice_accounting_policy_current[i]); - slice_accounting_policy[i] = slice_accounting_policy_current[i]; + module_idP, i, frameP, subframeP, slice_accounting[i], slice_accounting_current[i]); + slice_accounting[i] = slice_accounting_current[i]; } else { LOG_N(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n", - module_idP, i, frameP, subframeP, slice_accounting_policy_current[i], slice_accounting_policy[i]); - slice_accounting_policy_current[i] = slice_accounting_policy[i]; + module_idP, i, frameP, subframeP, slice_accounting_current[i], slice_accounting[i]); + slice_accounting_current[i] = slice_accounting[i]; } } @@ -1570,6 +1592,7 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub COMMON_channels_t *cc; int N_RBG[NFAPI_CC_MAX]; + int slice_sorted_list[MAX_NUM_SLICES], slice_id; int8_t free_rbgs_map[NFAPI_CC_MAX][N_RBG_MAX]; int has_traffic[NFAPI_CC_MAX][MAX_NUM_SLICES]; uint8_t allocation_mask[NFAPI_CC_MAX][N_RBG_MAX]; @@ -1613,7 +1636,7 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub } } - // TODO: Sort slices by priority and use the sorted list in the code below (For now we assume 0 = max_priority) + slice_priority_sort(slice_sorted_list); // MULTIPLEXING // This part is an adaptation of dlsch_scheduler_pre_processor_allocate() code @@ -1623,8 +1646,9 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub min_rb_unit = get_min_rb_unit(Mod_id, CC_id); for (i = 0; i < n_active_slices; ++i) { + slice_id = slice_sorted_list[i]; - if (has_traffic[CC_id][i] == 0) continue; + if (has_traffic[CC_id][slice_id] == 0) continue; // Build an ad-hoc allocation mask fo the slice for (rbg = 0; rbg < N_RBG[CC_id]; ++rbg) { @@ -1644,12 +1668,13 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub // Sort UE again // (UE list gets sorted every time pre_processor is called so it is probably dirty at this point) - sort_UEs(Mod_id, (slice_id_t) i, frameP, subframeP); + // FIXME: There is only one UE_list for all slices, so it must be sorted again each time we use it + sort_UEs(Mod_id, (slice_id_t) slice_id, frameP, subframeP); - nb_rbs_remaining = pre_processor_results[i].nb_rbs_remaining; - nb_rbs_required = pre_processor_results[i].nb_rbs_required; - rballoc_sub = pre_processor_results[i].slice_allocated_rbgs; - MIMO_mode_indicator = pre_processor_results[i].MIMO_mode_indicator; + nb_rbs_remaining = pre_processor_results[slice_id].nb_rbs_remaining; + nb_rbs_required = pre_processor_results[slice_id].nb_rbs_required; + rballoc_sub = pre_processor_results[slice_id].slice_allocated_rbgs; + MIMO_mode_indicator = pre_processor_results[slice_id].MIMO_mode_indicator; // Allocation for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { @@ -1699,6 +1724,32 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub } } +//------------------------------------------------------------------------------ +void dlsch_scheduler_qos_multiplexing(module_id_t Mod_id, int frameP, sub_frame_t subframeP) +//------------------------------------------------------------------------------ +{ + int UE_id, CC_id, i; + UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; + UE_sched_ctrl *ue_sched_ctl; + + for (CC_id = 0; CC_id < MAX_NUM_CCs; ++CC_id) { + for (i = 0; i < n_active_slices; ++i) { + + // Sort UE again + // FIXME: There is only one UE_list for all slices, so it must be sorted again each time we use it + sort_UEs(Mod_id, (slice_id_t) i, frameP, subframeP); + + for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { + ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; + + // TODO: Do something here + ue_sched_ctl->pre_nb_available_rbs[CC_id]; + } + } + } +} + + //------------------------------------------------------------------------------ void fill_DLSCH_dci(module_id_t module_idP, @@ -2252,3 +2303,24 @@ void schedule_PCH(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) stop_meas(&eNB->schedule_pch); return; } + +static int slice_priority_compare(const void *_a, const void *_b) { + + int slice_id1 = *(const int *) _a; + int slice_id2 = *(const int *) _b; + + if (slice_priority[slice_id1] > slice_priority[slice_id2]) { + return -1; + } + return 1; +} + +void slice_priority_sort(int slice_list[MAX_NUM_SLICES]) { + + int i; + for (i = 0; i < MAX_NUM_SLICES; ++i) { + slice_list[i] = i; + } + + qsort(slice_list, MAX_NUM_SLICES, sizeof(int), slice_priority_compare); +} diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h index 8bd227645c..321f83c20d 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h @@ -48,7 +48,11 @@ float slice_percentage_current[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; float slice_percentage_total = 0; float slice_percentage_total_current = 0; float slice_percentage_avg = 0.25; + int slice_isolation[MAX_NUM_SLICES] = {0, 0, 0, 0}; +int slice_isolation_current[MAX_NUM_SLICES] = {0, 0, 0, 0}; +int slice_priority[MAX_NUM_SLICES] = {10, 5, 2, 0}; +int slice_priority_current[MAX_NUM_SLICES] = {10, 5, 2, 0}; // Frequency ranges for slice positioning int slice_position[MAX_NUM_SLICES*2] = {0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX}; @@ -59,12 +63,12 @@ int slice_maxmcs[MAX_NUM_SLICES] = { 28, 28, 28, 28 }; int slice_maxmcs_current[MAX_NUM_SLICES] = { 28, 28, 28, 28 }; // The lists of criteria that enforce the sorting policies of the slices -uint32_t slice_sorting_policy[MAX_NUM_SLICES] = {0x01234, 0x01234, 0x01234, 0x01234}; -uint32_t slice_sorting_policy_current[MAX_NUM_SLICES] = {0x01234, 0x01234, 0x01234, 0x01234}; +uint32_t slice_sorting[MAX_NUM_SLICES] = {0x012345, 0x012345, 0x012345, 0x012345}; +uint32_t slice_sorting_current[MAX_NUM_SLICES] = {0x012345, 0x012345, 0x012345, 0x012345}; // Accounting policy (just greedy(1) or fair(0) setting for now) -int slice_accounting_policy[MAX_NUM_SLICES] = {0, 0, 0, 0}; -int slice_accounting_policy_current[MAX_NUM_SLICES] = {0, 0, 0, 0}; +int slice_accounting[MAX_NUM_SLICES] = {0, 0, 0, 0}; +int slice_accounting_current[MAX_NUM_SLICES] = {0, 0, 0, 0}; int update_dl_scheduler[MAX_NUM_SLICES] = { 1, 1, 1, 1 }; int update_dl_scheduler_current[MAX_NUM_SLICES] = { 1, 1, 1, 1 }; diff --git a/openair2/LAYER2/MAC/mac_proto.h b/openair2/LAYER2/MAC/mac_proto.h index 56bf7a25d4..98b6c8fbe0 100644 --- a/openair2/LAYER2/MAC/mac_proto.h +++ b/openair2/LAYER2/MAC/mac_proto.h @@ -260,10 +260,16 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id, uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]); +void slice_priority_sort(int slice_list[MAX_NUM_SLICES]); + void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub_frame_t subframeP); +void dlsch_scheduler_qos_multiplexing(module_id_t Mod_id, + int frameP, + sub_frame_t subframeP); + void dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id, int UE_id, uint8_t CC_id, diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 73f9724c8a..48987d785e 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -57,8 +57,8 @@ extern RAN_CONTEXT_t RC; extern float slice_percentage[MAX_NUM_SLICES]; extern float slice_percentage_uplink[MAX_NUM_SLICES]; extern int slice_position[MAX_NUM_SLICES*2]; -extern uint32_t slice_sorting_policy[MAX_NUM_SLICES]; -extern int slice_accounting_policy[MAX_NUM_SLICES]; +extern uint32_t slice_sorting[MAX_NUM_SLICES]; +extern int slice_accounting[MAX_NUM_SLICES]; extern int slice_maxmcs[MAX_NUM_SLICES]; extern int slice_maxmcs_uplink[MAX_NUM_SLICES]; extern pre_processor_results_t pre_processor_results[MAX_NUM_SLICES]; @@ -315,6 +315,20 @@ int maxcqi(module_id_t Mod_id, int32_t UE_id) { return CQI; } +long min_lcgidpriority(module_id_t Mod_id, int32_t UE_id) { + UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; + int i; + int pCC_id = UE_PCCID(Mod_id, UE_id); + long ret = UE_list->UE_template[pCC_id][UE_id].lcgidpriority[0]; + + for (i = 1; i < 11; ++i) { + if (UE_list->UE_template[pCC_id][UE_id].lcgidpriority[i] < ret) + ret = UE_list->UE_template[pCC_id][UE_id].lcgidpriority[i]; + } + + return ret; +} + struct sort_ue_dl_params { int Mod_idP; int frameP; @@ -343,6 +357,9 @@ static int ue_dl_compare(const void *_a, const void *_b, void *_params) int cqi1 = maxcqi(params->Mod_idP, UE_id1); int cqi2 = maxcqi(params->Mod_idP, UE_id2); + long lcgid1 = min_lcgidpriority(params->Mod_idP, UE_id1); + long lcgid2 = min_lcgidpriority(params->Mod_idP, UE_id2); + for (i = 0; i < CR_NUM; ++i) { switch (UE_list->sorting_criteria[slice_id][i]) { @@ -390,6 +407,12 @@ static int ue_dl_compare(const void *_a, const void *_b, void *_params) if (cqi1 < cqi2) return 1; + case CR_LCP : + if (lcgid1 < lcgid2) + return -1; + if (lcgid1 > lcgid2) + return 1; + default : break; } @@ -402,7 +425,7 @@ void decode_sorting_policy(module_id_t Mod_idP, slice_id_t slice_id) { int i; UE_list_t *UE_list = &RC.mac[Mod_idP]->UE_list; - uint32_t policy = slice_sorting_policy[slice_id]; + uint32_t policy = slice_sorting[slice_id]; uint32_t mask = 0x0000000F; uint16_t criterion; @@ -410,7 +433,7 @@ void decode_sorting_policy(module_id_t Mod_idP, slice_id_t slice_id) { criterion = (uint16_t) (policy >> 4 * (CR_NUM - 1 - i) & mask); if (criterion >= CR_NUM) { LOG_W(MAC, "Invalid criterion in slice %d policy, revert to default policy \n", slice_id); - slice_sorting_policy[slice_id] = 0x1234; + slice_sorting[slice_id] = 0x1234; break; } UE_list->sorting_criteria[slice_id][i] = criterion; @@ -649,7 +672,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, // Reduces the available RBs according to slicing configuration dlsch_scheduler_pre_processor_partitioning(Mod_id, slice_id, rbs_retx); - switch (slice_accounting_policy[slice_id]) { + switch (slice_accounting[slice_id]) { // If greedy scheduling, try to account all the required RBs case 1: From 9efd5d6f27c8a436c036a89df219a39ce620e4b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Iardella?= Date: Thu, 22 Mar 2018 14:17:07 +0100 Subject: [PATCH 086/379] Inter/intra-slice sharing are now optional --- openair2/COMMON/platform_types.h | 5 +++ openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 34 +++++++++++++++++++-- openair2/LAYER2/MAC/eNB_scheduler_dlsch.h | 5 +++ openair2/LAYER2/MAC/mac.h | 4 +++ openair2/LAYER2/MAC/pre_processor.c | 37 ++++++++++++++++------- 5 files changed, 72 insertions(+), 13 deletions(-) diff --git a/openair2/COMMON/platform_types.h b/openair2/COMMON/platform_types.h index a94d785bee..b641475864 100644 --- a/openair2/COMMON/platform_types.h +++ b/openair2/COMMON/platform_types.h @@ -114,6 +114,11 @@ typedef enum { CR_NUM = 6 } sorting_criterion_t; +typedef enum { + POL_FAIR = 0, + POL_GREEDY = 1, + POL_NUM = 2 +} accounting_policy_t; //----------------------------------------------------------------------------- // PHY TYPES //----------------------------------------------------------------------------- diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 472c4e2a11..a03f95c47f 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -435,6 +435,34 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in slice_percentage_total += slice_percentage[i]; } + // Check for *intra*slice share activation + if (intraslice_share_active_current != intraslice_share_active) { + if (intraslice_share_active != 1 && intraslice_share_active != 0) { + LOG_W(MAC, + "[eNB %d][DL] frame %d subframe %d: invalid intraslice sharing status (%d), revert to its previous value (%d)\n", + module_idP, i, frameP, subframeP, intraslice_share_active, intraslice_share_active_current); + intraslice_share_active = intraslice_share_active_current; + } else { + LOG_N(MAC, "[eNB %d][DL] frame %d subframe %d: intraslice sharing status has changed (%x-->%x)\n", + module_idP, i, frameP, subframeP, intraslice_share_active_current, intraslice_share_active); + intraslice_share_active_current = intraslice_share_active; + } + } + + // Check for *inter*slice share activation + if (interslice_share_active_current != interslice_share_active) { + if (interslice_share_active != 1 && interslice_share_active != 0) { + LOG_W(MAC, + "[eNB %d][DL] frame %d subframe %d: invalid interslice sharing status (%d), revert to its previous value (%d)\n", + module_idP, i, frameP, subframeP, interslice_share_active, interslice_share_active_current); + interslice_share_active = interslice_share_active_current; + } else { + LOG_N(MAC, "[eNB %d][DL] frame %d subframe %d: interslice sharing status has changed (%x-->%x)\n", + module_idP, i, frameP, subframeP, interslice_share_active_current, interslice_share_active); + interslice_share_active_current = interslice_share_active; + } + } + for (i = 0; i < n_active_slices; i++) { // Load any updated functions @@ -712,7 +740,9 @@ schedule_ue_spec(module_id_t module_idP, slice_id_t slice_idP, return; } - dlsch_scheduler_interslice_multiplexing(module_idP, frameP, subframeP); + if (interslice_share_active) { + dlsch_scheduler_interslice_multiplexing(module_idP, frameP, subframeP); + } for (CC_id = 0; CC_id < NFAPI_CC_MAX; CC_id++) { LOG_D(MAC, "doing schedule_ue_spec for CC_id %d\n", CC_id); @@ -1732,7 +1762,7 @@ void dlsch_scheduler_qos_multiplexing(module_id_t Mod_id, int frameP, sub_frame_ UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; UE_sched_ctrl *ue_sched_ctl; - for (CC_id = 0; CC_id < MAX_NUM_CCs; ++CC_id) { + for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { for (i = 0; i < n_active_slices; ++i) { // Sort UE again diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h index 321f83c20d..e2aac32bf0 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h @@ -42,6 +42,11 @@ int n_active_slices = 1; int n_active_slices_current = 1; int slice_counter = 0; +int intraslice_share_active = 1; +int intraslice_share_active_current = 1; +int interslice_share_active = 1; +int interslice_share_active_current = 1; + // RB share for each slice for past and current time float slice_percentage[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; float slice_percentage_current[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h index 8fa2e3bdc9..d8fe034183 100644 --- a/openair2/LAYER2/MAC/mac.h +++ b/openair2/LAYER2/MAC/mac.h @@ -1582,6 +1582,10 @@ typedef struct { uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX]; uint8_t slice_allocated_rbgs[NFAPI_CC_MAX][N_RBG_MAX]; uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]; + + uint32_t bytes_lcid[MAX_MOBILES_PER_ENB][MAX_NUM_LCID]; + uint32_t wb_pmi[MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; + uint8_t mcs[MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; } pre_processor_results_t; #include "mac_proto.h" diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 48987d785e..d04d89f7b1 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -63,6 +63,8 @@ extern int slice_maxmcs[MAX_NUM_SLICES]; extern int slice_maxmcs_uplink[MAX_NUM_SLICES]; extern pre_processor_results_t pre_processor_results[MAX_NUM_SLICES]; +extern int intraslice_share_active; + //#define ICIC 0 /* this function checks that get_eNB_UE_stats returns @@ -164,6 +166,7 @@ store_dlsch_buffer(module_id_t Mod_id, #endif + } if (UE_template->dl_buffer_total > 0) @@ -204,7 +207,8 @@ assign_rbs_required(module_id_t Mod_id, CC_id = UE_list->ordered_CCids[n][UE_id]; eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id]; - eNB_UE_stats->dlsch_mcs1 = cmin(cqi_to_mcs[UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id]], slice_maxmcs[slice_id]); +// eNB_UE_stats->dlsch_mcs1 = cmin(cqi_to_mcs[UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id]], slice_maxmcs[slice_id]); + eNB_UE_stats->dlsch_mcs1 = cmin(cqi2mcs(UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id]), slice_maxmcs[slice_id]); } @@ -266,6 +270,8 @@ assign_rbs_required(module_id_t Mod_id, Mod_id, frameP, UE_id, CC_id, min_rb_unit[CC_id], nb_rbs_required[CC_id][UE_id], TBS, eNB_UE_stats->dlsch_mcs1); + + pre_processor_results[slice_id].mcs[CC_id][UE_id] = eNB_UE_stats->dlsch_mcs1; } } } @@ -646,7 +652,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, CC_id = UE_list->ordered_CCids[i][UE_id]; ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; cc = &RC.mac[Mod_id]->common_channels[CC_id]; - // TODO Can we use subframe2harqpid() here? + // FIXME: Can we use subframe2harqpid() here? if (cc->tdd_Config) harq_pid = ((frameP * 10) + subframeP) % 10; else @@ -675,7 +681,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, switch (slice_accounting[slice_id]) { // If greedy scheduling, try to account all the required RBs - case 1: + case POL_GREEDY: for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { rnti = UE_RNTI(Mod_id, UE_id); if (rnti == NOT_A_RNTI) continue; @@ -691,6 +697,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, // Use the old, fair algorithm // Loop over all active UEs and account the avg number of RBs to each UE, based on all non-retx UEs. + // case POL_FAIR: default: // FIXME: This is not ideal, why loop on UEs to find average_rbs_per_user[], that is per-CC? // TODO: Look how to loop on active CCs only without using the UE_num_active_CC() function. @@ -1252,12 +1259,14 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, #endif // Initialize scheduling information for all active UEs + memset(&pre_processor_results[slice_id], 0, sizeof(pre_processor_results)); + // FIXME: After the memset above, some of the resets in reset() are redundant dlsch_scheduler_pre_processor_reset(Mod_id, slice_id, frameP, subframeP, min_rb_unit, nb_rbs_required, rballoc_sub, MIMO_mode_indicator, - mbsfn_flag); // TODO Not sure if useful + mbsfn_flag); // FIXME: Not sure if useful // STATUS // Store the DLSCH buffer for each logical channel @@ -1289,13 +1298,15 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, // SHARING // If there are available RBs left in the slice, allocate them to the highest priority UEs - dlsch_scheduler_pre_processor_intraslice_sharing(Mod_id, slice_id, - min_rb_unit, - nb_rbs_required, - nb_rbs_accounted, - nb_rbs_remaining, - rballoc_sub, - MIMO_mode_indicator); + if (intraslice_share_active) { + dlsch_scheduler_pre_processor_intraslice_sharing(Mod_id, slice_id, + min_rb_unit, + nb_rbs_required, + nb_rbs_accounted, + nb_rbs_remaining, + rballoc_sub, + MIMO_mode_indicator); + } #ifdef TM5 // This has to be revisited!!!! @@ -2075,3 +2086,7 @@ void sort_ue_ul(module_id_t module_idP, int frameP, sub_frame_t subframeP) UE_list->head_ul = -1; } } + +int cqi2mcs(int cqi) { + return cqi_to_mcs[cqi]; +} From 853ef6fe185122a1d977f4a5d9b53613aac685bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Iardella?= Date: Tue, 27 Mar 2018 15:31:29 +0200 Subject: [PATCH 087/379] Fix warnings in schedule_dlsch --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index a03f95c47f..a8703050f3 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -440,11 +440,11 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in if (intraslice_share_active != 1 && intraslice_share_active != 0) { LOG_W(MAC, "[eNB %d][DL] frame %d subframe %d: invalid intraslice sharing status (%d), revert to its previous value (%d)\n", - module_idP, i, frameP, subframeP, intraslice_share_active, intraslice_share_active_current); + module_idP, frameP, subframeP, intraslice_share_active, intraslice_share_active_current); intraslice_share_active = intraslice_share_active_current; } else { LOG_N(MAC, "[eNB %d][DL] frame %d subframe %d: intraslice sharing status has changed (%x-->%x)\n", - module_idP, i, frameP, subframeP, intraslice_share_active_current, intraslice_share_active); + module_idP, frameP, subframeP, intraslice_share_active_current, intraslice_share_active); intraslice_share_active_current = intraslice_share_active; } } @@ -454,11 +454,11 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in if (interslice_share_active != 1 && interslice_share_active != 0) { LOG_W(MAC, "[eNB %d][DL] frame %d subframe %d: invalid interslice sharing status (%d), revert to its previous value (%d)\n", - module_idP, i, frameP, subframeP, interslice_share_active, interslice_share_active_current); + module_idP, frameP, subframeP, interslice_share_active, interslice_share_active_current); interslice_share_active = interslice_share_active_current; } else { LOG_N(MAC, "[eNB %d][DL] frame %d subframe %d: interslice sharing status has changed (%x-->%x)\n", - module_idP, i, frameP, subframeP, interslice_share_active_current, interslice_share_active); + module_idP, frameP, subframeP, interslice_share_active_current, interslice_share_active); interslice_share_active_current = interslice_share_active; } } @@ -1773,7 +1773,7 @@ void dlsch_scheduler_qos_multiplexing(module_id_t Mod_id, int frameP, sub_frame_ ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; // TODO: Do something here - ue_sched_ctl->pre_nb_available_rbs[CC_id]; + // ue_sched_ctl->pre_nb_available_rbs[CC_id]; } } } From e6168667d3cb9e3136d586305e20236b374846ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Iardella?= Date: Fri, 6 Apr 2018 11:57:18 +0200 Subject: [PATCH 088/379] Add first_rb_offset --- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 66 +++++++++++++++-------- openair2/LAYER2/MAC/eNB_scheduler_ulsch.h | 3 ++ openair2/LAYER2/MAC/mac.h | 1 + openair2/LAYER2/MAC/pre_processor.c | 43 +++++++++------ 4 files changed, 75 insertions(+), 38 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 7c06a52909..fffc1a2209 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -401,10 +401,10 @@ rx_sdu(const module_id_t enb_mod_idP, UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[lcgid] = BSR_TABLE[bsr]; UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer = - UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[0] + - UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[1] + - UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[2] + - UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[3]; + UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID0] + + UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID1] + + UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID2] + + UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID3]; //UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer += UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer / 4; RC.eNB[enb_mod_idP][CC_idP]->pusch_stats_bsr[UE_id][(frameP * 10) + subframeP] = (payload_ptr[0] & 0x3f); @@ -435,10 +435,10 @@ rx_sdu(const module_id_t enb_mod_idP, int bsr2 = ((payload_ptr[1] & 0x0F) << 2) | ((payload_ptr[2] & 0xC0) >> 6); int bsr3 = payload_ptr[2] & 0x3F; - lcgid_updated[0] = 1; - lcgid_updated[1] = 1; - lcgid_updated[2] = 1; - lcgid_updated[3] = 1; + lcgid_updated[LCGID0] = 1; + lcgid_updated[LCGID1] = 1; + lcgid_updated[LCGID2] = 1; + lcgid_updated[LCGID3] = 1; // update buffer info UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID0] = BSR_TABLE[bsr0]; @@ -447,10 +447,10 @@ rx_sdu(const module_id_t enb_mod_idP, UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID3] = BSR_TABLE[bsr3]; UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer = - UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[0] + - UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[1] + - UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[2] + - UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[3]; + UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID0] + + UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID1] + + UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID2] + + UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID3]; //UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer += UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer / 4; LOG_D(MAC, @@ -920,7 +920,7 @@ void schedule_ulsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) { - uint16_t first_rb[MAX_NUM_CCs], i; + uint16_t first_rb[NFAPI_CC_MAX], i; int CC_id; eNB_MAC_INST *mac = RC.mac[module_idP]; COMMON_channels_t *cc; @@ -1005,7 +1005,7 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP, } if (sched_subframe < subframeP) sched_frame++; - for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { + for (CC_id = 0; CC_id < NFAPI_CC_MAX; CC_id++) { @@ -1104,6 +1104,18 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP, } } + if (slice_first_rb_current[i] != slice_first_rb[i]){ + if (slice_first_rb[i] >= 0){ // FIXME: Max limit is checked in the scheduler + LOG_N(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: slice first rb has changed: %d-->%d\n", + module_idP, i, frameP, subframeP, slice_first_rb_current[i], slice_first_rb[i]); + slice_first_rb_current[i] = slice_first_rb[i]; + } else { + LOG_W(MAC,"[eNB %d][SLICE %d][UL] invalid slice first rb %d, revert the previous value %d\n", + module_idP, i, slice_first_rb[i],slice_first_rb_current[i]); + slice_first_rb[i] = slice_first_rb_current[i]; + } + } + // check if a new scheduler, and log the console if (update_ul_scheduler_current[i] != update_ul_scheduler[i]){ LOG_I(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: UL scheduler for this slice is updated: %s \n", @@ -1166,6 +1178,7 @@ schedule_ulsch_rnti(module_id_t module_idP, int rvidx_tab[4] = { 0, 2, 3, 1 }; uint16_t ul_req_index; uint8_t dlsch_flag; + int first_rb_slice[NFAPI_CC_MAX]; if (sched_subframeP < subframeP) sched_frame++; @@ -1177,9 +1190,18 @@ schedule_ulsch_rnti(module_id_t module_idP, nfapi_ul_config_request_t *ul_req_tmp = &mac->UL_req_tmp[CC_id][sched_subframeP]; nfapi_ul_config_request_body_t *ul_req_tmp_body = &ul_req_tmp->ul_config_request_body; nfapi_ul_config_ulsch_harq_information *ulsch_harq_information; + + for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { + N_RB_UL = to_prb(cc[CC_id].ul_Bandwidth); + UE_list->first_rb_offset[CC_id][slice_id] = cmin(N_RB_UL, slice_first_rb[slice_id]); + } + //LOG_D(MAC, "entering ulsch preprocesor\n"); ulsch_scheduler_pre_processor(module_idP, slice_id, frameP, subframeP, sched_subframeP, first_rb); + for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { + first_rb_slice[CC_id] = first_rb[CC_id] + UE_list->first_rb_offset[CC_id][slice_id]; + } //LOG_D(MAC, "exiting ulsch preprocesor\n"); hi_dci0_req->sfn_sf = (frameP << 4) + subframeP; @@ -1265,7 +1287,7 @@ schedule_ulsch_rnti(module_id_t module_idP, } /* be sure that there are some free RBs */ - if (first_rb[CC_id] >= N_RB_UL - 1) { + if (first_rb_slice[CC_id] >= N_RB_UL - 1) { LOG_W(MAC, "[eNB %d] frame %d subframe %d, UE %d/%x CC %d: dropping, not enough RBs\n", module_idP, frameP, subframeP, UE_id, rnti, CC_id); @@ -1390,7 +1412,7 @@ schedule_ulsch_rnti(module_id_t module_idP, // buffer_occupancy = UE_template->ul_total_buffer; - while (((rb_table[rb_table_index] > (N_RB_UL - 1 - first_rb[CC_id])) + while (((rb_table[rb_table_index] > (N_RB_UL - 1 - first_rb_slice[CC_id])) || (rb_table[rb_table_index] > 45)) && (rb_table_index > 0)) { rb_table_index--; @@ -1407,7 +1429,7 @@ schedule_ulsch_rnti(module_id_t module_idP, T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP), T_INT(harq_pid), T_INT(UE_template->mcs_UL[harq_pid]), - T_INT(first_rb[CC_id]), + T_INT(first_rb_slice[CC_id]), T_INT(rb_table[rb_table_index]), T_INT(UE_template->TBS_UL[harq_pid]), T_INT(ndi)); @@ -1417,14 +1439,14 @@ schedule_ulsch_rnti(module_id_t module_idP, module_idP, harq_pid, rnti, CC_id, frameP, subframeP, UE_id, UE_template->mcs_UL[harq_pid], - first_rb[CC_id], rb_table[rb_table_index], + first_rb_slice[CC_id], rb_table[rb_table_index], rb_table_index, UE_template->TBS_UL[harq_pid], harq_pid); // bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB) //store for possible retransmission UE_template->nb_rb_ul[harq_pid] = rb_table[rb_table_index]; - UE_template->first_rb_ul[harq_pid] = first_rb[CC_id]; + UE_template->first_rb_ul[harq_pid] = first_rb_slice[CC_id]; UE_sched_ctrl->ul_scheduled |= (1 << harq_pid); if (UE_id == UE_list->head) @@ -1456,7 +1478,7 @@ schedule_ulsch_rnti(module_id_t module_idP, hi_dci0_pdu->dci_pdu.dci_pdu_rel8.aggregation_level = aggregation; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.rnti = rnti; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.transmission_power = 6000; - hi_dci0_pdu->dci_pdu.dci_pdu_rel8.resource_block_start = first_rb[CC_id]; + hi_dci0_pdu->dci_pdu.dci_pdu_rel8.resource_block_start = first_rb_slice[CC_id]; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.number_of_resource_block = rb_table[rb_table_index]; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.mcs_1 = UE_template->mcs_UL[harq_pid]; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cyclic_shift_2_for_drms = cshift; @@ -1554,13 +1576,13 @@ schedule_ulsch_rnti(module_id_t module_idP, LOG_D(MAC,"[PUSCH %d] SFN/SF:%04d%d UL_CFG:SFN/SF:%04d%d CQI:%d for UE %d/%x\n", harq_pid,frameP,subframeP,ul_sched_frame,ul_sched_subframeP,cqi_req,UE_id,rnti); // increment first rb for next UE allocation - first_rb[CC_id] += rb_table[rb_table_index]; + first_rb_slice[CC_id] += rb_table[rb_table_index]; } else { // round > 0 => retransmission T(T_ENB_MAC_UE_UL_SCHEDULE_RETRANSMISSION, T_INT(module_idP), T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP), T_INT(harq_pid), T_INT(UE_template->mcs_UL[harq_pid]), - T_INT(first_rb[CC_id]), + T_INT(first_rb_slice[CC_id]), T_INT(rb_table[rb_table_index]), T_INT(round)); // Add UL_config PDUs diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.h b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.h index 45d7a4e709..517c13b1f3 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.h +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.h @@ -52,6 +52,9 @@ float total_slice_percentage_current_uplink = 0; int slice_maxmcs_uplink[MAX_NUM_SLICES] = {20, 20, 20, 20}; int slice_maxmcs_current_uplink[MAX_NUM_SLICES] = {20,20,20,20}; +int slice_first_rb[MAX_NUM_SLICES] = {0, 0, 0, 0}; +int slice_first_rb_current[MAX_NUM_SLICES] = {0,0,0,0}; + /*resource blocks allowed*/ uint16_t nb_rbs_allowed_slice_uplink[NFAPI_CC_MAX][MAX_NUM_SLICES]; /*Slice Update */ diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h index d8fe034183..fde36f3c98 100644 --- a/openair2/LAYER2/MAC/mac.h +++ b/openair2/LAYER2/MAC/mac.h @@ -1102,6 +1102,7 @@ typedef struct { /// Sorting criteria for the UE list in the MAC preprocessor uint16_t sorting_criteria[MAX_NUM_SLICES][CR_NUM]; + uint16_t first_rb_offset[NFAPI_CC_MAX][MAX_NUM_SLICES]; } UE_list_t; diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index d04d89f7b1..edffc1d5db 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -178,6 +178,9 @@ store_dlsch_buffer(module_id_t Mod_id, } } +int cqi2mcs(int cqi) { + return cqi_to_mcs[cqi]; +} // This function returns the estimated number of RBs required by each UE for downlink scheduling void @@ -412,6 +415,7 @@ static int ue_dl_compare(const void *_a, const void *_b, void *_params) return -1; if (cqi1 < cqi2) return 1; + break; case CR_LCP : if (lcgid1 < lcgid2) @@ -439,7 +443,7 @@ void decode_sorting_policy(module_id_t Mod_idP, slice_id_t slice_id) { criterion = (uint16_t) (policy >> 4 * (CR_NUM - 1 - i) & mask); if (criterion >= CR_NUM) { LOG_W(MAC, "Invalid criterion in slice %d policy, revert to default policy \n", slice_id); - slice_sorting[slice_id] = 0x1234; + slice_sorting[slice_id] = 0x12345; break; } UE_list->sorting_criteria[slice_id][i] = criterion; @@ -1684,6 +1688,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, UE_TEMPLATE *UE_template = 0; UE_sched_ctrl *ue_sched_ctl; int N_RB_UL = 0; + uint16_t available_rbs, first_rb_offset; LOG_D(MAC, "In ulsch_preprocessor: assign max mcs min rb\n"); // maximize MCS and then allocate required RB according to the buffer occupancy with the limit of max available UL RB @@ -1757,12 +1762,16 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id] = nb_rbs_allowed_slice(slice_percentage_uplink[slice_id], N_RB_UL); + first_rb_offset = UE_list->first_rb_offset[CC_id][slice_id]; + available_rbs = cmin(ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id], + N_RB_UL - first_rb[CC_id] - first_rb_offset); + if (total_ue_count[CC_id] == 0) { average_rbs_per_user[CC_id] = 0; } else if (total_ue_count[CC_id] == 1) { // increase the available RBs, special case, - average_rbs_per_user[CC_id] = ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id] - first_rb[CC_id] + 1; - } else if (total_ue_count[CC_id] <= (ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id] - first_rb[CC_id])) { - average_rbs_per_user[CC_id] = (uint16_t) floor((ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id] - first_rb[CC_id]) / total_ue_count[CC_id]); + average_rbs_per_user[CC_id] = (uint16_t) (available_rbs + 1); + } else if (total_ue_count[CC_id] <= available_rbs) { + average_rbs_per_user[CC_id] = (uint16_t) floor(available_rbs / total_ue_count[CC_id]); } else { average_rbs_per_user[CC_id] = 1; LOG_W(MAC, @@ -1834,8 +1843,11 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, // This is the actual CC_id in the list CC_id = UE_list->ordered_ULCCids[n][UE_id]; UE_template = &UE_list->UE_template[CC_id][UE_id]; - total_remaining_rbs[CC_id] = - ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id] - first_rb[CC_id] - total_allocated_rbs[CC_id]; + N_RB_UL = to_prb(RC.mac[module_idP]->common_channels[CC_id].ul_Bandwidth); + first_rb_offset = UE_list->first_rb_offset[CC_id][slice_id]; + available_rbs = cmin(ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id], + N_RB_UL - first_rb[CC_id] - first_rb_offset); + total_remaining_rbs[CC_id] = available_rbs - total_allocated_rbs[CC_id]; if (total_ue_count[CC_id] == 1) { total_remaining_rbs[CC_id] += 1; @@ -1885,6 +1897,7 @@ assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP, UE_sched_ctrl *ue_sched_ctl; int Ncp; int N_RB_UL; + int first_rb_offset, available_rbs; for (i = 0; i < MAX_MOBILES_PER_ENB; i++) { if (UE_list->active[i] != TRUE) @@ -1951,18 +1964,20 @@ assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP, tx_power = estimate_ue_tx_power(tbs, rb_table[rb_table_index], 0, Ncp, 0); // fixme: set use_srs } + first_rb_offset = UE_list->first_rb_offset[CC_id][slice_id]; + available_rbs = cmin(ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id], + N_RB_UL - first_rb[CC_id] - first_rb_offset); + while ((tbs < bits_to_schedule) - && (rb_table[rb_table_index] < (ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id] - first_rb[CC_id])) - && ((UE_template->phr_info - tx_power) > 0) - && (rb_table_index < 32)) { + && (rb_table[rb_table_index] < available_rbs) + && ((UE_template->phr_info - tx_power) > 0) + && (rb_table_index < 32)) { rb_table_index++; tbs = get_TBS_UL(UE_template->pre_assigned_mcs_ul, rb_table[rb_table_index]) << 3; tx_power = estimate_ue_tx_power(tbs, rb_table[rb_table_index], 0, Ncp, 0); } - UE_template->ue_tx_power = tx_power; - - if (rb_table[rb_table_index] > (ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id] - first_rb[CC_id] - 1)) { + if (rb_table[rb_table_index] > (available_rbs - 1)) { rb_table_index--; } // 1 or 2 PRB with cqi enabled does not work well @@ -2086,7 +2101,3 @@ void sort_ue_ul(module_id_t module_idP, int frameP, sub_frame_t subframeP) UE_list->head_ul = -1; } } - -int cqi2mcs(int cqi) { - return cqi_to_mcs[cqi]; -} From 5cbe5c0df3a684d82f9ceabddb09840c258c1d9b Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 27 Mar 2018 18:26:17 +0200 Subject: [PATCH 089/379] remove useless headers in scheduler --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index a8703050f3..d1849a2216 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -55,10 +55,6 @@ #include "intertask_interface.h" #endif -#include "ENB_APP/flexran_agent_defs.h" -#include "flexran_agent_ran_api.h" -#include "header.pb-c.h" -#include "flexran.pb-c.h" #include #include "T.h" From 1e840a9996920f8c022288aa583ab7e3115fd101 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 30 Mar 2018 12:08:38 +0200 Subject: [PATCH 090/379] FlexRAN: add slice configuration protobuf messages --- .../ENB_APP/MESSAGES/V2/config_common.proto | 83 ++++++++++++++++++- .../ENB_APP/MESSAGES/V2/config_messages.proto | 15 ++++ 2 files changed, 97 insertions(+), 1 deletion(-) diff --git a/openair2/ENB_APP/MESSAGES/V2/config_common.proto b/openair2/ENB_APP/MESSAGES/V2/config_common.proto index 7b392b6b3b..3af59c1537 100644 --- a/openair2/ENB_APP/MESSAGES/V2/config_common.proto +++ b/openair2/ENB_APP/MESSAGES/V2/config_common.proto @@ -58,6 +58,87 @@ enum flex_qam { FLEQ_MOD_64QAM = 1; } +// +// Slice config related structures and enums +// +enum flex_dl_sorting { + + CR_ROUND = 0; // Highest HARQ first + CR_SRB12 = 1; // Highest SRB1+2 first + CR_HOL = 2; // Highest HOL first + CR_LC = 3; // Greatest RLC buffer first + CR_CQI = 4; // Highest CQI first + CR_LCP = 5; // Highest LC priority first +} + +enum flex_ul_sorting { + CRU_ROUND = 0; // Highest HARQ first + CRU_BUF = 1; // Highest BSR first + CRU_BTS = 2; // More bytes to schedule first + CRU_MCS = 3; // Highest MCS first + CRU_LCP = 4; // Highest LC priority first + CRU_HOL = 5; // Highest HOL first +} + +enum flex_dl_accounting_policy { + POL_FAIR = 0; + POL_GREEDY = 1; + POL_NUM = 2; +} + +enum flex_ul_accounting_policy { + POLU_FAIR = 0; + POLU_GREEDY = 1; + POLU_NUM = 2; +} + +enum flex_slice_label { + xMBB = 0; + URLLC = 1; + mMTC = 2; + xMTC = 3; + Other = 4; +} + +message flex_dl_slice { + optional uint32 id = 1; + optional flex_slice_label label = 2; + // should be between 0 and 100 + optional uint32 percentage = 3; + // whether this slice should be exempted form interslice sharing + optional bool isolation = 4; + // increasing value means increasing prio + optional uint32 priority = 5; + // min and max RB to use (in frequency) in the range [0, N_RBG_MAX] + optional uint32 position_low = 6; + optional uint32 position_high = 7; + // maximum MCS to be allowed in this slice + optional uint32 maxmcs = 8; + repeated flex_dl_sorting sorting = 9; + optional flex_dl_accounting_policy accounting = 10; + optional string scheduler_name = 11; +} + +message flex_ul_slice { + optional uint32 id = 1; + optional flex_slice_label label = 2; + // should be between 0 and 100 + optional uint32 percentage = 3; + // whether this slice should be exempted form interslice sharing + optional bool isolation = 4; + // increasing value means increasing prio + optional uint32 priority = 5; + // RB start to use (in frequency) in the range [0, N_RB_MAX] + optional uint32 first_rb = 6; + // TODO RB number + //optional uint32 length_rb = 7; + // maximum MCS to be allowed in this slice + optional uint32 maxmcs = 8; + repeated flex_ul_sorting sorting = 9; + optional flex_ul_accounting_policy accounting = 10; + optional string scheduler_name = 11; +} + // // UE config related structures and enums // @@ -177,4 +258,4 @@ enum flex_ue_state_change_type { FLUESC_ACTIVATED = 1; FLUESC_DEACTIVATED = 2; FLUESC_MOVED = 3; -} \ No newline at end of file +} diff --git a/openair2/ENB_APP/MESSAGES/V2/config_messages.proto b/openair2/ENB_APP/MESSAGES/V2/config_messages.proto index f734686f01..b186193b8c 100644 --- a/openair2/ENB_APP/MESSAGES/V2/config_messages.proto +++ b/openair2/ENB_APP/MESSAGES/V2/config_messages.proto @@ -43,6 +43,19 @@ message flex_cell_config { optional uint32 eutra_band= 37; // operating band optional int32 dl_pdsch_power = 38; // operating downlink power optional int32 ul_pusch_power = 39; // operating uplink power + + // whether remaining RBs after first intra-slice allocation will + // be allocated to UEs of the same slice + optional bool intraslice_share_active = 40; + // whether remaining RBs after slice allocation will be allocated + // to UEs of another slice. Isolated slices will be ignored. + optional bool interslice_share_active = 41; + optional flex_slice_config slice_config = 42; +} + +message flex_slice_config { + repeated flex_dl_slice dl = 1; + repeated flex_ul_slice ul = 2; } message flex_ue_config { @@ -82,6 +95,8 @@ message flex_ue_config { repeated flex_scell_config scell_config = 28; // Secondary cells configuration optional uint32 scell_deactivation_timer = 29;// Deactivation timer for secondary cell optional uint64 imsi = 30; + optional uint32 dl_slice_id = 31; + optional uint32 ul_slice_id = 32; } message flex_lc_ue_config { From 58c2a006265b5b22e0fc94b53c5c81b6ba9c1e31 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 30 Mar 2018 18:33:53 +0200 Subject: [PATCH 091/379] MAC: slicing conf struct in RC - introduce structure in RC for slicing conf (UL/DL) - move global variables regarding slice configuration into RC - change ue_slice_membership(): consider UL/DL - remove the unnecessary header files - set default parameters: one slice --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 245 +++++++++--------- openair2/LAYER2/MAC/eNB_scheduler_dlsch.h | 94 ------- .../LAYER2/MAC/eNB_scheduler_primitives.c | 4 +- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 124 ++++----- openair2/LAYER2/MAC/eNB_scheduler_ulsch.h | 74 ------ openair2/LAYER2/MAC/mac.h | 156 +++++++++-- openair2/LAYER2/MAC/mac_proto.h | 20 +- openair2/LAYER2/MAC/main.c | 46 +++- openair2/LAYER2/MAC/pre_processor.c | 98 ++++--- 9 files changed, 424 insertions(+), 437 deletions(-) delete mode 100644 openair2/LAYER2/MAC/eNB_scheduler_dlsch.h delete mode 100644 openair2/LAYER2/MAC/eNB_scheduler_ulsch.h diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index d1849a2216..236b0c05f1 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -29,6 +29,7 @@ */ +#define _GNU_SOURCE #include "LAYER2/MAC/mac.h" #include "LAYER2/MAC/mac_proto.h" @@ -44,7 +45,6 @@ #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" //#include "LAYER2/MAC/pre_processor.c" -#include "eNB_scheduler_dlsch.h" #include "pdcp.h" #include "SIMULATION/TOOLS/sim.h" // for taus @@ -62,11 +62,9 @@ #define ENABLE_MAC_PAYLOAD_DEBUG //#define DEBUG_eNB_SCHEDULER 1 +#include "common/ran_context.h" extern RAN_CONTEXT_t RC; extern uint8_t nfapi_mode; -extern pre_processor_results_t pre_processor_results[MAX_NUM_SLICES]; -extern int slice_isolation[MAX_NUM_SLICES]; -extern int slice_priority[MAX_NUM_SLICES]; //------------------------------------------------------------------------------ void @@ -413,195 +411,196 @@ void schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, int *mbsfn_flag) { int i = 0; + slice_info_t *sli = &RC.mac[module_idP]->slice_info; - slice_percentage_total = 0; - slice_percentage_avg = 1.0 / n_active_slices; - slice_counter = n_active_slices; + sli->tot_pct_dl = 0; + sli->avg_pct_dl = 1.0 / sli->n_dl; + sli->slice_counter = sli->n_dl; // reset the slice percentage for inactive slices - for (i = n_active_slices; i < MAX_NUM_SLICES; i++) { - slice_percentage[i] = 0; + for (i = sli->n_dl; i < MAX_NUM_SLICES; i++) { + sli->dl[i].pct = 0; } - for (i = 0; i < n_active_slices; i++) { - if (slice_percentage[i] < 0) { + for (i = 0; i < sli->n_dl; i++) { + if (sli->dl[i].pct < 0) { LOG_W(MAC, "[eNB %d] frame %d subframe %d:invalid slice %d percentage %f. resetting to zero", - module_idP, frameP, subframeP, i, slice_percentage[i]); - slice_percentage[i] = 0; + module_idP, frameP, subframeP, i, sli->dl[i].pct); + sli->dl[i].pct = 0; } - slice_percentage_total += slice_percentage[i]; + sli->tot_pct_dl += sli->dl[i].pct; } // Check for *intra*slice share activation - if (intraslice_share_active_current != intraslice_share_active) { - if (intraslice_share_active != 1 && intraslice_share_active != 0) { + if (sli->intraslice_share_active_current != sli->intraslice_share_active) { + if (sli->intraslice_share_active != 1 && sli->intraslice_share_active != 0) { LOG_W(MAC, "[eNB %d][DL] frame %d subframe %d: invalid intraslice sharing status (%d), revert to its previous value (%d)\n", - module_idP, frameP, subframeP, intraslice_share_active, intraslice_share_active_current); - intraslice_share_active = intraslice_share_active_current; + module_idP, frameP, subframeP, sli->intraslice_share_active, sli->intraslice_share_active_current); + sli->intraslice_share_active = sli->intraslice_share_active_current; } else { LOG_N(MAC, "[eNB %d][DL] frame %d subframe %d: intraslice sharing status has changed (%x-->%x)\n", - module_idP, frameP, subframeP, intraslice_share_active_current, intraslice_share_active); - intraslice_share_active_current = intraslice_share_active; + module_idP, frameP, subframeP, sli->intraslice_share_active_current, sli->intraslice_share_active); + sli->intraslice_share_active_current = sli->intraslice_share_active; } } // Check for *inter*slice share activation - if (interslice_share_active_current != interslice_share_active) { - if (interslice_share_active != 1 && interslice_share_active != 0) { + if (sli->interslice_share_active_current != sli->interslice_share_active) { + if (sli->interslice_share_active != 1 && sli->interslice_share_active != 0) { LOG_W(MAC, "[eNB %d][DL] frame %d subframe %d: invalid interslice sharing status (%d), revert to its previous value (%d)\n", - module_idP, frameP, subframeP, interslice_share_active, interslice_share_active_current); - interslice_share_active = interslice_share_active_current; + module_idP, frameP, subframeP, sli->interslice_share_active, sli->interslice_share_active_current); + sli->interslice_share_active = sli->interslice_share_active_current; } else { LOG_N(MAC, "[eNB %d][DL] frame %d subframe %d: interslice sharing status has changed (%x-->%x)\n", - module_idP, frameP, subframeP, interslice_share_active_current, interslice_share_active); - interslice_share_active_current = interslice_share_active; + module_idP, frameP, subframeP, sli->interslice_share_active_current, sli->interslice_share_active); + sli->interslice_share_active_current = sli->interslice_share_active; } } - for (i = 0; i < n_active_slices; i++) { + for (i = 0; i < sli->n_dl; i++) { // Load any updated functions - if (update_dl_scheduler[i] > 0) { - slice_sched_dl[i] = dlsym(NULL, dl_scheduler_type[i]); - update_dl_scheduler[i] = 0; - update_dl_scheduler_current[i] = 0; + if (sli->dl[i].update_sched > 0) { + sli->dl[i].sched_cb = dlsym(NULL, sli->dl[i].sched_name); + sli->dl[i].update_sched = 0; + sli->dl[i].update_sched_current = 0; LOG_I(MAC, "update dl scheduler slice %d\n", i); } - if (slice_percentage_total <= 1.0) { // the new total RB share is within the range + if (sli->tot_pct_dl <= 1.0) { // the new total RB share is within the range // check if the number of slices has changed, and log - if (n_active_slices_current != n_active_slices) { - if ((n_active_slices > 0) && (n_active_slices <= MAX_NUM_SLICES)) { + if (sli->n_dl_current != sli->n_dl) { + if ((sli->n_dl > 0) && (sli->n_dl <= MAX_NUM_SLICES)) { LOG_I(MAC, "[eNB %d]frame %d subframe %d: number of active DL slices has changed: %d-->%d\n", - module_idP, frameP, subframeP, n_active_slices_current, n_active_slices); - n_active_slices_current = n_active_slices; + module_idP, frameP, subframeP, sli->n_dl_current, sli->n_dl); + sli->n_dl_current = sli->n_dl; } else { LOG_W(MAC, "invalid number of DL slices %d, revert to the previous value %d\n", - n_active_slices, n_active_slices_current); - n_active_slices = n_active_slices_current; + sli->n_dl, sli->n_dl_current); + sli->n_dl = sli->n_dl_current; } } // check if the slice rb share has changed, and log the console - if (slice_percentage_current[i] != slice_percentage[i]) { // new slice percentage + if (sli->dl[i].pct_current != sli->dl[i].pct) { // new slice percentage LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f\n", - module_idP, i, frameP, subframeP, slice_percentage_total_current, slice_percentage_total, - slice_percentage_current[i], slice_percentage[i]); - slice_percentage_total_current = slice_percentage_total; - slice_percentage_current[i] = slice_percentage[i]; + module_idP, i, frameP, subframeP, sli->tot_pct_dl_current, sli->tot_pct_dl, + sli->dl[i].pct_current, sli->dl[i].pct); + sli->tot_pct_dl_current = sli->tot_pct_dl; + sli->dl[i].pct_current = sli->dl[i].pct; } // check if the slice max MCS, and log the console - if (slice_maxmcs_current[i] != slice_maxmcs[i]) { - if ((slice_maxmcs[i] >= 0) && (slice_maxmcs[i] < 29)) { + if (sli->dl[i].maxmcs_current != sli->dl[i].maxmcs) { + if ((sli->dl[i].maxmcs >= 0) && (sli->dl[i].maxmcs < 29)) { LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: slice MAX MCS has changed: %d-->%d\n", - module_idP, i, frameP, subframeP, slice_maxmcs_current[i], slice_maxmcs[i]); - slice_maxmcs_current[i] = slice_maxmcs[i]; + module_idP, i, frameP, subframeP, sli->dl[i].maxmcs_current, sli->dl[i].maxmcs); + sli->dl[i].maxmcs_current = sli->dl[i].maxmcs; } else { LOG_W(MAC, "[eNB %d][SLICE %d][DL] invalid slice max mcs %d, revert the previous value %d\n", - module_idP, i, slice_maxmcs[i], slice_maxmcs_current[i]); - slice_maxmcs[i] = slice_maxmcs_current[i]; + module_idP, i, sli->dl[i].maxmcs, sli->dl[i].maxmcs_current); + sli->dl[i].maxmcs = sli->dl[i].maxmcs_current; } } // check if a new scheduler, and log the console - if (update_dl_scheduler_current[i] != update_dl_scheduler[i]){ - LOG_N(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: DL scheduler for this slice is updated: %s \n", - module_idP, i, frameP, subframeP, dl_scheduler_type[i]); - update_dl_scheduler_current[i] = update_dl_scheduler[i]; + if (sli->dl[i].update_sched_current != sli->dl[i].update_sched) { + LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: DL scheduler for this slice is updated: %s \n", + module_idP, i, frameP, subframeP, sli->dl[i].sched_name); + sli->dl[i].update_sched_current = sli->dl[i].update_sched; } } else { // here we can correct the values, e.g. reduce proportionally - if (n_active_slices == n_active_slices_current) { + if (sli->n_dl == sli->n_dl_current) { LOG_W(MAC, "[eNB %d][SLICE %d][DL] invalid total RB share (%f->%f), reduce proportionally the RB share by 0.1\n", - module_idP, i, slice_percentage_total_current, slice_percentage_total); - if (slice_percentage[i] >= slice_percentage_avg) { - slice_percentage[i] -= 0.1; - slice_percentage_total -= 0.1; + module_idP, i, sli->tot_pct_dl_current, sli->tot_pct_dl); + if (sli->dl[i].pct >= sli->avg_pct_dl) { + sli->dl[i].pct -= 0.1; + sli->tot_pct_dl -= 0.1; } } else { LOG_W(MAC, "[eNB %d][SLICE %d][DL] invalid total RB share (%f->%f), revert the number of slice to its previous value (%d->%d)\n", - module_idP, i, slice_percentage_total_current, slice_percentage_total, - n_active_slices, n_active_slices_current); - n_active_slices = n_active_slices_current; - slice_percentage[i] = slice_percentage_current[i]; + module_idP, i, sli->tot_pct_dl_current, sli->tot_pct_dl, + sli->n_dl, sli->n_dl_current); + sli->n_dl = sli->n_dl_current; + sli->dl[i].pct = sli->dl[i].pct_current; } } // Check for new slice positions - if (slice_position[i * 2] > slice_position[i * 2 + 1] || - slice_position[i * 2] < 0 || - slice_position[i * 2 + 1] > N_RBG_MAX) { + if (sli->dl[i].pos_low > sli->dl[i].pos_high || + sli->dl[i].pos_low < 0 || + sli->dl[i].pos_high > N_RBG_MAX) { LOG_W(MAC, "[eNB %d][SLICE %d][DL] invalid slicing position (%d-%d), using previous values (%d-%d)\n", module_idP, i, - slice_position[i * 2], slice_position[i * 2 + 1], - slice_position_current[i * 2], slice_position_current[i * 2 + 1]); - slice_position[i * 2] = slice_position_current[i * 2]; - slice_position[i * 2 + 1] = slice_position_current[i * 2 + 1]; + sli->dl[i].pos_low, sli->dl[i].pos_high, + sli->dl[i].pos_low_current, sli->dl[i].pos_high_current); + sli->dl[i].pos_low = sli->dl[i].pos_low_current; + sli->dl[i].pos_high = sli->dl[i].pos_high_current; } else { - if (slice_position_current[i * 2] != slice_position[i * 2]) { + if (sli->dl[i].pos_low_current != sli->dl[i].pos_low) { LOG_N(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: start frequency has changed (%d-->%d)\n", - module_idP, i, frameP, subframeP, slice_position_current[i * 2], slice_position[i * 2]); - slice_position_current[i * 2] = slice_position[i * 2]; + module_idP, i, frameP, subframeP, sli->dl[i].pos_low_current, sli->dl[i].pos_low); + sli->dl[i].pos_low_current = sli->dl[i].pos_low; } - if (slice_position_current[i * 2 + 1] != slice_position[i * 2 + 1]) { + if (sli->dl[i].pos_high_current != sli->dl[i].pos_high) { LOG_N(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: end frequency has changed (%d-->%d)\n", - module_idP, i, frameP, subframeP, slice_position_current[i * 2 + 1], slice_position[i * 2 + 1]); - slice_position_current[i * 2 + 1] = slice_position[i * 2 + 1]; + module_idP, i, frameP, subframeP, sli->dl[i].pos_high_current, sli->dl[i].pos_high); + sli->dl[i].pos_high_current = sli->dl[i].pos_high; } } // Check for new sorting policy - if (slice_sorting_current[i] != slice_sorting[i]) { + if (sli->dl[i].sorting_current != sli->dl[i].sorting) { LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n", - module_idP, i, frameP, subframeP, slice_sorting_current[i], slice_sorting[i]); - slice_sorting_current[i] = slice_sorting[i]; + module_idP, i, frameP, subframeP, sli->dl[i].sorting_current, sli->dl[i].sorting); + sli->dl[i].sorting_current = sli->dl[i].sorting; } // Check for new slice isolation - if (slice_isolation_current[i] != slice_isolation[i]) { - if (slice_isolation[i] != 1 && slice_isolation[i] != 0) { + if (sli->dl[i].isol_current != sli->dl[i].isol) { + if (sli->dl[i].isol != 1 && sli->dl[i].isol != 0) { LOG_W(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: invalid slice isolation setting (%d), revert to its previous value (%d)\n", - module_idP, i, frameP, subframeP, slice_isolation[i], slice_isolation_current[i]); - slice_isolation[i] = slice_isolation_current[i]; + module_idP, i, frameP, subframeP, sli->dl[i].isol, sli->dl[i].isol_current); + sli->dl[i].isol = sli->dl[i].isol_current; } else { LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: slice isolation setting has changed (%x-->%x)\n", - module_idP, i, frameP, subframeP, slice_isolation_current[i], slice_isolation[i]); - slice_isolation_current[i] = slice_isolation[i]; + module_idP, i, frameP, subframeP, sli->dl[i].isol_current, sli->dl[i].isol); + sli->dl[i].isol_current = sli->dl[i].isol; } } // Check for new slice priority - if (slice_priority_current[i] != slice_priority[i]) { - LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: slice priority setting has changed (%x-->%x)\n", - module_idP, i, frameP, subframeP, slice_priority_current[i], slice_priority[i]); - slice_priority_current[i] = slice_priority[i]; + if (sli->dl[i].prio_current != sli->dl[i].prio) { + LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: slice priority setting has changed (%d-->%d)\n", + module_idP, i, frameP, subframeP, sli->dl[i].prio_current, sli->dl[i].prio); + sli->dl[i].prio_current = sli->dl[i].prio; } // Check for new accounting policy - if (slice_accounting_current[i] != slice_accounting[i]) { - if (slice_accounting[i] > 1 || slice_accounting[i] < 0) { + if (sli->dl[i].accounting_current != sli->dl[i].accounting) { + if (sli->dl[i].accounting > 1 || sli->dl[i].accounting < 0) { LOG_W(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: invalid accounting policy (%d), revert to its previous value (%d)\n", - module_idP, i, frameP, subframeP, slice_accounting[i], slice_accounting_current[i]); - slice_accounting[i] = slice_accounting_current[i]; + module_idP, i, frameP, subframeP, sli->dl[i].accounting, sli->dl[i].accounting_current); + sli->dl[i].accounting = sli->dl[i].accounting_current; } else { LOG_N(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n", - module_idP, i, frameP, subframeP, slice_accounting_current[i], slice_accounting[i]); - slice_accounting_current[i] = slice_accounting[i]; + module_idP, i, frameP, subframeP, sli->dl[i].accounting_current, sli->dl[i].accounting); + sli->dl[i].accounting_current = sli->dl[i].accounting; } } // Run each enabled slice-specific schedulers one by one - slice_sched_dl[i](module_idP, i, frameP, subframeP, mbsfn_flag/*, dl_info*/); + sli->dl[i].sched_cb(module_idP, i, frameP, subframeP, mbsfn_flag/*, dl_info*/); } } @@ -728,15 +727,15 @@ schedule_ue_spec(module_id_t module_idP, slice_id_t slice_idP, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR, VCD_FUNCTION_OUT); - slice_counter--; + RC.mac[module_idP]->slice_info.slice_counter--; // Do the multiplexing and actual allocation only when all slices have been pre-processed. - if (slice_counter > 0) { + if (RC.mac[module_idP]->slice_info.slice_counter > 0) { stop_meas(&eNB->schedule_dlsch); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, VCD_FUNCTION_OUT); return; } - if (interslice_share_active) { + if (RC.mac[module_idP]->slice_info.interslice_share_active) { dlsch_scheduler_interslice_multiplexing(module_idP, frameP, subframeP); } @@ -764,7 +763,7 @@ schedule_ue_spec(module_id_t module_idP, slice_id_t slice_idP, continue_flag = 1; } - if (!ue_slice_membership(UE_id, slice_idP)) + if (!ue_slice_membership(UE_id, slice_idP, RC.mac[module_idP]->slice_info.n_dl)) continue; if (continue_flag != 1) { @@ -839,7 +838,7 @@ schedule_ue_spec(module_id_t module_idP, slice_id_t slice_idP, eNB_UE_stats->dlsch_mcs1 = 10; // cqi_to_mcs[ue_sched_ctl->dl_cqi[CC_id]]; } else { // this operation is also done in the preprocessor eNB_UE_stats->dlsch_mcs1 = cmin(eNB_UE_stats->dlsch_mcs1, - slice_maxmcs[slice_idP]); // cmin(eNB_UE_stats->dlsch_mcs1, openair_daq_vars.target_ue_dl_mcs); + RC.mac[module_idP]->slice_info.dl[slice_idP].maxmcs); // cmin(eNB_UE_stats->dlsch_mcs1, openair_daq_vars.target_ue_dl_mcs); } // Store stats @@ -1614,6 +1613,7 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub int owned, used; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; + slice_info_t *sli = &RC.mac[Mod_id]->slice_info; UE_sched_ctrl *ue_sched_ctl; COMMON_channels_t *cc; int N_RBG[NFAPI_CC_MAX]; @@ -1637,10 +1637,10 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub cc = &RC.mac[Mod_id]->common_channels[CC_id]; N_RBG[CC_id] = to_rbg(cc->mib->message.dl_Bandwidth); for (rbg = 0; rbg < N_RBG[CC_id]; ++rbg) { - for (i = 0; i < n_active_slices; ++i) { - owned = pre_processor_results[i].slice_allocation_mask[CC_id][rbg]; + for (i = 0; i < sli->n_dl; ++i) { + owned = sli->pre_processor_results[i].slice_allocation_mask[CC_id][rbg]; if (owned) { - used = pre_processor_results[i].slice_allocated_rbgs[CC_id][rbg]; + used = sli->pre_processor_results[i].slice_allocated_rbgs[CC_id][rbg]; free_rbgs_map[CC_id][rbg] = used ? -1 : i; break; } @@ -1651,10 +1651,10 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub // Find out which slices need other resources. // FIXME: I don't think is really needed since we check nb_rbs_remaining later for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { - for (i = 0; i < n_active_slices; ++i) { + for (i = 0; i < sli->n_dl; ++i) { has_traffic[CC_id][i] = 0; for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; ++UE_id) { - if (pre_processor_results[i].nb_rbs_remaining[CC_id][UE_id] > 0) { + if (sli->pre_processor_results[i].nb_rbs_remaining[CC_id][UE_id] > 0) { has_traffic[CC_id][i] = 1; break; } @@ -1662,7 +1662,7 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub } } - slice_priority_sort(slice_sorted_list); + slice_priority_sort(Mod_id, slice_sorted_list); // MULTIPLEXING // This part is an adaptation of dlsch_scheduler_pre_processor_allocate() code @@ -1671,7 +1671,7 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub N_RB_DL = to_prb(RC.mac[Mod_id]->common_channels[CC_id].mib->message.dl_Bandwidth); min_rb_unit = get_min_rb_unit(Mod_id, CC_id); - for (i = 0; i < n_active_slices; ++i) { + for (i = 0; i < sli->n_dl; ++i) { slice_id = slice_sorted_list[i]; if (has_traffic[CC_id][slice_id] == 0) continue; @@ -1683,7 +1683,7 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub allocation_mask[CC_id][rbg] = 0; continue; } - if (slice_isolation[free_rbgs_map[CC_id][rbg]] == 1) { + if (sli->dl[free_rbgs_map[CC_id][rbg]].isol == 1) { // RBG belongs to an isolated slice allocation_mask[CC_id][rbg] = 0; continue; @@ -1697,10 +1697,10 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub // FIXME: There is only one UE_list for all slices, so it must be sorted again each time we use it sort_UEs(Mod_id, (slice_id_t) slice_id, frameP, subframeP); - nb_rbs_remaining = pre_processor_results[slice_id].nb_rbs_remaining; - nb_rbs_required = pre_processor_results[slice_id].nb_rbs_required; - rballoc_sub = pre_processor_results[slice_id].slice_allocated_rbgs; - MIMO_mode_indicator = pre_processor_results[slice_id].MIMO_mode_indicator; + nb_rbs_remaining = sli->pre_processor_results[slice_id].nb_rbs_remaining; + nb_rbs_required = sli->pre_processor_results[slice_id].nb_rbs_required; + rballoc_sub = sli->pre_processor_results[slice_id].slice_allocated_rbgs; + MIMO_mode_indicator = sli->pre_processor_results[slice_id].MIMO_mode_indicator; // Allocation for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { @@ -1756,10 +1756,11 @@ void dlsch_scheduler_qos_multiplexing(module_id_t Mod_id, int frameP, sub_frame_ { int UE_id, CC_id, i; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; + slice_info_t *sli = &RC.mac[Mod_id]->slice_info; UE_sched_ctrl *ue_sched_ctl; for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { - for (i = 0; i < n_active_slices; ++i) { + for (i = 0; i < sli->n_dl; ++i) { // Sort UE again // FIXME: There is only one UE_list for all slices, so it must be sorted again each time we use it @@ -2330,23 +2331,25 @@ void schedule_PCH(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) return; } -static int slice_priority_compare(const void *_a, const void *_b) { +static int slice_priority_compare(const void *_a, const void *_b, void *_c) +{ + const int slice_id1 = *(const int *) _a; + const int slice_id2 = *(const int *) _b; + const module_id_t Mod_id = *(int *) _c; + const slice_info_t *sli = &RC.mac[Mod_id]->slice_info; - int slice_id1 = *(const int *) _a; - int slice_id2 = *(const int *) _b; - - if (slice_priority[slice_id1] > slice_priority[slice_id2]) { + if (sli->dl[slice_id1].prio > sli->dl[slice_id2].prio) { return -1; } return 1; } -void slice_priority_sort(int slice_list[MAX_NUM_SLICES]) { - +void slice_priority_sort(module_id_t Mod_id, int slice_list[MAX_NUM_SLICES]) +{ int i; for (i = 0; i < MAX_NUM_SLICES; ++i) { slice_list[i] = i; } - qsort(slice_list, MAX_NUM_SLICES, sizeof(int), slice_priority_compare); + qsort_r(slice_list, MAX_NUM_SLICES, sizeof(int), slice_priority_compare, &Mod_id); } diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h deleted file mode 100644 index e2aac32bf0..0000000000 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * 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.1 (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 LAYER2/MAC/eNB_scheduler_dlsch.h -* \brief DLSCH Scheduler policy variables used during different phases of scheduling -* \author Navid Nikaein and Niccolo' Iardella -* \date 2018 -* \version 0.2 -* \email navid.nikaein@eurecom.fr - -*/ -/** @defgroup _oai2 openair2 Reference Implementation - * @ingroup _ref_implementation_ - * @{ - */ - -/*@}*/ - -#ifndef __LAYER2_MAC_ENB_SCHEDULER_DLSCH_H__ -#define __LAYER2_MAC_ENB_SCHEDULER_DLSCH_H__ - -// number of active slices for past and current time -int n_active_slices = 1; -int n_active_slices_current = 1; -int slice_counter = 0; - -int intraslice_share_active = 1; -int intraslice_share_active_current = 1; -int interslice_share_active = 1; -int interslice_share_active_current = 1; - -// RB share for each slice for past and current time -float slice_percentage[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; -float slice_percentage_current[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; -float slice_percentage_total = 0; -float slice_percentage_total_current = 0; -float slice_percentage_avg = 0.25; - -int slice_isolation[MAX_NUM_SLICES] = {0, 0, 0, 0}; -int slice_isolation_current[MAX_NUM_SLICES] = {0, 0, 0, 0}; -int slice_priority[MAX_NUM_SLICES] = {10, 5, 2, 0}; -int slice_priority_current[MAX_NUM_SLICES] = {10, 5, 2, 0}; - -// Frequency ranges for slice positioning -int slice_position[MAX_NUM_SLICES*2] = {0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX}; -int slice_position_current[MAX_NUM_SLICES*2] = {0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX, 0, N_RBG_MAX}; - -// MAX MCS for each slice for past and current time -int slice_maxmcs[MAX_NUM_SLICES] = { 28, 28, 28, 28 }; -int slice_maxmcs_current[MAX_NUM_SLICES] = { 28, 28, 28, 28 }; - -// The lists of criteria that enforce the sorting policies of the slices -uint32_t slice_sorting[MAX_NUM_SLICES] = {0x012345, 0x012345, 0x012345, 0x012345}; -uint32_t slice_sorting_current[MAX_NUM_SLICES] = {0x012345, 0x012345, 0x012345, 0x012345}; - -// Accounting policy (just greedy(1) or fair(0) setting for now) -int slice_accounting[MAX_NUM_SLICES] = {0, 0, 0, 0}; -int slice_accounting_current[MAX_NUM_SLICES] = {0, 0, 0, 0}; - -int update_dl_scheduler[MAX_NUM_SLICES] = { 1, 1, 1, 1 }; -int update_dl_scheduler_current[MAX_NUM_SLICES] = { 1, 1, 1, 1 }; - -// name of available scheduler -char *dl_scheduler_type[MAX_NUM_SLICES] = - { "schedule_ue_spec", - "schedule_ue_spec", - "schedule_ue_spec", - "schedule_ue_spec" - }; - -// pointer to the slice specific scheduler -slice_scheduler_dl slice_sched_dl[MAX_NUM_SLICES] = {0}; - -pre_processor_results_t pre_processor_results[MAX_NUM_SLICES]; - -#endif //__LAYER2_MAC_ENB_SCHEDULER_DLSCH_H__ diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c index 5328920af3..4643fe41a1 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c @@ -62,8 +62,6 @@ extern uint16_t frame_cnt; extern RAN_CONTEXT_t RC; -extern int n_active_slices; - int choose(int n, int k) { int res = 1; @@ -4541,7 +4539,7 @@ uint16_t nb_rbs_allowed_slice(float rb_percentage, int total_rbs) return (uint16_t) floor(rb_percentage * total_rbs); } -int ue_slice_membership(int UE_id, int slice_id) +int ue_slice_membership(int UE_id, int slice_id, int n_active_slices) { if ((slice_id < 0) || (slice_id > n_active_slices)) LOG_W(MAC, "out of range slice id %d\n", slice_id); diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index fffc1a2209..5c31a7ef43 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -48,7 +48,6 @@ #include "assertions.h" //#include "LAYER2/MAC/pre_processor.c" -#include "eNB_scheduler_ulsch.h" #include "pdcp.h" #if defined(ENABLE_ITTI) @@ -64,6 +63,9 @@ #include "T.h" +#include "common/ran_context.h" +extern RAN_CONTEXT_t RC; + #define ENABLE_MAC_PAYLOAD_DEBUG #define DEBUG_eNB_SCHEDULER 1 @@ -923,6 +925,7 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP, uint16_t first_rb[NFAPI_CC_MAX], i; int CC_id; eNB_MAC_INST *mac = RC.mac[module_idP]; + slice_info_t *sli = &RC.mac[module_idP]->slice_info; COMMON_channels_t *cc; start_meas(&mac->schedule_ulsch); @@ -1037,112 +1040,112 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP, // perform slice-specifc operations - total_slice_percentage_uplink=0; - avg_slice_percentage_uplink=1.0/n_active_slices_uplink; + sli->tot_pct_ul = 0; + sli->avg_pct_ul = 1.0 / sli->n_ul; // reset the slice percentage for inactive slices - for (i = n_active_slices_uplink; i< MAX_NUM_SLICES; i++) { - slice_percentage_uplink[i]=0; + for (i = sli->n_ul; i< MAX_NUM_SLICES; i++) { + sli->ul[i].pct = 0; } - for (i = 0; i < n_active_slices_uplink; i++) { - if (slice_percentage_uplink[i] < 0 ){ + for (i = 0; i < sli->n_ul; i++) { + if (sli->ul[i].pct < 0 ){ LOG_W(MAC, "[eNB %d] frame %d subframe %d:invalid slice %d percentage %f. resetting to zero", - module_idP, frameP, subframeP, i, slice_percentage_uplink[i]); - slice_percentage_uplink[i]=0; + module_idP, frameP, subframeP, i, sli->ul[i].pct); + sli->ul[i].pct = 0; } - total_slice_percentage_uplink+=slice_percentage_uplink[i]; + sli->tot_pct_ul += sli->ul[i].pct; } - for (i = 0; i < n_active_slices_uplink; i++) { + for (i = 0; i < sli->n_ul; i++) { // Load any updated functions - if (update_ul_scheduler[i] > 0 ) { - slice_sched_ul[i] = dlsym(NULL, ul_scheduler_type[i]); - update_ul_scheduler[i] = 0; - update_ul_scheduler_current[i] = 0; - //slice_percentage_current_uplink[i]= slice_percentage_uplink[i]; - //total_slice_percentage_current_uplink+=slice_percentage_uplink[i]; - //if (total_slice_percentage_current_uplink> 1) - //total_slice_percentage_current_uplink=1; + if (sli->ul[i].update_sched > 0 ) { + sli->ul[i].sched_cb = dlsym(NULL, sli->ul[i].sched_name); + sli->ul[i].update_sched = 0; + sli->ul[i].update_sched_current = 0; + //sli->ul[i].pct_current = sli->ul[i].pct; + //sli->tot_pct_ul_current += sli->ul[i].pct; + //if (sli->tot_pct_ul_current > 1) + //sli->tot_pct_ul_current = 1; LOG_I(MAC,"update ul scheduler slice %d\n", i); } // the new total RB share is within the range - if (total_slice_percentage_uplink <= 1.0){ + if (sli->tot_pct_ul <= 1.0){ // check if the number of slices has changed, and log - if (n_active_slices_current_uplink != n_active_slices_uplink ){ - if ((n_active_slices_uplink > 0) && (n_active_slices_uplink <= MAX_NUM_SLICES)) { + if (sli->n_ul_current != sli->n_ul ){ + if ((sli->n_ul > 0) && (sli->n_ul <= MAX_NUM_SLICES)) { LOG_I(MAC,"[eNB %d]frame %d subframe %d: number of active UL slices has changed: %d-->%d\n", - module_idP, frameP, subframeP, n_active_slices_current_uplink, n_active_slices_uplink); - n_active_slices_current_uplink = n_active_slices_uplink; + module_idP, frameP, subframeP, sli->n_ul_current, sli->n_ul); + sli->n_ul_current = sli->n_ul; } else { LOG_W(MAC,"invalid number of UL slices %d, revert to the previous value %d\n", - n_active_slices_uplink, n_active_slices_current_uplink); - n_active_slices_uplink = n_active_slices_current_uplink; + sli->n_ul, sli->n_ul_current); + sli->n_ul = sli->n_ul_current; } } // check if the slice rb share has changed, and log the console - if (slice_percentage_current_uplink[i] != slice_percentage_uplink[i]){ + if (sli->ul[i].pct_current != sli->ul[i].pct){ LOG_I(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f\n", - module_idP, i, frameP, subframeP, total_slice_percentage_current_uplink, - total_slice_percentage_uplink, slice_percentage_current_uplink[i], slice_percentage_uplink[i]); - total_slice_percentage_current_uplink = total_slice_percentage_uplink; - slice_percentage_current_uplink[i] = slice_percentage_uplink[i]; + module_idP, i, frameP, subframeP, sli->tot_pct_ul_current, + sli->tot_pct_ul, sli->ul[i].pct_current, sli->ul[i].pct); + sli->tot_pct_ul_current = sli->tot_pct_ul; + sli->ul[i].pct_current = sli->ul[i].pct; } // check if the slice max MCS, and log the console - if (slice_maxmcs_current_uplink[i] != slice_maxmcs_uplink[i]){ - if ((slice_maxmcs_uplink[i] >= 0) && (slice_maxmcs_uplink[i] <= 16)){ + if (sli->ul[i].maxmcs_current != sli->ul[i].maxmcs){ + if ((sli->ul[i].maxmcs >= 0) && (sli->ul[i].maxmcs <= 16)){ LOG_I(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: slice MAX MCS has changed: %d-->%d\n", - module_idP, i, frameP, subframeP, slice_maxmcs_current_uplink[i], slice_maxmcs_uplink[i]); - slice_maxmcs_current_uplink[i] = slice_maxmcs_uplink[i]; + module_idP, i, frameP, subframeP, sli->ul[i].maxmcs_current, sli->ul[i].maxmcs); + sli->ul[i].maxmcs_current = sli->ul[i].maxmcs; } else { LOG_W(MAC,"[eNB %d][SLICE %d][UL] invalid slice max mcs %d, revert the previous value %d\n", - module_idP, i, slice_maxmcs_uplink[i],slice_maxmcs_current_uplink[i]); - slice_maxmcs_uplink[i] = slice_maxmcs_current_uplink[i]; + module_idP, i, sli->ul[i].maxmcs, sli->ul[i].maxmcs_current); + sli->ul[i].maxmcs = sli->ul[i].maxmcs_current; } } - if (slice_first_rb_current[i] != slice_first_rb[i]){ - if (slice_first_rb[i] >= 0){ // FIXME: Max limit is checked in the scheduler + if (sli->ul[i].first_rb_current != sli->ul[i].first_rb){ + if (sli->ul[i].first_rb >= 0){ // FIXME: Max limit is checked in the scheduler LOG_N(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: slice first rb has changed: %d-->%d\n", - module_idP, i, frameP, subframeP, slice_first_rb_current[i], slice_first_rb[i]); - slice_first_rb_current[i] = slice_first_rb[i]; + module_idP, i, frameP, subframeP, sli->ul[i].first_rb_current, sli->ul[i].first_rb); + sli->ul[i].first_rb_current = sli->ul[i].first_rb; } else { LOG_W(MAC,"[eNB %d][SLICE %d][UL] invalid slice first rb %d, revert the previous value %d\n", - module_idP, i, slice_first_rb[i],slice_first_rb_current[i]); - slice_first_rb[i] = slice_first_rb_current[i]; + module_idP, i, sli->ul[i].first_rb, sli->ul[i].first_rb_current); + sli->ul[i].first_rb = sli->ul[i].first_rb_current; } } // check if a new scheduler, and log the console - if (update_ul_scheduler_current[i] != update_ul_scheduler[i]){ + if (sli->ul[i].update_sched_current != sli->ul[i].update_sched) { LOG_I(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: UL scheduler for this slice is updated: %s \n", - module_idP, i, frameP, subframeP, ul_scheduler_type[i]); - update_ul_scheduler_current[i] = update_ul_scheduler[i]; + module_idP, i, frameP, subframeP, sli->ul[i].sched_name); + sli->ul[i].update_sched_current = sli->ul[i].update_sched; } } else { - if (n_active_slices_uplink == n_active_slices_current_uplink) { + if (sli->n_ul == sli->n_ul_current) { LOG_W(MAC,"[eNB %d][SLICE %d][UL] invalid total RB share (%f->%f), reduce proportionally the RB share by 0.1\n", - module_idP, i, total_slice_percentage_current_uplink, total_slice_percentage_uplink); - if (slice_percentage_uplink[i] > avg_slice_percentage_uplink) { - slice_percentage_uplink[i] -= 0.1; - total_slice_percentage_uplink -= 0.1; + module_idP, i, sli->tot_pct_ul_current, sli->tot_pct_ul); + if (sli->ul[i].pct > sli->avg_pct_ul) { + sli->ul[i].pct -= 0.1; + sli->tot_pct_ul -= 0.1; } } else { // here we can correct the values, e.g. reduce proportionally LOG_W(MAC,"[eNB %d][SLICE %d][UL] invalid total RB share (%f->%f), revert the number of slice to its previous value (%d->%d)\n", - module_idP, i, total_slice_percentage_current_uplink, - total_slice_percentage_uplink, n_active_slices_uplink, - n_active_slices_current_uplink); - n_active_slices_uplink = n_active_slices_current_uplink; - slice_percentage_uplink[i] = slice_percentage_current_uplink[i]; + module_idP, i, sli->tot_pct_ul_current, + sli->tot_pct_ul, sli->n_ul, + sli->n_ul_current); + sli->n_ul = sli->n_ul_current; + sli->ul[i].pct = sli->ul[i].pct_current; } } // Run each enabled slice-specific schedulers one by one - slice_sched_ul[i](module_idP, i, frameP, subframeP, sched_subframe, first_rb); + sli->ul[i].sched_cb(module_idP, i, frameP, subframeP, sched_subframe, first_rb); } stop_meas(&mac->schedule_ulsch); @@ -1172,6 +1175,7 @@ schedule_ulsch_rnti(module_id_t module_idP, eNB_MAC_INST *mac = RC.mac[module_idP]; COMMON_channels_t *cc = mac->common_channels; UE_list_t *UE_list = &mac->UE_list; + slice_info_t *sli = &RC.mac[module_idP]->slice_info; UE_TEMPLATE *UE_template; UE_sched_ctrl *UE_sched_ctrl; int sched_frame = frameP; @@ -1193,7 +1197,7 @@ schedule_ulsch_rnti(module_id_t module_idP, for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { N_RB_UL = to_prb(cc[CC_id].ul_Bandwidth); - UE_list->first_rb_offset[CC_id][slice_id] = cmin(N_RB_UL, slice_first_rb[slice_id]); + UE_list->first_rb_offset[CC_id][slice_id] = cmin(N_RB_UL, sli->ul[slice_id].first_rb); } //LOG_D(MAC, "entering ulsch preprocesor\n"); @@ -1210,7 +1214,7 @@ schedule_ulsch_rnti(module_id_t module_idP, for (UE_id = UE_list->head_ul; UE_id >= 0; UE_id = UE_list->next_ul[UE_id]) { - if (!ue_slice_membership(UE_id, slice_id)) + if (!ue_slice_membership(UE_id, slice_id, sli->n_ul)) continue; // don't schedule if Msg4 is not received yet @@ -1398,7 +1402,7 @@ schedule_ulsch_rnti(module_id_t module_idP, UE_template->oldNDI_UL[harq_pid] = ndi; UE_list->eNB_UE_stats[CC_id][UE_id].normalized_rx_power = normalized_rx_power; UE_list->eNB_UE_stats[CC_id][UE_id].target_rx_power = target_rx_power; - UE_template->mcs_UL[harq_pid] = cmin(UE_template->pre_assigned_mcs_ul, slice_maxmcs_uplink[slice_id]); + UE_template->mcs_UL[harq_pid] = cmin(UE_template->pre_assigned_mcs_ul, sli->ul[slice_id].maxmcs); UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1= UE_template->mcs_UL[harq_pid]; //cmin (UE_template->pre_assigned_mcs_ul, openair_daq_vars.target_ue_ul_mcs); // adjust, based on user-defined MCS if (UE_template->pre_allocated_rb_table_index_ul >= 0) { diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.h b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.h deleted file mode 100644 index 517c13b1f3..0000000000 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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.1 (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 LAYER2/MAC/eNB_scheduler_ulsch.h -* \brief ULSCH Scheduler policy variables used during different phases of scheduling -* \author Navid Nikaein and Niccolo' Iardella -* \date 2018 -* \version 0.2 -* \email navid.nikaein@eurecom.fr - -*/ -/** @defgroup _oai2 openair2 Reference Implementation - * @ingroup _ref_implementation_ - * @{ - */ - -/*@}*/ - -#ifndef __LAYER2_MAC_ENB_SCHEDULER_ULSCH_H__ -#define __LAYER2_MAC_ENB_SCHEDULER_ULSCH_H__ - -/* number of active slices for past and current time*/ -int n_active_slices_uplink = 1; -int n_active_slices_current_uplink = 1; - -/* RB share for each slice for past and current time*/ -float avg_slice_percentage_uplink=0.25; -float slice_percentage_uplink[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; -float slice_percentage_current_uplink[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0}; -float total_slice_percentage_uplink = 0; -float total_slice_percentage_current_uplink = 0; - -// MAX MCS for each slice for past and current time -int slice_maxmcs_uplink[MAX_NUM_SLICES] = {20, 20, 20, 20}; -int slice_maxmcs_current_uplink[MAX_NUM_SLICES] = {20,20,20,20}; - -int slice_first_rb[MAX_NUM_SLICES] = {0, 0, 0, 0}; -int slice_first_rb_current[MAX_NUM_SLICES] = {0,0,0,0}; - -/*resource blocks allowed*/ -uint16_t nb_rbs_allowed_slice_uplink[NFAPI_CC_MAX][MAX_NUM_SLICES]; -/*Slice Update */ -int update_ul_scheduler[MAX_NUM_SLICES] = {1, 1, 1, 1}; -int update_ul_scheduler_current[MAX_NUM_SLICES] = {1, 1, 1, 1}; - -/* name of available scheduler*/ -char *ul_scheduler_type[MAX_NUM_SLICES] = {"schedule_ulsch_rnti", - "schedule_ulsch_rnti", - "schedule_ulsch_rnti", - "schedule_ulsch_rnti" -}; - -/* Slice Function Pointer */ -slice_scheduler_ul slice_sched_ul[MAX_NUM_SLICES] = {0}; - -#endif //__LAYER2_MAC_ENB_SCHEDULER_ULSCH_H__ diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h index fde36f3c98..68d09ae6e8 100644 --- a/openair2/LAYER2/MAC/mac.h +++ b/openair2/LAYER2/MAC/mac.h @@ -1122,6 +1122,143 @@ typedef struct { int tail_freelist; ///the tail position of the delete list } UE_free_list_t; +/// Structure for saving the output of each pre_processor instance +typedef struct { + uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; + uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; + uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; + uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX]; + uint8_t slice_allocated_rbgs[NFAPI_CC_MAX][N_RBG_MAX]; + uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]; + + uint32_t bytes_lcid[MAX_MOBILES_PER_ENB][MAX_NUM_LCID]; + uint32_t wb_pmi[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; + uint8_t mcs[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; + +} pre_processor_results_t; + +/** + * slice specific scheduler for the DL + */ +typedef void (*slice_scheduler_dl)(module_id_t mod_id, + slice_id_t slice_id, + frame_t frame, + sub_frame_t subframe, + int *mbsfn_flag); + +typedef struct { + /// RB share for each slice for past and current time + float pct; + float pct_current; + + /// whether this slice is isolated from the others for past and current time + int isol; + int isol_current; + + int prio; + int prio_current; + + /// Frequency ranges for slice positioning + int pos_low; + int pos_high; + int pos_low_current; + int pos_high_current; + + // max mcs for each slice for past and current time + int maxmcs; + int maxmcs_current; + + /// criteria for sorting policies of the slices + uint32_t sorting; + uint32_t sorting_current; + + /// Accounting policy (just greedy(1) or fair(0) setting for now) + int accounting; + int accounting_current; + + /// Whether the scheduler callback should be updated + int update_sched; + int update_sched_current; + + /// name of available scheduler + char *sched_name; + + /// pointer to the slice specific scheduler in DL + slice_scheduler_dl sched_cb; + +} slice_sched_conf_dl_t; + +typedef void (*slice_scheduler_ul)(module_id_t mod_id, + slice_id_t slice_id, + frame_t frame, + sub_frame_t subframe, + unsigned char sched_subframe, + uint16_t *first_rb); + +typedef struct { + /// RB share for each slice for past and current time + float pct; + float pct_current; + + // MAX MCS for each slice for past and current time + int maxmcs; + int maxmcs_current; + + /// criteria for sorting policies of the slices + uint32_t sorting; + uint32_t sorting_current; + + /// starting RB (RB offset) of UL scheduling + int first_rb; + int first_rb_current; + + /// Slice scheduler callback update needed + int update_sched; + int update_sched_current; + + /// name of available scheduler + char *sched_name; + + /// pointer to the slice specific scheduler in UL + slice_scheduler_ul sched_cb; + +} slice_sched_conf_ul_t; + + +typedef struct { + /// counter used to indicate when all slices have pre-allocated UEs + int slice_counter; + + /// indicates whether remaining RBs after first intra-slice allocation will + /// be allocated to UEs of the same slice + int intraslice_share_active; + int intraslice_share_active_current; + /// indicates whether remaining RBs after slice allocation will be + /// allocated to UEs of another slice. Isolated slices will be ignored + int interslice_share_active; + int interslice_share_active_current; + + /// number of active slices for past and current time in DL + int n_dl; + int n_dl_current; + /// RB share stats for DL + float tot_pct_dl; + float tot_pct_dl_current; + float avg_pct_dl; + slice_sched_conf_dl_t dl[MAX_NUM_SLICES]; + + /// number of active slices for past and current time in UL + int n_ul; + int n_ul_current; + /// RB share stats for UL + float tot_pct_ul; + float tot_pct_ul_current; + float avg_pct_ul; + slice_sched_conf_ul_t ul[MAX_NUM_SLICES]; + + pre_processor_results_t pre_processor_results[MAX_NUM_SLICES]; +} slice_info_t; + /*! \brief eNB common channels */ typedef struct { int physCellId; @@ -1242,7 +1379,10 @@ typedef struct eNB_MAC_INST_s { /// UL handle uint32_t ul_handle; UE_list_t UE_list; - + + /// slice-related configuration + slice_info_t slice_info; + ///subband bitmap configuration SBMAP_CONF sbmap_conf; /// CCE table used to build DCI scheduling information @@ -1575,20 +1715,6 @@ typedef struct { mui_t rrc_mui[128]; }mac_rlc_am_muilist_t; -/// Structure for saving the output of each pre_processor instance -typedef struct { - uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; - uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; - uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; - uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX]; - uint8_t slice_allocated_rbgs[NFAPI_CC_MAX][N_RBG_MAX]; - uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]; - - uint32_t bytes_lcid[MAX_MOBILES_PER_ENB][MAX_NUM_LCID]; - uint32_t wb_pmi[MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; - uint8_t mcs[MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; -} pre_processor_results_t; - #include "mac_proto.h" /*@}*/ diff --git a/openair2/LAYER2/MAC/mac_proto.h b/openair2/LAYER2/MAC/mac_proto.h index 98b6c8fbe0..257bae361e 100644 --- a/openair2/LAYER2/MAC/mac_proto.h +++ b/openair2/LAYER2/MAC/mac_proto.h @@ -36,22 +36,6 @@ * @{ */ -/** - * slice specific scheduler - */ -typedef void (*slice_scheduler_dl)(module_id_t mod_id, - slice_id_t slice_id, - frame_t frame, - sub_frame_t subframe, - int *mbsfn_flag); - -typedef void (*slice_scheduler_ul)(module_id_t mod_id, - slice_id_t slice_id, - frame_t frame, - sub_frame_t subframe, - unsigned char sched_subframe, - uint16_t *first_rb); - /** \fn void schedule_mib(module_id_t module_idP,frame_t frameP,sub_frame_t subframe); \brief MIB scheduling for PBCH. This function requests the MIB from RRC and provides it to L1. @param Mod_id Instance ID of eNB @@ -260,7 +244,7 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id, uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]); -void slice_priority_sort(int slice_list[MAX_NUM_SLICES]); +void slice_priority_sort(module_id_t Mod_id, int slice_list[MAX_NUM_SLICES]); void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, @@ -1278,7 +1262,7 @@ void pre_scd_nb_rbs_required( module_id_t module_idP, /*Slice related functions */ uint16_t nb_rbs_allowed_slice(float rb_percentage, int total_rbs); -int ue_slice_membership(int UE_id, int slice_id); +int ue_slice_membership(int UE_id, int slice_id, int n_active_slices); /* from here: prototypes to get rid of compilation warnings: doc to be written by function author */ uint8_t ul_subframe2_k_phich(COMMON_channels_t * cc, sub_frame_t ul_subframe); diff --git a/openair2/LAYER2/MAC/main.c b/openair2/LAYER2/MAC/main.c index da2d977875..4c3e22acb7 100644 --- a/openair2/LAYER2/MAC/main.c +++ b/openair2/LAYER2/MAC/main.c @@ -52,6 +52,7 @@ void mac_top_init_eNB(void) module_id_t i, j; int list_el; UE_list_t *UE_list; + slice_info_t *sli; eNB_MAC_INST *mac; LOG_I(MAC, "[MAIN] Init function start:nb_macrlc_inst=%d\n", @@ -112,7 +113,7 @@ void mac_top_init_eNB(void) RC.mac = NULL; } - // Initialize Linked-List for Active UEs + // Initialize Linked-List for Active UEs and slice configuration for (i = 0; i < RC.nb_macrlc_inst; i++) { mac = RC.mac[i]; @@ -133,6 +134,49 @@ void mac_top_init_eNB(void) UE_list->next[list_el] = -1; UE_list->next_ul[list_el] = -1; + + sli = &mac->slice_info; + + sli->intraslice_share_active = 1; + sli->intraslice_share_active_current = 1; + sli->interslice_share_active = 1; + sli->interslice_share_active_current = 1; + + sli->n_dl = 1; + sli->n_dl_current = 1; + sli->tot_pct_dl = 1; + sli->tot_pct_dl_current = 1; + sli->avg_pct_dl = 0.25; + memset(sli->dl, 0, sizeof(slice_sched_conf_dl_t) * MAX_NUM_SLICES); + sli->dl[0].pct = 1.0; + sli->dl[0].pct_current = 1.0; + sli->dl[0].prio = 10; + sli->dl[0].prio_current = 10; + sli->dl[0].pos_high = N_RBG_MAX; + sli->dl[0].pos_high_current = N_RBG_MAX; + sli->dl[0].maxmcs = 28; + sli->dl[0].maxmcs_current = 28; + sli->dl[0].sorting = 0x012345; + sli->dl[0].sorting_current = 0x012345; + sli->dl[0].update_sched = 1; + sli->dl[0].update_sched_current = 1; + sli->dl[0].sched_name = "schedule_ue_spec"; + + sli->n_ul = 1; + sli->n_ul_current = 1; + sli->tot_pct_ul = 1; + sli->tot_pct_ul_current = 1; + sli->avg_pct_ul = 0.25; + memset(sli->ul, 0, sizeof(slice_sched_conf_ul_t) * MAX_NUM_SLICES); + sli->ul[0].pct = 1.0; + sli->ul[0].pct_current = 1.0; + sli->ul[0].maxmcs = 20; + sli->ul[0].maxmcs_current = 20; + sli->ul[0].sorting = 0x0123; + sli->ul[0].sorting_current = 0x0123; + sli->ul[0].update_sched = 1; + sli->ul[0].update_sched_current = 1; + sli->ul[0].sched_name = "schedule_ulsch_rnti"; } } diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index edffc1d5db..e00634bf3a 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -54,17 +54,6 @@ extern RAN_CONTEXT_t RC; #define DEBUG_HEADER_PARSING 1 //#define DEBUG_PACKET_TRACE 1 -extern float slice_percentage[MAX_NUM_SLICES]; -extern float slice_percentage_uplink[MAX_NUM_SLICES]; -extern int slice_position[MAX_NUM_SLICES*2]; -extern uint32_t slice_sorting[MAX_NUM_SLICES]; -extern int slice_accounting[MAX_NUM_SLICES]; -extern int slice_maxmcs[MAX_NUM_SLICES]; -extern int slice_maxmcs_uplink[MAX_NUM_SLICES]; -extern pre_processor_results_t pre_processor_results[MAX_NUM_SLICES]; - -extern int intraslice_share_active; - //#define ICIC 0 /* this function checks that get_eNB_UE_stats returns @@ -113,7 +102,7 @@ store_dlsch_buffer(module_id_t Mod_id, if (UE_list->active[UE_id] != TRUE) continue; - if (!ue_slice_membership(UE_id, slice_id)) + if (!ue_slice_membership(UE_id, slice_id, RC.mac[Mod_id]->slice_info.n_dl)) continue; UE_template = &UE_list->UE_template[UE_PCCID(Mod_id, UE_id)][UE_id]; @@ -196,13 +185,14 @@ assign_rbs_required(module_id_t Mod_id, int UE_id, n, i, j, CC_id, pCCid, tmp; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; + slice_info_t *sli = &RC.mac[Mod_id]->slice_info; eNB_UE_STATS *eNB_UE_stats, *eNB_UE_stats_i, *eNB_UE_stats_j; int N_RB_DL; // clear rb allocations across all CC_id for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) { if (UE_list->active[UE_id] != TRUE) continue; - if (!ue_slice_membership(UE_id, slice_id)) continue; + if (!ue_slice_membership(UE_id, slice_id, sli->n_dl)) continue; pCCid = UE_PCCID(Mod_id, UE_id); //update CQI information across component carriers @@ -210,8 +200,8 @@ assign_rbs_required(module_id_t Mod_id, CC_id = UE_list->ordered_CCids[n][UE_id]; eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id]; -// eNB_UE_stats->dlsch_mcs1 = cmin(cqi_to_mcs[UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id]], slice_maxmcs[slice_id]); - eNB_UE_stats->dlsch_mcs1 = cmin(cqi2mcs(UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id]), slice_maxmcs[slice_id]); +// eNB_UE_stats->dlsch_mcs1 = cmin(cqi_to_mcs[UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id]], sli->dl[slice_id].maxmcs); + eNB_UE_stats->dlsch_mcs1 = cmin(cqi2mcs(UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id]), sli->dl[slice_id].maxmcs); } @@ -254,7 +244,7 @@ assign_rbs_required(module_id_t Mod_id, N_RB_DL = to_prb(RC.mac[Mod_id]->common_channels[CC_id].mib->message.dl_Bandwidth); UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_id] = - nb_rbs_allowed_slice(slice_percentage[slice_id], N_RB_DL); + nb_rbs_allowed_slice(sli->dl[slice_id].pct, N_RB_DL); /* calculating required number of RBs for each UE */ while (TBS < UE_list->UE_template[pCCid][UE_id].dl_buffer_total) { @@ -274,7 +264,7 @@ assign_rbs_required(module_id_t Mod_id, nb_rbs_required[CC_id][UE_id], TBS, eNB_UE_stats->dlsch_mcs1); - pre_processor_results[slice_id].mcs[CC_id][UE_id] = eNB_UE_stats->dlsch_mcs1; + sli->pre_processor_results[slice_id].mcs[CC_id][UE_id] = eNB_UE_stats->dlsch_mcs1; } } } @@ -435,7 +425,7 @@ void decode_sorting_policy(module_id_t Mod_idP, slice_id_t slice_id) { int i; UE_list_t *UE_list = &RC.mac[Mod_idP]->UE_list; - uint32_t policy = slice_sorting[slice_id]; + uint32_t policy = RC.mac[Mod_idP]->slice_info.dl[slice_id].sorting; uint32_t mask = 0x0000000F; uint16_t criterion; @@ -443,7 +433,7 @@ void decode_sorting_policy(module_id_t Mod_idP, slice_id_t slice_id) { criterion = (uint16_t) (policy >> 4 * (CR_NUM - 1 - i) & mask); if (criterion >= CR_NUM) { LOG_W(MAC, "Invalid criterion in slice %d policy, revert to default policy \n", slice_id); - slice_sorting[slice_id] = 0x12345; + RC.mac[Mod_idP]->slice_info.dl[slice_id].sorting = 0x12345; break; } UE_list->sorting_criteria[slice_id][i] = criterion; @@ -463,8 +453,8 @@ void decode_slice_positioning(module_id_t Mod_idP, } } - start_frequency = slice_position[slice_id*2]; - end_frequency = slice_position[slice_id*2 + 1]; + start_frequency = RC.mac[Mod_idP]->slice_info.dl[slice_id].pos_low; + end_frequency = RC.mac[Mod_idP]->slice_info.dl[slice_id].pos_high; for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { for (RBG = start_frequency; RBG <= end_frequency; ++RBG) { slice_allocation_mask[CC_id][RBG] = 1; @@ -488,7 +478,7 @@ void sort_UEs(module_id_t Mod_idP, slice_id_t slice_id, int frameP, sub_frame_t if (UE_list->active[i] == FALSE) continue; if (UE_RNTI(Mod_idP, i) == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(i, slice_id)) continue; + if (!ue_slice_membership(i, slice_id, RC.mac[Mod_idP]->slice_info.n_dl)) continue; list[list_size] = i; list_size++; @@ -592,14 +582,14 @@ void dlsch_scheduler_pre_processor_partitioning(module_id_t Mod_id, if (UE_RNTI(Mod_id, UE_id) == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(UE_id, slice_id)) continue; + if (!ue_slice_membership(UE_id, slice_id, RC.mac[Mod_id]->slice_info.n_dl)) continue; ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); ++i) { CC_id = UE_list->ordered_CCids[i][UE_id]; N_RB_DL = to_prb(RC.mac[Mod_id]->common_channels[CC_id].mib->message.dl_Bandwidth); - available_rbs = nb_rbs_allowed_slice(slice_percentage[slice_id], N_RB_DL); + available_rbs = nb_rbs_allowed_slice(RC.mac[Mod_id]->slice_info.dl[slice_id].pct, N_RB_DL); if (rbs_retx[CC_id] < available_rbs) ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_id] = available_rbs - rbs_retx[CC_id]; else @@ -630,6 +620,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, uint8_t ue_retx_flag[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; + slice_info_t *sli = &RC.mac[Mod_id]->slice_info; UE_sched_ctrl *ue_sched_ctl; COMMON_channels_t *cc; @@ -650,7 +641,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, rnti = UE_RNTI(Mod_id, UE_id); if (rnti == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(UE_id, slice_id)) continue; + if (!ue_slice_membership(UE_id, slice_id, sli->n_dl)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); ++i) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -682,7 +673,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, // Reduces the available RBs according to slicing configuration dlsch_scheduler_pre_processor_partitioning(Mod_id, slice_id, rbs_retx); - switch (slice_accounting[slice_id]) { + switch (RC.mac[Mod_id]->slice_info.dl[slice_id].accounting) { // If greedy scheduling, try to account all the required RBs case POL_GREEDY: @@ -690,7 +681,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, rnti = UE_RNTI(Mod_id, UE_id); if (rnti == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(UE_id, slice_id)) continue; + if (!ue_slice_membership(UE_id, slice_id, sli->n_dl)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -710,7 +701,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, if (rnti == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(UE_id, slice_id)) continue; + if (!ue_slice_membership(UE_id, slice_id, sli->n_dl)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); ++i) { @@ -735,7 +726,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, rnti = UE_RNTI(Mod_id, UE_id); if (rnti == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(UE_id, slice_id)) continue; + if (!ue_slice_membership(UE_id, slice_id, sli->n_dl)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -754,7 +745,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, rnti = UE_RNTI(Mod_id, UE_id); if (rnti == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(UE_id, slice_id)) continue; + if (!ue_slice_membership(UE_id, slice_id, sli->n_dl)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -789,6 +780,7 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, int N_RBG[NFAPI_CC_MAX]; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; + slice_info_t *sli = &RC.mac[Mod_id]->slice_info; decode_slice_positioning(Mod_id, slice_id, slice_allocation_mask); @@ -802,7 +794,7 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, if (UE_RNTI(Mod_id, UE_id) == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(UE_id, slice_id)) continue; + if (!ue_slice_membership(UE_id, slice_id, sli->n_dl)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -1011,9 +1003,10 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id, int UE_id, CC_id; int i; uint8_t transmission_mode; - uint8_t (*slice_allocation_mask)[N_RBG_MAX] = pre_processor_results[slice_id].slice_allocation_mask; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; int N_RBG[NFAPI_CC_MAX]; + slice_info_t *sli = &RC.mac[Mod_id]->slice_info; + uint8_t (*slice_allocation_mask)[N_RBG_MAX] = sli->pre_processor_results[slice_id].slice_allocation_mask; decode_slice_positioning(Mod_id, slice_id, slice_allocation_mask); @@ -1027,7 +1020,7 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id, if (UE_RNTI(Mod_id, UE_id) == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(UE_id, slice_id)) continue; + if (!ue_slice_membership(UE_id, slice_id, sli->n_dl)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -1241,11 +1234,12 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, int min_rb_unit[NFAPI_CC_MAX]; - uint16_t (*nb_rbs_required)[MAX_MOBILES_PER_ENB] = pre_processor_results[slice_id].nb_rbs_required; - uint16_t (*nb_rbs_accounted)[MAX_MOBILES_PER_ENB] = pre_processor_results[slice_id].nb_rbs_accounted; - uint16_t (*nb_rbs_remaining)[MAX_MOBILES_PER_ENB] = pre_processor_results[slice_id].nb_rbs_remaining; - uint8_t (*rballoc_sub)[N_RBG_MAX] = pre_processor_results[slice_id].slice_allocated_rbgs; - uint8_t (*MIMO_mode_indicator)[N_RBG_MAX] = pre_processor_results[slice_id].MIMO_mode_indicator; + slice_info_t *sli = &RC.mac[Mod_id]->slice_info; + uint16_t (*nb_rbs_required)[MAX_MOBILES_PER_ENB] = sli->pre_processor_results[slice_id].nb_rbs_required; + uint16_t (*nb_rbs_accounted)[MAX_MOBILES_PER_ENB] = sli->pre_processor_results[slice_id].nb_rbs_accounted; + uint16_t (*nb_rbs_remaining)[MAX_MOBILES_PER_ENB] = sli->pre_processor_results[slice_id].nb_rbs_remaining; + uint8_t (*rballoc_sub)[N_RBG_MAX] = sli->pre_processor_results[slice_id].slice_allocated_rbgs; + uint8_t (*MIMO_mode_indicator)[N_RBG_MAX] = sli->pre_processor_results[slice_id].MIMO_mode_indicator; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; UE_sched_ctrl *ue_sched_ctl; @@ -1263,7 +1257,7 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, #endif // Initialize scheduling information for all active UEs - memset(&pre_processor_results[slice_id], 0, sizeof(pre_processor_results)); + memset(&sli->pre_processor_results[slice_id], 0, sizeof(sli->pre_processor_results)); // FIXME: After the memset above, some of the resets in reset() are redundant dlsch_scheduler_pre_processor_reset(Mod_id, slice_id, frameP, subframeP, min_rb_unit, @@ -1302,7 +1296,7 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, // SHARING // If there are available RBs left in the slice, allocate them to the highest priority UEs - if (intraslice_share_active) { + if (RC.mac[Mod_id]->slice_info.intraslice_share_active) { dlsch_scheduler_pre_processor_intraslice_sharing(Mod_id, slice_id, min_rb_unit, nb_rbs_required, @@ -1411,6 +1405,7 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP, rnti_t rnti; UE_list_t *UE_list; + slice_info_t *sli = &RC.mac[module_idP]->slice_info; UE_sched_ctrl *ue_sched_ctl; uint8_t *vrb_map; COMMON_channels_t *cc; @@ -1440,7 +1435,7 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP, if (UE_list->active[UE_id] != TRUE) continue; - if (!ue_slice_membership(UE_id, slice_id)) + if (!ue_slice_membership(UE_id, slice_id, sli->n_dl)) continue; vrb_map = RC.mac[module_idP]->common_channels[CC_id].vrb_map; @@ -1674,7 +1669,6 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, unsigned char sched_subframeP, uint16_t *first_rb) { - int16_t i; uint16_t UE_id, n, r; uint8_t CC_id, harq_pid; @@ -1685,6 +1679,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, uint16_t total_ue_count[NFAPI_CC_MAX]; rnti_t rnti = -1; UE_list_t *UE_list = &RC.mac[module_idP]->UE_list; + slice_info_t *sli = &RC.mac[module_idP]->slice_info; UE_TEMPLATE *UE_template = 0; UE_sched_ctrl *ue_sched_ctl; int N_RB_UL = 0; @@ -1714,7 +1709,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, // This is the actual CC_id in the list CC_id = UE_list->ordered_ULCCids[n][i]; UE_template = &UE_list->UE_template[CC_id][i]; - if (!ue_slice_membership(i, slice_id)) + if (!ue_slice_membership(i, slice_id, sli->n_ul)) continue; if (UE_template->pre_allocated_nb_rb_ul[slice_id] > 0) { total_ue_count[CC_id] += 1; @@ -1735,7 +1730,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(UE_id, slice_id)) + if (!ue_slice_membership(UE_id, slice_id, sli->n_ul)) continue; LOG_D(MAC, "In ulsch_preprocessor: handling UE %d/%x\n", UE_id, @@ -1760,7 +1755,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, N_RB_UL = to_prb(RC.mac[module_idP]->common_channels[CC_id].ul_Bandwidth); ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id] = - nb_rbs_allowed_slice(slice_percentage_uplink[slice_id], N_RB_UL); + nb_rbs_allowed_slice(sli->ul[slice_id].pct, N_RB_UL); first_rb_offset = UE_list->first_rb_offset[CC_id][slice_id]; available_rbs = cmin(ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id], @@ -1792,7 +1787,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, continue; if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(i, slice_id)) + if (!ue_slice_membership(i, slice_id, sli->n_ul)) continue; @@ -1833,7 +1828,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, continue; if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(i, slice_id)) + if (!ue_slice_membership(i, slice_id, sli->n_ul)) continue; UE_id = i; @@ -1892,6 +1887,7 @@ assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP, int rb_table_index = 0, tbs, tx_power; eNB_MAC_INST *eNB = RC.mac[module_idP]; UE_list_t *UE_list = &eNB->UE_list; + slice_info_t *sli = &RC.mac[module_idP]->slice_info; UE_TEMPLATE *UE_template; UE_sched_ctrl *ue_sched_ctl; @@ -1909,16 +1905,16 @@ assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP, continue; if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(i, slice_id)) + if (!ue_slice_membership(i, slice_id, sli->n_ul)) continue; if (UE_list->UE_sched_ctrl[i].phr_received == 1) { /* if we've received the power headroom information the UE, we can go to * maximum mcs */ - mcs = cmin(20, slice_maxmcs_uplink[slice_id]); + mcs = cmin(20, sli->ul[slice_id].maxmcs); } else { /* otherwise, limit to QPSK PUSCH */ - mcs = cmin(10, slice_maxmcs_uplink[slice_id]); + mcs = cmin(10, sli->ul[slice_id].maxmcs); } UE_id = i; @@ -1941,7 +1937,7 @@ assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP, Ncp = RC.mac[module_idP]->common_channels[CC_id].Ncp; N_RB_UL = to_prb(RC.mac[module_idP]->common_channels[CC_id].ul_Bandwidth); ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id] = - nb_rbs_allowed_slice(slice_percentage_uplink[slice_id], N_RB_UL); + nb_rbs_allowed_slice(sli->ul[slice_id].pct, N_RB_UL); int bytes_to_schedule = UE_template->estimated_ul_buffer - UE_template->scheduled_ul_bytes; if (bytes_to_schedule < 0) bytes_to_schedule = 0; From 048c4d29a2c0a321b0f3683fdcfd82bf305ba663 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 6 Apr 2018 12:30:47 +0200 Subject: [PATCH 092/379] add slice association in UE_list, test against it in slice_membership() --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 2 +- .../LAYER2/MAC/eNB_scheduler_primitives.c | 27 ++++++++++---- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 2 +- openair2/LAYER2/MAC/mac.h | 3 ++ openair2/LAYER2/MAC/mac_proto.h | 3 +- openair2/LAYER2/MAC/pre_processor.c | 37 +++++++++---------- 6 files changed, 44 insertions(+), 30 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 236b0c05f1..79589a064e 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -763,7 +763,7 @@ schedule_ue_spec(module_id_t module_idP, slice_id_t slice_idP, continue_flag = 1; } - if (!ue_slice_membership(UE_id, slice_idP, RC.mac[module_idP]->slice_info.n_dl)) + if (!ue_dl_slice_membership(module_idP, UE_id, slice_idP)) continue; if (continue_flag != 1) { diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c index 4643fe41a1..4773cf9c67 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c @@ -1961,6 +1961,9 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP, int harq_pidP sizeof(eNB_UE_STATS)); UE_list->UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 0; + /* default slice in case there was something different */ + UE_list->assoc_dl_slice[UE_id] = 0; + UE_list->assoc_ul_slice[UE_id] = 0; UE_list->UE_sched_ctrl[UE_id].ta_update = 31; @@ -4539,14 +4542,24 @@ uint16_t nb_rbs_allowed_slice(float rb_percentage, int total_rbs) return (uint16_t) floor(rb_percentage * total_rbs); } -int ue_slice_membership(int UE_id, int slice_id, int n_active_slices) +int ue_dl_slice_membership(module_id_t mod_id, int UE_id, slice_id_t slice_id) { - if ((slice_id < 0) || (slice_id > n_active_slices)) + if ((slice_id < 0) + || (slice_id >= RC.mac[mod_id]->slice_info.n_dl)) { LOG_W(MAC, "out of range slice id %d\n", slice_id); - - - if ((UE_id % n_active_slices) == slice_id) { - return 1; // this ue is a member of this slice + return 0; } - return 0; + return RC.mac[mod_id]->UE_list.active[UE_id] == TRUE + && RC.mac[mod_id]->UE_list.assoc_dl_slice[UE_id] == slice_id; +} + +int ue_ul_slice_membership(module_id_t mod_id, int UE_id, slice_id_t slice_id) +{ + if ((slice_id < 0) + || (slice_id >= RC.mac[mod_id]->slice_info.n_ul)) { + LOG_W(MAC, "out of range slice id %d\n", slice_id); + return 0; + } + return RC.mac[mod_id]->UE_list.active[UE_id] == TRUE + && RC.mac[mod_id]->UE_list.assoc_ul_slice[UE_id] == slice_id; } diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 5c31a7ef43..5fb69e6a8f 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -1214,7 +1214,7 @@ schedule_ulsch_rnti(module_id_t module_idP, for (UE_id = UE_list->head_ul; UE_id >= 0; UE_id = UE_list->next_ul[UE_id]) { - if (!ue_slice_membership(UE_id, slice_id, sli->n_ul)) + if (!ue_ul_slice_membership(module_idP, UE_id, slice_id)) continue; // don't schedule if Msg4 is not received yet diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h index 68d09ae6e8..cb6aa5bf3b 100644 --- a/openair2/LAYER2/MAC/mac.h +++ b/openair2/LAYER2/MAC/mac.h @@ -1104,6 +1104,9 @@ typedef struct { uint16_t sorting_criteria[MAX_NUM_SLICES][CR_NUM]; uint16_t first_rb_offset[NFAPI_CC_MAX][MAX_NUM_SLICES]; + slice_id_t assoc_dl_slice[MAX_MOBILES_PER_ENB]; + slice_id_t assoc_ul_slice[MAX_MOBILES_PER_ENB]; + } UE_list_t; /*! \brief deleting control information*/ diff --git a/openair2/LAYER2/MAC/mac_proto.h b/openair2/LAYER2/MAC/mac_proto.h index 257bae361e..ac48cb170d 100644 --- a/openair2/LAYER2/MAC/mac_proto.h +++ b/openair2/LAYER2/MAC/mac_proto.h @@ -1262,7 +1262,8 @@ void pre_scd_nb_rbs_required( module_id_t module_idP, /*Slice related functions */ uint16_t nb_rbs_allowed_slice(float rb_percentage, int total_rbs); -int ue_slice_membership(int UE_id, int slice_id, int n_active_slices); +int ue_dl_slice_membership(module_id_t mod_id, int UE_id, slice_id_t slice_id); +int ue_ul_slice_membership(module_id_t mod_id, int UE_id, slice_id_t slice_id); /* from here: prototypes to get rid of compilation warnings: doc to be written by function author */ uint8_t ul_subframe2_k_phich(COMMON_channels_t * cc, sub_frame_t ul_subframe); diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index e00634bf3a..b449e5b0c3 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -102,7 +102,7 @@ store_dlsch_buffer(module_id_t Mod_id, if (UE_list->active[UE_id] != TRUE) continue; - if (!ue_slice_membership(UE_id, slice_id, RC.mac[Mod_id]->slice_info.n_dl)) + if (!ue_dl_slice_membership(Mod_id, UE_id, slice_id)) continue; UE_template = &UE_list->UE_template[UE_PCCID(Mod_id, UE_id)][UE_id]; @@ -192,7 +192,7 @@ assign_rbs_required(module_id_t Mod_id, // clear rb allocations across all CC_id for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) { if (UE_list->active[UE_id] != TRUE) continue; - if (!ue_slice_membership(UE_id, slice_id, sli->n_dl)) continue; + if (!ue_dl_slice_membership(Mod_id, UE_id, slice_id)) continue; pCCid = UE_PCCID(Mod_id, UE_id); //update CQI information across component carriers @@ -478,7 +478,7 @@ void sort_UEs(module_id_t Mod_idP, slice_id_t slice_id, int frameP, sub_frame_t if (UE_list->active[i] == FALSE) continue; if (UE_RNTI(Mod_idP, i) == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(i, slice_id, RC.mac[Mod_idP]->slice_info.n_dl)) continue; + if (!ue_dl_slice_membership(Mod_idP, i, slice_id)) continue; list[list_size] = i; list_size++; @@ -582,7 +582,7 @@ void dlsch_scheduler_pre_processor_partitioning(module_id_t Mod_id, if (UE_RNTI(Mod_id, UE_id) == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(UE_id, slice_id, RC.mac[Mod_id]->slice_info.n_dl)) continue; + if (!ue_dl_slice_membership(Mod_id, UE_id, slice_id)) continue; ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; @@ -620,7 +620,6 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, uint8_t ue_retx_flag[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; - slice_info_t *sli = &RC.mac[Mod_id]->slice_info; UE_sched_ctrl *ue_sched_ctl; COMMON_channels_t *cc; @@ -641,7 +640,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, rnti = UE_RNTI(Mod_id, UE_id); if (rnti == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(UE_id, slice_id, sli->n_dl)) continue; + if (!ue_dl_slice_membership(Mod_id, UE_id, slice_id)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); ++i) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -681,7 +680,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, rnti = UE_RNTI(Mod_id, UE_id); if (rnti == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(UE_id, slice_id, sli->n_dl)) continue; + if (!ue_dl_slice_membership(Mod_id, UE_id, slice_id)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -701,7 +700,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, if (rnti == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(UE_id, slice_id, sli->n_dl)) continue; + if (!ue_dl_slice_membership(Mod_id, UE_id, slice_id)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); ++i) { @@ -726,7 +725,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, rnti = UE_RNTI(Mod_id, UE_id); if (rnti == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(UE_id, slice_id, sli->n_dl)) continue; + if (!ue_dl_slice_membership(Mod_id, UE_id, slice_id)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -745,7 +744,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, rnti = UE_RNTI(Mod_id, UE_id); if (rnti == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(UE_id, slice_id, sli->n_dl)) continue; + if (!ue_dl_slice_membership(Mod_id, UE_id, slice_id)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -780,7 +779,6 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, int N_RBG[NFAPI_CC_MAX]; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; - slice_info_t *sli = &RC.mac[Mod_id]->slice_info; decode_slice_positioning(Mod_id, slice_id, slice_allocation_mask); @@ -794,7 +792,7 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, if (UE_RNTI(Mod_id, UE_id) == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(UE_id, slice_id, sli->n_dl)) continue; + if (!ue_dl_slice_membership(Mod_id, UE_id, slice_id)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -1020,7 +1018,7 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id, if (UE_RNTI(Mod_id, UE_id) == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(UE_id, slice_id, sli->n_dl)) continue; + if (!ue_dl_slice_membership(Mod_id, UE_id, slice_id)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -1405,7 +1403,6 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP, rnti_t rnti; UE_list_t *UE_list; - slice_info_t *sli = &RC.mac[module_idP]->slice_info; UE_sched_ctrl *ue_sched_ctl; uint8_t *vrb_map; COMMON_channels_t *cc; @@ -1435,7 +1432,7 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP, if (UE_list->active[UE_id] != TRUE) continue; - if (!ue_slice_membership(UE_id, slice_id, sli->n_dl)) + if (!ue_dl_slice_membership(module_idP, UE_id, slice_id)) continue; vrb_map = RC.mac[module_idP]->common_channels[CC_id].vrb_map; @@ -1709,7 +1706,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, // This is the actual CC_id in the list CC_id = UE_list->ordered_ULCCids[n][i]; UE_template = &UE_list->UE_template[CC_id][i]; - if (!ue_slice_membership(i, slice_id, sli->n_ul)) + if (!ue_ul_slice_membership(module_idP, i, slice_id)) continue; if (UE_template->pre_allocated_nb_rb_ul[slice_id] > 0) { total_ue_count[CC_id] += 1; @@ -1730,7 +1727,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(UE_id, slice_id, sli->n_ul)) + if (!ue_ul_slice_membership(module_idP, UE_id, slice_id)) continue; LOG_D(MAC, "In ulsch_preprocessor: handling UE %d/%x\n", UE_id, @@ -1787,7 +1784,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, continue; if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(i, slice_id, sli->n_ul)) + if (!ue_ul_slice_membership(module_idP, i, slice_id)) continue; @@ -1828,7 +1825,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, continue; if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(i, slice_id, sli->n_ul)) + if (!ue_ul_slice_membership(module_idP, i, slice_id)) continue; UE_id = i; @@ -1905,7 +1902,7 @@ assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP, continue; if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1) continue; - if (!ue_slice_membership(i, slice_id, sli->n_ul)) + if (!ue_ul_slice_membership(module_idP, i, slice_id)) continue; if (UE_list->UE_sched_ctrl[i].phr_received == 1) { From 568bf8ae35d7288acf1d5ba450b79a00b145ae5f Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 9 Apr 2018 15:42:42 +0200 Subject: [PATCH 093/379] bugfix: deactive slice_counter slice_counter had a wrong condition, not scheduling in DLSCH if the number of slices is greater than one --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 14 +++++++------- openair2/LAYER2/MAC/mac.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 79589a064e..ad48aba116 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -415,7 +415,7 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in sli->tot_pct_dl = 0; sli->avg_pct_dl = 1.0 / sli->n_dl; - sli->slice_counter = sli->n_dl; + //sli->slice_counter = sli->n_dl; // reset the slice percentage for inactive slices for (i = sli->n_dl; i < MAX_NUM_SLICES; i++) { @@ -727,13 +727,13 @@ schedule_ue_spec(module_id_t module_idP, slice_id_t slice_idP, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR, VCD_FUNCTION_OUT); - RC.mac[module_idP]->slice_info.slice_counter--; + //RC.mac[module_idP]->slice_info.slice_counter--; // Do the multiplexing and actual allocation only when all slices have been pre-processed. - if (RC.mac[module_idP]->slice_info.slice_counter > 0) { - stop_meas(&eNB->schedule_dlsch); - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, VCD_FUNCTION_OUT); - return; - } + //if (RC.mac[module_idP]->slice_info.slice_counter > 0) { + //stop_meas(&eNB->schedule_dlsch); + //VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, VCD_FUNCTION_OUT); + //return; + //} if (RC.mac[module_idP]->slice_info.interslice_share_active) { dlsch_scheduler_interslice_multiplexing(module_idP, frameP, subframeP); diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h index cb6aa5bf3b..e16d24b98b 100644 --- a/openair2/LAYER2/MAC/mac.h +++ b/openair2/LAYER2/MAC/mac.h @@ -1230,7 +1230,7 @@ typedef struct { typedef struct { /// counter used to indicate when all slices have pre-allocated UEs - int slice_counter; + //int slice_counter; /// indicates whether remaining RBs after first intra-slice allocation will /// be allocated to UEs of the same slice From 87b8b6e86bb6192a4cf8262d5e041c5e93109607 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 23 Apr 2018 16:37:50 +0200 Subject: [PATCH 094/379] Increase the number of possible slices to 10 --- openair2/LAYER2/MAC/mac.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h index e16d24b98b..0784c14dc3 100644 --- a/openair2/LAYER2/MAC/mac.h +++ b/openair2/LAYER2/MAC/mac.h @@ -159,7 +159,7 @@ #define MIN_MAC_HDR_RLC_SIZE (1 + MIN_RLC_PDU_SIZE) /*!\brief maximum number of slices / groups */ -#define MAX_NUM_SLICES 4 +#define MAX_NUM_SLICES 10 #define U_PLANE_INACTIVITY_VALUE 6000 From 8f2d79709e6d117fe714107e99ab5b077830606f Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 16 Apr 2018 16:22:37 +0200 Subject: [PATCH 095/379] MAC: change all slice_id_t to slice index variables --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 67 +++--- .../LAYER2/MAC/eNB_scheduler_primitives.c | 26 ++- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 39 ++-- openair2/LAYER2/MAC/mac.h | 12 +- openair2/LAYER2/MAC/mac_proto.h | 29 +-- openair2/LAYER2/MAC/pre_processor.c | 209 +++++++++--------- 6 files changed, 201 insertions(+), 181 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index ad48aba116..d27ef6c40e 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -423,8 +423,8 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in } for (i = 0; i < sli->n_dl; i++) { if (sli->dl[i].pct < 0) { - LOG_W(MAC, "[eNB %d] frame %d subframe %d:invalid slice %d percentage %f. resetting to zero", - module_idP, frameP, subframeP, i, sli->dl[i].pct); + LOG_W(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: invalid percentage %f. resetting to zero", + module_idP, sli->dl[i].id, frameP, subframeP, sli->dl[i].pct); sli->dl[i].pct = 0; } sli->tot_pct_dl += sli->dl[i].pct; @@ -465,7 +465,7 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in sli->dl[i].sched_cb = dlsym(NULL, sli->dl[i].sched_name); sli->dl[i].update_sched = 0; sli->dl[i].update_sched_current = 0; - LOG_I(MAC, "update dl scheduler slice %d\n", i); + LOG_I(MAC, "update dl scheduler slice index %d ID %d\n", i, sli->dl[i].id); } if (sli->tot_pct_dl <= 1.0) { // the new total RB share is within the range @@ -487,7 +487,8 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in if (sli->dl[i].pct_current != sli->dl[i].pct) { // new slice percentage LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f\n", - module_idP, i, frameP, subframeP, sli->tot_pct_dl_current, sli->tot_pct_dl, + module_idP, sli->dl[i].id, frameP, subframeP, + sli->tot_pct_dl_current, sli->tot_pct_dl, sli->dl[i].pct_current, sli->dl[i].pct); sli->tot_pct_dl_current = sli->tot_pct_dl; sli->dl[i].pct_current = sli->dl[i].pct; @@ -497,11 +498,12 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in if (sli->dl[i].maxmcs_current != sli->dl[i].maxmcs) { if ((sli->dl[i].maxmcs >= 0) && (sli->dl[i].maxmcs < 29)) { LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: slice MAX MCS has changed: %d-->%d\n", - module_idP, i, frameP, subframeP, sli->dl[i].maxmcs_current, sli->dl[i].maxmcs); + module_idP, sli->dl[i].id, frameP, subframeP, + sli->dl[i].maxmcs_current, sli->dl[i].maxmcs); sli->dl[i].maxmcs_current = sli->dl[i].maxmcs; } else { LOG_W(MAC, "[eNB %d][SLICE %d][DL] invalid slice max mcs %d, revert the previous value %d\n", - module_idP, i, sli->dl[i].maxmcs, sli->dl[i].maxmcs_current); + module_idP, sli->dl[i].id, sli->dl[i].maxmcs, sli->dl[i].maxmcs_current); sli->dl[i].maxmcs = sli->dl[i].maxmcs_current; } } @@ -509,7 +511,7 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in // check if a new scheduler, and log the console if (sli->dl[i].update_sched_current != sli->dl[i].update_sched) { LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: DL scheduler for this slice is updated: %s \n", - module_idP, i, frameP, subframeP, sli->dl[i].sched_name); + module_idP, sli->dl[i].id, frameP, subframeP, sli->dl[i].sched_name); sli->dl[i].update_sched_current = sli->dl[i].update_sched; } @@ -519,7 +521,7 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in if (sli->n_dl == sli->n_dl_current) { LOG_W(MAC, "[eNB %d][SLICE %d][DL] invalid total RB share (%f->%f), reduce proportionally the RB share by 0.1\n", - module_idP, i, sli->tot_pct_dl_current, sli->tot_pct_dl); + module_idP, sli->dl[i].id, sli->tot_pct_dl_current, sli->tot_pct_dl); if (sli->dl[i].pct >= sli->avg_pct_dl) { sli->dl[i].pct -= 0.1; sli->tot_pct_dl -= 0.1; @@ -527,7 +529,7 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in } else { LOG_W(MAC, "[eNB %d][SLICE %d][DL] invalid total RB share (%f->%f), revert the number of slice to its previous value (%d->%d)\n", - module_idP, i, sli->tot_pct_dl_current, sli->tot_pct_dl, + module_idP, sli->dl[i].id, sli->tot_pct_dl_current, sli->tot_pct_dl, sli->n_dl, sli->n_dl_current); sli->n_dl = sli->n_dl_current; sli->dl[i].pct = sli->dl[i].pct_current; @@ -539,7 +541,7 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in sli->dl[i].pos_low < 0 || sli->dl[i].pos_high > N_RBG_MAX) { LOG_W(MAC, "[eNB %d][SLICE %d][DL] invalid slicing position (%d-%d), using previous values (%d-%d)\n", - module_idP, i, + module_idP, sli->dl[i].id, sli->dl[i].pos_low, sli->dl[i].pos_high, sli->dl[i].pos_low_current, sli->dl[i].pos_high_current); sli->dl[i].pos_low = sli->dl[i].pos_low_current; @@ -547,12 +549,12 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in } else { if (sli->dl[i].pos_low_current != sli->dl[i].pos_low) { LOG_N(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: start frequency has changed (%d-->%d)\n", - module_idP, i, frameP, subframeP, sli->dl[i].pos_low_current, sli->dl[i].pos_low); + module_idP, sli->dl[i].id, frameP, subframeP, sli->dl[i].pos_low_current, sli->dl[i].pos_low); sli->dl[i].pos_low_current = sli->dl[i].pos_low; } if (sli->dl[i].pos_high_current != sli->dl[i].pos_high) { LOG_N(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: end frequency has changed (%d-->%d)\n", - module_idP, i, frameP, subframeP, sli->dl[i].pos_high_current, sli->dl[i].pos_high); + module_idP, sli->dl[i].id, frameP, subframeP, sli->dl[i].pos_high_current, sli->dl[i].pos_high); sli->dl[i].pos_high_current = sli->dl[i].pos_high; } } @@ -560,7 +562,7 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in // Check for new sorting policy if (sli->dl[i].sorting_current != sli->dl[i].sorting) { LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n", - module_idP, i, frameP, subframeP, sli->dl[i].sorting_current, sli->dl[i].sorting); + module_idP, sli->dl[i].id, frameP, subframeP, sli->dl[i].sorting_current, sli->dl[i].sorting); sli->dl[i].sorting_current = sli->dl[i].sorting; } @@ -569,11 +571,11 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in if (sli->dl[i].isol != 1 && sli->dl[i].isol != 0) { LOG_W(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: invalid slice isolation setting (%d), revert to its previous value (%d)\n", - module_idP, i, frameP, subframeP, sli->dl[i].isol, sli->dl[i].isol_current); + module_idP, sli->dl[i].id, frameP, subframeP, sli->dl[i].isol, sli->dl[i].isol_current); sli->dl[i].isol = sli->dl[i].isol_current; } else { LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: slice isolation setting has changed (%x-->%x)\n", - module_idP, i, frameP, subframeP, sli->dl[i].isol_current, sli->dl[i].isol); + module_idP, sli->dl[i].id, frameP, subframeP, sli->dl[i].isol_current, sli->dl[i].isol); sli->dl[i].isol_current = sli->dl[i].isol; } } @@ -581,7 +583,7 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in // Check for new slice priority if (sli->dl[i].prio_current != sli->dl[i].prio) { LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: slice priority setting has changed (%d-->%d)\n", - module_idP, i, frameP, subframeP, sli->dl[i].prio_current, sli->dl[i].prio); + module_idP, sli->dl[i].id, frameP, subframeP, sli->dl[i].prio_current, sli->dl[i].prio); sli->dl[i].prio_current = sli->dl[i].prio; } @@ -590,11 +592,13 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in if (sli->dl[i].accounting > 1 || sli->dl[i].accounting < 0) { LOG_W(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: invalid accounting policy (%d), revert to its previous value (%d)\n", - module_idP, i, frameP, subframeP, sli->dl[i].accounting, sli->dl[i].accounting_current); + module_idP, sli->dl[i].id, frameP, subframeP, + sli->dl[i].accounting, sli->dl[i].accounting_current); sli->dl[i].accounting = sli->dl[i].accounting_current; } else { LOG_N(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n", - module_idP, i, frameP, subframeP, sli->dl[i].accounting_current, sli->dl[i].accounting); + module_idP, sli->dl[i].id, frameP, subframeP, + sli->dl[i].accounting_current, sli->dl[i].accounting); sli->dl[i].accounting_current = sli->dl[i].accounting; } } @@ -609,7 +613,7 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in //------------------------------------------------------------------------------ void -schedule_ue_spec(module_id_t module_idP, slice_id_t slice_idP, +schedule_ue_spec(module_id_t module_idP, int slice_idxP, frame_t frameP, sub_frame_t subframeP, int *mbsfn_flag) //------------------------------------------------------------------------------ { @@ -719,7 +723,7 @@ schedule_ue_spec(module_id_t module_idP, slice_id_t slice_idP, start_meas(&eNB->schedule_dlsch_preprocessor); dlsch_scheduler_pre_processor(module_idP, - slice_idP, + slice_idxP, frameP, subframeP, mbsfn_flag); @@ -763,7 +767,7 @@ schedule_ue_spec(module_id_t module_idP, slice_id_t slice_idP, continue_flag = 1; } - if (!ue_dl_slice_membership(module_idP, UE_id, slice_idP)) + if (!ue_dl_slice_membership(module_idP, UE_id, slice_idxP)) continue; if (continue_flag != 1) { @@ -838,7 +842,7 @@ schedule_ue_spec(module_id_t module_idP, slice_id_t slice_idP, eNB_UE_stats->dlsch_mcs1 = 10; // cqi_to_mcs[ue_sched_ctl->dl_cqi[CC_id]]; } else { // this operation is also done in the preprocessor eNB_UE_stats->dlsch_mcs1 = cmin(eNB_UE_stats->dlsch_mcs1, - RC.mac[module_idP]->slice_info.dl[slice_idP].maxmcs); // cmin(eNB_UE_stats->dlsch_mcs1, openair_daq_vars.target_ue_dl_mcs); + RC.mac[module_idP]->slice_info.dl[slice_idxP].maxmcs); // cmin(eNB_UE_stats->dlsch_mcs1, openair_daq_vars.target_ue_dl_mcs); } // Store stats @@ -1618,7 +1622,8 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub COMMON_channels_t *cc; int N_RBG[NFAPI_CC_MAX]; - int slice_sorted_list[MAX_NUM_SLICES], slice_id; + int slice_sorted_list[MAX_NUM_SLICES]; + int slice_idx; int8_t free_rbgs_map[NFAPI_CC_MAX][N_RBG_MAX]; int has_traffic[NFAPI_CC_MAX][MAX_NUM_SLICES]; uint8_t allocation_mask[NFAPI_CC_MAX][N_RBG_MAX]; @@ -1672,9 +1677,9 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub min_rb_unit = get_min_rb_unit(Mod_id, CC_id); for (i = 0; i < sli->n_dl; ++i) { - slice_id = slice_sorted_list[i]; + slice_idx = slice_sorted_list[i]; - if (has_traffic[CC_id][slice_id] == 0) continue; + if (has_traffic[CC_id][slice_idx] == 0) continue; // Build an ad-hoc allocation mask fo the slice for (rbg = 0; rbg < N_RBG[CC_id]; ++rbg) { @@ -1695,12 +1700,12 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub // Sort UE again // (UE list gets sorted every time pre_processor is called so it is probably dirty at this point) // FIXME: There is only one UE_list for all slices, so it must be sorted again each time we use it - sort_UEs(Mod_id, (slice_id_t) slice_id, frameP, subframeP); + sort_UEs(Mod_id, slice_idx, frameP, subframeP); - nb_rbs_remaining = sli->pre_processor_results[slice_id].nb_rbs_remaining; - nb_rbs_required = sli->pre_processor_results[slice_id].nb_rbs_required; - rballoc_sub = sli->pre_processor_results[slice_id].slice_allocated_rbgs; - MIMO_mode_indicator = sli->pre_processor_results[slice_id].MIMO_mode_indicator; + nb_rbs_remaining = sli->pre_processor_results[slice_idx].nb_rbs_remaining; + nb_rbs_required = sli->pre_processor_results[slice_idx].nb_rbs_required; + rballoc_sub = sli->pre_processor_results[slice_idx].slice_allocated_rbgs; + MIMO_mode_indicator = sli->pre_processor_results[slice_idx].MIMO_mode_indicator; // Allocation for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { @@ -1764,7 +1769,7 @@ void dlsch_scheduler_qos_multiplexing(module_id_t Mod_id, int frameP, sub_frame_ // Sort UE again // FIXME: There is only one UE_list for all slices, so it must be sorted again each time we use it - sort_UEs(Mod_id, (slice_id_t) i, frameP, subframeP); + sort_UEs(Mod_id, (uint8_t)i, frameP, subframeP); for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c index 4773cf9c67..6bdb63a721 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c @@ -1962,8 +1962,8 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP, int harq_pidP UE_list->UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 0; /* default slice in case there was something different */ - UE_list->assoc_dl_slice[UE_id] = 0; - UE_list->assoc_ul_slice[UE_id] = 0; + UE_list->assoc_dl_slice_idx[UE_id] = 0; + UE_list->assoc_ul_slice_idx[UE_id] = 0; UE_list->UE_sched_ctrl[UE_id].ta_update = 31; @@ -4542,24 +4542,26 @@ uint16_t nb_rbs_allowed_slice(float rb_percentage, int total_rbs) return (uint16_t) floor(rb_percentage * total_rbs); } -int ue_dl_slice_membership(module_id_t mod_id, int UE_id, slice_id_t slice_id) +int ue_dl_slice_membership(module_id_t mod_id, int UE_id, int slice_idx) { - if ((slice_id < 0) - || (slice_id >= RC.mac[mod_id]->slice_info.n_dl)) { - LOG_W(MAC, "out of range slice id %d\n", slice_id); + if ((slice_idx < 0) + || (slice_idx >= RC.mac[mod_id]->slice_info.n_dl)) { + LOG_W(MAC, "out of range slice index %d (slice ID %d)\n", + slice_idx, RC.mac[mod_id]->slice_info.dl[slice_idx].id); return 0; } return RC.mac[mod_id]->UE_list.active[UE_id] == TRUE - && RC.mac[mod_id]->UE_list.assoc_dl_slice[UE_id] == slice_id; + && RC.mac[mod_id]->UE_list.assoc_dl_slice_idx[UE_id] == slice_idx; } -int ue_ul_slice_membership(module_id_t mod_id, int UE_id, slice_id_t slice_id) +int ue_ul_slice_membership(module_id_t mod_id, int UE_id, int slice_idx) { - if ((slice_id < 0) - || (slice_id >= RC.mac[mod_id]->slice_info.n_ul)) { - LOG_W(MAC, "out of range slice id %d\n", slice_id); + if ((slice_idx < 0) + || (slice_idx >= RC.mac[mod_id]->slice_info.n_ul)) { + LOG_W(MAC, "out of range slice index %d (slice ID %d)\n", + slice_idx, RC.mac[mod_id]->slice_info.dl[slice_idx].id); return 0; } return RC.mac[mod_id]->UE_list.active[UE_id] == TRUE - && RC.mac[mod_id]->UE_list.assoc_ul_slice[UE_id] == slice_id; + && RC.mac[mod_id]->UE_list.assoc_ul_slice_idx[UE_id] == slice_idx; } diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 5fb69e6a8f..4197ed6ba3 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -1049,8 +1049,9 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP, } for (i = 0; i < sli->n_ul; i++) { if (sli->ul[i].pct < 0 ){ - LOG_W(MAC, "[eNB %d] frame %d subframe %d:invalid slice %d percentage %f. resetting to zero", - module_idP, frameP, subframeP, i, sli->ul[i].pct); + LOG_W(MAC, + "[eNB %d][SLICE %d][UL] frame %d subframe %d: invalid percentage %f. resetting to zero", + module_idP, sli->ul[i].id, frameP, subframeP, sli->ul[i].pct); sli->ul[i].pct = 0; } sli->tot_pct_ul += sli->ul[i].pct; @@ -1088,7 +1089,7 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP, // check if the slice rb share has changed, and log the console if (sli->ul[i].pct_current != sli->ul[i].pct){ LOG_I(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f\n", - module_idP, i, frameP, subframeP, sli->tot_pct_ul_current, + module_idP, sli->ul[i].id, frameP, subframeP, sli->tot_pct_ul_current, sli->tot_pct_ul, sli->ul[i].pct_current, sli->ul[i].pct); sli->tot_pct_ul_current = sli->tot_pct_ul; sli->ul[i].pct_current = sli->ul[i].pct; @@ -1098,11 +1099,12 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP, if (sli->ul[i].maxmcs_current != sli->ul[i].maxmcs){ if ((sli->ul[i].maxmcs >= 0) && (sli->ul[i].maxmcs <= 16)){ LOG_I(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: slice MAX MCS has changed: %d-->%d\n", - module_idP, i, frameP, subframeP, sli->ul[i].maxmcs_current, sli->ul[i].maxmcs); + module_idP, sli->ul[i].id, frameP, subframeP, + sli->ul[i].maxmcs_current, sli->ul[i].maxmcs); sli->ul[i].maxmcs_current = sli->ul[i].maxmcs; } else { LOG_W(MAC,"[eNB %d][SLICE %d][UL] invalid slice max mcs %d, revert the previous value %d\n", - module_idP, i, sli->ul[i].maxmcs, sli->ul[i].maxmcs_current); + module_idP, sli->ul[i].id, sli->ul[i].maxmcs, sli->ul[i].maxmcs_current); sli->ul[i].maxmcs = sli->ul[i].maxmcs_current; } } @@ -1110,11 +1112,13 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP, if (sli->ul[i].first_rb_current != sli->ul[i].first_rb){ if (sli->ul[i].first_rb >= 0){ // FIXME: Max limit is checked in the scheduler LOG_N(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: slice first rb has changed: %d-->%d\n", - module_idP, i, frameP, subframeP, sli->ul[i].first_rb_current, sli->ul[i].first_rb); + module_idP, sli->ul[i].id, frameP, subframeP, + sli->ul[i].first_rb_current, sli->ul[i].first_rb); sli->ul[i].first_rb_current = sli->ul[i].first_rb; } else { LOG_W(MAC,"[eNB %d][SLICE %d][UL] invalid slice first rb %d, revert the previous value %d\n", - module_idP, i, sli->ul[i].first_rb, sli->ul[i].first_rb_current); + module_idP, sli->ul[i].id, sli->ul[i].first_rb, + sli->ul[i].first_rb_current); sli->ul[i].first_rb = sli->ul[i].first_rb_current; } } @@ -1122,13 +1126,13 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP, // check if a new scheduler, and log the console if (sli->ul[i].update_sched_current != sli->ul[i].update_sched) { LOG_I(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: UL scheduler for this slice is updated: %s \n", - module_idP, i, frameP, subframeP, sli->ul[i].sched_name); + module_idP, sli->ul[i].id, frameP, subframeP, sli->ul[i].sched_name); sli->ul[i].update_sched_current = sli->ul[i].update_sched; } } else { if (sli->n_ul == sli->n_ul_current) { LOG_W(MAC,"[eNB %d][SLICE %d][UL] invalid total RB share (%f->%f), reduce proportionally the RB share by 0.1\n", - module_idP, i, sli->tot_pct_ul_current, sli->tot_pct_ul); + module_idP, sli->ul[i].id, sli->tot_pct_ul_current, sli->tot_pct_ul); if (sli->ul[i].pct > sli->avg_pct_ul) { sli->ul[i].pct -= 0.1; sli->tot_pct_ul -= 0.1; @@ -1136,9 +1140,8 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP, } else { // here we can correct the values, e.g. reduce proportionally LOG_W(MAC,"[eNB %d][SLICE %d][UL] invalid total RB share (%f->%f), revert the number of slice to its previous value (%d->%d)\n", - module_idP, i, sli->tot_pct_ul_current, - sli->tot_pct_ul, sli->n_ul, - sli->n_ul_current); + module_idP, sli->ul[i].id, sli->tot_pct_ul_current, + sli->tot_pct_ul, sli->n_ul, sli->n_ul_current); sli->n_ul = sli->n_ul_current; sli->ul[i].pct = sli->ul[i].pct_current; } @@ -1153,7 +1156,7 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP, void schedule_ulsch_rnti(module_id_t module_idP, - slice_id_t slice_id, + int slice_idx, frame_t frameP, sub_frame_t subframeP, unsigned char sched_subframeP, uint16_t * first_rb) @@ -1197,14 +1200,14 @@ schedule_ulsch_rnti(module_id_t module_idP, for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { N_RB_UL = to_prb(cc[CC_id].ul_Bandwidth); - UE_list->first_rb_offset[CC_id][slice_id] = cmin(N_RB_UL, sli->ul[slice_id].first_rb); + UE_list->first_rb_offset[CC_id][slice_idx] = cmin(N_RB_UL, sli->ul[slice_idx].first_rb); } //LOG_D(MAC, "entering ulsch preprocesor\n"); - ulsch_scheduler_pre_processor(module_idP, slice_id, frameP, subframeP, sched_subframeP, first_rb); + ulsch_scheduler_pre_processor(module_idP, slice_idx, frameP, subframeP, sched_subframeP, first_rb); for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { - first_rb_slice[CC_id] = first_rb[CC_id] + UE_list->first_rb_offset[CC_id][slice_id]; + first_rb_slice[CC_id] = first_rb[CC_id] + UE_list->first_rb_offset[CC_id][slice_idx]; } //LOG_D(MAC, "exiting ulsch preprocesor\n"); @@ -1214,7 +1217,7 @@ schedule_ulsch_rnti(module_id_t module_idP, for (UE_id = UE_list->head_ul; UE_id >= 0; UE_id = UE_list->next_ul[UE_id]) { - if (!ue_ul_slice_membership(module_idP, UE_id, slice_id)) + if (!ue_ul_slice_membership(module_idP, UE_id, slice_idx)) continue; // don't schedule if Msg4 is not received yet @@ -1402,7 +1405,7 @@ schedule_ulsch_rnti(module_id_t module_idP, UE_template->oldNDI_UL[harq_pid] = ndi; UE_list->eNB_UE_stats[CC_id][UE_id].normalized_rx_power = normalized_rx_power; UE_list->eNB_UE_stats[CC_id][UE_id].target_rx_power = target_rx_power; - UE_template->mcs_UL[harq_pid] = cmin(UE_template->pre_assigned_mcs_ul, sli->ul[slice_id].maxmcs); + UE_template->mcs_UL[harq_pid] = cmin(UE_template->pre_assigned_mcs_ul, sli->ul[slice_idx].maxmcs); UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1= UE_template->mcs_UL[harq_pid]; //cmin (UE_template->pre_assigned_mcs_ul, openair_daq_vars.target_ue_ul_mcs); // adjust, based on user-defined MCS if (UE_template->pre_allocated_rb_table_index_ul >= 0) { diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h index 0784c14dc3..f22cc4081c 100644 --- a/openair2/LAYER2/MAC/mac.h +++ b/openair2/LAYER2/MAC/mac.h @@ -1104,8 +1104,8 @@ typedef struct { uint16_t sorting_criteria[MAX_NUM_SLICES][CR_NUM]; uint16_t first_rb_offset[NFAPI_CC_MAX][MAX_NUM_SLICES]; - slice_id_t assoc_dl_slice[MAX_MOBILES_PER_ENB]; - slice_id_t assoc_ul_slice[MAX_MOBILES_PER_ENB]; + int assoc_dl_slice_idx[MAX_MOBILES_PER_ENB]; + int assoc_ul_slice_idx[MAX_MOBILES_PER_ENB]; } UE_list_t; @@ -1144,12 +1144,14 @@ typedef struct { * slice specific scheduler for the DL */ typedef void (*slice_scheduler_dl)(module_id_t mod_id, - slice_id_t slice_id, + int slice_idx, frame_t frame, sub_frame_t subframe, int *mbsfn_flag); typedef struct { + slice_id_t id; + /// RB share for each slice for past and current time float pct; float pct_current; @@ -1192,13 +1194,15 @@ typedef struct { } slice_sched_conf_dl_t; typedef void (*slice_scheduler_ul)(module_id_t mod_id, - slice_id_t slice_id, + int slice_idx, frame_t frame, sub_frame_t subframe, unsigned char sched_subframe, uint16_t *first_rb); typedef struct { + slice_id_t id; + /// RB share for each slice for past and current time float pct; float pct_current; diff --git a/openair2/LAYER2/MAC/mac_proto.h b/openair2/LAYER2/MAC/mac_proto.h index ac48cb170d..4837b84d4f 100644 --- a/openair2/LAYER2/MAC/mac_proto.h +++ b/openair2/LAYER2/MAC/mac_proto.h @@ -103,12 +103,12 @@ void schedule_ulsch(module_id_t module_idP, frame_t frameP, /** \brief ULSCH Scheduling per RNTI @param Mod_id Instance ID of eNB -@param slice_id Instance slice for this eNB +@param slice_idx Slice instance index for this eNB @param frame Frame index @param subframe Subframe number on which to act @param sched_subframe Subframe number where PUSCH is transmitted (for DAI lookup) */ -void schedule_ulsch_rnti(module_id_t module_idP, slice_id_t slice_idP, frame_t frameP, +void schedule_ulsch_rnti(module_id_t module_idP, int slice_idx, frame_t frameP, sub_frame_t subframe, unsigned char sched_subframe, uint16_t * first_rb); @@ -131,7 +131,7 @@ void fill_DLSCH_dci(module_id_t module_idP,frame_t frameP,sub_frame_t subframe,i void schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframe, int *mbsfn_flag); -void schedule_ue_spec(module_id_t module_idP, slice_id_t slice_idP, +void schedule_ue_spec(module_id_t module_idP, int slice_idxP, frame_t frameP,sub_frame_t subframe, int *mbsfn_flag); void schedule_ue_spec_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t subframe,int *mbsfn_flag); @@ -192,6 +192,7 @@ void clear_nfapi_information(eNB_MAC_INST * eNB, int CC_idP, // eNB functions /* \brief This function assigns pre-available RBS to each UE in specified sub-bands before scheduling is done @param Mod_id Instance ID of eNB +@param slice_idxP Slice instance index for the slice in which scheduling happens @param frame Index of frame @param subframe Index of current subframe @param N_RBS Number of resource block groups @@ -199,13 +200,13 @@ void clear_nfapi_information(eNB_MAC_INST * eNB, int CC_idP, void dlsch_scheduler_pre_processor(module_id_t module_idP, - slice_id_t slice_idP, + int slice_idxP, frame_t frameP, sub_frame_t subframe, int *mbsfn_flag); void dlsch_scheduler_pre_processor_reset(module_id_t module_idP, - slice_id_t slice_id, + int slice_idx, frame_t frameP, sub_frame_t subframeP, int min_rb_unit[NFAPI_CC_MAX], @@ -215,11 +216,11 @@ void dlsch_scheduler_pre_processor_reset(module_id_t module_idP, int *mbsfn_flag); void dlsch_scheduler_pre_processor_partitioning(module_id_t Mod_id, - slice_id_t slice_id, + int slice_idx, const uint8_t rbs_retx[NFAPI_CC_MAX]); void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, - slice_id_t slice_id, + int slice_idx, frame_t frameP, sub_frame_t subframeP, int min_rb_unit[NFAPI_CC_MAX], @@ -227,7 +228,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]); void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, - slice_id_t slice_id, + int slice_idx, int min_rb_unit[NFAPI_CC_MAX], uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], @@ -236,7 +237,7 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]); void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id, - slice_id_t slice_id, + int slice_idx, int min_rb_unit[NFAPI_CC_MAX], uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], @@ -713,20 +714,20 @@ void set_ul_DAI(int module_idP, int frameP, int subframeP); -void ulsch_scheduler_pre_processor(module_id_t module_idP, slice_id_t slice_id, int frameP, +void ulsch_scheduler_pre_processor(module_id_t module_idP, int slice_idx, int frameP, sub_frame_t subframeP, unsigned char sched_subframeP, uint16_t * first_rb); void store_ulsch_buffer(module_id_t module_idP, int frameP, sub_frame_t subframeP); void sort_ue_ul(module_id_t module_idP, int frameP, sub_frame_t subframeP); -void assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP, +void assign_max_mcs_min_rb(module_id_t module_idP, int slice_idx, int frameP, sub_frame_t subframeP, uint16_t * first_rb); void adjust_bsr_info(int buffer_occupancy, uint16_t TBS, UE_TEMPLATE * UE_template); int phy_stats_exist(module_id_t Mod_id, int rnti); -void sort_UEs(module_id_t Mod_idP, slice_id_t slice_id, int frameP, sub_frame_t subframeP); +void sort_UEs(module_id_t Mod_idP, int slice_idx, int frameP, sub_frame_t subframeP); /*! \fn UE_L2_state_t ue_scheduler(const module_id_t module_idP,const frame_t frameP, const sub_frame_t subframe, const lte_subframe_t direction,const uint8_t eNB_index) \brief UE scheduler where all the ue background tasks are done. This function performs the following: 1) Trigger PDCP every 5ms 2) Call RRC for link status return to PHY3) Perform SR/BSR procedures for scheduling feedback 4) Perform PHR procedures. @@ -1262,8 +1263,8 @@ void pre_scd_nb_rbs_required( module_id_t module_idP, /*Slice related functions */ uint16_t nb_rbs_allowed_slice(float rb_percentage, int total_rbs); -int ue_dl_slice_membership(module_id_t mod_id, int UE_id, slice_id_t slice_id); -int ue_ul_slice_membership(module_id_t mod_id, int UE_id, slice_id_t slice_id); +int ue_dl_slice_membership(module_id_t mod_id, int UE_id, int slice_idx); +int ue_ul_slice_membership(module_id_t mod_id, int UE_id, int slice_idx); /* from here: prototypes to get rid of compilation warnings: doc to be written by function author */ uint8_t ul_subframe2_k_phich(COMMON_channels_t * cc, sub_frame_t ul_subframe); diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index b449e5b0c3..f951b065c6 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -88,7 +88,7 @@ int phy_stats_exist(module_id_t Mod_id, int rnti) // This function stores the downlink buffer for all the logical channels void store_dlsch_buffer(module_id_t Mod_id, - slice_id_t slice_id, + int slice_idx, frame_t frameP, sub_frame_t subframeP) { @@ -102,7 +102,7 @@ store_dlsch_buffer(module_id_t Mod_id, if (UE_list->active[UE_id] != TRUE) continue; - if (!ue_dl_slice_membership(Mod_id, UE_id, slice_id)) + if (!ue_dl_slice_membership(Mod_id, UE_id, slice_idx)) continue; UE_template = &UE_list->UE_template[UE_PCCID(Mod_id, UE_id)][UE_id]; @@ -146,8 +146,8 @@ store_dlsch_buffer(module_id_t Mod_id, if (UE_template->dl_buffer_info[lcid] > 0) LOG_D(MAC, "[eNB %d][SLICE %d] Frame %d Subframe %d : RLC status for UE %d in LCID%d: total of %d pdus and size %d, head sdu queuing time %d, remaining size %d, is segmeneted %d \n", - Mod_id, slice_id, frameP, subframeP, UE_id, - lcid, UE_template->dl_pdus_in_buffer[lcid], + Mod_id, RC.mac[Mod_id]->slice_info.dl[slice_idx].id, frameP, + subframeP, UE_id, lcid, UE_template->dl_pdus_in_buffer[lcid], UE_template->dl_buffer_info[lcid], UE_template->dl_buffer_head_sdu_creation_time[lcid], UE_template->dl_buffer_head_sdu_remaining_size_to_send[lcid], @@ -174,7 +174,7 @@ int cqi2mcs(int cqi) { // This function returns the estimated number of RBs required by each UE for downlink scheduling void assign_rbs_required(module_id_t Mod_id, - slice_id_t slice_id, + int slice_idx, frame_t frameP, sub_frame_t subframe, int min_rb_unit[NFAPI_CC_MAX], @@ -192,7 +192,7 @@ assign_rbs_required(module_id_t Mod_id, // clear rb allocations across all CC_id for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) { if (UE_list->active[UE_id] != TRUE) continue; - if (!ue_dl_slice_membership(Mod_id, UE_id, slice_id)) continue; + if (!ue_dl_slice_membership(Mod_id, UE_id, slice_idx)) continue; pCCid = UE_PCCID(Mod_id, UE_id); //update CQI information across component carriers @@ -200,8 +200,8 @@ assign_rbs_required(module_id_t Mod_id, CC_id = UE_list->ordered_CCids[n][UE_id]; eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id]; -// eNB_UE_stats->dlsch_mcs1 = cmin(cqi_to_mcs[UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id]], sli->dl[slice_id].maxmcs); - eNB_UE_stats->dlsch_mcs1 = cmin(cqi2mcs(UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id]), sli->dl[slice_id].maxmcs); +// eNB_UE_stats->dlsch_mcs1 = cmin(cqi_to_mcs[UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id]], sli->dl[slice_idx].maxmcs); + eNB_UE_stats->dlsch_mcs1 = cmin(cqi2mcs(UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id]), sli->dl[slice_idx].maxmcs); } @@ -243,16 +243,16 @@ assign_rbs_required(module_id_t Mod_id, N_RB_DL = to_prb(RC.mac[Mod_id]->common_channels[CC_id].mib->message.dl_Bandwidth); - UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_id] = - nb_rbs_allowed_slice(sli->dl[slice_id].pct, N_RB_DL); + UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_idx] = + nb_rbs_allowed_slice(sli->dl[slice_idx].pct, N_RB_DL); /* calculating required number of RBs for each UE */ while (TBS < UE_list->UE_template[pCCid][UE_id].dl_buffer_total) { nb_rbs_required[CC_id][UE_id] += min_rb_unit[CC_id]; - if (nb_rbs_required[CC_id][UE_id] > UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_id]) { - TBS = get_TBS_DL(eNB_UE_stats->dlsch_mcs1, UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_id]); - nb_rbs_required[CC_id][UE_id] = UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_id]; + if (nb_rbs_required[CC_id][UE_id] > UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_idx]) { + TBS = get_TBS_DL(eNB_UE_stats->dlsch_mcs1, UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_idx]); + nb_rbs_required[CC_id][UE_id] = UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_idx]; break; } TBS = get_TBS_DL(eNB_UE_stats->dlsch_mcs1, nb_rbs_required[CC_id][UE_id]); @@ -264,7 +264,7 @@ assign_rbs_required(module_id_t Mod_id, nb_rbs_required[CC_id][UE_id], TBS, eNB_UE_stats->dlsch_mcs1); - sli->pre_processor_results[slice_id].mcs[CC_id][UE_id] = eNB_UE_stats->dlsch_mcs1; + sli->pre_processor_results[slice_idx].mcs[CC_id][UE_id] = eNB_UE_stats->dlsch_mcs1; } } } @@ -332,7 +332,7 @@ struct sort_ue_dl_params { int Mod_idP; int frameP; int subframeP; - int slice_id; + int slice_idx; }; static int ue_dl_compare(const void *_a, const void *_b, void *_params) @@ -341,7 +341,7 @@ static int ue_dl_compare(const void *_a, const void *_b, void *_params) UE_list_t *UE_list = &RC.mac[params->Mod_idP]->UE_list; int i; - int slice_id = params->slice_id; + int slice_idx = params->slice_idx; int UE_id1 = *(const int *) _a; int UE_id2 = *(const int *) _b; @@ -360,7 +360,7 @@ static int ue_dl_compare(const void *_a, const void *_b, void *_params) long lcgid2 = min_lcgidpriority(params->Mod_idP, UE_id2); for (i = 0; i < CR_NUM; ++i) { - switch (UE_list->sorting_criteria[slice_id][i]) { + switch (UE_list->sorting_criteria[slice_idx][i]) { case CR_ROUND : if (round1 > round2) @@ -421,28 +421,31 @@ static int ue_dl_compare(const void *_a, const void *_b, void *_params) return 0; } -void decode_sorting_policy(module_id_t Mod_idP, slice_id_t slice_id) { +void decode_sorting_policy(module_id_t Mod_idP, int slice_idx) { int i; UE_list_t *UE_list = &RC.mac[Mod_idP]->UE_list; - uint32_t policy = RC.mac[Mod_idP]->slice_info.dl[slice_id].sorting; + uint32_t policy = RC.mac[Mod_idP]->slice_info.dl[slice_idx].sorting; uint32_t mask = 0x0000000F; uint16_t criterion; for (i = 0; i < CR_NUM; ++i) { criterion = (uint16_t) (policy >> 4 * (CR_NUM - 1 - i) & mask); if (criterion >= CR_NUM) { - LOG_W(MAC, "Invalid criterion in slice %d policy, revert to default policy \n", slice_id); - RC.mac[Mod_idP]->slice_info.dl[slice_id].sorting = 0x12345; + LOG_W(MAC, + "Invalid criterion in slice index %d ID %d policy, revert to default policy \n", + slice_idx, RC.mac[Mod_idP]->slice_info.dl[slice_idx].id); + RC.mac[Mod_idP]->slice_info.dl[slice_idx].sorting = 0x12345; break; } - UE_list->sorting_criteria[slice_id][i] = criterion; + UE_list->sorting_criteria[slice_idx][i] = criterion; } } void decode_slice_positioning(module_id_t Mod_idP, - slice_id_t slice_id, - uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX]) { + int slice_idx, + uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX]) +{ uint8_t CC_id; int RBG, start_frequency, end_frequency; @@ -453,8 +456,8 @@ void decode_slice_positioning(module_id_t Mod_idP, } } - start_frequency = RC.mac[Mod_idP]->slice_info.dl[slice_id].pos_low; - end_frequency = RC.mac[Mod_idP]->slice_info.dl[slice_id].pos_high; + start_frequency = RC.mac[Mod_idP]->slice_info.dl[slice_idx].pos_low; + end_frequency = RC.mac[Mod_idP]->slice_info.dl[slice_idx].pos_high; for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { for (RBG = start_frequency; RBG <= end_frequency; ++RBG) { slice_allocation_mask[CC_id][RBG] = 1; @@ -464,12 +467,12 @@ void decode_slice_positioning(module_id_t Mod_idP, // This fuction sorts the UE in order their dlsch buffer and CQI -void sort_UEs(module_id_t Mod_idP, slice_id_t slice_id, int frameP, sub_frame_t subframeP) +void sort_UEs(module_id_t Mod_idP, int slice_idx, int frameP, sub_frame_t subframeP) { int i; int list[MAX_MOBILES_PER_ENB]; int list_size = 0; - struct sort_ue_dl_params params = {Mod_idP, frameP, subframeP, slice_id}; + struct sort_ue_dl_params params = {Mod_idP, frameP, subframeP, slice_idx}; UE_list_t *UE_list = &RC.mac[Mod_idP]->UE_list; @@ -478,13 +481,13 @@ void sort_UEs(module_id_t Mod_idP, slice_id_t slice_id, int frameP, sub_frame_t if (UE_list->active[i] == FALSE) continue; if (UE_RNTI(Mod_idP, i) == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1) continue; - if (!ue_dl_slice_membership(Mod_idP, i, slice_id)) continue; + if (!ue_dl_slice_membership(Mod_idP, i, slice_idx)) continue; list[list_size] = i; list_size++; } - decode_sorting_policy(Mod_idP, slice_id); + decode_sorting_policy(Mod_idP, slice_idx); qsort_r(list, list_size, sizeof(int), ue_dl_compare, ¶ms); @@ -571,8 +574,9 @@ void sort_UEs(module_id_t Mod_idP, slice_id_t slice_id, int frameP, sub_frame_t } void dlsch_scheduler_pre_processor_partitioning(module_id_t Mod_id, - slice_id_t slice_id, - const uint8_t rbs_retx[NFAPI_CC_MAX]) { + int slice_idx, + const uint8_t rbs_retx[NFAPI_CC_MAX]) +{ int UE_id, CC_id, N_RB_DL, i; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; UE_sched_ctrl *ue_sched_ctl; @@ -582,24 +586,24 @@ void dlsch_scheduler_pre_processor_partitioning(module_id_t Mod_id, if (UE_RNTI(Mod_id, UE_id) == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_dl_slice_membership(Mod_id, UE_id, slice_id)) continue; + if (!ue_dl_slice_membership(Mod_id, UE_id, slice_idx)) continue; ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); ++i) { CC_id = UE_list->ordered_CCids[i][UE_id]; N_RB_DL = to_prb(RC.mac[Mod_id]->common_channels[CC_id].mib->message.dl_Bandwidth); - available_rbs = nb_rbs_allowed_slice(RC.mac[Mod_id]->slice_info.dl[slice_id].pct, N_RB_DL); + available_rbs = nb_rbs_allowed_slice(RC.mac[Mod_id]->slice_info.dl[slice_idx].pct, N_RB_DL); if (rbs_retx[CC_id] < available_rbs) - ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_id] = available_rbs - rbs_retx[CC_id]; + ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_idx] = available_rbs - rbs_retx[CC_id]; else - ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_id] = 0; + ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_idx] = 0; } } } void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, - slice_id_t slice_id, + int slice_idx, frame_t frameP, sub_frame_t subframeP, int min_rb_unit[NFAPI_CC_MAX], @@ -640,7 +644,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, rnti = UE_RNTI(Mod_id, UE_id); if (rnti == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_dl_slice_membership(Mod_id, UE_id, slice_id)) continue; + if (!ue_dl_slice_membership(Mod_id, UE_id, slice_idx)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); ++i) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -670,9 +674,9 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, // PARTITIONING // Reduces the available RBs according to slicing configuration - dlsch_scheduler_pre_processor_partitioning(Mod_id, slice_id, rbs_retx); + dlsch_scheduler_pre_processor_partitioning(Mod_id, slice_idx, rbs_retx); - switch (RC.mac[Mod_id]->slice_info.dl[slice_id].accounting) { + switch (RC.mac[Mod_id]->slice_info.dl[slice_idx].accounting) { // If greedy scheduling, try to account all the required RBs case POL_GREEDY: @@ -680,7 +684,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, rnti = UE_RNTI(Mod_id, UE_id); if (rnti == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_dl_slice_membership(Mod_id, UE_id, slice_id)) continue; + if (!ue_dl_slice_membership(Mod_id, UE_id, slice_idx)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -700,13 +704,13 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, if (rnti == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_dl_slice_membership(Mod_id, UE_id, slice_id)) continue; + if (!ue_dl_slice_membership(Mod_id, UE_id, slice_idx)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); ++i) { CC_id = UE_list->ordered_CCids[i][UE_id]; ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; - available_rbs = ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_id]; + available_rbs = ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_idx]; if (ue_count_newtx[CC_id] == 0) { average_rbs_per_user[CC_id] = 0; @@ -725,7 +729,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, rnti = UE_RNTI(Mod_id, UE_id); if (rnti == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_dl_slice_membership(Mod_id, UE_id, slice_id)) continue; + if (!ue_dl_slice_membership(Mod_id, UE_id, slice_idx)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -744,7 +748,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, rnti = UE_RNTI(Mod_id, UE_id); if (rnti == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_dl_slice_membership(Mod_id, UE_id, slice_id)) continue; + if (!ue_dl_slice_membership(Mod_id, UE_id, slice_idx)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -763,7 +767,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, } void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, - slice_id_t slice_id, + int slice_idx, int min_rb_unit[NFAPI_CC_MAX], uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], @@ -780,7 +784,7 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; - decode_slice_positioning(Mod_id, slice_id, slice_allocation_mask); + decode_slice_positioning(Mod_id, slice_idx, slice_allocation_mask); for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) { COMMON_channels_t *cc = &RC.mac[Mod_id]->common_channels[CC_id]; @@ -792,7 +796,7 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, if (UE_RNTI(Mod_id, UE_id) == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_dl_slice_membership(Mod_id, UE_id, slice_id)) continue; + if (!ue_dl_slice_membership(Mod_id, UE_id, slice_idx)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -990,23 +994,23 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, } void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id, - slice_id_t slice_id, + int slice_idx, int min_rb_unit[NFAPI_CC_MAX], uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX], - uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]) { - + uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]) +{ int UE_id, CC_id; int i; uint8_t transmission_mode; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; int N_RBG[NFAPI_CC_MAX]; slice_info_t *sli = &RC.mac[Mod_id]->slice_info; - uint8_t (*slice_allocation_mask)[N_RBG_MAX] = sli->pre_processor_results[slice_id].slice_allocation_mask; + uint8_t (*slice_allocation_mask)[N_RBG_MAX] = sli->pre_processor_results[slice_idx].slice_allocation_mask; - decode_slice_positioning(Mod_id, slice_id, slice_allocation_mask); + decode_slice_positioning(Mod_id, slice_idx, slice_allocation_mask); for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) { COMMON_channels_t *cc = &RC.mac[Mod_id]->common_channels[CC_id]; @@ -1018,7 +1022,7 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id, if (UE_RNTI(Mod_id, UE_id) == NOT_A_RNTI) continue; if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync == 1) continue; - if (!ue_dl_slice_membership(Mod_id, UE_id, slice_id)) continue; + if (!ue_dl_slice_membership(Mod_id, UE_id, slice_idx)) continue; for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -1221,7 +1225,7 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id, // This function assigns pre-available RBS to each UE in specified sub-bands before scheduling is done void dlsch_scheduler_pre_processor(module_id_t Mod_id, - slice_id_t slice_id, + int slice_idx, frame_t frameP, sub_frame_t subframeP, int *mbsfn_flag) @@ -1233,11 +1237,11 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, int min_rb_unit[NFAPI_CC_MAX]; slice_info_t *sli = &RC.mac[Mod_id]->slice_info; - uint16_t (*nb_rbs_required)[MAX_MOBILES_PER_ENB] = sli->pre_processor_results[slice_id].nb_rbs_required; - uint16_t (*nb_rbs_accounted)[MAX_MOBILES_PER_ENB] = sli->pre_processor_results[slice_id].nb_rbs_accounted; - uint16_t (*nb_rbs_remaining)[MAX_MOBILES_PER_ENB] = sli->pre_processor_results[slice_id].nb_rbs_remaining; - uint8_t (*rballoc_sub)[N_RBG_MAX] = sli->pre_processor_results[slice_id].slice_allocated_rbgs; - uint8_t (*MIMO_mode_indicator)[N_RBG_MAX] = sli->pre_processor_results[slice_id].MIMO_mode_indicator; + uint16_t (*nb_rbs_required)[MAX_MOBILES_PER_ENB] = sli->pre_processor_results[slice_idx].nb_rbs_required; + uint16_t (*nb_rbs_accounted)[MAX_MOBILES_PER_ENB] = sli->pre_processor_results[slice_idx].nb_rbs_accounted; + uint16_t (*nb_rbs_remaining)[MAX_MOBILES_PER_ENB] = sli->pre_processor_results[slice_idx].nb_rbs_remaining; + uint8_t (*rballoc_sub)[N_RBG_MAX] = sli->pre_processor_results[slice_idx].slice_allocated_rbgs; + uint8_t (*MIMO_mode_indicator)[N_RBG_MAX] = sli->pre_processor_results[slice_idx].MIMO_mode_indicator; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; UE_sched_ctrl *ue_sched_ctl; @@ -1255,9 +1259,9 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, #endif // Initialize scheduling information for all active UEs - memset(&sli->pre_processor_results[slice_id], 0, sizeof(sli->pre_processor_results)); + memset(&sli->pre_processor_results[slice_idx], 0, sizeof(sli->pre_processor_results)); // FIXME: After the memset above, some of the resets in reset() are redundant - dlsch_scheduler_pre_processor_reset(Mod_id, slice_id, frameP, subframeP, + dlsch_scheduler_pre_processor_reset(Mod_id, slice_idx, frameP, subframeP, min_rb_unit, nb_rbs_required, rballoc_sub, @@ -1266,25 +1270,25 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, // STATUS // Store the DLSCH buffer for each logical channel - store_dlsch_buffer(Mod_id, slice_id, frameP, subframeP); + store_dlsch_buffer(Mod_id, slice_idx, frameP, subframeP); // Calculate the number of RBs required by each UE on the basis of logical channel's buffer - assign_rbs_required(Mod_id, slice_id, frameP, subframeP, + assign_rbs_required(Mod_id, slice_idx, frameP, subframeP, min_rb_unit, nb_rbs_required); // Sorts the user on the basis of dlsch logical channel buffer and CQI - sort_UEs(Mod_id, slice_id, frameP, subframeP); + sort_UEs(Mod_id, slice_idx, frameP, subframeP); // ACCOUNTING // This procedure decides the number of RBs to allocate - dlsch_scheduler_pre_processor_accounting(Mod_id, slice_id, frameP, subframeP, + dlsch_scheduler_pre_processor_accounting(Mod_id, slice_idx, frameP, subframeP, min_rb_unit, nb_rbs_required, nb_rbs_accounted); // POSITIONING // This procedure does the main allocation of the RBs - dlsch_scheduler_pre_processor_positioning(Mod_id, slice_id, + dlsch_scheduler_pre_processor_positioning(Mod_id, slice_idx, min_rb_unit, nb_rbs_required, nb_rbs_accounted, @@ -1295,7 +1299,7 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, // SHARING // If there are available RBs left in the slice, allocate them to the highest priority UEs if (RC.mac[Mod_id]->slice_info.intraslice_share_active) { - dlsch_scheduler_pre_processor_intraslice_sharing(Mod_id, slice_id, + dlsch_scheduler_pre_processor_intraslice_sharing(Mod_id, slice_idx, min_rb_unit, nb_rbs_required, nb_rbs_accounted, @@ -1369,7 +1373,8 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, //PHY_vars_eNB_g[Mod_id]->mu_mimo_mode[UE_id].pre_nb_available_rbs = pre_nb_available_rbs[CC_id][UE_id]; LOG_D(MAC, "[eNB %d][SLICE %d]Total RBs allocated for UE%d = %d\n", - Mod_id, slice_id, UE_id, ue_sched_ctl->pre_nb_available_rbs[CC_id]); + Mod_id, RC.mac[Mod_id]->slice_info.dl[slice_idx].id, UE_id, + ue_sched_ctl->pre_nb_available_rbs[CC_id]); } } } @@ -1379,7 +1384,7 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, void dlsch_scheduler_pre_processor_reset(module_id_t module_idP, - slice_id_t slice_id, + int slice_idx, frame_t frameP, sub_frame_t subframeP, int min_rb_unit[NFAPI_CC_MAX], @@ -1432,7 +1437,7 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP, if (UE_list->active[UE_id] != TRUE) continue; - if (!ue_dl_slice_membership(module_idP, UE_id, slice_id)) + if (!ue_dl_slice_membership(module_idP, UE_id, slice_idx)) continue; vrb_map = RC.mac[module_idP]->common_channels[CC_id].vrb_map; @@ -1660,7 +1665,7 @@ dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id, /// ULSCH PRE_PROCESSOR void ulsch_scheduler_pre_processor(module_id_t module_idP, - slice_id_t slice_id, + int slice_idx, int frameP, sub_frame_t subframeP, unsigned char sched_subframeP, @@ -1684,7 +1689,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, LOG_D(MAC, "In ulsch_preprocessor: assign max mcs min rb\n"); // maximize MCS and then allocate required RB according to the buffer occupancy with the limit of max available UL RB - assign_max_mcs_min_rb(module_idP, slice_id, frameP, subframeP, first_rb); + assign_max_mcs_min_rb(module_idP, slice_idx, frameP, subframeP, first_rb); LOG_D(MAC, "In ulsch_preprocessor: sort ue \n"); // sort ues @@ -1706,9 +1711,9 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, // This is the actual CC_id in the list CC_id = UE_list->ordered_ULCCids[n][i]; UE_template = &UE_list->UE_template[CC_id][i]; - if (!ue_ul_slice_membership(module_idP, i, slice_id)) + if (!ue_ul_slice_membership(module_idP, i, slice_idx)) continue; - if (UE_template->pre_allocated_nb_rb_ul[slice_id] > 0) { + if (UE_template->pre_allocated_nb_rb_ul[slice_idx] > 0) { total_ue_count[CC_id] += 1; } } @@ -1727,7 +1732,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1) continue; - if (!ue_ul_slice_membership(module_idP, UE_id, slice_id)) + if (!ue_ul_slice_membership(module_idP, UE_id, slice_idx)) continue; LOG_D(MAC, "In ulsch_preprocessor: handling UE %d/%x\n", UE_id, @@ -1751,11 +1756,11 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, N_RB_UL = to_prb(RC.mac[module_idP]->common_channels[CC_id].ul_Bandwidth); ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; - ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id] = - nb_rbs_allowed_slice(sli->ul[slice_id].pct, N_RB_UL); + ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_idx] = + nb_rbs_allowed_slice(sli->ul[slice_idx].pct, N_RB_UL); - first_rb_offset = UE_list->first_rb_offset[CC_id][slice_id]; - available_rbs = cmin(ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id], + first_rb_offset = UE_list->first_rb_offset[CC_id][slice_idx]; + available_rbs = cmin(ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_idx], N_RB_UL - first_rb[CC_id] - first_rb_offset); if (total_ue_count[CC_id] == 0) { @@ -1784,7 +1789,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, continue; if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1) continue; - if (!ue_ul_slice_membership(module_idP, i, slice_id)) + if (!ue_ul_slice_membership(module_idP, i, slice_idx)) continue; @@ -1803,7 +1808,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, nb_allocated_rbs[CC_id][UE_id] = UE_list->UE_template[CC_id][UE_id].nb_rb_ul[harq_pid]; } else { nb_allocated_rbs[CC_id][UE_id] = - cmin(UE_list->UE_template[CC_id][UE_id].pre_allocated_nb_rb_ul[slice_id], + cmin(UE_list->UE_template[CC_id][UE_id].pre_allocated_nb_rb_ul[slice_idx], average_rbs_per_user[CC_id]); } @@ -1825,7 +1830,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, continue; if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1) continue; - if (!ue_ul_slice_membership(module_idP, i, slice_id)) + if (!ue_ul_slice_membership(module_idP, i, slice_idx)) continue; UE_id = i; @@ -1836,8 +1841,8 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, CC_id = UE_list->ordered_ULCCids[n][UE_id]; UE_template = &UE_list->UE_template[CC_id][UE_id]; N_RB_UL = to_prb(RC.mac[module_idP]->common_channels[CC_id].ul_Bandwidth); - first_rb_offset = UE_list->first_rb_offset[CC_id][slice_id]; - available_rbs = cmin(ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id], + first_rb_offset = UE_list->first_rb_offset[CC_id][slice_idx]; + available_rbs = cmin(ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_idx], N_RB_UL - first_rb[CC_id] - first_rb_offset); total_remaining_rbs[CC_id] = available_rbs - total_allocated_rbs[CC_id]; @@ -1846,17 +1851,17 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, } if (r == 0) { - while ((UE_template->pre_allocated_nb_rb_ul[slice_id] > 0) - && (nb_allocated_rbs[CC_id][UE_id] < UE_template->pre_allocated_nb_rb_ul[slice_id]) + while ((UE_template->pre_allocated_nb_rb_ul[slice_idx] > 0) + && (nb_allocated_rbs[CC_id][UE_id] < UE_template->pre_allocated_nb_rb_ul[slice_idx]) && (total_remaining_rbs[CC_id] > 0)) { nb_allocated_rbs[CC_id][UE_id] = cmin(nb_allocated_rbs[CC_id][UE_id] + 1, - UE_template->pre_allocated_nb_rb_ul[slice_id]); + UE_template->pre_allocated_nb_rb_ul[slice_idx]); total_remaining_rbs[CC_id]--; total_allocated_rbs[CC_id]++; } } else { - UE_template->pre_allocated_nb_rb_ul[slice_id] = + UE_template->pre_allocated_nb_rb_ul[slice_idx] = nb_allocated_rbs[CC_id][UE_id]; LOG_D(MAC, "******************UL Scheduling Information for UE%d CC_id %d ************************\n", @@ -1864,7 +1869,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, LOG_D(MAC, "[eNB %d] total RB allocated for UE%d CC_id %d = %d\n", module_idP, UE_id, CC_id, - UE_template->pre_allocated_nb_rb_ul[slice_id]); + UE_template->pre_allocated_nb_rb_ul[slice_idx]); } } } @@ -1872,7 +1877,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, } void -assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP, +assign_max_mcs_min_rb(module_id_t module_idP, int slice_idx, int frameP, sub_frame_t subframeP, uint16_t * first_rb) { @@ -1902,16 +1907,16 @@ assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP, continue; if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1) continue; - if (!ue_ul_slice_membership(module_idP, i, slice_id)) + if (!ue_ul_slice_membership(module_idP, i, slice_idx)) continue; if (UE_list->UE_sched_ctrl[i].phr_received == 1) { /* if we've received the power headroom information the UE, we can go to * maximum mcs */ - mcs = cmin(20, sli->ul[slice_id].maxmcs); + mcs = cmin(20, sli->ul[slice_idx].maxmcs); } else { /* otherwise, limit to QPSK PUSCH */ - mcs = cmin(10, sli->ul[slice_id].maxmcs); + mcs = cmin(10, sli->ul[slice_idx].maxmcs); } UE_id = i; @@ -1933,8 +1938,8 @@ assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP, Ncp = RC.mac[module_idP]->common_channels[CC_id].Ncp; N_RB_UL = to_prb(RC.mac[module_idP]->common_channels[CC_id].ul_Bandwidth); - ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id] = - nb_rbs_allowed_slice(sli->ul[slice_id].pct, N_RB_UL); + ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_idx] = + nb_rbs_allowed_slice(sli->ul[slice_idx].pct, N_RB_UL); int bytes_to_schedule = UE_template->estimated_ul_buffer - UE_template->scheduled_ul_bytes; if (bytes_to_schedule < 0) bytes_to_schedule = 0; @@ -1957,8 +1962,8 @@ assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP, tx_power = estimate_ue_tx_power(tbs, rb_table[rb_table_index], 0, Ncp, 0); // fixme: set use_srs } - first_rb_offset = UE_list->first_rb_offset[CC_id][slice_id]; - available_rbs = cmin(ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id], + first_rb_offset = UE_list->first_rb_offset[CC_id][slice_idx]; + available_rbs = cmin(ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_idx], N_RB_UL - first_rb[CC_id] - first_rb_offset); while ((tbs < bits_to_schedule) @@ -1979,13 +1984,13 @@ assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP, } UE_template->pre_allocated_rb_table_index_ul = rb_table_index; - UE_template->pre_allocated_nb_rb_ul[slice_id] = rb_table[rb_table_index]; + UE_template->pre_allocated_nb_rb_ul[slice_idx] = rb_table[rb_table_index]; LOG_D(MAC, "[eNB %d] frame %d subframe %d: for UE %d CC %d: pre-assigned mcs %d, pre-allocated rb_table[%d]=%d RBs (phr %d, tx power %d)\n", module_idP, frameP, subframeP, UE_id, CC_id, UE_template->pre_assigned_mcs_ul, UE_template->pre_allocated_rb_table_index_ul, - UE_template->pre_allocated_nb_rb_ul[slice_id], + UE_template->pre_allocated_nb_rb_ul[slice_idx], UE_template->phr_info, tx_power); } else { /* if UE has pending scheduling request then pre-allocate 3 RBs */ @@ -1994,11 +1999,11 @@ assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP, /* use QPSK mcs */ UE_template->pre_assigned_mcs_ul = 10; UE_template->pre_allocated_rb_table_index_ul = 2; - UE_template->pre_allocated_nb_rb_ul[slice_id] = 3; + UE_template->pre_allocated_nb_rb_ul[slice_idx] = 3; } else { UE_template->pre_assigned_mcs_ul = 0; UE_template->pre_allocated_rb_table_index_ul = -1; - UE_template->pre_allocated_nb_rb_ul[slice_id] = 0; + UE_template->pre_allocated_nb_rb_ul[slice_idx] = 0; } } } From 1d23a64cedb75aaacebfc2cc66fc14eeafca149f Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 18 Apr 2018 19:16:58 +0200 Subject: [PATCH 096/379] bugfix: memset using the right size --- openair2/LAYER2/MAC/pre_processor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index f951b065c6..36e5cfa4f1 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -1259,7 +1259,7 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, #endif // Initialize scheduling information for all active UEs - memset(&sli->pre_processor_results[slice_idx], 0, sizeof(sli->pre_processor_results)); + memset(&sli->pre_processor_results[slice_idx], 0, sizeof(sli->pre_processor_results[slice_idx])); // FIXME: After the memset above, some of the resets in reset() are redundant dlsch_scheduler_pre_processor_reset(Mod_id, slice_idx, frameP, subframeP, min_rb_unit, From 59fc7832fab7ce55e438150cee942f624be4c221 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 18 Apr 2018 19:17:40 +0200 Subject: [PATCH 097/379] bugfixes: set max UL MCS to 20, improve sched loading message --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 3 ++- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index d27ef6c40e..0d5dd38b5c 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -465,7 +465,8 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in sli->dl[i].sched_cb = dlsym(NULL, sli->dl[i].sched_name); sli->dl[i].update_sched = 0; sli->dl[i].update_sched_current = 0; - LOG_I(MAC, "update dl scheduler slice index %d ID %d\n", i, sli->dl[i].id); + LOG_I(MAC, "update dl scheduler (%s) slice index %d ID %d\n", + sli->dl[i].sched_name, i, sli->dl[i].id); } if (sli->tot_pct_dl <= 1.0) { // the new total RB share is within the range diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 4197ed6ba3..684a74f0f7 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -1068,7 +1068,8 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP, //sli->tot_pct_ul_current += sli->ul[i].pct; //if (sli->tot_pct_ul_current > 1) //sli->tot_pct_ul_current = 1; - LOG_I(MAC,"update ul scheduler slice %d\n", i); + LOG_I(MAC,"update ul scheduler (%s) slice index %d ID %d\n", + sli->ul[i].sched_name, i, sli->ul[i].id); } // the new total RB share is within the range if (sli->tot_pct_ul <= 1.0){ @@ -1097,7 +1098,7 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP, // check if the slice max MCS, and log the console if (sli->ul[i].maxmcs_current != sli->ul[i].maxmcs){ - if ((sli->ul[i].maxmcs >= 0) && (sli->ul[i].maxmcs <= 16)){ + if ((sli->ul[i].maxmcs >= 0) && (sli->ul[i].maxmcs <= 20)){ LOG_I(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: slice MAX MCS has changed: %d-->%d\n", module_idP, sli->ul[i].id, frameP, subframeP, sli->ul[i].maxmcs_current, sli->ul[i].maxmcs); From b29e20d4dd0d72646c4bc0d1b6d2ad7a53bb14ba Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 19 Apr 2018 14:32:44 +0200 Subject: [PATCH 098/379] MAC sched slicing: sort only relevant slices --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 0d5dd38b5c..34f8fe0b85 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -2353,9 +2353,10 @@ static int slice_priority_compare(const void *_a, const void *_b, void *_c) void slice_priority_sort(module_id_t Mod_id, int slice_list[MAX_NUM_SLICES]) { int i; - for (i = 0; i < MAX_NUM_SLICES; ++i) { + for (i = 0; i < RC.mac[Mod_id]->slice_info.n_dl; ++i) { slice_list[i] = i; } - qsort_r(slice_list, MAX_NUM_SLICES, sizeof(int), slice_priority_compare, &Mod_id); + qsort_r(slice_list, RC.mac[Mod_id]->slice_info.n_dl, sizeof(int), + slice_priority_compare, &Mod_id); } From de4ebe09144488197f65f4a10ea94e5b281638ae Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 19 Apr 2018 16:47:33 +0200 Subject: [PATCH 099/379] remove warnings (comment concerned lines) --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 4 ++-- openair2/LAYER2/MAC/pre_processor.c | 20 +++++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 34f8fe0b85..ccc5a944a7 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -1763,7 +1763,7 @@ void dlsch_scheduler_qos_multiplexing(module_id_t Mod_id, int frameP, sub_frame_ int UE_id, CC_id, i; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; slice_info_t *sli = &RC.mac[Mod_id]->slice_info; - UE_sched_ctrl *ue_sched_ctl; + //UE_sched_ctrl *ue_sched_ctl; for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { for (i = 0; i < sli->n_dl; ++i) { @@ -1773,7 +1773,7 @@ void dlsch_scheduler_qos_multiplexing(module_id_t Mod_id, int frameP, sub_frame_ sort_UEs(Mod_id, (uint8_t)i, frameP, subframeP); for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { - ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; + //ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; // TODO: Do something here // ue_sched_ctl->pre_nb_available_rbs[CC_id]; diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 36e5cfa4f1..8334219371 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -621,7 +621,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, int total_ue_count[NFAPI_CC_MAX]; int ue_count_newtx[NFAPI_CC_MAX]; int ue_count_retx[NFAPI_CC_MAX]; - uint8_t ue_retx_flag[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; + //uint8_t ue_retx_flag[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; UE_sched_ctrl *ue_sched_ctl; @@ -634,9 +634,9 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, ue_count_retx[CC_id] = 0; rbs_retx[CC_id] = 0; average_rbs_per_user[CC_id] = 0; - for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; ++UE_id) { - ue_retx_flag[CC_id][UE_id] = 0; - } + //for (UE_id = 0; UE_id < NFAPI_CC_MAX; ++UE_id) { + // ue_retx_flag[CC_id][UE_id] = 0; + //} } // Find total UE count, and account the RBs required for retransmissions @@ -665,7 +665,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, nb_rbs_required[CC_id][UE_id] = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid]; rbs_retx[CC_id] += nb_rbs_required[CC_id][UE_id]; ue_count_retx[CC_id]++; - ue_retx_flag[CC_id][UE_id] = 1; + //ue_retx_flag[CC_id][UE_id] = 1; } else { ue_count_newtx[CC_id]++; } @@ -777,11 +777,11 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, { int UE_id, CC_id; int i; +#ifdef TM5 uint8_t transmission_mode; - +#endif uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX]; int N_RBG[NFAPI_CC_MAX]; - UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; decode_slice_positioning(Mod_id, slice_idx, slice_allocation_mask); @@ -801,7 +801,9 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id, for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; nb_rbs_remaining[CC_id][UE_id] = nb_rbs_accounted[CC_id][UE_id]; +#ifdef TM5 transmission_mode = get_tmode(Mod_id, CC_id, UE_id); +#endif if (nb_rbs_required[CC_id][UE_id] > 0) LOG_D(MAC, @@ -1004,7 +1006,9 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id, { int UE_id, CC_id; int i; +#ifdef TM5 uint8_t transmission_mode; +#endif UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; int N_RBG[NFAPI_CC_MAX]; slice_info_t *sli = &RC.mac[Mod_id]->slice_info; @@ -1030,7 +1034,9 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id, nb_rbs_required[CC_id][UE_id] - nb_rbs_accounted[CC_id][UE_id] + nb_rbs_remaining[CC_id][UE_id]; if (nb_rbs_remaining[CC_id][UE_id] < 0) abort(); +#ifdef TM5 transmission_mode = get_tmode(Mod_id, CC_id, UE_id); +#endif if (nb_rbs_required[CC_id][UE_id] > 0) LOG_D(MAC, From 9d75b5c3b79d3d0bd4a23b80a6cdab9fad686c69 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 23 Apr 2018 16:03:27 +0200 Subject: [PATCH 100/379] Add FlexRAN RAN API for slice configuration adds support for: * create/remove slices * change UE-slice association * read/write slice parameters * find slice index via ID --- openair2/ENB_APP/flexran_agent_ran_api.c | 448 +++++++++++++++++++++++ openair2/ENB_APP/flexran_agent_ran_api.h | 152 ++++++++ 2 files changed, 600 insertions(+) diff --git a/openair2/ENB_APP/flexran_agent_ran_api.c b/openair2/ENB_APP/flexran_agent_ran_api.c index e39d676061..9b6ecae593 100644 --- a/openair2/ENB_APP/flexran_agent_ran_api.c +++ b/openair2/ENB_APP/flexran_agent_ran_api.c @@ -1393,3 +1393,451 @@ float flexran_get_rrc_neigh_rsrq(mid_t mod_id, mid_t ue_id, int cell_id) if (!ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->measResult.rsrqResult) return 0; return RSRQ_meas_mapping[*(ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->measResult.rsrqResult)]; } + +int flexran_get_ue_dl_slice_id(mid_t mod_id, mid_t ue_id) +{ + if (!mac_is_present(mod_id)) return -1; + int slice_idx = RC.mac[mod_id]->UE_list.assoc_dl_slice_idx[ue_id]; + if (slice_idx >= 0 && slice_idx < RC.mac[mod_id]->slice_info.n_dl) + return RC.mac[mod_id]->slice_info.dl[slice_idx].id; + return 0; +} + +void flexran_set_ue_dl_slice_idx(mid_t mod_id, mid_t ue_id, int slice_idx) +{ + if (!mac_is_present(mod_id)) return; + if (flexran_get_ue_crnti(mod_id, ue_id) == NOT_A_RNTI) return; + if (!flexran_dl_slice_exists(mod_id, slice_idx)) return; + RC.mac[mod_id]->UE_list.assoc_dl_slice_idx[ue_id] = slice_idx; +} + +int flexran_get_ue_ul_slice_id(mid_t mod_id, mid_t ue_id) +{ + if (!mac_is_present(mod_id)) return -1; + int slice_idx = RC.mac[mod_id]->UE_list.assoc_ul_slice_idx[ue_id]; + if (slice_idx >= 0 && slice_idx < RC.mac[mod_id]->slice_info.n_ul) + return RC.mac[mod_id]->slice_info.ul[slice_idx].id; + return 0; +} + +void flexran_set_ue_ul_slice_idx(mid_t mod_id, mid_t ue_id, int slice_idx) +{ + if (!mac_is_present(mod_id)) return; + if (flexran_get_ue_crnti(mod_id, ue_id) == NOT_A_RNTI) return; + if (!flexran_ul_slice_exists(mod_id, slice_idx)) return; + RC.mac[mod_id]->UE_list.assoc_ul_slice_idx[ue_id] = slice_idx; +} + +int flexran_dl_slice_exists(mid_t mod_id, int slice_idx) +{ + if (!mac_is_present(mod_id)) return -1; + return slice_idx >= 0 && slice_idx < RC.mac[mod_id]->slice_info.n_dl; +} + +int flexran_create_dl_slice(mid_t mod_id, slice_id_t slice_id, int slice_default_values_idx) +{ + if (!mac_is_present(mod_id)) return -1; + if (!flexran_dl_slice_exists(mod_id, slice_default_values_idx)) return -1; + int newidx = RC.mac[mod_id]->slice_info.n_dl; + if (newidx >= MAX_NUM_SLICES) return -1; + + ++RC.mac[mod_id]->slice_info.n_dl; + flexran_set_dl_slice_id(mod_id, newidx, slice_id); + flexran_set_dl_slice_percentage(mod_id, newidx, + flexran_get_dl_slice_percentage(mod_id, slice_default_values_idx)); + flexran_set_dl_slice_isolation(mod_id, newidx, + flexran_get_dl_slice_isolation(mod_id, slice_default_values_idx)); + flexran_set_dl_slice_priority(mod_id, newidx, + flexran_get_dl_slice_priority(mod_id, slice_default_values_idx)); + flexran_set_dl_slice_position_low(mod_id, newidx, + flexran_get_dl_slice_position_low(mod_id, slice_default_values_idx)); + flexran_set_dl_slice_position_high(mod_id, newidx, + flexran_get_dl_slice_position_high(mod_id, slice_default_values_idx)); + flexran_set_dl_slice_maxmcs(mod_id, newidx, + flexran_get_dl_slice_maxmcs(mod_id, slice_default_values_idx)); + Protocol__FlexDlSorting *sorting = NULL; + int n = flexran_get_dl_slice_sorting(mod_id, slice_default_values_idx, &sorting); + flexran_set_dl_slice_sorting(mod_id, newidx, sorting, n); + free(sorting); + flexran_set_dl_slice_accounting_policy(mod_id, newidx, + flexran_get_dl_slice_accounting_policy(mod_id, slice_default_values_idx)); + flexran_set_dl_slice_scheduler_name(mod_id, newidx, + flexran_get_dl_slice_scheduler_name(mod_id, slice_default_values_idx)); + return newidx; +} + +int flexran_find_dl_slice(mid_t mod_id, slice_id_t slice_id) +{ + if (!mac_is_present(mod_id)) return -1; + slice_info_t *sli = &RC.mac[mod_id]->slice_info; + int n = sli->n_dl; + for (int i = 0; i < n; i++) { + if (sli->dl[i].id == slice_id) return i; + } + return -1; +} + +int flexran_remove_dl_slice(mid_t mod_id, int slice_idx) +{ + if (!mac_is_present(mod_id)) return -1; + slice_info_t *sli = &RC.mac[mod_id]->slice_info; + if (sli->n_dl <= 1) return -1; + + --sli->n_dl; + /* move last element to the position of the removed one */ + if (slice_idx != sli->n_dl) + memcpy(&sli->dl[slice_idx], &sli->dl[sli->n_dl], sizeof(sli->dl[sli->n_dl])); + + /* all UEs that have been in the old slice are put into slice index 0 */ + int *assoc_list = RC.mac[mod_id]->UE_list.assoc_dl_slice_idx; + for (int i = 0; i < MAX_MOBILES_PER_ENB; ++i) { + if (assoc_list[i] == slice_idx) + assoc_list[i] = 0; + } + return sli->n_dl; +} + +int flexran_get_num_dl_slices(mid_t mod_id) +{ + if (!mac_is_present(mod_id)) return -1; + return RC.mac[mod_id]->slice_info.n_dl; +} + +int flexran_get_intraslice_sharing_active(mid_t mod_id) +{ + if (!mac_is_present(mod_id)) return -1; + return RC.mac[mod_id]->slice_info.intraslice_share_active; +} +void flexran_set_intraslice_sharing_active(mid_t mod_id, int intraslice_active) +{ + if (!mac_is_present(mod_id)) return; + RC.mac[mod_id]->slice_info.intraslice_share_active = intraslice_active; +} + +int flexran_get_interslice_sharing_active(mid_t mod_id) +{ + if (!mac_is_present(mod_id)) return -1; + return RC.mac[mod_id]->slice_info.interslice_share_active; +} +void flexran_set_interslice_sharing_active(mid_t mod_id, int interslice_active) +{ + if (!mac_is_present(mod_id)) return; + RC.mac[mod_id]->slice_info.interslice_share_active = interslice_active; +} + +slice_id_t flexran_get_dl_slice_id(mid_t mod_id, int slice_idx) +{ + if (!mac_is_present(mod_id)) return -1; + return RC.mac[mod_id]->slice_info.dl[slice_idx].id; +} +void flexran_set_dl_slice_id(mid_t mod_id, int slice_idx, slice_id_t slice_id) +{ + if (!mac_is_present(mod_id)) return; + RC.mac[mod_id]->slice_info.dl[slice_idx].id = slice_id; +} + +int flexran_get_dl_slice_percentage(mid_t mod_id, int slice_idx) +{ + if (!mac_is_present(mod_id)) return -1; + return RC.mac[mod_id]->slice_info.dl[slice_idx].pct * 100.0f; +} +void flexran_set_dl_slice_percentage(mid_t mod_id, int slice_idx, int percentage) +{ + if (!mac_is_present(mod_id)) return; + RC.mac[mod_id]->slice_info.dl[slice_idx].pct = percentage / 100.0f; +} + +int flexran_get_dl_slice_isolation(mid_t mod_id, int slice_idx) +{ + if (!mac_is_present(mod_id)) return -1; + return RC.mac[mod_id]->slice_info.dl[slice_idx].isol; +} +void flexran_set_dl_slice_isolation(mid_t mod_id, int slice_idx, int is_isolated) +{ + if (!mac_is_present(mod_id)) return; + RC.mac[mod_id]->slice_info.dl[slice_idx].isol = is_isolated; +} + +int flexran_get_dl_slice_priority(mid_t mod_id, int slice_idx) +{ + if (!mac_is_present(mod_id)) return -1; + return RC.mac[mod_id]->slice_info.dl[slice_idx].prio; +} +void flexran_set_dl_slice_priority(mid_t mod_id, int slice_idx, int priority) +{ + if (!mac_is_present(mod_id)) return; + RC.mac[mod_id]->slice_info.dl[slice_idx].prio = priority; +} + +int flexran_get_dl_slice_position_low(mid_t mod_id, int slice_idx) +{ + if (!mac_is_present(mod_id)) return -1; + return RC.mac[mod_id]->slice_info.dl[slice_idx].pos_low; +} +void flexran_set_dl_slice_position_low(mid_t mod_id, int slice_idx, int poslow) +{ + if (!mac_is_present(mod_id)) return; + RC.mac[mod_id]->slice_info.dl[slice_idx].pos_low = poslow; +} + +int flexran_get_dl_slice_position_high(mid_t mod_id, int slice_idx) +{ + if (!mac_is_present(mod_id)) return -1; + return RC.mac[mod_id]->slice_info.dl[slice_idx].pos_high; +} +void flexran_set_dl_slice_position_high(mid_t mod_id, int slice_idx, int poshigh) +{ + if (!mac_is_present(mod_id)) return; + RC.mac[mod_id]->slice_info.dl[slice_idx].pos_high = poshigh; +} + +int flexran_get_dl_slice_maxmcs(mid_t mod_id, int slice_idx) +{ + if (!mac_is_present(mod_id)) return -1; + return RC.mac[mod_id]->slice_info.dl[slice_idx].maxmcs; +} +void flexran_set_dl_slice_maxmcs(mid_t mod_id, int slice_idx, int maxmcs) +{ + if (!mac_is_present(mod_id)) return; + RC.mac[mod_id]->slice_info.dl[slice_idx].maxmcs = maxmcs; +} + +int flexran_get_dl_slice_sorting(mid_t mod_id, int slice_idx, Protocol__FlexDlSorting **sorting_list) +{ + if (!mac_is_present(mod_id)) return -1; + if (!(*sorting_list)) { + *sorting_list = calloc(CR_NUM, sizeof(Protocol__FlexDlSorting)); + if (!(*sorting_list)) return -1; + } + uint32_t policy = RC.mac[mod_id]->slice_info.dl[slice_idx].sorting; + for (int i = 0; i < CR_NUM; i++) { + switch (policy >> 4 * (CR_NUM - 1 - i) & 0xF) { + case CR_ROUND: + (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_ROUND; + break; + case CR_SRB12: + (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_SRB12; + break; + case CR_HOL: + (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_HOL; + break; + case CR_LC: + (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_LC; + break; + case CR_CQI: + (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_CQI; + break; + case CR_LCP: + (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_LCP; + break; + default: + /* this should not happen, but a "default" */ + (*sorting_list)[i] = PROTOCOL__FLEX_DL_SORTING__CR_ROUND; + break; + } + } + return CR_NUM; +} +void flexran_set_dl_slice_sorting(mid_t mod_id, int slice_idx, Protocol__FlexDlSorting *sorting_list, int n) +{ + if (!mac_is_present(mod_id)) return; + uint32_t policy = 0; + for (int i = 0; i < n && i < CR_NUM; i++) { + switch (sorting_list[i]) { + case PROTOCOL__FLEX_DL_SORTING__CR_ROUND: + policy = policy << 4 | CR_ROUND; + break; + case PROTOCOL__FLEX_DL_SORTING__CR_SRB12: + policy = policy << 4 | CR_SRB12; + break; + case PROTOCOL__FLEX_DL_SORTING__CR_HOL: + policy = policy << 4 | CR_HOL; + break; + case PROTOCOL__FLEX_DL_SORTING__CR_LC: + policy = policy << 4 | CR_LC; + break; + case PROTOCOL__FLEX_DL_SORTING__CR_CQI: + policy = policy << 4 | CR_CQI; + break; + case PROTOCOL__FLEX_DL_SORTING__CR_LCP: + policy = policy << 4 | CR_LCP; + break; + default: /* suppresses warnings */ + policy = policy << 4 | CR_ROUND; + break; + } + } + /* fill up with 0 == CR_ROUND */ + if (CR_NUM > n) policy = policy << 4 * (CR_NUM - n); + RC.mac[mod_id]->slice_info.dl[slice_idx].sorting = policy; +} + +Protocol__FlexDlAccountingPolicy flexran_get_dl_slice_accounting_policy(mid_t mod_id, int slice_idx) +{ + if (!mac_is_present(mod_id)) return PROTOCOL__FLEX_DL_ACCOUNTING_POLICY__POL_FAIR; + switch (RC.mac[mod_id]->slice_info.dl[slice_idx].accounting) { + case POL_FAIR: + return PROTOCOL__FLEX_DL_ACCOUNTING_POLICY__POL_FAIR; + case POL_GREEDY: + return PROTOCOL__FLEX_DL_ACCOUNTING_POLICY__POL_GREEDY; + default: + return PROTOCOL__FLEX_DL_ACCOUNTING_POLICY__POL_FAIR; + } +} +void flexran_set_dl_slice_accounting_policy(mid_t mod_id, int slice_idx, Protocol__FlexDlAccountingPolicy accounting) +{ + if (!mac_is_present(mod_id)) return; + switch (accounting) { + case PROTOCOL__FLEX_DL_ACCOUNTING_POLICY__POL_FAIR: + RC.mac[mod_id]->slice_info.dl[slice_idx].accounting = POL_FAIR; + return; + case PROTOCOL__FLEX_DL_ACCOUNTING_POLICY__POL_GREEDY: + RC.mac[mod_id]->slice_info.dl[slice_idx].accounting = POL_GREEDY; + return; + default: + RC.mac[mod_id]->slice_info.dl[slice_idx].accounting = POL_FAIR; + return; + } +} + +char *flexran_get_dl_slice_scheduler_name(mid_t mod_id, int slice_idx) +{ + if (!mac_is_present(mod_id)) return NULL; + return RC.mac[mod_id]->slice_info.dl[slice_idx].sched_name; +} +void flexran_set_dl_slice_scheduler_name(mid_t mod_id, int slice_idx, char *name) +{ + if (!mac_is_present(mod_id)) return; + RC.mac[mod_id]->slice_info.dl[slice_idx].sched_name = name; + RC.mac[mod_id]->slice_info.dl[slice_idx].update_sched = 1; +} + +int flexran_create_ul_slice(mid_t mod_id, slice_id_t slice_id, int slice_default_values_idx) +{ + if (!mac_is_present(mod_id)) return -1; + if (!flexran_ul_slice_exists(mod_id, slice_default_values_idx)) return -1; + int newidx = RC.mac[mod_id]->slice_info.n_ul; + if (newidx >= MAX_NUM_SLICES) return -1; + + ++RC.mac[mod_id]->slice_info.n_ul; + flexran_set_ul_slice_id(mod_id, newidx, slice_id); + flexran_set_ul_slice_percentage(mod_id, newidx, + flexran_get_ul_slice_percentage(mod_id, slice_default_values_idx)); + /*flexran_set_ul_slice_isolation(mod_id, newidx, + flexran_get_ul_slice_isolation(mod_id, slice_default_values_idx)); + flexran_set_ul_slice_priority(mod_id, newidx, + flexran_get_ul_slice_priority(mod_id, slice_default_values_idx));*/ + flexran_set_ul_slice_first_rb(mod_id, newidx, + flexran_get_ul_slice_first_rb(mod_id, slice_default_values_idx)); + flexran_set_ul_slice_maxmcs(mod_id, newidx, + flexran_get_ul_slice_maxmcs(mod_id, slice_default_values_idx)); + /*Protocol__FlexUlSorting *sorting = NULL; + int n = flexran_get_ul_slice_sorting(mod_id, slice_default_values_idx, &sorting); + flexran_set_ul_slice_sorting(mod_id, newidx, sorting, n); + free(sorting);*/ + /*flexran_set_ul_slice_accounting_policy(mod_id, newidx, + flexran_get_ul_slice_accounting_policy(mod_id, slice_default_values_idx));*/ + flexran_set_ul_slice_scheduler_name(mod_id, newidx, + flexran_get_ul_slice_scheduler_name(mod_id, slice_default_values_idx)); + return newidx; +} + +int flexran_find_ul_slice(mid_t mod_id, slice_id_t slice_id) +{ + if (!mac_is_present(mod_id)) return -1; + slice_info_t *sli = &RC.mac[mod_id]->slice_info; + int n = sli->n_ul; + for (int i = 0; i < n; i++) { + if (sli->ul[i].id == slice_id) return i; + } + return -1; +} + +int flexran_remove_ul_slice(mid_t mod_id, int slice_idx) +{ + if (!mac_is_present(mod_id)) return -1; + slice_info_t *sli = &RC.mac[mod_id]->slice_info; + if (sli->n_ul <= 1) return -1; + + --sli->n_ul; + /* move last element to the position of the removed one */ + if (slice_idx != sli->n_ul) + memcpy(&sli->ul[slice_idx], &sli->ul[sli->n_ul], sizeof(sli->ul[sli->n_ul])); + + /* all UEs that have been in the old slice are put into slice index 0 */ + int *assoc_list = RC.mac[mod_id]->UE_list.assoc_ul_slice_idx; + for (int i = 0; i < MAX_MOBILES_PER_ENB; ++i) { + if (assoc_list[i] == slice_idx) + assoc_list[i] = 0; + } + return sli->n_ul; +} + +int flexran_get_num_ul_slices(mid_t mod_id) +{ + if (!mac_is_present(mod_id)) return -1; + return RC.mac[mod_id]->slice_info.n_ul; +} + +int flexran_ul_slice_exists(mid_t mod_id, int slice_idx) +{ + if (!mac_is_present(mod_id)) return -1; + return slice_idx >= 0 && slice_idx < RC.mac[mod_id]->slice_info.n_ul; +} + +slice_id_t flexran_get_ul_slice_id(mid_t mod_id, int slice_idx) +{ + if (!mac_is_present(mod_id)) return -1; + return RC.mac[mod_id]->slice_info.ul[slice_idx].id; +} +void flexran_set_ul_slice_id(mid_t mod_id, int slice_idx, slice_id_t slice_id) +{ + if (!mac_is_present(mod_id)) return; + RC.mac[mod_id]->slice_info.ul[slice_idx].id = slice_id; +} + +int flexran_get_ul_slice_percentage(mid_t mod_id, int slice_idx) +{ + if (!mac_is_present(mod_id)) return -1; + return RC.mac[mod_id]->slice_info.ul[slice_idx].pct * 100.0f; +} +void flexran_set_ul_slice_percentage(mid_t mod_id, int slice_idx, int percentage) +{ + if (!mac_is_present(mod_id)) return; + RC.mac[mod_id]->slice_info.ul[slice_idx].pct = percentage / 100.0f; +} + +int flexran_get_ul_slice_first_rb(mid_t mod_id, int slice_idx) +{ + if (!mac_is_present(mod_id)) return -1; + return RC.mac[mod_id]->slice_info.ul[slice_idx].first_rb; +} + +void flexran_set_ul_slice_first_rb(mid_t mod_id, int slice_idx, int first_rb) +{ + if (!mac_is_present(mod_id)) return; + RC.mac[mod_id]->slice_info.ul[slice_idx].first_rb = first_rb; +} + +int flexran_get_ul_slice_maxmcs(mid_t mod_id, int slice_idx) +{ + if (!mac_is_present(mod_id)) return -1; + return RC.mac[mod_id]->slice_info.ul[slice_idx].maxmcs; +} +void flexran_set_ul_slice_maxmcs(mid_t mod_id, int slice_idx, int maxmcs) +{ + if (!mac_is_present(mod_id)) return; + RC.mac[mod_id]->slice_info.ul[slice_idx].maxmcs = maxmcs; +} + +char *flexran_get_ul_slice_scheduler_name(mid_t mod_id, int slice_idx) +{ + if (!mac_is_present(mod_id)) return NULL; + return RC.mac[mod_id]->slice_info.ul[slice_idx].sched_name; +} +void flexran_set_ul_slice_scheduler_name(mid_t mod_id, int slice_idx, char *name) +{ + if (!mac_is_present(mod_id)) return; + RC.mac[mod_id]->slice_info.ul[slice_idx].sched_name = name; + RC.mac[mod_id]->slice_info.ul[slice_idx].update_sched = 1; +} diff --git a/openair2/ENB_APP/flexran_agent_ran_api.h b/openair2/ENB_APP/flexran_agent_ran_api.h index dacca55ab7..18cd353f71 100644 --- a/openair2/ENB_APP/flexran_agent_ran_api.h +++ b/openair2/ENB_APP/flexran_agent_ran_api.h @@ -504,3 +504,155 @@ int flexran_get_rrc_neigh_plmn_mcc(mid_t mod_id, mid_t ue_id, int cell_id); */ /*Get MNC PLMN identity neighbouring Cell*/ /* currently not implemented int flexran_get_rrc_neigh_plmn_mnc(mid_t mod_id, mid_t ue_id, int cell_id); */ + +/************************** Slice configuration **************************/ + +/* Get the DL slice ID for a UE */ +int flexran_get_ue_dl_slice_id(mid_t mod_id, mid_t ue_id); + +/* Set the DL slice index(!) for a UE */ +void flexran_set_ue_dl_slice_idx(mid_t mod_id, mid_t ue_id, int slice_idx); + +/* Get the UL slice ID for a UE */ +int flexran_get_ue_ul_slice_id(mid_t mod_id, mid_t ue_id); + +/* Set the UL slice index(!) for a UE */ +void flexran_set_ue_ul_slice_idx(mid_t mod_id, mid_t ue_id, int slice_idx); + +/* Whether intraslice sharing is active, return boolean */ +int flexran_get_intraslice_sharing_active(mid_t mod_id); +/* Set whether intraslice sharing is active */ +void flexran_set_intraslice_sharing_active(mid_t mod_id, int intraslice_active); + +/* Whether intraslice sharing is active, return boolean */ +int flexran_get_interslice_sharing_active(mid_t mod_id); +/* Set whether intraslice sharing is active */ +void flexran_set_interslice_sharing_active(mid_t mod_id, int interslice_active); + +/* Get the number of slices in DL */ +int flexran_get_num_dl_slices(mid_t mod_id); + +/* Query slice existence in DL. Return is boolean value */ +int flexran_dl_slice_exists(mid_t mod_id, int slice_idx); + +/* Create slice in DL with values from another slice, returns the new slice index */ +int flexran_create_dl_slice(mid_t mod_id, slice_id_t slice_id, int slice_default_values_idx); +/* Finds slice in DL with given slice_id and returns slice index */ +int flexran_find_dl_slice(mid_t mod_id, slice_id_t slice_id); +/* Remove slice in DL, returns new number of slices or -1 on error */ +int flexran_remove_dl_slice(mid_t mod_id, int slice_idx); + +/* Get the ID of a slice in DL */ +slice_id_t flexran_get_dl_slice_id(mid_t mod_id, int slice_idx); +/* Set the ID of a slice in DL */ +void flexran_set_dl_slice_id(mid_t mod_id, int slice_idx, slice_id_t slice_id); + +/* Get the RB share a slice in DL, value 0-100 */ +int flexran_get_dl_slice_percentage(mid_t mod_id, int slice_idx); +/* Set the RB share a slice in DL, value 0-100 */ +void flexran_set_dl_slice_percentage(mid_t mod_id, int slice_idx, int percentage); + +/* Whether a slice in DL is isolated */ +int flexran_get_dl_slice_isolation(mid_t mod_id, int slice_idx); +/* Set whether a slice in DL is isolated */ +void flexran_set_dl_slice_isolation(mid_t mod_id, int slice_idx, int is_isolated); + +/* Get the priority of a slice in DL */ +int flexran_get_dl_slice_priority(mid_t mod_id, int slice_idx); +/* Get the priority of a slice in DL */ +void flexran_set_dl_slice_priority(mid_t mod_id, int slice_idx, int priority); + +/* Get the lower end of the frequency range for the slice positioning in DL */ +int flexran_get_dl_slice_position_low(mid_t mod_id, int slice_idx); +/* Set the lower end of the frequency range for the slice positioning in DL */ +void flexran_set_dl_slice_position_low(mid_t mod_id, int slice_idx, int poslow); + +/* Get the higher end of the frequency range for the slice positioning in DL */ +int flexran_get_dl_slice_position_high(mid_t mod_id, int slice_idx); +/* Set the higher end of the frequency range for the slice positioning in DL */ +void flexran_set_dl_slice_position_high(mid_t mod_id, int slice_idx, int poshigh); + +/* Get the maximum MCS for slice in DL */ +int flexran_get_dl_slice_maxmcs(mid_t mod_id, int slice_idx); +/* Set the maximum MCS for slice in DL */ +void flexran_set_dl_slice_maxmcs(mid_t mod_id, int slice_idx, int maxmcs); + +/* Get the sorting order of a slice in DL, return value is number of elements + * in sorting_list */ +int flexran_get_dl_slice_sorting(mid_t mod_id, int slice_idx, Protocol__FlexDlSorting **sorting_list); +/* Set the sorting order of a slice in DL */ +void flexran_set_dl_slice_sorting(mid_t mod_id, int slice_idx, Protocol__FlexDlSorting *sorting_list, int n); + +/* Get the accounting policy for a slice in DL */ +Protocol__FlexDlAccountingPolicy flexran_get_dl_slice_accounting_policy(mid_t mod_id, int slice_idx); +/* Set the accounting policy for a slice in DL */ +void flexran_set_dl_slice_accounting_policy(mid_t mod_id, int slice_idx, Protocol__FlexDlAccountingPolicy accounting); + +/* Get the scheduler name for a slice in DL */ +char *flexran_get_dl_slice_scheduler_name(mid_t mod_id, int slice_idx); +/* Set the scheduler name for a slice in DL */ +void flexran_set_dl_slice_scheduler_name(mid_t mod_id, int slice_idx, char *name); + +/* Get the number of slices in UL */ +int flexran_get_num_ul_slices(mid_t mod_id); + +/* Query slice existence in UL. Return is boolean value */ +int flexran_ul_slice_exists(mid_t mod_id, int slice_idx); + +/* Create slice in UL with values from another slice, returns the new slice index */ +int flexran_create_ul_slice(mid_t mod_id, slice_id_t slice_id, int slice_default_values_idx); +/* Finds slice in UL with given slice_id and returns slice index */ +int flexran_find_ul_slice(mid_t mod_id, slice_id_t slice_id); +/* Remove slice in UL */ +int flexran_remove_ul_slice(mid_t mod_id, int slice_idx); + +/* Get the ID of a slice in UL */ +slice_id_t flexran_get_ul_slice_id(mid_t mod_id, int slice_idx); +/* Set the ID of a slice in UL */ +void flexran_set_ul_slice_id(mid_t mod_id, int slice_idx, slice_id_t slice_id); + +/* Get the RB share a slice in UL, value 0-100 */ +int flexran_get_ul_slice_percentage(mid_t mod_id, int slice_idx); +/* Set the RB share a slice in UL, value 0-100 */ +void flexran_set_ul_slice_percentage(mid_t mod_id, int slice_idx, int percentage); + +/* TODO Whether a slice in UL is isolated */ +/*int flexran_get_ul_slice_isolation(mid_t mod_id, int slice_idx);*/ +/* TODO Set whether a slice in UL is isolated */ +/*void flexran_set_ul_slice_isolation(mid_t mod_id, int slice_idx, int is_isolated);*/ + +/* TODO Get the priority of a slice in UL */ +/*int flexran_get_ul_slice_priority(mid_t mod_id, int slice_idx);*/ +/* TODO Set the priority of a slice in UL */ +/*void flexran_set_ul_slice_priority(mid_t mod_id, int slice_idx, int priority);*/ + +/* Get the first RB for allocation in a slice in UL */ +int flexran_get_ul_slice_first_rb(mid_t mod_id, int slice_idx); +/* Set the first RB for allocation in a slice in UL */ +void flexran_set_ul_slice_first_rb(mid_t mod_id, int slice_idx, int first_rb); + +/* TODO Get the number of RB for the allocation in a slice in UL */ +/*int flexran_get_ul_slice_length_rb(mid_t mod_id, int slice_idx);*/ +/* TODO Set the of number of RB for the allocation in a slice in UL */ +/*void flexran_set_ul_slice_length_rb(mid_t mod_id, int slice_idx, int poshigh);*/ + +/* Get the maximum MCS for slice in UL */ +int flexran_get_ul_slice_maxmcs(mid_t mod_id, int slice_idx); +/* Set the maximum MCS for slice in UL */ +void flexran_set_ul_slice_maxmcs(mid_t mod_id, int slice_idx, int maxmcs); + +/* TODO Get the sorting order of a slice in UL, return value is number of elements + * in sorting_list */ +/*int flexran_get_ul_slice_sorting(mid_t mod_id, int slice_idx, Protocol__FlexUlSorting **sorting_list);*/ +/* TODO Set the sorting order of a slice in UL */ +/*void flexran_set_ul_slice_sorting(mid_t mod_id, int slice_idx, Protocol__FlexUlSorting *sorting_list, int n);*/ + +/* TODO Get the accounting policy for a slice in UL */ +/*Protocol__UlAccountingPolicy flexran_get_ul_slice_accounting_policy(mid_t mod_id, int slice_idx);*/ +/* TODO Set the accounting policy for a slice in UL */ +/*void flexran_get_ul_slice_accounting_policy(mid_t mod_id, int slice_idx, Protocol__UlAccountingPolicy accountin);*/ + +/* Get the scheduler name for a slice in UL */ +char *flexran_get_ul_slice_scheduler_name(mid_t mod_id, int slice_idx); +/* Set the scheduler name for a slice in UL */ +void flexran_set_ul_slice_scheduler_name(mid_t mod_id, int slice_idx, char *name); From fcaf237182b34efb436ee2d8b364e59dc608648b Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 23 Apr 2018 16:59:22 +0200 Subject: [PATCH 101/379] FlexRAN: Handle slice configuration Incoming slice configuration changes are buffered in an intermediate structure. The MAC scheduler periodically polls the agent about changes. If there has been a slice configuration change, apply it. --- .../CONTROL_MODULES/MAC/flexran_agent_mac.c | 143 +++++ .../CONTROL_MODULES/MAC/flexran_agent_mac.h | 10 + .../MAC/flexran_agent_mac_internal.c | 523 ++++++++++++++++++ .../MAC/flexran_agent_mac_internal.h | 33 ++ openair2/LAYER2/MAC/eNB_scheduler.c | 4 + 5 files changed, 713 insertions(+) diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c index 549c7eaa22..0c33026a38 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c @@ -52,6 +52,16 @@ struct lfds700_misc_prng_state ps[NUM_MAX_ENB]; struct lfds700_ringbuffer_element *dl_mac_config_array[NUM_MAX_ENB]; struct lfds700_ringbuffer_state ringbuffer_state[NUM_MAX_ENB]; +/* the slice config as kept in the underlying system */ +Protocol__FlexSliceConfig *slice_config[NUM_MAX_ENB]; +/* a structure that keeps updates which will be reflected in slice_config later */ +Protocol__FlexSliceConfig *sc_update[NUM_MAX_ENB]; +/* indicates whether sc_update contains new data */ +int perform_slice_config_update_count = 1; +/* queue of incoming new UE<>slice association commands */ +Protocol__FlexUeConfig *ue_slice_assoc_update[NUM_MAX_UE]; +int n_ue_slice_assoc_updates = 0; + int flexran_agent_mac_stats_reply(mid_t mod_id, const report_config_t *report_config, @@ -1372,8 +1382,141 @@ int flexran_agent_unregister_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface) { return 0; } +void flexran_create_config_structures(mid_t mod_id) +{ + int i; + int n_dl = flexran_get_num_dl_slices(mod_id); + int m_ul = flexran_get_num_ul_slices(mod_id); + slice_config[mod_id] = flexran_agent_create_slice_config(n_dl, m_ul); + sc_update[mod_id] = flexran_agent_create_slice_config(n_dl, m_ul); + if (!slice_config[mod_id] || !sc_update[mod_id]) return; + for (i = 0; i < n_dl; i++) { + flexran_agent_read_slice_dl_config(mod_id, i, slice_config[mod_id]->dl[i]); + flexran_agent_read_slice_dl_config(mod_id, i, sc_update[mod_id]->dl[i]); + } + for (i = 0; i < m_ul; i++) { + flexran_agent_read_slice_ul_config(mod_id, i, slice_config[mod_id]->ul[i]); + flexran_agent_read_slice_ul_config(mod_id, i, sc_update[mod_id]->ul[i]); + } +} +void flexran_check_and_remove_slices(mid_t mod_id) +{ + int i; + Protocol__FlexDlSlice **dl = sc_update[mod_id]->dl; + size_t n_dl = sc_update[mod_id]->n_dl; + for (i = 0; i < n_dl; i++) { + /* remove slices whose percentage is zero */ + if (dl[i]->percentage > 0) continue; + if (flexran_remove_dl_slice(mod_id, i) < 1) { + LOG_W(FLEXRAN_AGENT, "[%d] can not remove slice index %d ID %d\n", + mod_id, i, dl[i]->id); + continue; + } + LOG_I(FLEXRAN_AGENT, "[%d] removed slice index %d ID %d\n", + mod_id, i, dl[i]->id); + /* don't update slice_config, it will be read in below */ + /* we need to memcpy the higher slice to the position we just deleted */ + memcpy(dl[i], dl[n_dl-1], sizeof(*dl[n_dl-1])); + --sc_update[mod_id]->n_dl; + } + Protocol__FlexUlSlice **ul = sc_update[mod_id]->ul; + size_t n_ul = sc_update[mod_id]->n_ul; + for (i = 0; i < n_ul; i++) { + if (ul[i]->percentage > 0) continue; + if (flexran_remove_ul_slice(mod_id, i) < 1) { + LOG_W(FLEXRAN_AGENT, "[%d] can not remove slice index %d ID %d\n", + mod_id, i, ul[i]->id); + continue; + } + LOG_I(FLEXRAN_AGENT, "[%d] removed slice index %d ID %d\n", + mod_id, i, ul[i]->id); + /* see DL remarks */ + memcpy(ul[i], ul[n_ul-1], sizeof(*ul[n_ul-1])); + --sc_update[mod_id]->n_ul; + } +} +void flexran_agent_slice_update(mid_t mod_id) +{ + int i; + int changes = 0; + if (perform_slice_config_update_count <= 0) return; + perform_slice_config_update_count--; + if (!slice_config[mod_id]) { + /* if the configuration does not exist for agent, create from eNB structure + * and exit */ + flexran_create_config_structures(mod_id); + return; + } + + /********* read existing config *********/ + /* simply update slice_config all the time and write new config + * (apply_new_slice_dl_config() only updates if changes are necessary) */ + slice_config[mod_id]->n_dl = flexran_get_num_dl_slices(mod_id); + slice_config[mod_id]->n_ul = flexran_get_num_ul_slices(mod_id); + for (i = 0; i < slice_config[mod_id]->n_dl; i++) { + flexran_agent_read_slice_dl_config(mod_id, i, slice_config[mod_id]->dl[i]); + } + for (i = 0; i < slice_config[mod_id]->n_ul; i++) { + flexran_agent_read_slice_ul_config(mod_id, i, slice_config[mod_id]->ul[i]); + } + + /* in case we tried to add a slice and it failed (e.g. due to high sum + * percentage being too high), revert to the correct number of slices. + * Also, do not write if we try the last time */ + if (perform_slice_config_update_count == 1) { + if (slice_config[mod_id]->n_dl != sc_update[mod_id]->n_dl) { + sc_update[mod_id]->n_dl = slice_config[mod_id]->n_dl; + LOG_W(FLEXRAN_AGENT, "[%d] reverting to original number of %ld DL slices\n", + mod_id, sc_update[mod_id]->n_dl); + } + if (slice_config[mod_id]->n_ul != sc_update[mod_id]->n_ul) { + sc_update[mod_id]->n_ul = slice_config[mod_id]->n_ul; + LOG_W(FLEXRAN_AGENT, "[%d] reverting to original number of %ld UL slices\n", + mod_id, sc_update[mod_id]->n_ul); + } + return; + } + + /********* write new config *********/ + /* check for removal (sc_update[X]->dl[Y].percentage == 0) + * and update sc_update & slice_config accordingly */ + flexran_check_and_remove_slices(mod_id); + + /* create new DL and UL slices if necessary */ + for (i = slice_config[mod_id]->n_dl; i < sc_update[mod_id]->n_dl; i++) { + flexran_create_dl_slice(mod_id, sc_update[mod_id]->dl[i]->id, 0); + slice_config[mod_id]->n_dl = flexran_get_num_dl_slices(mod_id); + flexran_agent_read_slice_dl_config(mod_id, i, slice_config[mod_id]->dl[i]); + } + for (i = slice_config[mod_id]->n_ul; i < sc_update[mod_id]->n_ul; i++) { + flexran_create_ul_slice(mod_id, sc_update[mod_id]->ul[i]->id, 0); + slice_config[mod_id]->n_ul = flexran_get_num_ul_slices(mod_id); + flexran_agent_read_slice_ul_config(mod_id, i, slice_config[mod_id]->ul[i]); + } + for (i = 0; i < slice_config[mod_id]->n_dl; i++) { + changes += apply_new_slice_dl_config(mod_id, + slice_config[mod_id]->dl[i], + sc_update[mod_id]->dl[i]); + } + for (i = 0; i < slice_config[mod_id]->n_ul; i++) { + changes += apply_new_slice_ul_config(mod_id, + slice_config[mod_id]->ul[i], + sc_update[mod_id]->ul[i]); + } + if (n_ue_slice_assoc_updates > 0) { + changes += apply_ue_slice_assoc_update(mod_id); + } + if (changes > 0) + LOG_I(FLEXRAN_AGENT, "[%d] slice configuration: applied %d changes\n", mod_id, changes); + +} + +Protocol__FlexSliceConfig *flexran_agent_get_slice_config(mid_t mod_id) +{ + return slice_config[mod_id]; +} diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.h b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.h index 03e7def95e..0d686a53ee 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.h +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.h @@ -87,4 +87,14 @@ int flexran_agent_register_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface); /*Unregister technology specific callbacks*/ int flexran_agent_unregister_mac_xface(mid_t mod_id, AGENT_MAC_xface*xface); +/*************************************** + * FlexRAN agent - slice configuration * + ***************************************/ + +/* Inform controller about possibility to update slice configuration */ +void flexran_agent_slice_update(mid_t mod_id); + +/* return a pointer to the current config */ +Protocol__FlexSliceConfig *flexran_agent_get_slice_config(mid_t mod_id); + #endif diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c index 2acee0686f..435e8da064 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c @@ -32,6 +32,13 @@ #include "flexran_agent_common_internal.h" #include "flexran_agent_mac_internal.h" +/* from flexran_agent_mac.c */ +extern Protocol__FlexSliceConfig *slice_config[NUM_MAX_ENB]; +extern Protocol__FlexSliceConfig *sc_update[NUM_MAX_ENB]; +extern int perform_slice_config_update_count; +extern Protocol__FlexUeConfig *ue_slice_assoc_update[NUM_MAX_UE]; +extern int n_ue_slice_assoc_updates; + Protocol__FlexranMessage * flexran_agent_generate_diff_mac_stats_report(Protocol__FlexranMessage *new_message, Protocol__FlexranMessage *old_message) { @@ -899,3 +906,519 @@ int load_dl_scheduler_function(mid_t mod_id, const char *function_name) { return -1; } + +Protocol__FlexSliceConfig *flexran_agent_create_slice_config(int n_dl, int m_ul) +{ + int i; + Protocol__FlexSliceConfig *fsc = malloc(sizeof(Protocol__FlexSliceConfig)); + if (!fsc) return NULL; + protocol__flex_slice_config__init(fsc); + + /* say there are n_dl slices but reserve memory for up to MAX_NUM_SLICES so + * we don't need to reserve again later */ + fsc->n_dl = n_dl; + fsc->dl = calloc(MAX_NUM_SLICES, sizeof(Protocol__FlexDlSlice *)); + if (!fsc->dl) fsc->n_dl = 0; + for (i = 0; i < MAX_NUM_SLICES; i++) { + fsc->dl[i] = malloc(sizeof(Protocol__FlexDlSlice)); + if (!fsc->dl[i]) continue; + protocol__flex_dl_slice__init(fsc->dl[i]); + } + + /* as above */ + fsc->n_ul = m_ul; + fsc->ul = calloc(MAX_NUM_SLICES, sizeof(Protocol__FlexUlSlice *)); + if (!fsc->ul) fsc->n_ul = 0; + for (i = 0; i < MAX_NUM_SLICES; i++) { + fsc->ul[i] = malloc(sizeof(Protocol__FlexUlSlice)); + if (!fsc->ul[i]) continue; + protocol__flex_ul_slice__init(fsc->ul[i]); + } + return fsc; +} + +void flexran_agent_read_slice_dl_config(mid_t mod_id, int slice_idx, Protocol__FlexDlSlice *dl_slice) +{ + dl_slice->id = flexran_get_dl_slice_id(mod_id, slice_idx); + dl_slice->has_id = 1; + /* read label from corresponding sc_update entry or give default */ + dl_slice->label = PROTOCOL__FLEX_SLICE_LABEL__xMBB; + dl_slice->has_label = 1; + for (int i = 0; i < sc_update[mod_id]->n_dl; i++) { + if (sc_update[mod_id]->dl[i]->id == dl_slice->id + && sc_update[mod_id]->dl[i]->has_label) { + dl_slice->label = sc_update[mod_id]->dl[i]->label; + break; + } + } + dl_slice->percentage = flexran_get_dl_slice_percentage(mod_id, slice_idx); + dl_slice->has_percentage = 1; + dl_slice->isolation = flexran_get_dl_slice_isolation(mod_id, slice_idx); + dl_slice->has_isolation = 1; + dl_slice->priority = flexran_get_dl_slice_priority(mod_id, slice_idx); + dl_slice->has_priority = 1; + dl_slice->position_low = flexran_get_dl_slice_position_low(mod_id, slice_idx); + dl_slice->has_position_low = 1; + dl_slice->position_high = flexran_get_dl_slice_position_high(mod_id, slice_idx); + dl_slice->has_position_high = 1; + dl_slice->maxmcs = flexran_get_dl_slice_maxmcs(mod_id, slice_idx); + dl_slice->has_maxmcs = 1; + dl_slice->n_sorting = flexran_get_dl_slice_sorting(mod_id, slice_idx, &dl_slice->sorting); + if (dl_slice->n_sorting < 1) dl_slice->sorting = NULL; + dl_slice->accounting = flexran_get_dl_slice_accounting_policy(mod_id, slice_idx); + dl_slice->has_accounting = 1; + dl_slice->scheduler_name = flexran_get_dl_slice_scheduler_name(mod_id, slice_idx); +} + +void flexran_agent_read_slice_ul_config(mid_t mod_id, int slice_idx, Protocol__FlexUlSlice *ul_slice) +{ + ul_slice->id = flexran_get_ul_slice_id(mod_id, slice_idx); + ul_slice->has_id = 1; + /* read label from corresponding sc_update entry or give default */ + ul_slice->label = PROTOCOL__FLEX_SLICE_LABEL__xMBB; + ul_slice->has_label = 1; + for (int i = 0; i < sc_update[mod_id]->n_ul; i++) { + if (sc_update[mod_id]->ul[i]->id == ul_slice->id + && sc_update[mod_id]->ul[i]->has_label) { + ul_slice->label = sc_update[mod_id]->ul[i]->label; + break; + } + } + ul_slice->percentage = flexran_get_ul_slice_percentage(mod_id, slice_idx); + ul_slice->has_percentage = 1; + /*ul_slice->isolation = flexran_get_ul_slice_isolation(mod_id, slice_idx);*/ + ul_slice->has_isolation = 0; + /*ul_slice->priority = flexran_get_ul_slice_priority(mod_id, slice_idx);*/ + ul_slice->has_priority = 0; + ul_slice->first_rb = flexran_get_ul_slice_first_rb(mod_id, slice_idx); + ul_slice->has_first_rb = 1; + /*ul_slice-> = flexran_get_ul_slice_length_rb(mod_id, slice_idx); + ul_slice->has_length_rb = 0;*/ + ul_slice->maxmcs = flexran_get_ul_slice_maxmcs(mod_id, slice_idx); + ul_slice->has_maxmcs = 1; + ul_slice->n_sorting = 0; + /*if (ul_slice->sorting) { + free(ul_slice->sorting); + ul_slice->sorting = NULL; + } + ul_slice->n_sorting = flexran_get_ul_slice_sorting(mod_id, slice_idx, &ul_slice->sorting); + if (ul_slice->n_sorting < 1) ul_slice->sorting = NULL;*/ + /*ul_slice->accounting = flexran_get_ul_slice_accounting_policy(mod_id, slice_idx);*/ + ul_slice->has_accounting = 0; + ul_slice->scheduler_name = flexran_get_ul_slice_scheduler_name(mod_id, slice_idx); +} + +void overwrite_slice_config_dl(Protocol__FlexDlSlice *exist, Protocol__FlexDlSlice *update) +{ + if (update->has_label && update->label != exist->label) { + LOG_I(FLEXRAN_AGENT, "[DL slice %d] update label: %d -> %d\n", + update->id, exist->label, update->label); + exist->label = update->label; + } + if (update->has_percentage && update->percentage != exist->percentage) { + LOG_I(FLEXRAN_AGENT, "[DL slice %d] update percentage: %d -> %d\n", + update->id, exist->percentage, update->percentage); + exist->percentage = update->percentage; + } + if (update->has_isolation && update->isolation != exist->isolation) { + LOG_I(FLEXRAN_AGENT, "[DL slice %d] update isolation: %d -> %d\n", + update->id, exist->isolation, update->isolation); + exist->isolation = update->isolation; + } + if (update->has_priority && update->priority != exist->priority) { + LOG_I(FLEXRAN_AGENT, "[DL slice %d] update priority: %d -> %d\n", + update->id, exist->priority, update->priority); + exist->priority = update->priority; + } + if (update->has_position_low && update->position_low != exist->position_low) { + LOG_I(FLEXRAN_AGENT, "[DL slice %d] update position_low: %d -> %d\n", + update->id, exist->position_low, update->position_low); + exist->position_low = update->position_low; + } + if (update->has_position_high && update->position_high != exist->position_high) { + LOG_I(FLEXRAN_AGENT, "[DL slice %d] update position_high: %d -> %d\n", + update->id, exist->position_high, update->position_high); + exist->position_high = update->position_high; + } + if (update->has_maxmcs && update->maxmcs != exist->maxmcs) { + LOG_I(FLEXRAN_AGENT, "[DL slice %d] update maxmcs: %d -> %d\n", + update->id, exist->maxmcs, update->maxmcs); + exist->maxmcs = update->maxmcs; + } + int sorting_update = 0; + int n = min(exist->n_sorting, update->n_sorting); + /* check whether something has changed. If update->n_sorting is 0, + * sorting_update will remain false, so no update will be done */ + int i = 0; + while(i < n && !sorting_update) { + sorting_update = sorting_update || (update->sorting[i] != exist->sorting[i]); + i++; + } + if (sorting_update) { + LOG_I(FLEXRAN_AGENT, "[DL slice %d] update sorting array\n", update->id); + if (exist->n_sorting != update->n_sorting) + LOG_W(FLEXRAN_AGENT, "[slice %d] only writing %d elements\n", + update->id, n); + for (int i = 0; i < n; i++) + exist->sorting[i] = update->sorting[i]; + } + if (update->has_accounting && update->accounting != exist->accounting) { + LOG_I(FLEXRAN_AGENT, "[DL slice %d] update accounting: %d -> %d\n", + update->id, exist->accounting, update->accounting); + exist->accounting = update->accounting; + } + if (update->scheduler_name + && strcmp(update->scheduler_name, exist->scheduler_name) != 0) { + LOG_W(FLEXRAN_AGENT, "[DL slice %d] ignoring new scheduler name \"%s\"!\n", + update->id, update->scheduler_name); + } +} + +void overwrite_slice_config_ul(Protocol__FlexUlSlice *exist, Protocol__FlexUlSlice *update) +{ + if (update->has_label && update->label != exist->label) { + LOG_I(FLEXRAN_AGENT, "[UL slice %d] update label: %d -> %d\n", + update->id, exist->label, update->label); + exist->label = update->label; + } + if (update->has_percentage && update->percentage != exist->percentage) { + LOG_I(FLEXRAN_AGENT, "[UL slice %d] update percentage: %d -> %d\n", + update->id, exist->percentage, update->percentage); + exist->percentage = update->percentage; + } + if (update->has_isolation && update->isolation != exist->isolation) { + LOG_I(FLEXRAN_AGENT, "[UL slice %d] update isolation: %d -> %d\n", + update->id, exist->isolation, update->isolation); + exist->isolation = update->isolation; + } + if (update->has_priority && update->priority != exist->priority) { + LOG_I(FLEXRAN_AGENT, "[UL slice %d] update priority: %d -> %d\n", + update->id, exist->priority, update->priority); + exist->priority = update->priority; + } + if (update->has_first_rb && update->first_rb != exist->first_rb) { + LOG_I(FLEXRAN_AGENT, "[UL slice %d] update first_rb: %d -> %d\n", + update->id, exist->first_rb, update->first_rb); + exist->first_rb = update ->first_rb; + } + /*if (update->has_length_rb && update->lenght_rb != exist->lenght_rb) { + LOG_I(FLEXRAN_AGENT, "[UL slice %d] update lenght_rb: %d -> %d\n", + update->id, exist->lenght_rb, update->lenght_rb); + exist->lenght_rb = update->lenght_rb; + }*/ + if (update->has_maxmcs && update->maxmcs != exist->maxmcs) { + LOG_I(FLEXRAN_AGENT, "[UL slice %d] update maxmcs: %d -> %d\n", + update->id, exist->maxmcs, update->maxmcs); + exist->maxmcs = update->maxmcs; + } + int sorting_update = 0; + int n = min(exist->n_sorting, update->n_sorting); + /* check whether something has changed. If update-> n_sorting is 0, + * sorting_update will remain false, so no update will be done */ + int i = 0; + while (i < n && !sorting_update) { + sorting_update = sorting_update || (update->sorting[i] != exist->sorting[i]); + i++; + } + if (sorting_update) { + LOG_I(FLEXRAN_AGENT, "[UL slice %d] update sorting array\n", update->id); + if (exist->n_sorting != update->n_sorting) + LOG_W(FLEXRAN_AGENT, "[UL slice %d] only writing %d elements\n", + update->id, n); + for (i = 0; i < n; i++) + exist->sorting[i] = update->sorting[i]; + } + if (update->has_accounting && update->accounting != exist->accounting) { + LOG_I(FLEXRAN_AGENT, "[UL slice %d] update accounting: %d -> %d\n", + update->id, exist->accounting, update->accounting); + exist->accounting = update->accounting; + } + if (update->scheduler_name + && strcmp(update->scheduler_name, exist->scheduler_name) != 0) { + LOG_W(FLEXRAN_AGENT, "[UL slice %d] ignoring new scheduler name \"%s\"!\n", + update->id, update->scheduler_name); + } +} + +void prepare_update_slice_config_dl(mid_t mod_id, Protocol__FlexDlSlice *dls) +{ + if (!dls->has_id) { + LOG_E(FLEXRAN_AGENT, "[%d] Incoming DL slice configuration has no ID\n", mod_id); + return; + } + /* a percentage of zero will be interpreted as removal command */ + if (sc_update[mod_id]->n_dl >= MAX_NUM_SLICES + && (!dls->has_percentage || dls->percentage > 0)) { + LOG_E(FLEXRAN_AGENT, "[%d] Cannot create more than %ld slices in DL\n", + mod_id, sc_update[mod_id]->n_dl); + return; + } + if (sc_update[mod_id]->n_dl == 1 && dls->has_percentage && dls->percentage == 0) { + LOG_E(FLEXRAN_AGENT, "[%d] Cannot delete last slice ID %d in DL\n", + mod_id, sc_update[mod_id]->dl[0]->id); + return; + } + + Protocol__FlexDlSlice *to = NULL; + for (int i = 0; i < sc_update[mod_id]->n_dl; ++i) { + if (dls->id == sc_update[mod_id]->dl[i]->id) { + to = sc_update[mod_id]->dl[i]; + break; + } + } + + /* create new slice -> read contents from existing slice config index 0 */ + if (!to) { + LOG_I(FLEXRAN_AGENT, + "[%d] Creating DL slice with ID %d, taking default values from DL slice 0\n", + mod_id, dls->id); + to = sc_update[mod_id]->dl[sc_update[mod_id]->n_dl]; + sc_update[mod_id]->n_dl++; + memcpy(to, slice_config[mod_id]->dl[0], sizeof(*to)); + to->id = dls->id; + } + + overwrite_slice_config_dl(to, dls); +} + +void prepare_update_slice_config_ul(mid_t mod_id, Protocol__FlexUlSlice *uls) +{ + if (!uls->has_id) { + LOG_E(FLEXRAN_AGENT, "[%d] Incoming UL slice configuration has no ID\n", mod_id); + return; + } + /* a percentage of zero will be interpreted as removal command */ + if (sc_update[mod_id]->n_ul >= MAX_NUM_SLICES + && (!uls->has_percentage || uls->percentage > 0)) { + LOG_E(FLEXRAN_AGENT, "[%d] Cannot create more than %ld slices in UL\n", + mod_id, sc_update[mod_id]->n_ul); + return; + } + if (sc_update[mod_id]->n_ul == 1 && uls->has_percentage && uls->percentage == 0) { + LOG_E(FLEXRAN_AGENT, "[%d] Cannot delete last slice ID %d in UL\n", + mod_id, sc_update[mod_id]->ul[0]->id); + return; + } + + Protocol__FlexUlSlice *to = NULL; + for (int i = 0; i < sc_update[mod_id]->n_ul; ++i) { + if (uls->id == sc_update[mod_id]->ul[i]->id) { + to = sc_update[mod_id]->ul[i]; + break; + } + } + + /* create new slice -> read contents from existing slice config index 0 */ + if (!to) { + LOG_I(FLEXRAN_AGENT, + "[%d] Creating UL slice with ID %d, taking default values from UL slice 0\n", + mod_id, uls->id); + to = sc_update[mod_id]->ul[sc_update[mod_id]->n_ul]; + sc_update[mod_id]->n_ul++; + memcpy(to, slice_config[mod_id]->ul[0], sizeof(*to)); + to->id = uls->id; + } + + overwrite_slice_config_ul(to, uls); +} + +void prepare_update_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *slice) +{ + if (!sc_update[mod_id]) { + LOG_E(FLEXRAN_AGENT, "Can not update slice policy (no existing slice profile)\n"); + return; + } + if (slice->n_dl == 0) + LOG_I(FLEXRAN_AGENT, "[%d] no DL slice configuration in flex_slice_config message\n", mod_id); + for (int i = 0; i < slice->n_dl; i++) + prepare_update_slice_config_dl(mod_id, slice->dl[i]); + + if (slice->n_ul == 0) + LOG_I(FLEXRAN_AGENT, "[%d] no UL slice configuration in flex_slice_config message\n", mod_id); + for (int i = 0; i < slice->n_ul; i++) + prepare_update_slice_config_ul(mod_id, slice->ul[i]); + + /* perform the slice configuration reads a couple of times. If there are + * inconsistencies (i.e. the MAC refuses a configuration), we will have a + * couple of warnings because the current configuration and the one in + * sc_update will be diverged */ + perform_slice_config_update_count = 3; +} + +int apply_new_slice_dl_config(mid_t mod_id, Protocol__FlexDlSlice *oldc, Protocol__FlexDlSlice *newc) +{ + /* not setting the old configuration is intentional, as it will be picked up + * later when reading the configuration. There is thus a direct feedback + * whether it has been set. */ + int changes = 0; + int n; + int slice_idx = flexran_find_dl_slice(mod_id, newc->id); + if (slice_idx < 0) { + LOG_W(FLEXRAN_AGENT, "cannot find index for slice ID %d\n", newc->id); + return 0; + } + if (oldc->percentage != newc->percentage) { + flexran_set_dl_slice_percentage(mod_id, slice_idx, newc->percentage); + changes++; + } + if (oldc->isolation != newc->isolation) { + flexran_set_dl_slice_isolation(mod_id, slice_idx, newc->isolation); + changes++; + } + if (oldc->priority != newc->priority) { + flexran_set_dl_slice_priority(mod_id, slice_idx, newc->priority); + changes++; + } + if (oldc->position_low != newc->position_low) { + flexran_set_dl_slice_position_low(mod_id, slice_idx, newc->position_low); + changes++; + } + if (oldc->position_high != newc->position_high) { + flexran_set_dl_slice_position_high(mod_id, slice_idx, newc->position_high); + changes++; + } + if (oldc->maxmcs != newc->maxmcs) { + flexran_set_dl_slice_maxmcs(mod_id, slice_idx, newc->maxmcs); + changes++; + } + n = min(oldc->n_sorting, newc->n_sorting); + for (int i = 0; i < n; i++) { + if (oldc->sorting[i] != newc->sorting[i]) { + flexran_set_dl_slice_sorting(mod_id, slice_idx, newc->sorting, n); + changes++; + break; + } + } + if (oldc->accounting != newc->accounting) { + flexran_set_dl_slice_accounting_policy(mod_id, slice_idx, newc->accounting); + changes++; + } + if (strcmp(oldc->scheduler_name, newc->scheduler_name) != 0) { + LOG_E(FLEXRAN_AGENT, "[%d][DL slice %d] setting the DL scheduler is not supported, reverting\n", + mod_id, newc->id); + newc->scheduler_name = oldc->scheduler_name; + } + return changes; +} + +int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protocol__FlexUlSlice *newc) +{ + /* not setting the old configuration is intentional, as it will be picked up + * later when reading the configuration. There is thus a direct feedback + * whether it has been set. */ + int changes = 0; + int n; + int slice_idx = flexran_find_ul_slice(mod_id, newc->id); + if (slice_idx < 0) { + LOG_W(FLEXRAN_AGENT, "cannot find index for slice ID %d\n", newc->id); + return 0; + } + if (oldc->percentage != newc->percentage) { + flexran_set_ul_slice_percentage(mod_id, slice_idx, newc->percentage); + changes++; + } + if (oldc->isolation != newc->isolation) { + /*flexran_set_ul_slice_isolation(mod_id, slice_idx, newc->isolation); + *changes++;*/ + LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting isolation is not supported\n", + mod_id, slice_idx); + } + if (oldc->priority != newc->priority) { + /*flexran_set_ul_slice_priority(mod_id, slice_idx, newc->priority); + *changes++;*/ + LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting the priority is not supported\n", + mod_id, slice_idx); + } + if (oldc->first_rb != newc->first_rb) { + flexran_set_ul_slice_first_rb(mod_id, slice_idx, newc->first_rb); + changes++; + } + /*if (oldc->length_rb != newc->length_rb) { + flexran_set_ul_slice_length_rb(mod_id, slice_idx, newc->length_rb); + changes++; + LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting length_rb is not supported\n", + mod_id, slice_idx); + }*/ + if (oldc->maxmcs != newc->maxmcs) { + flexran_set_ul_slice_maxmcs(mod_id, slice_idx, newc->maxmcs); + changes++; + } + n = min(oldc->n_sorting, newc->n_sorting); + for (int i = 0; i < n; i++) { + if (oldc->sorting[i] != newc->sorting[i]) { + /*flexran_set_ul_slice_sorting(mod_id, slice_idx, newc->sorting, n); + changes++;*/ + LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting the sorting is not supported\n", + mod_id, slice_idx); + break; + } + } + if (oldc->accounting != newc->accounting) { + /*flexran_set_ul_slice_accounting_policy(mod_id, slice_idx, newc->accounting); + *changes++;*/ + LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting the accounting is not supported\n", + mod_id, slice_idx); + } + if (strcmp(oldc->scheduler_name, newc->scheduler_name) != 0) { + LOG_E(FLEXRAN_AGENT, "[%d][UL slice %d] setting the UL scheduler is not supported, reverting\n", + mod_id, slice_idx); + newc->scheduler_name = oldc->scheduler_name; + } + return changes; +} + +void prepare_ue_slice_assoc_update(mid_t mod_id, Protocol__FlexUeConfig *ue_config) +{ + if (n_ue_slice_assoc_updates == NUM_MAX_UE) { + LOG_E(FLEXRAN_AGENT, + "[%d] can not handle flex_ue_config message, buffer is full; try again later\n", + mod_id); + return; + } + if (!ue_config->has_rnti) { + LOG_E(FLEXRAN_AGENT, + "[%d] cannot update UE to slice association, no RNTI in flex_ue_config message\n", + mod_id); + return; + } + if (ue_config->has_dl_slice_id) + LOG_I(FLEXRAN_AGENT, "[%d] associating UE RNTI %#x to DL slice ID %d\n", + mod_id, ue_config->rnti, ue_config->dl_slice_id); + if (ue_config->has_ul_slice_id) + LOG_I(FLEXRAN_AGENT, "[%d] associating UE RNTI %#x to UL slice ID %d\n", + mod_id, ue_config->rnti, ue_config->ul_slice_id); + ue_slice_assoc_update[n_ue_slice_assoc_updates++] = ue_config; + perform_slice_config_update_count = 2; +} + +int apply_ue_slice_assoc_update(mid_t mod_id) +{ + int i; + int changes = 0; + /* TODO should lock structure */ + for (i = 0; i < n_ue_slice_assoc_updates; i++) { + int ue_id = find_UE_id(mod_id, ue_slice_assoc_update[i]->rnti); + if (ue_slice_assoc_update[i]->has_dl_slice_id) { + int slice_idx = flexran_find_dl_slice(mod_id, ue_slice_assoc_update[i]->dl_slice_id); + if (flexran_dl_slice_exists(mod_id, slice_idx)) { + flexran_set_ue_dl_slice_idx(mod_id, ue_id, slice_idx); + changes++; + } else { + LOG_W(FLEXRAN_AGENT, "[%d] DL slice %d does not exist, refusing change\n", + mod_id, ue_slice_assoc_update[i]->dl_slice_id); + } + } + if (ue_slice_assoc_update[i]->has_ul_slice_id) { + int slice_idx = flexran_find_ul_slice(mod_id, ue_slice_assoc_update[i]->ul_slice_id); + if (flexran_ul_slice_exists(mod_id, slice_idx)) { + flexran_set_ue_ul_slice_idx(mod_id, ue_id, slice_idx); + changes++; + } else { + LOG_W(FLEXRAN_AGENT, "[%d] UL slice %d does not exist, refusing change\n", + mod_id, ue_slice_assoc_update[i]->ul_slice_id); + } + } + } + n_ue_slice_assoc_updates = 0; + return changes; +} diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.h b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.h index f69e2cde40..2f8f3f8258 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.h +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.h @@ -107,4 +107,37 @@ int parse_ul_scheduler_parameters(mid_t mod_id, yaml_parser_t *parser); int load_dl_scheduler_function(mid_t mod_id, const char *function_name); +/*** Functions for handling a slice config ***/ + +/* allocate memory for a Protocol__FlexSliceConfig structure with n_dl DL slice + * configs and m_ul UL slice configs */ +Protocol__FlexSliceConfig *flexran_agent_create_slice_config(int n_dl, int m_ul); + +/* read the DL slice config via the RAN into a given Protocol__FlexDlSlice + * struct */ +void flexran_agent_read_slice_dl_config(mid_t mod_id, int slice_idx, Protocol__FlexDlSlice *dl_slice); + +/* read the UL slice config via the RAN into a given Protocol__FlexUlSlice + * struct */ +void flexran_agent_read_slice_ul_config(mid_t mod_id, int slice_idx, Protocol__FlexUlSlice *ul_slice); + +/* reads content of slice over the sc_update structure, so that it can be + * applied later by performing a diff between slice_config and sc_update */ +void prepare_update_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *slice); + +/* apply new configuration of slice in DL if there are changes between the + * parameters. Returns the number of changed parameters. */ +int apply_new_slice_dl_config(mid_t mod_id, Protocol__FlexDlSlice *oldc, Protocol__FlexDlSlice *newc); + +/* apply new configuration of slice in UL if there are changes between the + * parameters. Returns the number of changed parameters. */ +int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protocol__FlexUlSlice *newc); + +/* inserts a new ue_config into the structure keeping ue to slice association + * updates and marks so it can be applied */ +void prepare_ue_slice_assoc_update(mid_t mod_id, Protocol__FlexUeConfig *ue_config); + +/* apply a new association between a UE and a slice (both DL and UL) */ +int apply_ue_slice_assoc_update(mid_t mod_id); + #endif /*FLEXRAN_AGENT_MAC_INTERNAL_H_*/ diff --git a/openair2/LAYER2/MAC/eNB_scheduler.c b/openair2/LAYER2/MAC/eNB_scheduler.c index a2988f26d8..4dbf3cf36f 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler.c +++ b/openair2/LAYER2/MAC/eNB_scheduler.c @@ -703,6 +703,10 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, allocate_CCEs(module_idP, CC_id, frameP, subframeP, 2); } + if (mac_agent_registered[module_idP] && subframeP == 9) { + flexran_agent_slice_update(module_idP); + } + stop_meas(&RC.mac[module_idP]->eNB_scheduler); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME From 92a3b07bca708adc4e3fd9c0520123f6e96592ce Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 27 Mar 2018 18:28:14 +0200 Subject: [PATCH 102/379] FlexRAN: send slice ID to which UE belongs + reformat - flexran_agent_ue_config_reply() and flexran_agent_ue_state_change() send slice_id --- .../CONTROL_MODULES/RRC/flexran_agent_rrc.c | 248 +++++++++--------- 1 file changed, 124 insertions(+), 124 deletions(-) diff --git a/openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c b/openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c index b4bf029373..34833ca898 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c +++ b/openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c @@ -76,147 +76,147 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch config->has_rnti = 1; config->rnti = rnti; } else if (state_change == PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_UPDATED - || state_change == PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_ACTIVATED) { - int i = find_UE_id(mod_id, rnti); - config->has_rnti = 1; - config->rnti = rnti; - if(flexran_get_time_alignment_timer(mod_id,i) != -1) { - config->time_alignment_timer = flexran_get_time_alignment_timer(mod_id,i); - config->has_time_alignment_timer = 1; - } - if(flexran_get_meas_gap_config(mod_id,i) != -1){ - config->meas_gap_config_pattern = flexran_get_meas_gap_config(mod_id,i); - config->has_meas_gap_config_pattern = 1; - } - if(config->has_meas_gap_config_pattern == 1 && - config->meas_gap_config_pattern != PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_OFF) { - config->meas_gap_config_sf_offset = flexran_get_meas_gap_config_offset(mod_id,i); - config->has_meas_gap_config_sf_offset = 1; - } - //TODO: Set the SPS configuration (Optional) - //Not supported for now, so we do not set it + || state_change == PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_ACTIVATED) { + int i = find_UE_id(mod_id, rnti); + config->has_rnti = 1; + config->rnti = rnti; + config->imsi = flexran_get_ue_imsi(mod_id, i); + config->has_imsi = 1; + config->dl_slice_id = flexran_get_ue_dl_slice_id(mod_id, i); + config->has_dl_slice_id = 1; + config->ul_slice_id = flexran_get_ue_ul_slice_id(mod_id, i); + config->has_ul_slice_id = 1; + if(flexran_get_time_alignment_timer(mod_id,i) != -1) { + config->time_alignment_timer = flexran_get_time_alignment_timer(mod_id,i); + config->has_time_alignment_timer = 1; + } + if(flexran_get_meas_gap_config(mod_id,i) != -1){ + config->meas_gap_config_pattern = flexran_get_meas_gap_config(mod_id,i); + config->has_meas_gap_config_pattern = 1; + } + if(config->has_meas_gap_config_pattern == 1 && + config->meas_gap_config_pattern != PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_OFF) { + config->meas_gap_config_sf_offset = flexran_get_meas_gap_config_offset(mod_id,i); + config->has_meas_gap_config_sf_offset = 1; + } + //TODO: Set the SPS configuration (Optional) + //Not supported for now, so we do not set it - //TODO: Set the SR configuration (Optional) - //We do not set it for now + //TODO: Set the SR configuration (Optional) + //We do not set it for now - //TODO: Set the CQI configuration (Optional) - //We do not set it for now - - if(flexran_get_ue_transmission_mode(mod_id,i) != -1) { - config->transmission_mode = flexran_get_ue_transmission_mode(mod_id,i); - config->has_transmission_mode = 1; - } + //TODO: Set the CQI configuration (Optional) + //We do not set it for now - config->ue_aggregated_max_bitrate_ul = flexran_get_ue_aggregated_max_bitrate_ul(mod_id,i); - config->has_ue_aggregated_max_bitrate_ul = 1; + if(flexran_get_ue_transmission_mode(mod_id,i) != -1) { + config->transmission_mode = flexran_get_ue_transmission_mode(mod_id,i); + config->has_transmission_mode = 1; + } - config->ue_aggregated_max_bitrate_dl = flexran_get_ue_aggregated_max_bitrate_dl(mod_id,i); - config->has_ue_aggregated_max_bitrate_dl = 1; + config->ue_aggregated_max_bitrate_ul = flexran_get_ue_aggregated_max_bitrate_ul(mod_id,i); + config->has_ue_aggregated_max_bitrate_ul = 1; - //TODO: Set the UE capabilities - Protocol__FlexUeCapabilities *c_capabilities; - c_capabilities = malloc(sizeof(Protocol__FlexUeCapabilities)); - protocol__flex_ue_capabilities__init(c_capabilities); - //TODO: Set half duplex (FDD operation) - c_capabilities->has_half_duplex = 0; - c_capabilities->half_duplex = 1;//flexran_get_half_duplex(i); - //TODO: Set intra-frame hopping flag - c_capabilities->has_intra_sf_hopping = 0; - c_capabilities->intra_sf_hopping = 1;//flexran_get_intra_sf_hopping(i); - //TODO: Set support for type 2 hopping with n_sb > 1 - c_capabilities->has_type2_sb_1 = 0; - c_capabilities->type2_sb_1 = 1;//flexran_get_type2_sb_1(i); - //TODO: Set ue category - c_capabilities->has_ue_category = 0; - c_capabilities->ue_category = 1;//flexran_get_ue_category(i); - //TODO: Set UE support for resource allocation type 1 - c_capabilities->has_res_alloc_type1 = 0; - c_capabilities->res_alloc_type1 = 1;//flexran_get_res_alloc_type1(i); - //Set the capabilites to the message - config->capabilities = c_capabilities; - - if(flexran_get_ue_transmission_antenna(mod_id,i) != -1) { - config->has_ue_transmission_antenna = 1; - config->ue_transmission_antenna = flexran_get_ue_transmission_antenna(mod_id,i); - } + config->ue_aggregated_max_bitrate_dl = flexran_get_ue_aggregated_max_bitrate_dl(mod_id,i); + config->has_ue_aggregated_max_bitrate_dl = 1; - if(flexran_get_tti_bundling(mod_id,i) != -1) { - config->has_tti_bundling = 1; - config->tti_bundling = flexran_get_tti_bundling(mod_id,i); - } + Protocol__FlexUeCapabilities *c_capabilities; + c_capabilities = malloc(sizeof(Protocol__FlexUeCapabilities)); + protocol__flex_ue_capabilities__init(c_capabilities); + c_capabilities->has_half_duplex = 1; + c_capabilities->half_duplex = flexran_get_half_duplex(mod_id, i); + c_capabilities->has_intra_sf_hopping = 1; + c_capabilities->intra_sf_hopping = flexran_get_intra_sf_hopping(mod_id, i); + c_capabilities->has_type2_sb_1 = 1; + c_capabilities->type2_sb_1 = flexran_get_type2_sb_1(mod_id, i); + c_capabilities->has_ue_category = 1; + c_capabilities->ue_category = flexran_get_ue_category(mod_id, i); + c_capabilities->has_res_alloc_type1 = 1; + c_capabilities->res_alloc_type1 = flexran_get_res_alloc_type1(mod_id, i); + //Set the capabilites to the message + config->capabilities = c_capabilities; - if(flexran_get_maxHARQ_TX(mod_id,i) != -1){ - config->has_max_harq_tx = 1; - config->max_harq_tx = flexran_get_maxHARQ_TX(mod_id,i); - } + if(flexran_get_ue_transmission_antenna(mod_id,i) != -1) { + config->has_ue_transmission_antenna = 1; + config->ue_transmission_antenna = flexran_get_ue_transmission_antenna(mod_id,i); + } - if(flexran_get_beta_offset_ack_index(mod_id,i) != -1) { - config->has_beta_offset_ack_index = 1; - config->beta_offset_ack_index = flexran_get_beta_offset_ack_index(mod_id,i); - } + if(flexran_get_tti_bundling(mod_id,i) != -1) { + config->has_tti_bundling = 1; + config->tti_bundling = flexran_get_tti_bundling(mod_id,i); + } - if(flexran_get_beta_offset_ri_index(mod_id,i) != -1) { - config->has_beta_offset_ri_index = 1; - config->beta_offset_ri_index = flexran_get_beta_offset_ri_index(mod_id,i); - } + if(flexran_get_maxHARQ_TX(mod_id,i) != -1){ + config->has_max_harq_tx = 1; + config->max_harq_tx = flexran_get_maxHARQ_TX(mod_id,i); + } - if(flexran_get_beta_offset_cqi_index(mod_id,i) != -1) { - config->has_beta_offset_cqi_index = 1; - config->beta_offset_cqi_index = flexran_get_beta_offset_cqi_index(mod_id,i); - } + if(flexran_get_beta_offset_ack_index(mod_id,i) != -1) { + config->has_beta_offset_ack_index = 1; + config->beta_offset_ack_index = flexran_get_beta_offset_ack_index(mod_id,i); + } - /* assume primary carrier */ - if(flexran_get_ack_nack_simultaneous_trans(mod_id,i,0) != -1) { - config->has_ack_nack_simultaneous_trans = 1; - config->ack_nack_simultaneous_trans = flexran_get_ack_nack_simultaneous_trans(mod_id,i,0); - } + if(flexran_get_beta_offset_ri_index(mod_id,i) != -1) { + config->has_beta_offset_ri_index = 1; + config->beta_offset_ri_index = flexran_get_beta_offset_ri_index(mod_id,i); + } - if(flexran_get_simultaneous_ack_nack_cqi(mod_id,i) != -1) { - config->has_simultaneous_ack_nack_cqi = 1; - config->simultaneous_ack_nack_cqi = flexran_get_simultaneous_ack_nack_cqi(mod_id,i); - } + if(flexran_get_beta_offset_cqi_index(mod_id,i) != -1) { + config->has_beta_offset_cqi_index = 1; + config->beta_offset_cqi_index = flexran_get_beta_offset_cqi_index(mod_id,i); + } - if(flexran_get_aperiodic_cqi_rep_mode(mod_id,i) != -1) { - config->has_aperiodic_cqi_rep_mode = 1; - int mode = flexran_get_aperiodic_cqi_rep_mode(mod_id,i); - if (mode > 4) { - config->aperiodic_cqi_rep_mode = PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_NONE; - } else { - config->aperiodic_cqi_rep_mode = mode; - } - } + /* assume primary carrier */ + if(flexran_get_ack_nack_simultaneous_trans(mod_id,i,0) != -1) { + config->has_ack_nack_simultaneous_trans = 1; + config->ack_nack_simultaneous_trans = flexran_get_ack_nack_simultaneous_trans(mod_id,i,0); + } - if(flexran_get_tdd_ack_nack_feedback_mode(mod_id, i) != -1) { - config->has_tdd_ack_nack_feedback = 1; - config->tdd_ack_nack_feedback = flexran_get_tdd_ack_nack_feedback_mode(mod_id,i); - } + if(flexran_get_simultaneous_ack_nack_cqi(mod_id,i) != -1) { + config->has_simultaneous_ack_nack_cqi = 1; + config->simultaneous_ack_nack_cqi = flexran_get_simultaneous_ack_nack_cqi(mod_id,i); + } - if(flexran_get_ack_nack_repetition_factor(mod_id, i) != -1) { - config->has_ack_nack_repetition_factor = 1; - config->ack_nack_repetition_factor = flexran_get_ack_nack_repetition_factor(mod_id,i); - } + if(flexran_get_aperiodic_cqi_rep_mode(mod_id,i) != -1) { + config->has_aperiodic_cqi_rep_mode = 1; + int mode = flexran_get_aperiodic_cqi_rep_mode(mod_id,i); + if (mode > 4) { + config->aperiodic_cqi_rep_mode = PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_NONE; + } else { + config->aperiodic_cqi_rep_mode = mode; + } + } - if(flexran_get_extended_bsr_size(mod_id, i) != -1) { - config->has_extended_bsr_size = 1; - config->extended_bsr_size = flexran_get_extended_bsr_size(mod_id,i); - } + if(flexran_get_tdd_ack_nack_feedback_mode(mod_id, i) != -1) { + config->has_tdd_ack_nack_feedback = 1; + config->tdd_ack_nack_feedback = flexran_get_tdd_ack_nack_feedback_mode(mod_id,i); + } - config->has_pcell_carrier_index = 1; - config->pcell_carrier_index = UE_PCCID(mod_id, i); - //TODO: Set carrier aggregation support (boolean) - config->has_ca_support = 0; - config->ca_support = 0; - if(config->has_ca_support){ - //TODO: Set cross carrier scheduling support (boolean) - config->has_cross_carrier_sched_support = 1; - config->cross_carrier_sched_support = 0; - //TODO: Set secondary cells configuration - // We do not set it for now. No carrier aggregation support - - //TODO: Set deactivation timer for secondary cell - config->has_scell_deactivation_timer = 0; - config->scell_deactivation_timer = 0; - } + if(flexran_get_ack_nack_repetition_factor(mod_id, i) != -1) { + config->has_ack_nack_repetition_factor = 1; + config->ack_nack_repetition_factor = flexran_get_ack_nack_repetition_factor(mod_id,i); + } + + if(flexran_get_extended_bsr_size(mod_id, i) != -1) { + config->has_extended_bsr_size = 1; + config->extended_bsr_size = flexran_get_extended_bsr_size(mod_id,i); + } + + config->has_pcell_carrier_index = 1; + config->pcell_carrier_index = UE_PCCID(mod_id, i); + //TODO: Set carrier aggregation support (boolean) + config->has_ca_support = 0; + config->ca_support = 0; + if(config->has_ca_support){ + //TODO: Set cross carrier scheduling support (boolean) + config->has_cross_carrier_sched_support = 1; + config->cross_carrier_sched_support = 0; + //TODO: Set secondary cells configuration + // We do not set it for now. No carrier aggregation support + + //TODO: Set deactivation timer for secondary cell + config->has_scell_deactivation_timer = 0; + config->scell_deactivation_timer = 0; + } } else if (state_change == PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_MOVED) { // TODO: Not supported for now. Leave blank } From d93d73fe9b38e880cc76bd6b9040b679aa89ca4a Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 23 Apr 2018 15:55:10 +0200 Subject: [PATCH 103/379] FlexRAN: Send the Slice Configuration in enb_config_reply --- openair2/ENB_APP/flexran_agent_common.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openair2/ENB_APP/flexran_agent_common.c b/openair2/ENB_APP/flexran_agent_common.c index db1943c945..37deec5d49 100644 --- a/openair2/ENB_APP/flexran_agent_common.c +++ b/openair2/ENB_APP/flexran_agent_common.c @@ -37,6 +37,7 @@ #include "flexran_agent_ran_api.h" //#include "PHY/extern.h" #include "common/utils/LOG/log.h" +#include "flexran_agent_mac_internal.h" //#include "SCHED/defs.h" #include "RRC/LTE/rrc_extern.h" @@ -290,6 +291,8 @@ int flexran_agent_destroy_enb_config_reply(Protocol__FlexranMessage *msg) { free(reply->cell_config[i]); } free(reply->cell_config); + /* don't free the slice_config, it is maintained internally during + * the liftetime of the agent */ free(reply); free(msg); @@ -1030,6 +1033,10 @@ int flexran_agent_enb_config_reply(mid_t mod_id, const void *params, Protocol__F cell_conf[i]->carrier_index = i; cell_conf[i]->has_carrier_index = 1; + + /* get a pointer to the config which is maintained in the agent throughout + * its lifetime */ + cell_conf[i]->slice_config = flexran_agent_get_slice_config(mod_id); } enb_config_reply_msg->cell_config=cell_conf; } From 3d8586a5bf4b835d5c5f8aa30fdd4ae0b53199fa Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 23 Apr 2018 16:57:34 +0200 Subject: [PATCH 104/379] FlexRAN: Send Slice ID to which UE belongs in UE config reply --- openair2/ENB_APP/flexran_agent_common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openair2/ENB_APP/flexran_agent_common.c b/openair2/ENB_APP/flexran_agent_common.c index 37deec5d49..f1556deef2 100644 --- a/openair2/ENB_APP/flexran_agent_common.c +++ b/openair2/ENB_APP/flexran_agent_common.c @@ -594,6 +594,10 @@ int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Fl ue_config[i]->has_rnti = 1; ue_config[i]->imsi = flexran_get_ue_imsi(mod_id, i); ue_config[i]->has_imsi = 1; + ue_config[i]->dl_slice_id = flexran_get_ue_dl_slice_id(mod_id, i); + ue_config[i]->has_dl_slice_id = 1; + ue_config[i]->ul_slice_id = flexran_get_ue_ul_slice_id(mod_id, i); + ue_config[i]->has_ul_slice_id = 1; //TODO: Set the DRX configuration (optional) //Not supported for now, so we do not set it From 3a78d85f5ee621a860be73ad5a03ac2ff1e2a401 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 23 Apr 2018 16:58:23 +0200 Subject: [PATCH 105/379] FlexRAN: Handle enb_config_reply reconfiguration message --- openair2/ENB_APP/flexran_agent_common.c | 20 ++++++++++++++++++++ openair2/ENB_APP/flexran_agent_common.h | 7 +++++++ openair2/ENB_APP/flexran_agent_handler.c | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/openair2/ENB_APP/flexran_agent_common.c b/openair2/ENB_APP/flexran_agent_common.c index f1556deef2..1cbf411c65 100644 --- a/openair2/ENB_APP/flexran_agent_common.c +++ b/openair2/ENB_APP/flexran_agent_common.c @@ -1101,5 +1101,25 @@ int flexran_agent_destroy_rrc_measurement(Protocol__FlexranMessage *msg){ return 0; } +int flexran_agent_handle_enb_config_reply(mid_t mod_id, const void *params, Protocol__FlexranMessage **msg) +{ + Protocol__FlexranMessage *input = (Protocol__FlexranMessage *)params; + Protocol__FlexEnbConfigReply *enb_config = input->enb_config_reply_msg; + if (enb_config->n_cell_config == 0) { + LOG_W(FLEXRAN_AGENT, + "received enb_config_reply message does not contain a cell_config\n"); + *msg = NULL; + return 0; + } + if (enb_config->n_cell_config > 1) + LOG_W(FLEXRAN_AGENT, "ignoring slice configs for other cell except cell 0\n"); + if (enb_config->cell_config[0]->slice_config) + prepare_update_slice_config(mod_id, enb_config->cell_config[0]->slice_config); + + /* could test for cell configs here and maybe reconfigure/soft-restart */ + + *msg = NULL; + return 0; +} diff --git a/openair2/ENB_APP/flexran_agent_common.h b/openair2/ENB_APP/flexran_agent_common.h index 057c5b9489..2738a2f3d3 100644 --- a/openair2/ENB_APP/flexran_agent_common.h +++ b/openair2/ENB_APP/flexran_agent_common.h @@ -167,4 +167,11 @@ void flexran_agent_send_update_stats(mid_t mod_id); err_code_t flexran_agent_enable_cont_stats_update(mid_t mod_id, xid_t xid, stats_request_config_t *stats_req) ; err_code_t flexran_agent_disable_cont_stats_update(mid_t mod_id); +/* Handle a received eNB config reply message as an "order" to reconfigure. It + * does not come as a reconfiguration message as this is a "structured" + * ProtoBuf message (as opposed to "unstructured" YAML). There is no destructor + * since we do not reply to this message (yet). Instead, the controller has to + * issue another eNB config request message. */ +int flexran_agent_handle_enb_config_reply(mid_t mod_id, const void* params, Protocol__FlexranMessage **msg); + #endif diff --git a/openair2/ENB_APP/flexran_agent_handler.c b/openair2/ENB_APP/flexran_agent_handler.c index 66123fd71c..b3025bf769 100644 --- a/openair2/ENB_APP/flexran_agent_handler.c +++ b/openair2/ENB_APP/flexran_agent_handler.c @@ -46,7 +46,7 @@ flexran_agent_message_decoded_callback agent_messages_callback[][3] = { {0, 0, 0}, /*PROTOCOK__FLEXRAN_MESSAGE__MSG_SF_TRIGGER_MSG*/ {0, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_UL_SR_INFO_MSG*/ {flexran_agent_enb_config_reply, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_ENB_CONFIG_REQUEST_MSG*/ - {0, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_ENB_CONFIG_REPLY_MSG*/ + {flexran_agent_handle_enb_config_reply, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_ENB_CONFIG_REPLY_MSG*/ {flexran_agent_ue_config_reply, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_UE_CONFIG_REQUEST_MSG*/ {0, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_UE_CONFIG_REPLY_MSG*/ {flexran_agent_lc_config_reply, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_LC_CONFIG_REQUEST_MSG*/ From 7b8c5cea524d5b9d113f17e1aa8893c08a1f596a Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 23 Apr 2018 17:03:23 +0200 Subject: [PATCH 106/379] FlexRAN: handle incoming UE-slice association message --- openair2/ENB_APP/flexran_agent_common.c | 13 +++++++++++++ openair2/ENB_APP/flexran_agent_common.h | 8 ++++++++ openair2/ENB_APP/flexran_agent_handler.c | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/openair2/ENB_APP/flexran_agent_common.c b/openair2/ENB_APP/flexran_agent_common.c index 1cbf411c65..d08517edea 100644 --- a/openair2/ENB_APP/flexran_agent_common.c +++ b/openair2/ENB_APP/flexran_agent_common.c @@ -1123,3 +1123,16 @@ int flexran_agent_handle_enb_config_reply(mid_t mod_id, const void *params, Prot *msg = NULL; return 0; } + +int flexran_agent_handle_ue_config_reply(mid_t mod_id, const void *params, Protocol__FlexranMessage **msg) +{ + int i; + Protocol__FlexranMessage *input = (Protocol__FlexranMessage *)params; + Protocol__FlexUeConfigReply *ue_config_reply = input->ue_config_reply_msg; + + for (i = 0; i < ue_config_reply->n_ue_config; i++) + prepare_ue_slice_assoc_update(mod_id, ue_config_reply->ue_config[i]); + + *msg = NULL; + return 0; +} diff --git a/openair2/ENB_APP/flexran_agent_common.h b/openair2/ENB_APP/flexran_agent_common.h index 2738a2f3d3..5d78e382d4 100644 --- a/openair2/ENB_APP/flexran_agent_common.h +++ b/openair2/ENB_APP/flexran_agent_common.h @@ -174,4 +174,12 @@ err_code_t flexran_agent_disable_cont_stats_update(mid_t mod_id); * issue another eNB config request message. */ int flexran_agent_handle_enb_config_reply(mid_t mod_id, const void* params, Protocol__FlexranMessage **msg); +/* Handle a received UE config reply message as an "order" to reconfigure the + * association of a UE to a slice. It does not come as a reconfiguration + * message as this is a "structured" ProtoBuf message (as opposed to + * "unstructured" YAML). There is no destructor since we do not reply to this + * message (yet). Instead, the controller has to issue another eNB config + * request message. */ +int flexran_agent_handle_ue_config_reply(mid_t mod_id, const void* params, Protocol__FlexranMessage **msg); + #endif diff --git a/openair2/ENB_APP/flexran_agent_handler.c b/openair2/ENB_APP/flexran_agent_handler.c index b3025bf769..fa3270696a 100644 --- a/openair2/ENB_APP/flexran_agent_handler.c +++ b/openair2/ENB_APP/flexran_agent_handler.c @@ -48,7 +48,7 @@ flexran_agent_message_decoded_callback agent_messages_callback[][3] = { {flexran_agent_enb_config_reply, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_ENB_CONFIG_REQUEST_MSG*/ {flexran_agent_handle_enb_config_reply, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_ENB_CONFIG_REPLY_MSG*/ {flexran_agent_ue_config_reply, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_UE_CONFIG_REQUEST_MSG*/ - {0, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_UE_CONFIG_REPLY_MSG*/ + {flexran_agent_handle_ue_config_reply, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_UE_CONFIG_REPLY_MSG*/ {flexran_agent_lc_config_reply, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_LC_CONFIG_REQUEST_MSG*/ {0, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_LC_CONFIG_REPLY_MSG*/ {flexran_agent_mac_handle_dl_mac_config, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_DL_MAC_CONFIG_MSG*/ From 5ceba4a2a6f1bc8711518722c4e7b4d5b39b3fe9 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 23 Apr 2018 17:52:57 +0200 Subject: [PATCH 107/379] FlexRAN: lock sc_update with mutex Prevent sc_update from being changed by an incoming slice reconfiguration change while writing data to the scheduler --- openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c | 7 +++++++ .../CONTROL_MODULES/MAC/flexran_agent_mac_internal.c | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c index 0c33026a38..0985539f8c 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c @@ -61,6 +61,8 @@ int perform_slice_config_update_count = 1; /* queue of incoming new UE<>slice association commands */ Protocol__FlexUeConfig *ue_slice_assoc_update[NUM_MAX_UE]; int n_ue_slice_assoc_updates = 0; +/* mutex for sc_update: do not receive new config and write it at the same time */ +pthread_mutex_t sc_update_mtx = PTHREAD_MUTEX_INITIALIZER; int flexran_agent_mac_stats_reply(mid_t mod_id, @@ -1446,10 +1448,13 @@ void flexran_agent_slice_update(mid_t mod_id) if (perform_slice_config_update_count <= 0) return; perform_slice_config_update_count--; + pthread_mutex_lock(&sc_update_mtx); + if (!slice_config[mod_id]) { /* if the configuration does not exist for agent, create from eNB structure * and exit */ flexran_create_config_structures(mod_id); + pthread_mutex_unlock(&sc_update_mtx); return; } @@ -1479,6 +1484,7 @@ void flexran_agent_slice_update(mid_t mod_id) LOG_W(FLEXRAN_AGENT, "[%d] reverting to original number of %ld UL slices\n", mod_id, sc_update[mod_id]->n_ul); } + pthread_mutex_unlock(&sc_update_mtx); return; } @@ -1514,6 +1520,7 @@ void flexran_agent_slice_update(mid_t mod_id) if (changes > 0) LOG_I(FLEXRAN_AGENT, "[%d] slice configuration: applied %d changes\n", mod_id, changes); + pthread_mutex_unlock(&sc_update_mtx); } Protocol__FlexSliceConfig *flexran_agent_get_slice_config(mid_t mod_id) diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c index 435e8da064..dea1aa05b9 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c @@ -38,6 +38,7 @@ extern Protocol__FlexSliceConfig *sc_update[NUM_MAX_ENB]; extern int perform_slice_config_update_count; extern Protocol__FlexUeConfig *ue_slice_assoc_update[NUM_MAX_UE]; extern int n_ue_slice_assoc_updates; +extern pthread_mutex_t sc_update_mtx; Protocol__FlexranMessage * flexran_agent_generate_diff_mac_stats_report(Protocol__FlexranMessage *new_message, Protocol__FlexranMessage *old_message) { @@ -1228,6 +1229,9 @@ void prepare_update_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *slice) LOG_E(FLEXRAN_AGENT, "Can not update slice policy (no existing slice profile)\n"); return; } + + pthread_mutex_lock(&sc_update_mtx); + if (slice->n_dl == 0) LOG_I(FLEXRAN_AGENT, "[%d] no DL slice configuration in flex_slice_config message\n", mod_id); for (int i = 0; i < slice->n_dl; i++) @@ -1238,6 +1242,8 @@ void prepare_update_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *slice) for (int i = 0; i < slice->n_ul; i++) prepare_update_slice_config_ul(mod_id, slice->ul[i]); + pthread_mutex_unlock(&sc_update_mtx); + /* perform the slice configuration reads a couple of times. If there are * inconsistencies (i.e. the MAC refuses a configuration), we will have a * couple of warnings because the current configuration and the one in @@ -1395,7 +1401,6 @@ int apply_ue_slice_assoc_update(mid_t mod_id) { int i; int changes = 0; - /* TODO should lock structure */ for (i = 0; i < n_ue_slice_assoc_updates; i++) { int ue_id = find_UE_id(mod_id, ue_slice_assoc_update[i]->rnti); if (ue_slice_assoc_update[i]->has_dl_slice_id) { From 44d1eb80158554e0deec544324496e303d72247f Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 25 Apr 2018 18:52:12 +0200 Subject: [PATCH 108/379] preprocessor reset: avoid unnecessary iterations --- openair2/LAYER2/MAC/pre_processor.c | 168 ++++++++++++++-------------- 1 file changed, 83 insertions(+), 85 deletions(-) diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 8334219371..69afa7f705 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -1446,14 +1446,6 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP, if (!ue_dl_slice_membership(module_idP, UE_id, slice_idx)) continue; - vrb_map = RC.mac[module_idP]->common_channels[CC_id].vrb_map; - N_RB_DL = to_prb(RC.mac[module_idP]->common_channels[CC_id].mib->message.dl_Bandwidth); - -#ifdef SF0_LIMIT - sf0_lower = -1; - sf0_upper = -1; -#endif - LOG_D(MAC, "Running preprocessor for UE %d (%x)\n", UE_id, rnti); // initialize harq_pid and round if (ue_sched_ctl->ta_timer) @@ -1522,91 +1514,97 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP, ue_sched_ctl->pre_nb_available_rbs[CC_id] = 0; ue_sched_ctl->dl_pow_off[CC_id] = 2; - switch (N_RB_DL) { - case 6: - RBGsize = 1; - RBGsize_last = 1; - break; - case 15: - RBGsize = 2; - RBGsize_last = 1; - break; - case 25: - RBGsize = 2; - RBGsize_last = 1; - break; - case 50: - RBGsize = 3; - RBGsize_last = 2; - break; - case 75: - RBGsize = 4; - RBGsize_last = 3; - break; - case 100: - RBGsize = 4; - RBGsize_last = 4; - break; - default: - AssertFatal(1 == 0, "unsupported RBs (%d)\n", N_RB_DL); - } - -#ifdef SF0_LIMIT - switch (N_RBG[CC_id]) { - case 6: - sf0_lower = 0; - sf0_upper = 5; - break; - case 8: - sf0_lower = 2; - sf0_upper = 5; - break; - case 13: - sf0_lower = 4; - sf0_upper = 7; - break; - case 17: - sf0_lower = 7; - sf0_upper = 9; - break; - case 25: - sf0_lower = 11; - sf0_upper = 13; - break; - default: - AssertFatal(1 == 0, "unsupported RBs (%d)\n", N_RB_DL); - } -#endif - - // Initialize Subbands according to VRB map for (i = 0; i < N_RBG[CC_id]; i++) { - int rb_size = i == N_RBG[CC_id] - 1 ? RBGsize_last : RBGsize; - ue_sched_ctl->rballoc_sub_UE[CC_id][i] = 0; - rballoc_sub[CC_id][i] = 0; + } + } + + N_RB_DL = to_prb(RC.mac[module_idP]->common_channels[CC_id].mib->message.dl_Bandwidth); #ifdef SF0_LIMIT - // for avoiding 6+ PRBs around DC in subframe 0 (avoid excessive errors) - /* TODO: make it proper - allocate those RBs, do not "protect" them, but - * compute number of available REs and limit MCS according to the - * TBS table 36.213 7.1.7.2.1-1 (can be done after pre-processor) - */ - if (subframeP == 0 && i >= sf0_lower && i <= sf0_upper) - rballoc_sub[CC_id][i] = 1; + switch (N_RBG[CC_id]) { + case 6: + sf0_lower = 0; + sf0_upper = 5; + break; + case 8: + sf0_lower = 2; + sf0_upper = 5; + break; + case 13: + sf0_lower = 4; + sf0_upper = 7; + break; + case 17: + sf0_lower = 7; + sf0_upper = 9; + break; + case 25: + sf0_lower = 11; + sf0_upper = 13; + break; + default: + AssertFatal(1 == 0, "unsupported RBs (%d)\n", N_RB_DL); + } #endif - // for SI-RNTI,RA-RNTI and P-RNTI allocations - for (j = 0; j < rb_size; j++) { - if (vrb_map[j + (i*RBGsize)] != 0) { - rballoc_sub[CC_id][i] = 1; - LOG_D(MAC, "Frame %d, subframe %d : vrb %d allocated\n", frameP, subframeP, j + (i*RBGsize)); - break; - } + switch (N_RB_DL) { + case 6: + RBGsize = 1; + RBGsize_last = 1; + break; + case 15: + RBGsize = 2; + RBGsize_last = 1; + break; + case 25: + RBGsize = 2; + RBGsize_last = 1; + break; + case 50: + RBGsize = 3; + RBGsize_last = 2; + break; + case 75: + RBGsize = 4; + RBGsize_last = 3; + break; + case 100: + RBGsize = 4; + RBGsize_last = 4; + break; + default: + AssertFatal(1 == 0, "unsupported RBs (%d)\n", N_RB_DL); + } + + vrb_map = RC.mac[module_idP]->common_channels[CC_id].vrb_map; + // Initialize Subbands according to VRB map + for (i = 0; i < N_RBG[CC_id]; i++) { + int rb_size = i == N_RBG[CC_id] - 1 ? RBGsize_last : RBGsize; + rballoc_sub[CC_id][i] = 0; + + +#ifdef SF0_LIMIT + // for avoiding 6+ PRBs around DC in subframe 0 (avoid excessive errors) + /* TODO: make it proper - allocate those RBs, do not "protect" them, but + * compute number of available REs and limit MCS according to the + * TBS table 36.213 7.1.7.2.1-1 (can be done after pre-processor) + */ + if (subframeP == 0 && i >= sf0_lower && i <= sf0_upper) + rballoc_sub[CC_id][i] = 1; +#endif + + // for SI-RNTI,RA-RNTI and P-RNTI allocations + for (j = 0; j < rb_size; j++) { + if (vrb_map[j + (i*RBGsize)] != 0) { + rballoc_sub[CC_id][i] = 1; + LOG_D(MAC, "Frame %d, subframe %d : vrb %d allocated\n", frameP, subframeP, j + (i*RBGsize)); + break; } - LOG_D(MAC, "Frame %d Subframe %d CC_id %d RBG %i : rb_alloc %d\n", - frameP, subframeP, CC_id, i, rballoc_sub[CC_id][i]); - MIMO_mode_indicator[CC_id][i] = 2; } + LOG_D(MAC, "Frame %d Subframe %d CC_id %d RBG %i : rb_alloc %d\n", + frameP, subframeP, CC_id, i, rballoc_sub[CC_id][i]); + MIMO_mode_indicator[CC_id][i] = 2; } } } From 8039cd40f59b930a0995628ecf5d2e154ce6053f Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 25 Apr 2018 19:08:44 +0200 Subject: [PATCH 109/379] share the allocation array rballoc_sub between slices --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 17 ++++++++++------- openair2/LAYER2/MAC/mac.h | 4 +++- openair2/LAYER2/MAC/mac_proto.h | 6 ++++-- openair2/LAYER2/MAC/pre_processor.c | 5 ++--- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index ccc5a944a7..7cc8f93939 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -412,6 +412,7 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in int i = 0; slice_info_t *sli = &RC.mac[module_idP]->slice_info; + memset(sli->rballoc_sub, 0, sizeof(sli->rballoc_sub)); sli->tot_pct_dl = 0; sli->avg_pct_dl = 1.0 / sli->n_dl; @@ -727,7 +728,8 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP, slice_idxP, frameP, subframeP, - mbsfn_flag); + mbsfn_flag, + eNB->slice_info.rballoc_sub); stop_meas(&eNB->schedule_dlsch_preprocessor); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR, VCD_FUNCTION_OUT); @@ -741,7 +743,7 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP, //} if (RC.mac[module_idP]->slice_info.interslice_share_active) { - dlsch_scheduler_interslice_multiplexing(module_idP, frameP, subframeP); + dlsch_scheduler_interslice_multiplexing(module_idP, frameP, subframeP, eNB->slice_info.rballoc_sub); } for (CC_id = 0; CC_id < NFAPI_CC_MAX; CC_id++) { @@ -843,7 +845,7 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP, eNB_UE_stats->dlsch_mcs1 = 10; // cqi_to_mcs[ue_sched_ctl->dl_cqi[CC_id]]; } else { // this operation is also done in the preprocessor eNB_UE_stats->dlsch_mcs1 = cmin(eNB_UE_stats->dlsch_mcs1, - RC.mac[module_idP]->slice_info.dl[slice_idxP].maxmcs); // cmin(eNB_UE_stats->dlsch_mcs1, openair_daq_vars.target_ue_dl_mcs); + eNB->slice_info.dl[slice_idxP].maxmcs); // cmin(eNB_UE_stats->dlsch_mcs1, openair_daq_vars.target_ue_dl_mcs); } // Store stats @@ -1608,7 +1610,10 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP, } //------------------------------------------------------------------------------ -void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub_frame_t subframeP) +void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, + int frameP, + sub_frame_t subframeP, + uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX]) //------------------------------------------------------------------------------ { // FIXME: I'm prototyping the algorithm, so there may be arrays and variables that carry redundant information here and in pre_processor_results struct. @@ -1631,7 +1636,6 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub uint16_t (*nb_rbs_remaining)[MAX_MOBILES_PER_ENB]; uint16_t (*nb_rbs_required)[MAX_MOBILES_PER_ENB]; - uint8_t (*rballoc_sub)[N_RBG_MAX]; uint8_t (*MIMO_mode_indicator)[N_RBG_MAX]; // Initialize the free RBGs map @@ -1646,7 +1650,7 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub for (i = 0; i < sli->n_dl; ++i) { owned = sli->pre_processor_results[i].slice_allocation_mask[CC_id][rbg]; if (owned) { - used = sli->pre_processor_results[i].slice_allocated_rbgs[CC_id][rbg]; + used = rballoc_sub[CC_id][rbg]; free_rbgs_map[CC_id][rbg] = used ? -1 : i; break; } @@ -1705,7 +1709,6 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, sub nb_rbs_remaining = sli->pre_processor_results[slice_idx].nb_rbs_remaining; nb_rbs_required = sli->pre_processor_results[slice_idx].nb_rbs_required; - rballoc_sub = sli->pre_processor_results[slice_idx].slice_allocated_rbgs; MIMO_mode_indicator = sli->pre_processor_results[slice_idx].MIMO_mode_indicator; // Allocation diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h index f22cc4081c..5507f643f0 100644 --- a/openair2/LAYER2/MAC/mac.h +++ b/openair2/LAYER2/MAC/mac.h @@ -1131,7 +1131,6 @@ typedef struct { uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX]; - uint8_t slice_allocated_rbgs[NFAPI_CC_MAX][N_RBG_MAX]; uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]; uint32_t bytes_lcid[MAX_MOBILES_PER_ENB][MAX_NUM_LCID]; @@ -1264,6 +1263,9 @@ typedef struct { slice_sched_conf_ul_t ul[MAX_NUM_SLICES]; pre_processor_results_t pre_processor_results[MAX_NUM_SLICES]; + + /// common rb allocation list between slices + uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX]; } slice_info_t; /*! \brief eNB common channels */ diff --git a/openair2/LAYER2/MAC/mac_proto.h b/openair2/LAYER2/MAC/mac_proto.h index 4837b84d4f..1400d862d6 100644 --- a/openair2/LAYER2/MAC/mac_proto.h +++ b/openair2/LAYER2/MAC/mac_proto.h @@ -203,7 +203,8 @@ void dlsch_scheduler_pre_processor(module_id_t module_idP, int slice_idxP, frame_t frameP, sub_frame_t subframe, - int *mbsfn_flag); + int *mbsfn_flag, + uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX]); void dlsch_scheduler_pre_processor_reset(module_id_t module_idP, int slice_idx, @@ -249,7 +250,8 @@ void slice_priority_sort(module_id_t Mod_id, int slice_list[MAX_NUM_SLICES]); void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, int frameP, - sub_frame_t subframeP); + sub_frame_t subframeP, + uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX]); void dlsch_scheduler_qos_multiplexing(module_id_t Mod_id, int frameP, diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 69afa7f705..05d5845058 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -1234,7 +1234,8 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, int slice_idx, frame_t frameP, sub_frame_t subframeP, - int *mbsfn_flag) + int *mbsfn_flag, + uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX]) { int UE_id; uint8_t CC_id; @@ -1246,7 +1247,6 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, uint16_t (*nb_rbs_required)[MAX_MOBILES_PER_ENB] = sli->pre_processor_results[slice_idx].nb_rbs_required; uint16_t (*nb_rbs_accounted)[MAX_MOBILES_PER_ENB] = sli->pre_processor_results[slice_idx].nb_rbs_accounted; uint16_t (*nb_rbs_remaining)[MAX_MOBILES_PER_ENB] = sli->pre_processor_results[slice_idx].nb_rbs_remaining; - uint8_t (*rballoc_sub)[N_RBG_MAX] = sli->pre_processor_results[slice_idx].slice_allocated_rbgs; uint8_t (*MIMO_mode_indicator)[N_RBG_MAX] = sli->pre_processor_results[slice_idx].MIMO_mode_indicator; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; @@ -1581,7 +1581,6 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP, // Initialize Subbands according to VRB map for (i = 0; i < N_RBG[CC_id]; i++) { int rb_size = i == N_RBG[CC_id] - 1 ? RBGsize_last : RBGsize; - rballoc_sub[CC_id][i] = 0; #ifdef SF0_LIMIT From 11e45be9c50bc89cf5d26b6ed2db90e66a4cbce7 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 17 May 2018 10:27:09 +0200 Subject: [PATCH 110/379] fix: resort UE_list after slice multiplexing - slice multiplexing resorts UE_list for its purposes with restoring the original order - in order to keep the order in UE_list, resort to original order after multiplexing - ideally, this would happen in the multiplexing but currently, the slice_idx is not passed to multiplexing (it does not care), so this cannot be done ATM --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 7cc8f93939..350a7ea9f7 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -744,6 +744,9 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP, if (RC.mac[module_idP]->slice_info.interslice_share_active) { dlsch_scheduler_interslice_multiplexing(module_idP, frameP, subframeP, eNB->slice_info.rballoc_sub); + /* the interslice multiplexing re-sorts the UE_list for the slices it tries + * to multiplex, so we need to sort it for the current slice again */ + sort_UEs(module_idP, slice_idxP, frameP, subframeP); } for (CC_id = 0; CC_id < NFAPI_CC_MAX; CC_id++) { From 088b1d5a8d78f573e5584338924adb4b8efec772 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 17 May 2018 10:47:10 +0200 Subject: [PATCH 111/379] refine MAC Debug output - uncomment "Couldn't find RNTI for UE X" in UE_RNTI() and rb_alloc in pre_processor_reset() as they only inflate the debug output with little benefited - "doing ue_schedule_spec" is now displayed for individual UEs (and individual CCs) - show messages when not scheduling UE in ue_schedule_spec() due to invalid slice or if not in RRC_CONNECTED --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 12 ++++++++++-- openair2/LAYER2/MAC/eNB_scheduler_primitives.c | 2 +- openair2/LAYER2/MAC/pre_processor.c | 4 ++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 350a7ea9f7..bc929b7534 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -758,6 +758,7 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP, continue; for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { + LOG_D(MAC, "doing schedule_ue_spec for CC_id %d UE %d\n", CC_id, UE_id); continue_flag = 0; // reset the flag to allow allocation for the remaining UEs rnti = UE_RNTI(module_idP, UE_id); eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id]; @@ -773,8 +774,13 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP, continue_flag = 1; } - if (!ue_dl_slice_membership(module_idP, UE_id, slice_idxP)) + if (!ue_dl_slice_membership(module_idP, UE_id, slice_idxP)) { + LOG_D(MAC, "UE%d is not part of slice %d ID %d\n", + UE_id, slice_idxP, RC.mac[module_idP]->slice_info.dl[slice_idxP].id); + /* prevent execution of add_ue_dlsch_info(), it is done by the other + * slice */ continue; + } if (continue_flag != 1) { switch (get_tmode(module_idP, CC_id, UE_id)) { @@ -832,8 +838,10 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP, UE_list->eNB_UE_stats[CC_id][UE_id].harq_pid = harq_pid; UE_list->eNB_UE_stats[CC_id][UE_id].harq_round = round; - if (UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status < RRC_CONNECTED) + if (UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status < RRC_CONNECTED) { + LOG_D(MAC, "UE %d is not in RRC_CONNECTED\n", UE_id); continue; + } header_length_total = 0; sdu_length_total = 0; diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c index 6bdb63a721..57cc7f5370 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c @@ -1851,7 +1851,7 @@ rnti_t UE_RNTI(module_id_t mod_idP, int ue_idP) return (rnti); } - LOG_D(MAC, "[eNB %d] Couldn't find RNTI for UE %d\n", mod_idP, ue_idP); + //LOG_D(MAC, "[eNB %d] Couldn't find RNTI for UE %d\n", mod_idP, ue_idP); //display_backtrace(); return (NOT_A_RNTI); } diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 05d5845058..a2c88674c8 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -1601,8 +1601,8 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP, break; } } - LOG_D(MAC, "Frame %d Subframe %d CC_id %d RBG %i : rb_alloc %d\n", - frameP, subframeP, CC_id, i, rballoc_sub[CC_id][i]); + //LOG_D(MAC, "Frame %d Subframe %d CC_id %d RBG %i : rb_alloc %d\n", + //frameP, subframeP, CC_id, i, rballoc_sub[CC_id][i]); MIMO_mode_indicator[CC_id][i] = 2; } } From 6b3dd8716b4ec73ed6a33e4e8c87dcbec0db6fb6 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 17 May 2018 14:49:50 +0200 Subject: [PATCH 112/379] FlexRAN: set values of removed slices to 0 --- openair2/ENB_APP/flexran_agent_ran_api.c | 2 ++ openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 4 ---- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 4 ---- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/openair2/ENB_APP/flexran_agent_ran_api.c b/openair2/ENB_APP/flexran_agent_ran_api.c index 9b6ecae593..bea680c48c 100644 --- a/openair2/ENB_APP/flexran_agent_ran_api.c +++ b/openair2/ENB_APP/flexran_agent_ran_api.c @@ -1487,6 +1487,7 @@ int flexran_remove_dl_slice(mid_t mod_id, int slice_idx) /* move last element to the position of the removed one */ if (slice_idx != sli->n_dl) memcpy(&sli->dl[slice_idx], &sli->dl[sli->n_dl], sizeof(sli->dl[sli->n_dl])); + memset(&sli->dl[sli->n_dl], 0, sizeof(sli->dl[sli->n_dl])); /* all UEs that have been in the old slice are put into slice index 0 */ int *assoc_list = RC.mac[mod_id]->UE_list.assoc_dl_slice_idx; @@ -1763,6 +1764,7 @@ int flexran_remove_ul_slice(mid_t mod_id, int slice_idx) /* move last element to the position of the removed one */ if (slice_idx != sli->n_ul) memcpy(&sli->ul[slice_idx], &sli->ul[sli->n_ul], sizeof(sli->ul[sli->n_ul])); + memset(&sli->ul[sli->n_ul], 0, sizeof(sli->ul[sli->n_ul])); /* all UEs that have been in the old slice are put into slice index 0 */ int *assoc_list = RC.mac[mod_id]->UE_list.assoc_ul_slice_idx; diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index bc929b7534..c4c1cd1ca5 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -418,10 +418,6 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in sli->avg_pct_dl = 1.0 / sli->n_dl; //sli->slice_counter = sli->n_dl; - // reset the slice percentage for inactive slices - for (i = sli->n_dl; i < MAX_NUM_SLICES; i++) { - sli->dl[i].pct = 0; - } for (i = 0; i < sli->n_dl; i++) { if (sli->dl[i].pct < 0) { LOG_W(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: invalid percentage %f. resetting to zero", diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 684a74f0f7..68cd5de8bd 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -1043,10 +1043,6 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP, sli->tot_pct_ul = 0; sli->avg_pct_ul = 1.0 / sli->n_ul; - // reset the slice percentage for inactive slices - for (i = sli->n_ul; i< MAX_NUM_SLICES; i++) { - sli->ul[i].pct = 0; - } for (i = 0; i < sli->n_ul; i++) { if (sli->ul[i].pct < 0 ){ LOG_W(MAC, From 21f66094724f78b4f79727a92080508ad5e11303 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 18 May 2018 18:18:53 +0200 Subject: [PATCH 113/379] FlexRAN: move slice param verification to agent - until now, on every iteration, the scheduler checked for changed parameter (and verified some) - this functionality moves to the FlexRAN Agent, which verifies all parameters * individually, e.g. Max MCS <= 28 for DL * group-based, e.g. the sum of slice percentages is <= 100 - slice configuration changes are only applied if all verifications pass - it is assumed in the scheduler, that configuration passed from outside is correct and can be used "as-is" fix accounting setting --- cmake_targets/CMakeLists.txt | 1 + .../MAC/flexran_agent_mac_internal.c | 253 ++++++++----- .../flexran_agent_mac_slice_verification.c | 340 ++++++++++++++++++ .../flexran_agent_mac_slice_verification.h | 37 ++ openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 186 ---------- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 105 ------ openair2/LAYER2/MAC/mac.h | 40 +-- openair2/LAYER2/MAC/main.c | 20 -- 8 files changed, 555 insertions(+), 427 deletions(-) create mode 100644 openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c create mode 100644 openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.h diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 39a24564dd..a083cac1c3 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -870,6 +870,7 @@ add_library(FLEXRAN_AGENT ${OPENAIR2_DIR}/ENB_APP/flexran_agent_net_comm.c ${OPENAIR2_DIR}/ENB_APP/flexran_agent_async.c ${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c + ${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c ) set(FLEXRAN_AGENT_LIB FLEXRAN_AGENT) #include_directories(${OPENAIR2_DIR}/ENB_APP) diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c index dea1aa05b9..d75712d430 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c @@ -31,6 +31,7 @@ #include "flexran_agent_common_internal.h" #include "flexran_agent_mac_internal.h" +#include "flexran_agent_mac_slice_verification.h" /* from flexran_agent_mac.c */ extern Protocol__FlexSliceConfig *slice_config[NUM_MAX_ENB]; @@ -1141,107 +1142,203 @@ void overwrite_slice_config_ul(Protocol__FlexUlSlice *exist, Protocol__FlexUlSli } } -void prepare_update_slice_config_dl(mid_t mod_id, Protocol__FlexDlSlice *dls) +void fill_dl_slice(mid_t mod_id, Protocol__FlexDlSlice *s) { - if (!dls->has_id) { - LOG_E(FLEXRAN_AGENT, "[%d] Incoming DL slice configuration has no ID\n", mod_id); - return; + /* TODO fill the slice depending on the chosen label */ + /* for now, we fill it up with the information from slice 0 */ + /* assume there is an ID (will be checked later) */ + if (!s->has_label) { + s->has_label = 1; + s->label = sc_update[mod_id]->dl[0]->label; } - /* a percentage of zero will be interpreted as removal command */ - if (sc_update[mod_id]->n_dl >= MAX_NUM_SLICES - && (!dls->has_percentage || dls->percentage > 0)) { - LOG_E(FLEXRAN_AGENT, "[%d] Cannot create more than %ld slices in DL\n", - mod_id, sc_update[mod_id]->n_dl); - return; + if (!s->has_percentage) { + s->has_percentage = 1; + s->percentage = sc_update[mod_id]->dl[0]->percentage; } - if (sc_update[mod_id]->n_dl == 1 && dls->has_percentage && dls->percentage == 0) { - LOG_E(FLEXRAN_AGENT, "[%d] Cannot delete last slice ID %d in DL\n", - mod_id, sc_update[mod_id]->dl[0]->id); - return; + if (!s->has_isolation) { + s->has_isolation = 1; + s->isolation = sc_update[mod_id]->dl[0]->isolation; } + if (!s->has_priority) { + s->has_priority = 1; + s->priority = sc_update[mod_id]->dl[0]->priority; + } + if (!s->has_position_low) { + s->has_position_low = 1; + s->position_low = sc_update[mod_id]->dl[0]->position_low; + } + if (!s->has_position_high) { + s->has_position_high = 1; + s->position_high = sc_update[mod_id]->dl[0]->position_high; + } + if (!s->has_maxmcs) { + s->has_maxmcs = 1; + s->maxmcs = sc_update[mod_id]->dl[0]->maxmcs; + } + if (s->n_sorting == 0) { + s->n_sorting = sc_update[0]->dl[0]->n_sorting; + /* TODO Dangerous? */ + s->sorting = sc_update[0]->dl[0]->sorting; + } + if (!s->has_accounting) { + /* TODO Dangerous? */ + s->accounting = sc_update[0]->dl[0]->accounting; + } + /* scheduler name not set, cannot be changed for the moment */ +} - Protocol__FlexDlSlice *to = NULL; +Protocol__FlexDlSlice *get_existing_dl_slice(mid_t mod_id, int id) +{ for (int i = 0; i < sc_update[mod_id]->n_dl; ++i) { - if (dls->id == sc_update[mod_id]->dl[i]->id) { - to = sc_update[mod_id]->dl[i]; - break; + if (id == sc_update[mod_id]->dl[i]->id) { + return sc_update[mod_id]->dl[i]; } } - - /* create new slice -> read contents from existing slice config index 0 */ - if (!to) { - LOG_I(FLEXRAN_AGENT, - "[%d] Creating DL slice with ID %d, taking default values from DL slice 0\n", - mod_id, dls->id); - to = sc_update[mod_id]->dl[sc_update[mod_id]->n_dl]; - sc_update[mod_id]->n_dl++; - memcpy(to, slice_config[mod_id]->dl[0], sizeof(*to)); - to->id = dls->id; - } - - overwrite_slice_config_dl(to, dls); + return NULL; } -void prepare_update_slice_config_ul(mid_t mod_id, Protocol__FlexUlSlice *uls) +Protocol__FlexDlSlice *create_new_dl_slice(mid_t mod_id, int id) { - if (!uls->has_id) { - LOG_E(FLEXRAN_AGENT, "[%d] Incoming UL slice configuration has no ID\n", mod_id); - return; - } - /* a percentage of zero will be interpreted as removal command */ - if (sc_update[mod_id]->n_ul >= MAX_NUM_SLICES - && (!uls->has_percentage || uls->percentage > 0)) { - LOG_E(FLEXRAN_AGENT, "[%d] Cannot create more than %ld slices in UL\n", - mod_id, sc_update[mod_id]->n_ul); - return; - } - if (sc_update[mod_id]->n_ul == 1 && uls->has_percentage && uls->percentage == 0) { - LOG_E(FLEXRAN_AGENT, "[%d] Cannot delete last slice ID %d in UL\n", - mod_id, sc_update[mod_id]->ul[0]->id); - return; - } + LOG_I(FLEXRAN_AGENT, + "[%d] Creating DL slice with ID %d, taking default values from DL slice 0\n", + mod_id, id); + Protocol__FlexDlSlice *to = sc_update[mod_id]->dl[sc_update[mod_id]->n_dl]; + sc_update[mod_id]->n_dl++; + AssertFatal(sc_update[mod_id]->n_dl <= MAX_NUM_SLICES, + "cannot create more than MAX_NUM_SLICES\n"); + to->id = id; + return to; +} - Protocol__FlexUlSlice *to = NULL; +void fill_ul_slice(mid_t mod_id, Protocol__FlexUlSlice *s) +{ + /* TODO fill the slice depending on the chosen label */ + /* for now, we fill it up with the information from slice 0 */ + /* assume there is an ID (will be checked later) */ + if (!s->has_label) { + s->has_label = 1; + s->label = sc_update[mod_id]->ul[0]->label; + } + if (!s->has_percentage) { + s->has_percentage = 1; + s->percentage = sc_update[mod_id]->ul[0]->percentage; + } + if (!s->has_isolation) { + s->has_isolation = 1; + s->isolation = sc_update[mod_id]->ul[0]->isolation; + } + if (!s->has_priority) { + s->has_priority = 1; + s->priority = sc_update[mod_id]->ul[0]->priority; + } + if (!s->has_first_rb) { + s->has_first_rb = 1; + s->first_rb = sc_update[mod_id]->ul[0]->first_rb; + } + if (!s->has_maxmcs) { + s->has_maxmcs = 1; + s->maxmcs = sc_update[mod_id]->ul[0]->maxmcs; + } + if (s->n_sorting == 0) { + s->n_sorting = sc_update[0]->ul[0]->n_sorting; + /* TODO Dangerous? */ + s->sorting = sc_update[0]->ul[0]->sorting; + } + if (!s->has_accounting) { + /* TODO Dangerous? */ + s->accounting = sc_update[0]->ul[0]->accounting; + } + /* scheduler name not set, cannot be changed for the moment */ +} + +Protocol__FlexUlSlice *get_existing_ul_slice(mid_t mod_id, int id) +{ for (int i = 0; i < sc_update[mod_id]->n_ul; ++i) { - if (uls->id == sc_update[mod_id]->ul[i]->id) { - to = sc_update[mod_id]->ul[i]; - break; + if (id == sc_update[mod_id]->ul[i]->id) { + return sc_update[mod_id]->ul[i]; } } - - /* create new slice -> read contents from existing slice config index 0 */ - if (!to) { - LOG_I(FLEXRAN_AGENT, - "[%d] Creating UL slice with ID %d, taking default values from UL slice 0\n", - mod_id, uls->id); - to = sc_update[mod_id]->ul[sc_update[mod_id]->n_ul]; - sc_update[mod_id]->n_ul++; - memcpy(to, slice_config[mod_id]->ul[0], sizeof(*to)); - to->id = uls->id; - } - - overwrite_slice_config_ul(to, uls); + return NULL; } -void prepare_update_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *slice) +Protocol__FlexUlSlice *create_new_ul_slice(mid_t mod_id, int id) { + LOG_I(FLEXRAN_AGENT, + "[%d] Creating UL slice with ID %d, taking default values from UL slice 0\n", + mod_id, id); + Protocol__FlexUlSlice *to = sc_update[mod_id]->ul[sc_update[mod_id]->n_ul]; + sc_update[mod_id]->n_ul++; + AssertFatal(sc_update[mod_id]->n_ul <= MAX_NUM_SLICES, + "cannot create more than MAX_NUM_SLICES\n"); + to->id = id; + return to; +} + +void prepare_update_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *sup) +{ + int verified = 1; if (!sc_update[mod_id]) { LOG_E(FLEXRAN_AGENT, "Can not update slice policy (no existing slice profile)\n"); return; } pthread_mutex_lock(&sc_update_mtx); - - if (slice->n_dl == 0) + if (sup->n_dl == 0) { LOG_I(FLEXRAN_AGENT, "[%d] no DL slice configuration in flex_slice_config message\n", mod_id); - for (int i = 0; i < slice->n_dl; i++) - prepare_update_slice_config_dl(mod_id, slice->dl[i]); + } else { + /* verify slice parameters */ + for (int i = 0; i < sup->n_dl; i++) { + fill_dl_slice(mod_id, sup->dl[i]); + verified = verified && flexran_verify_dl_slice(mod_id, sup->dl[i]); + if (!verified) break; + } - if (slice->n_ul == 0) + /* verify group-based parameters (e.g. sum percentage should not exceed + * 100%). Can be used to perform admission control */ + verified = verified && flexran_verify_group_dl_slices(mod_id, + sc_update[mod_id]->dl, sc_update[mod_id]->n_dl, sup->dl, sup->n_dl); + + if (verified) { + for (int i = 0; i < sup->n_dl; i++) { + /* if all verifications were successful, get existing slice for ID or + * create new one and overwrite with the update */ + Protocol__FlexDlSlice *dls = get_existing_dl_slice(mod_id, sup->dl[i]->id); + if (!dls) dls = create_new_dl_slice(mod_id, sup->dl[i]->id); + overwrite_slice_config_dl(dls, sup->dl[i]); + } + } else { + LOG_E(FLEXRAN_AGENT, "[%d] DL slice verification failed, refusing application\n", mod_id); + } + } + + verified = 1; + if (sup->n_ul == 0) { LOG_I(FLEXRAN_AGENT, "[%d] no UL slice configuration in flex_slice_config message\n", mod_id); - for (int i = 0; i < slice->n_ul; i++) - prepare_update_slice_config_ul(mod_id, slice->ul[i]); + } else { + /* verify slice parameters */ + for (int i = 0; i < sup->n_ul; i++) { + fill_ul_slice(mod_id, sup->ul[i]); + verified = verified && flexran_verify_ul_slice(mod_id, sup->ul[i]); + if (!verified) break; + } + /* verify group-based parameters (e.g. sum percentage should not exceed + * 100%). Can be used to perform admission control */ + verified = verified && flexran_verify_group_ul_slices(mod_id, + sc_update[mod_id]->ul, sc_update[mod_id]->n_ul, sup->ul, sup->n_ul); + + if (verified) { + for (int i = 0; i < sup->n_ul; i++) { + /* if all verifications were successful, get existing slice for ID or + * create new one and overwrite with the update */ + Protocol__FlexUlSlice *uls = get_existing_ul_slice(mod_id, sup->ul[i]->id); + if (!uls) uls = create_new_ul_slice(mod_id, sup->ul[i]->id); + overwrite_slice_config_ul(uls, sup->ul[i]); + } + } else { + LOG_E(FLEXRAN_AGENT, "[%d] UL slice verification failed, refusing application\n", mod_id); + } + } pthread_mutex_unlock(&sc_update_mtx); /* perform the slice configuration reads a couple of times. If there are @@ -1299,11 +1396,6 @@ int apply_new_slice_dl_config(mid_t mod_id, Protocol__FlexDlSlice *oldc, Protoco flexran_set_dl_slice_accounting_policy(mod_id, slice_idx, newc->accounting); changes++; } - if (strcmp(oldc->scheduler_name, newc->scheduler_name) != 0) { - LOG_E(FLEXRAN_AGENT, "[%d][DL slice %d] setting the DL scheduler is not supported, reverting\n", - mod_id, newc->id); - newc->scheduler_name = oldc->scheduler_name; - } return changes; } @@ -1365,11 +1457,6 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting the accounting is not supported\n", mod_id, slice_idx); } - if (strcmp(oldc->scheduler_name, newc->scheduler_name) != 0) { - LOG_E(FLEXRAN_AGENT, "[%d][UL slice %d] setting the UL scheduler is not supported, reverting\n", - mod_id, slice_idx); - newc->scheduler_name = oldc->scheduler_name; - } return changes; } diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c new file mode 100644 index 0000000000..addc8d2e75 --- /dev/null +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c @@ -0,0 +1,340 @@ +/* + * 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.1 (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 flexran_agent_mac_slice_verification.c + * \brief MAC Agent slice verification helper functions + * \author Robert Schmidt + * \date 2018 + * \version 0.1 + */ + + +#include "flexran_agent_mac_slice_verification.h" + +/* overlap check for UL slices, helper type */ +struct sregion_s { + int start; + int length; +}; + +/* forward declaration of locally-used verification functions */ +int flexran_dl_slice_verify_pct(int pct); +int flexran_dl_slice_verify_priority(int prio); +int flexran_dl_slice_verify_position(int pos_low, int pos_high); +int flexran_dl_slice_verify_maxmcs(int maxmcs); +int flexran_ul_slice_verify_pct(int pct); +int flexran_ul_slice_verify_priority(int prio); +int flexran_ul_slice_verify_first_rb(int first_rb); +int flexran_ul_slice_verify_maxmcs(int maxmcs); +int check_ul_slice_overlap(mid_t mod_id, struct sregion_s *sr, int n); + +int flexran_verify_dl_slice(mid_t mod_id, Protocol__FlexDlSlice *dls) +{ + /* check mandatory parameters */ + if (!dls->has_id) { + LOG_E(FLEXRAN_AGENT, "[%d] Incoming DL slice configuration has no ID\n", mod_id); + return 0; + } + + /* verify parameters individualy */ + /* label is enum */ + if (!flexran_dl_slice_verify_pct(dls->percentage)) { + LOG_E(FLEXRAN_AGENT, "[%d] illegal DL slice percentage (%d)\n", mod_id, dls->percentage); + return 0; + } + /* isolation is a protobuf bool */ + if (!flexran_dl_slice_verify_priority(dls->priority)) { + LOG_E(FLEXRAN_AGENT, "[%d] illegal DL slice priority (%d)\n", mod_id, dls->priority); + return 0; + } + if (!flexran_dl_slice_verify_position(dls->position_low, dls->position_high)) { + LOG_E(FLEXRAN_AGENT, "[%d] illegal DL slice position low (%d) and/or high (%d)\n", + mod_id, dls->position_low, dls->position_high); + return 0; + } + if (!flexran_dl_slice_verify_maxmcs(dls->maxmcs)) { + LOG_E(FLEXRAN_AGENT, "[%d] illegal DL slice max mcs %d\n", mod_id, dls->maxmcs); + return 0; + } + if (dls->n_sorting == 0) { + LOG_E(FLEXRAN_AGENT, "[%d] no sorting in DL slice", mod_id); + return 0; + } + if (!dls->sorting) { + LOG_E(FLEXRAN_AGENT, "[%d] no sorting found in DL slice\n", mod_id); + return 0; + } + /* sorting is an enum */ + /* accounting is an enum */ + if (dls->scheduler_name) { + LOG_E(FLEXRAN_AGENT, "[%d] setting the scheduler is not allowed\n", mod_id); + return 0; + } + + return 1; +} + +int flexran_verify_group_dl_slices(mid_t mod_id, Protocol__FlexDlSlice **existing, + int n_ex, Protocol__FlexDlSlice **update, int n_up) +{ + int i, j, n; + int pct, pct_orig; + /* for every update, array points to existing slice, or NULL if update + * creates new slice */ + Protocol__FlexDlSlice *s[n_up]; + for (i = 0; i < n_up; i++) { + s[i] = NULL; + for (j = 0; j < n_ex; j++) { + if (existing[j]->id == update[i]->id) + s[i] = existing[j]; + } + } + + /* check that number of created and number of added slices in total matches + * [1,10] */ + n = n_ex; + for (i = 0; i < n_up; i++) { + /* new slice */ + if (!s[i]) n += 1; + /* slice will be deleted */ + else if (s[i]->percentage == 0) n -= 1; + /* else "only" an update */ + } + + if (n < 1 || n > MAX_NUM_SLICES) { + LOG_E(FLEXRAN_AGENT, "[%d] Illegal number of resulting slices (%d -> %d)\n", mod_id, n_ex, n); + return 0; + } + + /* check that the sum of all slices percentages (including removed/added + * slices) matches [1,100] */ + pct = 0; + for (i = 0; i < n_ex; i++) { + pct += existing[i]->percentage; + } + pct_orig = pct; + for (i = 0; i < n_up; i++) { + /* if there is an existing slice, subtract its percentage and add the + * update's percentage */ + if (s[i]) + pct -= s[i]->percentage; + pct += update[i]->percentage; + } + if (pct < 1 || pct > 100) { + LOG_E(FLEXRAN_AGENT, "[%d] invalid total RB share (%d%% -> %d%%)\n", mod_id, pct_orig, pct); + return 0; + } + + return 1; +} + +int flexran_verify_ul_slice(mid_t mod_id, Protocol__FlexUlSlice *uls) +{ + /* check mandatory parameters */ + if (!uls->has_id) { + LOG_E(FLEXRAN_AGENT, "[%d] Incoming UL slice configuration has no ID\n", mod_id); + return 0; + } + + /* verify parameters individually */ + /* label is enum */ + if (!flexran_ul_slice_verify_pct(uls->percentage)) { + LOG_E(FLEXRAN_AGENT, "[%d] illegal UL slice percentage (%d)\n", mod_id, uls->percentage); + return 0; + } + /* isolation is a protobuf bool */ + if (!flexran_ul_slice_verify_priority(uls->priority)) { + LOG_E(FLEXRAN_AGENT, "[%d] illegal UL slice percentage (%d)\n", mod_id, uls->priority); + return 0; + } + if (!flexran_ul_slice_verify_first_rb(uls->first_rb)) { + LOG_E(FLEXRAN_AGENT, "[%d] illegal UL slice first RB (%d)\n", mod_id, uls->first_rb); + return 0; + } + if (!flexran_ul_slice_verify_maxmcs(uls->maxmcs)) { + LOG_E(FLEXRAN_AGENT, "[%d] illegal UL slice max mcs (%d)\n", mod_id, uls->maxmcs); + return 0; + } + if (uls->n_sorting == 0) { + LOG_E(FLEXRAN_AGENT, "[%d] no sorting in UL slice\n", mod_id); + return 0; + } + if (!uls->sorting) { + LOG_E(FLEXRAN_AGENT, "[%d] no sorting found in UL slice\n", mod_id); + return 0; + } + /* sorting is an enum */ + /* accounting is an enum */ + if (uls->scheduler_name) { + LOG_E(FLEXRAN_AGENT, "[%d] setting the scheduler is not allowed\n", mod_id); + return 0; + } + + return 1; +} + +int flexran_verify_group_ul_slices(mid_t mod_id, Protocol__FlexUlSlice **existing, + int n_ex, Protocol__FlexUlSlice **update, int n_up) +{ + int i, j, n; + int pct, pct_orig; + /* for every update, array "s" points to existing slice, or NULL if update + * creates new slice; array "offs" gives the offset of this slice */ + Protocol__FlexUlSlice *s[n_up]; + int offs[n_up]; + for (i = 0; i < n_up; i++) { + s[i] = NULL; + offs[i] = 0; + for (j = 0; j < n_ex; j++) { + if (existing[j]->id == update[i]->id) { + s[i] = existing[j]; + offs[i] = j; + } + } + } + + /* check that number of created and number of added slices in total matches + * [1,10] */ + n = n_ex; + for (i = 0; i < n_up; i++) { + /* new slice */ + if (!s[i]) n += 1; + /* slice will be deleted */ + else if (s[i]->percentage == 0) n -= 1; + /* else "only" an update */ + } + + if (n < 1 || n > MAX_NUM_SLICES) { + LOG_E(FLEXRAN_AGENT, "[%d] Illegal number of resulting slices (%d -> %d)\n", mod_id, n_ex, n); + return 0; + } + + /* check that the sum of all slices percentages (including removed/added + * slices) matches [1,100] */ + pct = 0; + for (i = 0; i < n_ex; i++) { + pct += existing[i]->percentage; + } + pct_orig = pct; + for (i = 0; i < n_up; i++) { + /* if there is an existing slice, subtract its percentage and add the + * update's percentage */ + if (s[i]) + pct -= s[i]->percentage; + pct += update[i]->percentage; + } + if (pct < 1 || pct > 100) { + LOG_E(FLEXRAN_AGENT, "[%d] invalid total RB share (%d%% -> %d%%)\n", mod_id, pct_orig, pct); + return 0; + } + + /* check that there is no overlap in slices resulting as the combination of + * first_rb and percentage */ + struct sregion_s sregion[n]; + const int N_RB = flexran_get_N_RB_UL(mod_id, 0); /* assume PCC */ + int k = n_ex; + for (i = 0; i < n_ex; i++) { + sregion[i].start = existing[i]->first_rb; + sregion[i].length = existing[i]->percentage * N_RB / 100; + } + for (i = 0; i < n_up; i++) { + ptrdiff_t d = s[i] ? offs[i] : k++; + AssertFatal(d >= 0 && d < k, "illegal pointer offset (%ld, k=%d)\n", d, k); + sregion[d].start = update[i]->first_rb; + sregion[d].length = update[i]->percentage * N_RB / 100; + } + AssertFatal(k == n, "illegal number of slices while calculating overlap\n"); + if (!check_ul_slice_overlap(mod_id, sregion, k)) { + LOG_E(FLEXRAN_AGENT, "[%d] UL slices are overlapping\n", mod_id); + return 0; + } + + return 1; +} + +int flexran_dl_slice_verify_pct(int pct) +{ + return pct >= 0 && pct <= 100; +} + +int flexran_dl_slice_verify_priority(int prio) +{ + return prio >= 0; +} + +int flexran_dl_slice_verify_position(int pos_low, int pos_high) +{ + return pos_low < pos_high && pos_low >= 0 && pos_high <= N_RBG_MAX; +} + +int flexran_dl_slice_verify_maxmcs(int maxmcs) +{ + return maxmcs >= 0 && maxmcs <= 28; +} + +int flexran_ul_slice_verify_pct(int pct) +{ + return pct >= 0 && pct <= 100; +} + +int flexran_ul_slice_verify_priority(int prio) +{ + return prio >= 0; +} + +int flexran_ul_slice_verify_first_rb(int first_rb) +{ + return first_rb >= 0 && first_rb < 100; +} + +int flexran_ul_slice_verify_maxmcs(int maxmcs) +{ + return maxmcs >= 0 && maxmcs <= 20; +} + +int sregion_compare(const void *_a, const void *_b) +{ + const struct sregion_s *a = (const struct sregion_s *)_a; + const struct sregion_s *b = (const struct sregion_s *)_b; + const int res = a->start - b->start; + if (res < 0) return -1; + else if (res == 0) return 0; + else return 1; +} + +int check_ul_slice_overlap(mid_t mod_id, struct sregion_s *sr, int n) +{ + int i; + int overlap, op, u; + const int N_RB = flexran_get_N_RB_UL(mod_id, 0); /* assume PCC */ + qsort(sr, n, sizeof(sr[0]), sregion_compare); + for (i = 0; i < n; i++) { + u = i == n-1 ? N_RB : sr[i+1].start; + AssertFatal(sr[i].start <= u, "unsorted slice list\n"); + overlap = sr[i].start + sr[i].length - u; + if (overlap <= 0) continue; + op = overlap * 100 / sr[i].length; + LOG_W(FLEXRAN_AGENT, "[%d] slice overlap of %d%% detected\n", mod_id, op); + if (op >= 10) /* more than 10% overlap -> refuse */ + return 0; + } + return 1; +} diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.h b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.h new file mode 100644 index 0000000000..a8f4030d36 --- /dev/null +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.h @@ -0,0 +1,37 @@ +/* + * 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.1 (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 flexran_agent_mac_slice_verification.h + * \brief MAC Agent slice verification helper functions + * \author Robert Schmidt + * \date 2018 + * \version 0.1 + */ + +#include "flexran_agent_common_internal.h" +#include "flexran_agent_mac_internal.h" + +int flexran_verify_dl_slice(mid_t mod_id, Protocol__FlexDlSlice *dls); +int flexran_verify_group_dl_slices(mid_t mod_id, Protocol__FlexDlSlice **existing, + int n_ex, Protocol__FlexDlSlice **update, int n_up); +int flexran_verify_ul_slice(mid_t mod_id, Protocol__FlexUlSlice *uls); +int flexran_verify_group_ul_slices(mid_t mod_id, Protocol__FlexUlSlice **existing, + int n_ex, Protocol__FlexUlSlice **update, int n_up); diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index c4c1cd1ca5..7a58cff2e5 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -414,193 +414,7 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in slice_info_t *sli = &RC.mac[module_idP]->slice_info; memset(sli->rballoc_sub, 0, sizeof(sli->rballoc_sub)); - sli->tot_pct_dl = 0; - sli->avg_pct_dl = 1.0 / sli->n_dl; - //sli->slice_counter = sli->n_dl; - for (i = 0; i < sli->n_dl; i++) { - if (sli->dl[i].pct < 0) { - LOG_W(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: invalid percentage %f. resetting to zero", - module_idP, sli->dl[i].id, frameP, subframeP, sli->dl[i].pct); - sli->dl[i].pct = 0; - } - sli->tot_pct_dl += sli->dl[i].pct; - } - - // Check for *intra*slice share activation - if (sli->intraslice_share_active_current != sli->intraslice_share_active) { - if (sli->intraslice_share_active != 1 && sli->intraslice_share_active != 0) { - LOG_W(MAC, - "[eNB %d][DL] frame %d subframe %d: invalid intraslice sharing status (%d), revert to its previous value (%d)\n", - module_idP, frameP, subframeP, sli->intraslice_share_active, sli->intraslice_share_active_current); - sli->intraslice_share_active = sli->intraslice_share_active_current; - } else { - LOG_N(MAC, "[eNB %d][DL] frame %d subframe %d: intraslice sharing status has changed (%x-->%x)\n", - module_idP, frameP, subframeP, sli->intraslice_share_active_current, sli->intraslice_share_active); - sli->intraslice_share_active_current = sli->intraslice_share_active; - } - } - - // Check for *inter*slice share activation - if (sli->interslice_share_active_current != sli->interslice_share_active) { - if (sli->interslice_share_active != 1 && sli->interslice_share_active != 0) { - LOG_W(MAC, - "[eNB %d][DL] frame %d subframe %d: invalid interslice sharing status (%d), revert to its previous value (%d)\n", - module_idP, frameP, subframeP, sli->interslice_share_active, sli->interslice_share_active_current); - sli->interslice_share_active = sli->interslice_share_active_current; - } else { - LOG_N(MAC, "[eNB %d][DL] frame %d subframe %d: interslice sharing status has changed (%x-->%x)\n", - module_idP, frameP, subframeP, sli->interslice_share_active_current, sli->interslice_share_active); - sli->interslice_share_active_current = sli->interslice_share_active; - } - } - - for (i = 0; i < sli->n_dl; i++) { - - // Load any updated functions - if (sli->dl[i].update_sched > 0) { - sli->dl[i].sched_cb = dlsym(NULL, sli->dl[i].sched_name); - sli->dl[i].update_sched = 0; - sli->dl[i].update_sched_current = 0; - LOG_I(MAC, "update dl scheduler (%s) slice index %d ID %d\n", - sli->dl[i].sched_name, i, sli->dl[i].id); - } - - if (sli->tot_pct_dl <= 1.0) { // the new total RB share is within the range - - // check if the number of slices has changed, and log - if (sli->n_dl_current != sli->n_dl) { - if ((sli->n_dl > 0) && (sli->n_dl <= MAX_NUM_SLICES)) { - LOG_I(MAC, "[eNB %d]frame %d subframe %d: number of active DL slices has changed: %d-->%d\n", - module_idP, frameP, subframeP, sli->n_dl_current, sli->n_dl); - sli->n_dl_current = sli->n_dl; - } else { - LOG_W(MAC, "invalid number of DL slices %d, revert to the previous value %d\n", - sli->n_dl, sli->n_dl_current); - sli->n_dl = sli->n_dl_current; - } - } - - // check if the slice rb share has changed, and log the console - if (sli->dl[i].pct_current != sli->dl[i].pct) { // new slice percentage - LOG_I(MAC, - "[eNB %d][SLICE %d][DL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f\n", - module_idP, sli->dl[i].id, frameP, subframeP, - sli->tot_pct_dl_current, sli->tot_pct_dl, - sli->dl[i].pct_current, sli->dl[i].pct); - sli->tot_pct_dl_current = sli->tot_pct_dl; - sli->dl[i].pct_current = sli->dl[i].pct; - } - - // check if the slice max MCS, and log the console - if (sli->dl[i].maxmcs_current != sli->dl[i].maxmcs) { - if ((sli->dl[i].maxmcs >= 0) && (sli->dl[i].maxmcs < 29)) { - LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: slice MAX MCS has changed: %d-->%d\n", - module_idP, sli->dl[i].id, frameP, subframeP, - sli->dl[i].maxmcs_current, sli->dl[i].maxmcs); - sli->dl[i].maxmcs_current = sli->dl[i].maxmcs; - } else { - LOG_W(MAC, "[eNB %d][SLICE %d][DL] invalid slice max mcs %d, revert the previous value %d\n", - module_idP, sli->dl[i].id, sli->dl[i].maxmcs, sli->dl[i].maxmcs_current); - sli->dl[i].maxmcs = sli->dl[i].maxmcs_current; - } - } - - // check if a new scheduler, and log the console - if (sli->dl[i].update_sched_current != sli->dl[i].update_sched) { - LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: DL scheduler for this slice is updated: %s \n", - module_idP, sli->dl[i].id, frameP, subframeP, sli->dl[i].sched_name); - sli->dl[i].update_sched_current = sli->dl[i].update_sched; - } - - } else { - // here we can correct the values, e.g. reduce proportionally - - if (sli->n_dl == sli->n_dl_current) { - LOG_W(MAC, - "[eNB %d][SLICE %d][DL] invalid total RB share (%f->%f), reduce proportionally the RB share by 0.1\n", - module_idP, sli->dl[i].id, sli->tot_pct_dl_current, sli->tot_pct_dl); - if (sli->dl[i].pct >= sli->avg_pct_dl) { - sli->dl[i].pct -= 0.1; - sli->tot_pct_dl -= 0.1; - } - } else { - LOG_W(MAC, - "[eNB %d][SLICE %d][DL] invalid total RB share (%f->%f), revert the number of slice to its previous value (%d->%d)\n", - module_idP, sli->dl[i].id, sli->tot_pct_dl_current, sli->tot_pct_dl, - sli->n_dl, sli->n_dl_current); - sli->n_dl = sli->n_dl_current; - sli->dl[i].pct = sli->dl[i].pct_current; - } - } - - // Check for new slice positions - if (sli->dl[i].pos_low > sli->dl[i].pos_high || - sli->dl[i].pos_low < 0 || - sli->dl[i].pos_high > N_RBG_MAX) { - LOG_W(MAC, "[eNB %d][SLICE %d][DL] invalid slicing position (%d-%d), using previous values (%d-%d)\n", - module_idP, sli->dl[i].id, - sli->dl[i].pos_low, sli->dl[i].pos_high, - sli->dl[i].pos_low_current, sli->dl[i].pos_high_current); - sli->dl[i].pos_low = sli->dl[i].pos_low_current; - sli->dl[i].pos_high = sli->dl[i].pos_high_current; - } else { - if (sli->dl[i].pos_low_current != sli->dl[i].pos_low) { - LOG_N(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: start frequency has changed (%d-->%d)\n", - module_idP, sli->dl[i].id, frameP, subframeP, sli->dl[i].pos_low_current, sli->dl[i].pos_low); - sli->dl[i].pos_low_current = sli->dl[i].pos_low; - } - if (sli->dl[i].pos_high_current != sli->dl[i].pos_high) { - LOG_N(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: end frequency has changed (%d-->%d)\n", - module_idP, sli->dl[i].id, frameP, subframeP, sli->dl[i].pos_high_current, sli->dl[i].pos_high); - sli->dl[i].pos_high_current = sli->dl[i].pos_high; - } - } - - // Check for new sorting policy - if (sli->dl[i].sorting_current != sli->dl[i].sorting) { - LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n", - module_idP, sli->dl[i].id, frameP, subframeP, sli->dl[i].sorting_current, sli->dl[i].sorting); - sli->dl[i].sorting_current = sli->dl[i].sorting; - } - - // Check for new slice isolation - if (sli->dl[i].isol_current != sli->dl[i].isol) { - if (sli->dl[i].isol != 1 && sli->dl[i].isol != 0) { - LOG_W(MAC, - "[eNB %d][SLICE %d][DL] frame %d subframe %d: invalid slice isolation setting (%d), revert to its previous value (%d)\n", - module_idP, sli->dl[i].id, frameP, subframeP, sli->dl[i].isol, sli->dl[i].isol_current); - sli->dl[i].isol = sli->dl[i].isol_current; - } else { - LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: slice isolation setting has changed (%x-->%x)\n", - module_idP, sli->dl[i].id, frameP, subframeP, sli->dl[i].isol_current, sli->dl[i].isol); - sli->dl[i].isol_current = sli->dl[i].isol; - } - } - - // Check for new slice priority - if (sli->dl[i].prio_current != sli->dl[i].prio) { - LOG_I(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: slice priority setting has changed (%d-->%d)\n", - module_idP, sli->dl[i].id, frameP, subframeP, sli->dl[i].prio_current, sli->dl[i].prio); - sli->dl[i].prio_current = sli->dl[i].prio; - } - - // Check for new accounting policy - if (sli->dl[i].accounting_current != sli->dl[i].accounting) { - if (sli->dl[i].accounting > 1 || sli->dl[i].accounting < 0) { - LOG_W(MAC, - "[eNB %d][SLICE %d][DL] frame %d subframe %d: invalid accounting policy (%d), revert to its previous value (%d)\n", - module_idP, sli->dl[i].id, frameP, subframeP, - sli->dl[i].accounting, sli->dl[i].accounting_current); - sli->dl[i].accounting = sli->dl[i].accounting_current; - } else { - LOG_N(MAC, "[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n", - module_idP, sli->dl[i].id, frameP, subframeP, - sli->dl[i].accounting_current, sli->dl[i].accounting); - sli->dl[i].accounting_current = sli->dl[i].accounting; - } - } - // Run each enabled slice-specific schedulers one by one sli->dl[i].sched_cb(module_idP, i, frameP, subframeP, mbsfn_flag/*, dl_info*/); } diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 68cd5de8bd..4618d363f9 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -1038,112 +1038,7 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP, } } - // perform slice-specifc operations - - sli->tot_pct_ul = 0; - sli->avg_pct_ul = 1.0 / sli->n_ul; - for (i = 0; i < sli->n_ul; i++) { - if (sli->ul[i].pct < 0 ){ - LOG_W(MAC, - "[eNB %d][SLICE %d][UL] frame %d subframe %d: invalid percentage %f. resetting to zero", - module_idP, sli->ul[i].id, frameP, subframeP, sli->ul[i].pct); - sli->ul[i].pct = 0; - } - sli->tot_pct_ul += sli->ul[i].pct; - } - - for (i = 0; i < sli->n_ul; i++) { - - // Load any updated functions - if (sli->ul[i].update_sched > 0 ) { - sli->ul[i].sched_cb = dlsym(NULL, sli->ul[i].sched_name); - sli->ul[i].update_sched = 0; - sli->ul[i].update_sched_current = 0; - //sli->ul[i].pct_current = sli->ul[i].pct; - //sli->tot_pct_ul_current += sli->ul[i].pct; - //if (sli->tot_pct_ul_current > 1) - //sli->tot_pct_ul_current = 1; - LOG_I(MAC,"update ul scheduler (%s) slice index %d ID %d\n", - sli->ul[i].sched_name, i, sli->ul[i].id); - } - // the new total RB share is within the range - if (sli->tot_pct_ul <= 1.0){ - - // check if the number of slices has changed, and log - if (sli->n_ul_current != sli->n_ul ){ - if ((sli->n_ul > 0) && (sli->n_ul <= MAX_NUM_SLICES)) { - LOG_I(MAC,"[eNB %d]frame %d subframe %d: number of active UL slices has changed: %d-->%d\n", - module_idP, frameP, subframeP, sli->n_ul_current, sli->n_ul); - sli->n_ul_current = sli->n_ul; - } else { - LOG_W(MAC,"invalid number of UL slices %d, revert to the previous value %d\n", - sli->n_ul, sli->n_ul_current); - sli->n_ul = sli->n_ul_current; - } - } - - // check if the slice rb share has changed, and log the console - if (sli->ul[i].pct_current != sli->ul[i].pct){ - LOG_I(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f\n", - module_idP, sli->ul[i].id, frameP, subframeP, sli->tot_pct_ul_current, - sli->tot_pct_ul, sli->ul[i].pct_current, sli->ul[i].pct); - sli->tot_pct_ul_current = sli->tot_pct_ul; - sli->ul[i].pct_current = sli->ul[i].pct; - } - - // check if the slice max MCS, and log the console - if (sli->ul[i].maxmcs_current != sli->ul[i].maxmcs){ - if ((sli->ul[i].maxmcs >= 0) && (sli->ul[i].maxmcs <= 20)){ - LOG_I(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: slice MAX MCS has changed: %d-->%d\n", - module_idP, sli->ul[i].id, frameP, subframeP, - sli->ul[i].maxmcs_current, sli->ul[i].maxmcs); - sli->ul[i].maxmcs_current = sli->ul[i].maxmcs; - } else { - LOG_W(MAC,"[eNB %d][SLICE %d][UL] invalid slice max mcs %d, revert the previous value %d\n", - module_idP, sli->ul[i].id, sli->ul[i].maxmcs, sli->ul[i].maxmcs_current); - sli->ul[i].maxmcs = sli->ul[i].maxmcs_current; - } - } - - if (sli->ul[i].first_rb_current != sli->ul[i].first_rb){ - if (sli->ul[i].first_rb >= 0){ // FIXME: Max limit is checked in the scheduler - LOG_N(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: slice first rb has changed: %d-->%d\n", - module_idP, sli->ul[i].id, frameP, subframeP, - sli->ul[i].first_rb_current, sli->ul[i].first_rb); - sli->ul[i].first_rb_current = sli->ul[i].first_rb; - } else { - LOG_W(MAC,"[eNB %d][SLICE %d][UL] invalid slice first rb %d, revert the previous value %d\n", - module_idP, sli->ul[i].id, sli->ul[i].first_rb, - sli->ul[i].first_rb_current); - sli->ul[i].first_rb = sli->ul[i].first_rb_current; - } - } - - // check if a new scheduler, and log the console - if (sli->ul[i].update_sched_current != sli->ul[i].update_sched) { - LOG_I(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: UL scheduler for this slice is updated: %s \n", - module_idP, sli->ul[i].id, frameP, subframeP, sli->ul[i].sched_name); - sli->ul[i].update_sched_current = sli->ul[i].update_sched; - } - } else { - if (sli->n_ul == sli->n_ul_current) { - LOG_W(MAC,"[eNB %d][SLICE %d][UL] invalid total RB share (%f->%f), reduce proportionally the RB share by 0.1\n", - module_idP, sli->ul[i].id, sli->tot_pct_ul_current, sli->tot_pct_ul); - if (sli->ul[i].pct > sli->avg_pct_ul) { - sli->ul[i].pct -= 0.1; - sli->tot_pct_ul -= 0.1; - } - } else { - // here we can correct the values, e.g. reduce proportionally - LOG_W(MAC,"[eNB %d][SLICE %d][UL] invalid total RB share (%f->%f), revert the number of slice to its previous value (%d->%d)\n", - module_idP, sli->ul[i].id, sli->tot_pct_ul_current, - sli->tot_pct_ul, sli->n_ul, sli->n_ul_current); - sli->n_ul = sli->n_ul_current; - sli->ul[i].pct = sli->ul[i].pct_current; - } - } - // Run each enabled slice-specific schedulers one by one sli->ul[i].sched_cb(module_idP, i, frameP, subframeP, sched_subframe, first_rb); } diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h index 5507f643f0..6148b63363 100644 --- a/openair2/LAYER2/MAC/mac.h +++ b/openair2/LAYER2/MAC/mac.h @@ -1151,38 +1151,29 @@ typedef void (*slice_scheduler_dl)(module_id_t mod_id, typedef struct { slice_id_t id; - /// RB share for each slice for past and current time + /// RB share for each slice float pct; - float pct_current; - /// whether this slice is isolated from the others for past and current time + /// whether this slice is isolated from the others int isol; - int isol_current; int prio; - int prio_current; /// Frequency ranges for slice positioning int pos_low; int pos_high; - int pos_low_current; - int pos_high_current; - // max mcs for each slice for past and current time + // max mcs for each slice int maxmcs; - int maxmcs_current; /// criteria for sorting policies of the slices uint32_t sorting; - uint32_t sorting_current; /// Accounting policy (just greedy(1) or fair(0) setting for now) int accounting; - int accounting_current; /// Whether the scheduler callback should be updated int update_sched; - int update_sched_current; /// name of available scheduler char *sched_name; @@ -1202,25 +1193,20 @@ typedef void (*slice_scheduler_ul)(module_id_t mod_id, typedef struct { slice_id_t id; - /// RB share for each slice for past and current time + /// RB share for each slice float pct; - float pct_current; - // MAX MCS for each slice for past and current time + // MAX MCS for each slice int maxmcs; - int maxmcs_current; /// criteria for sorting policies of the slices uint32_t sorting; - uint32_t sorting_current; /// starting RB (RB offset) of UL scheduling int first_rb; - int first_rb_current; /// Slice scheduler callback update needed int update_sched; - int update_sched_current; /// name of available scheduler char *sched_name; @@ -1238,28 +1224,16 @@ typedef struct { /// indicates whether remaining RBs after first intra-slice allocation will /// be allocated to UEs of the same slice int intraslice_share_active; - int intraslice_share_active_current; /// indicates whether remaining RBs after slice allocation will be /// allocated to UEs of another slice. Isolated slices will be ignored int interslice_share_active; - int interslice_share_active_current; - /// number of active slices for past and current time in DL + /// number of active DL slices int n_dl; - int n_dl_current; - /// RB share stats for DL - float tot_pct_dl; - float tot_pct_dl_current; - float avg_pct_dl; slice_sched_conf_dl_t dl[MAX_NUM_SLICES]; - /// number of active slices for past and current time in UL + /// number of active UL slices int n_ul; - int n_ul_current; - /// RB share stats for UL - float tot_pct_ul; - float tot_pct_ul_current; - float avg_pct_ul; slice_sched_conf_ul_t ul[MAX_NUM_SLICES]; pre_processor_results_t pre_processor_results[MAX_NUM_SLICES]; diff --git a/openair2/LAYER2/MAC/main.c b/openair2/LAYER2/MAC/main.c index 4c3e22acb7..e34e0e1dd0 100644 --- a/openair2/LAYER2/MAC/main.c +++ b/openair2/LAYER2/MAC/main.c @@ -138,44 +138,24 @@ void mac_top_init_eNB(void) sli = &mac->slice_info; sli->intraslice_share_active = 1; - sli->intraslice_share_active_current = 1; sli->interslice_share_active = 1; - sli->interslice_share_active_current = 1; sli->n_dl = 1; - sli->n_dl_current = 1; - sli->tot_pct_dl = 1; - sli->tot_pct_dl_current = 1; - sli->avg_pct_dl = 0.25; memset(sli->dl, 0, sizeof(slice_sched_conf_dl_t) * MAX_NUM_SLICES); sli->dl[0].pct = 1.0; - sli->dl[0].pct_current = 1.0; sli->dl[0].prio = 10; - sli->dl[0].prio_current = 10; sli->dl[0].pos_high = N_RBG_MAX; - sli->dl[0].pos_high_current = N_RBG_MAX; sli->dl[0].maxmcs = 28; - sli->dl[0].maxmcs_current = 28; sli->dl[0].sorting = 0x012345; - sli->dl[0].sorting_current = 0x012345; sli->dl[0].update_sched = 1; - sli->dl[0].update_sched_current = 1; sli->dl[0].sched_name = "schedule_ue_spec"; sli->n_ul = 1; - sli->n_ul_current = 1; - sli->tot_pct_ul = 1; - sli->tot_pct_ul_current = 1; - sli->avg_pct_ul = 0.25; memset(sli->ul, 0, sizeof(slice_sched_conf_ul_t) * MAX_NUM_SLICES); sli->ul[0].pct = 1.0; - sli->ul[0].pct_current = 1.0; sli->ul[0].maxmcs = 20; - sli->ul[0].maxmcs_current = 20; sli->ul[0].sorting = 0x0123; - sli->ul[0].sorting_current = 0x0123; sli->ul[0].update_sched = 1; - sli->ul[0].update_sched_current = 1; sli->ul[0].sched_name = "schedule_ulsch_rnti"; } From 0778481f7577a64f20780821b0f1b3ba860e949d Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sat, 19 May 2018 18:24:25 +0200 Subject: [PATCH 114/379] FlexRAN RAN API: extend scheduler set&get functions - setter & getter have been renamed - setter sets scheduler name and links to the corresponding function - it also returns whether it succeeded (whether the scheduler callback is non-null) - it performs a strdup on the scheduler name - the remove function free the scheduler function name --- openair2/ENB_APP/flexran_agent_ran_api.c | 25 ++++++++++++++---------- openair2/ENB_APP/flexran_agent_ran_api.h | 8 ++++---- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/openair2/ENB_APP/flexran_agent_ran_api.c b/openair2/ENB_APP/flexran_agent_ran_api.c index bea680c48c..4ab5858dda 100644 --- a/openair2/ENB_APP/flexran_agent_ran_api.c +++ b/openair2/ENB_APP/flexran_agent_ran_api.c @@ -26,6 +26,7 @@ * \version 0.1 */ +#include #include "flexran_agent_ran_api.h" static inline int phy_is_present(mid_t mod_id, uint8_t cc_id) @@ -1483,6 +1484,7 @@ int flexran_remove_dl_slice(mid_t mod_id, int slice_idx) slice_info_t *sli = &RC.mac[mod_id]->slice_info; if (sli->n_dl <= 1) return -1; + if (sli->dl[slice_idx].sched_name) free(sli->dl[slice_idx].sched_name); --sli->n_dl; /* move last element to the position of the removed one */ if (slice_idx != sli->n_dl) @@ -1701,16 +1703,17 @@ void flexran_set_dl_slice_accounting_policy(mid_t mod_id, int slice_idx, Protoco } } -char *flexran_get_dl_slice_scheduler_name(mid_t mod_id, int slice_idx) +char *flexran_get_dl_slice_scheduler(mid_t mod_id, int slice_idx) { if (!mac_is_present(mod_id)) return NULL; return RC.mac[mod_id]->slice_info.dl[slice_idx].sched_name; } -void flexran_set_dl_slice_scheduler_name(mid_t mod_id, int slice_idx, char *name) +int flexran_set_dl_slice_scheduler(mid_t mod_id, int slice_idx, char *name) { - if (!mac_is_present(mod_id)) return; - RC.mac[mod_id]->slice_info.dl[slice_idx].sched_name = name; - RC.mac[mod_id]->slice_info.dl[slice_idx].update_sched = 1; + if (!mac_is_present(mod_id)) return 0; + RC.mac[mod_id]->slice_info.dl[slice_idx].sched_name = strdup(name); + RC.mac[mod_id]->slice_info.dl[slice_idx].sched_cb = dlsym(NULL, name); + return RC.mac[mod_id]->slice_info.dl[slice_idx].sched_cb != NULL; } int flexran_create_ul_slice(mid_t mod_id, slice_id_t slice_id, int slice_default_values_idx) @@ -1760,6 +1763,7 @@ int flexran_remove_ul_slice(mid_t mod_id, int slice_idx) slice_info_t *sli = &RC.mac[mod_id]->slice_info; if (sli->n_ul <= 1) return -1; + if (sli->dl[slice_idx].sched_name) free(sli->dl[slice_idx].sched_name); --sli->n_ul; /* move last element to the position of the removed one */ if (slice_idx != sli->n_ul) @@ -1832,14 +1836,15 @@ void flexran_set_ul_slice_maxmcs(mid_t mod_id, int slice_idx, int maxmcs) RC.mac[mod_id]->slice_info.ul[slice_idx].maxmcs = maxmcs; } -char *flexran_get_ul_slice_scheduler_name(mid_t mod_id, int slice_idx) +char *flexran_get_ul_slice_scheduler(mid_t mod_id, int slice_idx) { if (!mac_is_present(mod_id)) return NULL; return RC.mac[mod_id]->slice_info.ul[slice_idx].sched_name; } -void flexran_set_ul_slice_scheduler_name(mid_t mod_id, int slice_idx, char *name) +int flexran_set_ul_slice_scheduler(mid_t mod_id, int slice_idx, char *name) { - if (!mac_is_present(mod_id)) return; - RC.mac[mod_id]->slice_info.ul[slice_idx].sched_name = name; - RC.mac[mod_id]->slice_info.ul[slice_idx].update_sched = 1; + if (!mac_is_present(mod_id)) return 0; + RC.mac[mod_id]->slice_info.ul[slice_idx].sched_name = strdup(name); + RC.mac[mod_id]->slice_info.ul[slice_idx].sched_cb = dlsym(NULL, name); + return RC.mac[mod_id]->slice_info.ul[slice_idx].sched_cb != NULL; } diff --git a/openair2/ENB_APP/flexran_agent_ran_api.h b/openair2/ENB_APP/flexran_agent_ran_api.h index 18cd353f71..a959c4fd50 100644 --- a/openair2/ENB_APP/flexran_agent_ran_api.h +++ b/openair2/ENB_APP/flexran_agent_ran_api.h @@ -589,9 +589,9 @@ Protocol__FlexDlAccountingPolicy flexran_get_dl_slice_accounting_policy(mid_t mo void flexran_set_dl_slice_accounting_policy(mid_t mod_id, int slice_idx, Protocol__FlexDlAccountingPolicy accounting); /* Get the scheduler name for a slice in DL */ -char *flexran_get_dl_slice_scheduler_name(mid_t mod_id, int slice_idx); +char *flexran_get_dl_slice_scheduler(mid_t mod_id, int slice_idx); /* Set the scheduler name for a slice in DL */ -void flexran_set_dl_slice_scheduler_name(mid_t mod_id, int slice_idx, char *name); +int flexran_set_dl_slice_scheduler(mid_t mod_id, int slice_idx, char *name); /* Get the number of slices in UL */ int flexran_get_num_ul_slices(mid_t mod_id); @@ -653,6 +653,6 @@ void flexran_set_ul_slice_maxmcs(mid_t mod_id, int slice_idx, int maxmcs); /*void flexran_get_ul_slice_accounting_policy(mid_t mod_id, int slice_idx, Protocol__UlAccountingPolicy accountin);*/ /* Get the scheduler name for a slice in UL */ -char *flexran_get_ul_slice_scheduler_name(mid_t mod_id, int slice_idx); +char *flexran_get_ul_slice_scheduler(mid_t mod_id, int slice_idx); /* Set the scheduler name for a slice in UL */ -void flexran_set_ul_slice_scheduler_name(mid_t mod_id, int slice_idx, char *name); +int flexran_set_ul_slice_scheduler(mid_t mod_id, int slice_idx, char *name); From 766e8a5bbe3eeb0e49814bf95d3025ce69058ff3 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sat, 19 May 2018 18:27:20 +0200 Subject: [PATCH 115/379] link to scheduler function in mac init fct --- openair2/LAYER2/MAC/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openair2/LAYER2/MAC/main.c b/openair2/LAYER2/MAC/main.c index e34e0e1dd0..fcbcf60567 100644 --- a/openair2/LAYER2/MAC/main.c +++ b/openair2/LAYER2/MAC/main.c @@ -29,6 +29,7 @@ */ +#include #include "mac.h" #include "mac_proto.h" #include "mac_extern.h" @@ -149,6 +150,8 @@ void mac_top_init_eNB(void) sli->dl[0].sorting = 0x012345; sli->dl[0].update_sched = 1; sli->dl[0].sched_name = "schedule_ue_spec"; + sli->dl[0].sched_cb = dlsym(NULL, sli->dl[0].sched_name); + AssertFatal(sli->dl[0].sched_cb, "DLSCH scheduler callback is NULL\n"); sli->n_ul = 1; memset(sli->ul, 0, sizeof(slice_sched_conf_ul_t) * MAX_NUM_SLICES); @@ -157,6 +160,8 @@ void mac_top_init_eNB(void) sli->ul[0].sorting = 0x0123; sli->ul[0].update_sched = 1; sli->ul[0].sched_name = "schedule_ulsch_rnti"; + sli->ul[0].sched_cb = dlsym(NULL, sli->ul[0].sched_name); + AssertFatal(sli->ul[0].sched_cb, "ULSCH scheduler callback is NULL\n"); } } From 328a464e375506e13f0d98b10ba326ebc6355fbe Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sat, 19 May 2018 18:27:50 +0200 Subject: [PATCH 116/379] remove update_sched slice param variables - whether a scheduler callback has to be changed is now handled by the agent --- openair2/LAYER2/MAC/mac.h | 6 ------ openair2/LAYER2/MAC/main.c | 2 -- 2 files changed, 8 deletions(-) diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h index 6148b63363..ed6171dceb 100644 --- a/openair2/LAYER2/MAC/mac.h +++ b/openair2/LAYER2/MAC/mac.h @@ -1172,9 +1172,6 @@ typedef struct { /// Accounting policy (just greedy(1) or fair(0) setting for now) int accounting; - /// Whether the scheduler callback should be updated - int update_sched; - /// name of available scheduler char *sched_name; @@ -1205,9 +1202,6 @@ typedef struct { /// starting RB (RB offset) of UL scheduling int first_rb; - /// Slice scheduler callback update needed - int update_sched; - /// name of available scheduler char *sched_name; diff --git a/openair2/LAYER2/MAC/main.c b/openair2/LAYER2/MAC/main.c index fcbcf60567..8d3d88aaaa 100644 --- a/openair2/LAYER2/MAC/main.c +++ b/openair2/LAYER2/MAC/main.c @@ -148,7 +148,6 @@ void mac_top_init_eNB(void) sli->dl[0].pos_high = N_RBG_MAX; sli->dl[0].maxmcs = 28; sli->dl[0].sorting = 0x012345; - sli->dl[0].update_sched = 1; sli->dl[0].sched_name = "schedule_ue_spec"; sli->dl[0].sched_cb = dlsym(NULL, sli->dl[0].sched_name); AssertFatal(sli->dl[0].sched_cb, "DLSCH scheduler callback is NULL\n"); @@ -158,7 +157,6 @@ void mac_top_init_eNB(void) sli->ul[0].pct = 1.0; sli->ul[0].maxmcs = 20; sli->ul[0].sorting = 0x0123; - sli->ul[0].update_sched = 1; sli->ul[0].sched_name = "schedule_ulsch_rnti"; sli->ul[0].sched_cb = dlsym(NULL, sli->ul[0].sched_name); AssertFatal(sli->ul[0].sched_cb, "ULSCH scheduler callback is NULL\n"); From d8c2943f60488b08bf6d91156f5c6509ff490bc2 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sat, 19 May 2018 18:28:48 +0200 Subject: [PATCH 117/379] FlexRAN RAN API: slice creation does not set default vals --- openair2/ENB_APP/flexran_agent_ran_api.c | 46 ++---------------------- openair2/ENB_APP/flexran_agent_ran_api.h | 8 ++--- 2 files changed, 6 insertions(+), 48 deletions(-) diff --git a/openair2/ENB_APP/flexran_agent_ran_api.c b/openair2/ENB_APP/flexran_agent_ran_api.c index 4ab5858dda..dc74652874 100644 --- a/openair2/ENB_APP/flexran_agent_ran_api.c +++ b/openair2/ENB_APP/flexran_agent_ran_api.c @@ -1435,35 +1435,13 @@ int flexran_dl_slice_exists(mid_t mod_id, int slice_idx) return slice_idx >= 0 && slice_idx < RC.mac[mod_id]->slice_info.n_dl; } -int flexran_create_dl_slice(mid_t mod_id, slice_id_t slice_id, int slice_default_values_idx) +int flexran_create_dl_slice(mid_t mod_id, slice_id_t slice_id) { if (!mac_is_present(mod_id)) return -1; - if (!flexran_dl_slice_exists(mod_id, slice_default_values_idx)) return -1; int newidx = RC.mac[mod_id]->slice_info.n_dl; if (newidx >= MAX_NUM_SLICES) return -1; - ++RC.mac[mod_id]->slice_info.n_dl; flexran_set_dl_slice_id(mod_id, newidx, slice_id); - flexran_set_dl_slice_percentage(mod_id, newidx, - flexran_get_dl_slice_percentage(mod_id, slice_default_values_idx)); - flexran_set_dl_slice_isolation(mod_id, newidx, - flexran_get_dl_slice_isolation(mod_id, slice_default_values_idx)); - flexran_set_dl_slice_priority(mod_id, newidx, - flexran_get_dl_slice_priority(mod_id, slice_default_values_idx)); - flexran_set_dl_slice_position_low(mod_id, newidx, - flexran_get_dl_slice_position_low(mod_id, slice_default_values_idx)); - flexran_set_dl_slice_position_high(mod_id, newidx, - flexran_get_dl_slice_position_high(mod_id, slice_default_values_idx)); - flexran_set_dl_slice_maxmcs(mod_id, newidx, - flexran_get_dl_slice_maxmcs(mod_id, slice_default_values_idx)); - Protocol__FlexDlSorting *sorting = NULL; - int n = flexran_get_dl_slice_sorting(mod_id, slice_default_values_idx, &sorting); - flexran_set_dl_slice_sorting(mod_id, newidx, sorting, n); - free(sorting); - flexran_set_dl_slice_accounting_policy(mod_id, newidx, - flexran_get_dl_slice_accounting_policy(mod_id, slice_default_values_idx)); - flexran_set_dl_slice_scheduler_name(mod_id, newidx, - flexran_get_dl_slice_scheduler_name(mod_id, slice_default_values_idx)); return newidx; } @@ -1716,33 +1694,13 @@ int flexran_set_dl_slice_scheduler(mid_t mod_id, int slice_idx, char *name) return RC.mac[mod_id]->slice_info.dl[slice_idx].sched_cb != NULL; } -int flexran_create_ul_slice(mid_t mod_id, slice_id_t slice_id, int slice_default_values_idx) +int flexran_create_ul_slice(mid_t mod_id, slice_id_t slice_id) { if (!mac_is_present(mod_id)) return -1; - if (!flexran_ul_slice_exists(mod_id, slice_default_values_idx)) return -1; int newidx = RC.mac[mod_id]->slice_info.n_ul; if (newidx >= MAX_NUM_SLICES) return -1; - ++RC.mac[mod_id]->slice_info.n_ul; flexran_set_ul_slice_id(mod_id, newidx, slice_id); - flexran_set_ul_slice_percentage(mod_id, newidx, - flexran_get_ul_slice_percentage(mod_id, slice_default_values_idx)); - /*flexran_set_ul_slice_isolation(mod_id, newidx, - flexran_get_ul_slice_isolation(mod_id, slice_default_values_idx)); - flexran_set_ul_slice_priority(mod_id, newidx, - flexran_get_ul_slice_priority(mod_id, slice_default_values_idx));*/ - flexran_set_ul_slice_first_rb(mod_id, newidx, - flexran_get_ul_slice_first_rb(mod_id, slice_default_values_idx)); - flexran_set_ul_slice_maxmcs(mod_id, newidx, - flexran_get_ul_slice_maxmcs(mod_id, slice_default_values_idx)); - /*Protocol__FlexUlSorting *sorting = NULL; - int n = flexran_get_ul_slice_sorting(mod_id, slice_default_values_idx, &sorting); - flexran_set_ul_slice_sorting(mod_id, newidx, sorting, n); - free(sorting);*/ - /*flexran_set_ul_slice_accounting_policy(mod_id, newidx, - flexran_get_ul_slice_accounting_policy(mod_id, slice_default_values_idx));*/ - flexran_set_ul_slice_scheduler_name(mod_id, newidx, - flexran_get_ul_slice_scheduler_name(mod_id, slice_default_values_idx)); return newidx; } diff --git a/openair2/ENB_APP/flexran_agent_ran_api.h b/openair2/ENB_APP/flexran_agent_ran_api.h index a959c4fd50..d64d5806e6 100644 --- a/openair2/ENB_APP/flexran_agent_ran_api.h +++ b/openair2/ENB_APP/flexran_agent_ran_api.h @@ -535,8 +535,8 @@ int flexran_get_num_dl_slices(mid_t mod_id); /* Query slice existence in DL. Return is boolean value */ int flexran_dl_slice_exists(mid_t mod_id, int slice_idx); -/* Create slice in DL with values from another slice, returns the new slice index */ -int flexran_create_dl_slice(mid_t mod_id, slice_id_t slice_id, int slice_default_values_idx); +/* Create slice in DL, returns the new slice index */ +int flexran_create_dl_slice(mid_t mod_id, slice_id_t slice_id); /* Finds slice in DL with given slice_id and returns slice index */ int flexran_find_dl_slice(mid_t mod_id, slice_id_t slice_id); /* Remove slice in DL, returns new number of slices or -1 on error */ @@ -599,8 +599,8 @@ int flexran_get_num_ul_slices(mid_t mod_id); /* Query slice existence in UL. Return is boolean value */ int flexran_ul_slice_exists(mid_t mod_id, int slice_idx); -/* Create slice in UL with values from another slice, returns the new slice index */ -int flexran_create_ul_slice(mid_t mod_id, slice_id_t slice_id, int slice_default_values_idx); +/* Create slice in UL, returns the new slice index */ +int flexran_create_ul_slice(mid_t mod_id, slice_id_t slice_id); /* Finds slice in UL with given slice_id and returns slice index */ int flexran_find_ul_slice(mid_t mod_id, slice_id_t slice_id); /* Remove slice in UL */ From 8804319322372b0b1d33a4e05aaa3ef8b3ac5ffe Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sun, 20 May 2018 17:16:38 +0200 Subject: [PATCH 118/379] FlexRAN MAC: before verifying slice params, set default vals - in order to facilitate the steps as verification and parameter setting, slices are "filled up" with default values: * if it is an update, with the values of the concerned slice * if it is a new one, with the parameters of slice 0 - because of this, it can be assumed that all slices have all parameters --- .../MAC/flexran_agent_mac_internal.c | 110 +++++++++++------- 1 file changed, 65 insertions(+), 45 deletions(-) diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c index d75712d430..a1a905d4a5 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c @@ -1012,37 +1012,37 @@ void flexran_agent_read_slice_ul_config(mid_t mod_id, int slice_idx, Protocol__F void overwrite_slice_config_dl(Protocol__FlexDlSlice *exist, Protocol__FlexDlSlice *update) { - if (update->has_label && update->label != exist->label) { + if (update->label != exist->label) { LOG_I(FLEXRAN_AGENT, "[DL slice %d] update label: %d -> %d\n", update->id, exist->label, update->label); exist->label = update->label; } - if (update->has_percentage && update->percentage != exist->percentage) { + if (update->percentage != exist->percentage) { LOG_I(FLEXRAN_AGENT, "[DL slice %d] update percentage: %d -> %d\n", update->id, exist->percentage, update->percentage); exist->percentage = update->percentage; } - if (update->has_isolation && update->isolation != exist->isolation) { + if (update->isolation != exist->isolation) { LOG_I(FLEXRAN_AGENT, "[DL slice %d] update isolation: %d -> %d\n", update->id, exist->isolation, update->isolation); exist->isolation = update->isolation; } - if (update->has_priority && update->priority != exist->priority) { + if (update->priority != exist->priority) { LOG_I(FLEXRAN_AGENT, "[DL slice %d] update priority: %d -> %d\n", update->id, exist->priority, update->priority); exist->priority = update->priority; } - if (update->has_position_low && update->position_low != exist->position_low) { + if (update->position_low != exist->position_low) { LOG_I(FLEXRAN_AGENT, "[DL slice %d] update position_low: %d -> %d\n", update->id, exist->position_low, update->position_low); exist->position_low = update->position_low; } - if (update->has_position_high && update->position_high != exist->position_high) { + if (update->position_high != exist->position_high) { LOG_I(FLEXRAN_AGENT, "[DL slice %d] update position_high: %d -> %d\n", update->id, exist->position_high, update->position_high); exist->position_high = update->position_high; } - if (update->has_maxmcs && update->maxmcs != exist->maxmcs) { + if (update->maxmcs != exist->maxmcs) { LOG_I(FLEXRAN_AGENT, "[DL slice %d] update maxmcs: %d -> %d\n", update->id, exist->maxmcs, update->maxmcs); exist->maxmcs = update->maxmcs; @@ -1064,7 +1064,7 @@ void overwrite_slice_config_dl(Protocol__FlexDlSlice *exist, Protocol__FlexDlSli for (int i = 0; i < n; i++) exist->sorting[i] = update->sorting[i]; } - if (update->has_accounting && update->accounting != exist->accounting) { + if (update->accounting != exist->accounting) { LOG_I(FLEXRAN_AGENT, "[DL slice %d] update accounting: %d -> %d\n", update->id, exist->accounting, update->accounting); exist->accounting = update->accounting; @@ -1078,37 +1078,37 @@ void overwrite_slice_config_dl(Protocol__FlexDlSlice *exist, Protocol__FlexDlSli void overwrite_slice_config_ul(Protocol__FlexUlSlice *exist, Protocol__FlexUlSlice *update) { - if (update->has_label && update->label != exist->label) { + if (update->label != exist->label) { LOG_I(FLEXRAN_AGENT, "[UL slice %d] update label: %d -> %d\n", update->id, exist->label, update->label); exist->label = update->label; } - if (update->has_percentage && update->percentage != exist->percentage) { + if (update->percentage != exist->percentage) { LOG_I(FLEXRAN_AGENT, "[UL slice %d] update percentage: %d -> %d\n", update->id, exist->percentage, update->percentage); exist->percentage = update->percentage; } - if (update->has_isolation && update->isolation != exist->isolation) { + if (update->isolation != exist->isolation) { LOG_I(FLEXRAN_AGENT, "[UL slice %d] update isolation: %d -> %d\n", update->id, exist->isolation, update->isolation); exist->isolation = update->isolation; } - if (update->has_priority && update->priority != exist->priority) { + if (update->priority != exist->priority) { LOG_I(FLEXRAN_AGENT, "[UL slice %d] update priority: %d -> %d\n", update->id, exist->priority, update->priority); exist->priority = update->priority; } - if (update->has_first_rb && update->first_rb != exist->first_rb) { + if (update->first_rb != exist->first_rb) { LOG_I(FLEXRAN_AGENT, "[UL slice %d] update first_rb: %d -> %d\n", update->id, exist->first_rb, update->first_rb); exist->first_rb = update ->first_rb; } - /*if (update->has_length_rb && update->lenght_rb != exist->lenght_rb) { + /*if (update->lenght_rb != exist->lenght_rb) { LOG_I(FLEXRAN_AGENT, "[UL slice %d] update lenght_rb: %d -> %d\n", update->id, exist->lenght_rb, update->lenght_rb); exist->lenght_rb = update->lenght_rb; }*/ - if (update->has_maxmcs && update->maxmcs != exist->maxmcs) { + if (update->maxmcs != exist->maxmcs) { LOG_I(FLEXRAN_AGENT, "[UL slice %d] update maxmcs: %d -> %d\n", update->id, exist->maxmcs, update->maxmcs); exist->maxmcs = update->maxmcs; @@ -1130,7 +1130,7 @@ void overwrite_slice_config_ul(Protocol__FlexUlSlice *exist, Protocol__FlexUlSli for (i = 0; i < n; i++) exist->sorting[i] = update->sorting[i]; } - if (update->has_accounting && update->accounting != exist->accounting) { + if (update->accounting != exist->accounting) { LOG_I(FLEXRAN_AGENT, "[UL slice %d] update accounting: %d -> %d\n", update->id, exist->accounting, update->accounting); exist->accounting = update->accounting; @@ -1142,49 +1142,52 @@ void overwrite_slice_config_ul(Protocol__FlexUlSlice *exist, Protocol__FlexUlSli } } -void fill_dl_slice(mid_t mod_id, Protocol__FlexDlSlice *s) +void fill_dl_slice(mid_t mod_id, Protocol__FlexDlSlice *s, Protocol__FlexDlSlice *from) { + /* function fills slice with information from another slice or with default + * values (currently slice 0) if from is NULL */ /* TODO fill the slice depending on the chosen label */ - /* for now, we fill it up with the information from slice 0 */ - /* assume there is an ID (will be checked later) */ if (!s->has_label) { s->has_label = 1; - s->label = sc_update[mod_id]->dl[0]->label; + s->label = from ? from->label : sc_update[mod_id]->dl[0]->label; } if (!s->has_percentage) { s->has_percentage = 1; - s->percentage = sc_update[mod_id]->dl[0]->percentage; + s->percentage = from ? from->percentage : sc_update[mod_id]->dl[0]->percentage; } if (!s->has_isolation) { s->has_isolation = 1; - s->isolation = sc_update[mod_id]->dl[0]->isolation; + s->isolation = from ? from->isolation : sc_update[mod_id]->dl[0]->isolation; } if (!s->has_priority) { s->has_priority = 1; - s->priority = sc_update[mod_id]->dl[0]->priority; + s->priority = from ? from->priority : sc_update[mod_id]->dl[0]->priority; } if (!s->has_position_low) { s->has_position_low = 1; - s->position_low = sc_update[mod_id]->dl[0]->position_low; + s->position_low = from ? from->position_low : sc_update[mod_id]->dl[0]->position_low; } if (!s->has_position_high) { s->has_position_high = 1; - s->position_high = sc_update[mod_id]->dl[0]->position_high; + s->position_high = from ? from->position_high : sc_update[mod_id]->dl[0]->position_high; } if (!s->has_maxmcs) { s->has_maxmcs = 1; - s->maxmcs = sc_update[mod_id]->dl[0]->maxmcs; + s->maxmcs = from ? from->maxmcs : sc_update[mod_id]->dl[0]->maxmcs; } if (s->n_sorting == 0) { - s->n_sorting = sc_update[0]->dl[0]->n_sorting; + s->n_sorting = from ? from->n_sorting : sc_update[mod_id]->dl[0]->n_sorting; /* TODO Dangerous? */ - s->sorting = sc_update[0]->dl[0]->sorting; + s->sorting = from ? from->sorting : sc_update[mod_id]->dl[0]->sorting; } if (!s->has_accounting) { /* TODO Dangerous? */ - s->accounting = sc_update[0]->dl[0]->accounting; + s->accounting = from ? from->accounting : sc_update[mod_id]->dl[0]->accounting; + } + if (!s->scheduler_name) { + /* TODO Dangerous? */ + s->scheduler_name = from ? from->scheduler_name : sc_update[mod_id]->dl[0]->scheduler_name; } - /* scheduler name not set, cannot be changed for the moment */ } Protocol__FlexDlSlice *get_existing_dl_slice(mid_t mod_id, int id) @@ -1210,45 +1213,48 @@ Protocol__FlexDlSlice *create_new_dl_slice(mid_t mod_id, int id) return to; } -void fill_ul_slice(mid_t mod_id, Protocol__FlexUlSlice *s) +void fill_ul_slice(mid_t mod_id, Protocol__FlexUlSlice *s, Protocol__FlexUlSlice *from) { + /* function fills slice with information from another slice or with default + * values (currently slice 0) if from is NULL */ /* TODO fill the slice depending on the chosen label */ - /* for now, we fill it up with the information from slice 0 */ - /* assume there is an ID (will be checked later) */ if (!s->has_label) { s->has_label = 1; - s->label = sc_update[mod_id]->ul[0]->label; + s->label = from ? from->label : sc_update[mod_id]->ul[0]->label; } if (!s->has_percentage) { s->has_percentage = 1; - s->percentage = sc_update[mod_id]->ul[0]->percentage; + s->percentage = from ? from->percentage : sc_update[mod_id]->ul[0]->percentage; } if (!s->has_isolation) { s->has_isolation = 1; - s->isolation = sc_update[mod_id]->ul[0]->isolation; + s->isolation = from ? from->isolation : sc_update[mod_id]->ul[0]->isolation; } if (!s->has_priority) { s->has_priority = 1; - s->priority = sc_update[mod_id]->ul[0]->priority; + s->priority = from ? from->priority : sc_update[mod_id]->ul[0]->priority; } if (!s->has_first_rb) { s->has_first_rb = 1; - s->first_rb = sc_update[mod_id]->ul[0]->first_rb; + s->first_rb = from ? from->first_rb : sc_update[mod_id]->ul[0]->first_rb; } if (!s->has_maxmcs) { s->has_maxmcs = 1; - s->maxmcs = sc_update[mod_id]->ul[0]->maxmcs; + s->maxmcs = from ? from->maxmcs : sc_update[mod_id]->ul[0]->maxmcs; } if (s->n_sorting == 0) { - s->n_sorting = sc_update[0]->ul[0]->n_sorting; + s->n_sorting = from ? from->n_sorting : sc_update[0]->ul[0]->n_sorting; /* TODO Dangerous? */ - s->sorting = sc_update[0]->ul[0]->sorting; + s->sorting = from ? from->sorting : sc_update[0]->ul[0]->sorting; } if (!s->has_accounting) { /* TODO Dangerous? */ - s->accounting = sc_update[0]->ul[0]->accounting; + s->accounting = from ? from->accounting : sc_update[0]->ul[0]->accounting; + } + if (!s->scheduler_name) { + /* TODO Dangerous? */ + s->scheduler_name = from ? from->scheduler_name : sc_update[mod_id]->ul[0]->scheduler_name; } - /* scheduler name not set, cannot be changed for the moment */ } Protocol__FlexUlSlice *get_existing_ul_slice(mid_t mod_id, int id) @@ -1288,7 +1294,14 @@ void prepare_update_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *sup) } else { /* verify slice parameters */ for (int i = 0; i < sup->n_dl; i++) { - fill_dl_slice(mod_id, sup->dl[i]); + if (!sup->dl[i]->has_id) { + verified = 0; + break; + } + Protocol__FlexDlSlice *dls = get_existing_dl_slice(mod_id, sup->dl[i]->id); + /* fill up so that the slice is complete. This way, we don't need to + * worry about it later */ + fill_dl_slice(mod_id, sup->dl[i], dls); verified = verified && flexran_verify_dl_slice(mod_id, sup->dl[i]); if (!verified) break; } @@ -1317,7 +1330,14 @@ void prepare_update_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *sup) } else { /* verify slice parameters */ for (int i = 0; i < sup->n_ul; i++) { - fill_ul_slice(mod_id, sup->ul[i]); + if (!sup->ul[i]->has_id) { + verified = 0; + break; + } + Protocol__FlexUlSlice *uls = get_existing_ul_slice(mod_id, sup->ul[i]->id); + /* fill up so that the slice is complete. This way, we don't need to + * worry about it later */ + fill_ul_slice(mod_id, sup->ul[i], uls); verified = verified && flexran_verify_ul_slice(mod_id, sup->ul[i]); if (!verified) break; } From 6e5a2f45ced70f7ecbc6027048da9ac8ed0d4b97 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sun, 20 May 2018 17:12:15 +0200 Subject: [PATCH 119/379] FlexRAN: set deleted slice configuration to zero --- openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c index 0985539f8c..1e091feba5 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c @@ -1421,6 +1421,7 @@ void flexran_check_and_remove_slices(mid_t mod_id) /* don't update slice_config, it will be read in below */ /* we need to memcpy the higher slice to the position we just deleted */ memcpy(dl[i], dl[n_dl-1], sizeof(*dl[n_dl-1])); + memset(dl[n_dl-1], 0, sizeof(*dl[n_dl-1])); --sc_update[mod_id]->n_dl; } Protocol__FlexUlSlice **ul = sc_update[mod_id]->ul; @@ -1436,6 +1437,7 @@ void flexran_check_and_remove_slices(mid_t mod_id) mod_id, i, ul[i]->id); /* see DL remarks */ memcpy(ul[i], ul[n_ul-1], sizeof(*ul[n_ul-1])); + memset(ul[n_ul-1], 0, sizeof(*ul[n_ul-1])); --sc_update[mod_id]->n_ul; } } From bd041a34aafe7133ad886264ce59ba86658f9ddc Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sun, 20 May 2018 17:14:55 +0200 Subject: [PATCH 120/379] use changed RAN API, set scheduler for new slice --- .../CONTROL_MODULES/MAC/flexran_agent_mac.c | 4 +-- .../MAC/flexran_agent_mac_internal.c | 34 +++++++++++++------ .../flexran_agent_mac_slice_verification.c | 18 +++++++--- 3 files changed, 40 insertions(+), 16 deletions(-) diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c index 1e091feba5..c752469414 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c @@ -1497,12 +1497,12 @@ void flexran_agent_slice_update(mid_t mod_id) /* create new DL and UL slices if necessary */ for (i = slice_config[mod_id]->n_dl; i < sc_update[mod_id]->n_dl; i++) { - flexran_create_dl_slice(mod_id, sc_update[mod_id]->dl[i]->id, 0); + flexran_create_dl_slice(mod_id, sc_update[mod_id]->dl[i]->id); slice_config[mod_id]->n_dl = flexran_get_num_dl_slices(mod_id); flexran_agent_read_slice_dl_config(mod_id, i, slice_config[mod_id]->dl[i]); } for (i = slice_config[mod_id]->n_ul; i < sc_update[mod_id]->n_ul; i++) { - flexran_create_ul_slice(mod_id, sc_update[mod_id]->ul[i]->id, 0); + flexran_create_ul_slice(mod_id, sc_update[mod_id]->ul[i]->id); slice_config[mod_id]->n_ul = flexran_get_num_ul_slices(mod_id); flexran_agent_read_slice_ul_config(mod_id, i, slice_config[mod_id]->ul[i]); } diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c index a1a905d4a5..e1ca3273e8 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c @@ -969,7 +969,7 @@ void flexran_agent_read_slice_dl_config(mid_t mod_id, int slice_idx, Protocol__F if (dl_slice->n_sorting < 1) dl_slice->sorting = NULL; dl_slice->accounting = flexran_get_dl_slice_accounting_policy(mod_id, slice_idx); dl_slice->has_accounting = 1; - dl_slice->scheduler_name = flexran_get_dl_slice_scheduler_name(mod_id, slice_idx); + dl_slice->scheduler_name = flexran_get_dl_slice_scheduler(mod_id, slice_idx); } void flexran_agent_read_slice_ul_config(mid_t mod_id, int slice_idx, Protocol__FlexUlSlice *ul_slice) @@ -1007,7 +1007,7 @@ void flexran_agent_read_slice_ul_config(mid_t mod_id, int slice_idx, Protocol__F if (ul_slice->n_sorting < 1) ul_slice->sorting = NULL;*/ /*ul_slice->accounting = flexran_get_ul_slice_accounting_policy(mod_id, slice_idx);*/ ul_slice->has_accounting = 0; - ul_slice->scheduler_name = flexran_get_ul_slice_scheduler_name(mod_id, slice_idx); + ul_slice->scheduler_name = flexran_get_ul_slice_scheduler(mod_id, slice_idx); } void overwrite_slice_config_dl(Protocol__FlexDlSlice *exist, Protocol__FlexDlSlice *update) @@ -1069,10 +1069,12 @@ void overwrite_slice_config_dl(Protocol__FlexDlSlice *exist, Protocol__FlexDlSli update->id, exist->accounting, update->accounting); exist->accounting = update->accounting; } - if (update->scheduler_name - && strcmp(update->scheduler_name, exist->scheduler_name) != 0) { - LOG_W(FLEXRAN_AGENT, "[DL slice %d] ignoring new scheduler name \"%s\"!\n", - update->id, update->scheduler_name); + if (!exist->scheduler_name + || strcmp(update->scheduler_name, exist->scheduler_name) != 0) { + LOG_I(FLEXRAN_AGENT, "[DL slice %d] update scheduler: %s -> %s\n", + update->id, exist->scheduler_name, update->scheduler_name); + /* TODO dangerous? */ + exist->scheduler_name = update->scheduler_name; } } @@ -1135,10 +1137,12 @@ void overwrite_slice_config_ul(Protocol__FlexUlSlice *exist, Protocol__FlexUlSli update->id, exist->accounting, update->accounting); exist->accounting = update->accounting; } - if (update->scheduler_name - && strcmp(update->scheduler_name, exist->scheduler_name) != 0) { - LOG_W(FLEXRAN_AGENT, "[UL slice %d] ignoring new scheduler name \"%s\"!\n", - update->id, update->scheduler_name); + if (!exist->scheduler_name + || strcmp(update->scheduler_name, exist->scheduler_name) != 0) { + LOG_I(FLEXRAN_AGENT, "[UL slice %d] update scheduler: %s -> %s\n", + update->id, exist->scheduler_name, update->scheduler_name); + /* TODO dangerous? */ + exist->scheduler_name = update->scheduler_name; } } @@ -1416,6 +1420,11 @@ int apply_new_slice_dl_config(mid_t mod_id, Protocol__FlexDlSlice *oldc, Protoco flexran_set_dl_slice_accounting_policy(mod_id, slice_idx, newc->accounting); changes++; } + if (!oldc->scheduler_name + || strcmp(oldc->scheduler_name, newc->scheduler_name) != 0) { + flexran_set_dl_slice_scheduler(mod_id, slice_idx, newc->scheduler_name); + changes++; + } return changes; } @@ -1477,6 +1486,11 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting the accounting is not supported\n", mod_id, slice_idx); } + if (!oldc->scheduler_name + || strcmp(oldc->scheduler_name, newc->scheduler_name) != 0) { + flexran_set_ul_slice_scheduler(mod_id, slice_idx, newc->scheduler_name); + changes++; + } return changes; } diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c index addc8d2e75..5dcc355612 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c @@ -84,8 +84,13 @@ int flexran_verify_dl_slice(mid_t mod_id, Protocol__FlexDlSlice *dls) } /* sorting is an enum */ /* accounting is an enum */ - if (dls->scheduler_name) { - LOG_E(FLEXRAN_AGENT, "[%d] setting the scheduler is not allowed\n", mod_id); + if (!dls->scheduler_name) { + LOG_E(FLEXRAN_AGENT, "[%d] no scheduler name found\n", mod_id); + return 0; + } + if (strcmp(dls->scheduler_name, "schedule_ue_spec") != 0) { + LOG_E(FLEXRAN_AGENT, "[%d] setting the scheduler to something different " + "than schedule_ue_spec is currently not allowed\n", mod_id); return 0; } @@ -183,8 +188,13 @@ int flexran_verify_ul_slice(mid_t mod_id, Protocol__FlexUlSlice *uls) } /* sorting is an enum */ /* accounting is an enum */ - if (uls->scheduler_name) { - LOG_E(FLEXRAN_AGENT, "[%d] setting the scheduler is not allowed\n", mod_id); + if (!uls->scheduler_name) { + LOG_E(FLEXRAN_AGENT, "[%d] no scheduler name found\n", mod_id); + return 0; + } + if (strcmp(uls->scheduler_name, "schedule_ulsch_rnti") != 0) { + LOG_E(FLEXRAN_AGENT, "[%d] setting the scheduler to something different " + "than schedule_ulsch_rnti is currently not allowed\n", mod_id); return 0; } From 0c0e7b6ead51151ec7f7a5b7040bc6b87eb04255 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 21 May 2018 12:25:17 +0200 Subject: [PATCH 121/379] simplify control flow --- .../CONTROL_MODULES/MAC/flexran_agent_mac.c | 22 ++----------------- .../MAC/flexran_agent_mac_internal.c | 6 +---- 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c index c752469414..834283945b 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c @@ -1472,24 +1472,6 @@ void flexran_agent_slice_update(mid_t mod_id) flexran_agent_read_slice_ul_config(mod_id, i, slice_config[mod_id]->ul[i]); } - /* in case we tried to add a slice and it failed (e.g. due to high sum - * percentage being too high), revert to the correct number of slices. - * Also, do not write if we try the last time */ - if (perform_slice_config_update_count == 1) { - if (slice_config[mod_id]->n_dl != sc_update[mod_id]->n_dl) { - sc_update[mod_id]->n_dl = slice_config[mod_id]->n_dl; - LOG_W(FLEXRAN_AGENT, "[%d] reverting to original number of %ld DL slices\n", - mod_id, sc_update[mod_id]->n_dl); - } - if (slice_config[mod_id]->n_ul != sc_update[mod_id]->n_ul) { - sc_update[mod_id]->n_ul = slice_config[mod_id]->n_ul; - LOG_W(FLEXRAN_AGENT, "[%d] reverting to original number of %ld UL slices\n", - mod_id, sc_update[mod_id]->n_ul); - } - pthread_mutex_unlock(&sc_update_mtx); - return; - } - /********* write new config *********/ /* check for removal (sc_update[X]->dl[Y].percentage == 0) * and update sc_update & slice_config accordingly */ @@ -1499,22 +1481,22 @@ void flexran_agent_slice_update(mid_t mod_id) for (i = slice_config[mod_id]->n_dl; i < sc_update[mod_id]->n_dl; i++) { flexran_create_dl_slice(mod_id, sc_update[mod_id]->dl[i]->id); slice_config[mod_id]->n_dl = flexran_get_num_dl_slices(mod_id); - flexran_agent_read_slice_dl_config(mod_id, i, slice_config[mod_id]->dl[i]); } for (i = slice_config[mod_id]->n_ul; i < sc_update[mod_id]->n_ul; i++) { flexran_create_ul_slice(mod_id, sc_update[mod_id]->ul[i]->id); slice_config[mod_id]->n_ul = flexran_get_num_ul_slices(mod_id); - flexran_agent_read_slice_ul_config(mod_id, i, slice_config[mod_id]->ul[i]); } for (i = 0; i < slice_config[mod_id]->n_dl; i++) { changes += apply_new_slice_dl_config(mod_id, slice_config[mod_id]->dl[i], sc_update[mod_id]->dl[i]); + flexran_agent_read_slice_dl_config(mod_id, i, slice_config[mod_id]->dl[i]); } for (i = 0; i < slice_config[mod_id]->n_ul; i++) { changes += apply_new_slice_ul_config(mod_id, slice_config[mod_id]->ul[i], sc_update[mod_id]->ul[i]); + flexran_agent_read_slice_ul_config(mod_id, i, slice_config[mod_id]->ul[i]); } if (n_ue_slice_assoc_updates > 0) { changes += apply_ue_slice_assoc_update(mod_id); diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c index e1ca3273e8..50eb17d919 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c @@ -1365,11 +1365,7 @@ void prepare_update_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *sup) } pthread_mutex_unlock(&sc_update_mtx); - /* perform the slice configuration reads a couple of times. If there are - * inconsistencies (i.e. the MAC refuses a configuration), we will have a - * couple of warnings because the current configuration and the one in - * sc_update will be diverged */ - perform_slice_config_update_count = 3; + perform_slice_config_update_count = 1; } int apply_new_slice_dl_config(mid_t mod_id, Protocol__FlexDlSlice *oldc, Protocol__FlexDlSlice *newc) From e94b0bde512964c81da34a031f06f51fe8bdedcc Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 21 May 2018 12:28:31 +0200 Subject: [PATCH 122/379] FlexRAN fixes * properly allocate memory for scheduler name/sorting * free mem of sc_update, include todo for slice_config * set has_x to one, add fct whether sorting update necessary * set n_ul/n_dl to correct value after every loop iteration * support for delete of multiple slices * allocate memory for scheduler name in slice_config * check that we really set the scheduler --- .../CONTROL_MODULES/MAC/flexran_agent_mac.c | 60 ++++++-- .../MAC/flexran_agent_mac_internal.c | 138 +++++++++++------- 2 files changed, 130 insertions(+), 68 deletions(-) diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c index 834283945b..1daf0d5183 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c @@ -1405,40 +1405,67 @@ void flexran_create_config_structures(mid_t mod_id) void flexran_check_and_remove_slices(mid_t mod_id) { - int i; Protocol__FlexDlSlice **dl = sc_update[mod_id]->dl; - size_t n_dl = sc_update[mod_id]->n_dl; - for (i = 0; i < n_dl; i++) { + Protocol__FlexDlSlice **dlreal = slice_config[mod_id]->dl; + int i = 0; + while (i < sc_update[mod_id]->n_dl) { /* remove slices whose percentage is zero */ - if (dl[i]->percentage > 0) continue; + if (dl[i]->percentage > 0) { + ++i; + continue; + } if (flexran_remove_dl_slice(mod_id, i) < 1) { LOG_W(FLEXRAN_AGENT, "[%d] can not remove slice index %d ID %d\n", mod_id, i, dl[i]->id); + ++i; continue; } LOG_I(FLEXRAN_AGENT, "[%d] removed slice index %d ID %d\n", mod_id, i, dl[i]->id); - /* don't update slice_config, it will be read in below */ - /* we need to memcpy the higher slice to the position we just deleted */ - memcpy(dl[i], dl[n_dl-1], sizeof(*dl[n_dl-1])); - memset(dl[n_dl-1], 0, sizeof(*dl[n_dl-1])); + if (dl[i]->n_sorting > 0) free(dl[i]->sorting); + free(dl[i]->scheduler_name); + if (dlreal[i]->n_sorting > 0) { + dlreal[i]->n_sorting = 0; + free(dlreal[i]->sorting); + } + free(dlreal[i]->scheduler_name); --sc_update[mod_id]->n_dl; + --slice_config[mod_id]->n_dl; + const size_t last = sc_update[mod_id]->n_dl; + /* we need to memcpy the higher slice to the position we just deleted */ + memcpy(dl[i], dl[last], sizeof(*dl[last])); + memset(dl[last], 0, sizeof(*dl[last])); + memcpy(dlreal[i], dlreal[last], sizeof(*dlreal[last])); + memset(dlreal[last], 0, sizeof(*dlreal[last])); + /* dont increase i but recheck the slice which has been copied to here */ } Protocol__FlexUlSlice **ul = sc_update[mod_id]->ul; - size_t n_ul = sc_update[mod_id]->n_ul; - for (i = 0; i < n_ul; i++) { - if (ul[i]->percentage > 0) continue; + Protocol__FlexUlSlice **ulreal = slice_config[mod_id]->ul; + i = 0; + while (i < sc_update[mod_id]->n_ul) { + if (ul[i]->percentage > 0) { + ++i; + continue; + } if (flexran_remove_ul_slice(mod_id, i) < 1) { LOG_W(FLEXRAN_AGENT, "[%d] can not remove slice index %d ID %d\n", mod_id, i, ul[i]->id); + ++i; continue; } LOG_I(FLEXRAN_AGENT, "[%d] removed slice index %d ID %d\n", mod_id, i, ul[i]->id); - /* see DL remarks */ - memcpy(ul[i], ul[n_ul-1], sizeof(*ul[n_ul-1])); - memset(ul[n_ul-1], 0, sizeof(*ul[n_ul-1])); + free(ul[i]->scheduler_name); + free(ulreal[i]->scheduler_name); --sc_update[mod_id]->n_ul; + --slice_config[mod_id]->n_ul; + const size_t last = sc_update[mod_id]->n_ul; + /* see DL remarks */ + memcpy(ul[i], ul[last], sizeof(*ul[last])); + memset(ul[last], 0, sizeof(*ul[last])); + memcpy(ulreal[i], ulreal[last], sizeof(*ulreal[last])); + memset(ulreal[last], 0, sizeof(*ulreal[last])); + /* dont increase i but recheck the slice which has been copied to here */ } } @@ -1480,12 +1507,13 @@ void flexran_agent_slice_update(mid_t mod_id) /* create new DL and UL slices if necessary */ for (i = slice_config[mod_id]->n_dl; i < sc_update[mod_id]->n_dl; i++) { flexran_create_dl_slice(mod_id, sc_update[mod_id]->dl[i]->id); - slice_config[mod_id]->n_dl = flexran_get_num_dl_slices(mod_id); } for (i = slice_config[mod_id]->n_ul; i < sc_update[mod_id]->n_ul; i++) { flexran_create_ul_slice(mod_id, sc_update[mod_id]->ul[i]->id); - slice_config[mod_id]->n_ul = flexran_get_num_ul_slices(mod_id); } + slice_config[mod_id]->n_dl = flexran_get_num_dl_slices(mod_id); + slice_config[mod_id]->n_ul = flexran_get_num_ul_slices(mod_id); + changes += apply_new_slice_config(mod_id, slice_config[mod_id], sc_update[mod_id]); for (i = 0; i < slice_config[mod_id]->n_dl; i++) { changes += apply_new_slice_dl_config(mod_id, slice_config[mod_id]->dl[i], diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c index 50eb17d919..c85f410313 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c @@ -969,7 +969,12 @@ void flexran_agent_read_slice_dl_config(mid_t mod_id, int slice_idx, Protocol__F if (dl_slice->n_sorting < 1) dl_slice->sorting = NULL; dl_slice->accounting = flexran_get_dl_slice_accounting_policy(mod_id, slice_idx); dl_slice->has_accounting = 1; - dl_slice->scheduler_name = flexran_get_dl_slice_scheduler(mod_id, slice_idx); + const char *s_name = flexran_get_dl_slice_scheduler(mod_id, slice_idx); + if (!dl_slice->scheduler_name + || strcmp(dl_slice->scheduler_name, s_name) != 0) { + dl_slice->scheduler_name = realloc(dl_slice->scheduler_name, strlen(s_name) + 1); + strcpy(dl_slice->scheduler_name, s_name); + } } void flexran_agent_read_slice_ul_config(mid_t mod_id, int slice_idx, Protocol__FlexUlSlice *ul_slice) @@ -1007,7 +1012,34 @@ void flexran_agent_read_slice_ul_config(mid_t mod_id, int slice_idx, Protocol__F if (ul_slice->n_sorting < 1) ul_slice->sorting = NULL;*/ /*ul_slice->accounting = flexran_get_ul_slice_accounting_policy(mod_id, slice_idx);*/ ul_slice->has_accounting = 0; - ul_slice->scheduler_name = flexran_get_ul_slice_scheduler(mod_id, slice_idx); + const char *s_name = flexran_get_ul_slice_scheduler(mod_id, slice_idx); + if (!ul_slice->scheduler_name + || strcmp(ul_slice->scheduler_name, s_name) != 0) { + ul_slice->scheduler_name = realloc(ul_slice->scheduler_name, strlen(s_name) + 1); + strcpy(ul_slice->scheduler_name, s_name); + } +} + +int check_dl_sorting_update(Protocol__FlexDlSlice *old, Protocol__FlexDlSlice *new) +{ + /* sorting_update => true when old->n_sorting == 0 or different numbers of + * elements; otherwise will check * element-wise */ + int sorting_update = old->n_sorting == 0 || (old->n_sorting != new->n_sorting); + for (int i = 0; i < old->n_sorting && !sorting_update; ++i) { + sorting_update = sorting_update || (new->sorting[i] != old->sorting[i]); + } + return sorting_update; +} + +int check_ul_sorting_update(Protocol__FlexUlSlice *old, Protocol__FlexUlSlice *new) +{ + /* sorting_update => true when old->n_sorting == 0 or different numbers of + * elements; otherwise will check * element-wise */ + int sorting_update = old->n_sorting == 0 || (old->n_sorting != new->n_sorting); + for (int i = 0; i < old->n_sorting && !sorting_update; ++i) { + sorting_update = sorting_update || (new->sorting[i] != old->sorting[i]); + } + return sorting_update; } void overwrite_slice_config_dl(Protocol__FlexDlSlice *exist, Protocol__FlexDlSlice *update) @@ -1016,65 +1048,66 @@ void overwrite_slice_config_dl(Protocol__FlexDlSlice *exist, Protocol__FlexDlSli LOG_I(FLEXRAN_AGENT, "[DL slice %d] update label: %d -> %d\n", update->id, exist->label, update->label); exist->label = update->label; + exist->has_label = 1; } if (update->percentage != exist->percentage) { LOG_I(FLEXRAN_AGENT, "[DL slice %d] update percentage: %d -> %d\n", update->id, exist->percentage, update->percentage); exist->percentage = update->percentage; + exist->has_percentage = 1; } if (update->isolation != exist->isolation) { LOG_I(FLEXRAN_AGENT, "[DL slice %d] update isolation: %d -> %d\n", update->id, exist->isolation, update->isolation); exist->isolation = update->isolation; + exist->has_isolation = 1; } if (update->priority != exist->priority) { LOG_I(FLEXRAN_AGENT, "[DL slice %d] update priority: %d -> %d\n", update->id, exist->priority, update->priority); exist->priority = update->priority; + exist->has_priority = 1; } if (update->position_low != exist->position_low) { LOG_I(FLEXRAN_AGENT, "[DL slice %d] update position_low: %d -> %d\n", update->id, exist->position_low, update->position_low); exist->position_low = update->position_low; + exist->has_position_low = 1; } if (update->position_high != exist->position_high) { LOG_I(FLEXRAN_AGENT, "[DL slice %d] update position_high: %d -> %d\n", update->id, exist->position_high, update->position_high); exist->position_high = update->position_high; + exist->has_position_high = 1; } if (update->maxmcs != exist->maxmcs) { LOG_I(FLEXRAN_AGENT, "[DL slice %d] update maxmcs: %d -> %d\n", update->id, exist->maxmcs, update->maxmcs); exist->maxmcs = update->maxmcs; + exist->has_maxmcs = 1; } - int sorting_update = 0; - int n = min(exist->n_sorting, update->n_sorting); - /* check whether something has changed. If update->n_sorting is 0, - * sorting_update will remain false, so no update will be done */ - int i = 0; - while(i < n && !sorting_update) { - sorting_update = sorting_update || (update->sorting[i] != exist->sorting[i]); - i++; - } - if (sorting_update) { + if (check_dl_sorting_update(exist, update)) { LOG_I(FLEXRAN_AGENT, "[DL slice %d] update sorting array\n", update->id); - if (exist->n_sorting != update->n_sorting) - LOG_W(FLEXRAN_AGENT, "[slice %d] only writing %d elements\n", - update->id, n); - for (int i = 0; i < n; i++) + if (exist->n_sorting != update->n_sorting) { + exist->n_sorting = update->n_sorting; + exist->sorting = realloc(exist->sorting, exist->n_sorting * sizeof(Protocol__FlexDlSorting)); + if (!exist->sorting) exist->n_sorting = 0; + } + for (int i = 0; i < exist->n_sorting; i++) exist->sorting[i] = update->sorting[i]; } if (update->accounting != exist->accounting) { LOG_I(FLEXRAN_AGENT, "[DL slice %d] update accounting: %d -> %d\n", update->id, exist->accounting, update->accounting); exist->accounting = update->accounting; + exist->has_accounting = 1; } if (!exist->scheduler_name || strcmp(update->scheduler_name, exist->scheduler_name) != 0) { LOG_I(FLEXRAN_AGENT, "[DL slice %d] update scheduler: %s -> %s\n", update->id, exist->scheduler_name, update->scheduler_name); - /* TODO dangerous? */ - exist->scheduler_name = update->scheduler_name; + if (exist->scheduler_name) free(exist->scheduler_name); + exist->scheduler_name = strdup(update->scheduler_name); } } @@ -1084,26 +1117,31 @@ void overwrite_slice_config_ul(Protocol__FlexUlSlice *exist, Protocol__FlexUlSli LOG_I(FLEXRAN_AGENT, "[UL slice %d] update label: %d -> %d\n", update->id, exist->label, update->label); exist->label = update->label; + exist->has_label = 1; } if (update->percentage != exist->percentage) { LOG_I(FLEXRAN_AGENT, "[UL slice %d] update percentage: %d -> %d\n", update->id, exist->percentage, update->percentage); exist->percentage = update->percentage; + exist->has_percentage = 1; } if (update->isolation != exist->isolation) { LOG_I(FLEXRAN_AGENT, "[UL slice %d] update isolation: %d -> %d\n", update->id, exist->isolation, update->isolation); exist->isolation = update->isolation; + exist->has_isolation = 1; } if (update->priority != exist->priority) { LOG_I(FLEXRAN_AGENT, "[UL slice %d] update priority: %d -> %d\n", update->id, exist->priority, update->priority); exist->priority = update->priority; + exist->has_priority = 1; } if (update->first_rb != exist->first_rb) { LOG_I(FLEXRAN_AGENT, "[UL slice %d] update first_rb: %d -> %d\n", update->id, exist->first_rb, update->first_rb); exist->first_rb = update ->first_rb; + exist->has_first_rb = 1; } /*if (update->lenght_rb != exist->lenght_rb) { LOG_I(FLEXRAN_AGENT, "[UL slice %d] update lenght_rb: %d -> %d\n", @@ -1114,11 +1152,11 @@ void overwrite_slice_config_ul(Protocol__FlexUlSlice *exist, Protocol__FlexUlSli LOG_I(FLEXRAN_AGENT, "[UL slice %d] update maxmcs: %d -> %d\n", update->id, exist->maxmcs, update->maxmcs); exist->maxmcs = update->maxmcs; + exist->has_maxmcs = 1; } + /* TODO int sorting_update = 0; int n = min(exist->n_sorting, update->n_sorting); - /* check whether something has changed. If update-> n_sorting is 0, - * sorting_update will remain false, so no update will be done */ int i = 0; while (i < n && !sorting_update) { sorting_update = sorting_update || (update->sorting[i] != exist->sorting[i]); @@ -1132,17 +1170,19 @@ void overwrite_slice_config_ul(Protocol__FlexUlSlice *exist, Protocol__FlexUlSli for (i = 0; i < n; i++) exist->sorting[i] = update->sorting[i]; } + */ if (update->accounting != exist->accounting) { LOG_I(FLEXRAN_AGENT, "[UL slice %d] update accounting: %d -> %d\n", update->id, exist->accounting, update->accounting); exist->accounting = update->accounting; + exist->has_accounting = 1; } if (!exist->scheduler_name || strcmp(update->scheduler_name, exist->scheduler_name) != 0) { LOG_I(FLEXRAN_AGENT, "[UL slice %d] update scheduler: %s -> %s\n", update->id, exist->scheduler_name, update->scheduler_name); - /* TODO dangerous? */ - exist->scheduler_name = update->scheduler_name; + if (exist->scheduler_name) free(exist->scheduler_name); + exist->scheduler_name = strdup(update->scheduler_name); } } @@ -1181,16 +1221,16 @@ void fill_dl_slice(mid_t mod_id, Protocol__FlexDlSlice *s, Protocol__FlexDlSlice } if (s->n_sorting == 0) { s->n_sorting = from ? from->n_sorting : sc_update[mod_id]->dl[0]->n_sorting; - /* TODO Dangerous? */ - s->sorting = from ? from->sorting : sc_update[mod_id]->dl[0]->sorting; + s->sorting = calloc(s->n_sorting, sizeof(Protocol__FlexDlSorting)); + if (!s->sorting) s->n_sorting = 0; + for (int i = 0; i < s->n_sorting; ++i) + s->sorting[i] = from ? from->sorting[i] : sc_update[0]->dl[0]->sorting[i]; } if (!s->has_accounting) { - /* TODO Dangerous? */ s->accounting = from ? from->accounting : sc_update[mod_id]->dl[0]->accounting; } if (!s->scheduler_name) { - /* TODO Dangerous? */ - s->scheduler_name = from ? from->scheduler_name : sc_update[mod_id]->dl[0]->scheduler_name; + s->scheduler_name = strdup(from ? from->scheduler_name : sc_update[mod_id]->dl[0]->scheduler_name); } } @@ -1248,16 +1288,16 @@ void fill_ul_slice(mid_t mod_id, Protocol__FlexUlSlice *s, Protocol__FlexUlSlice } if (s->n_sorting == 0) { s->n_sorting = from ? from->n_sorting : sc_update[0]->ul[0]->n_sorting; - /* TODO Dangerous? */ - s->sorting = from ? from->sorting : sc_update[0]->ul[0]->sorting; + s->sorting = calloc(s->n_sorting, sizeof(Protocol__FlexUlSorting)); + if (!s->sorting) s->n_sorting = 0; + for (int i = 0; i < s->n_sorting; ++i) + s->sorting[i] = from ? from->sorting[i] : sc_update[0]->ul[0]->sorting[i]; } if (!s->has_accounting) { - /* TODO Dangerous? */ s->accounting = from ? from->accounting : sc_update[0]->ul[0]->accounting; } if (!s->scheduler_name) { - /* TODO Dangerous? */ - s->scheduler_name = from ? from->scheduler_name : sc_update[mod_id]->ul[0]->scheduler_name; + s->scheduler_name = strdup(from ? from->scheduler_name : sc_update[mod_id]->ul[0]->scheduler_name); } } @@ -1374,7 +1414,6 @@ int apply_new_slice_dl_config(mid_t mod_id, Protocol__FlexDlSlice *oldc, Protoco * later when reading the configuration. There is thus a direct feedback * whether it has been set. */ int changes = 0; - int n; int slice_idx = flexran_find_dl_slice(mod_id, newc->id); if (slice_idx < 0) { LOG_W(FLEXRAN_AGENT, "cannot find index for slice ID %d\n", newc->id); @@ -1404,13 +1443,9 @@ int apply_new_slice_dl_config(mid_t mod_id, Protocol__FlexDlSlice *oldc, Protoco flexran_set_dl_slice_maxmcs(mod_id, slice_idx, newc->maxmcs); changes++; } - n = min(oldc->n_sorting, newc->n_sorting); - for (int i = 0; i < n; i++) { - if (oldc->sorting[i] != newc->sorting[i]) { - flexran_set_dl_slice_sorting(mod_id, slice_idx, newc->sorting, n); - changes++; - break; - } + if (check_dl_sorting_update(oldc, newc)) { + flexran_set_dl_slice_sorting(mod_id, slice_idx, newc->sorting, newc->n_sorting); + changes++; } if (oldc->accounting != newc->accounting) { flexran_set_dl_slice_accounting_policy(mod_id, slice_idx, newc->accounting); @@ -1418,7 +1453,9 @@ int apply_new_slice_dl_config(mid_t mod_id, Protocol__FlexDlSlice *oldc, Protoco } if (!oldc->scheduler_name || strcmp(oldc->scheduler_name, newc->scheduler_name) != 0) { - flexran_set_dl_slice_scheduler(mod_id, slice_idx, newc->scheduler_name); + int ret = flexran_set_dl_slice_scheduler(mod_id, slice_idx, newc->scheduler_name); + AssertFatal(ret, "could not set DL slice scheduler for slice %d idx %d\n", + newc->id, slice_idx); changes++; } return changes; @@ -1430,7 +1467,6 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco * later when reading the configuration. There is thus a direct feedback * whether it has been set. */ int changes = 0; - int n; int slice_idx = flexran_find_ul_slice(mod_id, newc->id); if (slice_idx < 0) { LOG_W(FLEXRAN_AGENT, "cannot find index for slice ID %d\n", newc->id); @@ -1466,15 +1502,11 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco flexran_set_ul_slice_maxmcs(mod_id, slice_idx, newc->maxmcs); changes++; } - n = min(oldc->n_sorting, newc->n_sorting); - for (int i = 0; i < n; i++) { - if (oldc->sorting[i] != newc->sorting[i]) { - /*flexran_set_ul_slice_sorting(mod_id, slice_idx, newc->sorting, n); - changes++;*/ - LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting the sorting is not supported\n", - mod_id, slice_idx); - break; - } + if (check_ul_sorting_update(oldc, newc)) { + /*flexran_set_ul_slice_sorting(mod_id, slice_idx, newc->sorting, n); + changes++;*/ + LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting the sorting is not supported\n", + mod_id, slice_idx); } if (oldc->accounting != newc->accounting) { /*flexran_set_ul_slice_accounting_policy(mod_id, slice_idx, newc->accounting); @@ -1484,7 +1516,9 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco } if (!oldc->scheduler_name || strcmp(oldc->scheduler_name, newc->scheduler_name) != 0) { - flexran_set_ul_slice_scheduler(mod_id, slice_idx, newc->scheduler_name); + int ret = flexran_set_ul_slice_scheduler(mod_id, slice_idx, newc->scheduler_name); + AssertFatal(ret, "could not set DL slice scheduler for slice %d idx %d\n", + newc->id, slice_idx); changes++; } return changes; From 472ebf5622be595408a55a46b7619f474a68d13a Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 21 May 2018 13:33:31 +0200 Subject: [PATCH 123/379] mark UL slice sorting overwriting as TODO --- .../CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c index 5dcc355612..c78b92e1af 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c @@ -178,6 +178,7 @@ int flexran_verify_ul_slice(mid_t mod_id, Protocol__FlexUlSlice *uls) LOG_E(FLEXRAN_AGENT, "[%d] illegal UL slice max mcs (%d)\n", mod_id, uls->maxmcs); return 0; } + /* TODO if (uls->n_sorting == 0) { LOG_E(FLEXRAN_AGENT, "[%d] no sorting in UL slice\n", mod_id); return 0; @@ -186,6 +187,7 @@ int flexran_verify_ul_slice(mid_t mod_id, Protocol__FlexUlSlice *uls) LOG_E(FLEXRAN_AGENT, "[%d] no sorting found in UL slice\n", mod_id); return 0; } + */ /* sorting is an enum */ /* accounting is an enum */ if (!uls->scheduler_name) { From 44481a564980c22708101398567dcc0516964eed Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sun, 20 May 2018 17:36:13 +0200 Subject: [PATCH 124/379] FlexRAN: improve info messages --- .../MAC/flexran_agent_mac_internal.c | 102 +++++++++--------- .../flexran_agent_mac_slice_verification.c | 67 ++++++++---- 2 files changed, 95 insertions(+), 74 deletions(-) diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c index c85f410313..1289e7551f 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c @@ -1042,52 +1042,52 @@ int check_ul_sorting_update(Protocol__FlexUlSlice *old, Protocol__FlexUlSlice *n return sorting_update; } -void overwrite_slice_config_dl(Protocol__FlexDlSlice *exist, Protocol__FlexDlSlice *update) +void overwrite_slice_config_dl(mid_t mod_id, Protocol__FlexDlSlice *exist, Protocol__FlexDlSlice *update) { if (update->label != exist->label) { - LOG_I(FLEXRAN_AGENT, "[DL slice %d] update label: %d -> %d\n", - update->id, exist->label, update->label); + LOG_I(FLEXRAN_AGENT, "[%d][DL slice %d] update label: %d -> %d\n", + mod_id, update->id, exist->label, update->label); exist->label = update->label; exist->has_label = 1; } if (update->percentage != exist->percentage) { - LOG_I(FLEXRAN_AGENT, "[DL slice %d] update percentage: %d -> %d\n", - update->id, exist->percentage, update->percentage); + LOG_I(FLEXRAN_AGENT, "[%d][DL slice %d] update percentage: %d -> %d\n", + mod_id, update->id, exist->percentage, update->percentage); exist->percentage = update->percentage; exist->has_percentage = 1; } if (update->isolation != exist->isolation) { - LOG_I(FLEXRAN_AGENT, "[DL slice %d] update isolation: %d -> %d\n", - update->id, exist->isolation, update->isolation); + LOG_I(FLEXRAN_AGENT, "[%d][DL slice %d] update isolation: %d -> %d\n", + mod_id, update->id, exist->isolation, update->isolation); exist->isolation = update->isolation; exist->has_isolation = 1; } if (update->priority != exist->priority) { - LOG_I(FLEXRAN_AGENT, "[DL slice %d] update priority: %d -> %d\n", - update->id, exist->priority, update->priority); + LOG_I(FLEXRAN_AGENT, "[%d][DL slice %d] update priority: %d -> %d\n", + mod_id, update->id, exist->priority, update->priority); exist->priority = update->priority; exist->has_priority = 1; } if (update->position_low != exist->position_low) { - LOG_I(FLEXRAN_AGENT, "[DL slice %d] update position_low: %d -> %d\n", - update->id, exist->position_low, update->position_low); + LOG_I(FLEXRAN_AGENT, "[%d][DL slice %d] update position_low: %d -> %d\n", + mod_id, update->id, exist->position_low, update->position_low); exist->position_low = update->position_low; exist->has_position_low = 1; } if (update->position_high != exist->position_high) { - LOG_I(FLEXRAN_AGENT, "[DL slice %d] update position_high: %d -> %d\n", - update->id, exist->position_high, update->position_high); + LOG_I(FLEXRAN_AGENT, "[%d][DL slice %d] update position_high: %d -> %d\n", + mod_id, update->id, exist->position_high, update->position_high); exist->position_high = update->position_high; exist->has_position_high = 1; } if (update->maxmcs != exist->maxmcs) { - LOG_I(FLEXRAN_AGENT, "[DL slice %d] update maxmcs: %d -> %d\n", - update->id, exist->maxmcs, update->maxmcs); + LOG_I(FLEXRAN_AGENT, "[%d][DL slice %d] update maxmcs: %d -> %d\n", + mod_id, update->id, exist->maxmcs, update->maxmcs); exist->maxmcs = update->maxmcs; exist->has_maxmcs = 1; } if (check_dl_sorting_update(exist, update)) { - LOG_I(FLEXRAN_AGENT, "[DL slice %d] update sorting array\n", update->id); + LOG_I(FLEXRAN_AGENT, "[%d][DL slice %d] update sorting array\n", mod_id, update->id); if (exist->n_sorting != update->n_sorting) { exist->n_sorting = update->n_sorting; exist->sorting = realloc(exist->sorting, exist->n_sorting * sizeof(Protocol__FlexDlSorting)); @@ -1097,60 +1097,60 @@ void overwrite_slice_config_dl(Protocol__FlexDlSlice *exist, Protocol__FlexDlSli exist->sorting[i] = update->sorting[i]; } if (update->accounting != exist->accounting) { - LOG_I(FLEXRAN_AGENT, "[DL slice %d] update accounting: %d -> %d\n", - update->id, exist->accounting, update->accounting); + LOG_I(FLEXRAN_AGENT, "[%d][DL slice %d] update accounting: %d -> %d\n", + mod_id, update->id, exist->accounting, update->accounting); exist->accounting = update->accounting; exist->has_accounting = 1; } if (!exist->scheduler_name || strcmp(update->scheduler_name, exist->scheduler_name) != 0) { - LOG_I(FLEXRAN_AGENT, "[DL slice %d] update scheduler: %s -> %s\n", - update->id, exist->scheduler_name, update->scheduler_name); + LOG_I(FLEXRAN_AGENT, "[%d][DL slice %d] update scheduler: %s -> %s\n", + mod_id, update->id, exist->scheduler_name, update->scheduler_name); if (exist->scheduler_name) free(exist->scheduler_name); exist->scheduler_name = strdup(update->scheduler_name); } } -void overwrite_slice_config_ul(Protocol__FlexUlSlice *exist, Protocol__FlexUlSlice *update) +void overwrite_slice_config_ul(mid_t mod_id, Protocol__FlexUlSlice *exist, Protocol__FlexUlSlice *update) { if (update->label != exist->label) { - LOG_I(FLEXRAN_AGENT, "[UL slice %d] update label: %d -> %d\n", - update->id, exist->label, update->label); + LOG_I(FLEXRAN_AGENT, "[%d][UL slice %d] update label: %d -> %d\n", + mod_id, update->id, exist->label, update->label); exist->label = update->label; exist->has_label = 1; } if (update->percentage != exist->percentage) { - LOG_I(FLEXRAN_AGENT, "[UL slice %d] update percentage: %d -> %d\n", - update->id, exist->percentage, update->percentage); + LOG_I(FLEXRAN_AGENT, "[%d][UL slice %d] update percentage: %d -> %d\n", + mod_id, update->id, exist->percentage, update->percentage); exist->percentage = update->percentage; exist->has_percentage = 1; } if (update->isolation != exist->isolation) { - LOG_I(FLEXRAN_AGENT, "[UL slice %d] update isolation: %d -> %d\n", - update->id, exist->isolation, update->isolation); + LOG_I(FLEXRAN_AGENT, "[%d][UL slice %d] update isolation: %d -> %d\n", + mod_id, update->id, exist->isolation, update->isolation); exist->isolation = update->isolation; exist->has_isolation = 1; } if (update->priority != exist->priority) { - LOG_I(FLEXRAN_AGENT, "[UL slice %d] update priority: %d -> %d\n", - update->id, exist->priority, update->priority); + LOG_I(FLEXRAN_AGENT, "[%d][UL slice %d] update priority: %d -> %d\n", + mod_id, update->id, exist->priority, update->priority); exist->priority = update->priority; exist->has_priority = 1; } if (update->first_rb != exist->first_rb) { - LOG_I(FLEXRAN_AGENT, "[UL slice %d] update first_rb: %d -> %d\n", - update->id, exist->first_rb, update->first_rb); + LOG_I(FLEXRAN_AGENT, "[%d][UL slice %d] update first_rb: %d -> %d\n", + mod_id, update->id, exist->first_rb, update->first_rb); exist->first_rb = update ->first_rb; exist->has_first_rb = 1; } /*if (update->lenght_rb != exist->lenght_rb) { - LOG_I(FLEXRAN_AGENT, "[UL slice %d] update lenght_rb: %d -> %d\n", - update->id, exist->lenght_rb, update->lenght_rb); + LOG_I(FLEXRAN_AGENT, "[%d][UL slice %d] update lenght_rb: %d -> %d\n", + mod_id, update->id, exist->lenght_rb, update->lenght_rb); exist->lenght_rb = update->lenght_rb; }*/ if (update->maxmcs != exist->maxmcs) { - LOG_I(FLEXRAN_AGENT, "[UL slice %d] update maxmcs: %d -> %d\n", - update->id, exist->maxmcs, update->maxmcs); + LOG_I(FLEXRAN_AGENT, "[%d][UL slice %d] update maxmcs: %d -> %d\n", + mod_id, update->id, exist->maxmcs, update->maxmcs); exist->maxmcs = update->maxmcs; exist->has_maxmcs = 1; } @@ -1163,24 +1163,24 @@ void overwrite_slice_config_ul(Protocol__FlexUlSlice *exist, Protocol__FlexUlSli i++; } if (sorting_update) { - LOG_I(FLEXRAN_AGENT, "[UL slice %d] update sorting array\n", update->id); + LOG_I(FLEXRAN_AGENT, "[%d][UL slice %d] update sorting array\n", update->id, mod_id); if (exist->n_sorting != update->n_sorting) - LOG_W(FLEXRAN_AGENT, "[UL slice %d] only writing %d elements\n", - update->id, n); + LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] only writing %d elements\n", + mod_id, update->id, n); for (i = 0; i < n; i++) exist->sorting[i] = update->sorting[i]; } */ if (update->accounting != exist->accounting) { - LOG_I(FLEXRAN_AGENT, "[UL slice %d] update accounting: %d -> %d\n", - update->id, exist->accounting, update->accounting); + LOG_I(FLEXRAN_AGENT, "[%d][UL slice %d] update accounting: %d -> %d\n", + mod_id, update->id, exist->accounting, update->accounting); exist->accounting = update->accounting; exist->has_accounting = 1; } if (!exist->scheduler_name || strcmp(update->scheduler_name, exist->scheduler_name) != 0) { - LOG_I(FLEXRAN_AGENT, "[UL slice %d] update scheduler: %s -> %s\n", - update->id, exist->scheduler_name, update->scheduler_name); + LOG_I(FLEXRAN_AGENT, "[%d][UL slice %d] update scheduler: %s -> %s\n", + mod_id, update->id, exist->scheduler_name, update->scheduler_name); if (exist->scheduler_name) free(exist->scheduler_name); exist->scheduler_name = strdup(update->scheduler_name); } @@ -1361,7 +1361,7 @@ void prepare_update_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *sup) * create new one and overwrite with the update */ Protocol__FlexDlSlice *dls = get_existing_dl_slice(mod_id, sup->dl[i]->id); if (!dls) dls = create_new_dl_slice(mod_id, sup->dl[i]->id); - overwrite_slice_config_dl(dls, sup->dl[i]); + overwrite_slice_config_dl(mod_id, dls, sup->dl[i]); } } else { LOG_E(FLEXRAN_AGENT, "[%d] DL slice verification failed, refusing application\n", mod_id); @@ -1397,7 +1397,7 @@ void prepare_update_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *sup) * create new one and overwrite with the update */ Protocol__FlexUlSlice *uls = get_existing_ul_slice(mod_id, sup->ul[i]->id); if (!uls) uls = create_new_ul_slice(mod_id, sup->ul[i]->id); - overwrite_slice_config_ul(uls, sup->ul[i]); + overwrite_slice_config_ul(mod_id, uls, sup->ul[i]); } } else { LOG_E(FLEXRAN_AGENT, "[%d] UL slice verification failed, refusing application\n", mod_id); @@ -1416,7 +1416,7 @@ int apply_new_slice_dl_config(mid_t mod_id, Protocol__FlexDlSlice *oldc, Protoco int changes = 0; int slice_idx = flexran_find_dl_slice(mod_id, newc->id); if (slice_idx < 0) { - LOG_W(FLEXRAN_AGENT, "cannot find index for slice ID %d\n", newc->id); + LOG_W(FLEXRAN_AGENT, "[%d] cannot find index for slice ID %d\n", mod_id, newc->id); return 0; } if (oldc->percentage != newc->percentage) { @@ -1469,7 +1469,7 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco int changes = 0; int slice_idx = flexran_find_ul_slice(mod_id, newc->id); if (slice_idx < 0) { - LOG_W(FLEXRAN_AGENT, "cannot find index for slice ID %d\n", newc->id); + LOG_W(FLEXRAN_AGENT, "[%d] cannot find index for slice ID %d\n", mod_id, newc->id); return 0; } if (oldc->percentage != newc->percentage) { @@ -1480,13 +1480,13 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco /*flexran_set_ul_slice_isolation(mod_id, slice_idx, newc->isolation); *changes++;*/ LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting isolation is not supported\n", - mod_id, slice_idx); + mod_id, newc->id); } if (oldc->priority != newc->priority) { /*flexran_set_ul_slice_priority(mod_id, slice_idx, newc->priority); *changes++;*/ LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting the priority is not supported\n", - mod_id, slice_idx); + mod_id, newc->id); } if (oldc->first_rb != newc->first_rb) { flexran_set_ul_slice_first_rb(mod_id, slice_idx, newc->first_rb); @@ -1496,7 +1496,7 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco flexran_set_ul_slice_length_rb(mod_id, slice_idx, newc->length_rb); changes++; LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting length_rb is not supported\n", - mod_id, slice_idx); + mod_id, newc->id); }*/ if (oldc->maxmcs != newc->maxmcs) { flexran_set_ul_slice_maxmcs(mod_id, slice_idx, newc->maxmcs); @@ -1506,13 +1506,13 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco /*flexran_set_ul_slice_sorting(mod_id, slice_idx, newc->sorting, n); changes++;*/ LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting the sorting is not supported\n", - mod_id, slice_idx); + mod_id, newc->id); } if (oldc->accounting != newc->accounting) { /*flexran_set_ul_slice_accounting_policy(mod_id, slice_idx, newc->accounting); *changes++;*/ LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting the accounting is not supported\n", - mod_id, slice_idx); + mod_id, newc->id); } if (!oldc->scheduler_name || strcmp(oldc->scheduler_name, newc->scheduler_name) != 0) { diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c index c78b92e1af..67329e91be 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c @@ -57,40 +57,48 @@ int flexran_verify_dl_slice(mid_t mod_id, Protocol__FlexDlSlice *dls) /* verify parameters individualy */ /* label is enum */ if (!flexran_dl_slice_verify_pct(dls->percentage)) { - LOG_E(FLEXRAN_AGENT, "[%d] illegal DL slice percentage (%d)\n", mod_id, dls->percentage); + LOG_E(FLEXRAN_AGENT, "[%d][DL slice %d] illegal DL slice percentage (%d)\n", + mod_id, dls->id, dls->percentage); return 0; } /* isolation is a protobuf bool */ if (!flexran_dl_slice_verify_priority(dls->priority)) { - LOG_E(FLEXRAN_AGENT, "[%d] illegal DL slice priority (%d)\n", mod_id, dls->priority); + LOG_E(FLEXRAN_AGENT, "[%d][DL slice %d] illegal DL slice priority (%d)\n", + mod_id, dls->id, dls->priority); return 0; } if (!flexran_dl_slice_verify_position(dls->position_low, dls->position_high)) { - LOG_E(FLEXRAN_AGENT, "[%d] illegal DL slice position low (%d) and/or high (%d)\n", - mod_id, dls->position_low, dls->position_high); + LOG_E(FLEXRAN_AGENT, + "[%d][DL slice %d] illegal DL slice position low (%d) and/or high (%d)\n", + mod_id, dls->id, dls->position_low, dls->position_high); return 0; } if (!flexran_dl_slice_verify_maxmcs(dls->maxmcs)) { - LOG_E(FLEXRAN_AGENT, "[%d] illegal DL slice max mcs %d\n", mod_id, dls->maxmcs); + LOG_E(FLEXRAN_AGENT, "[%d][DL slice %d] illegal DL slice max mcs %d\n", + mod_id, dls->id, dls->maxmcs); return 0; } if (dls->n_sorting == 0) { - LOG_E(FLEXRAN_AGENT, "[%d] no sorting in DL slice", mod_id); + LOG_E(FLEXRAN_AGENT, "[%d][DL slice %d] no sorting in DL slice\n", + mod_id, dls->id); return 0; } if (!dls->sorting) { - LOG_E(FLEXRAN_AGENT, "[%d] no sorting found in DL slice\n", mod_id); + LOG_E(FLEXRAN_AGENT, "[%d][DL slice %d] no sorting found in DL slice\n", + mod_id, dls->id); return 0; } /* sorting is an enum */ /* accounting is an enum */ if (!dls->scheduler_name) { - LOG_E(FLEXRAN_AGENT, "[%d] no scheduler name found\n", mod_id); + LOG_E(FLEXRAN_AGENT, "[%d][DL slice %d] no scheduler name found\n", + mod_id, dls->id); return 0; } if (strcmp(dls->scheduler_name, "schedule_ue_spec") != 0) { - LOG_E(FLEXRAN_AGENT, "[%d] setting the scheduler to something different " - "than schedule_ue_spec is currently not allowed\n", mod_id); + LOG_E(FLEXRAN_AGENT, "[%d][DL slice %d] setting the scheduler to something " + "different than schedule_ue_spec is currently not allowed\n", + mod_id, dls->id); return 0; } @@ -125,7 +133,8 @@ int flexran_verify_group_dl_slices(mid_t mod_id, Protocol__FlexDlSlice **existin } if (n < 1 || n > MAX_NUM_SLICES) { - LOG_E(FLEXRAN_AGENT, "[%d] Illegal number of resulting slices (%d -> %d)\n", mod_id, n_ex, n); + LOG_E(FLEXRAN_AGENT, "[%d] Illegal number of resulting DL slices (%d -> %d)\n", + mod_id, n_ex, n); return 0; } @@ -144,7 +153,9 @@ int flexran_verify_group_dl_slices(mid_t mod_id, Protocol__FlexDlSlice **existin pct += update[i]->percentage; } if (pct < 1 || pct > 100) { - LOG_E(FLEXRAN_AGENT, "[%d] invalid total RB share (%d%% -> %d%%)\n", mod_id, pct_orig, pct); + LOG_E(FLEXRAN_AGENT, + "[%d] invalid total RB share for DL slices (%d%% -> %d%%)\n", + mod_id, pct_orig, pct); return 0; } @@ -162,41 +173,49 @@ int flexran_verify_ul_slice(mid_t mod_id, Protocol__FlexUlSlice *uls) /* verify parameters individually */ /* label is enum */ if (!flexran_ul_slice_verify_pct(uls->percentage)) { - LOG_E(FLEXRAN_AGENT, "[%d] illegal UL slice percentage (%d)\n", mod_id, uls->percentage); + LOG_E(FLEXRAN_AGENT, "[%d][UL slice %d] illegal UL slice percentage (%d)\n", + mod_id, uls->id, uls->percentage); return 0; } /* isolation is a protobuf bool */ if (!flexran_ul_slice_verify_priority(uls->priority)) { - LOG_E(FLEXRAN_AGENT, "[%d] illegal UL slice percentage (%d)\n", mod_id, uls->priority); + LOG_E(FLEXRAN_AGENT, "[%d][UL slice %d] illegal UL slice percentage (%d)\n", + mod_id, uls->id, uls->priority); return 0; } if (!flexran_ul_slice_verify_first_rb(uls->first_rb)) { - LOG_E(FLEXRAN_AGENT, "[%d] illegal UL slice first RB (%d)\n", mod_id, uls->first_rb); + LOG_E(FLEXRAN_AGENT, "[%d][UL slice %d] illegal UL slice first RB (%d)\n", + mod_id, uls->id, uls->first_rb); return 0; } if (!flexran_ul_slice_verify_maxmcs(uls->maxmcs)) { - LOG_E(FLEXRAN_AGENT, "[%d] illegal UL slice max mcs (%d)\n", mod_id, uls->maxmcs); + LOG_E(FLEXRAN_AGENT, "[%d][UL slice %d] illegal UL slice max mcs (%d)\n", + mod_id, uls->id, uls->maxmcs); return 0; } /* TODO if (uls->n_sorting == 0) { - LOG_E(FLEXRAN_AGENT, "[%d] no sorting in UL slice\n", mod_id); + LOG_E(FLEXRAN_AGENT, "[%d][UL slice %d] no sorting in UL slice\n", + mod_id, uls->id); return 0; } if (!uls->sorting) { - LOG_E(FLEXRAN_AGENT, "[%d] no sorting found in UL slice\n", mod_id); + LOG_E(FLEXRAN_AGENT, "[%d][UL slice %d] no sorting found in UL slice\n", + mod_id, uls->id); return 0; } */ /* sorting is an enum */ /* accounting is an enum */ if (!uls->scheduler_name) { - LOG_E(FLEXRAN_AGENT, "[%d] no scheduler name found\n", mod_id); + LOG_E(FLEXRAN_AGENT, "[%d][UL slice %d] no scheduler name found\n", + mod_id, uls->id); return 0; } if (strcmp(uls->scheduler_name, "schedule_ulsch_rnti") != 0) { - LOG_E(FLEXRAN_AGENT, "[%d] setting the scheduler to something different " - "than schedule_ulsch_rnti is currently not allowed\n", mod_id); + LOG_E(FLEXRAN_AGENT, "[%d][UL slice %d] setting the scheduler to something " + "different than schedule_ulsch_rnti is currently not allowed\n", + mod_id, uls->id); return 0; } @@ -235,7 +254,8 @@ int flexran_verify_group_ul_slices(mid_t mod_id, Protocol__FlexUlSlice **existin } if (n < 1 || n > MAX_NUM_SLICES) { - LOG_E(FLEXRAN_AGENT, "[%d] Illegal number of resulting slices (%d -> %d)\n", mod_id, n_ex, n); + LOG_E(FLEXRAN_AGENT, "[%d] Illegal number of resulting UL slices (%d -> %d)\n", + mod_id, n_ex, n); return 0; } @@ -254,7 +274,8 @@ int flexran_verify_group_ul_slices(mid_t mod_id, Protocol__FlexUlSlice **existin pct += update[i]->percentage; } if (pct < 1 || pct > 100) { - LOG_E(FLEXRAN_AGENT, "[%d] invalid total RB share (%d%% -> %d%%)\n", mod_id, pct_orig, pct); + LOG_E(FLEXRAN_AGENT, "[%d] invalid total RB share (%d%% -> %d%%)\n", + mod_id, pct_orig, pct); return 0; } From 7a0c00330b2b134f32bf3b1f335a55d189faf729 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 21 May 2018 14:34:37 +0200 Subject: [PATCH 125/379] put intra-/inter slice sharing within slice config --- .../CONTROL_MODULES/MAC/flexran_agent_mac.c | 3 ++ .../MAC/flexran_agent_mac_internal.c | 48 +++++++++++++++++++ .../MAC/flexran_agent_mac_internal.h | 8 ++++ .../ENB_APP/MESSAGES/V2/config_messages.proto | 12 ++--- 4 files changed, 65 insertions(+), 6 deletions(-) diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c index 1daf0d5183..273cb66567 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c @@ -1393,6 +1393,8 @@ void flexran_create_config_structures(mid_t mod_id) sc_update[mod_id] = flexran_agent_create_slice_config(n_dl, m_ul); if (!slice_config[mod_id] || !sc_update[mod_id]) return; + flexran_agent_read_slice_config(mod_id, slice_config[mod_id]); + flexran_agent_read_slice_config(mod_id, sc_update[mod_id]); for (i = 0; i < n_dl; i++) { flexran_agent_read_slice_dl_config(mod_id, i, slice_config[mod_id]->dl[i]); flexran_agent_read_slice_dl_config(mod_id, i, sc_update[mod_id]->dl[i]); @@ -1526,6 +1528,7 @@ void flexran_agent_slice_update(mid_t mod_id) sc_update[mod_id]->ul[i]); flexran_agent_read_slice_ul_config(mod_id, i, slice_config[mod_id]->ul[i]); } + flexran_agent_read_slice_config(mod_id, slice_config[mod_id]); if (n_ue_slice_assoc_updates > 0) { changes += apply_ue_slice_assoc_update(mod_id); } diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c index 1289e7551f..1c2aef3baa 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c @@ -939,6 +939,14 @@ Protocol__FlexSliceConfig *flexran_agent_create_slice_config(int n_dl, int m_ul) return fsc; } +void flexran_agent_read_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *s) +{ + s->intraslice_share_active = flexran_get_intraslice_sharing_active(mod_id); + s->has_intraslice_share_active = 1; + s->interslice_share_active = flexran_get_interslice_sharing_active(mod_id); + s->has_interslice_share_active = 1; +} + void flexran_agent_read_slice_dl_config(mid_t mod_id, int slice_idx, Protocol__FlexDlSlice *dl_slice) { dl_slice->id = flexran_get_dl_slice_id(mod_id, slice_idx); @@ -1042,6 +1050,24 @@ int check_ul_sorting_update(Protocol__FlexUlSlice *old, Protocol__FlexUlSlice *n return sorting_update; } +void overwrite_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *exist, Protocol__FlexSliceConfig *update) +{ + if (update->has_intraslice_share_active + && exist->intraslice_share_active != update->intraslice_share_active) { + LOG_I(FLEXRAN_AGENT, "[%d] update intraslice_share_active: %d -> %d\n", + mod_id, exist->intraslice_share_active, update->intraslice_share_active); + exist->intraslice_share_active = update->intraslice_share_active; + exist->has_intraslice_share_active = 1; + } + if (update->has_interslice_share_active + && exist->interslice_share_active != update->interslice_share_active) { + LOG_I(FLEXRAN_AGENT, "[%d] update interslice_share_active: %d -> %d\n", + mod_id, exist->interslice_share_active, update->interslice_share_active); + exist->interslice_share_active = update->interslice_share_active; + exist->has_interslice_share_active = 1; + } +} + void overwrite_slice_config_dl(mid_t mod_id, Protocol__FlexDlSlice *exist, Protocol__FlexDlSlice *update) { if (update->label != exist->label) { @@ -1333,6 +1359,11 @@ void prepare_update_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *sup) } pthread_mutex_lock(&sc_update_mtx); + /* no need for tests in the current state as there are only two protobuf + * bools for intra-/interslice sharing. The function applies new values if + * applicable */ + overwrite_slice_config(mod_id, sc_update[mod_id], sup); + if (sup->n_dl == 0) { LOG_I(FLEXRAN_AGENT, "[%d] no DL slice configuration in flex_slice_config message\n", mod_id); } else { @@ -1408,6 +1439,23 @@ void prepare_update_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *sup) perform_slice_config_update_count = 1; } +int apply_new_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *olds, Protocol__FlexSliceConfig *news) +{ + /* not setting the old configuration is intentional, as it will be picked up + * later when reading the configuration. There is thus a direct feedback + * whether it has been set. */ + int changes = 0; + if (olds->intraslice_share_active != news->intraslice_share_active) { + flexran_set_intraslice_sharing_active(mod_id, news->intraslice_share_active); + changes++; + } + if (olds->interslice_share_active != news->interslice_share_active) { + flexran_set_interslice_sharing_active(mod_id, news->interslice_share_active); + changes++; + } + return changes; +} + int apply_new_slice_dl_config(mid_t mod_id, Protocol__FlexDlSlice *oldc, Protocol__FlexDlSlice *newc) { /* not setting the old configuration is intentional, as it will be picked up diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.h b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.h index 2f8f3f8258..01fc51f6a6 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.h +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.h @@ -113,6 +113,10 @@ int load_dl_scheduler_function(mid_t mod_id, const char *function_name); * configs and m_ul UL slice configs */ Protocol__FlexSliceConfig *flexran_agent_create_slice_config(int n_dl, int m_ul); +/* read the general slice parameters via RAN into the given + * Protocol__FlexSliceConfig struct */ +void flexran_agent_read_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *s); + /* read the DL slice config via the RAN into a given Protocol__FlexDlSlice * struct */ void flexran_agent_read_slice_dl_config(mid_t mod_id, int slice_idx, Protocol__FlexDlSlice *dl_slice); @@ -125,6 +129,10 @@ void flexran_agent_read_slice_ul_config(mid_t mod_id, int slice_idx, Protocol__F * applied later by performing a diff between slice_config and sc_update */ void prepare_update_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *slice); +/* apply generic slice parameters (e.g. intra-/interslice sharing activated or + * not) if there are changes. Returns the number of changed parameters. */ +int apply_new_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *olds, Protocol__FlexSliceConfig *news); + /* apply new configuration of slice in DL if there are changes between the * parameters. Returns the number of changed parameters. */ int apply_new_slice_dl_config(mid_t mod_id, Protocol__FlexDlSlice *oldc, Protocol__FlexDlSlice *newc); diff --git a/openair2/ENB_APP/MESSAGES/V2/config_messages.proto b/openair2/ENB_APP/MESSAGES/V2/config_messages.proto index b186193b8c..0dd5140efa 100644 --- a/openair2/ENB_APP/MESSAGES/V2/config_messages.proto +++ b/openair2/ENB_APP/MESSAGES/V2/config_messages.proto @@ -44,16 +44,16 @@ message flex_cell_config { optional int32 dl_pdsch_power = 38; // operating downlink power optional int32 ul_pusch_power = 39; // operating uplink power - // whether remaining RBs after first intra-slice allocation will - // be allocated to UEs of the same slice - optional bool intraslice_share_active = 40; - // whether remaining RBs after slice allocation will be allocated - // to UEs of another slice. Isolated slices will be ignored. - optional bool interslice_share_active = 41; optional flex_slice_config slice_config = 42; } message flex_slice_config { + // whether remaining RBs after first intra-slice allocation will + // be allocated to UEs of the same slice + optional bool intraslice_share_active = 4; + // whether remaining RBs after slice allocation will be allocated + // to UEs of another slice. Isolated slices will be ignored. + optional bool interslice_share_active = 3; repeated flex_dl_slice dl = 1; repeated flex_ul_slice ul = 2; } From ef0d86564c205262b077e9d5b9d9ea8eb003e18c Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 21 May 2018 12:26:48 +0200 Subject: [PATCH 126/379] when sending config report, copy slice config to new mem --- .../CONTROL_MODULES/MAC/flexran_agent_mac.c | 70 ++++++++++++++++++- openair2/ENB_APP/flexran_agent_common.c | 19 ++++- 2 files changed, 86 insertions(+), 3 deletions(-) diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c index 273cb66567..7a61bad6d3 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c @@ -1540,5 +1540,73 @@ void flexran_agent_slice_update(mid_t mod_id) Protocol__FlexSliceConfig *flexran_agent_get_slice_config(mid_t mod_id) { - return slice_config[mod_id]; + if (!slice_config[mod_id]) return NULL; + Protocol__FlexSliceConfig *config = NULL; + + pthread_mutex_lock(&sc_update_mtx); + config = flexran_agent_create_slice_config(slice_config[mod_id]->n_dl, + slice_config[mod_id]->n_ul); + if (!config) { + pthread_mutex_unlock(&sc_update_mtx); + return NULL; + } + config->has_intraslice_share_active = 1; + config->intraslice_share_active = slice_config[mod_id]->intraslice_share_active; + config->has_interslice_share_active = 1; + config->interslice_share_active = slice_config[mod_id]->interslice_share_active; + for (int i = 0; i < slice_config[mod_id]->n_dl; ++i) { + if (!config->dl[i]) continue; + config->dl[i]->has_id = 1; + config->dl[i]->id = slice_config[mod_id]->dl[i]->id; + config->dl[i]->has_label = 1; + config->dl[i]->label = slice_config[mod_id]->dl[i]->label; + config->dl[i]->has_percentage = 1; + config->dl[i]->percentage = slice_config[mod_id]->dl[i]->percentage; + config->dl[i]->has_isolation = 1; + config->dl[i]->isolation = slice_config[mod_id]->dl[i]->isolation; + config->dl[i]->has_priority = 1; + config->dl[i]->priority = slice_config[mod_id]->dl[i]->priority; + config->dl[i]->has_position_low = 1; + config->dl[i]->position_low = slice_config[mod_id]->dl[i]->position_low; + config->dl[i]->has_position_high = 1; + config->dl[i]->position_high = slice_config[mod_id]->dl[i]->position_high; + config->dl[i]->has_maxmcs = 1; + config->dl[i]->maxmcs = slice_config[mod_id]->dl[i]->maxmcs; + config->dl[i]->n_sorting = slice_config[mod_id]->dl[i]->n_sorting; + config->dl[i]->sorting = calloc(config->dl[i]->n_sorting, sizeof(Protocol__FlexDlSorting)); + if (!config->dl[i]->sorting) config->dl[i]->n_sorting = 0; + for (int j = 0; j < config->dl[i]->n_sorting; ++j) + config->dl[i]->sorting[j] = slice_config[mod_id]->dl[i]->sorting[j]; + config->dl[i]->has_accounting = 1; + config->dl[i]->accounting = slice_config[mod_id]->dl[i]->accounting; + config->dl[i]->scheduler_name = strdup(slice_config[mod_id]->dl[i]->scheduler_name); + } + for (int i = 0; i < slice_config[mod_id]->n_ul; ++i) { + if (!config->ul[i]) continue; + config->ul[i]->has_id = 1; + config->ul[i]->id = slice_config[mod_id]->ul[i]->id; + config->ul[i]->has_label = 1; + config->ul[i]->label = slice_config[mod_id]->ul[i]->label; + config->ul[i]->has_percentage = 1; + config->ul[i]->percentage = slice_config[mod_id]->ul[i]->percentage; + config->ul[i]->has_isolation = 1; + config->ul[i]->isolation = slice_config[mod_id]->ul[i]->isolation; + config->ul[i]->has_priority = 1; + config->ul[i]->priority = slice_config[mod_id]->ul[i]->priority; + config->ul[i]->has_first_rb = 1; + config->ul[i]->first_rb = slice_config[mod_id]->ul[i]->first_rb; + config->ul[i]->has_maxmcs = 1; + config->ul[i]->maxmcs = slice_config[mod_id]->ul[i]->maxmcs; + config->ul[i]->n_sorting = slice_config[mod_id]->ul[i]->n_sorting; + config->ul[i]->sorting = calloc(config->ul[i]->n_sorting, sizeof(Protocol__FlexUlSorting)); + if (!config->ul[i]->sorting) config->ul[i]->n_sorting = 0; + for (int j = 0; j < config->ul[i]->n_sorting; ++j) + config->ul[i]->sorting[j] = slice_config[mod_id]->ul[i]->sorting[j]; + config->ul[i]->has_accounting = 1; + config->ul[i]->accounting = slice_config[mod_id]->ul[i]->accounting; + config->ul[i]->scheduler_name = strdup(slice_config[mod_id]->ul[i]->scheduler_name); + } + + pthread_mutex_unlock(&sc_update_mtx); + return config; } diff --git a/openair2/ENB_APP/flexran_agent_common.c b/openair2/ENB_APP/flexran_agent_common.c index d08517edea..b6a7fa26cd 100644 --- a/openair2/ENB_APP/flexran_agent_common.c +++ b/openair2/ENB_APP/flexran_agent_common.c @@ -288,11 +288,26 @@ int flexran_agent_destroy_enb_config_reply(Protocol__FlexranMessage *msg) { free(reply->cell_config[i]->si_config->si_message); free(reply->cell_config[i]->si_config); } + if (reply->cell_config[i]->slice_config != NULL) { + for (j = 0; j < reply->cell_config[i]->slice_config->n_dl; ++j) { + if (reply->cell_config[i]->slice_config->dl[j]->n_sorting > 0) + free(reply->cell_config[i]->slice_config->dl[j]->sorting); + free(reply->cell_config[i]->slice_config->dl[j]->scheduler_name); + free(reply->cell_config[i]->slice_config->dl[j]); + } + free(reply->cell_config[i]->slice_config->dl); + for (j = 0; j < reply->cell_config[i]->slice_config->n_ul; ++j) { + if (reply->cell_config[i]->slice_config->ul[j]->n_sorting > 0) + free(reply->cell_config[i]->slice_config->ul[j]->sorting); + free(reply->cell_config[i]->slice_config->ul[j]->scheduler_name); + free(reply->cell_config[i]->slice_config->ul[j]); + } + free(reply->cell_config[i]->slice_config->ul); + free(reply->cell_config[i]->slice_config); + } free(reply->cell_config[i]); } free(reply->cell_config); - /* don't free the slice_config, it is maintained internally during - * the liftetime of the agent */ free(reply); free(msg); From 0846460753b1bed8ff42d16f554b40e7f81d5ccd Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 5 Apr 2018 12:39:34 +0200 Subject: [PATCH 127/379] show which task sends TERMINATE_MESSAGE to which task --- targets/RT/USER/lte-softmodem.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index a1130ce387..e747d38089 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -773,12 +773,13 @@ void wait_eNBs(void) { /* * helper function to terminate a certain ITTI task */ -void terminate_task(task_id_t task_id, module_id_t mod_id) +void terminate_task(module_id_t mod_id, task_id_t from, task_id_t to) { - LOG_I(ENB_APP, "sending TERMINATE_MESSAGE to task %s (%d)\n", itti_get_task_name(task_id), task_id); + LOG_I(ENB_APP, "sending TERMINATE_MESSAGE from task %s (%d) to task %s (%d)\n", + itti_get_task_name(from), from, itti_get_task_name(to), to); MessageDef *msg; - msg = itti_alloc_new_message (ENB_APP, TERMINATE_MESSAGE); - itti_send_msg_to_task (task_id, ENB_MODULE_ID_TO_INSTANCE(mod_id), msg); + msg = itti_alloc_new_message (from, TERMINATE_MESSAGE); + itti_send_msg_to_task (to, ENB_MODULE_ID_TO_INSTANCE(mod_id), msg); } extern void free_transport(PHY_VARS_eNB *); @@ -814,8 +815,8 @@ int stop_L1L2(module_id_t enb_id) } /* these tasks need to pick up new configuration */ - terminate_task(TASK_RRC_ENB, enb_id); - terminate_task(TASK_L2L1, enb_id); + terminate_task(enb_id, TASK_ENB_APP, TASK_RRC_ENB); + terminate_task(enb_id, TASK_ENB_APP, TASK_L2L1); LOG_I(ENB_APP, "calling kill_eNB_proc() for instance %d\n", enb_id); kill_eNB_proc(enb_id); LOG_I(ENB_APP, "calling kill_RU_proc() for instance %d\n", enb_id); From 35b3a2af14ab8c5ec8b544fca11a46e9d0db593b Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 5 Apr 2018 13:30:44 +0200 Subject: [PATCH 128/379] Reorganize TASK_L2L1 loop --- targets/RT/USER/lte-softmodem.c | 52 +++++++++------------------------ 1 file changed, 14 insertions(+), 38 deletions(-) diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index e747d38089..60b5a0b15f 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -449,46 +449,22 @@ void *l2l1_task(void *arg) { itti_set_task_real_time(TASK_L2L1); itti_mark_task_ready(TASK_L2L1); - /* Wait for the initialize message */ - printf("Wait for the ITTI initialize message\n"); - do { - if (message_p != NULL) { - result = itti_free (ITTI_MSG_ORIGIN_ID(message_p), message_p); - AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); - } - - itti_receive_msg (TASK_L2L1, &message_p); - - switch (ITTI_MSG_ID(message_p)) { - case INITIALIZE_MESSAGE: - /* Start eNB thread */ - printf("L2L1 TASK received %s\n", ITTI_MSG_NAME(message_p)); - start_eNB = 1; - break; - - case TERMINATE_MESSAGE: - printf("received terminate message\n"); - oai_exit=1; - start_eNB = 0; - itti_exit_task (); - break; - - default: - printf("Received unexpected message %s\n", ITTI_MSG_NAME(message_p)); - break; - } - } while (ITTI_MSG_ID(message_p) != INITIALIZE_MESSAGE); - - result = itti_free (ITTI_MSG_ORIGIN_ID(message_p), message_p); - AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); -/* ???? no else but seems to be UE only ??? - do { - // Wait for a message + /* Wait for the initialize message */ + printf("Wait for the ITTI initialize message\n"); + while (1) { itti_receive_msg (TASK_L2L1, &message_p); switch (ITTI_MSG_ID(message_p)) { + case INITIALIZE_MESSAGE: + /* Start eNB thread */ + LOG_D(PHY, "L2L1 TASK received %s\n", ITTI_MSG_NAME(message_p)); + start_eNB = 1; + break; + case TERMINATE_MESSAGE: + LOG_W(PHY, " *** Exiting L2L1 thread\n"); oai_exit=1; + start_eNB = 0; itti_exit_task (); break; @@ -511,8 +487,9 @@ void *l2l1_task(void *arg) { result = itti_free (ITTI_MSG_ORIGIN_ID(message_p), message_p); AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); - } while(!oai_exit); -*/ + message_p = NULL; + }; + return NULL; } #endif @@ -788,7 +765,6 @@ extern void phy_free_RU(RU_t*); int stop_L1L2(module_id_t enb_id) { LOG_W(ENB_APP, "stopping lte-softmodem\n"); - oai_exit = 1; if (!RC.ru) { LOG_UI(ENB_APP, "no RU configured\n"); From c56b5af00e1e1d402d094d03db7011097e738ae7 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 20 Apr 2018 08:45:44 +0200 Subject: [PATCH 129/379] bugfix: kill td/te threads only if initialized * init_td_thread()/init_te_thread() are only initialized depending on condition get_nprocs() > 2 && codingw * apply the same the same for the functions kill_td_thread()/kill_te_thread() --- targets/RT/USER/lte-enb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index c8c35cf2e8..5dcb84d63c 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -1031,8 +1031,10 @@ void kill_eNB_proc(int inst) { proc = &eNB->proc; proc_rxtx = &proc->proc_rxtx[0]; - kill_td_thread(eNB); - kill_te_thread(eNB); + if(get_nprocs() > 2 && codingw) { + kill_td_thread(eNB); + kill_te_thread(eNB); + } LOG_I(PHY, "Killing TX CC_id %d inst %d\n", CC_id, inst ); for (i=0; i<2; i++) { pthread_mutex_lock(&proc_rxtx[i].mutex_rxtx); From 2e1dfb5b3e422681f1ae8fe746e9b5943dbaf580 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 20 Apr 2018 14:24:20 +0200 Subject: [PATCH 130/379] place oai_exit test after wait_on_condition() in threads --- targets/RT/USER/lte-enb.c | 4 ++-- targets/RT/USER/lte-ru.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 5dcb84d63c..61d689e182 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -783,10 +783,10 @@ static void* eNB_thread_prach( void* param ) { while (!oai_exit) { - if (oai_exit) break; if (wait_on_condition(&proc->mutex_prach,&proc->cond_prach,&proc->instance_cnt_prach,"eNB_prach_thread") < 0) break; + if (oai_exit) break; LOG_D(PHY,"Running eNB prach procedures\n"); prach_procedures(eNB @@ -824,10 +824,10 @@ static void* eNB_thread_prach_br( void* param ) { while (!oai_exit) { - if (oai_exit) break; if (wait_on_condition(&proc->mutex_prach_br,&proc->cond_prach_br,&proc->instance_cnt_prach_br,"eNB_prach_thread_br") < 0) break; + if (oai_exit) break; LOG_D(PHY,"Running eNB prach procedures for BL/CE UEs\n"); prach_procedures(eNB,1); diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index 578b647d96..0a25dca360 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -1080,8 +1080,8 @@ static void* ru_thread_prach( void* param ) { while (!oai_exit) { - if (oai_exit) break; if (wait_on_condition(&proc->mutex_prach,&proc->cond_prach,&proc->instance_cnt_prach,"ru_prach_thread") < 0) break; + if (oai_exit) break; VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_RU_PRACH_RX, 1 ); if (ru->eNB_list[0]){ prach_procedures( @@ -1130,8 +1130,8 @@ static void* ru_thread_prach_br( void* param ) { while (!oai_exit) { - if (oai_exit) break; if (wait_on_condition(&proc->mutex_prach_br,&proc->cond_prach_br,&proc->instance_cnt_prach_br,"ru_prach_thread_br") < 0) break; + if (oai_exit) break; rx_prach(NULL, ru, NULL, From f0670154b332af38b9cb7c25800fff245a422176 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 20 Apr 2018 14:25:41 +0200 Subject: [PATCH 131/379] Correctly join RU threads * join pthread_FH (ru_thread) once all condition variables have been set * join RU FHTX only if it has been started (check as for pthread_create()) * join PRACH thread in the monolithic case * send broadcast on condition variable cond_eNBs, as there can be multiple waits on it * integrate stop_ru(*ru) into kill_RU_proc(*ru) * Correct memory freeing --- targets/RT/USER/lte-ru.c | 79 +++++++++++++++------------------ targets/RT/USER/lte-softmodem.c | 34 +++++++------- targets/RT/USER/lte-softmodem.h | 2 +- 3 files changed, 53 insertions(+), 62 deletions(-) diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index 0a25dca360..d20b614ad7 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -2230,11 +2230,36 @@ void init_RU_proc(RU_t *ru) { } -void kill_RU_proc(int inst) +void kill_RU_proc(RU_t *ru) { - RU_t *ru = RC.ru[inst]; RU_proc_t *proc = &ru->proc; +#if defined(PRE_SCD_THREAD) + pthread_mutex_lock(&proc->mutex_pre_scd); + ru->proc.instance_pre_scd = 0; + pthread_cond_signal(&proc->cond_pre_scd); + pthread_mutex_unlock(&proc->mutex_pre_scd); + pthread_join(proc->pthread_pre_scd, NULL); + pthread_mutex_destroy(&proc->mutex_pre_scd); + pthread_cond_destroy(&proc->cond_pre_scd); +#endif +#ifdef PHY_TX_THREAD + pthread_mutex_lock(&proc->mutex_phy_tx); + proc->instance_cnt_phy_tx = 0; + pthread_cond_signal(&proc->cond_phy_tx); + pthread_mutex_unlock(&proc->mutex_phy_tx); + pthread_join(ru->proc.pthread_phy_tx, NULL); + pthread_mutex_destroy( &proc->mutex_phy_tx); + pthread_cond_destroy( &proc->cond_phy_tx); + pthread_mutex_lock(&proc->mutex_rf_tx); + proc->instance_cnt_rf_tx = 0; + pthread_cond_signal(&proc->cond_rf_tx); + pthread_mutex_unlock(&proc->mutex_rf_tx); + pthread_join(proc->pthread_rf_tx, NULL); + pthread_mutex_destroy( &proc->mutex_rf_tx); + pthread_cond_destroy( &proc->cond_rf_tx); +#endif + if (get_nprocs() > 2 && fepw) { LOG_D(PHY, "killing FEP thread\n"); kill_fep_thread(ru); @@ -2271,8 +2296,10 @@ void kill_RU_proc(int inst) pthread_mutex_lock(&proc->mutex_eNBs); proc->ru_tx_ready = 0; - proc->instance_cnt_eNBs = 0; - pthread_cond_signal(&proc->cond_eNBs); + proc->instance_cnt_eNBs = 1; + // cond_eNBs is used by both ru_thread and ru_thread_tx, so we need to send + // a broadcast to wake up both threads + pthread_cond_broadcast(&proc->cond_eNBs); pthread_mutex_unlock(&proc->mutex_eNBs); pthread_mutex_lock(&proc->mutex_asynch_rxtx); @@ -2280,10 +2307,12 @@ void kill_RU_proc(int inst) pthread_cond_signal(&proc->cond_asynch_rxtx); pthread_mutex_unlock(&proc->mutex_asynch_rxtx); - /*LOG_D(PHY, "Joining pthread_FH\n"); + LOG_D(PHY, "Joining pthread_FH\n"); pthread_join(proc->pthread_FH, NULL); - LOG_D(PHY, "Joining pthread_FHTX\n"); - pthread_join(proc->pthread_FH1, NULL);*/ + if (!single_thread_flag && get_nprocs() > 4) { + LOG_D(PHY, "Joining pthread_FHTX\n"); + pthread_join(proc->pthread_FH1, NULL); + } if (ru->function == NGFI_RRU_IF4p5) { LOG_D(PHY, "Joining pthread_prach\n"); pthread_join(proc->pthread_prach, NULL); @@ -2755,45 +2784,11 @@ void init_RU(char *rf_config_file) { } - - - -void stop_ru(RU_t *ru) { - -#if defined(PRE_SCD_THREAD) || defined(PHY_TX_THREAD) - int *status; -#endif - printf("Stopping RU %p processing threads\n",(void*)ru); -#if defined(PRE_SCD_THREAD) - if(ru){ - ru->proc.instance_pre_scd = 0; - pthread_cond_signal( &ru->proc.cond_pre_scd ); - pthread_join(ru->proc.pthread_pre_scd, (void**)&status ); - pthread_mutex_destroy(&ru->proc.mutex_pre_scd ); - pthread_cond_destroy(&ru->proc.cond_pre_scd ); - } -#endif -#ifdef PHY_TX_THREAD - if(ru){ - ru->proc.instance_cnt_phy_tx = 0; - pthread_cond_signal(&ru->proc.cond_phy_tx); - pthread_join( ru->proc.pthread_phy_tx, (void**)&status ); - pthread_mutex_destroy( &ru->proc.mutex_phy_tx ); - pthread_cond_destroy( &ru->proc.cond_phy_tx ); - ru->proc.instance_cnt_rf_tx = 0; - pthread_cond_signal(&ru->proc.cond_rf_tx); - pthread_join( ru->proc.pthread_rf_tx, (void**)&status ); - pthread_mutex_destroy( &ru->proc.mutex_rf_tx ); - pthread_cond_destroy( &ru->proc.cond_rf_tx ); - } -#endif -} - void stop_RU(int nb_ru) { for (int inst = 0; inst < nb_ru; inst++) { LOG_I(PHY, "Stopping RU %d processing threads\n", inst); - kill_RU_proc(inst); + kill_RU_proc(RC.ru[inst]); } } diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 60b5a0b15f..25a55a6e56 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -793,10 +793,11 @@ int stop_L1L2(module_id_t enb_id) /* these tasks need to pick up new configuration */ terminate_task(enb_id, TASK_ENB_APP, TASK_RRC_ENB); terminate_task(enb_id, TASK_ENB_APP, TASK_L2L1); + oai_exit = 1; LOG_I(ENB_APP, "calling kill_eNB_proc() for instance %d\n", enb_id); kill_eNB_proc(enb_id); LOG_I(ENB_APP, "calling kill_RU_proc() for instance %d\n", enb_id); - kill_RU_proc(enb_id); + kill_RU_proc(RC.ru[enb_id]); oai_exit = 0; for (int cc_id = 0; cc_id < RC.nb_CC[enb_id]; cc_id++) { free_transport(RC.eNB[enb_id][cc_id]); @@ -1241,25 +1242,20 @@ int main( int argc, char **argv ) printf("stopping MODEM threads\n"); - // cleanup - for (ru_id=0;ru_id Date: Thu, 26 Apr 2018 17:17:56 +0200 Subject: [PATCH 132/379] cell reconfiguration/restart: take protobuf, perform in ENB_APP * instead of the lengthy YAML parsing, can now handle protobuf message * after setting the parameters, send a message to ENB_APP to perform it * old YAML way still works --- openair2/COMMON/flexran_messages_def.h | 29 +++++++ openair2/COMMON/messages_def.h | 2 +- openair2/ENB_APP/enb_app.c | 54 +++++++++++++ openair2/ENB_APP/enb_app.h | 4 +- openair2/ENB_APP/flexran_agent_common.c | 7 +- .../ENB_APP/flexran_agent_common_internal.c | 81 +++++++------------ .../ENB_APP/flexran_agent_common_internal.h | 4 + 7 files changed, 124 insertions(+), 57 deletions(-) create mode 100644 openair2/COMMON/flexran_messages_def.h diff --git a/openair2/COMMON/flexran_messages_def.h b/openair2/COMMON/flexran_messages_def.h new file mode 100644 index 0000000000..fdcdf698dc --- /dev/null +++ b/openair2/COMMON/flexran_messages_def.h @@ -0,0 +1,29 @@ +/* + * 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.1 (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 + */ + +/* + * flexran_messages_def.h + * + * Created on: Apr 26, 2018 + * Author: R. Schmidt + */ + +MESSAGE_DEF(SOFT_RESTART_MESSAGE, MESSAGE_PRIORITY_MED_PLUS, IttiMsgEmpty, soft_restart_message) diff --git a/openair2/COMMON/messages_def.h b/openair2/COMMON/messages_def.h index 2434d15776..f6e2dd0f4b 100644 --- a/openair2/COMMON/messages_def.h +++ b/openair2/COMMON/messages_def.h @@ -38,4 +38,4 @@ #include "sctp_messages_def.h" #include "udp_messages_def.h" #include "gtpv1_u_messages_def.h" - +#include "flexran_messages_def.h" diff --git a/openair2/ENB_APP/enb_app.c b/openair2/ENB_APP/enb_app.c index f95fdd7e5a..89df62db7b 100644 --- a/openair2/ENB_APP/enb_app.c +++ b/openair2/ENB_APP/enb_app.c @@ -65,6 +65,8 @@ extern RAN_CONTEXT_t RC; # define ENB_REGISTER_RETRY_DELAY 10 # endif +#include "targets/RT/USER/lte-softmodem.h" + /*------------------------------------------------------------------------------*/ /* @@ -245,6 +247,10 @@ void *eNB_app_task(void *args_p) LOG_I(ENB_APP, "Received %s\n", ITTI_MSG_NAME(msg_p)); break; + case SOFT_RESTART_MESSAGE: + handle_reconfiguration(instance); + break; + case S1AP_REGISTER_ENB_CNF: # if defined(ENABLE_USE_MME) LOG_I(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p), @@ -322,3 +328,51 @@ void *eNB_app_task(void *args_p) return NULL; } + +void handle_reconfiguration(module_id_t mod_id) +{ + struct timespec start, end; + clock_gettime(CLOCK_MONOTONIC, &start); + flexran_agent_info_t *flexran = RC.flexran[mod_id]; + + if (ENB_WAIT == flexran->node_ctrl_state) { + /* this is already waiting, just release */ + pthread_mutex_lock(&flexran->mutex_node_ctrl); + flexran->node_ctrl_state = ENB_NORMAL_OPERATION; + pthread_mutex_unlock(&flexran->mutex_node_ctrl); + pthread_cond_signal(&flexran->cond_node_ctrl); + return; + } + + if (stop_L1L2(mod_id) < 0) { + LOG_E(ENB_APP, "can not stop lte-softmodem, aborting restart\n"); + return; + } + + /* node_ctrl_state should have value ENB_MAKE_WAIT only if this method is not + * executed by the FlexRAN thread */ + if (ENB_MAKE_WAIT == flexran->node_ctrl_state) { + LOG_I(ENB_APP, " * eNB %d: Waiting for FlexRAN RTController command *\n", mod_id); + pthread_mutex_lock(&flexran->mutex_node_ctrl); + flexran->node_ctrl_state = ENB_WAIT; + while (ENB_NORMAL_OPERATION != flexran->node_ctrl_state) + pthread_cond_wait(&flexran->cond_node_ctrl, &flexran->mutex_node_ctrl); + pthread_mutex_unlock(&flexran->mutex_node_ctrl); + } + + if (restart_L1L2(mod_id) < 0) { + LOG_F(ENB_APP, "can not restart, killing lte-softmodem\n"); + itti_terminate_tasks(TASK_PHY_ENB); + return; + } + + clock_gettime(CLOCK_MONOTONIC, &end); + end.tv_sec -= start.tv_sec; + if (end.tv_nsec >= start.tv_nsec) { + end.tv_nsec -= start.tv_nsec; + } else { + end.tv_sec -= 1; + end.tv_nsec = end.tv_nsec - start.tv_nsec + 1000000000; + } + LOG_I(ENB_APP, "lte-softmodem restart succeeded in %ld.%ld s\n", end.tv_sec, end.tv_nsec / 1000000); +} diff --git a/openair2/ENB_APP/enb_app.h b/openair2/ENB_APP/enb_app.h index 4dfea72eef..9eb5ea2400 100644 --- a/openair2/ENB_APP/enb_app.h +++ b/openair2/ENB_APP/enb_app.h @@ -31,11 +31,11 @@ #define ENB_APP_H_ #include +#include "platform_types.h" void *eNB_app_task(void *args_p); -/* needed for flexran: start PHY and RRC when restarting */ -void enb_app_start_phy_rrc(uint32_t enb_id_start, uint32_t enb_id_end); +void handle_reconfiguration(module_id_t mod_id); #endif /* ENB_APP_H_ */ diff --git a/openair2/ENB_APP/flexran_agent_common.c b/openair2/ENB_APP/flexran_agent_common.c index b6a7fa26cd..7578dec03f 100644 --- a/openair2/ENB_APP/flexran_agent_common.c +++ b/openair2/ENB_APP/flexran_agent_common.c @@ -1130,10 +1130,11 @@ int flexran_agent_handle_enb_config_reply(mid_t mod_id, const void *params, Prot if (enb_config->n_cell_config > 1) LOG_W(FLEXRAN_AGENT, "ignoring slice configs for other cell except cell 0\n"); - if (enb_config->cell_config[0]->slice_config) + if (enb_config->cell_config[0]->slice_config) { prepare_update_slice_config(mod_id, enb_config->cell_config[0]->slice_config); - - /* could test for cell configs here and maybe reconfigure/soft-restart */ + } else { + initiate_soft_restart(mod_id, enb_config->cell_config[0]); + } *msg = NULL; return 0; diff --git a/openair2/ENB_APP/flexran_agent_common_internal.c b/openair2/ENB_APP/flexran_agent_common_internal.c index 8874a0f648..501e878d32 100644 --- a/openair2/ENB_APP/flexran_agent_common_internal.c +++ b/openair2/ENB_APP/flexran_agent_common_internal.c @@ -31,57 +31,7 @@ #include "flexran_agent_common_internal.h" #include "flexran_agent_mac_internal.h" - -/* needed to soft-restart the lte-softmodem */ -#include "targets/RT/USER/lte-softmodem.h" - -void handle_reconfiguration(mid_t mod_id) -{ - struct timespec start, end; - clock_gettime(CLOCK_MONOTONIC, &start); - flexran_agent_info_t *flexran = RC.flexran[mod_id]; - - if (ENB_WAIT == flexran->node_ctrl_state) { - /* this is already waiting, just release */ - pthread_mutex_lock(&flexran->mutex_node_ctrl); - flexran->node_ctrl_state = ENB_NORMAL_OPERATION; - pthread_mutex_unlock(&flexran->mutex_node_ctrl); - pthread_cond_signal(&flexran->cond_node_ctrl); - return; - } - - if (stop_L1L2(mod_id) < 0) { - LOG_E(ENB_APP, "can not stop lte-softmodem, aborting restart\n"); - return; - } - - /* node_ctrl_state should have value ENB_MAKE_WAIT only if this method is not - * executed by the FlexRAN thread */ - if (ENB_MAKE_WAIT == flexran->node_ctrl_state) { - LOG_I(ENB_APP, " * eNB %d: Waiting for FlexRAN RTController command *\n", mod_id); - pthread_mutex_lock(&flexran->mutex_node_ctrl); - flexran->node_ctrl_state = ENB_WAIT; - while (ENB_NORMAL_OPERATION != flexran->node_ctrl_state) - pthread_cond_wait(&flexran->cond_node_ctrl, &flexran->mutex_node_ctrl); - pthread_mutex_unlock(&flexran->mutex_node_ctrl); - } - - if (restart_L1L2(mod_id) < 0) { - LOG_F(ENB_APP, "can not restart, killing lte-softmodem\n"); - itti_terminate_tasks(TASK_PHY_ENB); - return; - } - - clock_gettime(CLOCK_MONOTONIC, &end); - end.tv_sec -= start.tv_sec; - if (end.tv_nsec >= start.tv_nsec) { - end.tv_nsec -= start.tv_nsec; - } else { - end.tv_sec -= 1; - end.tv_nsec = end.tv_nsec - start.tv_nsec + 1000000000; - } - LOG_I(ENB_APP, "lte-softmodem restart succeeded in %ld.%ld s\n", end.tv_sec, end.tv_nsec / 1000000); -} +#include "enb_app.h" int apply_reconfiguration_policy(mid_t mod_id, const char *policy, size_t policy_length) { @@ -589,3 +539,32 @@ int apply_parameter_modification(void *parameter, yaml_parser_t *parser) { return -1; } + +void initiate_soft_restart(module_id_t mod_id, Protocol__FlexCellConfig *c) +{ + uint8_t cc_id = c->has_cell_id ? c->cell_id : 0; + if (c->has_eutra_band) { + flexran_agent_set_operating_eutra_band(mod_id, cc_id, c->eutra_band); + LOG_I(ENB_APP, "Setting eutra_band to %d\n", c->eutra_band); + } + if (c->has_dl_freq && c->has_ul_freq) { + flexran_agent_set_operating_dl_freq(mod_id, cc_id, c->dl_freq); + LOG_I(ENB_APP, "Setting dl_freq to %d\n", c->dl_freq); + int32_t ul_freq_offset = c->ul_freq - c->dl_freq; + flexran_agent_set_operating_ul_freq(mod_id, cc_id, ul_freq_offset); + LOG_I(ENB_APP, "Setting ul_freq to %d\n", c->ul_freq); + } + if (c->has_dl_bandwidth) { + flexran_agent_set_operating_bandwidth(mod_id, cc_id, c->dl_bandwidth); + LOG_I(ENB_APP, "Setting bandwidth to %d\n", c->dl_bandwidth); + if (c->has_ul_bandwidth && c->ul_bandwidth != c->dl_bandwidth) + LOG_W(ENB_APP, "UL/DL bandwidth mismatch, applied DL bandwidth\n"); + } else if (c->has_ul_bandwidth) { + flexran_agent_set_operating_bandwidth(mod_id, cc_id, c->ul_bandwidth); + LOG_I(ENB_APP, "Setting bandwidth to %d\n", c->ul_bandwidth); + } + + MessageDef *msg; + msg = itti_alloc_new_message(TASK_FLEXRAN_AGENT, SOFT_RESTART_MESSAGE); + itti_send_msg_to_task(ENB_APP, ENB_MODULE_ID_TO_INSTANCE(mod_id), msg); +} diff --git a/openair2/ENB_APP/flexran_agent_common_internal.h b/openair2/ENB_APP/flexran_agent_common_internal.h index bf908ac132..544321e228 100644 --- a/openair2/ENB_APP/flexran_agent_common_internal.h +++ b/openair2/ENB_APP/flexran_agent_common_internal.h @@ -32,6 +32,7 @@ #include #include "flexran_agent_defs.h" +#include "flexran.pb-c.h" int apply_reconfiguration_policy(mid_t mod_id, const char *policy, size_t policy_length); @@ -57,4 +58,7 @@ int skip_subsystem_parameters_config(yaml_parser_t *parser); //that is not yet implmeneted in order to skip its configuration, without affecting the rest int skip_parameter_modification(yaml_parser_t *parser); +// applies reconfiguration parameters and notifies ENB APP +void initiate_soft_restart(mid_t mod_id, Protocol__FlexCellConfig *c); + #endif From 917b9ca0c2ab2a039ed839eabf990f5eabf42973 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 27 Apr 2018 12:16:09 +0200 Subject: [PATCH 133/379] correct ITTI task name --- openair2/ENB_APP/flexran_agent_common_internal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/ENB_APP/flexran_agent_common_internal.c b/openair2/ENB_APP/flexran_agent_common_internal.c index 501e878d32..9f1a1d3710 100644 --- a/openair2/ENB_APP/flexran_agent_common_internal.c +++ b/openair2/ENB_APP/flexran_agent_common_internal.c @@ -566,5 +566,5 @@ void initiate_soft_restart(module_id_t mod_id, Protocol__FlexCellConfig *c) MessageDef *msg; msg = itti_alloc_new_message(TASK_FLEXRAN_AGENT, SOFT_RESTART_MESSAGE); - itti_send_msg_to_task(ENB_APP, ENB_MODULE_ID_TO_INSTANCE(mod_id), msg); + itti_send_msg_to_task(TASK_ENB_APP, ENB_MODULE_ID_TO_INSTANCE(mod_id), msg); } From 175d28ee357a61f1f1a19d704b94d44e6f581799 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 3 May 2018 10:26:17 +0200 Subject: [PATCH 134/379] bugfixes kill_eNB_proc() * put mutex lock around instance_prach * destroy attributes --- targets/RT/USER/lte-enb.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 61d689e182..87aa874227 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -1043,8 +1043,10 @@ void kill_eNB_proc(int inst) { pthread_cond_signal(&proc_rxtx[i].cond_rxtx); pthread_mutex_unlock(&proc_rxtx[i].mutex_rxtx); } + pthread_mutex_lock(&proc->mutex_prach); proc->instance_cnt_prach = 0; pthread_cond_signal( &proc->cond_prach ); + pthread_mutex_unlock(&proc->mutex_prach); pthread_cond_signal( &proc->cond_asynch_rxtx ); pthread_cond_broadcast(&sync_phy_proc.cond_phy_proc_tx); @@ -1071,6 +1073,16 @@ void kill_eNB_proc(int inst) { pthread_mutex_destroy( &proc_rxtx[i].mutex_rxtx ); pthread_cond_destroy( &proc_rxtx[i].cond_rxtx ); } + + pthread_attr_destroy(&proc->attr_prach); + pthread_attr_destroy(&proc->attr_asynch_rxtx); + pthread_attr_destroy(&proc_rxtx[0].attr_rxtx); + pthread_attr_destroy(&proc_rxtx[1].attr_rxtx); +#ifdef Rel14 + pthread_mutex_destroy(&proc->mutex_RU_PRACH_br); + pthread_attr_destroy(&proc->attr_prach_br); +#endif + } } From d24e17f0f7749b06a89eb50adacadadf1cf4bc67 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 3 May 2018 10:33:10 +0200 Subject: [PATCH 135/379] improve load_module_shlib() * check whether a library has been loaded before; in this case, don't allocate new memory but load from old library again * vital parameters, previous exit_fun are checked by AssertFatal() * structure has changed a bit to make it easier to follow (instead of nested ifs includes one goto to the end of the function) * formatting has been improved --- common/utils/load_module_shlib.c | 150 ++++++++++++++++++------------- 1 file changed, 87 insertions(+), 63 deletions(-) diff --git a/common/utils/load_module_shlib.c b/common/utils/load_module_shlib.c index c0afdb0b64..b9ce5954dd 100644 --- a/common/utils/load_module_shlib.c +++ b/common/utils/load_module_shlib.c @@ -120,75 +120,99 @@ int ret; int load_module_shlib(char *modname,loader_shlibfunc_t *farray, int numf, void *autoinit_arg) { - void *lib_handle; - initfunc_t fpi; - checkverfunc_t fpc; - getfarrayfunc_t fpg; - char *shlib_path; - char *afname=NULL; - int ret=0; + void *lib_handle = NULL; + initfunc_t fpi; + checkverfunc_t fpc; + getfarrayfunc_t fpg; + char *shlib_path = NULL; + char *afname = NULL; + int ret = 0; + int lib_idx = -1; - if (loader_data.shlibpath == NULL) { - loader_init(); - } + AssertFatal(modname, "no library name given\n"); - shlib_path = loader_format_shlibpath(modname); + if (!loader_data.shlibpath) { + loader_init(); + } - ret = 0; - lib_handle = dlopen(shlib_path, RTLD_LAZY|RTLD_NODELETE|RTLD_GLOBAL); - if (!lib_handle) { - fprintf(stderr,"[LOADER] library %s is not loaded: %s\n", shlib_path,dlerror()); - ret = -1; - } else { - printf("[LOADER] library %s successfully loaded\n", shlib_path); - afname=malloc(strlen(modname)+15); - sprintf(afname,"%s_checkbuildver",modname); - fpc = dlsym(lib_handle,afname); - if (fpc != NULL ){ - int chkver_ret = fpc(loader_data.mainexec_buildversion, &(loader_data.shlibs[loader_data.numshlibs].shlib_buildversion)); - if (chkver_ret < 0) { - fprintf(stderr,"[LOADER] %s %d lib %s, version mismatch",__FILE__, __LINE__, modname); - exit_fun("[LOADER] unrecoverable error"); - } - } - sprintf(afname,"%s_autoinit",modname); - fpi = dlsym(lib_handle,afname); + shlib_path = loader_format_shlibpath(modname); - if (fpi != NULL ) { - fpi(autoinit_arg); - } + for (int i = 0; i < loader_data.numshlibs; i++) { + if (strcmp(loader_data.shlibs[i].name, modname) == 0) { + printf("[LOADER] library %s has been loaded previously, reloading function pointers\n", + shlib_path); + lib_idx = i; + break; + } + } + if (lib_idx < 0) { + lib_idx = loader_data.numshlibs; + ++loader_data.numshlibs; + AssertFatal(loader_data.numshlibs <= loader_data.maxshlibs, + "shared lib loader: can not load more than %d shlibs\n", + loader_data.maxshlibs); + loader_data.shlibs[lib_idx].name = strdup(modname); + loader_data.shlibs[lib_idx].thisshlib_path = strdup(shlib_path); + } - if (farray != NULL) { - loader_data.shlibs[loader_data.numshlibs].funcarray=malloc(numf*sizeof(loader_shlibfunc_t)); - loader_data.shlibs[loader_data.numshlibs].numfunc=0; - for (int i=0; i= 0, + "[LOADER] %s %d lib %s, version mismatch", + __FILE__, __LINE__, modname); + } + sprintf(afname,"%s_autoinit",modname); + fpi = dlsym(lib_handle,afname); + + if (fpi) { + fpi(autoinit_arg); + } + + if (farray) { + if (!loader_data.shlibs[lib_idx].funcarray) { + loader_data.shlibs[lib_idx].funcarray = malloc(numf*sizeof(loader_shlibfunc_t)); + AssertFatal(loader_data.shlibs[lib_idx].funcarray, "unable to allocate memory\n"); + } + loader_data.shlibs[lib_idx].numfunc = 0; + for (int i = 0; i < numf; i++) { + farray[i].fptr = dlsym(lib_handle,farray[i].fname); + AssertFatal(farray[i].fptr, "%s: function not found %s\n", + dlerror(), farray[i].fname); + loader_data.shlibs[lib_idx].funcarray[i].fname=strdup(farray[i].fname); + loader_data.shlibs[lib_idx].funcarray[i].fptr = farray[i].fptr; + loader_data.shlibs[lib_idx].numfunc++; + } /* for int i... */ + } else { /* farray ! NULL */ + sprintf(afname,"%s_getfarray",modname); + fpg = dlsym(lib_handle,afname); + if (fpg) { + loader_data.shlibs[lib_idx].numfunc = + fpg(&(loader_data.shlibs[lib_idx].funcarray)); + } + } /* farray ! NULL */ + +load_module_shlib_exit: + if (shlib_path) free(shlib_path); + if (afname) free(afname); + if (lib_handle) dlclose(lib_handle); + return ret; } void * get_shlibmodule_fptr(char *modname, char *fname) From 604ec25a684756c033e0463b7ca73ad89873b753 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 3 May 2018 10:35:13 +0200 Subject: [PATCH 136/379] improve soft-restarting messages --- openair2/ENB_APP/enb_app.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/openair2/ENB_APP/enb_app.c b/openair2/ENB_APP/enb_app.c index 89df62db7b..1289cf59b5 100644 --- a/openair2/ENB_APP/enb_app.c +++ b/openair2/ENB_APP/enb_app.c @@ -335,6 +335,8 @@ void handle_reconfiguration(module_id_t mod_id) clock_gettime(CLOCK_MONOTONIC, &start); flexran_agent_info_t *flexran = RC.flexran[mod_id]; + LOG_N(ENB_APP, "lte-softmodem soft-restart requested\n"); + if (ENB_WAIT == flexran->node_ctrl_state) { /* this is already waiting, just release */ pthread_mutex_lock(&flexran->mutex_node_ctrl); @@ -352,7 +354,7 @@ void handle_reconfiguration(module_id_t mod_id) /* node_ctrl_state should have value ENB_MAKE_WAIT only if this method is not * executed by the FlexRAN thread */ if (ENB_MAKE_WAIT == flexran->node_ctrl_state) { - LOG_I(ENB_APP, " * eNB %d: Waiting for FlexRAN RTController command *\n", mod_id); + LOG_N(ENB_APP, " * eNB %d: Waiting for FlexRAN RTController command *\n", mod_id); pthread_mutex_lock(&flexran->mutex_node_ctrl); flexran->node_ctrl_state = ENB_WAIT; while (ENB_NORMAL_OPERATION != flexran->node_ctrl_state) @@ -361,7 +363,7 @@ void handle_reconfiguration(module_id_t mod_id) } if (restart_L1L2(mod_id) < 0) { - LOG_F(ENB_APP, "can not restart, killing lte-softmodem\n"); + LOG_E(ENB_APP, "can not restart, killing lte-softmodem\n"); itti_terminate_tasks(TASK_PHY_ENB); return; } @@ -374,5 +376,5 @@ void handle_reconfiguration(module_id_t mod_id) end.tv_sec -= 1; end.tv_nsec = end.tv_nsec - start.tv_nsec + 1000000000; } - LOG_I(ENB_APP, "lte-softmodem restart succeeded in %ld.%ld s\n", end.tv_sec, end.tv_nsec / 1000000); + LOG_N(ENB_APP, "lte-softmodem restart succeeded in %ld.%ld s\n", end.tv_sec, end.tv_nsec / 1000000); } From 1e9f3235d37058f42d00a40f72fa2b18e237f7c6 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 4 May 2018 09:55:55 +0200 Subject: [PATCH 137/379] fix: avoid AssertFatal() in load_module_shlib() don't fail in library utility function, return with error code instead and let application decide what is best on how to proceed --- common/utils/load_module_shlib.c | 37 +++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/common/utils/load_module_shlib.c b/common/utils/load_module_shlib.c index b9ce5954dd..a4b4742c94 100644 --- a/common/utils/load_module_shlib.c +++ b/common/utils/load_module_shlib.c @@ -129,7 +129,10 @@ int load_module_shlib(char *modname,loader_shlibfunc_t *farray, int numf, void * int ret = 0; int lib_idx = -1; - AssertFatal(modname, "no library name given\n"); + if (!modname) { + fprintf(stderr, "[LOADER] load_module_shlib(): no library name given\n"); + return -1; + } if (!loader_data.shlibpath) { loader_init(); @@ -148,9 +151,12 @@ int load_module_shlib(char *modname,loader_shlibfunc_t *farray, int numf, void * if (lib_idx < 0) { lib_idx = loader_data.numshlibs; ++loader_data.numshlibs; - AssertFatal(loader_data.numshlibs <= loader_data.maxshlibs, - "shared lib loader: can not load more than %d shlibs\n", - loader_data.maxshlibs); + if (loader_data.numshlibs > loader_data.maxshlibs) { + fprintf(stderr, "[LOADER] can not load more than %d shlibs\n", + loader_data.maxshlibs); + ret = -1; + goto load_module_shlib_exit; + } loader_data.shlibs[lib_idx].name = strdup(modname); loader_data.shlibs[lib_idx].thisshlib_path = strdup(shlib_path); } @@ -174,9 +180,12 @@ int load_module_shlib(char *modname,loader_shlibfunc_t *farray, int numf, void * if (fpc) { int chkver_ret = fpc(loader_data.mainexec_buildversion, &(loader_data.shlibs[lib_idx].shlib_buildversion)); - AssertFatal(chkver_ret >= 0, - "[LOADER] %s %d lib %s, version mismatch", - __FILE__, __LINE__, modname); + if (chkver_ret < 0) { + fprintf(stderr, "[LOADER] %s %d lib %s, version mismatch", + __FILE__, __LINE__, modname); + ret = -1; + goto load_module_shlib_exit; + } } sprintf(afname,"%s_autoinit",modname); fpi = dlsym(lib_handle,afname); @@ -188,13 +197,21 @@ int load_module_shlib(char *modname,loader_shlibfunc_t *farray, int numf, void * if (farray) { if (!loader_data.shlibs[lib_idx].funcarray) { loader_data.shlibs[lib_idx].funcarray = malloc(numf*sizeof(loader_shlibfunc_t)); - AssertFatal(loader_data.shlibs[lib_idx].funcarray, "unable to allocate memory\n"); + if (!loader_data.shlibs[lib_idx].funcarray) { + fprintf(stderr, "[LOADER] load_module_shlib(): unable to allocate memory\n"); + ret = -1; + goto load_module_shlib_exit; + } } loader_data.shlibs[lib_idx].numfunc = 0; for (int i = 0; i < numf; i++) { farray[i].fptr = dlsym(lib_handle,farray[i].fname); - AssertFatal(farray[i].fptr, "%s: function not found %s\n", - dlerror(), farray[i].fname); + if (!farray[i].fptr) { + fprintf(stderr, "[LOADER] load_module_shlib(): function %s not found: %s\n", + farray[i].fname, dlerror()); + ret = -1; + goto load_module_shlib_exit; + } loader_data.shlibs[lib_idx].funcarray[i].fname=strdup(farray[i].fname); loader_data.shlibs[lib_idx].funcarray[i].fptr = farray[i].fptr; loader_data.shlibs[lib_idx].numfunc++; From 62957b97d8d4303224ccd5a673d6c1f3c89253b7 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 4 May 2018 15:53:19 +0200 Subject: [PATCH 138/379] bugfix FlexRAN: only write to file if file is not null --- openair2/ENB_APP/flexran_agent_common.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/openair2/ENB_APP/flexran_agent_common.c b/openair2/ENB_APP/flexran_agent_common.c index 7578dec03f..c55633af31 100644 --- a/openair2/ENB_APP/flexran_agent_common.c +++ b/openair2/ENB_APP/flexran_agent_common.c @@ -414,8 +414,14 @@ int flexran_agent_control_delegation(mid_t mod_id, const void *params, Protocol_ FILE *f; f = fopen(target, "wb"); - fwrite(control_delegation_msg->payload.data, control_delegation_msg->payload.len, 1, f); - fclose(f); + if (f) { + fwrite(control_delegation_msg->payload.data, control_delegation_msg->payload.len, 1, f); + fclose(f); + } + else { + LOG_W(FLEXRAN_AGENT, "[%d] can not write control delegation data to %s\n", + mod_id, target); + } // long time_elapsed_nanos = timer_end(vartime); *msg = NULL; From da35afb01b1c27db8b876e16971e336eb2c0206e Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 4 May 2018 16:12:09 +0200 Subject: [PATCH 139/379] fix: repair RC.mac memory allocation - there can be a race between the FlexRAN agent reading the RC.mac and its allocation in main.c - In order to circumvent this, change the allocation by allocating everything "into" a local variable - finally "make it visible" by storing the pointer in RC.mac --- openair2/LAYER2/MAC/main.c | 186 +++++++++++++++++-------------------- 1 file changed, 83 insertions(+), 103 deletions(-) diff --git a/openair2/LAYER2/MAC/main.c b/openair2/LAYER2/MAC/main.c index 8d3d88aaaa..b325c9b3ea 100644 --- a/openair2/LAYER2/MAC/main.c +++ b/openair2/LAYER2/MAC/main.c @@ -46,122 +46,102 @@ extern RAN_CONTEXT_t RC; - void mac_top_init_eNB(void) { + module_id_t i, j; + int list_el; + UE_list_t *UE_list; + slice_info_t *sli; + eNB_MAC_INST **mac; - module_id_t i, j; - int list_el; - UE_list_t *UE_list; - slice_info_t *sli; - eNB_MAC_INST *mac; + LOG_I(MAC, "[MAIN] Init function start:nb_macrlc_inst=%d\n", + RC.nb_macrlc_inst); - LOG_I(MAC, "[MAIN] Init function start:nb_macrlc_inst=%d\n", - RC.nb_macrlc_inst); + if (RC.nb_macrlc_inst <= 0) { + RC.mac = NULL; + return; + } - if (RC.nb_macrlc_inst > 0) { - if (RC.mac == NULL){ - RC.mac = - (eNB_MAC_INST **) malloc16(RC.nb_macrlc_inst * - sizeof(eNB_MAC_INST *)); - bzero(RC.mac, RC.nb_macrlc_inst * sizeof(eNB_MAC_INST *)); - } - AssertFatal(RC.mac != NULL, - "can't ALLOCATE %zu Bytes for %d eNB_MAC_INST with size %zu \n", - RC.nb_macrlc_inst * sizeof(eNB_MAC_INST *), - RC.nb_macrlc_inst, sizeof(eNB_MAC_INST)); - for (i = 0; i < RC.nb_macrlc_inst; i++) { - if (RC.mac[i] == NULL) { - RC.mac[i] = (eNB_MAC_INST *) malloc16(sizeof(eNB_MAC_INST)); - AssertFatal(RC.mac[i] != NULL, - "can't ALLOCATE %zu Bytes for %d eNB_MAC_INST with size %zu \n", - RC.nb_macrlc_inst * sizeof(eNB_MAC_INST *), - RC.nb_macrlc_inst, sizeof(eNB_MAC_INST)); - LOG_D(MAC, - "[MAIN] ALLOCATE %zu Bytes for %d eNB_MAC_INST @ %p\n", - sizeof(eNB_MAC_INST), RC.nb_macrlc_inst, RC.mac); - bzero(RC.mac[i], sizeof(eNB_MAC_INST)); - } - RC.mac[i]->Mod_id = i; - for (j = 0; j < MAX_NUM_CCs; j++) { - RC.mac[i]->DL_req[j].dl_config_request_body. - dl_config_pdu_list = RC.mac[i]->dl_config_pdu_list[j]; - RC.mac[i]->UL_req[j].ul_config_request_body. - ul_config_pdu_list = RC.mac[i]->ul_config_pdu_list[j]; - for (int k = 0; k < 10; k++) - RC.mac[i]->UL_req_tmp[j][k]. - ul_config_request_body.ul_config_pdu_list = - RC.mac[i]->ul_config_pdu_list_tmp[j][k]; - for(int sf=0;sf<10;sf++){ - RC.mac[i]->HI_DCI0_req[j][sf].hi_dci0_request_body.hi_dci0_pdu_list =RC.mac[i]->hi_dci0_pdu_list[j][sf]; - } - - RC.mac[i]->TX_req[j].tx_request_body.tx_pdu_list = - RC.mac[i]->tx_request_pdu[j]; - RC.mac[i]->ul_handle = 0; - } - } - - AssertFatal(rlc_module_init() == 0, - "Could not initialize RLC layer\n"); - - // These should be out of here later - pdcp_layer_init(); - - rrc_init_global_param(); - - } else { - RC.mac = NULL; + mac = malloc16(RC.nb_macrlc_inst * sizeof(eNB_MAC_INST *)); + AssertFatal(mac != NULL, + "can't ALLOCATE %zu Bytes for %d eNB_MAC_INST with size %zu \n", + RC.nb_macrlc_inst * sizeof(eNB_MAC_INST *), + RC.nb_macrlc_inst, sizeof(eNB_MAC_INST)); + for (i = 0; i < RC.nb_macrlc_inst; i++) { + mac[i] = malloc16(sizeof(eNB_MAC_INST)); + AssertFatal(mac[i] != NULL, + "can't ALLOCATE %zu Bytes for %d eNB_MAC_INST with size %zu \n", + RC.nb_macrlc_inst * sizeof(eNB_MAC_INST *), + RC.nb_macrlc_inst, sizeof(eNB_MAC_INST)); + LOG_D(MAC, + "[MAIN] ALLOCATE %zu Bytes for %d eNB_MAC_INST @ %p\n", + sizeof(eNB_MAC_INST), RC.nb_macrlc_inst, mac); + bzero(mac[i], sizeof(eNB_MAC_INST)); + mac[i]->Mod_id = i; + for (j = 0; j < MAX_NUM_CCs; j++) { + mac[i]->DL_req[j].dl_config_request_body.dl_config_pdu_list = + mac[i]->dl_config_pdu_list[j]; + mac[i]->UL_req[j].ul_config_request_body.ul_config_pdu_list = + mac[i]->ul_config_pdu_list[j]; + for (int k = 0; k < 10; k++) + mac[i]->UL_req_tmp[j][k].ul_config_request_body.ul_config_pdu_list = + mac[i]->ul_config_pdu_list_tmp[j][k]; + for(int sf=0;sf<10;sf++) + mac[i]->HI_DCI0_req[j][sf].hi_dci0_request_body.hi_dci0_pdu_list = + mac[i]->hi_dci0_pdu_list[j][sf]; + mac[i]->TX_req[j].tx_request_body.tx_pdu_list = mac[i]->tx_request_pdu[j]; + mac[i]->ul_handle = 0; } - // Initialize Linked-List for Active UEs and slice configuration - for (i = 0; i < RC.nb_macrlc_inst; i++) { - mac = RC.mac[i]; + mac[i]->if_inst = IF_Module_init(i); + UE_list = &mac[i]->UE_list; + UE_list->num_UEs = 0; + UE_list->head = -1; + UE_list->head_ul = -1; + UE_list->avail = 0; - mac->if_inst = IF_Module_init(i); - - UE_list = &mac->UE_list; - - UE_list->num_UEs = 0; - UE_list->head = -1; - UE_list->head_ul = -1; - UE_list->avail = 0; - - for (list_el = 0; list_el < MAX_MOBILES_PER_ENB - 1; list_el++) { + for (list_el = 0; list_el < MAX_MOBILES_PER_ENB - 1; list_el++) { UE_list->next[list_el] = list_el + 1; UE_list->next_ul[list_el] = list_el + 1; - } - - UE_list->next[list_el] = -1; - UE_list->next_ul[list_el] = -1; - - sli = &mac->slice_info; - - sli->intraslice_share_active = 1; - sli->interslice_share_active = 1; - - sli->n_dl = 1; - memset(sli->dl, 0, sizeof(slice_sched_conf_dl_t) * MAX_NUM_SLICES); - sli->dl[0].pct = 1.0; - sli->dl[0].prio = 10; - sli->dl[0].pos_high = N_RBG_MAX; - sli->dl[0].maxmcs = 28; - sli->dl[0].sorting = 0x012345; - sli->dl[0].sched_name = "schedule_ue_spec"; - sli->dl[0].sched_cb = dlsym(NULL, sli->dl[0].sched_name); - AssertFatal(sli->dl[0].sched_cb, "DLSCH scheduler callback is NULL\n"); - - sli->n_ul = 1; - memset(sli->ul, 0, sizeof(slice_sched_conf_ul_t) * MAX_NUM_SLICES); - sli->ul[0].pct = 1.0; - sli->ul[0].maxmcs = 20; - sli->ul[0].sorting = 0x0123; - sli->ul[0].sched_name = "schedule_ulsch_rnti"; - sli->ul[0].sched_cb = dlsym(NULL, sli->ul[0].sched_name); - AssertFatal(sli->ul[0].sched_cb, "ULSCH scheduler callback is NULL\n"); } + UE_list->next[list_el] = -1; + UE_list->next_ul[list_el] = -1; + sli = &mac[i]->slice_info; + sli->intraslice_share_active = 1; + sli->interslice_share_active = 1; + + sli->n_dl = 1; + memset(sli->dl, 0, sizeof(slice_sched_conf_dl_t) * MAX_NUM_SLICES); + sli->dl[0].pct = 1.0; + sli->dl[0].prio = 10; + sli->dl[0].pos_high = N_RBG_MAX; + sli->dl[0].maxmcs = 28; + sli->dl[0].sorting = 0x012345; + sli->dl[0].sched_name = "schedule_ue_spec"; + sli->dl[0].sched_cb = dlsym(NULL, sli->dl[0].sched_name); + AssertFatal(sli->dl[0].sched_cb, "DLSCH scheduler callback is NULL\n"); + + sli->n_ul = 1; + memset(sli->ul, 0, sizeof(slice_sched_conf_ul_t) * MAX_NUM_SLICES); + sli->ul[0].pct = 1.0; + sli->ul[0].maxmcs = 20; + sli->ul[0].sorting = 0x0123; + sli->ul[0].sched_name = "schedule_ulsch_rnti"; + sli->ul[0].sched_cb = dlsym(NULL, sli->ul[0].sched_name); + AssertFatal(sli->ul[0].sched_cb, "ULSCH scheduler callback is NULL\n"); + } + + RC.mac = mac; + + AssertFatal(rlc_module_init() == 0, + "Could not initialize RLC layer\n"); + + // These should be out of here later + pdcp_layer_init(); + + rrc_init_global_param(); } void mac_init_cell_params(int Mod_idP, int CC_idP) From 0bb6a19f71a1721ce11acf252c7b2160dd60390f Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 4 May 2018 16:17:44 +0200 Subject: [PATCH 140/379] only initialize RC.mac once --- openair2/ENB_APP/enb_config.c | 2 +- openair2/LAYER2/MAC/config.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 012375e668..195ab17877 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -292,7 +292,7 @@ void RCconfig_L1(void) { LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_CC[0]=%d for init_eNB_afterRU()\n", __FUNCTION__, RC.nb_CC[0]); LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_macrlc_inst:%d because used by mac_top_init_eNB()\n", __FUNCTION__, RC.nb_macrlc_inst); - mac_top_init_eNB(); + //mac_top_init_eNB(); configure_nfapi_pnf(RC.eNB[j][0]->eth_params_n.remote_addr, RC.eNB[j][0]->eth_params_n.remote_portc, RC.eNB[j][0]->eth_params_n.my_addr, RC.eNB[j][0]->eth_params_n.my_portd, RC.eNB[j][0]->eth_params_n .remote_portd); } diff --git a/openair2/LAYER2/MAC/config.c b/openair2/LAYER2/MAC/config.c index a7bf532b09..5331f07a68 100644 --- a/openair2/LAYER2/MAC/config.c +++ b/openair2/LAYER2/MAC/config.c @@ -733,7 +733,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP, if (RC.mac == NULL) l2_init_eNB(); - mac_top_init_eNB(); + //mac_top_init_eNB(); RC.mac[Mod_idP]->common_channels[CC_idP].mib = mib; RC.mac[Mod_idP]->common_channels[CC_idP].physCellId = physCellId; From 6c4f58a0a0a5ba63c49848d17cf1b5e7ad489349 Mon Sep 17 00:00:00 2001 From: Navid Nikaein Date: Fri, 1 Jun 2018 00:03:26 +0200 Subject: [PATCH 141/379] move UE_list/slice init in dedicated functions --- openair2/LAYER2/MAC/mac_proto.h | 4 ++ openair2/LAYER2/MAC/main.c | 89 ++++++++++++++++++--------------- 2 files changed, 54 insertions(+), 39 deletions(-) diff --git a/openair2/LAYER2/MAC/mac_proto.h b/openair2/LAYER2/MAC/mac_proto.h index 1400d862d6..0d4cd72ae9 100644 --- a/openair2/LAYER2/MAC/mac_proto.h +++ b/openair2/LAYER2/MAC/mac_proto.h @@ -165,6 +165,10 @@ void add_msg3(module_id_t module_idP, int CC_id, RA_t * ra, frame_t frameP, //main.c +void init_UE_list(UE_list_t *UE_list); + +void init_slice_info(slice_info_t *sli); + int mac_top_init(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active, uint8_t HO_active); diff --git a/openair2/LAYER2/MAC/main.c b/openair2/LAYER2/MAC/main.c index b325c9b3ea..8fb8d44e0a 100644 --- a/openair2/LAYER2/MAC/main.c +++ b/openair2/LAYER2/MAC/main.c @@ -46,12 +46,57 @@ extern RAN_CONTEXT_t RC; +void init_UE_list(UE_list_t *UE_list) +{ + int list_el; + UE_list->num_UEs = 0; + UE_list->head = -1; + UE_list->head_ul = -1; + UE_list->avail = 0; + for (list_el = 0; list_el < MAX_MOBILES_PER_ENB - 1; list_el++) { + UE_list->next[list_el] = list_el + 1; + UE_list->next_ul[list_el] = list_el + 1; + } + UE_list->next[list_el] = -1; + UE_list->next_ul[list_el] = -1; + memset(UE_list->DLSCH_pdu, 0, sizeof(UE_list->DLSCH_pdu)); + memset(UE_list->UE_template, 0, sizeof(UE_list->UE_template)); + memset(UE_list->eNB_UE_stats, 0, sizeof(UE_list->eNB_UE_stats)); + memset(UE_list->UE_sched_ctrl, 0, sizeof(UE_list->UE_sched_ctrl)); + memset(UE_list->active, 0, sizeof(UE_list->active)); + memset(UE_list->assoc_dl_slice_idx, 0, sizeof(UE_list->assoc_dl_slice_idx)); + memset(UE_list->assoc_ul_slice_idx, 0, sizeof(UE_list->assoc_ul_slice_idx)); +} + +void init_slice_info(slice_info_t *sli) +{ + sli->intraslice_share_active = 1; + sli->interslice_share_active = 1; + + sli->n_dl = 1; + memset(sli->dl, 0, sizeof(slice_sched_conf_dl_t) * MAX_NUM_SLICES); + sli->dl[0].pct = 1.0; + sli->dl[0].prio = 10; + sli->dl[0].pos_high = N_RBG_MAX; + sli->dl[0].maxmcs = 28; + sli->dl[0].sorting = 0x012345; + sli->dl[0].sched_name = "schedule_ue_spec"; + sli->dl[0].sched_cb = dlsym(NULL, sli->dl[0].sched_name); + AssertFatal(sli->dl[0].sched_cb, "DLSCH scheduler callback is NULL\n"); + + sli->n_ul = 1; + memset(sli->ul, 0, sizeof(slice_sched_conf_ul_t) * MAX_NUM_SLICES); + sli->ul[0].pct = 1.0; + sli->ul[0].maxmcs = 20; + sli->ul[0].sorting = 0x0123; + sli->ul[0].sched_name = "schedule_ulsch_rnti"; + sli->ul[0].sched_cb = dlsym(NULL, sli->ul[0].sched_name); + AssertFatal(sli->ul[0].sched_cb, "ULSCH scheduler callback is NULL\n"); +} + void mac_top_init_eNB(void) { module_id_t i, j; - int list_el; - UE_list_t *UE_list; - slice_info_t *sli; eNB_MAC_INST **mac; LOG_I(MAC, "[MAIN] Init function start:nb_macrlc_inst=%d\n", @@ -95,42 +140,8 @@ void mac_top_init_eNB(void) mac[i]->if_inst = IF_Module_init(i); - UE_list = &mac[i]->UE_list; - UE_list->num_UEs = 0; - UE_list->head = -1; - UE_list->head_ul = -1; - UE_list->avail = 0; - - for (list_el = 0; list_el < MAX_MOBILES_PER_ENB - 1; list_el++) { - UE_list->next[list_el] = list_el + 1; - UE_list->next_ul[list_el] = list_el + 1; - } - UE_list->next[list_el] = -1; - UE_list->next_ul[list_el] = -1; - - sli = &mac[i]->slice_info; - sli->intraslice_share_active = 1; - sli->interslice_share_active = 1; - - sli->n_dl = 1; - memset(sli->dl, 0, sizeof(slice_sched_conf_dl_t) * MAX_NUM_SLICES); - sli->dl[0].pct = 1.0; - sli->dl[0].prio = 10; - sli->dl[0].pos_high = N_RBG_MAX; - sli->dl[0].maxmcs = 28; - sli->dl[0].sorting = 0x012345; - sli->dl[0].sched_name = "schedule_ue_spec"; - sli->dl[0].sched_cb = dlsym(NULL, sli->dl[0].sched_name); - AssertFatal(sli->dl[0].sched_cb, "DLSCH scheduler callback is NULL\n"); - - sli->n_ul = 1; - memset(sli->ul, 0, sizeof(slice_sched_conf_ul_t) * MAX_NUM_SLICES); - sli->ul[0].pct = 1.0; - sli->ul[0].maxmcs = 20; - sli->ul[0].sorting = 0x0123; - sli->ul[0].sched_name = "schedule_ulsch_rnti"; - sli->ul[0].sched_cb = dlsym(NULL, sli->ul[0].sched_name); - AssertFatal(sli->ul[0].sched_cb, "ULSCH scheduler callback is NULL\n"); + init_UE_list(&mac[i]->UE_list); + init_slice_info(&mac[i]->slice_info); } RC.mac = mac; From 1adbaa7a547b0cf67be257789bbe333c520c23b9 Mon Sep 17 00:00:00 2001 From: Navid Nikaein Date: Fri, 1 Jun 2018 00:04:39 +0200 Subject: [PATCH 142/379] when restarting, re-init MAC UE_list --- targets/RT/USER/lte-softmodem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 25a55a6e56..b606ee2f46 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -831,6 +831,9 @@ int restart_L1L2(module_id_t enb_id) /* TODO this should be done for all RUs associated to this eNB */ memcpy(&ru->frame_parms, &RC.eNB[enb_id][0]->frame_parms, sizeof(LTE_DL_FRAME_PARMS)); set_function_spec_param(RC.ru[enb_id]); + /* reset the list of connected UEs in the MAC, since in this process with + * loose all UEs (have to reconnect) */ + init_UE_list(&RC.mac[enb_id]->UE_list); LOG_I(ENB_APP, "attempting to create ITTI tasks\n"); if (itti_create_task (TASK_RRC_ENB, rrc_enb_task, NULL) < 0) { From 9399bed23a03b29f3f84b067203d0a640050098c Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 6 Jun 2018 10:46:35 +0200 Subject: [PATCH 143/379] FlexRAN MAC: align allocated memory for lfds --- .../ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c index 7a61bad6d3..5ad7a6d496 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c @@ -1272,8 +1272,17 @@ void flexran_agent_init_mac_agent(mid_t mod_id) { lfds700_misc_prng_init(&ps[mod_id]); int num_elements = RINGBUFFER_SIZE + 1; //Allow RINGBUFFER_SIZE messages to be stored in the ringbuffer at any time - dl_mac_config_array[mod_id] = malloc( sizeof(struct lfds700_ringbuffer_element) * num_elements); - lfds700_ringbuffer_init_valid_on_current_logical_core( &ringbuffer_state[mod_id], dl_mac_config_array[mod_id], num_elements, &ps[mod_id], NULL ); + /* lfds700_ringbuffer_init_valid_on_current_logical_core()'s second argument + * must be aligned to LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES. From the + * documentation: "Heap allocated variables however will by no means be + * correctly aligned and an aligned malloc must be used." Therefore, we use + * posix_memalign */ + i = posix_memalign((void **)&dl_mac_config_array[mod_id], + LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES, + sizeof(struct lfds700_ringbuffer_element) * num_elements); + AssertFatal(i == 0, "posix_memalign(): could not allocate aligned memory for lfds library\n"); + lfds700_ringbuffer_init_valid_on_current_logical_core(&ringbuffer_state[mod_id], + dl_mac_config_array[mod_id], num_elements, &ps[mod_id], NULL); for (i = 0; i < MAX_MOBILES_PER_ENB; i++) { for (j = 0; j < 8; j++) { if (RC.mac && RC.mac[mod_id]) From 3b80c73f937b8942fedeff92c19ec33fb156d6a9 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 6 Jun 2018 16:42:17 +0200 Subject: [PATCH 144/379] FlexRAN: Loop over UEs using UE_id, not index --- .../CONTROL_MODULES/MAC/flexran_agent_mac.c | 35 +++--- .../CONTROL_MODULES/RRC/flexran_agent_rrc.c | 16 ++- openair2/ENB_APP/flexran_agent_common.c | 113 +++++++++--------- openair2/ENB_APP/flexran_agent_handler.c | 9 +- openair2/ENB_APP/flexran_agent_ran_api.c | 15 +++ openair2/ENB_APP/flexran_agent_ran_api.h | 4 + 6 files changed, 110 insertions(+), 82 deletions(-) diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c index 5ad7a6d496..caddb0616a 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c @@ -894,7 +894,6 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle for (j = 0; j < 8; j++) { if (RC.mac && RC.mac[mod_id] && RC.mac[mod_id]->UE_list.eNB_UE_stats[UE_PCCID(mod_id,i)][i].harq_pid == 1) { available_harq[i] = j; - sf_trigger_msg->n_dl_info++; break; } } @@ -903,10 +902,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle // LOG_I(FLEXRAN_AGENT, "Sending subframe trigger for frame %d and subframe %d\n", flexran_get_current_frame(mod_id), (flexran_get_current_subframe(mod_id) + 1) % 10); - /*TODO: Fill in the number of dl HARQ related info, based on the number of currently - *transmitting UEs - */ - // sf_trigger_msg->n_dl_info = flexran_get_num_ues(mod_id); + sf_trigger_msg->n_dl_info = flexran_get_num_ues(mod_id); Protocol__FlexDlInfo **dl_info = NULL; @@ -916,33 +912,31 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle goto error; i = -1; //Fill the status of the current HARQ process for each UE - for(UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) { - if (available_harq[UE_id] < 0) { + for(i = 0; i < sf_trigger_msg->n_dl_info; i++) { + if (available_harq[i] < 0) continue; - } else { - i++; - } dl_info[i] = malloc(sizeof(Protocol__FlexDlInfo)); if(dl_info[i] == NULL) goto error; + UE_id = flexran_get_ue_id(mod_id, i); protocol__flex_dl_info__init(dl_info[i]); dl_info[i]->rnti = flexran_get_ue_crnti(mod_id, UE_id); dl_info[i]->has_rnti = 1; /*Fill in the right id of this round's HARQ process for this UE*/ // uint8_t harq_id; //uint8_t harq_status; - // flexran_get_harq(mod_id, UE_PCCID(mod_id,i), i, frame, subframe, &harq_id, &harq_status); + // flexran_get_harq(mod_id, UE_PCCID(mod_id, UE_id), i, frame, subframe, &harq_id, &harq_status); dl_info[i]->harq_process_id = available_harq[UE_id]; if (RC.mac && RC.mac[mod_id]) - RC.mac[mod_id]->UE_list.eNB_UE_stats[UE_PCCID(mod_id,i)][UE_id].harq_pid = 0; + RC.mac[mod_id]->UE_list.eNB_UE_stats[UE_PCCID(mod_id, UE_id)][UE_id].harq_pid = 0; dl_info[i]->has_harq_process_id = 1; /* Fill in the status of the HARQ process (2 TBs)*/ dl_info[i]->n_harq_status = 2; dl_info[i]->harq_status = malloc(sizeof(uint32_t) * dl_info[i]->n_harq_status); for (j = 0; j < dl_info[i]->n_harq_status; j++) { - dl_info[i]->harq_status[j] = RC.mac[mod_id]->UE_list.UE_sched_ctrl[i].round[UE_PCCID(mod_id,i)][j]; + dl_info[i]->harq_status[j] = RC.mac[mod_id]->UE_list.UE_sched_ctrl[UE_id].round[UE_PCCID(mod_id, UE_id)][j]; // TODO: This should be different per TB } // LOG_I(FLEXRAN_AGENT, "Sending subframe trigger for frame %d and subframe %d and harq %d (round %d)\n", flexran_get_current_frame(mod_id), (flexran_get_current_subframe(mod_id) + 1) % 10, dl_info[i]->harq_process_id, dl_info[i]->harq_status[0]); @@ -950,7 +944,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle // LOG_I(FLEXRAN_AGENT, "[Frame %d][Subframe %d]Need to make a retransmission for harq %d (round %d)\n", flexran_get_current_frame(mod_id), flexran_get_current_subframe(mod_id), dl_info[i]->harq_process_id, dl_info[i]->harq_status[0]); } /*Fill in the serving cell index for this UE */ - dl_info[i]->serv_cell_index = UE_PCCID(mod_id,i); + dl_info[i]->serv_cell_index = UE_PCCID(mod_id, UE_id); dl_info[i]->has_serv_cell_index = 1; } } @@ -974,18 +968,21 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle if(ul_info[i] == NULL) goto error; protocol__flex_ul_info__init(ul_info[i]); - ul_info[i]->rnti = flexran_get_ue_crnti(mod_id, i); + + UE_id = flexran_get_ue_id(mod_id, i); + + ul_info[i]->rnti = flexran_get_ue_crnti(mod_id, UE_id); ul_info[i]->has_rnti = 1; /* Fill in the Tx power control command for this UE (if available), * primary carrier */ - if(flexran_get_tpc(mod_id, i, 0) != 1){ + if(flexran_get_tpc(mod_id, UE_id, 0) != 1){ /* assume primary carrier */ - ul_info[i]->tpc = flexran_get_tpc(mod_id, i, 0); + ul_info[i]->tpc = flexran_get_tpc(mod_id, UE_id, 0); ul_info[i]->has_tpc = 1; } else{ /* assume primary carrier */ - ul_info[i]->tpc = flexran_get_tpc(mod_id, i, 0); + ul_info[i]->tpc = flexran_get_tpc(mod_id, UE_id, 0); ul_info[i]->has_tpc = 0; } /*TODO: fill in the amount of data in bytes in the MAC SDU received in this subframe for the @@ -999,7 +996,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle ul_info[i]->reception_status = PROTOCOL__FLEX_RECEPTION_STATUS__FLRS_OK; ul_info[i]->has_reception_status = 1; /*Fill in the serving cell index for this UE */ - ul_info[i]->serv_cell_index = UE_PCCID(mod_id,i); + ul_info[i]->serv_cell_index = UE_PCCID(mod_id, UE_id); ul_info[i]->has_serv_cell_index = 1; } } diff --git a/openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c b/openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c index 34833ca898..d685845f26 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c +++ b/openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c @@ -264,27 +264,31 @@ int flexran_agent_destroy_ue_state_change(Protocol__FlexranMessage *msg) { /* this is called by RRC as a part of rrc xface . The controller previously requested this*/ void flexran_trigger_rrc_measurements (mid_t mod_id, MeasResults_t* measResults) { - int i; + //int i; // int priority = 0; // Warning Preventing // void *data; // int size; // err_code_t err_code = -100; triggered_rrc = true; - int num; + //int num; + /* TODO do we need this at the current state? meas_stats is never put into a + * protobuf message?! num = flexran_get_num_ues (mod_id); meas_stats = malloc(sizeof(rrc_meas_stats) * num); for (i = 0; i < num; i++){ - meas_stats[i].rnti = flexran_get_ue_crnti(mod_id, i); - meas_stats[i].meas_id = flexran_get_rrc_pcell_measid(mod_id,i); - meas_stats[i].rsrp = flexran_get_rrc_pcell_rsrp(mod_id,i) - 140; + UE_id = flexran_get_ue_id(mod_id, i); + meas_stats[i].rnti = flexran_get_ue_crnti(mod_id, UE_id); + meas_stats[i].meas_id = flexran_get_rrc_pcell_measid(mod_id, UE_id); + meas_stats[i].rsrp = flexran_get_rrc_pcell_rsrp(mod_id, UE_id) - 140; // measResults->measResultPCell.rsrpResult - 140; - meas_stats[i].rsrq = flexran_get_rrc_pcell_rsrq(mod_id,i)/2 - 20; + meas_stats[i].rsrq = flexran_get_rrc_pcell_rsrq(mod_id, UE_id)/2 - 20; // (measResults->measResultPCell.rsrqResult)/2 - 20; } + */ // repl->neigh_meas = NULL; // if (meas->measResultNeighCells != NULL) { diff --git a/openair2/ENB_APP/flexran_agent_common.c b/openair2/ENB_APP/flexran_agent_common.c index c55633af31..1a92c9e262 100644 --- a/openair2/ENB_APP/flexran_agent_common.c +++ b/openair2/ENB_APP/flexran_agent_common.c @@ -459,6 +459,7 @@ int flexran_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Fl xid = (lc_config_request_msg->header)->xid; int i, j; + int UE_id; Protocol__FlexLcConfigReply *lc_config_reply_msg; lc_config_reply_msg = malloc(sizeof(Protocol__FlexLcConfigReply)); @@ -484,13 +485,15 @@ int flexran_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Fl lc_ue_config[i] = malloc(sizeof(Protocol__FlexLcUeConfig)); protocol__flex_lc_ue_config__init(lc_ue_config[i]); + UE_id = flexran_get_ue_id(mod_id, i); + lc_ue_config[i]->has_rnti = 1; - lc_ue_config[i]->rnti = flexran_get_ue_crnti(mod_id,i); + lc_ue_config[i]->rnti = flexran_get_ue_crnti(mod_id, UE_id); //TODO: Set the number of LC configurations that will be reported for this UE //Set this according to the current state of the UE. This is only a temporary fix int status = 0; - status = mac_eNB_get_rrc_status(mod_id, flexran_get_ue_crnti(mod_id, i)); + status = mac_eNB_get_rrc_status(mod_id, flexran_get_ue_crnti(mod_id, UE_id)); /* TODO needs to be revised and appropriate API to be implemented */ if (status < RRC_CONNECTED) { lc_ue_config[i]->n_lc_config = 0; @@ -513,14 +516,14 @@ int flexran_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Fl lc_config[j]->has_lcid = 1; lc_config[j]->lcid = j+1; - int lcg = flexran_get_lcg(mod_id, i, j+1); + int lcg = flexran_get_lcg(mod_id, UE_id, j+1); if (lcg >= 0 && lcg <= 3) { lc_config[j]->has_lcg = 1; - lc_config[j]->lcg = flexran_get_lcg(mod_id, i,j+1); + lc_config[j]->lcg = flexran_get_lcg(mod_id, UE_id, j+1); } lc_config[j]->has_direction = 1; - lc_config[j]->direction = flexran_get_direction(i,j+1); + lc_config[j]->direction = flexran_get_direction(UE_id, j+1); //TODO: Bearer type. One of FLQBT_* values. Currently only default bearer supported lc_config[j]->has_qos_bearer_type = 1; lc_config[j]->qos_bearer_type = PROTOCOL__FLEX_QOS_BEARER_TYPE__FLQBT_NON_GBR; @@ -587,6 +590,7 @@ int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Fl xid = (ue_config_request_msg->header)->xid; int i; + int UE_id; Protocol__FlexUeConfigReply *ue_config_reply_msg; ue_config_reply_msg = malloc(sizeof(Protocol__FlexUeConfigReply)); @@ -611,30 +615,31 @@ int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Fl ue_config[i] = malloc(sizeof(Protocol__FlexUeConfig)); protocol__flex_ue_config__init(ue_config[i]); - ue_config[i]->rnti = flexran_get_ue_crnti(mod_id,i); + UE_id = flexran_get_ue_id(mod_id, i); + ue_config[i]->rnti = flexran_get_ue_crnti(mod_id, UE_id); ue_config[i]->has_rnti = 1; - ue_config[i]->imsi = flexran_get_ue_imsi(mod_id, i); + ue_config[i]->imsi = flexran_get_ue_imsi(mod_id, UE_id); ue_config[i]->has_imsi = 1; - ue_config[i]->dl_slice_id = flexran_get_ue_dl_slice_id(mod_id, i); + ue_config[i]->dl_slice_id = flexran_get_ue_dl_slice_id(mod_id, UE_id); ue_config[i]->has_dl_slice_id = 1; - ue_config[i]->ul_slice_id = flexran_get_ue_ul_slice_id(mod_id, i); + ue_config[i]->ul_slice_id = flexran_get_ue_ul_slice_id(mod_id, UE_id); ue_config[i]->has_ul_slice_id = 1; //TODO: Set the DRX configuration (optional) //Not supported for now, so we do not set it - if (flexran_get_time_alignment_timer(mod_id,i) != -1) { - ue_config[i]->time_alignment_timer = flexran_get_time_alignment_timer(mod_id,i); - ue_config[i]->has_time_alignment_timer = 1; + if (flexran_get_time_alignment_timer(mod_id, UE_id) != -1) { + ue_config[i]->time_alignment_timer = flexran_get_time_alignment_timer(mod_id, UE_id); + ue_config[i]->has_time_alignment_timer = 1; } - if (flexran_get_meas_gap_config(mod_id,i) != -1) { - ue_config[i]->meas_gap_config_pattern = flexran_get_meas_gap_config(mod_id,i); - ue_config[i]->has_meas_gap_config_pattern = 1; + if (flexran_get_meas_gap_config(mod_id, UE_id) != -1) { + ue_config[i]->meas_gap_config_pattern = flexran_get_meas_gap_config(mod_id, UE_id); + ue_config[i]->has_meas_gap_config_pattern = 1; } if (ue_config[i]->has_meas_gap_config_pattern == 1 && - ue_config[i]->meas_gap_config_pattern != PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_OFF) { - ue_config[i]->meas_gap_config_sf_offset = flexran_get_meas_gap_config_offset(mod_id,i); + ue_config[i]->meas_gap_config_pattern != PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_OFF) { + ue_config[i]->meas_gap_config_sf_offset = flexran_get_meas_gap_config_offset(mod_id, UE_id); ue_config[i]->has_meas_gap_config_sf_offset = 1; } //TODO: Set the SPS configuration (Optional) @@ -646,77 +651,77 @@ int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Fl //TODO: Set the CQI configuration (Optional) //We do not set it for now - if (flexran_get_ue_transmission_mode(mod_id,i) != -1) { - ue_config[i]->transmission_mode = flexran_get_ue_transmission_mode(mod_id,i); + if (flexran_get_ue_transmission_mode(mod_id, UE_id) != -1) { + ue_config[i]->transmission_mode = flexran_get_ue_transmission_mode(mod_id, UE_id); ue_config[i]->has_transmission_mode = 1; } - ue_config[i]->ue_aggregated_max_bitrate_ul = flexran_get_ue_aggregated_max_bitrate_ul(mod_id,i); + ue_config[i]->ue_aggregated_max_bitrate_ul = flexran_get_ue_aggregated_max_bitrate_ul(mod_id, UE_id); ue_config[i]->has_ue_aggregated_max_bitrate_ul = 1; - ue_config[i]->ue_aggregated_max_bitrate_dl = flexran_get_ue_aggregated_max_bitrate_dl(mod_id,i); + ue_config[i]->ue_aggregated_max_bitrate_dl = flexran_get_ue_aggregated_max_bitrate_dl(mod_id, UE_id); ue_config[i]->has_ue_aggregated_max_bitrate_dl = 1; Protocol__FlexUeCapabilities *capabilities; capabilities = malloc(sizeof(Protocol__FlexUeCapabilities)); protocol__flex_ue_capabilities__init(capabilities); capabilities->has_half_duplex = 1; - capabilities->half_duplex = flexran_get_half_duplex(mod_id, i); + capabilities->half_duplex = flexran_get_half_duplex(mod_id, UE_id); capabilities->has_intra_sf_hopping = 1; - capabilities->intra_sf_hopping = flexran_get_intra_sf_hopping(mod_id, i); + capabilities->intra_sf_hopping = flexran_get_intra_sf_hopping(mod_id, UE_id); capabilities->has_type2_sb_1 = 1; - capabilities->type2_sb_1 = flexran_get_type2_sb_1(mod_id, i); + capabilities->type2_sb_1 = flexran_get_type2_sb_1(mod_id, UE_id); capabilities->has_ue_category = 1; - capabilities->ue_category = flexran_get_ue_category(mod_id, i); + capabilities->ue_category = flexran_get_ue_category(mod_id, UE_id); capabilities->has_res_alloc_type1 = 1; - capabilities->res_alloc_type1 = flexran_get_res_alloc_type1(mod_id, i); + capabilities->res_alloc_type1 = flexran_get_res_alloc_type1(mod_id, UE_id); //Set the capabilites to the message ue_config[i]->capabilities = capabilities; - if (flexran_get_ue_transmission_antenna(mod_id,i) != -1) { + if (flexran_get_ue_transmission_antenna(mod_id, UE_id) != -1) { ue_config[i]->has_ue_transmission_antenna = 1; - ue_config[i]->ue_transmission_antenna = flexran_get_ue_transmission_antenna(mod_id,i); + ue_config[i]->ue_transmission_antenna = flexran_get_ue_transmission_antenna(mod_id, UE_id); } - if (flexran_get_tti_bundling(mod_id,i) != -1) { + if (flexran_get_tti_bundling(mod_id, UE_id) != -1) { ue_config[i]->has_tti_bundling = 1; - ue_config[i]->tti_bundling = flexran_get_tti_bundling(mod_id,i); + ue_config[i]->tti_bundling = flexran_get_tti_bundling(mod_id, UE_id); } - if (flexran_get_maxHARQ_TX(mod_id,i) != -1) { + if (flexran_get_maxHARQ_TX(mod_id, UE_id) != -1) { ue_config[i]->has_max_harq_tx = 1; - ue_config[i]->max_harq_tx = flexran_get_maxHARQ_TX(mod_id,i); + ue_config[i]->max_harq_tx = flexran_get_maxHARQ_TX(mod_id, UE_id); } - if (flexran_get_beta_offset_ack_index(mod_id,i) != -1) { - ue_config[i]->has_beta_offset_ack_index = 1; - ue_config[i]->beta_offset_ack_index = flexran_get_beta_offset_ack_index(mod_id,i); + if (flexran_get_beta_offset_ack_index(mod_id, UE_id) != -1) { + ue_config[i]->has_beta_offset_ack_index = 1; + ue_config[i]->beta_offset_ack_index = flexran_get_beta_offset_ack_index(mod_id, UE_id); } - if (flexran_get_beta_offset_ri_index(mod_id,i) != -1) { + if (flexran_get_beta_offset_ri_index(mod_id, UE_id) != -1) { ue_config[i]->has_beta_offset_ri_index = 1; - ue_config[i]->beta_offset_ri_index = flexran_get_beta_offset_ri_index(mod_id,i); + ue_config[i]->beta_offset_ri_index = flexran_get_beta_offset_ri_index(mod_id, UE_id); } - if (flexran_get_beta_offset_cqi_index(mod_id,i) != -1) { + if (flexran_get_beta_offset_cqi_index(mod_id, UE_id) != -1) { ue_config[i]->has_beta_offset_cqi_index = 1; - ue_config[i]->beta_offset_cqi_index = flexran_get_beta_offset_cqi_index(mod_id,i); + ue_config[i]->beta_offset_cqi_index = flexran_get_beta_offset_cqi_index(mod_id, UE_id); } /* assume primary carrier */ - if (flexran_get_ack_nack_simultaneous_trans(mod_id, i, 0) != -1) { + if (flexran_get_ack_nack_simultaneous_trans(mod_id, UE_id, 0) != -1) { ue_config[i]->has_ack_nack_simultaneous_trans = 1; - ue_config[i]->ack_nack_simultaneous_trans = flexran_get_ack_nack_simultaneous_trans(mod_id, i, 0); + ue_config[i]->ack_nack_simultaneous_trans = flexran_get_ack_nack_simultaneous_trans(mod_id, UE_id, 0); } - if (flexran_get_simultaneous_ack_nack_cqi(mod_id,i) != -1) { + if (flexran_get_simultaneous_ack_nack_cqi(mod_id, UE_id) != -1) { ue_config[i]->has_simultaneous_ack_nack_cqi = 1; - ue_config[i]->simultaneous_ack_nack_cqi = flexran_get_simultaneous_ack_nack_cqi(mod_id,i); + ue_config[i]->simultaneous_ack_nack_cqi = flexran_get_simultaneous_ack_nack_cqi(mod_id, UE_id); } - if (flexran_get_aperiodic_cqi_rep_mode(mod_id,i) != -1) { + if (flexran_get_aperiodic_cqi_rep_mode(mod_id, UE_id) != -1) { ue_config[i]->has_aperiodic_cqi_rep_mode = 1; - int mode = flexran_get_aperiodic_cqi_rep_mode(mod_id,i); + int mode = flexran_get_aperiodic_cqi_rep_mode(mod_id, UE_id); if (mode > 4) { ue_config[i]->aperiodic_cqi_rep_mode = PROTOCOL__FLEX_APERIODIC_CQI_REPORT_MODE__FLACRM_NONE; } else { @@ -724,26 +729,26 @@ int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Fl } } - if (flexran_get_tdd_ack_nack_feedback_mode(mod_id, i) != -1) { + if (flexran_get_tdd_ack_nack_feedback_mode(mod_id, UE_id) != -1) { ue_config[i]->has_tdd_ack_nack_feedback = 1; - ue_config[i]->tdd_ack_nack_feedback = flexran_get_tdd_ack_nack_feedback_mode(mod_id,i); + ue_config[i]->tdd_ack_nack_feedback = flexran_get_tdd_ack_nack_feedback_mode(mod_id, UE_id); } - if(flexran_get_ack_nack_repetition_factor(mod_id, i) != -1) { + if(flexran_get_ack_nack_repetition_factor(mod_id, UE_id) != -1) { ue_config[i]->has_ack_nack_repetition_factor = 1; - ue_config[i]->ack_nack_repetition_factor = flexran_get_ack_nack_repetition_factor(mod_id,i); + ue_config[i]->ack_nack_repetition_factor = flexran_get_ack_nack_repetition_factor(mod_id, UE_id); } - if (flexran_get_extended_bsr_size(mod_id, i) != -1) { + if (flexran_get_extended_bsr_size(mod_id, UE_id) != -1) { ue_config[i]->has_extended_bsr_size = 1; - ue_config[i]->extended_bsr_size = flexran_get_extended_bsr_size(mod_id,i); + ue_config[i]->extended_bsr_size = flexran_get_extended_bsr_size(mod_id, UE_id); } //TODO: Set carrier aggregation support (boolean) ue_config[i]->has_ca_support = 0; ue_config[i]->ca_support = 0; ue_config[i]->has_pcell_carrier_index = 1; - ue_config[i]->pcell_carrier_index = UE_PCCID(mod_id, i); + ue_config[i]->pcell_carrier_index = UE_PCCID(mod_id, UE_id); if(ue_config[i]->has_ca_support){ //TODO: Set cross carrier scheduling support (boolean) ue_config[i]->has_cross_carrier_sched_support = 0; @@ -858,8 +863,8 @@ int flexran_agent_enb_config_reply(mid_t mod_id, const void *params, Protocol__F cell_conf[i] = malloc(sizeof(Protocol__FlexCellConfig)); protocol__flex_cell_config__init(cell_conf[i]); - cell_conf[i]->phy_cell_id = 1; - cell_conf[i]->has_phy_cell_id = flexran_get_cell_id(mod_id,i); + cell_conf[i]->phy_cell_id = flexran_get_cell_id(mod_id,i); + cell_conf[i]->has_phy_cell_id = 1; cell_conf[i]->cell_id = i; cell_conf[i]->has_cell_id = 1; diff --git a/openair2/ENB_APP/flexran_agent_handler.c b/openair2/ENB_APP/flexran_agent_handler.c index fa3270696a..74ea5bfa1f 100644 --- a/openair2/ENB_APP/flexran_agent_handler.c +++ b/openair2/ENB_APP/flexran_agent_handler.c @@ -210,6 +210,7 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr //TODO: We do not deal with multiple CCs at the moment and eNB id is 0 int enb_id = mod_id; + int UE_id; //eNB_MAC_INST *eNB = &eNB_mac_inst[enb_id]; //UE_list_t *eNB_UE_list= &eNB->UE_list; @@ -249,8 +250,9 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr goto error; } for (i = 0; i < report_config.nr_ue; i++) { - report_config.ue_report_type[i].ue_rnti = flexran_get_ue_crnti(enb_id, i); //eNB_UE_list->eNB_UE_stats[UE_PCCID(enb_id,i)][i].crnti; - report_config.ue_report_type[i].ue_report_flags = ue_flags; + UE_id = flexran_get_ue_id(mod_id, i); + report_config.ue_report_type[i].ue_rnti = flexran_get_ue_crnti(enb_id, UE_id); //eNB_UE_list->eNB_UE_stats[UE_PCCID(enb_id,i)][i].crnti; + report_config.ue_report_type[i].ue_report_flags = ue_flags; } //Set the number of CCs and create a list with the cell stats configs report_config.nr_cc = MAX_NUM_CCs; @@ -359,7 +361,8 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr goto error; } for (i = 0; i < report_config.nr_ue; i++) { - report_config.ue_report_type[i].ue_rnti = ue_req->rnti[i]; + UE_id = flexran_get_ue_id(mod_id, i); + report_config.ue_report_type[i].ue_rnti = ue_req->rnti[UE_id]; report_config.ue_report_type[i].ue_report_flags = ue_req->flags; } break; diff --git a/openair2/ENB_APP/flexran_agent_ran_api.c b/openair2/ENB_APP/flexran_agent_ran_api.c index dc74652874..f47db710c4 100644 --- a/openair2/ENB_APP/flexran_agent_ran_api.c +++ b/openair2/ENB_APP/flexran_agent_ran_api.c @@ -113,6 +113,21 @@ int flexran_get_num_ues(mid_t mod_id) return RC.mac[mod_id]->UE_list.num_UEs; } +int flexran_get_ue_id(mid_t mod_id, int i) +{ + int n; + if (!mac_is_present(mod_id)) return 0; + /* get the (i+1)'th active UE */ + for (n = 0; n < MAX_MOBILES_PER_ENB; ++n) { + if (RC.mac[mod_id]->UE_list.active[n] == TRUE) { + if (i == 0) + return n; + --i; + } + } + return 0; +} + rnti_t flexran_get_ue_crnti(mid_t mod_id, mid_t ue_id) { return UE_RNTI(mod_id, ue_id); diff --git a/openair2/ENB_APP/flexran_agent_ran_api.h b/openair2/ENB_APP/flexran_agent_ran_api.h index d64d5806e6..a9c9299398 100644 --- a/openair2/ENB_APP/flexran_agent_ran_api.h +++ b/openair2/ENB_APP/flexran_agent_ran_api.h @@ -73,6 +73,10 @@ uint16_t flexran_get_future_sfn_sf(mid_t mod_id, int ahead_of_time); /* Return the number of attached UEs */ int flexran_get_num_ues(mid_t mod_id); +/* Return the UE id of attached UE as opposed to the index [0,NUM UEs] (i.e., + * the i'th active UE). Returns 0 if the i'th active UE could not be found. */ +int flexran_get_ue_id(mid_t mod_id, int i); + /* Get the rnti of a UE with id ue_id */ rnti_t flexran_get_ue_crnti(mid_t mod_id, mid_t ue_id); From 97c69dc4a4f5b8946197c38f85c4919fc2804c31 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 7 Jun 2018 11:58:34 +0200 Subject: [PATCH 145/379] Drop traffic in PDCP if RLC buffer is full If the buffer in the RLC is full, testing the buffer state over and over again slows the DL traffic down. In order to circumvent this, the PDCP will drop any data during a configurable time (compile-time) before it delivers data to RLC again. To change this, see the constant TM_SKIP_FULL_BUF_MS in pdcp.h. --- openair2/LAYER2/PDCP_v10.1.0/pdcp.c | 46 +++++++++++++++++++---------- openair2/LAYER2/PDCP_v10.1.0/pdcp.h | 2 ++ openair2/LAYER2/RLC/rlc.h | 1 + 3 files changed, 34 insertions(+), 15 deletions(-) diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index 4731039c1a..8b96542e33 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -169,6 +169,11 @@ boolean_t pdcp_data_req( start_meas(&UE_pdcp_stats[ctxt_pP->module_id].data_req); } + for (pdcp_uid = 0; pdcp_uid < MAX_MOBILES_PER_ENB; ++pdcp_uid) { + if (pdcp_enb[ctxt_pP->module_id].rnti[pdcp_uid] == ctxt_pP->rnti) + break; + } + // PDCP transparent mode for MBMS traffic if (modeP == PDCP_TRANSMISSION_MODE_TRANSPARENT) { @@ -366,13 +371,24 @@ boolean_t pdcp_data_req( LOG_DUMPMSG(PDCP,DEBUG_PDCP,(char *)pdcp_pdu_p->data,pdcp_pdu_size, "[MSG] PDCP DL %s PDU on rb_id %d\n",(srb_flagP)? "CONTROL" : "DATA", rb_idP); - rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p + /* if RLC buffer for this UE has been full, we want to skip all subsequent + * traffic for TM_SKIP_FULL_BUF_MS ms. Afterwards, it will be checkd again */ + if (pdcp_enb[ctxt_pP->module_id].time_buf_full[pdcp_uid] == 0 + || pdcp_enb[ctxt_pP->module_id].sfn - pdcp_enb[ctxt_pP->module_id].time_buf_full[pdcp_uid] >= TM_SKIP_FULL_BUF_MS) { + pdcp_enb[ctxt_pP->module_id].time_buf_full[pdcp_uid] = 0; + rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP, + confirmP, pdcp_pdu_size, pdcp_pdu_p #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) - ,sourceL2Id - ,destinationL2Id + ,sourceL2Id + ,destinationL2Id #endif - ); - + ); + } else { + /* RLC would free pdcp_pdu_p, but since we skip it, have to do it + * ourselves and fake normal operation */ + free_mem_block(pdcp_pdu_p, __func__); + rlc_status = RLC_OP_SKIPPED_FUL_BUF; + } } switch (rlc_status) { @@ -392,10 +408,19 @@ boolean_t pdcp_data_req( break; case RLC_OP_STATUS_OUT_OF_RESSOURCES: + pdcp_enb[ctxt_pP->module_id].time_buf_full[pdcp_uid] = pdcp_enb[ctxt_pP->module_id].sfn; LOG_W(PDCP, "Data sending request over RLC failed with 'Out of Resources' reason!\n"); + int h = TM_SKIP_FULL_BUF_MS; + LOG_W(PDCP, "Blocking incoming traffic for %d ms\n", h); ret= FALSE; break; + case RLC_OP_SKIPPED_FUL_BUF: + LOG_D(PDCP, "Skipping RLC request due to full buffer\n"); + /* fake good return so that GTP doesn't spam us */ + ret = TRUE; + break; + default: LOG_W(PDCP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status); ret= FALSE; @@ -408,16 +433,6 @@ boolean_t pdcp_data_req( stop_meas(&UE_pdcp_stats[ctxt_pP->module_id].data_req); } - /* - * Control arrives here only if rlc_data_req() returns RLC_OP_STATUS_OK - * so we return TRUE afterwards - */ - - for (pdcp_uid=0; pdcp_uid< MAX_MOBILES_PER_ENB;pdcp_uid++){ - if (pdcp_enb[ctxt_pP->module_id].rnti[pdcp_uid] == ctxt_pP->rnti ) - break; - } - //LOG_I(PDCP,"ueid %d lcid %d tx seq num %d\n", pdcp_uid, rb_idP+rb_offset, current_sn); Pdcp_stats_tx[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]++; Pdcp_stats_tx_tmp_w[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]++; @@ -1066,6 +1081,7 @@ void pdcp_add_UE(const protocol_ctxt_t* const ctxt_pP){ if (pdcp_enb[ctxt_pP->module_id].rnti[i] == 0 ){ pdcp_enb[ctxt_pP->module_id].rnti[i]=ctxt_pP->rnti; pdcp_enb[ctxt_pP->module_id].uid[i]=i; + pdcp_enb[ctxt_pP->module_id].time_buf_full[i] = 0; pdcp_enb[ctxt_pP->module_id].num_ues++; printf("add new uid is %d %x\n\n", i, ctxt_pP->rnti); // ret=1; diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h index 054bb5fac4..1bfe4e022a 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h @@ -106,6 +106,8 @@ typedef struct pdcp_enb_s { uint16_t uid[MAX_MOBILES_PER_ENB]; rnti_t rnti[MAX_MOBILES_PER_ENB]; uint16_t num_ues; +#define TM_SKIP_FULL_BUF_MS (500) + uint64_t time_buf_full[MAX_MOBILES_PER_ENB]; uint64_t sfn; frame_t frame; diff --git a/openair2/LAYER2/RLC/rlc.h b/openair2/LAYER2/RLC/rlc.h index 8c557188a2..dfb22f1a0d 100644 --- a/openair2/LAYER2/RLC/rlc.h +++ b/openair2/LAYER2/RLC/rlc.h @@ -67,6 +67,7 @@ typedef uint64_t hash_key_t; #define RLC_OP_STATUS_BAD_PARAMETER 22 #define RLC_OP_STATUS_INTERNAL_ERROR 2 #define RLC_OP_STATUS_OUT_OF_RESSOURCES 3 +#define RLC_OP_SKIPPED_FUL_BUF 4 #define RLC_MUI_UNDEFINED (mui_t)0 From cca5c1b71af1af1748706decc0592198d8474447 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 7 Jun 2018 17:42:38 +0200 Subject: [PATCH 146/379] FlexRAN: use correct identifiers for PDCP, RRC * give the correct UE_id instead an index of the protobuf message (they can diverge from each other) * in the PDCP part of the RAN API, the RAN API has to make the conversion UE_id (MAC) to UID (PDCP) * a follow up commit could clean up the interfaces: - the MAC functions take the UE_id - the RRC functions take the RNTI - the PDCP functions take the UID this would mean the caller has to find those ID but would decrease computations since the RAN API functions do not have to do that themselves --- .../CONTROL_MODULES/MAC/flexran_agent_mac.c | 91 ++++++------ .../CONTROL_MODULES/PDCP/flexran_agent_pdcp.c | 8 +- .../CONTROL_MODULES/RRC/flexran_agent_rrc.c | 31 +++-- openair2/ENB_APP/flexran_agent_ran_api.c | 130 ++++++++++++------ openair2/ENB_APP/flexran_agent_ran_api.h | 36 ++--- 5 files changed, 179 insertions(+), 117 deletions(-) diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c index caddb0616a..1732b39342 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c @@ -73,6 +73,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, // Protocol__FlexHeader *header; int i, j, k; + int UE_id; int cc_id = 0; int enb_id = mod_id; @@ -82,6 +83,8 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, for (i = 0; i < report_config->nr_ue; i++) { + UE_id = flexran_get_ue_id(mod_id, i); + ue_report[i]->rnti = report_config->ue_report_type[i].ue_rnti; ue_report[i]->has_rnti = 1; @@ -103,7 +106,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, /* Check flag for creation of PHR report */ if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_PHR) { - ue_report[i]->phr = flexran_get_ue_phr (enb_id, i); // eNB_UE_list->UE_template[UE_PCCID(enb_id,i)][i].phr_info; + ue_report[i]->phr = flexran_get_ue_phr (enb_id, UE_id); // eNB_UE_list->UE_template[UE_PCCID(enb_id,UE_id)][UE_id].phr_info; ue_report[i]->has_phr = 1; } @@ -125,11 +128,11 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, protocol__flex_rlc_bsr__init(rlc_reports[j]); rlc_reports[j]->lc_id = j+1; rlc_reports[j]->has_lc_id = 1; - rlc_reports[j]->tx_queue_size = flexran_get_tx_queue_size(enb_id, i, j + 1); + rlc_reports[j]->tx_queue_size = flexran_get_tx_queue_size(enb_id, UE_id, j + 1); rlc_reports[j]->has_tx_queue_size = 1; //TODO:Set tx queue head of line delay in ms - rlc_reports[j]->tx_queue_hol_delay = flexran_get_hol_delay(enb_id, i, j + 1); + rlc_reports[j]->tx_queue_hol_delay = flexran_get_hol_delay(enb_id, UE_id, j + 1); rlc_reports[j]->has_tx_queue_hol_delay = 1; //TODO:Set retransmission queue size in bytes rlc_reports[j]->retransmission_queue_size = 10; @@ -138,7 +141,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, rlc_reports[j]->retransmission_queue_hol_delay = 100; rlc_reports[j]->has_retransmission_queue_hol_delay = 0; //TODO DONE:Set current size of the pending message in bytes - rlc_reports[j]->status_pdu_size = flexran_get_num_pdus_buffer(enb_id , i, j + 1); + rlc_reports[j]->status_pdu_size = flexran_get_num_pdus_buffer(enb_id, UE_id, j + 1); rlc_reports[j]->has_status_pdu_size = 1; } @@ -152,7 +155,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, /* Check flag for creation of MAC CE buffer status report */ if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_MAC_CE_BS) { // TODO: Fill in the actual MAC CE buffer status report - ue_report[i]->pending_mac_ces = (flexran_get_MAC_CE_bitmap_TA(enb_id,i,0) | (0 << 1) | (0 << 2) | (0 << 3)) & 15; + ue_report[i]->pending_mac_ces = (flexran_get_MAC_CE_bitmap_TA(enb_id, UE_id, 0) | (0 << 1) | (0 << 2) | (0 << 3)) & 15; // Use as bitmap. Set one or more of the; /* Use as bitmap. Set one or more of the // PROTOCOL__FLEX_CE_TYPE__FLPCET_ values // found in stats_common.pb-c.h. See @@ -173,7 +176,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, dl_report->sfn_sn = flexran_get_sfn_sf(enb_id); dl_report->has_sfn_sn = 1; //Set the number of DL CQI reports for this UE. One for each CC - dl_report->n_csi_report = flexran_get_active_CC(enb_id,i); + dl_report->n_csi_report = flexran_get_active_CC(enb_id, UE_id); dl_report->n_csi_report = 1 ; //Create the actual CSI reports. Protocol__FlexDlCsi **csi_reports; @@ -190,7 +193,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, csi_reports[j]->serv_cell_index = j; csi_reports[j]->has_serv_cell_index = 1; //The rank indicator value for this cc - csi_reports[j]->ri = flexran_get_current_RI(enb_id,i,j); + csi_reports[j]->ri = flexran_get_current_RI(enb_id, UE_id, j); csi_reports[j]->has_ri = 1; //TODO: the type of CSI report based on the configuration of the UE //For now we only support type P10, which only needs a wideband value @@ -209,7 +212,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, protocol__flex_csi_p10__init(csi10); //TODO: set the wideband value // NN: this is also depends on cc_id - csi10->wb_cqi = flexran_get_ue_wcqi (enb_id, i); //eNB_UE_list->eNB_UE_stats[UE_PCCID(enb_id,i)][i].dl_cqi; + csi10->wb_cqi = flexran_get_ue_wcqi (enb_id, UE_id); //eNB_UE_list->eNB_UE_stats[UE_PCCID(enb_id,UE_id)][UE_id].dl_cqi; csi10->has_wb_cqi = 1; //Add the type of measurements to the csi report in the proper union type csi_reports[j]->p10csi = csi10; @@ -226,26 +229,26 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, csi11->wb_cqi = malloc(sizeof(csi11->wb_cqi)); csi11->n_wb_cqi = 1; - csi11->wb_cqi[0] = flexran_get_ue_wcqi (enb_id, i); + csi11->wb_cqi[0] = flexran_get_ue_wcqi (enb_id, UE_id); // According To spec 36.213 if (flexran_get_antenna_ports(enb_id, j) == 2 && csi_reports[j]->ri == 1) { // TODO PMI - csi11->wb_pmi = flexran_get_ue_wpmi(enb_id, i, 0); + csi11->wb_pmi = flexran_get_ue_wpmi(enb_id, UE_id, 0); csi11->has_wb_pmi = 1; } else if (flexran_get_antenna_ports(enb_id, j) == 2 && csi_reports[j]->ri == 2){ // TODO PMI - csi11->wb_pmi = flexran_get_ue_wpmi(enb_id, i, 0); + csi11->wb_pmi = flexran_get_ue_wpmi(enb_id, UE_id, 0); csi11->has_wb_pmi = 1; } else if (flexran_get_antenna_ports(enb_id, j) == 4 && csi_reports[j]->ri == 2){ // TODO PMI - csi11->wb_pmi = flexran_get_ue_wpmi(enb_id, i, 0); + csi11->wb_pmi = flexran_get_ue_wpmi(enb_id, UE_id, 0); csi11->has_wb_pmi = 1; @@ -269,7 +272,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, goto error; protocol__flex_csi_p20__init(csi20); - csi20->wb_cqi = flexran_get_ue_wcqi (enb_id, i); + csi20->wb_cqi = flexran_get_ue_wcqi (enb_id, UE_id); csi20->has_wb_cqi = 1; @@ -293,7 +296,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, // goto error; // protocol__flex_csi_p21__init(csi21); - // csi21->wb_cqi = flexran_get_ue_wcqi (enb_id, i); + // csi21->wb_cqi = flexran_get_ue_wcqi (enb_id, UE_id); // csi21->wb_pmi = flexran_get_ue_pmi(enb_id); //TDO inside @@ -321,7 +324,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, // goto error; // protocol__flex_csi_a12__init(csi12); - // csi12->wb_cqi = flexran_get_ue_wcqi (enb_id, i); + // csi12->wb_cqi = flexran_get_ue_wcqi (enb_id, UE_id); // csi12->sb_pmi = 1 ; //TODO inside @@ -336,17 +339,17 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, // goto error; // protocol__flex_csi_a22__init(csi22); - // csi22->wb_cqi = flexran_get_ue_wcqi (enb_id, i); + // csi22->wb_cqi = flexran_get_ue_wcqi (enb_id, UE_id); // csi22->sb_cqi = 1 ; //TODO inside - // csi22->wb_pmi = flexran_get_ue_wcqi (enb_id, i); + // csi22->wb_pmi = flexran_get_ue_wcqi (enb_id, UE_id); // csi22->has_wb_pmi = 1; // csi22->sb_pmi = 1 ; //TODO inside // csi22->has_wb_pmi = 1; - // csi22->sb_list = flexran_get_ue_wcqi (enb_id, i); + // csi22->sb_list = flexran_get_ue_wcqi (enb_id, UE_id); } @@ -359,7 +362,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, // goto error; // protocol__flex_csi_a20__init(csi20); - // csi20->wb_cqi = flexran_get_ue_wcqi (enb_id, i); + // csi20->wb_cqi = flexran_get_ue_wcqi (enb_id, UE_id); // csi20->has_wb_cqi = 1; // csi20>sb_cqi = 1 ; //TODO inside @@ -489,8 +492,8 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, full_ul_report->pucch_dbm[j]->has_serv_cell_index = 1; full_ul_report->pucch_dbm[j]->serv_cell_index = j; - if(flexran_get_p0_pucch_dbm(enb_id,i, j) != -1){ - full_ul_report->pucch_dbm[j]->p0_pucch_dbm = flexran_get_p0_pucch_dbm(enb_id,i,j); + if(flexran_get_p0_pucch_dbm(enb_id, UE_id, j) != -1){ + full_ul_report->pucch_dbm[j]->p0_pucch_dbm = flexran_get_p0_pucch_dbm(enb_id, UE_id, j); full_ul_report->pucch_dbm[j]->has_p0_pucch_dbm = 1; } } @@ -511,69 +514,69 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, protocol__flex_mac_stats__init(macstats); - macstats->total_bytes_sdus_dl = flexran_get_total_size_dl_mac_sdus(mod_id, i, cc_id); + macstats->total_bytes_sdus_dl = flexran_get_total_size_dl_mac_sdus(mod_id, UE_id, cc_id); macstats->has_total_bytes_sdus_dl = 1; - macstats->total_bytes_sdus_ul = flexran_get_total_size_ul_mac_sdus(mod_id, i, cc_id); + macstats->total_bytes_sdus_ul = flexran_get_total_size_ul_mac_sdus(mod_id, UE_id, cc_id); macstats->has_total_bytes_sdus_ul = 1; - macstats->tbs_dl = flexran_get_TBS_dl(mod_id, i, cc_id); + macstats->tbs_dl = flexran_get_TBS_dl(mod_id, UE_id, cc_id); macstats->has_tbs_dl = 1; - macstats->tbs_ul = flexran_get_TBS_ul(mod_id, i, cc_id); + macstats->tbs_ul = flexran_get_TBS_ul(mod_id, UE_id, cc_id); macstats->has_tbs_ul = 1; - macstats->prb_retx_dl = flexran_get_num_prb_retx_dl_per_ue(mod_id, i, cc_id); + macstats->prb_retx_dl = flexran_get_num_prb_retx_dl_per_ue(mod_id, UE_id, cc_id); macstats->has_prb_retx_dl = 1; - macstats->prb_retx_ul = flexran_get_num_prb_retx_ul_per_ue(mod_id, i, cc_id); + macstats->prb_retx_ul = flexran_get_num_prb_retx_ul_per_ue(mod_id, UE_id, cc_id); macstats->has_prb_retx_ul = 1; - macstats->prb_dl = flexran_get_num_prb_dl_tx_per_ue(mod_id, i, cc_id); + macstats->prb_dl = flexran_get_num_prb_dl_tx_per_ue(mod_id, UE_id, cc_id); macstats->has_prb_dl = 1; - macstats->prb_ul = flexran_get_num_prb_ul_rx_per_ue(mod_id, i, cc_id); + macstats->prb_ul = flexran_get_num_prb_ul_rx_per_ue(mod_id, UE_id, cc_id); macstats->has_prb_ul = 1; - macstats->mcs1_dl = flexran_get_mcs1_dl(mod_id, i, cc_id); + macstats->mcs1_dl = flexran_get_mcs1_dl(mod_id, UE_id, cc_id); macstats->has_mcs1_dl = 1; - macstats->mcs2_dl = flexran_get_mcs2_dl(mod_id, i, cc_id); + macstats->mcs2_dl = flexran_get_mcs2_dl(mod_id, UE_id, cc_id); macstats->has_mcs2_dl = 1; - macstats->mcs1_ul = flexran_get_mcs1_ul(mod_id, i, cc_id); + macstats->mcs1_ul = flexran_get_mcs1_ul(mod_id, UE_id, cc_id); macstats->has_mcs1_ul = 1; - macstats->mcs2_ul = flexran_get_mcs2_ul(mod_id, i, cc_id); + macstats->mcs2_ul = flexran_get_mcs2_ul(mod_id, UE_id, cc_id); macstats->has_mcs2_ul = 1; - macstats->total_prb_dl = flexran_get_total_prb_dl_tx_per_ue(mod_id, i, cc_id); + macstats->total_prb_dl = flexran_get_total_prb_dl_tx_per_ue(mod_id, UE_id, cc_id); macstats->has_total_prb_dl = 1; - macstats->total_prb_ul = flexran_get_total_prb_ul_rx_per_ue(mod_id, i, cc_id); + macstats->total_prb_ul = flexran_get_total_prb_ul_rx_per_ue(mod_id, UE_id, cc_id); macstats->has_total_prb_ul = 1; - macstats->total_pdu_dl = flexran_get_total_num_pdu_dl(mod_id, i, cc_id); + macstats->total_pdu_dl = flexran_get_total_num_pdu_dl(mod_id, UE_id, cc_id); macstats->has_total_pdu_dl = 1; - macstats->total_pdu_ul = flexran_get_total_num_pdu_ul(mod_id, i, cc_id); + macstats->total_pdu_ul = flexran_get_total_num_pdu_ul(mod_id, UE_id, cc_id); macstats->has_total_pdu_ul = 1; - macstats->total_tbs_dl = flexran_get_total_TBS_dl(mod_id, i, cc_id); + macstats->total_tbs_dl = flexran_get_total_TBS_dl(mod_id, UE_id, cc_id); macstats->has_total_tbs_dl = 1; - macstats->total_tbs_ul = flexran_get_total_TBS_ul(mod_id, i, cc_id); + macstats->total_tbs_ul = flexran_get_total_TBS_ul(mod_id, UE_id, cc_id); macstats->has_total_tbs_ul = 1; - macstats->harq_round = flexran_get_harq_round(mod_id, cc_id, i); + macstats->harq_round = flexran_get_harq_round(mod_id, cc_id, UE_id); macstats->has_harq_round = 1; Protocol__FlexMacSdusDl ** mac_sdus; - mac_sdus = malloc(sizeof(Protocol__FlexMacSdusDl) * flexran_get_num_mac_sdu_tx(mod_id, i, cc_id)); + mac_sdus = malloc(sizeof(Protocol__FlexMacSdusDl) * flexran_get_num_mac_sdu_tx(mod_id, UE_id, cc_id)); if (mac_sdus == NULL) goto error; - macstats->n_mac_sdus_dl = flexran_get_num_mac_sdu_tx(mod_id, i, cc_id); + macstats->n_mac_sdus_dl = flexran_get_num_mac_sdu_tx(mod_id, UE_id, cc_id); for (j = 0; j < macstats->n_mac_sdus_dl; j++){ @@ -581,10 +584,10 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, mac_sdus[j] = malloc(sizeof(Protocol__FlexMacSdusDl)); protocol__flex_mac_sdus_dl__init(mac_sdus[j]); - mac_sdus[j]->lcid = flexran_get_mac_sdu_lcid_index(mod_id, i, cc_id, j); + mac_sdus[j]->lcid = flexran_get_mac_sdu_lcid_index(mod_id, UE_id, cc_id, j); mac_sdus[j]->has_lcid = 1; - mac_sdus[j]->sdu_length = flexran_get_mac_sdu_size(mod_id, i, cc_id, mac_sdus[j]->lcid); + mac_sdus[j]->sdu_length = flexran_get_mac_sdu_size(mod_id, UE_id, cc_id, mac_sdus[j]->lcid); mac_sdus[j]->has_sdu_length = 1; diff --git a/openair2/ENB_APP/CONTROL_MODULES/PDCP/flexran_agent_pdcp.c b/openair2/ENB_APP/CONTROL_MODULES/PDCP/flexran_agent_pdcp.c index b2723f7181..7cb39fb723 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/PDCP/flexran_agent_pdcp.c +++ b/openair2/ENB_APP/CONTROL_MODULES/PDCP/flexran_agent_pdcp.c @@ -78,6 +78,7 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id, // Protocol__FlexHeader *header; int i; + int UE_id; // int cc_id = 0; @@ -85,6 +86,7 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id, if (report_config->nr_ue > 0) { for (i = 0; i < report_config->nr_ue; i++) { + UE_id = flexran_get_ue_id(mod_id, i); /* Check flag for creation of buffer status report */ if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_PDCP_STATS) { @@ -95,7 +97,7 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id, goto error; protocol__flex_pdcp_stats__init(pdcp_aggr_stats); - flexran_agent_pdcp_aggregate_stats(mod_id, i, pdcp_aggr_stats); + flexran_agent_pdcp_aggregate_stats(mod_id, UE_id, pdcp_aggr_stats); pdcp_aggr_stats->has_pkt_tx=1; pdcp_aggr_stats->has_pkt_tx_bytes =1; @@ -104,7 +106,7 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id, pdcp_aggr_stats->has_pkt_tx_aiat =1; pdcp_aggr_stats->has_pkt_tx_aiat_w =1; - pdcp_aggr_stats->pkt_tx_sn = flexran_get_pdcp_tx_sn(mod_id, i, DEFAULT_DRB); + pdcp_aggr_stats->pkt_tx_sn = flexran_get_pdcp_tx_sn(mod_id, UE_id, DEFAULT_DRB); pdcp_aggr_stats->has_pkt_tx_sn =1; pdcp_aggr_stats->has_pkt_rx =1; @@ -115,7 +117,7 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id, pdcp_aggr_stats->has_pkt_rx_aiat_w =1; pdcp_aggr_stats->has_pkt_rx_oo =1; - pdcp_aggr_stats->pkt_rx_sn = flexran_get_pdcp_rx_sn(mod_id, i, DEFAULT_DRB); + pdcp_aggr_stats->pkt_rx_sn = flexran_get_pdcp_rx_sn(mod_id, UE_id, DEFAULT_DRB); pdcp_aggr_stats->has_pkt_rx_sn =1; pdcp_aggr_stats->sfn = flexran_get_pdcp_sfn(mod_id); diff --git a/openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c b/openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c index d685845f26..b79ad88417 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c +++ b/openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c @@ -499,11 +499,14 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id, // Protocol__FlexHeader *header; int i,j; + int UE_id; /* Allocate memory for list of UE reports */ if (report_config->nr_ue > 0) { for (i = 0; i < report_config->nr_ue; i++) { + + UE_id = flexran_get_ue_id(mod_id, i); /* Check flag for creation of buffer status report */ if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_RRC_MEASUREMENTS) { @@ -515,14 +518,14 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id, goto error; protocol__flex_rrc_measurements__init(rrc_measurements); - rrc_measurements->measid = flexran_get_rrc_pcell_measid(mod_id,i); - rrc_measurements->has_measid = 1; - - rrc_measurements->pcell_rsrp = flexran_get_rrc_pcell_rsrp(mod_id,i); - rrc_measurements->has_pcell_rsrp = 1; - - rrc_measurements->pcell_rsrq = flexran_get_rrc_pcell_rsrq(mod_id,i); - rrc_measurements->has_pcell_rsrq = 1 ; + rrc_measurements->measid = flexran_get_rrc_pcell_measid(mod_id, UE_id); + rrc_measurements->has_measid = 1; + + rrc_measurements->pcell_rsrp = flexran_get_rrc_pcell_rsrp(mod_id, UE_id); + rrc_measurements->has_pcell_rsrp = 1; + + rrc_measurements->pcell_rsrq = flexran_get_rrc_pcell_rsrq(mod_id, UE_id); + rrc_measurements->has_pcell_rsrq = 1 ; /* Target Cell, Neghibouring*/ @@ -533,7 +536,7 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id, protocol__flex_neigh_cells_measurements__init(neigh_meas); - neigh_meas->n_eutra_meas = flexran_get_rrc_num_ncell(mod_id, i); + neigh_meas->n_eutra_meas = flexran_get_rrc_num_ncell(mod_id, UE_id); Protocol__FlexEutraMeasurements **eutra_meas = NULL; @@ -551,7 +554,7 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id, protocol__flex_eutra_measurements__init(eutra_meas[j]); - eutra_meas[j]->phys_cell_id = flexran_get_rrc_neigh_phy_cell_id(mod_id, i, j); + eutra_meas[j]->phys_cell_id = flexran_get_rrc_neigh_phy_cell_id(mod_id, UE_id, j); eutra_meas[j]->has_phys_cell_id = 1; @@ -562,10 +565,10 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id, protocol__flex_eutra_ref_signal_meas__init(meas_result); - meas_result->rsrp = flexran_get_rrc_neigh_rsrp(mod_id, i, eutra_meas[j]->phys_cell_id); + meas_result->rsrp = flexran_get_rrc_neigh_rsrp(mod_id, UE_id, eutra_meas[j]->phys_cell_id); meas_result->has_rsrp = 1; - meas_result->rsrq = flexran_get_rrc_neigh_rsrq(mod_id, i, eutra_meas[j]->phys_cell_id); + meas_result->rsrq = flexran_get_rrc_neigh_rsrq(mod_id, UE_id, eutra_meas[j]->phys_cell_id); meas_result->has_rsrq = 1; eutra_meas[j]->meas_result = meas_result; @@ -629,8 +632,10 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id, for (i = 0; i < report_config->nr_ue; i++){ + UE_id = flexran_get_ue_id(mod_id, i); + if (ue_report[i]->rrc_measurements->neigh_meas != NULL){ - for (j = 0; j < flexran_get_rrc_num_ncell(mod_id, i); j++){ + for (j = 0; j < flexran_get_rrc_num_ncell(mod_id, UE_id); j++){ free(ue_report[i]->rrc_measurements->neigh_meas->eutra_meas[j]); } diff --git a/openair2/ENB_APP/flexran_agent_ran_api.c b/openair2/ENB_APP/flexran_agent_ran_api.c index f47db710c4..0b41e4a479 100644 --- a/openair2/ENB_APP/flexran_agent_ran_api.c +++ b/openair2/ENB_APP/flexran_agent_ran_api.c @@ -1209,106 +1209,158 @@ void flexran_agent_set_operating_frame_type(mid_t mod_id, uint8_t cc_id, lte_fra /*********** PDCP *************/ /*PDCP super frame counter flexRAN*/ -uint32_t flexran_get_pdcp_sfn(const mid_t mod_id){ + +/* TODO the following is a hack. all the functions below should instead already + * receive the PDCP's uid and operate on it and the caller has the obligation + * to get the ID for this layer. + */ +static inline uint16_t flexran_get_pdcp_uid(mid_t mod_id, mid_t ue_id) +{ + rnti_t rnti = flexran_get_ue_crnti(mod_id, ue_id); + if (rnti == NOT_A_RNTI) return 0; + + for (uint16_t pdcp_uid = 0; pdcp_uid < MAX_MOBILES_PER_ENB; ++pdcp_uid) { + if (pdcp_enb[mod_id].rnti[pdcp_uid] == rnti) + return pdcp_uid; + } + return 0; +} + +uint32_t flexran_get_pdcp_sfn(mid_t mod_id) +{ return pdcp_enb[mod_id].sfn; } /*PDCP super frame counter flexRAN*/ -void flexran_set_pdcp_tx_stat_window(const mid_t mod_id, const mid_t ue_id, uint16_t obs_window){ +void flexran_set_pdcp_tx_stat_window(mid_t mod_id, mid_t ue_id, uint16_t obs_window) +{ + uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); if (obs_window > 0 ){ - Pdcp_stats_tx_window_ms[mod_id][ue_id]=obs_window; + Pdcp_stats_tx_window_ms[mod_id][uid]=obs_window; } else{ - Pdcp_stats_tx_window_ms[mod_id][ue_id]=1000; + Pdcp_stats_tx_window_ms[mod_id][uid]=1000; } } /*PDCP super frame counter flexRAN*/ -void flexran_set_pdcp_rx_stat_window(const mid_t mod_id, const mid_t ue_id, uint16_t obs_window){ +void flexran_set_pdcp_rx_stat_window(mid_t mod_id, mid_t ue_id, uint16_t obs_window) +{ + uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); if (obs_window > 0 ){ - Pdcp_stats_rx_window_ms[mod_id][ue_id]=obs_window; + Pdcp_stats_rx_window_ms[mod_id][uid]=obs_window; } else{ - Pdcp_stats_rx_window_ms[mod_id][ue_id]=1000; + Pdcp_stats_rx_window_ms[mod_id][uid]=1000; } } /*PDCP num tx pdu status flexRAN*/ -uint32_t flexran_get_pdcp_tx(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid){ - if (mod_id <0 || mod_id> MAX_NUM_CCs || ue_id<0 || ue_id> MAX_MOBILES_PER_ENB || lcid<0 || lcid>NB_RB_MAX) +uint32_t flexran_get_pdcp_tx(mid_t mod_id, mid_t ue_id, lcid_t lcid) +{ + if (mod_id < 0 || mod_id > MAX_NUM_CCs || ue_id < 0 || ue_id > MAX_MOBILES_PER_ENB + || lcid < 0 || lcid > NB_RB_MAX) return -1; - return Pdcp_stats_tx[mod_id][ue_id][lcid]; + uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); + return Pdcp_stats_tx[mod_id][uid][lcid]; } /*PDCP num tx bytes status flexRAN*/ -uint32_t flexran_get_pdcp_tx_bytes(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid){ - return Pdcp_stats_tx_bytes[mod_id][ue_id][lcid]; +uint32_t flexran_get_pdcp_tx_bytes(mid_t mod_id, mid_t ue_id, lcid_t lcid) +{ + uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); + return Pdcp_stats_tx_bytes[mod_id][uid][lcid]; } /*PDCP number of transmit packet / second status flexRAN*/ -uint32_t flexran_get_pdcp_tx_w(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid){ - return Pdcp_stats_tx_w[mod_id][ue_id][lcid]; +uint32_t flexran_get_pdcp_tx_w(mid_t mod_id, mid_t ue_id, lcid_t lcid) +{ + uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); + return Pdcp_stats_tx_w[mod_id][uid][lcid]; } /*PDCP throughput (bit/s) status flexRAN*/ -uint32_t flexran_get_pdcp_tx_bytes_w(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid){ - return Pdcp_stats_tx_bytes_w[mod_id][ue_id][lcid]; +uint32_t flexran_get_pdcp_tx_bytes_w(mid_t mod_id, mid_t ue_id, lcid_t lcid) +{ + uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); + return Pdcp_stats_tx_bytes_w[mod_id][uid][lcid]; } /*PDCP tx sequence number flexRAN*/ -uint32_t flexran_get_pdcp_tx_sn(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid){ - return Pdcp_stats_tx_sn[mod_id][ue_id][lcid]; +uint32_t flexran_get_pdcp_tx_sn(mid_t mod_id, mid_t ue_id, lcid_t lcid) +{ + uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); + return Pdcp_stats_tx_sn[mod_id][uid][lcid]; } /*PDCP tx aggregated packet arrival flexRAN*/ -uint32_t flexran_get_pdcp_tx_aiat(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid){ - return Pdcp_stats_tx_aiat[mod_id][ue_id][lcid]; +uint32_t flexran_get_pdcp_tx_aiat(mid_t mod_id, mid_t ue_id, lcid_t lcid) +{ + uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); + return Pdcp_stats_tx_aiat[mod_id][uid][lcid]; } /*PDCP tx aggregated packet arrival flexRAN*/ -uint32_t flexran_get_pdcp_tx_aiat_w(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid){ - return Pdcp_stats_tx_aiat_w[mod_id][ue_id][lcid]; +uint32_t flexran_get_pdcp_tx_aiat_w(mid_t mod_id, mid_t ue_id, lcid_t lcid) +{ + uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); + return Pdcp_stats_tx_aiat_w[mod_id][uid][lcid]; } - /*PDCP num rx pdu status flexRAN*/ -uint32_t flexran_get_pdcp_rx(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid){ - return Pdcp_stats_rx[mod_id][ue_id][lcid]; +uint32_t flexran_get_pdcp_rx(mid_t mod_id, mid_t ue_id, lcid_t lcid) +{ + uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); + return Pdcp_stats_rx[mod_id][uid][lcid]; } /*PDCP num rx bytes status flexRAN*/ -uint32_t flexran_get_pdcp_rx_bytes(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid){ - return Pdcp_stats_rx_bytes[mod_id][ue_id][lcid]; +uint32_t flexran_get_pdcp_rx_bytes(mid_t mod_id, mid_t ue_id, lcid_t lcid) +{ + uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); + return Pdcp_stats_rx_bytes[mod_id][uid][lcid]; } /*PDCP number of received packet / second flexRAN*/ -uint32_t flexran_get_pdcp_rx_w(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid){ - return Pdcp_stats_rx_w[mod_id][ue_id][lcid]; +uint32_t flexran_get_pdcp_rx_w(mid_t mod_id, mid_t ue_id, lcid_t lcid) +{ + uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); + return Pdcp_stats_rx_w[mod_id][uid][lcid]; } /*PDCP gootput (bit/s) status flexRAN*/ -uint32_t flexran_get_pdcp_rx_bytes_w(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid){ - return Pdcp_stats_rx_bytes_w[mod_id][ue_id][lcid]; +uint32_t flexran_get_pdcp_rx_bytes_w(mid_t mod_id, mid_t ue_id, lcid_t lcid) +{ + uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); + return Pdcp_stats_rx_bytes_w[mod_id][uid][lcid]; } /*PDCP rx sequence number flexRAN*/ -uint32_t flexran_get_pdcp_rx_sn(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid){ - return Pdcp_stats_rx_sn[mod_id][ue_id][lcid]; +uint32_t flexran_get_pdcp_rx_sn(mid_t mod_id, mid_t ue_id, lcid_t lcid) +{ + uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); + return Pdcp_stats_rx_sn[mod_id][uid][lcid]; } /*PDCP rx aggregated packet arrival flexRAN*/ -uint32_t flexran_get_pdcp_rx_aiat(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid){ - return Pdcp_stats_rx_aiat[mod_id][ue_id][lcid]; +uint32_t flexran_get_pdcp_rx_aiat(mid_t mod_id, mid_t ue_id, lcid_t lcid) +{ + uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); + return Pdcp_stats_rx_aiat[mod_id][uid][lcid]; } /*PDCP rx aggregated packet arrival flexRAN*/ -uint32_t flexran_get_pdcp_rx_aiat_w(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid){ - return Pdcp_stats_rx_aiat_w[mod_id][ue_id][lcid]; +uint32_t flexran_get_pdcp_rx_aiat_w(mid_t mod_id, mid_t ue_id, lcid_t lcid) +{ + uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); + return Pdcp_stats_rx_aiat_w[mod_id][uid][lcid]; } /*PDCP num of received outoforder pdu status flexRAN*/ -uint32_t flexran_get_pdcp_rx_oo(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid){ - return Pdcp_stats_rx_outoforder[mod_id][ue_id][lcid]; +uint32_t flexran_get_pdcp_rx_oo(mid_t mod_id, mid_t ue_id, lcid_t lcid) +{ + uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); + return Pdcp_stats_rx_outoforder[mod_id][uid][lcid]; } /******************** RRC *****************************/ diff --git a/openair2/ENB_APP/flexran_agent_ran_api.h b/openair2/ENB_APP/flexran_agent_ran_api.h index a9c9299398..37bdaae170 100644 --- a/openair2/ENB_APP/flexran_agent_ran_api.h +++ b/openair2/ENB_APP/flexran_agent_ran_api.h @@ -425,59 +425,59 @@ uint8_t flexran_get_rrc_status(mid_t mod_id, mid_t ue_id); /***************************** PDCP ***********************/ /*PDCP superframe numberflexRAN*/ -uint32_t flexran_get_pdcp_sfn(const mid_t mod_id); +uint32_t flexran_get_pdcp_sfn(mid_t mod_id); /*PDCP pdcp tx stats window*/ -void flexran_set_pdcp_tx_stat_window(const mid_t mod_id, const mid_t ue_id, uint16_t obs_window); +void flexran_set_pdcp_tx_stat_window(mid_t mod_id, mid_t ue_id, uint16_t obs_window); /*PDCP pdcp rx stats window*/ -void flexran_set_pdcp_rx_stat_window(const mid_t mod_id, const mid_t ue_id, uint16_t obs_window); +void flexran_set_pdcp_rx_stat_window(mid_t mod_id, mid_t ue_id, uint16_t obs_window); /*PDCP num tx pdu status flexRAN*/ -uint32_t flexran_get_pdcp_tx(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid); +uint32_t flexran_get_pdcp_tx(mid_t mod_id, mid_t ue_id, lcid_t lcid); /*PDCP num tx bytes status flexRAN*/ -uint32_t flexran_get_pdcp_tx_bytes(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid); +uint32_t flexran_get_pdcp_tx_bytes(mid_t mod_id, mid_t ue_id, lcid_t lcid); /*PDCP number of transmit packet / second status flexRAN*/ -uint32_t flexran_get_pdcp_tx_w(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid); +uint32_t flexran_get_pdcp_tx_w(mid_t mod_id, mid_t ue_id, lcid_t lcid); /*PDCP pdcp tx bytes in a given window flexRAN*/ -uint32_t flexran_get_pdcp_tx_bytes_w(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid); +uint32_t flexran_get_pdcp_tx_bytes_w(mid_t mod_id, mid_t ue_id, lcid_t lcid); /*PDCP tx sequence number flexRAN*/ -uint32_t flexran_get_pdcp_tx_sn(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid); +uint32_t flexran_get_pdcp_tx_sn(mid_t mod_id, mid_t ue_id, lcid_t lcid); /*PDCP tx aggregated packet arrival flexRAN*/ -uint32_t flexran_get_pdcp_tx_aiat(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid); +uint32_t flexran_get_pdcp_tx_aiat(mid_t mod_id, mid_t ue_id, lcid_t lcid); /*PDCP tx aggregated packet arrival per second flexRAN*/ -uint32_t flexran_get_pdcp_tx_aiat_w(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid); +uint32_t flexran_get_pdcp_tx_aiat_w(mid_t mod_id, mid_t ue_id, lcid_t lcid); /*PDCP num rx pdu status flexRAN*/ -uint32_t flexran_get_pdcp_rx(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid); +uint32_t flexran_get_pdcp_rx(mid_t mod_id, mid_t ue_id, lcid_t lcid); /*PDCP num rx bytes status flexRAN*/ -uint32_t flexran_get_pdcp_rx_bytes(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid); +uint32_t flexran_get_pdcp_rx_bytes(mid_t mod_id, mid_t ue_id, lcid_t lcid); /*PDCP number of received packet / second flexRAN*/ -uint32_t flexran_get_pdcp_rx_w(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid); +uint32_t flexran_get_pdcp_rx_w(mid_t mod_id, mid_t ue_id, lcid_t lcid); /*PDCP gootput (bit/s) status flexRAN*/ -uint32_t flexran_get_pdcp_rx_bytes_w(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid); +uint32_t flexran_get_pdcp_rx_bytes_w(mid_t mod_id, mid_t ue_id, lcid_t lcid); /*PDCP rx sequence number flexRAN*/ -uint32_t flexran_get_pdcp_rx_sn(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid); +uint32_t flexran_get_pdcp_rx_sn(mid_t mod_id, mid_t ue_id, lcid_t lcid); /*PDCP rx aggregated packet arrival flexRAN*/ -uint32_t flexran_get_pdcp_rx_aiat(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid); +uint32_t flexran_get_pdcp_rx_aiat(mid_t mod_id, mid_t ue_id, lcid_t lcid); /*PDCP rx aggregated packet arrival per second flexRAN*/ -uint32_t flexran_get_pdcp_rx_aiat_w(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid); +uint32_t flexran_get_pdcp_rx_aiat_w(mid_t mod_id, mid_t ue_id, lcid_t lcid); /*PDCP num of received outoforder pdu status flexRAN*/ -uint32_t flexran_get_pdcp_rx_oo(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid); +uint32_t flexran_get_pdcp_rx_oo(mid_t mod_id, mid_t ue_id, lcid_t lcid); /*********************RRC**********************/ /*Get primary cell measuremeant id flexRAN*/ From 77f2ffcdfb887f7543af94a25dcfba06d9cb9d03 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 7 Jun 2018 17:46:01 +0200 Subject: [PATCH 147/379] FlexRAN: call the agent_rrc_xface with the mod_id --- openair2/RRC/LTE/rrc_eNB.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 10590bc019..e62596aed6 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -6658,7 +6658,7 @@ rrc_eNB_decode_dcch( //WARNING:Inform the controller about the UE activation. Should be moved to RRC agent in the future if (rrc_agent_registered[ctxt_pP->module_id]) { - agent_rrc_xface[ctxt_pP->eNB_index]->flexran_agent_notify_ue_state_change(ctxt_pP->module_id, + agent_rrc_xface[ctxt_pP->module_id]->flexran_agent_notify_ue_state_change(ctxt_pP->module_id, ue_context_p->ue_id_rnti, PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_UPDATED); } @@ -6804,7 +6804,7 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { //WARNING:Inform the controller about the UE activation. Should be moved to RRC agent in the future if (mac_agent_registered[ctxt_pP->module_id]) { - agent_rrc_xface[ctxt_pP->eNB_index]->flexran_agent_notify_ue_state_change(ctxt_pP->module_id, + agent_rrc_xface[ctxt_pP->module_id]->flexran_agent_notify_ue_state_change(ctxt_pP->module_id, ue_context_p->ue_id_rnti, PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_ACTIVATED); } @@ -6857,7 +6857,7 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { //WARNING:Inform the controller about the UE activation. Should be moved to RRC agent in the future if (rrc_agent_registered[ctxt_pP->module_id]) { - agent_rrc_xface[ctxt_pP->eNB_index]->flexran_agent_notify_ue_state_change(ctxt_pP->module_id, + agent_rrc_xface[ctxt_pP->module_id]->flexran_agent_notify_ue_state_change(ctxt_pP->module_id, ue_context_p->ue_id_rnti, PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_ACTIVATED); } From 204281e3afe5666689b0dcea07a38f22546b4516 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sun, 17 Jun 2018 13:48:39 +0200 Subject: [PATCH 148/379] change types in RCconfig_flexran(), avoid seg fault the integration of the nfapi-L2-emulator-for-develop (f254107b2) added more types in the RCconfig_flexran(), but they were partially wrong. This commit fixes those types after the rebase of this branch on top of 2018.w19 --- openair2/ENB_APP/enb_config.c | 87 +++++++++++++++++------------------ 1 file changed, 42 insertions(+), 45 deletions(-) diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 195ab17877..6d9b2edf82 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -101,54 +101,51 @@ void RCconfig_flexran() ue_TimersAndConstants_t300, ue_TimersAndConstants_t301, ue_TimersAndConstants_t310, ue_TimersAndConstants_t311, ue_TimersAndConstants_n310, ue_TimersAndConstants_n311, - ue_TransmissionMode; + ue_TransmissionMode, ue_multiple_max; - int32_t ue_multiple_max = 0; - - e_SL_CP_Len_r12 rxPool_sc_CP_Len; - e_SL_PeriodComm_r12 rxPool_sc_Period; - e_SL_CP_Len_r12 rxPool_data_CP_Len; - long rxPool_ResourceConfig_prb_Num; - long rxPool_ResourceConfig_prb_Start; - long rxPool_ResourceConfig_prb_End; - SL_OffsetIndicator_r12_PR rxPool_ResourceConfig_offsetIndicator_present; - long rxPool_ResourceConfig_offsetIndicator_choice; - SubframeBitmapSL_r12_PR rxPool_ResourceConfig_subframeBitmap_present; - char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf; - long rxPool_ResourceConfig_subframeBitmap_choice_bs_size; - long rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused; - - //SIB19 - //for discRxPool - SL_CP_Len_r12_t discRxPool_cp_Len; - e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPool_discPeriod; - long discRxPool_numRetx; - long discRxPool_numRepetition; - long discRxPool_ResourceConfig_prb_Num; - long discRxPool_ResourceConfig_prb_Start; - long discRxPool_ResourceConfig_prb_End; - SL_OffsetIndicator_r12_PR discRxPool_ResourceConfig_offsetIndicator_present; - long discRxPool_ResourceConfig_offsetIndicator_choice; - SubframeBitmapSL_r12_PR discRxPool_ResourceConfig_subframeBitmap_present; - char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf; - long discRxPool_ResourceConfig_subframeBitmap_choice_bs_size; - long discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused; - //for discRxPoolPS - SL_CP_Len_r12_t discRxPoolPS_cp_Len; - e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPoolPS_discPeriod; - long discRxPoolPS_numRetx; - long discRxPoolPS_numRepetition; - long discRxPoolPS_ResourceConfig_prb_Num; - long discRxPoolPS_ResourceConfig_prb_Start; - long discRxPoolPS_ResourceConfig_prb_End; - SL_OffsetIndicator_r12_PR discRxPoolPS_ResourceConfig_offsetIndicator_present; - long discRxPoolPS_ResourceConfig_offsetIndicator_choice; - SubframeBitmapSL_r12_PR discRxPoolPS_ResourceConfig_subframeBitmap_present; - char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf; - long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size; - long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused; + const char* rxPool_sc_CP_Len; + const char* rxPool_sc_Period; + const char* rxPool_data_CP_Len; + libconfig_int rxPool_ResourceConfig_prb_Num; + libconfig_int rxPool_ResourceConfig_prb_Start; + libconfig_int rxPool_ResourceConfig_prb_End; + const char* rxPool_ResourceConfig_offsetIndicator_present; + libconfig_int rxPool_ResourceConfig_offsetIndicator_choice; + const char* rxPool_ResourceConfig_subframeBitmap_present; + char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf; + libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_size; + libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused; + //SIB19 + //for discRxPool + const char* discRxPool_cp_Len; + const char* discRxPool_discPeriod; + libconfig_int discRxPool_numRetx; + libconfig_int discRxPool_numRepetition; + libconfig_int discRxPool_ResourceConfig_prb_Num; + libconfig_int discRxPool_ResourceConfig_prb_Start; + libconfig_int discRxPool_ResourceConfig_prb_End; + const char* discRxPool_ResourceConfig_offsetIndicator_present; + libconfig_int discRxPool_ResourceConfig_offsetIndicator_choice; + const char* discRxPool_ResourceConfig_subframeBitmap_present; + char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf; + libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_size; + libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused; + //for discRxPoolPS + const char* discRxPoolPS_cp_Len; + const char* discRxPoolPS_discPeriod; + libconfig_int discRxPoolPS_numRetx; + libconfig_int discRxPoolPS_numRepetition; + libconfig_int discRxPoolPS_ResourceConfig_prb_Num; + libconfig_int discRxPoolPS_ResourceConfig_prb_Start; + libconfig_int discRxPoolPS_ResourceConfig_prb_End; + const char* discRxPoolPS_ResourceConfig_offsetIndicator_present; + libconfig_int discRxPoolPS_ResourceConfig_offsetIndicator_choice; + const char* discRxPoolPS_ResourceConfig_subframeBitmap_present; + char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf; + libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size; + libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused; /* get number of eNBs */ paramdef_t ENBSParams[] = ENBSPARAMS_DESC; From 3278aa494dcb68881be740668bf73b0df512734a Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 26 Jun 2018 15:20:30 +0200 Subject: [PATCH 149/379] Return immediately from pdcp_data_req When the RLC layer returns error codes (like dropped packets), this is still counted as PDCP layer traffic. In order to reflect dropped packets or malfunctioning, this patch makes that upon an RLC error code, the function is exited immediately. In this case, it is not counted as additional PDCP traffic. An example is too much UDP traffic. If the RLC buffer is saturated and the packet therefore refused, incoming traffic won't be counted anymore. With this patch, the PDCP layer statistics won't count such traffic anymore. --- openair2/LAYER2/PDCP_v10.1.0/pdcp.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index 8b96542e33..135c6e73fa 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -399,27 +399,24 @@ boolean_t pdcp_data_req( case RLC_OP_STATUS_BAD_PARAMETER: LOG_W(PDCP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n"); - ret= FALSE; - break; + return FALSE; case RLC_OP_STATUS_INTERNAL_ERROR: LOG_W(PDCP, "Data sending request over RLC failed with 'Internal Error' reason!\n"); - ret= FALSE; - break; + return FALSE; case RLC_OP_STATUS_OUT_OF_RESSOURCES: pdcp_enb[ctxt_pP->module_id].time_buf_full[pdcp_uid] = pdcp_enb[ctxt_pP->module_id].sfn; LOG_W(PDCP, "Data sending request over RLC failed with 'Out of Resources' reason!\n"); int h = TM_SKIP_FULL_BUF_MS; LOG_W(PDCP, "Blocking incoming traffic for %d ms\n", h); - ret= FALSE; - break; + return FALSE; case RLC_OP_SKIPPED_FUL_BUF: LOG_D(PDCP, "Skipping RLC request due to full buffer\n"); - /* fake good return so that GTP doesn't spam us */ - ret = TRUE; - break; + /* fake good return so that GTP doesn't spam us and return immediately so + * that dropped traffic is not counted in PDCP traffic stats */ + return TRUE; default: LOG_W(PDCP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status); From 71a9115abdf819b8a0bc03e1657eb7aee5b26ece Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 26 Jun 2018 15:25:29 +0200 Subject: [PATCH 150/379] Iterate over actual number of CC, not NFAPI_CC_MAX --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 16 ++++++++-------- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 10 ++++------ openair2/LAYER2/MAC/pre_processor.c | 6 +++--- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 7a58cff2e5..80fd4ec370 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -510,7 +510,7 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP, } //weight = get_ue_weight(module_idP,UE_id); aggregation = 2; - for (CC_id = 0; CC_id < NFAPI_CC_MAX; CC_id++) { + for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) { N_RB_DL[CC_id] = to_prb(cc[CC_id].mib->message.dl_Bandwidth); min_rb_unit[CC_id] = get_min_rb_unit(module_idP, CC_id); // get number of PRBs less those used by common channels @@ -559,7 +559,7 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP, sort_UEs(module_idP, slice_idxP, frameP, subframeP); } - for (CC_id = 0; CC_id < NFAPI_CC_MAX; CC_id++) { + for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) { LOG_D(MAC, "doing schedule_ue_spec for CC_id %d\n", CC_id); dl_req = &eNB->DL_req[CC_id].dl_config_request_body; @@ -1464,7 +1464,7 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, // otherwise it contains the id of the slice it belongs to. // (Information about slicing must be retained to deal with isolation). // FIXME: This method does not consider RBGs that are free and belong to no slices - for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { + for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; ++CC_id) { cc = &RC.mac[Mod_id]->common_channels[CC_id]; N_RBG[CC_id] = to_rbg(cc->mib->message.dl_Bandwidth); for (rbg = 0; rbg < N_RBG[CC_id]; ++rbg) { @@ -1481,7 +1481,7 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, // Find out which slices need other resources. // FIXME: I don't think is really needed since we check nb_rbs_remaining later - for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { + for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; ++CC_id) { for (i = 0; i < sli->n_dl; ++i) { has_traffic[CC_id][i] = 0; for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; ++UE_id) { @@ -1497,7 +1497,7 @@ void dlsch_scheduler_interslice_multiplexing(module_id_t Mod_id, // MULTIPLEXING // This part is an adaptation of dlsch_scheduler_pre_processor_allocate() code - for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { + for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; ++CC_id) { N_RB_DL = to_prb(RC.mac[Mod_id]->common_channels[CC_id].mib->message.dl_Bandwidth); min_rb_unit = get_min_rb_unit(Mod_id, CC_id); @@ -1589,7 +1589,7 @@ void dlsch_scheduler_qos_multiplexing(module_id_t Mod_id, int frameP, sub_frame_ slice_info_t *sli = &RC.mac[Mod_id]->slice_info; //UE_sched_ctrl *ue_sched_ctl; - for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { + for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; ++CC_id) { for (i = 0; i < sli->n_dl; ++i) { // Sort UE again @@ -1636,7 +1636,7 @@ fill_DLSCH_dci(module_id_t module_idP, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME (VCD_SIGNAL_DUMPER_FUNCTIONS_FILL_DLSCH_DCI, VCD_FUNCTION_IN); - for (CC_id = 0; CC_id < NFAPI_CC_MAX; CC_id++) { + for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) { LOG_D(MAC, "Doing fill DCI for CC_id %d\n", CC_id); if (mbsfn_flagP[CC_id] > 0) @@ -1866,7 +1866,7 @@ void schedule_PCH(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) start_meas(&eNB->schedule_pch); - for (CC_id = 0; CC_id < NFAPI_CC_MAX; CC_id++) { + for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) { cc = &eNB->common_channels[CC_id]; vrb_map = (void *) &cc->vrb_map; n_rb_dl = to_prb(cc->mib->message.dl_Bandwidth); diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 4618d363f9..937c561a21 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -1006,12 +1006,10 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP, break; } } + if (sched_subframe < subframeP) sched_frame++; - for (CC_id = 0; CC_id < NFAPI_CC_MAX; CC_id++) { - - - + for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) { //leave out first RB for PUCCH first_rb[CC_id] = 1; @@ -1090,7 +1088,7 @@ schedule_ulsch_rnti(module_id_t module_idP, nfapi_ul_config_request_body_t *ul_req_tmp_body = &ul_req_tmp->ul_config_request_body; nfapi_ul_config_ulsch_harq_information *ulsch_harq_information; - for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { + for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; ++CC_id) { N_RB_UL = to_prb(cc[CC_id].ul_Bandwidth); UE_list->first_rb_offset[CC_id][slice_idx] = cmin(N_RB_UL, sli->ul[slice_idx].first_rb); } @@ -1098,7 +1096,7 @@ schedule_ulsch_rnti(module_id_t module_idP, //LOG_D(MAC, "entering ulsch preprocesor\n"); ulsch_scheduler_pre_processor(module_idP, slice_idx, frameP, subframeP, sched_subframeP, first_rb); - for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { + for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; ++CC_id) { first_rb_slice[CC_id] = first_rb[CC_id] + UE_list->first_rb_offset[CC_id][slice_idx]; } //LOG_D(MAC, "exiting ulsch preprocesor\n"); diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index a2c88674c8..124d3efbff 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -450,7 +450,7 @@ void decode_slice_positioning(module_id_t Mod_idP, int RBG, start_frequency, end_frequency; // Init slice_alloc_mask - for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { + for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_idP]; ++CC_id) { for (RBG = 0; RBG < N_RBG_MAX; ++RBG) { slice_allocation_mask[CC_id][RBG] = 0; } @@ -458,7 +458,7 @@ void decode_slice_positioning(module_id_t Mod_idP, start_frequency = RC.mac[Mod_idP]->slice_info.dl[slice_idx].pos_low; end_frequency = RC.mac[Mod_idP]->slice_info.dl[slice_idx].pos_high; - for (CC_id = 0; CC_id < NFAPI_CC_MAX; ++CC_id) { + for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_idP]; ++CC_id) { for (RBG = start_frequency; RBG <= end_frequency; ++RBG) { slice_allocation_mask[CC_id][RBG] = 1; } @@ -1418,7 +1418,7 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP, uint8_t *vrb_map; COMMON_channels_t *cc; // - for (CC_id = 0; CC_id < NFAPI_CC_MAX; CC_id++) { + for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) { LOG_D(MAC, "Running preprocessor for UE %d (%x)\n", UE_id,(int)(UE_RNTI(module_idP, UE_id))); // initialize harq_pid and round From 08b122e3ff11febe097632e52cf88143cbdfbc84 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 26 Jun 2018 15:34:15 +0200 Subject: [PATCH 151/379] FlexRAN: update slice config array dimensions --- openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c | 6 +++--- .../CONTROL_MODULES/MAC/flexran_agent_mac_internal.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c index 1732b39342..6cc3caced6 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c @@ -53,13 +53,13 @@ struct lfds700_ringbuffer_element *dl_mac_config_array[NUM_MAX_ENB]; struct lfds700_ringbuffer_state ringbuffer_state[NUM_MAX_ENB]; /* the slice config as kept in the underlying system */ -Protocol__FlexSliceConfig *slice_config[NUM_MAX_ENB]; +Protocol__FlexSliceConfig *slice_config[MAX_NUM_SLICES]; /* a structure that keeps updates which will be reflected in slice_config later */ -Protocol__FlexSliceConfig *sc_update[NUM_MAX_ENB]; +Protocol__FlexSliceConfig *sc_update[MAX_NUM_SLICES]; /* indicates whether sc_update contains new data */ int perform_slice_config_update_count = 1; /* queue of incoming new UE<>slice association commands */ -Protocol__FlexUeConfig *ue_slice_assoc_update[NUM_MAX_UE]; +Protocol__FlexUeConfig *ue_slice_assoc_update[MAX_NUM_SLICES]; int n_ue_slice_assoc_updates = 0; /* mutex for sc_update: do not receive new config and write it at the same time */ pthread_mutex_t sc_update_mtx = PTHREAD_MUTEX_INITIALIZER; diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c index 1c2aef3baa..54b98ade20 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c @@ -34,10 +34,10 @@ #include "flexran_agent_mac_slice_verification.h" /* from flexran_agent_mac.c */ -extern Protocol__FlexSliceConfig *slice_config[NUM_MAX_ENB]; -extern Protocol__FlexSliceConfig *sc_update[NUM_MAX_ENB]; +extern Protocol__FlexSliceConfig *slice_config[MAX_NUM_SLICES]; +extern Protocol__FlexSliceConfig *sc_update[MAX_NUM_SLICES]; extern int perform_slice_config_update_count; -extern Protocol__FlexUeConfig *ue_slice_assoc_update[NUM_MAX_UE]; +extern Protocol__FlexUeConfig *ue_slice_assoc_update[MAX_NUM_SLICES]; extern int n_ue_slice_assoc_updates; extern pthread_mutex_t sc_update_mtx; @@ -1574,7 +1574,7 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco void prepare_ue_slice_assoc_update(mid_t mod_id, Protocol__FlexUeConfig *ue_config) { - if (n_ue_slice_assoc_updates == NUM_MAX_UE) { + if (n_ue_slice_assoc_updates == MAX_NUM_SLICES) { LOG_E(FLEXRAN_AGENT, "[%d] can not handle flex_ue_config message, buffer is full; try again later\n", mod_id); From 21983a202857f9a8b93d616cfa84d5f4c3a4be56 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sat, 23 Jun 2018 12:23:57 +0200 Subject: [PATCH 152/379] Patch fairRR scheduler to use slice iface of pre-processor --- openair2/LAYER2/MAC/eNB_scheduler_fairRR.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c index 76589eebdb..8a9b4ce4df 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c @@ -542,6 +542,7 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id, uint16_t temp_total_rbs_count; unsigned char temp_total_ue_count; unsigned char MIMO_mode_indicator[MAX_NUM_CCs][N_RBG_MAX]; + uint8_t slice_allocation[MAX_NUM_CCs][N_RBG_MAX]; int UE_id, i; uint16_t j; uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX]; @@ -660,17 +661,22 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id, transmission_mode = get_tmode(Mod_id,CC_id,UE_id); + /* slicing support has been introduced into the scheduler. Provide dummy + * data so that the preprocessor "simply works" */ + for (int i = 0; i < MAX_NUM_CCs; ++i) + for (int j = 0; i < N_RBG_MAX; ++j) + slice_allocation[i][j] = 1; + LOG_T(MAC,"calling dlsch_scheduler_pre_processor_allocate .. \n "); dlsch_scheduler_pre_processor_allocate (Mod_id, UE_id, CC_id, N_RBG[CC_id], - transmission_mode, min_rb_unit[CC_id], - N_RB_DL, (uint16_t (*)[NUMBER_OF_UE_MAX])nb_rbs_required, (uint16_t (*)[NUMBER_OF_UE_MAX])nb_rbs_required_remaining, rballoc_sub, + slice_allocation, MIMO_mode_indicator); temp_total_rbs_count -= ue_sched_ctl->pre_nb_available_rbs[CC_id]; temp_total_ue_count--; From e1a598bc8d53d448e390d5b01a3446680d1334e6 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 13 Aug 2018 12:03:24 +0200 Subject: [PATCH 153/379] Fix function parameter definition/order Affects: * store_dlsch_buffer() * assign_rbs_required() --- openair2/LAYER2/MAC/mac_proto.h | 4 ++-- openair2/LAYER2/MAC/pre_processor.c | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/openair2/LAYER2/MAC/mac_proto.h b/openair2/LAYER2/MAC/mac_proto.h index 0d4cd72ae9..e0fdade419 100644 --- a/openair2/LAYER2/MAC/mac_proto.h +++ b/openair2/LAYER2/MAC/mac_proto.h @@ -700,8 +700,8 @@ int add_new_ue(module_id_t Mod_id, int CC_id, rnti_t rnti, int harq_pid ); int rrc_mac_remove_ue(module_id_t Mod_id, rnti_t rntiP); -void store_dlsch_buffer(module_id_t Mod_id, slice_id_t slice_id, frame_t frameP, sub_frame_t subframeP); -void assign_rbs_required(module_id_t Mod_id, slice_id_t slice_id, frame_t frameP, sub_frame_t subframe, uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], int min_rb_unit[NFAPI_CC_MAX]); +void store_dlsch_buffer(module_id_t Mod_id, int slice_idx, frame_t frameP, sub_frame_t subframeP); +void assign_rbs_required(module_id_t Mod_id, int slice_idx, frame_t frameP, sub_frame_t subframe, uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], int min_rb_unit[NFAPI_CC_MAX]); int maxround(module_id_t Mod_id, uint16_t rnti, int frame, sub_frame_t subframe, uint8_t ul_flag); diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 124d3efbff..4c7146a41c 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -177,8 +177,8 @@ assign_rbs_required(module_id_t Mod_id, int slice_idx, frame_t frameP, sub_frame_t subframe, - int min_rb_unit[NFAPI_CC_MAX], - uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]) + uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], + int min_rb_unit[NFAPI_CC_MAX]) { uint16_t TBS = 0; @@ -1279,9 +1279,7 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id, store_dlsch_buffer(Mod_id, slice_idx, frameP, subframeP); // Calculate the number of RBs required by each UE on the basis of logical channel's buffer - assign_rbs_required(Mod_id, slice_idx, frameP, subframeP, - min_rb_unit, - nb_rbs_required); + assign_rbs_required(Mod_id, slice_idx, frameP, subframeP, nb_rbs_required, min_rb_unit); // Sorts the user on the basis of dlsch logical channel buffer and CQI sort_UEs(Mod_id, slice_idx, frameP, subframeP); From 972f52fd56197ade1bac1338561ec031cb4c3eed Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 13 Aug 2018 12:44:44 +0200 Subject: [PATCH 154/379] fix remove LOG_N in restart --- openair2/ENB_APP/enb_app.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openair2/ENB_APP/enb_app.c b/openair2/ENB_APP/enb_app.c index 1289cf59b5..7cb0550ed1 100644 --- a/openair2/ENB_APP/enb_app.c +++ b/openair2/ENB_APP/enb_app.c @@ -335,7 +335,7 @@ void handle_reconfiguration(module_id_t mod_id) clock_gettime(CLOCK_MONOTONIC, &start); flexran_agent_info_t *flexran = RC.flexran[mod_id]; - LOG_N(ENB_APP, "lte-softmodem soft-restart requested\n"); + LOG_I(ENB_APP, "lte-softmodem soft-restart requested\n"); if (ENB_WAIT == flexran->node_ctrl_state) { /* this is already waiting, just release */ @@ -354,7 +354,7 @@ void handle_reconfiguration(module_id_t mod_id) /* node_ctrl_state should have value ENB_MAKE_WAIT only if this method is not * executed by the FlexRAN thread */ if (ENB_MAKE_WAIT == flexran->node_ctrl_state) { - LOG_N(ENB_APP, " * eNB %d: Waiting for FlexRAN RTController command *\n", mod_id); + LOG_I(ENB_APP, " * eNB %d: Waiting for FlexRAN RTController command *\n", mod_id); pthread_mutex_lock(&flexran->mutex_node_ctrl); flexran->node_ctrl_state = ENB_WAIT; while (ENB_NORMAL_OPERATION != flexran->node_ctrl_state) @@ -376,5 +376,5 @@ void handle_reconfiguration(module_id_t mod_id) end.tv_sec -= 1; end.tv_nsec = end.tv_nsec - start.tv_nsec + 1000000000; } - LOG_N(ENB_APP, "lte-softmodem restart succeeded in %ld.%ld s\n", end.tv_sec, end.tv_nsec / 1000000); + LOG_I(ENB_APP, "lte-softmodem restart succeeded in %ld.%ld s\n", end.tv_sec, end.tv_nsec / 1000000); } From 49b167d6aedf5a00d40f8233c31a2a5f53921749 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 13 Aug 2018 12:04:39 +0200 Subject: [PATCH 155/379] Remove warnings pre_processor --- openair2/LAYER2/MAC/pre_processor.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 4c7146a41c..8b33cae488 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -1401,8 +1401,8 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP, int UE_id; uint8_t CC_id; int i, j; - UE_list_t *UE_list = &RC.mac[module_idP]->UE_list; - UE_sched_ctrl *ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; + UE_list_t *UE_list; + UE_sched_ctrl *ue_sched_ctl; int N_RB_DL, RBGsize, RBGsize_last; int N_RBG[NFAPI_CC_MAX]; @@ -1411,8 +1411,6 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP, #endif rnti_t rnti; - UE_list_t *UE_list; - UE_sched_ctrl *ue_sched_ctl; uint8_t *vrb_map; COMMON_channels_t *cc; // From d774d09d2409115d8ef2d4351cac0289bae15217 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 3 Sep 2018 18:25:57 +0200 Subject: [PATCH 156/379] CI: proper gitlab notifications for FDD/TDD test Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 42 ++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index 260daef225..783612c13b 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -31,8 +31,6 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) { } def doRedHatBuild = false -def FDD_Band7_B210_Status -def TDD_Band40_B210_Status pipeline { agent { @@ -267,19 +265,21 @@ pipeline { stages { stage ("Test FDD - Band 7 - B210") { steps { - gitlabCommitStatus(name: "Test-FDD-Band7") { - script { - try { - if ("MERGE".equals(env.gitlabActionType)) { - FDD_Band7_B210_Status = build job: 'eNB-CI-FDD-Band7-B210', + script { + try { + if ("MERGE".equals(env.gitlabActionType)) { + gitlabCommitStatus(name: "Test-FDD-Band7") { + build job: 'eNB-CI-FDD-Band7-B210', parameters: [ string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)), string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)), booleanParam(name: 'eNB_mergeRequest', value: true) ] - } else { - FDD_Band7_B210_Status = build job: 'eNB-CI-FDD-Band7-B210', + } + } else { + gitlabCommitStatus(name: "Test-FDD-Band7") { + build job: 'eNB-CI-FDD-Band7-B210', parameters: [ string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)), @@ -287,9 +287,9 @@ pipeline { booleanParam(name: 'eNB_mergeRequest', value: false) ] } - } catch (Exception e) { - currentBuild.result = 'FAILURE' } + } catch (Exception e) { + currentBuild.result = 'FAILURE' } } } @@ -313,19 +313,21 @@ pipeline { } stage ("Test TDD - Band 40 - B210") { steps { - gitlabCommitStatus(name: "Test-TDD-Band40") { - script { - try { - if ("MERGE".equals(env.gitlabActionType)) { - TDD_Band40_B210_Status = build job: 'eNB-CI-TDD-Band40-B210', + script { + try { + if ("MERGE".equals(env.gitlabActionType)) { + gitlabCommitStatus(name: "Test-TDD-Band40") { + build job: 'eNB-CI-TDD-Band40-B210', parameters: [ string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)), string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)), booleanParam(name: 'eNB_mergeRequest', value: true) ] - } else { - TDD_Band40_B210_Status = build job: 'eNB-CI-TDD-Band40-B210', + } + } else { + gitlabCommitStatus(name: "Test-TDD-Band40") { + build job: 'eNB-CI-TDD-Band40-B210', parameters: [ string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)), @@ -333,9 +335,9 @@ pipeline { booleanParam(name: 'eNB_mergeRequest', value: false) ] } - } catch (Exception e) { - currentBuild.result = 'FAILURE' } + } catch (Exception e) { + currentBuild.result = 'FAILURE' } } } From 2a82e02a320784f5d129dd51d1a381074d21e0ce Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 4 Sep 2018 09:26:49 +0200 Subject: [PATCH 157/379] CI: fix TDD scenario (missing rebuild) Signed-off-by: Raphael Defosseux --- ci-scripts/xml_files/enb_usrpb210_band40.xml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ci-scripts/xml_files/enb_usrpb210_band40.xml b/ci-scripts/xml_files/enb_usrpb210_band40.xml index 3f51f2d34a..5b54d9b8df 100644 --- a/ci-scripts/xml_files/enb_usrpb210_band40.xml +++ b/ci-scripts/xml_files/enb_usrpb210_band40.xml @@ -21,8 +21,8 @@ --> - 050101 060101 070101 040101 030105 040301 040501 040602 040601 040603 040401 040201 030201 050201 060201 070201 050101 060101 070101 040101 030104 040301 040501 040702 040701 040401 040201 030201 050201 060201 070201 - 010101 + 010101 050101 060101 070101 040101 030104 040301 040501 040602 040601 040603 040401 040201 030201 030105 040301 040502 040702 040701 040401 040201 030201 050201 060201 070201 + Build_eNB @@ -30,13 +30,13 @@ -w USRP -c --eNB - + Initialize_eNB Initialize eNB (FDD/Band40/10MHz) -O ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf --codingw --fepw - + Initialize_eNB Initialize eNB (TDD/Band40/5MHz/info) -O ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf --codingw --fepw @@ -74,6 +74,13 @@ 25 + + Ping + ping (10MHz - 20 sec) + -c 20 + 25 + + Iperf iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(balanced) From 5131449160444af34b55015e57c9534c865ab66a Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Tue, 4 Sep 2018 12:36:42 +0200 Subject: [PATCH 158/379] bugfix: add handling of DFT 768 everywhere it's needed In the eNB it's not really used for the moment because there is a limitation to uplink scheduling. In openair2/LAYER2/MAC/eNB_scheduler_ulsch.c we have: while (((rb_table[rb_table_index] > (N_RB_UL - 1 - first_rb[CC_id])) || (rb_table[rb_table_index] > 45)) That limits uplink scheduling to at most 44 RBs. The 768 case is for 64 RBs. --- .../PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c | 2 +- openair1/PHY/LTE_REFSIG/lte_ul_ref.c | 14 +++++++------- openair1/PHY/LTE_TRANSPORT/transport_extern.h | 8 ++++---- openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c | 6 ++++++ openair1/PHY/LTE_UE_TRANSPORT/drs_modulation.c | 2 +- openair1/PHY/LTE_UE_TRANSPORT/srs_modulation.c | 2 +- openair1/PHY/LTE_UE_TRANSPORT/ulsch_modulation.c | 6 ++++++ openair1/PHY/TOOLS/tools_defs.h | 1 + openair1/SIMULATION/LTE_PHY/unitary_defs.h | 4 ++-- 9 files changed, 29 insertions(+), 16 deletions(-) diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c index e5b28ff2e3..a8d73cfdea 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c @@ -91,7 +91,7 @@ int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32))); eNB->ulsch[UE_id]->harq_processes[harq_pid]->n_DMRS2 + frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(subframe<<1)+Ns]) % 12; - Msc_idx_ptr = (uint16_t*) bsearch(&Msc_RS, dftsizes, 33, sizeof(uint16_t), compareints); + Msc_idx_ptr = (uint16_t*) bsearch(&Msc_RS, dftsizes, 34, sizeof(uint16_t), compareints); if (Msc_idx_ptr) Msc_RS_idx = Msc_idx_ptr - dftsizes; diff --git a/openair1/PHY/LTE_REFSIG/lte_ul_ref.c b/openair1/PHY/LTE_REFSIG/lte_ul_ref.c index 01b27205c2..ee7619c23c 100644 --- a/openair1/PHY/LTE_REFSIG/lte_ul_ref.c +++ b/openair1/PHY/LTE_REFSIG/lte_ul_ref.c @@ -27,13 +27,13 @@ #include "lte_refsig.h" #include "PHY/defs_eNB.h" -uint16_t dftsizes[33] = {12,24,36,48,60,72,96,108,120,144,180,192,216,240,288,300,324,360,384,432,480,540,576,600,648,720,864,900,960,972,1080,1152,1200}; +uint16_t dftsizes[34] = {12,24,36,48,60,72,96,108,120,144,180,192,216,240,288,300,324,360,384,432,480,540,576,600,648,720,768,864,900,960,972,1080,1152,1200}; -uint16_t ref_primes[33] = {11,23,31,47,59,71,89,107,113,139,179,191,211,239,283,293,317,359,383,431,479,523,571,599,647,719,863,887,953,971,1069,1151,1193}; +uint16_t ref_primes[34] = {11,23,31,47,59,71,89,107,113,139,179,191,211,239,283,293,317,359,383,431,479,523,571,599,647,719,761,863,887,953,971,1069,1151,1193}; -int16_t *ul_ref_sigs[30][2][33]; -int16_t *ul_ref_sigs_rx[30][2][33]; //these contain the sequences in repeated format and quantized to QPSK ifdef IFFT_FPGA +int16_t *ul_ref_sigs[30][2][34]; +int16_t *ul_ref_sigs_rx[30][2][34]; //these contain the sequences in repeated format and quantized to QPSK ifdef IFFT_FPGA /* 36.211 table 5.5.1.2-1 */ char ref12[360] = {-1,1,3,-3,3,3,1,1,3,1,-3,3,1,1,3,3,3,-1,1,-3,-3,1,-3,3,1,1,-3,-3,-3,-1,-3,-3,1,-3,1,-1,-1,1,1,1,1,-1,-3,-3,1,-3,3,-1,-1,3,1,-1,1,-1,-3,-1,1,-1,1,3,1,-3,3,-1,-1,1,1,-1,-1,3,-3,1,-1,3,-3,-3,-3,3,1,-1,3,3,-3,1,-3,-1,-1,-1,1,-3,3,-1,1,-3,3,1,1,-3,3,1,-1,-1,-1,1,1,3,-1,1,1,-3,-1,3,3,-1,-3,1,1,1,1,1,-1,3,-1,1,1,-3,-3,-1,-3,-3,3,-1,3,1,-1,-1,3,3,-3,1,3,1,3,3,1,-3,1,1,-3,1,1,1,-3,-3,-3,1,3,3,-3,3,-3,1,1,3,-1,-3,3,3,-3,1,-1,-3,-1,3,1,3,3,3,-1,1,3,-1,1,-3,-1,-1,1,1,3,1,-1,-3,1,3,1,-1,1,3,3,3,-1,-1,3,-1,-3,1,1,3,-3,3,-3,-3,3,1,3,-1,-3,3,1,1,-3,1,-3,-3,-1,-1,1,-3,-1,3,1,3,1,-1,-1,3,-3,-1,-3,-1,-1,-3,1,1,1,1,3,1,-1,1,-3,-1,-1,3,-1,1,-3,-3,-3,-3,-3,1,-1,-3,1,1,-3,-3,-3,-3,-1,3,-3,1,-3,3,1,1,-1,-3,-1,-3,1,-1,1,3,-1,1,1,1,3,1,3,3,-1,1,-1,-3,-3,1,1,-3,3,3,1,3,3,1,-3,-1,-1,3,1,3,-3,-3,3,-3,1,-1,-1,3,-1,-3,-3,-1,-3,-1,-3,3,1,-1,1,3,-3,-3,-1,3,-3,3,-1,3,3,-3,3,3,-1,-1,3,-3,-3,-1,-1,-3,-1,3,-3,3,1,-1}; @@ -49,7 +49,7 @@ void generate_ul_ref_sigs(void) unsigned int u,v,Msc_RS,q,m,n; // These are the Zadoff-Chu sequences (for RB 3-100) - for (Msc_RS=2; Msc_RS<33; Msc_RS++) { + for (Msc_RS=2; Msc_RS<34; Msc_RS++) { for (u=0; u<30; u++) { for (v=0; v<2; v++) { qbar = ref_primes[Msc_RS] * (u+1)/(double)31; @@ -119,7 +119,7 @@ void generate_ul_ref_sigs_rx(void) unsigned int u,v,Msc_RS,q,m,n; // These are the complex conjugated Zadoff-Chu sequences quantized to QPSK stored in repeated format (for RB 3-100) - for (Msc_RS=2; Msc_RS<33; Msc_RS++) { + for (Msc_RS=2; Msc_RS<34; Msc_RS++) { for (u=0; u<30; u++) { for (v=0; v<2; v++) { qbar = ref_primes[Msc_RS] * (u+1)/(double)31; @@ -186,7 +186,7 @@ void free_ul_ref_sigs(void) unsigned int u,v,Msc_RS; - for (Msc_RS=0; Msc_RS<33; Msc_RS++) { + for (Msc_RS=0; Msc_RS<34; Msc_RS++) { for (u=0; u<30; u++) { for (v=0; v<2; v++) { if (ul_ref_sigs[u][v][Msc_RS]) { diff --git a/openair1/PHY/LTE_TRANSPORT/transport_extern.h b/openair1/PHY/LTE_TRANSPORT/transport_extern.h index 6a9fa49405..1ddf5ac040 100644 --- a/openair1/PHY/LTE_TRANSPORT/transport_extern.h +++ b/openair1/PHY/LTE_TRANSPORT/transport_extern.h @@ -25,10 +25,10 @@ extern char lte_cqi_snr_dB[15]; extern short conjugate[8],conjugate2[8]; extern short minus_one[8]; extern short minus_one[8]; -extern short *ul_ref_sigs[30][2][33]; -extern short *ul_ref_sigs_rx[30][2][33]; -extern unsigned short dftsizes[33]; -extern unsigned short ref_primes[33]; +extern short *ul_ref_sigs[30][2][34]; +extern short *ul_ref_sigs_rx[30][2][34]; +extern unsigned short dftsizes[34]; +extern unsigned short ref_primes[34]; extern int qam64_table[8],qam16_table[4],qpsk_table[2]; diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c index adb0d1576f..61076f2aae 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c @@ -335,6 +335,12 @@ void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH) dft720((int16_t*)idft_in2,(int16_t*)idft_out2,1); break; + case 768: + dft768((int16_t*)idft_in0,(int16_t*)idft_out0,1); + dft768((int16_t*)idft_in1,(int16_t*)idft_out1,1); + dft768((int16_t*)idft_in2,(int16_t*)idft_out2,1); + break; + case 864: dft864((int16_t*)idft_in0,(int16_t*)idft_out0,1); dft864((int16_t*)idft_in1,(int16_t*)idft_out1,1); diff --git a/openair1/PHY/LTE_UE_TRANSPORT/drs_modulation.c b/openair1/PHY/LTE_UE_TRANSPORT/drs_modulation.c index 96ff82ba16..1c49cde394 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/drs_modulation.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/drs_modulation.c @@ -83,7 +83,7 @@ int generate_drs_pusch(PHY_VARS_UE *ue, // cyclic_shift1 = 0; Msc_RS = 12*nb_rb; - Msc_idx_ptr = (uint16_t*) bsearch(&Msc_RS, dftsizes, 33, sizeof(uint16_t), compareints); + Msc_idx_ptr = (uint16_t*) bsearch(&Msc_RS, dftsizes, 34, sizeof(uint16_t), compareints); if (Msc_idx_ptr) Msc_RS_idx = Msc_idx_ptr - dftsizes; diff --git a/openair1/PHY/LTE_UE_TRANSPORT/srs_modulation.c b/openair1/PHY/LTE_UE_TRANSPORT/srs_modulation.c index 8bb2299b7c..e6960273c7 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/srs_modulation.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/srs_modulation.c @@ -181,7 +181,7 @@ int32_t generate_srs(LTE_DL_FRAME_PARMS *frame_parms, return(-1); } - Msc_idx_ptr = (uint16_t*) bsearch((uint16_t*) &Msc_RS, (uint16_t*) dftsizes, 33, sizeof(uint16_t), compareints); + Msc_idx_ptr = (uint16_t*) bsearch((uint16_t*) &Msc_RS, (uint16_t*) dftsizes, 34, sizeof(uint16_t), compareints); if (Msc_idx_ptr) Msc_RS_idx = Msc_idx_ptr - dftsizes; diff --git a/openair1/PHY/LTE_UE_TRANSPORT/ulsch_modulation.c b/openair1/PHY/LTE_UE_TRANSPORT/ulsch_modulation.c index 1281f815f8..a9878b4eae 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/ulsch_modulation.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/ulsch_modulation.c @@ -287,6 +287,12 @@ void dft_lte(int32_t *z,int32_t *d, int32_t Msc_PUSCH, uint8_t Nsymb) dft720((int16_t*)dft_in2,(int16_t*)dft_out2,1); break; + case 768: + dft768((int16_t*)dft_in0,(int16_t*)dft_out0,1); + dft768((int16_t*)dft_in1,(int16_t*)dft_out1,1); + dft768((int16_t*)dft_in2,(int16_t*)dft_out2,1); + break; + case 864: dft864((int16_t*)dft_in0,(int16_t*)dft_out0,1); dft864((int16_t*)dft_in1,(int16_t*)dft_out1,1); diff --git a/openair1/PHY/TOOLS/tools_defs.h b/openair1/PHY/TOOLS/tools_defs.h index a5e8d49eb7..6b7e0f5595 100644 --- a/openair1/PHY/TOOLS/tools_defs.h +++ b/openair1/PHY/TOOLS/tools_defs.h @@ -375,6 +375,7 @@ void dft576(int16_t *x,int16_t *y,uint8_t scale_flag); void dft600(int16_t *x,int16_t *y,uint8_t scale_flag); void dft648(int16_t *x,int16_t *y,uint8_t scale_flag); void dft720(int16_t *x,int16_t *y,uint8_t scale_flag); +void dft768(int16_t *x,int16_t *y,uint8_t scale_flag); void dft864(int16_t *x,int16_t *y,uint8_t scale_flag); void dft900(int16_t *x,int16_t *y,uint8_t scale_flag); void dft960(int16_t *x,int16_t *y,uint8_t scale_flag); diff --git a/openair1/SIMULATION/LTE_PHY/unitary_defs.h b/openair1/SIMULATION/LTE_PHY/unitary_defs.h index 133656a562..27bd9794f2 100644 --- a/openair1/SIMULATION/LTE_PHY/unitary_defs.h +++ b/openair1/SIMULATION/LTE_PHY/unitary_defs.h @@ -27,5 +27,5 @@ void exit_fun(const char *s) { exit(-1); } extern unsigned int dlsch_tbs25[27][25],TBStable[27][110]; extern unsigned char offset_mumimo_llr_drange_fix; -extern unsigned short dftsizes[33]; -extern short *ul_ref_sigs[30][2][33]; +extern unsigned short dftsizes[34]; +extern short *ul_ref_sigs[30][2][34]; From 6270d94f911fa81940cfb013b079a643dd240f98 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Tue, 4 Sep 2018 12:43:29 +0200 Subject: [PATCH 159/379] bugfix: use correct comparison The comparison in AssertFatal was not correct, taking the opposite meaning to the one expected. --- openair2/LAYER2/MAC/eNB_scheduler_primitives.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c index b85335caab..a41e0db6c0 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c @@ -1157,11 +1157,11 @@ program_dlsch_acknak(module_id_t module_idP, int CC_idP, int UE_idP, } break; case NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE: - AssertFatal(use_simultaneous_pucch_pusch == 1, + AssertFatal(use_simultaneous_pucch_pusch == 0, "Cannot be NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE, simultaneous_pucch_pusch is active"); break; case NFAPI_UL_CONFIG_ULSCH_UCI_HARQ_PDU_TYPE: - AssertFatal(use_simultaneous_pucch_pusch == 0, + AssertFatal(use_simultaneous_pucch_pusch == 1, "Cannot be NFAPI_UL_CONFIG_ULSCH_UCI_PDU_TYPE, simultaneous_pucch_pusch is inactive\n"); break; From b1920797aeaa223b6ffd22379f79a70e2af9a9aa Mon Sep 17 00:00:00 2001 From: Haruki NAOI Date: Tue, 4 Sep 2018 22:15:27 +0900 Subject: [PATCH 160/379] Revert "Fix: --log-mem options is erased." This reverts commit 3182183860680bb07fea0881a5f52b1191dbea3e. --- common/utils/LOG/log.c | 301 ++---------------------------- common/utils/LOG/log.h | 14 -- common/utils/LOG/log_extern.h | 3 - common/utils/itti/assertions.h | 1 + common/utils/itti/signals.c | 3 - targets/RT/USER/lte-softmodem.c | 9 +- targets/RT/USER/lte-softmodem.h | 1 - targets/RT/USER/lte-uesoftmodem.c | 1 - 8 files changed, 21 insertions(+), 312 deletions(-) diff --git a/common/utils/LOG/log.c b/common/utils/LOG/log.c index b020f19f01..02ee849202 100644 --- a/common/utils/LOG/log.c +++ b/common/utils/LOG/log.c @@ -49,19 +49,8 @@ #include "common/config/config_userapi.h" // main log variables -log_mem_cnt_t log_mem_d[2]; -int log_mem_flag=0; -int log_mem_multi=1; -volatile int log_mem_side=0; -pthread_mutex_t log_mem_lock; -pthread_cond_t log_mem_notify; -pthread_t log_mem_thread; -int log_mem_file_cnt=0; -volatile int log_mem_write_flag=0; -volatile int log_mem_write_side=0; -char __log_mem_filename[1024]={0}; -char * log_mem_filename = &__log_mem_filename[0]; -char logmem_filename[1024] = {0}; + + mapping log_level_names[] = { {"error", OAILOG_ERR}, @@ -496,7 +485,7 @@ int rt = pthread_getname_np(pthread_self(), threadname,bufsize) ; void logRecord_mt(const char *file, const char *func, int line, int comp, int level, const char* format, ... ) -{ + { char threadname[PR_SET_NAME]; char log_buffer[MAX_LOG_TOTAL]; @@ -504,23 +493,23 @@ void logRecord_mt(const char *file, const char *func, int line, int comp, int le va_start(args, format); - if(log_mem_flag == 1) { - log_output_memory(file,func,line,comp,level, format,args); - } - else { - snprintf(log_buffer, MAX_LOG_TOTAL , "%s%s[%s]%s %s %s", - log_level_highlight_end[level], - ( (g_log->flag & FLAG_NOCOLOR)?"":log_level_highlight_start[level]), - g_log->log_component[comp].name, - ( (g_log->flag & FLAG_LEVEL)?g_log->level2string[level]:""), - ( (g_log->flag & FLAG_THREAD)?log_getthreadname(threadname,PR_SET_NAME+1):""), - format); - g_log->log_component[comp].fwrite(g_log->log_component[comp].stream,log_buffer, args); - } + + + + snprintf(log_buffer, MAX_LOG_TOTAL , "%s%s[%s]%s %s %s", + log_level_highlight_end[level], + ( (g_log->flag & FLAG_NOCOLOR)?"":log_level_highlight_start[level]), + g_log->log_component[comp].name, + ( (g_log->flag & FLAG_LEVEL)?g_log->level2string[level]:""), + ( (g_log->flag & FLAG_THREAD)?log_getthreadname(threadname,PR_SET_NAME+1):""), + format); + + g_log->log_component[comp].fwrite(g_log->log_component[comp].stream,log_buffer, args); va_end(args); + } @@ -542,6 +531,8 @@ int set_log(int component, int level, int interval) return 0; } + + void set_glog(int level) { for (int c=0; c< MAX_LOG_COMPONENTS; c++ ) { @@ -637,262 +628,6 @@ void logClean (void) } } - -extern int oai_exit; -void flush_mem_to_file(void) -{ - int fp; - char f_name[1024]; - struct timespec slp_tm; - slp_tm.tv_sec = 0; - slp_tm.tv_nsec = 10000; - - pthread_setname_np( pthread_self(), "flush_mem_to_file"); - - while (!oai_exit) { - pthread_mutex_lock(&log_mem_lock); - log_mem_write_flag=0; - pthread_cond_wait(&log_mem_notify, &log_mem_lock); - log_mem_write_flag=1; - pthread_mutex_unlock(&log_mem_lock); - // write! - if(log_mem_d[log_mem_write_side].enable_flag==0){ - if(log_mem_file_cnt>1){ - log_mem_file_cnt=1; - printf("log over write!!!\n"); - } - snprintf(f_name,1024, "%s_%d.log",log_mem_filename,log_mem_file_cnt); - fp=open(f_name, O_WRONLY | O_CREAT, 0666); - int ret = write(fp, log_mem_d[log_mem_write_side].buf_p, log_mem_d[log_mem_write_side].buf_index); - if ( ret < 0) { - fprintf(stderr,"{LOG} %s %d Couldn't write in %s \n",__FILE__,__LINE__,f_name); - exit(EXIT_FAILURE); - } - close(fp); - log_mem_file_cnt++; - log_mem_d[log_mem_write_side].buf_index=0; - log_mem_d[log_mem_write_side].enable_flag=1; - }else{ - printf("If you'd like to write log, you should set enable flag to 0!!!\n"); - nanosleep(&slp_tm,NULL); - } - } -} - -void log_output_memory(const char *file, const char *func, int line, int comp, int level, const char* format,va_list args) -{ - //logRecord_mt(file,func,line, pthread_self(), comp, level, format, ##args) - int len = 0; - log_component_t *c; - char *log_start; - char *log_end; - /* The main difference with the version above is the use of this local log_buffer. - * The other difference is the return value of snprintf which was not used - * correctly. It was not a big problem because in practice MAX_LOG_TOTAL is - * big enough so that the buffer is never full. - */ - char log_buffer[MAX_LOG_TOTAL]; - - /* for no gcc warnings */ - (void)log_start; - (void)log_end; - - - c = &g_log->log_component[comp]; - - //VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_LOG_RECORD, VCD_FUNCTION_IN); - - // make sure that for log trace the extra info is only printed once, reset when the level changes - if ((level == OAILOG_FILE) || (level == OAILOG_TRACE)) { - log_start = log_buffer; - len = vsnprintf(log_buffer, MAX_LOG_TOTAL, format, args); - if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL; - log_end = log_buffer + len; - } else { - if ( (g_log->flag & 0x001) || (c->flag & 0x001) ) { - len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "%s", - log_level_highlight_start[level]); - if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL; - } - - log_start = log_buffer + len; - -// if ( (g_log->flag & 0x004) || (c->flag & 0x004) ) { - len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s]", - g_log->log_component[comp].name); - if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL; -// } - -// if ( (g_log->flag & FLAG_LEVEL) || (c->flag & FLAG_LEVEL) ) { - len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s]", - g_log->level2string[level]); - if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL; -// } - - if ( (g_log->flag & FLAG_THREAD) || (c->flag & FLAG_THREAD) ) { -# define THREAD_NAME_LEN 128 - char threadname[THREAD_NAME_LEN]; - if (pthread_getname_np(pthread_self(), threadname, THREAD_NAME_LEN) != 0) - { - perror("pthread_getname_np : "); - } else { - len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s]", threadname); - if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL; - } -# undef THREAD_NAME_LEN - } - - if ( (g_log->flag & FLAG_FUNCT) || (c->flag & FLAG_FUNCT) ) { - len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s] ", - func); - if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL; - } - - if ( (g_log->flag & FLAG_FILE_LINE) || (c->flag & FLAG_FILE_LINE) ) { - len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s:%d]", - file, line); - if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL; - } - - //len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%08lx]", thread_id); - //if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL; - - len += vsnprintf(&log_buffer[len], MAX_LOG_TOTAL - len, format, args); - if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL; - log_end = log_buffer + len; - - if ( (g_log->flag & FLAG_NOCOLOR) || (c->flag & FLAG_NOCOLOR) ) { - len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "%s", - log_level_highlight_end[level]); - if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL; - } - } - - //va_end(args); - - // OAI printf compatibility - if ((g_log->onlinelog == 1) && (level != OAILOG_FILE)) { - if(log_mem_flag==1){ - if(log_mem_d[log_mem_side].enable_flag==1){ - int temp_index; - temp_index=log_mem_d[log_mem_side].buf_index; - if(temp_index+len+1 < LOG_MEM_SIZE){ - log_mem_d[log_mem_side].buf_index+=len; - memcpy(&log_mem_d[log_mem_side].buf_p[temp_index],log_buffer,len); - }else{ - log_mem_d[log_mem_side].enable_flag=0; - if(log_mem_d[1-log_mem_side].enable_flag==1){ - temp_index=log_mem_d[1-log_mem_side].buf_index; - if(temp_index+len+1 < LOG_MEM_SIZE){ - log_mem_d[1-log_mem_side].buf_index+=len; - log_mem_side=1-log_mem_side; - memcpy(&log_mem_d[log_mem_side].buf_p[temp_index],log_buffer,len); - /* write down !*/ - if (pthread_mutex_lock(&log_mem_lock) != 0) { - return; - } - if(log_mem_write_flag==0){ - log_mem_write_side=1-log_mem_side; - if(pthread_cond_signal(&log_mem_notify) != 0) { - } - } - if(pthread_mutex_unlock(&log_mem_lock) != 0) { - return; - } - }else{ - log_mem_d[1-log_mem_side].enable_flag=0; - } - } - } - } - }else{ - fwrite(log_buffer, len, 1, stdout); - } - } -} - -int logInit_log_mem (void) -{ - if(log_mem_flag==1){ - if(log_mem_multi==1){ - printf("log-mem multi!!!\n"); - log_mem_d[0].buf_p = malloc(LOG_MEM_SIZE); - log_mem_d[0].buf_index=0; - log_mem_d[0].enable_flag=1; - log_mem_d[1].buf_p = malloc(LOG_MEM_SIZE); - log_mem_d[1].buf_index=0; - log_mem_d[1].enable_flag=1; - log_mem_side=0; - if ((pthread_mutex_init (&log_mem_lock, NULL) != 0) - || (pthread_cond_init (&log_mem_notify, NULL) != 0)) { - log_mem_d[1].enable_flag=0; - return -1; - } - pthread_create(&log_mem_thread, NULL, (void *(*)(void *))flush_mem_to_file, (void*)NULL); - }else{ - printf("log-mem single!!!\n"); - log_mem_d[0].buf_p = malloc(LOG_MEM_SIZE); - log_mem_d[0].buf_index=0; - log_mem_d[0].enable_flag=1; - log_mem_d[1].enable_flag=0; - log_mem_side=0; - } - }else{ - log_mem_d[0].buf_p=NULL; - log_mem_d[1].buf_p=NULL; - log_mem_d[0].enable_flag=0; - log_mem_d[1].enable_flag=0; - } - - printf("log init done\n"); - - return 0; -} - -void close_log_mem(void){ - int fp; - char f_name[1024]; - - if(log_mem_flag==1){ - log_mem_d[0].enable_flag=0; - log_mem_d[1].enable_flag=0; - usleep(10); // wait for log writing - while(log_mem_write_flag==1){ - usleep(100); - } - if(log_mem_multi==1){ - snprintf(f_name,1024, "%s_%d.log",log_mem_filename,log_mem_file_cnt); - fp=open(f_name, O_WRONLY | O_CREAT, 0666); - int ret = write(fp, log_mem_d[0].buf_p, log_mem_d[0].buf_index); - if ( ret < 0) { - fprintf(stderr,"{LOG} %s %d Couldn't write in %s \n",__FILE__,__LINE__,f_name); - exit(EXIT_FAILURE); - } - close(fp); - free(log_mem_d[0].buf_p); - - snprintf(f_name,1024, "%s_%d.log",log_mem_filename,log_mem_file_cnt); - fp=open(f_name, O_WRONLY | O_CREAT, 0666); - ret = write(fp, log_mem_d[1].buf_p, log_mem_d[1].buf_index); - if ( ret < 0) { - fprintf(stderr,"{LOG} %s %d Couldn't write in %s \n",__FILE__,__LINE__,f_name); - exit(EXIT_FAILURE); - } - close(fp); - free(log_mem_d[1].buf_p); - }else{ - fp=open(log_mem_filename, O_WRONLY | O_CREAT, 0666); - int ret = write(fp, log_mem_d[0].buf_p, log_mem_d[0].buf_index); - if ( ret < 0) { - fprintf(stderr,"{LOG} %s %d Couldn't write in %s \n",__FILE__,__LINE__,log_mem_filename); - exit(EXIT_FAILURE); - } - close(fp); - free(log_mem_d[0].buf_p); - } - } - } - #ifdef LOG_TEST diff --git a/common/utils/LOG/log.h b/common/utils/LOG/log.h index edff0a5eeb..4a0552d494 100644 --- a/common/utils/LOG/log.h +++ b/common/utils/LOG/log.h @@ -269,20 +269,6 @@ int is_newline( char *str, int size); int register_log_component(char *name, char *fext, int compidx); -#define LOG_MEM_SIZE 500*1024*1024 -#define LOG_MEM_FILE "./logmem.log" -void flush_mem_to_file(void); -void log_output_memory(const char *file, const char *func, int line, int comp, int level, const char* format,va_list args); -int logInit_log_mem(void); -void close_log_mem(void); - -typedef struct { - char* buf_p; - int buf_index; - int enable_flag; -} log_mem_cnt_t; - - /* @}*/ /*!\fn int32_t write_file_matlab(const char *fname, const char *vname, void *data, int length, int dec, char format); diff --git a/common/utils/LOG/log_extern.h b/common/utils/LOG/log_extern.h index b11486173a..3c93d517ca 100644 --- a/common/utils/LOG/log_extern.h +++ b/common/utils/LOG/log_extern.h @@ -28,6 +28,3 @@ extern mapping log_level_names[]; extern mapping log_options[]; extern mapping log_maskmap[]; -extern int log_mem_flag; -extern char * log_mem_filename; -extern char logmem_filename[1024]; diff --git a/common/utils/itti/assertions.h b/common/utils/itti/assertions.h index bb6c27cbab..b872b009e2 100644 --- a/common/utils/itti/assertions.h +++ b/common/utils/itti/assertions.h @@ -35,6 +35,7 @@ #ifndef ASSERTIONS_H_ #define ASSERTIONS_H_ +void output_log_mem(void); #define _Assert_Exit_ \ { \ fprintf(stderr, "\nExiting execution\n"); \ diff --git a/common/utils/itti/signals.c b/common/utils/itti/signals.c index cfc902552e..5dd667ae65 100644 --- a/common/utils/itti/signals.c +++ b/common/utils/itti/signals.c @@ -117,21 +117,18 @@ int signal_handle(int *end) case SIGUSR1: SIG_DEBUG("Received SIGUSR1\n"); *end = 1; - close_log_mem(); break; case SIGSEGV: /* Fall through */ case SIGABRT: SIG_DEBUG("Received SIGABORT\n"); backtrace_handle_signal(&info); - close_log_mem(); break; case SIGINT: printf("Received SIGINT\n"); itti_send_terminate_message(TASK_UNKNOWN); *end = 1; - close_log_mem(); break; default: diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index b9cefd4a57..e84f99e67f 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -70,7 +70,6 @@ unsigned short config_frames[4] = {2,9,11,13}; #endif #include "common/utils/LOG/log.h" -#include "common/utils/LOG/log_extern.h" #include "UTIL/OTG/otg_tx.h" #include "UTIL/OTG/otg_externs.h" #include "UTIL/MATH/oml.h" @@ -142,6 +141,7 @@ static int8_t threequarter_fs=0; uint32_t downlink_frequency[MAX_NUM_CCs][4]; int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; + // This is a dummy declaration (dlsch_demodulation.c is no longer compiled for eNodeB) int16_t dlsch_demod_shift = 0; @@ -550,12 +550,7 @@ static void get_options(void) { if (start_telnetsrv) { load_module_shlib("telnetsrv",NULL,0); } - if (strlen(logmem_filename) > 0) { - log_mem_filename = &logmem_filename[0]; - log_mem_flag = 1; - printf("Enabling OPT for log save at memory %s\n",log_mem_filename); - logInit_log_mem(); - } + if ( !(CONFIG_ISFLAGSET(CONFIG_ABORT)) ) { diff --git a/targets/RT/USER/lte-softmodem.h b/targets/RT/USER/lte-softmodem.h index 5412de6365..2f8209f2d3 100644 --- a/targets/RT/USER/lte-softmodem.h +++ b/targets/RT/USER/lte-softmodem.h @@ -202,7 +202,6 @@ {"R" , CONFIG_HLP_FLOG, 0, uptr:&online_log_messages, defintval:1, TYPE_INT, 0}, \ {"g" , CONFIG_HLP_LOGL, 0, uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \ {"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL, uptr:&start_telnetsrv, defintval:0, TYPE_UINT, 0}, \ -{"log-mem", NULL, 0, strptr:(char **)&logmem_filename, defstrval:"./logmem.log", TYPE_STRING, sizeof(logmem_filename)}, \ } #define CMDLINE_ONLINELOG_IDX 0 #define CMDLINE_GLOGLEVEL_IDX 1 diff --git a/targets/RT/USER/lte-uesoftmodem.c b/targets/RT/USER/lte-uesoftmodem.c index 53d700d076..a2a12f9dd9 100644 --- a/targets/RT/USER/lte-uesoftmodem.c +++ b/targets/RT/USER/lte-uesoftmodem.c @@ -71,7 +71,6 @@ #include "PHY_INTERFACE/phy_interface_vars.h" #include "common/utils/LOG/log.h" -#include "common/utils/LOG/log_extern.h" #include "UTIL/OTG/otg_tx.h" #include "UTIL/OTG/otg_externs.h" #include "UTIL/MATH/oml.h" From 95b7966894c8e761282d06f250c51e10334d90e9 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Tue, 4 Sep 2018 15:16:34 +0200 Subject: [PATCH 161/379] bugfix: fix crash when UE disconnects Using the basic simulator and valgrind, it was found that the lack of initialization of those two pointers leads to some very nasty behavior of some other parts of the system. --- common/utils/ocp_itti/intertask_interface.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/utils/ocp_itti/intertask_interface.cpp b/common/utils/ocp_itti/intertask_interface.cpp index 89353310b1..a4b280f86e 100644 --- a/common/utils/ocp_itti/intertask_interface.cpp +++ b/common/utils/ocp_itti/intertask_interface.cpp @@ -51,6 +51,8 @@ extern "C" { mem_block_t *get_free_mem_block (uint32_t sizeP, const char *caller) { mem_block_t *ptr=(mem_block_t *)malloc(sizeP+sizeof(mem_block_t)); + ptr->next = NULL; + ptr->previous = NULL; ptr->data=((unsigned char *)ptr)+sizeof(mem_block_t); ptr->size=sizeP; return ptr; From c83fc1b544b8f762084dc1f104346bbfb6711e51 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Tue, 4 Sep 2018 15:18:59 +0200 Subject: [PATCH 162/379] bugfix: fix compilation problem This includes damages check_vcd.c in the T tracer (in develop branch). --- common/utils/LOG/vcd_signal_dumper.c | 1 - 1 file changed, 1 deletion(-) diff --git a/common/utils/LOG/vcd_signal_dumper.c b/common/utils/LOG/vcd_signal_dumper.c index 607fe85703..666bf46d44 100644 --- a/common/utils/LOG/vcd_signal_dumper.c +++ b/common/utils/LOG/vcd_signal_dumper.c @@ -44,7 +44,6 @@ #include #include "assertions.h" -#include "signals.h" #include "vcd_signal_dumper.h" From 487a599b7bbb81e8d3e802052dc4674246057349 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Tue, 4 Sep 2018 16:18:46 +0200 Subject: [PATCH 163/379] bugfix: fix memory error Using valgrind revealed that those two arrays were too small. Let's use 512 bytes, which should be enough for every practical cases. --- common/config/config_cmdline.c | 25 ++++++---------------- common/config/libconfig/config_libconfig.c | 13 ++--------- 2 files changed, 8 insertions(+), 30 deletions(-) diff --git a/common/config/config_cmdline.c b/common/config/config_cmdline.c index c9b1c32378..ba04fbb281 100644 --- a/common/config/config_cmdline.c +++ b/common/config/config_cmdline.c @@ -141,25 +141,16 @@ char defbool[2]="1"; int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix) { - - -int c = config_get_if()->argc; -int i,j; -char *pp; -char *cfgpath; + int c = config_get_if()->argc; + int i,j; + char *pp; + char cfgpath[512]; /* 512 should be enough for the sprintf below */ - j = (prefix ==NULL) ? 0 : strlen(prefix); - cfgpath = malloc( j + MAX_OPTNAME_SIZE +1); - if (cfgpath == NULL) { - fprintf(stderr,"[CONFIG] %s %i malloc error, %s\n", __FILE__, __LINE__,strerror(errno)); - return -1; - } - j = 0; i = 0; while (c > 0 ) { char *oneargv = strdup(config_get_if()->argv[i]); /* we use strtok_r which modifies its string paramater, and we don't want argv to be modified */ -/* first check help options, either --help, -h or --help_
*/ + /* first check help options, either --help, -h or --help_
*/ if (strncmp(oneargv, "-h",2) == 0 || strncmp(oneargv, "--help",6) == 0 ) { char *tokctx; pp=strtok_r(oneargv, "_",&tokctx); @@ -182,7 +173,7 @@ char *cfgpath; } } -/* now, check for non help options */ + /* now, check for non help options */ if (oneargv[0] == '-') { for(int n=0;n Date: Wed, 5 Sep 2018 09:47:19 +0200 Subject: [PATCH 164/379] CI: improved basic simulator testing Signed-off-by: Raphael Defosseux --- ci-scripts/reportTestLocally.sh | 8 +- ci-scripts/runTestOnVM.sh | 454 +++++++++++++++++++++----------- 2 files changed, 307 insertions(+), 155 deletions(-) diff --git a/ci-scripts/reportTestLocally.sh b/ci-scripts/reportTestLocally.sh index 55e8ff3412..9d7ce0ac40 100755 --- a/ci-scripts/reportTestLocally.sh +++ b/ci-scripts/reportTestLocally.sh @@ -317,7 +317,7 @@ then echo " Statistics" >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html - PING_TESTS=`ls $ARCHIVES_LOC/ping*txt` + PING_TESTS=`ls $ARCHIVES_LOC/*ping*txt` for PING_CASE in $PING_TESTS do echo " " >> ./test_simulator_results.html @@ -355,7 +355,7 @@ then echo " " >> ./test_simulator_results.html done - IPERF_TESTS=`ls $ARCHIVES_LOC/iperf*client*txt` + IPERF_TESTS=`ls $ARCHIVES_LOC/*iperf*client*txt` for IPERF_CASE in $IPERF_TESTS do echo " " >> ./test_simulator_results.html @@ -384,8 +384,8 @@ then then echo " KO" >> ./test_simulator_results.html SERVER_FILE=`echo $IPERF_CASE | sed -e "s#client#server#"` - FLOAT_EFF_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000}; s=s+a}END{br=s/n; printf "%.0f", br}'` - EFFECTIVE_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000}; s=s+a}END{br=s/n; if(br>1000000){printf "%.2f MBits/sec", br/1000000}}'` + FLOAT_EFF_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; printf "%.0f", br}'` + EFFECTIVE_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; if(br>1000000){printf "%.2f MBits/sec", br/1000000}}'` PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'` JITTER=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*/sec *##" -e "s# *ms.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{jitter=s/n; printf "%.3f ms", jitter}'` PACKETLOSS_NOSIGN=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*(##" -e "s#%.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{per=s/n; printf "%.1f", per}'` diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index 1595273d7f..971050fbb3 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -70,6 +70,172 @@ function variant_usage { echo "" } +function start_basic_sim_enb { + local LOC_VM_IP_ADDR=$2 + local LOC_EPC_IP_ADDR=$3 + local LOC_LOG_FILE=$4 + local LOC_NB_RBS=$5 + echo "cd /home/ubuntu/tmp" > $1 + echo "echo \"sudo apt-get --yes --quiet install daemon \"" >> $1 + echo "sudo apt-get --yes install daemon >> /home/ubuntu/tmp/cmake_targets/log/daemon-install.txt 2>&1" >> $1 + echo "echo \"export ENODEB=1\"" >> $1 + echo "export ENODEB=1" >> $1 + echo "echo \"source oaienv\"" >> $1 + echo "source oaienv" >> $1 + echo "cd ci-scripts/conf_files/" >> $1 + echo "cp lte-basic-sim.conf ci-lte-basic-sim.conf" >> $1 + echo "sed -i -e 's#N_RB_DL.*=.*;#N_RB_DL = $LOC_NB_RBS;#' -e 's#CI_MME_IP_ADDR#$LOC_EPC_IP_ADDR#' -e 's#CI_ENB_IP_ADDR#$LOC_VM_IP_ADDR#' ci-lte-basic-sim.conf" >> $1 + echo "echo \"grep N_RB_DL ci-lte-basic-sim.conf\"" >> $1 + echo "grep N_RB_DL ci-lte-basic-sim.conf | sed -e 's#N_RB_DL.*=#N_RB_DL =#'" >> $1 + echo "echo \"cd /home/ubuntu/tmp/cmake_targets/basic_simulator/enb/\"" >> $1 + echo "cd /home/ubuntu/tmp/cmake_targets/basic_simulator/enb/" >> $1 + echo "echo \"./lte-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-lte-basic-sim.conf\" > ./my-lte-softmodem-run.sh " >> $1 + echo "chmod 775 ./my-lte-softmodem-run.sh" >> $1 + echo "cat ./my-lte-softmodem-run.sh" >> $1 + echo "sudo -E daemon --inherit --unsafe --name=enb_daemon --chdir=/home/ubuntu/tmp/cmake_targets/basic_simulator/enb -o /home/ubuntu/tmp/cmake_targets/log/$LOC_LOG_FILE ./my-lte-softmodem-run.sh" >> $1 + + ssh -o StrictHostKeyChecking=no ubuntu@$LOC_VM_IP_ADDR < $1 + sleep 60 + rm $1 +} + +function start_basic_sim_ue { + local LOC_UE_LOG_FILE=$3 + local LOC_NB_RBS=$4 + echo "echo \"cd /home/ubuntu/tmp/cmake_targets/basic_simulator/ue\"" > $1 + echo "cd /home/ubuntu/tmp/cmake_targets/basic_simulator/ue" > $1 + echo "echo \"./lte-uesoftmodem -C 2680000000 -r $LOC_NB_RBS --ue-rxgain 140\" > ./my-lte-uesoftmodem-run.sh" >> $1 + echo "chmod 775 ./my-lte-uesoftmodem-run.sh" >> $1 + echo "cat ./my-lte-uesoftmodem-run.sh" >> $1 + echo "sudo -E daemon --inherit --unsafe --name=ue_daemon --chdir=/home/ubuntu/tmp/cmake_targets/basic_simulator/ue -o /home/ubuntu/tmp/cmake_targets/log/$LOC_UE_LOG_FILE ./my-lte-uesoftmodem-run.sh" >> $1 + + ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1 + rm $1 + + local i="0" + echo "ifconfig oip1 | egrep -c \"inet addr\"" > $1 + while [ $i -lt 40 ] + do + sleep 5 + CONNECTED=`ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1` + if [ $CONNECTED -eq 1 ] + then + i="100" + else + i=$[$i+1] + fi + done + rm $1 + if [ $i -lt 50 ] + then + UE_SYNC=0 + else + UE_SYNC=1 + fi +} + +function get_ue_ip_addr { + echo "ifconfig oip1 | egrep \"inet addr\" | sed -e 's#^.*inet addr:##' -e 's# P-t-P:.*\$##'" > $1 + UE_IP_ADDR=`ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1` + echo "UE IP Address for EPC is : $UE_IP_ADDR" + rm $1 +} + +function ping_ue_ip_addr { + echo "echo \"ping -c 20 $3\"" > $1 + echo "echo \"COMMAND IS: ping -c 20 $3\" > $4" > $1 + echo "ping -c 20 $UE_IP_ADDR | tee -a $4" >> $1 + ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1 + rm -f $1 +} + +function check_ping_result { + local LOC_PING_FILE=$1 + local LOC_NB_PINGS=$2 + if [ -f $LOC_PING_FILE ] + then + local FILE_COMPLETE=`egrep -c "ping statistics" $LOC_PING_FILE` + if [ $FILE_COMPLETE -eq 0 ] + then + PING_STATUS=-1 + else + local ALL_PACKET_RECEIVED=`egrep -c "$LOC_NB_PINGS received" $LOC_PING_FILE` + if [ $ALL_PACKET_RECEIVED -eq 1 ] + then + echo "got all ping packets" + else + PING_STATUS=-1 + fi + fi + else + PING_STATUS=-1 + fi +} + +function iperf_dl { + local REQ_BANDWIDTH=$5 + local BASE_LOG_FILE=$6 + echo "echo \"iperf -u -s -i 1\"" > $1 + echo "echo \"COMMAND IS: iperf -u -s -i 1\" > tmp/cmake_targets/log/${BASE_LOG_FILE}_server.txt" > $1 + echo "nohup iperf -u -s -i 1 >> tmp/cmake_targets/log/${BASE_LOG_FILE}_server.txt &" >> $1 + ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1 + rm $1 + + echo "echo \"iperf -c $UE_IP_ADDR -u -t 30 -b ${REQ_BANDWIDTH}M -i 1\"" > $3 + echo "echo \"COMMAND IS: iperf -c $UE_IP_ADDR -u -t 30 -b ${REQ_BANDWIDTH}M -i 1\" > ${BASE_LOG_FILE}_client.txt" > $3 + echo "iperf -c $UE_IP_ADDR -u -t 30 -b ${REQ_BANDWIDTH}M -i 1 | tee -a ${BASE_LOG_FILE}_client.txt" >> $3 + ssh -o StrictHostKeyChecking=no ubuntu@$4 < $3 + rm -f $3 + + echo "killall --signal SIGKILL iperf" >> $1 + ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1 + rm $1 +} + +function iperf_ul { + local REQ_BANDWIDTH=$5 + local BASE_LOG_FILE=$6 + echo "echo \"iperf -u -s -i 1\"" > $3 + echo "echo \"COMMAND IS: iperf -u -s -i 1\" > ${BASE_LOG_FILE}_server.txt" > $3 + echo "nohup iperf -u -s -i 1 >> ${BASE_LOG_FILE}_server.txt &" >> $3 + ssh -o StrictHostKeyChecking=no ubuntu@$4 < $3 + rm $3 + + echo "echo \"iperf -c $REAL_EPC_IP_ADDR -u -t 30 -b ${REQ_BANDWIDTH}M -i 1\"" > $1 + echo "echo \"COMMAND IS: iperf -c $REAL_EPC_IP_ADDR -u -t 30 -b ${REQ_BANDWIDTH}M -i 1\" > /home/ubuntu/tmp/cmake_targets/log/${BASE_LOG_FILE}_client.txt" > $1 + echo "iperf -c $REAL_EPC_IP_ADDR -u -t 30 -b ${REQ_BANDWIDTH}M -i 1 | tee -a /home/ubuntu/tmp/cmake_targets/log/${BASE_LOG_FILE}_client.txt" >> $1 + ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1 + rm -f $1 + + echo "killall --signal SIGKILL iperf" >> $3 + ssh -o StrictHostKeyChecking=no ubuntu@$4 < $3 + rm $3 +} + +function check_iperf { + local LOC_BASE_LOG=$1 + local LOC_REQ_BW=$2 + local LOC_REQ_BW_MINUS_ONE=`echo "$LOC_REQ_BW - 1" | bc -l` + if [ -f ${LOC_BASE_LOG}_client.txt ] + then + local FILE_COMPLETE=`egrep -c "Server Report" ${LOC_BASE_LOG}_client.txt` + if [ $FILE_COMPLETE -eq 0 ] + then + IPERF_STATUS=-1 + else + local EFFECTIVE_BANDWIDTH=`tail -n3 ${LOC_BASE_LOG}_client.txt | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"` + if [[ $EFFECTIVE_BANDWIDTH =~ .*${LOC_REQ_BW}.*Mbits.* ]] || [[ $EFFECTIVE_BANDWIDTH =~ .*${LOC_REQ_BW_MINUS_ONE}.*Mbits.* ]] + then + echo "got requested DL bandwidth: $EFFECTIVE_BANDWIDTH" + else + IPERF_STATUS=-1 + fi + fi + else + IPERF_STATUS=-1 + fi +} + function terminate_enb_ue_basic_sim { echo "echo \"sudo daemon --name=enb_daemon --stop\"" > $1 echo "sudo daemon --name=enb_daemon --stop" >> $1 @@ -341,6 +507,8 @@ fi if [[ "$RUN_OPTIONS" == "complex" ]] && [[ $VM_NAME =~ .*-basic-sim.* ]] then + PING_STATUS=0 + IPERF_STATUS=0 if [ -d $ARCHIVES_LOC ] then rm -Rf $ARCHIVES_LOC @@ -491,126 +659,166 @@ then fi echo "############################################################" - echo "Starting the eNB" + echo "Starting the eNB at 5MHz" echo "############################################################" - echo "cd /home/ubuntu/tmp" > $VM_CMDS - echo "echo \"sudo apt-get --yes --quiet install daemon \"" >> $VM_CMDS - echo "sudo apt-get --yes install daemon >> /home/ubuntu/tmp/cmake_targets/log/daemon-install.txt 2>&1" >> $VM_CMDS - echo "echo \"export ENODEB=1\"" >> $VM_CMDS - echo "export ENODEB=1" >> $VM_CMDS - echo "echo \"source oaienv\"" >> $VM_CMDS - echo "source oaienv" >> $VM_CMDS - echo "cd ci-scripts/conf_files/" >> $VM_CMDS - echo "cp lte-basic-sim.conf ci-lte-basic-sim.conf" >> $VM_CMDS - echo "sed -i -e 's#CI_MME_IP_ADDR#$EPC_VM_IP_ADDR#' -e 's#CI_ENB_IP_ADDR#$VM_IP_ADDR#' ci-lte-basic-sim.conf" >> $VM_CMDS - echo "echo \"cd /home/ubuntu/tmp/cmake_targets/basic_simulator/enb/\"" >> $VM_CMDS - echo "cd /home/ubuntu/tmp/cmake_targets/basic_simulator/enb/" >> $VM_CMDS - echo "echo \"./lte-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-lte-basic-sim.conf\" > ./my-lte-softmodem-run.sh " >> $VM_CMDS - echo "chmod 775 ./my-lte-softmodem-run.sh" >> $VM_CMDS - echo "cat ./my-lte-softmodem-run.sh" >> $VM_CMDS - echo "sudo -E daemon --inherit --unsafe --name=enb_daemon --chdir=/home/ubuntu/tmp/cmake_targets/basic_simulator/enb -o /home/ubuntu/tmp/cmake_targets/log/enb.log ./my-lte-softmodem-run.sh" >> $VM_CMDS - - ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS - sleep 60 + CURRENT_ENB_LOG_FILE=enb_05MHz.log + start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 25 echo "############################################################" - echo "Starting the UE" + echo "Starting the UE at 5MHz" echo "############################################################" - echo "echo \"cd /home/ubuntu/tmp/cmake_targets/basic_simulator/ue\"" > $VM_CMDS - echo "cd /home/ubuntu/tmp/cmake_targets/basic_simulator/ue" > $VM_CMDS - echo "echo \"./lte-uesoftmodem -C 2680000000 -r 25 --ue-rxgain 140\" > ./my-lte-uesoftmodem-run.sh" >> $VM_CMDS - echo "chmod 775 ./my-lte-uesoftmodem-run.sh" >> $VM_CMDS - echo "cat ./my-lte-uesoftmodem-run.sh" >> $VM_CMDS - echo "sudo -E daemon --inherit --unsafe --name=ue_daemon --chdir=/home/ubuntu/tmp/cmake_targets/basic_simulator/ue -o /home/ubuntu/tmp/cmake_targets/log/ue.log ./my-lte-uesoftmodem-run.sh" >> $VM_CMDS - - ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS - rm $VM_CMDS - i="0" - echo "ifconfig oip1 | egrep -c \"inet addr\"" > $VM_CMDS - while [ $i -lt 40 ] - do - sleep 5 - CONNECTED=`ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS` - if [ $CONNECTED -eq 1 ] - then - i="100" - else - i=$[$i+1] - fi - done - rm $VM_CMDS - if [ $i -lt 50 ] + CURRENT_UE_LOG_FILE=ue_05MHz.log + start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 25 + if [ $UE_SYNC -eq 0 ] then echo "Problem w/ eNB and UE not syncing" terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/enb.log $ARCHIVES_LOC - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/ue.log $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR exit -1 fi - echo "ifconfig oip1 | egrep \"inet addr\" | sed -e 's#^.*inet addr:##' -e 's# P-t-P:.*\$##'" > $VM_CMDS - UE_IP_ADDR=`ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS` - echo "UE IP Address for EPC is : $UE_IP_ADDR" - rm $VM_CMDS + get_ue_ip_addr $VM_CMDS $VM_IP_ADDR echo "############################################################" echo "Pinging the UE" echo "############################################################" - echo "echo \"ping -c 20 $UE_IP_ADDR\"" > $EPC_VM_CMDS - echo "echo \"COMMAND IS: ping -c 20 $UE_IP_ADDR\" > ping_ue.txt" > $EPC_VM_CMDS - echo "ping -c 20 $UE_IP_ADDR | tee -a ping_ue.txt" >> $EPC_VM_CMDS - ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS - rm -f $EPC_VM_CMDS - scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/ping_ue.txt $ARCHIVES_LOC + ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR 05MHz_ping_ue.txt + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/05MHz_ping_ue.txt $ARCHIVES_LOC + check_ping_result $ARCHIVES_LOC/05MHz_ping_ue.txt 20 echo "############################################################" echo "Iperf DL" echo "############################################################" - echo "echo \"iperf -u -s -i 1\"" > $VM_CMDS - echo "echo \"COMMAND IS: iperf -u -s -i 1\" > tmp/cmake_targets/log/iperf_dl_server.txt" > $VM_CMDS - echo "nohup iperf -u -s -i 1 >> tmp/cmake_targets/log/iperf_dl_server.txt &" >> $VM_CMDS - ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS - rm $VM_CMDS - - echo "echo \"iperf -c $UE_IP_ADDR -u -t 30 -b 15M -i 1\"" > $EPC_VM_CMDS - echo "echo \"COMMAND IS: iperf -c $UE_IP_ADDR -u -t 30 -b 15M -i 1\" > iperf_dl_client.txt" > $EPC_VM_CMDS - echo "iperf -c $UE_IP_ADDR -u -t 30 -b 15M -i 1 | tee -a iperf_dl_client.txt" >> $EPC_VM_CMDS - ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS - rm -f $EPC_VM_CMDS - - echo "killall --signal SIGKILL iperf" >> $VM_CMDS - ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS - rm $VM_CMDS - scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/iperf_dl_client.txt $ARCHIVES_LOC - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/iperf_dl_server.txt $ARCHIVES_LOC + CURR_IPERF_LOG_BASE=05MHz_iperf_dl + iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC + check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15 echo "############################################################" echo "Iperf UL" echo "############################################################" - echo "echo \"iperf -u -s -i 1\"" > $EPC_VM_CMDS - echo "echo \"COMMAND IS: iperf -u -s -i 1\" > iperf_ul_server.txt" > $EPC_VM_CMDS - echo "nohup iperf -u -s -i 1 >> iperf_ul_server.txt &" >> $EPC_VM_CMDS - ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS - rm $EPC_VM_CMDS - - echo "echo \"iperf -c $REAL_EPC_IP_ADDR -u -t 30 -b 2M -i 1\"" > $VM_CMDS - echo "echo \"COMMAND IS: iperf -c $REAL_EPC_IP_ADDR -u -t 30 -b 2M -i 1\" > /home/ubuntu/tmp/cmake_targets/log/iperf_ul_client.txt" > $VM_CMDS - echo "iperf -c $REAL_EPC_IP_ADDR -u -t 30 -b 2M -i 1 | tee -a /home/ubuntu/tmp/cmake_targets/log/iperf_ul_client.txt" >> $VM_CMDS - ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS - rm -f $VM_CMDS - - echo "killall --signal SIGKILL iperf" >> $EPC_VM_CMDS - ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS - rm $EPC_VM_CMDS - scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/iperf_ul_server.txt $ARCHIVES_LOC - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/iperf_ul_client.txt $ARCHIVES_LOC + CURR_IPERF_LOG_BASE=05MHz_iperf_ul + iperf_ul $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 2 $CURR_IPERF_LOG_BASE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC + check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 2 echo "############################################################" echo "Terminate enb/ue simulators" echo "############################################################" terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/enb.log $ARCHIVES_LOC - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/ue.log $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + + echo "############################################################" + echo "Starting the eNB at 10MHz" + echo "############################################################" + CURRENT_ENB_LOG_FILE=enb_10MHz.log + start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 + + echo "############################################################" + echo "Starting the UE at 10MHz" + echo "############################################################" + CURRENT_UE_LOG_FILE=ue_10MHz.log + start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 50 + if [ $UE_SYNC -eq 0 ] + then + echo "Problem w/ eNB and UE not syncing" + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR + exit -1 + fi + get_ue_ip_addr $VM_CMDS $VM_IP_ADDR + + echo "############################################################" + echo "Pinging the UE" + echo "############################################################" + ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR 10MHz_ping_ue.txt + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/10MHz_ping_ue.txt $ARCHIVES_LOC + check_ping_result $ARCHIVES_LOC/10MHz_ping_ue.txt 20 + + echo "############################################################" + echo "Iperf DL" + echo "############################################################" + CURR_IPERF_LOG_BASE=10MHz_iperf_dl + iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC + check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15 + + echo "############################################################" + echo "Iperf UL" + echo "############################################################" + CURR_IPERF_LOG_BASE=10MHz_iperf_ul + iperf_ul $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 2 $CURR_IPERF_LOG_BASE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC + check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 2 + + echo "############################################################" + echo "Terminate enb/ue simulators" + echo "############################################################" + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + + echo "############################################################" + echo "Starting the eNB at 20MHz" + echo "############################################################" + CURRENT_ENB_LOG_FILE=enb_20MHz.log + start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 100 + + echo "############################################################" + echo "Starting the UE at 20MHz" + echo "############################################################" + CURRENT_UE_LOG_FILE=ue_20MHz.log + start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 100 + if [ $UE_SYNC -eq 0 ] + then + echo "Problem w/ eNB and UE not syncing" + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR + exit -1 + fi + get_ue_ip_addr $VM_CMDS $VM_IP_ADDR + + echo "############################################################" + echo "Pinging the UE" + echo "############################################################" + ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR 20MHz_ping_ue.txt + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/20MHz_ping_ue.txt $ARCHIVES_LOC + check_ping_result $ARCHIVES_LOC/20MHz_ping_ue.txt 20 + + echo "############################################################" + echo "Iperf DL" + echo "############################################################" + CURR_IPERF_LOG_BASE=20MHz_iperf_dl + iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC + check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15 + + echo "############################################################" + echo "Iperf UL" + echo "############################################################" + CURR_IPERF_LOG_BASE=20MHz_iperf_ul + iperf_ul $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 1 $CURR_IPERF_LOG_BASE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC + check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 1 + + echo "############################################################" + echo "Terminate enb/ue simulators" + echo "############################################################" + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC echo "############################################################" echo "Terminate EPC" @@ -625,65 +833,9 @@ then echo "Checking run status" echo "############################################################" - # checking ping result - if [ -f $ARCHIVES_LOC/ping_ue.txt ] - then - FILE_COMPLETE=`egrep -c "ping statistics" $ARCHIVES_LOC/ping_ue.txt` - if [ $FILE_COMPLETE -eq 0 ] - then - STATUS=-1 - else - ALL_PACKET_RECEIVED=`egrep -c "20 received" $ARCHIVES_LOC/ping_ue.txt` - if [ $ALL_PACKET_RECEIVED -eq 1 ] - then - echo "got all ping packets" - else - STATUS=-1 - fi - fi - else - STATUS=-1 - fi + if [ $PING_STATUS -ne 0 ]; then STATUS=-1; fi + if [ $IPERF_STATUS -ne 0 ]; then STATUS=-1; fi - # checking dl iperf result - if [ -f $ARCHIVES_LOC/iperf_dl_client.txt ] - then - FILE_COMPLETE=`egrep -c "Server Report" $ARCHIVES_LOC/iperf_dl_client.txt` - if [ $FILE_COMPLETE -eq 0 ] - then - STATUS=-1 - else - EFFECTIVE_BANDWIDTH=`tail -n3 $ARCHIVES_LOC/iperf_dl_client.txt | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"` - if [[ $EFFECTIVE_BANDWIDTH =~ .*15.*Mbits.* ]] || [[ $EFFECTIVE_BANDWIDTH =~ .*14.*Mbits.* ]] - then - echo "got requested DL bandwidth: $EFFECTIVE_BANDWIDTH" - else - STATUS=-1 - fi - fi - else - STATUS=-1 - fi - - # checking ul iperf result - if [ -f $ARCHIVES_LOC/iperf_ul_client.txt ] - then - FILE_COMPLETE=`egrep -c "Server Report" $ARCHIVES_LOC/iperf_ul_client.txt` - if [ $FILE_COMPLETE -eq 0 ] - then - STATUS=-1 - else - EFFECTIVE_BANDWIDTH=`tail -n3 $ARCHIVES_LOC/iperf_ul_client.txt | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"` - if [[ $EFFECTIVE_BANDWIDTH =~ .*2.*Mbits.* ]] || [[ $EFFECTIVE_BANDWIDTH =~ .*1.*Mbits.* ]] - then - echo "got requested UL bandwidth: $EFFECTIVE_BANDWIDTH" - else - STATUS=-1 - fi - fi - else - STATUS=-1 - fi fi if [ $STATUS -eq 0 ] From 87d5a07ee115fbe909470acf594d375a9535d1e4 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 5 Sep 2018 10:59:59 +0200 Subject: [PATCH 165/379] CI: removing UL iperf test at 20 MHz on basic simulator Signed-off-by: Raphael Defosseux --- ci-scripts/runTestOnVM.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index 971050fbb3..6abdf35507 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -807,11 +807,11 @@ then echo "############################################################" echo "Iperf UL" echo "############################################################" - CURR_IPERF_LOG_BASE=20MHz_iperf_ul - iperf_ul $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 1 $CURR_IPERF_LOG_BASE - scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC - check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 1 +# CURR_IPERF_LOG_BASE=20MHz_iperf_ul +# iperf_ul $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 1 $CURR_IPERF_LOG_BASE +# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC +# check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 1 echo "############################################################" echo "Terminate enb/ue simulators" From 07ad2470d13ec87a756015306ee74bda771afc80 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 13 Aug 2018 15:55:53 +0200 Subject: [PATCH 166/379] Remove warnings pre_processor_fairRR --- openair2/LAYER2/MAC/eNB_scheduler_fairRR.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c index 8a9b4ce4df..693623c116 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c @@ -555,8 +555,6 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id, uint8_t CC_id; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; - int N_RB_DL; - int transmission_mode = 0; UE_sched_ctrl *ue_sched_ctl; // int rrc_status = RRC_IDLE; COMMON_channels_t *cc; @@ -591,14 +589,14 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id, dlsch_scheduler_pre_processor_reset(Mod_id, - UE_id, - CC_id, + 0, frameP, subframeP, - N_RBG[CC_id], + min_rb_unit, (uint16_t (*)[NUMBER_OF_UE_MAX])nb_rbs_required, rballoc_sub, - MIMO_mode_indicator); + MIMO_mode_indicator, + mbsfn_flag); } } @@ -622,7 +620,6 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id, average_rbs_per_user[CC_id] = 0; cc = &RC.mac[Mod_id]->common_channels[CC_id]; // Get total available RBS count and total UE count - N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth); temp_total_rbs_count = RC.mac[Mod_id]->eNB_stats[CC_id].available_prbs; temp_total_ue_count = dlsch_ue_select[CC_id].ue_num; @@ -659,8 +656,6 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id, nb_rbs_required_remaining[CC_id][UE_id] = cmin(average_rbs_per_user[CC_id], dlsch_ue_select[CC_id].list[i].nb_rb); } - transmission_mode = get_tmode(Mod_id,CC_id,UE_id); - /* slicing support has been introduced into the scheduler. Provide dummy * data so that the preprocessor "simply works" */ for (int i = 0; i < MAX_NUM_CCs; ++i) From 9f0461430489ad47ec70ae730ececa71bed8c59b Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 13 Aug 2018 16:30:31 +0200 Subject: [PATCH 167/379] Remove huge comment from sort_UEs() Commit 7823858e2d11e8cabc1ca7bf7f507b9a050942d3 introduced this as a comment. --- openair2/LAYER2/MAC/pre_processor.c | 72 ----------------------------- 1 file changed, 72 deletions(-) diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 8b33cae488..37a7b47000 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -499,78 +499,6 @@ void sort_UEs(module_id_t Mod_idP, int slice_idx, int frameP, sub_frame_t subfra } else { UE_list->head = -1; } - -#if 0 - - - int UE_id1, UE_id2; - int pCC_id1, pCC_id2; - int cqi1, cqi2, round1, round2; - int i = 0, ii = 0; //,j=0; - rnti_t rnti1, rnti2; - - UE_list_t *UE_list = &RC.mac[Mod_idP]->UE_list; - - for (i = UE_list->head; i >= 0; i = UE_list->next[i]) { - - for (ii = UE_list->next[i]; ii >= 0; ii = UE_list->next[ii]) { - - UE_id1 = i; - rnti1 = UE_RNTI(Mod_idP, UE_id1); - if (rnti1 == NOT_A_RNTI) - continue; - if (UE_list->UE_sched_ctrl[UE_id1].ul_out_of_sync == 1) - continue; - pCC_id1 = UE_PCCID(Mod_idP, UE_id1); - cqi1 = maxcqi(Mod_idP, UE_id1); // - round1 = maxround(Mod_idP, rnti1, frameP, subframeP, 0); - - UE_id2 = ii; - rnti2 = UE_RNTI(Mod_idP, UE_id2); - if (rnti2 == NOT_A_RNTI) - continue; - if (UE_list->UE_sched_ctrl[UE_id2].ul_out_of_sync == 1) - continue; - cqi2 = maxcqi(Mod_idP, UE_id2); - round2 = maxround(Mod_idP, rnti2, frameP, subframeP, 0); //mac_xface->get_ue_active_harq_pid(Mod_id,rnti2,subframe,&harq_pid2,&round2,0); - pCC_id2 = UE_PCCID(Mod_idP, UE_id2); - - if (round2 > round1) { // Check first if one of the UEs has an active HARQ process which needs service and swap order - swap_UEs(UE_list, UE_id1, UE_id2, 0); - } else if (round2 == round1) { - // RK->NN : I guess this is for fairness in the scheduling. This doesn't make sense unless all UEs have the same configuration of logical channels. This should be done on the sum of all information that has to be sent. And still it wouldn't ensure fairness. It should be based on throughput seen by each UE or maybe using the head_sdu_creation_time, i.e. swap UEs if one is waiting longer for service. - // for(j=0;jUE_template[pCC_id1][UE_id1]. - dl_buffer_info[1] + - UE_list->UE_template[pCC_id1][UE_id1]. - dl_buffer_info[2]) < - (UE_list->UE_template[pCC_id2][UE_id2]. - dl_buffer_info[1] + - UE_list->UE_template[pCC_id2][UE_id2]. - dl_buffer_info[2])) { - swap_UEs(UE_list, UE_id1, UE_id2, 0); - } else if (UE_list->UE_template[pCC_id1] - [UE_id1].dl_buffer_head_sdu_creation_time_max < - UE_list->UE_template[pCC_id2] - [UE_id2].dl_buffer_head_sdu_creation_time_max) { - swap_UEs(UE_list, UE_id1, UE_id2, 0); - } else if (UE_list->UE_template[pCC_id1][UE_id1]. - dl_buffer_total < - UE_list->UE_template[pCC_id2][UE_id2]. - dl_buffer_total) { - swap_UEs(UE_list, UE_id1, UE_id2, 0); - } else if (cqi1 < cqi2) { - swap_UEs(UE_list, UE_id1, UE_id2, 0); - } - } - } - } -#endif } void dlsch_scheduler_pre_processor_partitioning(module_id_t Mod_id, From 1f60f4ecea17668d719e7900d56cb9da92cd797e Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 16 Aug 2018 14:38:04 +0200 Subject: [PATCH 168/379] Log Level Debug for Freeing Transport Channel Msg --- targets/RT/USER/lte-enb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 87aa874227..fc60922bc1 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -1120,10 +1120,10 @@ void free_transport(PHY_VARS_eNB *eNB) int j; for (i=0; idlsch[i][j]); - LOG_I(PHY, "Freeing Transport Channel Buffer for ULSCH, UE %d\n",i); + LOG_D(PHY, "Freeing Transport Channel Buffer for ULSCH, UE %d\n",i); free_eNB_ulsch(eNB->ulsch[1+i]); } free_eNB_ulsch(eNB->ulsch[0]); From d3afce4f3c53f6f8d0cb7a7587291c8e517eaac0 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 16 Aug 2018 14:40:13 +0200 Subject: [PATCH 169/379] Print detailed info why mutex locking failed --- openair1/PHY/defs_common.h | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/openair1/PHY/defs_common.h b/openair1/PHY/defs_common.h index fce7f1b885..4de7456410 100644 --- a/openair1/PHY/defs_common.h +++ b/openair1/PHY/defs_common.h @@ -994,9 +994,10 @@ static inline void wait_sync(char *thread_name) { } static inline int wakeup_thread(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) { - - if (pthread_mutex_lock(mutex) != 0) { - LOG_E( PHY, "error locking mutex for %s\n",name); + int rc; + if ((rc = pthread_mutex_lock(mutex)) != 0) { + LOG_E(PHY, "wakeup_thread(): error locking mutex for %s (%d %s, %p)\n", + name, rc, strerror(rc), (void *)mutex); exit_fun("nothing to add"); return(-1); } @@ -1013,8 +1014,10 @@ static inline int wakeup_thread(pthread_mutex_t *mutex,pthread_cond_t *cond,int } static inline int wait_on_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) { - if (pthread_mutex_lock(mutex) != 0) { - LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name); + int rc; + if ((rc = pthread_mutex_lock(mutex)) != 0) { + LOG_E(PHY, "[SCHED][eNB] wait_on_condition(): error locking mutex for %s (%d %s, %p)\n", + name, rc, strerror(rc), (void *)mutex); exit_fun("nothing to add"); return(-1); } @@ -1034,9 +1037,10 @@ static inline int wait_on_condition(pthread_mutex_t *mutex,pthread_cond_t *cond, } static inline int wait_on_busy_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) { - - if (pthread_mutex_lock(mutex) != 0) { - LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name); + int rc; + if ((rc = pthread_mutex_lock(mutex)) != 0) { + LOG_E(PHY, "[SCHED][eNB] wait_on_busy_condition(): error locking mutex for %s (%d %s, %p)\n", + name, rc, strerror(rc), (void *)mutex); exit_fun("nothing to add"); return(-1); } @@ -1056,9 +1060,10 @@ static inline int wait_on_busy_condition(pthread_mutex_t *mutex,pthread_cond_t * } static inline int release_thread(pthread_mutex_t *mutex,int *instance_cnt,char *name) { - - if (pthread_mutex_lock(mutex) != 0) { - LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name); + int rc; + if ((rc = pthread_mutex_lock(mutex)) != 0) { + LOG_E(PHY, "[SCHED][eNB] release_thread(): error locking mutex for %s (%d %s, %p)\n", + name, rc, strerror(rc), (void *)mutex); exit_fun("nothing to add"); return(-1); } From c1b024d3541ab7136072baeaf327d1adea86fb52 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 16 Aug 2018 14:41:50 +0200 Subject: [PATCH 170/379] stop_L1L2(): Do not turn of RF, is done in ru_thread --- targets/RT/USER/lte-softmodem.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index b606ee2f46..6fd5b78512 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -771,25 +771,6 @@ int stop_L1L2(module_id_t enb_id) return -1; } - /* stop trx devices, multiple carrier currently not supported by RU */ - if (RC.ru[enb_id]) { - if (RC.ru[enb_id]->rfdevice.trx_stop_func) { - RC.ru[enb_id]->rfdevice.trx_stop_func(&RC.ru[enb_id]->rfdevice); - LOG_I(ENB_APP, "turned off RU rfdevice\n"); - } else { - LOG_W(ENB_APP, "can not turn off rfdevice due to missing trx_stop_func callback, proceding anyway!\n"); - } - if (RC.ru[enb_id]->ifdevice.trx_stop_func) { - RC.ru[enb_id]->ifdevice.trx_stop_func(&RC.ru[enb_id]->ifdevice); - LOG_I(ENB_APP, "turned off RU ifdevice\n"); - } else { - LOG_W(ENB_APP, "can not turn off ifdevice due to missing trx_stop_func callback, proceding anyway!\n"); - } - } else { - LOG_W(ENB_APP, "no RU found for index %d\n", enb_id); - return -1; - } - /* these tasks need to pick up new configuration */ terminate_task(enb_id, TASK_ENB_APP, TASK_RRC_ENB); terminate_task(enb_id, TASK_ENB_APP, TASK_L2L1); From 5a1e8c2869223f8af6cbeac9dd489263bc1af6a7 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 16 Aug 2018 14:42:12 +0200 Subject: [PATCH 171/379] Lock sync_var access in restart_L1L2() --- targets/RT/USER/lte-softmodem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 6fd5b78512..d661e1e31c 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -801,7 +801,9 @@ int restart_L1L2(module_id_t enb_id) LOG_W(ENB_APP, "restarting lte-softmodem\n"); /* block threads */ + pthread_mutex_lock(&sync_mutex); sync_var = -1; + pthread_mutex_unlock(&sync_mutex); for (cc_id = 0; cc_id < RC.nb_L1_CC[enb_id]; cc_id++) { RC.eNB[enb_id][cc_id]->configured = 0; From af83d352c8f4a260118dcb5d23b1d9a8aad95ac3 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 16 Aug 2018 17:19:05 +0200 Subject: [PATCH 172/379] Fix: use frame_subframe2_dl_harq_pid() --- openair2/LAYER2/MAC/pre_processor.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 37a7b47000..53e837d787 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -578,11 +578,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, CC_id = UE_list->ordered_CCids[i][UE_id]; ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; cc = &RC.mac[Mod_id]->common_channels[CC_id]; - // FIXME: Can we use subframe2harqpid() here? - if (cc->tdd_Config) - harq_pid = ((frameP * 10) + subframeP) % 10; - else - harq_pid = ((frameP * 10) + subframeP) & 7; + harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP ,subframeP); round = ue_sched_ctl->round[CC_id][harq_pid]; if (nb_rbs_required[CC_id][UE_id] > 0) { From fa27b6dcce5d079eb136874cb55463d0d504d894 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 17 Aug 2018 11:10:14 +0200 Subject: [PATCH 173/379] Fix: Correct numbering of protobuf messages (as in RTC) --- openair2/ENB_APP/MESSAGES/V2/config_messages.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/ENB_APP/MESSAGES/V2/config_messages.proto b/openair2/ENB_APP/MESSAGES/V2/config_messages.proto index 0dd5140efa..1d5da8dd2a 100644 --- a/openair2/ENB_APP/MESSAGES/V2/config_messages.proto +++ b/openair2/ENB_APP/MESSAGES/V2/config_messages.proto @@ -50,10 +50,10 @@ message flex_cell_config { message flex_slice_config { // whether remaining RBs after first intra-slice allocation will // be allocated to UEs of the same slice - optional bool intraslice_share_active = 4; + optional bool intraslice_share_active = 3; // whether remaining RBs after slice allocation will be allocated // to UEs of another slice. Isolated slices will be ignored. - optional bool interslice_share_active = 3; + optional bool interslice_share_active = 4; repeated flex_dl_slice dl = 1; repeated flex_ul_slice ul = 2; } From ff83dc70171da26c1489234334bcc7eec34cdaee Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 16 Aug 2018 17:19:39 +0200 Subject: [PATCH 174/379] Fix greedy allocation: schedule not more than what slice has --- openair2/LAYER2/MAC/pre_processor.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 53e837d787..1befe8e8c3 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -543,7 +543,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, rnti_t rnti; uint8_t harq_pid, round; - uint16_t available_rbs; + uint16_t available_rbs[NFAPI_CC_MAX]; uint8_t rbs_retx[NFAPI_CC_MAX]; uint16_t average_rbs_per_user[NFAPI_CC_MAX]; int total_ue_count[NFAPI_CC_MAX]; @@ -562,6 +562,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, ue_count_retx[CC_id] = 0; rbs_retx[CC_id] = 0; average_rbs_per_user[CC_id] = 0; + available_rbs[CC_id] = 0; //for (UE_id = 0; UE_id < NFAPI_CC_MAX; ++UE_id) { // ue_retx_flag[CC_id][UE_id] = 0; //} @@ -600,10 +601,18 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, // Reduces the available RBs according to slicing configuration dlsch_scheduler_pre_processor_partitioning(Mod_id, slice_idx, rbs_retx); + for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; ++CC_id) { + if (UE_list->head < 0) continue; // no UEs in list + // max_rbs_allowed_slice is saved in every UE, so take it from the first one + ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_list->head]; + available_rbs[CC_id] = ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_idx]; + } + switch (RC.mac[Mod_id]->slice_info.dl[slice_idx].accounting) { // If greedy scheduling, try to account all the required RBs case POL_GREEDY: + for (UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { rnti = UE_RNTI(Mod_id, UE_id); if (rnti == NOT_A_RNTI) continue; @@ -612,7 +621,9 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; - nb_rbs_accounted[CC_id][UE_id] = nb_rbs_required[CC_id][UE_id]; + if (available_rbs[CC_id] == 0) continue; + nb_rbs_accounted[CC_id][UE_id] = cmin(nb_rbs_required[CC_id][UE_id], available_rbs[CC_id]); + available_rbs[CC_id] -= nb_rbs_accounted[CC_id][UE_id]; } } break; @@ -634,12 +645,12 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id, CC_id = UE_list->ordered_CCids[i][UE_id]; ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; - available_rbs = ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_idx]; + available_rbs[CC_id] = ue_sched_ctl->max_rbs_allowed_slice[CC_id][slice_idx]; if (ue_count_newtx[CC_id] == 0) { average_rbs_per_user[CC_id] = 0; - } else if (min_rb_unit[CC_id]*ue_count_newtx[CC_id] <= available_rbs) { - average_rbs_per_user[CC_id] = (uint16_t)floor(available_rbs/ue_count_newtx[CC_id]); + } else if (min_rb_unit[CC_id]*ue_count_newtx[CC_id] <= available_rbs[CC_id]) { + average_rbs_per_user[CC_id] = (uint16_t)floor(available_rbs[CC_id]/ue_count_newtx[CC_id]); } else { // consider the total number of use that can be scheduled UE average_rbs_per_user[CC_id] = (uint16_t)min_rb_unit[CC_id]; From f86b51990cbf7b7b1c14d1a5a882c64d869c42d2 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 31 Aug 2018 16:08:18 +0200 Subject: [PATCH 175/379] restart: first stop RU, then eNB proc threads --- targets/RT/USER/lte-softmodem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index d661e1e31c..e6e2d5a32c 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -775,10 +775,10 @@ int stop_L1L2(module_id_t enb_id) terminate_task(enb_id, TASK_ENB_APP, TASK_RRC_ENB); terminate_task(enb_id, TASK_ENB_APP, TASK_L2L1); oai_exit = 1; - LOG_I(ENB_APP, "calling kill_eNB_proc() for instance %d\n", enb_id); - kill_eNB_proc(enb_id); LOG_I(ENB_APP, "calling kill_RU_proc() for instance %d\n", enb_id); kill_RU_proc(RC.ru[enb_id]); + LOG_I(ENB_APP, "calling kill_eNB_proc() for instance %d\n", enb_id); + kill_eNB_proc(enb_id); oai_exit = 0; for (int cc_id = 0; cc_id < RC.nb_CC[enb_id]; cc_id++) { free_transport(RC.eNB[enb_id][cc_id]); From d798e03e9d97ed164c7111da01635629e97f9ac8 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 4 Sep 2018 16:38:41 +0200 Subject: [PATCH 176/379] fix rb_table loop --- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 937c561a21..5420cfdede 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -1309,7 +1309,7 @@ schedule_ulsch_rnti(module_id_t module_idP, // buffer_occupancy = UE_template->ul_total_buffer; - while (((rb_table[rb_table_index] > (N_RB_UL - 1 - first_rb_slice[CC_id])) + while (((rb_table[rb_table_index] > (N_RB_UL - first_rb_slice[CC_id])) || (rb_table[rb_table_index] > 45)) && (rb_table_index > 0)) { rb_table_index--; From 066ab904027781c2746f5de17c5e311bfae99001 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 4 Sep 2018 16:39:24 +0200 Subject: [PATCH 177/379] Bugfix: Give correct first_rb value to UE --- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 5420cfdede..b10ff88964 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -1410,7 +1410,7 @@ schedule_ulsch_rnti(module_id_t module_idP, } // Add UL_config PDUs - fill_nfapi_ulsch_config_request_rel8(&ul_req_tmp_body->ul_config_pdu_list[ul_req_index], cqi_req, cc, UE_template->physicalConfigDedicated, get_tmode(module_idP, CC_id, UE_id), mac->ul_handle, rnti, first_rb[CC_id], // resource_block_start + fill_nfapi_ulsch_config_request_rel8(&ul_req_tmp_body->ul_config_pdu_list[ul_req_index], cqi_req, cc, UE_template->physicalConfigDedicated, get_tmode(module_idP, CC_id, UE_id), mac->ul_handle, rnti, first_rb_slice[CC_id], // resource_block_start rb_table[rb_table_index], // number_of_resource_blocks UE_template->mcs_UL[harq_pid], cshift, // cyclic_shift_2_for_drms 0, // frequency_hopping_enabled_flag From 7162bf6895464bb4666769173c45862b667ce27a Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 4 Sep 2018 16:39:56 +0200 Subject: [PATCH 178/379] Bugfix: Assure available_rbs is positive --- openair2/LAYER2/MAC/pre_processor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 1befe8e8c3..5846720c7f 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -1696,6 +1696,8 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, first_rb_offset = UE_list->first_rb_offset[CC_id][slice_idx]; available_rbs = cmin(ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_idx], N_RB_UL - first_rb[CC_id] - first_rb_offset); + if (available_rbs < 0) + available_rbs = 0; if (total_ue_count[CC_id] == 0) { average_rbs_per_user[CC_id] = 0; From cbc78cd3db009de9c5e5730d64fba7a1f74b1be8 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 5 Sep 2018 10:48:29 +0200 Subject: [PATCH 179/379] Don't warn of ignoring sorting --- .../CONTROL_MODULES/MAC/flexran_agent_mac_internal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c index 54b98ade20..8e0dc57269 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c @@ -1550,12 +1550,12 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco flexran_set_ul_slice_maxmcs(mod_id, slice_idx, newc->maxmcs); changes++; } - if (check_ul_sorting_update(oldc, newc)) { - /*flexran_set_ul_slice_sorting(mod_id, slice_idx, newc->sorting, n); - changes++;*/ + /*if (check_ul_sorting_update(oldc, newc)) { + flexran_set_ul_slice_sorting(mod_id, slice_idx, newc->sorting, n); + changes++; LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting the sorting is not supported\n", mod_id, newc->id); - } + }*/ if (oldc->accounting != newc->accounting) { /*flexran_set_ul_slice_accounting_policy(mod_id, slice_idx, newc->accounting); *changes++;*/ From 70e1841bb1e985b42a198a9aca2033ec0dba20d6 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 5 Sep 2018 10:49:44 +0200 Subject: [PATCH 180/379] Fix: RAN API: remove_ul_slice() frees ul sched_name pointer, when sched_name set, free it when resetting --- openair2/ENB_APP/flexran_agent_ran_api.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openair2/ENB_APP/flexran_agent_ran_api.c b/openair2/ENB_APP/flexran_agent_ran_api.c index 0b41e4a479..973d322a5f 100644 --- a/openair2/ENB_APP/flexran_agent_ran_api.c +++ b/openair2/ENB_APP/flexran_agent_ran_api.c @@ -1756,6 +1756,8 @@ char *flexran_get_dl_slice_scheduler(mid_t mod_id, int slice_idx) int flexran_set_dl_slice_scheduler(mid_t mod_id, int slice_idx, char *name) { if (!mac_is_present(mod_id)) return 0; + if (RC.mac[mod_id]->slice_info.dl[slice_idx].sched_name) + free(RC.mac[mod_id]->slice_info.dl[slice_idx].sched_name); RC.mac[mod_id]->slice_info.dl[slice_idx].sched_name = strdup(name); RC.mac[mod_id]->slice_info.dl[slice_idx].sched_cb = dlsym(NULL, name); return RC.mac[mod_id]->slice_info.dl[slice_idx].sched_cb != NULL; @@ -1788,7 +1790,7 @@ int flexran_remove_ul_slice(mid_t mod_id, int slice_idx) slice_info_t *sli = &RC.mac[mod_id]->slice_info; if (sli->n_ul <= 1) return -1; - if (sli->dl[slice_idx].sched_name) free(sli->dl[slice_idx].sched_name); + if (sli->ul[slice_idx].sched_name) free(sli->ul[slice_idx].sched_name); --sli->n_ul; /* move last element to the position of the removed one */ if (slice_idx != sli->n_ul) @@ -1869,6 +1871,8 @@ char *flexran_get_ul_slice_scheduler(mid_t mod_id, int slice_idx) int flexran_set_ul_slice_scheduler(mid_t mod_id, int slice_idx, char *name) { if (!mac_is_present(mod_id)) return 0; + if (RC.mac[mod_id]->slice_info.ul[slice_idx].sched_name) + free(RC.mac[mod_id]->slice_info.ul[slice_idx].sched_name); RC.mac[mod_id]->slice_info.ul[slice_idx].sched_name = strdup(name); RC.mac[mod_id]->slice_info.ul[slice_idx].sched_cb = dlsym(NULL, name); return RC.mac[mod_id]->slice_info.ul[slice_idx].sched_cb != NULL; From 35c705787d3c95b7854d7f7b58a1f35f9fb2f7d8 Mon Sep 17 00:00:00 2001 From: hongzhi wang Date: Wed, 5 Sep 2018 15:35:14 +0200 Subject: [PATCH 181/379] UE nr pdcch update --- .../nr_dl_channel_estimation.c | 7 + openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 700 +++++++++--------- 2 files changed, 344 insertions(+), 363 deletions(-) diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c index daa228c29a..7385267dd1 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -326,10 +326,17 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, ch, dl_ch, 16); + +#ifdef DEBUG_CH + for (int m =0; m<12; m++) + printf("data : dl_ch -> (%d,%d)\n",dl_ch[0+2*m],dl_ch[1+2*m]); +#endif pil+=2; rxF+=8; dl_ch+=24; k+=12; + + for (pilot_cnt=3; pilot_cnt<(3*nb_rb_coreset); pilot_cnt+=3) { diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index e15125af1b..a13875ef9c 100755 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -37,6 +37,8 @@ //#include "PHY/defs.h" #include "PHY/defs_nr_UE.h" #include "PHY/CODING/nrPolar_tools/nr_polar_dci_defs.h" +#include "PHY/phy_extern_nr_ue.h" +#include "PHY/CODING/coding_extern.h" //#include "PHY/extern.h" //#include "SCHED/defs.h" //#include "SIMULATION/TOOLS/defs.h" // for taus @@ -273,7 +275,6 @@ uint32_t Y; #define Msymb (DCI_BITS_MAX/2) //#define Mquad (Msymb/4) -static uint32_t bitrev_cc_dci[32] = {1,17,9,25,5,21,13,29,3,19,11,27,7,23,15,31,0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30}; static int32_t wtemp[2][Msymb]; void pdcch_interleaving(NR_DL_FRAME_PARMS *frame_parms,int32_t **z, int32_t **wbar,uint8_t n_symbols_pdcch,uint8_t mi) @@ -344,6 +345,96 @@ void pdcch_interleaving(NR_DL_FRAME_PARMS *frame_parms,int32_t **z, int32_t **wb #ifdef NR_PDCCH_DCI_RUN + +void nr_pdcch_demapping_deinterleaving(uint16_t *llr, + uint16_t *z, + NR_DL_FRAME_PARMS *frame_parms, + uint8_t coreset_time_dur, + uint32_t coreset_nbr_rb, + uint8_t reg_bundle_size_L, + uint8_t coreset_interleaver_size_R, + uint8_t n_shift){ +/* + * This function will do demapping and deinterleaving from llr containing demodulated symbols + * Demapping will regroup in REG and bundles + * Deinterleaving will order the bundles + * + * In the following example we can see the process. The llr contains the demodulated IQs, but they are not ordered from REG 0,1,2,.. + * In e_rx (z) we will order the REG ids and group them into bundles. + * Then we will put the bundles in the correct order as indicated in subclause 7.3.2.2 + * + llr --------------------------> e_rx (z) ----> e_rx (z) + | ... + | ... + | REG 26 +symbol 2 | ... + | ... + | REG 5 + | REG 2 + + | ... + | ... + | REG 25 +symbol 1 | ... + | ... + | REG 4 + | REG 1 + + | ... + | ... ... ... + | REG 24 (bundle 7) ... ... +symbol 0 | ... bundle 3 bundle 6 + | ... bundle 2 bundle 1 + | REG 3 bundle 1 bundle 7 + | REG 0 (bundle 0) bundle 0 bundle 0 + +*/ + int c=0,r=0; + uint16_t bundle_j=0, f_bundle_j,f_reg; + uint32_t coreset_C; + uint16_t index_z, index_llr; + + int coreset_interleaved = 0; + if (reg_bundle_size_L!=0){ // interleaving will be done only if reg_bundle_size_L != 0 + coreset_interleaved=1; + coreset_C = (uint32_t)((coreset_nbr_rb * coreset_time_dur)/ (coreset_interleaver_size_R*reg_bundle_size_L)); + } else { + reg_bundle_size_L=6; + } + + for(int reg=0; reg<((coreset_nbr_rb*coreset_time_dur)); reg++){ + if ((reg%reg_bundle_size_L) == 0){ + if (r == coreset_interleaver_size_R) { + r=0; + c++; + } + bundle_j = (c*coreset_interleaver_size_R)+r; + f_bundle_j = ((r*coreset_C)+c+n_shift)%((coreset_nbr_rb*coreset_time_dur)/reg_bundle_size_L); + if (coreset_interleaved==0) f_bundle_j=bundle_j; + #ifdef NR_PDCCH_DCI_DEBUG + printf("\n\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_demapping_deinterleaving)-> [r=%d,c=%d] bundle_j(%d) interleaved at f_bundle_j(%d)\n",r,c,bundle_j,f_bundle_j); + #endif + } + f_reg = (f_bundle_j*reg_bundle_size_L)+(reg%reg_bundle_size_L); + index_z = 9*reg; + //index_llr = 9*(((uint16_t)floor(f_reg/reg_bundle_size_L)+(f_reg)%coreset_time_dur))*(coreset_nbr_rb); + index_llr = 9*((uint16_t)floor(f_reg/coreset_time_dur)+((f_reg%coreset_time_dur)*(coreset_nbr_rb))); + for (int i=0; i<9; i++){ + z[index_z + i] = llr[index_llr + i]; + #ifdef NR_PDCCH_DCI_DEBUG + printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_demapping_deinterleaving)-> [reg=%d,bundle_j=%d] z[%d]=(%d,%d) <-> \t[f_reg=%d,fbundle_j=%d] llr[%d]=(%d,%d) \n", + reg,bundle_j,(index_z + i),*(char*) &z[index_z + i],*(1 + (char*) &z[index_z + i]), + f_reg,f_bundle_j,(index_llr + i),*(char*) &llr[index_llr + i], *(1 + (char*) &llr[index_llr + i])); + #endif + } + if ((reg%reg_bundle_size_L) == 0) r++; + } +} + + + + + void nr_pdcch_demapping(uint16_t *llr, uint16_t *wbar, NR_DL_FRAME_PARMS *frame_parms, uint8_t coreset_time_dur, uint32_t coreset_nbr_rb) { @@ -1331,9 +1422,10 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF, c_rb, i, j, *(short *) &rxF_ext[j],*(1 + (short*) &rxF_ext[j]), i, *(short *) &rxF[i], *(1 + (short*) &rxF[i])); #endif - dl_ch0_ext[j++] = dl_ch0[i]; + dl_ch0_ext[j] = dl_ch0[i]; //printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> ch %d => dl_ch0(%d,%d)\n", i, *(short *) &dl_ch0[i], *(1 + (short*) &dl_ch0[i])); - printf("\t-> dl_ch0[%d] => dl_ch0_ext[%d](%d,%d)\n", i,(j-1), *(short *) &dl_ch0[i], *(1 + (short*) &dl_ch0[i])); + printf("\t-> dl_ch0[%d] => dl_ch0_ext[%d](%d,%d)\n", i,j, *(short *) &dl_ch0[i], *(1 + (short*) &dl_ch0[i])); + j++; } else { #ifdef NR_PDCCH_DCI_DEBUG printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> RB[c_rb %d] \t RE[re %d] => rxF_ext[%d]=(%d,%d)\t rxF[%d]=(%d,%d) \t\t <==> DM-RS PDCCH, this is a pilot symbol\n", @@ -2067,10 +2159,12 @@ void pdcch_extract_rbs_dual(int32_t **rxdataF, } } } +#if defined(__x86_64__) || defined(__i386__) +__m128i mmtmpP0,mmtmpP1,mmtmpP2,mmtmpP3; +#elif defined(__arm__) +int16x8_t mmtmpP0,mmtmpP1,mmtmpP2,mmtmpP3; +#endif - - -#ifdef NR_PDCCH_DCI_RUN void nr_pdcch_channel_compensation(int32_t **rxdataF_ext, int32_t **dl_ch_estimates_ext, int32_t **rxdataF_comp, @@ -2081,335 +2175,105 @@ void nr_pdcch_channel_compensation(int32_t **rxdataF_ext, uint32_t coreset_nbr_rb) { - uint16_t rb; - #if defined(__x86_64__) || defined(__i386__) - __m128i *dl_ch128, *rxdataF128, *rxdataF_comp128; - __m128i *dl_ch128_2, *rho128; - #elif defined(__arm__) - #endif - uint8_t aatx, aarx, pilots = 0; - -short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1}; -short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1}; - - #ifdef DEBUG_DCI_DECODING - LOG_I(PHY, "PDCCH comp: symbol %d\n",symbol); - #endif -/* - if (symbol == 0) - pilots = 1; -*/ - for (aatx = 0; aatx < frame_parms->nb_antenna_ports_eNB; aatx++) { - //if (frame_parms->mode1_flag && aatx>0) break; //if mode1_flag is set then there is only one stream to extract, independent of nb_antenna_ports_eNB - for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) { - #if defined(__x86_64__) || defined(__i386__) - // dl_ch128 = (__m128i *) &dl_ch_estimates_ext[(aatx << 1) + aarx][symbol * frame_parms->N_RB_DL * 12]; - // rxdataF128 = (__m128i *) &rxdataF_ext[aarx][symbol * frame_parms->N_RB_DL * 12]; - // rxdataF_comp128 = (__m128i *) &rxdataF_comp[(aatx << 1) + aarx][symbol * frame_parms->N_RB_DL * 12]; - dl_ch128 = (__m128i *) &dl_ch_estimates_ext[(aatx << 1) + aarx][symbol * coreset_nbr_rb * 9]; - rxdataF128 = (__m128i *) &rxdataF_ext[aarx][symbol * coreset_nbr_rb * 9]; - rxdataF_comp128 = (__m128i *) &rxdataF_comp[(aatx << 1) + aarx][symbol * coreset_nbr_rb * 9]; - #elif defined(__arm__) - #endif - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_channel_compensation)-> Total of RBs to be computed (%d), and number of RE (%d) (9 RE per RB)\n",coreset_nbr_rb,coreset_nbr_rb*9); - #endif - uint32_t k=0; - for (rb = 0; rb < coreset_nbr_rb; rb) { //FIXME this for loop risks an infinite loop if rb is not increased by 1 inside the loop - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_channel_compensation)-> rb=%d\n", rb); - #endif - #if defined(__x86_64__) || defined(__i386__) - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_channel_compensation)-> rxdataF_comp = rxdataF_ext(%d,%d) x dl_ch_ext(%d,%d) -> RB[%d] RE[%d]\n", - *(short *) &rxdataF_ext[(rb*9)+k],*(1 + (short*) &rxdataF_ext[(rb*9)+k]), - *(short *) &dl_ch_estimates_ext[(rb*9)+k],*(1 + (short*) &dl_ch_estimates_ext[(rb*9)+k]), - rb,k); - #endif - k++; - if (k%9 == 0) rb++; - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_channel_compensation)-> rxdataF x dl_ch -> RB[%d] RE[%d]\n",rb,k); - #endif - k++; - if (k%9 == 0) rb++; - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_channel_compensation)-> rxdataF x dl_ch -> RB[%d] RE[%d]\n",rb,k); - #endif - k++; - if (k%9 == 0) rb++; - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_channel_compensation)-> rxdataF x dl_ch -> RB[%d] RE[%d]\n",rb,k); - #endif - k++; - if (k%9 == 0) rb++; - // multiply by conjugated channel - mmtmpPD0 = _mm_madd_epi16(dl_ch128[0], rxdataF128[0]); // mmtmpPD0 contains real part of 4 consecutive outputs (32-bit) - // print_ints("re",&mmtmpPD0); - mmtmpPD1 = _mm_shufflelo_epi16(dl_ch128[0], _MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_shufflehi_epi16(mmtmpPD1, _MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_sign_epi16(mmtmpPD1, *(__m128i * )&conjugate[0]); - - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_channel_compensation)-> conjugate\t ### \t"); - for (int conjugate_index=0 ; conjugate_index< 8 ; conjugate_index++) - printf("conjugate[%d]=%d",conjugate_index,conjugate[conjugate_index]); - printf("\n"); - #endif - - // print_ints("im",&mmtmpPD1); - mmtmpPD1 = _mm_madd_epi16(mmtmpPD1, rxdataF128[0]); // mmtmpPD1 contains imag part of 4 consecutive outputs (32-bit) - mmtmpPD0 = _mm_srai_epi32(mmtmpPD0, output_shift); - // print_ints("re(shift)",&mmtmpPD0); - mmtmpPD1 = _mm_srai_epi32(mmtmpPD1, output_shift); - // print_ints("im(shift)",&mmtmpPD1); - mmtmpPD2 = _mm_unpacklo_epi32(mmtmpPD0, mmtmpPD1); - mmtmpPD3 = _mm_unpackhi_epi32(mmtmpPD0, mmtmpPD1); - // print_ints("c0",&mmtmpPD2); - // print_ints("c1",&mmtmpPD3); - rxdataF_comp128[0] = _mm_packs_epi32(mmtmpPD2, mmtmpPD3); - // print_shorts("rx:",rxdataF128); - // print_shorts("ch:",dl_ch128); - // print_shorts("pack:",rxdataF_comp128); - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_channel_compensation)-> rxdataF x dl_ch -> RB[%d] RE[%d]\n",rb,k); - #endif - k++; - if (k%9 == 0) rb++; - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_channel_compensation)-> rxdataF x dl_ch -> RB[%d] RE[%d]\n",rb,k); - #endif - k++; - if (k%9 == 0) rb++; - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_channel_compensation)-> rxdataF x dl_ch -> RB[%d] RE[%d]\n",rb,k); - #endif - k++; - if (k%9 == 0) rb++; - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_channel_compensation)-> rxdataF x dl_ch -> RB[%d] RE[%d]\n",rb,k); - #endif - k++; - if (k%9 == 0) rb++; - // multiply by conjugated channel - mmtmpPD0 = _mm_madd_epi16(dl_ch128[1], rxdataF128[1]); // mmtmpPD0 contains real part of 4 consecutive outputs (32-bit) - mmtmpPD1 = _mm_shufflelo_epi16(dl_ch128[1], _MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_shufflehi_epi16(mmtmpPD1, _MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_sign_epi16(mmtmpPD1, *(__m128i * )conjugate); - mmtmpPD1 = _mm_madd_epi16(mmtmpPD1, rxdataF128[1]); // mmtmpPD1 contains imag part of 4 consecutive outputs (32-bit) - mmtmpPD0 = _mm_srai_epi32(mmtmpPD0, output_shift); - mmtmpPD1 = _mm_srai_epi32(mmtmpPD1, output_shift); - mmtmpPD2 = _mm_unpacklo_epi32(mmtmpPD0, mmtmpPD1); - mmtmpPD3 = _mm_unpackhi_epi32(mmtmpPD0, mmtmpPD1); - rxdataF_comp128[1] = _mm_packs_epi32(mmtmpPD2, mmtmpPD3); - // print_shorts("rx:",rxdataF128+1); - // print_shorts("ch:",dl_ch128+1); - // print_shorts("pack:",rxdataF_comp128+1); - // multiply by conjugated channel - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_channel_compensation)-> rxdataF x dl_ch -> RB[%d] RE[%d]\n",rb,k); - #endif - k++; - if (k%9 == 0) rb++; - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_channel_compensation)-> rxdataF x dl_ch -> RB[%d] RE[%d]\n",rb,k); - #endif - k++; - if (k%9 == 0) rb++; - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_channel_compensation)-> rxdataF x dl_ch -> RB[%d] RE[%d]\n",rb,k); - #endif - k++; - if (k%9 == 0) rb++; - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_channel_compensation)-> rxdataF x dl_ch -> RB[%d] RE[%d]\n",rb,k); - #endif - k++; - if (k%9 == 0) rb++; - mmtmpPD0 = _mm_madd_epi16(dl_ch128[2], rxdataF128[2]); // mmtmpPD0 contains real part of 4 consecutive outputs (32-bit) - mmtmpPD1 = _mm_shufflelo_epi16(dl_ch128[2],_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_shufflehi_epi16(mmtmpPD1, _MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_sign_epi16(mmtmpPD1, *(__m128i * )conjugate); - mmtmpPD1 = _mm_madd_epi16(mmtmpPD1, rxdataF128[2]); // mmtmpPD1 contains imag part of 4 consecutive outputs (32-bit) - mmtmpPD0 = _mm_srai_epi32(mmtmpPD0, output_shift); - mmtmpPD1 = _mm_srai_epi32(mmtmpPD1, output_shift); - mmtmpPD2 = _mm_unpacklo_epi32(mmtmpPD0, mmtmpPD1); - mmtmpPD3 = _mm_unpackhi_epi32(mmtmpPD0, mmtmpPD1); - rxdataF_comp128[2] = _mm_packs_epi32(mmtmpPD2, mmtmpPD3); - // We compute the third part of 4 symbols contained in one entire RB = 12 RE - //if (rb < 6 || rb > 95) { - #ifdef NR_PDCCH_DCI_DEBUG - print_shorts("\t\trxdataF_ext:", rxdataF128); - print_shorts("\t\tdl_ch:", dl_ch128); - print_shorts("\t\trxdataF_comp:", rxdataF_comp128); - print_shorts("\t\trxdataF_ext:", rxdataF128 + 1); - print_shorts("\t\tdl_ch:", dl_ch128 + 1); - print_shorts("\t\trxdataF_comp:", rxdataF_comp128 + 1); - print_shorts("\t\ttrxdataF_ext:", rxdataF128 + 2); - print_shorts("\t\tdl_ch:", dl_ch128 + 2); - print_shorts("\t\trxdataF_comp:", rxdataF_comp128 + 2); - #endif - //} - dl_ch128 += 3; - rxdataF128 += 3; - rxdataF_comp128 += 3; - //if ((rb + 1) % 4 == 3) - //rb++; - // if rxdataF_comp does contains pilot DM-RS PDCCH, as in previous code rxdataF_comp128 is a set of 4 consecutive outputs (32-bit) - // the computation of third part of 4 symbols contains last 9th symbol of the current rb + 3 first symbols of the next rb - // so rb computing must be take this into consideration, and every 4 rb, rb must be increased twice - //} - -// This code will replace the code below for nr -//#else -/* - if (pilots == 0) { - mmtmpPD0 = _mm_madd_epi16(dl_ch128[2],rxdataF128[2]); - // mmtmpPD0 contains real part of 4 consecutive outputs (32-bit) - mmtmpPD1 = _mm_shufflelo_epi16(dl_ch128[2],_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_shufflehi_epi16(mmtmpPD1,_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_sign_epi16(mmtmpPD1,*(__m128i*)conjugate); - mmtmpPD1 = _mm_madd_epi16(mmtmpPD1,rxdataF128[2]); - // mmtmpPD1 contains imag part of 4 consecutive outputs (32-bit) - mmtmpPD0 = _mm_srai_epi32(mmtmpPD0,output_shift); - mmtmpPD1 = _mm_srai_epi32(mmtmpPD1,output_shift); - mmtmpPD2 = _mm_unpacklo_epi32(mmtmpPD0,mmtmpPD1); - mmtmpPD3 = _mm_unpackhi_epi32(mmtmpPD0,mmtmpPD1); - - rxdataF_comp128[2] = _mm_packs_epi32(mmtmpPD2,mmtmpPD3); - } - - print_shorts("rx:",rxdataF128); - print_shorts("ch:",dl_ch128); - print_shorts("pack:",rxdataF_comp128); - print_shorts("\trx:",rxdataF128+1); - print_shorts("\tch:",dl_ch128+1); - print_shorts("\tpack:",rxdataF_comp128+1); - print_shorts("\t\trx:",rxdataF128+2); - print_shorts("\t\tch:",dl_ch128+2); - print_shorts("\t\tpack:",rxdataF_comp128+2); - - if (pilots==0) { - dl_ch128+=3; - rxdataF128+=3; - rxdataF_comp128+=3; - } else { - dl_ch128+=2; - rxdataF128+=2; - rxdataF_comp128+=2; - } - -*/ -//#endif - + uint16_t rb; //,nb_rb=20; + uint8_t aatx,aarx; +#if defined(__x86_64__) || defined(__i386__) + __m128i *dl_ch128,*rxdataF128,*rxdataF_comp128; #elif defined(__arm__) +#endif + + for (aatx=0; aatxnb_antenna_ports_eNB;aatx++) + for (aarx=0; aarxnb_antennas_rx; aarx++) { + +#if defined(__x86_64__) || defined(__i386__) + dl_ch128 = (__m128i *)&dl_ch_estimates_ext[(aatx<<1)+aarx][symbol*20*12]; + rxdataF128 = (__m128i *)&rxdataF_ext[aarx][symbol*20*12]; + rxdataF_comp128 = (__m128i *)&rxdataF_comp[(aatx<<1)+aarx][symbol*20*12]; + //printf("ch compensation dl_ch ext addr %p \n", &dl_ch_estimates_ext[(aatx<<1)+aarx][symbol*20*12]); + //printf("rxdataf ext addr %p symbol %d\n", &rxdataF_ext[aarx][symbol*20*12], symbol); + //printf("rxdataf_comp addr %p\n",&rxdataF_comp[(aatx<<1)+aarx][symbol*20*12]); + +#elif defined(__arm__) +// to be filled in +#endif + + for (rb=0; rbnb_antennas_rx; aarx++) { - #if defined(__x86_64__) || defined(__i386__) - rho128 = (__m128i *) &rho[aarx][symbol * frame_parms->N_RB_DL * 12]; - dl_ch128 = (__m128i *) &dl_ch_estimates_ext[aarx][symbol - * frame_parms->N_RB_DL * 12]; - dl_ch128_2 = (__m128i *) &dl_ch_estimates_ext[2 + aarx][symbol - * frame_parms->N_RB_DL * 12]; - -#elif defined(__arm__) - -#endif - -//for (rb = 0; rb < frame_parms->N_RB_DL; rb++) { -for (rb = 0; rb < coreset_nbr_rb; rb++) { -#if defined(__x86_64__) || defined(__i386__) - - // multiply by conjugated channel - mmtmpPD0 = _mm_madd_epi16(dl_ch128[0], dl_ch128_2[0]); - // print_ints("re",&mmtmpD0); - - // mmtmpD0 contains real part of 4 consecutive outputs (32-bit) - mmtmpPD1 = _mm_shufflelo_epi16(dl_ch128[0], - _MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_shufflehi_epi16(mmtmpPD1, _MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_sign_epi16(mmtmpPD1, *(__m128i * )&conjugate[0]); - // print_ints("im",&mmtmpPD1); - mmtmpPD1 = _mm_madd_epi16(mmtmpPD1, dl_ch128_2[0]); - // mmtmpPD1 contains imag part of 4 consecutive outputs (32-bit) - mmtmpPD0 = _mm_srai_epi32(mmtmpPD0, output_shift); - // print_ints("re(shift)",&mmtmpD0); - mmtmpPD1 = _mm_srai_epi32(mmtmpPD1, output_shift); - // print_ints("im(shift)",&mmtmpD1); - mmtmpPD2 = _mm_unpacklo_epi32(mmtmpPD0, mmtmpPD1); - mmtmpPD3 = _mm_unpackhi_epi32(mmtmpPD0, mmtmpPD1); - // print_ints("c0",&mmtmpPD2); - // print_ints("c1",&mmtmpPD3); - rho128[0] = _mm_packs_epi32(mmtmpPD2, mmtmpPD3); - - //print_shorts("rx:",dl_ch128_2); - //print_shorts("ch:",dl_ch128); - //print_shorts("pack:",rho128); - - // multiply by conjugated channel - mmtmpPD0 = _mm_madd_epi16(dl_ch128[1], dl_ch128_2[1]); - // mmtmpD0 contains real part of 4 consecutive outputs (32-bit) - mmtmpPD1 = _mm_shufflelo_epi16(dl_ch128[1], - _MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_shufflehi_epi16(mmtmpPD1, _MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_sign_epi16(mmtmpPD1, *(__m128i * )conjugate); - mmtmpPD1 = _mm_madd_epi16(mmtmpPD1, dl_ch128_2[1]); - // mmtmpD1 contains imag part of 4 consecutive outputs (32-bit) - mmtmpPD0 = _mm_srai_epi32(mmtmpPD0, output_shift); - mmtmpPD1 = _mm_srai_epi32(mmtmpPD1, output_shift); - mmtmpPD2 = _mm_unpacklo_epi32(mmtmpPD0, mmtmpPD1); - mmtmpPD3 = _mm_unpackhi_epi32(mmtmpPD0, mmtmpPD1); - - rho128[1] = _mm_packs_epi32(mmtmpPD2, mmtmpPD3); - //print_shorts("rx:",dl_ch128_2+1); - //print_shorts("ch:",dl_ch128+1); - //print_shorts("pack:",rho128+1); - // multiply by conjugated channel - mmtmpPD0 = _mm_madd_epi16(dl_ch128[2], dl_ch128_2[2]); - // mmtmpPD0 contains real part of 4 consecutive outputs (32-bit) - mmtmpPD1 = _mm_shufflelo_epi16(dl_ch128[2], - _MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_shufflehi_epi16(mmtmpPD1, _MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_sign_epi16(mmtmpPD1, *(__m128i * )conjugate); - mmtmpPD1 = _mm_madd_epi16(mmtmpPD1, dl_ch128_2[2]); - // mmtmpPD1 contains imag part of 4 consecutive outputs (32-bit) - mmtmpPD0 = _mm_srai_epi32(mmtmpPD0, output_shift); - mmtmpPD1 = _mm_srai_epi32(mmtmpPD1, output_shift); - mmtmpPD2 = _mm_unpacklo_epi32(mmtmpPD0, mmtmpPD1); - mmtmpPD3 = _mm_unpackhi_epi32(mmtmpPD0, mmtmpPD1); - - rho128[2] = _mm_packs_epi32(mmtmpPD2, mmtmpPD3); - //print_shorts("rx:",dl_ch128_2+2); - //print_shorts("ch:",dl_ch128+2); - //print_shorts("pack:",rho128+2); - - dl_ch128 += 3; - dl_ch128_2 += 3; - rho128 += 3; - -#elif defined(__arm_) - -#endif - } - } - - } - -#if defined(__x86_64__) || defined(__i386__) - _mm_empty(); - _m_empty(); + _mm_empty(); + _m_empty(); #endif } -#endif + /* void pdcch_channel_compensation(int32_t **rxdataF_ext, @@ -3095,9 +2959,30 @@ T(T_UE_PHY_PDCCH_IQ, T_INT(frame_parms->N_RB_DL), T_INT(frame_parms->N_RB_DL), } + + #ifdef NR_PDCCH_DCI_DEBUG + printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> we enter nr_pdcch_demapping_deinterleaving()\n"); + #endif + +nr_pdcch_demapping_deinterleaving(pdcch_vars[eNB_id]->llr, + (uint16_t*) pdcch_vars[eNB_id]->e_rx, + frame_parms, + coreset_time_dur, + coreset_nbr_rb, + reg_bundle_size_L, + coreset_interleaver_size_R, + n_shift); + + + + + + +#if 0 #ifdef NR_PDCCH_DCI_DEBUG printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> we enter nr_pdcch_demapping()\n"); #endif + nr_pdcch_demapping(pdcch_vars[eNB_id]->llr, pdcch_vars[eNB_id]->wbar, frame_parms, @@ -3138,7 +3023,7 @@ T(T_UE_PHY_PDCCH_IQ, T_INT(frame_parms->N_RB_DL), T_INT(frame_parms->N_RB_DL), } printf("\n"); #endif - +#endif /* printf("\t### in nr_rx_pdcch() function we enter pdcch_demapping()\n"); @@ -3206,7 +3091,7 @@ void pdcch_scrambling(NR_DL_FRAME_PARMS *frame_parms, #ifdef NR_PDCCH_DCI_RUN void nr_pdcch_unscrambling(uint16_t crnti, NR_DL_FRAME_PARMS *frame_parms, uint8_t nr_tti_rx, - int8_t* llr, uint32_t length, uint16_t pdcch_DMRS_scrambling_id, int do_common) { + double llr[], uint32_t length, uint16_t pdcch_DMRS_scrambling_id, int do_common) { int i; uint8_t reset; @@ -3249,6 +3134,52 @@ printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_unscrambling)-> (c_init=%d, n_id=%d, } +#if 0 + +void nr_pdcch_unscrambling_old(uint16_t crnti, NR_DL_FRAME_PARMS *frame_parms, uint8_t nr_tti_rx, + int8_t* llr, uint32_t length, uint16_t pdcch_DMRS_scrambling_id, int do_common) { + + int i; + uint8_t reset; + uint32_t x1, x2, s = 0; + uint16_t n_id; //{0,1,...,65535} + uint32_t n_rnti; + + reset = 1; + // x1 is set in first call to lte_gold_generic + //do_common=1; +if (do_common){ + n_id = frame_parms->Nid_cell; + n_rnti = 0; +} else { + n_id = pdcch_DMRS_scrambling_id; + n_rnti = (uint32_t)crnti; +} +//x2 = ((n_rnti * (1 << 16)) + n_id)%(1 << 31); +//uint32_t puissance_2_16 = ((1<<16)*n_rnti)+n_id; +//uint32_t puissance_2_31= (1<<30)*2; +//uint32_t calc_x2=puissance_2_16%puissance_2_31; + x2 = (((1<<16)*n_rnti)+n_id)%((1<<30)*2); //this is c_init in 38.211 v15.1.0 Section 7.3.2.3 +// x2 = (nr_tti_rx << 9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.8.2 +#ifdef NR_PDCCH_DCI_DEBUG +printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_unscrambling)-> (c_init=%d, n_id=%d, n_rnti=%d)\n",x2,n_id,n_rnti); +#endif + for (i = 0; i < length; i++) { + if ((i & 0x1f) == 0) { + s = lte_gold_generic(&x1, &x2, reset); + // printf("lte_gold[%d]=%x\n",i,s); + reset = 0; + } + + // printf("unscrambling %d : e %d, c %d => ",i,llr[i],((s>>(i&0x1f))&1)); + if (((s >> (i % 32)) & 1) == 0) + llr[i] = -llr[i]; + // printf("%d\n",llr[i]); + + } +} +#endif // 0 + #endif @@ -3910,7 +3841,9 @@ int get_nCCE_offset_l1(int *CCE_table, #ifdef NR_PDCCH_DCI_RUN void nr_dci_decoding_procedure0(int s, //x - int p, //x + int p, + int coreset_time_dur, + uint16_t coreset_nbr_rb, //x NR_UE_PDCCH **pdcch_vars, //x int do_common, //x //dci_detect_mode_t mode, //not sure if necessary @@ -3930,6 +3863,7 @@ void nr_dci_decoding_procedure0(int s, uint8_t *dci_cnt, crc_scrambled_t *crc_scrambled, format_found_t *format_found, + uint16_t pdcch_DMRS_scrambling_id, uint32_t *CCEmap0, uint32_t *CCEmap1, uint32_t *CCEmap2) { @@ -4142,15 +4076,45 @@ void nr_dci_decoding_procedure0(int s, printf ("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> ... we enter function dci_decoding(sizeof_bits=%d L=%d) -----\n",sizeof_bits,L); printf ("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> ... we have to replace this part of the code by polar decoding\n"); #endif - -// for (int m=0; m < (nCCE[p]*6*9*2); m++) - printf("polar intput: "); - for (int m=0; m < (L2*6*9*2); m++){ - polar_input[m] = (pdcch_vars[eNB_id]->e_rx[CCEind * 54+m]>0) ? (1.0):(-1.0); - printf("\t polar_input[%d]=%lf <-> e_rx[%d]=%d\n",m,polar_input[m],(CCEind * 54+m),pdcch_vars[eNB_id]->e_rx[CCEind * 54+m]); - } - printf("\n"); +// The polar_input has to be taken from the e_rx table but in the proper order +// e_rx contains the bits grouped by bundle +// polar_input has to contain the bits ordered by b_tilde_0, b_tilde_1, .... + +// for (int m=0; m < (nCCE[p]*6*9*2); m++) + #ifdef NR_PDCCH_DCI_DEBUG + printf("polar intput (with coreset_time_dur=%d, coreset_nbr_rb=%d, p=%d, CCEind=%d): \n", + coreset_time_dur,coreset_nbr_rb,p,CCEind); + #endif + int reg_p,reg_e; + for (int m=0; m < (L2*6); m++){ + reg_p = (((int)floor(m/coreset_time_dur))+((m%coreset_time_dur)*(L2*6/coreset_time_dur)))*9*2; + reg_e = m*9*2; + for (int i=0; i<9*2; i++){ + polar_input[reg_p+i] = (pdcch_vars[eNB_id]->e_rx[((CCEind*9*6*2) + reg_e + i)]>0) ? (1.0):(-1.0); + printf("\t m=%d \tpolar_input[%d]=%lf <-> e_rx[%d]=%d\n",m,reg_p+i,polar_input[reg_p+i], + ((CCEind*9*6*2) + reg_e + i),pdcch_vars[eNB_id]->e_rx[((CCEind*9*6*2) + reg_e + i)]); + } + } + + #ifdef NR_PDCCH_DCI_DEBUG + printf("\n"); + int j=0; + uint32_t polar_hex[27] = {0}; + for (int i=0; icrnti, + frame_parms, + nr_tti_rx, + polar_input, + L2*6*9*2, + pdcch_DMRS_scrambling_id, + do_common);*/ + #ifdef PDCCH_TEST_POLAR_TEMP_FIX t_nrPolar_paramsPtr currentPtr = NULL; nr_polar_init(¤tPtr, NR_POLAR_DCI_MESSAGE_TYPE, 41, 8); @@ -5124,6 +5088,16 @@ uint8_t nr_dci_decoding_procedure(int s, NR_UE_PDCCH **pdcch_vars = ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]]; NR_UE_PDCCH *pdcch_vars2 = ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]; + uint16_t pdcch_DMRS_scrambling_id = pdcch_vars2->coreset[p].pdcchDMRSScramblingID; + uint64_t coreset_freq_dom = pdcch_vars2->coreset[p].frequencyDomainResources; + int coreset_time_dur = pdcch_vars2->coreset[p].duration; + uint16_t coreset_nbr_rb; + for (int i = 0; i < 45; i++) { + // this loop counts each bit of the bit map coreset_freq_dom, and increments nbr_RB_coreset for each bit set to '1' + if (((coreset_freq_dom & 0x1FFFFFFFFFFF) >> i) & 0x1) coreset_nbr_rb++; + } + coreset_nbr_rb = 6 * coreset_nbr_rb; + // coreset_time_dur,coreset_nbr_rb, NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; t_nrPolar_paramsPtr *nrPolar_params = &ue->nrPolar_params; uint8_t mi;// = get_mi(&ue->frame_parms, nr_tti_rx); @@ -5229,11 +5203,11 @@ uint8_t nr_dci_decoding_procedure(int s, css_dci_format,(1<<2)); #endif old_dci_cnt = dci_cnt; - nr_dci_decoding_procedure0(s,p,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, + nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, crc_scrambled_values, 2, cformat0_0_and_1_0, uformat0_0_and_1_0, format_0_0_1_0_size_bits, format_0_0_1_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_, &CCEmap0, &CCEmap1, &CCEmap2); + &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); if (dci_cnt != old_dci_cnt){ format_0_0_1_0_size_bits = nr_dci_format_size(crc_scrambled_,16,n_RB_ULBWP,n_RB_DLBWP,dci_fields_sizes); // after decoding dci successfully we recalculate dci pdu size with correct crc scrambled to get the right field sizes old_dci_cnt = dci_cnt; @@ -5248,11 +5222,11 @@ uint8_t nr_dci_decoding_procedure(int s, css_dci_format,(1<<3)); #endif old_dci_cnt = dci_cnt; - nr_dci_decoding_procedure0(s,p,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, + nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, crc_scrambled_values, 3, cformat0_0_and_1_0, uformat0_0_and_1_0, format_0_0_1_0_size_bits, format_0_0_1_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_, &CCEmap0, &CCEmap1, &CCEmap2); + &crc_scrambled_, &format_found_, pdcch_DMRS_scrambling_id,&CCEmap0, &CCEmap1, &CCEmap2); if (dci_cnt != old_dci_cnt){ format_0_0_1_0_size_bits = nr_dci_format_size(crc_scrambled_,16,n_RB_ULBWP,n_RB_DLBWP,dci_fields_sizes); // after decoding dci successfully we recalculate dci pdu size with correct crc scrambled to get the right field sizes old_dci_cnt = dci_cnt; @@ -5267,11 +5241,11 @@ uint8_t nr_dci_decoding_procedure(int s, css_dci_format,(1<<4)); #endif old_dci_cnt = dci_cnt; - nr_dci_decoding_procedure0(s,p,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, + nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, crc_scrambled_values, 4, cformat0_0_and_1_0, uformat0_0_and_1_0, format_0_0_1_0_size_bits, format_0_0_1_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_, &CCEmap0, &CCEmap1, &CCEmap2); + &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); if (dci_cnt != old_dci_cnt){ format_0_0_1_0_size_bits = nr_dci_format_size(crc_scrambled_,16,n_RB_ULBWP,n_RB_DLBWP,dci_fields_sizes); // after decoding dci successfully we recalculate dci pdu size with correct crc scrambled to get the right field sizes old_dci_cnt = dci_cnt; @@ -5294,11 +5268,11 @@ uint8_t nr_dci_decoding_procedure(int s, #endif // for aggregation level 1. The number of candidates (nrofCandidates-SFI) will be calculated in function nr_dci_decoding_procedure0 old_dci_cnt = dci_cnt; - nr_dci_decoding_procedure0(s,p,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, + nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, crc_scrambled_values, 0, cformat2_0, uformat0_0_and_1_0, format_2_0_size_bits, format_2_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_, &CCEmap0, &CCEmap1, &CCEmap2); + &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); if (dci_cnt != old_dci_cnt){ old_dci_cnt = dci_cnt; for (int i=0; icurrent_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, + nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, crc_scrambled_values, 1, cformat2_0, uformat0_0_and_1_0, format_2_0_size_bits, format_2_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_, &CCEmap0, &CCEmap1, &CCEmap2); + &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); if (dci_cnt != old_dci_cnt){ old_dci_cnt = dci_cnt; for (int i=0; icurrent_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, + nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, crc_scrambled_values, 2, cformat2_0, uformat0_0_and_1_0, format_2_0_size_bits, format_2_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_, &CCEmap0, &CCEmap1, &CCEmap2); + &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); if (dci_cnt != old_dci_cnt){ old_dci_cnt = dci_cnt; for (int i=0; icurrent_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, + nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, crc_scrambled_values, 3, cformat2_0, uformat0_0_and_1_0, format_2_0_size_bits, format_2_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_, &CCEmap0, &CCEmap1, &CCEmap2); + &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); if (dci_cnt != old_dci_cnt){ old_dci_cnt = dci_cnt; for (int i=0; icurrent_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, + nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, crc_scrambled_values, 4, cformat2_0, uformat0_0_and_1_0, format_2_0_size_bits, format_2_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_, &CCEmap0, &CCEmap1, &CCEmap2); + &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); if (dci_cnt != old_dci_cnt){ old_dci_cnt = dci_cnt; for (int i=0; icurrent_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, + nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 0, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, crc_scrambled_values, 0, cformat0_0_and_1_0, uformat0_0_and_1_0, format_0_0_1_0_size_bits, format_0_0_1_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_, &CCEmap0, &CCEmap1, &CCEmap2); + &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); if (dci_cnt != old_dci_cnt){ old_dci_cnt = dci_cnt; for (int i=0; icurrent_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, + nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 0, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, crc_scrambled_values, 1, cformat0_0_and_1_0, uformat0_0_and_1_0, format_0_0_1_0_size_bits, format_0_0_1_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_, &CCEmap0, &CCEmap1, &CCEmap2); + &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); if (dci_cnt != old_dci_cnt){ old_dci_cnt = dci_cnt; for (int i=0; icurrent_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, + nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 0, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, crc_scrambled_values, 2, cformat0_0_and_1_0, uformat0_0_and_1_0, format_0_0_1_0_size_bits, format_0_0_1_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_, &CCEmap0, &CCEmap1, &CCEmap2); + &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); if (dci_cnt != old_dci_cnt){ old_dci_cnt = dci_cnt; for (int i=0; icurrent_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, + nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 0, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, crc_scrambled_values, 3, cformat0_0_and_1_0, uformat0_0_and_1_0, format_0_0_1_0_size_bits, format_0_0_1_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_, &CCEmap0, &CCEmap1, &CCEmap2); + &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); if (dci_cnt != old_dci_cnt){ old_dci_cnt = dci_cnt; for (int i=0; icurrent_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, + nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 0, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, crc_scrambled_values, 4, cformat0_0_and_1_0, uformat0_0_and_1_0, format_0_0_1_0_size_bits, format_0_0_1_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_, &CCEmap0, &CCEmap1, &CCEmap2); + &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); if (dci_cnt != old_dci_cnt){ old_dci_cnt = dci_cnt; for (int i=0; i Date: Wed, 5 Sep 2018 17:03:19 +0200 Subject: [PATCH 182/379] fix some exit situations, that was badly done by SIGUSR1 handler --- common/config/config_cmdline.c | 1 + common/config/config_userapi.c | 2 +- common/config/config_userapi.h | 2 -- common/utils/ocp_itti/intertask_interface.cpp | 2 +- common/utils/telnetsrv/telnetsrv_proccmd.c | 2 -- openair1/PHY/defs_common.h | 1 - openair1/SIMULATION/LTE_PHY/unitary_defs.h | 6 +++++- openair2/COMMON/platform_types.h | 3 +++ openair2/ENB_APP/flexran_agent_common_internal.c | 2 +- targets/RT/USER/lte-enb.c | 1 - targets/RT/USER/lte-softmodem.c | 8 ++++---- targets/RT/USER/lte-softmodem.h | 1 - targets/RT/USER/lte-uesoftmodem.c | 7 ++++--- 13 files changed, 20 insertions(+), 18 deletions(-) diff --git a/common/config/config_cmdline.c b/common/config/config_cmdline.c index 8b3026c22b..47371ea568 100644 --- a/common/config/config_cmdline.c +++ b/common/config/config_cmdline.c @@ -35,6 +35,7 @@ #include #include #include +#include #include "config_userapi.h" diff --git a/common/config/config_userapi.c b/common/config/config_userapi.c index 3f3651aa01..57a680044b 100644 --- a/common/config/config_userapi.c +++ b/common/config/config_userapi.c @@ -37,8 +37,8 @@ #include #include +#include #include "config_userapi.h" -extern void exit_fun(const char* s); // lte-softmodem clean exit function configmodule_interface_t *config_get_if(void) diff --git a/common/config/config_userapi.h b/common/config/config_userapi.h index 217310db36..25306b8778 100644 --- a/common/config/config_userapi.h +++ b/common/config/config_userapi.h @@ -38,8 +38,6 @@ extern "C" { #endif -/* get rid of "exit_fun undeclared" warning */ -extern void exit_fun(const char* s); #define CONFIG_GETSOURCE ( (config_get_if()==NULL) ? NULL : config_get_if()->cfgmode ) #define CONFIG_GETNUMP ( (config_get_if()==NULL) ? 0 : config_get_if()->num_cfgP ) diff --git a/common/utils/ocp_itti/intertask_interface.cpp b/common/utils/ocp_itti/intertask_interface.cpp index a4b280f86e..7222161a7e 100644 --- a/common/utils/ocp_itti/intertask_interface.cpp +++ b/common/utils/ocp_itti/intertask_interface.cpp @@ -288,7 +288,7 @@ extern "C" { void itti_terminate_tasks(task_id_t task_id) { // Sends Terminate signals to all tasks. itti_send_terminate_message (task_id); - pthread_exit (NULL); + usleep(100*1000); // Allow the tasks to receive the message before going returning to main thread } int itti_init(task_id_t task_max, thread_id_t thread_max, MessagesIds messages_id_max, const task_info_t *tasks_info, diff --git a/common/utils/telnetsrv/telnetsrv_proccmd.c b/common/utils/telnetsrv/telnetsrv_proccmd.c index 519c222114..cd82749057 100644 --- a/common/utils/telnetsrv/telnetsrv_proccmd.c +++ b/common/utils/telnetsrv/telnetsrv_proccmd.c @@ -302,8 +302,6 @@ char sv1[64]; } int proccmd_exit(char *buf, int debug, telnet_printfunc_t prnt) { -extern void exit_fun(const char* s); - if (debug > 0) prnt("process module received %s\n",buf); diff --git a/openair1/PHY/defs_common.h b/openair1/PHY/defs_common.h index d0cc7e9ca4..75e6d3fce3 100644 --- a/openair1/PHY/defs_common.h +++ b/openair1/PHY/defs_common.h @@ -930,7 +930,6 @@ typedef enum { #endif -void exit_fun(const char* s); #include "common/utils/LOG/log_extern.h" extern pthread_cond_t sync_cond; diff --git a/openair1/SIMULATION/LTE_PHY/unitary_defs.h b/openair1/SIMULATION/LTE_PHY/unitary_defs.h index 133656a562..eea8e89fbe 100644 --- a/openair1/SIMULATION/LTE_PHY/unitary_defs.h +++ b/openair1/SIMULATION/LTE_PHY/unitary_defs.h @@ -22,7 +22,11 @@ openair0_device openair0; volatile int oai_exit=0; -void exit_fun(const char *s) { exit(-1); } +void exit_function(const char* file, const char* function, const int line,const char *s) { + const char * msg= s==NULL ? "no comment": s; + printf("Exiting at: %s:%d %s(), %s\n", file, line, function, msg); + exit(-1); +} extern unsigned int dlsch_tbs25[27][25],TBStable[27][110]; extern unsigned char offset_mumimo_llr_drange_fix; diff --git a/openair2/COMMON/platform_types.h b/openair2/COMMON/platform_types.h index 281092c2ca..0f9fc34f83 100644 --- a/openair2/COMMON/platform_types.h +++ b/openair2/COMMON/platform_types.h @@ -285,4 +285,7 @@ typedef struct protocol_ctxt_s { (CTXT_Pp)->rnti #define CHECK_CTXT_ARGS(CTXT_Pp) + +#define exit_fun(msg) exit_function(__FILE__,__FUNCTION__,__LINE__,msg) +void exit_function(const char* file, const char* function, const int line, const char* s); #endif diff --git a/openair2/ENB_APP/flexran_agent_common_internal.c b/openair2/ENB_APP/flexran_agent_common_internal.c index 8874a0f648..e9fc39044d 100644 --- a/openair2/ENB_APP/flexran_agent_common_internal.c +++ b/openair2/ENB_APP/flexran_agent_common_internal.c @@ -68,7 +68,7 @@ void handle_reconfiguration(mid_t mod_id) if (restart_L1L2(mod_id) < 0) { LOG_F(ENB_APP, "can not restart, killing lte-softmodem\n"); - itti_terminate_tasks(TASK_PHY_ENB); + exit_fun("can not restart L1L2, killing lte-softmodem"); return; } diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 594ce2d3c7..57f6f9f569 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -141,7 +141,6 @@ static struct { extern double cpuf; -void exit_fun(const char* s); void init_eNB(int,int); void stop_eNB(int nb_inst); diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index a7f1cfd1c7..3cb9f4f0b8 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -319,13 +319,13 @@ void signal_handler(int sig) { -void exit_fun(const char* s) +void exit_function(const char* file, const char* function, const int line, const char* s) { int ru_id; if (s != NULL) { - printf("%s %s() Exiting OAI softmodem: %s\n",__FILE__, __FUNCTION__, s); + printf("%s:%d %s() Exiting OAI softmodem: %s\n",file,line, function, s); } oai_exit = 1; @@ -345,11 +345,11 @@ void exit_fun(const char* s) } -#if defined(ENABLE_ITTI) sleep(1); //allow lte-softmodem threads to exit first +#if defined(ENABLE_ITTI) itti_terminate_tasks (TASK_UNKNOWN); #endif - + exit(1); } diff --git a/targets/RT/USER/lte-softmodem.h b/targets/RT/USER/lte-softmodem.h index 68f24a1f0c..d8689b9ffb 100644 --- a/targets/RT/USER/lte-softmodem.h +++ b/targets/RT/USER/lte-softmodem.h @@ -240,7 +240,6 @@ extern volatile int start_UE; #include "threads_t.h" extern threads_t threads; -extern void exit_fun(const char* s); // In lte-enb.c extern void init_eNB(int single_thread_flag,int wait_for_sync); extern void stop_eNB(int); diff --git a/targets/RT/USER/lte-uesoftmodem.c b/targets/RT/USER/lte-uesoftmodem.c index 6a1199bf1a..9050340918 100644 --- a/targets/RT/USER/lte-uesoftmodem.c +++ b/targets/RT/USER/lte-uesoftmodem.c @@ -322,13 +322,13 @@ void signal_handler(int sig) { -void exit_fun(const char* s) +void exit_function(const char* file, const char* function, const int line, const char* s) { int CC_id; logClean(); if (s != NULL) { - printf("%s %s() Exiting OAI softmodem: %s\n",__FILE__, __FUNCTION__, s); + printf("%s:%d %s() Exiting OAI softmodem: %s\n",file,line, function, s); } oai_exit = 1; @@ -341,10 +341,11 @@ void exit_fun(const char* s) PHY_vars_UE_g[0][CC_id]->rfdevice.trx_end_func(&PHY_vars_UE_g[0][CC_id]->rfdevice); } -#if defined(ENABLE_ITTI) sleep(1); //allow lte-softmodem threads to exit first +#if defined(ENABLE_ITTI) itti_terminate_tasks (TASK_UNKNOWN); #endif + exit(1); } #ifdef XFORMS From c8eb68d556180221583b397f475e3495475f3b2e Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Thu, 6 Sep 2018 12:21:34 +0200 Subject: [PATCH 183/379] CI: adding email notification w/ HTML reports in attachment Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index 783612c13b..7019d13124 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -395,6 +395,15 @@ pipeline { script { // Stage destroy may not be run if error in previous stage sh "./ci-scripts/destroyAllRunningVM.sh --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + emailext attachmentsPattern: '*results*.html', + body: '''Hi, +Here are attached HTML report files for $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS! + +Regards, +OAI CI Team''', + replyTo: 'no-reply@openairinterface.org', + subject: '$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!', + to: env.gitlabUserEmail } } success { From 1729b3dc660aa96cd775fcc6482cb7ea38a28861 Mon Sep 17 00:00:00 2001 From: Konstantinos Alexandris Date: Thu, 6 Sep 2018 15:49:59 +0200 Subject: [PATCH 184/379] X2AP: init funcs (register/association) + handler/management functions SCTP: one to many sockets implementation --- cmake_targets/CMakeLists.txt | 20 +- openair2/COMMON/sctp_messages_def.h | 18 +- openair2/COMMON/sctp_messages_types.h | 16 +- openair2/ENB_APP/enb_app.c | 61 ++- openair2/X2AP/x2ap_common.h | 2 + openair2/X2AP/x2ap_eNB.c | 419 ++++++++++++++++++ openair2/X2AP/{x2ap.h => x2ap_eNB.h} | 8 +- openair2/X2AP/x2ap_eNB_defs.h | 178 ++++++++ openair2/X2AP/x2ap_eNB_handler.c | 79 ++++ openair2/X2AP/x2ap_eNB_handler.h | 33 ++ .../X2AP/x2ap_eNB_management_procedures.c | 236 ++++++++++ ...2ap.c => x2ap_eNB_management_procedures.h} | 53 +-- openair3/SCTP/sctp_common.c | 6 + openair3/SCTP/sctp_eNB_task.c | 306 ++++++++++++- targets/COMMON/create_tasks.c | 6 + 15 files changed, 1354 insertions(+), 87 deletions(-) create mode 100644 openair2/X2AP/x2ap_eNB.c rename openair2/X2AP/{x2ap.h => x2ap_eNB.h} (82%) create mode 100644 openair2/X2AP/x2ap_eNB_defs.h create mode 100644 openair2/X2AP/x2ap_eNB_handler.c create mode 100644 openair2/X2AP/x2ap_eNB_handler.h create mode 100644 openair2/X2AP/x2ap_eNB_management_procedures.c rename openair2/X2AP/{x2ap.c => x2ap_eNB_management_procedures.h} (52%) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index fdb36a8e1d..da4e3c6fa3 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -474,15 +474,15 @@ add_library(X2AP_LIB include_directories ("${X2AP_C_DIR}") include_directories ("${X2AP_DIR}") -#add_library(X2AP_ENB - # ${X2AP_DIR}/x2ap_eNB.c +add_library(X2AP_ENB + ${X2AP_DIR}/x2ap_eNB.c # ${X2AP_DIR}/x2ap_eNB_decoder.c # ${X2AP_DIR}/x2ap_eNB_encoder.c - # ${X2AP_DIR}/x2ap_eNB_handler.c + ${X2AP_DIR}/x2ap_eNB_handler.c # ${X2AP_DIR}/x2ap_eNB_itti_messaging.c - # ${X2AP_DIR}/x2ap_eNB_management_procedures.c + ${X2AP_DIR}/x2ap_eNB_management_procedures.c # ${X2AP_DIR}/x2ap_eNB_generate_messages.c - # ) + ) # Hardware dependant options ################################### @@ -1947,7 +1947,7 @@ add_executable(lte-softmodem target_link_libraries (lte-softmodem -Wl,--start-group - RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2 + RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -Wl,--end-group z dl) @@ -2023,7 +2023,7 @@ add_executable(lte-uesoftmodem target_link_libraries (lte-uesoftmodem -Wl,--start-group - RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU + RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -Wl,--end-group z dl) @@ -2140,7 +2140,7 @@ add_executable(test_epc_generate_scenario ${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h ) target_link_libraries (test_epc_generate_scenario - -Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} + -Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} ) add_executable(test_epc_play_scenario @@ -2160,7 +2160,7 @@ add_executable(test_epc_play_scenario ) target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c) target_link_libraries (test_epc_play_scenario - -Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY_COMMON PHY PHY_UE LFDS ${ITTI_LIB} ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} + -Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB X2AP_ENB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY_COMMON PHY PHY_UE LFDS ${ITTI_LIB} ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} ) @@ -2196,7 +2196,7 @@ if (${T_TRACER}) dlsim_tm4 dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim ulsim #all "add_library" definitions - ITTI RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB + ITTI RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB oai_exmimodevif oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif oai_eth_transpro FLPT_MSG ASYNC_IF FLEXRAN_AGENT HASHTABLE MSC UTIL OMG_SUMO SECU_OSA diff --git a/openair2/COMMON/sctp_messages_def.h b/openair2/COMMON/sctp_messages_def.h index d4248b7bc3..4975f14d76 100644 --- a/openair2/COMMON/sctp_messages_def.h +++ b/openair2/COMMON/sctp_messages_def.h @@ -19,11 +19,13 @@ * contact@openairinterface.org */ -MESSAGE_DEF(SCTP_NEW_ASSOCIATION_REQ , MESSAGE_PRIORITY_MED, sctp_new_association_req_t , sctp_new_association_req) -MESSAGE_DEF(SCTP_NEW_ASSOCIATION_RESP, MESSAGE_PRIORITY_MED, sctp_new_association_resp_t , sctp_new_association_resp) -MESSAGE_DEF(SCTP_NEW_ASSOCIATION_IND , MESSAGE_PRIORITY_MED, sctp_new_association_ind_t , sctp_new_association_ind) -MESSAGE_DEF(SCTP_REGISTER_UPPER_LAYER, MESSAGE_PRIORITY_MED, sctp_listener_register_upper_layer_t, sctp_listener_register_upper_layer) -MESSAGE_DEF(SCTP_DATA_REQ, MESSAGE_PRIORITY_MED, sctp_data_req_t , sctp_data_req) -MESSAGE_DEF(SCTP_DATA_IND, MESSAGE_PRIORITY_MED, sctp_data_ind_t , sctp_data_ind) -MESSAGE_DEF(SCTP_INIT_MSG, MESSAGE_PRIORITY_MED, sctp_init_t , sctp_init) -MESSAGE_DEF(SCTP_CLOSE_ASSOCIATION, MESSAGE_PRIORITY_MAX, sctp_close_association_t , sctp_close_association) +MESSAGE_DEF(SCTP_NEW_ASSOCIATION_REQ , MESSAGE_PRIORITY_MED, sctp_new_association_req_t , sctp_new_association_req) +MESSAGE_DEF(SCTP_NEW_ASSOCIATION_REQ_MULTI, MESSAGE_PRIORITY_MED, sctp_new_association_req_t , sctp_new_association_req_multi) +MESSAGE_DEF(SCTP_NEW_ASSOCIATION_RESP, MESSAGE_PRIORITY_MED, sctp_new_association_resp_t , sctp_new_association_resp) +MESSAGE_DEF(SCTP_NEW_ASSOCIATION_IND , MESSAGE_PRIORITY_MED, sctp_new_association_ind_t , sctp_new_association_ind) +MESSAGE_DEF(SCTP_REGISTER_UPPER_LAYER, MESSAGE_PRIORITY_MED, sctp_listener_register_upper_layer_t, sctp_listener_register_upper_layer) +MESSAGE_DEF(SCTP_DATA_REQ, MESSAGE_PRIORITY_MED, sctp_data_req_t , sctp_data_req) +MESSAGE_DEF(SCTP_DATA_IND, MESSAGE_PRIORITY_MED, sctp_data_ind_t , sctp_data_ind) +MESSAGE_DEF(SCTP_INIT_MSG, MESSAGE_PRIORITY_MED, sctp_init_t , sctp_init) +MESSAGE_DEF(SCTP_INIT_MSG_MULTI, MESSAGE_PRIORITY_MED, sctp_init_t , sctp_init_multi) +MESSAGE_DEF(SCTP_CLOSE_ASSOCIATION, MESSAGE_PRIORITY_MAX, sctp_close_association_t , sctp_close_association) diff --git a/openair2/COMMON/sctp_messages_types.h b/openair2/COMMON/sctp_messages_types.h index 184e951acb..90081c02aa 100644 --- a/openair2/COMMON/sctp_messages_types.h +++ b/openair2/COMMON/sctp_messages_types.h @@ -22,13 +22,15 @@ #ifndef SCTP_MESSAGES_TYPES_H_ #define SCTP_MESSAGES_TYPES_H_ -#define SCTP_NEW_ASSOCIATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_req -#define SCTP_NEW_ASSOCIATION_RESP(mSGpTR)(mSGpTR)->ittiMsg.sctp_new_association_resp -#define SCTP_NEW_ASSOCIATION_IND(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_ind -#define SCTP_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.sctp_data_ind -#define SCTP_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.sctp_data_req -#define SCTP_INIT_MSG(mSGpTR) (mSGpTR)->ittiMsg.sctp_init -#define SCTP_CLOSE_ASSOCIATION(mSGpTR) (mSGpTR)->ittiMsg.sctp_close_association +#define SCTP_NEW_ASSOCIATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_req +#define SCTP_NEW_ASSOCIATION_REQ_MULTI(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_req_multi +#define SCTP_NEW_ASSOCIATION_RESP(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_resp +#define SCTP_NEW_ASSOCIATION_IND(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_ind +#define SCTP_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.sctp_data_ind +#define SCTP_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.sctp_data_req +#define SCTP_INIT_MSG(mSGpTR) (mSGpTR)->ittiMsg.sctp_init +#define SCTP_INIT_MSG_MULTI(mSGpTR) (mSGpTR)->ittiMsg.sctp_init_multi +#define SCTP_CLOSE_ASSOCIATION(mSGpTR) (mSGpTR)->ittiMsg.sctp_close_association enum sctp_state_e { SCTP_STATE_CLOSED, diff --git a/openair2/ENB_APP/enb_app.c b/openair2/ENB_APP/enb_app.c index 2857c5e3d4..2791af6c06 100644 --- a/openair2/ENB_APP/enb_app.c +++ b/openair2/ENB_APP/enb_app.c @@ -46,7 +46,7 @@ # include "gtpv1u_eNB_task.h" # endif -//# include "x2ap_eNB.h" +# include "x2ap_eNB.h" # include "x2ap_messages_types.h" # define X2AP_ENB_REGISTER_RETRY_DELAY 10 @@ -154,7 +154,7 @@ static uint32_t eNB_app_register_x2(uint32_t enb_id_start, uint32_t enb_id_end) RCconfig_X2(msg_p, enb_id); - //itti_send_msg_to_task (TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p); + itti_send_msg_to_task (TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p); register_enb_x2_pending++; } @@ -176,8 +176,8 @@ void *eNB_app_task(void *args_p) long enb_register_retry_timer_id; # endif uint32_t x2_register_enb_pending; - //uint32_t x2_registered_enb; - //long x2_enb_register_retry_timer_id; + uint32_t x2_registered_enb; + long x2_enb_register_retry_timer_id; uint32_t enb_id; MessageDef *msg_p = NULL; instance_t instance; @@ -224,7 +224,7 @@ void *eNB_app_task(void *args_p) # endif /* Try to register each eNB with each other */ - // x2_registered_enb = 0; + x2_registered_enb = 0; x2_register_enb_pending = eNB_app_register_x2 (enb_id_start, enb_id_end); do { @@ -301,8 +301,59 @@ void *eNB_app_task(void *args_p) register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p); } + if (TIMER_HAS_EXPIRED (msg_p).timer_id == x2_enb_register_retry_timer_id) { + /* Restart the registration process */ + x2_registered_enb = 0; + x2_register_enb_pending = eNB_app_register_x2 (enb_id_start, enb_id_end); + } + break; # endif + case X2AP_DEREGISTERED_ENB_IND: + LOG_W(ENB_APP, "[eNB %d] Received %s: associated eNB %d\n", instance, ITTI_MSG_NAME (msg_p), + X2AP_DEREGISTERED_ENB_IND(msg_p).nb_x2); + + /* TODO handle recovering of registration */ + break; + + case X2AP_REGISTER_ENB_CNF: + LOG_I(ENB_APP, "[eNB %d] Received %s: associated eNB %d\n", instance, ITTI_MSG_NAME (msg_p), + X2AP_REGISTER_ENB_CNF(msg_p).nb_x2); + + DevAssert(x2_register_enb_pending > 0); + x2_register_enb_pending--; + + /* Check if at least eNB is registered with one target eNB */ + if (X2AP_REGISTER_ENB_CNF(msg_p).nb_x2 > 0) { + x2_registered_enb++; + } + + /* Check if all register eNB requests have been processed */ + if (x2_register_enb_pending == 0) { + if (x2_registered_enb == enb_nb) { + /* If all eNB are registered, start RRC HO task */ + + }else { + uint32_t x2_not_associated = enb_nb - x2_registered_enb; + + LOG_W(ENB_APP, " %d eNB %s not associated with the target\n", + x2_not_associated, x2_not_associated > 1 ? "are" : "is"); + // timer to retry + /* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */ + if (timer_setup (X2AP_ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP, + INSTANCE_DEFAULT, TIMER_ONE_SHOT, NULL, + &x2_enb_register_retry_timer_id) < 0) { + LOG_E(ENB_APP, " Can not start eNB X2AP register: retry timer, use \"sleep\" instead!\n"); + + sleep(X2AP_ENB_REGISTER_RETRY_DELAY); + /* Restart the registration process */ + x2_registered_enb = 0; + x2_register_enb_pending = eNB_app_register_x2 (enb_id_start, enb_id_end); + } + } + } + + break; default: LOG_E(ENB_APP, "Received unexpected message %s\n", ITTI_MSG_NAME (msg_p)); diff --git a/openair2/X2AP/x2ap_common.h b/openair2/X2AP/x2ap_common.h index 1a4889f0f0..a2e269dcaa 100644 --- a/openair2/X2AP/x2ap_common.h +++ b/openair2/X2AP/x2ap_common.h @@ -62,10 +62,12 @@ extern int asn1_xer_print; #if defined(ENB_MODE) # include "log.h" +# define X2AP_INFO(x, args...) LOG_I(X2AP, x, ##args) # define X2AP_ERROR(x, args...) LOG_E(X2AP, x, ##args) # define X2AP_WARN(x, args...) LOG_W(X2AP, x, ##args) # define X2AP_DEBUG(x, args...) LOG_D(X2AP, x, ##args) #else +# define X2AP_INFO(x, args...) do { fprintf(stdout, "[X2AP][I]"x, ##args); } while(0) # define X2AP_ERROR(x, args...) do { fprintf(stdout, "[X2AP][E]"x, ##args); } while(0) # define X2AP_WARN(x, args...) do { fprintf(stdout, "[X2AP][W]"x, ##args); } while(0) # define X2AP_DEBUG(x, args...) do { fprintf(stdout, "[X2AP][D]"x, ##args); } while(0) diff --git a/openair2/X2AP/x2ap_eNB.c b/openair2/X2AP/x2ap_eNB.c new file mode 100644 index 0000000000..016fa1f419 --- /dev/null +++ b/openair2/X2AP/x2ap_eNB.c @@ -0,0 +1,419 @@ +/* + * 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.1 (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 + */ + +#include +#include +#include +#include +#include + +#include "intertask_interface.h" + +#include "x2ap_eNB.h" +#include "x2ap_eNB_defs.h" +#include "x2ap_eNB_management_procedures.h" +#include "x2ap_eNB_handler.h" +#include "x2ap_common.h" + +#include "queue.h" +#include "assertions.h" +#include "conversions.h" + +struct x2ap_enb_map; +struct x2ap_eNB_data_s; + +RB_PROTOTYPE(x2ap_enb_map, x2ap_eNB_data_s, entry, x2ap_eNB_compare_assoc_id); + +//static +//void x2ap_eNB_handle_sctp_data_ind(instance_t instance, + // sctp_data_ind_t *sctp_data_ind); +static +void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp); + +static +void x2ap_eNB_handle_sctp_association_ind(instance_t instance, sctp_new_association_ind_t *sctp_new_association_ind); + +static +void x2ap_eNB_handle_register_eNB(instance_t instance, + x2ap_register_enb_req_t *x2ap_register_eNB); +static +void x2ap_eNB_register_eNB(x2ap_eNB_instance_t *instance_p, + net_ip_address_t *target_eNB_ip_addr, + net_ip_address_t *local_ip_addr, + uint16_t in_streams, + uint16_t out_streams, + uint32_t enb_port_for_X2C); + +static +void x2ap_eNB_handle_sctp_association_resp(instance_t instance, + sctp_new_association_resp_t *sctp_new_association_resp); + +/* +static +void x2ap_eNB_handle_sctp_data_ind(instance_t instance, + sctp_data_ind_t *sctp_data_ind) { + + int result; + + DevAssert(sctp_data_ind != NULL); + + x2ap_eNB_handle_message(sctp_data_ind->assoc_id, sctp_data_ind->stream, + sctp_data_ind->buffer, sctp_data_ind->buffer_length); + + result = itti_free(TASK_UNKNOWN, sctp_data_ind->buffer); + AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); + +}*/ + +static +void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp) +{ + x2ap_eNB_instance_t *instance_p; + x2ap_eNB_data_t *x2ap_enb_data_p; + + DevAssert(sctp_new_association_resp != NULL); + +printf("x2ap_eNB_handle_sctp_association_resp at 1\n"); +dump_trees(); + + instance_p = x2ap_eNB_get_instance(instance); + DevAssert(instance_p != NULL); + + /* if the assoc_id is already known, it is certainly because an IND was received + * before. In this case, just update streams and return + */ + if (sctp_new_association_resp->assoc_id != -1) { + x2ap_enb_data_p = x2ap_get_eNB(instance_p, sctp_new_association_resp->assoc_id, + sctp_new_association_resp->ulp_cnx_id); + if (x2ap_enb_data_p != NULL) { + /* some sanity check - to be refined at some point */ + if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) { + X2AP_ERROR("x2ap_enb_data_p not NULL and sctp state not SCTP_STATE_ESTABLISHED, what to do?\n"); + abort(); + } + x2ap_enb_data_p->in_streams = sctp_new_association_resp->in_streams; + x2ap_enb_data_p->out_streams = sctp_new_association_resp->out_streams; + return; + } + } + + x2ap_enb_data_p = x2ap_get_eNB(instance_p, -1, + sctp_new_association_resp->ulp_cnx_id); + DevAssert(x2ap_enb_data_p != NULL); + +printf("x2ap_eNB_handle_sctp_association_resp at 2\n"); +dump_trees(); + + if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) { + X2AP_WARN("Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u\n", + sctp_new_association_resp->sctp_state, + instance, + sctp_new_association_resp->ulp_cnx_id); + + x2ap_handle_x2_setup_message(x2ap_enb_data_p, + sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN); + + return; + } + +printf("x2ap_eNB_handle_sctp_association_resp at 3\n"); +dump_trees(); + + /* Update parameters */ + x2ap_enb_data_p->assoc_id = sctp_new_association_resp->assoc_id; + x2ap_enb_data_p->in_streams = sctp_new_association_resp->in_streams; + x2ap_enb_data_p->out_streams = sctp_new_association_resp->out_streams; + +printf("x2ap_eNB_handle_sctp_association_resp at 4\n"); +dump_trees(); + + /* Prepare new x2 Setup Request */ + //x2ap_eNB_generate_x2_setup_request(instance_p, x2ap_enb_data_p); +} + +static +void x2ap_eNB_handle_sctp_association_ind(instance_t instance, sctp_new_association_ind_t *sctp_new_association_ind) +{ + x2ap_eNB_instance_t *instance_p; + x2ap_eNB_data_t *x2ap_enb_data_p; + +printf("x2ap_eNB_handle_sctp_association_ind at 1 (called for instance %d)\n", instance); +dump_trees(); + DevAssert(sctp_new_association_ind != NULL); + + instance_p = x2ap_eNB_get_instance(instance); + DevAssert(instance_p != NULL); + + x2ap_enb_data_p = x2ap_get_eNB(instance_p, sctp_new_association_ind->assoc_id, -1); + if (x2ap_enb_data_p != NULL) abort(); +// DevAssert(x2ap_enb_data_p != NULL); + if (x2ap_enb_data_p == NULL) { + /* Create new eNB descriptor */ + x2ap_enb_data_p = calloc(1, sizeof(*x2ap_enb_data_p)); + DevAssert(x2ap_enb_data_p != NULL); + + x2ap_enb_data_p->cnx_id = x2ap_eNB_fetch_add_global_cnx_id(); + + x2ap_enb_data_p->x2ap_eNB_instance = instance_p; + + /* Insert the new descriptor in list of known eNB + * but not yet associated. + */ + RB_INSERT(x2ap_enb_map, &instance_p->x2ap_enb_head, x2ap_enb_data_p); + x2ap_enb_data_p->state = X2AP_ENB_STATE_CONNECTED; + instance_p->x2_target_enb_nb++; + if (instance_p->x2_target_enb_pending_nb > 0) { + instance_p->x2_target_enb_pending_nb--; + } + } else { + X2AP_WARN("x2ap_enb_data_p already exists\n"); + } + +printf("x2ap_eNB_handle_sctp_association_ind at 2\n"); +dump_trees(); + /* Update parameters */ + x2ap_enb_data_p->assoc_id = sctp_new_association_ind->assoc_id; + x2ap_enb_data_p->in_streams = sctp_new_association_ind->in_streams; + x2ap_enb_data_p->out_streams = sctp_new_association_ind->out_streams; + +printf("x2ap_eNB_handle_sctp_association_ind at 3\n"); +dump_trees(); +} + +int x2ap_eNB_init_sctp (x2ap_eNB_instance_t *instance_p, + net_ip_address_t *local_ip_addr, + uint32_t enb_port_for_X2C) +{ + // Create and alloc new message + MessageDef *message; + sctp_init_t *sctp_init = NULL; + + DevAssert(instance_p != NULL); + DevAssert(local_ip_addr != NULL); + + message = itti_alloc_new_message (TASK_X2AP, SCTP_INIT_MSG_MULTI); + sctp_init = &message->ittiMsg.sctp_init_multi; + + sctp_init->port = enb_port_for_X2C; + sctp_init->ppid = X2AP_SCTP_PPID; + sctp_init->ipv4 = 1; + sctp_init->ipv6 = 0; + sctp_init->nb_ipv4_addr = 1; + +#if 0 + memcpy(&sctp_init->ipv4_address, + local_ip_addr, + sizeof(*local_ip_addr)); +#endif + sctp_init->ipv4_address[0] = inet_addr(local_ip_addr->ipv4_address); + /* + * SR WARNING: ipv6 multi-homing fails sometimes for localhost. + * * * * Disable it for now. + */ + sctp_init->nb_ipv6_addr = 0; + sctp_init->ipv6_address[0] = "0:0:0:0:0:0:0:1"; + + return itti_send_msg_to_task (TASK_SCTP, instance_p->instance, message); + +} + +static void x2ap_eNB_register_eNB(x2ap_eNB_instance_t *instance_p, + net_ip_address_t *target_eNB_ip_address, + net_ip_address_t *local_ip_addr, + uint16_t in_streams, + uint16_t out_streams, + uint32_t enb_port_for_X2C) +{ + + MessageDef *message = NULL; + sctp_new_association_req_t *sctp_new_association_req = NULL; + x2ap_eNB_data_t *x2ap_enb_data = NULL; + + DevAssert(instance_p != NULL); + DevAssert(target_eNB_ip_address != NULL); + + message = itti_alloc_new_message(TASK_X2AP, SCTP_NEW_ASSOCIATION_REQ_MULTI); + + sctp_new_association_req = &message->ittiMsg.sctp_new_association_req_multi; + + sctp_new_association_req->port = enb_port_for_X2C; + sctp_new_association_req->ppid = X2AP_SCTP_PPID; + + sctp_new_association_req->in_streams = in_streams; + sctp_new_association_req->out_streams = out_streams; + + memcpy(&sctp_new_association_req->remote_address, + target_eNB_ip_address, + sizeof(*target_eNB_ip_address)); + + memcpy(&sctp_new_association_req->local_address, + local_ip_addr, + sizeof(*local_ip_addr)); + + /* Create new eNB descriptor */ + x2ap_enb_data = calloc(1, sizeof(*x2ap_enb_data)); + DevAssert(x2ap_enb_data != NULL); + + x2ap_enb_data->cnx_id = x2ap_eNB_fetch_add_global_cnx_id(); + sctp_new_association_req->ulp_cnx_id = x2ap_enb_data->cnx_id; + + x2ap_enb_data->assoc_id = -1; + x2ap_enb_data->x2ap_eNB_instance = instance_p; + + /* Insert the new descriptor in list of known eNB + * but not yet associated. + */ + RB_INSERT(x2ap_enb_map, &instance_p->x2ap_enb_head, x2ap_enb_data); + x2ap_enb_data->state = X2AP_ENB_STATE_WAITING; + instance_p->x2_target_enb_nb ++; + instance_p->x2_target_enb_pending_nb ++; + + itti_send_msg_to_task(TASK_SCTP, instance_p->instance, message); +} + +static +void x2ap_eNB_handle_register_eNB(instance_t instance, + x2ap_register_enb_req_t *x2ap_register_eNB) +{ + + x2ap_eNB_instance_t *new_instance; + uint8_t index; + + DevAssert(x2ap_register_eNB != NULL); + + /* Look if the provided instance already exists */ + new_instance = x2ap_eNB_get_instance(instance); + + if (new_instance != NULL) { + /* Checks if it is a retry on the same eNB */ + DevCheck(new_instance->eNB_id == x2ap_register_eNB->eNB_id, new_instance->eNB_id, x2ap_register_eNB->eNB_id, 0); + DevCheck(new_instance->cell_type == x2ap_register_eNB->cell_type, new_instance->cell_type, x2ap_register_eNB->cell_type, 0); + DevCheck(new_instance->tac == x2ap_register_eNB->tac, new_instance->tac, x2ap_register_eNB->tac, 0); + DevCheck(new_instance->mcc == x2ap_register_eNB->mcc, new_instance->mcc, x2ap_register_eNB->mcc, 0); + DevCheck(new_instance->mnc == x2ap_register_eNB->mnc, new_instance->mnc, x2ap_register_eNB->mnc, 0); + + } + else { + new_instance = calloc(1, sizeof(x2ap_eNB_instance_t)); + DevAssert(new_instance != NULL); + + RB_INIT(&new_instance->x2ap_enb_head); + + /* Copy usefull parameters */ + new_instance->instance = instance; + new_instance->eNB_name = x2ap_register_eNB->eNB_name; + new_instance->eNB_id = x2ap_register_eNB->eNB_id; + new_instance->cell_type = x2ap_register_eNB->cell_type; + new_instance->tac = x2ap_register_eNB->tac; + new_instance->mcc = x2ap_register_eNB->mcc; + new_instance->mnc = x2ap_register_eNB->mnc; + new_instance->mnc_digit_length = x2ap_register_eNB->mnc_digit_length; + + /* Add the new instance to the list of eNB (meaningfull in virtual mode) */ + x2ap_eNB_insert_new_instance(new_instance); + + X2AP_INFO("Registered new eNB[%d] and %s eNB id %u\n", + instance, + x2ap_register_eNB->cell_type == CELL_MACRO_ENB ? "macro" : "home", + x2ap_register_eNB->eNB_id); + /* initiate the SCTP listener */ + if (x2ap_eNB_init_sctp(new_instance,&x2ap_register_eNB->enb_x2_ip_address,x2ap_register_eNB->enb_port_for_X2C) < 0 ) { + X2AP_ERROR ("Error while sending SCTP_INIT_MSG to SCTP \n"); + return; + } + X2AP_INFO("eNB[%d] eNB id %u acting as a listner (server)\n", + instance, x2ap_register_eNB->eNB_id); + } + + DevCheck(x2ap_register_eNB->nb_x2 <= X2AP_MAX_NB_ENB_IP_ADDRESS, + X2AP_MAX_NB_ENB_IP_ADDRESS, x2ap_register_eNB->nb_x2, 0); + + /* Trying to connect to the provided list of eNB ip address */ + + for (index = 0; index < x2ap_register_eNB->nb_x2; index++) { + + X2AP_INFO("eNB[%d] eNB id %u acting as an initiator (client)\n", + instance, x2ap_register_eNB->eNB_id); + x2ap_eNB_register_eNB(new_instance, + &x2ap_register_eNB->target_enb_x2_ip_address[index], + &x2ap_register_eNB->enb_x2_ip_address, + x2ap_register_eNB->sctp_in_streams, + x2ap_register_eNB->sctp_out_streams, + x2ap_register_eNB->enb_port_for_X2C); + } + +} + +void *x2ap_task(void *arg) +{ + MessageDef *received_msg = NULL; + int result; + + X2AP_DEBUG("Starting X2AP layer\n"); + + x2ap_eNB_prepare_internal_data(); + + itti_mark_task_ready(TASK_X2AP); + + while (1) { + itti_receive_msg(TASK_X2AP, &received_msg); + switch (ITTI_MSG_ID(received_msg)) { + case TERMINATE_MESSAGE: + X2AP_WARN(" *** Exiting X2AP thread\n"); + itti_exit_task(); + break; + + case X2AP_REGISTER_ENB_REQ: + x2ap_eNB_handle_register_eNB(ITTI_MESSAGE_GET_INSTANCE(received_msg), + &X2AP_REGISTER_ENB_REQ(received_msg)); + break; + + case SCTP_NEW_ASSOCIATION_RESP: + x2ap_eNB_handle_sctp_association_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg), + &received_msg->ittiMsg.sctp_new_association_resp); + break; + + case SCTP_NEW_ASSOCIATION_IND: + x2ap_eNB_handle_sctp_association_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg), + &received_msg->ittiMsg.sctp_new_association_ind); + break; + + case SCTP_DATA_IND: + //x2ap_eNB_handle_sctp_data_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg), + // &received_msg->ittiMsg.sctp_data_ind); + break; + + default: + X2AP_ERROR("Received unhandled message: %d:%s\n", + ITTI_MSG_ID(received_msg), ITTI_MSG_NAME(received_msg)); + break; + } + + result = itti_free (ITTI_MSG_ORIGIN_ID(received_msg), received_msg); + AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); + + received_msg = NULL; + } + + return NULL; +} + + diff --git a/openair2/X2AP/x2ap.h b/openair2/X2AP/x2ap_eNB.h similarity index 82% rename from openair2/X2AP/x2ap.h rename to openair2/X2AP/x2ap_eNB.h index 89e8540b97..1a19416122 100644 --- a/openair2/X2AP/x2ap.h +++ b/openair2/X2AP/x2ap_eNB.h @@ -30,10 +30,12 @@ #ifndef X2AP_H_ #define X2AP_H_ -typedef struct x2ap_config_s { -} x2ap_config_t; +#define X2AP_SCTP_PPID (27) ///< X2AP SCTP Payload Protocol Identifier (PPID) +#include "x2ap_eNB_defs.h" -extern x2ap_config_t x2ap_config; +int x2ap_eNB_init_sctp (x2ap_eNB_instance_t *instance_p, + net_ip_address_t *local_ip_addr, + uint32_t enb_port_for_X2C); void *x2ap_task(void *arg); diff --git a/openair2/X2AP/x2ap_eNB_defs.h b/openair2/X2AP/x2ap_eNB_defs.h new file mode 100644 index 0000000000..7869b497c3 --- /dev/null +++ b/openair2/X2AP/x2ap_eNB_defs.h @@ -0,0 +1,178 @@ +/* + * 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.1 (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 + */ + +#include + +#include "queue.h" +#include "tree.h" + +#include "sctp_eNB_defs.h" + +#ifndef X2AP_ENB_DEFS_H_ +#define X2AP_ENB_DEFS_H_ + +#define X2AP_ENB_NAME_LENGTH_MAX (150) + +typedef enum { + /* Disconnected state: initial state for any association. */ + X2AP_ENB_STATE_DISCONNECTED = 0x0, + + /* State waiting for x2 Setup response message if the target eNB accepts or + * X2 Setup failure if rejects the eNB. + */ + X2AP_ENB_STATE_WAITING = 0x1, + + /* The eNB is successfully connected to another eNB. */ + X2AP_ENB_STATE_CONNECTED = 0x2, + + /* X2AP is ready, and the eNB is successfully connected to another eNB. */ + X2AP_ENB_STATE_READY = 0x3, + + X2AP_ENB_STATE_OVERLOAD = 0x4, + + X2AP_ENB_STATE_RESETTING = 0x5, + + /* Max number of states available */ + X2AP_ENB_STATE_MAX, +} x2ap_eNB_state_t; + + +/* Served PLMN identity element */ +struct plmn_identity_s { + uint16_t mcc; + uint16_t mnc; + uint8_t mnc_digit_length; + STAILQ_ENTRY(plmn_identity_s) next; +}; + +/* Served group id element */ +struct served_group_id_s { + uint16_t enb_group_id; + STAILQ_ENTRY(served_group_id_s) next; +}; + +/* Served enn code for a particular eNB */ +struct enb_code_s { + uint8_t enb_code; + STAILQ_ENTRY(enb_code_s) next; +}; + +struct x2ap_eNB_instance_s; + +/* This structure describes association of a eNB to another eNB */ +typedef struct x2ap_eNB_data_s { + /* eNB descriptors tree, ordered by sctp assoc id */ + RB_ENTRY(x2ap_eNB_data_s) entry; + + /* This is the optional name provided by the MME */ + char *eNB_name; + + /* target eNB ID */ + uint32_t eNB_id; + + /* Current eNB load information (if any). */ + //x2ap_load_state_t overload_state; + + /* Current eNB->eNB X2AP association state */ + x2ap_eNB_state_t state; + + /* Next usable stream for UE signalling */ + int32_t nextstream; + + /* Number of input/ouput streams */ + uint16_t in_streams; + uint16_t out_streams; + + /* Connexion id used between SCTP/X2AP */ + uint16_t cnx_id; + + /* SCTP association id */ + int32_t assoc_id; + + /* Only meaningfull in virtual mode */ + struct x2ap_eNB_instance_s *x2ap_eNB_instance; +} x2ap_eNB_data_t; + +typedef struct x2ap_eNB_instance_s { + /* used in simulation to store multiple eNB instances*/ + STAILQ_ENTRY(x2ap_eNB_instance_s) x2ap_eNB_entries; + + /* Number of target eNBs requested by eNB (tree size) */ + uint32_t x2_target_enb_nb; + /* Number of target eNBs for which association is pending */ + uint32_t x2_target_enb_pending_nb; + /* Number of target eNB successfully associated to eNB */ + uint32_t x2_target_enb_associated_nb; + /* Tree of X2AP eNB associations ordered by association ID */ + RB_HEAD(x2ap_enb_map, x2ap_eNB_data_s) x2ap_enb_head; + + /* Tree of UE ordered by eNB_ue_x2ap_id's */ + // RB_HEAD(x2ap_ue_map, x2ap_eNB_ue_context_s) x2ap_ue_head; + + /* For virtual mode, mod_id as defined in the rest of the L1/L2 stack */ + instance_t instance; + + /* Displayable name of eNB */ + char *eNB_name; + + /* Unique eNB_id to identify the eNB within EPC. + * In our case the eNB is a macro eNB so the id will be 20 bits long. + * For Home eNB id, this field should be 28 bits long. + */ + uint32_t eNB_id; + /* The type of the cell */ + cell_type_t cell_type; + + /* Tracking area code */ + uint16_t tac; + + /* Mobile Country Code + * Mobile Network Code + */ + uint16_t mcc; + uint16_t mnc; + uint8_t mnc_digit_length; + + +} x2ap_eNB_instance_t; + +typedef struct { + /* List of served eNBs + * Only used for virtual mode + */ + STAILQ_HEAD(x2ap_eNB_instances_head_s, x2ap_eNB_instance_s) x2ap_eNB_instances_head; + /* Nb of registered eNBs */ + uint8_t nb_registered_eNBs; + + /* Generate a unique connexion id used between X2AP and SCTP */ + uint16_t global_cnx_id; +} x2ap_eNB_internal_data_t; + +int x2ap_eNB_compare_assoc_id(struct x2ap_eNB_data_s *p1, struct x2ap_eNB_data_s *p2); + +/* Generate the tree management functions */ +struct x2ap_eNB_map; +struct x2ap_eNB_data_s; +RB_PROTOTYPE(x2ap_eNB_map, x2ap_eNB_data_s, entry, x2ap_eNB_compare_assoc_id); + + +#endif /* X2AP_ENB_DEFS_H_ */ + diff --git a/openair2/X2AP/x2ap_eNB_handler.c b/openair2/X2AP/x2ap_eNB_handler.c new file mode 100644 index 0000000000..180535baa6 --- /dev/null +++ b/openair2/X2AP/x2ap_eNB_handler.c @@ -0,0 +1,79 @@ +/* + * 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.1 (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 + */ +#include + +#include "intertask_interface.h" + +#include "asn1_conversions.h" + +#include "x2ap_common.h" +#include "x2ap_eNB_defs.h" +#include "x2ap_eNB_handler.h" + +#include "x2ap_eNB_management_procedures.h" + +#include "assertions.h" +#include "conversions.h" + +void x2ap_handle_x2_setup_message(x2ap_eNB_data_t *enb_desc_p, int sctp_shutdown) +{ + if (sctp_shutdown) { + /* A previously connected eNB has been shutdown */ + + /* TODO check if it was used by some eNB and send a message to inform these eNB if there is no more associated eNB */ + if (enb_desc_p->state == X2AP_ENB_STATE_CONNECTED) { + enb_desc_p->state = X2AP_ENB_STATE_DISCONNECTED; + + if (enb_desc_p->x2ap_eNB_instance-> x2_target_enb_associated_nb > 0) { + /* Decrease associated eNB number */ + enb_desc_p->x2ap_eNB_instance-> x2_target_enb_associated_nb --; + } + + /* If there are no more associated eNB, inform eNB app */ + if (enb_desc_p->x2ap_eNB_instance->x2_target_enb_associated_nb == 0) { + MessageDef *message_p; + + message_p = itti_alloc_new_message(TASK_X2AP, X2AP_DEREGISTERED_ENB_IND); + X2AP_DEREGISTERED_ENB_IND(message_p).nb_x2 = 0; + itti_send_msg_to_task(TASK_ENB_APP, enb_desc_p->x2ap_eNB_instance->instance, message_p); + } + } + } else { + /* Check that at least one setup message is pending */ + DevCheck(enb_desc_p->x2ap_eNB_instance->x2_target_enb_pending_nb > 0, + enb_desc_p->x2ap_eNB_instance->instance, + enb_desc_p->x2ap_eNB_instance->x2_target_enb_pending_nb, 0); + + if (enb_desc_p->x2ap_eNB_instance->x2_target_enb_pending_nb > 0) { + /* Decrease pending messages number */ + enb_desc_p->x2ap_eNB_instance->x2_target_enb_pending_nb --; + } + + /* If there are no more pending messages, inform eNB app */ + if (enb_desc_p->x2ap_eNB_instance->x2_target_enb_pending_nb == 0) { + MessageDef *message_p; + + message_p = itti_alloc_new_message(TASK_X2AP, X2AP_REGISTER_ENB_CNF); + X2AP_REGISTER_ENB_CNF(message_p).nb_x2 = enb_desc_p->x2ap_eNB_instance->x2_target_enb_associated_nb; + itti_send_msg_to_task(TASK_ENB_APP, enb_desc_p->x2ap_eNB_instance->instance, message_p); + } + } +} diff --git a/openair2/X2AP/x2ap_eNB_handler.h b/openair2/X2AP/x2ap_eNB_handler.h new file mode 100644 index 0000000000..6d65c25a0a --- /dev/null +++ b/openair2/X2AP/x2ap_eNB_handler.h @@ -0,0 +1,33 @@ +/* + * 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.1 (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 + */ + +#ifndef X2AP_ENB_HANDLERS_H_ +#define X2AP_ENB_HANDLERS_H_ + +#include "x2ap_eNB_defs.h" + +void x2ap_handle_x2_setup_message(x2ap_eNB_data_t *mme_desc_p, int sctp_shutdown); + +//int x2ap_eNB_handle_message(uint32_t assoc_id, int32_t stream, + // const uint8_t * const data, const uint32_t data_length); + +#endif /* X2AP_ENB_HANDLERS_H_ */ + diff --git a/openair2/X2AP/x2ap_eNB_management_procedures.c b/openair2/X2AP/x2ap_eNB_management_procedures.c new file mode 100644 index 0000000000..c2b128ffd3 --- /dev/null +++ b/openair2/X2AP/x2ap_eNB_management_procedures.c @@ -0,0 +1,236 @@ +/* + * 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.1 (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 + */ + +#include +#include +#include + +#include "intertask_interface.h" + +#include "assertions.h" +#include "conversions.h" + +#include "x2ap_common.h" +#include "x2ap_eNB_defs.h" +#include "x2ap_eNB.h" + + +#define X2AP_DEBUG_LIST +#ifdef X2AP_DEBUG_LIST +# define X2AP_eNB_LIST_OUT(x, args...) X2AP_DEBUG("[eNB]%*s"x"\n", 4*indent, "", ##args) +#else +# define X2AP_eNB_LIST_OUT(x, args...) +#endif + +static int indent = 0; + + +x2ap_eNB_internal_data_t x2ap_eNB_internal_data; + +RB_GENERATE(x2ap_enb_map, x2ap_eNB_data_s, entry, x2ap_eNB_compare_assoc_id); + +int x2ap_eNB_compare_assoc_id( + struct x2ap_eNB_data_s *p1, struct x2ap_eNB_data_s *p2) +{ + if (p1->assoc_id == -1) { + if (p1->cnx_id < p2->cnx_id) { + return -1; + } + + if (p1->cnx_id > p2->cnx_id) { + return 1; + } + } else { + if (p1->assoc_id < p2->assoc_id) { + return -1; + } + + if (p1->assoc_id > p2->assoc_id) { + return 1; + } + } + + /* Matching reference */ + return 0; +} + +uint16_t x2ap_eNB_fetch_add_global_cnx_id(void) +{ + return ++x2ap_eNB_internal_data.global_cnx_id; +} + +void x2ap_eNB_prepare_internal_data(void) +{ + memset(&x2ap_eNB_internal_data, 0, sizeof(x2ap_eNB_internal_data)); + STAILQ_INIT(&x2ap_eNB_internal_data.x2ap_eNB_instances_head); +} + +void x2ap_eNB_insert_new_instance(x2ap_eNB_instance_t *new_instance_p) +{ + DevAssert(new_instance_p != NULL); + + STAILQ_INSERT_TAIL(&x2ap_eNB_internal_data.x2ap_eNB_instances_head, + new_instance_p, x2ap_eNB_entries); +} + +void dump_tree(x2ap_eNB_data_t *t) +{ + if (t == NULL) return; + printf("-----------------------\n"); + printf("eNB id %d %s\n", t->eNB_id, t->eNB_name); + printf("state %d\n", t->state); + printf("nextstream %d\n", t->nextstream); + printf("in_streams %d out_streams %d\n", t->in_streams, t->out_streams); + printf("cnx_id %d assoc_id %d\n", t->cnx_id, t->assoc_id); + dump_tree(t->entry.rbe_left); + dump_tree(t->entry.rbe_right); +} + +void dump_trees(void) +{ +x2ap_eNB_instance_t *zz; +STAILQ_FOREACH(zz, &x2ap_eNB_internal_data.x2ap_eNB_instances_head, + x2ap_eNB_entries) { +printf("here comes the tree (instance %d):\n---------------------------------------------\n", zz->instance); +dump_tree(zz->x2ap_enb_head.rbh_root); +printf("---------------------------------------------\n"); +} +} + +struct x2ap_eNB_data_s *x2ap_get_eNB(x2ap_eNB_instance_t *instance_p, + int32_t assoc_id, + uint16_t cnx_id) +{ + struct x2ap_eNB_data_s temp; + struct x2ap_eNB_data_s *found; + +printf("x2ap_get_eNB at 1 (looking for assoc_id %d cnx_id %d)\n", assoc_id, cnx_id); +dump_trees(); + + memset(&temp, 0, sizeof(struct x2ap_eNB_data_s)); + + temp.assoc_id = assoc_id; + temp.cnx_id = cnx_id; + + if (instance_p == NULL) { + STAILQ_FOREACH(instance_p, &x2ap_eNB_internal_data.x2ap_eNB_instances_head, + x2ap_eNB_entries) { + found = RB_FIND(x2ap_enb_map, &instance_p->x2ap_enb_head, &temp); + + if (found != NULL) { + return found; + } + } + } else { + return RB_FIND(x2ap_enb_map, &instance_p->x2ap_enb_head, &temp); + } + + return NULL; +} + + +x2ap_eNB_instance_t *x2ap_eNB_get_instance(instance_t instance) +{ + x2ap_eNB_instance_t *temp = NULL; + + STAILQ_FOREACH(temp, &x2ap_eNB_internal_data.x2ap_eNB_instances_head, + x2ap_eNB_entries) { + if (temp->instance == instance) { + /* Matching occurence */ + return temp; + } + } + + return NULL; +} + + +/// utility functions + +void x2ap_dump_eNB (x2ap_eNB_data_t * eNB_ref); + +void +x2ap_dump_eNB_list (void) { + x2ap_eNB_instance_t *inst = NULL; + struct x2ap_eNB_data_s *found = NULL; + struct x2ap_eNB_data_s temp; + + memset(&temp, 0, sizeof(struct x2ap_eNB_data_s)); + + STAILQ_FOREACH (inst, &x2ap_eNB_internal_data.x2ap_eNB_instances_head, x2ap_eNB_entries) { + found = RB_FIND(x2ap_enb_map, &inst->x2ap_enb_head, &temp); + x2ap_dump_eNB (found); + } +} + +void x2ap_dump_eNB (x2ap_eNB_data_t * eNB_ref) { + + if (eNB_ref == NULL) { + return; + } + + X2AP_eNB_LIST_OUT (""); + X2AP_eNB_LIST_OUT ("eNB name: %s", eNB_ref->eNB_name == NULL ? "not present" : eNB_ref->eNB_name); + X2AP_eNB_LIST_OUT ("eNB STATE: %07x", eNB_ref->state); + X2AP_eNB_LIST_OUT ("eNB ID: %07x", eNB_ref->eNB_id); + indent++; + X2AP_eNB_LIST_OUT ("SCTP cnx id: %d", eNB_ref->cnx_id); + X2AP_eNB_LIST_OUT ("SCTP assoc id: %d", eNB_ref->assoc_id); + X2AP_eNB_LIST_OUT ("SCTP instreams: %d", eNB_ref->in_streams); + X2AP_eNB_LIST_OUT ("SCTP outstreams: %d", eNB_ref->out_streams); + indent--; +} + + +x2ap_eNB_data_t * x2ap_is_eNB_id_in_list (const uint32_t eNB_id) +{ + x2ap_eNB_instance_t *inst; + struct x2ap_eNB_data_s *elm; + + STAILQ_FOREACH(inst, &x2ap_eNB_internal_data.x2ap_eNB_instances_head, x2ap_eNB_entries) { + RB_FOREACH(elm, x2ap_enb_map, &inst->x2ap_enb_head) { + if (elm->eNB_id == eNB_id) + return elm; + } + } + return NULL; +} + +x2ap_eNB_data_t * x2ap_is_eNB_assoc_id_in_list (const uint32_t sctp_assoc_id) +{ + x2ap_eNB_instance_t *inst; + struct x2ap_eNB_data_s *found; + struct x2ap_eNB_data_s temp; + + temp.assoc_id = sctp_assoc_id; + temp.cnx_id = -1; + + STAILQ_FOREACH(inst, &x2ap_eNB_internal_data.x2ap_eNB_instances_head, x2ap_eNB_entries) { + found = RB_FIND(x2ap_enb_map, &inst->x2ap_enb_head, &temp); + if (found != NULL){ + if (found->assoc_id == sctp_assoc_id) { + return found; + } + } + } + return NULL; +} + diff --git a/openair2/X2AP/x2ap.c b/openair2/X2AP/x2ap_eNB_management_procedures.h similarity index 52% rename from openair2/X2AP/x2ap.c rename to openair2/X2AP/x2ap_eNB_management_procedures.h index 8002867e15..b66a6d1035 100644 --- a/openair2/X2AP/x2ap.c +++ b/openair2/X2AP/x2ap_eNB_management_procedures.h @@ -19,53 +19,28 @@ * contact@openairinterface.org */ -#include -#include -#include -#include +#ifndef X2AP_ENB_MANAGEMENT_PROCEDURES_H_ +#define X2AP_ENB_MANAGEMENT_PROCEDURES_H +void x2ap_eNB_prepare_internal_data(void); -#include "intertask_interface.h" +void dump_trees(void); -#include "x2ap.h" +void x2ap_eNB_insert_new_instance(x2ap_eNB_instance_t *new_instance_p); -#include "assertions.h" -#include "conversions.h" +x2ap_eNB_instance_t *x2ap_eNB_get_instance(uint8_t mod_id); +uint16_t x2ap_eNB_fetch_add_global_cnx_id(void); -void *x2ap_task(void *arg) -{ - MessageDef *received_msg = NULL; - int result; +void x2ap_eNB_prepare_internal_data(void); - X2AP_DEBUG("Starting X2AP layer\n"); +x2ap_eNB_data_t* x2ap_is_eNB_id_in_list(uint32_t eNB_id); - x2ap_prepare_internal_data(); +x2ap_eNB_data_t* x2ap_is_eNB_assoc_id_in_list(uint32_t sctp_assoc_id); - itti_mark_task_ready(TASK_X2AP); - - while (1) { - itti_receive_msg(TASK_X2AP, &received_msg); - - switch (ITTI_MSG_ID(received_msg)) { - case TERMINATE_MESSAGE: - X2AP_WARN(" *** Exiting X2AP thread\n"); - itti_exit_task(); - break; - - default: - X2AP_ERROR("Received unhandled message: %d:%s\n", - ITTI_MSG_ID(received_msg), ITTI_MSG_NAME(received_msg)); - break; - } - - result = itti_free (ITTI_MSG_ORIGIN_ID(received_msg), received_msg); - AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); - - received_msg = NULL; - } - - return NULL; -} +struct x2ap_eNB_data_s *x2ap_get_eNB(x2ap_eNB_instance_t *instance_p, + int32_t assoc_id, + uint16_t cnx_id); +#endif /* X2AP_ENB_MANAGEMENT_PROCEDURES_H_ */ diff --git a/openair3/SCTP/sctp_common.c b/openair3/SCTP/sctp_common.c index c467290b36..55a2943924 100644 --- a/openair3/SCTP/sctp_common.c +++ b/openair3/SCTP/sctp_common.c @@ -86,6 +86,12 @@ int sctp_get_sockinfo(int sock, uint16_t *instream, uint16_t *outstream, memset(&status, 0, sizeof(struct sctp_status)); i = sizeof(struct sctp_status); + /* if sock refers to a multi SCTP endpoint, *assoc_id gives us + * the association ID that we want + */ + if (assoc_id != NULL) + status.sstat_assoc_id = *assoc_id; + if (getsockopt(sock, IPPROTO_SCTP, SCTP_STATUS, &status, &i) < 0) { SCTP_ERROR("Getsockopt SCTP_STATUS failed: %s\n", strerror(errno)); return -1; diff --git a/openair3/SCTP/sctp_eNB_task.c b/openair3/SCTP/sctp_eNB_task.c index 168eb58b37..998ea9589c 100644 --- a/openair3/SCTP/sctp_eNB_task.c +++ b/openair3/SCTP/sctp_eNB_task.c @@ -61,6 +61,7 @@ enum sctp_connection_type_e { SCTP_TYPE_CLIENT, SCTP_TYPE_SERVER, + SCTP_TYPE_MULTI_SERVER, SCTP_TYPE_MAX }; @@ -91,7 +92,6 @@ typedef struct sctp_cnx_list_elm_s { static STAILQ_HEAD(sctp_cnx_list_head, sctp_cnx_list_elm_s) sctp_cnx_list; static uint16_t sctp_nb_cnx = 0; - //------------------------------------------------------------------------------ struct sctp_cnx_list_elm_s *sctp_get_cnx(int32_t assoc_id, int sd) { @@ -112,6 +112,238 @@ struct sctp_cnx_list_elm_s *sctp_get_cnx(int32_t assoc_id, int sd) return NULL; } +//------------------------------------------------------------------------------ +static inline +void +sctp_eNB_accept_associations_multi( + struct sctp_cnx_list_elm_s *sctp_cnx) +{ + int ns; + int n; + int flags = 0; + socklen_t from_len; + struct sctp_sndrcvinfo sinfo; + + struct sockaddr_in addr; + uint8_t buffer[SCTP_RECV_BUFFER_SIZE]; + + DevAssert(sctp_cnx != NULL); + + memset((void *)&addr, 0, sizeof(struct sockaddr_in)); + from_len = (socklen_t)sizeof(struct sockaddr_in); + memset((void *)&sinfo, 0, sizeof(struct sctp_sndrcvinfo)); + + n = sctp_recvmsg(sctp_cnx->sd, (void *)buffer, SCTP_RECV_BUFFER_SIZE, + (struct sockaddr *)&addr, &from_len, + &sinfo, &flags); + + if (n < 0) { + if (errno == ENOTCONN) { + SCTP_DEBUG("Received not connected for sd %d\n", sctp_cnx->sd); + close(sctp_cnx->sd); + } else { + SCTP_DEBUG("An error occured during read\n"); + SCTP_ERROR("sctp_recvmsg (fd %d, len %d ): %s:%d\n", sctp_cnx->sd, n, strerror(errno), errno); + } + return; + } + + if (flags & MSG_NOTIFICATION) { + union sctp_notification *snp; + snp = (union sctp_notification *)buffer; + + SCTP_DEBUG("Received notification for sd %d, type %u\n", + sctp_cnx->sd, snp->sn_header.sn_type); + + /* Association has changed. */ + if (SCTP_ASSOC_CHANGE == snp->sn_header.sn_type) { + struct sctp_assoc_change *sctp_assoc_changed; + sctp_assoc_changed = &snp->sn_assoc_change; + + SCTP_DEBUG("Client association changed: %d\n", sctp_assoc_changed->sac_state); + + /* New physical association requested by a peer */ + switch (sctp_assoc_changed->sac_state) { + case SCTP_COMM_UP: { + SCTP_DEBUG("Comm up notified for sd %d, assigned assoc_id %d\n", + sctp_cnx->sd, sctp_assoc_changed->sac_assoc_id); + struct sctp_cnx_list_elm_s *new_cnx; + + new_cnx = calloc(1, sizeof(*sctp_cnx)); + + DevAssert(new_cnx != NULL); + + new_cnx->connection_type = SCTP_TYPE_CLIENT; + + ns = sctp_peeloff(sctp_cnx->sd, sctp_assoc_changed->sac_assoc_id); + + new_cnx->sd = ns; + new_cnx->task_id = sctp_cnx->task_id; + new_cnx->cnx_id = 0; + new_cnx->ppid = sctp_cnx->ppid; + new_cnx->instance = sctp_cnx->instance; + new_cnx->local_port = sctp_cnx->local_port; + new_cnx->assoc_id = sctp_assoc_changed->sac_assoc_id; + + if (sctp_get_sockinfo(ns, &new_cnx->in_streams, &new_cnx->out_streams, + &new_cnx->assoc_id) != 0) { + SCTP_ERROR("sctp_get_sockinfo failed\n"); + close(ns); + free(new_cnx); + return; + } + + /* Insert new element at end of list */ + STAILQ_INSERT_TAIL(&sctp_cnx_list, new_cnx, entries); + sctp_nb_cnx++; + + /* Add the socket to list of fd monitored by ITTI */ + itti_subscribe_event_fd(TASK_SCTP, ns); + + sctp_itti_send_association_ind(new_cnx->task_id, new_cnx->instance, + new_cnx->assoc_id, new_cnx->local_port, + new_cnx->out_streams, new_cnx->in_streams); + } + break; + + default: + break; + } + } + } else { + SCTP_DEBUG("No notification from SCTP\n"); + } +} + +//------------------------------------------------------------------------------ +void +sctp_handle_new_association_req_multi( + const instance_t instance, + const task_id_t requestor, + const sctp_new_association_req_t * const sctp_new_association_req_p, + int sd) +{ + int ns; + + int32_t assoc_id = 0; + + struct sctp_cnx_list_elm_s *sctp_cnx = NULL; + enum sctp_connection_type_e connection_type = SCTP_TYPE_CLIENT; + + /* Prepare a new SCTP association as requested by upper layer and try to connect + * to remote host. + */ + DevAssert(sctp_new_association_req_p != NULL); + + /* Create new socket with IPv6 affinity */ +//#warning "SCTP may Force IPv4 only, here" + + /* Mark the socket as non-blocking */ + //if (fcntl(sd, F_SETFL, O_NONBLOCK) < 0) { + //SCTP_ERROR("fcntl F_SETFL O_NONBLOCK failed: %s\n", + // strerror(errno)); + //close(sd); + //return; + //} + + /* SOCK_STREAM socket type requires an explicit connect to the remote host + * address and port. + * Only use IPv4 for the first connection attempt + */ + if ((sctp_new_association_req_p->remote_address.ipv6 != 0) || + (sctp_new_association_req_p->remote_address.ipv4 != 0)) { + uint8_t address_index = 0; + uint8_t used_address = sctp_new_association_req_p->remote_address.ipv6 + + sctp_new_association_req_p->remote_address.ipv4; + struct sockaddr_in addr[used_address]; + + memset(addr, 0, used_address * sizeof(struct sockaddr_in)); + + if (sctp_new_association_req_p->remote_address.ipv6 == 1) { + if (inet_pton(AF_INET6, sctp_new_association_req_p->remote_address.ipv6_address, + &addr[address_index].sin_addr.s_addr) != 1) { + SCTP_ERROR("Failed to convert ipv6 address %*s to network type\n", + (int)strlen(sctp_new_association_req_p->remote_address.ipv6_address), + sctp_new_association_req_p->remote_address.ipv6_address); + close(sd); + return; + } + + SCTP_DEBUG("Converted ipv6 address %*s to network type\n", + (int)strlen(sctp_new_association_req_p->remote_address.ipv6_address), + sctp_new_association_req_p->remote_address.ipv6_address); + + addr[address_index].sin_family = AF_INET6; + addr[address_index].sin_port = htons(sctp_new_association_req_p->port); + address_index++; + } + + if (sctp_new_association_req_p->remote_address.ipv4 == 1) { + if (inet_pton(AF_INET, sctp_new_association_req_p->remote_address.ipv4_address, + &addr[address_index].sin_addr.s_addr) != 1) { + SCTP_ERROR("Failed to convert ipv4 address %*s to network type\n", + (int)strlen(sctp_new_association_req_p->remote_address.ipv4_address), + sctp_new_association_req_p->remote_address.ipv4_address); + close(sd); + return; + } + + SCTP_DEBUG("Converted ipv4 address %*s to network type\n", + (int)strlen(sctp_new_association_req_p->remote_address.ipv4_address), + sctp_new_association_req_p->remote_address.ipv4_address); + + addr[address_index].sin_family = AF_INET; + addr[address_index].sin_port = htons(sctp_new_association_req_p->port); + address_index++; + } + + /* Connect to remote host and port */ + if (sctp_connectx(sd, (struct sockaddr *)addr, 1, &assoc_id) < 0) { + /* sctp_connectx on non-blocking socket return EINPROGRESS */ + if (errno != EINPROGRESS) { + SCTP_ERROR("Connect failed: %s\n", strerror(errno)); + sctp_itti_send_association_resp( + requestor, instance, -1, sctp_new_association_req_p->ulp_cnx_id, + SCTP_STATE_UNREACHABLE, 0, 0); + /* Add the socket to list of fd monitored by ITTI */ + //itti_unsubscribe_event_fd(TASK_SCTP, sd); + close(sd); + return; + } else { + SCTP_DEBUG("connectx assoc_id %d in progress..., used %d addresses\n", + assoc_id, used_address); + } + } else { + SCTP_DEBUG("sctp_connectx SUCCESS, used %d addresses assoc_id %d\n", + used_address, + assoc_id); + } + } + + ns = sctp_peeloff(sd,assoc_id); + + sctp_cnx = calloc(1, sizeof(*sctp_cnx)); + + sctp_cnx->connection_type = connection_type; + + sctp_cnx->sd = ns; + sctp_cnx->task_id = requestor; + sctp_cnx->cnx_id = sctp_new_association_req_p->ulp_cnx_id; + sctp_cnx->ppid = sctp_new_association_req_p->ppid; + sctp_cnx->instance = instance; + sctp_cnx->assoc_id = assoc_id; + + /* Add the socket to list of fd monitored by ITTI */ + itti_subscribe_event_fd(TASK_SCTP, ns); + + /* Insert new element at end of list */ + STAILQ_INSERT_TAIL(&sctp_cnx_list, sctp_cnx, entries); + sctp_nb_cnx++; + + SCTP_DEBUG("Inserted new descriptor for sd %d in list, nb elements %u, assoc_id %d\n", + ns, sctp_nb_cnx, assoc_id); +} + //------------------------------------------------------------------------------ void sctp_handle_new_association_req( @@ -441,7 +673,8 @@ static int sctp_close_association( static int sctp_create_new_listener( const instance_t instance, const task_id_t requestor, - sctp_init_t *init_p) + sctp_init_t *init_p, + int server_type) { struct sctp_event_subscribe event; struct sockaddr *addr = NULL; @@ -501,9 +734,17 @@ static int sctp_create_new_listener( } } - if ((sd = socket(AF_INET6, SOCK_STREAM, IPPROTO_SCTP)) < 0) { - SCTP_ERROR("socket: %s:%d\n", strerror(errno), errno); - return -1; + if (server_type) { + if ((sd = socket(PF_INET, SOCK_SEQPACKET, IPPROTO_SCTP)) < 0) { + SCTP_ERROR("socket: %s:%d\n", strerror(errno), errno); + return -1; + } + } + else { + if ((sd = socket(AF_INET6, SOCK_STREAM, IPPROTO_SCTP)) < 0) { + SCTP_ERROR("socket: %s:%d\n", strerror(errno), errno); + return -1; + } } memset((void *)&event, 1, sizeof(struct sctp_event_subscribe)); @@ -516,7 +757,13 @@ static int sctp_create_new_listener( sctp_cnx = calloc(1, sizeof(*sctp_cnx)); - sctp_cnx->connection_type = SCTP_TYPE_SERVER; + if (server_type) { + sctp_cnx->connection_type = SCTP_TYPE_MULTI_SERVER; + } + else { + sctp_cnx->connection_type = SCTP_TYPE_SERVER; + } + sctp_cnx->sd = sd; sctp_cnx->local_port = init_p->port; sctp_cnx->in_streams = 32; @@ -729,6 +976,7 @@ sctp_eNB_read_from_socket( break; default: + SCTP_WARN("unhandled: SCTP_ASSOC_CHANGE to %d\n", sctp_assoc_changed->sac_state); break; } } @@ -777,7 +1025,11 @@ sctp_eNB_flush_sockets( if (sctp_cnx->connection_type == SCTP_TYPE_CLIENT) { sctp_eNB_read_from_socket(sctp_cnx); - } else { + } + else if (sctp_cnx->connection_type == SCTP_TYPE_MULTI_SERVER) { + sctp_eNB_accept_associations_multi(sctp_cnx); + } + else { sctp_eNB_accept_associations(sctp_cnx); } } @@ -791,6 +1043,7 @@ void *sctp_eNB_task(void *arg) struct epoll_event *events; MessageDef *received_msg = NULL; int result; + int multi_sd = -1; SCTP_DEBUG("Starting SCTP layer\n"); @@ -812,13 +1065,43 @@ void *sctp_eNB_task(void *arg) if (sctp_create_new_listener( ITTI_MESSAGE_GET_INSTANCE(received_msg), ITTI_MSG_ORIGIN_ID(received_msg), - &received_msg->ittiMsg.sctp_init) < 0) { + &received_msg->ittiMsg.sctp_init,0) < 0) { /* SCTP socket creation or bind failed... */ SCTP_ERROR("Failed to create new SCTP listener\n"); } } break; + case SCTP_INIT_MSG_MULTI: { + SCTP_DEBUG("Received SCTP_INIT_MSG_MULTI\n"); + + multi_sd = sctp_create_new_listener( + ITTI_MESSAGE_GET_INSTANCE(received_msg), + ITTI_MSG_ORIGIN_ID(received_msg), + &received_msg->ittiMsg.sctp_init_multi,1); + /* We received a new connection request */ + if (multi_sd < 0) { + /* SCTP socket creation or bind failed... */ + SCTP_ERROR("Failed to create new SCTP listener\n"); + } + } + break; + + case SCTP_NEW_ASSOCIATION_REQ: { + sctp_handle_new_association_req(ITTI_MESSAGE_GET_INSTANCE(received_msg), + ITTI_MSG_ORIGIN_ID(received_msg), + &received_msg->ittiMsg.sctp_new_association_req); + } + break; + + case SCTP_NEW_ASSOCIATION_REQ_MULTI: { + sctp_handle_new_association_req_multi(ITTI_MESSAGE_GET_INSTANCE(received_msg), + ITTI_MSG_ORIGIN_ID(received_msg), + &received_msg->ittiMsg.sctp_new_association_req_multi, + multi_sd); + } + break; + case SCTP_CLOSE_ASSOCIATION: sctp_close_association(ITTI_MESSAGE_GET_INSTANCE(received_msg), ITTI_MSG_ORIGIN_ID(received_msg), @@ -830,13 +1113,6 @@ void *sctp_eNB_task(void *arg) itti_exit_task(); break; - case SCTP_NEW_ASSOCIATION_REQ: { - sctp_handle_new_association_req(ITTI_MESSAGE_GET_INSTANCE(received_msg), - ITTI_MSG_ORIGIN_ID(received_msg), - &received_msg->ittiMsg.sctp_new_association_req); - } - break; - case SCTP_DATA_REQ: { sctp_send_data(ITTI_MESSAGE_GET_INSTANCE(received_msg), ITTI_MSG_ORIGIN_ID(received_msg), diff --git a/targets/COMMON/create_tasks.c b/targets/COMMON/create_tasks.c index 391e448deb..1870575b85 100644 --- a/targets/COMMON/create_tasks.c +++ b/targets/COMMON/create_tasks.c @@ -27,6 +27,7 @@ # ifdef OPENAIR2 # if defined(ENABLE_USE_MME) # include "sctp_eNB_task.h" +# include "x2ap_eNB.h" # include "s1ap_eNB.h" # include "nas_ue_task.h" # include "udp_eNB_task.h" @@ -62,6 +63,11 @@ int create_tasks(uint32_t enb_nb) # if defined(ENABLE_USE_MME) if (enb_nb > 0) { + if (itti_create_task (TASK_X2AP, x2ap_task, NULL) < 0) { + LOG_E(X2AP, "Create task for X2AP failed\n"); + return -1; + } + if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) { LOG_E(SCTP, "Create task for SCTP failed\n"); return -1; From 136ca508c5d54d7d2b118714fda0772e09916a6b Mon Sep 17 00:00:00 2001 From: hongzhi wang Date: Thu, 6 Sep 2018 16:04:21 +0200 Subject: [PATCH 185/379] nr ue clean warnings --- openair1/PHY/INIT/nr_init_ue.c | 5 +- openair1/PHY/INIT/phy_init.h | 2 + .../PHY/NR_UE_TRANSPORT/nr_initial_sync.c | 30 +- openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c | 8 +- .../NR_UE_TRANSPORT/nr_transport_proto_ue.h | 14 +- targets/RT/USER/nr-ue.c | 8 +- targets/RT/USER/nr-uesoftmodem.c | 265 ++++++++---------- 7 files changed, 153 insertions(+), 179 deletions(-) diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c index d102b1f8f9..29869e615b 100644 --- a/openair1/PHY/INIT/nr_init_ue.c +++ b/openair1/PHY/INIT/nr_init_ue.c @@ -34,6 +34,9 @@ #include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" #include "PHY/LTE_REFSIG/lte_refsig.h" #include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h" +#include "PHY/INIT/phy_init.h" +#include "PHY/NR_REFSIG/pss_nr.h" +#include "openair1/PHY/NR_REFSIG/ul_ref_seq_nr.h" //uint8_t dmrs1_tab_ue[8] = {0,2,3,4,6,8,9,10}; @@ -658,8 +661,8 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, printf("Initializing UE vars (abstraction %"PRIu8") for eNB TXant %"PRIu8", UE RXant %"PRIu8"\n",abstraction_flag,fp->nb_antennas_tx,fp->nb_antennas_rx); //LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_eNB_INST); + nr_init_frame_parms_ue(&ue->frame_parms); phy_init_nr_top(ue); - //nr_init_frame_parms_ue(&ue->frame_parms); // many memory allocation sizes are hard coded AssertFatal( fp->nb_antennas_rx <= 2, "hard coded allocation for ue_common_vars->dl_ch_estimates[eNB_id]" ); diff --git a/openair1/PHY/INIT/phy_init.h b/openair1/PHY/INIT/phy_init.h index 49aabc0d58..f35f9855f2 100644 --- a/openair1/PHY/INIT/phy_init.h +++ b/openair1/PHY/INIT/phy_init.h @@ -56,6 +56,8 @@ int l1_north_init_eNB(void); */ int phy_init_top(LTE_DL_FRAME_PARMS *frame_parms); +void phy_init_nr_top(PHY_VARS_NR_UE *ue); + /*! \brief Allocate and Initialize the PHY variables relevant to the LTE ue signal buffers. diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c index 05d4e3fc08..e5ac340cce 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c @@ -32,11 +32,11 @@ #include "PHY/types.h" #include "PHY/defs_nr_UE.h" #include "PHY/phy_extern_nr_ue.h" +#include "PHY/INIT/phy_init.h" +#include "PHY/MODULATION/modulation_UE.h" +#include "nr_transport_proto_ue.h" //#include "SCHED/defs.h" //#include "SCHED/extern.h" -//#include "defs.h" -//#include "extern.h" - #include "common_lib.h" @@ -45,20 +45,16 @@ #include "PHY/NR_REFSIG/refsig_defs_ue.h" extern openair0_config_t openair0_cfg[]; -static nfapi_nr_config_request_t config_t; -static nfapi_nr_config_request_t* config =&config_t; +//static nfapi_nr_config_request_t config_t; +//static nfapi_nr_config_request_t* config =&config_t; int cnt=0; -/* forward declarations */ -void set_default_frame_parms_single(nfapi_nr_config_request_t *config, NR_DL_FRAME_PARMS *frame_parms); //#define DEBUG_INITIAL_SYNCH int nr_pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode) { printf("nr pbch detec RB_DL %d\n", ue->frame_parms.N_RB_DL); - uint8_t l,pbch_decoded,frame_mod4,pbch_tx_ant,dummy; NR_DL_FRAME_PARMS *frame_parms=&ue->frame_parms; - char phich_resource[6]; int ret =-1; #ifdef DEBUG_INITIAL_SYNCH @@ -98,23 +94,15 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode) frame_parms->nb_prefix_samples0 = nb_prefix_samples0; - pbch_decoded = 0; - printf("pbch_detection nid_cell %d\n",frame_parms->Nid_cell); - //for (frame_mod4=0; frame_mod4<4; frame_mod4++) { ret = nr_rx_pbch(ue, &ue->proc.proc_rxtx[0], ue->pbch_vars[0], frame_parms, 0, SISO, - ue->high_speed_flag, - frame_mod4); - - pbch_decoded = 0; //to be updated -// break; - //} + ue->high_speed_flag); if (ret==0) { @@ -176,7 +164,6 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode) // First try FDD normal prefix frame_parms->Ncp=NORMAL; frame_parms->frame_type=TDD; - set_default_frame_parms_single(config,frame_parms); nr_init_frame_parms_ue(frame_parms); printf("nr_initial sync ue RB_DL %d\n", ue->frame_parms.N_RB_DL); /* @@ -198,7 +185,7 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode) */ cnt++; if (cnt >100){ - cnt =0; + cnt =0; /* process pss search on received buffer */ sync_pos = pss_synchro_nr(ue, NO_RATE_CHANGE); @@ -233,8 +220,7 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode) rx_sss_nr(ue,&metric_fdd_ncp,&phase_fdd_ncp); - //set_default_frame_parms_single(config,&ue->frame_parms); - nr_init_frame_parms_ue(config,&ue->frame_parms); + nr_init_frame_parms_ue(&ue->frame_parms); nr_gold_pbch(ue); ret = nr_pbch_detection(ue,mode); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c index 8c9166b1b3..6ce7718199 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c @@ -34,6 +34,7 @@ #include "PHY/phy_extern_nr_ue.h" #include "PHY/sse_intrin.h" #include "SIMULATION/TOOLS/sim.h" +#include "PHY/LTE_REFSIG/lte_refsig.h" //#define DEBUG_PBCH 1 //#define DEBUG_PBCH_ENCODING @@ -508,8 +509,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, NR_DL_FRAME_PARMS *frame_parms, uint8_t eNB_id, MIMO_mode_t mimo_mode, - uint32_t high_speed_flag, - uint8_t frame_mod4) + uint32_t high_speed_flag) { NR_UE_COMMON *nr_ue_common_vars = &ue->common_vars; @@ -535,13 +535,13 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, unsigned short idx_demod =0; int8_t decoderState=0; uint8_t decoderListSize = 8, pathMetricAppr = 0; - double aPrioriArray[frame_parms->pbch_polar_params.payloadBits]; // assume no a priori knowledge available about the payload. + //double aPrioriArray[frame_parms->pbch_polar_params.payloadBits]; // assume no a priori knowledge available about the payload. memset(&pbch_a[0], 0, sizeof(uint8_t) * NR_POLAR_PBCH_PAYLOAD_BITS); //printf("nr_pbch_ue nid_cell %d\n",frame_parms->Nid_cell); - for (int i=0; ipbch_polar_params.payloadBits; i++) aPrioriArray[i] = NAN; + //for (int i=0; ipbch_polar_params.payloadBits; i++) aPrioriArray[i] = NAN; int subframe_rx = proc->subframe_rx; diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h index c5a947269a..954099410f 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h @@ -1072,13 +1072,13 @@ int rx_sss(PHY_VARS_NR_UE *phy_vars_ue,int32_t *tot_metric,uint8_t *flip_max,uin /*! \brief receiver for the PBCH \returns number of tx antennas or -1 if error */ -uint16_t rx_pbch(NR_UE_COMMON *lte_ue_common_vars, - NR_UE_PBCH *lte_ue_pbch_vars, - NR_DL_FRAME_PARMS *frame_parms, - uint8_t eNB_id, - MIMO_mode_t mimo_mode, - uint32_t high_speed_flag, - uint8_t frame_mod4); +int nr_rx_pbch( PHY_VARS_NR_UE *ue, + UE_nr_rxtx_proc_t *proc, + NR_UE_PBCH *nr_ue_pbch_vars, + NR_DL_FRAME_PARMS *frame_parms, + uint8_t eNB_id, + MIMO_mode_t mimo_mode, + uint32_t high_speed_flag); uint16_t rx_pbch_emul(PHY_VARS_NR_UE *phy_vars_ue, uint8_t eNB_id, diff --git a/targets/RT/USER/nr-ue.c b/targets/RT/USER/nr-ue.c index bfd6088e92..fc8d44a236 100644 --- a/targets/RT/USER/nr-ue.c +++ b/targets/RT/USER/nr-ue.c @@ -283,9 +283,10 @@ void init_UE(int nb_inst) NR_UE_MAC_INST_t *mac_inst; for (inst=0; inst < nb_inst; inst++) { // UE->rfdevice.type = NONE_DEV; - PHY_VARS_NR_UE *UE = PHY_vars_UE_g[inst][0]; + //PHY_VARS_NR_UE *UE = PHY_vars_UE_g[inst][0]; LOG_I(PHY,"Initializing memory for UE instance %d (%p)\n",inst,PHY_vars_UE_g[inst]); PHY_vars_UE_g[inst][0] = init_nr_ue_vars(NULL,inst,0); + PHY_VARS_NR_UE *UE = PHY_vars_UE_g[inst][0]; AssertFatal((UE->if_inst = nr_ue_if_module_init(inst)) != NULL, "can not initial IF module\n"); nr_l3_init_ue(); @@ -295,6 +296,11 @@ void init_UE(int nb_inst) mac_inst->if_module = UE->if_inst; UE->if_inst->scheduled_response = nr_ue_scheduled_response; UE->if_inst->phy_config_request = nr_ue_phy_config_request; + + LOG_I(PHY,"Intializing UE Threads for instance %d (%p,%p)...\n",inst,PHY_vars_UE_g[inst],PHY_vars_UE_g[inst][0]); + //init_UE_threads(inst); + //UE = PHY_vars_UE_g[inst][0]; + AssertFatal(0 == pthread_create(&UE->proc.pthread_ue, &UE->proc.attr_ue, diff --git a/targets/RT/USER/nr-uesoftmodem.c b/targets/RT/USER/nr-uesoftmodem.c index 149ec92ec3..635fe524e3 100644 --- a/targets/RT/USER/nr-uesoftmodem.c +++ b/targets/RT/USER/nr-uesoftmodem.c @@ -196,7 +196,7 @@ extern PHY_VARS_NR_UE* init_nr_ue_vars(NR_DL_FRAME_PARMS *frame_parms, int transmission_mode=1; int numerology = 0; - +/* int16_t glog_level = LOG_INFO; int16_t glog_verbosity = LOG_MED; int16_t hw_log_level = LOG_INFO; @@ -213,6 +213,7 @@ int16_t rrc_log_level = LOG_INFO; int16_t rrc_log_verbosity = LOG_MED; int16_t opt_log_level = LOG_INFO; int16_t opt_log_verbosity = LOG_MED; +*/ # if defined(ENABLE_USE_MME) int16_t gtpu_log_level = LOG_DEBUG; @@ -543,78 +544,125 @@ void *l2l1_task(void *arg) { extern int16_t dlsch_demod_shift; -static void get_options (int argc, char **argv) { - int CC_id; - int tddflag, nonbiotflag; - char *loopfile=NULL; - int dumpframe; - uint32_t online_log_messages; - uint32_t glog_level, glog_verbosity; - uint32_t start_telnetsrv; - nfapi_nr_config_request_t *config[MAX_NUM_CCs]; +static void get_options(void) { + int CC_id; + int tddflag, nonbiotflag; + char *loopfile=NULL; + int dumpframe; + uint32_t online_log_messages; + uint32_t glog_level, glog_verbosity; + uint32_t start_telnetsrv; - paramdef_t cmdline_params[] =CMDLINE_PARAMS_DESC ; - paramdef_t cmdline_logparams[] =CMDLINE_LOGPARAMS_DESC ; + paramdef_t cmdline_params[] =CMDLINE_PARAMS_DESC ; + paramdef_t cmdline_logparams[] =CMDLINE_LOGPARAMS_DESC ; - //set_default_frame_parms(config,frame_parms); - config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL); + set_default_frame_parms(frame_parms); + config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL); - if (strlen(in_path) > 0) { - opt_type = OPT_PCAP; - opt_enabled=1; - printf("Enabling OPT for PCAP with the following file %s \n",in_path); - } - if (strlen(in_ip) > 0) { - opt_enabled=1; - opt_type = OPT_WIRESHARK; - printf("Enabling OPT for wireshark for local interface"); - } + if (strlen(in_path) > 0) { + opt_type = OPT_PCAP; + opt_enabled=1; + printf("Enabling OPT for PCAP with the following file %s \n",in_path); + } + if (strlen(in_ip) > 0) { + opt_enabled=1; + opt_type = OPT_WIRESHARK; + printf("Enabling OPT for wireshark for local interface"); + } - config_process_cmdline( cmdline_logparams,sizeof(cmdline_logparams)/sizeof(paramdef_t),NULL); - if(config_isparamset(cmdline_logparams,CMDLINE_ONLINELOG_IDX)) { - set_glog_onlinelog(online_log_messages); - } - if(config_isparamset(cmdline_logparams,CMDLINE_GLOGLEVEL_IDX)) { - set_glog(glog_level, -1); - } - if(config_isparamset(cmdline_logparams,CMDLINE_GLOGVERBO_IDX)) { - set_glog(-1, glog_verbosity); - } - if (start_telnetsrv) { - load_module_shlib("telnetsrv",NULL,0); - } + config_process_cmdline( cmdline_logparams,sizeof(cmdline_logparams)/sizeof(paramdef_t),NULL); + if(config_isparamset(cmdline_logparams,CMDLINE_ONLINELOG_IDX)) { + set_glog_onlinelog(online_log_messages); + } + if(config_isparamset(cmdline_logparams,CMDLINE_GLOGLEVEL_IDX)) { + set_glog(glog_level, -1); + } + if(config_isparamset(cmdline_logparams,CMDLINE_GLOGVERBO_IDX)) { + set_glog(-1, glog_verbosity); + } + if (start_telnetsrv) { + load_module_shlib("telnetsrv",NULL,0); + } - paramdef_t cmdline_uemodeparams[] =CMDLINE_UEMODEPARAMS_DESC; - paramdef_t cmdline_ueparams[] =CMDLINE_UEPARAMS_DESC; + paramdef_t cmdline_uemodeparams[] =CMDLINE_UEMODEPARAMS_DESC; + paramdef_t cmdline_ueparams[] =CMDLINE_UEPARAMS_DESC; - config_process_cmdline( cmdline_uemodeparams,sizeof(cmdline_uemodeparams)/sizeof(paramdef_t),NULL); - config_process_cmdline( cmdline_ueparams,sizeof(cmdline_ueparams)/sizeof(paramdef_t),NULL); - if (loopfile != NULL) { - printf("Input file for hardware emulation: %s",loopfile); - mode=loop_through_memory; - input_fd = fopen(loopfile,"r"); - AssertFatal(input_fd != NULL,"Please provide a valid input file\n"); - } + config_process_cmdline( cmdline_uemodeparams,sizeof(cmdline_uemodeparams)/sizeof(paramdef_t),NULL); + config_process_cmdline( cmdline_ueparams,sizeof(cmdline_ueparams)/sizeof(paramdef_t),NULL); + if (loopfile != NULL) { + printf("Input file for hardware emulation: %s",loopfile); + mode=loop_through_memory; + input_fd = fopen(loopfile,"r"); + AssertFatal(input_fd != NULL,"Please provide a valid input file\n"); + } - if ( (cmdline_uemodeparams[CMDLINE_CALIBUERX_IDX].paramflags & PARAMFLAG_PARAMSET) != 0) mode = rx_calib_ue; - if ( (cmdline_uemodeparams[CMDLINE_CALIBUERXMED_IDX].paramflags & PARAMFLAG_PARAMSET) != 0) mode = rx_calib_ue_med; - if ( (cmdline_uemodeparams[CMDLINE_CALIBUERXBYP_IDX].paramflags & PARAMFLAG_PARAMSET) != 0) mode = rx_calib_ue_byp; - if (cmdline_uemodeparams[CMDLINE_DEBUGUEPRACH_IDX].uptr) - if ( *(cmdline_uemodeparams[CMDLINE_DEBUGUEPRACH_IDX].uptr) > 0) mode = debug_prach; - if (cmdline_uemodeparams[CMDLINE_NOL2CONNECT_IDX].uptr) - if ( *(cmdline_uemodeparams[CMDLINE_NOL2CONNECT_IDX].uptr) > 0) mode = no_L2_connect; - if (cmdline_uemodeparams[CMDLINE_CALIBPRACHTX_IDX].uptr) - if ( *(cmdline_uemodeparams[CMDLINE_CALIBPRACHTX_IDX].uptr) > 0) mode = calib_prach_tx; + if ( (cmdline_uemodeparams[CMDLINE_CALIBUERX_IDX].paramflags & PARAMFLAG_PARAMSET) != 0) mode = rx_calib_ue; + if ( (cmdline_uemodeparams[CMDLINE_CALIBUERXMED_IDX].paramflags & PARAMFLAG_PARAMSET) != 0) mode = rx_calib_ue_med; + if ( (cmdline_uemodeparams[CMDLINE_CALIBUERXBYP_IDX].paramflags & PARAMFLAG_PARAMSET) != 0) mode = rx_calib_ue_byp; + if (cmdline_uemodeparams[CMDLINE_DEBUGUEPRACH_IDX].uptr) + if ( *(cmdline_uemodeparams[CMDLINE_DEBUGUEPRACH_IDX].uptr) > 0) mode = debug_prach; + if (cmdline_uemodeparams[CMDLINE_NOL2CONNECT_IDX].uptr) + if ( *(cmdline_uemodeparams[CMDLINE_NOL2CONNECT_IDX].uptr) > 0) mode = no_L2_connect; + if (cmdline_uemodeparams[CMDLINE_CALIBPRACHTX_IDX].uptr) + if ( *(cmdline_uemodeparams[CMDLINE_CALIBPRACHTX_IDX].uptr) > 0) mode = calib_prach_tx; + if (dumpframe > 0) mode = rx_dump_frame; + + for (CC_id=0; CC_iddl_CarrierFreq = downlink_frequency[0][0]; + } + UE_scan=0; + - if ( !(CONFIG_ISFLAGSET(CONFIG_ABORT)) && (!(CONFIG_ISFLAGSET(CONFIG_NOOOPT))) ) { - // Here the configuration file is the XER encoded UE capabilities - // Read it in and store in asn1c data structures - sprintf(uecap_xer,"%stargets/PROJECTS/GENERIC-LTE-EPC/CONF/UE_config.xml",getenv("OPENAIR_HOME")); - printf("%s\n",uecap_xer); - uecap_xer_in=1; - } /* UE with config file */ + if (tddflag > 0) { + for (CC_id=0; CC_idframe_type = TDD; + } + /*if (frame_parms[0]->N_RB_DL !=0) { + if ( frame_parms[0]->N_RB_DL < 6 ) { + frame_parms[0]->N_RB_DL = 6; + printf ( "%i: Invalid number of ressource blocks, adjusted to 6\n",frame_parms[0]->N_RB_DL); + } + if ( frame_parms[0]->N_RB_DL > 100 ) { + frame_parms[0]->N_RB_DL = 100; + printf ( "%i: Invalid number of ressource blocks, adjusted to 100\n",frame_parms[0]->N_RB_DL); + } + if ( frame_parms[0]->N_RB_DL > 50 && frame_parms[0]->N_RB_DL < 100 ) { + frame_parms[0]->N_RB_DL = 50; + printf ( "%i: Invalid number of ressource blocks, adjusted to 50\n",frame_parms[0]->N_RB_DL); + } + if ( frame_parms[0]->N_RB_DL > 25 && frame_parms[0]->N_RB_DL < 50 ) { + frame_parms[0]->N_RB_DL = 25; + printf ( "%i: Invalid number of ressource blocks, adjusted to 25\n",frame_parms[0]->N_RB_DL); + } + UE_scan = 0; + frame_parms[0]->N_RB_UL=frame_parms[0]->N_RB_DL; + for (CC_id=1; CC_idN_RB_DL=frame_parms[0]->N_RB_DL; + frame_parms[CC_id]->N_RB_UL=frame_parms[0]->N_RB_UL; + } + }*/ + + + for (CC_id=1;CC_idsubframe_config.numerology_index_mu.value =1; - config->subframe_config.duplex_mode.value = 1; //FDD - config->subframe_config.dl_cyclic_prefix_type.value = 0; //NORMAL - config->rf_config.dl_channel_bandwidth.value = 106; - config->rf_config.ul_channel_bandwidth.value = 106; - config->rf_config.tx_antenna_ports.value = 1; - config->rf_config.rx_antenna_ports.value = 1; - config->sch_config.physical_cell_id.value = 0; - - frame_parms->frame_type = FDD; - frame_parms->tdd_config = 3; - //frame_parms[CC_id]->tdd_config_S = 0; - frame_parms->N_RB_DL = 106; - frame_parms->N_RB_UL = 106; - frame_parms->Ncp = NORMAL; - //frame_parms[CC_id]->Ncp_UL = NORMAL; - frame_parms->Nid_cell = 0; - //frame_parms[CC_id]->num_MBSFN_config = 0; - frame_parms->nb_antenna_ports_eNB = 1; - frame_parms->nb_antennas_tx = 1; - frame_parms->nb_antennas_rx = 1; - - //frame_parms[CC_id]->nushift = 0; - - ///frame_parms[CC_id]->phich_config_common.phich_resource = oneSixth; - //frame_parms[CC_id]->phich_config_common.phich_duration = normal; - // UL RS Config - /*frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = 1;//n_DMRS1 set to 0 - frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = 1; - frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = 0; - frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = 0; - - frame_parms[CC_id]->pusch_config_common.n_SB = 1; - frame_parms[CC_id]->pusch_config_common.hoppingMode = 0; - frame_parms[CC_id]->pusch_config_common.pusch_HoppingOffset = 0; - frame_parms[CC_id]->pusch_config_common.enable64QAM = 0; - - frame_parms[CC_id]->prach_config_common.rootSequenceIndex=22; - frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig=1; - frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_ConfigIndex=0; - frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.highSpeedFlag=0; - frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_FreqOffset=0;*/ - - // NR: Init to legacy LTE 20Mhz params - frame_parms->numerology_index = 0; - frame_parms->ttis_per_subframe = 1; - frame_parms->slots_per_tti = 2; - - downlink_frequency[0][0] = 2680000000; // Use float to avoid issue with frequency over 2^31. - //downlink_frequency[CC_id][1] = downlink_frequency[CC_id][0]; - //downlink_frequency[CC_id][2] = downlink_frequency[CC_id][0]; - //downlink_frequency[CC_id][3] = downlink_frequency[CC_id][0]; - //printf("Downlink for CC_id %d frequency set to %u\n", CC_id, downlink_frequency[CC_id][0]); - - //} - -} void init_openair0(void); void init_openair0() { @@ -897,14 +880,11 @@ int main( int argc, char **argv ) { set_latency_target(); - // set default parameters - set_default_frame_parms(frame_parms); - // initialize logging logInit(); // get options and fill parameters from configuration file - get_options (argc, argv); //Command-line options, enb_properties + get_options (); //Command-line options, enb_properties #if T_TRACER T_init(T_port, T_wait, T_dont_fork); @@ -984,7 +964,6 @@ int main( int argc, char **argv ) { LOG_I(HW, "Version: %s\n", PACKAGE_VERSION); - // set_default_frame_parms(frame_parms);// // init the parameters for (CC_id=0; CC_idnb_antenna_ports_eNB = 1; //initial value overwritten by initial sync later LOG_I(PHY,"Set nb_rx_antenna %d , nb_tx_antenna %d \n",frame_parms[CC_id]->nb_antennas_rx, frame_parms[CC_id]->nb_antennas_tx); - - //set_default_frame_parms(config[CC_id],frame_parms[CC_id]); - + //init_ul_hopping(frame_parms[CC_id]); - nr_init_frame_parms_ue(frame_parms[CC_id]); - printf("after init frame_parms %d\n",frame_parms[CC_id]->ofdm_symbol_size); - // phy_init_top(frame_parms[CC_id]); //phy_init_nr_top(frame_parms[CC_id]); } @@ -1067,13 +1041,13 @@ int main( int argc, char **argv ) { if (UE[CC_id]->mac_enabled == 1) { - //UE[CC_id]->pdcch_vars[0][0]->crnti = 0x1234; - //UE[CC_id]->pdcch_vars[1][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][0]->crnti = 0x1235; - //UE[CC_id]->pdcch_vars[1][0]->crnti = 0x1235; + UE[CC_id]->pdcch_vars[0][0]->crnti = 0x1235; + UE[CC_id]->pdcch_vars[1][0]->crnti = 0x1235; } rx_gain[CC_id][0] = 81; @@ -1145,7 +1119,7 @@ int main( int argc, char **argv ) { LOG_I(HW, "CPU Affinity of main() function is... %s\n", cpu_affinity); #endif - openair0_cfg[0].log_level = glog_level; + //openair0_cfg[0].log_level = glog_level; /*int eMBMS_active=0; if (node_function[0] <= NGFI_RAU_IF4p5) { // don't initialize L2 for RRU LOG_I(PHY,"Intializing L2\n"); @@ -1180,6 +1154,9 @@ int main( int argc, char **argv ) { mac_xface->mrbch_phy_sync_failure (0, 0, 0); }*/ + // init UE_PF_PO and mutex lock + pthread_mutex_init(&ue_pf_po_mutex, NULL); + memset (&UE_PF_PO[0][0], 0, sizeof(UE_PF_PO_t)*NUMBER_OF_UE_MAX*MAX_NUM_CCs); mlockall(MCL_CURRENT | MCL_FUTURE); From 8534982afe687443e87d5e2e3aa5e23ea82e0093 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Thu, 6 Sep 2018 16:42:10 +0200 Subject: [PATCH 186/379] bugfix: check that we are manipulating the structure for the correct RNTI The bug popped up when one UE was doing TCP UL iperf and a second UE attempted to connect. A crash of the eNB happened because we changed the wrong NFAPI structure in a TTI where both UEs are scheduled. Something like that. --- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index f48cf50bce..16673b5c33 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -1514,7 +1514,8 @@ schedule_ulsch_rnti(module_id_t module_idP, ul_req_index = 0; dlsch_flag = 0; for(ul_req_index = 0;ul_req_index < ul_req_tmp_body->number_of_pdus;ul_req_index++){ - if(ul_req_tmp_body->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE){ + if(ul_req_tmp_body->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE && + ul_req_tmp_body->ul_config_pdu_list[ul_req_index].uci_harq_pdu.ue_information.ue_information_rel8.rnti == rnti){ dlsch_flag = 1; LOG_D(MAC,"Frame %d, Subframe %d:rnti %x ul_req_index %d Switched UCI HARQ to ULSCH HARQ(first)\n",frameP,subframeP,rnti,ul_req_index); break; @@ -1602,7 +1603,8 @@ schedule_ulsch_rnti(module_id_t module_idP, ul_req_index = 0; dlsch_flag = 0; for(ul_req_index = 0;ul_req_index < ul_req_tmp_body->number_of_pdus;ul_req_index++){ - if(ul_req_tmp_body->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE){ + if(ul_req_tmp_body->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE && + ul_req_tmp_body->ul_config_pdu_list[ul_req_index].uci_harq_pdu.ue_information.ue_information_rel8.rnti == rnti){ dlsch_flag = 1; LOG_D(MAC,"Frame %d, Subframe %d:rnti %x ul_req_index %d Switched UCI HARQ to ULSCH HARQ(first)\n",frameP,subframeP,rnti,ul_req_index); break; From c1359a103f47aeb790b8c0330c70da9451c1ed7b Mon Sep 17 00:00:00 2001 From: Masayuki HARADA Date: Thu, 6 Sep 2018 19:00:32 +0200 Subject: [PATCH 187/379] Fix wrong slice_allocation loop in fairRR scheduler --- openair2/LAYER2/MAC/eNB_scheduler_fairRR.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c index 693623c116..deb9a22df9 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c @@ -544,7 +544,7 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id, unsigned char MIMO_mode_indicator[MAX_NUM_CCs][N_RBG_MAX]; uint8_t slice_allocation[MAX_NUM_CCs][N_RBG_MAX]; int UE_id, i; - uint16_t j; + uint16_t j,c; uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX]; uint16_t nb_rbs_required_remaining[MAX_NUM_CCs][NUMBER_OF_UE_MAX]; // uint16_t nb_rbs_required_remaining_1[MAX_NUM_CCs][NUMBER_OF_UE_MAX]; @@ -658,9 +658,9 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id, /* slicing support has been introduced into the scheduler. Provide dummy * data so that the preprocessor "simply works" */ - for (int i = 0; i < MAX_NUM_CCs; ++i) - for (int j = 0; i < N_RBG_MAX; ++j) - slice_allocation[i][j] = 1; + for (c = 0; c < MAX_NUM_CCs; ++c) + for (j = 0; j < N_RBG_MAX; ++j) + slice_allocation[c][j] = 1; LOG_T(MAC,"calling dlsch_scheduler_pre_processor_allocate .. \n "); dlsch_scheduler_pre_processor_allocate (Mod_id, From 7591761247cc5a2a4d0f73bd6960353b98351aa7 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Fri, 7 Sep 2018 05:54:44 -0700 Subject: [PATCH 188/379] removing assertion from dci handling (could come from wrongly detected DCI) --- openair1/PHY/LTE_TRANSPORT/dci_tools_common.c | 42 +++++++++++-------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c b/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c index 9a1aa279b0..c1b8ead8e9 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c @@ -357,28 +357,36 @@ void conv_rballoc(uint8_t ra_header,uint32_t rb_alloc,uint32_t N_RB_DL,uint32_t break; case 50: - AssertFatal(ra_header==0,"resource type 1 not supported for N_RB_DL=50\n"); + if (ra_header==0) { - for (i=16; i>0; i--) { - if ((rb_alloc&(1<>5] |= (7<<((3*(16-i))%32)); + for (i=16; i>0; i--) { + if ((rb_alloc&(1<>5] |= (7<<((3*(16-i))%32)); + } + + // bit mask across + if ((rb_alloc2[0]>>31)==1) + rb_alloc2[1] |= 1; + + if ((rb_alloc&1) != 0) + rb_alloc2[1] |= (3<<16); + } + else { + LOG_W(PHY,"resource type 1 not supported for N_RB_DL=50\n"); } - - // bit mask across - if ((rb_alloc2[0]>>31)==1) - rb_alloc2[1] |= 1; - - if ((rb_alloc&1) != 0) - rb_alloc2[1] |= (3<<16); break; case 100: - AssertFatal(ra_header==0,"resource type 1 not supported for N_RB_DL=100\n"); - for (i=0; i<25; i++) { - if ((rb_alloc&(1<<(24-i))) != 0) - rb_alloc2[(4*i)>>5] |= (0xf<<((4*i)%32)); - - // printf("rb_alloc2[%d] (type 0) %x (%d)\n",(4*i)>>5,rb_alloc2[(4*i)>>5],rb_alloc&(1<>5] |= (0xf<<((4*i)%32)); + + // printf("rb_alloc2[%d] (type 0) %x (%d)\n",(4*i)>>5,rb_alloc2[(4*i)>>5],rb_alloc&(1< Date: Fri, 7 Sep 2018 15:15:41 +0200 Subject: [PATCH 189/379] Pass multi socket descriptor in SCTP + add SCTP multi init req/resp mechanism --- common/utils/LOG/log.c | 1 + openair2/COMMON/sctp_messages_def.h | 21 +++---- openair2/COMMON/sctp_messages_types.h | 29 ++++++++- openair2/COMMON/x2ap_messages_def.h | 18 +++--- openair2/X2AP/x2ap_eNB.c | 80 +++++++++++++++++-------- openair2/X2AP/x2ap_eNB_defs.h | 8 ++- openair3/SCTP/sctp_eNB_itti_messaging.c | 14 +++++ openair3/SCTP/sctp_eNB_itti_messaging.h | 2 + openair3/SCTP/sctp_eNB_task.c | 32 ++++++---- 9 files changed, 148 insertions(+), 57 deletions(-) diff --git a/common/utils/LOG/log.c b/common/utils/LOG/log.c index 02ee849202..b40f4ebb5c 100644 --- a/common/utils/LOG/log.c +++ b/common/utils/LOG/log.c @@ -418,6 +418,7 @@ int logInit (void) register_log_component("S1AP","",S1AP); + register_log_component("X2AP","",X2AP); register_log_component("SCTP","",SCTP); diff --git a/openair2/COMMON/sctp_messages_def.h b/openair2/COMMON/sctp_messages_def.h index 4975f14d76..a7feb52a32 100644 --- a/openair2/COMMON/sctp_messages_def.h +++ b/openair2/COMMON/sctp_messages_def.h @@ -19,13 +19,14 @@ * contact@openairinterface.org */ -MESSAGE_DEF(SCTP_NEW_ASSOCIATION_REQ , MESSAGE_PRIORITY_MED, sctp_new_association_req_t , sctp_new_association_req) -MESSAGE_DEF(SCTP_NEW_ASSOCIATION_REQ_MULTI, MESSAGE_PRIORITY_MED, sctp_new_association_req_t , sctp_new_association_req_multi) -MESSAGE_DEF(SCTP_NEW_ASSOCIATION_RESP, MESSAGE_PRIORITY_MED, sctp_new_association_resp_t , sctp_new_association_resp) -MESSAGE_DEF(SCTP_NEW_ASSOCIATION_IND , MESSAGE_PRIORITY_MED, sctp_new_association_ind_t , sctp_new_association_ind) -MESSAGE_DEF(SCTP_REGISTER_UPPER_LAYER, MESSAGE_PRIORITY_MED, sctp_listener_register_upper_layer_t, sctp_listener_register_upper_layer) -MESSAGE_DEF(SCTP_DATA_REQ, MESSAGE_PRIORITY_MED, sctp_data_req_t , sctp_data_req) -MESSAGE_DEF(SCTP_DATA_IND, MESSAGE_PRIORITY_MED, sctp_data_ind_t , sctp_data_ind) -MESSAGE_DEF(SCTP_INIT_MSG, MESSAGE_PRIORITY_MED, sctp_init_t , sctp_init) -MESSAGE_DEF(SCTP_INIT_MSG_MULTI, MESSAGE_PRIORITY_MED, sctp_init_t , sctp_init_multi) -MESSAGE_DEF(SCTP_CLOSE_ASSOCIATION, MESSAGE_PRIORITY_MAX, sctp_close_association_t , sctp_close_association) +MESSAGE_DEF(SCTP_NEW_ASSOCIATION_REQ , MESSAGE_PRIORITY_MED, sctp_new_association_req_t , sctp_new_association_req) +MESSAGE_DEF(SCTP_NEW_ASSOCIATION_REQ_MULTI, MESSAGE_PRIORITY_MED, sctp_new_association_req_multi_t , sctp_new_association_req_multi) +MESSAGE_DEF(SCTP_NEW_ASSOCIATION_RESP, MESSAGE_PRIORITY_MED, sctp_new_association_resp_t , sctp_new_association_resp) +MESSAGE_DEF(SCTP_NEW_ASSOCIATION_IND , MESSAGE_PRIORITY_MED, sctp_new_association_ind_t , sctp_new_association_ind) +MESSAGE_DEF(SCTP_REGISTER_UPPER_LAYER, MESSAGE_PRIORITY_MED, sctp_listener_register_upper_layer_t , sctp_listener_register_upper_layer) +MESSAGE_DEF(SCTP_DATA_REQ, MESSAGE_PRIORITY_MED, sctp_data_req_t , sctp_data_req) +MESSAGE_DEF(SCTP_DATA_IND, MESSAGE_PRIORITY_MED, sctp_data_ind_t , sctp_data_ind) +MESSAGE_DEF(SCTP_INIT_MSG, MESSAGE_PRIORITY_MED, sctp_init_t , sctp_init) +MESSAGE_DEF(SCTP_INIT_MSG_MULTI_REQ, MESSAGE_PRIORITY_MED, sctp_init_t , sctp_init_multi) +MESSAGE_DEF(SCTP_INIT_MSG_MULTI_CNF, MESSAGE_PRIORITY_MED, sctp_init_msg_multi_cnf_t , sctp_init_msg_multi_cnf) +MESSAGE_DEF(SCTP_CLOSE_ASSOCIATION, MESSAGE_PRIORITY_MAX, sctp_close_association_t , sctp_close_association) diff --git a/openair2/COMMON/sctp_messages_types.h b/openair2/COMMON/sctp_messages_types.h index 90081c02aa..9e363c0d8d 100644 --- a/openair2/COMMON/sctp_messages_types.h +++ b/openair2/COMMON/sctp_messages_types.h @@ -29,7 +29,8 @@ #define SCTP_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.sctp_data_ind #define SCTP_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.sctp_data_req #define SCTP_INIT_MSG(mSGpTR) (mSGpTR)->ittiMsg.sctp_init -#define SCTP_INIT_MSG_MULTI(mSGpTR) (mSGpTR)->ittiMsg.sctp_init_multi +#define SCTP_INIT_MSG_MULTI_REQ(mSGpTR) (mSGpTR)->ittiMsg.sctp_init_multi +#define SCTP_INIT_MSG_MULTI_CNF(mSGpTR) (mSGpTR)->ittiMsg.sctp_init_msg_multi_cnf #define SCTP_CLOSE_ASSOCIATION(mSGpTR) (mSGpTR)->ittiMsg.sctp_close_association enum sctp_state_e { @@ -58,6 +59,32 @@ typedef struct sctp_new_association_req_s { net_ip_address_t remote_address; } sctp_new_association_req_t; +typedef struct sctp_new_association_req_multi_s { + /* Upper layer connexion identifier */ + uint16_t ulp_cnx_id; + + /* The port to connect to */ + uint16_t port; + /* Payload Protocol Identifier to use */ + uint32_t ppid; + + /* Number of streams used for this association */ + uint16_t in_streams; + uint16_t out_streams; + + /* Local address to bind to */ + net_ip_address_t local_address; + /* Remote address to connect to */ + net_ip_address_t remote_address; + + /* Multi-socket descriptor */ + int multi_sd; +} sctp_new_association_req_multi_t; + +typedef struct sctp_init_msg_multi_cnf_s { + int multi_sd; +} sctp_init_msg_multi_cnf_t; + typedef struct sctp_new_association_ind_s { /* Assoc id of the new association */ int32_t assoc_id; diff --git a/openair2/COMMON/x2ap_messages_def.h b/openair2/COMMON/x2ap_messages_def.h index 36842c13d0..d5555c1839 100644 --- a/openair2/COMMON/x2ap_messages_def.h +++ b/openair2/COMMON/x2ap_messages_def.h @@ -22,21 +22,21 @@ /* eNB application layer -> X2AP messages */ /* ITTI LOG messages */ /* ENCODER */ -MESSAGE_DEF(X2AP_RESET_REQUST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , x2ap_reset_request_log) -MESSAGE_DEF(X2AP_RESOURCE_STATUS_RESPONSE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , x2ap_resource_status_response_log) -MESSAGE_DEF(X2AP_RESOURCE_STATUS_FAILURE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , x2ap_resource_status_failure_log) +MESSAGE_DEF(X2AP_RESET_REQUST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , x2ap_reset_request_log) +MESSAGE_DEF(X2AP_RESOURCE_STATUS_RESPONSE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , x2ap_resource_status_response_log) +MESSAGE_DEF(X2AP_RESOURCE_STATUS_FAILURE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , x2ap_resource_status_failure_log) /* Messages for X2AP logging */ -MESSAGE_DEF(X2AP_SETUP_REQUEST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , x2ap_setup_request_log) +MESSAGE_DEF(X2AP_SETUP_REQUEST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , x2ap_setup_request_log) /* eNB application layer -> X2AP messages */ -MESSAGE_DEF(X2AP_REGISTER_ENB_REQ , MESSAGE_PRIORITY_MED, x2ap_register_enb_req_t , x2ap_register_enb_req) +MESSAGE_DEF(X2AP_REGISTER_ENB_REQ , MESSAGE_PRIORITY_MED, x2ap_register_enb_req_t , x2ap_register_enb_req) /* X2AP -> eNB application layer messages */ -MESSAGE_DEF(X2AP_REGISTER_ENB_CNF , MESSAGE_PRIORITY_MED, x2ap_register_enb_cnf_t , x2ap_register_enb_cnf) -MESSAGE_DEF(X2AP_DEREGISTERED_ENB_IND , MESSAGE_PRIORITY_MED, x2ap_deregistered_enb_ind_t , x2ap_deregistered_enb_ind) +MESSAGE_DEF(X2AP_REGISTER_ENB_CNF , MESSAGE_PRIORITY_MED, x2ap_register_enb_cnf_t , x2ap_register_enb_cnf) +MESSAGE_DEF(X2AP_DEREGISTERED_ENB_IND , MESSAGE_PRIORITY_MED, x2ap_deregistered_enb_ind_t , x2ap_deregistered_enb_ind) /* handover messages X2AP <-> RRC */ -MESSAGE_DEF(X2AP_HANDOVER_REQ , MESSAGE_PRIORITY_MED, x2ap_handover_req_t , x2ap_handover_req) -MESSAGE_DEF(X2AP_HANDOVER_REQ_ACK , MESSAGE_PRIORITY_MED, x2ap_handover_req_ack_t , x2ap_handover_req_ack) +MESSAGE_DEF(X2AP_HANDOVER_REQ , MESSAGE_PRIORITY_MED, x2ap_handover_req_t , x2ap_handover_req) +MESSAGE_DEF(X2AP_HANDOVER_REQ_ACK , MESSAGE_PRIORITY_MED, x2ap_handover_req_ack_t , x2ap_handover_req_ack) diff --git a/openair2/X2AP/x2ap_eNB.c b/openair2/X2AP/x2ap_eNB.c index 016fa1f419..4f23b5ddfe 100644 --- a/openair2/X2AP/x2ap_eNB.c +++ b/openair2/X2AP/x2ap_eNB.c @@ -60,11 +60,8 @@ void x2ap_eNB_register_eNB(x2ap_eNB_instance_t *instance_p, net_ip_address_t *local_ip_addr, uint16_t in_streams, uint16_t out_streams, - uint32_t enb_port_for_X2C); - -static -void x2ap_eNB_handle_sctp_association_resp(instance_t instance, - sctp_new_association_resp_t *sctp_new_association_resp); + uint32_t enb_port_for_X2C, + int multi_sd); /* static @@ -209,7 +206,7 @@ int x2ap_eNB_init_sctp (x2ap_eNB_instance_t *instance_p, DevAssert(instance_p != NULL); DevAssert(local_ip_addr != NULL); - message = itti_alloc_new_message (TASK_X2AP, SCTP_INIT_MSG_MULTI); + message = itti_alloc_new_message (TASK_X2AP, SCTP_INIT_MSG_MULTI_REQ); sctp_init = &message->ittiMsg.sctp_init_multi; sctp_init->port = enb_port_for_X2C; @@ -240,12 +237,13 @@ static void x2ap_eNB_register_eNB(x2ap_eNB_instance_t *instance_p, net_ip_address_t *local_ip_addr, uint16_t in_streams, uint16_t out_streams, - uint32_t enb_port_for_X2C) + uint32_t enb_port_for_X2C, + int multi_sd) { - MessageDef *message = NULL; - sctp_new_association_req_t *sctp_new_association_req = NULL; - x2ap_eNB_data_t *x2ap_enb_data = NULL; + MessageDef *message = NULL; + sctp_new_association_req_multi_t *sctp_new_association_req = NULL; + x2ap_eNB_data_t *x2ap_enb_data = NULL; DevAssert(instance_p != NULL); DevAssert(target_eNB_ip_address != NULL); @@ -260,6 +258,8 @@ static void x2ap_eNB_register_eNB(x2ap_eNB_instance_t *instance_p, sctp_new_association_req->in_streams = in_streams; sctp_new_association_req->out_streams = out_streams; + sctp_new_association_req->multi_sd = multi_sd; + memcpy(&sctp_new_association_req->remote_address, target_eNB_ip_address, sizeof(*target_eNB_ip_address)); @@ -293,9 +293,7 @@ static void x2ap_eNB_handle_register_eNB(instance_t instance, x2ap_register_enb_req_t *x2ap_register_eNB) { - x2ap_eNB_instance_t *new_instance; - uint8_t index; DevAssert(x2ap_register_eNB != NULL); @@ -309,7 +307,7 @@ void x2ap_eNB_handle_register_eNB(instance_t instance, DevCheck(new_instance->tac == x2ap_register_eNB->tac, new_instance->tac, x2ap_register_eNB->tac, 0); DevCheck(new_instance->mcc == x2ap_register_eNB->mcc, new_instance->mcc, x2ap_register_eNB->mcc, 0); DevCheck(new_instance->mnc == x2ap_register_eNB->mnc, new_instance->mnc, x2ap_register_eNB->mnc, 0); - + X2AP_WARN("eNB[%d] already registered\n", instance); } else { new_instance = calloc(1, sizeof(x2ap_eNB_instance_t)); @@ -327,6 +325,18 @@ void x2ap_eNB_handle_register_eNB(instance_t instance, new_instance->mnc = x2ap_register_eNB->mnc; new_instance->mnc_digit_length = x2ap_register_eNB->mnc_digit_length; + DevCheck(x2ap_register_eNB->nb_x2 <= X2AP_MAX_NB_ENB_IP_ADDRESS, + X2AP_MAX_NB_ENB_IP_ADDRESS, x2ap_register_eNB->nb_x2, 0); + memcpy(new_instance->target_enb_x2_ip_address, + x2ap_register_eNB->target_enb_x2_ip_address, + x2ap_register_eNB->nb_x2 * sizeof(net_ip_address_t)); + + new_instance->nb_x2 = x2ap_register_eNB->nb_x2; + new_instance->enb_x2_ip_address = x2ap_register_eNB->enb_x2_ip_address; + new_instance->sctp_in_streams = x2ap_register_eNB->sctp_in_streams; + new_instance->sctp_out_streams = x2ap_register_eNB->sctp_out_streams; + new_instance->enb_port_for_X2C = x2ap_register_eNB->enb_port_for_X2C; + /* Add the new instance to the list of eNB (meaningfull in virtual mode) */ x2ap_eNB_insert_new_instance(new_instance); @@ -342,24 +352,41 @@ void x2ap_eNB_handle_register_eNB(instance_t instance, X2AP_INFO("eNB[%d] eNB id %u acting as a listner (server)\n", instance, x2ap_register_eNB->eNB_id); } +} - DevCheck(x2ap_register_eNB->nb_x2 <= X2AP_MAX_NB_ENB_IP_ADDRESS, - X2AP_MAX_NB_ENB_IP_ADDRESS, x2ap_register_eNB->nb_x2, 0); +static +void x2ap_eNB_handle_sctp_init_msg_multi_cnf( + instance_t instance_id, + sctp_init_msg_multi_cnf_t *m) +{ + x2ap_eNB_instance_t *instance; + int index; + + DevAssert(m != NULL); + + instance = x2ap_eNB_get_instance(instance_id); + DevAssert(instance != NULL); + + instance->multi_sd = m->multi_sd; + /* Exit if CNF message reports failure. + * Failure means multi_sd < 0. + */ + DevAssert(instance->multi_sd >= 0); /* Trying to connect to the provided list of eNB ip address */ - for (index = 0; index < x2ap_register_eNB->nb_x2; index++) { + for (index = 0; index < instance->nb_x2; index++) { X2AP_INFO("eNB[%d] eNB id %u acting as an initiator (client)\n", - instance, x2ap_register_eNB->eNB_id); - x2ap_eNB_register_eNB(new_instance, - &x2ap_register_eNB->target_enb_x2_ip_address[index], - &x2ap_register_eNB->enb_x2_ip_address, - x2ap_register_eNB->sctp_in_streams, - x2ap_register_eNB->sctp_out_streams, - x2ap_register_eNB->enb_port_for_X2C); + instance_id, instance->eNB_id); + x2ap_eNB_register_eNB(instance, + &instance->target_enb_x2_ip_address[index], + &instance->enb_x2_ip_address, + instance->sctp_in_streams, + instance->sctp_out_streams, + instance->enb_port_for_X2C, + instance->multi_sd); } - } void *x2ap_task(void *arg) @@ -386,6 +413,11 @@ void *x2ap_task(void *arg) &X2AP_REGISTER_ENB_REQ(received_msg)); break; + case SCTP_INIT_MSG_MULTI_CNF: + x2ap_eNB_handle_sctp_init_msg_multi_cnf(ITTI_MESSAGE_GET_INSTANCE(received_msg), + &received_msg->ittiMsg.sctp_init_msg_multi_cnf); + break; + case SCTP_NEW_ASSOCIATION_RESP: x2ap_eNB_handle_sctp_association_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg), &received_msg->ittiMsg.sctp_new_association_resp); diff --git a/openair2/X2AP/x2ap_eNB_defs.h b/openair2/X2AP/x2ap_eNB_defs.h index 7869b497c3..11b4434dc0 100644 --- a/openair2/X2AP/x2ap_eNB_defs.h +++ b/openair2/X2AP/x2ap_eNB_defs.h @@ -151,7 +151,13 @@ typedef struct x2ap_eNB_instance_s { uint16_t mnc; uint8_t mnc_digit_length; - + net_ip_address_t target_enb_x2_ip_address[X2AP_MAX_NB_ENB_IP_ADDRESS]; + uint8_t nb_x2; + net_ip_address_t enb_x2_ip_address; + uint16_t sctp_in_streams; + uint16_t sctp_out_streams; + uint32_t enb_port_for_X2C; + int multi_sd; } x2ap_eNB_instance_t; typedef struct { diff --git a/openair3/SCTP/sctp_eNB_itti_messaging.c b/openair3/SCTP/sctp_eNB_itti_messaging.c index 3517c0597b..d2064c74c0 100644 --- a/openair3/SCTP/sctp_eNB_itti_messaging.c +++ b/openair3/SCTP/sctp_eNB_itti_messaging.c @@ -24,6 +24,20 @@ #include "sctp_common.h" #include "sctp_eNB_itti_messaging.h" +int sctp_itti_send_init_msg_multi_cnf(task_id_t task_id, instance_t instance, int multi_sd) +{ + MessageDef *message_p; + sctp_init_msg_multi_cnf_t *sctp_init_msg_multi_cnf_p; + + message_p = itti_alloc_new_message(TASK_SCTP, SCTP_INIT_MSG_MULTI_CNF); + + sctp_init_msg_multi_cnf_p = &message_p->ittiMsg.sctp_init_msg_multi_cnf; + + sctp_init_msg_multi_cnf_p->multi_sd = multi_sd; + + return itti_send_msg_to_task(task_id, instance, message_p); +} + int sctp_itti_send_new_message_ind(task_id_t task_id, uint32_t assoc_id, uint8_t *buffer, uint32_t buffer_length, uint16_t stream) { diff --git a/openair3/SCTP/sctp_eNB_itti_messaging.h b/openair3/SCTP/sctp_eNB_itti_messaging.h index 665c5f0e66..49d2056a3c 100644 --- a/openair3/SCTP/sctp_eNB_itti_messaging.h +++ b/openair3/SCTP/sctp_eNB_itti_messaging.h @@ -22,6 +22,8 @@ #ifndef SCTP_ITTI_MESSAGING_H_ #define SCTP_ITTI_MESSAGING_H_ +int sctp_itti_send_init_msg_multi_cnf(task_id_t task_id, instance_t instance, int multi_sd); + int sctp_itti_send_new_message_ind(task_id_t task_id, uint32_t assoc_id, uint8_t *buffer, uint32_t buffer_length, uint16_t stream); diff --git a/openair3/SCTP/sctp_eNB_task.c b/openair3/SCTP/sctp_eNB_task.c index 998ea9589c..6071b0da13 100644 --- a/openair3/SCTP/sctp_eNB_task.c +++ b/openair3/SCTP/sctp_eNB_task.c @@ -220,10 +220,10 @@ void sctp_handle_new_association_req_multi( const instance_t instance, const task_id_t requestor, - const sctp_new_association_req_t * const sctp_new_association_req_p, - int sd) + const sctp_new_association_req_multi_t * const sctp_new_association_req_p) { int ns; + int sd; int32_t assoc_id = 0; @@ -235,6 +235,8 @@ sctp_handle_new_association_req_multi( */ DevAssert(sctp_new_association_req_p != NULL); + sd = sctp_new_association_req_p->multi_sd; + /* Create new socket with IPv6 affinity */ //#warning "SCTP may Force IPv4 only, here" @@ -265,8 +267,9 @@ sctp_handle_new_association_req_multi( SCTP_ERROR("Failed to convert ipv6 address %*s to network type\n", (int)strlen(sctp_new_association_req_p->remote_address.ipv6_address), sctp_new_association_req_p->remote_address.ipv6_address); - close(sd); - return; + //close(sd); + //return; + exit(1); } SCTP_DEBUG("Converted ipv6 address %*s to network type\n", @@ -284,8 +287,9 @@ sctp_handle_new_association_req_multi( SCTP_ERROR("Failed to convert ipv4 address %*s to network type\n", (int)strlen(sctp_new_association_req_p->remote_address.ipv4_address), sctp_new_association_req_p->remote_address.ipv4_address); - close(sd); - return; + //close(sd); + //return; + exit(1); } SCTP_DEBUG("Converted ipv4 address %*s to network type\n", @@ -307,7 +311,7 @@ sctp_handle_new_association_req_multi( SCTP_STATE_UNREACHABLE, 0, 0); /* Add the socket to list of fd monitored by ITTI */ //itti_unsubscribe_event_fd(TASK_SCTP, sd); - close(sd); + //close(sd); return; } else { SCTP_DEBUG("connectx assoc_id %d in progress..., used %d addresses\n", @@ -1043,7 +1047,6 @@ void *sctp_eNB_task(void *arg) struct epoll_event *events; MessageDef *received_msg = NULL; int result; - int multi_sd = -1; SCTP_DEBUG("Starting SCTP layer\n"); @@ -1072,8 +1075,10 @@ void *sctp_eNB_task(void *arg) } break; - case SCTP_INIT_MSG_MULTI: { - SCTP_DEBUG("Received SCTP_INIT_MSG_MULTI\n"); + case SCTP_INIT_MSG_MULTI_REQ: { + int multi_sd; + + SCTP_DEBUG("Received SCTP_INIT_MSG_MULTI_REQ\n"); multi_sd = sctp_create_new_listener( ITTI_MESSAGE_GET_INSTANCE(received_msg), @@ -1084,6 +1089,10 @@ void *sctp_eNB_task(void *arg) /* SCTP socket creation or bind failed... */ SCTP_ERROR("Failed to create new SCTP listener\n"); } + sctp_itti_send_init_msg_multi_cnf( + ITTI_MSG_ORIGIN_ID(received_msg), + ITTI_MESSAGE_GET_INSTANCE(received_msg), + multi_sd); } break; @@ -1097,8 +1106,7 @@ void *sctp_eNB_task(void *arg) case SCTP_NEW_ASSOCIATION_REQ_MULTI: { sctp_handle_new_association_req_multi(ITTI_MESSAGE_GET_INSTANCE(received_msg), ITTI_MSG_ORIGIN_ID(received_msg), - &received_msg->ittiMsg.sctp_new_association_req_multi, - multi_sd); + &received_msg->ittiMsg.sctp_new_association_req_multi); } break; From 7d22622474ad38263e1fd5059e89c2c51e8f20ac Mon Sep 17 00:00:00 2001 From: laurent Date: Fri, 7 Sep 2018 15:44:57 +0200 Subject: [PATCH 190/379] fix nasmesh kernel 4.15 --- openair2/NETWORK_DRIVER/MESH/classifier.c | 4 ++-- openair2/NETWORK_DRIVER/MESH/common.c | 7 +++---- openair2/NETWORK_DRIVER/MESH/device.c | 6 +++--- openair2/NETWORK_DRIVER/MESH/mesh.c | 16 ++++++++++++++-- openair2/NETWORK_DRIVER/MESH/proto_extern.h | 1 - openair2/NETWORK_DRIVER/MESH/tool.c | 4 ++-- 6 files changed, 24 insertions(+), 14 deletions(-) diff --git a/openair2/NETWORK_DRIVER/MESH/classifier.c b/openair2/NETWORK_DRIVER/MESH/classifier.c index 985bab946e..a22ac2f200 100644 --- a/openair2/NETWORK_DRIVER/MESH/classifier.c +++ b/openair2/NETWORK_DRIVER/MESH/classifier.c @@ -410,7 +410,7 @@ struct cx_entity *nas_CLASS_cx6(struct sk_buff *skb, #endif //NAS_DEBUG_CLASS //if ((dst = (unsigned int*)&(((struct rt6_info *)skbdst)->rt6i_gateway)) == 0){ - if ((dst = ((struct iphdr*)(skb_network_header(skb)))->daddr) == 0) { + if ( (dst = &((struct iphdr*)(skb_network_header(skb)))->daddr) == NULL) { printk("nas_CLASS_cx6: dst addr is null \n"); p = p->next; @@ -475,7 +475,7 @@ struct cx_entity *nas_CLASS_cx4(struct sk_buff *skb, if (skb!=NULL) { daddr = ((struct iphdr*)(skb_network_header(skb)))->daddr; - if (daddr!=NULL) { + if (daddr!=0) { #ifdef NAS_DEBUG_CLASS printk("[NAS][CLASS][IPv4] Searching for %d.%d.%d.%d\n", diff --git a/openair2/NETWORK_DRIVER/MESH/common.c b/openair2/NETWORK_DRIVER/MESH/common.c index 1c7b8e4d12..738f05ad99 100644 --- a/openair2/NETWORK_DRIVER/MESH/common.c +++ b/openair2/NETWORK_DRIVER/MESH/common.c @@ -53,17 +53,14 @@ void nas_COMMON_receive(uint16_t dlen, struct sk_buff *skb; struct ipversion *ipv; struct nas_priv *gpriv=netdev_priv(nasdev[inst]); - uint32_t odaddr,osaddr; //int i; unsigned char protocol; - unsigned char /**addr,*/ *daddr,*saddr,*ifaddr /*,sn*/; //struct udphdr *uh; //struct tcphdr *th; - uint16_t *cksum,check; struct iphdr *network_header; @@ -114,11 +111,12 @@ void nas_COMMON_receive(uint16_t dlen, // Make the third byte of both the source and destination equal to the fourth of the destination - + unsigned char * ifaddr, *saddr, daddr; daddr = (unsigned char *)&((struct iphdr *)skb->data)->daddr; odaddr = ((struct iphdr *)skb->data)->daddr; // sn = addr[3]; saddr = (unsigned char *)&((struct iphdr *)skb->data)->saddr; + uint32_t odaddr,osaddr; osaddr = ((struct iphdr *)skb->data)->saddr; if (daddr[0] == saddr[0]) {// same network @@ -219,6 +217,7 @@ void nas_COMMON_receive(uint16_t dlen, case IPPROTO_TCP: + uint16_t *cksum,check; cksum = (uint16_t*)&(((struct tcphdr*)(((char *)network_header + (network_header->ihl<<2))))->check); //check = csum_tcpudp_magic(((struct iphdr *)network_header)->saddr, ((struct iphdr *)network_header)->daddr, tcp_hdrlen(skb), IPPROTO_TCP, ~(*cksum)); diff --git a/openair2/NETWORK_DRIVER/MESH/device.c b/openair2/NETWORK_DRIVER/MESH/device.c index f5d31742bc..8b95e05cfc 100644 --- a/openair2/NETWORK_DRIVER/MESH/device.c +++ b/openair2/NETWORK_DRIVER/MESH/device.c @@ -241,7 +241,7 @@ 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) || RHEL_RELEASE_CODE>=1796 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) || (defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE>=1796) netif_trans_update(dev); #else dev->trans_start = jiffies; @@ -306,7 +306,7 @@ 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) || RHEL_RELEASE_CODE>=1796 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) || (defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE>=1796) netif_trans_update(dev); #else dev->trans_start = jiffies; @@ -324,7 +324,7 @@ static const struct net_device_ops nasmesh_netdev_ops = { .ndo_set_mac_address = NULL, .ndo_set_config = nas_set_config, .ndo_do_ioctl = nas_CTL_ioctl, -#if RHEL_RELEASE_CODE>=1797 +#if (defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE>=1797) .extended.ndo_change_mtu = nas_change_mtu, #else .ndo_change_mtu = nas_change_mtu, diff --git a/openair2/NETWORK_DRIVER/MESH/mesh.c b/openair2/NETWORK_DRIVER/MESH/mesh.c index 367e34cc4f..ed87bc05f8 100644 --- a/openair2/NETWORK_DRIVER/MESH/mesh.c +++ b/openair2/NETWORK_DRIVER/MESH/mesh.c @@ -30,7 +30,7 @@ ***************************************************************************/ - +#include #include "local.h" #include "proto_extern.h" @@ -155,10 +155,18 @@ void nas_mesh_start_default_sclassifier(struct cx_entity *cx,struct rb_entity *r } //--------------------------------------------------------------------------- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)) +void nas_mesh_timer(struct timer_list *t) +#else void nas_mesh_timer(unsigned long data) +#endif { //--------------------------------------------------------------------------- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)) + struct nas_priv *gpriv=from_timer(gpriv, t, timer); + #else struct nas_priv *gpriv=(struct nas_priv *) data; + #endif uint8_t cxi; struct cx_entity *cx; struct rb_entity *rb; @@ -166,10 +174,14 @@ void nas_mesh_timer(unsigned long data) #ifdef NAS_DEBUG_TIMER printk("NAS_MESH_TIMER - begin \n"); #endif - +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)) +timer_setup(&gpriv->timer, nas_mesh_timer, 0); + mod_timer(&gpriv->timer, jiffies+NAS_TIMER_TICK); + #else (gpriv->timer).function=nas_mesh_timer; (gpriv->timer).expires=jiffies+NAS_TIMER_TICK; (gpriv->timer).data=data; + #endif return; diff --git a/openair2/NETWORK_DRIVER/MESH/proto_extern.h b/openair2/NETWORK_DRIVER/MESH/proto_extern.h index 844c5b41a4..2eae034257 100644 --- a/openair2/NETWORK_DRIVER/MESH/proto_extern.h +++ b/openair2/NETWORK_DRIVER/MESH/proto_extern.h @@ -195,7 +195,6 @@ void nas_mesh_init(int inst //!< Instance ID ); -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); diff --git a/openair2/NETWORK_DRIVER/MESH/tool.c b/openair2/NETWORK_DRIVER/MESH/tool.c index 2e8e68a17c..a8d359f9ff 100644 --- a/openair2/NETWORK_DRIVER/MESH/tool.c +++ b/openair2/NETWORK_DRIVER/MESH/tool.c @@ -679,11 +679,11 @@ void print_TOOL_pk_all(struct sk_buff *skb) switch (ntohs(skb->protocol)) { case ETH_P_IPV6: - print_TOOL_pk_ipv6((struct ipv6hdr *)skb->network_header); + print_TOOL_pk_ipv6((struct ipv6hdr *)skb_network_header(skb)); break; case ETH_P_IP: - print_TOOL_pk_ipv4((struct iphdr *)skb->network_header); + print_TOOL_pk_ipv4((struct iphdr *)skb_network_header(skb)); break; } } From 73da898f9b7946f108e8f1a1093d0b3cd45c12c9 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 7 Sep 2018 16:57:55 +0200 Subject: [PATCH 191/379] integration fix: fix bad merge conflict resolution + fix compilation error --- common/utils/ocp_itti/all_msg.h | 1 + openair2/ENB_APP/enb_app.c | 2 +- .../ENB_APP/flexran_agent_common_internal.c | 50 ------------------- 3 files changed, 2 insertions(+), 51 deletions(-) diff --git a/common/utils/ocp_itti/all_msg.h b/common/utils/ocp_itti/all_msg.h index e296502909..f439572400 100644 --- a/common/utils/ocp_itti/all_msg.h +++ b/common/utils/ocp_itti/all_msg.h @@ -12,3 +12,4 @@ #include "openair2/COMMON/sctp_messages_def.h" #include "openair2/COMMON/udp_messages_def.h" #include "openair2/COMMON/gtpv1_u_messages_def.h" +#include "openair2/COMMON/flexran_messages_def.h" diff --git a/openair2/ENB_APP/enb_app.c b/openair2/ENB_APP/enb_app.c index 97645b39cc..37bcd36653 100644 --- a/openair2/ENB_APP/enb_app.c +++ b/openair2/ENB_APP/enb_app.c @@ -414,7 +414,7 @@ void handle_reconfiguration(module_id_t mod_id) if (restart_L1L2(mod_id) < 0) { LOG_E(ENB_APP, "can not restart, killing lte-softmodem\n"); - itti_terminate_tasks(TASK_PHY_ENB); + exit_fun("can not restart L1L2, killing lte-softmodem"); return; } diff --git a/openair2/ENB_APP/flexran_agent_common_internal.c b/openair2/ENB_APP/flexran_agent_common_internal.c index d288ff5a18..9f1a1d3710 100644 --- a/openair2/ENB_APP/flexran_agent_common_internal.c +++ b/openair2/ENB_APP/flexran_agent_common_internal.c @@ -31,58 +31,8 @@ #include "flexran_agent_common_internal.h" #include "flexran_agent_mac_internal.h" -/* needed to soft-restart the lte-softmodem */ -#include "targets/RT/USER/lte-softmodem.h" #include "enb_app.h" -void handle_reconfiguration(mid_t mod_id) -{ - struct timespec start, end; - clock_gettime(CLOCK_MONOTONIC, &start); - flexran_agent_info_t *flexran = RC.flexran[mod_id]; - - if (ENB_WAIT == flexran->node_ctrl_state) { - /* this is already waiting, just release */ - pthread_mutex_lock(&flexran->mutex_node_ctrl); - flexran->node_ctrl_state = ENB_NORMAL_OPERATION; - pthread_mutex_unlock(&flexran->mutex_node_ctrl); - pthread_cond_signal(&flexran->cond_node_ctrl); - return; - } - - if (stop_L1L2(mod_id) < 0) { - LOG_E(ENB_APP, "can not stop lte-softmodem, aborting restart\n"); - return; - } - - /* node_ctrl_state should have value ENB_MAKE_WAIT only if this method is not - * executed by the FlexRAN thread */ - if (ENB_MAKE_WAIT == flexran->node_ctrl_state) { - LOG_I(ENB_APP, " * eNB %d: Waiting for FlexRAN RTController command *\n", mod_id); - pthread_mutex_lock(&flexran->mutex_node_ctrl); - flexran->node_ctrl_state = ENB_WAIT; - while (ENB_NORMAL_OPERATION != flexran->node_ctrl_state) - pthread_cond_wait(&flexran->cond_node_ctrl, &flexran->mutex_node_ctrl); - pthread_mutex_unlock(&flexran->mutex_node_ctrl); - } - - if (restart_L1L2(mod_id) < 0) { - LOG_F(ENB_APP, "can not restart, killing lte-softmodem\n"); - exit_fun("can not restart L1L2, killing lte-softmodem"); - return; - } - - clock_gettime(CLOCK_MONOTONIC, &end); - end.tv_sec -= start.tv_sec; - if (end.tv_nsec >= start.tv_nsec) { - end.tv_nsec -= start.tv_nsec; - } else { - end.tv_sec -= 1; - end.tv_nsec = end.tv_nsec - start.tv_nsec + 1000000000; - } - LOG_I(ENB_APP, "lte-softmodem restart succeeded in %ld.%ld s\n", end.tv_sec, end.tv_nsec / 1000000); -} - int apply_reconfiguration_policy(mid_t mod_id, const char *policy, size_t policy_length) { yaml_parser_t parser; From a80f1cf2e73a968980d2efb71bb96be9bf0a747b Mon Sep 17 00:00:00 2001 From: hongzhi wang Date: Fri, 7 Sep 2018 17:04:41 +0200 Subject: [PATCH 192/379] ue clean more warnings --- openair1/PHY/INIT/nr_init_ue.c | 11 +++++++---- openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c | 15 +++++++++------ openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c | 1 - targets/RT/USER/nr-ue.c | 6 +++--- targets/RT/USER/nr-uesoftmodem.c | 14 +++++++------- 5 files changed, 26 insertions(+), 21 deletions(-) diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c index 29869e615b..151a917f23 100644 --- a/openair1/PHY/INIT/nr_init_ue.c +++ b/openair1/PHY/INIT/nr_init_ue.c @@ -327,6 +327,7 @@ void phy_config_sib13_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_Area_ } } + void phy_config_meas_ue(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index,uint8_t n_adj_cells,unsigned int *adj_cell_id) { @@ -344,6 +345,7 @@ void phy_config_meas_ue(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index,uint8_t n memcpy((void*)phy_meas->adj_cell_id,(void *)adj_cell_id,n_adj_cells*sizeof(unsigned int)); } +*/ #if defined(Rel10) || defined(Rel14) void phy_config_dedicated_scell_ue(uint8_t Mod_id, @@ -355,17 +357,17 @@ void phy_config_dedicated_scell_ue(uint8_t Mod_id, } #endif - void phy_config_harq_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id, uint16_t max_harq_tx ) { - PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id][CC_id]; + PHY_VARS_NR_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id][CC_id]; phy_vars_ue->ulsch[eNB_id]->Mlimit = max_harq_tx; } extern uint16_t beta_cqi[16]; +/* void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id, struct PhysicalConfigDedicated *physicalConfigDedicated ) { @@ -908,8 +910,9 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, return 0; } + /* -void nr_lte_ue_transport(PHY_VARS_UE *ue,int abstraction_flag) { +void init_nr_ue_transport(PHY_VARS_NR_UE *ue,int abstraction_flag) { int i,j,k; @@ -930,7 +933,7 @@ void nr_lte_ue_transport(PHY_VARS_UE *ue,int abstraction_flag) { ue->transmission_mode[i] = ue->frame_parms.nb_antenna_ports_eNB==1 ? 1 : 2; } - ue->frame_parms.pucch_config_common.deltaPUCCH_Shift = 1; + //ue->frame_parms.pucch_config_common.deltaPUCCH_Shift = 1; ue->dlsch_MCH[0] = new_ue_dlsch(1,NUMBER_OF_HARQ_PID_MAX,NSOFT,MAX_TURBO_ITERATIONS_MBSFN,ue->frame_parms.N_RB_DL,0); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c index e5ac340cce..095832128c 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c @@ -150,12 +150,12 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode) NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; int ret=-1; - int aarx,rx_power=0; + int rx_power=0; //aarx, //nfapi_nr_config_request_t* config; /*offset parameters to be updated from higher layer */ - k_ssb =0; - N_ssb_crb = 0; + //k_ssb =0; + //N_ssb_crb = 0; /*#ifdef OAI_USRP __m128i *rxdata128; @@ -226,9 +226,12 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode) ret = nr_pbch_detection(ue,mode); nr_gold_pdcch(ue,0, 2); - nr_slot_fep(ue,0, 0, ue->rx_offset, 1, 1, NR_PDCCH_EST); - nr_slot_fep(ue,1, 0, ue->rx_offset, 1, 1, NR_PDCCH_EST); - + int nb_prefix_samples0 = frame_parms->nb_prefix_samples0; + frame_parms->nb_prefix_samples0 = 0; + + nr_slot_fep(ue,0, 0, ue->rx_offset, 0, 1, NR_PDCCH_EST); + nr_slot_fep(ue,1, 0, ue->rx_offset, 0, 1, NR_PDCCH_EST); + frame_parms->nb_prefix_samples0 = nb_prefix_samples0; LOG_I(PHY,"[UE %d] AUTOTEST Cell Sync : frame = %d, rx_offset %d, freq_offset %d \n", ue->Mod_id, diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c index 6ce7718199..337b6d8e33 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c @@ -394,7 +394,6 @@ void nr_pbch_unscrambling(NR_UE_PBCH *pbch, uint16_t length, uint8_t bitwise) { - int i; uint8_t reset, offset; uint32_t x1, x2, s=0; double *demod_pbch_e = pbch->demod_pbch_e; diff --git a/targets/RT/USER/nr-ue.c b/targets/RT/USER/nr-ue.c index fc8d44a236..04da3067c2 100644 --- a/targets/RT/USER/nr-ue.c +++ b/targets/RT/USER/nr-ue.c @@ -64,8 +64,8 @@ #include "T.h" extern double cpuf; -static nfapi_nr_config_request_t config_t; -static nfapi_nr_config_request_t* config =&config_t; +//static nfapi_nr_config_request_t config_t; +//static nfapi_nr_config_request_t* config =&config_t; /* * NR SLOT PROCESSING SEQUENCE @@ -810,7 +810,7 @@ void *UE_thread(void *arg) { PHY_VARS_NR_UE *UE = (PHY_VARS_NR_UE *) arg; // int tx_enabled = 0; int dummy_rx[UE->frame_parms.nb_antennas_rx][UE->frame_parms.samples_per_tti] __attribute__((aligned(32))); - openair0_timestamp timestamp,timestamp1; + openair0_timestamp timestamp; void* rxp[NB_ANTENNAS_RX], *txp[NB_ANTENNAS_TX]; int start_rx_stream = 0; int i; diff --git a/targets/RT/USER/nr-uesoftmodem.c b/targets/RT/USER/nr-uesoftmodem.c index 635fe524e3..54d169a171 100644 --- a/targets/RT/USER/nr-uesoftmodem.c +++ b/targets/RT/USER/nr-uesoftmodem.c @@ -1169,13 +1169,13 @@ int main( int argc, char **argv ) { if (do_forms==1) { fl_initialize (&argc, argv, NULL, 0, 0); - - //form_stats = create_form_stats_form(); - //fl_show_form (form_stats->stats_form, FL_PLACE_HOTSPOT, FL_FULLBORDER, "stats"); - UE_id = 0; - form_ue[UE_id] = create_lte_phy_scope_ue(); - sprintf (title, "LTE DL SCOPE UE"); - fl_show_form (form_ue[UE_id]->lte_phy_scope_ue, FL_PLACE_HOTSPOT, FL_FULLBORDER, title); + + form_stats = create_form_stats_form(); + fl_show_form (form_stats->stats_form, FL_PLACE_HOTSPOT, FL_FULLBORDER, "stats"); + UE_id = 0; + form_ue[UE_id] = create_lte_phy_scope_ue(); + sprintf (title, "NR DL SCOPE UE"); + fl_show_form (form_ue[UE_id]->lte_phy_scope_ue, FL_PLACE_HOTSPOT, FL_FULLBORDER, title); /* if (openair_daq_vars.use_ia_receiver) { From 82ab88f546257c0cf2286156393812115fdfd8d0 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 7 Sep 2018 17:24:37 +0200 Subject: [PATCH 193/379] integration fix: add missing break This break was there and went away, for whatever reason... --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 1 + 1 file changed, 1 insertion(+) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 08cb89e56d..d4f7c04d03 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -350,6 +350,7 @@ set_ul_DAI(int module_idP, int UE_idP, int CC_idP, int frameP, UE_list->UE_template[CC_idP][UE_idP].DAI_ul[3] = DAI; break; } + break; case 2: // if ((subframeP==3)||(subframeP==8)) From 84c3f70570989a49848b48b818c1aa866301cbbd Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Sun, 9 Sep 2018 08:59:26 +0200 Subject: [PATCH 194/379] added prints for unrolling preparation fixed issue for llr updates with the approximation --- .../CODING/nrPolar_tools/nr_polar_decoder.c | 3 ++ .../nrPolar_tools/nr_polar_decoding_tools.c | 52 ++++++++++++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c index 3d076296d0..b24c78495b 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c @@ -106,6 +106,8 @@ int8_t polar_decoder( uint8_t listIndex[2*listSize], copyIndex; for (uint16_t currentBit=0; currentBitN; currentBit++){ + printf("***************** BIT %d\n",currentBit); + updateLLR(llr, llrUpdated, bit, bitUpdated, currentListSize, currentBit, 0, polarParams->N, (polarParams->n+1), pathMetricAppr); if (polarParams->information_bit_pattern[currentBit]==0) { //Frozen bit. updatePathMetric(pathMetric, llr, currentListSize, 0, currentBit, pathMetricAppr); //approximation=0 --> 11b, approximation=1 --> 12 @@ -128,6 +130,7 @@ int8_t polar_decoder( for (int k = 0; k < (polarParams->n+1); k++) { bit[j][k][i+currentListSize]=bit[j][k][i]; llr[j][k][i+currentListSize]=llr[j][k][i];}}} + for (int i = 0; i < currentListSize; i++) { bit[currentBit][0][i]=0; crcState[i+currentListSize]=crcState[i]; diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c index 0b010131cd..58292c236a 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c @@ -20,6 +20,7 @@ */ #include "PHY/CODING/nrPolar_tools/nr_polar_defs.h" +#define SHOWCOMP 1 void updateLLR(double ***llr, uint8_t **llrU, uint8_t ***bit, uint8_t **bitU, uint8_t listSize, uint16_t row, uint16_t col, uint16_t xlen, uint8_t ylen, uint8_t approximation) { @@ -29,6 +30,10 @@ void updateLLR(double ***llr, uint8_t **llrU, uint8_t ***bit, uint8_t **bitU, if(bitU[row-offset][col]==0) updateBit(bit, bitU, listSize, (row-offset), col, xlen, ylen); if(llrU[row-offset][col+1]==0) updateLLR(llr, llrU, bit, bitU, listSize, (row-offset), (col+1), xlen, ylen, approximation); if(llrU[row][col+1]==0) updateLLR(llr, llrU, bit, bitU, listSize, row, (col+1), xlen, ylen, approximation); +#ifdef SHOWCOMP + printf("updating LLR (%d,%d,%d) (bit %d,%d,%d, llr0 %d,%d,%d, llr1 %d,%d,%d \n",row,col,i, + row-offset,col,i,row-offset,col+1,i,row,col+1,i); +#endif llr[row][col][i] = (pow((-1),bit[row-offset][col][i])*llr[row-offset][col+1][i]) + llr[row][col+1][i]; } else { if(llrU[row][col+1]==0) updateLLR(llr, llrU, bit, bitU, listSize, row, (col+1), xlen, ylen, approximation); @@ -48,10 +53,18 @@ void updateBit(uint8_t ***bit, uint8_t **bitU, uint8_t listSize, uint16_t row, if (( (row) % (2*offset) ) >= offset ) { if (bitU[row][col-1]==0) updateBit(bit, bitU, listSize, row, (col-1), xlen, ylen); bit[row][col][i] = bit[row][col-1][i]; +#ifdef SHOWCOMP + printf("updating bit (%d,%d,%d) from (%d,%d,%d)\n", + row,col,i,row,col-1,i); +#endif } else { if (bitU[row][col-1]==0) updateBit(bit, bitU, listSize, row, (col-1), xlen, ylen); if (bitU[row+offset][col-1]==0) updateBit(bit, bitU, listSize, (row+offset), (col-1), xlen, ylen); bit[row][col][i] = ( (bit[row][col-1][i]+bit[row+offset][col-1][i]) % 2); +#ifdef SHOWCOMP + printf("updating bit (%d,%d,%d) from (%d,%d,%d)+(%d,%d,%d)\n", + row,col,i,row,col-1,i,row+offset,col-1,i); +#endif } } @@ -61,6 +74,11 @@ void updateBit(uint8_t ***bit, uint8_t **bitU, uint8_t listSize, uint16_t row, void updatePathMetric(double *pathMetric, double ***llr, uint8_t listSize, uint8_t bitValue, uint16_t row, uint8_t approximation) { +#ifdef SHOWCOMP + printf("updating path_metric from Frozen bit (%d,%d) \n", + row,0); +#endif + if (approximation) { //eq. (12) for (uint8_t i=0; i Date: Sun, 9 Sep 2018 09:18:15 +0200 Subject: [PATCH 195/379] removed some computations which are repeated in a loop (updateLLR) --- .../CODING/nrPolar_tools/nr_polar_decoder.c | 3 +- .../nrPolar_tools/nr_polar_decoding_tools.c | 44 ++++++++++--------- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c index b24c78495b..6243d281c9 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c @@ -105,8 +105,9 @@ int8_t polar_decoder( int16_t checkCrcBits=-1; uint8_t listIndex[2*listSize], copyIndex; + // for (uint8_t i = 0; i < 2*listSize; i++) listIndex[i]=i; for (uint16_t currentBit=0; currentBitN; currentBit++){ - printf("***************** BIT %d\n",currentBit); + // printf("***************** BIT %d\n",currentBit); updateLLR(llr, llrUpdated, bit, bitUpdated, currentListSize, currentBit, 0, polarParams->N, (polarParams->n+1), pathMetricAppr); if (polarParams->information_bit_pattern[currentBit]==0) { //Frozen bit. diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c index 58292c236a..2c586d8f7d 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c @@ -20,29 +20,33 @@ */ #include "PHY/CODING/nrPolar_tools/nr_polar_defs.h" -#define SHOWCOMP 1 +//#define SHOWCOMP 1 void updateLLR(double ***llr, uint8_t **llrU, uint8_t ***bit, uint8_t **bitU, - uint8_t listSize, uint16_t row, uint16_t col, uint16_t xlen, uint8_t ylen, uint8_t approximation) { - uint16_t offset = (xlen/(pow(2,(ylen-col-1)))); - for (uint8_t i=0; i= offset ) { - if(bitU[row-offset][col]==0) updateBit(bit, bitU, listSize, (row-offset), col, xlen, ylen); - if(llrU[row-offset][col+1]==0) updateLLR(llr, llrU, bit, bitU, listSize, (row-offset), (col+1), xlen, ylen, approximation); - if(llrU[row][col+1]==0) updateLLR(llr, llrU, bit, bitU, listSize, row, (col+1), xlen, ylen, approximation); -#ifdef SHOWCOMP - printf("updating LLR (%d,%d,%d) (bit %d,%d,%d, llr0 %d,%d,%d, llr1 %d,%d,%d \n",row,col,i, - row-offset,col,i,row-offset,col+1,i,row,col+1,i); -#endif - llr[row][col][i] = (pow((-1),bit[row-offset][col][i])*llr[row-offset][col+1][i]) + llr[row][col+1][i]; - } else { - if(llrU[row][col+1]==0) updateLLR(llr, llrU, bit, bitU, listSize, row, (col+1), xlen, ylen, approximation); - if(llrU[row+offset][col+1]==0) updateLLR(llr, llrU, bit, bitU, listSize, (row+offset), (col+1), xlen, ylen, approximation); - computeLLR(llr, row, col, i, offset, approximation); - } - } + uint8_t listSize, uint16_t row, uint16_t col, uint16_t xlen, uint8_t ylen, uint8_t approximation) { + uint16_t offset = (xlen/(1<<(ylen-col-1))); + if (( (row) % (2*offset) ) >= offset ) { + if (bitU[row-offset][col]==0) updateBit(bit, bitU, listSize, (row-offset), col, xlen, ylen); + if (llrU[row-offset][col+1]==0) updateLLR(llr, llrU, bit, bitU, listSize, (row-offset), (col+1), xlen, ylen, approximation); + if (llrU[row][col+1]==0) updateLLR(llr, llrU, bit, bitU, listSize, row, (col+1), xlen, ylen, approximation); + for (uint8_t i=0; i Date: Sun, 9 Sep 2018 09:51:37 +0200 Subject: [PATCH 196/379] small simplification in computeLLR --- .../nrPolar_tools/nr_polar_decoding_tools.c | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c index 2c586d8f7d..a1f67edd35 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c @@ -41,9 +41,8 @@ void updateLLR(double ***llr, uint8_t **llrU, uint8_t ***bit, uint8_t **bitU, } else { if (llrU[row][col+1]==0) updateLLR(llr, llrU, bit, bitU, listSize, row, (col+1), xlen, ylen, approximation); if (llrU[row+offset][col+1]==0) updateLLR(llr, llrU, bit, bitU, listSize, (row+offset), (col+1), xlen, ylen, approximation); - for (uint8_t i=0; i Date: Mon, 10 Sep 2018 01:38:43 +0200 Subject: [PATCH 197/379] order of dimensions on llr array --- .../CODING/nrPolar_tools/nr_polar_decoder.c | 14 +++---- .../nrPolar_tools/nr_polar_decoding_tools.c | 39 +++++++++++-------- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c index 6243d281c9..67fbd7a86e 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c @@ -40,7 +40,7 @@ int8_t polar_decoder( uint8_t ***bit = nr_alloc_uint8_t_3D_array(polarParams->N, (polarParams->n+1), 2*listSize); uint8_t **bitUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True uint8_t **llrUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True - double ***llr = nr_alloc_double_3D_array(polarParams->N, (polarParams->n+1), 2*listSize); + double ***llr = nr_alloc_double_3D_array(2*listSize,(polarParams->n+1), polarParams->N); uint8_t **crcChecksum = nr_alloc_uint8_t_2D_array(polarParams->crcParityBits, 2*listSize); double *pathMetric = malloc(sizeof(double)*(2*listSize)); uint8_t *crcState = malloc(sizeof(uint8_t)*(2*listSize)); //0=False, 1=True @@ -92,7 +92,7 @@ int8_t polar_decoder( double *d_tilde = malloc(sizeof(double) * polarParams->N); nr_polar_rate_matching(input, d_tilde, polarParams->rate_matching_pattern, polarParams->K, polarParams->N, polarParams->encoderLength); - for (int j = 0; j < polarParams->N; j++) llr[j][polarParams->n][0]=d_tilde[j]; + for (int j = 0; j < polarParams->N; j++) llr[0][polarParams->n][j]=d_tilde[j]; /* @@ -130,7 +130,7 @@ int8_t polar_decoder( for (int j = 0; j < polarParams->N; j++) { for (int k = 0; k < (polarParams->n+1); k++) { bit[j][k][i+currentListSize]=bit[j][k][i]; - llr[j][k][i+currentListSize]=llr[j][k][i];}}} + llr[i+currentListSize][k][j]=llr[i][k][j];}}} for (int i = 0; i < currentListSize; i++) { bit[currentBit][0][i]=0; @@ -167,7 +167,7 @@ int8_t polar_decoder( for (int i=0; iN; i++) { for (int j=0; j<(polarParams->n+1); j++) { bit[i][j][listIndex[(2*listSize-1)-k]]=bit[i][j][listIndex[k]]; - llr[i][j][listIndex[(2*listSize-1)-k]]=llr[i][j][listIndex[k]]; + llr[listIndex[(2*listSize-1)-k]][j][i]=llr[listIndex[k]][j][i]; } } } @@ -188,7 +188,7 @@ int8_t polar_decoder( for (int i = 0; i < polarParams->N; i++) { for (int j = 0; j < (polarParams->n + 1); j++) { bit[i][j][k] = bit[i][j][copyIndex]; - llr[i][j][k] = llr[i][j][copyIndex]; + llr[k][j][i] = llr[copyIndex][j][i]; } } } @@ -236,7 +236,7 @@ int8_t polar_decoder( free(pathMetric); free(crcState); nr_free_uint8_t_3D_array(bit, polarParams->N, (polarParams->n+1)); - nr_free_double_3D_array(llr, polarParams->N, (polarParams->n+1)); + nr_free_double_3D_array(llr, 2*listSize, (polarParams->n+1)); nr_free_uint8_t_2D_array(crcChecksum, polarParams->crcParityBits); return(-1); } @@ -271,7 +271,7 @@ int8_t polar_decoder( free(pathMetric); free(crcState); nr_free_uint8_t_3D_array(bit, polarParams->N, (polarParams->n+1)); - nr_free_double_3D_array(llr, polarParams->N, (polarParams->n+1)); + nr_free_double_3D_array(llr, 2*listSize, (polarParams->n+1)); nr_free_uint8_t_2D_array(crcChecksum, polarParams->crcParityBits); nr_free_uint8_t_2D_array(extended_crc_generator_matrix, polarParams->K); nr_free_uint8_t_2D_array(tempECGM, polarParams->K); diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c index a1f67edd35..64bf636c66 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c @@ -36,7 +36,7 @@ void updateLLR(double ***llr, uint8_t **llrU, uint8_t ***bit, uint8_t **bitU, printf("updating LLR (%d,%d,%d) (bit %d,%d,%d, llr0 %d,%d,%d, llr1 %d,%d,%d \n",row,col,i, row-offset,col,i,row-offset,col+1,i,row,col+1,i); #endif - llr[row][col][i] = (pow((-1),bit[row-offset][col][i])*llr[row-offset][col+1][i]) + llr[row][col+1][i]; + llr[i][col][row] = (pow((-1),bit[row-offset][col][i])*llr[i][col+1][row-offset]) + llr[i][col+1][row]; } } else { if (llrU[row][col+1]==0) updateLLR(llr, llrU, bit, bitU, listSize, row, (col+1), xlen, ylen, approximation); @@ -84,11 +84,11 @@ void updatePathMetric(double *pathMetric, double ***llr, uint8_t listSize, uint8 if (approximation) { //eq. (12) for (uint8_t i=0; i Date: Mon, 10 Sep 2018 02:16:35 +0200 Subject: [PATCH 198/379] memcpy instead of loop-based copy --- .../CODING/nrPolar_tools/nr_polar_decoder.c | 62 ++++++++++++------- .../nrPolar_tools/nr_polar_decoding_tools.c | 6 +- 2 files changed, 43 insertions(+), 25 deletions(-) diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c index 67fbd7a86e..9d898a0e66 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c @@ -37,7 +37,7 @@ int8_t polar_decoder( uint8_t pathMetricAppr) { - uint8_t ***bit = nr_alloc_uint8_t_3D_array(polarParams->N, (polarParams->n+1), 2*listSize); + uint8_t ***bit = nr_alloc_uint8_t_3D_array(2*listSize, (polarParams->n+1), polarParams->N); uint8_t **bitUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True uint8_t **llrUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True double ***llr = nr_alloc_double_3D_array(2*listSize,(polarParams->n+1), polarParams->N); @@ -48,12 +48,14 @@ int8_t polar_decoder( for (int i=0; i<(2*listSize); i++) { pathMetric[i] = 0; crcState[i]=1; + for (int j=0; j< polarParams->n+1; j++) memset((void*)&bit[i][j][0],0,sizeof(uint8_t)*polarParams->N); } for (int i=0; iN; i++) { llrUpdated[i][polarParams->n]=1; bitUpdated[i][0]=((polarParams->information_bit_pattern[i]+1) % 2); } + uint8_t **extended_crc_generator_matrix = malloc(polarParams->K * sizeof(uint8_t *)); //G_P3 uint8_t **tempECGM = malloc(polarParams->K * sizeof(uint8_t *)); //G_P2 for (int i = 0; i < polarParams->K; i++){ @@ -120,23 +122,29 @@ int8_t polar_decoder( } else if ( (polarParams->interleaving_pattern[nonFrozenBit] <= polarParams->payloadBits) && (aPrioriPayload[polarParams->interleaving_pattern[nonFrozenBit]] == 1) ) { //Information bit with known value of "1". updatePathMetric(pathMetric, llr, currentListSize, 1, currentBit, pathMetricAppr); - for (uint8_t i=0; icrcParityBits); } else { updatePathMetric2(pathMetric, llr, currentListSize, currentBit, pathMetricAppr); for (int i = 0; i < currentListSize; i++) { - for (int j = 0; j < polarParams->N; j++) { - for (int k = 0; k < (polarParams->n+1); k++) { - bit[j][k][i+currentListSize]=bit[j][k][i]; - llr[i+currentListSize][k][j]=llr[i][k][j];}}} + for (int k = 0; k < (polarParams->n+1); k++) { + /* + for (int j = 0; j < polarParams->N; j++) { + bit[i+currentListSize][k][j]=bit[i][k][j]; + llr[i+currentListSize][k][j]=llr[i][k][j]; + }*/ + memcpy((void*)&bit[i+currentListSize][k][0],(void*)&bit[i][k][0],sizeof(uint8_t)*polarParams->N); + memcpy((void*)&llr[i+currentListSize][k][0],(void*)&llr[i][k][0],sizeof(double)*polarParams->N); + } + } for (int i = 0; i < currentListSize; i++) { - bit[currentBit][0][i]=0; + bit[i][0][currentBit]=0; crcState[i+currentListSize]=crcState[i]; } - for (int i = currentListSize; i < 2*currentListSize; i++) bit[currentBit][0][i]=1; + for (int i = currentListSize; i < 2*currentListSize; i++) bit[i][0][currentBit]=1; bitUpdated[currentBit][0]=1; updateCrcChecksum2(crcChecksum, extended_crc_generator_matrix, currentListSize, nonFrozenBit, polarParams->crcParityBits); currentListSize*=2; @@ -164,12 +172,19 @@ int8_t polar_decoder( //First, backup the best "listSize" number of entries. for (int k=(listSize-1); k>0; k--) { - for (int i=0; iN; i++) { - for (int j=0; j<(polarParams->n+1); j++) { - bit[i][j][listIndex[(2*listSize-1)-k]]=bit[i][j][listIndex[k]]; - llr[listIndex[(2*listSize-1)-k]][j][i]=llr[listIndex[k]][j][i]; - } - } + for (int j=0; j<(polarParams->n+1); j++) { + /* + for (int i=0; iN; i++) { + bit[listIndex[(2*listSize-1)-k]][j][i]=bit[listIndex[k]][j][i]; + llr[listIndex[(2*listSize-1)-k]][j][i]=llr[listIndex[k]][j][i]; + }*/ + memcpy((void*)&bit[listIndex[(2*listSize-1)-k]][j][0], + (void*)&bit[listIndex[k]][j][0], + sizeof(uint8_t)*polarParams->N); + memcpy((void*)&llr[listIndex[(2*listSize-1)-k]][j][0], + (void*)&llr[listIndex[k]][j][0], + sizeof(double)*polarParams->N); + } } for (int k=(listSize-1); k>0; k--) { for (int i = 0; i < polarParams->crcParityBits; i++) { @@ -185,11 +200,14 @@ int8_t polar_decoder( } else { //Use the backup. copyIndex = listIndex[k]; } - for (int i = 0; i < polarParams->N; i++) { - for (int j = 0; j < (polarParams->n + 1); j++) { - bit[i][j][k] = bit[i][j][copyIndex]; - llr[k][j][i] = llr[copyIndex][j][i]; - } + + for (int j = 0; j < (polarParams->n + 1); j++) { + /* for (int i = 0; i < polarParams->N; i++) { + bit[k][j][i] = bit[copyIndex][j][i]; + llr[k][j][i] = llr[copyIndex][j][i]; + }*/ + memcpy((void*)&bit[k][j][0],(void*)&bit[copyIndex][j][0],sizeof(uint8_t)*polarParams->N); + memcpy((void*)&llr[k][j][0],(void*)&llr[copyIndex][j][0],sizeof(double)*polarParams->N); } } for (int k = 0; k < listSize; k++) { @@ -235,7 +253,7 @@ int8_t polar_decoder( free(d_tilde); free(pathMetric); free(crcState); - nr_free_uint8_t_3D_array(bit, polarParams->N, (polarParams->n+1)); + nr_free_uint8_t_3D_array(bit, 2*listSize, (polarParams->n+1)); nr_free_double_3D_array(llr, 2*listSize, (polarParams->n+1)); nr_free_uint8_t_2D_array(crcChecksum, polarParams->crcParityBits); return(-1); @@ -252,7 +270,7 @@ int8_t polar_decoder( for (uint8_t i = 0; i < fmin(listSize, (pow(2,polarParams->crcCorrectionBits)) ); i++) { if ( crcState[listIndex[i]] == 1 ) { - for (int j = 0; j < polarParams->N; j++) polarParams->nr_polar_u[j]=bit[j][0][listIndex[i]]; + for (int j = 0; j < polarParams->N; j++) polarParams->nr_polar_u[j]=bit[listIndex[i]][0][j]; //Extract the information bits (û to ĉ) nr_polar_info_bit_extraction(polarParams->nr_polar_u, polarParams->nr_polar_cPrime, polarParams->information_bit_pattern, polarParams->N); @@ -270,7 +288,7 @@ int8_t polar_decoder( free(d_tilde); free(pathMetric); free(crcState); - nr_free_uint8_t_3D_array(bit, polarParams->N, (polarParams->n+1)); + nr_free_uint8_t_3D_array(bit, 2*listSize, (polarParams->n+1)); nr_free_double_3D_array(llr, 2*listSize, (polarParams->n+1)); nr_free_uint8_t_2D_array(crcChecksum, polarParams->crcParityBits); nr_free_uint8_t_2D_array(extended_crc_generator_matrix, polarParams->K); diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c index 64bf636c66..888c209090 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c @@ -36,7 +36,7 @@ void updateLLR(double ***llr, uint8_t **llrU, uint8_t ***bit, uint8_t **bitU, printf("updating LLR (%d,%d,%d) (bit %d,%d,%d, llr0 %d,%d,%d, llr1 %d,%d,%d \n",row,col,i, row-offset,col,i,row-offset,col+1,i,row,col+1,i); #endif - llr[i][col][row] = (pow((-1),bit[row-offset][col][i])*llr[i][col+1][row-offset]) + llr[i][col+1][row]; + llr[i][col][row] = (pow((-1),bit[i][col][row-offset])*llr[i][col+1][row-offset]) + llr[i][col+1][row]; } } else { if (llrU[row][col+1]==0) updateLLR(llr, llrU, bit, bitU, listSize, row, (col+1), xlen, ylen, approximation); @@ -55,7 +55,7 @@ void updateBit(uint8_t ***bit, uint8_t **bitU, uint8_t listSize, uint16_t row, for (uint8_t i=0; i= offset ) { if (bitU[row][col-1]==0) updateBit(bit, bitU, listSize, row, (col-1), xlen, ylen); - bit[row][col][i] = bit[row][col-1][i]; + bit[i][col][row] = bit[i][col-1][row]; #ifdef SHOWCOMP printf("updating bit (%d,%d,%d) from (%d,%d,%d)\n", row,col,i,row,col-1,i); @@ -63,7 +63,7 @@ void updateBit(uint8_t ***bit, uint8_t **bitU, uint8_t listSize, uint16_t row, } else { if (bitU[row][col-1]==0) updateBit(bit, bitU, listSize, row, (col-1), xlen, ylen); if (bitU[row+offset][col-1]==0) updateBit(bit, bitU, listSize, (row+offset), (col-1), xlen, ylen); - bit[row][col][i] = ( (bit[row][col-1][i]+bit[row+offset][col-1][i]) % 2); + bit[i][col][row] = ( (bit[i][col-1][row]+bit[i][col-1][row+offset]) % 2); #ifdef SHOWCOMP printf("updating bit (%d,%d,%d) from (%d,%d,%d)+(%d,%d,%d)\n", row,col,i,row,col-1,i,row+offset,col-1,i); From ce0b62668412bea67cde9eba6d3edbfe5d8881e4 Mon Sep 17 00:00:00 2001 From: Guy De Souza Date: Mon, 10 Sep 2018 11:42:20 +0200 Subject: [PATCH 199/379] PBCH bitfield changes --- openair1/PHY/NR_TRANSPORT/nr_pbch.c | 22 +++++++++++----------- openair1/PHY/NR_TRANSPORT/nr_transport.h | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_TRANSPORT/nr_pbch.c index 0784d9ca9d..5964a55569 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_pbch.c @@ -136,7 +136,7 @@ void nr_pbch_scrambling(NR_gNB_PBCH *pbch, uint8_t nushift, uint16_t M, uint16_t length, - uint8_t bitwise) + uint8_t encoded) { uint8_t reset, offset; uint32_t x1, x2, s=0; @@ -168,12 +168,12 @@ void nr_pbch_scrambling(NR_gNB_PBCH *pbch, #ifdef DEBUG_PBCH_ENCODING printf("s: %04x\t", s); #endif - if (bitwise) { + if (!encoded) { (*pbch_a_prime) ^= ((unscrambling_mask>>i)&1)? (((*pbch_a_interleaved)>>i)&1)<>i)&1) ^ ((s>>((i+offset)&0x1f))&1))<>((i+offset)&0x1f))&1); + pbch_e[i>>5] ^= (((s>>((i+offset)&0x1f))&1)<<(i&0x1f)); } } @@ -276,7 +276,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch, // Scrambling M = (Lmax == 64)? (NR_POLAR_PBCH_PAYLOAD_BITS - 6) : (NR_POLAR_PBCH_PAYLOAD_BITS - 3); nushift = (((sfn>>2)&1)<<1) ^ ((sfn>>1)&1); - nr_pbch_scrambling(pbch, (uint32_t)config->sch_config.physical_cell_id.value, nushift, M, NR_POLAR_PBCH_PAYLOAD_BITS, 1); + nr_pbch_scrambling(pbch, (uint32_t)config->sch_config.physical_cell_id.value, nushift, M, NR_POLAR_PBCH_PAYLOAD_BITS, 0); #ifdef DEBUG_PBCH_ENCODING printf("Payload scrambling:\n"); for (int i=0; i<4; i++) @@ -284,7 +284,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch, #endif for (int m=0;m<32;m++){ -pbch_a_b[m] = ((pbch->pbch_a_prime[m/8]>>(m&7))&01); +pbch_a_b[m] = ((pbch->pbch_a_prime[m>>3]>>(m&7))&1); //printf("pbch_a_b[%d] %d\n", m, pbch_a_b[m] ); } @@ -292,25 +292,25 @@ pbch_a_b[m] = ((pbch->pbch_a_prime[m/8]>>(m&7))&01); polar_encoder (pbch->pbch_a_prime, pbch->pbch_e, polar_params); #ifdef DEBUG_PBCH_ENCODING printf("Channel coding:\n"); - for (int i=0; i>3; i++) - printf("pbch_e[%d]: 0x%02x\t", i, pbch->pbch_e[i]); + for (int i=0; i<(uint16_t)ceil((NR_POLAR_PBCH_E>>3)/32); i++) + printf("pbch_e[%d]: 0x%08x\t", i, pbch->pbch_e[i]); printf("\n"); #endif /// Scrambling M = NR_POLAR_PBCH_E; nushift = (Lmax==4)? ssb_index&3 : ssb_index&7; - nr_pbch_scrambling(pbch, (uint32_t)config->sch_config.physical_cell_id.value, nushift, M, NR_POLAR_PBCH_E, 0); + nr_pbch_scrambling(pbch, (uint32_t)config->sch_config.physical_cell_id.value, nushift, M, NR_POLAR_PBCH_E, 1); #ifdef DEBUG_PBCH_ENCODING printf("Scrambling:\n"); - for (int i=0; i>3; i++) - printf("pbch_e[%d]: 0x%02x\t", i, pbch->pbch_e[i]); + for (int i=0; i<(uint16_t)ceil((NR_POLAR_PBCH_E>>3)/32); i++) + printf("pbch_e[%d]: 0x%08x\t", i, pbch->pbch_e[i]); printf("\n"); #endif /// QPSK modulation for (int i=0; i>1; i++){ - idx = ((pbch->pbch_e[i<<1]&1)<<1) ^ (pbch->pbch_e[(i<<1)+1]&1); + idx = (((pbch->pbch_e[(i<<1)>>5]>>((i<<1)&0x1f))&1)<<1) ^ ((pbch->pbch_e[((i<<1)+1)>>5]>>(((i<<1)+1)&0x1f))&1); mod_pbch_e[i<<1] = nr_mod_table[(NR_MOD_TABLE_QPSK_OFFSET + idx)<<1]; mod_pbch_e[(i<<1)+1] = nr_mod_table[((NR_MOD_TABLE_QPSK_OFFSET + idx)<<1)+1]; diff --git a/openair1/PHY/NR_TRANSPORT/nr_transport.h b/openair1/PHY/NR_TRANSPORT/nr_transport.h index e60bb0628c..a051d776bd 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_transport.h +++ b/openair1/PHY/NR_TRANSPORT/nr_transport.h @@ -75,7 +75,7 @@ void nr_pbch_scrambling(NR_gNB_PBCH *pbch, uint8_t nushift, uint16_t M, uint16_t length, - uint8_t bitwise); + uint8_t encoded); /*! \fn int nr_generate_pbch From 753d4b70b65bd7b3a5660f3279155f898f49ec03 Mon Sep 17 00:00:00 2001 From: Guy De Souza Date: Mon, 10 Sep 2018 13:44:44 +0200 Subject: [PATCH 200/379] Minor debug changes --- openair1/PHY/NR_TRANSPORT/nr_pbch.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_TRANSPORT/nr_pbch.c index 5964a55569..f46685447c 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_pbch.c @@ -283,16 +283,16 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch, printf("pbch_a_prime[%d]: 0x%02x\n", i, pbch->pbch_a_prime[i]); #endif -for (int m=0;m<32;m++){ +/*for (int m=0;m<32;m++){ pbch_a_b[m] = ((pbch->pbch_a_prime[m>>3]>>(m&7))&1); //printf("pbch_a_b[%d] %d\n", m, pbch_a_b[m] ); -} +}*/ /// CRC, coding and rate matching polar_encoder (pbch->pbch_a_prime, pbch->pbch_e, polar_params); #ifdef DEBUG_PBCH_ENCODING printf("Channel coding:\n"); - for (int i=0; i<(uint16_t)ceil((NR_POLAR_PBCH_E>>3)/32); i++) + for (int i=0; i>5; i++) printf("pbch_e[%d]: 0x%08x\t", i, pbch->pbch_e[i]); printf("\n"); #endif @@ -303,7 +303,7 @@ pbch_a_b[m] = ((pbch->pbch_a_prime[m>>3]>>(m&7))&1); nr_pbch_scrambling(pbch, (uint32_t)config->sch_config.physical_cell_id.value, nushift, M, NR_POLAR_PBCH_E, 1); #ifdef DEBUG_PBCH_ENCODING printf("Scrambling:\n"); - for (int i=0; i<(uint16_t)ceil((NR_POLAR_PBCH_E>>3)/32); i++) + for (int i=0; i>5; i++) printf("pbch_e[%d]: 0x%08x\t", i, pbch->pbch_e[i]); printf("\n"); #endif From e772899b2bedf3a5f12383796f94f3a6c4acde03 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 10 Sep 2018 14:00:43 +0200 Subject: [PATCH 201/379] CI: better reporting on basic simulator Signed-off-by: Raphael Defosseux --- ci-scripts/reportTestLocally.sh | 270 ++++++++++++++++++++------------ 1 file changed, 171 insertions(+), 99 deletions(-) diff --git a/ci-scripts/reportTestLocally.sh b/ci-scripts/reportTestLocally.sh index 9d7ce0ac40..569b62bc3d 100755 --- a/ci-scripts/reportTestLocally.sh +++ b/ci-scripts/reportTestLocally.sh @@ -317,117 +317,189 @@ then echo " Statistics" >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html - PING_TESTS=`ls $ARCHIVES_LOC/*ping*txt` - for PING_CASE in $PING_TESTS + BW_CASES=(05 10 20) + for BW in ${BW_CASES[@]} do - echo " " >> ./test_simulator_results.html - NAME=`echo $PING_CASE | sed -e "s#$ARCHIVES_LOC/##"` - echo " $NAME" >> ./test_simulator_results.html - CMD=`egrep "COMMAND IS" $PING_CASE | sed -e "s#COMMAND IS: ##"` - echo " $CMD" >> ./test_simulator_results.html - FILE_COMPLETE=`egrep -c "ping statistics" $PING_CASE` - if [ $FILE_COMPLETE -eq 0 ] + ENB_LOG=$ARCHIVES_LOC/enb_${BW}MHz.log + UE_LOG=`echo $ENB_LOG | sed -e "s#enb#ue#"` + if [ -f $ENB_LOG ] && [ -f $UE_LOG ] then - echo " KO" >> ./test_simulator_results.html + NAME_ENB=`echo $ENB_LOG | sed -e "s#$ARCHIVES_LOC/##"` + NAME_UE=`echo $UE_LOG | sed -e "s#$ARCHIVES_LOC/##"` + echo " " >> ./test_simulator_results.html + echo " $NAME_ENB --- $NAME_UE" >> ./test_simulator_results.html echo " N/A" >> ./test_simulator_results.html - else - NB_TR_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s# packets transmitted.*##"` - NB_RC_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*packets transmitted, ##" -e "s# received,.*##"` - if [ $NB_TR_PACKETS -eq $NB_RC_PACKETS ] + NB_ENB_GOT_SYNC=`egrep -c "got sync" $ENB_LOG` + NB_UE_GOT_SYNC=`egrep -c "got sync" $UE_LOG` + NB_ENB_SYNCED_WITH_UE=`egrep -c "got UE capabilities for UE" $ENB_LOG` + if [ $NB_ENB_GOT_SYNC -eq 1 ] && [ $NB_UE_GOT_SYNC -eq 2 ] && [ $NB_ENB_SYNCED_WITH_UE -eq 1 ] then echo " OK" >> ./test_simulator_results.html else + echo " OK" >> ./test_simulator_results.html + fi + echo "
" >> ./test_simulator_results.html
+            if [ $NB_ENB_GOT_SYNC -eq 1 ]
+            then
+                echo "- eNB --> got sync" >> ./test_simulator_results.html
+            else
+                echo "- eNB NEVER got sync" >> ./test_simulator_results.html
+            fi
+            if [ $NB_UE_GOT_SYNC -eq 2 ]
+            then
+                echo "- UE --> got sync" >> ./test_simulator_results.html
+            else
+                echo "- UE NEVER got sync" >> ./test_simulator_results.html
+            fi
+            if [ $NB_ENB_SYNCED_WITH_UE -eq 1 ]
+            then
+                echo "- UE attached to eNB" >> ./test_simulator_results.html
+            else
+                echo "- UE NEVER attached to eNB" >> ./test_simulator_results.html
+            fi
+            NB_SEGFAULT_ENB=`egrep -i -c "Segmentation Fault" $ENB_LOG`
+            if [ $NB_SEGFAULT_ENB -ne 0 ]
+            then
+                echo "- eNB --> Segmentation Fault" >> ./test_simulator_results.html
+            fi
+            NB_SEGFAULT_UE=`egrep -i -c "Segmentation Fault" $UE_LOG`
+            if [ $NB_SEGFAULT_UE -ne 0 ]
+            then
+                echo "- UE --> Segmentation Fault" >> ./test_simulator_results.html
+            fi
+            NB_ASSERTION_ENB=`egrep -i -c "Assertion" $ENB_LOG`
+            if [ $NB_ASSERTION_ENB -ne 0 ]
+            then
+                echo "- eNB --> Assertion" >> ./test_simulator_results.html
+                awk 'BEGIN{assertion=10}{if(assertion < 3){print "    " $0; assertion++};if ($0 ~/Assertion/){print "    " $0;assertion=1}}END{}' $ENB_LOG >> ./test_simulator_results.html
+            fi
+            NB_ASSERTION_UE=`egrep -i -c "Assertion" $UE_LOG`
+            if [ $NB_ASSERTION_UE -ne 0 ]
+            then
+                echo "- eNB --> Assertion" >> ./test_simulator_results.html
+                awk 'BEGIN{assertion=10}{if(assertion < 3){print "    " $0; assertion++};if ($0 ~/Assertion/){print "    " $0;assertion=1}}END{}' $UE_LOG >> ./test_simulator_results.html
+            fi
+            echo "        
" >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + fi + PING_CASE=$ARCHIVES_LOC/${BW}MHz_ping_ue.txt + if [ -f $PING_CASE ] + then + echo " " >> ./test_simulator_results.html + NAME=`echo $PING_CASE | sed -e "s#$ARCHIVES_LOC/##"` + echo " $NAME" >> ./test_simulator_results.html + CMD=`egrep "COMMAND IS" $PING_CASE | sed -e "s#COMMAND IS: ##"` + echo " $CMD" >> ./test_simulator_results.html + FILE_COMPLETE=`egrep -c "ping statistics" $PING_CASE` + if [ $FILE_COMPLETE -eq 0 ] + then echo " KO" >> ./test_simulator_results.html + echo " N/A" >> ./test_simulator_results.html + else + NB_TR_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s# packets transmitted.*##"` + NB_RC_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*packets transmitted, ##" -e "s# received,.*##"` + if [ $NB_TR_PACKETS -eq $NB_RC_PACKETS ] + then + echo " OK" >> ./test_simulator_results.html + else + echo " KO" >> ./test_simulator_results.html + fi + echo " " >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html
+                STATS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*received, ##" -e "s#, time.*##" -e "s# packet loss##"`
+                echo "Packet Loss : $STATS" >> ./test_simulator_results.html
+                RTTMIN=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[1] " " $5}'`
+                echo "RTT Minimal : $RTTMIN" >> ./test_simulator_results.html
+                RTTAVG=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[2] " " $5}'`
+                echo "RTT Average : $RTTAVG" >> ./test_simulator_results.html
+                RTTMAX=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[3] " " $5}'`
+                echo "RTT Maximal : $RTTMAX" >> ./test_simulator_results.html
+                echo "            
" >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + fi + echo " " >> ./test_simulator_results.html + fi + + if [ -f $ARCHIVES_LOC/${BW}*iperf*dl*client*txt ] + then + IPERF_TESTS=`ls $ARCHIVES_LOC/${BW}*iperf*client*txt` + else + echo "There are no iperf files" + IPERF_TESTS="" + fi + for IPERF_CASE in $IPERF_TESTS + do + echo " " >> ./test_simulator_results.html + NAME=`echo $IPERF_CASE | sed -e "s#$ARCHIVES_LOC/##"` + echo " $NAME" >> ./test_simulator_results.html + CMD=`egrep "COMMAND IS" $IPERF_CASE | sed -e "s#COMMAND IS: ##"` + echo " $CMD" >> ./test_simulator_results.html + REQ_BITRATE=`echo $CMD | sed -e "s#^.*-b ##" -e "s#-i 1.*##"` + if [[ $REQ_BITRATE =~ .*K.* ]] + then + REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#K##"` + FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000.0" | bc -l` + fi + if [[ $REQ_BITRATE =~ .*M.* ]] + then + REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#M##"` + FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000.0" | bc -l` + fi + if [[ $REQ_BITRATE =~ .*G.* ]] + then + REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#G##"` + FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000000.0" | bc -l` + fi + FILE_COMPLETE=`egrep -c "Server Report" $IPERF_CASE` + if [ $FILE_COMPLETE -eq 0 ] + then + echo " KO" >> ./test_simulator_results.html + SERVER_FILE=`echo $IPERF_CASE | sed -e "s#client#server#"` + FLOAT_EFF_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; printf "%.0f", br}'` + EFFECTIVE_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; if(br>1000000){printf "%.2f MBits/sec", br/1000000}}'` + PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'` + JITTER=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*/sec *##" -e "s# *ms.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{jitter=s/n; printf "%.3f ms", jitter}'` + PACKETLOSS_NOSIGN=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*(##" -e "s#%.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{per=s/n; printf "%.1f", per}'` + PACKETLOSS=`echo "${PACKETLOSS_NOSIGN}%"` + else + EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"` + if [[ $EFFECTIVE_BITRATE =~ .*Kbits/sec.* ]] + then + EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Kbits/sec.*##"` + FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000" | bc -l` + fi + if [[ $EFFECTIVE_BITRATE =~ .*Mbits/sec.* ]] + then + EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Mbits/sec.*##"` + FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000" | bc -l` + fi + if [[ $EFFECTIVE_BITRATE =~ .*Gbits/sec.* ]] + then + EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Gbits/sec.*##"` + FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000000" | bc -l` + fi + PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'` + PERF_INT=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.0f", $0}'` + if [[ $PERF_INT -lt 90 ]] + then + echo " KO" >> ./test_simulator_results.html + else + echo " OK" >> ./test_simulator_results.html + fi + EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"` + JITTER=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*Mbits/sec *##" -e "s#ms.*#ms#"` + PACKETLOSS=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*(##" -e "s#).*##"` fi echo " " >> ./test_simulator_results.html echo "
" >> ./test_simulator_results.html
-            STATS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*received, ##" -e "s#, time.*##" -e "s# packet loss##"`
-            echo "Packet Loss : $STATS" >> ./test_simulator_results.html
-            RTTMIN=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[1] " " $5}'`
-            echo "RTT Minimal : $RTTMIN" >> ./test_simulator_results.html
-            RTTAVG=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[2] " " $5}'`
-            echo "RTT Average : $RTTAVG" >> ./test_simulator_results.html
-            RTTMAX=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[3] " " $5}'`
-            echo "RTT Maximal : $RTTMAX" >> ./test_simulator_results.html
+            echo "Bitrate      : $EFFECTIVE_BITRATE" >> ./test_simulator_results.html
+            echo "Bitrate Perf : $PERF %" >> ./test_simulator_results.html
+            echo "Jitter       : $JITTER" >> ./test_simulator_results.html
+            echo "Packet Loss  : $PACKETLOSS" >> ./test_simulator_results.html
             echo "            
" >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html - fi - echo " " >> ./test_simulator_results.html - done - - IPERF_TESTS=`ls $ARCHIVES_LOC/*iperf*client*txt` - for IPERF_CASE in $IPERF_TESTS - do - echo " " >> ./test_simulator_results.html - NAME=`echo $IPERF_CASE | sed -e "s#$ARCHIVES_LOC/##"` - echo " $NAME" >> ./test_simulator_results.html - CMD=`egrep "COMMAND IS" $IPERF_CASE | sed -e "s#COMMAND IS: ##"` - echo " $CMD" >> ./test_simulator_results.html - REQ_BITRATE=`echo $CMD | sed -e "s#^.*-b ##" -e "s#-i 1.*##"` - if [[ $REQ_BITRATE =~ .*K.* ]] - then - REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#K##"` - FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000.0" | bc -l` - fi - if [[ $REQ_BITRATE =~ .*M.* ]] - then - REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#M##"` - FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000.0" | bc -l` - fi - if [[ $REQ_BITRATE =~ .*G.* ]] - then - REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#G##"` - FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000000.0" | bc -l` - fi - FILE_COMPLETE=`egrep -c "Server Report" $IPERF_CASE` - if [ $FILE_COMPLETE -eq 0 ] - then - echo " KO" >> ./test_simulator_results.html - SERVER_FILE=`echo $IPERF_CASE | sed -e "s#client#server#"` - FLOAT_EFF_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; printf "%.0f", br}'` - EFFECTIVE_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; if(br>1000000){printf "%.2f MBits/sec", br/1000000}}'` - PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'` - JITTER=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*/sec *##" -e "s# *ms.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{jitter=s/n; printf "%.3f ms", jitter}'` - PACKETLOSS_NOSIGN=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*(##" -e "s#%.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{per=s/n; printf "%.1f", per}'` - PACKETLOSS=`echo "${PACKETLOSS_NOSIGN}%"` - else - EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"` - if [[ $EFFECTIVE_BITRATE =~ .*Kbits/sec.* ]] - then - EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Kbits/sec.*##"` - FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000" | bc -l` - fi - if [[ $EFFECTIVE_BITRATE =~ .*Mbits/sec.* ]] - then - EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Mbits/sec.*##"` - FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000" | bc -l` - fi - if [[ $EFFECTIVE_BITRATE =~ .*Gbits/sec.* ]] - then - EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Gbits/sec.*##"` - FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000000" | bc -l` - fi - PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'` - PERF_INT=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.0f", $0}'` - if [[ $PERF_INT -lt 90 ]] - then - echo " KO" >> ./test_simulator_results.html - else - echo " OK" >> ./test_simulator_results.html - fi - EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"` - JITTER=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*Mbits/sec *##" -e "s#ms.*#ms#"` - PACKETLOSS=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*(##" -e "s#).*##"` - fi - echo " " >> ./test_simulator_results.html - echo "
" >> ./test_simulator_results.html
-        echo "Bitrate      : $EFFECTIVE_BITRATE" >> ./test_simulator_results.html
-        echo "Bitrate Perf : $PERF %" >> ./test_simulator_results.html
-        echo "Jitter       : $JITTER" >> ./test_simulator_results.html
-        echo "Packet Loss  : $PACKETLOSS" >> ./test_simulator_results.html
-        echo "            
" >> ./test_simulator_results.html - echo " " >> ./test_simulator_results.html - echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + done done echo " " >> ./test_simulator_results.html From d4d2f8665e54aecf5881c0c06405a12a46cd8382 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Mon, 10 Sep 2018 14:50:30 +0200 Subject: [PATCH 202/379] timing statistics and memory clearing --- openair1/PHY/CODING/TESTBENCH/polartest.c | 24 +++++- .../CODING/nrPolar_tools/nr_polar_decoder.c | 75 ++++++++++++++----- .../PHY/CODING/nrPolar_tools/nr_polar_defs.h | 12 ++- 3 files changed, 87 insertions(+), 24 deletions(-) diff --git a/openair1/PHY/CODING/TESTBENCH/polartest.c b/openair1/PHY/CODING/TESTBENCH/polartest.c index 144b63b353..e844ed74db 100644 --- a/openair1/PHY/CODING/TESTBENCH/polartest.c +++ b/openair1/PHY/CODING/TESTBENCH/polartest.c @@ -15,10 +15,20 @@ int main(int argc, char *argv[]) { //Initiate timing. (Results depend on CPU Frequency. Therefore, might change due to performance variances during simulation.) time_stats_t timeEncoder,timeDecoder; + time_stats_t polar_decoder_init,polar_rate_matching,decoding,bit_extraction,deinterleaving; + time_stats_t path_metric,sorting,update_LLR; opp_enabled=1; cpu_freq_GHz = get_cpu_freq_GHz(); reset_meas(&timeEncoder); reset_meas(&timeDecoder); + reset_meas(&polar_decoder_init); + reset_meas(&polar_rate_matching); + reset_meas(&decoding); + reset_meas(&bit_extraction); + reset_meas(&deinterleaving); + reset_meas(&sorting); + reset_meas(&path_metric); + reset_meas(&update_LLR); randominit(0); //Default simulation values (Aim for iterations = 1000000.) @@ -128,7 +138,7 @@ int main(int argc, char *argv[]) { // We assume no a priori knowledge available about the payload. double aPrioriArray[nrPolar_params.payloadBits]; - for (int i=0; in+1), polarParams->N); uint8_t **bitUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True uint8_t **llrUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True @@ -48,9 +59,15 @@ int8_t polar_decoder( for (int i=0; i<(2*listSize); i++) { pathMetric[i] = 0; crcState[i]=1; - for (int j=0; j< polarParams->n+1; j++) memset((void*)&bit[i][j][0],0,sizeof(uint8_t)*polarParams->N); + for (int j=0; j< polarParams->n+1; j++) { + memset((void*)&bit[i][j][0],0,sizeof(uint8_t)*polarParams->N); + memset((void*)&llr[i][j][0],0,sizeof(double)*polarParams->N); + } + for (int j=0;jcrcParityBits;j++) crcChecksum[j][i] = 0; } - for (int i=0; iN; i++) { + for (int i=0; iN; i++) { + memset((void *)&llrUpdated[i][0],0,sizeof(uint8_t)*polarParams->n); + memset((void *)&bitUpdated[i][0],0,sizeof(uint8_t)*polarParams->n); llrUpdated[i][polarParams->n]=1; bitUpdated[i][0]=((polarParams->information_bit_pattern[i]+1) % 2); } @@ -92,42 +109,53 @@ int8_t polar_decoder( } } + stop_meas(init); + start_meas(polar_rate_matching); + double *d_tilde = malloc(sizeof(double) * polarParams->N); nr_polar_rate_matching(input, d_tilde, polarParams->rate_matching_pattern, polarParams->K, polarParams->N, polarParams->encoderLength); - for (int j = 0; j < polarParams->N; j++) llr[0][polarParams->n][j]=d_tilde[j]; - + memcpy((void*)&llr[0][polarParams->n][0],(void*)&d_tilde[0],sizeof(double)*polarParams->N); + stop_meas(polar_rate_matching); /* * SCL polar decoder. */ - + start_meas(decoding); uint32_t nonFrozenBit=0; uint8_t currentListSize=1; uint8_t decoderIterationCheck=0; int16_t checkCrcBits=-1; - uint8_t listIndex[2*listSize], copyIndex; + uint8_t listIndex[2*listSize], copyIndex=0; // for (uint8_t i = 0; i < 2*listSize; i++) listIndex[i]=i; for (uint16_t currentBit=0; currentBitN; currentBit++){ // printf("***************** BIT %d\n",currentBit); + start_meas(update_LLR); updateLLR(llr, llrUpdated, bit, bitUpdated, currentListSize, currentBit, 0, polarParams->N, (polarParams->n+1), pathMetricAppr); + stop_meas(update_LLR); if (polarParams->information_bit_pattern[currentBit]==0) { //Frozen bit. updatePathMetric(pathMetric, llr, currentListSize, 0, currentBit, pathMetricAppr); //approximation=0 --> 11b, approximation=1 --> 12 } else { //Information or CRC bit. - if ( (polarParams->interleaving_pattern[nonFrozenBit] <= polarParams->payloadBits) && (aPrioriPayload[polarParams->interleaving_pattern[nonFrozenBit]] == 0) ) { + if ( (polarParams->interleaving_pattern[nonFrozenBit] < polarParams->payloadBits) && (aPrioriPayload[polarParams->interleaving_pattern[nonFrozenBit]] == 0) ) { + printf("app[%d] %f, payloadBits %d\n",polarParams->interleaving_pattern[nonFrozenBit], + polarParams->payloadBits, + aPrioriPayload[polarParams->interleaving_pattern[nonFrozenBit]]); + //Information bit with known value of "0". updatePathMetric(pathMetric, llr, currentListSize, 0, currentBit, pathMetricAppr); bitUpdated[currentBit][0]=1; //0=False, 1=True - } else if ( (polarParams->interleaving_pattern[nonFrozenBit] <= polarParams->payloadBits) && (aPrioriPayload[polarParams->interleaving_pattern[nonFrozenBit]] == 1) ) { + } else if ( (polarParams->interleaving_pattern[nonFrozenBit] < polarParams->payloadBits) && (aPrioriPayload[polarParams->interleaving_pattern[nonFrozenBit]] == 1) ) { //Information bit with known value of "1". updatePathMetric(pathMetric, llr, currentListSize, 1, currentBit, pathMetricAppr); for (uint8_t i=0; icrcParityBits); } else { - updatePathMetric2(pathMetric, llr, currentListSize, currentBit, pathMetricAppr); - + start_meas(path_metric); + updatePathMetric2(pathMetric, llr, currentListSize, currentBit, pathMetricAppr); + stop_meas(path_metric); + start_meas(sorting); for (int i = 0; i < currentListSize; i++) { for (int k = 0; k < (polarParams->n+1); k++) { /* @@ -201,13 +229,15 @@ int8_t polar_decoder( copyIndex = listIndex[k]; } - for (int j = 0; j < (polarParams->n + 1); j++) { - /* for (int i = 0; i < polarParams->N; i++) { - bit[k][j][i] = bit[copyIndex][j][i]; - llr[k][j][i] = llr[copyIndex][j][i]; - }*/ - memcpy((void*)&bit[k][j][0],(void*)&bit[copyIndex][j][0],sizeof(uint8_t)*polarParams->N); - memcpy((void*)&llr[k][j][0],(void*)&llr[copyIndex][j][0],sizeof(double)*polarParams->N); + if (copyIndex!=k) { + for (int j = 0; j < (polarParams->n + 1); j++) { + /* for (int i = 0; i < polarParams->N; i++) { + bit[k][j][i] = bit[copyIndex][j][i]; + llr[k][j][i] = llr[copyIndex][j][i]; + }*/ + memcpy((void*)&bit[k][j][0],(void*)&bit[copyIndex][j][0],sizeof(uint8_t)*polarParams->N); + memcpy((void*)&llr[k][j][0],(void*)&llr[copyIndex][j][0],sizeof(double)*polarParams->N); + } } } for (int k = 0; k < listSize; k++) { @@ -230,6 +260,7 @@ int8_t polar_decoder( } currentListSize = listSize; } + stop_meas(sorting); } for (int i=0; icrcParityBits; i++) { @@ -256,6 +287,7 @@ int8_t polar_decoder( nr_free_uint8_t_3D_array(bit, 2*listSize, (polarParams->n+1)); nr_free_double_3D_array(llr, 2*listSize, (polarParams->n+1)); nr_free_uint8_t_2D_array(crcChecksum, polarParams->crcParityBits); + stop_meas(decoding); return(-1); } @@ -272,12 +304,14 @@ int8_t polar_decoder( if ( crcState[listIndex[i]] == 1 ) { for (int j = 0; j < polarParams->N; j++) polarParams->nr_polar_u[j]=bit[listIndex[i]][0][j]; + start_meas(bit_extraction); //Extract the information bits (û to ĉ) nr_polar_info_bit_extraction(polarParams->nr_polar_u, polarParams->nr_polar_cPrime, polarParams->information_bit_pattern, polarParams->N); - + stop_meas(bit_extraction); //Deinterleaving (ĉ to b) + start_meas(deinterleaving); nr_polar_deinterleaver(polarParams->nr_polar_cPrime, polarParams->nr_polar_b, polarParams->interleaving_pattern, polarParams->K); - + stop_meas(deinterleaving); //Remove the CRC (â) for (int j = 0; j < polarParams->payloadBits; j++) output[j]=polarParams->nr_polar_b[j]; @@ -293,5 +327,6 @@ int8_t polar_decoder( nr_free_uint8_t_2D_array(crcChecksum, polarParams->crcParityBits); nr_free_uint8_t_2D_array(extended_crc_generator_matrix, polarParams->K); nr_free_uint8_t_2D_array(tempECGM, polarParams->K); + stop_meas(decoding); return(0); } diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h index 7caf547395..b568004da5 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h @@ -30,6 +30,8 @@ #include #include +#include "PHY/TOOLS/time_meas.h" + static const uint8_t nr_polar_subblock_interleaver_pattern[32] = { 0, 1, 2, 4, 3, 5, 6, 7, 8, 16, 9, 17, 10, 18, 11, 19, 12, 20, 13, 21, 14, 22, 15, 23, 24, 25, 26, 28, 27, 29, 30, 31 }; struct nrPolar_params { @@ -75,7 +77,15 @@ void polar_encoder(uint8_t *input, uint8_t *output, t_nrPolar_params* polarParam void nr_polar_kernal_operation(uint8_t *u, uint8_t *d, uint16_t N); int8_t polar_decoder(double *input, uint8_t *output, t_nrPolar_params *polarParams, - uint8_t listSize, double *aPrioriPayload, uint8_t pathMetricAppr); + uint8_t listSize, double *aPrioriPayload, uint8_t pathMetricAppr, + time_stats_t *init, + time_stats_t *polar_rate_matching, + time_stats_t *decoding, + time_stats_t *bit_extraction, + time_stats_t *deinterleaving, + time_stats_t *sorting, + time_stats_t *path_metric, + time_stats_t *update_LLR); void nr_polar_init(t_nrPolar_params* polarParams, int messageType); From 833016123a7ab8729486fbc70b23c43f57c9edff Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 10 Sep 2018 16:22:03 +0200 Subject: [PATCH 203/379] hotfix: revert commits that break the basic simulator This commit manually reverts the commits: - 97c69dc4a4f5b8946197c38f85c4919fc2804c31 - 3278aa494dcb68881be740668bf73b0df512734a The basic simulator was not functional anymore because the UE did not send RRCConnectionSetupComplete due to some problem in the PDCP layer, most probably. --- openair2/LAYER2/PDCP_v10.1.0/pdcp.c | 55 +++++++++++------------------ openair2/LAYER2/PDCP_v10.1.0/pdcp.h | 2 -- openair2/LAYER2/RLC/rlc.h | 1 - 3 files changed, 21 insertions(+), 37 deletions(-) diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index 135c6e73fa..05ddb4151f 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -169,11 +169,6 @@ boolean_t pdcp_data_req( start_meas(&UE_pdcp_stats[ctxt_pP->module_id].data_req); } - for (pdcp_uid = 0; pdcp_uid < MAX_MOBILES_PER_ENB; ++pdcp_uid) { - if (pdcp_enb[ctxt_pP->module_id].rnti[pdcp_uid] == ctxt_pP->rnti) - break; - } - // PDCP transparent mode for MBMS traffic if (modeP == PDCP_TRANSMISSION_MODE_TRANSPARENT) { @@ -371,24 +366,13 @@ boolean_t pdcp_data_req( LOG_DUMPMSG(PDCP,DEBUG_PDCP,(char *)pdcp_pdu_p->data,pdcp_pdu_size, "[MSG] PDCP DL %s PDU on rb_id %d\n",(srb_flagP)? "CONTROL" : "DATA", rb_idP); - /* if RLC buffer for this UE has been full, we want to skip all subsequent - * traffic for TM_SKIP_FULL_BUF_MS ms. Afterwards, it will be checkd again */ - if (pdcp_enb[ctxt_pP->module_id].time_buf_full[pdcp_uid] == 0 - || pdcp_enb[ctxt_pP->module_id].sfn - pdcp_enb[ctxt_pP->module_id].time_buf_full[pdcp_uid] >= TM_SKIP_FULL_BUF_MS) { - pdcp_enb[ctxt_pP->module_id].time_buf_full[pdcp_uid] = 0; - rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP, - confirmP, pdcp_pdu_size, pdcp_pdu_p + rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) - ,sourceL2Id - ,destinationL2Id + ,sourceL2Id + ,destinationL2Id #endif - ); - } else { - /* RLC would free pdcp_pdu_p, but since we skip it, have to do it - * ourselves and fake normal operation */ - free_mem_block(pdcp_pdu_p, __func__); - rlc_status = RLC_OP_SKIPPED_FUL_BUF; - } + ); + } switch (rlc_status) { @@ -399,24 +383,18 @@ boolean_t pdcp_data_req( case RLC_OP_STATUS_BAD_PARAMETER: LOG_W(PDCP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n"); - return FALSE; + ret= FALSE; + break; case RLC_OP_STATUS_INTERNAL_ERROR: LOG_W(PDCP, "Data sending request over RLC failed with 'Internal Error' reason!\n"); - return FALSE; + ret= FALSE; + break; case RLC_OP_STATUS_OUT_OF_RESSOURCES: - pdcp_enb[ctxt_pP->module_id].time_buf_full[pdcp_uid] = pdcp_enb[ctxt_pP->module_id].sfn; LOG_W(PDCP, "Data sending request over RLC failed with 'Out of Resources' reason!\n"); - int h = TM_SKIP_FULL_BUF_MS; - LOG_W(PDCP, "Blocking incoming traffic for %d ms\n", h); - return FALSE; - - case RLC_OP_SKIPPED_FUL_BUF: - LOG_D(PDCP, "Skipping RLC request due to full buffer\n"); - /* fake good return so that GTP doesn't spam us and return immediately so - * that dropped traffic is not counted in PDCP traffic stats */ - return TRUE; + ret= FALSE; + break; default: LOG_W(PDCP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status); @@ -430,6 +408,16 @@ boolean_t pdcp_data_req( stop_meas(&UE_pdcp_stats[ctxt_pP->module_id].data_req); } + /* + * Control arrives here only if rlc_data_req() returns RLC_OP_STATUS_OK + * so we return TRUE afterwards + */ + + for (pdcp_uid=0; pdcp_uid< MAX_MOBILES_PER_ENB;pdcp_uid++){ + if (pdcp_enb[ctxt_pP->module_id].rnti[pdcp_uid] == ctxt_pP->rnti ) + break; + } + //LOG_I(PDCP,"ueid %d lcid %d tx seq num %d\n", pdcp_uid, rb_idP+rb_offset, current_sn); Pdcp_stats_tx[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]++; Pdcp_stats_tx_tmp_w[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]++; @@ -1078,7 +1066,6 @@ void pdcp_add_UE(const protocol_ctxt_t* const ctxt_pP){ if (pdcp_enb[ctxt_pP->module_id].rnti[i] == 0 ){ pdcp_enb[ctxt_pP->module_id].rnti[i]=ctxt_pP->rnti; pdcp_enb[ctxt_pP->module_id].uid[i]=i; - pdcp_enb[ctxt_pP->module_id].time_buf_full[i] = 0; pdcp_enb[ctxt_pP->module_id].num_ues++; printf("add new uid is %d %x\n\n", i, ctxt_pP->rnti); // ret=1; diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h index 1bfe4e022a..054bb5fac4 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h @@ -106,8 +106,6 @@ typedef struct pdcp_enb_s { uint16_t uid[MAX_MOBILES_PER_ENB]; rnti_t rnti[MAX_MOBILES_PER_ENB]; uint16_t num_ues; -#define TM_SKIP_FULL_BUF_MS (500) - uint64_t time_buf_full[MAX_MOBILES_PER_ENB]; uint64_t sfn; frame_t frame; diff --git a/openair2/LAYER2/RLC/rlc.h b/openair2/LAYER2/RLC/rlc.h index dfb22f1a0d..8c557188a2 100644 --- a/openair2/LAYER2/RLC/rlc.h +++ b/openair2/LAYER2/RLC/rlc.h @@ -67,7 +67,6 @@ typedef uint64_t hash_key_t; #define RLC_OP_STATUS_BAD_PARAMETER 22 #define RLC_OP_STATUS_INTERNAL_ERROR 2 #define RLC_OP_STATUS_OUT_OF_RESSOURCES 3 -#define RLC_OP_SKIPPED_FUL_BUF 4 #define RLC_MUI_UNDEFINED (mui_t)0 From 00e21e74a68a1db7fd8c78b9da00ee1017e0b3ac Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 10 Sep 2018 16:32:20 +0200 Subject: [PATCH 204/379] integration fix: better error reporting in case of X2 failure If the IP address for X2AP is not good, the error message reported was very unclear. Attempt to make it better. --- openair2/X2AP/x2ap_eNB.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openair2/X2AP/x2ap_eNB.c b/openair2/X2AP/x2ap_eNB.c index 4f23b5ddfe..a1469509a9 100644 --- a/openair2/X2AP/x2ap_eNB.c +++ b/openair2/X2AP/x2ap_eNB.c @@ -371,7 +371,10 @@ void x2ap_eNB_handle_sctp_init_msg_multi_cnf( /* Exit if CNF message reports failure. * Failure means multi_sd < 0. */ - DevAssert(instance->multi_sd >= 0); + if (instance->multi_sd < 0) { + X2AP_ERROR("Error: be sure to properly configure X2 in your configuration file.\n"); + DevAssert(instance->multi_sd >= 0); + } /* Trying to connect to the provided list of eNB ip address */ From d5e94b2ca08b653c841d816b6a2558412d54ab8f Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Tue, 11 Sep 2018 06:50:20 +0200 Subject: [PATCH 205/379] decoder_list_t structure for in-place computations --- .../CODING/nrPolar_tools/nr_polar_decoder.c | 237 ++++++++++-------- .../nrPolar_tools/nr_polar_decoding_tools.c | 169 ++++++------- .../PHY/CODING/nrPolar_tools/nr_polar_defs.h | 48 ++-- .../nrPolar_tools/nr_polar_matrix_and_array.c | 71 +++--- 4 files changed, 270 insertions(+), 255 deletions(-) diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c index cb9e829851..cb75811a11 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c @@ -29,14 +29,16 @@ #include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h" #include "PHY/TOOLS/time_meas.h" + + int8_t polar_decoder( double *input, uint8_t *output, t_nrPolar_params *polarParams, uint8_t listSize, double *aPrioriPayload, - uint8_t pathMetricAppr, - time_stats_t *init, + uint8_t pathMetricAppr, + time_stats_t *init, time_stats_t *polar_rate_matching, time_stats_t *decoding, time_stats_t *bit_extraction, @@ -48,23 +50,24 @@ int8_t polar_decoder( start_meas(init); - uint8_t ***bit = nr_alloc_uint8_t_3D_array(2*listSize, (polarParams->n+1), polarParams->N); + uint8_t **bitUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True uint8_t **llrUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True - double ***llr = nr_alloc_double_3D_array(2*listSize,(polarParams->n+1), polarParams->N); - uint8_t **crcChecksum = nr_alloc_uint8_t_2D_array(polarParams->crcParityBits, 2*listSize); - double *pathMetric = malloc(sizeof(double)*(2*listSize)); - uint8_t *crcState = malloc(sizeof(uint8_t)*(2*listSize)); //0=False, 1=True + decoder_list_t dlist[2*listSize]; - for (int i=0; i<(2*listSize); i++) { - pathMetric[i] = 0; - crcState[i]=1; - for (int j=0; j< polarParams->n+1; j++) { - memset((void*)&bit[i][j][0],0,sizeof(uint8_t)*polarParams->N); - memset((void*)&llr[i][j][0],0,sizeof(double)*polarParams->N); - } - for (int j=0;jcrcParityBits;j++) crcChecksum[j][i] = 0; + for ( int i=0;i<2*listSize;i++) { + dlist[i].bit = nr_alloc_uint8_t_2D_array((polarParams->n+1), polarParams->N); + dlist[i].llr = nr_alloc_double_2D_array((polarParams->n+1), polarParams->N); + dlist[i].crcChecksum = malloc(sizeof(uint8_t)*polarParams->crcParityBits); + for (int j=0; j< polarParams->n+1; j++) { + memset((void*)&dlist[i].bit[j][0],0,sizeof(uint8_t)*polarParams->N); + memset((void*)&dlist[i].llr[j][0],0,sizeof(double)*polarParams->N); + } + for (int j=0;jcrcParityBits;j++) dlist[i].crcChecksum[j] = 0; + dlist[i].crcState = 1; + dlist[i].pathMetric = 0; } + for (int i=0; iN; i++) { memset((void *)&llrUpdated[i][0],0,sizeof(uint8_t)*polarParams->n); memset((void *)&bitUpdated[i][0],0,sizeof(uint8_t)*polarParams->n); @@ -114,7 +117,7 @@ int8_t polar_decoder( double *d_tilde = malloc(sizeof(double) * polarParams->N); nr_polar_rate_matching(input, d_tilde, polarParams->rate_matching_pattern, polarParams->K, polarParams->N, polarParams->encoderLength); - memcpy((void*)&llr[0][polarParams->n][0],(void*)&d_tilde[0],sizeof(double)*polarParams->N); + memcpy((void*)&dlist[0].llr[polarParams->n][0],(void*)&d_tilde[0],sizeof(double)*polarParams->N); stop_meas(polar_rate_matching); /* @@ -125,69 +128,81 @@ int8_t polar_decoder( uint8_t currentListSize=1; uint8_t decoderIterationCheck=0; int16_t checkCrcBits=-1; - uint8_t listIndex[2*listSize], copyIndex=0; + uint8_t copyIndex=0; + + decoder_list_t *sorted_dlist[2*listSize]; + int listIndex[2*listSize]; + double pathMetric[2*listSize]; + + for (uint8_t i = 0; i < 2*listSize; i++) sorted_dlist[i] = &dlist[i]; - // for (uint8_t i = 0; i < 2*listSize; i++) listIndex[i]=i; for (uint16_t currentBit=0; currentBitN; currentBit++){ // printf("***************** BIT %d\n",currentBit); start_meas(update_LLR); - updateLLR(llr, llrUpdated, bit, bitUpdated, currentListSize, currentBit, 0, polarParams->N, (polarParams->n+1), pathMetricAppr); + updateLLR(sorted_dlist, llrUpdated, bitUpdated, currentListSize, currentBit, 0, polarParams->N, (polarParams->n+1), pathMetricAppr); stop_meas(update_LLR); - if (polarParams->information_bit_pattern[currentBit]==0) { //Frozen bit. - updatePathMetric(pathMetric, llr, currentListSize, 0, currentBit, pathMetricAppr); //approximation=0 --> 11b, approximation=1 --> 12 - } else { //Information or CRC bit. - if ( (polarParams->interleaving_pattern[nonFrozenBit] < polarParams->payloadBits) && (aPrioriPayload[polarParams->interleaving_pattern[nonFrozenBit]] == 0) ) { - printf("app[%d] %f, payloadBits %d\n",polarParams->interleaving_pattern[nonFrozenBit], - polarParams->payloadBits, - aPrioriPayload[polarParams->interleaving_pattern[nonFrozenBit]]); - //Information bit with known value of "0". - updatePathMetric(pathMetric, llr, currentListSize, 0, currentBit, pathMetricAppr); - bitUpdated[currentBit][0]=1; //0=False, 1=True - } else if ( (polarParams->interleaving_pattern[nonFrozenBit] < polarParams->payloadBits) && (aPrioriPayload[polarParams->interleaving_pattern[nonFrozenBit]] == 1) ) { - //Information bit with known value of "1". - updatePathMetric(pathMetric, llr, currentListSize, 1, currentBit, pathMetricAppr); - for (uint8_t i=0; icrcParityBits); - } else { - start_meas(path_metric); - updatePathMetric2(pathMetric, llr, currentListSize, currentBit, pathMetricAppr); - stop_meas(path_metric); - start_meas(sorting); - for (int i = 0; i < currentListSize; i++) { - for (int k = 0; k < (polarParams->n+1); k++) { - /* - for (int j = 0; j < polarParams->N; j++) { - bit[i+currentListSize][k][j]=bit[i][k][j]; - llr[i+currentListSize][k][j]=llr[i][k][j]; - }*/ - memcpy((void*)&bit[i+currentListSize][k][0],(void*)&bit[i][k][0],sizeof(uint8_t)*polarParams->N); - memcpy((void*)&llr[i+currentListSize][k][0],(void*)&llr[i][k][0],sizeof(double)*polarParams->N); - } - } + if (polarParams->information_bit_pattern[currentBit]==0) { //Frozen bit. + updatePathMetric(sorted_dlist,currentListSize, 0, currentBit, pathMetricAppr); //approximation=0 --> 11b, approximation=1 --> 12 + } else { //Information or CRC bit. + if ( (polarParams->interleaving_pattern[nonFrozenBit] < polarParams->payloadBits) && (aPrioriPayload[polarParams->interleaving_pattern[nonFrozenBit]] == 0) ) { + printf("app[%d] %f, payloadBits %d\n",polarParams->interleaving_pattern[nonFrozenBit], + polarParams->payloadBits, + aPrioriPayload[polarParams->interleaving_pattern[nonFrozenBit]]); + + //Information bit with known value of "0". + updatePathMetric(sorted_dlist, currentListSize, 0, currentBit, pathMetricAppr); + bitUpdated[currentBit][0]=1; //0=False, 1=True + } else if ( (polarParams->interleaving_pattern[nonFrozenBit] < polarParams->payloadBits) && (aPrioriPayload[polarParams->interleaving_pattern[nonFrozenBit]] == 1) ) { + //Information bit with known value of "1". + updatePathMetric(sorted_dlist, currentListSize, 1, currentBit, pathMetricAppr); + for (uint8_t i=0; ibit[0][currentBit]=1; + bitUpdated[currentBit][0]=1; + updateCrcChecksum(sorted_dlist, extended_crc_generator_matrix, currentListSize, nonFrozenBit, polarParams->crcParityBits); + } else { + start_meas(path_metric); + updatePathMetric2(sorted_dlist, currentListSize, currentBit, pathMetricAppr); + stop_meas(path_metric); + start_meas(sorting); + for (int i = 0; i < currentListSize; i++) { + for (int k = 0; k < (polarParams->n+1); k++) { + /* + for (int j = 0; j < polarParams->N; j++) { + bit[i+currentListSize][k][j]=bit[i][k][j]; + llr[i+currentListSize][k][j]=llr[i][k][j]; + }*/ + memcpy((void*)&sorted_dlist[i+currentListSize]->bit[k][0],(void*)&sorted_dlist[i]->bit[k][0],sizeof(uint8_t)*polarParams->N); + memcpy((void*)&sorted_dlist[i+currentListSize]->llr[k][0],(void*)&sorted_dlist[i]->llr[k][0],sizeof(double)*polarParams->N); + } + } + + for (int i = 0; i < currentListSize; i++) { + sorted_dlist[i]->bit[0][currentBit]=0; + sorted_dlist[i+currentListSize]->crcState=sorted_dlist[i]->crcState; + } + for (int i = currentListSize; i < 2*currentListSize; i++) sorted_dlist[i]->bit[currentBit]=1; + bitUpdated[currentBit][0]=1; + updateCrcChecksum2(sorted_dlist,extended_crc_generator_matrix, currentListSize, nonFrozenBit, polarParams->crcParityBits); + currentListSize*=2; + + //Keep only the best "listSize" number of entries. + if (currentListSize > listSize) { + for (int i = 0; i < 2*listSize; i++) { + listIndex[i]=i; + pathMetric[i] = dlist[i].pathMetric; + } - for (int i = 0; i < currentListSize; i++) { - bit[i][0][currentBit]=0; - crcState[i+currentListSize]=crcState[i]; - } - for (int i = currentListSize; i < 2*currentListSize; i++) bit[i][0][currentBit]=1; - bitUpdated[currentBit][0]=1; - updateCrcChecksum2(crcChecksum, extended_crc_generator_matrix, currentListSize, nonFrozenBit, polarParams->crcParityBits); - currentListSize*=2; - - //Keep only the best "listSize" number of entries. - if (currentListSize > listSize) { - for (uint8_t i = 0; i < 2*listSize; i++) listIndex[i]=i; - nr_sort_asc_double_1D_array_ind(pathMetric, listIndex, currentListSize); - - //sort listIndex[listSize, ..., 2*listSize-1] in descending order. - uint8_t swaps, tempInd; - for (uint8_t i = 0; i < listSize; i++) { - swaps = 0; - for (uint8_t j = listSize; j < (2*listSize - i) - 1; j++) { - if (listIndex[j+1] > listIndex[j]) { + nr_sort_asc_double_1D_array_ind(pathMetric, listIndex, currentListSize); + for (int i = 0; i < 2*listSize; i++) sorted_dlist[i]=&dlist[listIndex[i]]; + } + /* + //sort listIndex[listSize, ..., 2*listSize-1] in descending order. + uint8_t swaps, tempInd; + for (uint8_t i = 0; i < listSize; i++) { + swaps = 0; + for (uint8_t j = listSize; j < (2*listSize - i) - 1; j++) { + if (listIndex[j+1] > listIndex[j]) { tempInd = listIndex[j]; listIndex[j] = listIndex[j + 1]; listIndex[j + 1] = tempInd; @@ -201,11 +216,11 @@ int8_t polar_decoder( //First, backup the best "listSize" number of entries. for (int k=(listSize-1); k>0; k--) { for (int j=0; j<(polarParams->n+1); j++) { - /* - for (int i=0; iN; i++) { - bit[listIndex[(2*listSize-1)-k]][j][i]=bit[listIndex[k]][j][i]; - llr[listIndex[(2*listSize-1)-k]][j][i]=llr[listIndex[k]][j][i]; - }*/ + + //for (int i=0; iN; i++) { + // bit[listIndex[(2*listSize-1)-k]][j][i]=bit[listIndex[k]][j][i]; + // llr[listIndex[(2*listSize-1)-k]][j][i]=llr[listIndex[k]][j][i]; + // } memcpy((void*)&bit[listIndex[(2*listSize-1)-k]][j][0], (void*)&bit[listIndex[k]][j][0], sizeof(uint8_t)*polarParams->N); @@ -231,10 +246,10 @@ int8_t polar_decoder( if (copyIndex!=k) { for (int j = 0; j < (polarParams->n + 1); j++) { - /* for (int i = 0; i < polarParams->N; i++) { - bit[k][j][i] = bit[copyIndex][j][i]; - llr[k][j][i] = llr[copyIndex][j][i]; - }*/ + //for (int i = 0; i < polarParams->N; i++) { + // bit[k][j][i] = bit[copyIndex][j][i]; + // llr[k][j][i] = llr[copyIndex][j][i]; + // } memcpy((void*)&bit[k][j][0],(void*)&bit[copyIndex][j][0],sizeof(uint8_t)*polarParams->N); memcpy((void*)&llr[k][j][0],(void*)&llr[copyIndex][j][0],sizeof(double)*polarParams->N); } @@ -259,7 +274,7 @@ int8_t polar_decoder( crcState[k]=crcState[copyIndex]; } currentListSize = listSize; - } + }*/ stop_meas(sorting); } @@ -272,21 +287,21 @@ int8_t polar_decoder( if ( checkCrcBits > (-1) ) { for (uint8_t i = 0; i < currentListSize; i++) { - if (crcChecksum[checkCrcBits][i]==1) { - crcState[i]=0; //0=False, 1=True + if (dlist[i].crcChecksum[checkCrcBits]==1) { + dlist[i].crcState=0; //0=False, 1=True } } } - for (uint8_t i = 0; i < currentListSize; i++) decoderIterationCheck+=crcState[i]; + for (uint8_t i = 0; i < currentListSize; i++) decoderIterationCheck+=sorted_dlist[i]->crcState; if (decoderIterationCheck==0) { //perror("[SCL polar decoder] All list entries have failed the CRC checks."); free(d_tilde); - free(pathMetric); - free(crcState); - nr_free_uint8_t_3D_array(bit, 2*listSize, (polarParams->n+1)); - nr_free_double_3D_array(llr, 2*listSize, (polarParams->n+1)); - nr_free_uint8_t_2D_array(crcChecksum, polarParams->crcParityBits); + for (int i=0;i<2*listSize;i++) { + nr_free_uint8_t_2D_array(dlist[i].bit, (polarParams->n+1)); + nr_free_double_2D_array(dlist[i].llr, (polarParams->n+1)); + free(dlist[i].crcChecksum); + } stop_meas(decoding); return(-1); } @@ -301,30 +316,30 @@ int8_t polar_decoder( nr_sort_asc_double_1D_array_ind(pathMetric, listIndex, currentListSize); for (uint8_t i = 0; i < fmin(listSize, (pow(2,polarParams->crcCorrectionBits)) ); i++) { - if ( crcState[listIndex[i]] == 1 ) { - for (int j = 0; j < polarParams->N; j++) polarParams->nr_polar_u[j]=bit[listIndex[i]][0][j]; - - start_meas(bit_extraction); - //Extract the information bits (û to ĉ) - nr_polar_info_bit_extraction(polarParams->nr_polar_u, polarParams->nr_polar_cPrime, polarParams->information_bit_pattern, polarParams->N); - stop_meas(bit_extraction); - //Deinterleaving (ĉ to b) - start_meas(deinterleaving); - nr_polar_deinterleaver(polarParams->nr_polar_cPrime, polarParams->nr_polar_b, polarParams->interleaving_pattern, polarParams->K); - stop_meas(deinterleaving); - //Remove the CRC (â) - for (int j = 0; j < polarParams->payloadBits; j++) output[j]=polarParams->nr_polar_b[j]; - - break; - } + if ( dlist[i].crcState == 1 ) { + for (int j = 0; j < polarParams->N; j++) polarParams->nr_polar_u[j]=dlist[listIndex[i]].bit[0][j]; + + start_meas(bit_extraction); + //Extract the information bits (û to ĉ) + nr_polar_info_bit_extraction(polarParams->nr_polar_u, polarParams->nr_polar_cPrime, polarParams->information_bit_pattern, polarParams->N); + stop_meas(bit_extraction); + //Deinterleaving (ĉ to b) + start_meas(deinterleaving); + nr_polar_deinterleaver(polarParams->nr_polar_cPrime, polarParams->nr_polar_b, polarParams->interleaving_pattern, polarParams->K); + stop_meas(deinterleaving); + //Remove the CRC (â) + for (int j = 0; j < polarParams->payloadBits; j++) output[j]=polarParams->nr_polar_b[j]; + + break; + } } - + free(d_tilde); - free(pathMetric); - free(crcState); - nr_free_uint8_t_3D_array(bit, 2*listSize, (polarParams->n+1)); - nr_free_double_3D_array(llr, 2*listSize, (polarParams->n+1)); - nr_free_uint8_t_2D_array(crcChecksum, polarParams->crcParityBits); + for (int i=0;i<2*listSize;i++) { + nr_free_uint8_t_2D_array(dlist[i].bit, (polarParams->n+1)); + nr_free_double_2D_array(dlist[i].llr, (polarParams->n+1)); + free(dlist[i].crcChecksum); + } nr_free_uint8_t_2D_array(extended_crc_generator_matrix, polarParams->K); nr_free_uint8_t_2D_array(tempECGM, polarParams->K); stop_meas(decoding); diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c index 888c209090..83ebbdb6c3 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c @@ -22,59 +22,85 @@ #include "PHY/CODING/nrPolar_tools/nr_polar_defs.h" //#define SHOWCOMP 1 -void updateLLR(double ***llr, uint8_t **llrU, uint8_t ***bit, uint8_t **bitU, +inline void computeLLR(double **llr, uint16_t row, uint16_t col, + uint16_t offset, uint8_t approximation) __attribute__((always_inline)); +inline void computeLLR(double **llr, uint16_t row, uint16_t col, + uint16_t offset, uint8_t approximation) { + + double a; + double b; + double absA,absB; + + +#ifdef SHOWCOMP + printf("computeLLR (%d,%d,%d,%d)\n",row,col,offset,i); +#endif + a = llr[col + 1][row]; + b = llr[col+1][row + offset]; + + if (approximation) { //eq. (9) + absA = fabs(a); + absB = fabs(b); + llr[col][row] = copysign(1.0, a) * copysign(1.0, b) * fmin(absA, absB); + } else { //eq. (8a) + llr[col][row] = log((exp(a + b) + 1) / (exp(a) + exp(b))); + } +} + + +void updateLLR(decoder_list_t **dlist,uint8_t **llrU, uint8_t **bitU, uint8_t listSize, uint16_t row, uint16_t col, uint16_t xlen, uint8_t ylen, uint8_t approximation) { uint16_t offset = (xlen/(1<<(ylen-col-1))); if (( (row) % (2*offset) ) >= offset ) { - if (bitU[row-offset][col]==0) updateBit(bit, bitU, listSize, (row-offset), col, xlen, ylen); - if (llrU[row-offset][col+1]==0) updateLLR(llr, llrU, bit, bitU, listSize, (row-offset), (col+1), xlen, ylen, approximation); - if (llrU[row][col+1]==0) updateLLR(llr, llrU, bit, bitU, listSize, row, (col+1), xlen, ylen, approximation); + if (bitU[row-offset][col]==0) updateBit(dlist, bitU, listSize, (row-offset), col, xlen, ylen); + if (llrU[row-offset][col+1]==0) updateLLR(dlist, llrU, bitU, listSize, (row-offset), (col+1), xlen, ylen, approximation); + if (llrU[row][col+1]==0) updateLLR(dlist, llrU, bitU, listSize, row, (col+1), xlen, ylen, approximation); for (uint8_t i=0; illr[col][row] = (pow((-1),dlist[i]->bit[col][row-offset])*dlist[i]->llr[col+1][row-offset]) + dlist[i]->llr[col+1][row]; } } else { - if (llrU[row][col+1]==0) updateLLR(llr, llrU, bit, bitU, listSize, row, (col+1), xlen, ylen, approximation); - if (llrU[row+offset][col+1]==0) updateLLR(llr, llrU, bit, bitU, listSize, (row+offset), (col+1), xlen, ylen, approximation); - computeLLR(llr, row, col, listSize, offset, approximation); - + if (llrU[row][col+1]==0) updateLLR(dlist, llrU, bitU, listSize, row, (col+1), xlen, ylen, approximation); + if (llrU[row+offset][col+1]==0) updateLLR(dlist, llrU, bitU, listSize, (row+offset), (col+1), xlen, ylen, approximation); + for (int i=0;illr, row, col, offset, approximation); + } - + llrU[row][col]=1; } -void updateBit(uint8_t ***bit, uint8_t **bitU, uint8_t listSize, uint16_t row, - uint16_t col, uint16_t xlen, uint8_t ylen) { - uint16_t offset = ( xlen/(pow(2,(ylen-col))) ); - - for (uint8_t i=0; i= offset ) { - if (bitU[row][col-1]==0) updateBit(bit, bitU, listSize, row, (col-1), xlen, ylen); - bit[i][col][row] = bit[i][col-1][row]; +void updateBit(decoder_list_t **dlist, uint8_t **bitU, uint8_t listSize, uint16_t row, + uint16_t col, uint16_t xlen, uint8_t ylen) { + uint16_t offset = ( xlen/(pow(2,(ylen-col))) ); + + for (uint8_t i=0; i= offset ) { + if (bitU[row][col-1]==0) updateBit(dlist, bitU, listSize, row, (col-1), xlen, ylen); + dlist[i]->bit[col][row] = dlist[i]->bit[col-1][row]; #ifdef SHOWCOMP - printf("updating bit (%d,%d,%d) from (%d,%d,%d)\n", - row,col,i,row,col-1,i); + printf("updating bit (%d,%d,%d) from (%d,%d,%d)\n", + row,col,i,row,col-1,i); #endif - } else { - if (bitU[row][col-1]==0) updateBit(bit, bitU, listSize, row, (col-1), xlen, ylen); - if (bitU[row+offset][col-1]==0) updateBit(bit, bitU, listSize, (row+offset), (col-1), xlen, ylen); - bit[i][col][row] = ( (bit[i][col-1][row]+bit[i][col-1][row+offset]) % 2); + } else { + if (bitU[row][col-1]==0) updateBit(dlist, bitU, listSize, row, (col-1), xlen, ylen); + if (bitU[row+offset][col-1]==0) updateBit(dlist, bitU, listSize, (row+offset), (col-1), xlen, ylen); + dlist[i]->bit[col][row] = ( (dlist[i]->bit[col-1][row]+dlist[i]->bit[col-1][row+offset]) % 2); #ifdef SHOWCOMP - printf("updating bit (%d,%d,%d) from (%d,%d,%d)+(%d,%d,%d)\n", - row,col,i,row,col-1,i,row+offset,col-1,i); + printf("updating bit (%d,%d,%d) from (%d,%d,%d)+(%d,%d,%d)\n", + row,col,i,row,col-1,i,row+offset,col-1,i); #endif - } - } - - bitU[row][col]=1; + } + } + + bitU[row][col]=1; } -void updatePathMetric(double *pathMetric, double ***llr, uint8_t listSize, uint8_t bitValue, +void updatePathMetric(decoder_list_t **dlist,uint8_t listSize, uint8_t bitValue, uint16_t row, uint8_t approximation) { #ifdef SHOWCOMP @@ -84,11 +110,11 @@ void updatePathMetric(double *pathMetric, double ***llr, uint8_t listSize, uint8 if (approximation) { //eq. (12) for (uint8_t i=0; illr[0][row]) )) dlist[i]->pathMetric += fabs(dlist[i]->llr[0][row]); } } else { //eq. (11b) int8_t multiplier = (2*bitValue) - 1; - for (uint8_t i=0; ipathMetric += log ( 1 + exp(multiplier*dlist[i]->llr[0][row]) ) ; } } @@ -124,13 +150,13 @@ void updatePathMetric2(double *pathMetric, double ***llr, uint8_t listSize, uint } */ -void updatePathMetric2(double *pathMetric, double ***llr, uint8_t listSize, uint16_t row, uint8_t appr) { - - double *pm2=&pathMetric[listSize]; - memcpy((void*)pm2,(void*)pathMetric,listSize*sizeof(double*)); +void updatePathMetric2(decoder_list_t **dlist, uint8_t listSize, uint16_t row, uint8_t appr) { int i; + for (i=0;ipathMetric = dlist[i]->pathMetric; + decoder_list_t **dlist2 = &dlist[listSize]; + #ifdef SHOWCOMP printf("updating path_metric from information bit (%d,%d) \n", row,0); @@ -138,65 +164,36 @@ void updatePathMetric2(double *pathMetric, double ***llr, uint8_t listSize, uint if (appr) { //eq. (12) for (i = 0; i < listSize; i++) { // bitValue=0 - if (llr[i][0][row]<0) pathMetric[i] -= llr[i][0][row]; + if (dlist[i]->llr[0][row]<0) dlist[i]->pathMetric -= dlist[i]->llr[0][row]; // bitValue=1 - else pm2[i] += llr[i][0][row]; + else dlist2[i]->pathMetric += dlist[i]->llr[0][row]; } } else { //eq. (11b) for (i = 0; i < listSize; i++) { // bitValue=0 - pathMetric[i] += log(1 + exp(-llr[i][0][row])); + dlist[i]->pathMetric += log(1 + exp(-dlist[i]->llr[0][row])); // bitValue=1 - pm2[i] += log(1 + exp(llr[i][0][row])); + dlist2[i]->pathMetric += log(1 + exp(dlist[i]->llr[0][row])); } } } -inline void computeLLR(double ***llr, uint16_t row, uint16_t col, uint8_t listSize, - uint16_t offset, uint8_t approximation) __attribute__((always_inline)); -inline void computeLLR(double ***llr, uint16_t row, uint16_t col, uint8_t listSize, - uint16_t offset, uint8_t approximation) { - - double a; - double b; - double absA,absB; -#ifdef SHOWCOMP - printf("computeLLR (%d,%d,%d,%d)\n",row,col,offset,i); -#endif - if (approximation) { //eq. (9) - for (int i=0;icrcChecksum[j] = ( (dlist[i]->crcChecksum[j] + crcGen[i2][j]) % 2 ); + } + } } -void updateCrcChecksum(uint8_t **crcChecksum, uint8_t **crcGen, - uint8_t listSize, uint32_t i2, uint8_t len) { - for (uint8_t i = 0; i < listSize; i++) { - for (uint8_t j = 0; j < len; j++) { - crcChecksum[j][i] = ( (crcChecksum[j][i] + crcGen[i2][j]) % 2 ); - } - } -} - -void updateCrcChecksum2(uint8_t **crcChecksum, uint8_t **crcGen, - uint8_t listSize, uint32_t i2, uint8_t len) { - for (uint8_t i = 0; i < listSize; i++) { - for (uint8_t j = 0; j < len; j++) { - crcChecksum[j][i+listSize] = ( (crcChecksum[j][i] + crcGen[i2][j]) % 2 ); - } - } +void updateCrcChecksum2(decoder_list_t **dlist, uint8_t **crcGen, + uint8_t listSize, uint32_t i2, uint8_t len) { + for (uint8_t i = 0; i < listSize; i++) { + for (uint8_t j = 0; j < len; j++) { + dlist[i+listSize]->crcChecksum[j] = ( (dlist[i]->crcChecksum[j] + crcGen[i2][j]) % 2 ); + } + } } diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h index b568004da5..1faf13e885 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h @@ -124,27 +124,41 @@ void nr_matrix_multiplication_uint8_t_1D_uint8_t_2D(uint8_t *matrix1, uint8_t ** uint8_t ***nr_alloc_uint8_t_3D_array(uint16_t xlen, uint16_t ylen, uint16_t zlen); uint8_t **nr_alloc_uint8_t_2D_array(uint16_t xlen, uint16_t ylen); -double ***nr_alloc_double_3D_array(uint16_t xlen, uint16_t ylen, uint16_t zlen); +double **nr_alloc_double_2D_array(uint16_t xlen, uint16_t ylen); void nr_free_uint8_t_3D_array(uint8_t ***input, uint16_t xlen, uint16_t ylen); void nr_free_uint8_t_2D_array(uint8_t **input, uint16_t xlen); -void nr_free_double_3D_array(double ***input, uint16_t xlen, uint16_t ylen); +void nr_free_double_2D_array(double **input, uint16_t xlen); + + +typedef struct decoder_list_s { + + uint8_t **bit; + double **llr; + uint8_t *crcChecksum; + uint8_t crcState; + double pathMetric; + +} decoder_list_t; + +void updateLLR(decoder_list_t **dlist,uint8_t **llrU, uint8_t **bitU, + uint8_t listSize, uint16_t row, uint16_t col, uint16_t xlen, uint8_t ylen, uint8_t approximation); + +void updateBit(decoder_list_t **dlist, uint8_t **bitU, uint8_t listSize, uint16_t row, + uint16_t col, uint16_t xlen, uint8_t ylen); + +void updatePathMetric(decoder_list_t **dlist,uint8_t listSize, uint8_t bitValue, + uint16_t row, uint8_t approximation); + +void updatePathMetric2(decoder_list_t **dlist, uint8_t listSize, uint16_t row, uint8_t appr); + +void updateCrcChecksum(decoder_list_t **dlist, uint8_t **crcGen, + uint8_t listSize, uint32_t i2, uint8_t len); + +void updateCrcChecksum2(decoder_list_t **dlist, uint8_t **crcGen, + uint8_t listSize, uint32_t i2, uint8_t len); + -void updateLLR(double ***llr, uint8_t **llrU, uint8_t ***bit, uint8_t **bitU, - uint8_t listSize, uint16_t row, uint16_t col, uint16_t xlen, - uint8_t ylen, uint8_t approximation); -void updateBit(uint8_t ***bit, uint8_t **bitU, uint8_t listSize, uint16_t row, - uint16_t col, uint16_t xlen, uint8_t ylen); -void updatePathMetric(double *pathMetric, double ***llr, uint8_t listSize, - uint8_t bitValue, uint16_t row, uint8_t approximation); -void updatePathMetric2(double *pathMetric, double ***llr, uint8_t listSize, - uint16_t row, uint8_t approximation); -void computeLLR(double ***llr, uint16_t row, uint16_t col, uint8_t i, - uint16_t offset, uint8_t approximation); -void updateCrcChecksum(uint8_t **crcChecksum, uint8_t **crcGen, - uint8_t listSize, uint32_t i2, uint8_t len); -void updateCrcChecksum2(uint8_t **crcChecksum, uint8_t **crcGen, - uint8_t listSize, uint32_t i2, uint8_t len); void nr_sort_asc_double_1D_array_ind(double *matrix, uint8_t *ind, uint8_t len); uint8_t **crc24c_generator_matrix(uint16_t payloadSizeBits); diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_matrix_and_array.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_matrix_and_array.c index 572b016cfa..ad37cdbf27 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_matrix_and_array.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_matrix_and_array.c @@ -66,38 +66,30 @@ uint8_t ***nr_alloc_uint8_t_3D_array(uint16_t xlen, uint16_t ylen, uint16_t zlen return output; } -double ***nr_alloc_double_3D_array(uint16_t xlen, uint16_t ylen, uint16_t zlen) { - double ***output; - int i, j; +double **nr_alloc_double_2D_array(uint16_t xlen, uint16_t ylen) { + double **output; + int i, j; + + if ((output = malloc(xlen * sizeof(*output))) == NULL) { + perror("[nr_alloc_double_3D_array] Problem at 1D allocation"); + return NULL; + } + for (i = 0; i < xlen; i++) + output[i] = NULL; + + + for (i = 0; i < xlen; i++) + if ((output[i] = malloc(ylen * sizeof *output[i])) == NULL) { + perror("[nr_alloc_double_2D_array] Problem at 2D allocation"); + nr_free_double_2D_array(output, xlen); + return NULL; + } + for (i = 0; i < xlen; i++) + for (j = 0; j < ylen; j++) + output[i][j] = 0; + - if ((output = malloc(xlen * sizeof(*output))) == NULL) { - perror("[nr_alloc_double_3D_array] Problem at 1D allocation"); - return NULL; - } - for (i = 0; i < xlen; i++) - output[i] = NULL; - - - for (i = 0; i < xlen; i++) - if ((output[i] = malloc(ylen * sizeof *output[i])) == NULL) { - perror("[nr_alloc_double_3D_array] Problem at 2D allocation"); - nr_free_double_3D_array(output, xlen, ylen); - return NULL; - } - for (i = 0; i < xlen; i++) - for (j = 0; j < ylen; j++) - output[i][j] = NULL; - - - for (i = 0; i < xlen; i++) - for (j = 0; j < ylen; j++) - if ((output[i][j] = malloc(zlen * sizeof *output[i][j])) == NULL) { - perror("[nr_alloc_double_3D_array] Problem at 3D allocation"); - nr_free_double_3D_array(output, xlen, ylen); - return NULL; - } - - return output; + return output; } uint8_t **nr_alloc_uint8_t_2D_array(uint16_t xlen, uint16_t ylen) { @@ -142,16 +134,13 @@ void nr_free_uint8_t_2D_array(uint8_t **input, uint16_t xlen) { free(input); } -void nr_free_double_3D_array(double ***input, uint16_t xlen, uint16_t ylen) { - int i, j; - - for (i = 0; i < xlen; i++) { - for (j = 0; j < ylen; j++) { - free(input[i][j]); - } - free(input[i]); - } - free(input); +void nr_free_double_2D_array(double **input, uint16_t xlen) { + int i; + + for (i = 0; i < xlen; i++) { + free(input[i]); + } + free(input); } // Modified Bubble Sort. From 75d7949c88a9146cf403d47b6b6ddc5a4e08488e Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 11 Sep 2018 13:42:57 +0200 Subject: [PATCH 206/379] CI: fix in the build URL modification inside HTML report Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index 7019d13124..92611670ba 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -237,7 +237,7 @@ pipeline { sh "./ci-scripts/reportBuildLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}" } if(fileExists('build_results.html')) { - sh "sed -i -e 's#Build-ID: ${BUILD_ID}#Build-ID: ${BUILD_ID}#' build_results.html" + sh "sed -i -e 's#Build-ID: ${BUILD_ID}#Build-ID: ${BUILD_ID}#' build_results.html" archiveArtifacts artifacts: 'build_results.html' } } @@ -376,7 +376,7 @@ pipeline { sh "./ci-scripts/reportTestLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}" } if(fileExists('test_simulator_results.html')) { - sh "sed -i -e 's#Build-ID: ${BUILD_ID}#Build-ID: ${BUILD_ID}#' test_simulator_results.html" + sh "sed -i -e 's#Build-ID: ${BUILD_ID}#Build-ID: ${BUILD_ID}#' test_simulator_results.html" archiveArtifacts artifacts: 'test_simulator_results.html' } } From 957bd56798a518591e09ba9ecc4cb74e9d2d872e Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Tue, 11 Sep 2018 14:24:16 +0200 Subject: [PATCH 207/379] hotfix: let compilation work When compiling in debug mode, the 'inline' semantics of C99 led to the errors: /roux/w25/openairinterface5g/common/utils/LOG/log.c:479: undefined reference to `log_header' libUTIL.a(log.c.o): In function `log_dump': /roux/w25/openairinterface5g/common/utils/LOG/log.c:502: undefined reference to `log_header' collect2: error: ld returned 1 exit status Let's use static instead of inline. --- common/utils/LOG/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/utils/LOG/log.c b/common/utils/LOG/log.c index 690148e079..d6dd97e34f 100644 --- a/common/utils/LOG/log.c +++ b/common/utils/LOG/log.c @@ -454,7 +454,7 @@ int rt = pthread_getname_np(pthread_self(), threadname,bufsize) ; } } -int inline log_header(char *log_buffer, int buffsize, int comp, int level,const char *format) { +static int log_header(char *log_buffer, int buffsize, int comp, int level,const char *format) { char threadname[PR_SET_NAME]; return snprintf(log_buffer, buffsize , "%s%s[%s]%c %s %s%s", log_level_highlight_end[level], From 3005929bca7b78be4eaf1a236c99c9100f69c2ef Mon Sep 17 00:00:00 2001 From: Wang Tsu-Han Date: Tue, 11 Sep 2018 18:50:11 +0200 Subject: [PATCH 208/379] modify threading option into config file --- openair1/PHY/LTE_TRANSPORT/dlsch_coding.c | 3 +- openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c | 4 +- openair1/PHY/defs_eNB.h | 17 +++++-- openair2/ENB_APP/enb_config.c | 23 ++++++++++ openair2/ENB_APP/enb_paramdef.h | 25 +++++++++++ openair2/LAYER2/MAC/eNB_scheduler_phytest.c | 2 +- .../CONF/enb.band7.tm1.50PRB.usrpb210.conf | 9 ++++ targets/RT/USER/lte-enb.c | 18 ++++---- targets/RT/USER/lte-ru.c | 31 +++++++------ targets/RT/USER/lte-softmodem.c | 45 +++++-------------- targets/RT/USER/lte-softmodem.h | 9 ++-- 11 files changed, 113 insertions(+), 73 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c index 045b4349a0..1c3aa48ed3 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c @@ -57,6 +57,7 @@ uint64_t runtime, uint64_t deadline, uint64_t period);*/ +extern uint8_t get_thread_worker_conf(void); void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch) @@ -614,7 +615,7 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB, } } - if(get_thread_worker_stage()) + if(get_thread_worker_conf() == WORKER_ENABLE) { if(C >= 8)//one main three worker { diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c index ac928cdbdd..3948b5e018 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c @@ -45,7 +45,7 @@ #include "targets/RT/USER/rt_wrapper.h" #include "transport_proto.h" -extern uint8_t get_thread_worker_stage(void); +extern uint8_t get_thread_worker_conf(void); void free_eNB_ulsch(LTE_eNB_ULSCH_t *ulsch) { @@ -723,7 +723,7 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag) int ulsch_decoding_data_all(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag) { int ret = 0; - /*if(get_thread_worker_stage()) + /*if(get_thread_worker_conf() == WORKER_ENABLE) { ret = ulsch_decoding_data_2thread(eNB,UE_id,harq_pid,llr8_flag); } diff --git a/openair1/PHY/defs_eNB.h b/openair1/PHY/defs_eNB.h index cb30900f7b..5425932905 100644 --- a/openair1/PHY/defs_eNB.h +++ b/openair1/PHY/defs_eNB.h @@ -270,7 +270,6 @@ typedef enum { REMOTE_IF4p5 =3, REMOTE_IF1pp =4, MAX_RU_IF_TYPES =5 - //EMULATE_RF =6 } RU_if_south_t; typedef struct RU_t_s{ @@ -888,10 +887,20 @@ typedef struct { int prach_I0; } PHY_MEASUREMENTS_eNB; +typedef enum { + PARALLEL_SINGLE_THREAD =0, + PARALLEL_RU_L1_SPLIT =1, + PARALLEL_RU_L1_TRX_SPLIT =2 +}PARALLEL_CONF_t; + +typedef enum { + WORKER_DISABLE =0, + WORKER_ENABLE =1 +}WORKER_CONF_t; + typedef struct THREAD_STRUCT_s { - uint8_t paralle_stage; - uint8_t worker_stage; - int core_number; + PARALLEL_CONF_t parallel_conf; + WORKER_CONF_t worker_conf; } THREAD_STRUCT; diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 6d9b2edf82..2e82cf7a7e 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -61,6 +61,8 @@ #include "enb_paramdef.h" extern uint16_t sf_ahead; +extern void set_parallel_conf(int parallel_conf); +extern void set_parallel_worker_conf(int worker_conf); void RCconfig_flexran() { @@ -2484,6 +2486,26 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) return 0; } +int RCconfig_parallel(void) +{ + char *parallel_conf; + char *worker_conf; + + paramdef_t ThreadParams[] = THREAD_CONF_DESC; + paramlist_def_t THREADParamList = {THREAD_CONFIG_STRING_THREAD_STRUCT,NULL,0}; + + config_getlist( &THREADParamList,ThreadParams,sizeof(ThreadParams)/sizeof(paramdef_t),NULL); + parallel_conf = strdup(*(THREADParamList.paramarray[0][THREAD_PARALLEL_IDX].strptr)); + worker_conf = strdup(*(THREADParamList.paramarray[0][THREAD_PARALLEL_IDX].strptr)); + + if(strcmp(parallel_conf,"PARALLEL_SINGLE_THREAD")==0) set_parallel_conf(0); + else if(strcmp(parallel_conf,"PARALLEL_RU_L1_SPLIT")==0) set_parallel_conf(1); + else if(strcmp(parallel_conf,"PARALLEL_RU_L1_TRX_SPLIT")==0) set_parallel_conf(2); + if(strcmp(worker_conf,"WORKER_DISABLE")==0) set_parallel_worker_conf(0); + else if(strcmp(worker_conf,"WORKER_ENABLE")==0) set_parallel_worker_conf(1); + return 0; +} + void RCConfig(void) { paramlist_def_t MACRLCParamList = {CONFIG_STRING_MACRLC_LIST,NULL,0}; @@ -2528,5 +2550,6 @@ void RCConfig(void) { config_getlist( &RUParamList,NULL,0, NULL); RC.nb_RU = RUParamList.numelt; + RCconfig_parallel(); } diff --git a/openair2/ENB_APP/enb_paramdef.h b/openair2/ENB_APP/enb_paramdef.h index 04edea1493..9403362c4f 100755 --- a/openair2/ENB_APP/enb_paramdef.h +++ b/openair2/ENB_APP/enb_paramdef.h @@ -879,3 +879,28 @@ typedef enum { #define MACRLC_SCHED_MODE_IDX 17 #define MACRLC_PHY_TEST_IDX 18 /*---------------------------------------------------------------------------------------------------------------------------------------------------------*/ + +/* thread configuration parameters section name */ +#define THREAD_CONFIG_STRING_THREAD_STRUCT "THREAD_STRUCT" + +/* thread configuration parameters names */ +#define THREAD_CONFIG_STRING_PARALLEL "parallel_config" +#define THREAD_CONFIG_STRING_WORKER "worker_config" + + +#define THREAD_PARALLEL_IDX 0 +#define THREAD_WORKER_IDX 1 + +/*-------------------------------------------------------------------------------------------------------------------------------------------------------------*/ +/* thread configuration parameters */ +/* optname helpstr paramflags XXXptr defXXXval type numelt */ +/*-------------------------------------------------------------------------------------------------------------------------------------------------------------*/ +#define THREAD_CONF_DESC { \ +{THREAD_CONFIG_STRING_PARALLEL, CONFIG_HLP_PARALLEL, 0, strptr:NULL, defstrval:"PARALLEL_RU_L1_TRX_SPLIT", TYPE_STRING, 0}, \ +{THREAD_CONFIG_STRING_WORKER, CONFIG_HLP_WORKER, 0, strptr:NULL, defstrval:"WORKER_ENABLE", TYPE_STRING, 0} \ +} + + +#define CONFIG_HLP_WORKER "coding and FEP worker thread WORKER_DISABLE or WORKER_ENABLE\n" +#define CONFIG_HLP_PARALLEL "PARALLEL_SINGLE_THREAD, PARALLEL_RU_L1_SPLIT, or PARALLEL_RU_L1_TRX_SPLIT(RU_L1_TRX_SPLIT by defult)\n" +/*-------------------------------------------------------------------------------------------------------------------------------------------------------------*/ diff --git a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c index 03def31172..81c418c123 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c @@ -71,7 +71,7 @@ schedule_ue_spec_phy_test( uint16_t rnti = 0x1235; uint32_t rb_alloc = 0x1FFFFF; int32_t tpc = 1; - int32_t mcs = 10; + int32_t mcs = 28; int32_t cqi = 15; int32_t ndi = (frameP*10+subframeP)/8; int32_t dai = 0; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf index c2f10e20ae..e08b83d58a 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf @@ -238,6 +238,15 @@ NETWORK_CONTROLLER : FLEXRAN_AWAIT_RECONF = "no"; }; +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + log_config : { global_log_level ="info"; diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index a1798ed3e4..fdabc62aab 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -151,8 +151,8 @@ void wakeup_prach_eNB(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe); #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe); #endif -extern uint8_t get_thread_paralle_stage(void); -extern uint8_t get_thread_worker_stage(void); +extern uint8_t get_thread_paralle_conf(void); +extern uint8_t get_thread_worker_conf(void); extern uint8_t nfapi_mode; extern void oai_subframe_ind(uint16_t sfn, uint16_t sf); @@ -224,7 +224,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER , 1 ); - if(get_thread_paralle_stage() == 2){ + if(get_thread_paralle_conf() == PARALLEL_RU_L1_TRX_SPLIT){ if(wait_on_condition(&proc[1].mutex_rxtx,&proc[1].cond_rxtx,&proc[1].pipe_ready,"wakeup_tx")<0) { LOG_E(PHY,"Frame %d, subframe %d: TX1 not ready\n",proc[1].frame_rx,proc[1].subframe_rx); return(-1); @@ -246,7 +246,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam /* CONFLICT RESOLUTION: BEGIN */ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER , 0 ); if(oai_exit) return(-1); - if(get_thread_paralle_stage() == 0){ + if(get_thread_paralle_conf() == PARALLEL_SINGLE_THREAD){ #ifndef PHY_TX_THREAD phy_procedures_eNB_TX(eNB, proc, 1); #endif @@ -422,8 +422,8 @@ static void* eNB_thread_rxtx( void* param ) { } pthread_mutex_unlock( &proc->mutex_rxtx ); if (nfapi_mode!=2){ - if(get_thread_paralle_stage() == 2) wakeup_tx(eNB,eNB->proc.ru_proc); - else if(get_thread_paralle_stage() == 1) + if(get_thread_paralle_conf() == PARALLEL_RU_L1_TRX_SPLIT) wakeup_tx(eNB,eNB->proc.ru_proc); + else if(get_thread_paralle_conf() == PARALLEL_RU_L1_SPLIT) { phy_procedures_eNB_TX(eNB, proc, 1); wakeup_txfh(proc,eNB->proc.ru_proc); @@ -954,7 +954,7 @@ void init_eNB_proc(int inst) { // attr_te = &proc->attr_te; #endif - if(get_thread_worker_stage()) + if(get_thread_worker_conf() == WORKER_ENABLE) { init_te_thread(eNB); init_td_thread(eNB); @@ -963,7 +963,7 @@ void init_eNB_proc(int inst) { LOG_I(PHY,"eNB->single_thread_flag:%d\n", eNB->single_thread_flag); - if (get_thread_paralle_stage()!=0 && nfapi_mode!=2) { + if ((get_thread_paralle_conf() == PARALLEL_RU_L1_SPLIT || get_thread_paralle_conf() == PARALLEL_RU_L1_TRX_SPLIT) && nfapi_mode!=2) { pthread_create( &proc_rxtx[0].pthread_rxtx, attr0, eNB_thread_rxtx, proc ); pthread_create( &proc_rxtx[1].pthread_rxtx, attr1, tx_thread, proc); } @@ -1030,7 +1030,7 @@ void kill_eNB_proc(int inst) { proc = &eNB->proc; proc_rxtx = &proc->proc_rxtx[0]; - if(get_nprocs() > 2 && codingw) { + if(get_thread_worker_conf == WORKER_ENABLE) { kill_td_thread(eNB); kill_te_thread(eNB); } diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index c6eab9f6a1..39e482a81f 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -121,9 +121,8 @@ extern int emulate_rf; extern int numerology; extern clock_source_t clock_source; -extern uint8_t get_thread_paralle_stage(void); -extern uint8_t get_thread_worker_stage(void); -extern int get_thread_core_number(void); +extern uint8_t get_thread_paralle_conf(void); +extern uint8_t get_thread_worker_conf(void); extern void phy_init_RU(RU_t*); extern void phy_free_RU(RU_t*); @@ -1258,7 +1257,7 @@ void wakeup_eNBs(RU_t *ru) { LOG_D(PHY,"wakeup_eNBs (num %d) for RU %d ru->eNB_top:%p\n",ru->num_eNB,ru->idx, ru->eNB_top); - if (ru->num_eNB==1 && ru->eNB_top!=0 && get_thread_paralle_stage() == 0) { + if (ru->num_eNB==1 && ru->eNB_top!=0 && get_thread_paralle_conf() == PARALLEL_SINGLE_THREAD) { // call eNB function directly char string[20]; @@ -1783,7 +1782,7 @@ static void* ru_thread( void* param ) { if (ru->num_eNB>0) wakeup_eNBs(ru); #ifndef PHY_TX_THREAD - if(get_thread_paralle_stage() == 0 || ru->num_eNB==0){ + if(get_thread_paralle_conf() == PARALLEL_SINGLE_THREAD || ru->num_eNB==0){ // do TX front-end processing if needed (precoding and/or IDFTs) if (ru->feptx_prec) ru->feptx_prec(ru); @@ -2196,7 +2195,7 @@ void init_RU_proc(RU_t *ru) { if(emulate_rf) pthread_create( &proc->pthread_emulateRF, attr_emulateRF, emulatedRF_thread, (void*)proc ); - if (get_thread_paralle_stage() != 0) + if (get_thread_paralle_conf() == PARALLEL_RU_L1_SPLIT || get_thread_paralle_conf() == PARALLEL_RU_L1_TRX_SPLIT) pthread_create( &proc->pthread_FH1, attr_FH1, ru_thread_tx, (void*)ru ); if (ru->function == NGFI_RRU_IF4p5) { @@ -2223,7 +2222,7 @@ void init_RU_proc(RU_t *ru) { pthread_create( &proc->pthread_prach, attr_prach, ru_thread_prach, (void*)ru ); } - if (get_thread_worker_stage()) { + if (get_thread_worker_conf() == WORKER_ENABLE) { init_fep_thread(ru,NULL); init_feptx_thread(ru,NULL); } @@ -2261,7 +2260,7 @@ void kill_RU_proc(RU_t *ru) pthread_cond_destroy( &proc->cond_rf_tx); #endif - if (get_thread_worker_stage()) { + if (get_thread_worker_conf() == WORKER_ENABLE) { LOG_D(PHY, "killing FEP thread\n"); kill_fep_thread(ru); LOG_D(PHY, "killing FEP TX thread\n"); @@ -2310,7 +2309,7 @@ void kill_RU_proc(RU_t *ru) LOG_D(PHY, "Joining pthread_FH\n"); pthread_join(proc->pthread_FH, NULL); - if (!single_thread_flag && get_nprocs() > 4) { + if (get_thread_paralle_conf() == PARALLEL_RU_L1_SPLIT || get_thread_paralle_conf() == PARALLEL_RU_L1_TRX_SPLIT) { LOG_D(PHY, "Joining pthread_FHTX\n"); pthread_join(proc->pthread_FH1, NULL); } @@ -2584,8 +2583,8 @@ void set_function_spec_param(RU_t *ru) ru->fh_north_out = fh_if4p5_north_out; // send_IF4p5 on reception ru->fh_south_out = tx_rf; // send output to RF ru->fh_north_asynch_in = fh_if4p5_north_asynch_in; // TX packets come asynchronously - ru->feprx = (!get_thread_worker_stage()) ? fep_full :ru_fep_full_2thread; // RX DFTs - ru->feptx_ofdm = (!get_thread_worker_stage()) ? feptx_ofdm : feptx_ofdm_2thread; // this is fep with idft only (no precoding in RRU) + ru->feprx = (get_thread_worker_conf() == WORKER_DISABLE) ? fep_full :ru_fep_full_2thread; // RX DFTs + ru->feptx_ofdm = (get_thread_worker_conf() == WORKER_DISABLE) ? feptx_ofdm : feptx_ofdm_2thread; // this is fep with idft only (no precoding in RRU) ru->feptx_prec = NULL; ru->start_if = start_if; // need to start the if interface for if4p5 ru->ifdevice.host_type = RRU_HOST; @@ -2606,8 +2605,8 @@ void set_function_spec_param(RU_t *ru) } else if (ru->function == eNodeB_3GPP) { ru->do_prach = 0; // no prach processing in RU - ru->feprx = (!get_thread_worker_stage()) ? fep_full : ru_fep_full_2thread; // RX DFTs - ru->feptx_ofdm = (!get_thread_worker_stage()) ? feptx_ofdm : feptx_ofdm_2thread; // this is fep with idft and precoding + ru->feprx = (get_thread_worker_conf() == WORKER_DISABLE) ? fep_full : ru_fep_full_2thread; // RX DFTs + ru->feptx_ofdm = (get_thread_worker_conf() == WORKER_DISABLE) ? feptx_ofdm : feptx_ofdm_2thread; // this is fep with idft and precoding ru->feptx_prec = feptx_prec; // this is fep with idft and precoding ru->fh_north_in = NULL; // no incoming fronthaul from north ru->fh_north_out = NULL; // no outgoing fronthaul to north @@ -2635,9 +2634,9 @@ void set_function_spec_param(RU_t *ru) case REMOTE_IF5: // the remote unit is IF5 RRU ru->do_prach = 0; - ru->feprx = (!get_thread_worker_stage()) ? fep_full : fep_full; // this is frequency-shift + DFTs + ru->feprx = (get_thread_worker_conf() == WORKER_DISABLE) ? fep_full : fep_full; // this is frequency-shift + DFTs ru->feptx_prec = feptx_prec; // need to do transmit Precoding + IDFTs - ru->feptx_ofdm = (!get_thread_worker_stage()) ? feptx_ofdm : feptx_ofdm_2thread; // need to do transmit Precoding + IDFTs + ru->feptx_ofdm = (get_thread_worker_conf() == WORKER_DISABLE) ? feptx_ofdm : feptx_ofdm_2thread; // need to do transmit Precoding + IDFTs if (ru->if_timing == synch_to_other) { ru->fh_south_in = fh_slave_south_in; // synchronize to master ru->fh_south_out = fh_if5_mobipass_south_out; // use send_IF5 for mobipass @@ -2715,7 +2714,7 @@ void init_RU(char *rf_config_file) { // read in configuration file) printf("configuring RU from file\n"); RCconfig_RU(); - LOG_I(PHY,"number of L1 instances %d, number of RU %d, number of CPU cores %d\n",RC.nb_L1_inst,RC.nb_RU,get_thread_core_number()); + LOG_I(PHY,"number of L1 instances %d, number of RU %d, number of CPU cores %d\n",RC.nb_L1_inst,RC.nb_RU,get_nprocs()); if (RC.nb_CC != 0) for (i=0;i=8) - { - thread_struct.paralle_stage = 2; - thread_struct.worker_stage = 1; - } - else if(thread_struct.core_number>=4) - { - thread_struct.paralle_stage = 1; - thread_struct.worker_stage = 1; - } - else - { - thread_struct.paralle_stage = 0; - thread_struct.worker_stage = 0; - } - if(single_thread_flag) thread_struct.paralle_stage = 0; - if(dis_worker) thread_struct.worker_stage = 0; -printf("single_thread_flag=%d, dis_worker=%d \n" ,single_thread_flag, dis_worker); -printf("~~~~~~~~~~paralle_stage=%d, worker_stage=%d, core_number=%d ~~~~~~~~~~~~~~~~\n", - thread_struct.paralle_stage, - thread_struct.worker_stage, - thread_struct.core_number); -} - -uint8_t get_thread_paralle_stage(void) -{ - return thread_struct.paralle_stage; + thread_struct.parallel_conf = (PARALLEL_CONF_t)parallel_conf; } -uint8_t get_thread_worker_stage(void) +void set_parallel_worker_conf(int worker_conf) { - return thread_struct.worker_stage; + thread_struct.worker_conf = (WORKER_CONF_t)worker_conf; } -int get_thread_core_number(void) +PARALLEL_CONF_t get_thread_paralle_conf(void) { - return thread_struct.core_number; + return thread_struct.parallel_conf; +} +WORKER_CONF_t get_thread_worker_conf(void) +{ + return thread_struct.worker_conf; } @@ -1177,7 +1153,6 @@ int main( int argc, char **argv ) printf("wait_eNBs()\n"); wait_eNBs(); - thread_structure_init(); printf("About to Init RU threads RC.nb_RU:%d\n", RC.nb_RU); if (RC.nb_RU >0) { diff --git a/targets/RT/USER/lte-softmodem.h b/targets/RT/USER/lte-softmodem.h index c7c8e44661..e3ffeaab10 100644 --- a/targets/RT/USER/lte-softmodem.h +++ b/targets/RT/USER/lte-softmodem.h @@ -92,7 +92,6 @@ #define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n" #define CONFIG_HLP_NUMEROLOGY "adding numerology for 5G\n" -#define CONFIG_HLP_WORKER "coding and FEP worker thread disable(enable by defult)\n" #define CONFIG_HLP_EMULATE_RF "Emulated RF enabled(disable by defult)\n" #define CONFIG_HLP_DISABLNBIOT "disable nb-iot, even if defined in config\n" @@ -185,7 +184,6 @@ {"s" , CONFIG_HLP_SNR, 0, iptr:&snr_dB, defintval:25, TYPE_INT, 0}, \ {"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&numerology, defintval:0, TYPE_INT, 0}, \ {"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&emulate_rf, defintval:0, TYPE_INT, 0}, \ -{"worker-disable" , CONFIG_HLP_WORKER, PARAMFLAG_BOOL, iptr:&dis_worker, defintval:0, TYPE_INT, 0}, \ {"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, iptr:&nonbiotflag, defintval:0, TYPE_INT, 0} \ } @@ -278,9 +276,10 @@ PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms, uint8_t abstraction_flag); void init_eNB_afterRU(void); void thread_structure_init(void); -uint8_t get_thread_paralle_stage(void); -uint8_t get_thread_worker_stage(void); -int get_thread_core_number(void); +PARALLEL_CONF_t get_thread_paralle_conf(void); +WORKER_CONF_t get_thread_worker_conf(void); +void set_parallel_conf(int parallel_conf); +void set_parallel_worker_conf(int worker_conf); extern int stop_L1L2(module_id_t enb_id); extern int restart_L1L2(module_id_t enb_id); From d7fd3013a12e1d44a78cb79794ec24288f649c9d Mon Sep 17 00:00:00 2001 From: Wang Tsu-Han Date: Wed, 12 Sep 2018 10:49:57 +0200 Subject: [PATCH 209/379] config file adding parallel configuration --- .../CONF/enb.band38.tm1.100PRB.usrpx310.conf | 9 +++++++++ .../GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf | 9 +++++++++ .../CONF/enb.band7.tm1.100PRB.usrpx310.conf | 9 +++++++++ .../CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf | 9 +++++++++ .../CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf | 9 +++++++++ .../CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf | 9 +++++++++ .../CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf | 9 +++++++++ .../CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf | 9 +++++++++ .../GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf | 9 +++++++++ .../GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf | 9 +++++++++ .../CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf | 9 +++++++++ targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.conf | 9 +++++++++ .../PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.tdd.conf | 9 +++++++++ 13 files changed, 117 insertions(+) diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.100PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.100PRB.usrpx310.conf index bec9c2c6dd..2761fe5fdb 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.100PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.100PRB.usrpx310.conf @@ -156,6 +156,15 @@ eNBs = ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + log_config : { global_log_level ="debug"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf index 834b6cf044..56b3c37c0a 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf @@ -156,6 +156,15 @@ eNBs = ENB_PORT_FOR_X2C = 36422; # Spec 36422 }; +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + log_config : { global_log_level ="debug"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf index 6b3614f490..f088eda84f 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf @@ -193,6 +193,15 @@ RUs = ( } ); +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + log_config : { global_log_level ="info"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf index fb184549c5..3bd4b1275a 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf @@ -235,6 +235,15 @@ NETWORK_CONTROLLER : FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_AWAIT_RECONF = "no"; }; + +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); /* log_config : { diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf index c6ace3b68f..a419122846 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf @@ -225,6 +225,15 @@ RUs = ( } ); +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + log_config : { global_log_level ="info"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf index e46467598e..f0a3cb524a 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf @@ -192,6 +192,15 @@ RUs = ( } ); +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + log_config : { global_log_level ="info"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf index a6efe74283..039f0c39c1 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf @@ -199,6 +199,15 @@ RUs = ( } ); +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + log_config = { global_log_level ="info"; global_log_verbosity ="medium"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf index fefb4b11de..8f6aac632b 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf @@ -182,6 +182,15 @@ MACRLCs = ( } ); +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + log_config : { global_log_level ="debug"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf index cd21fb935e..f4ac5a9aa3 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf @@ -210,6 +210,15 @@ MACRLCs = ( } ); +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + log_config = { global_log_level ="info"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf index 581012d7d3..ea205e44d1 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf @@ -198,6 +198,15 @@ RUs = ( } ); +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + log_config = { global_log_level ="info"; global_log_verbosity ="medium"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf index 5f9f8c4d7b..a2e97648c9 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf @@ -197,6 +197,15 @@ RUs = ( } ); +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + log_config = { global_log_level ="info"; global_log_verbosity ="medium"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.conf index 41b322fb55..ba2e7f1ada 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.conf @@ -17,6 +17,15 @@ RUs = ( } ); +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + log_config = { global_log_level ="info"; global_log_verbosity ="medium"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.tdd.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.tdd.conf index da1481ac7b..494086defd 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.tdd.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.tdd.conf @@ -18,6 +18,15 @@ RUs = ( } ); +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + log_config = { global_log_level ="info"; global_log_verbosity ="medium"; From c5cd47f976ac4ed724b39f2b46e5e70aa053c307 Mon Sep 17 00:00:00 2001 From: Wang Tsu-Han Date: Wed, 12 Sep 2018 15:32:44 +0200 Subject: [PATCH 210/379] fixes for not having parallel config inside the config file --- openair2/ENB_APP/enb_config.c | 16 +++++++++++++--- targets/RT/USER/lte-enb.c | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 2e82cf7a7e..bbe3ca5c2c 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -2493,10 +2493,20 @@ int RCconfig_parallel(void) paramdef_t ThreadParams[] = THREAD_CONF_DESC; paramlist_def_t THREADParamList = {THREAD_CONFIG_STRING_THREAD_STRUCT,NULL,0}; + + config_getlist( &THREADParamList,NULL,0,NULL); - config_getlist( &THREADParamList,ThreadParams,sizeof(ThreadParams)/sizeof(paramdef_t),NULL); - parallel_conf = strdup(*(THREADParamList.paramarray[0][THREAD_PARALLEL_IDX].strptr)); - worker_conf = strdup(*(THREADParamList.paramarray[0][THREAD_PARALLEL_IDX].strptr)); + if(THREADParamList.numelt>0) + { + config_getlist( &THREADParamList,ThreadParams,sizeof(ThreadParams)/sizeof(paramdef_t),NULL); + parallel_conf = strdup(*(THREADParamList.paramarray[0][THREAD_PARALLEL_IDX].strptr)); + worker_conf = strdup(*(THREADParamList.paramarray[0][THREAD_PARALLEL_IDX].strptr)); + } + else + { + parallel_conf = "PARALLEL_RU_L1_TRX_SPLIT"; + worker_conf = "WORKER_ENABLE"; + } if(strcmp(parallel_conf,"PARALLEL_SINGLE_THREAD")==0) set_parallel_conf(0); else if(strcmp(parallel_conf,"PARALLEL_RU_L1_SPLIT")==0) set_parallel_conf(1); diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index fdabc62aab..b51495c43f 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -1030,7 +1030,7 @@ void kill_eNB_proc(int inst) { proc = &eNB->proc; proc_rxtx = &proc->proc_rxtx[0]; - if(get_thread_worker_conf == WORKER_ENABLE) { + if(get_thread_worker_conf() == WORKER_ENABLE) { kill_td_thread(eNB); kill_te_thread(eNB); } From 720d0d31cdfa91a455d3f24acd92bcf343396646 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 13 Sep 2018 10:22:20 +0200 Subject: [PATCH 211/379] some debugging of memory leaks --- .../PHY/CODING/nrPolar_tools/nr_polar_decoder.c | 12 ++++++++---- openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h | 2 +- .../nrPolar_tools/nr_polar_matrix_and_array.c | 14 +++++++------- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c index cb75811a11..475fc73a77 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c @@ -188,14 +188,15 @@ int8_t polar_decoder( //Keep only the best "listSize" number of entries. if (currentListSize > listSize) { - for (int i = 0; i < 2*listSize; i++) { + for (int i = 0; i < currentListSize; i++) { listIndex[i]=i; pathMetric[i] = dlist[i].pathMetric; } - nr_sort_asc_double_1D_array_ind(pathMetric, listIndex, currentListSize); - for (int i = 0; i < 2*listSize; i++) sorted_dlist[i]=&dlist[listIndex[i]]; + currentListSize = listSize; } + stop_meas(sorting); + /* //sort listIndex[listSize, ..., 2*listSize-1] in descending order. uint8_t swaps, tempInd; @@ -275,7 +276,7 @@ int8_t polar_decoder( } currentListSize = listSize; }*/ - stop_meas(sorting); + } for (int i=0; icrcParityBits; i++) { @@ -298,7 +299,9 @@ int8_t polar_decoder( //perror("[SCL polar decoder] All list entries have failed the CRC checks."); free(d_tilde); for (int i=0;i<2*listSize;i++) { + // printf("error: Freeing dlist[%d].bit %p\n",i,dlist[i].bit); nr_free_uint8_t_2D_array(dlist[i].bit, (polarParams->n+1)); + // printf("error: Freeing dlist[%d].llr %p\n",i,dlist[i].bit); nr_free_double_2D_array(dlist[i].llr, (polarParams->n+1)); free(dlist[i].crcChecksum); } @@ -336,6 +339,7 @@ int8_t polar_decoder( free(d_tilde); for (int i=0;i<2*listSize;i++) { + // printf("correct: Freeing dlist[%d].bit %p\n",i,dlist[i].bit); nr_free_uint8_t_2D_array(dlist[i].bit, (polarParams->n+1)); nr_free_double_2D_array(dlist[i].llr, (polarParams->n+1)); free(dlist[i].crcChecksum); diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h index 1faf13e885..b5aa841468 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h @@ -159,7 +159,7 @@ void updateCrcChecksum2(decoder_list_t **dlist, uint8_t **crcGen, uint8_t listSize, uint32_t i2, uint8_t len); -void nr_sort_asc_double_1D_array_ind(double *matrix, uint8_t *ind, uint8_t len); +void nr_sort_asc_double_1D_array_ind(double *matrix, int *ind, int len); uint8_t **crc24c_generator_matrix(uint16_t payloadSizeBits); uint8_t **crc11_generator_matrix(uint16_t payloadSizeBits); diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_matrix_and_array.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_matrix_and_array.c index ad37cdbf27..87da27a59f 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_matrix_and_array.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_matrix_and_array.c @@ -130,8 +130,8 @@ void nr_free_uint8_t_3D_array(uint8_t ***input, uint16_t xlen, uint16_t ylen) { } void nr_free_uint8_t_2D_array(uint8_t **input, uint16_t xlen) { - for (int i = 0; i < xlen; i++) free(input[i]); - free(input); + for (int i = 0; i < xlen; i++) free(input[i]); + free(input); } void nr_free_double_2D_array(double **input, uint16_t xlen) { @@ -144,14 +144,14 @@ void nr_free_double_2D_array(double **input, uint16_t xlen) { } // Modified Bubble Sort. -void nr_sort_asc_double_1D_array_ind(double *matrix, uint8_t *ind, uint8_t len) { - uint8_t swaps; +void nr_sort_asc_double_1D_array_ind(double *matrix, int *ind, int len) { + int swaps; double temp; - uint8_t tempInd; + int tempInd; - for (uint8_t i = 0; i < len; i++) { + for (int i = 0; i < len; i++) { swaps = 0; - for (uint8_t j = 0; j < (len - i) - 1; j++) { + for (int j = 0; j < (len - i) - 1; j++) { if (matrix[j] > matrix[j + 1]) { temp = matrix[j]; matrix[j] = matrix[j + 1]; From cf09d19879757a588f121c4651b90e9bded6c61c Mon Sep 17 00:00:00 2001 From: Wang Tsu-Han Date: Thu, 13 Sep 2018 12:52:44 +0200 Subject: [PATCH 212/379] adding definition for UE --- openair1/PHY/defs_common.h | 15 +++++++++++++++ openair1/PHY/defs_eNB.h | 16 ---------------- targets/RT/USER/lte-uesoftmodem.c | 20 ++++++++++++++++++-- 3 files changed, 33 insertions(+), 18 deletions(-) diff --git a/openair1/PHY/defs_common.h b/openair1/PHY/defs_common.h index e27622c059..4dab209dd5 100644 --- a/openair1/PHY/defs_common.h +++ b/openair1/PHY/defs_common.h @@ -862,7 +862,22 @@ typedef enum { RESYNCH=4 } UE_MODE_t; +/// Threading Parameter +typedef enum { + PARALLEL_SINGLE_THREAD =0, + PARALLEL_RU_L1_SPLIT =1, + PARALLEL_RU_L1_TRX_SPLIT =2 +}PARALLEL_CONF_t; +typedef enum { + WORKER_DISABLE =0, + WORKER_ENABLE =1 +}WORKER_CONF_t; + +typedef struct THREAD_STRUCT_s { + PARALLEL_CONF_t parallel_conf; + WORKER_CONF_t worker_conf; +} THREAD_STRUCT; typedef enum {SF_DL, SF_UL, SF_S} lte_subframe_t; diff --git a/openair1/PHY/defs_eNB.h b/openair1/PHY/defs_eNB.h index 5425932905..f23485cad8 100644 --- a/openair1/PHY/defs_eNB.h +++ b/openair1/PHY/defs_eNB.h @@ -887,22 +887,6 @@ typedef struct { int prach_I0; } PHY_MEASUREMENTS_eNB; -typedef enum { - PARALLEL_SINGLE_THREAD =0, - PARALLEL_RU_L1_SPLIT =1, - PARALLEL_RU_L1_TRX_SPLIT =2 -}PARALLEL_CONF_t; - -typedef enum { - WORKER_DISABLE =0, - WORKER_ENABLE =1 -}WORKER_CONF_t; - -typedef struct THREAD_STRUCT_s { - PARALLEL_CONF_t parallel_conf; - WORKER_CONF_t worker_conf; -} THREAD_STRUCT; - /// Top-level PHY Data Structure for eNB typedef struct PHY_VARS_eNB_s { diff --git a/targets/RT/USER/lte-uesoftmodem.c b/targets/RT/USER/lte-uesoftmodem.c index 2efcb496ac..d87e3e69b1 100644 --- a/targets/RT/USER/lte-uesoftmodem.c +++ b/targets/RT/USER/lte-uesoftmodem.c @@ -220,8 +220,24 @@ int transmission_mode=1; int emulate_rf = 0; int numerology = 0; -int codingw = 0; -int fepw = 0; + +static THREAD_STRUCT thread_struct; +void set_parallel_conf(int parallel_conf) +{ + thread_struct.parallel_conf = (PARALLEL_CONF_t)parallel_conf; +} +void set_parallel_worker_conf(int worker_conf) +{ + thread_struct.worker_conf = (WORKER_CONF_t)worker_conf; +} +PARALLEL_CONF_t get_thread_paralle_conf(void) +{ + return thread_struct.parallel_conf; +} +WORKER_CONF_t get_thread_worker_conf(void) +{ + return thread_struct.worker_conf; +} /* struct for ethernet specific parameters given in eNB conf file */ eth_params_t *eth_params; From 5b1260a759809b1f08f22fcaa0f6ee11001ee913 Mon Sep 17 00:00:00 2001 From: Wang Tsu-Han Date: Thu, 13 Sep 2018 15:02:15 +0200 Subject: [PATCH 213/379] fixed for phy-simulation mode --- openair1/PHY/LTE_TRANSPORT/dlsch_coding.c | 2 +- openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c | 2 +- openair1/SIMULATION/LTE_PHY/dlsim.c | 18 +++++++++++++++++- openair1/SIMULATION/LTE_PHY/ulsim.c | 18 +++++++++++++++++- targets/RT/USER/lte-enb.c | 14 +++++++------- targets/RT/USER/lte-ru.c | 12 ++++++------ targets/RT/USER/lte-softmodem.c | 2 +- targets/RT/USER/lte-softmodem.h | 2 +- targets/RT/USER/lte-uesoftmodem.c | 2 +- 9 files changed, 52 insertions(+), 20 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c index 1c3aa48ed3..ded0905388 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c @@ -57,7 +57,7 @@ uint64_t runtime, uint64_t deadline, uint64_t period);*/ -extern uint8_t get_thread_worker_conf(void); +extern WORKER_CONF_t get_thread_worker_conf(void); void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch) diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c index 3948b5e018..046e456916 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c @@ -45,7 +45,7 @@ #include "targets/RT/USER/rt_wrapper.h" #include "transport_proto.h" -extern uint8_t get_thread_worker_conf(void); +extern WORKER_CONF_t get_thread_worker_conf(void); void free_eNB_ulsch(LTE_eNB_ULSCH_t *ulsch) { diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index a03ce34bca..fd649ec0e4 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -82,7 +82,23 @@ double t_rx_min = 1000000000; /*!< \brief initial min process time for rx */ int n_tx_dropped = 0; /*!< \brief initial max process time for tx */ int n_rx_dropped = 0; /*!< \brief initial max process time for rx */ -int codingw = 0; +static THREAD_STRUCT thread_struct; +void set_parallel_conf(int parallel_conf) +{ + thread_struct.parallel_conf = (PARALLEL_CONF_t)parallel_conf; +} +void set_parallel_worker_conf(int worker_conf) +{ + thread_struct.worker_conf = (WORKER_CONF_t)worker_conf; +} +PARALLEL_CONF_t get_thread_parallel_conf(void) +{ + return thread_struct.parallel_conf; +} +WORKER_CONF_t get_thread_worker_conf(void) +{ + return thread_struct.worker_conf; +} int emulate_rf = 0; diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index 3fcb010685..826f185d2a 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -97,7 +97,23 @@ nfapi_tx_request_pdu_t tx_pdu_list[MAX_NUM_TX_REQUEST_PDU]; nfapi_tx_request_t TX_req; Sched_Rsp_t sched_resp; -int codingw = 0; +static THREAD_STRUCT thread_struct; +void set_parallel_conf(int parallel_conf) +{ + thread_struct.parallel_conf = (PARALLEL_CONF_t)parallel_conf; +} +void set_parallel_worker_conf(int worker_conf) +{ + thread_struct.worker_conf = (WORKER_CONF_t)worker_conf; +} +PARALLEL_CONF_t get_thread_parallel_conf(void) +{ + return thread_struct.parallel_conf; +} +WORKER_CONF_t get_thread_worker_conf(void) +{ + return thread_struct.worker_conf; +} void fill_nfapi_ulsch_config_request(nfapi_ul_config_request_pdu_t *ul_config_pdu, diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index b51495c43f..91a3c2e479 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -151,8 +151,8 @@ void wakeup_prach_eNB(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe); #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe); #endif -extern uint8_t get_thread_paralle_conf(void); -extern uint8_t get_thread_worker_conf(void); +extern PARALLEL_CONF_t get_thread_parallel_conf(void); +extern WORKER_CONF_t get_thread_worker_conf(void); extern uint8_t nfapi_mode; extern void oai_subframe_ind(uint16_t sfn, uint16_t sf); @@ -224,7 +224,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER , 1 ); - if(get_thread_paralle_conf() == PARALLEL_RU_L1_TRX_SPLIT){ + if(get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT){ if(wait_on_condition(&proc[1].mutex_rxtx,&proc[1].cond_rxtx,&proc[1].pipe_ready,"wakeup_tx")<0) { LOG_E(PHY,"Frame %d, subframe %d: TX1 not ready\n",proc[1].frame_rx,proc[1].subframe_rx); return(-1); @@ -246,7 +246,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam /* CONFLICT RESOLUTION: BEGIN */ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER , 0 ); if(oai_exit) return(-1); - if(get_thread_paralle_conf() == PARALLEL_SINGLE_THREAD){ + if(get_thread_parallel_conf() == PARALLEL_SINGLE_THREAD){ #ifndef PHY_TX_THREAD phy_procedures_eNB_TX(eNB, proc, 1); #endif @@ -422,8 +422,8 @@ static void* eNB_thread_rxtx( void* param ) { } pthread_mutex_unlock( &proc->mutex_rxtx ); if (nfapi_mode!=2){ - if(get_thread_paralle_conf() == PARALLEL_RU_L1_TRX_SPLIT) wakeup_tx(eNB,eNB->proc.ru_proc); - else if(get_thread_paralle_conf() == PARALLEL_RU_L1_SPLIT) + if(get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) wakeup_tx(eNB,eNB->proc.ru_proc); + else if(get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT) { phy_procedures_eNB_TX(eNB, proc, 1); wakeup_txfh(proc,eNB->proc.ru_proc); @@ -963,7 +963,7 @@ void init_eNB_proc(int inst) { LOG_I(PHY,"eNB->single_thread_flag:%d\n", eNB->single_thread_flag); - if ((get_thread_paralle_conf() == PARALLEL_RU_L1_SPLIT || get_thread_paralle_conf() == PARALLEL_RU_L1_TRX_SPLIT) && nfapi_mode!=2) { + if ((get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT || get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) && nfapi_mode!=2) { pthread_create( &proc_rxtx[0].pthread_rxtx, attr0, eNB_thread_rxtx, proc ); pthread_create( &proc_rxtx[1].pthread_rxtx, attr1, tx_thread, proc); } diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index 39e482a81f..8ee2cb04f6 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -121,8 +121,8 @@ extern int emulate_rf; extern int numerology; extern clock_source_t clock_source; -extern uint8_t get_thread_paralle_conf(void); -extern uint8_t get_thread_worker_conf(void); +extern PARALLEL_CONF_t get_thread_parallel_conf(void); +extern WORKER_CONF_t get_thread_worker_conf(void); extern void phy_init_RU(RU_t*); extern void phy_free_RU(RU_t*); @@ -1257,7 +1257,7 @@ void wakeup_eNBs(RU_t *ru) { LOG_D(PHY,"wakeup_eNBs (num %d) for RU %d ru->eNB_top:%p\n",ru->num_eNB,ru->idx, ru->eNB_top); - if (ru->num_eNB==1 && ru->eNB_top!=0 && get_thread_paralle_conf() == PARALLEL_SINGLE_THREAD) { + if (ru->num_eNB==1 && ru->eNB_top!=0 && get_thread_parallel_conf() == PARALLEL_SINGLE_THREAD) { // call eNB function directly char string[20]; @@ -1782,7 +1782,7 @@ static void* ru_thread( void* param ) { if (ru->num_eNB>0) wakeup_eNBs(ru); #ifndef PHY_TX_THREAD - if(get_thread_paralle_conf() == PARALLEL_SINGLE_THREAD || ru->num_eNB==0){ + if(get_thread_parallel_conf() == PARALLEL_SINGLE_THREAD || ru->num_eNB==0){ // do TX front-end processing if needed (precoding and/or IDFTs) if (ru->feptx_prec) ru->feptx_prec(ru); @@ -2195,7 +2195,7 @@ void init_RU_proc(RU_t *ru) { if(emulate_rf) pthread_create( &proc->pthread_emulateRF, attr_emulateRF, emulatedRF_thread, (void*)proc ); - if (get_thread_paralle_conf() == PARALLEL_RU_L1_SPLIT || get_thread_paralle_conf() == PARALLEL_RU_L1_TRX_SPLIT) + if (get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT || get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) pthread_create( &proc->pthread_FH1, attr_FH1, ru_thread_tx, (void*)ru ); if (ru->function == NGFI_RRU_IF4p5) { @@ -2309,7 +2309,7 @@ void kill_RU_proc(RU_t *ru) LOG_D(PHY, "Joining pthread_FH\n"); pthread_join(proc->pthread_FH, NULL); - if (get_thread_paralle_conf() == PARALLEL_RU_L1_SPLIT || get_thread_paralle_conf() == PARALLEL_RU_L1_TRX_SPLIT) { + if (get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT || get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) { LOG_D(PHY, "Joining pthread_FHTX\n"); pthread_join(proc->pthread_FH1, NULL); } diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index f935677124..b9458afa1e 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -229,7 +229,7 @@ void set_parallel_worker_conf(int worker_conf) { thread_struct.worker_conf = (WORKER_CONF_t)worker_conf; } -PARALLEL_CONF_t get_thread_paralle_conf(void) +PARALLEL_CONF_t get_thread_parallel_conf(void) { return thread_struct.parallel_conf; } diff --git a/targets/RT/USER/lte-softmodem.h b/targets/RT/USER/lte-softmodem.h index e3ffeaab10..7074172a03 100644 --- a/targets/RT/USER/lte-softmodem.h +++ b/targets/RT/USER/lte-softmodem.h @@ -276,7 +276,7 @@ PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms, uint8_t abstraction_flag); void init_eNB_afterRU(void); void thread_structure_init(void); -PARALLEL_CONF_t get_thread_paralle_conf(void); +PARALLEL_CONF_t get_thread_parallel_conf(void); WORKER_CONF_t get_thread_worker_conf(void); void set_parallel_conf(int parallel_conf); void set_parallel_worker_conf(int worker_conf); diff --git a/targets/RT/USER/lte-uesoftmodem.c b/targets/RT/USER/lte-uesoftmodem.c index d87e3e69b1..1613622567 100644 --- a/targets/RT/USER/lte-uesoftmodem.c +++ b/targets/RT/USER/lte-uesoftmodem.c @@ -230,7 +230,7 @@ void set_parallel_worker_conf(int worker_conf) { thread_struct.worker_conf = (WORKER_CONF_t)worker_conf; } -PARALLEL_CONF_t get_thread_paralle_conf(void) +PARALLEL_CONF_t get_thread_parallel_conf(void) { return thread_struct.parallel_conf; } From cfcd0d4baec34a48223b0693bb6e4e6d3dad65f5 Mon Sep 17 00:00:00 2001 From: Agustin Date: Fri, 14 Sep 2018 14:56:15 +0200 Subject: [PATCH 214/379] NR PDCCH: dci field interpreting in FAPI / Adding DCI format 0_1 and 1_1 --- .../nfapi/public_inc/fapi_nr_ue_interface.h | 26 +- openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 878 +++++++++++------- openair1/PHY/NR_UE_TRANSPORT/dci_nr.h | 6 +- openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c | 175 +++- .../PHY/NR_UE_TRANSPORT/nr_transport_ue.h | 4 + openair1/PHY/defs_nr_UE.h | 18 +- openair1/PHY/impl_defs_nr.h | 274 +++++- openair1/SCHED_NR_UE/fapi_nr_ue_l1.c | 37 +- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 588 ++++++++++-- 9 files changed, 1537 insertions(+), 469 deletions(-) diff --git a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h index 7219477405..d6fafae7f1 100644 --- a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h +++ b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h @@ -37,8 +37,8 @@ typedef struct { uint8_t sul_ind_0_1 ; // 2 SUL_IND_0_1: uint8_t slot_format_ind ; // 3 SLOT_FORMAT_IND: size of DCI format 2_0 is configurable by higher layers up to 128 bits, according to Subclause 11.1.1 of [5, TS 38.213] uint8_t pre_emption_ind ; // 4 PRE_EMPTION_IND: size of DCI format 2_1 is configurable by higher layers up to 126 bits, according to Subclause 11.2 of [5, TS 38.213]. Each pre-emption indication is 14 bits - uint8_t tpc_cmd_number ; // 5 TPC_CMD_NUMBER: The parameter xxx provided by higher layers determines the index to the TPC command number for an UL of a cell. Each TPC command number is 2 bits - uint8_t block_number ; // 6 BLOCK_NUMBER: starting position of a block is determined by the parameter startingBitOfFormat2_3 + uint8_t block_number ; // 5 BLOCK_NUMBER: starting position of a block is determined by the parameter startingBitOfFormat2_3 + uint8_t close_loop_ind ; // 6 CLOSE_LOOP_IND: uint8_t bandwidth_part_ind ; // 7 BANDWIDTH_PART_IND: uint8_t short_message_ind ; // 8 SHORT_MESSAGE_IND: uint8_t short_messages ; // 9 SHORT_MESSAGES: @@ -81,7 +81,7 @@ typedef struct { uint8_t antenna_ports ; // 38 ANTENNA_PORTS: uint8_t tci ; // 39 TCI: 0 bit if higher layer parameter tci-PresentInDCI is not enabled; otherwise 3 bits uint8_t srs_request ; // 40 SRS_REQUEST: - uint8_t tpc_cmd_number_format2_3 ; // 41 TPC_CMD_NUMBER_FORMAT2_3: + uint8_t tpc_cmd ; // 41 TPC_CMD: uint8_t csi_request ; // 42 CSI_REQUEST: uint8_t cbgti ; // 43 CBGTI: 0, 2, 4, 6, or 8 bits determined by higher layer parameter maxCodeBlockGroupsPerTransportBlock for the PDSCH uint8_t cbgfi ; // 44 CBGFI: 0 or 1 bit determined by higher layer parameter codeBlockGroupFlushIndicator @@ -225,13 +225,19 @@ typedef struct { typedef struct { } fapi_nr_ul_config_pucch_pdu; - + typedef enum {pusch_freq_hopping_disabled = 0 , pusch_freq_hopping_enabled = 1}pusch_freq_hopping_t; typedef struct { uint16_t number_rbs; uint16_t start_rb; uint16_t number_symbols; uint16_t start_symbol; + pusch_freq_hopping_t pusch_freq_hopping; uint8_t mcs; + uint8_t ndi; + uint8_t rv; + uint8_t harq_process_nbr; + int8_t accumulated_delta_PUSCH; + int8_t absolute_delta_PUSCH; } fapi_nr_ul_config_pusch_pdu_rel15_t; typedef struct { @@ -273,6 +279,7 @@ typedef struct { fapi_nr_dl_config_dci_dl_pdu_rel15_t dci_config_rel15; } fapi_nr_dl_config_dci_pdu; + typedef enum{vrb_to_prb_mapping_non_interleaved = 0, vrb_to_prb_mapping_interleaved = 1} vrb_to_prb_mapping_t; //typedef fapi_nr_dci_pdu_rel15_t fapi_nr_dl_config_dlsch_pdu_rel15_t; typedef struct { uint16_t number_rbs; @@ -280,7 +287,18 @@ typedef struct { uint16_t number_symbols; uint16_t start_symbol; uint8_t mcs; + uint8_t ndi; uint8_t rv; + uint8_t tb2_mcs; + uint8_t tb2_ndi; + uint8_t tb2_rv; + uint8_t harq_process_nbr; + vrb_to_prb_mapping_t vrb_to_prb_mapping; + uint8_t dai; + double scaling_factor_S; + int8_t accumulated_delta_PUCCH; + uint8_t pucch_resource_id; + uint8_t pdsch_to_harq_feedback_time_ind; // to be check the fields needed to L1 with NR_DL_UE_HARQ_t and NR_UE_DLSCH_t } fapi_nr_dl_config_dlsch_pdu_rel15_t; diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index a13875ef9c..41e3f01691 100755 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -4088,13 +4088,13 @@ void nr_dci_decoding_procedure0(int s, #endif int reg_p,reg_e; for (int m=0; m < (L2*6); m++){ - reg_p = (((int)floor(m/coreset_time_dur))+((m%coreset_time_dur)*(L2*6/coreset_time_dur)))*9*2; - reg_e = m*9*2; - for (int i=0; i<9*2; i++){ - polar_input[reg_p+i] = (pdcch_vars[eNB_id]->e_rx[((CCEind*9*6*2) + reg_e + i)]>0) ? (1.0):(-1.0); - printf("\t m=%d \tpolar_input[%d]=%lf <-> e_rx[%d]=%d\n",m,reg_p+i,polar_input[reg_p+i], - ((CCEind*9*6*2) + reg_e + i),pdcch_vars[eNB_id]->e_rx[((CCEind*9*6*2) + reg_e + i)]); - } + reg_p = (((int)floor(m/coreset_time_dur))+((m%coreset_time_dur)*(L2*6/coreset_time_dur)))*9*2; + reg_e = m*9*2; + for (int i=0; i<9*2; i++){ + polar_input[reg_p+i] = (pdcch_vars[eNB_id]->e_rx[((CCEind*9*6*2) + reg_e + i)]>0) ? (1.0):(-1.0); + printf("\t m=%d \tpolar_input[%d]=%lf <-> e_rx[%d]=%d\n",m,reg_p+i,polar_input[reg_p+i], + ((CCEind*9*6*2) + reg_e + i),pdcch_vars[eNB_id]->e_rx[((CCEind*9*6*2) + reg_e + i)]); + } } #ifdef NR_PDCCH_DCI_DEBUG @@ -4247,12 +4247,12 @@ void nr_dci_decoding_procedure0(int s, *dci_cnt = *dci_cnt + 1; format_found=_format_1_0_found; } else { - if ((dci_decoded_output[current_thread_id][7]>>(sizeof_bits-1))&1 == 0){ + if (dci_decoded_output[current_thread_id][0]&1 == 0){ dci_alloc[*dci_cnt].format = format0_0; *dci_cnt = *dci_cnt + 1; format_found=_format_0_0_found; } - if ((dci_decoded_output[current_thread_id][7]>>(sizeof_bits-1))&1 == 1){ + if (dci_decoded_output[current_thread_id][0]&1 == 1){ dci_alloc[*dci_cnt].format = format1_0; *dci_cnt = *dci_cnt + 1; format_found=_format_1_0_found; @@ -4276,7 +4276,16 @@ void nr_dci_decoding_procedure0(int s, *dci_cnt = *dci_cnt + 1; } if (format_uss == uformat0_1_and_1_1){ - // Not implemented yet FIXME + if (dci_decoded_output[current_thread_id][0]&1 == 0){ + dci_alloc[*dci_cnt].format = format0_1; + *dci_cnt = *dci_cnt + 1; + format_found=_format_0_1_found; + } + if (dci_decoded_output[current_thread_id][0]&1 == 1){ + dci_alloc[*dci_cnt].format = format1_1; + *dci_cnt = *dci_cnt + 1; + format_found=_format_1_1_found; + } } // store first nCCE of group for PUCCH transmission of ACK/NAK pdcch_vars[eNB_id]->nCCE[nr_tti_rx] = CCEind; @@ -4816,123 +4825,348 @@ uint16_t dci_CRNTI_decoding_procedure(PHY_VARS_NR_UE *ue, #ifdef NR_PDCCH_DCI_RUN -uint16_t nr_dci_format_size (crc_scrambled_t crc_scrambled, - uint8_t pusch_alloc_list, +uint16_t nr_dci_format_size (PHY_VARS_NR_UE *ue, + uint16_t eNB_id, + uint8_t nr_tti_rx, + int p, + crc_scrambled_t crc_scrambled, uint16_t n_RB_ULBWP, uint16_t n_RB_DLBWP, - uint8_t dci_fields_sizes[NBR_NR_DCI_FIELDS][NBR_NR_FORMATS]){ + uint8_t dci_fields_sizes[NBR_NR_DCI_FIELDS][NBR_NR_FORMATS], + uint8_t format){ #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_format_size)-> crc_scrambled=%d, pusch_alloc_list=%d, n_RB_ULBWP=%d, n_RB_DLBWP=%d\n",crc_scrambled,pusch_alloc_list,n_RB_ULBWP,n_RB_DLBWP); + printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_format_size)-> crc_scrambled=%d, n_RB_ULBWP=%d, n_RB_DLBWP=%d\n",crc_scrambled,n_RB_ULBWP,n_RB_DLBWP); #endif /* - * Formats 0_1, not completely implemented. See (*) + * function nr_dci_format_size calculates and returns the size in bits of a determined format + * it also returns an bi-dimensional array 'dci_fields_sizes' with x rows and y columns, where: + * x is the number of fields defined in TS 38.212 subclause 7.3.1 (Each field is mapped in the order in which it appears in the description in the specification) + * y is the number of formats + * e.g.: dci_fields_sizes[10][0] contains the size in bits of the field FREQ_DOM_RESOURCE_ASSIGNMENT_UL for format 0_0 */ -// format {0_0,0_1,1_0,1_1,2_0,2_1,2_2,2_3} according to 38.212 Section 7.3.1 -/* -#define NBR_NR_FORMATS 8 -#define NBR_NR_DCI_FIELDS 56 -#define IDENTIFIER_DCI_FORMATS 0 -#define CARRIER_IND 1 -#define SUL_IND_0_1 2 -#define SLOT_FORMAT_IND 3 -#define PRE_EMPTION_IND 4 -#define TPC_CMD_NUMBER 5 -#define BLOCK_NUMBER 6 -#define BANDWIDTH_PART_IND 7 -#define SHORT_MESSAGE_IND 8 -#define SHORT_MESSAGES 9 -#define FREQ_DOM_RESOURCE_ASSIGNMENT_UL 10 -#define FREQ_DOM_RESOURCE_ASSIGNMENT_DL 11 -#define TIME_DOM_RESOURCE_ASSIGNMENT 12 -#define VRB_TO_PRB_MAPPING 13 -#define PRB_BUNDLING_SIZE_IND 14 -#define RATE_MATCHING_IND 15 -#define ZP_CSI_RS_TRIGGER 16 -#define FREQ_HOPPING_FLAG 17 -#define TB1_MCS 18 -#define TB1_NDI 19 -#define TB1_RV 20 -#define TB2_MCS 21 -#define TB2_NDI 22 -#define TB2_RV 23 -#define MCS 24 -#define NDI 25 -#define RV 26 -#define HARQ_PROCESS_NUMBER 27 -#define DAI_ 28 -#define FIRST_DAI 29 -#define SECOND_DAI 30 -#define TB_SCALING 31 -#define TPC_PUSCH 32 -#define TPC_PUCCH 33 -#define PUCCH_RESOURCE_IND 34 -#define PDSCH_TO_HARQ_FEEDBACK_TIME_IND 35 -//#define SHORT_MESSAGE_IND 33 -#define SRS_RESOURCE_IND 36 -#define PRECOD_NBR_LAYERS 37 -#define ANTENNA_PORTS 38 -#define TCI 39 -#define SRS_REQUEST 40 -#define TPC_CMD_NUMBER_FORMAT2_3 41 -#define CSI_REQUEST 42 -#define CBGTI 43 -#define CBGFI 44 -#define PTRS_DMRS 45 -#define BETA_OFFSET_IND 46 -#define DMRS_SEQ_INI 47 -#define UL_SCH_IND 48 -#define PADDING_NR_DCI 49 -#define SUL_IND_0_0 50 -#define RA_PREAMBLE_INDEX 51 -#define SUL_IND_1_0 52 -#define SS_PBCH_INDEX 53 -#define PRACH_MASK_INDEX 54 -#define RESERVED_NR_DCI 55 -*/ - //uint8_t pusch_alloc_list=1; - // number of ZP CSI-RS resource sets in the higher layer parameter [ZP-CSI-RS-ResourceConfigList] - uint8_t n_zp = 1; - uint8_t n_SRS=1; + // pdsch_config contains the PDSCH-Config IE is used to configure the UE specific PDSCH parameters (TS 38.331) + PDSCH_Config_t pdsch_config = ue->PDSCH_Config; + // pusch_config contains the PUSCH-Config IE is used to configure the UE specific PUSCH parameters (TS 38.331) + PUSCH_Config_t pusch_config = ue->pusch_config; + PUCCH_Config_t pucch_config_dedicated = ue->pucch_config_dedicated_nr[eNB_id]; + crossCarrierSchedulingConfig_t crossCarrierSchedulingConfig = ue->crossCarrierSchedulingConfig; + dmrs_UplinkConfig_t dmrs_UplinkConfig = ue->dmrs_UplinkConfig; + dmrs_DownlinkConfig_t dmrs_DownlinkConfig = ue->dmrs_DownlinkConfig; + csi_MeasConfig_t csi_MeasConfig = ue->csi_MeasConfig; + PUSCH_ServingCellConfig_t PUSCH_ServingCellConfig= ue->PUSCH_ServingCellConfig; + PDSCH_ServingCellConfig_t PDSCH_ServingCellConfig= ue->PDSCH_ServingCellConfig; + NR_UE_PDCCH *pdcch_vars2 = ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]; + +// 1 CARRIER_IN + // crossCarrierSchedulingConfig from higher layers, variable crossCarrierSchedulingConfig indicates if 'cross carrier scheduling' is enabled or not: + // if No cross carrier scheduling: number of bits for CARRIER_IND is 0 + // if Cross carrier scheduling: number of bits for CARRIER_IND is 3 + // The IE CrossCarrierSchedulingConfig is used to specify the configuration when the cross-carrier scheduling is used in a cell + uint8_t crossCarrierSchedulingConfig_ind = 0; + if (crossCarrierSchedulingConfig.schedulingCellInfo.other.cif_InSchedulingCell !=0 ) crossCarrierSchedulingConfig_ind=1; + + +// 2 SUL_IND_0_1, // 40 SRS_REQUEST, // 50 SUL_IND_0_0 + // UL/SUL indicator (TS 38.331, supplementary uplink is indicated in higher layer parameter ServCellAdd-SUL from IE ServingCellConfig and ServingCellConfigCommon): + // 0 bit for UEs not configured with SUL in the cell or UEs configured with SUL in the cell but only PUCCH carrier in the cell is configured for PUSCH transmission + // 1 bit for UEs configured with SUL in the cell as defined in Table 7.3.1.1.1-1 + // sul_ind indicates whether SUL is configured in cell or not + uint8_t sul_ind=ue->supplementaryUplink.supplementaryUplink; // this value will be 0 or 1 depending on higher layer parameter ServCellAdd-SUL. FIXME!!! + +// 7 BANDWIDTH_PART_IND + // number of UL BWPs configured by higher layers + uint8_t n_UL_BWP_RRC=1; // initialized to 1 but it has to be initialized by higher layers FIXME!!! + (n_UL_BWP_RRC > 3)?n_UL_BWP_RRC:(n_UL_BWP_RRC+1); + // number of DL BWPs configured by higher layers + uint8_t n_DL_BWP_RRC=1; // initialized to 1 but it has to be initialized by higher layers FIXME!!! + (n_DL_BWP_RRC > 3)?n_DL_BWP_RRC:(n_DL_BWP_RRC+1); + + +// 10 FREQ_DOM_RESOURCE_ASSIGNMENT_UL + // if format0_0, only resource allocation type 1 is allowed + // if format0_1, then resource allocation type 0 can be configured and N_RBG is defined in TS 38.214 subclause 6.1.2.2.1 + // for PUSCH hopping with resource allocation type 1 // n_UL_hopping = 1 if the higher layer parameter frequencyHoppingOffsetLists contains two offset values // n_UL_hopping = 2 if the higher layer parameter frequencyHoppingOffsetLists contains four offset values - uint8_t n_UL_hopping=0; + uint8_t n_UL_hopping=pusch_config.n_frequencyHoppingOffsetLists; + if (n_UL_hopping == 2) { + n_UL_hopping = 1; + } else if (n_UL_hopping == 4) { + n_UL_hopping = 2; + } else { + n_UL_hopping = 0; + } + ul_resourceAllocation_t ul_resource_allocation_type = pusch_config.ul_resourceAllocation; + uint8_t ul_res_alloc_type_0 = 0; + uint8_t ul_res_alloc_type_1 = 0; + if (ul_resource_allocation_type == ul_resourceAllocationType0) ul_res_alloc_type_0 = 1; + if (ul_resource_allocation_type == ul_resourceAllocationType1) ul_res_alloc_type_1 = 1; + if (ul_resource_allocation_type == ul_dynamicSwitch) { + ul_res_alloc_type_0 = 1; + ul_res_alloc_type_1 = 1; + } + uint8_t n_bits_freq_dom_res_assign_ul,n_ul_RGB_tmp; + if (ul_res_alloc_type_0 == 1){ // implementation of Table 6.1.2.2.1-1 TC 38.214 subclause 6.1.2.2.1 + // config1: PUSCH-Config IE contains rbg-Size ENUMERATED {config1 config2} + ul_rgb_Size_t config = pusch_config.ul_rgbSize; + uint8_t nominal_RBG_P = (config==ul_rgb_config1?2:4); + if (n_RB_ULBWP > 36) nominal_RBG_P = (config==ul_rgb_config1?4:8); + if (n_RB_ULBWP > 72) nominal_RBG_P = (config==ul_rgb_config1?8:16); + if (n_RB_ULBWP > 144) nominal_RBG_P = 16; + n_bits_freq_dom_res_assign_ul = (uint8_t)ceil((n_RB_ULBWP+(0%nominal_RBG_P))/nominal_RBG_P); //FIXME!!! what is 0??? + n_ul_RGB_tmp = n_bits_freq_dom_res_assign_ul; + } + if (ul_res_alloc_type_1 == 1) n_bits_freq_dom_res_assign_ul = (uint8_t)(ceil(log2(n_RB_ULBWP*(n_RB_ULBWP+1)/2)))-n_UL_hopping; + if ((ul_res_alloc_type_0 == 1) && (ul_res_alloc_type_1 == 1)) + n_bits_freq_dom_res_assign_ul = ((n_bits_freq_dom_res_assign_ul>n_ul_RGB_tmp)?(n_bits_freq_dom_res_assign_ul+1):(n_ul_RGB_tmp+1)); + +// 11 FREQ_DOM_RESOURCE_ASSIGNMENT_DL + // if format1_0, only resource allocation type 1 is allowed + // if format1_1, then resource allocation type 0 can be configured and N_RBG is defined in TS 38.214 subclause 5.1.2.2.1 + dl_resourceAllocation_t dl_resource_allocation_type = pdsch_config.dl_resourceAllocation; + uint8_t dl_res_alloc_type_0 = 0; + uint8_t dl_res_alloc_type_1 = 0; + if (dl_resource_allocation_type == dl_resourceAllocationType0) dl_res_alloc_type_0 = 1; + if (dl_resource_allocation_type == dl_resourceAllocationType1) dl_res_alloc_type_1 = 1; + if (dl_resource_allocation_type == dl_dynamicSwitch) { + dl_res_alloc_type_0 = 1; + dl_res_alloc_type_1 = 1; + } + uint8_t n_bits_freq_dom_res_assign_dl,n_dl_RGB_tmp; + if (dl_res_alloc_type_0 == 1){ // implementation of Table 5.1.2.2.1-1 TC 38.214 subclause 6.1.2.2.1 + // config1: PDSCH-Config IE contains rbg-Size ENUMERATED {config1, config2} + dl_rgb_Size_t config = pdsch_config.dl_rgbSize; + uint8_t nominal_RBG_P = (config==dl_rgb_config1?2:4); + if (n_RB_DLBWP > 36) nominal_RBG_P = (config==dl_rgb_config1?4:8); + if (n_RB_DLBWP > 72) nominal_RBG_P = (config==dl_rgb_config1?8:16); + if (n_RB_DLBWP > 144) nominal_RBG_P = 16; + n_bits_freq_dom_res_assign_dl = (uint8_t)ceil((n_RB_DLBWP+(0%nominal_RBG_P))/nominal_RBG_P); //FIXME!!! what is 0??? + n_dl_RGB_tmp = n_bits_freq_dom_res_assign_dl; + } + if (dl_res_alloc_type_1 == 1) n_bits_freq_dom_res_assign_dl = (uint8_t)(ceil(log2(n_RB_DLBWP*(n_RB_DLBWP+1)/2))); + if ((dl_res_alloc_type_0 == 1) && (dl_res_alloc_type_1 == 1)) + n_bits_freq_dom_res_assign_dl = ((n_bits_freq_dom_res_assign_dl>n_dl_RGB_tmp)?(n_bits_freq_dom_res_assign_dl+1):(n_dl_RGB_tmp+1)); + +// 12 TIME_DOM_RESOURCE_ASSIGNMENT + uint8_t pusch_alloc_list = pusch_config.n_push_alloc_list; + uint8_t pdsch_alloc_list = pdsch_config.n_pdsh_alloc_list; + +// 14 PRB_BUNDLING_SIZE_IND:0 bit if the higher layer parameter PRB_bundling is not configured or is set to 'static', or 1 bit if the higher layer parameter PRB_bundling is set to 'dynamic' according to Subclause 5.1.2.3 of [6, TS 38.214] + static_bundleSize_t static_prb_BundlingType = pdsch_config.prbBundleType.staticBundling; + bundleSizeSet1_t dynamic_prb_BundlingType1 = pdsch_config.prbBundleType.dynamicBundlig.bundleSizeSet1; + bundleSizeSet2_t dynamic_prb_BundlingType2 = pdsch_config.prbBundleType.dynamicBundlig.bundleSizeSet2; + uint8_t prb_BundlingType_size=0; + if ((static_prb_BundlingType==st_n4)||(static_prb_BundlingType==st_wideband)) prb_BundlingType_size=0; + if ((dynamic_prb_BundlingType1==dy_1_n4)||(dynamic_prb_BundlingType1==dy_1_wideband)||(dynamic_prb_BundlingType1==dy_1_n2_wideband)||(dynamic_prb_BundlingType1==dy_1_n4_wideband)|| + (dynamic_prb_BundlingType2==dy_2_n4)||(dynamic_prb_BundlingType2==dy_2_wideband)) prb_BundlingType_size=1; + +// 15 RATE_MATCHING_IND FIXME!!! + // according to TS 38.212: Rate matching indicator – 0, 1, or 2 bits according to higher layer parameter rateMatchPattern + uint8_t rateMatching_bits = pdsch_config.n_rateMatchPatterns; +// 16 ZP_CSI_RS_TRIGGER FIXME!!! + // 0, 1, or 2 bits as defined in Subclause 5.1.4.2 of [6, TS 38.214]. + // is the number of ZP CSI-RS resource sets in the higher layer parameter zp-CSI-RS-Resource + uint8_t n_zp_bits = pdsch_config.n_zp_CSI_RS_ResourceId; + +// 17 FREQ_HOPPING_FLAG + // freqHopping is defined by higher layer parameter frequencyHopping from IE PUSCH-Config. Values are ENUMERATED{mode1, mode2} + frequencyHopping_t f_hopping = pusch_config.frequencyHopping; + uint8_t freqHopping = 0; + if ((f_hopping==f_hop_mode1)||(f_hopping==f_hop_mode2)) freqHopping = 1; + +// 28 DAI + pdsch_HARQ_ACK_Codebook_t pdsch_HARQ_ACK_Codebook = pdsch_config.pdsch_HARQ_ACK_Codebook; + uint8_t n_dai = 0; + uint8_t n_serving_cell_dl = 1; // this is hardcoded to 1 as we need to get this value from RRC higher layers parameters. FIXME!!! + if ((pdsch_HARQ_ACK_Codebook == dynamic) && (n_serving_cell_dl == 1)) n_dai = 2; + if ((pdsch_HARQ_ACK_Codebook == dynamic) && (n_serving_cell_dl > 1)) n_dai = 4; + +// 29 FIRST_DAI + uint8_t codebook_HARQ_ACK = 0; // We need to get this value to calculate number of bits of fields 1st DAI and 2nd DAI. + if (pdsch_HARQ_ACK_Codebook == semiStatic) codebook_HARQ_ACK = 1; + if (pdsch_HARQ_ACK_Codebook == dynamic) codebook_HARQ_ACK = 2; + +// 30 SECOND_DAI + uint8_t n_HARQ_ACK_sub_codebooks = 0; // We need to get this value to calculate number of bits of fields 1st DAI and 2nd DAI. FIXME!!! + +// 35 PDSCH_TO_HARQ_FEEDBACK_TIME_IND + uint8_t pdsch_harq_t_ind = (uint8_t)ceil(log2(pucch_config_dedicated.dl_DataToUL_ACK[0])); + +// 36 SRS_RESOURCE_IND + // n_SRS is the number of configured SRS resources in the SRS resource set associated with the higher layer parameter usage of value 'codeBook' or 'nonCodeBook' + // from SRS_ResourceSet_t type we should get the information of the usage parameter (with possible values beamManagement, codebook, nonCodebook, antennaSwitching) + // at frame_parms->srs_nr->p_SRS_ResourceSetList[]->usage + uint8_t n_SRS = ue->srs.number_srs_Resource_Set; + +// 37 PRECOD_NBR_LAYERS +// 38 ANTENNA_PORTS + txConfig_t txConfig = pusch_config.txConfig; + transformPrecoder_t transformPrecoder = pusch_config.transformPrecoder; + codebookSubset_t codebookSubset = pusch_config.codebookSubset; + uint8_t maxRank = pusch_config.maxRank; + uint8_t num_antenna_ports = 1; // this is hardcoded. We need to get the real value FIXME!!! + uint8_t precond_nbr_layers_bits = 0; + uint8_t antenna_ports_bits_ul = 0; + // searching number of bits at tables 7.3.1.1.2-2/3/4/5 from TS 38.212 subclause 7.3.1.1.2 + if (txConfig == txConfig_codebook){ + if (num_antenna_ports == 4) { + if ((transformPrecoder == transformPrecoder_disabled) && ((maxRank == 2)||(maxRank == 3)||(maxRank == 4))) { // Table 7.3.1.1.2-2 + if (codebookSubset == codebookSubset_fullyAndPartialAndNonCoherent) precond_nbr_layers_bits=6; + if (codebookSubset == codebookSubset_partialAndNonCoherent) precond_nbr_layers_bits=5; + if (codebookSubset == codebookSubset_nonCoherent) precond_nbr_layers_bits=4; + } + if (((transformPrecoder == transformPrecoder_enabled)||(transformPrecoder == transformPrecoder_disabled)) && (maxRank == 1)) { // Table 7.3.1.1.2-3 + if (codebookSubset == codebookSubset_fullyAndPartialAndNonCoherent) precond_nbr_layers_bits=5; + if (codebookSubset == codebookSubset_partialAndNonCoherent) precond_nbr_layers_bits=4; + if (codebookSubset == codebookSubset_nonCoherent) precond_nbr_layers_bits=2; + } + } + if (num_antenna_ports == 2) { + if ((transformPrecoder == transformPrecoder_disabled) && (maxRank == 2)) { // Table 7.3.1.1.2-4 + if (codebookSubset == codebookSubset_fullyAndPartialAndNonCoherent) precond_nbr_layers_bits=4; + if (codebookSubset == codebookSubset_nonCoherent) precond_nbr_layers_bits=2; + } + if (((transformPrecoder == transformPrecoder_enabled)||(transformPrecoder == transformPrecoder_disabled)) && (maxRank == 1)) { // Table 7.3.1.1.2-5 + if (codebookSubset == codebookSubset_fullyAndPartialAndNonCoherent) precond_nbr_layers_bits=3; + if (codebookSubset == codebookSubset_nonCoherent) precond_nbr_layers_bits=1; + } + } + } + if (txConfig == txConfig_nonCodebook){ + } + // searching number of bits at tables 7.3.1.1.2-6/7/8/9/10/11/12/13/14/15/16/17/18/19 + if((dmrs_UplinkConfig.pusch_dmrs_type == pusch_dmrs_type1)){ + if ((transformPrecoder == transformPrecoder_enabled) && (dmrs_UplinkConfig.pusch_maxLength == pusch_len1)) antenna_ports_bits_ul = 2; + if ((transformPrecoder == transformPrecoder_enabled) && (dmrs_UplinkConfig.pusch_maxLength == pusch_len2)) antenna_ports_bits_ul = 4; + if ((transformPrecoder == transformPrecoder_disabled) && (dmrs_UplinkConfig.pusch_maxLength == pusch_len1)) antenna_ports_bits_ul = 3; + if ((transformPrecoder == transformPrecoder_disabled) && (dmrs_UplinkConfig.pusch_maxLength == pusch_len2)) antenna_ports_bits_ul = 4; + } + if((dmrs_UplinkConfig.pusch_dmrs_type == pusch_dmrs_type2)){ + if ((transformPrecoder == transformPrecoder_disabled) && (dmrs_UplinkConfig.pusch_maxLength == pusch_len1)) antenna_ports_bits_ul = 4; + if ((transformPrecoder == transformPrecoder_disabled) && (dmrs_UplinkConfig.pusch_maxLength == pusch_len2)) antenna_ports_bits_ul = 5; + } + // for format 1_1 number of bits as defined by Tables 7.3.1.2.2-1/2/3/4 + uint8_t antenna_ports_bits_dl = 0; + if((dmrs_DownlinkConfig.pdsch_dmrs_type == pdsch_dmrs_type1) && (dmrs_DownlinkConfig.pdsch_maxLength == pdsch_len1)) antenna_ports_bits_dl = 4; // Table 7.3.1.2.2-1 + if((dmrs_DownlinkConfig.pdsch_dmrs_type == pdsch_dmrs_type1) && (dmrs_DownlinkConfig.pdsch_maxLength == pdsch_len2)) antenna_ports_bits_dl = 5; // Table 7.3.1.2.2-2 + if((dmrs_DownlinkConfig.pdsch_dmrs_type == pdsch_dmrs_type2) && (dmrs_DownlinkConfig.pdsch_maxLength == pdsch_len1)) antenna_ports_bits_dl = 5; // Table 7.3.1.2.2-3 + if((dmrs_DownlinkConfig.pdsch_dmrs_type == pdsch_dmrs_type2) && (dmrs_DownlinkConfig.pdsch_maxLength == pdsch_len2)) antenna_ports_bits_dl = 6; // Table 7.3.1.2.2-4 + +// 39 TCI + uint8_t tci_bits=0; + if (pdcch_vars2->coreset[p].tciPresentInDCI == tciPresentInDCI_enabled) tci_bits=3; + +// 42 CSI_REQUEST + // reportTriggerSize is defined in the CSI-MeasConfig IE (TS 38.331). + // Size of CSI request field in DCI (bits). Corresponds to L1 parameter 'ReportTriggerSize' (see 38.214, section 5.2) + uint8_t reportTriggerSize = csi_MeasConfig.reportTriggerSize; // value from 0..6 + +// 43 CBGTI + // for format 0_1 + uint8_t maxCodeBlockGroupsPerTransportBlock = 0; + if (PUSCH_ServingCellConfig.maxCodeBlockGroupsPerTransportBlock != 0) + maxCodeBlockGroupsPerTransportBlock = (uint8_t)PUSCH_ServingCellConfig.maxCodeBlockGroupsPerTransportBlock; + // for format 1_1, as defined in Subclause 5.1.7 of [6, TS38.214] + uint8_t maxCodeBlockGroupsPerTransportBlock_dl = 0; + if (PDSCH_ServingCellConfig.maxCodeBlockGroupsPerTransportBlock_dl != 0) + maxCodeBlockGroupsPerTransportBlock_dl = pdsch_config.maxNrofCodeWordsScheduledByDCI; // FIXME!!! + +// 44 CBGFI + uint8_t cbgfi_bit = PDSCH_ServingCellConfig.codeBlockGroupFlushIndicator; + +// 45 PTRS_DMRS + // 0 bit if PTRS-UplinkConfig is not configured and transformPrecoder=disabled, or if transformPrecoder=enabled, or if maxRank=1 + // 2 bits otherwise + uint8_t ptrs_dmrs_bits=0; //FIXME!!! + +// 46 BETA_OFFSET_IND + // at IE PUSCH-Config, beta_offset indicator – 0 if the higher layer parameter betaOffsets = semiStatic; otherwise 2 bits + // uci-OnPUSCH + // Selection between and configuration of dynamic and semi-static beta-offset. If the field is absent or released, the UE applies the value 'semiStatic' and the BetaOffsets + uint8_t betaOffsets = 0; + if (pusch_config.uci_onPusch.betaOffset_type == betaOffset_semiStatic); + if (pusch_config.uci_onPusch.betaOffset_type == betaOffset_dynamic) betaOffsets = 2; + +// 47 DMRS_SEQ_INI + uint8_t dmrs_seq_ini_bits_ul = 0; + uint8_t dmrs_seq_ini_bits_dl = 0; + //1 bit if both scramblingID0 and scramblingID1 are configured in DMRS-UplinkConfig + if ((transformPrecoder == transformPrecoder_disabled) && (dmrs_UplinkConfig.scramblingID0 != 0) && (dmrs_UplinkConfig.scramblingID1 != 0)) dmrs_seq_ini_bits_ul = 1; + //1 bit if both scramblingID0 and scramblingID1 are configured in DMRS-DownlinkConfig + if ((dmrs_DownlinkConfig.scramblingID0 != 0) && (dmrs_DownlinkConfig.scramblingID0 != 0)) dmrs_seq_ini_bits_dl = 1; + +/* + * For format 2_2 + * + * This format supports power control commands for semi-persistent scheduling. + * As we can already support power control commands dynamically with formats 0_0/0_1 (TPC PUSCH) and 1_0/1_1 (TPC PUCCH) + * + * This format will be implemented in the future FIXME!!! + * + */ +// 5 BLOCK_NUMBER: The parameter tpc-PUSCH or tpc-PUCCH provided by higher layers determines the index to the block number for an UL of a cell +// The following fields are defined for each block: Closed loop indicator and TPC command +// 6 CLOSE_LOOP_IND +// 41 TPC_CMD + uint8_t tpc_cmd_bit_2_2 = 2; +/* + * For format 2_3 + * + * This format is used for power control of uplink sounding reference signals for devices which have not coupled SRS power control to the PUSCH power control + * either because independent control is desirable or because the device is configured without PUCCH and PUSCH + * + * This format will be implemented in the future FIXME!!! + * + */ +// 40 SRS_REQUEST +// 41 TPC_CMD + uint8_t tpc_cmd_bit_2_3 = 0; + uint8_t dci_field_size_table [NBR_NR_DCI_FIELDS][NBR_NR_FORMATS] = { // This table contains the number of bits for each field (row) contained in each dci format (column). // The values of the variables indicate field sizes in number of bits //Format0_0 Format0_1 Format1_0 Format1_1 Formats2_0/1/2/3 {1, 1, (((crc_scrambled == _p_rnti) || (crc_scrambled == _si_rnti) || (crc_scrambled == _ra_rnti)) ? 0:1), 1, 0,0,0,0}, // 0 IDENTIFIER_DCI_FORMATS: -{0, 3, 0, 3, 0,0,0,0}, // 1 CARRIER_IND: 0 or 3 bits, as defined in Subclause x.x of [5, TS38.213] -{0, 0, 0, 0, 0,0,0,0}, // 2 SUL_IND_0_1: +{0, ((crossCarrierSchedulingConfig_ind == 0) ? 0:3), + 0, ((crossCarrierSchedulingConfig_ind == 0) ? 0:3), + 0,0,0,0}, // 1 CARRIER_IND: 0 or 3 bits, as defined in Subclause x.x of [5, TS38.213] +{0, (sul_ind == 0)?0:1, 0, 0, 0,0,0,0}, // 2 SUL_IND_0_1: {0, 0, 0, 0, 1,0,0,0}, // 3 SLOT_FORMAT_IND: size of DCI format 2_0 is configurable by higher layers up to 128 bits, according to Subclause 11.1.1 of [5, TS 38.213] {0, 0, 0, 0, 0,1,0,0}, // 4 PRE_EMPTION_IND: size of DCI format 2_1 is configurable by higher layers up to 126 bits, according to Subclause 11.2 of [5, TS 38.213]. Each pre-emption indication is 14 bits -{0, 0, 0, 0, 0,0,1,0}, // 5 TPC_CMD_NUMBER: The parameter xxx provided by higher layers determines the index to the TPC command number for an UL of a cell. Each TPC command number is 2 bits -{0, 0, 0, 0, 0,0,0,1}, // 6 BLOCK_NUMBER: starting position of a block is determined by the parameter startingBitOfFormat2_3 -{0, ceil(log2(n_RB_ULBWP)), 0, ceil(log2(n_RB_ULBWP)), 0,0,0,0}, // 7 BANDWIDTH_PART_IND: +{0, 0, 0, 0, 0,0,0,0}, // 5 BLOCK_NUMBER: starting position of a block is determined by the parameter startingBitOfFormat2_3 +{0, 0, 0, 0, 0,0,1,0}, // 6 CLOSE_LOOP_IND +{0, (uint8_t)ceil(log2(n_UL_BWP_RRC)), + 0, (uint8_t)ceil(log2(n_DL_BWP_RRC)), + 0,0,0,0}, // 7 BANDWIDTH_PART_IND: {0, 0, ((crc_scrambled == _p_rnti) ? 2:0), 0, 0,0,0,0}, // 8 SHORT_MESSAGE_IND 2 bits if crc scrambled with P-RNTI {0, 0, ((crc_scrambled == _p_rnti) ? 8:0), 0, 0,0,0,0}, // 9 SHORT_MESSAGES 8 bit8 if crc scrambled with P-RNTI -{(ceil(log2(n_RB_ULBWP*(n_RB_ULBWP+1)/2)))-n_UL_hopping, - (ceil(log2(n_RB_ULBWP*(n_RB_ULBWP+1)/2)))-n_UL_hopping, +{(uint8_t)(ceil(log2(n_RB_ULBWP*(n_RB_ULBWP+1)/2)))-n_UL_hopping, + n_bits_freq_dom_res_assign_ul, 0, 0, 0,0,0,0}, // 10 FREQ_DOM_RESOURCE_ASSIGNMENT_UL: PUSCH hopping with resource allocation type 1 not considered // (NOTE 1) If DCI format 0_0 is monitored in common search space // and if the number of information bits in the DCI format 0_0 prior to padding // is larger than the payload size of the DCI format 1_0 monitored in common search space // the bitwidth of the frequency domain resource allocation field in the DCI format 0_0 // is reduced such that the size of DCI format 0_0 equals to the size of the DCI format 1_0 -{0, 0, ceil(log2(n_RB_DLBWP*(n_RB_DLBWP+1)/2)), - ceil(log2(n_RB_DLBWP*(n_RB_DLBWP+1)/2)), +{0, 0, (uint8_t)ceil(log2(n_RB_DLBWP*(n_RB_DLBWP+1)/2)), + n_bits_freq_dom_res_assign_dl, 0,0,0,0}, // 11 FREQ_DOM_RESOURCE_ASSIGNMENT_DL: -{4, log2(pusch_alloc_list), 4, log2(pusch_alloc_list), 0,0,0,0}, // 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 6.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits, +{4, (uint8_t)log2(pusch_alloc_list), + 4, (uint8_t)log2(pdsch_alloc_list), + 0,0,0,0}, // 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 6.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits, // where I the number of entries in the higher layer parameter pusch-AllocationList -{0, 1, 1, 1, 0,0,0,0}, // 13 VRB_TO_PRB_MAPPING: 0 bit if only resource allocation type 0 -{0, 0, 0, 1, 0,0,0,0}, // 14 PRB_BUNDLING_SIZE_IND:0 bit if the higher layer parameter PRB_bundling is not configured or is set to 'static', or 1 bit if the higher layer parameter PRB_bundling is set to 'dynamic' according to Subclause 5.1.2.3 of [6, TS 38.214] -{0, 0, 0, 2, 0,0,0,0}, // 15 RATE_MATCHING_IND: 0, 1, or 2 bits according to higher layer parameter rate-match-PDSCH-resource-set -{0, 0, 0, log2(n_zp)+1, 0,0,0,0}, // 16 ZP_CSI_RS_TRIGGER: -{1, 1, 0, 0, 0,0,0,0}, // 17 FREQ_HOPPING_FLAG: 0 bit if only resource allocation type 0 +{0, 0, 1, (((dl_res_alloc_type_0==1)&&(dl_res_alloc_type_1==0))?0:1), + 0,0,0,0}, // 13 VRB_TO_PRB_MAPPING: 0 bit if only resource allocation type 0 +{0, 0, 0, prb_BundlingType_size, 0,0,0,0}, // 14 PRB_BUNDLING_SIZE_IND:0 bit if the higher layer parameter PRB_bundling is not configured or is set to 'static', or 1 bit if the higher layer parameter PRB_bundling is set to 'dynamic' according to Subclause 5.1.2.3 of [6, TS 38.214] +{0, 0, 0, rateMatching_bits, 0,0,0,0}, // 15 RATE_MATCHING_IND: 0, 1, or 2 bits according to higher layer parameter rate-match-PDSCH-resource-set +{0, 0, 0, n_zp_bits, 0,0,0,0}, // 16 ZP_CSI_RS_TRIGGER: +{1, (((ul_res_alloc_type_0==1)&&(ul_res_alloc_type_1==0))||(freqHopping == 0))?0:1, + 0, 0, 0,0,0,0}, // 17 FREQ_HOPPING_FLAG: 0 bit if only resource allocation type 0 {0, 0, 0, 5, 0,0,0,0}, // 18 TB1_MCS: {0, 0, 0, 1, 0,0,0,0}, // 19 TB1_NDI: {0, 0, 0, 2, 0,0,0,0}, // 20 TB1_RV: @@ -4944,29 +5178,34 @@ uint16_t nr_dci_format_size (crc_scrambled_t crc_scrambled, {2, 2, (((crc_scrambled == _c_rnti) || (crc_scrambled == _si_rnti)) ? 2:0), 0, 0,0,0,0}, // 26 RV: {4, 4, (crc_scrambled == _c_rnti)?4:0,4, 0,0,0,0}, // 27 HARQ_PROCESS_NUMBER: -{0, 0, (crc_scrambled == _c_rnti)?2:0,2, 0,0,0,0}, // 28 DAI: For format1_1: 4 if more than one serving cell are configured in the DL and the higher layer parameter HARQ-ACK-codebook=dynamic, where the 2 MSB bits are the counter DAI and the 2 LSB bits are the total DAI +{0, 0, (crc_scrambled == _c_rnti)?2:0,n_dai, 0,0,0,0}, // 28 DAI: For format1_1: 4 if more than one serving cell are configured in the DL and the higher layer parameter HARQ-ACK-codebook=dynamic, where the 2 MSB bits are the counter DAI and the 2 LSB bits are the total DAI // 2 if one serving cell is configured in the DL and the higher layer parameter HARQ-ACK-codebook=dynamic, where the 2 bits are the counter DAI // 0 otherwise -{0, 2, 0, 0, 0,0,0,0}, // 29 FIRST_DAI: (1 or 2 bits) 1 bit for semi-static HARQ-ACK // 2 bits for dynamic HARQ-ACK codebook with single HARQ-ACK codebook -{0, 2, 0, 0, 0,0,0,0}, // 30 SECOND_DAI: (0 or 2 bits) 2 bits for dynamic HARQ-ACK codebook with two HARQ-ACK sub-codebooks // 0 bits otherwise +{0, codebook_HARQ_ACK, 0, 0, 0,0,0,0}, // 29 FIRST_DAI: (1 or 2 bits) 1 bit for semi-static HARQ-ACK // 2 bits for dynamic HARQ-ACK codebook with single HARQ-ACK codebook +{0, (((codebook_HARQ_ACK == 2) && (n_HARQ_ACK_sub_codebooks==2))?2:0), + 0, 0, 0,0,0,0}, // 30 SECOND_DAI: (0 or 2 bits) 2 bits for dynamic HARQ-ACK codebook with two HARQ-ACK sub-codebooks // 0 bits otherwise {0, 0, (((crc_scrambled == _p_rnti) || (crc_scrambled == _ra_rnti)) ? 2:0), 0, 0,0,0,0}, // 31 TB_SCALING {2, 2, 0, 0, 0,0,0,0}, // 32 TPC_PUSCH: {0, 0, (crc_scrambled == _c_rnti)?2:0,2, 0,0,0,0}, // 33 TPC_PUCCH: {0, 0, (crc_scrambled == _c_rnti)?3:0,3, 0,0,0,0}, // 34 PUCCH_RESOURCE_IND: -{0, 0, (crc_scrambled == _c_rnti)?3:0,3, 0,0,0,0}, // 35 PDSCH_TO_HARQ_FEEDBACK_TIME_IND: -{0, log2(n_SRS), 0, 0, 0,0,0,0}, // 36 SRS_RESOURCE_IND: -{0, 0, 0, 0, 0,0,0,0}, // 37 PRECOD_NBR_LAYERS: -{0, 0, 0, 0, 0,0,0,0}, // 38 ANTENNA_PORTS: -{0, 0, 0, 3, 0,0,0,0}, // 39 TCI: 0 bit if higher layer parameter tci-PresentInDCI is not enabled; otherwise 3 bits -{0, 3, 0, 0, 0,0,0,2}, // 40 SRS_REQUEST: -{0, 0, 0, 0, 0,0,0,2}, // 41 TPC_CMD_NUMBER_FORMAT2_3: -{0, 6, 0, 0, 0,0,0,0}, // 42 CSI_REQUEST: -{0, 8, 0, 8, 0,0,0,0}, // 43 CBGTI: 0, 2, 4, 6, or 8 bits determined by higher layer parameter maxCodeBlockGroupsPerTransportBlock for the PDSCH -{0, 0, 0, 1, 0,0,0,0}, // 44 CBGFI: 0 or 1 bit determined by higher layer parameter codeBlockGroupFlushIndicator -{0, 2, 0, 0, 0,0,0,0}, // 45 PTRS_DMRS: -{0, 2, 0, 0, 0,0,0,0}, // 46 BETA_OFFSET_IND: -{0, 1, 0, 1, 0,0,0,0}, // 47 DMRS_SEQ_INI: 1 bit if the cell has two ULs and the number of bits for DCI format 1_0 before padding +{0, 0, (crc_scrambled == _c_rnti)?3:0,pdsch_harq_t_ind, 0,0,0,0}, // 35 PDSCH_TO_HARQ_FEEDBACK_TIME_IND: +{0, (uint8_t)log2(n_SRS), 0, 0, 0,0,0,0}, // 36 SRS_RESOURCE_IND: +{0, precond_nbr_layers_bits, 0, 0, 0,0,0,0}, // 37 PRECOD_NBR_LAYERS: +{0, antenna_ports_bits_ul, 0, antenna_ports_bits_dl, 0,0,0,0}, // 38 ANTENNA_PORTS: +{0, 0, 0, tci_bits, 0,0,0,0}, // 39 TCI: 0 bit if higher layer parameter tci-PresentInDCI is not enabled; otherwise 3 bits +{0, (sul_ind == 0)?2:3, 0, (sul_ind == 0)?2:3, 0,0,0,2}, // 40 SRS_REQUEST: +{0, 0, 0, 0, 0,0,tpc_cmd_bit_2_2, + tpc_cmd_bit_2_3}, + // 41 TPC_CMD: +{0, reportTriggerSize, 0, 0, 0,0,0,0}, // 42 CSI_REQUEST: +{0, maxCodeBlockGroupsPerTransportBlock, + 0, maxCodeBlockGroupsPerTransportBlock_dl, + 0,0,0,0}, // 43 CBGTI: 0, 2, 4, 6, or 8 bits determined by higher layer parameter maxCodeBlockGroupsPerTransportBlock for the PDSCH +{0, 0, 0, cbgfi_bit, 0,0,0,0}, // 44 CBGFI: 0 or 1 bit determined by higher layer parameter codeBlockGroupFlushIndicator +{0, ptrs_dmrs_bits, 0, 0, 0,0,0,0}, // 45 PTRS_DMRS: +{0, betaOffsets, 0, 0, 0,0,0,0}, // 46 BETA_OFFSET_IND: +{0, dmrs_seq_ini_bits_ul, 0, dmrs_seq_ini_bits_dl, 0,0,0,0}, // 47 DMRS_SEQ_INI: 1 bit if the cell has two ULs and the number of bits for DCI format 1_0 before padding // is larger than the number of bits for DCI format 0_0 before padding; 0 bit otherwise {0, 1, 0, 0, 0,0,0,0}, // 48 UL_SCH_IND: value of "1" indicates UL-SCH shall be transmitted on the PUSCH and a value of "0" indicates UL-SCH shall not be transmitted on the PUSCH {0, 0, 0, 0, 0,0,0,0}, // 49 PADDING_NR_DCI: @@ -4975,7 +5214,7 @@ uint16_t nr_dci_format_size (crc_scrambled_t crc_scrambled, // is less than the payload size of the DCI format 1_0 monitored in common search space // zeros shall be appended to the DCI format 0_0 // until the payload size equals that of the DCI format 1_0 -{0, 0, 0, 0, 0,0,0,0}, // 50 SUL_IND_0_0: +{(sul_ind == 0)?0:1, 0, 0, 0, 0,0,0,0}, // 50 SUL_IND_0_0: {0, 0, 0, 0, 0,0,0,0}, // 51 RA_PREAMBLE_INDEX (random access procedure initiated by a PDCCH order not implemented, FIXME!!!) {0, 0, 0, 0, 0,0,0,0}, // 52 SUL_IND_1_0 (random access procedure initiated by a PDCCH order not implemented, FIXME!!!) {0, 0, 0, 0, 0,0,0,0}, // 53 SS_PBCH_INDEX (random access procedure initiated by a PDCCH order not implemented, FIXME!!!) @@ -5012,9 +5251,17 @@ uint8_t dci_size [8] = {0,0,0,0,0,0,0,0}; // will contain size for each format printf("\n"); } printf(" }\n"); - printf("\n\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_format_size) dci_size[0]=%d, dci_size[2]=%d\n",dci_size[0],dci_size[2]); + printf("\n\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_format_size) dci_size[0_0]=%d, dci_size[0_1]=%d, dci_size[1_0]=%d, dci_size[1_1]=%d,\n",dci_size[0],dci_size[1],dci_size[2],dci_size[3]); #endif +//UL/SUL indicator format0_0 (TS 38.212 subclause 7.3.1.1.1) + // - 1 bit if the cell has two ULs and the number of bits for DCI format 1_0 before padding is larger than the number of bits for DCI format 0_0 before padding; + // - 0 bit otherwise. + // The UL/SUL indicator, if present, locates in the last bit position of DCI format 0_0, after the padding bit(s) + if ((dci_field_size_table[SUL_IND_0_0][0] == 1) && (dci_size[0] > dci_size[2])){ + dci_field_size_table[SUL_IND_0_0][0] = 0; + dci_size[0]=dci_size[0]-1; + } // if ((format == format0_0) || (format == format1_0)) { // According to Section 7.3.1.1.1 in TS 38.212 // If DCI format 0_0 is monitored in common search space and if the number of information bits in the DCI format 0_0 prior to padding @@ -5042,6 +5289,19 @@ uint8_t dci_size [8] = {0,0,0,0,0,0,0,0}; // will contain size for each format #endif //} } + + /* + * TS 38.212 subclause 7.3.1.1.2 + * For a UE configured with SUL in a cell: + * if PUSCH is configured to be transmitted on both the SUL and the non-SUL of the cell and + * if the number of information bits in format 0_1 for the SUL + * is not equal to the number of information bits in format 0_1 for the non-SUL, + * zeros shall be appended to smaller format 0_1 until the payload size equals that of the larger format 0_1 + * + * Not implemented. FIXME!!! + * + */ + // } #ifdef NR_PDCCH_DCI_DEBUG printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_format_size) dci_fields_sizes[][] = { \n"); @@ -5053,7 +5313,7 @@ uint8_t dci_size [8] = {0,0,0,0,0,0,0,0}; // will contain size for each format printf(" }\n"); #endif - return dci_size[0]; + return dci_size[format]; } #endif @@ -5190,291 +5450,225 @@ uint8_t nr_dci_decoding_procedure(int s, // for format0_0 => we are NOT implementing format0_0 for common search spaces. FIXME! // for format0_0 and format1_0, first we calculate dci pdu size - format_0_0_1_0_size_bits = nr_dci_format_size(_c_rnti,16,n_RB_ULBWP,n_RB_DLBWP,dci_fields_sizes); + format_0_0_1_0_size_bits = nr_dci_format_size(ue,eNB_id,nr_tti_rx,p,_c_rnti,n_RB_ULBWP,n_RB_DLBWP,dci_fields_sizes,0); format_0_0_1_0_size_bytes = (format_0_0_1_0_size_bits%8 == 0) ? (uint8_t)floor(format_0_0_1_0_size_bits/8) : (uint8_t)(floor(format_0_0_1_0_size_bits/8) + 1); #ifdef NR_PDCCH_DCI_DEBUG printf("\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure)-> calculating dci format size for common searchSpaces with format css_dci_format=%d, format_0_0_1_0_size_bits=%d, format_0_0_1_0_size_bytes=%d\n", css_dci_format,format_0_0_1_0_size_bits,format_0_0_1_0_size_bytes); #endif -#if 0 - // for aggregation level 4. The number of candidates (L2=4) will be calculated in function nr_dci_decoding_procedure0 - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure)-> common searchSpaces with format css_dci_format=%d and aggregation_level=%d\n", - css_dci_format,(1<<2)); - #endif - old_dci_cnt = dci_cnt; - nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, - crc_scrambled_values, 2, - cformat0_0_and_1_0, uformat0_0_and_1_0, - format_0_0_1_0_size_bits, format_0_0_1_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); - if (dci_cnt != old_dci_cnt){ - format_0_0_1_0_size_bits = nr_dci_format_size(crc_scrambled_,16,n_RB_ULBWP,n_RB_DLBWP,dci_fields_sizes); // after decoding dci successfully we recalculate dci pdu size with correct crc scrambled to get the right field sizes + for (int aggregationLevel = 3; aggregationLevel<4 ; aggregationLevel++) { // We fix aggregationLevel to 3 for testing=> nbr of CCE=8 + //for (int aggregationLevel = 2; aggregationLevel<5 ; aggregationLevel++) { + // for aggregation level aggregationLevel. The number of candidates (for L2= 2^aggregationLevel) will be calculated in function nr_dci_decoding_procedure0 + #ifdef NR_PDCCH_DCI_DEBUG + printf("\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure)-> common searchSpaces with format css_dci_format=%d and aggregation_level=%d\n", + css_dci_format,(1<current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, + crc_scrambled_values, aggregationLevel, + cformat0_0_and_1_0, uformat0_0_and_1_0, + format_0_0_1_0_size_bits, format_0_0_1_0_size_bytes, &dci_cnt, + &crc_scrambled_, &format_found_, pdcch_DMRS_scrambling_id,&CCEmap0, &CCEmap1, &CCEmap2); + if (dci_cnt != old_dci_cnt){ + // we will exit the loop as we have found the DCI + aggregationLevel = 5; + format_0_0_1_0_size_bits = nr_dci_format_size(ue,eNB_id,nr_tti_rx,p,crc_scrambled_,n_RB_ULBWP,n_RB_DLBWP,dci_fields_sizes,0); // after decoding dci successfully we recalculate dci pdu size with correct crc scrambled to get the right field sizes + old_dci_cnt = dci_cnt; + for (int i=0; i common searchSpaces with format css_dci_format=%d and aggregation_level=%d\n", - css_dci_format,(1<<3)); - #endif - old_dci_cnt = dci_cnt; - nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, - crc_scrambled_values, 3, - cformat0_0_and_1_0, uformat0_0_and_1_0, - format_0_0_1_0_size_bits, format_0_0_1_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_, pdcch_DMRS_scrambling_id,&CCEmap0, &CCEmap1, &CCEmap2); - if (dci_cnt != old_dci_cnt){ - format_0_0_1_0_size_bits = nr_dci_format_size(crc_scrambled_,16,n_RB_ULBWP,n_RB_DLBWP,dci_fields_sizes); // after decoding dci successfully we recalculate dci pdu size with correct crc scrambled to get the right field sizes - old_dci_cnt = dci_cnt; - for (int i=0; i common searchSpaces with format css_dci_format=%d and aggregation_level=%d\n", - css_dci_format,(1<<4)); - #endif - old_dci_cnt = dci_cnt; - nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, - crc_scrambled_values, 4, - cformat0_0_and_1_0, uformat0_0_and_1_0, - format_0_0_1_0_size_bits, format_0_0_1_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); - if (dci_cnt != old_dci_cnt){ - format_0_0_1_0_size_bits = nr_dci_format_size(crc_scrambled_,16,n_RB_ULBWP,n_RB_DLBWP,dci_fields_sizes); // after decoding dci successfully we recalculate dci pdu size with correct crc scrambled to get the right field sizes - old_dci_cnt = dci_cnt; - for (int i=0; i calculating dci format size for common searchSpaces with format css_dci_format=%d, format2_0_size_bits=%d, format2_0_size_bytes=%d\n", css_dci_format,format_2_0_size_bits,format_2_0_size_bytes); #endif - // for aggregation level 1. The number of candidates (nrofCandidates-SFI) will be calculated in function nr_dci_decoding_procedure0 - old_dci_cnt = dci_cnt; - nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, - crc_scrambled_values, 0, - cformat2_0, uformat0_0_and_1_0, - format_2_0_size_bits, format_2_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); - if (dci_cnt != old_dci_cnt){ + for (int aggregationLevelSFI = 0; aggregationLevelSFI<5 ; aggregationLevelSFI++){ + #ifdef NR_PDCCH_DCI_DEBUG + printf("\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure)-> common searchSpaces with format css_dci_format=%d and aggregation_level=%d\n", + css_dci_format,(1<current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, - crc_scrambled_values, 1, - cformat2_0, uformat0_0_and_1_0, - format_2_0_size_bits, format_2_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); - if (dci_cnt != old_dci_cnt){ - old_dci_cnt = dci_cnt; - for (int i=0; icurrent_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, - crc_scrambled_values, 2, - cformat2_0, uformat0_0_and_1_0, - format_2_0_size_bits, format_2_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); - if (dci_cnt != old_dci_cnt){ - old_dci_cnt = dci_cnt; - for (int i=0; icurrent_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, - crc_scrambled_values, 3, - cformat2_0, uformat0_0_and_1_0, - format_2_0_size_bits, format_2_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); - if (dci_cnt != old_dci_cnt){ - old_dci_cnt = dci_cnt; - for (int i=0; icurrent_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, - crc_scrambled_values, 4, - cformat2_0, uformat0_0_and_1_0, - format_2_0_size_bits, format_2_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); - if (dci_cnt != old_dci_cnt){ - old_dci_cnt = dci_cnt; - for (int i=0; icurrent_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, + crc_scrambled_values, aggregationLevelSFI, + cformat2_0, uformat0_0_and_1_0, + format_2_0_size_bits, format_2_0_size_bytes, &dci_cnt, + &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); + if (dci_cnt != old_dci_cnt){ + // we will exit the loop as we have found the DCI + aggregationLevelSFI = 5; + old_dci_cnt = dci_cnt; + for (int i=0; i calculating dci format size for common searchSpaces with format css_dci_format=%d, format2_1_size_bits=%d, format2_1_size_bytes=%d\n", css_dci_format,format_2_1_size_bits,format_2_1_size_bytes); #endif + for (int aggregationLevel = 0; aggregationLevel<5 ; aggregationLevel++){ + #ifdef NR_PDCCH_DCI_DEBUG + printf("\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure)-> common searchSpaces with format css_dci_format=%d and aggregation_level=%d\n", + css_dci_format,(1<current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, + crc_scrambled_values, aggregationLevel, + cformat2_1, uformat0_0_and_1_0, + format_2_1_size_bits, format_2_1_size_bytes, &dci_cnt, + &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); + if (dci_cnt != old_dci_cnt){ + // we will exit the loop as we have found the DCI + aggregationLevel = 5; + old_dci_cnt = dci_cnt; + for (int i=0; i calculating dci format size for common searchSpaces with format css_dci_format=%d, format2_2_size_bits=%d, format2_2_size_bytes=%d\n", css_dci_format,format_2_2_size_bits,format_2_2_size_bytes); #endif + for (int aggregationLevel = 0; aggregationLevel<5 ; aggregationLevel++){ + #ifdef NR_PDCCH_DCI_DEBUG + printf("\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure)-> common searchSpaces with format css_dci_format=%d and aggregation_level=%d\n", + css_dci_format,(1<current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, + crc_scrambled_values, aggregationLevel, + cformat2_2, uformat0_0_and_1_0, + format_2_2_size_bits, format_2_2_size_bytes, &dci_cnt, + &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); + if (dci_cnt != old_dci_cnt){ + // we will exit the loop as we have found the DCI + aggregationLevel = 5; + old_dci_cnt = dci_cnt; + for (int i=0; i calculating dci format size for common searchSpaces with format css_dci_format=%d, format2_3_size_bits=%d, format2_3_size_bytes=%d\n", css_dci_format,format_2_3_size_bits,format_2_3_size_bytes); #endif + for (int aggregationLevel = 0; aggregationLevel<5 ; aggregationLevel++){ + #ifdef NR_PDCCH_DCI_DEBUG + printf("\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure)-> common searchSpaces with format css_dci_format=%d and aggregation_level=%d\n", + css_dci_format,(1<current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, + crc_scrambled_values, aggregationLevel, + cformat2_3, uformat0_0_and_1_0, + format_2_3_size_bits, format_2_3_size_bytes, &dci_cnt, + &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); + if (dci_cnt != old_dci_cnt){ + // we will exit the loop as we have found the DCI + aggregationLevel = 5; + old_dci_cnt = dci_cnt; + for (int i=0; i calculating dci format size for UE-specific searchSpaces with format uss_dci_format=%d, format_0_0_1_0_size_bits=%d, format_0_0_1_0_size_bytes=%d\n", css_dci_format,format_0_0_1_0_size_bits,format_0_0_1_0_size_bytes); #endif - // blind decoding format0_0 for aggregation level 1. The number of candidates (nrofCandidates) will be calculated in function nr_dci_decoding_procedure0 - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure)-> ue-Specific searchSpaces with format uss_dci_format=%d and aggregation level 1, format_0_0_1_0_size_bits=%d, format_0_0_1_0_size_bytes=%d\n", - uss_dci_format,format_0_0_1_0_size_bits,format_0_0_1_0_size_bytes); - #endif - old_dci_cnt = dci_cnt; -/* - * To be removed, just for unitary testing - */ -//#ifdef NR_PDCCH_DCI_DEBUG -// printf("\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure)-> ### WE PROVOKE DCI DETECTION !!! ### old_dci_cnt=%d and dci_cnt=%d\n", -// old_dci_cnt,dci_cnt); -// dci_cnt++; -//#endif -/* - * To be removed until here - */ - nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 0, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, - crc_scrambled_values, 0, - cformat0_0_and_1_0, uformat0_0_and_1_0, - format_0_0_1_0_size_bits, format_0_0_1_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); - if (dci_cnt != old_dci_cnt){ + for (int aggregationLevel = 0; aggregationLevel<5 ; aggregationLevel++) { // We fix aggregationLevel to 3 for testing=> nbr of CCE=8 + //for (int aggregationLevel = 2; aggregationLevel<5 ; aggregationLevel++) { + // for aggregation level aggregationLevel. The number of candidates (for L2= 2^aggregationLevel) will be calculated in function nr_dci_decoding_procedure0 + #ifdef NR_PDCCH_DCI_DEBUG + printf("\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure)-> common searchSpaces with format css_dci_format=%d and aggregation_level=%d\n", + css_dci_format,(1<current_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, + crc_scrambled_values, aggregationLevel, + cformat0_0_and_1_0, uformat0_0_and_1_0, + format_0_0_1_0_size_bits, format_0_0_1_0_size_bytes, &dci_cnt, + &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); + if (dci_cnt != old_dci_cnt){ + // we will exit the loop as we have found the DCI + aggregationLevel = 5; + old_dci_cnt = dci_cnt; + for (int i=0; i ue-Specific searchSpaces with format uss_dci_format=%d and aggregation level 2, format_0_0_1_0_size_bits=%d, format_0_0_1_0_size_bytes=%d\n", - uss_dci_format,format_0_0_1_0_size_bits,format_0_0_1_0_size_bytes); + printf("\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure)-> calculating dci format size for UE-specific searchSpaces with format uss_dci_format=%d, format_0_1_1_1_size_bits=%d, format_0_1_1_1_size_bytes=%d\n", + css_dci_format,format_0_1_1_1_size_bits,format_0_1_1_1_size_bytes); #endif - old_dci_cnt = dci_cnt; - nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 0, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, - crc_scrambled_values, 1, - cformat0_0_and_1_0, uformat0_0_and_1_0, - format_0_0_1_0_size_bits, format_0_0_1_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); - if (dci_cnt != old_dci_cnt){ + for (int aggregationLevel = 0; aggregationLevel<5 ; aggregationLevel++) { // We fix aggregationLevel to 3 for testing=> nbr of CCE=8 + //for (int aggregationLevel = 2; aggregationLevel<5 ; aggregationLevel++) { + // for aggregation level aggregationLevel. The number of candidates (for L2= 2^aggregationLevel) will be calculated in function nr_dci_decoding_procedure0 + #ifdef NR_PDCCH_DCI_DEBUG + printf("\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure)-> common searchSpaces with format css_dci_format=%d and aggregation_level=%d\n", + css_dci_format,(1< ue-Specific searchSpaces with format uss_dci_format=%d and aggregation level 4, format_0_0_1_0_size_bits=%d, format_0_0_1_0_size_bytes=%d\n", - uss_dci_format,format_0_0_1_0_size_bits,format_0_0_1_0_size_bytes); - #endif - old_dci_cnt = dci_cnt; - nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 0, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, - crc_scrambled_values, 2, - cformat0_0_and_1_0, uformat0_0_and_1_0, - format_0_0_1_0_size_bits, format_0_0_1_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); - if (dci_cnt != old_dci_cnt){ - old_dci_cnt = dci_cnt; - for (int i=0; i ue-Specific searchSpaces with format uss_dci_format=%d and aggregation level 8, format_0_0_1_0_size_bits=%d, format_0_0_1_0_size_bytes=%d\n", - uss_dci_format,format_0_0_1_0_size_bits,format_0_0_1_0_size_bytes); - #endif - old_dci_cnt = dci_cnt; - nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 0, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, - crc_scrambled_values, 3, - cformat0_0_and_1_0, uformat0_0_and_1_0, - format_0_0_1_0_size_bits, format_0_0_1_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); - if (dci_cnt != old_dci_cnt){ - old_dci_cnt = dci_cnt; - for (int i=0; i ue-Specific searchSpaces with format uss_dci_format=%d and aggregation level 16, format_0_0_1_0_size_bits=%d, format_0_0_1_0_size_bytes=%d\n", - uss_dci_format,format_0_0_1_0_size_bits,format_0_0_1_0_size_bytes); - #endif - old_dci_cnt = dci_cnt; - nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 0, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, - crc_scrambled_values, 4, - cformat0_0_and_1_0, uformat0_0_and_1_0, - format_0_0_1_0_size_bits, format_0_0_1_0_size_bytes, &dci_cnt, - &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); - if (dci_cnt != old_dci_cnt){ - old_dci_cnt = dci_cnt; - for (int i=0; icurrent_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, + crc_scrambled_values, aggregationLevel, + cformat0_0_and_1_0, uformat0_1_and_1_1, + format_0_1_1_1_size_bits, format_0_1_1_1_size_bytes, &dci_cnt, + &crc_scrambled_, &format_found_,pdcch_DMRS_scrambling_id, &CCEmap0, &CCEmap1, &CCEmap2); + if (dci_cnt != old_dci_cnt){ + // we will exit the loop as we have found the DCI + aggregationLevel = 5; + old_dci_cnt = dci_cnt; + for (int i=0; i at the end dci_cnt=%d \n",dci_cnt); #endif diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.h b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.h index 4aa441c837..95b6cfd2e2 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.h +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.h @@ -49,8 +49,8 @@ struct NR_DCI_INFO_EXTRACTED { uint8_t sul_ind_0_1 ; // 2 SUL_IND_0_1: uint8_t slot_format_ind ; // 3 SLOT_FORMAT_IND: size of DCI format 2_0 is configurable by higher layers up to 128 bits, according to Subclause 11.1.1 of [5, TS 38.213] uint8_t pre_emption_ind ; // 4 PRE_EMPTION_IND: size of DCI format 2_1 is configurable by higher layers up to 126 bits, according to Subclause 11.2 of [5, TS 38.213]. Each pre-emption indication is 14 bits - uint8_t tpc_cmd_number ; // 5 TPC_CMD_NUMBER: The parameter xxx provided by higher layers determines the index to the TPC command number for an UL of a cell. Each TPC command number is 2 bits - uint8_t block_number ; // 6 BLOCK_NUMBER: starting position of a block is determined by the parameter startingBitOfFormat2_3 + uint8_t block_number ; // 5 BLOCK_NUMBER: starting position of a block is determined by the parameter startingBitOfFormat2_3 + uint8_t close_loop_ind ; // 6 CLOSE_LOOP_IND: uint8_t bandwidth_part_ind ; // 7 BANDWIDTH_PART_IND: uint8_t short_message_ind ; // 8 SHORT_MESSAGE_IND: uint8_t short_messages ; // 9 SHORT_MESSAGES: @@ -93,7 +93,7 @@ struct NR_DCI_INFO_EXTRACTED { uint8_t antenna_ports ; // 38 ANTENNA_PORTS: uint8_t tci ; // 39 TCI: 0 bit if higher layer parameter tci-PresentInDCI is not enabled; otherwise 3 bits uint8_t srs_request ; // 40 SRS_REQUEST: - uint8_t tpc_cmd_number_format2_3 ; // 41 TPC_CMD_NUMBER_FORMAT2_3: + uint8_t tpc_cmd ; // 41 TPC_CMD: uint8_t csi_request ; // 42 CSI_REQUEST: uint8_t cbgti ; // 43 CBGTI: 0, 2, 4, 6, or 8 bits determined by higher layer parameter maxCodeBlockGroupsPerTransportBlock for the PDSCH uint8_t cbgfi ; // 44 CBGFI: 0 or 1 bit determined by higher layer parameter codeBlockGroupFlushIndicator diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c index 579b52fac1..5980ed3bb6 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c @@ -4024,8 +4024,10 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, * then we will do a right-shit of dci_length-13 positions -> (1 1010 1000 1001). And this is the content of the freq_dom_resource_assignment_DL field * * - * At the moment we have implemented: + * At the moment we have implemented the following formats: + * * Format 0_0, that contains the following fields according to Specification 38.212 V15.1.1 Section 7.3.1 + * with CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI * 0 IDENTIFIER_DCI_FORMATS: * 10 FREQ_DOM_RESOURCE_ASSIGNMENT_UL: PUSCH hopping with resource allocation type 1 not considered * 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 6.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits, @@ -4038,10 +4040,37 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, * 49 PADDING_NR_DCI: (Note 2) If DCI format 0_0 is monitored in common search space * 50 SUL_IND_0_0: * + * Format 0_1, that contains the following fields + * with CRC scrambled by C-RNTI or CS-RNTI or SP-CSI-RNTI or new-RNTI + * 0 IDENTIFIER_DCI_FORMATS: + * 1 CARRIER_IND + * 2 SUL_IND_0_1 + * 7 BANDWIDTH_PART_IND + * 10 FREQ_DOM_RESOURCE_ASSIGNMENT_UL: PUSCH hopping with resource allocation type 1 not considered + * 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 6.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits, + * 17 FREQ_HOPPING_FLAG: 0 bit if only resource allocation type 0 + * 24 MCS: + * 25 NDI: + * 26 RV: + * 27 HARQ_PROCESS_NUMBER: + * 29 FIRST_DAI + * 30 SECOND_DAI + * 32 TPC_PUSCH: + * 36 SRS_RESOURCE_IND: + * 37 PRECOD_NBR_LAYERS: + * 38 ANTENNA_PORTS: + * 40 SRS_REQUEST: + * 42 CSI_REQUEST: + * 43 CBGTI + * 45 PTRS_DMRS + * 46 BETA_OFFSET_IND + * 47 DMRS_SEQ_INI + * 48 UL_SCH_IND + * 49 PADDING_NR_DCI: (Note 2) If DCI format 0_0 is monitored in common search space + * * Format 1_0, that contains the following fields + * with CRC scrambled by C-RNTI or CS-RNTI or new-RNTI * 0 IDENTIFIER_DCI_FORMATS: - * 8 SHORT_MESSAGE_IND - * 9 SHORT_MESSAGES * 11 FREQ_DOM_RESOURCE_ASSIGNMENT_DL: * 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 5.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits, * 13 VRB_TO_PRB_MAPPING: 0 bit if only resource allocation type 0 @@ -4050,18 +4079,102 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, * 26 RV: * 27 HARQ_PROCESS_NUMBER: * 28 DAI_: For format1_1: 4 if more than one serving cell are configured in the DL and the higher layer parameter HARQ-ACK-codebook=dynamic, where the 2 MSB bits are the counter DAI and the 2 LSB bits are the total DAI - * 31 TB_SCALING * 33 TPC_PUCCH: * 34 PUCCH_RESOURCE_IND: * 35 PDSCH_TO_HARQ_FEEDBACK_TIME_IND: - * 51 RA_PREAMBLE_INDEX: - * 52 SUL_IND_1_0: - * 53 SS_PBCH_INDEX: - * 54 PRACH_MASK_INDEX: * 55 RESERVED_NR_DCI * + * If the CRC of the DCI format 1_0 is scrambled by C-RNTI and the "Frequency domain resource assignment" field are of all ones, + * the DCI format 1_0 is for random access procedure initiated by a PDCCH order. + * This is not implemented, but the fields are already included: FIXME!!! + * + * with CRC scrambled by P-RNTI + * 8 SHORT_MESSAGE_IND + * 9 SHORT_MESSAGES + * 11 FREQ_DOM_RESOURCE_ASSIGNMENT_DL: + * 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 5.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits, + * 13 VRB_TO_PRB_MAPPING: 0 bit if only resource allocation type 0 + * 24 MCS: + * 31 TB_SCALING + * 55 RESERVED_NR_DCI + * + * with CRC scrambled by SI-RNTI + * 11 FREQ_DOM_RESOURCE_ASSIGNMENT_DL: + * 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 5.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits, + * 13 VRB_TO_PRB_MAPPING: 0 bit if only resource allocation type 0 + * 24 MCS: + * 26 RV: + * 55 RESERVED_NR_DCI + * + * with CRC scrambled by RA-RNTI + * 11 FREQ_DOM_RESOURCE_ASSIGNMENT_DL: + * 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 5.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits, + * 13 VRB_TO_PRB_MAPPING: 0 bit if only resource allocation type 0 + * 24 MCS: + * 31 TB_SCALING + * 55 RESERVED_NR_DCI + * + * with CRC scrambled by TC-RNTI + * 0 IDENTIFIER_DCI_FORMATS: + * 11 FREQ_DOM_RESOURCE_ASSIGNMENT_DL: + * 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 5.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits, + * 13 VRB_TO_PRB_MAPPING: 0 bit if only resource allocation type 0 + * 24 MCS: + * 25 NDI: + * 26 RV: + * 27 HARQ_PROCESS_NUMBER: + * 28 DAI_: For format1_1: 4 if more than one serving cell are configured in the DL and the higher layer parameter HARQ-ACK-codebook=dynamic, where the 2 MSB bits are the counter DAI and the 2 LSB bits are the total DAI + * 33 TPC_PUCCH: + * + * Format 1_1, that contains the following fields + * with CRC scrambled by C-RNTI or CS-RNTI or new-RNTI + * 0 IDENTIFIER_DCI_FORMATS: + * 1 CARRIER_IND: + * 7 BANDWIDTH_PART_IND: + * 11 FREQ_DOM_RESOURCE_ASSIGNMENT_DL: + * 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 5.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits, + * 13 VRB_TO_PRB_MAPPING: 0 bit if only resource allocation type 0 + * 14 PRB_BUNDLING_SIZE_IND: + * 15 RATE_MATCHING_IND: + * 16 ZP_CSI_RS_TRIGGER: + * 18 TB1_MCS: + * 19 TB1_NDI: + * 20 TB1_RV: + * 21 TB2_MCS: + * 22 TB2_NDI: + * 23 TB2_RV: + * 27 HARQ_PROCESS_NUMBER: + * 28 DAI_: For format1_1: 4 if more than one serving cell are configured in the DL and the higher layer parameter HARQ-ACK-codebook=dynamic, where the 2 MSB bits are the counter DAI and the 2 LSB bits are the total DAI + * 33 TPC_PUCCH: + * 34 PUCCH_RESOURCE_IND: + * 35 PDSCH_TO_HARQ_FEEDBACK_TIME_IND: + * 38 ANTENNA_PORTS: + * 39 TCI: + * 40 SRS_REQUEST: + * 43 CBGTI: + * 44 CBGFI: + * 47 DMRS_SEQ_INI: + * + * We have not implemented the following formats: + * + * Format 2_0 + * Used for notifying the slot format + * + * Format 2_1 + * Used for notifying the PRB(s) and OFDM symbol(s) where UE may assume no transmission is intended for the UE + * + * Format 2_2 + * This format supports power control commands for semi-persistent scheduling. + * As we can already support power control commands dynamically with formats 0_0/0_1 (TPC PUSCH) and 1_0/1_1 (TPC PUCCH) + * This format will be implemented in the future FIXME!!! + * + * Format 2_3 + * This format is used for power control of uplink sounding reference signals for devices which have not coupled SRS power control to the PUSCH power control + * either because independent control is desirable or because the device is configured without PUCCH and PUSCH + * This format will be implemented in the future FIXME!!! + * */ - uint8_t dci_fields_sizes_format[NBR_NR_DCI_FIELDS] ={0}; + uint8_t dci_fields_sizes_format[NBR_NR_DCI_FIELDS] = {0}; for (int m=0; mDCINdi; - uint16_t l_RB; + /*uint16_t l_RB; uint16_t start_RB; uint16_t tmp_RIV; uint16_t l_symbol; @@ -4202,7 +4315,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, {j, 8,4}, // row index 14 {j+3,0,8}, // row index 15 {j+3,0,10} // row index 16 - }; + };*/ /* @@ -4292,20 +4405,20 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->pre_emption_ind=%x\n",nr_pdci_info_extracted->pre_emption_ind); #endif break; - case TPC_CMD_NUMBER: // 5 TPC_CMD_NUMBER: (field defined for -,-,-,-,-,-,format2_2,-) - // The parameter xxx provided by higher layers determines the index to the TPC command number for an UL of a cell. Each TPC command number is 2 bits - nr_pdci_info_extracted->tpc_cmd_number = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); - //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG - printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tpc_cmd_number=%x\n",nr_pdci_info_extracted->tpc_cmd_number); -#endif - break; - case BLOCK_NUMBER: // 6 BLOCK_NUMBER: (field defined for -,-,-,-,-,-,-,format2_3) + case BLOCK_NUMBER: // 5 BLOCK_NUMBER: (field defined for -,-,-,-,-,-,-,format2_3) // starting position of a block is determined by the parameter startingBitOfFormat2_3 nr_pdci_info_extracted->block_number = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->block_number=%x\n",nr_pdci_info_extracted->block_number); +#endif + break; + case CLOSE_LOOP_IND: // 6 CLOSE_LOOP_IND: (field defined for -,-,-,-,-,-,format2_2,-) + // The parameter xxx provided by higher layers determines the index to the TPC command number for an UL of a cell. Each TPC command number is 2 bits + nr_pdci_info_extracted->close_loop_ind = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); + //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); +#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->close_loop_ind=%x\n",nr_pdci_info_extracted->close_loop_ind); #endif break; case BANDWIDTH_PART_IND: // 7 BANDWIDTH_PART_IND: (field defined for -,format0_1,-,format1_1,-,-,-,-) @@ -4338,7 +4451,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, // The UE shall assume that when the scheduling PDCCH is received with DCI format 0_0, then uplink resource allocation type 1 is used. nr_pdci_info_extracted->freq_dom_resource_assignment_UL = (uint16_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); - if (dci_format == format0_1){ // uplink resource allocation type 0 or 1 can be used + /*if (dci_format == format0_1){ // uplink resource allocation type 0 or 1 can be used } if (dci_format == format0_0){ // only uplink resource allocation type 1 // At the moment we are supporting only format 1_0 (and not format 1_1), so we only support resource allocation type 1 (and not type 0). @@ -4356,10 +4469,10 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, } ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->first_rb = start_RB; ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->nb_rb = l_RB; - } + }*/ #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->freq_dom_resource_assignment_UL=%x\n",nr_pdci_info_extracted->freq_dom_resource_assignment_UL); - printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> l_RB=%d, start_RB=%d, n_RB_DLBWP=%d\n",l_RB,start_RB,n_RB_ULBWP); + //printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> l_RB=%d, start_RB=%d, n_RB_DLBWP=%d\n",l_RB,start_RB,n_RB_ULBWP); #endif break; @@ -4368,7 +4481,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, // The UE shall assume that when the scheduling grant is received with DCI format 1_0, then downlink resource allocation type 1 is used. nr_pdci_info_extracted->freq_dom_resource_assignment_DL = (uint16_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); - if (dci_format == format1_1){ // uplink resource allocation type 0 or 1 can be used + /*if (dci_format == format1_1){ // uplink resource allocation type 0 or 1 can be used } if (dci_format == format1_0){ // only uplink resource allocation type 1 // At the moment we are supporting only format 0_0 (and not format 0_1), so we only support resource allocation type 1 (and not type 0). @@ -4388,10 +4501,10 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, pdlsch0->current_harq_pid = nr_pdci_info_extracted->harq_process_number; pdlsch0->active = 1; pdlsch0->rnti = rnti; - } + }*/ #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->freq_dom_resource_assignment_DL=%x, RIV = %d\n",nr_pdci_info_extracted->freq_dom_resource_assignment_DL,nr_pdci_info_extracted->freq_dom_resource_assignment_DL); - printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> l_RB=%d, start_RB=%d, n_RB_DLBWP=%d\n",l_RB,start_RB,n_RB_DLBWP); + //printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> l_RB=%d, start_RB=%d, n_RB_DLBWP=%d\n",l_RB,start_RB,n_RB_DLBWP); /* * According to TC 38.212 Subclause 7.3.1.2.1 (V15.2.0) (not implemented FIXME!!!) * If the CRC of the DCI format 1_0 is scrambled by C-RNTI @@ -4443,7 +4556,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, // where I the number of entries in the higher layer parameter pusch-AllocationList nr_pdci_info_extracted->time_dom_resource_assignment = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); - if (dci_format == format0_0 || dci_format == format0_1){ // Subclause 6.1.2.1 of [6, TS 38.214] + /*if (dci_format == format0_0 || dci_format == format0_1){ // Subclause 6.1.2.1 of [6, TS 38.214] k_offset = table_6_1_2_1_1_2_time_dom_res_alloc_A[nr_pdci_info_extracted->time_dom_resource_assignment][0]; sliv_S = table_6_1_2_1_1_2_time_dom_res_alloc_A[nr_pdci_info_extracted->time_dom_resource_assignment][1]; sliv_L = table_6_1_2_1_1_2_time_dom_res_alloc_A[nr_pdci_info_extracted->time_dom_resource_assignment][2]; @@ -4467,7 +4580,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, // k_offset = table_5_1_2_1_1_5_time_dom_res_alloc_C[nr_pdci_info_extracted->time_dom_resource_assignment][0]; // sliv_S = table_5_1_2_1_1_5_time_dom_res_alloc_C[nr_pdci_info_extracted->time_dom_resource_assignment][1]; // sliv_L = table_5_1_2_1_1_5_time_dom_res_alloc_C[nr_pdci_info_extracted->time_dom_resource_assignment][2]; - } + }*/ #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->time_dom_resource_assignment=%x\n",nr_pdci_info_extracted->time_dom_resource_assignment); #endif @@ -4788,11 +4901,11 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->srs_request=%x\n",nr_pdci_info_extracted->srs_request); #endif break; - case TPC_CMD_NUMBER_FORMAT2_3: // 41 TPC_CMD_NUMBER_FORMAT2_3: (field defined for -,-,-,-,-,-,-,format2_3) - nr_pdci_info_extracted->tpc_cmd_number_format2_3 = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); + case TPC_CMD: // 41 TPC_CMD: (field defined for -,-,-,-,-,-,-,format2_3) + nr_pdci_info_extracted->tpc_cmd = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); #ifdef NR_PDCCH_DCI_TOOLS_DEBUG - printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tpc_cmd_number_format2_3=%x\n",nr_pdci_info_extracted->tpc_cmd_number_format2_3); + printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tpc_cmd=%x\n",nr_pdci_info_extracted->tpc_cmd); #endif break; case CSI_REQUEST: // 42 CSI_REQUEST: (field defined for -,format0_1,-,-,-,-,-,-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h index ade1e88eb9..92bdb71f0f 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h @@ -145,6 +145,10 @@ typedef struct { // int calibration_flag; /// Number of soft channel bits uint32_t G; + // number of symbols + uint8_t nb_symbols; + // first symbol in the slot + uint8_t start_symbol; // decode phich uint8_t decode_phich; diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index 45c61a372b..603c02e380 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -624,8 +624,8 @@ typedef struct { #define SUL_IND_0_1 2 #define SLOT_FORMAT_IND 3 #define PRE_EMPTION_IND 4 -#define TPC_CMD_NUMBER 5 -#define BLOCK_NUMBER 6 +#define BLOCK_NUMBER 5 +#define CLOSE_LOOP_IND 6 #define BANDWIDTH_PART_IND 7 #define SHORT_MESSAGE_IND 8 #define SHORT_MESSAGES 9 @@ -660,7 +660,7 @@ typedef struct { #define ANTENNA_PORTS 38 #define TCI 39 #define SRS_REQUEST 40 -#define TPC_CMD_NUMBER_FORMAT2_3 41 +#define TPC_CMD 41 #define CSI_REQUEST 42 #define CBGTI 43 #define CBGFI 44 @@ -732,7 +732,7 @@ typedef struct { } NR_UE_CORESET_CCE_REG_MAPPING_t; typedef enum {allContiguousRBs=0,sameAsREGbundle=1} NR_UE_CORESET_precoder_granularity_t; - +typedef enum {tciPresentInDCI_enabled = 1} tciPresentInDCI_t; typedef struct { /* * define CORESET structure according to 38.331 @@ -771,7 +771,7 @@ typedef struct { NR_UE_CORESET_CCE_REG_MAPPING_t cce_reg_mappingType; NR_UE_CORESET_precoder_granularity_t precoderGranularity; int tciStatesPDCCH; - int tciPresentInDCI; + tciPresentInDCI_t tciPresentInDCI; uint16_t pdcchDMRSScramblingID; uint16_t rb_offset; } NR_UE_PDCCH_CORESET; @@ -1214,6 +1214,14 @@ typedef struct { PUCCH_Config_t pucch_config_dedicated_nr[NUMBER_OF_CONNECTED_eNB_MAX]; PUSCH_Config_t pusch_config; + SRS_NR srs; + + crossCarrierSchedulingConfig_t crossCarrierSchedulingConfig; + supplementaryUplink_t supplementaryUplink; + dmrs_UplinkConfig_t dmrs_UplinkConfig; + dmrs_DownlinkConfig_t dmrs_DownlinkConfig; + csi_MeasConfig_t csi_MeasConfig; + PUSCH_ServingCellConfig_t PUSCH_ServingCellConfig; #endif diff --git a/openair1/PHY/impl_defs_nr.h b/openair1/PHY/impl_defs_nr.h index b2be888e18..f3f1e39d5b 100644 --- a/openair1/PHY/impl_defs_nr.h +++ b/openair1/PHY/impl_defs_nr.h @@ -372,12 +372,104 @@ typedef struct { /* FFS TODO_NR partial structure that should be complete */ +typedef enum { + semiStatic = 0, + dynamic = 1 +} pdsch_HARQ_ACK_Codebook_t; + + +////////////////////////////////////////////////////////////////////////////////################################ +#define MAX_NR_RATE_MATCH_PATTERNS 4 +#define MAX_NR_ZP_CSI_RS_RESOURCES 32 + +typedef enum{ + dl_resourceAllocationType0 = 1, + dl_resourceAllocationType1 = 2, + dl_dynamicSwitch = 3 +} dl_resourceAllocation_t; +typedef enum{ + dl_rgb_config1 = 1, + dl_rgb_config2 = 2 +} dl_rgb_Size_t; +typedef enum { + st_n4 = 1, + st_wideband = 2 +} static_bundleSize_t; +typedef enum { + dy_1_n4 = 1, + dy_1_wideband = 2, + dy_1_n2_wideband = 3, + dy_1_n4_wideband = 4 +} bundleSizeSet1_t; +typedef enum { + dy_2_n4 = 1, + dy_2_wideband = 2, +} bundleSizeSet2_t; +typedef struct{ + bundleSizeSet1_t bundleSizeSet1; + bundleSizeSet2_t bundleSizeSet2; +} dynamic_bundleSize_t; +typedef struct { + static_bundleSize_t staticBundling; + dynamic_bundleSize_t dynamicBundlig; +} prb_bundleType_t; typedef enum { nb_code_n1 = 1, nb_code_n2 = 2 } maxNrofCodeWordsScheduledByDCI_t; - +typedef struct{ +// to be defined FIXME!!! +}rateMatchPattern_t; +typedef struct{ +// to be defined FIXME!!! +}zp_CSI_RS_Resource_t; typedef struct { +/* + * resourceAllocation + */ + dl_resourceAllocation_t dl_resourceAllocation; +/* + * corresponds to I, where I the number of entries in the higher layer parameter pdsch-AllocationList + */ + uint8_t n_pdsh_alloc_list; +/* + * rateMatchPatternToAddModList + */ + rateMatchPattern_t rateMatchPatternToAddModList[MAX_NR_RATE_MATCH_PATTERNS]; +/* + * rateMatchPatternToReleaseList + */ + uint8_t rateMatchPatternToReleaseList[MAX_NR_RATE_MATCH_PATTERNS]; + /* + * n_rateMatchPatterns indicates the number of rateMatchPatterns defined currently + */ + uint8_t n_rateMatchPatterns; + /* + * zp-CSI-RS-ResourceToAddModList + */ + zp_CSI_RS_Resource_t zp_CSI_RS_Resource[MAX_NR_ZP_CSI_RS_RESOURCES]; + /* + * zp-CSI-RS-ResourceToReleaseList + */ + uint8_t zp_CSI_RS_ResourceId[MAX_NR_ZP_CSI_RS_RESOURCES]; + /* + * n_zp-CSI-RS-Resource + */ + uint8_t n_zp_CSI_RS_ResourceId; +/* + * rgb_Size + */ + dl_rgb_Size_t dl_rgbSize; +/* + * prb-BundlingType + */ + prb_bundleType_t prbBundleType; +/* + * pdsch-HARQ-ACK-Codebook: this is part of the IE PhysicalCellGroupConfig which is used to configure cell-group specific L1 parameters (TS 38.331) + */ + pdsch_HARQ_ACK_Codebook_t pdsch_HARQ_ACK_Codebook; + ////////////////////////////////////////////////////////////////////////////////################################ + /* Maximum number of code words that a single DCI may schedule. This changes the number of MCS/RV/NDI bits in the DCI message from 1 to 2. */ @@ -415,8 +507,168 @@ typedef struct { mappingType_t mappingType; uint8_t startSymbolAndLength; } PUSCH_TimeDomainResourceAllocation_t; +////////////////////////////////////////////////////////////////////////////////################################ +typedef struct { // The IE PTRS-UplinkConfig is used to configure uplink Phase-Tracking-Reference-Signals (PTRS) +} ptrs_UplinkConfig_t; +typedef enum{ + maxCodeBlockGroupsPerTransportBlock_n2 = 2, + maxCodeBlockGroupsPerTransportBlock_n4 = 4, + maxCodeBlockGroupsPerTransportBlock_n6 = 6, + maxCodeBlockGroupsPerTransportBlock_n8 = 8 +} maxCodeBlockGroupsPerTransportBlock_t; +typedef struct{ // The IE PUSCH-ServingCellConfig is used to configure UE specific PUSCH parameters that are common across the UE's BWPs of one serving cell + maxCodeBlockGroupsPerTransportBlock_t maxCodeBlockGroupsPerTransportBlock; +} PUSCH_ServingCellConfig_t; +typedef struct{ // CSI-MeasConfig IE is used to configure CSI-RS (reference signals) + uint8_t reportTriggerSize; +} csi_MeasConfig_t; +typedef enum { + pdsch_dmrs_type1 = 1, + pdsch_dmrs_type2 = 2 +} pdsch_dmrs_type_t; +typedef enum { + pusch_dmrs_type1 = 1, + pusch_dmrs_type2 = 2 +} pusch_dmrs_type_t; +typedef enum { + pdsch_dmrs_pos0 = 0, + pdsch_dmrs_pos1 = 1, + pdsch_dmrs_pos3 = 3, +} pdsch_dmrs_AdditionalPosition_t; +typedef enum { + pusch_dmrs_pos0 = 0, + pusch_dmrs_pos1 = 1, + pusch_dmrs_pos3 = 3, +} pusch_dmrs_AdditionalPosition_t; +typedef enum { + pdsch_len1 = 1, + pdsch_len2 = 2 +} pdsch_maxLength_t; +typedef enum { + pusch_len1 = 1, + pusch_len2 = 2 +} pusch_maxLength_t; +typedef struct { // The IE DMRS-DownlinkConfig is used to configure downlink demodulation reference signals for PDSCH + pdsch_dmrs_type_t pdsch_dmrs_type; + pdsch_dmrs_AdditionalPosition_t pdsch_dmrs_AdditionalPosition; + pdsch_maxLength_t pdsch_maxLength; + uint16_t scramblingID0; + uint16_t scramblingID1; +} dmrs_DownlinkConfig_t; +typedef struct { // The IE DMRS-UplinkConfig is used to configure uplink demodulation reference signals for PUSCH + pusch_dmrs_type_t pusch_dmrs_type; + pusch_dmrs_AdditionalPosition_t pusch_dmrs_AdditionalPosition; + pusch_maxLength_t pusch_maxLength; + uint16_t scramblingID0; + uint16_t scramblingID1; +} dmrs_UplinkConfig_t; typedef struct { +/* + * Serving cell ID of a PSCell. The PCell of the Master Cell Group uses ID = 0 + */ + uint8_t servCellIndex; +}servCellIndex_t; +typedef struct{ + uint8_t cif_presence; +}own_t; +typedef struct{ + servCellIndex_t scheduling_cell_id; + uint8_t cif_InSchedulingCell; +}other_t; +typedef struct{ + own_t own; + other_t other; +}schedulingCellInfo_t; +typedef struct{ + schedulingCellInfo_t schedulingCellInfo; +} crossCarrierSchedulingConfig_t; +typedef struct{ + // this variable will be filled with '1' if SUL is supported and '0' if SUL is not supported + uint8_t supplementaryUplink; +}supplementaryUplink_t; + +typedef enum { + txConfig_codebook = 1, + txConfig_nonCodebook = 2 +} txConfig_t; +typedef enum { + f_hop_mode1 = 1, + f_hop_mode2 = 2 +} frequencyHopping_t; +typedef enum{ + ul_resourceAllocationType0 = 1, + ul_resourceAllocationType1 = 2, + ul_dynamicSwitch = 3 +} ul_resourceAllocation_t; +typedef enum{ + ul_rgb_config1 = 1, + ul_rgb_config2 = 2 +} ul_rgb_Size_t; +typedef enum { + transformPrecoder_enabled = 1, + transformPrecoder_disabled = 2 +} transformPrecoder_t; +typedef enum { + codebookSubset_fullyAndPartialAndNonCoherent = 1, + codebookSubset_partialAndNonCoherent = 2, + codebookSubset_nonCoherent = 3 +} codebookSubset_t; +typedef enum{ + betaOffset_dynamic = 1, + betaOffset_semiStatic = 2 +}betaOffset_type_t; +typedef struct{ + +} betaOffset_t; +typedef struct { + betaOffset_type_t betaOffset_type; + betaOffset_t betaOffset; +} uci_onPusch_t; +typedef struct { +/* + * txConfig + */ + txConfig_t txConfig; +/* + * frequencyHopping + */ + frequencyHopping_t frequencyHopping; +/* + * frequencyHoppingOffsetLists + */ + uint16_t frequencyHoppingOffsetLists[4]; + // n_frequencyHoppingOffsetLists contains the number of offsets listed. We can list up to 4 offsets + uint8_t n_frequencyHoppingOffsetLists; +/* + * resourceAllocation + */ + ul_resourceAllocation_t ul_resourceAllocation; +/* + * rgb_Size + */ + ul_rgb_Size_t ul_rgbSize; +/* + * corresponds to I, where I the number of entries in the higher layer parameter pusch-AllocationList + */ + uint8_t n_push_alloc_list; +/* + * transformPrecoder + */ +transformPrecoder_t transformPrecoder; +/* + * codebookSubset + */ +codebookSubset_t codebookSubset; +/* + * maxRank + */ +uint8_t maxRank; +/* + * uci_onPusch + */ +uci_onPusch_t uci_onPusch; +////////////////////////////////////////////////////////////////////////////////################################ PUSCH_PowerControl_t pusch_PowerControl; PUSCH_TimeDomainResourceAllocation_t *pusch_TimeDomainResourceAllocation[MAX_NR_OF_UL_ALLOCATIONS]; } PUSCH_Config_t; @@ -649,11 +901,6 @@ typedef struct { typedef uint16_t RNTI_value_t; -typedef enum { - semiStatic = 0, - dynamic = 1 -} pdsch_HARQ_ACK_Codebook_t; - typedef struct { /* -- Enables spatial bundling of HARQ ACKs. It is configured per cell group (i.e. for all the cells within the cell group) for PUCCH @@ -750,6 +997,12 @@ typedef enum { n12_dl_harq = 12, n16_dl_harq = 16 } nrofHARQ_ProcessesForPDSCH_t; +typedef enum{ + maxCodeBlockGroupsPerTransportBlock_dl_n2 = 2, + maxCodeBlockGroupsPerTransportBlock_dl_n4 = 4, + maxCodeBlockGroupsPerTransportBlock_dl_n6 = 6, + maxCodeBlockGroupsPerTransportBlock_dl_n8 = 8 +} maxCodeBlockGroupsPerTransportBlock_dl_t; typedef struct { /* @@ -772,7 +1025,14 @@ typedef struct { -- If the field is absent, the UE sends the HARQ feedback on the PUCCH of the SpCell of this cell group. */ uint8_t pucch_Cell; - +/* + * maxCodeBlockGroupsPerTransportBlock_dl_t + */ + maxCodeBlockGroupsPerTransportBlock_dl_t maxCodeBlockGroupsPerTransportBlock_dl; +/* + * codeBlockGroupFlushIndicator (boolean) + */ + uint8_t codeBlockGroupFlushIndicator; } PDSCH_ServingCellConfig_t; /*********************************************************************** diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c index 53d3ae339b..188beb3ec7 100644 --- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c +++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c @@ -49,6 +49,8 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ if(scheduled_response != NULL){ NR_UE_PDCCH *pdcch_vars2 = PHY_vars_UE_g[module_id][cc_id]->pdcch_vars[0][0]; + NR_UE_DLSCH_t *dlsch0 = PHY_vars_UE_g[module_id][cc_id]->dlsch[0][0]; + NR_UE_ULSCH_t *ulsch0 = PHY_vars_UE_g[module_id][cc_id]->ulsch[0]; if(scheduled_response->dl_config != NULL){ fapi_nr_dl_config_request_t *dl_config = scheduled_response->dl_config; @@ -86,16 +88,47 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ //pdcch_vars2->coreset[i].tciStatesPDCCH; //pdcch_vars2->coreset[i].tciPresentInDCI; pdcch_vars2->coreset[i].pdcchDMRSScramblingID = dci_config->coreset.pdcch_dmrs_scrambling_id; + }else{ //FAPI_NR_DL_CONFIG_TYPE_DLSCH // dlsch config pdu - } + fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu = &dl_config->dl_config_list[i].dlsch_config_pdu.dlsch_config_rel15; + uint8_t current_harq_pid = dlsch_config_pdu->harq_process_nbr; + dlsch0->current_harq_pid = current_harq_pid; + dlsch0->active = 1; + dlsch0->harq_processes[current_harq_pid]->nb_rb = dlsch_config_pdu->number_rbs; + dlsch0->harq_processes[current_harq_pid]->start_rb = dlsch_config_pdu->start_rb; + dlsch0->harq_processes[current_harq_pid]->nb_symbols = dlsch_config_pdu->number_symbols; + dlsch0->harq_processes[current_harq_pid]->start_symbol = dlsch_config_pdu->start_symbol; + dlsch0->harq_processes[current_harq_pid]->mcs = dlsch_config_pdu->mcs; + dlsch0->harq_processes[current_harq_pid]->DCINdi = dlsch_config_pdu->ndi; + dlsch0->harq_processes[current_harq_pid]->rvidx = dlsch_config_pdu->rv; + dlsch0->g_pucch = dlsch_config_pdu->accumulated_delta_PUCCH; + dlsch0->harq_processes[current_harq_pid]->harq_ack.pucch_resource_indicator = dlsch_config_pdu->pucch_resource_id; + dlsch0->harq_processes[current_harq_pid]->harq_ack.slot_for_feedback_ack = dlsch_config_pdu->pdsch_to_harq_feedback_time_ind; + //pdlsch0->rnti = rnti; + } } }else{ pdcch_vars2->nb_search_space = 0; } if(scheduled_response->ul_config != NULL){ - + fapi_nr_ul_config_request_t *ul_config = scheduled_response->ul_config; + for(i=0; inumber_pdus; ++i){ + if(ul_config->ul_config_list[i].pdu_type == FAPI_NR_DL_CONFIG_TYPE_PUSCH){ + // pusch config pdu + fapi_nr_ul_config_pusch_pdu_rel15_t *pusch_config_pdu = &ul_config->ul_config_list[i].ulsch_config_pdu.ulsch_pdu_rel15; + uint8_t current_harq_pid = pusch_config_pdu->harq_process_nbr; + ulsch0->harq_processes[current_harq_pid]->nb_rb = pusch_config_pdu->number_rbs; + ulsch0->harq_processes[current_harq_pid]->first_rb = pusch_config_pdu->start_rb; + ulsch0->harq_processes[current_harq_pid]->nb_symbols = pusch_config_pdu->number_symbols; + ulsch0->harq_processes[current_harq_pid]->start_symbol = pusch_config_pdu->start_symbol; + ulsch0->harq_processes[current_harq_pid]->mcs = pusch_config_pdu->mcs; + ulsch0->harq_processes[current_harq_pid]->DCINdi = pusch_config_pdu->ndi; + ulsch0->harq_processes[current_harq_pid]->rvidx = pusch_config_pdu->rv; + ulsch0->f_pusch = pusch_config_pdu->absolute_delta_PUSCH; + } + } }else{ } diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 69c8ca6845..309d3a42ba 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -538,6 +538,233 @@ NR_UE_L2_STATE_t nr_ue_scheduler( return CONNECTION_OK; } +////////////// +/* + * This code contains all the functions needed to process all dci fields. + * These functions are going to be called by function nr_ue_process_dci + */ + +int8_t nr_ue_process_dci_freq_dom_resource_assignment( + fapi_nr_ul_config_pusch_pdu_rel15_t *ulsch_config_pdu, + fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu, + uint16_t n_RB_ULBWP, + uint16_t n_RB_DLBWP, + uint16_t riv +){ + uint16_t l_RB; + uint16_t start_RB; + uint16_t tmp_RIV; + +/* + * TS 38.214 subclause 5.1.2.2 Resource allocation in frequency domain (downlink) + * when the scheduling grant is received with DCI format 1_0, then downlink resource allocation type 1 is used + */ + if(dlsch_config_pdu != NULL){ + /* + * TS 38.214 subclause 5.1.2.2.1 Downlink resource allocation type 0 + */ + /* + * TS 38.214 subclause 5.1.2.2.2 Downlink resource allocation type 1 + */ + // For resource allocation type 1, the resource allocation field consists of a resource indication value (RIV): + // RIV = n_RB_DLBWP * (l_RB - 1) + start_RB if (l_RB - 1) <= floor (n_RB_DLBWP/2) + // RIV = n_RB_DLBWP * (n_RB_DLBWP - l_RB + 1) + (n_RB_DLBWP - 1 - start_RB) if (l_RB - 1) > floor (n_RB_DLBWP/2) + // the following two expressions apply only if (l_RB - 1) <= floor (n_RB_DLBWP/2) + l_RB = floor(riv/n_RB_DLBWP) + 1; + start_RB = riv%n_RB_DLBWP; + // if (l_RB - 1) > floor (n_RB_DLBWP/2) we need to recalculate them using the following lines + tmp_RIV = n_RB_DLBWP * (l_RB - 1) + start_RB; + if (tmp_RIV != riv) { // then (l_RB - 1) > floor (n_RB_DLBWP/2) and we need to recalculate l_RB and start_RB + l_RB = n_RB_DLBWP - l_RB + 2; + start_RB = n_RB_DLBWP - start_RB - 1; + } + dlsch_config_pdu->number_rbs = l_RB; + dlsch_config_pdu->start_rb = start_RB; + } + if(ulsch_config_pdu != NULL){ +/* + * TS 38.214 subclause 6.1.2.2 Resource allocation in frequency domain (uplink) + */ + /* + * TS 38.214 subclause 6.1.2.2.1 Uplink resource allocation type 0 + */ + /* + * TS 38.214 subclause 6.1.2.2.2 Uplink resource allocation type 1 + */ + // For resource allocation type 1, the resource allocation field consists of a resource indication value (RIV): + // RIV = n_RB_ULBWP * (l_RB - 1) + start_RB if (l_RB - 1) <= floor (n_RB_ULBWP/2) + // RIV = n_RB_ULBWP * (n_RB_ULBWP - l_RB + 1) + (n_RB_ULBWP - 1 - start_RB) if (l_RB - 1) > floor (n_RB_ULBWP/2) + // the following two expressions apply only if (l_RB - 1) <= floor (n_RB_ULBWP/2) + l_RB = floor(riv/n_RB_ULBWP) + 1; + start_RB = riv%n_RB_ULBWP; + // if (l_RB - 1) > floor (n_RB_ULBWP/2) we need to recalculate them using the following lines + tmp_RIV = n_RB_ULBWP * (l_RB - 1) + start_RB; + if (tmp_RIV != riv) { // then (l_RB - 1) > floor (n_RB_ULBWP/2) and we need to recalculate l_RB and start_RB + l_RB = n_RB_ULBWP - l_RB + 2; + start_RB = n_RB_ULBWP - start_RB - 1; + } + ulsch_config_pdu->number_rbs = l_RB; + ulsch_config_pdu->start_rb = start_RB; + } + return 0; +} + +int8_t nr_ue_process_dci_time_dom_resource_assignment( + fapi_nr_ul_config_pusch_pdu_rel15_t *ulsch_config_pdu, + fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu, + uint8_t time_domain_ind, + long dmrs_typeA_pos +){ + uint8_t k_offset; + uint8_t sliv_S; + uint8_t sliv_L; + uint8_t table_5_1_2_1_1_2_time_dom_res_alloc_A[16][3]={ // for PDSCH from TS 38.214 subclause 5.1.2.1.1 + {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?12:11}, // row index 1 + {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?10:9}, // row index 2 + {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?9:8}, // row index 3 + {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?7:6}, // row index 4 + {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?5:4}, // row index 5 + {0,(dmrs_typeA_pos == 2)?9:10,(dmrs_typeA_pos == 2)?4:4}, // row index 6 + {0,(dmrs_typeA_pos == 2)?4:6, (dmrs_typeA_pos == 2)?4:4}, // row index 7 + {0,5,7}, // row index 8 + {0,5,2}, // row index 9 + {0,9,2}, // row index 10 + {0,12,2}, // row index 11 + {0,1,13}, // row index 12 + {0,1,6}, // row index 13 + {0,2,4}, // row index 14 + {0,4,7}, // row index 15 + {0,8,4} // row index 16 + }; + uint8_t table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP[16][3]={ // for PDSCH from TS 38.214 subclause 5.1.2.1.1 + {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?6:5}, // row index 1 + {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?10:9}, // row index 2 + {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?9:8}, // row index 3 + {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?7:6}, // row index 4 + {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?5:4}, // row index 5 + {0,(dmrs_typeA_pos == 2)?6:8, (dmrs_typeA_pos == 2)?4:2}, // row index 6 + {0,(dmrs_typeA_pos == 2)?4:6, (dmrs_typeA_pos == 2)?4:4}, // row index 7 + {0,5,6}, // row index 8 + {0,5,2}, // row index 9 + {0,9,2}, // row index 10 + {0,10,2}, // row index 11 + {0,1,11}, // row index 12 + {0,1,6}, // row index 13 + {0,2,4}, // row index 14 + {0,4,6}, // row index 15 + {0,8,4} // row index 16 + }; + uint8_t table_5_1_2_1_1_4_time_dom_res_alloc_B[16][3]={ // for PDSCH from TS 38.214 subclause 5.1.2.1.1 + {0,2,2}, // row index 1 + {0,4,2}, // row index 2 + {0,6,2}, // row index 3 + {0,8,2}, // row index 4 + {0,10,2}, // row index 5 + {1,2,2}, // row index 6 + {1,4,2}, // row index 7 + {0,2,4}, // row index 8 + {0,4,4}, // row index 9 + {0,6,4}, // row index 10 + {0,8,4}, // row index 11 + {0,10,4}, // row index 12 + {0,2,7}, // row index 13 + {0,(dmrs_typeA_pos == 2)?2:3,(dmrs_typeA_pos == 2)?12:11}, // row index 14 + {1,2,4}, // row index 15 + {0,0,0} // row index 16 + }; + uint8_t table_5_1_2_1_1_5_time_dom_res_alloc_C[16][3]={ // for PDSCH from TS 38.214 subclause 5.1.2.1.1 + {0,2,2}, // row index 1 + {0,4,2}, // row index 2 + {0,6,2}, // row index 3 + {0,8,2}, // row index 4 + {0,10,2}, // row index 5 + {0,0,0}, // row index 6 + {0,0,0}, // row index 7 + {0,2,4}, // row index 8 + {0,4,4}, // row index 9 + {0,6,4}, // row index 10 + {0,8,4}, // row index 11 + {0,10,4}, // row index 12 + {0,2,7}, // row index 13 + {0,(dmrs_typeA_pos == 2)?2:3,(dmrs_typeA_pos == 2)?12:11}, // row index 14 + {0,0,6}, // row index 15 + {0,2,6} // row index 16 + }; + uint8_t mu_pusch = 1; + // definition table j Table 6.1.2.1.1-4 + uint8_t j = (mu_pusch==3)?3:(mu_pusch==2)?2:1; + uint8_t table_6_1_2_1_1_2_time_dom_res_alloc_A[16][3]={ // for PUSCH from TS 38.214 subclause 6.1.2.1.1 + {j, 0,14}, // row index 1 + {j, 0,12}, // row index 2 + {j, 0,10}, // row index 3 + {j, 2,10}, // row index 4 + {j, 4,10}, // row index 5 + {j, 4,8}, // row index 6 + {j, 4,6}, // row index 7 + {j+1,0,14}, // row index 8 + {j+1,0,12}, // row index 9 + {j+1,0,10}, // row index 10 + {j+2,0,14}, // row index 11 + {j+2,0,12}, // row index 12 + {j+2,0,10}, // row index 13 + {j, 8,6}, // row index 14 + {j+3,0,14}, // row index 15 + {j+3,0,10} // row index 16 + }; + uint8_t table_6_1_2_1_1_3_time_dom_res_alloc_A_extCP[16][3]={ // for PUSCH from TS 38.214 subclause 6.1.2.1.1 + {j, 0,8}, // row index 1 + {j, 0,12}, // row index 2 + {j, 0,10}, // row index 3 + {j, 2,10}, // row index 4 + {j, 4,4}, // row index 5 + {j, 4,8}, // row index 6 + {j, 4,6}, // row index 7 + {j+1,0,8}, // row index 8 + {j+1,0,12}, // row index 9 + {j+1,0,10}, // row index 10 + {j+2,0,6}, // row index 11 + {j+2,0,12}, // row index 12 + {j+2,0,10}, // row index 13 + {j, 8,4}, // row index 14 + {j+3,0,8}, // row index 15 + {j+3,0,10} // row index 16 + }; + +/* + * TS 38.214 subclause 5.1.2.1 Resource allocation in time domain (downlink) + */ + if(dlsch_config_pdu != NULL){ + k_offset = table_5_1_2_1_1_2_time_dom_res_alloc_A[time_domain_ind][0]; + sliv_S = table_5_1_2_1_1_2_time_dom_res_alloc_A[time_domain_ind][1]; + sliv_L = table_5_1_2_1_1_2_time_dom_res_alloc_A[time_domain_ind][2]; + // k_offset = table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP[nr_pdci_info_extracted->time_dom_resource_assignment][0]; + // sliv_S = table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP[nr_pdci_info_extracted->time_dom_resource_assignment][1]; + // sliv_L = table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP[nr_pdci_info_extracted->time_dom_resource_assignment][2]; + // k_offset = table_5_1_2_1_1_4_time_dom_res_alloc_B[nr_pdci_info_extracted->time_dom_resource_assignment][0]; + // sliv_S = table_5_1_2_1_1_4_time_dom_res_alloc_B[nr_pdci_info_extracted->time_dom_resource_assignment][1]; + // sliv_L = table_5_1_2_1_1_4_time_dom_res_alloc_B[nr_pdci_info_extracted->time_dom_resource_assignment][2]; + // k_offset = table_5_1_2_1_1_5_time_dom_res_alloc_C[nr_pdci_info_extracted->time_dom_resource_assignment][0]; + // sliv_S = table_5_1_2_1_1_5_time_dom_res_alloc_C[nr_pdci_info_extracted->time_dom_resource_assignment][1]; + // sliv_L = table_5_1_2_1_1_5_time_dom_res_alloc_C[nr_pdci_info_extracted->time_dom_resource_assignment][2]; + dlsch_config_pdu->number_symbols = sliv_L; + dlsch_config_pdu->start_symbol = sliv_S; + } /* + * TS 38.214 subclause 6.1.2.1 Resource allocation in time domain (uplink) + */ + if(ulsch_config_pdu != NULL){ + k_offset = table_6_1_2_1_1_2_time_dom_res_alloc_A[time_domain_ind][0]; + sliv_S = table_6_1_2_1_1_2_time_dom_res_alloc_A[time_domain_ind][1]; + sliv_L = table_6_1_2_1_1_2_time_dom_res_alloc_A[time_domain_ind][2]; + // k_offset = table_6_1_2_1_1_3_time_dom_res_alloc_A_extCP[nr_pdci_info_extracted->time_dom_resource_assignment][0]; + // sliv_S = table_6_1_2_1_1_3_time_dom_res_alloc_A_extCP[nr_pdci_info_extracted->time_dom_resource_assignment][1]; + // sliv_L = table_6_1_2_1_1_3_time_dom_res_alloc_A_extCP[nr_pdci_info_extracted->time_dom_resource_assignment][2]; + ulsch_config_pdu->number_symbols = sliv_L; + ulsch_config_pdu->start_symbol = sliv_S; + } + return 0; +} +////////////// + int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fapi_nr_dci_pdu_rel15_t *dci, uint16_t rnti, uint32_t dci_format){ NR_UE_MAC_INST_t *mac = get_mac_inst(module_id); @@ -546,50 +773,63 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fa const uint16_t n_RB_ULBWP = 106; const uint16_t n_RB_DLBWP = 106; - uint32_t k_offset; - uint32_t sliv_S; - uint32_t sliv_L; - - uint32_t l_RB; - uint32_t start_RB; - uint32_t tmp_RIV; switch(dci_format){ case format0_0: - /* TIME_DOM_RESOURCE_ASSIGNMENT */ - // 0, 1, 2, 3, or 4 bits as defined in: - // Subclause 6.1.2.1 of [6, TS 38.214] for formats format0_0,format0_1 - // Subclause 5.1.2.1 of [6, TS 38.214] for formats format1_0,format1_1 - // The bitwidth for this field is determined as log2(I) bits, - // where I the number of entries in the higher layer parameter pusch-AllocationList - k_offset = table_6_1_2_1_1_2_time_dom_res_alloc_A[dci->time_dom_resource_assignment][0]; - sliv_S = table_6_1_2_1_1_2_time_dom_res_alloc_A[dci->time_dom_resource_assignment][1]; - sliv_L = table_6_1_2_1_1_2_time_dom_res_alloc_A[dci->time_dom_resource_assignment][2]; - - /* FREQ_DOM_RESOURCE_ASSIGNMENT_UL */ - // At the moment we are supporting only format 1_0 (and not format 1_1), so we only support resource allocation type 1 (and not type 0). - // For resource allocation type 1, the resource allocation field consists of a resource indication value (RIV): - // RIV = n_RB_ULBWP * (l_RB - 1) + start_RB if (l_RB - 1) <= floor (n_RB_ULBWP/2) - // RIV = n_RB_ULBWP * (n_RB_ULBWP - l_RB + 1) + (n_RB_ULBWP - 1 - start_RB) if (l_RB - 1) > floor (n_RB_ULBWP/2) - // the following two expressions apply only if (l_RB - 1) <= floor (n_RB_ULBWP/2) - l_RB = floor(dci->freq_dom_resource_assignment_DL/n_RB_ULBWP) + 1; - start_RB = dci->freq_dom_resource_assignment_DL%n_RB_ULBWP; - // if (l_RB - 1) > floor (n_RB_ULBWP/2) we need to recalculate them using the following lines - tmp_RIV = n_RB_ULBWP * (l_RB - 1) + start_RB; - if (tmp_RIV != dci->freq_dom_resource_assignment_DL) { // then (l_RB - 1) > floor (n_RB_ULBWP/2) and we need to recalculate l_RB and start_RB - l_RB = n_RB_ULBWP - l_RB + 2; - start_RB = n_RB_ULBWP - start_RB - 1; - } - - // UL_CONFIG_REQ +/* + * with CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI + * 0 IDENTIFIER_DCI_FORMATS: + * 10 FREQ_DOM_RESOURCE_ASSIGNMENT_UL: PUSCH hopping with resource allocation type 1 not considered + * 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 6.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits, + * 17 FREQ_HOPPING_FLAG: 0 bit if only resource allocation type 0 + * 24 MCS: + * 25 NDI: + * 26 RV: + * 27 HARQ_PROCESS_NUMBER: + * 32 TPC_PUSCH: + * 49 PADDING_NR_DCI: (Note 2) If DCI format 0_0 is monitored in common search space + * 50 SUL_IND_0_0: + */ ul_config->ul_config_list[ul_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_PUSCH; ul_config->ul_config_list[ul_config->number_pdus].ulsch_config_pdu.rnti = rnti; - fapi_nr_ul_config_pusch_pdu_rel15_t *ulsch_config_pdu = &ul_config->ul_config_list[ul_config->number_pdus].ulsch_config_pdu.ulsch_pdu_rel15; - ulsch_config_pdu->number_rbs = l_RB; - ulsch_config_pdu->start_rb = start_RB; - ulsch_config_pdu->number_symbols = sliv_L; - ulsch_config_pdu->start_symbol = sliv_S; - ulsch_config_pdu->mcs = dci->mcs; + fapi_nr_ul_config_pusch_pdu_rel15_t *ulsch_config_pdu_0_0 = &ul_config->ul_config_list[ul_config->number_pdus].ulsch_config_pdu.ulsch_pdu_rel15; + /* IDENTIFIER_DCI_FORMATS */ + /* FREQ_DOM_RESOURCE_ASSIGNMENT_UL */ + nr_ue_process_dci_freq_dom_resource_assignment(&ulsch_config_pdu_0_0,NULL,n_RB_ULBWP,0,dci->freq_dom_resource_assignment_UL); + /* TIME_DOM_RESOURCE_ASSIGNMENT */ + nr_ue_process_dci_time_dom_resource_assignment(&ulsch_config_pdu_0_0,NULL,dci->time_dom_resource_assignment,mac->mib->dmrs_TypeA_Position); + /* FREQ_HOPPING_FLAG */ + if ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.resource_allocation != 0) && + (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.frequency_hopping !=0)) + ulsch_config_pdu_0_0->pusch_freq_hopping = (dci->freq_hopping_flag == 0)? pusch_freq_hopping_disabled:pusch_freq_hopping_enabled; + /* MCS */ + ulsch_config_pdu_0_0->mcs = dci->mcs; + /* NDI */ + ulsch_config_pdu_0_0->ndi = dci->ndi; + /* RV */ + ulsch_config_pdu_0_0->rv = dci->rv; + /* HARQ_PROCESS_NUMBER */ + ulsch_config_pdu_0_0->harq_process_nbr = dci->harq_process_number; + /* TPC_PUSCH */ + // according to TS 38.213 Table Table 7.1.1-1 + if (dci->tpc_pusch == 0) { + ulsch_config_pdu_0_0->accumulated_delta_PUSCH = -1; + ulsch_config_pdu_0_0->absolute_delta_PUSCH = -4; + } + if (dci->tpc_pusch == 1) { + ulsch_config_pdu_0_0->accumulated_delta_PUSCH = 0; + ulsch_config_pdu_0_0->absolute_delta_PUSCH = -1; + } + if (dci->tpc_pusch == 2) { + ulsch_config_pdu_0_0->accumulated_delta_PUSCH = 1; + ulsch_config_pdu_0_0->absolute_delta_PUSCH = 1; + } + if (dci->tpc_pusch == 3) { + ulsch_config_pdu_0_0->accumulated_delta_PUSCH = 3; + ulsch_config_pdu_0_0->absolute_delta_PUSCH = 4; + } + /* SUL_IND_0_0 */ // To be implemented, FIXME!!! + // UL_CONFIG_REQ //ulsch0->harq_processes[dci->harq_process_number]->first_rb = start_RB; //ulsch0->harq_processes[dci->harq_process_number]->nb_rb = l_RB; //ulsch0->harq_processes[dci->harq_process_number]->mcs = dci->mcs; @@ -597,48 +837,170 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fa break; case format0_1: +/* + * with CRC scrambled by C-RNTI or CS-RNTI or SP-CSI-RNTI or new-RNTI + * 0 IDENTIFIER_DCI_FORMATS: + * 1 CARRIER_IND + * 2 SUL_IND_0_1 + * 7 BANDWIDTH_PART_IND + * 10 FREQ_DOM_RESOURCE_ASSIGNMENT_UL: PUSCH hopping with resource allocation type 1 not considered + * 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 6.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits, + * 17 FREQ_HOPPING_FLAG: 0 bit if only resource allocation type 0 + * 24 MCS: + * 25 NDI: + * 26 RV: + * 27 HARQ_PROCESS_NUMBER: + * 29 FIRST_DAI + * 30 SECOND_DAI + * 32 TPC_PUSCH: + * 36 SRS_RESOURCE_IND: + * 37 PRECOD_NBR_LAYERS: + * 38 ANTENNA_PORTS: + * 40 SRS_REQUEST: + * 42 CSI_REQUEST: + * 43 CBGTI + * 45 PTRS_DMRS + * 46 BETA_OFFSET_IND + * 47 DMRS_SEQ_INI + * 48 UL_SCH_IND + * 49 PADDING_NR_DCI: (Note 2) If DCI format 0_0 is monitored in common search space + */ + ul_config->ul_config_list[ul_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_PUSCH; + ul_config->ul_config_list[ul_config->number_pdus].ulsch_config_pdu.rnti = rnti; + fapi_nr_ul_config_pusch_pdu_rel15_t *ulsch_config_pdu_0_1 = &ul_config->ul_config_list[ul_config->number_pdus].ulsch_config_pdu.ulsch_pdu_rel15; + /* FREQ_DOM_RESOURCE_ASSIGNMENT_UL */ + nr_ue_process_dci_freq_dom_resource_assignment(&ulsch_config_pdu_0_1,NULL,n_RB_ULBWP,0,dci->freq_dom_resource_assignment_UL); + /* TIME_DOM_RESOURCE_ASSIGNMENT */ + nr_ue_process_dci_time_dom_resource_assignment(&ulsch_config_pdu_0_1,NULL,dci->time_dom_resource_assignment,mac->mib->dmrs_TypeA_Position); + /* FREQ_HOPPING_FLAG */ + if ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.resource_allocation != 0) && + (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.frequency_hopping !=0)) + ulsch_config_pdu_0_1->pusch_freq_hopping = (dci->freq_hopping_flag == 0)? pusch_freq_hopping_disabled:pusch_freq_hopping_enabled; + /* MCS */ + ulsch_config_pdu_0_1->mcs = dci->mcs; + /* NDI */ + ulsch_config_pdu_0_1->ndi = dci->ndi; + /* RV */ + ulsch_config_pdu_0_1->rv = dci->rv; + /* HARQ_PROCESS_NUMBER */ + ulsch_config_pdu_0_1->harq_process_nbr = dci->harq_process_number; + /* FIRST_DAI */ //To be implemented, FIXME!!! + /* SECOND_DAI */ //To be implemented, FIXME!!! + /* TPC_PUSCH */ + // according to TS 38.213 Table Table 7.1.1-1 + if (dci->tpc_pusch == 0) { + ulsch_config_pdu_0_0->accumulated_delta_PUSCH = -1; + ulsch_config_pdu_0_0->absolute_delta_PUSCH = -4; + } + if (dci->tpc_pusch == 1) { + ulsch_config_pdu_0_0->accumulated_delta_PUSCH = 0; + ulsch_config_pdu_0_0->absolute_delta_PUSCH = -1; + } + if (dci->tpc_pusch == 2) { + ulsch_config_pdu_0_0->accumulated_delta_PUSCH = 1; + ulsch_config_pdu_0_0->absolute_delta_PUSCH = 1; + } + if (dci->tpc_pusch == 3) { + ulsch_config_pdu_0_0->accumulated_delta_PUSCH = 3; + ulsch_config_pdu_0_0->absolute_delta_PUSCH = 4; + } break; case format1_0: - - /* TIME_DOM_RESOURCE_ASSIGNMENT */ - // Subclause 5.1.2.1 of [6, TS 38.214] - // the Time domain resource assignment field of the DCI provides a row index of a higher layer configured table pdsch-symbolAllocation - // FIXME! To clarify which parameters to update after reception of row index - k_offset = table_5_1_2_1_1_2_time_dom_res_alloc_A[dci->time_dom_resource_assignment][0]; - sliv_S = table_5_1_2_1_1_2_time_dom_res_alloc_A[dci->time_dom_resource_assignment][1]; - sliv_L = table_5_1_2_1_1_2_time_dom_res_alloc_A[dci->time_dom_resource_assignment][2]; - - - /* FREQ_DOM_RESOURCE_ASSIGNMENT_DL */ - // only uplink resource allocation type 1 - // At the moment we are supporting only format 0_0 (and not format 0_1), so we only support resource allocation type 1 (and not type 0). - // For resource allocation type 1, the resource allocation field consists of a resource indication value (RIV): - // RIV = n_RB_DLBWP * (l_RB - 1) + start_RB if (l_RB - 1) <= floor (n_RB_DLBWP/2) - // RIV = n_RB_DLBWP * (n_RB_DLBWP - l_RB + 1) + (n_RB_DLBWP - 1 - start_RB) if (l_RB - 1) > floor (n_RB_DLBWP/2) - // the following two expressions apply only if (l_RB - 1) <= floor (n_RB_DLBWP/2) - - l_RB = floor(dci->freq_dom_resource_assignment_DL/n_RB_DLBWP) + 1; - start_RB = dci->freq_dom_resource_assignment_DL%n_RB_DLBWP; - // if (l_RB - 1) > floor (n_RB_DLBWP/2) we need to recalculate them using the following lines - tmp_RIV = n_RB_DLBWP * (l_RB - 1) + start_RB; - if (tmp_RIV != dci->freq_dom_resource_assignment_DL) { // then (l_RB - 1) > floor (n_RB_DLBWP/2) and we need to recalculate l_RB and start_RB - l_RB = n_RB_DLBWP - l_RB + 2; - start_RB = n_RB_DLBWP - start_RB - 1; - } - - - // DL_CONFIG_REQ +/* + * with CRC scrambled by C-RNTI or CS-RNTI or new-RNTI + * 0 IDENTIFIER_DCI_FORMATS: + * 11 FREQ_DOM_RESOURCE_ASSIGNMENT_DL: + * 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 5.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits, + * 13 VRB_TO_PRB_MAPPING: 0 bit if only resource allocation type 0 + * 24 MCS: + * 25 NDI: + * 26 RV: + * 27 HARQ_PROCESS_NUMBER: + * 28 DAI_: For format1_1: 4 if more than one serving cell are configured in the DL and the higher layer parameter HARQ-ACK-codebook=dynamic, where the 2 MSB bits are the counter DAI and the 2 LSB bits are the total DAI + * 33 TPC_PUCCH: + * 34 PUCCH_RESOURCE_IND: + * 35 PDSCH_TO_HARQ_FEEDBACK_TIME_IND: + * 55 RESERVED_NR_DCI + * with CRC scrambled by P-RNTI + * 8 SHORT_MESSAGE_IND + * 9 SHORT_MESSAGES + * 11 FREQ_DOM_RESOURCE_ASSIGNMENT_DL: + * 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 5.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits, + * 13 VRB_TO_PRB_MAPPING: 0 bit if only resource allocation type 0 + * 24 MCS: + * 31 TB_SCALING + * 55 RESERVED_NR_DCI + * with CRC scrambled by SI-RNTI + * 11 FREQ_DOM_RESOURCE_ASSIGNMENT_DL: + * 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 5.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits, + * 13 VRB_TO_PRB_MAPPING: 0 bit if only resource allocation type 0 + * 24 MCS: + * 26 RV: + * 55 RESERVED_NR_DCI + * with CRC scrambled by RA-RNTI + * 11 FREQ_DOM_RESOURCE_ASSIGNMENT_DL: + * 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 5.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits, + * 13 VRB_TO_PRB_MAPPING: 0 bit if only resource allocation type 0 + * 24 MCS: + * 31 TB_SCALING + * 55 RESERVED_NR_DCI + * with CRC scrambled by TC-RNTI + * 0 IDENTIFIER_DCI_FORMATS: + * 11 FREQ_DOM_RESOURCE_ASSIGNMENT_DL: + * 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 5.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits, + * 13 VRB_TO_PRB_MAPPING: 0 bit if only resource allocation type 0 + * 24 MCS: + * 25 NDI: + * 26 RV: + * 27 HARQ_PROCESS_NUMBER: + * 28 DAI_: For format1_1: 4 if more than one serving cell are configured in the DL and the higher layer parameter HARQ-ACK-codebook=dynamic, where the 2 MSB bits are the counter DAI and the 2 LSB bits are the total DAI + * 33 TPC_PUCCH: + */ dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH; dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.rnti = rnti; - fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu = &dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.dlsch_config_rel15; - dlsch_config_pdu->number_rbs = l_RB; - dlsch_config_pdu->start_rb = start_RB; - dlsch_config_pdu->number_symbols = sliv_L; - dlsch_config_pdu->start_symbol = sliv_S; - dlsch_config_pdu->mcs = dci->mcs; - + fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu_1_0 = &dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.dlsch_config_rel15; + /* FREQ_DOM_RESOURCE_ASSIGNMENT_DL */ + nr_ue_process_dci_freq_dom_resource_assignment(NULL,&dlsch_config_pdu_1_0,0,n_RB_DLBWP,dci->freq_dom_resource_assignment_DL); + /* TIME_DOM_RESOURCE_ASSIGNMENT */ + nr_ue_process_dci_time_dom_resource_assignment(NULL,&dlsch_config_pdu_1_0,dci->time_dom_resource_assignment,mac->mib->dmrs_TypeA_Position); + /* VRB_TO_PRB_MAPPING */ + dlsch_config_pdu_1_0->vrb_to_prb_mapping = (dci->vrb_to_prb_mapping == 0) ? vrb_to_prb_mapping_non_interleaved:vrb_to_prb_mapping_interleaved; + /* MCS */ + dlsch_config_pdu_1_0->mcs = dci->mcs; + /* NDI (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/ + dlsch_config_pdu_1_0->ndi = dci->ndi; + /* RV (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/ + dlsch_config_pdu_1_0->rv = dci->rv; + /* HARQ_PROCESS_NUMBER (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/ + dlsch_config_pdu_1_0->harq_process_nbr = dci->harq_process_number; + /* DAI (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/ + dlsch_config_pdu_1_0->dai = dci ->dai; + /* TB_SCALING (only if CRC scrambled by P-RNTI or RA-RNTI) */ + // according to TS 38.214 Table 5.1.3.2-3 + if (dci->tb_scaling == 0) dlsch_config_pdu_1_0->scaling_factor_S = 1; + if (dci->tb_scaling == 1) dlsch_config_pdu_1_0->scaling_factor_S = 0.5; + if (dci->tb_scaling == 2) dlsch_config_pdu_1_0->scaling_factor_S = 0.25; + if (dci->tb_scaling == 3) dlsch_config_pdu_1_0->scaling_factor_S = 0; // value not defined in table + /* TPC_PUCCH (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/ + // according to TS 38.213 Table 7.2.1-1 + if (dci->tpc_pucch == 0) dlsch_config_pdu_1_0->accumulated_delta_PUCCH = -1; + if (dci->tpc_pucch == 1) dlsch_config_pdu_1_0->accumulated_delta_PUCCH = 0; + if (dci->tpc_pucch == 2) dlsch_config_pdu_1_0->accumulated_delta_PUCCH = 1; + if (dci->tpc_pucch == 3) dlsch_config_pdu_1_0->accumulated_delta_PUCCH = 3; + /* PUCCH_RESOURCE_IND (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI)*/ + if (dci->pucch_resource_ind == 0) dlsch_config_pdu_1_0->pucch_resource_id = 0; //pucch-ResourceId obtained from the 1st value of resourceList FIXME!!! + if (dci->pucch_resource_ind == 1) dlsch_config_pdu_1_0->pucch_resource_id = 0; //pucch-ResourceId obtained from the 2nd value of resourceList FIXME!! + if (dci->pucch_resource_ind == 2) dlsch_config_pdu_1_0->pucch_resource_id = 0; //pucch-ResourceId obtained from the 3rd value of resourceList FIXME!! + if (dci->pucch_resource_ind == 3) dlsch_config_pdu_1_0->pucch_resource_id = 0; //pucch-ResourceId obtained from the 4th value of resourceList FIXME!! + if (dci->pucch_resource_ind == 4) dlsch_config_pdu_1_0->pucch_resource_id = 0; //pucch-ResourceId obtained from the 5th value of resourceList FIXME!! + if (dci->pucch_resource_ind == 5) dlsch_config_pdu_1_0->pucch_resource_id = 0; //pucch-ResourceId obtained from the 6th value of resourceList FIXME!! + if (dci->pucch_resource_ind == 6) dlsch_config_pdu_1_0->pucch_resource_id = 0; //pucch-ResourceId obtained from the 7th value of resourceList FIXME!! + if (dci->pucch_resource_ind == 7) dlsch_config_pdu_1_0->pucch_resource_id = 0; //pucch-ResourceId obtained from the 8th value of resourceList FIXME!! + /* PDSCH_TO_HARQ_FEEDBACK_TIME_IND (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI)*/ + dlsch_config_pdu_1_0-> pdsch_to_harq_feedback_time_ind = dci->pdsch_to_harq_feedback_time_ind; + // DL_CONFIG_REQ //pdlsch0_harq->nb_rb = l_RB; //pdlsch0->current_harq_pid = dci->harq_process_number; //pdlsch0->active = 1; @@ -650,6 +1012,81 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fa break; case format1_1: +/* + * with CRC scrambled by C-RNTI or CS-RNTI or new-RNTI + * 0 IDENTIFIER_DCI_FORMATS: + * 1 CARRIER_IND: + * 7 BANDWIDTH_PART_IND: + * 11 FREQ_DOM_RESOURCE_ASSIGNMENT_DL: + * 12 TIME_DOM_RESOURCE_ASSIGNMENT: 0, 1, 2, 3, or 4 bits as defined in Subclause 5.1.2.1 of [6, TS 38.214]. The bitwidth for this field is determined as log2(I) bits, + * 13 VRB_TO_PRB_MAPPING: 0 bit if only resource allocation type 0 + * 14 PRB_BUNDLING_SIZE_IND: + * 15 RATE_MATCHING_IND: + * 16 ZP_CSI_RS_TRIGGER: + * 18 TB1_MCS: + * 19 TB1_NDI: + * 20 TB1_RV: + * 21 TB2_MCS: + * 22 TB2_NDI: + * 23 TB2_RV: + * 27 HARQ_PROCESS_NUMBER: + * 28 DAI_: For format1_1: 4 if more than one serving cell are configured in the DL and the higher layer parameter HARQ-ACK-codebook=dynamic, where the 2 MSB bits are the counter DAI and the 2 LSB bits are the total DAI + * 33 TPC_PUCCH: + * 34 PUCCH_RESOURCE_IND: + * 35 PDSCH_TO_HARQ_FEEDBACK_TIME_IND: + * 38 ANTENNA_PORTS: + * 39 TCI: + * 40 SRS_REQUEST: + * 43 CBGTI: + * 44 CBGFI: + * 47 DMRS_SEQ_INI: + */ + dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH; + dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.rnti = rnti; + fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu_1_1 = &dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.dlsch_config_rel15; + /* FREQ_DOM_RESOURCE_ASSIGNMENT_DL */ + nr_ue_process_dci_freq_dom_resource_assignment(NULL,&dlsch_config_pdu_1_1,0,n_RB_DLBWP,dci->freq_dom_resource_assignment_DL); + /* TIME_DOM_RESOURCE_ASSIGNMENT */ + nr_ue_process_dci_time_dom_resource_assignment(NULL,&dlsch_config_pdu_1_1,dci->time_dom_resource_assignment,mac->mib->dmrs_TypeA_Position); + /* VRB_TO_PRB_MAPPING */ + if (mac->phy_config.config_req.dl_bwp_dedicated.pdsch_config_dedicated.resource_allocation != 0) + dlsch_config_pdu_1_1->vrb_to_prb_mapping = (dci->vrb_to_prb_mapping == 0) ? vrb_to_prb_mapping_non_interleaved:vrb_to_prb_mapping_interleaved; + /* MCS (for transport block 1)*/ + dlsch_config_pdu_1_1->mcs = dci->tb1_mcs; + /* NDI (for transport block 1)*/ + dlsch_config_pdu_1_1->ndi = dci->tb1_ndi; + /* RV (for transport block 1)*/ + dlsch_config_pdu_1_1->rv = dci->tb1_rv; + /* MCS (for transport block 2)*/ + dlsch_config_pdu_1_1->tb2_mcs = dci->tb2_mcs; + /* NDI (for transport block 2)*/ + dlsch_config_pdu_1_1->tb2_ndi = dci->tb2_ndi; + /* RV (for transport block 2)*/ + dlsch_config_pdu_1_1->tb2_rv = dci->tb2_rv; + /* HARQ_PROCESS_NUMBER */ + dlsch_config_pdu_1_1->harq_process_nbr = dci->harq_process_number; + /* DAI */ + dlsch_config_pdu_1_0->dai = dci ->dai; + /* TPC_PUCCH */ + // according to TS 38.213 Table 7.2.1-1 + if (dci->tpc_pucch == 0) dlsch_config_pdu_1_1->accumulated_delta_PUCCH = -1; + if (dci->tpc_pucch == 1) dlsch_config_pdu_1_1->accumulated_delta_PUCCH = 0; + if (dci->tpc_pucch == 2) dlsch_config_pdu_1_1->accumulated_delta_PUCCH = 1; + if (dci->tpc_pucch == 3) dlsch_config_pdu_1_1->accumulated_delta_PUCCH = 3; + /* PUCCH_RESOURCE_IND */ + if (dci->pucch_resource_ind == 0) dlsch_config_pdu_1_1->pucch_resource_id = 0; //pucch-ResourceId obtained from the 1st value of resourceList FIXME!!! + if (dci->pucch_resource_ind == 1) dlsch_config_pdu_1_1->pucch_resource_id = 0; //pucch-ResourceId obtained from the 2nd value of resourceList FIXME!! + if (dci->pucch_resource_ind == 2) dlsch_config_pdu_1_1->pucch_resource_id = 0; //pucch-ResourceId obtained from the 3rd value of resourceList FIXME!! + if (dci->pucch_resource_ind == 3) dlsch_config_pdu_1_1->pucch_resource_id = 0; //pucch-ResourceId obtained from the 4th value of resourceList FIXME!! + if (dci->pucch_resource_ind == 4) dlsch_config_pdu_1_1->pucch_resource_id = 0; //pucch-ResourceId obtained from the 5th value of resourceList FIXME!! + if (dci->pucch_resource_ind == 5) dlsch_config_pdu_1_1->pucch_resource_id = 0; //pucch-ResourceId obtained from the 6th value of resourceList FIXME!! + if (dci->pucch_resource_ind == 6) dlsch_config_pdu_1_1->pucch_resource_id = 0; //pucch-ResourceId obtained from the 7th value of resourceList FIXME!! + if (dci->pucch_resource_ind == 7) dlsch_config_pdu_1_1->pucch_resource_id = 0; //pucch-ResourceId obtained from the 8th value of resourceList FIXME!! + /* PDSCH_TO_HARQ_FEEDBACK_TIME_IND */ + // according to TS 38.213 Table 9.2.3-1 + dlsch_config_pdu_1_1-> pdsch_to_harq_feedback_time_ind = + mac->phy_config.config_req.ul_bwp_dedicated.pucch_config_dedicated.dl_data_to_ul_ack[dci->pdsch_to_harq_feedback_time_ind]; + break; case format2_0: @@ -685,6 +1122,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fa /// else normal DL-SCH grant } + return 0; } int8_t nr_ue_get_SR(module_id_t module_idP, int CC_id, frame_t frameP, uint8_t eNB_id, uint16_t rnti, sub_frame_t subframe){ From ab7515e2804bc416df6f16e285590eb90628bf6a Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 14 Sep 2018 14:58:15 +0200 Subject: [PATCH 215/379] basic simulator: handle discontinuities in output In TDD mode the eNB does not output data all the time, only in downlink and special subframes. The basic simulator needs a continuous stream of samples. So let's fill the blank with silence. --- targets/ARCH/tcp_bridge/tcp_bridge_oai.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/targets/ARCH/tcp_bridge/tcp_bridge_oai.c b/targets/ARCH/tcp_bridge/tcp_bridge_oai.c index 4d7d49d9c7..32fddb9c2d 100644 --- a/targets/ARCH/tcp_bridge/tcp_bridge_oai.c +++ b/targets/ARCH/tcp_bridge/tcp_bridge_oai.c @@ -44,6 +44,7 @@ typedef struct { int sock; int samples_per_subframe; uint64_t timestamp; + uint64_t next_tx_timestamp; int is_enb; } tcp_bridge_state_t; @@ -141,11 +142,27 @@ int tcp_bridge_write(openair0_device *device, openair0_timestamp timestamp, void { if (cc != 1) { printf("tcp_bridge: only 1 antenna supported\n"); exit(1); } tcp_bridge_state_t *t = device->priv; + /* deal with discontinuities in output (think: eNB in TDD mode) */ + if (t->next_tx_timestamp && timestamp != t->next_tx_timestamp) { + uint32_t b[4096]; + uint64_t to_send = timestamp - t->next_tx_timestamp; + memset(b, 0, 4096 * sizeof(uint32_t)); + while (to_send) { + int len = to_send > 4096 ? 4096 : to_send; + int n = fullwrite(t->sock, b, len * 4); + if (n != len * 4) { + printf("tcp_bridge: write error ret %d error %s\n", n, strerror(errno)); + abort(); + } + to_send -= len; + } + } int n = fullwrite(t->sock, buff[0], nsamps * 4); if (n != nsamps * 4) { printf("tcp_bridge: write error ret %d (wanted %d) error %s\n", n, nsamps*4, strerror(errno)); abort(); } + t->next_tx_timestamp = timestamp + nsamps; return nsamps; } From 824f62d8bfa8949dfa550245bdb3e26be36ddcd5 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 14 Sep 2018 15:01:55 +0200 Subject: [PATCH 216/379] basic simulator: support TDD mode For whatever reason we need N_TA_offset to be 0 for the basic simulator to function properly. This is more a hack than a proper solution. More analysis is needed to understand what happens and what should be really done. --- openair1/PHY/INIT/lte_param_init.c | 7 +++++++ targets/RT/USER/lte-ru.c | 6 ++++++ targets/RT/USER/lte-ue.c | 7 +++++++ 3 files changed, 20 insertions(+) diff --git a/openair1/PHY/INIT/lte_param_init.c b/openair1/PHY/INIT/lte_param_init.c index 0830058a8f..dd8c2e54db 100644 --- a/openair1/PHY/INIT/lte_param_init.c +++ b/openair1/PHY/INIT/lte_param_init.c @@ -169,6 +169,13 @@ void lte_param_init(PHY_VARS_eNB **eNBp, } else ru->N_TA_offset=0; +#if BASIC_SIMULATOR + /* this is required for the basic simulator in TDD mode + * TODO: find a proper cleaner solution + */ + UE->N_TA_offset = 0; +#endif + printf("Done lte_param_init\n"); diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index d20b614ad7..1ff97386ac 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -1456,6 +1456,12 @@ int setup_RU_buffers(RU_t *ru) { if (frame_parms->N_RB_DL == 100) ru->N_TA_offset = 624; else if (frame_parms->N_RB_DL == 50) ru->N_TA_offset = 624/2; else if (frame_parms->N_RB_DL == 25) ru->N_TA_offset = 624/4; +#if BASIC_SIMULATOR + /* this is required for the basic simulator in TDD mode + * TODO: find a proper cleaner solution + */ + ru->N_TA_offset = 0; +#endif } if (ru->openair0_cfg.mmapped_dma == 1) { // replace RX signal buffers with mmaped HW versions diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c index 66107d79a4..c49a54b98a 100644 --- a/targets/RT/USER/lte-ue.c +++ b/targets/RT/USER/lte-ue.c @@ -333,6 +333,13 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti } else UE->N_TA_offset = 0; +#if BASIC_SIMULATOR + /* this is required for the basic simulator in TDD mode + * TODO: find a proper cleaner solution + */ + UE->N_TA_offset = 0; +#endif + if (simL1flag == 1) init_ue_devices(UE); LOG_I(PHY,"Intializing UE Threads for instance %d (%p,%p)...\n",inst,PHY_vars_UE_g[inst],PHY_vars_UE_g[inst][0]); init_UE_threads(inst); From 2dec82b336fe55dfb63c3413064e78fb04af790b Mon Sep 17 00:00:00 2001 From: yilmazt Date: Tue, 18 Sep 2018 10:12:34 +0200 Subject: [PATCH 217/379] Working polartest --- openair1/PHY/CODING/TESTBENCH/polartest.c | 249 ++++++++-------- .../CODING/nrPolar_tools/nr_polar_decoder.c | 269 +++++++++++++++++- .../PHY/CODING/nrPolar_tools/nr_polar_defs.h | 17 ++ .../CODING/nrPolar_tools/nr_polar_encoder.c | 82 ++++++ 4 files changed, 494 insertions(+), 123 deletions(-) diff --git a/openair1/PHY/CODING/TESTBENCH/polartest.c b/openair1/PHY/CODING/TESTBENCH/polartest.c index d379aaf58e..0aa0dd118f 100644 --- a/openair1/PHY/CODING/TESTBENCH/polartest.c +++ b/openair1/PHY/CODING/TESTBENCH/polartest.c @@ -10,8 +10,8 @@ #include "PHY/CODING/coding_defs.h" #include "SIMULATION/TOOLS/sim.h" -//#define DEBUG_POLAR_PARAMS //#define DEBUG_DCI_POLAR_PARAMS +//#define DEBUG_POLAR_TIMING int main(int argc, char *argv[]) { @@ -24,7 +24,6 @@ int main(int argc, char *argv[]) { randominit(0); crcTableInit(); - uint32_t crc; //Default simulation values (Aim for iterations = 1000000.) int itr, iterations = 1000, arguments, polarMessageType = 0; //0=PBCH, 1=DCI, -1=UCI double SNRstart = -20.0, SNRstop = 0.0, SNRinc= 0.5; //dB @@ -34,14 +33,13 @@ int main(int argc, char *argv[]) { int8_t decoderState=0, blockErrorState=0; //0 = Success, -1 = Decoding failed, 1 = Block Error. uint16_t testLength = 0, coderLength = 0, blockErrorCumulative=0, bitErrorCumulative=0; double timeEncoderCumulative = 0, timeDecoderCumulative = 0; - uint8_t aggregation_level, decoderListSize, pathMetricAppr; + uint8_t aggregation_level = 8, decoderListSize = 8, pathMetricAppr = 0; while ((arguments = getopt (argc, argv, "s:d:f:m:i:l:a:")) != -1) switch (arguments) { case 's': SNRstart = atof(optarg); - printf("SNRstart = %f\n", SNRstart); break; case 'd': @@ -93,7 +91,12 @@ int main(int argc, char *argv[]) { folderName=getenv("HOME"); strcat(folderName,"/Desktop/polartestResults"); + + #ifdef DEBUG_POLAR_TIMING + sprintf(fileName,"%s/TIMING_ListSize_%d_pmAppr_%d_Payload_%d_Itr_%d",folderName,decoderListSize,pathMetricAppr,testLength,iterations); + #else sprintf(fileName,"%s/_ListSize_%d_pmAppr_%d_Payload_%d_Itr_%d",folderName,decoderListSize,pathMetricAppr,testLength,iterations); + #endif strftime(currentTimeInfo, 25, "_%Y-%m-%d-%H-%M-%S.csv", localtime(¤tTime)); strcat(fileName,currentTimeInfo); @@ -107,65 +110,45 @@ int main(int argc, char *argv[]) { fprintf(stderr,"[polartest.c] Problem creating file %s with fopen\n",fileName); exit(-1); } + +#ifdef DEBUG_POLAR_TIMING + fprintf(logFile,",timeEncoderCRCByte[us],timeEncoderCRCBit[us],timeEncoderInterleaver[us],timeEncoderBitInsertion[us],timeEncoder1[us],timeEncoder2[us],timeEncoderRateMatching[us],timeEncoderByte2Bit[us]\n"); +#else fprintf(logFile,",SNR,nBitError,blockErrorState,t_encoder[us],t_decoder[us]\n"); +#endif - //uint8_t *testInput = malloc(sizeof(uint8_t) * testLength); //generate randomly - //uint8_t *encoderOutput = malloc(sizeof(uint8_t) * coderLength); - uint32_t testInput[4], encoderOutput[4]; - memset(testInput,0,sizeof(testInput)); - memset(encoderOutput,0,sizeof(encoderOutput)); + uint8_t testArrayLength = ceil(testLength / 32.0); + uint8_t coderArrayLength = ceil(coderLength / 32.0); + uint32_t *testInput = malloc(sizeof(uint32_t) * testArrayLength); //generate randomly + uint32_t *encoderOutput = malloc(sizeof(uint32_t) * coderArrayLength); + uint32_t *estimatedOutput = malloc(sizeof(uint32_t) * testArrayLength); //decoder output + memset(testInput,0,sizeof(uint32_t) * testArrayLength); + memset(encoderOutput,0,sizeof(uint32_t) * coderArrayLength); + memset(estimatedOutput,0,sizeof(uint32_t) * testArrayLength); + + uint8_t *encoderOutputByte = malloc(sizeof(uint8_t) * coderLength); double *modulatedInput = malloc (sizeof(double) * coderLength); //channel input - double *channelOutput = malloc (sizeof(double) * coderLength); //add noise - uint32_t *estimatedOutput = malloc(sizeof(uint8_t) * testLength); //decoder output t_nrPolar_paramsPtr nrPolar_params = NULL, currentPtr = NULL; nr_polar_init(&nrPolar_params, polarMessageType, testLength, aggregation_level); + currentPtr = nr_polar_params(nrPolar_params, polarMessageType, testLength, aggregation_level); + #ifdef DEBUG_DCI_POLAR_PARAMS + uint32_t crc; unsigned int poly24c = 0xb2b11700; + testInput[0]=0x01189400; printf("testInput: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n", testInput[0], testInput[1], testInput[2], testInput[3]); - printf("encOutput: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n", - encoderOutput[0], encoderOutput[1], encoderOutput[2], encoderOutput[3]); - testInput[0]=0x01189400; uint8_t testInput2[8]; nr_crc_bit2bit_uint32_8_t(testInput, 32, testInput2); - printf("testInput2: [0]->%x \t [1]->%x \t [2]->%x \t [3]->%x\n [4]->%x \t [5]->%x \t [6]->%x \t [7]->%x \t\n", + printf("testInput2: [0]->%x \t [1]->%x \t [2]->%x \t [3]->%x\n" + " [4]->%x \t [5]->%x \t [6]->%x \t [7]->%x\n", testInput2[0], testInput2[1], testInput2[2], testInput2[3], testInput2[4], testInput2[5], testInput2[6], testInput2[7]); printf("crc32: [0]->0x%08x\n",crc24c(testInput2, 32)); printf("crc56: [0]->0x%08x\n",crc24c(testInput2, 56)); - return 0; - uint8_t testInput8[4]; - /*testInput8[0]=0x00; - testInput8[1]=0x49; - testInput8[2]=0x81; - testInput8[3]=0x10; - testInput8[4]=0x00;*/ - testInput8[0]=0xff; - testInput8[1]=0xd0; - testInput8[2]=0xff; - testInput8[3]=0x82; - crc = crc24c(testInput8, 31); - for (int i=0;i<24;i++) printf("[i]=%d\n",(crc>>i)&1); - printf("crc: [0]->0x%08x\n",crc); - printf("crcbit: %x\n",crcbit(testInput8, 3, poly24c)); - return 0; - unsigned char test[] = "Thebigredfox"; - - for (int i=0;i<8;i++) printf("[i]=%d\n",(test[0]>>i)&1); - printf("test[0]=%x\n",test[0]); - printf("%s -- sizeof=%d\n",test,sizeof(test)); - printf("%x\n", crcbit(test, sizeof(test) - 1, poly24c)); - printf("%x\n", crc24c(test, (sizeof(test) - 1)*8)); - polarMessageType = 1; - testLength = 41; - aggregation_level=1; - coderLength = 108; - nr_polar_init(&nrPolar_params, polarMessageType, testLength, aggregation_level); - nr_polar_print_polarParams(nrPolar_params); - crc = crc24c(testInput, testLength)>>8; for (int i=0;i<24;i++) printf("[i]=%d\n",(crc>>i)&1); printf("crc: [0]->0x%08x\n",crc); @@ -174,18 +157,30 @@ int main(int argc, char *argv[]) { testInput[2+(testLength>>3)] = ((uint8_t*)&crc)[0]; printf("testInput: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n", testInput[0], testInput[1], testInput[2], testInput[3]); - return (0); - currentPtr = nr_polar_params(nrPolar_params, polarMessageType, testLength, aggregation_level); - polar_encoder(testInput, encoderOutput, currentPtr); - printf("AFTER POLAR ENCODING\n"); - printf("testInput: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n", - testInput[0], testInput[1], testInput[2], testInput[3]); - printf("encOutput: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n", - encoderOutput[0], encoderOutput[1], encoderOutput[2], encoderOutput[3]); - return (0); #endif - currentPtr = nr_polar_params(nrPolar_params, polarMessageType, testLength, aggregation_level); +#ifdef DEBUG_POLAR_TIMING + for (SNR = SNRstart; SNR <= SNRstop; SNR += SNRinc) { + SNR_lin = pow(10, SNR / 10); + for (itr = 1; itr <= iterations; itr++) { + for (int j=0; j0x%08x \n", testInput[0]); + polar_encoder_timing(testInput, encoderOutput, currentPtr, cpu_freq_GHz, logFile); + } + } + fclose(logFile); + free(testInput); + free(encoderOutput); + free(modulatedInput); + free(channelOutput); + free(estimatedOutput); + return (0); +#endif // We assume no a priori knowledge available about the payload. double aPrioriArray[currentPtr->payloadBits]; @@ -195,68 +190,87 @@ int main(int argc, char *argv[]) { SNR_lin = pow(10, SNR/10); for (itr = 1; itr <= iterations; itr++) { - for(int i=0; i0) blockErrorState=1; - } - //Iteration times are in microseconds. - timeEncoderCumulative+=(timeEncoder.diff_now/(cpu_freq_GHz*1000.0)); - timeDecoderCumulative+=(timeDecoder.diff_now/(cpu_freq_GHz*1000.0)); - fprintf(logFile,",%f,%d,%d,%f,%f\n", SNR, nBitError, blockErrorState, - (timeEncoder.diff_now/(cpu_freq_GHz*1000.0)), (timeDecoder.diff_now/(cpu_freq_GHz*1000.0))); + /*printf("testInput: [0]->0x%08x\n", testInput[0]); + for (int i=0; i<32; i++) + printf("%d\n",(testInput[0]>>i)&1);*/ - if (nBitError<0) { - blockErrorCumulative++; - bitErrorCumulative+=testLength; - } else { - blockErrorCumulative+=blockErrorState; - bitErrorCumulative+=nBitError; - } + start_meas(&timeEncoder); + polar_encoder(testInput, encoderOutput, currentPtr); + stop_meas(&timeEncoder); - decoderState=0; - nBitError=0; - blockErrorState=0; + /*printf("encoderOutput: [0]->0x%08x\n", encoderOutput[0]); + printf("encoderOutput: [1]->0x%08x\n", encoderOutput[1]); +*/ + //Bit-to-byte: + nr_bit2byte_uint32_8_t(encoderOutput, coderLength, encoderOutputByte); + + //BPSK modulation + for(int i=0; i0x%08x\n", testInput[0]); + printf("estimatedOutput: [0]->0x%08x\n", estimatedOutput[0]); +*/ + + //calculate errors + if (decoderState==-1) { + blockErrorState=-1; + nBitError=-1; + } else { + for (int i = 0; i < testArrayLength; i++) { + for (int j = 0; j < (sizeof(testInput[0])*8); j++) { + if (((estimatedOutput[i]>>j) & 1) != ((testInput[i]>>j) & 1)) nBitError++; + } + } + + if (nBitError>0) blockErrorState=1; + } + + //Iteration times are in microseconds. + timeEncoderCumulative+=(timeEncoder.diff_now/(cpu_freq_GHz*1000.0)); + timeDecoderCumulative+=(timeDecoder.diff_now/(cpu_freq_GHz*1000.0)); + fprintf(logFile,",%f,%d,%d,%f,%f\n", SNR, nBitError, blockErrorState, + (timeEncoder.diff_now/(cpu_freq_GHz*1000.0)), (timeDecoder.diff_now/(cpu_freq_GHz*1000.0))); + + if (nBitError<0) { + blockErrorCumulative++; + bitErrorCumulative+=testLength; + } else { + blockErrorCumulative+=blockErrorState; + bitErrorCumulative+=nBitError; + } + + decoderState=0; + nBitError=0; + blockErrorState=0; } //Calculate error statistics for the SNR. @@ -273,11 +287,14 @@ int main(int argc, char *argv[]) { print_meas(&timeDecoder,"polar_decoder",NULL,NULL); fclose(logFile); - //free(testInput); - //free(encoderOutput); + //Bit + free(testInput); + free(encoderOutput); + free(estimatedOutput); + //Byte + free(encoderOutputByte); free(modulatedInput); free(channelOutput); - free(estimatedOutput); return (0); } diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c index 51a0328d7e..1616c498e4 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c @@ -278,13 +278,268 @@ int8_t polar_decoder( return(0); } -int8_t polar_decoder_aPriori( - double *input, - uint32_t *out, - t_nrPolar_paramsPtr polarParams, - uint8_t listSize, - uint8_t pathMetricAppr, - double *aPrioriPayload) +int8_t polar_decoder_aPriori(double *input, + uint32_t *out, + t_nrPolar_paramsPtr polarParams, + uint8_t listSize, + uint8_t pathMetricAppr, + double *aPrioriPayload) +{ + + uint8_t ***bit = nr_alloc_uint8_t_3D_array(polarParams->N, (polarParams->n+1), 2*listSize); + uint8_t **bitUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True + uint8_t **llrUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True + double ***llr = nr_alloc_double_3D_array(polarParams->N, (polarParams->n+1), 2*listSize); + uint8_t **crcChecksum = nr_alloc_uint8_t_2D_array(polarParams->crcParityBits, 2*listSize); + double *pathMetric = malloc(sizeof(double)*(2*listSize)); + uint8_t *crcState = malloc(sizeof(uint8_t)*(2*listSize)); //0=False, 1=True + + for (int i=0; i<(2*listSize); i++) { + pathMetric[i] = 0; + crcState[i]=1; + } + for (int i=0; iN; i++) { + llrUpdated[i][polarParams->n]=1; + bitUpdated[i][0]=((polarParams->information_bit_pattern[i]+1) % 2); + } + + uint8_t **extended_crc_generator_matrix = malloc(polarParams->K * sizeof(uint8_t *)); //G_P3 + uint8_t **tempECGM = malloc(polarParams->K * sizeof(uint8_t *)); //G_P2 + for (int i = 0; i < polarParams->K; i++){ + extended_crc_generator_matrix[i] = malloc(polarParams->crcParityBits * sizeof(uint8_t)); + tempECGM[i] = malloc(polarParams->crcParityBits * sizeof(uint8_t)); + } + + for (int i=0; ipayloadBits; i++) { + for (int j=0; jcrcParityBits; j++) { + tempECGM[i][j]=polarParams->crc_generator_matrix[i][j]; + } + } + for (int i=polarParams->payloadBits; iK; i++) { + for (int j=0; jcrcParityBits; j++) { + if( (i-polarParams->payloadBits) == j ){ + tempECGM[i][j]=1; + } else { + tempECGM[i][j]=0; + } + } + } + + for (int i=0; iK; i++) { + for (int j=0; jcrcParityBits; j++) { + extended_crc_generator_matrix[i][j]=tempECGM[polarParams->interleaving_pattern[i]][j]; + } + } + + //The index of the last 1-valued bit that appears in each column. + uint16_t last1ind[polarParams->crcParityBits]; + for (int j=0; jcrcParityBits; j++) { + for (int i=0; iK; i++) { + if (extended_crc_generator_matrix[i][j]==1) last1ind[j]=i; + } + } + + double *d_tilde = malloc(sizeof(double) * polarParams->N); + nr_polar_rate_matching(input, d_tilde, polarParams->rate_matching_pattern, polarParams->K, polarParams->N, polarParams->encoderLength); + for (int j = 0; j < polarParams->N; j++) llr[j][polarParams->n][0]=d_tilde[j]; + + + /* + * SCL polar decoder. + */ + + uint32_t nonFrozenBit=0; + uint8_t currentListSize=1; + uint8_t decoderIterationCheck=0; + int16_t checkCrcBits=-1; + uint8_t listIndex[2*listSize], copyIndex; + + for (uint16_t currentBit=0; currentBitN; currentBit++){ + updateLLR(llr, llrUpdated, bit, bitUpdated, currentListSize, currentBit, 0, polarParams->N, (polarParams->n+1), pathMetricAppr); + if (polarParams->information_bit_pattern[currentBit]==0) { //Frozen bit. + updatePathMetric(pathMetric, llr, currentListSize, 0, currentBit, pathMetricAppr); //approximation=0 --> 11b, approximation=1 --> 12 + } else { //Information or CRC bit. + if ( (polarParams->interleaving_pattern[nonFrozenBit] <= polarParams->payloadBits) && + (aPrioriPayload[polarParams->interleaving_pattern[nonFrozenBit]] == 0) ) { + //Information bit with known value of "0". + updatePathMetric(pathMetric, llr, currentListSize, 0, currentBit, pathMetricAppr); + bitUpdated[currentBit][0]=1; //0=False, 1=True + } else if ( (polarParams->interleaving_pattern[nonFrozenBit] <= polarParams->payloadBits) && + (aPrioriPayload[polarParams->interleaving_pattern[nonFrozenBit]] == 1) ) { + //Information bit with known value of "1". + updatePathMetric(pathMetric, llr, currentListSize, 1, currentBit, pathMetricAppr); + for (uint8_t i=0; icrcParityBits); + } else { + updatePathMetric2(pathMetric, llr, currentListSize, currentBit, pathMetricAppr); + + for (int i = 0; i < currentListSize; i++) { + for (int j = 0; j < polarParams->N; j++) { + for (int k = 0; k < (polarParams->n+1); k++) { + bit[j][k][i+currentListSize]=bit[j][k][i]; + llr[j][k][i+currentListSize]=llr[j][k][i];}}} + for (int i = 0; i < currentListSize; i++) { + bit[currentBit][0][i]=0; + crcState[i+currentListSize]=crcState[i]; + } + for (int i = currentListSize; i < 2*currentListSize; i++) bit[currentBit][0][i]=1; + bitUpdated[currentBit][0]=1; + updateCrcChecksum2(crcChecksum, extended_crc_generator_matrix, currentListSize, nonFrozenBit, polarParams->crcParityBits); + currentListSize*=2; + + //Keep only the best "listSize" number of entries. + if (currentListSize > listSize) { + for (uint8_t i = 0; i < 2*listSize; i++) listIndex[i]=i; + nr_sort_asc_double_1D_array_ind(pathMetric, listIndex, currentListSize); + + //sort listIndex[listSize, ..., 2*listSize-1] in descending order. + uint8_t swaps, tempInd; + for (uint8_t i = 0; i < listSize; i++) { + swaps = 0; + for (uint8_t j = listSize; j < (2*listSize - i) - 1; j++) { + if (listIndex[j+1] > listIndex[j]) { + tempInd = listIndex[j]; + listIndex[j] = listIndex[j + 1]; + listIndex[j + 1] = tempInd; + swaps++; + } + } + if (swaps == 0) + break; + } + + //First, backup the best "listSize" number of entries. + for (int k=(listSize-1); k>0; k--) { + for (int i=0; iN; i++) { + for (int j=0; j<(polarParams->n+1); j++) { + bit[i][j][listIndex[(2*listSize-1)-k]]=bit[i][j][listIndex[k]]; + llr[i][j][listIndex[(2*listSize-1)-k]]=llr[i][j][listIndex[k]]; + } + } + } + for (int k=(listSize-1); k>0; k--) { + for (int i = 0; i < polarParams->crcParityBits; i++) { + crcChecksum[i][listIndex[(2*listSize-1)-k]] = crcChecksum[i][listIndex[k]]; + } + } + for (int k=(listSize-1); k>0; k--) crcState[listIndex[(2*listSize-1)-k]]=crcState[listIndex[k]]; + + //Copy the best "listSize" number of entries to the first indices. + for (int k = 0; k < listSize; k++) { + if (k > listIndex[k]) { + copyIndex = listIndex[(2*listSize-1)-k]; + } else { //Use the backup. + copyIndex = listIndex[k]; + } + for (int i = 0; i < polarParams->N; i++) { + for (int j = 0; j < (polarParams->n + 1); j++) { + bit[i][j][k] = bit[i][j][copyIndex]; + llr[i][j][k] = llr[i][j][copyIndex]; + } + } + } + for (int k = 0; k < listSize; k++) { + if (k > listIndex[k]) { + copyIndex = listIndex[(2*listSize-1)-k]; + } else { //Use the backup. + copyIndex = listIndex[k]; + } + for (int i = 0; i < polarParams->crcParityBits; i++) { + crcChecksum[i][k]=crcChecksum[i][copyIndex]; + } + } + for (int k = 0; k < listSize; k++) { + if (k > listIndex[k]) { + copyIndex = listIndex[(2*listSize-1)-k]; + } else { //Use the backup. + copyIndex = listIndex[k]; + } + crcState[k]=crcState[copyIndex]; + } + currentListSize = listSize; + } + } + + for (int i=0; icrcParityBits; i++) { + if (last1ind[i]==nonFrozenBit) { + checkCrcBits=i; + break; + } + } + + if ( checkCrcBits > (-1) ) { + for (uint8_t i = 0; i < currentListSize; i++) { + if (crcChecksum[checkCrcBits][i]==1) { + crcState[i]=0; //0=False, 1=True + } + } + } + + for (uint8_t i = 0; i < currentListSize; i++) decoderIterationCheck+=crcState[i]; + if (decoderIterationCheck==0) { + //perror("[SCL polar decoder] All list entries have failed the CRC checks."); + free(d_tilde); + free(pathMetric); + free(crcState); + nr_free_uint8_t_3D_array(bit, polarParams->N, (polarParams->n+1)); + nr_free_double_3D_array(llr, polarParams->N, (polarParams->n+1)); + nr_free_uint8_t_2D_array(crcChecksum, polarParams->crcParityBits); + return(-1); + } + + nonFrozenBit++; + decoderIterationCheck=0; + checkCrcBits=-1; + } + } + + for (uint8_t i = 0; i < 2*listSize; i++) listIndex[i]=i; + nr_sort_asc_double_1D_array_ind(pathMetric, listIndex, currentListSize); + + for (uint8_t i = 0; i < fmin(listSize, (pow(2,polarParams->crcCorrectionBits)) ); i++) { + if ( crcState[listIndex[i]] == 1 ) { + for (int j = 0; j < polarParams->N; j++) polarParams->nr_polar_U[j]=bit[j][0][listIndex[i]]; + + //Extract the information bits (û to ĉ) + nr_polar_info_bit_extraction(polarParams->nr_polar_U, polarParams->nr_polar_CPrime, polarParams->information_bit_pattern, polarParams->N); + + //Deinterleaving (ĉ to b) + nr_polar_deinterleaver(polarParams->nr_polar_CPrime, polarParams->nr_polar_B, polarParams->interleaving_pattern, polarParams->K); + + //Remove the CRC (â) + for (int j = 0; j < polarParams->payloadBits; j++) polarParams->nr_polar_A[j]=polarParams->nr_polar_B[j]; + + break; + } + } + + free(d_tilde); + free(pathMetric); + free(crcState); + nr_free_uint8_t_3D_array(bit, polarParams->N, (polarParams->n+1)); + nr_free_double_3D_array(llr, polarParams->N, (polarParams->n+1)); + nr_free_uint8_t_2D_array(crcChecksum, polarParams->crcParityBits); + nr_free_uint8_t_2D_array(extended_crc_generator_matrix, polarParams->K); + nr_free_uint8_t_2D_array(tempECGM, polarParams->K); + + /* + * Return bits. + */ + nr_byte2bit_uint8_32_t(polarParams->nr_polar_A, polarParams->payloadBits, out); + return(0); +} + + + +int8_t polar_decoder_aPriori_timing(double *input, + uint32_t *out, + t_nrPolar_paramsPtr polarParams, + uint8_t listSize, + uint8_t pathMetricAppr, + double *aPrioriPayload, + double cpuFreqGHz, + FILE* logFile) { uint8_t ***bit = nr_alloc_uint8_t_3D_array(polarParams->N, (polarParams->n+1), 2*listSize); diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h index fdf34398fa..28e4c72864 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h @@ -42,6 +42,8 @@ #include "PHY/CODING/nrPolar_tools/nr_polar_dci_defs.h" #include "PHY/CODING/nrPolar_tools/nr_polar_uci_defs.h" #include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h" +#include "PHY/CODING/coding_defs.h" +#include "SIMULATION/TOOLS/sim.h" #define NR_POLAR_DECODER_LISTSIZE 8 //uint8_t #define NR_POLAR_DECODER_PATH_METRIC_APPROXIMATION 0 //uint8_t; 0 --> eq. (8a) and (11b), 1 --> eq. (9) and (12) @@ -111,6 +113,12 @@ void polar_encoder_dci(uint32_t *in, t_nrPolar_paramsPtr polarParams, uint16_t n_RNTI); +void polar_encoder_timing(uint32_t *in, + uint32_t *out, + t_nrPolar_paramsPtr polarParams, + double cpuFreqGHz, + FILE* logFile); + int8_t polar_decoder(double *input, uint8_t *output, t_nrPolar_paramsPtr polarParams, @@ -124,6 +132,15 @@ int8_t polar_decoder_aPriori(double *input, uint8_t pathMetricAppr, double *aPrioriPayload); +int8_t polar_decoder_aPriori_timing(double *input, + uint32_t *output, + t_nrPolar_paramsPtr polarParams, + uint8_t listSize, + uint8_t pathMetricAppr, + double *aPrioriPayload, + double cpuFreqGHz, + FILE* logFile); + void nr_polar_init(t_nrPolar_paramsPtr *polarParams, int8_t messageType, uint16_t messageLength, diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c index 2c9e3529a2..c1a0c31a42 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c @@ -30,10 +30,15 @@ * \warning */ +//#define DEBUG_POLAR_ENCODER //#define DEBUG_POLAR_ENCODER_DCI +//#define DEBUG_POLAR_ENCODER_TIMING #include "PHY/CODING/nrPolar_tools/nr_polar_defs.h" +//input [a_31 a_30 ... a_0] +//output [f_31 f_30 ... f_0] [f_63 f_62 ... f_32] ... + void polar_encoder(uint32_t *in, uint32_t *out, t_nrPolar_paramsPtr polarParams) @@ -95,6 +100,10 @@ void polar_encoder(uint32_t *in, /* * Return bits. */ +#ifdef DEBUG_POLAR_ENCODER + for (int i=0; i< polarParams->encoderLength;i++) printf("f[%d]=%d\n", i, polarParams->nr_polar_E[i]); +#endif + nr_byte2bit_uint8_32_t(polarParams->nr_polar_E, polarParams->encoderLength, out); } @@ -187,3 +196,76 @@ void polar_encoder_dci(uint32_t *in, } #endif } + +void polar_encoder_timing(uint32_t *in, + uint32_t *out, + t_nrPolar_paramsPtr polarParams, + double cpuFreqGHz, + FILE* logFile) +{ + //Initiate timing. + time_stats_t timeEncoderCRCByte, timeEncoderCRCBit, timeEncoderInterleaver, timeEncoderBitInsertion, timeEncoder1, timeEncoder2, timeEncoderRateMatching, timeEncoderByte2Bit; + reset_meas(&timeEncoderCRCByte); reset_meas(&timeEncoderCRCBit); reset_meas(&timeEncoderInterleaver); reset_meas(&timeEncoderBitInsertion); reset_meas(&timeEncoder1); reset_meas(&timeEncoder2); reset_meas(&timeEncoderRateMatching); reset_meas(&timeEncoderByte2Bit); + uint16_t n_RNTI=0x0000; + + start_meas(&timeEncoderCRCByte); + nr_crc_bit2bit_uint32_8_t(in, polarParams->payloadBits, polarParams->nr_polar_aPrime); //(a to a') + polarParams->crcBit = crc24c(polarParams->nr_polar_aPrime, (polarParams->payloadBits+polarParams->crcParityBits)); //Parity bits computation (p) + uint8_t arrayInd = ceil(polarParams->payloadBits / 8.0); //(a to b) + for (int i=0; inr_polar_B[j+(i*8)] = ((polarParams->nr_polar_aPrime[3+i]>>(7-j)) & 1); + for (int i=0; i<((polarParams->payloadBits)%8); i++) polarParams->nr_polar_B[i+(arrayInd-1)*8] = ((polarParams->nr_polar_aPrime[3+(arrayInd-1)]>>(7-i)) & 1); + for (int i=0; i<8; i++) polarParams->nr_polar_B[polarParams->payloadBits+i] = ((polarParams->crcBit)>>(31-i))&1; + for (int i=0; i<16; i++) polarParams->nr_polar_B[polarParams->payloadBits+8+i] = ( (((polarParams->crcBit)>>(23-i))&1) + ((n_RNTI>>(15-i))&1) ) % 2; //Scrambling (b to c) + stop_meas(&timeEncoderCRCByte); + + + start_meas(&timeEncoderCRCBit); + nr_bit2byte_uint32_8_t(in, polarParams->payloadBits, polarParams->nr_polar_A); + nr_matrix_multiplication_uint8_t_1D_uint8_t_2D(polarParams->nr_polar_A, polarParams->crc_generator_matrix, polarParams->nr_polar_crc, polarParams->payloadBits, polarParams->crcParityBits); //Calculate CRC. + for (uint8_t i = 0; i < polarParams->crcParityBits; i++) polarParams->nr_polar_crc[i] = (polarParams->nr_polar_crc[i] % 2); + for (uint16_t i = 0; i < polarParams->payloadBits; i++) polarParams->nr_polar_B[i] = polarParams->nr_polar_A[i]; //Attach CRC to the Transport Block. (a to b) + for (uint16_t i = polarParams->payloadBits; i < polarParams->K; i++) polarParams->nr_polar_B[i]= polarParams->nr_polar_crc[i-(polarParams->payloadBits)]; + stop_meas(&timeEncoderCRCBit); + + + start_meas(&timeEncoderInterleaver); //Interleaving (c to c') + nr_polar_interleaver(polarParams->nr_polar_B, polarParams->nr_polar_CPrime, polarParams->interleaving_pattern, polarParams->K); + stop_meas(&timeEncoderInterleaver); + + + start_meas(&timeEncoderBitInsertion); //Bit insertion (c' to u) + nr_polar_bit_insertion(polarParams->nr_polar_CPrime, polarParams->nr_polar_U, polarParams->N, polarParams->K, polarParams->Q_I_N, polarParams->Q_PC_N, polarParams->n_pc); + stop_meas(&timeEncoderBitInsertion); + + + start_meas(&timeEncoder1); //Encoding (u to d) + nr_matrix_multiplication_uint8_t_1D_uint8_t_2D(polarParams->nr_polar_U, polarParams->G_N, polarParams->nr_polar_D, polarParams->N, polarParams->N); + stop_meas(&timeEncoder1); + + + start_meas(&timeEncoder2); + for (uint16_t i = 0; i < polarParams->N; i++) polarParams->nr_polar_D[i] = (polarParams->nr_polar_D[i] % 2); + stop_meas(&timeEncoder2); + + + start_meas(&timeEncoderRateMatching);//Rate matching //Sub-block interleaving (d to y) and Bit selection (y to e) + nr_polar_interleaver(polarParams->nr_polar_D, polarParams->nr_polar_E, polarParams->rate_matching_pattern, polarParams->encoderLength); + stop_meas(&timeEncoderRateMatching); + + + start_meas(&timeEncoderByte2Bit); //Return bits. + nr_byte2bit_uint8_32_t(polarParams->nr_polar_E, polarParams->encoderLength, out); + stop_meas(&timeEncoderByte2Bit); + + fprintf(logFile,",%f,%f,%f,%f,%f,%f,%f,%f\n", + (timeEncoderCRCByte.diff_now/(cpuFreqGHz*1000.0)), + (timeEncoderCRCBit.diff_now/(cpuFreqGHz*1000.0)), + (timeEncoderInterleaver.diff_now/(cpuFreqGHz*1000.0)), + (timeEncoderBitInsertion.diff_now/(cpuFreqGHz*1000.0)), + (timeEncoder1.diff_now/(cpuFreqGHz*1000.0)), + (timeEncoder2.diff_now/(cpuFreqGHz*1000.0)), + (timeEncoderRateMatching.diff_now/(cpuFreqGHz*1000.0)), + (timeEncoderByte2Bit.diff_now/(cpuFreqGHz*1000.0))); +} From bf961a42689fbf989a18a7f739bbf520f5107757 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 11 Sep 2018 16:06:00 +0200 Subject: [PATCH 218/379] CI: little typo on TDD scenario Signed-off-by: Raphael Defosseux --- ci-scripts/xml_files/enb_usrpb210_band40.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-scripts/xml_files/enb_usrpb210_band40.xml b/ci-scripts/xml_files/enb_usrpb210_band40.xml index 5b54d9b8df..e364d9acd4 100644 --- a/ci-scripts/xml_files/enb_usrpb210_band40.xml +++ b/ci-scripts/xml_files/enb_usrpb210_band40.xml @@ -32,13 +32,13 @@ Initialize_eNB - Initialize eNB (FDD/Band40/10MHz) + Initialize eNB (FDD/Band40/5MHz) -O ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf --codingw --fepw Initialize_eNB - Initialize eNB (TDD/Band40/5MHz/info) + Initialize eNB (TDD/Band40/10MHz/info) -O ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf --codingw --fepw From 7d602d5cc2db36604f9d52b6f10a24edeaf754be Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 19 Sep 2018 11:55:43 +0200 Subject: [PATCH 219/379] CI: basic-simulator --> seg fault core dumps are recovered and part of artifacts Signed-off-by: Raphael Defosseux --- ci-scripts/runTestOnVM.sh | 59 ++++++++++++++++++++++++++++----- openair1/PHY/defs_common.h | 6 +++- targets/RT/USER/lte-softmodem.c | 9 ----- 3 files changed, 55 insertions(+), 19 deletions(-) diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index 6abdf35507..ea536b749a 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -89,13 +89,13 @@ function start_basic_sim_enb { echo "grep N_RB_DL ci-lte-basic-sim.conf | sed -e 's#N_RB_DL.*=#N_RB_DL =#'" >> $1 echo "echo \"cd /home/ubuntu/tmp/cmake_targets/basic_simulator/enb/\"" >> $1 echo "cd /home/ubuntu/tmp/cmake_targets/basic_simulator/enb/" >> $1 - echo "echo \"./lte-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-lte-basic-sim.conf\" > ./my-lte-softmodem-run.sh " >> $1 + echo "echo \"ulimit -c unlimited && ./lte-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-lte-basic-sim.conf\" > ./my-lte-softmodem-run.sh " >> $1 echo "chmod 775 ./my-lte-softmodem-run.sh" >> $1 echo "cat ./my-lte-softmodem-run.sh" >> $1 echo "sudo -E daemon --inherit --unsafe --name=enb_daemon --chdir=/home/ubuntu/tmp/cmake_targets/basic_simulator/enb -o /home/ubuntu/tmp/cmake_targets/log/$LOC_LOG_FILE ./my-lte-softmodem-run.sh" >> $1 ssh -o StrictHostKeyChecking=no ubuntu@$LOC_VM_IP_ADDR < $1 - sleep 60 + sleep 10 rm $1 } @@ -114,7 +114,7 @@ function start_basic_sim_ue { local i="0" echo "ifconfig oip1 | egrep -c \"inet addr\"" > $1 - while [ $i -lt 40 ] + while [ $i -lt 10 ] do sleep 5 CONNECTED=`ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1` @@ -237,16 +237,51 @@ function check_iperf { } function terminate_enb_ue_basic_sim { - echo "echo \"sudo daemon --name=enb_daemon --stop\"" > $1 - echo "sudo daemon --name=enb_daemon --stop" >> $1 - echo "echo \"sudo daemon --name=ue_daemon --stop\"" >> $1 - echo "sudo daemon --name=ue_daemon --stop" >> $1 - echo "echo \"sudo killall --signal SIGKILL lte-softmodem\"" >> $1 - echo "sudo killall --signal SIGKILL lte-softmodem" >> $1 + echo "NB_OAI_PROCESSES=\`ps -aux | grep modem | grep -v grep | grep -c softmodem\`" > $1 + echo "if [ \$NB_OAI_PROCESSES -ne 0 ]; then echo \"sudo daemon --name=enb_daemon --stop\"; fi" >> $1 + echo "if [ \$NB_OAI_PROCESSES -ne 0 ]; then sudo daemon --name=enb_daemon --stop; fi" >> $1 + echo "if [ \$NB_OAI_PROCESSES -ne 0 ]; then echo \"sudo daemon --name=ue_daemon --stop\"; fi" >> $1 + echo "if [ \$NB_OAI_PROCESSES -ne 0 ]; then sudo daemon --name=ue_daemon --stop; fi" >> $1 + echo "if [ \$NB_OAI_PROCESSES -ne 0 ]; then sleep 5; fi" >> $1 + echo "echo \"ps -aux | grep softmodem\"" >> $1 + echo "ps -aux | grep softmodem | grep -v grep" >> $1 + echo "NB_OAI_PROCESSES=\`ps -aux | grep modem | grep -v grep | grep -c softmodem\`" >> $1 + echo "if [ \$NB_OAI_PROCESSES -ne 0 ]; then echo \"sudo killall --signal SIGINT lte-softmodem\"; fi" >> $1 + echo "if [ \$NB_OAI_PROCESSES -ne 0 ]; then sudo killall --signal SIGINT lte-softmodem; fi" >> $1 + echo "if [ \$NB_OAI_PROCESSES -ne 0 ]; then sleep 5; fi" >> $1 + echo "echo \"ps -aux | grep softmodem\"" >> $1 + echo "ps -aux | grep softmodem | grep -v grep" >> $1 + echo "NB_OAI_PROCESSES=\`ps -aux | grep modem | grep -v grep | grep -c softmodem\`" >> $1 + echo "if [ \$NB_OAI_PROCESSES -ne 0 ]; then echo \"sudo killall --signal SIGKILL lte-softmodem\"; fi" >> $1 + echo "if [ \$NB_OAI_PROCESSES -ne 0 ]; then sudo killall --signal SIGKILL lte-softmodem; fi" >> $1 + echo "if [ \$NB_OAI_PROCESSES -ne 0 ]; then echo \"sudo killall --signal SIGKILL lte-uesoftmodem\"; fi" >> $1 + echo "if [ \$NB_OAI_PROCESSES -ne 0 ]; then sudo killall --signal SIGKILL lte-uesoftmodem; fi" >> $1 + echo "if [ \$NB_OAI_PROCESSES -ne 0 ]; then sleep 5; fi" >> $1 + echo "echo \"ps -aux | grep softmodem\"" >> $1 + echo "ps -aux | grep softmodem | grep -v grep" >> $1 ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1 rm -f $1 } +function recover_core_dump { + local IS_SEG_FAULT=`egrep -ic "segmentation fault" $3` + if [ $IS_SEG_FAULT -ne 0 ] + then + local TC=`echo $3 | sed -e "s#^.*enb_##" -e "s#Hz.*#Hz#"` + echo "Segmentation fault detected on enb -> recovering core dump" + echo "cd /home/ubuntu/tmp/cmake_targets/basic_simulator/enb" > $1 + echo "cp /home/ubuntu/tmp/ci-scripts/conf_files/ci-lte-basic-sim.conf ." >> $1 + echo "sync" >> $1 + echo "sudo tar -cjhf basic-simulator-enb-core-${TC}.bz2 core lte-softmodem *.so ci-lte-basic-sim.conf my-lte-softmodem-run.sh" >> $1 + echo "sudo rm core" >> $1 + echo "rm ci-lte-basic-sim.conf" >> $1 + echo "sync" >> $1 + ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1 + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/basic_simulator/enb/basic-simulator-enb-core-${TC}.bz2 $4 + rm -f $1 + fi +} + function terminate_ltebox_epc { echo "echo \"cd /opt/ltebox/tools\"" > $1 echo "cd /opt/ltebox/tools" >> $1 @@ -675,6 +710,7 @@ then terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR exit -1 fi @@ -711,6 +747,7 @@ then terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC echo "############################################################" echo "Starting the eNB at 10MHz" @@ -729,6 +766,7 @@ then terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR exit -1 fi @@ -765,6 +803,7 @@ then terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC echo "############################################################" echo "Starting the eNB at 20MHz" @@ -783,6 +822,7 @@ then terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR exit -1 fi @@ -819,6 +859,7 @@ then terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC echo "############################################################" echo "Terminate EPC" diff --git a/openair1/PHY/defs_common.h b/openair1/PHY/defs_common.h index e27622c059..03d83472f8 100644 --- a/openair1/PHY/defs_common.h +++ b/openair1/PHY/defs_common.h @@ -991,7 +991,11 @@ static inline void wait_sync(char *thread_name) { pthread_mutex_unlock(&sync_mutex); printf( "got sync (%s)\n", thread_name); - + /* + * Raphael Defosseux: added for CI to get faster the got sync message. + */ + fflush(stdout); + fflush(stderr); } static inline int wakeup_thread(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) { diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index aa8872679e..7990a48a14 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -866,16 +866,7 @@ static void wait_nfapi_init(char *thread_name) { pthread_mutex_unlock(&nfapi_sync_mutex); - /* - * Raphael Defosseux: temporary workaround for CI - * -- Repeating the message thrice to make sure - * -- it is present during flush. - */ printf( "NFAPI: got sync (%s)\n", thread_name); - printf( "NFAPI: got sync (%s)\n", thread_name); - printf( "NFAPI: got sync (%s)\n", thread_name); - fflush(stdout); - fflush(stderr); } int main( int argc, char **argv ) From 52bdf7e0774bd5e0f183aa0bdd1e5b4fd9c2ec13 Mon Sep 17 00:00:00 2001 From: Hongzhi Date: Wed, 19 Sep 2018 15:10:43 +0200 Subject: [PATCH 220/379] nr pbch format change --- .../CODING/nrPolar_tools/nr_polar_pbch_defs.h | 1 + openair1/PHY/NR_TRANSPORT/nr_pbch.c | 37 ++++++++----------- openair1/PHY/defs_gNB.h | 6 +-- 3 files changed, 19 insertions(+), 25 deletions(-) diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h b/openair1/PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h index f8fd5f88f0..2ced9633ce 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h @@ -51,6 +51,7 @@ //Sec. 7.1.5: Rate Matching #define NR_POLAR_PBCH_I_BIL 0 //uint8_t #define NR_POLAR_PBCH_E 864 //uint16_t +#define NR_POLAR_PBCH_E_DWORD 27 // NR_POLAR_PBCH_E/32 /* * TEST CODE diff --git a/openair1/PHY/NR_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_TRANSPORT/nr_pbch.c index 5964a55569..cd5024fa49 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_pbch.c @@ -36,7 +36,7 @@ #include "PHY/sse_intrin.h" //#define DEBUG_PBCH -//#define DEBUG_PBCH_ENCODING +#define DEBUG_PBCH_ENCODING //#define DEBUG_PBCH_DMRS extern short nr_mod_table[NR_MOD_TABLE_SIZE_SHORT]; @@ -140,9 +140,9 @@ void nr_pbch_scrambling(NR_gNB_PBCH *pbch, { uint8_t reset, offset; uint32_t x1, x2, s=0; - uint8_t *pbch_e = pbch->pbch_e; - uint32_t *pbch_a_prime = (uint32_t*)pbch->pbch_a_prime; - uint32_t *pbch_a_interleaved = (uint32_t*)pbch->pbch_a_interleaved; + uint32_t *pbch_e = pbch->pbch_e; + uint32_t pbch_a_prime = pbch->pbch_a_prime; + uint32_t pbch_a_interleaved = pbch->pbch_a_interleaved; uint32_t unscrambling_mask = 0x100006D; reset = 1; @@ -157,7 +157,7 @@ void nr_pbch_scrambling(NR_gNB_PBCH *pbch, // Scrambling is now done with offset (nushift*M)%32 offset = (nushift*M)&0x1f; #ifdef DEBUG_PBCH_ENCODING - printf("Scrambling params: nushift %d M %d length %d bitwise %d offset %d\n", nushift, M, length, bitwise, offset); + printf("Scrambling params: nushift %d M %d length %d encoded %d offset %d\n", nushift, M, length, encoded, offset); #endif for (int i=0; i>i)&1)? (((*pbch_a_interleaved)>>i)&1)<>i)&1) ^ ((s>>((i+offset)&0x1f))&1))<>i)&1)? ((pbch_a_interleaved>>i)&1)<>i)&1) ^ ((s>>((i+offset)&0x1f))&1))<>(3+i))&1)<<(5+i); // resp. 4th, 5th and 6th bits of ssb_index else (*xbyte) ^= ((config->sch_config.ssb_subcarrier_offset.value>>5)&1)<<5; //MSB of k_SSB -#ifdef DEBUG_PBCH_ENCODING +//#ifdef DEBUG_PBCH_ENCODING printf("Extra byte:\n"); for (int i=0; i<4; i++) printf("pbch_a[%d]: 0x%02x\n", i, pbch->pbch_a[i]); -#endif +//#endif // Payload interleaving uint32_t in=0, out=0; @@ -258,19 +258,18 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch, in |= (uint32_t)(pbch->pbch_a[i]<<((3-i)<<3)); for (int i=0; i<32; i++) { - out |= ((in>>i)&1)<<(nr_pbch_payload_interleaver(i));//nr_pbch_payload_interleaving_pattern[i] + pbch->pbch_a_interleaved |= ((in>>i)&1)<<(nr_pbch_payload_interleaver(i));//nr_pbch_payload_interleaving_pattern[i] #ifdef DEBUG_PBCH_ENCODING printf("i %d in 0x%08x out 0x%08x ilv %d (in>>i)&1) %d\n", i, in, out, nr_pbch_payload_interleaver(i), (in>>i)&1); #endif } - for (int i=0; i>3; i++) - pbch->pbch_a_interleaved[i] = (uint8_t)((out>>(i<<3))&0xff); + /*for (int i=0; i>3; i++) + pbch->pbch_a_interleaved[i] = (uint8_t)((out>>(i<<3))&0xff);*/ #ifdef DEBUG_PBCH_ENCODING printf("Interleaving:\n"); - for (int i=0; i<4; i++) - printf("pbch_a_interleaved[%d]: 0x%02x\n", i, pbch->pbch_a_interleaved[i]); + printf("pbch_a_interleaved: 0x%08x\n", pbch->pbch_a_interleaved); #endif // Scrambling @@ -279,20 +278,14 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch, nr_pbch_scrambling(pbch, (uint32_t)config->sch_config.physical_cell_id.value, nushift, M, NR_POLAR_PBCH_PAYLOAD_BITS, 0); #ifdef DEBUG_PBCH_ENCODING printf("Payload scrambling:\n"); - for (int i=0; i<4; i++) - printf("pbch_a_prime[%d]: 0x%02x\n", i, pbch->pbch_a_prime[i]); + printf("pbch_a_prime[%d]: 0x%08x\n", pbch->pbch_a_prime); #endif -for (int m=0;m<32;m++){ -pbch_a_b[m] = ((pbch->pbch_a_prime[m>>3]>>(m&7))&1); -//printf("pbch_a_b[%d] %d\n", m, pbch_a_b[m] ); -} - /// CRC, coding and rate matching polar_encoder (pbch->pbch_a_prime, pbch->pbch_e, polar_params); #ifdef DEBUG_PBCH_ENCODING printf("Channel coding:\n"); - for (int i=0; i<(uint16_t)ceil((NR_POLAR_PBCH_E>>3)/32); i++) + for (int i=0; ipbch_e[i]); printf("\n"); #endif @@ -303,7 +296,7 @@ pbch_a_b[m] = ((pbch->pbch_a_prime[m>>3]>>(m&7))&1); nr_pbch_scrambling(pbch, (uint32_t)config->sch_config.physical_cell_id.value, nushift, M, NR_POLAR_PBCH_E, 1); #ifdef DEBUG_PBCH_ENCODING printf("Scrambling:\n"); - for (int i=0; i<(uint16_t)ceil((NR_POLAR_PBCH_E>>3)/32); i++) + for (int i=0; ipbch_e[i]); printf("\n"); #endif diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h index 116e940c71..f5e9efa3cb 100644 --- a/openair1/PHY/defs_gNB.h +++ b/openair1/PHY/defs_gNB.h @@ -41,9 +41,9 @@ typedef struct { uint8_t pbch_a[NR_POLAR_PBCH_PAYLOAD_BITS>>3]; - uint8_t pbch_a_interleaved[NR_POLAR_PBCH_PAYLOAD_BITS>>3]; - uint8_t pbch_a_prime[NR_POLAR_PBCH_PAYLOAD_BITS>>3]; - uint8_t pbch_e[NR_POLAR_PBCH_E]; + uint32_t pbch_a_interleaved; + uint32_t pbch_a_prime; + uint32_t pbch_e[NR_POLAR_PBCH_E_DWORD]; } NR_gNB_PBCH; typedef struct { From e8780cb743703b8a2f263e810383c3cd009c2e49 Mon Sep 17 00:00:00 2001 From: Hongzhi Date: Wed, 19 Sep 2018 15:15:58 +0200 Subject: [PATCH 221/379] remove sim.h in nr_ploar_def.h --- openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h index 28e4c72864..9615a0d245 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h @@ -43,7 +43,7 @@ #include "PHY/CODING/nrPolar_tools/nr_polar_uci_defs.h" #include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h" #include "PHY/CODING/coding_defs.h" -#include "SIMULATION/TOOLS/sim.h" +//#include "SIMULATION/TOOLS/sim.h" #define NR_POLAR_DECODER_LISTSIZE 8 //uint8_t #define NR_POLAR_DECODER_PATH_METRIC_APPROXIMATION 0 //uint8_t; 0 --> eq. (8a) and (11b), 1 --> eq. (9) and (12) From 3996241b17de5f7b025a0a9404ed8beb94d320d9 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 19 Sep 2018 15:47:00 +0200 Subject: [PATCH 222/379] Polar encoder entry fix --- cmake_targets/CMakeLists.txt | 3 +-- openair1/PHY/NR_TRANSPORT/nr_pbch.c | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 420a2932ae..8d27a67a40 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -176,8 +176,7 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CU # these changes are related to hardcoded path to include .h files add_definitions(-DCMAKER) set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3") -#set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3 -O2") -set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3") +set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3 -O2") set(GIT_BRANCH "UNKNOWN") diff --git a/openair1/PHY/NR_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_TRANSPORT/nr_pbch.c index 473451fe52..70cf18ab57 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_pbch.c @@ -36,7 +36,7 @@ #include "PHY/sse_intrin.h" //#define DEBUG_PBCH -#define DEBUG_PBCH_ENCODING +//#define DEBUG_PBCH_ENCODING //#define DEBUG_PBCH_DMRS extern short nr_mod_table[NR_MOD_TABLE_SIZE_SHORT]; @@ -278,11 +278,11 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch, nr_pbch_scrambling(pbch, (uint32_t)config->sch_config.physical_cell_id.value, nushift, M, NR_POLAR_PBCH_PAYLOAD_BITS, 0); #ifdef DEBUG_PBCH_ENCODING printf("Payload scrambling:\n"); - printf("pbch_a_prime[%d]: 0x%08x\n", pbch->pbch_a_prime); + printf("pbch_a_prime: 0x%08x\n", pbch->pbch_a_prime); #endif /// CRC, coding and rate matching - polar_encoder (pbch->pbch_a_prime, pbch->pbch_e, polar_params); + polar_encoder (&pbch->pbch_a_prime, pbch->pbch_e, polar_params); #ifdef DEBUG_PBCH_ENCODING printf("Channel coding:\n"); for (int i=0; i Date: Thu, 20 Sep 2018 11:58:06 +0200 Subject: [PATCH 223/379] Update nr_pbch.c --- openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c index 337b6d8e33..43c7c2772c 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c @@ -650,7 +650,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, for (i=0; i<16; i++){ printf("unscrambling demod_pbch_e[%d] r = %2.3f i = %2.3f\n", i<<1 , demod_pbch_e[i<<1], demod_pbch_e[(i<<1)+1]);} //#endif - + uint32_t pbch_out; //polar decoding de-rate matching t_nrPolar_paramsPtr nrPolar_params = NULL, currentPtr = NULL; nr_polar_init(&nrPolar_params, @@ -658,10 +658,14 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, NR_POLAR_PBCH_PAYLOAD_BITS, NR_POLAR_PBCH_AGGREGATION_LEVEL); currentPtr = nr_polar_params(nrPolar_params, NR_POLAR_PBCH_MESSAGE_TYPE, NR_POLAR_PBCH_PAYLOAD_BITS, NR_POLAR_PBCH_AGGREGATION_LEVEL); - decoderState = polar_decoder(demod_pbch_e, pbch_a_b, currentPtr, decoderListSize, pathMetricAppr); + double aPrioriArray[currentPtr->payloadBits]; + for (int i=0; ipayloadBits; i++) aPrioriArray[i] = NAN; + decoderState = polar_decoder_aPriori(demod_pbch_e, pbch_out, currentPtr, decoderListSize, pathMetricAppr,aPrioriArray); printf("polar decoder state %d\n", decoderState); if(decoderState == -1) return(decoderState); + + printf("polar decoder output 0x%08x\n",pbch_out); memset(&pbch_a_prime[0], 0, sizeof(uint8_t) * NR_POLAR_PBCH_PAYLOAD_BITS>>3); for (i=0; i Date: Thu, 20 Sep 2018 12:06:55 +0200 Subject: [PATCH 224/379] adding both configurable at config file and commandline --- openair2/ENB_APP/enb_config.c | 30 ++++++++++++++++++++---------- targets/RT/USER/lte-softmodem.c | 17 +++++++++++++---- targets/RT/USER/lte-softmodem.h | 11 +++++++---- targets/RT/USER/lte-uesoftmodem.c | 21 ++++++++++++++++----- 4 files changed, 56 insertions(+), 23 deletions(-) diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index bbe3ca5c2c..2d6ebc966e 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -63,6 +63,8 @@ extern uint16_t sf_ahead; extern void set_parallel_conf(int parallel_conf); extern void set_parallel_worker_conf(int worker_conf); +extern PARALLEL_CONF_t get_thread_parallel_conf(void); +extern WORKER_CONF_t get_thread_worker_conf(void); void RCconfig_flexran() { @@ -2488,8 +2490,10 @@ return 0; int RCconfig_parallel(void) { - char *parallel_conf; - char *worker_conf; + char *parallel_conf = NULL; + char *worker_conf = NULL; + extern char *parallel_config; + extern char *worker_config; paramdef_t ThreadParams[] = THREAD_CONF_DESC; paramlist_def_t THREADParamList = {THREAD_CONFIG_STRING_THREAD_STRUCT,NULL,0}; @@ -2500,19 +2504,25 @@ int RCconfig_parallel(void) { config_getlist( &THREADParamList,ThreadParams,sizeof(ThreadParams)/sizeof(paramdef_t),NULL); parallel_conf = strdup(*(THREADParamList.paramarray[0][THREAD_PARALLEL_IDX].strptr)); - worker_conf = strdup(*(THREADParamList.paramarray[0][THREAD_PARALLEL_IDX].strptr)); } else { - parallel_conf = "PARALLEL_RU_L1_TRX_SPLIT"; - worker_conf = "WORKER_ENABLE"; + parallel_conf = strdup("PARALLEL_RU_L1_TRX_SPLIT"); + } + if(THREADParamList.numelt>0) + { + config_getlist( &THREADParamList,ThreadParams,sizeof(ThreadParams)/sizeof(paramdef_t),NULL); + worker_conf = strdup(*(THREADParamList.paramarray[0][THREAD_WORKER_IDX].strptr)); + } + else + { + worker_conf = strdup("WORKER_ENABLE"); } - if(strcmp(parallel_conf,"PARALLEL_SINGLE_THREAD")==0) set_parallel_conf(0); - else if(strcmp(parallel_conf,"PARALLEL_RU_L1_SPLIT")==0) set_parallel_conf(1); - else if(strcmp(parallel_conf,"PARALLEL_RU_L1_TRX_SPLIT")==0) set_parallel_conf(2); - if(strcmp(worker_conf,"WORKER_DISABLE")==0) set_parallel_worker_conf(0); - else if(strcmp(worker_conf,"WORKER_ENABLE")==0) set_parallel_worker_conf(1); + + if(parallel_config == NULL) set_parallel_conf(parallel_conf); + if(worker_config == NULL) set_worker_conf(worker_conf); + return 0; } diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index b9458afa1e..03871d5fc3 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -219,15 +219,22 @@ extern void init_eNB_afterRU(void); int transmission_mode=1; int emulate_rf = 0; int numerology = 0; +char *parallel_config = NULL; +char *worker_config = NULL; static THREAD_STRUCT thread_struct; -void set_parallel_conf(int parallel_conf) +void set_parallel_conf(char *parallel_conf) { - thread_struct.parallel_conf = (PARALLEL_CONF_t)parallel_conf; + if(strcmp(parallel_conf,"PARALLEL_SINGLE_THREAD")==0) thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD; + else if(strcmp(parallel_conf,"PARALLEL_RU_L1_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_SPLIT; + else if(strcmp(parallel_conf,"PARALLEL_RU_L1_TRX_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_TRX_SPLIT; + printf("[CONFIG] parallel conf is set to %d\n",thread_struct.parallel_conf); } -void set_parallel_worker_conf(int worker_conf) +void set_worker_conf(char *worker_conf) { - thread_struct.worker_conf = (WORKER_CONF_t)worker_conf; + if(strcmp(worker_conf,"WORKER_DISABLE")==0) thread_struct.worker_conf = WORKER_DISABLE; + else if(strcmp(worker_conf,"WORKER_ENABLE")==0) thread_struct.worker_conf = WORKER_ENABLE; + printf("[CONFIG] worker conf is set to %d\n",thread_struct.worker_conf); } PARALLEL_CONF_t get_thread_parallel_conf(void) { @@ -562,6 +569,8 @@ static void get_options(unsigned int *start_msc) { RC.nb_nb_iot_rrc_inst=RC.nb_nb_iot_L1_inst=RC.nb_nb_iot_macrlc_inst=0; } } + if(parallel_config != NULL) set_parallel_conf(parallel_config); + if(worker_config != NULL) set_worker_conf(worker_config); } diff --git a/targets/RT/USER/lte-softmodem.h b/targets/RT/USER/lte-softmodem.h index 7074172a03..2b087e5456 100644 --- a/targets/RT/USER/lte-softmodem.h +++ b/targets/RT/USER/lte-softmodem.h @@ -93,6 +93,8 @@ #define CONFIG_HLP_NUMEROLOGY "adding numerology for 5G\n" #define CONFIG_HLP_EMULATE_RF "Emulated RF enabled(disable by defult)\n" +#define CONFIG_HLP_PARALLEL_CMD "three config for level of parallelism 'PARALLEL_SINGLE_THREAD', 'PARALLEL_RU_L1_SPLIT', or 'PARALLEL_RU_L1_TRX_SPLIT'\n" +#define CONFIG_HLP_WORKER_CMD "two option for worker 'WORKER_DISABLE' or 'WORKER_ENABLE'\n" #define CONFIG_HLP_DISABLNBIOT "disable nb-iot, even if defined in config\n" @@ -184,7 +186,9 @@ {"s" , CONFIG_HLP_SNR, 0, iptr:&snr_dB, defintval:25, TYPE_INT, 0}, \ {"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&numerology, defintval:0, TYPE_INT, 0}, \ {"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&emulate_rf, defintval:0, TYPE_INT, 0}, \ -{"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, iptr:&nonbiotflag, defintval:0, TYPE_INT, 0} \ +{"parallel-config", CONFIG_HLP_PARALLEL_CMD,0, strptr:(char **)¶llel_config, defstrval:NULL, TYPE_STRING, 0}, \ +{"worker-config", CONFIG_HLP_WORKER_CMD, 0, strptr:(char **)&worker_config, defstrval:NULL, TYPE_STRING, 0}, \ +{"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, iptr:&nonbiotflag, defintval:0, TYPE_INT, 0} \ } #define CONFIG_HLP_FLOG "Enable online log \n" @@ -275,11 +279,10 @@ PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms, uint8_t UE_id, uint8_t abstraction_flag); void init_eNB_afterRU(void); -void thread_structure_init(void); PARALLEL_CONF_t get_thread_parallel_conf(void); WORKER_CONF_t get_thread_worker_conf(void); -void set_parallel_conf(int parallel_conf); -void set_parallel_worker_conf(int worker_conf); +void set_parallel_conf(char *parallel_conf); +void set_worker_conf(char *worker_conf); extern int stop_L1L2(module_id_t enb_id); extern int restart_L1L2(module_id_t enb_id); diff --git a/targets/RT/USER/lte-uesoftmodem.c b/targets/RT/USER/lte-uesoftmodem.c index 1613622567..c52fe130a1 100644 --- a/targets/RT/USER/lte-uesoftmodem.c +++ b/targets/RT/USER/lte-uesoftmodem.c @@ -220,15 +220,22 @@ int transmission_mode=1; int emulate_rf = 0; int numerology = 0; +char *parallel_config = NULL; +char *worker_config = NULL; static THREAD_STRUCT thread_struct; -void set_parallel_conf(int parallel_conf) +void set_parallel_conf(char *parallel_conf) { - thread_struct.parallel_conf = (PARALLEL_CONF_t)parallel_conf; + if(strcmp(parallel_conf,"PARALLEL_SINGLE_THREAD")==0) thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD; + else if(strcmp(parallel_conf,"PARALLEL_RU_L1_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_SPLIT; + else if(strcmp(parallel_conf,"PARALLEL_RU_L1_TRX_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_TRX_SPLIT; + printf("[CONFIG] parallel conf is set to %d\n",thread_struct.parallel_conf); } -void set_parallel_worker_conf(int worker_conf) +void set_worker_conf(char *worker_conf) { - thread_struct.worker_conf = (WORKER_CONF_t)worker_conf; + if(strcmp(worker_conf,"WORKER_DISABLE")==0) thread_struct.worker_conf = WORKER_DISABLE; + else if(strcmp(worker_conf,"WORKER_ENABLE")==0) thread_struct.worker_conf = WORKER_ENABLE; + printf("[CONFIG] worker conf is set to %d\n",thread_struct.worker_conf); } PARALLEL_CONF_t get_thread_parallel_conf(void) { @@ -237,7 +244,7 @@ PARALLEL_CONF_t get_thread_parallel_conf(void) WORKER_CONF_t get_thread_worker_conf(void) { return thread_struct.worker_conf; -} +} /* struct for ethernet specific parameters given in eNB conf file */ eth_params_t *eth_params; @@ -599,6 +606,8 @@ static void get_options(unsigned int *start_msc) { if(nfapi_mode!=3) uecap_xer_in=1; } *//* UE with config file */ + if(parallel_config != NULL) set_parallel_conf(parallel_config); + if(worker_config != NULL) set_worker_conf(worker_config); } @@ -816,6 +825,8 @@ int main( int argc, char **argv ) for (int i=0;i 1 && simL1flag != 1) { From d8472426c47535bb33a4e74c860a1950572aa3c7 Mon Sep 17 00:00:00 2001 From: laurent Date: Thu, 20 Sep 2018 12:37:26 +0200 Subject: [PATCH 225/379] fix_issue_350_gtpu_init --- common/utils/ocp_itti/intertask_interface.cpp | 23 +- common/utils/ocp_itti/intertask_interface.h | 5 + openair2/COMMON/gtpv1_u_messages_def.h | 1 + openair2/COMMON/gtpv1_u_messages_types.h | 5 + openair2/ENB_APP/enb_config.c | 3528 ++++++++--------- openair2/RRC/LTE/rrc_eNB.c | 54 +- openair2/RRC/LTE/rrc_proto.h | 4 + openair3/GTPV1-U/gtpv1u_eNB.c | 185 +- openair3/GTPV1-U/gtpv1u_eNB_defs.h | 2 - openair3/GTPV1-U/gtpv1u_eNB_task.h | 2 + openair3/S1AP/s1ap_eNB.c | 21 +- openair3/S1AP/s1ap_eNB.h | 2 + openair3/SCTP/sctp_eNB_task.c | 30 +- openair3/SCTP/sctp_eNB_task.h | 2 + targets/RT/USER/lte-softmodem.c | 15 +- 15 files changed, 1837 insertions(+), 2042 deletions(-) diff --git a/common/utils/ocp_itti/intertask_interface.cpp b/common/utils/ocp_itti/intertask_interface.cpp index 931eb40c0f..13bf801668 100644 --- a/common/utils/ocp_itti/intertask_interface.cpp +++ b/common/utils/ocp_itti/intertask_interface.cpp @@ -115,11 +115,16 @@ extern "C" { task_list_t *t=&tasks[destination_task_id]; pthread_mutex_lock (&t->queue_cond_lock); int ret=itti_send_msg_to_task_locked(destination_task_id, instance, message); - pthread_mutex_unlock (&t->queue_cond_lock); - while ( t->message_queue.size()>0 && t->admin.func != NULL ) + // while ( t->message_queue.size()>0 && t->admin.func != NULL ) + if ( t->message_queue.size()>0 && t->admin.func != NULL ) { + if (t->message_queue.size()>1) + LOG_W(TMR,"queue in no thread mode is %ld\n", t->message_queue.size()); + pthread_mutex_unlock (&t->queue_cond_lock); t->admin.func(NULL); - + } else { + pthread_mutex_unlock (&t->queue_cond_lock); + } return ret; } @@ -278,6 +283,18 @@ extern "C" { "Thread creation for task %d failed!\n", task_id); pthread_setname_np( t->thread, itti_get_task_name(task_id) ); LOG_I(TMR,"Created Posix thread %s\n", itti_get_task_name(task_id) ); +#if 1 // BMC test RT prio + { + int policy; + struct sched_param sparam; + memset(&sparam, 0, sizeof(sparam)); + sparam.sched_priority = sched_get_priority_max(SCHED_FIFO)-10; + policy = SCHED_FIFO ; + if (pthread_setschedparam(t->thread, policy, &sparam) != 0) { + LOG_E(TMR,"task %s : Failed to set pthread priority\n", itti_get_task_name(task_id) ); + } + } +#endif return 0; } diff --git a/common/utils/ocp_itti/intertask_interface.h b/common/utils/ocp_itti/intertask_interface.h index 7d07724cc1..227e9b0b3e 100644 --- a/common/utils/ocp_itti/intertask_interface.h +++ b/common/utils/ocp_itti/intertask_interface.h @@ -233,6 +233,11 @@ typedef struct IttiMsgText_s { #include //#include +#include +void *rrc_enb_process_itti_msg(void *); +#include +#include + /* static const char *const messages_definition_xml = { #include diff --git a/openair2/COMMON/gtpv1_u_messages_def.h b/openair2/COMMON/gtpv1_u_messages_def.h index 9cc41a70ea..27723eec15 100644 --- a/openair2/COMMON/gtpv1_u_messages_def.h +++ b/openair2/COMMON/gtpv1_u_messages_def.h @@ -25,3 +25,4 @@ MESSAGE_DEF(GTPV1U_ENB_DELETE_TUNNEL_REQ, MESSAGE_PRIORITY_MED, gtpv1u_enb_del MESSAGE_DEF(GTPV1U_ENB_DELETE_TUNNEL_RESP, MESSAGE_PRIORITY_MED, gtpv1u_enb_delete_tunnel_resp_t, Gtpv1uDeleteTunnelResp) MESSAGE_DEF(GTPV1U_ENB_TUNNEL_DATA_IND, MESSAGE_PRIORITY_MED, gtpv1u_enb_tunnel_data_ind_t, Gtpv1uTunnelDataInd) MESSAGE_DEF(GTPV1U_ENB_TUNNEL_DATA_REQ, MESSAGE_PRIORITY_MED, gtpv1u_enb_tunnel_data_req_t, Gtpv1uTunnelDataReq) +MESSAGE_DEF(GTPV1U_ENB_S1_REQ, MESSAGE_PRIORITY_MED, Gtpv1uS1Req, gtpv1uS1Req) diff --git a/openair2/COMMON/gtpv1_u_messages_types.h b/openair2/COMMON/gtpv1_u_messages_types.h index 4d09062beb..0118a78f6d 100644 --- a/openair2/COMMON/gtpv1_u_messages_types.h +++ b/openair2/COMMON/gtpv1_u_messages_types.h @@ -33,6 +33,7 @@ #define GTPV1U_ENB_DELETE_TUNNEL_RESP(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uDeleteTunnelResp #define GTPV1U_ENB_TUNNEL_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uTunnelDataInd #define GTPV1U_ENB_TUNNEL_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uTunnelDataReq +#define GTPV1U_ENB_S1_REQ(mSGpTR) (mSGpTR)->ittiMsg.gtpv1uS1Req #define GTPV1U_ALL_TUNNELS_TEID (teid_t)0xFFFFFFFF @@ -98,4 +99,8 @@ typedef struct gtpv1u_enb_tunnel_data_req_s { rb_id_t rab_id; } gtpv1u_enb_tunnel_data_req_t; +typedef struct { + in_addr_t enb_ip_address_for_S1u_S12_S4_up; + tcp_udp_port_t enb_port_for_S1u_S12_S4_up; +} Gtpv1uS1Req; #endif /* GTPV1_U_MESSAGES_TYPES_H_ */ diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 6d9b2edf82..1edc188660 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -36,13 +36,13 @@ #include "UTIL/OTG/otg.h" #include "UTIL/OTG/otg_externs.h" #if defined(ENABLE_ITTI) -# include "intertask_interface.h" -# if defined(ENABLE_USE_MME) -# include "s1ap_eNB.h" -# include "sctp_eNB_task.h" -# else -# define EPC_MODE_ENABLED 0 -# endif + #include "intertask_interface.h" + #if defined(ENABLE_USE_MME) + #include "s1ap_eNB.h" + #include "sctp_eNB_task.h" + #else + #define EPC_MODE_ENABLED 0 + #endif #endif #include "sctp_default_values.h" #include "SystemInformationBlockType2.h" @@ -62,104 +62,97 @@ extern uint16_t sf_ahead; -void RCconfig_flexran() -{ +void RCconfig_flexran() { uint16_t i; uint16_t num_enbs; char aprefix[MAX_OPTNAME_SIZE*2 + 8]; /* this will possibly truncate the cell id (RRC assumes int32_t). - * Both Nid_cell and enb_id are signed in RRC case, but we use unsigned for - * the bitshifting to work properly */ + Both Nid_cell and enb_id are signed in RRC case, but we use unsigned for + the bitshifting to work properly */ int32_t Nid_cell = 0; uint16_t Nid_cell_tr = 0; uint32_t enb_id = 0; - /* - * the only reason for all these variables is, that they are "hard-encoded" - * into the CCPARAMS_DESC macro and we need it for the Nid_cell variable ... - */ + the only reason for all these variables is, that they are "hard-encoded" + into the CCPARAMS_DESC macro and we need it for the Nid_cell variable ... + */ char *frame_type, *prefix_type, *pbch_repetition, *prach_high_speed, - *pusch_hoppingMode, *pusch_enable64QAM, *pusch_groupHoppingEnabled, - *pusch_sequenceHoppingEnabled, *phich_duration, *phich_resource, - *srs_enable, *srs_ackNackST, *srs_MaxUpPts, *pusch_alpha, - *pucch_deltaF_Format1, *pucch_deltaF_Format1b, *pucch_deltaF_Format2, - *pucch_deltaF_Format2a, *pucch_deltaF_Format2b, - *rach_preamblesGroupAConfig, *rach_messagePowerOffsetGroupB, *pcch_nB; + *pusch_hoppingMode, *pusch_enable64QAM, *pusch_groupHoppingEnabled, + *pusch_sequenceHoppingEnabled, *phich_duration, *phich_resource, + *srs_enable, *srs_ackNackST, *srs_MaxUpPts, *pusch_alpha, + *pucch_deltaF_Format1, *pucch_deltaF_Format1b, *pucch_deltaF_Format2, + *pucch_deltaF_Format2a, *pucch_deltaF_Format2b, + *rach_preamblesGroupAConfig, *rach_messagePowerOffsetGroupB, *pcch_nB; long long int downlink_frequency; int32_t tdd_config, tdd_config_s, eutra_band, uplink_frequency_offset, - Nid_cell_mbsfn, N_RB_DL, nb_antenna_ports, prach_root, prach_config_index, - prach_zero_correlation, prach_freq_offset, pucch_delta_shift, - pucch_nRB_CQI, pucch_nCS_AN, pucch_n1_AN, pdsch_referenceSignalPower, - pdsch_p_b, pusch_n_SB, pusch_hoppingOffset, pusch_groupAssignment, - pusch_nDMRS1, srs_BandwidthConfig, srs_SubframeConfig, pusch_p0_Nominal, - pucch_p0_Nominal, msg3_delta_Preamble, rach_numberOfRA_Preambles, - rach_sizeOfRA_PreamblesGroupA, rach_messageSizeGroupA, - rach_powerRampingStep, rach_preambleInitialReceivedTargetPower, - rach_preambleTransMax, rach_raResponseWindowSize, - rach_macContentionResolutionTimer, rach_maxHARQ_Msg3Tx, - pcch_defaultPagingCycle, bcch_modificationPeriodCoeff, - ue_TimersAndConstants_t300, ue_TimersAndConstants_t301, - ue_TimersAndConstants_t310, ue_TimersAndConstants_t311, - ue_TimersAndConstants_n310, ue_TimersAndConstants_n311, - ue_TransmissionMode, ue_multiple_max; - - const char* rxPool_sc_CP_Len; - const char* rxPool_sc_Period; - const char* rxPool_data_CP_Len; + Nid_cell_mbsfn, N_RB_DL, nb_antenna_ports, prach_root, prach_config_index, + prach_zero_correlation, prach_freq_offset, pucch_delta_shift, + pucch_nRB_CQI, pucch_nCS_AN, pucch_n1_AN, pdsch_referenceSignalPower, + pdsch_p_b, pusch_n_SB, pusch_hoppingOffset, pusch_groupAssignment, + pusch_nDMRS1, srs_BandwidthConfig, srs_SubframeConfig, pusch_p0_Nominal, + pucch_p0_Nominal, msg3_delta_Preamble, rach_numberOfRA_Preambles, + rach_sizeOfRA_PreamblesGroupA, rach_messageSizeGroupA, + rach_powerRampingStep, rach_preambleInitialReceivedTargetPower, + rach_preambleTransMax, rach_raResponseWindowSize, + rach_macContentionResolutionTimer, rach_maxHARQ_Msg3Tx, + pcch_defaultPagingCycle, bcch_modificationPeriodCoeff, + ue_TimersAndConstants_t300, ue_TimersAndConstants_t301, + ue_TimersAndConstants_t310, ue_TimersAndConstants_t311, + ue_TimersAndConstants_n310, ue_TimersAndConstants_n311, + ue_TransmissionMode, ue_multiple_max; + const char *rxPool_sc_CP_Len; + const char *rxPool_sc_Period; + const char *rxPool_data_CP_Len; libconfig_int rxPool_ResourceConfig_prb_Num; libconfig_int rxPool_ResourceConfig_prb_Start; libconfig_int rxPool_ResourceConfig_prb_End; - const char* rxPool_ResourceConfig_offsetIndicator_present; + const char *rxPool_ResourceConfig_offsetIndicator_present; libconfig_int rxPool_ResourceConfig_offsetIndicator_choice; - const char* rxPool_ResourceConfig_subframeBitmap_present; - char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf; + const char *rxPool_ResourceConfig_subframeBitmap_present; + char *rxPool_ResourceConfig_subframeBitmap_choice_bs_buf; libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_size; libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused; - //SIB19 //for discRxPool - const char* discRxPool_cp_Len; - const char* discRxPool_discPeriod; + const char *discRxPool_cp_Len; + const char *discRxPool_discPeriod; libconfig_int discRxPool_numRetx; libconfig_int discRxPool_numRepetition; libconfig_int discRxPool_ResourceConfig_prb_Num; libconfig_int discRxPool_ResourceConfig_prb_Start; libconfig_int discRxPool_ResourceConfig_prb_End; - const char* discRxPool_ResourceConfig_offsetIndicator_present; + const char *discRxPool_ResourceConfig_offsetIndicator_present; libconfig_int discRxPool_ResourceConfig_offsetIndicator_choice; - const char* discRxPool_ResourceConfig_subframeBitmap_present; - char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf; + const char *discRxPool_ResourceConfig_subframeBitmap_present; + char *discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf; libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_size; libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused; - //for discRxPoolPS - const char* discRxPoolPS_cp_Len; - const char* discRxPoolPS_discPeriod; + const char *discRxPoolPS_cp_Len; + const char *discRxPoolPS_discPeriod; libconfig_int discRxPoolPS_numRetx; libconfig_int discRxPoolPS_numRepetition; libconfig_int discRxPoolPS_ResourceConfig_prb_Num; libconfig_int discRxPoolPS_ResourceConfig_prb_Start; libconfig_int discRxPoolPS_ResourceConfig_prb_End; - const char* discRxPoolPS_ResourceConfig_offsetIndicator_present; + const char *discRxPoolPS_ResourceConfig_offsetIndicator_present; libconfig_int discRxPoolPS_ResourceConfig_offsetIndicator_choice; - const char* discRxPoolPS_ResourceConfig_subframeBitmap_present; - char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf; + const char *discRxPoolPS_ResourceConfig_subframeBitmap_present; + char *discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf; libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size; libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused; - /* get number of eNBs */ paramdef_t ENBSParams[] = ENBSPARAMS_DESC; config_get(ENBSParams, sizeof(ENBSParams)/sizeof(paramdef_t), NULL); num_enbs = ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt; - /* for eNB ID */ paramdef_t ENBParams[] = ENBPARAMS_DESC; paramlist_def_t ENBParamList = {ENB_CONFIG_STRING_ENB_LIST, NULL, 0}; - /* for Nid_cell */ checkedparam_t config_check_CCparams[] = CCPARAMS_CHECK; paramdef_t CCsParams[] = CCPARAMS_DESC; paramlist_def_t CCsParamList = {ENB_CONFIG_STRING_COMPONENT_CARRIERS, NULL, 0}; + /* map parameter checking array instances to parameter definition array instances */ for (int I = 0; I < (sizeof(CCsParams) / sizeof(paramdef_t)); I++) { CCsParams[I].chkPptr = &(config_check_CCparams[I]); @@ -169,11 +162,11 @@ void RCconfig_flexran() config_get(flexranParams, sizeof(flexranParams)/sizeof(paramdef_t), CONFIG_STRING_NETWORK_CONTROLLER_CONFIG); if (!RC.flexran) { - RC.flexran = calloc(num_enbs, sizeof(flexran_agent_info_t*)); + RC.flexran = calloc(num_enbs, sizeof(flexran_agent_info_t *)); AssertFatal(RC.flexran, "can't ALLOCATE %zu Bytes for %d flexran agent info with size %zu\n", - num_enbs * sizeof(flexran_agent_info_t*), - num_enbs, sizeof(flexran_agent_info_t*)); + num_enbs * sizeof(flexran_agent_info_t *), + num_enbs, sizeof(flexran_agent_info_t *)); } for (i = 0; i < num_enbs; i++) { @@ -183,31 +176,34 @@ void RCconfig_flexran() sizeof(flexran_agent_info_t), i + 1, num_enbs); /* if config says "yes", enable Agent, in all other cases it's like "no" */ RC.flexran[i]->enabled = strcasecmp(*(flexranParams[FLEXRAN_ENABLED].strptr), "yes") == 0; + /* if not enabled, simply skip the rest, it is not needed anyway */ if (!RC.flexran[i]->enabled) continue; + RC.flexran[i]->interface_name = strdup(*(flexranParams[FLEXRAN_INTERFACE_NAME_IDX].strptr)); //inet_ntop(AF_INET, &(enb_properties->properties[mod_id]->flexran_agent_ipv4_address), in_ip, INET_ADDRSTRLEN); RC.flexran[i]->remote_ipv4_addr = strdup(*(flexranParams[FLEXRAN_IPV4_ADDRESS_IDX].strptr)); RC.flexran[i]->remote_port = *(flexranParams[FLEXRAN_PORT_IDX].uptr); RC.flexran[i]->cache_name = strdup(*(flexranParams[FLEXRAN_CACHE_IDX].strptr)); RC.flexran[i]->node_ctrl_state = strcasecmp(*(flexranParams[FLEXRAN_AWAIT_RECONF_IDX].strptr), "yes") == 0 ? ENB_WAIT : ENB_NORMAL_OPERATION; - config_getlist(&ENBParamList, ENBParams, sizeof(ENBParams)/sizeof(paramdef_t),NULL); + /* eNB ID from configuration, as read in by RCconfig_RRC() */ if (!ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr) { // Calculate a default eNB ID if (EPC_MODE_ENABLED) - enb_id = i + (s1ap_generate_eNB_id () & 0xFFFF8); + enb_id = i + (s1ap_generate_eNB_id () & 0xFFFF8); else - enb_id = i; + enb_id = i; } else { - enb_id = *(ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr); + enb_id = *(ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr); } /* cell ID */ sprintf(aprefix, "%s.[%i]", ENB_CONFIG_STRING_ENB_LIST, i); config_getlist(&CCsParamList, NULL, 0, aprefix); + if (CCsParamList.numelt > 0) { sprintf(aprefix, "%s.[%i].%s.[%i]", ENB_CONFIG_STRING_ENB_LIST, i, ENB_CONFIG_STRING_COMPONENT_CARRIERS, 0); config_get(CCsParams, sizeof(CCsParams)/sizeof(paramdef_t), aprefix); @@ -216,13 +212,12 @@ void RCconfig_flexran() RC.flexran[i]->mod_id = i; RC.flexran[i]->agent_id = (((uint64_t)i) << 48) | (((uint64_t)enb_id) << 16) | ((uint64_t)Nid_cell_tr); - /* assume for the moment the monolithic case, i.e. agent can provide - * information for all layers */ + information for all layers */ RC.flexran[i]->capability_mask = FLEXRAN_CAP_LOPHY | FLEXRAN_CAP_HIPHY - | FLEXRAN_CAP_LOMAC | FLEXRAN_CAP_HIMAC - | FLEXRAN_CAP_RLC | FLEXRAN_CAP_PDCP - | FLEXRAN_CAP_SDAP | FLEXRAN_CAP_RRC; + | FLEXRAN_CAP_LOMAC | FLEXRAN_CAP_HIMAC + | FLEXRAN_CAP_RLC | FLEXRAN_CAP_PDCP + | FLEXRAN_CAP_SDAP | FLEXRAN_CAP_RRC; } } @@ -232,29 +227,29 @@ void RCconfig_L1(void) { paramdef_t L1_Params[] = L1PARAMS_DESC; paramlist_def_t L1_ParamList = {CONFIG_STRING_L1_LIST,NULL,0}; - if (RC.eNB == NULL) { - RC.eNB = (PHY_VARS_eNB ***)malloc((1+NUMBER_OF_eNB_MAX)*sizeof(PHY_VARS_eNB**)); + RC.eNB = (PHY_VARS_eNB ***)malloc((1+NUMBER_OF_eNB_MAX)*sizeof(PHY_VARS_eNB **)); LOG_I(PHY,"RC.eNB = %p\n",RC.eNB); - memset(RC.eNB,0,(1+NUMBER_OF_eNB_MAX)*sizeof(PHY_VARS_eNB**)); + memset(RC.eNB,0,(1+NUMBER_OF_eNB_MAX)*sizeof(PHY_VARS_eNB **)); RC.nb_L1_CC = malloc((1+RC.nb_L1_inst)*sizeof(int)); } config_getlist( &L1_ParamList,L1_Params,sizeof(L1_Params)/sizeof(paramdef_t), NULL); + if (L1_ParamList.numelt > 0) { for (j = 0; j < RC.nb_L1_inst; j++) { RC.nb_L1_CC[j] = *(L1_ParamList.paramarray[j][L1_CC_IDX].uptr); if (RC.eNB[j] == NULL) { - RC.eNB[j] = (PHY_VARS_eNB **)malloc((1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB*)); - LOG_I(PHY,"RC.eNB[%d] = %p\n",j,RC.eNB[j]); - memset(RC.eNB[j],0,(1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB*)); + RC.eNB[j] = (PHY_VARS_eNB **)malloc((1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB *)); + LOG_I(PHY,"RC.eNB[%d] = %p\n",j,RC.eNB[j]); + memset(RC.eNB[j],0,(1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB *)); } - for (i=0;iMod_id = j; RC.eNB[j][i]->CC_id = i; @@ -262,63 +257,50 @@ void RCconfig_L1(void) { } if (strcmp(*(L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_mac") == 0) { - sf_ahead = 4; // Need 4 subframe gap between RX and TX - } - else if (strcmp(*(L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "nfapi") == 0) { + } else if (strcmp(*(L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "nfapi") == 0) { RC.eNB[j][0]->eth_params_n.local_if_name = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_IF_NAME_IDX].strptr)); - RC.eNB[j][0]->eth_params_n.my_addr = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_ADDRESS_IDX].strptr)); - RC.eNB[j][0]->eth_params_n.remote_addr = strdup(*(L1_ParamList.paramarray[j][L1_REMOTE_N_ADDRESS_IDX].strptr)); - RC.eNB[j][0]->eth_params_n.my_portc = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTC_IDX].iptr); - RC.eNB[j][0]->eth_params_n.remote_portc = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTC_IDX].iptr); - RC.eNB[j][0]->eth_params_n.my_portd = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTD_IDX].iptr); - RC.eNB[j][0]->eth_params_n.remote_portd = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTD_IDX].iptr); - RC.eNB[j][0]->eth_params_n.transp_preference = ETH_UDP_MODE; - + RC.eNB[j][0]->eth_params_n.my_addr = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_ADDRESS_IDX].strptr)); + RC.eNB[j][0]->eth_params_n.remote_addr = strdup(*(L1_ParamList.paramarray[j][L1_REMOTE_N_ADDRESS_IDX].strptr)); + RC.eNB[j][0]->eth_params_n.my_portc = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTC_IDX].iptr); + RC.eNB[j][0]->eth_params_n.remote_portc = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTC_IDX].iptr); + RC.eNB[j][0]->eth_params_n.my_portd = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTD_IDX].iptr); + RC.eNB[j][0]->eth_params_n.remote_portd = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTD_IDX].iptr); + RC.eNB[j][0]->eth_params_n.transp_preference = ETH_UDP_MODE; sf_ahead = 2; // Cannot cope with 4 subframes betweem RX and TX - set it to 2 - RC.nb_macrlc_inst = 1; // This is used by mac_top_init_eNB() - // This is used by init_eNB_afterRU() RC.nb_CC = (int *)malloc((1+RC.nb_inst)*sizeof(int)); RC.nb_CC[0]=1; - RC.nb_inst =1; // DJP - feptx_prec uses num_eNB but phy_init_RU uses nb_inst - LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_inst=1 this is because phy_init_RU() uses that to index and not RC.num_eNB - why the 2 similar variables?\n", __FUNCTION__); LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_CC[0]=%d for init_eNB_afterRU()\n", __FUNCTION__, RC.nb_CC[0]); LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_macrlc_inst:%d because used by mac_top_init_eNB()\n", __FUNCTION__, RC.nb_macrlc_inst); - //mac_top_init_eNB(); - configure_nfapi_pnf(RC.eNB[j][0]->eth_params_n.remote_addr, RC.eNB[j][0]->eth_params_n.remote_portc, RC.eNB[j][0]->eth_params_n.my_addr, RC.eNB[j][0]->eth_params_n.my_portd, RC.eNB[j][0]->eth_params_n .remote_portd); + } else { // other midhaul } - else { // other midhaul - } }// j=0..num_inst + printf("Initializing northbound interface for L1\n"); l1_north_init_eNB(); } else { - LOG_I(PHY,"No " CONFIG_STRING_L1_LIST " configuration found"); - + LOG_I(PHY,"No " CONFIG_STRING_L1_LIST " configuration found"); // DJP need to create some structures for VNF - j = 0; - RC.nb_L1_CC = malloc((1+RC.nb_L1_inst)*sizeof(int)); // DJP - 1 lot then??? - RC.nb_L1_CC[j]=1; // DJP - hmmm if (RC.eNB[j] == NULL) { - RC.eNB[j] = (PHY_VARS_eNB **)malloc((1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB**)); + RC.eNB[j] = (PHY_VARS_eNB **)malloc((1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB **)); LOG_I(PHY,"RC.eNB[%d] = %p\n",j,RC.eNB[j]); - memset(RC.eNB[j],0,(1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB***)); + memset(RC.eNB[j],0,(1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB ***)); } - for (i=0;iMod_id = j; RC.eNB[j][i]->CC_id = i; @@ -329,20 +311,16 @@ void RCconfig_L1(void) { void RCconfig_macrlc() { int j; - - paramdef_t MacRLC_Params[] = MACRLCPARAMS_DESC; paramlist_def_t MacRLC_ParamList = {CONFIG_STRING_MACRLC_LIST,NULL,0}; + config_getlist( &MacRLC_ParamList,MacRLC_Params,sizeof(MacRLC_Params)/sizeof(paramdef_t), NULL); - config_getlist( &MacRLC_ParamList,MacRLC_Params,sizeof(MacRLC_Params)/sizeof(paramdef_t), NULL); - if ( MacRLC_ParamList.numelt > 0) { + RC.nb_macrlc_inst=MacRLC_ParamList.numelt; + mac_top_init_eNB(); + RC.nb_mac_CC = (int *)malloc(RC.nb_macrlc_inst*sizeof(int)); - RC.nb_macrlc_inst=MacRLC_ParamList.numelt; - mac_top_init_eNB(); - RC.nb_mac_CC = (int*)malloc(RC.nb_macrlc_inst*sizeof(int)); - - for (j=0;jpuSch10xSnr = *(MacRLC_ParamList.paramarray[j][MACRLC_PUSCH10xSNR_IDX ].iptr); RC.mac[j]->puCch10xSnr = *(MacRLC_ParamList.paramarray[j][MACRLC_PUCCH10xSNR_IDX ].iptr); RC.nb_mac_CC[j] = *(MacRLC_ParamList.paramarray[j][MACRLC_CC_IDX].iptr); @@ -350,75 +328,65 @@ void RCconfig_macrlc() { //printf("PHY_TEST = %d,%d\n", RC.mac[j]->phy_test, j); if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_RRC") == 0) { - // check number of instances is same as RRC/PDCP - + // check number of instances is same as RRC/PDCP } else if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "cudu") == 0) { - RC.mac[j]->eth_params_n.local_if_name = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_IF_NAME_IDX].strptr)); - RC.mac[j]->eth_params_n.my_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_ADDRESS_IDX].strptr)); - RC.mac[j]->eth_params_n.remote_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_ADDRESS_IDX].strptr)); - RC.mac[j]->eth_params_n.my_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_PORTC_IDX].iptr); - RC.mac[j]->eth_params_n.remote_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTC_IDX].iptr); - RC.mac[j]->eth_params_n.my_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_PORTD_IDX].iptr); - RC.mac[j]->eth_params_n.remote_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTD_IDX].iptr);; - RC.mac[j]->eth_params_n.transp_preference = ETH_UDP_MODE; + RC.mac[j]->eth_params_n.local_if_name = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_IF_NAME_IDX].strptr)); + RC.mac[j]->eth_params_n.my_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_ADDRESS_IDX].strptr)); + RC.mac[j]->eth_params_n.remote_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_ADDRESS_IDX].strptr)); + RC.mac[j]->eth_params_n.my_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_PORTC_IDX].iptr); + RC.mac[j]->eth_params_n.remote_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTC_IDX].iptr); + RC.mac[j]->eth_params_n.my_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_PORTD_IDX].iptr); + RC.mac[j]->eth_params_n.remote_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTD_IDX].iptr);; + RC.mac[j]->eth_params_n.transp_preference = ETH_UDP_MODE; } else { // other midhaul - AssertFatal(1==0,"MACRLC %d: %s unknown northbound midhaul\n",j, *(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr)); - } + AssertFatal(1==0,"MACRLC %d: %s unknown northbound midhaul\n",j, *(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr)); + } if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr), "local_L1") == 0) { - - } else if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr), "nfapi") == 0) { - RC.mac[j]->eth_params_s.local_if_name = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_IF_NAME_IDX].strptr)); - RC.mac[j]->eth_params_s.my_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_ADDRESS_IDX].strptr)); - RC.mac[j]->eth_params_s.remote_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_ADDRESS_IDX].strptr)); - RC.mac[j]->eth_params_s.my_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_PORTC_IDX].iptr); - RC.mac[j]->eth_params_s.remote_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_PORTC_IDX].iptr); - RC.mac[j]->eth_params_s.my_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_PORTD_IDX].iptr); - RC.mac[j]->eth_params_s.remote_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_PORTD_IDX].iptr); - RC.mac[j]->eth_params_s.transp_preference = ETH_UDP_MODE; - + RC.mac[j]->eth_params_s.local_if_name = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_IF_NAME_IDX].strptr)); + RC.mac[j]->eth_params_s.my_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_ADDRESS_IDX].strptr)); + RC.mac[j]->eth_params_s.remote_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_ADDRESS_IDX].strptr)); + RC.mac[j]->eth_params_s.my_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_PORTC_IDX].iptr); + RC.mac[j]->eth_params_s.remote_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_PORTC_IDX].iptr); + RC.mac[j]->eth_params_s.my_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_PORTD_IDX].iptr); + RC.mac[j]->eth_params_s.remote_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_PORTD_IDX].iptr); + RC.mac[j]->eth_params_s.transp_preference = ETH_UDP_MODE; sf_ahead = 2; // Cannot cope with 4 subframes betweem RX and TX - set it to 2 - printf("**************** vnf_port:%d\n", RC.mac[j]->eth_params_s.my_portc); configure_nfapi_vnf(RC.mac[j]->eth_params_s.my_addr, RC.mac[j]->eth_params_s.my_portc); printf("**************** RETURNED FROM configure_nfapi_vnf() vnf_port:%d\n", RC.mac[j]->eth_params_s.my_portc); } else { // other midhaul - AssertFatal(1==0,"MACRLC %d: %s unknown southbound midhaul\n",j,*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr)); + AssertFatal(1==0,"MACRLC %d: %s unknown southbound midhaul\n",j,*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr)); } - if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr), "default") == 0){ - global_scheduler_mode=SCHED_MODE_DEFAULT; - printf("sched mode = default %d [%s]\n",global_scheduler_mode,*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr)); - }else if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr), "fairRR") == 0){ - global_scheduler_mode=SCHED_MODE_FAIR_RR; - printf("sched mode = fairRR %d [%s]\n",global_scheduler_mode,*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr)); - }else{ - global_scheduler_mode=SCHED_MODE_DEFAULT; - printf("sched mode = default %d [%s]\n",global_scheduler_mode,*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr)); + + if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr), "default") == 0) { + global_scheduler_mode=SCHED_MODE_DEFAULT; + printf("sched mode = default %d [%s]\n",global_scheduler_mode,*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr)); + } else if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr), "fairRR") == 0) { + global_scheduler_mode=SCHED_MODE_FAIR_RR; + printf("sched mode = fairRR %d [%s]\n",global_scheduler_mode,*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr)); + } else { + global_scheduler_mode=SCHED_MODE_DEFAULT; + printf("sched mode = default %d [%s]\n",global_scheduler_mode,*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr)); } }// j=0..num_inst } else {// MacRLC_ParamList.numelt > 0 - AssertFatal (0, - "No " CONFIG_STRING_MACRLC_LIST " configuration found"); + AssertFatal (0, + "No " CONFIG_STRING_MACRLC_LIST " configuration found"); } } - -int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { +int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { int num_enbs = 0; - int j,k = 0; int32_t enb_id = 0; int nb_cc = 0; - - - char* frame_type = NULL; + char *frame_type = NULL; int32_t tdd_config = 0; int32_t tdd_config_s = 0; - - char* prefix_type = NULL; - char* pbch_repetition = NULL; - + char *prefix_type = NULL; + char *pbch_repetition = NULL; int32_t eutra_band = 0; long long int downlink_frequency = 0; int32_t uplink_frequency_offset = 0; @@ -426,51 +394,50 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { int32_t Nid_cell_mbsfn = 0; int32_t N_RB_DL = 0; int32_t nb_antenna_ports = 0; - int32_t prach_root = 0; int32_t prach_config_index = 0; - char* prach_high_speed = NULL; + char *prach_high_speed = NULL; int32_t prach_zero_correlation = 0; int32_t prach_freq_offset = 0; int32_t pucch_delta_shift = 0; int32_t pucch_nRB_CQI = 0; int32_t pucch_nCS_AN = 0; -//#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) + //#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) int32_t pucch_n1_AN = 0; -//#endif + //#endif int32_t pdsch_referenceSignalPower = 0; int32_t pdsch_p_b = 0; int32_t pusch_n_SB = 0; - char * pusch_hoppingMode = NULL; + char *pusch_hoppingMode = NULL; int32_t pusch_hoppingOffset = 0; - char* pusch_enable64QAM = NULL; - char* pusch_groupHoppingEnabled = NULL; + char *pusch_enable64QAM = NULL; + char *pusch_groupHoppingEnabled = NULL; int32_t pusch_groupAssignment = 0; - char* pusch_sequenceHoppingEnabled = NULL; + char *pusch_sequenceHoppingEnabled = NULL; int32_t pusch_nDMRS1 = 0; - char* phich_duration = NULL; - char* phich_resource = NULL; - char* srs_enable = NULL; + char *phich_duration = NULL; + char *phich_resource = NULL; + char *srs_enable = NULL; int32_t srs_BandwidthConfig = 0; int32_t srs_SubframeConfig = 0; - char* srs_ackNackST = NULL; - char* srs_MaxUpPts = NULL; + char *srs_ackNackST = NULL; + char *srs_MaxUpPts = NULL; int32_t pusch_p0_Nominal = 0; - char* pusch_alpha = NULL; + char *pusch_alpha = NULL; int32_t pucch_p0_Nominal = 0; int32_t msg3_delta_Preamble = 0; //int32_t ul_CyclicPrefixLength = 0; - char* pucch_deltaF_Format1 = NULL; + char *pucch_deltaF_Format1 = NULL; //const char* pucch_deltaF_Format1a = NULL; - char* pucch_deltaF_Format1b = NULL; - char* pucch_deltaF_Format2 = NULL; - char* pucch_deltaF_Format2a = NULL; - char* pucch_deltaF_Format2b = NULL; + char *pucch_deltaF_Format1b = NULL; + char *pucch_deltaF_Format2 = NULL; + char *pucch_deltaF_Format2a = NULL; + char *pucch_deltaF_Format2b = NULL; int32_t rach_numberOfRA_Preambles = 0; - char* rach_preamblesGroupAConfig = NULL; + char *rach_preamblesGroupAConfig = NULL; int32_t rach_sizeOfRA_PreamblesGroupA = 0; int32_t rach_messageSizeGroupA = 0; - char* rach_messagePowerOffsetGroupB = NULL; + char *rach_messagePowerOffsetGroupB = NULL; int32_t rach_powerRampingStep = 0; int32_t rach_preambleInitialReceivedTargetPower = 0; int32_t rach_preambleTransMax = 0; @@ -478,7 +445,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { int32_t rach_macContentionResolutionTimer = 0; int32_t rach_maxHARQ_Msg3Tx = 0; int32_t pcch_defaultPagingCycle = 0; - char* pcch_nB = NULL; + char *pcch_nB = NULL; int32_t bcch_modificationPeriodCoeff = 0; int32_t ue_TimersAndConstants_t300 = 0; int32_t ue_TimersAndConstants_t301 = 0; @@ -487,1882 +454,1744 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { int32_t ue_TimersAndConstants_n310 = 0; int32_t ue_TimersAndConstants_n311 = 0; int32_t ue_TransmissionMode = 0; - int32_t ue_multiple_max = 0; - //TTN - for D2D //SIB18 - const char* rxPool_sc_CP_Len = NULL; - const char* rxPool_sc_Period = NULL; - const char* rxPool_data_CP_Len = NULL; + const char *rxPool_sc_CP_Len = NULL; + const char *rxPool_sc_Period = NULL; + const char *rxPool_data_CP_Len = NULL; libconfig_int rxPool_ResourceConfig_prb_Num = 0; libconfig_int rxPool_ResourceConfig_prb_Start = 0; libconfig_int rxPool_ResourceConfig_prb_End = 0; - const char* rxPool_ResourceConfig_offsetIndicator_present = NULL; + const char *rxPool_ResourceConfig_offsetIndicator_present = NULL; libconfig_int rxPool_ResourceConfig_offsetIndicator_choice = 0; - const char* rxPool_ResourceConfig_subframeBitmap_present = NULL; - char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = NULL; + const char *rxPool_ResourceConfig_subframeBitmap_present = NULL; + char *rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = NULL; libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 0; libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; //SIB19 //For discRxPool - const char* discRxPool_cp_Len = NULL; - const char* discRxPool_discPeriod = NULL; + const char *discRxPool_cp_Len = NULL; + const char *discRxPool_discPeriod = NULL; libconfig_int discRxPool_numRetx = 0; libconfig_int discRxPool_numRepetition = 0; - libconfig_int discRxPool_ResourceConfig_prb_Num = 0; libconfig_int discRxPool_ResourceConfig_prb_Start = 0; libconfig_int discRxPool_ResourceConfig_prb_End = 0; - const char* discRxPool_ResourceConfig_offsetIndicator_present = NULL; + const char *discRxPool_ResourceConfig_offsetIndicator_present = NULL; libconfig_int discRxPool_ResourceConfig_offsetIndicator_choice = 0; - const char* discRxPool_ResourceConfig_subframeBitmap_present = NULL; - char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = NULL; + const char *discRxPool_ResourceConfig_subframeBitmap_present = NULL; + char *discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = NULL; libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 0; libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; //For discRxPoolPS - const char* discRxPoolPS_cp_Len = NULL; - const char* discRxPoolPS_discPeriod = NULL; + const char *discRxPoolPS_cp_Len = NULL; + const char *discRxPoolPS_discPeriod = NULL; libconfig_int discRxPoolPS_numRetx = 0; libconfig_int discRxPoolPS_numRepetition = 0; - libconfig_int discRxPoolPS_ResourceConfig_prb_Num = 0; libconfig_int discRxPoolPS_ResourceConfig_prb_Start = 0; libconfig_int discRxPoolPS_ResourceConfig_prb_End = 0; - const char* discRxPoolPS_ResourceConfig_offsetIndicator_present = NULL; + const char *discRxPoolPS_ResourceConfig_offsetIndicator_present = NULL; libconfig_int discRxPoolPS_ResourceConfig_offsetIndicator_choice = 0; - const char* discRxPoolPS_ResourceConfig_subframeBitmap_present = NULL; - char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf = NULL; + const char *discRxPoolPS_ResourceConfig_subframeBitmap_present = NULL; + char *discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf = NULL; libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size = 0; libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; - int32_t srb1_timer_poll_retransmit = 0; int32_t srb1_timer_reordering = 0; int32_t srb1_timer_status_prohibit = 0; int32_t srb1_poll_pdu = 0; int32_t srb1_poll_byte = 0; int32_t srb1_max_retx_threshold = 0; - int32_t my_int; - - // for no gcc warnings + // for no gcc warnings (void)my_int; paramdef_t ENBSParams[] = ENBSPARAMS_DESC; - paramdef_t ENBParams[] = ENBPARAMS_DESC; - paramlist_def_t ENBParamList = {ENB_CONFIG_STRING_ENB_LIST,NULL,0}; - + paramlist_def_t ENBParamList = {ENB_CONFIG_STRING_ENB_LIST,NULL,0}; checkedparam_t config_check_CCparams[] = CCPARAMS_CHECK; paramdef_t CCsParams[] = CCPARAMS_DESC; paramlist_def_t CCsParamList = {ENB_CONFIG_STRING_COMPONENT_CARRIERS,NULL,0}; - - paramdef_t SRB1Params[] = SRB1PARAMS_DESC; + paramdef_t SRB1Params[] = SRB1PARAMS_DESC; -/* map parameter checking array instances to parameter definition array instances */ + /* map parameter checking array instances to parameter definition array instances */ for (int I=0; I< ( sizeof(CCsParams)/ sizeof(paramdef_t) ) ; I++) { - CCsParams[I].chkPptr = &(config_check_CCparams[I]); + CCsParams[I].chkPptr = &(config_check_CCparams[I]); } -/* get global parameters, defined outside any section in the config file */ - - config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); + /* get global parameters, defined outside any section in the config file */ + config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); num_enbs = ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt; AssertFatal (i0) { // Output a list of all eNBs. - config_getlist( &ENBParamList,ENBParams,sizeof(ENBParams)/sizeof(paramdef_t),NULL); - - - - - if (ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr == NULL) { - // Calculate a default eNB ID - if (EPC_MODE_ENABLED) { - uint32_t hash; - - hash = s1ap_generate_eNB_id (); - enb_id = i + (hash & 0xFFFF8); - } else { - enb_id = i; - } + config_getlist( &ENBParamList,ENBParams,sizeof(ENBParams)/sizeof(paramdef_t),NULL); + + if (ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr == NULL) { + // Calculate a default eNB ID + if (EPC_MODE_ENABLED) { + uint32_t hash; + hash = s1ap_generate_eNB_id (); + enb_id = i + (hash & 0xFFFF8); } else { - enb_id = *(ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr); + enb_id = i; } + } else { + enb_id = *(ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr); + } - - printf("RRC %d: Southbound Transport %s\n",i,*(ENBParamList.paramarray[i][ENB_TRANSPORT_S_PREFERENCE_IDX].strptr)); - - if (strcmp(*(ENBParamList.paramarray[i][ENB_TRANSPORT_S_PREFERENCE_IDX].strptr), "local_mac") == 0) { + printf("RRC %d: Southbound Transport %s\n",i,*(ENBParamList.paramarray[i][ENB_TRANSPORT_S_PREFERENCE_IDX].strptr)); + if (strcmp(*(ENBParamList.paramarray[i][ENB_TRANSPORT_S_PREFERENCE_IDX].strptr), "local_mac") == 0) { + } else if (strcmp(*(ENBParamList.paramarray[i][ENB_TRANSPORT_S_PREFERENCE_IDX].strptr), "cudu") == 0) { + rrc->eth_params_s.local_if_name = strdup(*(ENBParamList.paramarray[i][ENB_LOCAL_S_IF_NAME_IDX].strptr)); + rrc->eth_params_s.my_addr = strdup(*(ENBParamList.paramarray[i][ENB_LOCAL_S_ADDRESS_IDX].strptr)); + rrc->eth_params_s.remote_addr = strdup(*(ENBParamList.paramarray[i][ENB_REMOTE_S_ADDRESS_IDX].strptr)); + rrc->eth_params_s.my_portc = *(ENBParamList.paramarray[i][ENB_LOCAL_S_PORTC_IDX].uptr); + rrc->eth_params_s.remote_portc = *(ENBParamList.paramarray[i][ENB_REMOTE_S_PORTC_IDX].uptr); + rrc->eth_params_s.my_portd = *(ENBParamList.paramarray[i][ENB_LOCAL_S_PORTD_IDX].uptr); + rrc->eth_params_s.remote_portd = *(ENBParamList.paramarray[i][ENB_REMOTE_S_PORTD_IDX].uptr); + rrc->eth_params_s.transp_preference = ETH_UDP_MODE; + } else { // other midhaul + } - } - else if (strcmp(*(ENBParamList.paramarray[i][ENB_TRANSPORT_S_PREFERENCE_IDX].strptr), "cudu") == 0) { - rrc->eth_params_s.local_if_name = strdup(*(ENBParamList.paramarray[i][ENB_LOCAL_S_IF_NAME_IDX].strptr)); - rrc->eth_params_s.my_addr = strdup(*(ENBParamList.paramarray[i][ENB_LOCAL_S_ADDRESS_IDX].strptr)); - rrc->eth_params_s.remote_addr = strdup(*(ENBParamList.paramarray[i][ENB_REMOTE_S_ADDRESS_IDX].strptr)); - rrc->eth_params_s.my_portc = *(ENBParamList.paramarray[i][ENB_LOCAL_S_PORTC_IDX].uptr); - rrc->eth_params_s.remote_portc = *(ENBParamList.paramarray[i][ENB_REMOTE_S_PORTC_IDX].uptr); - rrc->eth_params_s.my_portd = *(ENBParamList.paramarray[i][ENB_LOCAL_S_PORTD_IDX].uptr); - rrc->eth_params_s.remote_portd = *(ENBParamList.paramarray[i][ENB_REMOTE_S_PORTD_IDX].uptr); - rrc->eth_params_s.transp_preference = ETH_UDP_MODE; - } - - else { // other midhaul - } + // search if in active list - // search if in active list + for (k=0; k cell_type = CELL_MACRO_ENB; + } else if (strcmp(cell_type, "CELL_HOME_ENB") == 0) { + enb_properties_loc.properties[enb_properties_loc_index]->cell_type = CELL_HOME_ENB; + } else { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n", + lib_config_file_name_pP, i, cell_type); + } - - - - + enb_properties_loc.properties[enb_properties_loc_index]->eNB_name = strdup(enb_name); + */ + RRC_CONFIGURATION_REQ (msg_p).tac = (uint16_t)atoi( *(ENBParamList.paramarray[i][ENB_TRACKING_AREA_CODE_IDX].strptr) ); + RRC_CONFIGURATION_REQ (msg_p).mcc = (uint16_t)atoi( *(ENBParamList.paramarray[i][ENB_MOBILE_COUNTRY_CODE_IDX].strptr) ); + RRC_CONFIGURATION_REQ (msg_p).mnc = (uint16_t)atoi( *(ENBParamList.paramarray[i][ENB_MOBILE_NETWORK_CODE_IDX].strptr) ); + RRC_CONFIGURATION_REQ (msg_p).mnc_digit_length = strlen(*(ENBParamList.paramarray[i][ENB_MOBILE_NETWORK_CODE_IDX].strptr)); + AssertFatal((RRC_CONFIGURATION_REQ (msg_p).mnc_digit_length == 2) || + (RRC_CONFIGURATION_REQ (msg_p).mnc_digit_length == 3), + "BAD MNC DIGIT LENGTH %d", + RRC_CONFIGURATION_REQ (msg_p).mnc_digit_length); + // Parse optional physical parameters + sprintf(enbpath,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k), + config_getlist( &CCsParamList,NULL,0,enbpath); + LOG_I(RRC,"num component carriers %d \n",CCsParamList.numelt); - for (k=0; k 0) { + char ccspath[MAX_OPTNAME_SIZE*2 + 16]; - - RRC_CONFIGURATION_REQ (msg_p).cell_identity = enb_id; - - /* - if (strcmp(*(ENBParamList.paramarray[i][ENB_CELL_TYPE_IDX].strptr), "CELL_MACRO_ENB") == 0) { - enb_properties_loc.properties[enb_properties_loc_index]->cell_type = CELL_MACRO_ENB; - } else if (strcmp(cell_type, "CELL_HOME_ENB") == 0) { - enb_properties_loc.properties[enb_properties_loc_index]->cell_type = CELL_HOME_ENB; - } else { - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n", - lib_config_file_name_pP, i, cell_type); - } - - enb_properties_loc.properties[enb_properties_loc_index]->eNB_name = strdup(enb_name); - */ - RRC_CONFIGURATION_REQ (msg_p).tac = (uint16_t)atoi( *(ENBParamList.paramarray[i][ENB_TRACKING_AREA_CODE_IDX].strptr) ); - RRC_CONFIGURATION_REQ (msg_p).mcc = (uint16_t)atoi( *(ENBParamList.paramarray[i][ENB_MOBILE_COUNTRY_CODE_IDX].strptr) ); - RRC_CONFIGURATION_REQ (msg_p).mnc = (uint16_t)atoi( *(ENBParamList.paramarray[i][ENB_MOBILE_NETWORK_CODE_IDX].strptr) ); - RRC_CONFIGURATION_REQ (msg_p).mnc_digit_length = strlen(*(ENBParamList.paramarray[i][ENB_MOBILE_NETWORK_CODE_IDX].strptr)); - AssertFatal((RRC_CONFIGURATION_REQ (msg_p).mnc_digit_length == 2) || - (RRC_CONFIGURATION_REQ (msg_p).mnc_digit_length == 3), - "BAD MNC DIGIT LENGTH %d", - RRC_CONFIGURATION_REQ (msg_p).mnc_digit_length); - - - // Parse optional physical parameters - sprintf(enbpath,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k), - config_getlist( &CCsParamList,NULL,0,enbpath); - - LOG_I(RRC,"num component carriers %d \n",CCsParamList.numelt); - if ( CCsParamList.numelt> 0) { - char ccspath[MAX_OPTNAME_SIZE*2 + 16]; - - for (j = 0; j < CCsParamList.numelt ;j++) { + for (j = 0; j < CCsParamList.numelt ; j++) { + sprintf(ccspath,"%s.%s.[%i]",enbpath,ENB_CONFIG_STRING_COMPONENT_CARRIERS,j); + LOG_I(RRC, "enb_config::RCconfig_RRC() parameter number: %d, total number of parameters: %zd, ccspath: %s \n \n", j, sizeof(CCsParams)/sizeof(paramdef_t), ccspath); + config_get( CCsParams,sizeof(CCsParams)/sizeof(paramdef_t),ccspath); + //printf("Component carrier %d\n",component_carrier); + nb_cc++; + RRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = tdd_config; + AssertFatal (tdd_config <= TDD_Config__subframeAssignment_sa6, + "Failed to parse eNB configuration file %s, enb %d illegal tdd_config %d (should be 0-%d)!", + RC.config_file_name, i, tdd_config, TDD_Config__subframeAssignment_sa6); + RRC_CONFIGURATION_REQ (msg_p).tdd_config_s[j] = tdd_config_s; + AssertFatal (tdd_config_s <= TDD_Config__specialSubframePatterns_ssp8, + "Failed to parse eNB configuration file %s, enb %d illegal tdd_config_s %d (should be 0-%d)!", + RC.config_file_name, i, tdd_config_s, TDD_Config__specialSubframePatterns_ssp8); - sprintf(ccspath,"%s.%s.[%i]",enbpath,ENB_CONFIG_STRING_COMPONENT_CARRIERS,j); - LOG_I(RRC, "enb_config::RCconfig_RRC() parameter number: %d, total number of parameters: %zd, ccspath: %s \n \n", j, sizeof(CCsParams)/sizeof(paramdef_t), ccspath); - config_get( CCsParams,sizeof(CCsParams)/sizeof(paramdef_t),ccspath); + if (!prefix_type) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: NORMAL,EXTENDED!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PREFIX_TYPE); + else if (strcmp(prefix_type, "NORMAL") == 0) { + RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = NORMAL; + } else if (strcmp(prefix_type, "EXTENDED") == 0) { + RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = EXTENDED; + } else { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n", + RC.config_file_name, i, prefix_type); + } - - //printf("Component carrier %d\n",component_carrier); - - - - nb_cc++; - - - RRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = tdd_config; - - AssertFatal (tdd_config <= TDD_Config__subframeAssignment_sa6, - "Failed to parse eNB configuration file %s, enb %d illegal tdd_config %d (should be 0-%d)!", - RC.config_file_name, i, tdd_config, TDD_Config__subframeAssignment_sa6); - - RRC_CONFIGURATION_REQ (msg_p).tdd_config_s[j] = tdd_config_s; - AssertFatal (tdd_config_s <= TDD_Config__specialSubframePatterns_ssp8, - "Failed to parse eNB configuration file %s, enb %d illegal tdd_config_s %d (should be 0-%d)!", - RC.config_file_name, i, tdd_config_s, TDD_Config__specialSubframePatterns_ssp8); - - if (!prefix_type) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d define %s: NORMAL,EXTENDED!\n", - RC.config_file_name, i, ENB_CONFIG_STRING_PREFIX_TYPE); - else if (strcmp(prefix_type, "NORMAL") == 0) { - RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = NORMAL; - } else if (strcmp(prefix_type, "EXTENDED") == 0) { - RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = EXTENDED; - } else { - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n", - RC.config_file_name, i, prefix_type); - } #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) - if (!pbch_repetition) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n", - RC.config_file_name, i, ENB_CONFIG_STRING_PBCH_REPETITION); - else if (strcmp(pbch_repetition, "TRUE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pbch_repetition[j] = 1; - } else if (strcmp(pbch_repetition, "FALSE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pbch_repetition[j] = 0; - } else { - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pbch_repetition choice: TRUE or FALSE !\n", - RC.config_file_name, i, pbch_repetition); - } + + if (!pbch_repetition) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PBCH_REPETITION); + else if (strcmp(pbch_repetition, "TRUE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pbch_repetition[j] = 1; + } else if (strcmp(pbch_repetition, "FALSE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pbch_repetition[j] = 0; + } else { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pbch_repetition choice: TRUE or FALSE !\n", + RC.config_file_name, i, pbch_repetition); + } + #endif - - RRC_CONFIGURATION_REQ (msg_p).eutra_band[j] = eutra_band; - RRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j] = (uint32_t) downlink_frequency; - RRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j] = (unsigned int) uplink_frequency_offset; - RRC_CONFIGURATION_REQ (msg_p).Nid_cell[j]= Nid_cell; - - if (Nid_cell>503) { - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for Nid_cell choice: 0...503 !\n", - RC.config_file_name, i, Nid_cell); - } - - RRC_CONFIGURATION_REQ (msg_p).N_RB_DL[j]= N_RB_DL; - - if ((N_RB_DL!=6) && (N_RB_DL!=15) && (N_RB_DL!=25) && (N_RB_DL!=50) && (N_RB_DL!=75) && (N_RB_DL!=100)) { - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 6,15,25,50,75,100 !\n", - RC.config_file_name, i, N_RB_DL); - } - - if (strcmp(frame_type, "FDD") == 0) { - RRC_CONFIGURATION_REQ (msg_p).frame_type[j] = FDD; - } else if (strcmp(frame_type, "TDD") == 0) { - RRC_CONFIGURATION_REQ (msg_p).frame_type[j] = TDD; - } else { - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for frame_type choice: FDD or TDD !\n", - RC.config_file_name, i, frame_type); - } - - - RRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = tdd_config; - AssertFatal (tdd_config <= TDD_Config__subframeAssignment_sa6, - "Failed to parse eNB configuration file %s, enb %d illegal tdd_config %d (should be 0-%d)!", - RC.config_file_name, i, tdd_config, TDD_Config__subframeAssignment_sa6); - - - RRC_CONFIGURATION_REQ (msg_p).tdd_config_s[j] = tdd_config_s; - AssertFatal (tdd_config_s <= TDD_Config__specialSubframePatterns_ssp8, - "Failed to parse eNB configuration file %s, enb %d illegal tdd_config_s %d (should be 0-%d)!", - RC.config_file_name, i, tdd_config_s, TDD_Config__specialSubframePatterns_ssp8); - - - - if (!prefix_type) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d define %s: NORMAL,EXTENDED!\n", - RC.config_file_name, i, ENB_CONFIG_STRING_PREFIX_TYPE); - else if (strcmp(prefix_type, "NORMAL") == 0) { - RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = NORMAL; - } else if (strcmp(prefix_type, "EXTENDED") == 0) { - RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = EXTENDED; - } else { - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n", - RC.config_file_name, i, prefix_type); - } - - - - RRC_CONFIGURATION_REQ (msg_p).eutra_band[j] = eutra_band; - // printf( "\teutra band:\t%d\n",RRC_CONFIGURATION_REQ (msg_p).eutra_band); - - - - RRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j] = (uint32_t) downlink_frequency; - //printf( "\tdownlink freq:\t%u\n",RRC_CONFIGURATION_REQ (msg_p).downlink_frequency); - - - RRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j] = (unsigned int) uplink_frequency_offset; - - if (config_check_band_frequencies(j, - RRC_CONFIGURATION_REQ (msg_p).eutra_band[j], - RRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j], - RRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j], - RRC_CONFIGURATION_REQ (msg_p).frame_type[j])) { - AssertFatal(0, "error calling enb_check_band_frequencies\n"); - } - - if ((nb_antenna_ports <1) || (nb_antenna_ports > 2)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nb_antenna_ports choice: 1..2 !\n", - RC.config_file_name, i, nb_antenna_ports); - - RRC_CONFIGURATION_REQ (msg_p).nb_antenna_ports[j] = nb_antenna_ports; - - - RRC_CONFIGURATION_REQ (msg_p).prach_root[j] = prach_root; - - if ((prach_root <0) || (prach_root > 1023)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_root choice: 0..1023 !\n", - RC.config_file_name, i, prach_root); - - RRC_CONFIGURATION_REQ (msg_p).prach_config_index[j] = prach_config_index; - - if ((prach_config_index <0) || (prach_config_index > 63)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_config_index choice: 0..1023 !\n", - RC.config_file_name, i, prach_config_index); - - if (!prach_high_speed) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", - RC.config_file_name, i, ENB_CONFIG_STRING_PRACH_HIGH_SPEED); - else if (strcmp(prach_high_speed, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).prach_high_speed[j] = TRUE; - } else if (strcmp(prach_high_speed, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).prach_high_speed[j] = FALSE; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prach_config choice: ENABLE,DISABLE !\n", - RC.config_file_name, i, prach_high_speed); - - RRC_CONFIGURATION_REQ (msg_p).prach_zero_correlation[j] =prach_zero_correlation; - - if ((prach_zero_correlation <0) || (prach_zero_correlation > 15)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_zero_correlation choice: 0..15!\n", - RC.config_file_name, i, prach_zero_correlation); - - RRC_CONFIGURATION_REQ (msg_p).prach_freq_offset[j] = prach_freq_offset; - if ((prach_freq_offset <0) || (prach_freq_offset > 94)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_freq_offset choice: 0..94!\n", - RC.config_file_name, i, prach_freq_offset); - - RRC_CONFIGURATION_REQ (msg_p).pucch_delta_shift[j] = pucch_delta_shift-1; - - if ((pucch_delta_shift <1) || (pucch_delta_shift > 3)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_delta_shift choice: 1..3!\n", - RC.config_file_name, i, pucch_delta_shift); - - RRC_CONFIGURATION_REQ (msg_p).pucch_nRB_CQI[j] = pucch_nRB_CQI; + RRC_CONFIGURATION_REQ (msg_p).eutra_band[j] = eutra_band; + RRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j] = (uint32_t) downlink_frequency; + RRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j] = (unsigned int) uplink_frequency_offset; + RRC_CONFIGURATION_REQ (msg_p).Nid_cell[j]= Nid_cell; - if ((pucch_nRB_CQI <0) || (pucch_nRB_CQI > 98)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nRB_CQI choice: 0..98!\n", - RC.config_file_name, i, pucch_nRB_CQI); + if (Nid_cell>503) { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for Nid_cell choice: 0...503 !\n", + RC.config_file_name, i, Nid_cell); + } - RRC_CONFIGURATION_REQ (msg_p).pucch_nCS_AN[j] = pucch_nCS_AN; + RRC_CONFIGURATION_REQ (msg_p).N_RB_DL[j]= N_RB_DL; - if ((pucch_nCS_AN <0) || (pucch_nCS_AN > 7)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nCS_AN choice: 0..7!\n", - RC.config_file_name, i, pucch_nCS_AN); + if ((N_RB_DL!=6) && (N_RB_DL!=15) && (N_RB_DL!=25) && (N_RB_DL!=50) && (N_RB_DL!=75) && (N_RB_DL!=100)) { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 6,15,25,50,75,100 !\n", + RC.config_file_name, i, N_RB_DL); + } -//#if (RRC_VERSION < MAKE_VERSION(10, 0, 0)) - RRC_CONFIGURATION_REQ (msg_p).pucch_n1_AN[j] = pucch_n1_AN; + if (strcmp(frame_type, "FDD") == 0) { + RRC_CONFIGURATION_REQ (msg_p).frame_type[j] = FDD; + } else if (strcmp(frame_type, "TDD") == 0) { + RRC_CONFIGURATION_REQ (msg_p).frame_type[j] = TDD; + } else { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for frame_type choice: FDD or TDD !\n", + RC.config_file_name, i, frame_type); + } - if ((pucch_n1_AN <0) || (pucch_n1_AN > 2047)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_n1_AN choice: 0..2047!\n", - RC.config_file_name, i, pucch_n1_AN); + RRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = tdd_config; + AssertFatal (tdd_config <= TDD_Config__subframeAssignment_sa6, + "Failed to parse eNB configuration file %s, enb %d illegal tdd_config %d (should be 0-%d)!", + RC.config_file_name, i, tdd_config, TDD_Config__subframeAssignment_sa6); + RRC_CONFIGURATION_REQ (msg_p).tdd_config_s[j] = tdd_config_s; + AssertFatal (tdd_config_s <= TDD_Config__specialSubframePatterns_ssp8, + "Failed to parse eNB configuration file %s, enb %d illegal tdd_config_s %d (should be 0-%d)!", + RC.config_file_name, i, tdd_config_s, TDD_Config__specialSubframePatterns_ssp8); -//#endif - RRC_CONFIGURATION_REQ (msg_p).pdsch_referenceSignalPower[j] = pdsch_referenceSignalPower; + if (!prefix_type) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: NORMAL,EXTENDED!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PREFIX_TYPE); + else if (strcmp(prefix_type, "NORMAL") == 0) { + RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = NORMAL; + } else if (strcmp(prefix_type, "EXTENDED") == 0) { + RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = EXTENDED; + } else { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n", + RC.config_file_name, i, prefix_type); + } - if ((pdsch_referenceSignalPower <-60) || (pdsch_referenceSignalPower > 50)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_referenceSignalPower choice:-60..50!\n", - RC.config_file_name, i, pdsch_referenceSignalPower); + RRC_CONFIGURATION_REQ (msg_p).eutra_band[j] = eutra_band; + // printf( "\teutra band:\t%d\n",RRC_CONFIGURATION_REQ (msg_p).eutra_band); + RRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j] = (uint32_t) downlink_frequency; + //printf( "\tdownlink freq:\t%u\n",RRC_CONFIGURATION_REQ (msg_p).downlink_frequency); + RRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j] = (unsigned int) uplink_frequency_offset; - RRC_CONFIGURATION_REQ (msg_p).pdsch_p_b[j] = pdsch_p_b; + if (config_check_band_frequencies(j, + RRC_CONFIGURATION_REQ (msg_p).eutra_band[j], + RRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j], + RRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j], + RRC_CONFIGURATION_REQ (msg_p).frame_type[j])) { + AssertFatal(0, "error calling enb_check_band_frequencies\n"); + } - if ((pdsch_p_b <0) || (pdsch_p_b > 3)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_p_b choice: 0..3!\n", - RC.config_file_name, i, pdsch_p_b); + if ((nb_antenna_ports <1) || (nb_antenna_ports > 2)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nb_antenna_ports choice: 1..2 !\n", + RC.config_file_name, i, nb_antenna_ports); - RRC_CONFIGURATION_REQ (msg_p).pusch_n_SB[j] = pusch_n_SB; + RRC_CONFIGURATION_REQ (msg_p).nb_antenna_ports[j] = nb_antenna_ports; + RRC_CONFIGURATION_REQ (msg_p).prach_root[j] = prach_root; - if ((pusch_n_SB <1) || (pusch_n_SB > 4)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_n_SB choice: 1..4!\n", - RC.config_file_name, i, pusch_n_SB); + if ((prach_root <0) || (prach_root > 1023)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_root choice: 0..1023 !\n", + RC.config_file_name, i, prach_root); - if (!pusch_hoppingMode) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d define %s: interSubframe,intraAndInterSubframe!\n", - RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_HOPPINGMODE); - else if (strcmp(pusch_hoppingMode,"interSubFrame")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_hoppingMode[j] = PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_interSubFrame; - } else if (strcmp(pusch_hoppingMode,"intraAndInterSubFrame")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_hoppingMode[j] = PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_intraAndInterSubFrame; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingMode choice: interSubframe,intraAndInterSubframe!\n", - RC.config_file_name, i, pusch_hoppingMode); + RRC_CONFIGURATION_REQ (msg_p).prach_config_index[j] = prach_config_index; - RRC_CONFIGURATION_REQ (msg_p).pusch_hoppingOffset[j] = pusch_hoppingOffset; + if ((prach_config_index <0) || (prach_config_index > 63)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_config_index choice: 0..1023 !\n", + RC.config_file_name, i, prach_config_index); - if ((pusch_hoppingOffset<0) || (pusch_hoppingOffset>98)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingOffset choice: 0..98!\n", - RC.config_file_name, i, pusch_hoppingMode); + if (!prach_high_speed) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PRACH_HIGH_SPEED); + else if (strcmp(prach_high_speed, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).prach_high_speed[j] = TRUE; + } else if (strcmp(prach_high_speed, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).prach_high_speed[j] = FALSE; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prach_config choice: ENABLE,DISABLE !\n", + RC.config_file_name, i, prach_high_speed); - if (!pusch_enable64QAM) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", - RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_ENABLE64QAM); - else if (strcmp(pusch_enable64QAM, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_enable64QAM[j] = TRUE; - } else if (strcmp(pusch_enable64QAM, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_enable64QAM[j] = FALSE; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n", - RC.config_file_name, i, pusch_enable64QAM); + RRC_CONFIGURATION_REQ (msg_p).prach_zero_correlation[j] =prach_zero_correlation; - if (!pusch_groupHoppingEnabled) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", - RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN); - else if (strcmp(pusch_groupHoppingEnabled, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_groupHoppingEnabled[j] = TRUE; - } else if (strcmp(pusch_groupHoppingEnabled, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_groupHoppingEnabled[j] = FALSE; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n", - RC.config_file_name, i, pusch_groupHoppingEnabled); + if ((prach_zero_correlation <0) || (prach_zero_correlation > 15)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_zero_correlation choice: 0..15!\n", + RC.config_file_name, i, prach_zero_correlation); + RRC_CONFIGURATION_REQ (msg_p).prach_freq_offset[j] = prach_freq_offset; - RRC_CONFIGURATION_REQ (msg_p).pusch_groupAssignment[j] = pusch_groupAssignment; + if ((prach_freq_offset <0) || (prach_freq_offset > 94)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_freq_offset choice: 0..94!\n", + RC.config_file_name, i, prach_freq_offset); - if ((pusch_groupAssignment<0)||(pusch_groupAssignment>29)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_groupAssignment choice: 0..29!\n", - RC.config_file_name, i, pusch_groupAssignment); + RRC_CONFIGURATION_REQ (msg_p).pucch_delta_shift[j] = pucch_delta_shift-1; - if (!pusch_sequenceHoppingEnabled) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", - RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN); - else if (strcmp(pusch_sequenceHoppingEnabled, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_sequenceHoppingEnabled[j] = TRUE; - } else if (strcmp(pusch_sequenceHoppingEnabled, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_sequenceHoppingEnabled[j] = FALSE; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_sequenceHoppingEnabled choice: ENABLE,DISABLE!\n", - RC.config_file_name, i, pusch_sequenceHoppingEnabled); + if ((pucch_delta_shift <1) || (pucch_delta_shift > 3)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_delta_shift choice: 1..3!\n", + RC.config_file_name, i, pucch_delta_shift); - RRC_CONFIGURATION_REQ (msg_p).pusch_nDMRS1[j] = pusch_nDMRS1; //cyclic_shift in RRC! + RRC_CONFIGURATION_REQ (msg_p).pucch_nRB_CQI[j] = pucch_nRB_CQI; - if ((pusch_nDMRS1 <0) || (pusch_nDMRS1>7)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_nDMRS1 choice: 0..7!\n", - RC.config_file_name, i, pusch_nDMRS1); + if ((pucch_nRB_CQI <0) || (pucch_nRB_CQI > 98)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nRB_CQI choice: 0..98!\n", + RC.config_file_name, i, pucch_nRB_CQI); - if (strcmp(phich_duration,"NORMAL")==0) { - RRC_CONFIGURATION_REQ (msg_p).phich_duration[j] = PHICH_Config__phich_Duration_normal; - } else if (strcmp(phich_duration,"EXTENDED")==0) { - RRC_CONFIGURATION_REQ (msg_p).phich_duration[j] = PHICH_Config__phich_Duration_extended; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_duration choice: NORMAL,EXTENDED!\n", - RC.config_file_name, i, phich_duration); + RRC_CONFIGURATION_REQ (msg_p).pucch_nCS_AN[j] = pucch_nCS_AN; - if (strcmp(phich_resource,"ONESIXTH")==0) { - RRC_CONFIGURATION_REQ (msg_p).phich_resource[j] = PHICH_Config__phich_Resource_oneSixth ; - } else if (strcmp(phich_resource,"HALF")==0) { - RRC_CONFIGURATION_REQ (msg_p).phich_resource[j] = PHICH_Config__phich_Resource_half; - } else if (strcmp(phich_resource,"ONE")==0) { - RRC_CONFIGURATION_REQ (msg_p).phich_resource[j] = PHICH_Config__phich_Resource_one; - } else if (strcmp(phich_resource,"TWO")==0) { - RRC_CONFIGURATION_REQ (msg_p).phich_resource[j] = PHICH_Config__phich_Resource_two; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_resource choice: ONESIXTH,HALF,ONE,TWO!\n", - RC.config_file_name, i, phich_resource); + if ((pucch_nCS_AN <0) || (pucch_nCS_AN > 7)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nCS_AN choice: 0..7!\n", + RC.config_file_name, i, pucch_nCS_AN); - printf("phich.resource %ld (%s), phich.duration %ld (%s)\n", - RRC_CONFIGURATION_REQ (msg_p).phich_resource[j],phich_resource, - RRC_CONFIGURATION_REQ (msg_p).phich_duration[j],phich_duration); + //#if (RRC_VERSION < MAKE_VERSION(10, 0, 0)) + RRC_CONFIGURATION_REQ (msg_p).pucch_n1_AN[j] = pucch_n1_AN; - if (strcmp(srs_enable, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).srs_enable[j] = TRUE; - } else if (strcmp(srs_enable, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).srs_enable[j] = FALSE; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n", - RC.config_file_name, i, srs_enable); + if ((pucch_n1_AN <0) || (pucch_n1_AN > 2047)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_n1_AN choice: 0..2047!\n", + RC.config_file_name, i, pucch_n1_AN); - if (RRC_CONFIGURATION_REQ (msg_p).srs_enable[j] == TRUE) { + //#endif + RRC_CONFIGURATION_REQ (msg_p).pdsch_referenceSignalPower[j] = pdsch_referenceSignalPower; - RRC_CONFIGURATION_REQ (msg_p).srs_BandwidthConfig[j] = srs_BandwidthConfig; + if ((pdsch_referenceSignalPower <-60) || (pdsch_referenceSignalPower > 50)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_referenceSignalPower choice:-60..50!\n", + RC.config_file_name, i, pdsch_referenceSignalPower); - if ((srs_BandwidthConfig < 0) || (srs_BandwidthConfig >7)) - AssertFatal (0, "Failed to parse eNB configuration file %s, enb %d unknown value %d for srs_BandwidthConfig choice: 0...7\n", - RC.config_file_name, i, srs_BandwidthConfig); + RRC_CONFIGURATION_REQ (msg_p).pdsch_p_b[j] = pdsch_p_b; - RRC_CONFIGURATION_REQ (msg_p).srs_SubframeConfig[j] = srs_SubframeConfig; + if ((pdsch_p_b <0) || (pdsch_p_b > 3)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_p_b choice: 0..3!\n", + RC.config_file_name, i, pdsch_p_b); - if ((srs_SubframeConfig<0) || (srs_SubframeConfig>15)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for srs_SubframeConfig choice: 0..15 !\n", - RC.config_file_name, i, srs_SubframeConfig); + RRC_CONFIGURATION_REQ (msg_p).pusch_n_SB[j] = pusch_n_SB; - if (strcmp(srs_ackNackST, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).srs_ackNackST[j] = TRUE; - } else if (strcmp(srs_ackNackST, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).srs_ackNackST[j] = FALSE; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n", - RC.config_file_name, i, srs_ackNackST); + if ((pusch_n_SB <1) || (pusch_n_SB > 4)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_n_SB choice: 1..4!\n", + RC.config_file_name, i, pusch_n_SB); - if (strcmp(srs_MaxUpPts, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).srs_MaxUpPts[j] = TRUE; - } else if (strcmp(srs_MaxUpPts, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).srs_MaxUpPts[j] = FALSE; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_MaxUpPts choice: ENABLE,DISABLE !\n", - RC.config_file_name, i, srs_MaxUpPts); - } + if (!pusch_hoppingMode) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: interSubframe,intraAndInterSubframe!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_HOPPINGMODE); + else if (strcmp(pusch_hoppingMode,"interSubFrame")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_hoppingMode[j] = PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_interSubFrame; + } else if (strcmp(pusch_hoppingMode,"intraAndInterSubFrame")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_hoppingMode[j] = PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_intraAndInterSubFrame; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingMode choice: interSubframe,intraAndInterSubframe!\n", + RC.config_file_name, i, pusch_hoppingMode); - RRC_CONFIGURATION_REQ (msg_p).pusch_p0_Nominal[j] = pusch_p0_Nominal; + RRC_CONFIGURATION_REQ (msg_p).pusch_hoppingOffset[j] = pusch_hoppingOffset; - if ((pusch_p0_Nominal<-126) || (pusch_p0_Nominal>24)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_p0_Nominal choice: -126..24 !\n", - RC.config_file_name, i, pusch_p0_Nominal); + if ((pusch_hoppingOffset<0) || (pusch_hoppingOffset>98)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingOffset choice: 0..98!\n", + RC.config_file_name, i, pusch_hoppingMode); + + if (!pusch_enable64QAM) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_ENABLE64QAM); + else if (strcmp(pusch_enable64QAM, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_enable64QAM[j] = TRUE; + } else if (strcmp(pusch_enable64QAM, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_enable64QAM[j] = FALSE; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n", + RC.config_file_name, i, pusch_enable64QAM); + + if (!pusch_groupHoppingEnabled) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN); + else if (strcmp(pusch_groupHoppingEnabled, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_groupHoppingEnabled[j] = TRUE; + } else if (strcmp(pusch_groupHoppingEnabled, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_groupHoppingEnabled[j] = FALSE; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n", + RC.config_file_name, i, pusch_groupHoppingEnabled); + + RRC_CONFIGURATION_REQ (msg_p).pusch_groupAssignment[j] = pusch_groupAssignment; + + if ((pusch_groupAssignment<0)||(pusch_groupAssignment>29)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_groupAssignment choice: 0..29!\n", + RC.config_file_name, i, pusch_groupAssignment); + + if (!pusch_sequenceHoppingEnabled) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN); + else if (strcmp(pusch_sequenceHoppingEnabled, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_sequenceHoppingEnabled[j] = TRUE; + } else if (strcmp(pusch_sequenceHoppingEnabled, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_sequenceHoppingEnabled[j] = FALSE; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_sequenceHoppingEnabled choice: ENABLE,DISABLE!\n", + RC.config_file_name, i, pusch_sequenceHoppingEnabled); + + RRC_CONFIGURATION_REQ (msg_p).pusch_nDMRS1[j] = pusch_nDMRS1; //cyclic_shift in RRC! + + if ((pusch_nDMRS1 <0) || (pusch_nDMRS1>7)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_nDMRS1 choice: 0..7!\n", + RC.config_file_name, i, pusch_nDMRS1); + + if (strcmp(phich_duration,"NORMAL")==0) { + RRC_CONFIGURATION_REQ (msg_p).phich_duration[j] = PHICH_Config__phich_Duration_normal; + } else if (strcmp(phich_duration,"EXTENDED")==0) { + RRC_CONFIGURATION_REQ (msg_p).phich_duration[j] = PHICH_Config__phich_Duration_extended; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_duration choice: NORMAL,EXTENDED!\n", + RC.config_file_name, i, phich_duration); + + if (strcmp(phich_resource,"ONESIXTH")==0) { + RRC_CONFIGURATION_REQ (msg_p).phich_resource[j] = PHICH_Config__phich_Resource_oneSixth ; + } else if (strcmp(phich_resource,"HALF")==0) { + RRC_CONFIGURATION_REQ (msg_p).phich_resource[j] = PHICH_Config__phich_Resource_half; + } else if (strcmp(phich_resource,"ONE")==0) { + RRC_CONFIGURATION_REQ (msg_p).phich_resource[j] = PHICH_Config__phich_Resource_one; + } else if (strcmp(phich_resource,"TWO")==0) { + RRC_CONFIGURATION_REQ (msg_p).phich_resource[j] = PHICH_Config__phich_Resource_two; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_resource choice: ONESIXTH,HALF,ONE,TWO!\n", + RC.config_file_name, i, phich_resource); + + printf("phich.resource %ld (%s), phich.duration %ld (%s)\n", + RRC_CONFIGURATION_REQ (msg_p).phich_resource[j],phich_resource, + RRC_CONFIGURATION_REQ (msg_p).phich_duration[j],phich_duration); + + if (strcmp(srs_enable, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).srs_enable[j] = TRUE; + } else if (strcmp(srs_enable, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).srs_enable[j] = FALSE; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n", + RC.config_file_name, i, srs_enable); + + if (RRC_CONFIGURATION_REQ (msg_p).srs_enable[j] == TRUE) { + RRC_CONFIGURATION_REQ (msg_p).srs_BandwidthConfig[j] = srs_BandwidthConfig; + + if ((srs_BandwidthConfig < 0) || (srs_BandwidthConfig >7)) + AssertFatal (0, "Failed to parse eNB configuration file %s, enb %d unknown value %d for srs_BandwidthConfig choice: 0...7\n", + RC.config_file_name, i, srs_BandwidthConfig); + + RRC_CONFIGURATION_REQ (msg_p).srs_SubframeConfig[j] = srs_SubframeConfig; + + if ((srs_SubframeConfig<0) || (srs_SubframeConfig>15)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for srs_SubframeConfig choice: 0..15 !\n", + RC.config_file_name, i, srs_SubframeConfig); + + if (strcmp(srs_ackNackST, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).srs_ackNackST[j] = TRUE; + } else if (strcmp(srs_ackNackST, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).srs_ackNackST[j] = FALSE; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n", + RC.config_file_name, i, srs_ackNackST); + + if (strcmp(srs_MaxUpPts, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).srs_MaxUpPts[j] = TRUE; + } else if (strcmp(srs_MaxUpPts, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).srs_MaxUpPts[j] = FALSE; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_MaxUpPts choice: ENABLE,DISABLE !\n", + RC.config_file_name, i, srs_MaxUpPts); + } + + RRC_CONFIGURATION_REQ (msg_p).pusch_p0_Nominal[j] = pusch_p0_Nominal; + + if ((pusch_p0_Nominal<-126) || (pusch_p0_Nominal>24)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_p0_Nominal choice: -126..24 !\n", + RC.config_file_name, i, pusch_p0_Nominal); #if (RRC_VERSION <= MAKE_VERSION(12, 0, 0)) - if (strcmp(pusch_alpha,"AL0")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al0; - } else if (strcmp(pusch_alpha,"AL04")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al04; - } else if (strcmp(pusch_alpha,"AL05")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al05; - } else if (strcmp(pusch_alpha,"AL06")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al06; - } else if (strcmp(pusch_alpha,"AL07")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al07; - } else if (strcmp(pusch_alpha,"AL08")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al08; - } else if (strcmp(pusch_alpha,"AL09")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al09; - } else if (strcmp(pusch_alpha,"AL1")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al1; - } -#endif + if (strcmp(pusch_alpha,"AL0")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al0; + } else if (strcmp(pusch_alpha,"AL04")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al04; + } else if (strcmp(pusch_alpha,"AL05")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al05; + } else if (strcmp(pusch_alpha,"AL06")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al06; + } else if (strcmp(pusch_alpha,"AL07")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al07; + } else if (strcmp(pusch_alpha,"AL08")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al08; + } else if (strcmp(pusch_alpha,"AL09")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al09; + } else if (strcmp(pusch_alpha,"AL1")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al1; + } + +#endif #if (RRC_VERSION >= MAKE_VERSION(12, 0, 0)) - if (strcmp(pusch_alpha,"AL0")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al0; - } else if (strcmp(pusch_alpha,"AL04")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al04; - } else if (strcmp(pusch_alpha,"AL05")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al05; - } else if (strcmp(pusch_alpha,"AL06")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al06; - } else if (strcmp(pusch_alpha,"AL07")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al07; - } else if (strcmp(pusch_alpha,"AL08")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al08; - } else if (strcmp(pusch_alpha,"AL09")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al09; - } else if (strcmp(pusch_alpha,"AL1")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al1; - } + + if (strcmp(pusch_alpha,"AL0")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al0; + } else if (strcmp(pusch_alpha,"AL04")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al04; + } else if (strcmp(pusch_alpha,"AL05")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al05; + } else if (strcmp(pusch_alpha,"AL06")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al06; + } else if (strcmp(pusch_alpha,"AL07")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al07; + } else if (strcmp(pusch_alpha,"AL08")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al08; + } else if (strcmp(pusch_alpha,"AL09")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al09; + } else if (strcmp(pusch_alpha,"AL1")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al1; + } + #endif - else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_Alpha choice: AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1!\n", - RC.config_file_name, i, pusch_alpha); + else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_Alpha choice: AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1!\n", + RC.config_file_name, i, pusch_alpha); - RRC_CONFIGURATION_REQ (msg_p).pucch_p0_Nominal[j] = pucch_p0_Nominal; + RRC_CONFIGURATION_REQ (msg_p).pucch_p0_Nominal[j] = pucch_p0_Nominal; - if ((pucch_p0_Nominal<-127) || (pucch_p0_Nominal>-96)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_p0_Nominal choice: -127..-96 !\n", - RC.config_file_name, i, pucch_p0_Nominal); + if ((pucch_p0_Nominal<-127) || (pucch_p0_Nominal>-96)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_p0_Nominal choice: -127..-96 !\n", + RC.config_file_name, i, pucch_p0_Nominal); - RRC_CONFIGURATION_REQ (msg_p).msg3_delta_Preamble[j] = msg3_delta_Preamble; + RRC_CONFIGURATION_REQ (msg_p).msg3_delta_Preamble[j] = msg3_delta_Preamble; - if ((msg3_delta_Preamble<-1) || (msg3_delta_Preamble>6)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for msg3_delta_Preamble choice: -1..6 !\n", - RC.config_file_name, i, msg3_delta_Preamble); + if ((msg3_delta_Preamble<-1) || (msg3_delta_Preamble>6)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for msg3_delta_Preamble choice: -1..6 !\n", + RC.config_file_name, i, msg3_delta_Preamble); + if (strcmp(pucch_deltaF_Format1,"deltaF_2")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF_2; + } else if (strcmp(pucch_deltaF_Format1,"deltaF0")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF0; + } else if (strcmp(pucch_deltaF_Format1,"deltaF2")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF2; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1 choice: deltaF_2,dltaF0,deltaF2!\n", + RC.config_file_name, i, pucch_deltaF_Format1); - if (strcmp(pucch_deltaF_Format1,"deltaF_2")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF_2; - } else if (strcmp(pucch_deltaF_Format1,"deltaF0")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF0; - } else if (strcmp(pucch_deltaF_Format1,"deltaF2")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF2; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1 choice: deltaF_2,dltaF0,deltaF2!\n", - RC.config_file_name, i, pucch_deltaF_Format1); + if (strcmp(pucch_deltaF_Format1b,"deltaF1")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF1; + } else if (strcmp(pucch_deltaF_Format1b,"deltaF3")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF3; + } else if (strcmp(pucch_deltaF_Format1b,"deltaF5")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF5; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1b choice: deltaF1,dltaF3,deltaF5!\n", + RC.config_file_name, i, pucch_deltaF_Format1b); - if (strcmp(pucch_deltaF_Format1b,"deltaF1")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF1; - } else if (strcmp(pucch_deltaF_Format1b,"deltaF3")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF3; - } else if (strcmp(pucch_deltaF_Format1b,"deltaF5")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF5; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1b choice: deltaF1,dltaF3,deltaF5!\n", - RC.config_file_name, i, pucch_deltaF_Format1b); + if (strcmp(pucch_deltaF_Format2,"deltaF_2")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF_2; + } else if (strcmp(pucch_deltaF_Format2,"deltaF0")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF0; + } else if (strcmp(pucch_deltaF_Format2,"deltaF1")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF1; + } else if (strcmp(pucch_deltaF_Format2,"deltaF2")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF2; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2 choice: deltaF_2,dltaF0,deltaF1,deltaF2!\n", + RC.config_file_name, i, pucch_deltaF_Format2); + if (strcmp(pucch_deltaF_Format2a,"deltaF_2")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2a[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF_2; + } else if (strcmp(pucch_deltaF_Format2a,"deltaF0")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2a[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF0; + } else if (strcmp(pucch_deltaF_Format2a,"deltaF2")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2a[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF2; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2a choice: deltaF_2,dltaF0,deltaF2!\n", + RC.config_file_name, i, pucch_deltaF_Format2a); - if (strcmp(pucch_deltaF_Format2,"deltaF_2")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF_2; - } else if (strcmp(pucch_deltaF_Format2,"deltaF0")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF0; - } else if (strcmp(pucch_deltaF_Format2,"deltaF1")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF1; - } else if (strcmp(pucch_deltaF_Format2,"deltaF2")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF2; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2 choice: deltaF_2,dltaF0,deltaF1,deltaF2!\n", - RC.config_file_name, i, pucch_deltaF_Format2); + if (strcmp(pucch_deltaF_Format2b,"deltaF_2")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF_2; + } else if (strcmp(pucch_deltaF_Format2b,"deltaF0")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF0; + } else if (strcmp(pucch_deltaF_Format2b,"deltaF2")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF2; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2b choice: deltaF_2,dltaF0,deltaF2!\n", + RC.config_file_name, i, pucch_deltaF_Format2b); - if (strcmp(pucch_deltaF_Format2a,"deltaF_2")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2a[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF_2; - } else if (strcmp(pucch_deltaF_Format2a,"deltaF0")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2a[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF0; - } else if (strcmp(pucch_deltaF_Format2a,"deltaF2")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2a[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF2; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2a choice: deltaF_2,dltaF0,deltaF2!\n", - RC.config_file_name, i, pucch_deltaF_Format2a); + RRC_CONFIGURATION_REQ (msg_p).rach_numberOfRA_Preambles[j] = (rach_numberOfRA_Preambles/4)-1; - if (strcmp(pucch_deltaF_Format2b,"deltaF_2")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF_2; - } else if (strcmp(pucch_deltaF_Format2b,"deltaF0")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF0; - } else if (strcmp(pucch_deltaF_Format2b,"deltaF2")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF2; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2b choice: deltaF_2,dltaF0,deltaF2!\n", - RC.config_file_name, i, pucch_deltaF_Format2b); + if ((rach_numberOfRA_Preambles <4) || (rach_numberOfRA_Preambles>64) || ((rach_numberOfRA_Preambles&3)!=0)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_numberOfRA_Preambles choice: 4,8,12,...,64!\n", + RC.config_file_name, i, rach_numberOfRA_Preambles); + if (strcmp(rach_preamblesGroupAConfig, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).rach_preamblesGroupAConfig[j] = TRUE; + RRC_CONFIGURATION_REQ (msg_p).rach_sizeOfRA_PreamblesGroupA[j] = (rach_sizeOfRA_PreamblesGroupA/4)-1; + if ((rach_numberOfRA_Preambles <4) || (rach_numberOfRA_Preambles>60) || ((rach_numberOfRA_Preambles&3)!=0)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_sizeOfRA_PreamblesGroupA choice: 4,8,12,...,60!\n", + RC.config_file_name, i, rach_sizeOfRA_PreamblesGroupA); + switch (rach_messageSizeGroupA) { + case 56: + RRC_CONFIGURATION_REQ (msg_p).rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b56; + break; - RRC_CONFIGURATION_REQ (msg_p).rach_numberOfRA_Preambles[j] = (rach_numberOfRA_Preambles/4)-1; + case 144: + RRC_CONFIGURATION_REQ (msg_p).rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b144; + break; - if ((rach_numberOfRA_Preambles <4) || (rach_numberOfRA_Preambles>64) || ((rach_numberOfRA_Preambles&3)!=0)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_numberOfRA_Preambles choice: 4,8,12,...,64!\n", - RC.config_file_name, i, rach_numberOfRA_Preambles); + case 208: + RRC_CONFIGURATION_REQ (msg_p).rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b208; + break; - if (strcmp(rach_preamblesGroupAConfig, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).rach_preamblesGroupAConfig[j] = TRUE; + case 256: + RRC_CONFIGURATION_REQ (msg_p).rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b256; + break; + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_messageSizeGroupA choice: 56,144,208,256!\n", + RC.config_file_name, i, rach_messageSizeGroupA); + break; + } - RRC_CONFIGURATION_REQ (msg_p).rach_sizeOfRA_PreamblesGroupA[j] = (rach_sizeOfRA_PreamblesGroupA/4)-1; + if (strcmp(rach_messagePowerOffsetGroupB,"minusinfinity")==0) { + RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_minusinfinity; + } else if (strcmp(rach_messagePowerOffsetGroupB,"dB0")==0) { + RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB0; + } else if (strcmp(rach_messagePowerOffsetGroupB,"dB5")==0) { + RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB5; + } else if (strcmp(rach_messagePowerOffsetGroupB,"dB8")==0) { + RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB8; + } else if (strcmp(rach_messagePowerOffsetGroupB,"dB10")==0) { + RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB10; + } else if (strcmp(rach_messagePowerOffsetGroupB,"dB12")==0) { + RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB12; + } else if (strcmp(rach_messagePowerOffsetGroupB,"dB15")==0) { + RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB15; + } else if (strcmp(rach_messagePowerOffsetGroupB,"dB18")==0) { + RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB18; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_messagePowerOffsetGroupB choice: minusinfinity,dB0,dB5,dB8,dB10,dB12,dB15,dB18!\n", + RC.config_file_name, i, rach_messagePowerOffsetGroupB); + } else if (strcmp(rach_preamblesGroupAConfig, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).rach_preamblesGroupAConfig[j] = FALSE; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_preamblesGroupAConfig choice: ENABLE,DISABLE !\n", + RC.config_file_name, i, rach_preamblesGroupAConfig); - if ((rach_numberOfRA_Preambles <4) || (rach_numberOfRA_Preambles>60) || ((rach_numberOfRA_Preambles&3)!=0)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_sizeOfRA_PreamblesGroupA choice: 4,8,12,...,60!\n", - RC.config_file_name, i, rach_sizeOfRA_PreamblesGroupA); + RRC_CONFIGURATION_REQ (msg_p).rach_preambleInitialReceivedTargetPower[j] = (rach_preambleInitialReceivedTargetPower+120)/2; + if ((rach_preambleInitialReceivedTargetPower<-120) || (rach_preambleInitialReceivedTargetPower>-90) || ((rach_preambleInitialReceivedTargetPower&1)!=0)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleInitialReceivedTargetPower choice: -120,-118,...,-90 !\n", + RC.config_file_name, i, rach_preambleInitialReceivedTargetPower); - switch (rach_messageSizeGroupA) { - case 56: - RRC_CONFIGURATION_REQ (msg_p).rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b56; - break; + RRC_CONFIGURATION_REQ (msg_p).rach_powerRampingStep[j] = rach_powerRampingStep/2; - case 144: - RRC_CONFIGURATION_REQ (msg_p).rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b144; - break; + if ((rach_powerRampingStep<0) || (rach_powerRampingStep>6) || ((rach_powerRampingStep&1)!=0)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_powerRampingStep choice: 0,2,4,6 !\n", + RC.config_file_name, i, rach_powerRampingStep); - case 208: - RRC_CONFIGURATION_REQ (msg_p).rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b208; - break; - - case 256: - RRC_CONFIGURATION_REQ (msg_p).rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b256; - break; - - default: - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_messageSizeGroupA choice: 56,144,208,256!\n", - RC.config_file_name, i, rach_messageSizeGroupA); - break; - } - - if (strcmp(rach_messagePowerOffsetGroupB,"minusinfinity")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_minusinfinity; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB0")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB0; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB5")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB5; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB8")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB8; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB10")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB10; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB12")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB12; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB15")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB15; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB18")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB18; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_messagePowerOffsetGroupB choice: minusinfinity,dB0,dB5,dB8,dB10,dB12,dB15,dB18!\n", - RC.config_file_name, i, rach_messagePowerOffsetGroupB); - - } else if (strcmp(rach_preamblesGroupAConfig, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).rach_preamblesGroupAConfig[j] = FALSE; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_preamblesGroupAConfig choice: ENABLE,DISABLE !\n", - RC.config_file_name, i, rach_preamblesGroupAConfig); - - RRC_CONFIGURATION_REQ (msg_p).rach_preambleInitialReceivedTargetPower[j] = (rach_preambleInitialReceivedTargetPower+120)/2; - - if ((rach_preambleInitialReceivedTargetPower<-120) || (rach_preambleInitialReceivedTargetPower>-90) || ((rach_preambleInitialReceivedTargetPower&1)!=0)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleInitialReceivedTargetPower choice: -120,-118,...,-90 !\n", - RC.config_file_name, i, rach_preambleInitialReceivedTargetPower); - - - RRC_CONFIGURATION_REQ (msg_p).rach_powerRampingStep[j] = rach_powerRampingStep/2; - - if ((rach_powerRampingStep<0) || (rach_powerRampingStep>6) || ((rach_powerRampingStep&1)!=0)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_powerRampingStep choice: 0,2,4,6 !\n", - RC.config_file_name, i, rach_powerRampingStep); - - - - switch (rach_preambleTransMax) { + switch (rach_preambleTransMax) { #if (RRC_VERSION < MAKE_VERSION(14, 0, 0)) - case 3: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3; - break; - case 4: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n4; - break; + case 3: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3; + break; - case 5: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n5; - break; + case 4: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n4; + break; - case 6: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n6; - break; + case 5: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n5; + break; - case 7: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n7; - break; + case 6: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n6; + break; - case 8: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n8; - break; + case 7: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n7; + break; - case 10: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10; - break; + case 8: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n8; + break; - case 20: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n20; - break; + case 10: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10; + break; - case 50: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n50; - break; + case 20: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n20; + break; - case 100: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n100; - break; + case 50: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n50; + break; - case 200: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n200; - break; + case 100: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n100; + break; + case 200: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n200; + break; #else - case 3: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n3; - break; + case 3: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n3; + break; - case 4: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n4; - break; + case 4: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n4; + break; - case 5: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n5; - break; + case 5: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n5; + break; - case 6: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n6; - break; + case 6: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n6; + break; - case 7: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n7; - break; + case 7: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n7; + break; - case 8: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n8; - break; + case 8: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n8; + break; - case 10: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n10; - break; + case 10: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n10; + break; - case 20: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n20; - break; + case 20: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n20; + break; - case 50: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n50; - break; + case 50: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n50; + break; - case 100: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n100; - break; + case 100: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n100; + break; - case 200: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n200; - break; + case 200: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n200; + break; #endif - default: - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleTransMax choice: 3,4,5,6,7,8,10,20,50,100,200!\n", - RC.config_file_name, i, rach_preambleTransMax); - break; - } + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleTransMax choice: 3,4,5,6,7,8,10,20,50,100,200!\n", + RC.config_file_name, i, rach_preambleTransMax); + break; + } - RRC_CONFIGURATION_REQ (msg_p).rach_raResponseWindowSize[j] = (rach_raResponseWindowSize==10)?7:rach_raResponseWindowSize-2; + RRC_CONFIGURATION_REQ (msg_p).rach_raResponseWindowSize[j] = (rach_raResponseWindowSize==10)?7:rach_raResponseWindowSize-2; - if ((rach_raResponseWindowSize<0)||(rach_raResponseWindowSize==9)||(rach_raResponseWindowSize>10)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_raResponseWindowSize choice: 2,3,4,5,6,7,8,10!\n", - RC.config_file_name, i, rach_preambleTransMax); + if ((rach_raResponseWindowSize<0)||(rach_raResponseWindowSize==9)||(rach_raResponseWindowSize>10)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_raResponseWindowSize choice: 2,3,4,5,6,7,8,10!\n", + RC.config_file_name, i, rach_preambleTransMax); + RRC_CONFIGURATION_REQ (msg_p).rach_macContentionResolutionTimer[j] = (rach_macContentionResolutionTimer/8)-1; - RRC_CONFIGURATION_REQ (msg_p).rach_macContentionResolutionTimer[j] = (rach_macContentionResolutionTimer/8)-1; + if ((rach_macContentionResolutionTimer<8) || (rach_macContentionResolutionTimer>64) || ((rach_macContentionResolutionTimer&7)!=0)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_macContentionResolutionTimer choice: 8,16,...,56,64!\n", + RC.config_file_name, i, rach_preambleTransMax); - if ((rach_macContentionResolutionTimer<8) || (rach_macContentionResolutionTimer>64) || ((rach_macContentionResolutionTimer&7)!=0)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_macContentionResolutionTimer choice: 8,16,...,56,64!\n", - RC.config_file_name, i, rach_preambleTransMax); + RRC_CONFIGURATION_REQ (msg_p).rach_maxHARQ_Msg3Tx[j] = rach_maxHARQ_Msg3Tx; - RRC_CONFIGURATION_REQ (msg_p).rach_maxHARQ_Msg3Tx[j] = rach_maxHARQ_Msg3Tx; + if ((rach_maxHARQ_Msg3Tx<0) || (rach_maxHARQ_Msg3Tx>8)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_maxHARQ_Msg3Tx choice: 1..8!\n", + RC.config_file_name, i, rach_preambleTransMax); - if ((rach_maxHARQ_Msg3Tx<0) || (rach_maxHARQ_Msg3Tx>8)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_maxHARQ_Msg3Tx choice: 1..8!\n", - RC.config_file_name, i, rach_preambleTransMax); + switch (pcch_defaultPagingCycle) { + case 32: + RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf32; + break; + case 64: + RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf64; + break; - switch (pcch_defaultPagingCycle) { - case 32: - RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf32; - break; + case 128: + RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf128; + break; - case 64: - RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf64; - break; + case 256: + RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf256; + break; - case 128: - RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf128; - break; + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pcch_defaultPagingCycle choice: 32,64,128,256!\n", + RC.config_file_name, i, pcch_defaultPagingCycle); + break; + } - case 256: - RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf256; - break; + if (strcmp(pcch_nB, "fourT") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_fourT; + } else if (strcmp(pcch_nB, "twoT") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_twoT; + } else if (strcmp(pcch_nB, "oneT") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_oneT; + } else if (strcmp(pcch_nB, "halfT") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_halfT; + } else if (strcmp(pcch_nB, "quarterT") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_quarterT; + } else if (strcmp(pcch_nB, "oneEighthT") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_oneEighthT; + } else if (strcmp(pcch_nB, "oneSixteenthT") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_oneSixteenthT; + } else if (strcmp(pcch_nB, "oneThirtySecondT") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_oneThirtySecondT; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pcch_nB choice: fourT,twoT,oneT,halfT,quarterT,oneighthT,oneSixteenthT,oneThirtySecondT !\n", + RC.config_file_name, i, pcch_defaultPagingCycle); - default: - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pcch_defaultPagingCycle choice: 32,64,128,256!\n", - RC.config_file_name, i, pcch_defaultPagingCycle); - break; - } + switch (bcch_modificationPeriodCoeff) { + case 2: + RRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n2; + break; - if (strcmp(pcch_nB, "fourT") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_fourT; - } else if (strcmp(pcch_nB, "twoT") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_twoT; - } else if (strcmp(pcch_nB, "oneT") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_oneT; - } else if (strcmp(pcch_nB, "halfT") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_halfT; - } else if (strcmp(pcch_nB, "quarterT") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_quarterT; - } else if (strcmp(pcch_nB, "oneEighthT") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_oneEighthT; - } else if (strcmp(pcch_nB, "oneSixteenthT") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_oneSixteenthT; - } else if (strcmp(pcch_nB, "oneThirtySecondT") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_oneThirtySecondT; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pcch_nB choice: fourT,twoT,oneT,halfT,quarterT,oneighthT,oneSixteenthT,oneThirtySecondT !\n", - RC.config_file_name, i, pcch_defaultPagingCycle); + case 4: + RRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n4; + break; + case 8: + RRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n8; + break; + case 16: + RRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n16; + break; - switch (bcch_modificationPeriodCoeff) { - case 2: - RRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n2; - break; + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for bcch_modificationPeriodCoeff choice: 2,4,8,16", + RC.config_file_name, i, bcch_modificationPeriodCoeff); + break; + } - case 4: - RRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n4; - break; + RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t300[j] = ue_TimersAndConstants_t300; + RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t301[j] = ue_TimersAndConstants_t301; + RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t310[j] = ue_TimersAndConstants_t310; + RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t311[j] = ue_TimersAndConstants_t311; + RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n310[j] = ue_TimersAndConstants_n310; + RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n311[j] = ue_TimersAndConstants_n311; - case 8: - RRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n8; - break; + switch (ue_TransmissionMode) { + case 1: + RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm1; + break; - case 16: - RRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n16; - break; + case 2: + RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm2; + break; - default: - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for bcch_modificationPeriodCoeff choice: 2,4,8,16", - RC.config_file_name, i, bcch_modificationPeriodCoeff); + case 3: + RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm3; + break; - break; - } + case 4: + RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm4; + break; - - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t300[j] = ue_TimersAndConstants_t300; - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t301[j] = ue_TimersAndConstants_t301; - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t310[j] = ue_TimersAndConstants_t310; - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t311[j] = ue_TimersAndConstants_t311; - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n310[j] = ue_TimersAndConstants_n310; - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n311[j] = ue_TimersAndConstants_n311; + case 5: + RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm5; + break; - switch (ue_TransmissionMode) { - case 1: - RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm1; - break; - case 2: - RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm2; - break; - case 3: - RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm3; - break; - case 4: - RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm4; - break; - case 5: - RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm5; - break; - case 6: - RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm6; - break; - case 7: - RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm7; - break; - default: - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TransmissionMode choice: 1,2,3,4,5,6,7", - RC.config_file_name, i, ue_TransmissionMode); - break; - } + case 6: + RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm6; + break; - RRC_CONFIGURATION_REQ (msg_p).ue_multiple_max[j] = ue_multiple_max; + case 7: + RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm7; + break; - switch (N_RB_DL) { - case 25: - if ((ue_multiple_max < 1) || (ue_multiple_max > 4)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..4!\n", - RC.config_file_name, i, ue_multiple_max); - break; - case 50: - if ((ue_multiple_max < 1) || (ue_multiple_max > 8)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..8!\n", - RC.config_file_name, i, ue_multiple_max); - break; - case 100: - if ((ue_multiple_max < 1) || (ue_multiple_max > 16)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..16!\n", - RC.config_file_name, i, ue_multiple_max); - break; - default: - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 25,50,100 !\n", - RC.config_file_name, i, N_RB_DL); - break; + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TransmissionMode choice: 1,2,3,4,5,6,7", + RC.config_file_name, i, ue_TransmissionMode); + break; + } + + RRC_CONFIGURATION_REQ (msg_p).ue_multiple_max[j] = ue_multiple_max; + + switch (N_RB_DL) { + case 25: + if ((ue_multiple_max < 1) || (ue_multiple_max > 4)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..4!\n", + RC.config_file_name, i, ue_multiple_max); + + break; + + case 50: + if ((ue_multiple_max < 1) || (ue_multiple_max > 8)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..8!\n", + RC.config_file_name, i, ue_multiple_max); + + break; + + case 100: + if ((ue_multiple_max < 1) || (ue_multiple_max > 16)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..16!\n", + RC.config_file_name, i, ue_multiple_max); + + break; + + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 25,50,100 !\n", + RC.config_file_name, i, N_RB_DL); + break; + } + + //TTN - for D2D + //SIB18 + if (strcmp(rxPool_sc_CP_Len,"normal")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_CP_Len[j] = SL_CP_Len_r12_normal; + } else if (strcmp(rxPool_sc_CP_Len,"extended")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_CP_Len[j] = SL_CP_Len_r12_extended; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_CP_Len choice: normal,extended!\n", + RC.config_file_name, i, rxPool_sc_CP_Len); + + if (strcmp(rxPool_sc_Period,"sf40")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf40; + } else if (strcmp(rxPool_sc_Period,"sf60")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf60; + } else if (strcmp(rxPool_sc_Period,"sf70")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf70; + } else if (strcmp(rxPool_sc_Period,"sf80")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf80; + } else if (strcmp(rxPool_sc_Period,"sf120")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf120; + } else if (strcmp(rxPool_sc_Period,"sf140")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf140; + } else if (strcmp(rxPool_sc_Period,"sf160")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf160; + } else if (strcmp(rxPool_sc_Period,"sf240")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf240; + } else if (strcmp(rxPool_sc_Period,"sf280")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf280; + } else if (strcmp(rxPool_sc_Period,"sf320")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf320; + } else if (strcmp(rxPool_sc_Period,"spare6")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare6; + } else if (strcmp(rxPool_sc_Period,"spare5")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare5; + } else if (strcmp(rxPool_sc_Period,"spare4")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare4; + } else if (strcmp(rxPool_sc_Period,"spare3")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare3; + } else if (strcmp(rxPool_sc_Period,"spare2")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare2; + } else if (strcmp(rxPool_sc_Period,"spare")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_Period choice: sf40,sf60,sf70,sf80,sf120,sf140,sf160,sf240,sf280,sf320,spare6,spare5,spare4,spare3,spare2,spare!\n", + RC.config_file_name, i, rxPool_sc_Period); + + if (strcmp(rxPool_data_CP_Len,"normal")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_data_CP_Len[j] = SL_CP_Len_r12_normal; + } else if (strcmp(rxPool_data_CP_Len,"extended")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_data_CP_Len[j] = SL_CP_Len_r12_extended; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_data_CP_Len choice: normal,extended!\n", + RC.config_file_name, i, rxPool_data_CP_Len); + + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_Num[j] = rxPool_ResourceConfig_prb_Num; + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_Start[j] = rxPool_ResourceConfig_prb_Start; + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_End[j] = rxPool_ResourceConfig_prb_End; + + if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING; + } else if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12; + } else if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prLarge")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n", + RC.config_file_name, i, rxPool_ResourceConfig_offsetIndicator_present); + + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_choice[j] = rxPool_ResourceConfig_offsetIndicator_choice; + + if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING; + } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12; + } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs8")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12; + } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs12")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12; + } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs16")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12; + } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs30")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12; + } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs40")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12; + } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs42")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n", + RC.config_file_name, i, rxPool_ResourceConfig_subframeBitmap_present); + + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_buf; + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_size[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_size; + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused; + + //SIB19 - for discRxPool + if (strcmp(discRxPool_cp_Len,"normal")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_cp_Len[j] = SL_CP_Len_r12_normal; + } else if (strcmp(discRxPool_cp_Len,"extended")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_cp_Len[j] = SL_CP_Len_r12_extended; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_cp_Len choice: normal,extended!\n", + RC.config_file_name, i, discRxPool_cp_Len); + + if (strcmp(discRxPool_discPeriod,"rf32")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf32; + } else if (strcmp(discRxPool_discPeriod,"rf64")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf64; + } else if (strcmp(discRxPool_discPeriod,"rf128")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf128; + } else if (strcmp(discRxPool_discPeriod,"rf256")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf256; + } else if (strcmp(discRxPool_discPeriod,"rf512")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf512; + } else if (strcmp(discRxPool_discPeriod,"rf1024")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf1024; + } else if (strcmp(discRxPool_discPeriod,"rf16")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf16_v1310; + } else if (strcmp(discRxPool_discPeriod,"spare")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_spare; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n", + RC.config_file_name, i, discRxPool_discPeriod); + + RRC_CONFIGURATION_REQ (msg_p).discRxPool_numRetx[j] = discRxPool_numRetx; + RRC_CONFIGURATION_REQ (msg_p).discRxPool_numRepetition[j] = discRxPool_numRepetition; + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_Num[j] = discRxPool_ResourceConfig_prb_Num; + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_Start[j] = discRxPool_ResourceConfig_prb_Start; + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_End[j] = discRxPool_ResourceConfig_prb_End; + + if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING; + } else if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12; + } else if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prLarge")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n", + RC.config_file_name, i, discRxPool_ResourceConfig_offsetIndicator_present); + + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_choice[j] = discRxPool_ResourceConfig_offsetIndicator_choice; + + if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING; + } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12; + } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs8")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12; + } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs12")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12; + } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs16")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12; + } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs30")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12; + } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs40")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12; + } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs42")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n", + RC.config_file_name, i, discRxPool_ResourceConfig_subframeBitmap_present); + + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf; + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_size; + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused; + + //SIB19 - For discRxPoolPS + if (strcmp(discRxPoolPS_cp_Len,"normal")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_cp_Len[j] = SL_CP_Len_r12_normal; + } else if (strcmp(discRxPoolPS_cp_Len,"extended")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_cp_Len[j] = SL_CP_Len_r12_extended; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_cp_Len choice: normal,extended!\n", + RC.config_file_name, i, discRxPoolPS_cp_Len); + + if (strcmp(discRxPoolPS_discPeriod,"rf32")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf32; + } else if (strcmp(discRxPoolPS_discPeriod,"rf64")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf64; + } else if (strcmp(discRxPoolPS_discPeriod,"rf128")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf128; + } else if (strcmp(discRxPoolPS_discPeriod,"rf256")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf256; + } else if (strcmp(discRxPoolPS_discPeriod,"rf512")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf512; + } else if (strcmp(discRxPoolPS_discPeriod,"rf1024")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf1024; + } else if (strcmp(discRxPoolPS_discPeriod,"rf16")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf16_v1310; + } else if (strcmp(discRxPoolPS_discPeriod,"spare")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_spare; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n", + RC.config_file_name, i, discRxPoolPS_discPeriod); + + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_numRetx[j] = discRxPoolPS_numRetx; + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_numRepetition[j] = discRxPoolPS_numRepetition; + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_Num[j] = discRxPoolPS_ResourceConfig_prb_Num; + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_Start[j] = discRxPoolPS_ResourceConfig_prb_Start; + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_End[j] = discRxPoolPS_ResourceConfig_prb_End; + + if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prNothing")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING; + } else if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prSmall")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12; + } else if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prLarge")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n", + RC.config_file_name, i, discRxPoolPS_ResourceConfig_offsetIndicator_present); + + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_choice[j] = discRxPoolPS_ResourceConfig_offsetIndicator_choice; + + if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prNothing")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING; + } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs4")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12; + } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs8")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12; + } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs12")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12; + } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs16")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12; + } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs30")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12; + } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs40")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12; + } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs42")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n", + RC.config_file_name, i, discRxPoolPS_ResourceConfig_subframeBitmap_present); + + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf; + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size; + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused; + } } - //TTN - for D2D - //SIB18 - if (strcmp(rxPool_sc_CP_Len,"normal")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_CP_Len[j] = SL_CP_Len_r12_normal; - } else if (strcmp(rxPool_sc_CP_Len,"extended")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_CP_Len[j] = SL_CP_Len_r12_extended; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_CP_Len choice: normal,extended!\n", - RC.config_file_name, i, rxPool_sc_CP_Len); - - if (strcmp(rxPool_sc_Period,"sf40")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf40; - } else if (strcmp(rxPool_sc_Period,"sf60")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf60; - } else if (strcmp(rxPool_sc_Period,"sf70")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf70; - } else if (strcmp(rxPool_sc_Period,"sf80")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf80; - } else if (strcmp(rxPool_sc_Period,"sf120")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf120; - } else if (strcmp(rxPool_sc_Period,"sf140")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf140; - } else if (strcmp(rxPool_sc_Period,"sf160")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf160; - } else if (strcmp(rxPool_sc_Period,"sf240")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf240; - } else if (strcmp(rxPool_sc_Period,"sf280")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf280; - } else if (strcmp(rxPool_sc_Period,"sf320")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf320; - } else if (strcmp(rxPool_sc_Period,"spare6")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare6; - } else if (strcmp(rxPool_sc_Period,"spare5")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare5; - } else if (strcmp(rxPool_sc_Period,"spare4")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare4; - } else if (strcmp(rxPool_sc_Period,"spare3")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare3; - } else if (strcmp(rxPool_sc_Period,"spare2")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare2; - } else if (strcmp(rxPool_sc_Period,"spare")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_Period choice: sf40,sf60,sf70,sf80,sf120,sf140,sf160,sf240,sf280,sf320,spare6,spare5,spare4,spare3,spare2,spare!\n", - RC.config_file_name, i, rxPool_sc_Period); - - if (strcmp(rxPool_data_CP_Len,"normal")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_data_CP_Len[j] = SL_CP_Len_r12_normal; - } else if (strcmp(rxPool_data_CP_Len,"extended")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_data_CP_Len[j] = SL_CP_Len_r12_extended; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_data_CP_Len choice: normal,extended!\n", - RC.config_file_name, i, rxPool_data_CP_Len); - - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_Num[j] = rxPool_ResourceConfig_prb_Num; - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_Start[j] = rxPool_ResourceConfig_prb_Start; - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_End[j] = rxPool_ResourceConfig_prb_End; - - if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING; - } else if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12; - } else if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prLarge")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n", - RC.config_file_name, i, rxPool_ResourceConfig_offsetIndicator_present); - - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_choice[j] = rxPool_ResourceConfig_offsetIndicator_choice; - - if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING; - } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12; - } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs8")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12; - } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs12")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12; - } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs16")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12; - } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs30")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12; - } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs40")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12; - } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs42")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n", - RC.config_file_name, i, rxPool_ResourceConfig_subframeBitmap_present); - - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_buf; - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_size[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_size; - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused; - - //SIB19 - for discRxPool - if (strcmp(discRxPool_cp_Len,"normal")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_cp_Len[j] = SL_CP_Len_r12_normal; - } else if (strcmp(discRxPool_cp_Len,"extended")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_cp_Len[j] = SL_CP_Len_r12_extended; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_cp_Len choice: normal,extended!\n", - RC.config_file_name, i, discRxPool_cp_Len); - - - if (strcmp(discRxPool_discPeriod,"rf32")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf32; - } else if (strcmp(discRxPool_discPeriod,"rf64")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf64; - } else if (strcmp(discRxPool_discPeriod,"rf128")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf128; - } else if (strcmp(discRxPool_discPeriod,"rf256")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf256; - } else if (strcmp(discRxPool_discPeriod,"rf512")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf512; - } else if (strcmp(discRxPool_discPeriod,"rf1024")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf1024; - } else if (strcmp(discRxPool_discPeriod,"rf16")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf16_v1310; - } else if (strcmp(discRxPool_discPeriod,"spare")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_spare; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n", - RC.config_file_name, i, discRxPool_discPeriod); - - - - RRC_CONFIGURATION_REQ (msg_p).discRxPool_numRetx[j] = discRxPool_numRetx; - RRC_CONFIGURATION_REQ (msg_p).discRxPool_numRepetition[j] = discRxPool_numRepetition; - - - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_Num[j] = discRxPool_ResourceConfig_prb_Num; - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_Start[j] = discRxPool_ResourceConfig_prb_Start; - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_End[j] = discRxPool_ResourceConfig_prb_End; - - if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING; - } else if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12; - } else if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prLarge")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n", - RC.config_file_name, i, discRxPool_ResourceConfig_offsetIndicator_present); - - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_choice[j] = discRxPool_ResourceConfig_offsetIndicator_choice; - - if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING; - } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12; - } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs8")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12; - } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs12")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12; - } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs16")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12; - } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs30")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12; - } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs40")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12; - } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs42")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n", - RC.config_file_name, i, discRxPool_ResourceConfig_subframeBitmap_present); - - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf; - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_size; - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused; - - //SIB19 - For discRxPoolPS - if (strcmp(discRxPoolPS_cp_Len,"normal")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_cp_Len[j] = SL_CP_Len_r12_normal; - } else if (strcmp(discRxPoolPS_cp_Len,"extended")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_cp_Len[j] = SL_CP_Len_r12_extended; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_cp_Len choice: normal,extended!\n", - RC.config_file_name, i, discRxPoolPS_cp_Len); - - - if (strcmp(discRxPoolPS_discPeriod,"rf32")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf32; - } else if (strcmp(discRxPoolPS_discPeriod,"rf64")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf64; - } else if (strcmp(discRxPoolPS_discPeriod,"rf128")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf128; - } else if (strcmp(discRxPoolPS_discPeriod,"rf256")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf256; - } else if (strcmp(discRxPoolPS_discPeriod,"rf512")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf512; - } else if (strcmp(discRxPoolPS_discPeriod,"rf1024")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf1024; - } else if (strcmp(discRxPoolPS_discPeriod,"rf16")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf16_v1310; - } else if (strcmp(discRxPoolPS_discPeriod,"spare")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_spare; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n", - RC.config_file_name, i, discRxPoolPS_discPeriod); - - - - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_numRetx[j] = discRxPoolPS_numRetx; - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_numRepetition[j] = discRxPoolPS_numRepetition; - - - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_Num[j] = discRxPoolPS_ResourceConfig_prb_Num; - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_Start[j] = discRxPoolPS_ResourceConfig_prb_Start; - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_End[j] = discRxPoolPS_ResourceConfig_prb_End; - - if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prNothing")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING; - } else if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prSmall")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12; - } else if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prLarge")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n", - RC.config_file_name, i, discRxPoolPS_ResourceConfig_offsetIndicator_present); - - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_choice[j] = discRxPoolPS_ResourceConfig_offsetIndicator_choice; - - if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prNothing")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING; - } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs4")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12; - } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs8")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12; - } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs12")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12; - } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs16")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12; - } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs30")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12; - } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs40")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12; - } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs42")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n", - RC.config_file_name, i, discRxPoolPS_ResourceConfig_subframeBitmap_present); - - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf; - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size; - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused; - - - } - } - char srb1path[MAX_OPTNAME_SIZE*2 + 8]; - sprintf(srb1path,"%s.%s",enbpath,ENB_CONFIG_STRING_SRB1); - int npar = config_get( SRB1Params,sizeof(SRB1Params)/sizeof(paramdef_t), srb1path); - if (npar == sizeof(SRB1Params)/sizeof(paramdef_t)) { - switch (srb1_max_retx_threshold) { - case 1: - rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t1; - break; - - case 2: - rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t2; - break; - - case 3: - rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t3; - break; - - case 4: - rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t4; - break; - - case 6: - rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t6; - break; - - case 8: - rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t8; - break; - - case 16: - rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t16; - break; - - case 32: - rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t32; - break; - - default: - AssertFatal (0, - "Bad config value when parsing eNB configuration file %s, enb %d srb1_max_retx_threshold %u!\n", - RC.config_file_name, i, srb1_max_retx_threshold); - } - - - switch (srb1_poll_pdu) { - case 4: - rrc->srb1_poll_pdu = PollPDU_p4; - break; - - case 8: - rrc->srb1_poll_pdu = PollPDU_p8; - break; - - case 16: - rrc->srb1_poll_pdu = PollPDU_p16; - break; - - case 32: - rrc->srb1_poll_pdu = PollPDU_p32; - break; - - case 64: - rrc->srb1_poll_pdu = PollPDU_p64; - break; - - case 128: - rrc->srb1_poll_pdu = PollPDU_p128; - break; - - case 256: - rrc->srb1_poll_pdu = PollPDU_p256; - break; - - default: - if (srb1_poll_pdu >= 10000) - rrc->srb1_poll_pdu = PollPDU_pInfinity; - else - AssertFatal (0, - "Bad config value when parsing eNB configuration file %s, enb %d srb1_poll_pdu %u!\n", - RC.config_file_name, i, srb1_poll_pdu); - } - - rrc->srb1_poll_byte = srb1_poll_byte; - - switch (srb1_poll_byte) { - case 25: - rrc->srb1_poll_byte = PollByte_kB25; - break; - - case 50: - rrc->srb1_poll_byte = PollByte_kB50; - break; - - case 75: - rrc->srb1_poll_byte = PollByte_kB75; - break; - - case 100: - rrc->srb1_poll_byte = PollByte_kB100; - break; - - case 125: - rrc->srb1_poll_byte = PollByte_kB125; - break; - - case 250: - rrc->srb1_poll_byte = PollByte_kB250; - break; - - case 375: - rrc->srb1_poll_byte = PollByte_kB375; - break; - - case 500: - rrc->srb1_poll_byte = PollByte_kB500; - break; - - case 750: - rrc->srb1_poll_byte = PollByte_kB750; - break; - - case 1000: - rrc->srb1_poll_byte = PollByte_kB1000; - break; - - case 1250: - rrc->srb1_poll_byte = PollByte_kB1250; - break; - - case 1500: - rrc->srb1_poll_byte = PollByte_kB1500; - break; - - case 2000: - rrc->srb1_poll_byte = PollByte_kB2000; - break; - - case 3000: - rrc->srb1_poll_byte = PollByte_kB3000; - break; - - default: - if (srb1_poll_byte >= 10000) - rrc->srb1_poll_byte = PollByte_kBinfinity; - else - AssertFatal (0, - "Bad config value when parsing eNB configuration file %s, enb %d srb1_poll_byte %u!\n", - RC.config_file_name, i, srb1_poll_byte); - } - - if (srb1_timer_poll_retransmit <= 250) { - rrc->srb1_timer_poll_retransmit = (srb1_timer_poll_retransmit - 5)/5; - } else if (srb1_timer_poll_retransmit <= 500) { - rrc->srb1_timer_poll_retransmit = (srb1_timer_poll_retransmit - 300)/50 + 50; - } else { - AssertFatal (0, - "Bad config value when parsing eNB configuration file %s, enb %d srb1_timer_poll_retransmit %u!\n", - RC.config_file_name, i, srb1_timer_poll_retransmit); - } - - if (srb1_timer_status_prohibit <= 250) { - rrc->srb1_timer_status_prohibit = srb1_timer_status_prohibit/5; - } else if ((srb1_timer_poll_retransmit >= 300) && (srb1_timer_poll_retransmit <= 500)) { - rrc->srb1_timer_status_prohibit = (srb1_timer_status_prohibit - 300)/50 + 51; - } else { - AssertFatal (0, - "Bad config value when parsing eNB configuration file %s, enb %d srb1_timer_status_prohibit %u!\n", - RC.config_file_name, i, srb1_timer_status_prohibit); - } - - switch (srb1_timer_reordering) { - case 0: - rrc->srb1_timer_reordering = T_Reordering_ms0; - break; - - case 5: - rrc->srb1_timer_reordering = T_Reordering_ms5; - break; - - case 10: - rrc->srb1_timer_reordering = T_Reordering_ms10; - break; - - case 15: - rrc->srb1_timer_reordering = T_Reordering_ms15; - break; - - case 20: - rrc->srb1_timer_reordering = T_Reordering_ms20; - break; - - case 25: - rrc->srb1_timer_reordering = T_Reordering_ms25; - break; - - case 30: - rrc->srb1_timer_reordering = T_Reordering_ms30; - break; - - case 35: - rrc->srb1_timer_reordering = T_Reordering_ms35; - break; - - case 40: - rrc->srb1_timer_reordering = T_Reordering_ms40; - break; - - case 45: - rrc->srb1_timer_reordering = T_Reordering_ms45; - break; - - case 50: - rrc->srb1_timer_reordering = T_Reordering_ms50; - break; - - case 55: - rrc->srb1_timer_reordering = T_Reordering_ms55; - break; - - case 60: - rrc->srb1_timer_reordering = T_Reordering_ms60; - break; - - case 65: - rrc->srb1_timer_reordering = T_Reordering_ms65; - break; - - case 70: - rrc->srb1_timer_reordering = T_Reordering_ms70; - break; - - case 75: - rrc->srb1_timer_reordering = T_Reordering_ms75; - break; - - case 80: - rrc->srb1_timer_reordering = T_Reordering_ms80; - break; - - case 85: - rrc->srb1_timer_reordering = T_Reordering_ms85; - break; - - case 90: - rrc->srb1_timer_reordering = T_Reordering_ms90; - break; - - case 95: - rrc->srb1_timer_reordering = T_Reordering_ms95; - break; - - case 100: - rrc->srb1_timer_reordering = T_Reordering_ms100; - break; - - case 110: - rrc->srb1_timer_reordering = T_Reordering_ms110; - break; - - case 120: - rrc->srb1_timer_reordering = T_Reordering_ms120; - break; - - case 130: - rrc->srb1_timer_reordering = T_Reordering_ms130; - break; - - case 140: - rrc->srb1_timer_reordering = T_Reordering_ms140; - break; - - case 150: - rrc->srb1_timer_reordering = T_Reordering_ms150; - break; - - case 160: - rrc->srb1_timer_reordering = T_Reordering_ms160; - break; - - case 170: - rrc->srb1_timer_reordering = T_Reordering_ms170; - break; - - case 180: - rrc->srb1_timer_reordering = T_Reordering_ms180; - break; - - case 190: - rrc->srb1_timer_reordering = T_Reordering_ms190; - break; - - case 200: - rrc->srb1_timer_reordering = T_Reordering_ms200; - break; - - default: - AssertFatal (0, - "Bad config value when parsing eNB configuration file %s, enb %d srb1_timer_reordering %u!\n", - RC.config_file_name, i, srb1_timer_reordering); - } - - } else { - rrc->srb1_timer_poll_retransmit = T_PollRetransmit_ms80; - rrc->srb1_timer_reordering = T_Reordering_ms35; - rrc->srb1_timer_status_prohibit = T_StatusProhibit_ms0; - rrc->srb1_poll_pdu = PollPDU_p4; - rrc->srb1_poll_byte = PollByte_kBinfinity; - rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t8; - } - - /* - // Network Controller - subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_NETWORK_CONTROLLER_CONFIG); - - if (subsetting != NULL) { - if ( ( - config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_INTERFACE_NAME, - (const char **)&flexran_agent_interface_name) - && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_IPV4_ADDRESS, - (const char **)&flexran_agent_ipv4_address) - && config_setting_lookup_int(subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_PORT, - &flexran_agent_port) - && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_CACHE, - (const char **)&flexran_agent_cache) - ) - ) { - enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_interface_name = strdup(flexran_agent_interface_name); - cidr = flexran_agent_ipv4_address; - address = strtok(cidr, "/"); - //enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_ipv4_address = strdup(address); - if (address) { - IPV4_STR_ADDR_TO_INT_NWBO (address, enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_ipv4_address, "BAD IP ADDRESS FORMAT FOR eNB Agent !\n" ); - } - - enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_port = flexran_agent_port; - enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_cache = strdup(flexran_agent_cache); - } - } - */ - break; - } - + char srb1path[MAX_OPTNAME_SIZE*2 + 8]; + sprintf(srb1path,"%s.%s",enbpath,ENB_CONFIG_STRING_SRB1); + int npar = config_get( SRB1Params,sizeof(SRB1Params)/sizeof(paramdef_t), srb1path); + + if (npar == sizeof(SRB1Params)/sizeof(paramdef_t)) { + switch (srb1_max_retx_threshold) { + case 1: + rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t1; + break; + + case 2: + rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t2; + break; + + case 3: + rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t3; + break; + + case 4: + rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t4; + break; + + case 6: + rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t6; + break; + + case 8: + rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t8; + break; + + case 16: + rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t16; + break; + + case 32: + rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t32; + break; + + default: + AssertFatal (0, + "Bad config value when parsing eNB configuration file %s, enb %d srb1_max_retx_threshold %u!\n", + RC.config_file_name, i, srb1_max_retx_threshold); + } + + switch (srb1_poll_pdu) { + case 4: + rrc->srb1_poll_pdu = PollPDU_p4; + break; + + case 8: + rrc->srb1_poll_pdu = PollPDU_p8; + break; + + case 16: + rrc->srb1_poll_pdu = PollPDU_p16; + break; + + case 32: + rrc->srb1_poll_pdu = PollPDU_p32; + break; + + case 64: + rrc->srb1_poll_pdu = PollPDU_p64; + break; + + case 128: + rrc->srb1_poll_pdu = PollPDU_p128; + break; + + case 256: + rrc->srb1_poll_pdu = PollPDU_p256; + break; + + default: + if (srb1_poll_pdu >= 10000) + rrc->srb1_poll_pdu = PollPDU_pInfinity; + else + AssertFatal (0, + "Bad config value when parsing eNB configuration file %s, enb %d srb1_poll_pdu %u!\n", + RC.config_file_name, i, srb1_poll_pdu); + } + + rrc->srb1_poll_byte = srb1_poll_byte; + + switch (srb1_poll_byte) { + case 25: + rrc->srb1_poll_byte = PollByte_kB25; + break; + + case 50: + rrc->srb1_poll_byte = PollByte_kB50; + break; + + case 75: + rrc->srb1_poll_byte = PollByte_kB75; + break; + + case 100: + rrc->srb1_poll_byte = PollByte_kB100; + break; + + case 125: + rrc->srb1_poll_byte = PollByte_kB125; + break; + + case 250: + rrc->srb1_poll_byte = PollByte_kB250; + break; + + case 375: + rrc->srb1_poll_byte = PollByte_kB375; + break; + + case 500: + rrc->srb1_poll_byte = PollByte_kB500; + break; + + case 750: + rrc->srb1_poll_byte = PollByte_kB750; + break; + + case 1000: + rrc->srb1_poll_byte = PollByte_kB1000; + break; + + case 1250: + rrc->srb1_poll_byte = PollByte_kB1250; + break; + + case 1500: + rrc->srb1_poll_byte = PollByte_kB1500; + break; + + case 2000: + rrc->srb1_poll_byte = PollByte_kB2000; + break; + + case 3000: + rrc->srb1_poll_byte = PollByte_kB3000; + break; + + default: + if (srb1_poll_byte >= 10000) + rrc->srb1_poll_byte = PollByte_kBinfinity; + else + AssertFatal (0, + "Bad config value when parsing eNB configuration file %s, enb %d srb1_poll_byte %u!\n", + RC.config_file_name, i, srb1_poll_byte); + } + + if (srb1_timer_poll_retransmit <= 250) { + rrc->srb1_timer_poll_retransmit = (srb1_timer_poll_retransmit - 5)/5; + } else if (srb1_timer_poll_retransmit <= 500) { + rrc->srb1_timer_poll_retransmit = (srb1_timer_poll_retransmit - 300)/50 + 50; + } else { + AssertFatal (0, + "Bad config value when parsing eNB configuration file %s, enb %d srb1_timer_poll_retransmit %u!\n", + RC.config_file_name, i, srb1_timer_poll_retransmit); + } + + if (srb1_timer_status_prohibit <= 250) { + rrc->srb1_timer_status_prohibit = srb1_timer_status_prohibit/5; + } else if ((srb1_timer_poll_retransmit >= 300) && (srb1_timer_poll_retransmit <= 500)) { + rrc->srb1_timer_status_prohibit = (srb1_timer_status_prohibit - 300)/50 + 51; + } else { + AssertFatal (0, + "Bad config value when parsing eNB configuration file %s, enb %d srb1_timer_status_prohibit %u!\n", + RC.config_file_name, i, srb1_timer_status_prohibit); + } + + switch (srb1_timer_reordering) { + case 0: + rrc->srb1_timer_reordering = T_Reordering_ms0; + break; + + case 5: + rrc->srb1_timer_reordering = T_Reordering_ms5; + break; + + case 10: + rrc->srb1_timer_reordering = T_Reordering_ms10; + break; + + case 15: + rrc->srb1_timer_reordering = T_Reordering_ms15; + break; + + case 20: + rrc->srb1_timer_reordering = T_Reordering_ms20; + break; + + case 25: + rrc->srb1_timer_reordering = T_Reordering_ms25; + break; + + case 30: + rrc->srb1_timer_reordering = T_Reordering_ms30; + break; + + case 35: + rrc->srb1_timer_reordering = T_Reordering_ms35; + break; + + case 40: + rrc->srb1_timer_reordering = T_Reordering_ms40; + break; + + case 45: + rrc->srb1_timer_reordering = T_Reordering_ms45; + break; + + case 50: + rrc->srb1_timer_reordering = T_Reordering_ms50; + break; + + case 55: + rrc->srb1_timer_reordering = T_Reordering_ms55; + break; + + case 60: + rrc->srb1_timer_reordering = T_Reordering_ms60; + break; + + case 65: + rrc->srb1_timer_reordering = T_Reordering_ms65; + break; + + case 70: + rrc->srb1_timer_reordering = T_Reordering_ms70; + break; + + case 75: + rrc->srb1_timer_reordering = T_Reordering_ms75; + break; + + case 80: + rrc->srb1_timer_reordering = T_Reordering_ms80; + break; + + case 85: + rrc->srb1_timer_reordering = T_Reordering_ms85; + break; + + case 90: + rrc->srb1_timer_reordering = T_Reordering_ms90; + break; + + case 95: + rrc->srb1_timer_reordering = T_Reordering_ms95; + break; + + case 100: + rrc->srb1_timer_reordering = T_Reordering_ms100; + break; + + case 110: + rrc->srb1_timer_reordering = T_Reordering_ms110; + break; + + case 120: + rrc->srb1_timer_reordering = T_Reordering_ms120; + break; + + case 130: + rrc->srb1_timer_reordering = T_Reordering_ms130; + break; + + case 140: + rrc->srb1_timer_reordering = T_Reordering_ms140; + break; + + case 150: + rrc->srb1_timer_reordering = T_Reordering_ms150; + break; + + case 160: + rrc->srb1_timer_reordering = T_Reordering_ms160; + break; + + case 170: + rrc->srb1_timer_reordering = T_Reordering_ms170; + break; + + case 180: + rrc->srb1_timer_reordering = T_Reordering_ms180; + break; + + case 190: + rrc->srb1_timer_reordering = T_Reordering_ms190; + break; + + case 200: + rrc->srb1_timer_reordering = T_Reordering_ms200; + break; + + default: + AssertFatal (0, + "Bad config value when parsing eNB configuration file %s, enb %d srb1_timer_reordering %u!\n", + RC.config_file_name, i, srb1_timer_reordering); + } + } else { + rrc->srb1_timer_poll_retransmit = T_PollRetransmit_ms80; + rrc->srb1_timer_reordering = T_Reordering_ms35; + rrc->srb1_timer_status_prohibit = T_StatusProhibit_ms0; + rrc->srb1_poll_pdu = PollPDU_p4; + rrc->srb1_poll_byte = PollByte_kBinfinity; + rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t8; + } + + /* + // Network Controller + subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_NETWORK_CONTROLLER_CONFIG); + + if (subsetting != NULL) { + if ( ( + config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_INTERFACE_NAME, + (const char **)&flexran_agent_interface_name) + && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_IPV4_ADDRESS, + (const char **)&flexran_agent_ipv4_address) + && config_setting_lookup_int(subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_PORT, + &flexran_agent_port) + && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_CACHE, + (const char **)&flexran_agent_cache) + ) + ) { + enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_interface_name = strdup(flexran_agent_interface_name); + cidr = flexran_agent_ipv4_address; + address = strtok(cidr, "/"); + //enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_ipv4_address = strdup(address); + if (address) { + IPV4_STR_ADDR_TO_INT_NWBO (address, enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_ipv4_address, "BAD IP ADDRESS FORMAT FOR eNB Agent !\n" ); + } + + enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_port = flexran_agent_port; + enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_cache = strdup(flexran_agent_cache); + } + } + */ + break; + } } } -return 0; + + return 0; } int RCconfig_gtpu(void ) { - int num_enbs = 0; - - - - char* enb_interface_name_for_S1U = NULL; - char* enb_ipv4_address_for_S1U = NULL; + char *enb_interface_name_for_S1U = NULL; + char *enb_ipv4_address_for_S1U = NULL; uint32_t enb_port_for_S1U = 0; char *address = NULL; char *cidr = NULL; char gtpupath[MAX_OPTNAME_SIZE*2 + 8]; - - paramdef_t ENBSParams[] = ENBSPARAMS_DESC; - paramdef_t GTPUParams[] = GTPUPARAMS_DESC; LOG_I(GTPU,"Configuring GTPu\n"); -/* get number of active eNodeBs */ - config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); + /* get number of active eNodeBs */ + config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); num_enbs = ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt; AssertFatal (num_enbs >0, - "Failed to parse config file no active eNodeBs in %s \n", ENB_CONFIG_STRING_ACTIVE_ENBS); - - + "Failed to parse config file no active eNodeBs in %s \n", ENB_CONFIG_STRING_ACTIVE_ENBS); sprintf(gtpupath,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,0,ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG); - config_get( GTPUParams,sizeof(GTPUParams)/sizeof(paramdef_t),gtpupath); + config_get( GTPUParams,sizeof(GTPUParams)/sizeof(paramdef_t),gtpupath); + cidr = enb_ipv4_address_for_S1U; + address = strtok(cidr, "/"); + if (address) { + MessageDef *message; + AssertFatal((message = itti_alloc_new_message(TASK_ENB_APP, GTPV1U_ENB_S1_REQ))!=NULL,""); + IPV4_STR_ADDR_TO_INT_NWBO ( address, GTPV1U_ENB_S1_REQ(message).enb_ip_address_for_S1u_S12_S4_up, "BAD IP ADDRESS FORMAT FOR eNB S1_U !\n" ); + LOG_I(GTPU,"Configuring GTPu address : %s -> %x\n",address,GTPV1U_ENB_S1_REQ(message).enb_ip_address_for_S1u_S12_S4_up); + GTPV1U_ENB_S1_REQ(message).enb_port_for_S1u_S12_S4_up = enb_port_for_S1U; + itti_send_msg_to_task (TASK_GTPV1_U, 0, message); // data model is wrong: gtpu doesn't have enb_id (or module_id) + } else + LOG_E(GTPU,"invalid address for S1U\n"); - - cidr = enb_ipv4_address_for_S1U; - address = strtok(cidr, "/"); - - if (address) { - IPV4_STR_ADDR_TO_INT_NWBO ( address, RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up, "BAD IP ADDRESS FORMAT FOR eNB S1_U !\n" ); - - LOG_I(GTPU,"Configuring GTPu address : %s -> %x\n",address,RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up); - - } - - RC.gtpv1u_data_g->enb_port_for_S1u_S12_S4_up = enb_port_for_S1U; -return 0; + return 0; } int RCconfig_S1(MessageDef *msg_p, uint32_t i) { - int j,k = 0; - - int enb_id; - int32_t my_int; - - - - const char* active_enb[MAX_ENB]; - - + const char *active_enb[MAX_ENB]; char *address = NULL; char *cidr = NULL; - - - // for no gcc warnings - + // for no gcc warnings (void)my_int; - - memset((char*)active_enb, 0 , MAX_ENB * sizeof(char*)); - + memset((char *)active_enb, 0, MAX_ENB * sizeof(char *)); paramdef_t ENBSParams[] = ENBSPARAMS_DESC; - paramdef_t ENBParams[] = ENBPARAMS_DESC; paramlist_def_t ENBParamList = {ENB_CONFIG_STRING_ENB_LIST,NULL,0}; - -/* get global parameters, defined outside any section in the config file */ - + /* get global parameters, defined outside any section in the config file */ config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); - + AssertFatal (i0) { // Output a list of all eNBs. - config_getlist( &ENBParamList,ENBParams,sizeof(ENBParams)/sizeof(paramdef_t),NULL); - - - - - + config_getlist( &ENBParamList,ENBParams,sizeof(ENBParams)/sizeof(paramdef_t),NULL); + if (ENBParamList.numelt > 0) { for (k = 0; k < ENBParamList.numelt; k++) { - if (ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr == NULL) { - // Calculate a default eNB ID + if (ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr == NULL) { + // Calculate a default eNB ID + if (EPC_MODE_ENABLED) { + uint32_t hash; + hash = s1ap_generate_eNB_id (); + enb_id = k + (hash & 0xFFFF8); + } else { + enb_id = k; + } + } else { + enb_id = *(ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr); + } - if (EPC_MODE_ENABLED) { - uint32_t hash; - - hash = s1ap_generate_eNB_id (); - enb_id = k + (hash & 0xFFFF8); - } else { - enb_id = k; - } - } else { - enb_id = *(ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr); - } - - - // search if in active list - for (j=0; j < ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt; j++) { - if (strcmp(ENBSParams[ENB_ACTIVE_ENBS_IDX].strlistptr[j], *(ENBParamList.paramarray[k][ENB_ENB_NAME_IDX].strptr)) == 0) { - paramdef_t S1Params[] = S1PARAMS_DESC; - paramlist_def_t S1ParamList = {ENB_CONFIG_STRING_MME_IP_ADDRESS,NULL,0}; + // search if in active list + for (j=0; j < ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt; j++) { + if (strcmp(ENBSParams[ENB_ACTIVE_ENBS_IDX].strlistptr[j], *(ENBParamList.paramarray[k][ENB_ENB_NAME_IDX].strptr)) == 0) { + paramdef_t S1Params[] = S1PARAMS_DESC; + paramlist_def_t S1ParamList = {ENB_CONFIG_STRING_MME_IP_ADDRESS,NULL,0}; + paramdef_t SCTPParams[] = SCTPPARAMS_DESC; + paramdef_t NETParams[] = NETPARAMS_DESC; + char aprefix[MAX_OPTNAME_SIZE*2 + 8]; + S1AP_REGISTER_ENB_REQ (msg_p).eNB_id = enb_id; - paramdef_t SCTPParams[] = SCTPPARAMS_DESC; - paramdef_t NETParams[] = NETPARAMS_DESC; - char aprefix[MAX_OPTNAME_SIZE*2 + 8]; - - S1AP_REGISTER_ENB_REQ (msg_p).eNB_id = enb_id; - - if (strcmp(*(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr), "CELL_MACRO_ENB") == 0) { - S1AP_REGISTER_ENB_REQ (msg_p).cell_type = CELL_MACRO_ENB; - } else if (strcmp(*(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr), "CELL_HOME_ENB") == 0) { - S1AP_REGISTER_ENB_REQ (msg_p).cell_type = CELL_HOME_ENB; - } else { - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n", - RC.config_file_name, i, *(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr)); - } - - S1AP_REGISTER_ENB_REQ (msg_p).eNB_name = strdup(*(ENBParamList.paramarray[k][ENB_ENB_NAME_IDX].strptr)); - S1AP_REGISTER_ENB_REQ (msg_p).tac = (uint16_t)atoi(*(ENBParamList.paramarray[k][ENB_TRACKING_AREA_CODE_IDX].strptr)); - S1AP_REGISTER_ENB_REQ (msg_p).mcc = (uint16_t)atoi(*(ENBParamList.paramarray[k][ENB_MOBILE_COUNTRY_CODE_IDX].strptr)); - S1AP_REGISTER_ENB_REQ (msg_p).mnc = (uint16_t)atoi(*(ENBParamList.paramarray[k][ENB_MOBILE_NETWORK_CODE_IDX].strptr)); - S1AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length = strlen(*(ENBParamList.paramarray[k][ENB_MOBILE_NETWORK_CODE_IDX].strptr)); - S1AP_REGISTER_ENB_REQ (msg_p).default_drx = 0; - AssertFatal((S1AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length == 2) || - (S1AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length == 3), - "BAD MNC DIGIT LENGTH %d", - S1AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length); - - sprintf(aprefix,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k); - config_getlist( &S1ParamList,S1Params,sizeof(S1Params)/sizeof(paramdef_t),aprefix); - - S1AP_REGISTER_ENB_REQ (msg_p).nb_mme = 0; + if (strcmp(*(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr), "CELL_MACRO_ENB") == 0) { + S1AP_REGISTER_ENB_REQ (msg_p).cell_type = CELL_MACRO_ENB; + } else if (strcmp(*(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr), "CELL_HOME_ENB") == 0) { + S1AP_REGISTER_ENB_REQ (msg_p).cell_type = CELL_HOME_ENB; + } else { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n", + RC.config_file_name, i, *(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr)); + } - for (int l = 0; l < S1ParamList.numelt; l++) { + S1AP_REGISTER_ENB_REQ (msg_p).eNB_name = strdup(*(ENBParamList.paramarray[k][ENB_ENB_NAME_IDX].strptr)); + S1AP_REGISTER_ENB_REQ (msg_p).tac = (uint16_t)atoi(*(ENBParamList.paramarray[k][ENB_TRACKING_AREA_CODE_IDX].strptr)); + S1AP_REGISTER_ENB_REQ (msg_p).mcc = (uint16_t)atoi(*(ENBParamList.paramarray[k][ENB_MOBILE_COUNTRY_CODE_IDX].strptr)); + S1AP_REGISTER_ENB_REQ (msg_p).mnc = (uint16_t)atoi(*(ENBParamList.paramarray[k][ENB_MOBILE_NETWORK_CODE_IDX].strptr)); + S1AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length = strlen(*(ENBParamList.paramarray[k][ENB_MOBILE_NETWORK_CODE_IDX].strptr)); + S1AP_REGISTER_ENB_REQ (msg_p).default_drx = 0; + AssertFatal((S1AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length == 2) || + (S1AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length == 3), + "BAD MNC DIGIT LENGTH %d", + S1AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length); + sprintf(aprefix,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k); + config_getlist( &S1ParamList,S1Params,sizeof(S1Params)/sizeof(paramdef_t),aprefix); + S1AP_REGISTER_ENB_REQ (msg_p).nb_mme = 0; - S1AP_REGISTER_ENB_REQ (msg_p).nb_mme += 1; + for (int l = 0; l < S1ParamList.numelt; l++) { + S1AP_REGISTER_ENB_REQ (msg_p).nb_mme += 1; + strcpy(S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4_address,*(S1ParamList.paramarray[l][ENB_MME_IPV4_ADDRESS_IDX].strptr)); + strcpy(S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6_address,*(S1ParamList.paramarray[l][ENB_MME_IPV6_ADDRESS_IDX].strptr)); - strcpy(S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4_address,*(S1ParamList.paramarray[l][ENB_MME_IPV4_ADDRESS_IDX].strptr)); - strcpy(S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6_address,*(S1ParamList.paramarray[l][ENB_MME_IPV6_ADDRESS_IDX].strptr)); + if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv4") == 0) { + S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4 = 1; + } else if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv6") == 0) { + S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6 = 1; + } else if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_PREFERENCE_IDX].strptr), "no") == 0) { + S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4 = 1; + S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6 = 1; + } + } + // SCTP SETTING + S1AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = SCTP_OUT_STREAMS; + S1AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = SCTP_IN_STREAMS; - if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv4") == 0) { - S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4 = 1; - } else if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv6") == 0) { - S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6 = 1; - } else if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_PREFERENCE_IDX].strptr), "no") == 0) { - S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4 = 1; - S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6 = 1; - } - } - - - // SCTP SETTING - S1AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = SCTP_OUT_STREAMS; - S1AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = SCTP_IN_STREAMS; if (EPC_MODE_ENABLED) { - sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_SCTP_CONFIG); - config_get( SCTPParams,sizeof(SCTPParams)/sizeof(paramdef_t),aprefix); + sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_SCTP_CONFIG); + config_get( SCTPParams,sizeof(SCTPParams)/sizeof(paramdef_t),aprefix); S1AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[ENB_SCTP_INSTREAMS_IDX].uptr); S1AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = (uint16_t)*(SCTPParams[ENB_SCTP_OUTSTREAMS_IDX].uptr); - } + } sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG); - // NETWORK_INTERFACES - config_get( NETParams,sizeof(NETParams)/sizeof(paramdef_t),aprefix); - - // S1AP_REGISTER_ENB_REQ (msg_p).enb_interface_name_for_S1U = strdup(enb_interface_name_for_S1U); - cidr = *(NETParams[ENB_IPV4_ADDRESS_FOR_S1_MME_IDX].strptr); - address = strtok(cidr, "/"); - - S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv6 = 0; - S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv4 = 1; - - strcpy(S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv4_address, address); - - break; - } - } + // NETWORK_INTERFACES + config_get( NETParams,sizeof(NETParams)/sizeof(paramdef_t),aprefix); + // S1AP_REGISTER_ENB_REQ (msg_p).enb_interface_name_for_S1U = strdup(enb_interface_name_for_S1U); + cidr = *(NETParams[ENB_IPV4_ADDRESS_FOR_S1_MME_IDX].strptr); + address = strtok(cidr, "/"); + S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv6 = 0; + S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv4 = 1; + strcpy(S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv4_address, address); + break; + } + } } } } -return 0; + + return 0; } -int RCconfig_X2(MessageDef *msg_p, uint32_t i) -{ +int RCconfig_X2(MessageDef *msg_p, uint32_t i) { int j, k, l; - int enb_id; - char *address = NULL; char *cidr = NULL; - paramdef_t ENBSParams[] = ENBSPARAMS_DESC; paramdef_t ENBParams[] = ENBPARAMS_DESC; paramlist_def_t ENBParamList = {ENB_CONFIG_STRING_ENB_LIST,NULL,0}; - /* get global parameters, defined outside any section in the config file */ config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); -/*#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME) - if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) { - asn_debug = 0; - asn1_xer_print = 0; - } else if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO) == 0) { - asn_debug = 1; - asn1_xer_print = 1; - } else if (strcasecmp(*(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr) , ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING) == 0) { - asn_debug = 1; - asn1_xer_print = 2; - } else { - asn_debug = 0; - asn1_xer_print = 0; - } -#endif */ - + /*#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME) + if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) { + asn_debug = 0; + asn1_xer_print = 0; + } else if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO) == 0) { + asn_debug = 1; + asn1_xer_print = 1; + } else if (strcasecmp(*(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr) , ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING) == 0) { + asn_debug = 1; + asn1_xer_print = 2; + } else { + asn_debug = 0; + asn1_xer_print = 0; + } + #endif */ AssertFatal(i < ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt, "Failed to parse config file %s, %uth attribute %s \n", RC.config_file_name, i, ENB_CONFIG_STRING_ACTIVE_ENBS); @@ -2370,13 +2199,13 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) if (ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt > 0) { // Output a list of all eNBs. config_getlist( &ENBParamList,ENBParams,sizeof(ENBParams)/sizeof(paramdef_t),NULL); + if (ENBParamList.numelt > 0) { for (k = 0; k < ENBParamList.numelt; k++) { if (ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr == NULL) { // Calculate a default eNB ID # if defined(ENABLE_USE_MME) uint32_t hash; - hash = s1ap_generate_eNB_id (); enb_id = k + (hash & 0xFFFF8); # else @@ -2389,16 +2218,12 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) // search if in active list for (j = 0; j < ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt; j++) { if (strcmp(ENBSParams[ENB_ACTIVE_ENBS_IDX].strlistptr[j], *(ENBParamList.paramarray[k][ENB_ENB_NAME_IDX].strptr)) == 0) { - paramdef_t X2Params[] = X2PARAMS_DESC; paramlist_def_t X2ParamList = {ENB_CONFIG_STRING_TARGET_ENB_X2_IP_ADDRESS,NULL,0}; - paramdef_t SCTPParams[] = SCTPPARAMS_DESC; paramdef_t NETParams[] = NETPARAMS_DESC; char aprefix[MAX_OPTNAME_SIZE*2 + 8]; - /* Some default/random parameters */ - X2AP_REGISTER_ENB_REQ (msg_p).eNB_id = enb_id; if (strcmp(*(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr), "CELL_MACRO_ENB") == 0) { @@ -2407,8 +2232,8 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) X2AP_REGISTER_ENB_REQ (msg_p).cell_type = CELL_HOME_ENB; } else { AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n", - RC.config_file_name, i, *(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr)); + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n", + RC.config_file_name, i, *(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr)); } X2AP_REGISTER_ENB_REQ (msg_p).eNB_name = strdup(*(ENBParamList.paramarray[k][ENB_ENB_NAME_IDX].strptr)); @@ -2416,24 +2241,22 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) X2AP_REGISTER_ENB_REQ (msg_p).mcc = (uint16_t)atoi(*(ENBParamList.paramarray[k][ENB_MOBILE_COUNTRY_CODE_IDX].strptr)); X2AP_REGISTER_ENB_REQ (msg_p).mnc = (uint16_t)atoi(*(ENBParamList.paramarray[k][ENB_MOBILE_NETWORK_CODE_IDX].strptr)); X2AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length = strlen(*(ENBParamList.paramarray[k][ENB_MOBILE_NETWORK_CODE_IDX].strptr)); - AssertFatal((X2AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length == 2) || (X2AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length == 3), "BAD MNC DIGIT LENGTH %d", X2AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length); - sprintf(aprefix,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k); config_getlist( &X2ParamList,X2Params,sizeof(X2Params)/sizeof(paramdef_t),aprefix); - if(X2ParamList.numelt>X2AP_MAX_NB_ENB_IP_ADDRESS){ - LOG_E(RRC,"value of X2ParamList.numelt %d must be lower than X2AP_MAX_NB_ENB_IP_ADDRESS %d value: reconsider to increase X2AP_MAX_NB_ENB_IP_ADDRESS\n",X2ParamList.numelt,X2AP_MAX_NB_ENB_IP_ADDRESS); - exit(1); - } + if(X2ParamList.numelt>X2AP_MAX_NB_ENB_IP_ADDRESS) { + LOG_E(RRC,"value of X2ParamList.numelt %d must be lower than X2AP_MAX_NB_ENB_IP_ADDRESS %d value: reconsider to increase X2AP_MAX_NB_ENB_IP_ADDRESS\n",X2ParamList.numelt,X2AP_MAX_NB_ENB_IP_ADDRESS); + exit(1); + } X2AP_REGISTER_ENB_REQ (msg_p).nb_x2 = 0; + for (l = 0; l < X2ParamList.numelt; l++) { X2AP_REGISTER_ENB_REQ (msg_p).nb_x2 += 1; - strcpy(X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv4_address,*(X2ParamList.paramarray[l][ENB_X2_IPV4_ADDRESS_IDX].strptr)); strcpy(X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv6_address,*(X2ParamList.paramarray[l][ENB_X2_IPV6_ADDRESS_IDX].strptr)); @@ -2456,12 +2279,9 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) X2AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[ENB_SCTP_INSTREAMS_IDX].uptr); X2AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = (uint16_t)*(SCTPParams[ENB_SCTP_OUTSTREAMS_IDX].uptr); #endif - sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG); - // NETWORK_INTERFACES config_get( NETParams,sizeof(NETParams)/sizeof(paramdef_t),aprefix); - X2AP_REGISTER_ENB_REQ (msg_p).enb_port_for_X2C = (uint32_t)*(NETParams[ENB_PORT_FOR_X2C_IDX].uptr); if ((NETParams[ENB_IPV4_ADDR_FOR_X2C_IDX].strptr == NULL) || (X2AP_REGISTER_ENB_REQ (msg_p).enb_port_for_X2C == 0)) { @@ -2471,36 +2291,28 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) cidr = *(NETParams[ENB_IPV4_ADDR_FOR_X2C_IDX].strptr); address = strtok(cidr, "/"); - X2AP_REGISTER_ENB_REQ (msg_p).enb_x2_ip_address.ipv6 = 0; X2AP_REGISTER_ENB_REQ (msg_p).enb_x2_ip_address.ipv4 = 1; - strcpy(X2AP_REGISTER_ENB_REQ (msg_p).enb_x2_ip_address.ipv4_address, address); } } } } } -return 0; + + return 0; } void RCConfig(void) { - paramlist_def_t MACRLCParamList = {CONFIG_STRING_MACRLC_LIST,NULL,0}; paramlist_def_t L1ParamList = {CONFIG_STRING_L1_LIST,NULL,0}; paramlist_def_t RUParamList = {CONFIG_STRING_RU_LIST,NULL,0}; paramdef_t ENBSParams[] = ENBSPARAMS_DESC; paramlist_def_t CCsParamList = {ENB_CONFIG_STRING_COMPONENT_CARRIERS,NULL,0}; - - char aprefix[MAX_OPTNAME_SIZE*2 + 8]; - - - -/* get global parameters, defined outside any section in the config file */ - + char aprefix[MAX_OPTNAME_SIZE*2 + 8]; + /* get global parameters, defined outside any section in the config file */ printf("Getting ENBSParams\n"); - - config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); + config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); # if defined(ENABLE_USE_MME) EPC_MODE_ENABLED = ((*ENBSParams[ENB_NOS1_IDX].uptr) == 0); #endif @@ -2508,25 +2320,21 @@ void RCConfig(void) { if (RC.nb_inst > 0) { RC.nb_CC = (int *)malloc((1+RC.nb_inst)*sizeof(int)); - for (int i=0;i= MAKE_VERSION(14, 0, 0)) - ,const uint32_t * const sourceL2Id - ,const uint32_t * const destinationL2Id -#endif - ); - - const pdcp_transmission_mode_t modeP); -*/ extern unsigned char NB_eNB_INST; extern RAN_CONTEXT_t RC; -static int -gtpv1u_eNB_send_init_udp( - uint16_t port_number); - -NwGtpv1uRcT -gtpv1u_eNB_log_request( - NwGtpv1uLogMgrHandleT hLogMgr, - uint32_t logLevel, - NwCharT *file, - uint32_t line, - NwCharT *logStr); - -NwGtpv1uRcT -gtpv1u_eNB_send_udp_msg( - NwGtpv1uUdpHandleT udpHandle, - uint8_t *buffer, - uint32_t buffer_len, - uint32_t buffer_offset, - uint32_t peerIpAddr, - uint16_t peerPort); - -NwGtpv1uRcT -gtpv1u_eNB_process_stack_req( - NwGtpv1uUlpHandleT hUlp, - NwGtpv1uUlpApiT *pUlpApi); - -int -data_recv_callback( - uint16_t portP, - uint32_t address, - uint8_t *buffer, - uint32_t length, - void *arg_p); -//int -//gtpv1u_create_tunnel_endpoint( -// gtpv1u_data_t *gtpv1u_data_pP, -// uint8_t ue_idP, -// uint8_t rab_idP, -// char *sgw_ip_addr_pP, -// uint16_t portP); -static NwGtpv1uRcT -gtpv1u_start_timer_wrapper( - NwGtpv1uTimerMgrHandleT tmrMgrHandle, - uint32_t timeoutSec, - uint32_t timeoutUsec, - uint32_t tmrType, - void *timeoutArg, - NwGtpv1uTimerHandleT *hTmr); - -static NwGtpv1uRcT -gtpv1u_stop_timer_wrapper( - NwGtpv1uTimerMgrHandleT tmrMgrHandle, - NwGtpv1uTimerHandleT hTmr); - -int -gtpv1u_initial_req( - gtpv1u_data_t *gtpv1u_data_pP, - teid_t teidP, - tcp_udp_port_t portP, - uint32_t address); - -int -gtpv1u_new_data_req( - uint8_t enb_module_idP, - rnti_t ue_rntiP, - uint8_t rab_idP, - uint8_t *buffer_pP, - uint32_t buf_lenP, - uint32_t buf_offsetP -); - -int -gtpv1u_create_s1u_tunnel( - const instance_t instanceP, - const gtpv1u_enb_create_tunnel_req_t * const create_tunnel_req_pP, - gtpv1u_enb_create_tunnel_resp_t * const create_tunnel_resp_pP); - -static int -gtpv1u_delete_s1u_tunnel( - const instance_t instanceP, - const gtpv1u_enb_delete_tunnel_req_t * const req_pP); - -static int -gtpv1u_eNB_init(void); - -void * -gtpv1u_eNB_task(void *args); - -//static gtpv1u_data_t gtpv1u_data_g; - #if defined(GTP_DUMP_SOCKET) && GTP_DUMP_SOCKET > 0 #include static int gtpv1u_dump_socket_g; @@ -215,11 +108,11 @@ static void gtpv1u_eNB_write_dump_socket(uint8_t *buffer_pP, uint32_t buffer_len #endif //----------------------------------------------------------------------------- -static int gtpv1u_eNB_send_init_udp(uint16_t port_number) +static int gtpv1u_eNB_send_init_udp(const Gtpv1uS1Req * req) { // Create and alloc new message MessageDef *message_p; - struct in_addr addr; + struct in_addr addr={0}; message_p = itti_alloc_new_message(TASK_GTPV1_U, UDP_INIT); @@ -227,12 +120,10 @@ static int gtpv1u_eNB_send_init_udp(uint16_t port_number) return -1; } - UDP_INIT(message_p).port = port_number; - //LG UDP_INIT(message_p).address = "0.0.0.0"; //ANY address - - addr.s_addr = RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up; + UDP_INIT(message_p).port = req->enb_port_for_S1u_S12_S4_up; + addr.s_addr = req->enb_ip_address_for_S1u_S12_S4_up; UDP_INIT(message_p).address = inet_ntoa(addr); - LOG_I(GTPU, "Tx UDP_INIT IP addr %s (%x)\n", UDP_INIT(message_p).address,RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up); + LOG_I(GTPU, "Tx UDP_INIT IP addr %s (%x)\n", UDP_INIT(message_p).address,UDP_INIT(message_p).port); MSC_LOG_EVENT( MSC_GTPU_ENB, @@ -242,6 +133,16 @@ static int gtpv1u_eNB_send_init_udp(uint16_t port_number) return itti_send_msg_to_task(TASK_UDP, INSTANCE_DEFAULT, message_p); } +static int gtpv1u_s1_req( + const instance_t instanceP, + const Gtpv1uS1Req * const req) { + memcpy(&RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up, + &req->enb_ip_address_for_S1u_S12_S4_up, + sizeof (req->enb_ip_address_for_S1u_S12_S4_up)); + gtpv1u_eNB_send_init_udp(req); + return 0; +} + //----------------------------------------------------------------------------- NwGtpv1uRcT gtpv1u_eNB_log_request(NwGtpv1uLogMgrHandleT hLogMgr, uint32_t logLevel, @@ -999,23 +900,17 @@ static int gtpv1u_delete_s1u_tunnel( //----------------------------------------------------------------------------- -static int gtpv1u_eNB_init(void) +int gtpv1u_eNB_init(void) { - int ret; NwGtpv1uRcT rc = NW_GTPV1U_FAILURE; NwGtpv1uUlpEntityT ulp; NwGtpv1uUdpEntityT udp; NwGtpv1uLogMgrEntityT log; NwGtpv1uTimerMgrEntityT tmr; - // enb_properties_p = enb_config_get()->properties[0]; - RC.gtpv1u_data_g = (gtpv1u_data_t*)malloc(sizeof(gtpv1u_data_t)); - memset(RC.gtpv1u_data_g, 0, sizeof(gtpv1u_data_t)); - - RCconfig_gtpu(); - - + RC.gtpv1u_data_g = (gtpv1u_data_t*)calloc(sizeof(gtpv1u_data_t),1); + LOG_I(GTPU, "Initializing GTPU stack %p\n",&RC.gtpv1u_data_g); //gtpv1u_data_g.gtpv1u_stack; /* Initialize UE hashtable */ @@ -1024,7 +919,6 @@ static int gtpv1u_eNB_init(void) RC.gtpv1u_data_g->teid_mapping = hashtable_create (256, NULL, NULL); AssertFatal(RC.gtpv1u_data_g->teid_mapping != NULL, " ERROR Initializing TASK_GTPV1_U task interface: in hashtable_create\n"); // RC.gtpv1u_data_g.enb_ip_address_for_S1u_S12_S4_up = enb_properties_p->enb_ipv4_address_for_S1U; - RC.gtpv1u_data_g->ip_addr = NULL; //gtpv1u_data_g.udp_data; RC.gtpv1u_data_g->seq_num = 0; @@ -1089,35 +983,21 @@ static int gtpv1u_eNB_init(void) } #endif - ret = gtpv1u_eNB_send_init_udp(RC.gtpv1u_data_g->enb_port_for_S1u_S12_S4_up); - - if (ret < 0) { - return ret; - } LOG_D(GTPU, "Initializing GTPV1U interface for eNB: DONE\n"); return 0; } - //----------------------------------------------------------------------------- -void *gtpv1u_eNB_task(void *args) -{ - int rc = 0; - instance_t instance; - //const char *msg_name_p; - - rc = gtpv1u_eNB_init(); - AssertFatal(rc == 0, "gtpv1u_eNB_init Failed"); - itti_mark_task_ready(TASK_GTPV1_U); - MSC_START_USE(); - - while(1) { +void *gtpv1u_eNB_process_itti_msg(void *notUsed) { /* Trying to fetch a message from the message queue. * If the queue is empty, this function will block till a * message is sent to the task. */ + instance_t instance; MessageDef *received_message_p = NULL; + int rc = 0; + itti_receive_msg(TASK_GTPV1_U, &received_message_p); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_ENB_TASK, VCD_FUNCTION_IN); DevAssert(received_message_p != NULL); @@ -1127,6 +1007,9 @@ void *gtpv1u_eNB_task(void *args) switch (ITTI_MSG_ID(received_message_p)) { + case GTPV1U_ENB_S1_REQ: + gtpv1u_s1_req(instance, &received_message_p->ittiMsg.gtpv1uS1Req); + case GTPV1U_ENB_DELETE_TUNNEL_REQ: { gtpv1u_delete_s1u_tunnel(instance, &received_message_p->ittiMsg.Gtpv1uDeleteTunnelReq); } @@ -1258,6 +1141,22 @@ void *gtpv1u_eNB_task(void *args) AssertFatal(rc == EXIT_SUCCESS, "Failed to free memory (%d)!\n", rc); received_message_p = NULL; VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_ENB_TASK, VCD_FUNCTION_OUT); + + return NULL; +} + +//----------------------------------------------------------------------------- +void *gtpv1u_eNB_task(void *args) +{ + int rc = 0; + + rc = gtpv1u_eNB_init(); + AssertFatal(rc == 0, "gtpv1u_eNB_init Failed"); + itti_mark_task_ready(TASK_GTPV1_U); + MSC_START_USE(); + + while(1) { + (void) gtpv1u_eNB_process_itti_msg (NULL); } return NULL; diff --git a/openair3/GTPV1-U/gtpv1u_eNB_defs.h b/openair3/GTPV1-U/gtpv1u_eNB_defs.h index ddd996625e..db928c4438 100644 --- a/openair3/GTPV1-U/gtpv1u_eNB_defs.h +++ b/openair3/GTPV1-U/gtpv1u_eNB_defs.h @@ -97,8 +97,6 @@ typedef struct gtpv1u_data_s { //RB_HEAD(gtpv1u_ue_map, gtpv1u_ue_data_s) gtpv1u_ue_map_head; /* Local IP address to use */ in_addr_t enb_ip_address_for_S1u_S12_S4_up; - char *ip_addr; - tcp_udp_port_t enb_port_for_S1u_S12_S4_up; /* UDP internal data */ //udp_data_t udp_data; diff --git a/openair3/GTPV1-U/gtpv1u_eNB_task.h b/openair3/GTPV1-U/gtpv1u_eNB_task.h index 6afea103ef..9830ea6169 100644 --- a/openair3/GTPV1-U/gtpv1u_eNB_task.h +++ b/openair3/GTPV1-U/gtpv1u_eNB_task.h @@ -40,6 +40,8 @@ gtpv1u_new_data_req( uint32_t buf_len, uint32_t buf_offset);*/ +int gtpv1u_eNB_init(void); +void *gtpv1u_eNB_process_itti_msg(void*); void *gtpv1u_eNB_task(void *args); int diff --git a/openair3/S1AP/s1ap_eNB.c b/openair3/S1AP/s1ap_eNB.c index 2a6db4a5ce..a617963686 100644 --- a/openair3/S1AP/s1ap_eNB.c +++ b/openair3/S1AP/s1ap_eNB.c @@ -286,19 +286,20 @@ void s1ap_eNB_handle_sctp_data_ind(sctp_data_ind_t *sctp_data_ind) AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); } -void *s1ap_eNB_task(void *arg) +void s1ap_eNB_init(void) { - MessageDef *received_msg = NULL; - int result; - S1AP_DEBUG("Starting S1AP layer\n"); s1ap_eNB_prepare_internal_data(); itti_mark_task_ready(TASK_S1AP); MSC_START_USE(); +} - while (1) { +void *s1ap_eNB_process_itti_msg(void* notUsed) +{ + MessageDef *received_msg = NULL; + int result; itti_receive_msg(TASK_S1AP, &received_msg); switch (ITTI_MSG_ID(received_msg)) { @@ -413,6 +414,16 @@ void *s1ap_eNB_task(void *arg) AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); received_msg = NULL; + return NULL; +} + + +void *s1ap_eNB_task(void *arg) +{ + s1ap_eNB_init(); + + while (1) { + (void) s1ap_eNB_process_itti_msg(NULL); } return NULL; diff --git a/openair3/S1AP/s1ap_eNB.h b/openair3/S1AP/s1ap_eNB.h index e122703d82..2abbc53ec9 100644 --- a/openair3/S1AP/s1ap_eNB.h +++ b/openair3/S1AP/s1ap_eNB.h @@ -39,6 +39,8 @@ extern s1ap_eNB_config_t s1ap_config; #define EPC_MODE_ENABLED s1ap_config.mme_enabled +void *s1ap_eNB_process_itti_msg(void*); +void s1ap_eNB_init(void); void *s1ap_eNB_task(void *arg); uint32_t s1ap_generate_eNB_id(void); diff --git a/openair3/SCTP/sctp_eNB_task.c b/openair3/SCTP/sctp_eNB_task.c index 6071b0da13..e7265d66d6 100644 --- a/openair3/SCTP/sctp_eNB_task.c +++ b/openair3/SCTP/sctp_eNB_task.c @@ -1039,15 +1039,9 @@ sctp_eNB_flush_sockets( } } - //------------------------------------------------------------------------------ -void *sctp_eNB_task(void *arg) +void sctp_eNB_init(void) { - int nb_events; - struct epoll_event *events; - MessageDef *received_msg = NULL; - int result; - SCTP_DEBUG("Starting SCTP layer\n"); STAILQ_INIT(&sctp_cnx_list); @@ -1055,7 +1049,16 @@ void *sctp_eNB_task(void *arg) itti_mark_task_ready(TASK_SCTP); MSC_START_USE(); - while (1) { +} + +//------------------------------------------------------------------------------ +void *sctp_eNB_process_itti_msg(void *notUsed) +{ + int nb_events; + struct epoll_event *events; + MessageDef *received_msg = NULL; + int result; + itti_receive_msg(TASK_SCTP, &received_msg); /* Check if there is a packet to handle */ @@ -1142,6 +1145,17 @@ void *sctp_eNB_task(void *arg) nb_events = itti_get_events(TASK_SCTP, &events); /* Now handle notifications for other sockets */ sctp_eNB_flush_sockets(events, nb_events); + + return NULL; +} + +//------------------------------------------------------------------------------ +void *sctp_eNB_task(void *arg) +{ + sctp_eNB_init(); + + while (1) { + (void) sctp_eNB_process_itti_msg(NULL); } return NULL; diff --git a/openair3/SCTP/sctp_eNB_task.h b/openair3/SCTP/sctp_eNB_task.h index 31cb683102..e23e80675e 100644 --- a/openair3/SCTP/sctp_eNB_task.h +++ b/openair3/SCTP/sctp_eNB_task.h @@ -22,6 +22,8 @@ #ifndef SCTP_ENB_TASK_H_ #define SCTP_ENB_TASK_H_ +void sctp_eNB_init(void); +void *sctp_eNB_process_itti_msg(void *); void *sctp_eNB_task(void *arg); #endif /* SCTP_ENB_TASK_H_ */ diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index aa8872679e..82072f4c4c 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -321,7 +321,15 @@ void signal_handler(int sig) { #define KBLU "\x1B[34m" #define RESET "\033[0m" - +#if defined(ENABLE_ITTI) +void signal_handler_itti(int sig) { + // Call exit function + char msg[256]; + memset(msg, 0, 256); + sprintf(msg, "caught signal %s\n", strsignal(sig)); + exit_function(__FILE__, __FUNCTION__, __LINE__, msg); +} +#endif void exit_function(const char* file, const char* function, const int line, const char* s) { @@ -963,6 +971,11 @@ int main( int argc, char **argv ) signal(SIGINT, signal_handler); #endif +#if defined(ENABLE_ITTI) + signal(SIGINT, signal_handler_itti); + signal(SIGTERM, signal_handler_itti); + signal(SIGABRT, signal_handler_itti); +#endif check_clock(); From 2dc3dfa373fbcf3973fd99e270ec16d60c5fbc38 Mon Sep 17 00:00:00 2001 From: Wang Tsu-Han Date: Thu, 20 Sep 2018 15:17:32 +0200 Subject: [PATCH 226/379] adding parallel config in dlsim and ulsim --- openair1/SIMULATION/LTE_PHY/dlsim.c | 18 ++++++++++++++---- openair1/SIMULATION/LTE_PHY/ulsim.c | 17 +++++++++++++---- openair2/ENB_APP/enb_config.c | 4 ++-- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index fd649ec0e4..6d85b47a10 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -82,14 +82,21 @@ double t_rx_min = 1000000000; /*!< \brief initial min process time for rx */ int n_tx_dropped = 0; /*!< \brief initial max process time for tx */ int n_rx_dropped = 0; /*!< \brief initial max process time for rx */ +char *parallel_config = NULL; +char *worker_config = NULL; static THREAD_STRUCT thread_struct; -void set_parallel_conf(int parallel_conf) +void set_parallel_conf(char *parallel_conf) { - thread_struct.parallel_conf = (PARALLEL_CONF_t)parallel_conf; + if(strcmp(parallel_conf,"PARALLEL_SINGLE_THREAD")==0) thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD; + else if(strcmp(parallel_conf,"PARALLEL_RU_L1_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_SPLIT; + else if(strcmp(parallel_conf,"PARALLEL_RU_L1_TRX_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_TRX_SPLIT; + printf("[CONFIG] parallel conf is set to %d\n",thread_struct.parallel_conf); } -void set_parallel_worker_conf(int worker_conf) +void set_worker_conf(char *worker_conf) { - thread_struct.worker_conf = (WORKER_CONF_t)worker_conf; + if(strcmp(worker_conf,"WORKER_DISABLE")==0) thread_struct.worker_conf = WORKER_DISABLE; + else if(strcmp(worker_conf,"WORKER_ENABLE")==0) thread_struct.worker_conf = WORKER_ENABLE; + printf("[CONFIG] worker conf is set to %d\n",thread_struct.worker_conf); } PARALLEL_CONF_t get_thread_parallel_conf(void) { @@ -1057,6 +1064,9 @@ int main(int argc, char **argv) break; } } + if() + set_parallel_conf("PARALLEL_RU_L1_TRX_SPLIT"); + set_worker_conf("WORKER_ENABLE"); if (transmission_mode>1) pa=dBm3; printf("dlsim: tmode %d, pa %d\n",transmission_mode,pa); diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index 826f185d2a..89c0d09b1d 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -97,14 +97,21 @@ nfapi_tx_request_pdu_t tx_pdu_list[MAX_NUM_TX_REQUEST_PDU]; nfapi_tx_request_t TX_req; Sched_Rsp_t sched_resp; +char *parallel_config = NULL; +char *worker_config = NULL; static THREAD_STRUCT thread_struct; -void set_parallel_conf(int parallel_conf) +void set_parallel_conf(char *parallel_conf) { - thread_struct.parallel_conf = (PARALLEL_CONF_t)parallel_conf; + if(strcmp(parallel_conf,"PARALLEL_SINGLE_THREAD")==0) thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD; + else if(strcmp(parallel_conf,"PARALLEL_RU_L1_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_SPLIT; + else if(strcmp(parallel_conf,"PARALLEL_RU_L1_TRX_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_TRX_SPLIT; + printf("[CONFIG] parallel conf is set to %d\n",thread_struct.parallel_conf); } -void set_parallel_worker_conf(int worker_conf) +void set_worker_conf(char *worker_conf) { - thread_struct.worker_conf = (WORKER_CONF_t)worker_conf; + if(strcmp(worker_conf,"WORKER_DISABLE")==0) thread_struct.worker_conf = WORKER_DISABLE; + else if(strcmp(worker_conf,"WORKER_ENABLE")==0) thread_struct.worker_conf = WORKER_ENABLE; + printf("[CONFIG] worker conf is set to %d\n",thread_struct.worker_conf); } PARALLEL_CONF_t get_thread_parallel_conf(void) { @@ -741,6 +748,8 @@ int main(int argc, char **argv) break; } } + set_parallel_conf("PARALLEL_RU_L1_TRX_SPLIT"); + set_worker_conf("WORKER_ENABLE"); RC.nb_L1_inst = 1; RC.nb_RU = 1; diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 2d6ebc966e..73a7cfb9ca 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -61,8 +61,8 @@ #include "enb_paramdef.h" extern uint16_t sf_ahead; -extern void set_parallel_conf(int parallel_conf); -extern void set_parallel_worker_conf(int worker_conf); +extern void set_parallel_conf(char* parallel_conf); +extern void set_worker_conf(char* worker_conf); extern PARALLEL_CONF_t get_thread_parallel_conf(void); extern WORKER_CONF_t get_thread_worker_conf(void); From e047162803ea35efc00559d236891d1cfe1a7de8 Mon Sep 17 00:00:00 2001 From: laurent Date: Thu, 20 Sep 2018 16:21:37 +0200 Subject: [PATCH 227/379] fix a bug when Linux kernel is busy --- common/utils/ocp_itti/intertask_interface.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/common/utils/ocp_itti/intertask_interface.cpp b/common/utils/ocp_itti/intertask_interface.cpp index 13bf801668..5b8d1a430e 100644 --- a/common/utils/ocp_itti/intertask_interface.cpp +++ b/common/utils/ocp_itti/intertask_interface.cpp @@ -116,15 +116,14 @@ extern "C" { pthread_mutex_lock (&t->queue_cond_lock); int ret=itti_send_msg_to_task_locked(destination_task_id, instance, message); - // while ( t->message_queue.size()>0 && t->admin.func != NULL ) - if ( t->message_queue.size()>0 && t->admin.func != NULL ) { + while ( t->message_queue.size()>0 && t->admin.func != NULL ) { if (t->message_queue.size()>1) LOG_W(TMR,"queue in no thread mode is %ld\n", t->message_queue.size()); pthread_mutex_unlock (&t->queue_cond_lock); t->admin.func(NULL); - } else { - pthread_mutex_unlock (&t->queue_cond_lock); - } + pthread_mutex_lock (&t->queue_cond_lock); + } + pthread_mutex_unlock (&t->queue_cond_lock); return ret; } @@ -198,6 +197,8 @@ extern "C" { pthread_mutex_unlock(&t->queue_cond_lock); LOG_D(TMR,"enter blocking wait for %s\n", itti_get_task_name(task_id)); t->nb_events = epoll_wait(t->epoll_fd,t->events,t->nb_fd_epoll, epoll_timeout); + if ( t->nb_events < 0 && (errno == EINTR || errno == EAGAIN ) ) + pthread_mutex_lock(&t->queue_cond_lock); } while (t->nb_events < 0 && (errno == EINTR || errno == EAGAIN ) ); AssertFatal (t->nb_events >=0, From 36d7f21e1bae6e41bb8a64d0c70e4ce6d05eb63e Mon Sep 17 00:00:00 2001 From: "Wolfgang A. Mozart" Date: Thu, 20 Sep 2018 16:41:31 +0200 Subject: [PATCH 228/379] nr pbch working with format change --- openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c | 51 ++++++++------------------ openair1/PHY/defs_nr_UE.h | 4 +- 2 files changed, 17 insertions(+), 38 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c index 43c7c2772c..11a1d54990 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c @@ -397,8 +397,6 @@ void nr_pbch_unscrambling(NR_UE_PBCH *pbch, uint8_t reset, offset; uint32_t x1, x2, s=0; double *demod_pbch_e = pbch->demod_pbch_e; - uint32_t *pbch_a_prime = (uint32_t*)pbch->pbch_a_prime; - uint32_t *pbch_a_interleaved = (uint32_t*)pbch->pbch_a_interleaved; uint32_t unscrambling_mask = 0x100006D; printf("unscramb nid_cell %d\n",Nid); @@ -408,7 +406,7 @@ void nr_pbch_unscrambling(NR_UE_PBCH *pbch, x2 = Nid; //this is c_init // The Gold sequence is shifted by nushift* M, so we skip (nushift*M /32) double words - for (int i=0; i<(uint16_t)ceil((nushift*M)/32); i++) { + for (int i=0; i<(uint16_t)ceil(((float)nushift*M)/32); i++) { s = lte_gold_generic(&x1, &x2, reset); reset = 0; } @@ -423,9 +421,11 @@ void nr_pbch_unscrambling(NR_UE_PBCH *pbch, #ifdef DEBUG_PBCH_ENCODING if (i<8) printf("s: %04x\t", s); + printf("pbch_a_interleaved 0x%08x\n", pbch->pbch_a_interleaved); #endif if (bitwise) { - (*pbch_a_interleaved) ^= ((unscrambling_mask>>i)&1)? (((*pbch_a_prime)>>i)&1)<>i)&1) ^ ((s>>((i+offset)&0x1f))&1))<pbch_a_interleaved) ^= ((unscrambling_mask>>i)&1)? ((pbch->pbch_a_prime>>i)&1)<pbch_a_prime>>i)&1) ^ ((s>>((i+offset)&0x1f))&1))<decoded_output; uint8_t nushift; @@ -619,15 +618,14 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, pbch_e_rx = nr_ue_pbch_vars->llr; demod_pbch_e = nr_ue_pbch_vars->demod_pbch_e; pbch_a = nr_ue_pbch_vars->pbch_a; - pbch_a_prime = nr_ue_pbch_vars->pbch_a_prime; -//#ifdef DEBUG_PBCH +#ifdef DEBUG_PBCH //pbch_e_rx = &nr_ue_pbch_vars->llr[0]; short *p = (short *)&(nr_ue_pbch_vars->rxdataF_comp[0][5*20*12]); - for (int cnt = 0; cnt < 8 ; cnt++) + for (int cnt = 0; cnt < 32 ; cnt++) printf("pbch rx llr %d rxdata_comp %d addr %p\n",*(pbch_e_rx+cnt), p[cnt], &p[0]); -//#endif +#endif for (i=0; ipayloadBits]; for (int i=0; ipayloadBits; i++) aPrioriArray[i] = NAN; - decoderState = polar_decoder_aPriori(demod_pbch_e, pbch_out, currentPtr, decoderListSize, pathMetricAppr,aPrioriArray); + decoderState = polar_decoder_aPriori(demod_pbch_e,&nr_ue_pbch_vars->pbch_a_prime, currentPtr, decoderListSize, pathMetricAppr,aPrioriArray); printf("polar decoder state %d\n", decoderState); if(decoderState == -1) return(decoderState); - printf("polar decoder output 0x%08x\n",pbch_out); - - memset(&pbch_a_prime[0], 0, sizeof(uint8_t) * NR_POLAR_PBCH_PAYLOAD_BITS>>3); - for (i=0; i>3; i++) - printf("pbch_a_prime[%d] = 0x%02x\n", i,pbch_a_prime[i]); -//#endif + //printf("polar decoder output 0x%08x\n",nr_ue_pbch_vars->pbch_a_prime); //payload un-scrambling - memset(nr_ue_pbch_vars->pbch_a_interleaved, 0, sizeof(uint8_t) * NR_POLAR_PBCH_PAYLOAD_BITS>>3); + memset(&nr_ue_pbch_vars->pbch_a_interleaved, 0, sizeof(uint32_t) ); M = (Lmax == 64)? (NR_POLAR_PBCH_PAYLOAD_BITS - 6) : (NR_POLAR_PBCH_PAYLOAD_BITS - 3); - nushift = ((pbch_a_prime[0]>>6)&1) ^ (((pbch_a_prime[3])&1)<<1); - //printf("payload unscrambling nushift %d sfn3 %d sfn2 %d M %d\n",nushift, ((pbch_a_prime[0]>>6)&1),((pbch_a_prime[3])&1),M); + nushift = ((nr_ue_pbch_vars->pbch_a_prime>>6)&1) ^ (((nr_ue_pbch_vars->pbch_a_prime>>24)&1)<<1); + printf("payload unscrambling nushift %d sfn3 %d sfn2 %d M %d\n",nushift, ((nr_ue_pbch_vars->pbch_a_prime>>6)&1),((nr_ue_pbch_vars->pbch_a_prime>>24)&1),M); nr_pbch_unscrambling(nr_ue_pbch_vars,frame_parms->Nid_cell,nushift,M,NR_POLAR_PBCH_PAYLOAD_BITS,1); //payload deinterleaving uint32_t in=0, out=0; - for (int i=0; i>3; i++) - in |= (uint32_t)(nr_ue_pbch_vars->pbch_a_interleaved[i]<<(i<<3)); for (int i=0; i<32; i++) { - out |= ((in>>i)&1)<<(pbch_deinterleaving_pattern[i]); + out |= ((nr_ue_pbch_vars->pbch_a_interleaved>>i)&1)<<(pbch_deinterleaving_pattern[i]); #ifdef DEBUG_PBCH - printf("i %d in 0x%08x out 0x%08x ilv %d (in>>i)&1) 0x%08x\n", i, in, out, pbch_deinterleaving_pattern[i], (in>>i)&1); + printf("i %d in 0x%08x out 0x%08x ilv %d (in>>i)&1) 0x%08x\n", i, nr_ue_pbch_vars->pbch_a_interleaved, out, pbch_deinterleaving_pattern[i], (in>>i)&1); #endif } @@ -705,11 +689,6 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, for (i=0; i<(NR_POLAR_PBCH_PAYLOAD_BITS>>3); i++) decoded_output[(NR_POLAR_PBCH_PAYLOAD_BITS>>3)-i-1] = pbch_a[i]; - decoded_output[0] = 0x0a; - decoded_output[1] = 0x63; - decoded_output[2] = 0x00; - decoded_output[3] = 0x06; - //#ifdef DEBUG_PBCH for (i=0; i<(NR_POLAR_PBCH_PAYLOAD_BITS>>3); i++){ //printf("unscrambling pbch_a[%d] = %x \n", i,pbch_a[i]); diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index 603c02e380..07c70d24c0 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -945,8 +945,8 @@ typedef struct { /// - second index: ? [0..287] (hard coded) int32_t **dl_ch_estimates_ext; uint8_t pbch_a[NR_POLAR_PBCH_PAYLOAD_BITS>>3]; - uint8_t pbch_a_interleaved[NR_POLAR_PBCH_PAYLOAD_BITS>>3]; - uint8_t pbch_a_prime[NR_POLAR_PBCH_PAYLOAD_BITS>>3]; + uint32_t pbch_a_interleaved; + uint32_t pbch_a_prime; uint8_t pbch_e[NR_POLAR_PBCH_E]; double demod_pbch_e[NR_POLAR_PBCH_E]; /// \brief Pointer to PBCH llrs. From 90ccc5034ef299748cac2aa65f21e3062d268254 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 20 Sep 2018 16:56:27 +0200 Subject: [PATCH 229/379] PBCH debug changes --- openair1/PHY/NR_TRANSPORT/nr_pbch.c | 26 ++++++++------------ targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 2 +- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_TRANSPORT/nr_pbch.c index 70cf18ab57..6ef6be34fa 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_pbch.c @@ -141,17 +141,13 @@ void nr_pbch_scrambling(NR_gNB_PBCH *pbch, uint8_t reset, offset; uint32_t x1, x2, s=0; uint32_t *pbch_e = pbch->pbch_e; - uint32_t pbch_a_prime = pbch->pbch_a_prime; - uint32_t pbch_a_interleaved = pbch->pbch_a_interleaved; uint32_t unscrambling_mask = 0x100006D; - reset = 1; // x1 is set in lte_gold_generic x2 = Nid; - // The Gold sequence is shifted by nushift* M, so we skip (nushift*M /32) double words - for (int i=0; i<(uint16_t)ceil((nushift*M)/32); i++) { - s = lte_gold_generic(&x1, &x2, reset); + for (int i=0; i<(uint16_t)ceil(((float)nushift*M)/32); i++) { +s = lte_gold_generic(&x1, &x2, reset); reset = 0; } // Scrambling is now done with offset (nushift*M)%32 @@ -168,9 +164,8 @@ void nr_pbch_scrambling(NR_gNB_PBCH *pbch, #ifdef DEBUG_PBCH_ENCODING printf("s: %04x\t", s); #endif - if (!encoded) { - pbch_a_prime ^= ((unscrambling_mask>>i)&1)? ((pbch_a_interleaved>>i)&1)<>i)&1) ^ ((s>>((i+offset)&0x1f))&1))<pbch_a_prime ^= ((unscrambling_mask>>i)&1)? ((pbch->pbch_a_interleaved>>i)&1)<pbch_a_interleaved>>i)&1) ^ ((s>>((i+offset)&0x1f))&1))<>5] ^= (((s>>((i+offset)&0x1f))&1)<<(i&0x1f)); @@ -224,6 +219,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch, LOG_I(PHY, "PBCH generation started\n"); + memset((void*)pbch, 0, sizeof(NR_gNB_PBCH)); ///Payload generation // Fix byte endian if (!(sfn&7)) @@ -260,25 +256,23 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch, for (int i=0; i<32; i++) { pbch->pbch_a_interleaved |= ((in>>i)&1)<<(nr_pbch_payload_interleaver(i));//nr_pbch_payload_interleaving_pattern[i] #ifdef DEBUG_PBCH_ENCODING - printf("i %d in 0x%08x out 0x%08x ilv %d (in>>i)&1) %d\n", i, in, out, nr_pbch_payload_interleaver(i), (in>>i)&1); + printf("i %d in 0x%08x out 0x%08x ilv %d (in>>i)&1) %d\n", i, in, pbch->pbch_a_interleaved, nr_pbch_payload_interleaver(i), (in>>i)&1); #endif } - /*for (int i=0; i>3; i++) - pbch->pbch_a_interleaved[i] = (uint8_t)((out>>(i<<3))&0xff);*/ - #ifdef DEBUG_PBCH_ENCODING printf("Interleaving:\n"); - printf("pbch_a_interleaved: 0x%08x\n", pbch->pbch_a_interleaved); + printf("pbch_a_interleaved: 0x%08x\n", pbch->pbch_a_interleaved); #endif // Scrambling M = (Lmax == 64)? (NR_POLAR_PBCH_PAYLOAD_BITS - 6) : (NR_POLAR_PBCH_PAYLOAD_BITS - 3); nushift = (((sfn>>2)&1)<<1) ^ ((sfn>>1)&1); + pbch->pbch_a_prime = 0; nr_pbch_scrambling(pbch, (uint32_t)config->sch_config.physical_cell_id.value, nushift, M, NR_POLAR_PBCH_PAYLOAD_BITS, 0); #ifdef DEBUG_PBCH_ENCODING - printf("Payload scrambling:\n"); - printf("pbch_a_prime: 0x%08x\n", pbch->pbch_a_prime); + printf("Payload scrambling: nushift %d M %d sfn3 %d sfn2 %d\n", nushift, M, (sfn>>2)&1, (sfn>>1)&1); + printf("pbch_a_prime: 0x%08x\n", pbch->pbch_a_prime); #endif /// CRC, coding and rate matching diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index a0e8fcff89..7fa7c643b5 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -977,7 +977,7 @@ extern "C" { if(device_adds.size() == 0) { double usrp_master_clock = 184.32e6; - std::string args = "type=x300"; + std::string args = "type=x300, addr=192.168.30.2"; // workaround for an api problem, master clock has to be set with the constructor not via set_master_clock_rate args += boost::str(boost::format(",master_clock_rate=%f") % usrp_master_clock); From 85477b4eef63920fcb9dc73417c7ef50bd042f4e Mon Sep 17 00:00:00 2001 From: Wang Tsu-Han Date: Fri, 21 Sep 2018 12:49:56 +0200 Subject: [PATCH 230/379] fixes for femoval empty function in dlsim --- openair1/SIMULATION/LTE_PHY/dlsim.c | 1 - 1 file changed, 1 deletion(-) diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index 6d85b47a10..3583c0f25e 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -1064,7 +1064,6 @@ int main(int argc, char **argv) break; } } - if() set_parallel_conf("PARALLEL_RU_L1_TRX_SPLIT"); set_worker_conf("WORKER_ENABLE"); From 9a1a256a8e985b2226022efb90da32d162b52fa8 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Fri, 21 Sep 2018 15:57:09 +0200 Subject: [PATCH 231/379] Adding, as test, parallel threading conf to CI configuration files -- FDD -- basic simulator Signed-off-by: Raphael Defosseux --- ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf | 9 +++++++++ ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf | 9 +++++++++ ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf | 9 +++++++++ ci-scripts/conf_files/lte-basic-sim.conf | 9 +++++++++ 4 files changed, 36 insertions(+) diff --git a/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf index 37656de755..3d79fd0986 100644 --- a/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf @@ -228,6 +228,15 @@ RUs = ( } ); +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + NETWORK_CONTROLLER : { FLEXRAN_ENABLED = "no"; diff --git a/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf index 01c1ca1428..b4c20ba644 100644 --- a/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf @@ -228,6 +228,15 @@ RUs = ( } ); +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + NETWORK_CONTROLLER : { FLEXRAN_ENABLED = "no"; diff --git a/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf index eb5822cb22..a6ac1f8c14 100644 --- a/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf @@ -228,6 +228,15 @@ RUs = ( } ); +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + NETWORK_CONTROLLER : { FLEXRAN_ENABLED = "no"; diff --git a/ci-scripts/conf_files/lte-basic-sim.conf b/ci-scripts/conf_files/lte-basic-sim.conf index f0fab0bdcb..4d4930ad88 100644 --- a/ci-scripts/conf_files/lte-basic-sim.conf +++ b/ci-scripts/conf_files/lte-basic-sim.conf @@ -229,6 +229,15 @@ RUs = ( } ); +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + NETWORK_CONTROLLER : { FLEXRAN_ENABLED = "no"; From 2c27a38dc35981d4a0a35f1b95c4eac597e51e98 Mon Sep 17 00:00:00 2001 From: Konstantinos Alexandris Date: Fri, 21 Sep 2018 15:58:36 +0200 Subject: [PATCH 232/379] x2ap: implement x2setuprequest, x2setupresponse, x2setupfailure --- cmake_targets/CMakeLists.txt | 8 +- common/utils/msc/msc.h | 2 + openair2/COMMON/x2ap_messages_types.h | 22 +- openair2/ENB_APP/enb_config.c | 141 ++++++- openair2/LAYER2/MAC/config.c | 52 +++ openair2/X2AP/x2ap_common.h | 8 +- openair2/X2AP/x2ap_eNB.c | 35 +- openair2/X2AP/x2ap_eNB_decoder.c | 127 +++++++ openair2/X2AP/x2ap_eNB_decoder.h | 29 ++ openair2/X2AP/x2ap_eNB_defs.h | 11 + openair2/X2AP/x2ap_eNB_encoder.c | 54 +++ openair2/X2AP/x2ap_eNB_encoder.h | 28 ++ openair2/X2AP/x2ap_eNB_generate_messages.c | 405 +++++++++++++++++++++ openair2/X2AP/x2ap_eNB_generate_messages.h | 44 +++ openair2/X2AP/x2ap_eNB_handler.c | 353 ++++++++++++++++++ openair2/X2AP/x2ap_eNB_handler.h | 6 +- openair2/X2AP/x2ap_eNB_itti_messaging.c | 56 +++ openair2/X2AP/x2ap_eNB_itti_messaging.h | 32 ++ 18 files changed, 1378 insertions(+), 35 deletions(-) create mode 100644 openair2/X2AP/x2ap_eNB_decoder.c create mode 100644 openair2/X2AP/x2ap_eNB_decoder.h create mode 100644 openair2/X2AP/x2ap_eNB_encoder.c create mode 100644 openair2/X2AP/x2ap_eNB_encoder.h create mode 100644 openair2/X2AP/x2ap_eNB_generate_messages.c create mode 100644 openair2/X2AP/x2ap_eNB_generate_messages.h create mode 100644 openair2/X2AP/x2ap_eNB_itti_messaging.c create mode 100644 openair2/X2AP/x2ap_eNB_itti_messaging.h diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 12a6cc3462..e92c822de3 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -476,12 +476,12 @@ include_directories ("${X2AP_DIR}") add_library(X2AP_ENB ${X2AP_DIR}/x2ap_eNB.c - # ${X2AP_DIR}/x2ap_eNB_decoder.c - # ${X2AP_DIR}/x2ap_eNB_encoder.c + ${X2AP_DIR}/x2ap_eNB_decoder.c + ${X2AP_DIR}/x2ap_eNB_encoder.c ${X2AP_DIR}/x2ap_eNB_handler.c - # ${X2AP_DIR}/x2ap_eNB_itti_messaging.c + ${X2AP_DIR}/x2ap_eNB_itti_messaging.c ${X2AP_DIR}/x2ap_eNB_management_procedures.c - # ${X2AP_DIR}/x2ap_eNB_generate_messages.c + ${X2AP_DIR}/x2ap_eNB_generate_messages.c ) # Hardware dependant options diff --git a/common/utils/msc/msc.h b/common/utils/msc/msc.h index 78eb6cdb08..e8a8a4a0e8 100644 --- a/common/utils/msc/msc.h +++ b/common/utils/msc/msc.h @@ -63,6 +63,8 @@ typedef enum { MSC_S6A_MME, MSC_HSS, MAX_MSC_PROTOS, + MSC_X2AP_SRC_ENB, + MSC_X2AP_TARGET_ENB, } msc_proto_t; diff --git a/openair2/COMMON/x2ap_messages_types.h b/openair2/COMMON/x2ap_messages_types.h index 6c4031b981..c74a826ff8 100644 --- a/openair2/COMMON/x2ap_messages_types.h +++ b/openair2/COMMON/x2ap_messages_types.h @@ -63,17 +63,21 @@ typedef struct x2ap_register_enb_req_s { uint8_t mnc_digit_length; /* - * EARFCN + * CC Params */ - uint16_t fdd_uL_EARFCN; - uint16_t fdd_dL_EARFCN; - uint16_t tdd_EARFCN; - - - uint16_t fdd_uL_Transmission_Bandwidth; - uint16_t fdd_dL_Transmission_Bandwidth; - uint16_t tdd_Transmission_Bandwidth; + int16_t eutra_band[MAX_NUM_CCs]; + uint32_t downlink_frequency[MAX_NUM_CCs]; + int32_t uplink_frequency_offset[MAX_NUM_CCs]; + uint32_t Nid_cell[MAX_NUM_CCs]; + int16_t N_RB_DL[MAX_NUM_CCs]; + lte_frame_type_t frame_type[MAX_NUM_CCs]; + uint32_t fdd_earfcn_DL[MAX_NUM_CCs]; + uint32_t fdd_earfcn_UL[MAX_NUM_CCs]; + int num_cc; + /* To be considered for TDD */ + //uint16_t tdd_EARFCN; + //uint16_t tdd_Transmission_Bandwidth; /* The local eNB IP address to bind */ net_ip_address_t enb_x2_ip_address; diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 012375e668..acd179d130 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -61,6 +61,9 @@ #include "enb_paramdef.h" extern uint16_t sf_ahead; +extern uint32_t to_earfcn_DL(int eutra_bandP, uint32_t dl_CarrierFreq, uint32_t bw); +extern uint32_t to_earfcn_UL(int eutra_bandP, uint32_t ul_CarrierFreq, uint32_t bw); + void RCconfig_flexran() { @@ -2337,8 +2340,7 @@ return 0; int RCconfig_X2(MessageDef *msg_p, uint32_t i) { - int j, k, l; - + int I, J, j, k, l; int enb_id; char *address = NULL; @@ -2350,6 +2352,88 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) /* get global parameters, defined outside any section in the config file */ config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); + + /* define CC params */ + + int32_t Nid_cell = 0; + + char *frame_type, *prefix_type, *pbch_repetition, *prach_high_speed, + *pusch_hoppingMode, *pusch_enable64QAM, *pusch_groupHoppingEnabled, + *pusch_sequenceHoppingEnabled, *phich_duration, *phich_resource, + *srs_enable, *srs_ackNackST, *srs_MaxUpPts, *pusch_alpha, + *pucch_deltaF_Format1, *pucch_deltaF_Format1b, *pucch_deltaF_Format2, + *pucch_deltaF_Format2a, *pucch_deltaF_Format2b, + *rach_preamblesGroupAConfig, *rach_messagePowerOffsetGroupB, *pcch_nB; + long long int downlink_frequency; + int32_t tdd_config, tdd_config_s, eutra_band, uplink_frequency_offset, + Nid_cell_mbsfn, N_RB_DL, nb_antenna_ports, prach_root, prach_config_index, + prach_zero_correlation, prach_freq_offset, pucch_delta_shift, + pucch_nRB_CQI, pucch_nCS_AN, pucch_n1_AN, pdsch_referenceSignalPower, + pdsch_p_b, pusch_n_SB, pusch_hoppingOffset, pusch_groupAssignment, + pusch_nDMRS1, srs_BandwidthConfig, srs_SubframeConfig, pusch_p0_Nominal, + pucch_p0_Nominal, msg3_delta_Preamble, rach_numberOfRA_Preambles, + rach_sizeOfRA_PreamblesGroupA, rach_messageSizeGroupA, + rach_powerRampingStep, rach_preambleInitialReceivedTargetPower, + rach_preambleTransMax, rach_raResponseWindowSize, + rach_macContentionResolutionTimer, rach_maxHARQ_Msg3Tx, + pcch_defaultPagingCycle, bcch_modificationPeriodCoeff, + ue_TimersAndConstants_t300, ue_TimersAndConstants_t301, + ue_TimersAndConstants_t310, ue_TimersAndConstants_t311, + ue_TimersAndConstants_n310, ue_TimersAndConstants_n311, + ue_TransmissionMode, ue_multiple_max; + + const char* rxPool_sc_CP_Len; + const char* rxPool_sc_Period; + const char* rxPool_data_CP_Len; + libconfig_int rxPool_ResourceConfig_prb_Num; + libconfig_int rxPool_ResourceConfig_prb_Start; + libconfig_int rxPool_ResourceConfig_prb_End; + const char* rxPool_ResourceConfig_offsetIndicator_present; + libconfig_int rxPool_ResourceConfig_offsetIndicator_choice; + const char* rxPool_ResourceConfig_subframeBitmap_present; + char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf; + libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_size; + libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused; + + //SIB19 + //for discRxPool + const char* discRxPool_cp_Len; + const char* discRxPool_discPeriod; + libconfig_int discRxPool_numRetx; + libconfig_int discRxPool_numRepetition; + libconfig_int discRxPool_ResourceConfig_prb_Num; + libconfig_int discRxPool_ResourceConfig_prb_Start; + libconfig_int discRxPool_ResourceConfig_prb_End; + const char* discRxPool_ResourceConfig_offsetIndicator_present; + libconfig_int discRxPool_ResourceConfig_offsetIndicator_choice; + const char* discRxPool_ResourceConfig_subframeBitmap_present; + char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf; + libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_size; + libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused; + + //for discRxPoolPS + const char* discRxPoolPS_cp_Len; + const char* discRxPoolPS_discPeriod; + libconfig_int discRxPoolPS_numRetx; + libconfig_int discRxPoolPS_numRepetition; + libconfig_int discRxPoolPS_ResourceConfig_prb_Num; + libconfig_int discRxPoolPS_ResourceConfig_prb_Start; + libconfig_int discRxPoolPS_ResourceConfig_prb_End; + const char* discRxPoolPS_ResourceConfig_offsetIndicator_present; + libconfig_int discRxPoolPS_ResourceConfig_offsetIndicator_choice; + const char* discRxPoolPS_ResourceConfig_subframeBitmap_present; + char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf; + libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size; + libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused; + + checkedparam_t config_check_CCparams[] = CCPARAMS_CHECK; + paramdef_t CCsParams[] = CCPARAMS_DESC; + paramlist_def_t CCsParamList = {ENB_CONFIG_STRING_COMPONENT_CARRIERS, NULL, 0}; + + /* map parameter checking array instances to parameter definition array instances */ + for (I = 0; I < (sizeof(CCsParams) / sizeof(paramdef_t)); I++) { + CCsParams[I].chkPptr = &(config_check_CCparams[I]); + } /*#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME) if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) { asn_debug = 0; @@ -2398,7 +2482,9 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) paramdef_t SCTPParams[] = SCTPPARAMS_DESC; paramdef_t NETParams[] = NETPARAMS_DESC; - char aprefix[MAX_OPTNAME_SIZE*2 + 8]; + /* TODO: fix the size - if set lower we have a crash (MAX_OPTNAME_SIZE was 64 when this code was written) */ + /* this is most probably a problem with the config module */ + char aprefix[MAX_OPTNAME_SIZE*80 + 8]; /* Some default/random parameters */ @@ -2425,6 +2511,55 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) "BAD MNC DIGIT LENGTH %d", X2AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length); + /* CC params */ + sprintf(aprefix, "%s.[%i]", ENB_CONFIG_STRING_ENB_LIST, k); + config_getlist(&CCsParamList, NULL, 0, aprefix); + + X2AP_REGISTER_ENB_REQ (msg_p).num_cc = CCsParamList.numelt; + + if (CCsParamList.numelt > 0) { + + //char ccspath[MAX_OPTNAME_SIZE*2 + 16]; + + for (J = 0; J < CCsParamList.numelt ; J++) { + + sprintf(aprefix, "%s.[%i].%s.[%i]", ENB_CONFIG_STRING_ENB_LIST, k, ENB_CONFIG_STRING_COMPONENT_CARRIERS, J); + config_get(CCsParams, sizeof(CCsParams)/sizeof(paramdef_t), aprefix); + + X2AP_REGISTER_ENB_REQ (msg_p).eutra_band[J] = eutra_band; + X2AP_REGISTER_ENB_REQ (msg_p).downlink_frequency[J] = (uint32_t) downlink_frequency; + X2AP_REGISTER_ENB_REQ (msg_p).uplink_frequency_offset[J] = (unsigned int) uplink_frequency_offset; + X2AP_REGISTER_ENB_REQ (msg_p).Nid_cell[J]= Nid_cell; + + if (Nid_cell>503) { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for Nid_cell choice: 0...503 !\n", + RC.config_file_name, k, Nid_cell); + } + + X2AP_REGISTER_ENB_REQ (msg_p).N_RB_DL[J]= N_RB_DL; + + if ((N_RB_DL!=6) && (N_RB_DL!=15) && (N_RB_DL!=25) && (N_RB_DL!=50) && (N_RB_DL!=75) && (N_RB_DL!=100)) { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 6,15,25,50,75,100 !\n", + RC.config_file_name, k, N_RB_DL); + } + + if (strcmp(frame_type, "FDD") == 0) { + X2AP_REGISTER_ENB_REQ (msg_p).frame_type[J] = FDD; + } else if (strcmp(frame_type, "TDD") == 0) { + X2AP_REGISTER_ENB_REQ (msg_p).frame_type[J] = TDD; + } else { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for frame_type choice: FDD or TDD !\n", + RC.config_file_name, k, frame_type); + } + + X2AP_REGISTER_ENB_REQ (msg_p).fdd_earfcn_DL[J] = to_earfcn_DL(eutra_band, downlink_frequency, N_RB_DL); + X2AP_REGISTER_ENB_REQ (msg_p).fdd_earfcn_UL[J] = to_earfcn_UL(eutra_band, downlink_frequency + uplink_frequency_offset, N_RB_DL); + } + } + sprintf(aprefix,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k); config_getlist( &X2ParamList,X2Params,sizeof(X2Params)/sizeof(paramdef_t),aprefix); diff --git a/openair2/LAYER2/MAC/config.c b/openair2/LAYER2/MAC/config.c index 8fd85e7811..9c95ff172d 100644 --- a/openair2/LAYER2/MAC/config.c +++ b/openair2/LAYER2/MAC/config.c @@ -160,6 +160,58 @@ uint32_t to_earfcn(int eutra_bandP, uint32_t dl_CarrierFreq, uint32_t bw) (eutra_bandtable[i].N_OFFs_DL / 10)); } +uint32_t to_earfcn_DL(int eutra_bandP, long long int dl_CarrierFreq, uint32_t bw) +{ + + uint32_t dl_CarrierFreq_by_100k = dl_CarrierFreq / 100000; + int bw_by_100 = bw / 100; + + int i; + + AssertFatal(eutra_bandP < 69, "eutra_band %d > 68\n", eutra_bandP); + for (i = 0; i < 69 && eutra_bandtable[i].band != eutra_bandP; i++); + + AssertFatal(dl_CarrierFreq_by_100k >= eutra_bandtable[i].dl_min, + "Band %d, bw %u : DL carrier frequency %lld Hz < %u\n", + eutra_bandP, bw, dl_CarrierFreq, + eutra_bandtable[i].dl_min); + AssertFatal(dl_CarrierFreq_by_100k <= + (eutra_bandtable[i].dl_max - bw_by_100), + "Band %d, bw %u : DL carrier frequency %lld Hz > %d\n", + eutra_bandP, bw, dl_CarrierFreq, + eutra_bandtable[i].dl_max - bw_by_100); + + + return (dl_CarrierFreq_by_100k - eutra_bandtable[i].dl_min + + (eutra_bandtable[i].N_OFFs_DL / 10)); +} + +uint32_t to_earfcn_UL(int eutra_bandP, long long int ul_CarrierFreq, uint32_t bw) +{ + + uint32_t ul_CarrierFreq_by_100k = ul_CarrierFreq / 100000; + int bw_by_100 = bw / 100; + + int i; + + AssertFatal(eutra_bandP < 69, "eutra_band %d > 68\n", eutra_bandP); + for (i = 0; i < 69 && eutra_bandtable[i].band != eutra_bandP; i++); + + AssertFatal(ul_CarrierFreq_by_100k >= eutra_bandtable[i].ul_min, + "Band %d, bw %u : UL carrier frequency %lld Hz < %u\n", + eutra_bandP, bw, ul_CarrierFreq, + eutra_bandtable[i].ul_min); + AssertFatal(ul_CarrierFreq_by_100k <= + (eutra_bandtable[i].ul_max - bw_by_100), + "Band %d, bw %u : UL carrier frequency %lld Hz > %d\n", + eutra_bandP, bw, ul_CarrierFreq, + eutra_bandtable[i].ul_max - bw_by_100); + + + return (ul_CarrierFreq_by_100k - eutra_bandtable[i].ul_min + + ((eutra_bandtable[i].N_OFFs_DL + 180000) / 10)); +} + uint32_t from_earfcn(int eutra_bandP, uint32_t dl_earfcn) { diff --git a/openair2/X2AP/x2ap_common.h b/openair2/X2AP/x2ap_common.h index ceda1c8eb9..a2f903a737 100644 --- a/openair2/X2AP/x2ap_common.h +++ b/openair2/X2AP/x2ap_common.h @@ -28,12 +28,12 @@ #include "X2AP_InitiatingMessage.h" #include "X2AP_SuccessfulOutcome.h" #include "X2AP_UnsuccessfulOutcome.h" -#include "X2AP_ProtocolIE-Field.h" #include "X2AP_ProtocolIE-FieldPair.h" #include "X2AP_ProtocolIE-ContainerPair.h" #include "X2AP_ProtocolExtensionField.h" #include "X2AP_ProtocolExtensionContainer.h" #include "X2AP_asn_constant.h" +#include "intertask_interface.h" #ifndef X2AP_COMMON_H_ #define X2AP_COMMON_H_ @@ -87,15 +87,13 @@ extern int asn1_xer_print; if (mandatory) DevAssert(ie != NULL); \ } while(0) -//Forward declaration -struct x2ap_message_s; - /** \brief Function callback prototype. **/ typedef int (*x2ap_message_decoded_callback)( + instance_t instance, uint32_t assocId, uint32_t stream, - struct x2ap_message_s *message); + X2AP_X2AP_PDU_t *pdu); /** \brief Encode a successfull outcome message \param buffer pointer to buffer in which data will be encoded diff --git a/openair2/X2AP/x2ap_eNB.c b/openair2/X2AP/x2ap_eNB.c index 4f23b5ddfe..b6bcd95552 100644 --- a/openair2/X2AP/x2ap_eNB.c +++ b/openair2/X2AP/x2ap_eNB.c @@ -31,6 +31,7 @@ #include "x2ap_eNB_defs.h" #include "x2ap_eNB_management_procedures.h" #include "x2ap_eNB_handler.h" +#include "x2ap_eNB_generate_messages.h" #include "x2ap_common.h" #include "queue.h" @@ -42,9 +43,9 @@ struct x2ap_eNB_data_s; RB_PROTOTYPE(x2ap_enb_map, x2ap_eNB_data_s, entry, x2ap_eNB_compare_assoc_id); -//static -//void x2ap_eNB_handle_sctp_data_ind(instance_t instance, - // sctp_data_ind_t *sctp_data_ind); +static +void x2ap_eNB_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind); + static void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp); @@ -63,22 +64,21 @@ void x2ap_eNB_register_eNB(x2ap_eNB_instance_t *instance_p, uint32_t enb_port_for_X2C, int multi_sd); -/* + static -void x2ap_eNB_handle_sctp_data_ind(instance_t instance, - sctp_data_ind_t *sctp_data_ind) { +void x2ap_eNB_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind) { int result; DevAssert(sctp_data_ind != NULL); - x2ap_eNB_handle_message(sctp_data_ind->assoc_id, sctp_data_ind->stream, + x2ap_eNB_handle_message(instance, sctp_data_ind->assoc_id, sctp_data_ind->stream, sctp_data_ind->buffer, sctp_data_ind->buffer_length); result = itti_free(TASK_UNKNOWN, sctp_data_ind->buffer); AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); -}*/ +} static void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp) @@ -143,7 +143,7 @@ printf("x2ap_eNB_handle_sctp_association_resp at 4\n"); dump_trees(); /* Prepare new x2 Setup Request */ - //x2ap_eNB_generate_x2_setup_request(instance_p, x2ap_enb_data_p); + x2ap_eNB_generate_x2_setup_request(instance_p, x2ap_enb_data_p); } static @@ -325,6 +325,19 @@ void x2ap_eNB_handle_register_eNB(instance_t instance, new_instance->mnc = x2ap_register_eNB->mnc; new_instance->mnc_digit_length = x2ap_register_eNB->mnc_digit_length; + new_instance->num_cc = x2ap_register_eNB->num_cc; + + for (int i = 0; i< x2ap_register_eNB->num_cc; i++){ + new_instance->eutra_band[i] = x2ap_register_eNB->eutra_band[i]; + new_instance->downlink_frequency[i] = x2ap_register_eNB->downlink_frequency[i]; + new_instance->uplink_frequency_offset[i] = x2ap_register_eNB->uplink_frequency_offset[i]; + new_instance->Nid_cell[i] = x2ap_register_eNB->Nid_cell[i]; + new_instance->N_RB_DL[i] = x2ap_register_eNB->N_RB_DL[i]; + new_instance->frame_type[i] = x2ap_register_eNB->frame_type[i]; + new_instance->fdd_earfcn_DL[i] = x2ap_register_eNB->fdd_earfcn_DL[i]; + new_instance->fdd_earfcn_UL[i] = x2ap_register_eNB->fdd_earfcn_UL[i]; + } + DevCheck(x2ap_register_eNB->nb_x2 <= X2AP_MAX_NB_ENB_IP_ADDRESS, X2AP_MAX_NB_ENB_IP_ADDRESS, x2ap_register_eNB->nb_x2, 0); memcpy(new_instance->target_enb_x2_ip_address, @@ -429,8 +442,8 @@ void *x2ap_task(void *arg) break; case SCTP_DATA_IND: - //x2ap_eNB_handle_sctp_data_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg), - // &received_msg->ittiMsg.sctp_data_ind); + x2ap_eNB_handle_sctp_data_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg), + &received_msg->ittiMsg.sctp_data_ind); break; default: diff --git a/openair2/X2AP/x2ap_eNB_decoder.c b/openair2/X2AP/x2ap_eNB_decoder.c new file mode 100644 index 0000000000..f156d96d17 --- /dev/null +++ b/openair2/X2AP/x2ap_eNB_decoder.c @@ -0,0 +1,127 @@ +/* + * 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.1 (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 + */ + +#include + +#include "assertions.h" +#include "intertask_interface.h" +#include "x2ap_common.h" +#include "x2ap_eNB_decoder.h" + +static int x2ap_eNB_decode_initiating_message(X2AP_X2AP_PDU_t *pdu) +{ + DevAssert(pdu != NULL); + + switch(pdu->choice.initiatingMessage.procedureCode) { + + case X2AP_ProcedureCode_id_x2Setup: + asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_X2AP_X2AP_PDU, pdu); + X2AP_INFO("x2ap_eNB_decode_initiating_message!\n"); + break; + + default: + X2AP_ERROR("Unknown procedure ID (%d) for initiating message\n", + (int)pdu->choice.initiatingMessage.procedureCode); + AssertFatal( 0, "Unknown procedure ID (%d) for initiating message\n", + (int)pdu->choice.initiatingMessage.procedureCode); + return -1; + } + + return 0; +} + +static int x2ap_eNB_decode_successful_outcome(X2AP_X2AP_PDU_t *pdu) +{ + DevAssert(pdu != NULL); + + switch(pdu->choice.successfulOutcome.procedureCode) { + case X2AP_ProcedureCode_id_x2Setup: + asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_X2AP_X2AP_PDU, pdu); + X2AP_INFO("x2ap_eNB_decode_successfuloutcome_message!\n"); + break; + + default: + X2AP_ERROR("Unknown procedure ID (%d) for successfull outcome message\n", + (int)pdu->choice.successfulOutcome.procedureCode); + return -1; + } + + return 0; +} + +static int x2ap_eNB_decode_unsuccessful_outcome(X2AP_X2AP_PDU_t *pdu) +{ + DevAssert(pdu != NULL); + + switch(pdu->choice.unsuccessfulOutcome.procedureCode) { + case X2AP_ProcedureCode_id_x2Setup: + asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_X2AP_X2AP_PDU, pdu); + X2AP_INFO("x2ap_eNB_decode_unsuccessfuloutcome_message!\n"); + break; + + default: + X2AP_ERROR("Unknown procedure ID (%d) for unsuccessfull outcome message\n", + (int)pdu->choice.unsuccessfulOutcome.procedureCode); + return -1; + } + + return 0; +} + +int x2ap_eNB_decode_pdu(X2AP_X2AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t length) +{ + asn_dec_rval_t dec_ret; + + DevAssert(buffer != NULL); + + dec_ret = aper_decode(NULL, + &asn_DEF_X2AP_X2AP_PDU, + (void **)&pdu, + buffer, + length, + 0, + 0); + + xer_fprint(stdout, &asn_DEF_X2AP_X2AP_PDU, pdu); + + if (dec_ret.code != RC_OK) { + X2AP_ERROR("Failed to decode pdu\n"); + return -1; + } + + switch(pdu->present) { + case X2AP_X2AP_PDU_PR_initiatingMessage: + return x2ap_eNB_decode_initiating_message(pdu); + + case X2AP_X2AP_PDU_PR_successfulOutcome: + return x2ap_eNB_decode_successful_outcome(pdu); + + case X2AP_X2AP_PDU_PR_unsuccessfulOutcome: + return x2ap_eNB_decode_unsuccessful_outcome(pdu); + + default: + X2AP_DEBUG("Unknown presence (%d) or not implemented\n", (int)pdu->present); + break; + } + + + return -1; +} diff --git a/openair2/X2AP/x2ap_eNB_decoder.h b/openair2/X2AP/x2ap_eNB_decoder.h new file mode 100644 index 0000000000..9ce9ea3d40 --- /dev/null +++ b/openair2/X2AP/x2ap_eNB_decoder.h @@ -0,0 +1,29 @@ +/* + * 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.1 (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 + */ + +#ifndef X2AP_ENB_DECODER_H_ +#define X2AP_ENB_DECODER_H_ + +int x2ap_eNB_decode_pdu(X2AP_X2AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t length) +__attribute__ ((warn_unused_result)); + +#endif /* X2AP_ENB_DECODER_H_ */ + diff --git a/openair2/X2AP/x2ap_eNB_defs.h b/openair2/X2AP/x2ap_eNB_defs.h index 11b4434dc0..3014290206 100644 --- a/openair2/X2AP/x2ap_eNB_defs.h +++ b/openair2/X2AP/x2ap_eNB_defs.h @@ -151,6 +151,17 @@ typedef struct x2ap_eNB_instance_s { uint16_t mnc; uint8_t mnc_digit_length; + /* CC params */ + int16_t eutra_band[MAX_NUM_CCs]; + uint32_t downlink_frequency[MAX_NUM_CCs]; + int32_t uplink_frequency_offset[MAX_NUM_CCs]; + uint32_t Nid_cell[MAX_NUM_CCs]; + int16_t N_RB_DL[MAX_NUM_CCs]; + lte_frame_type_t frame_type[MAX_NUM_CCs]; + uint32_t fdd_earfcn_DL[MAX_NUM_CCs]; + uint32_t fdd_earfcn_UL[MAX_NUM_CCs]; + int num_cc; + net_ip_address_t target_enb_x2_ip_address[X2AP_MAX_NB_ENB_IP_ADDRESS]; uint8_t nb_x2; net_ip_address_t enb_x2_ip_address; diff --git a/openair2/X2AP/x2ap_eNB_encoder.c b/openair2/X2AP/x2ap_eNB_encoder.c new file mode 100644 index 0000000000..1eb617a7f1 --- /dev/null +++ b/openair2/X2AP/x2ap_eNB_encoder.c @@ -0,0 +1,54 @@ +/* + * 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.1 (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 + */ + +#include +#include +#include + +#include "assertions.h" +#include "conversions.h" +#include "intertask_interface.h" +#include "x2ap_common.h" +#include "x2ap_eNB_encoder.h" + +int x2ap_eNB_encode_pdu(X2AP_X2AP_PDU_t *pdu, uint8_t **buffer, uint32_t *len) +{ + ssize_t encoded; + + DevAssert(pdu != NULL); + DevAssert(buffer != NULL); + DevAssert(len != NULL); + + if (asn1_xer_print) { + xer_fprint(stdout, &asn_DEF_X2AP_X2AP_PDU, (void *)pdu); + } + + encoded = aper_encode_to_new_buffer(&asn_DEF_X2AP_X2AP_PDU, 0, pdu, (void **)buffer); + + if (encoded < 0) { + return -1; + } + + *len = encoded; + + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_X2AP_X2AP_PDU, pdu); + return encoded; +} diff --git a/openair2/X2AP/x2ap_eNB_encoder.h b/openair2/X2AP/x2ap_eNB_encoder.h new file mode 100644 index 0000000000..04c77583b4 --- /dev/null +++ b/openair2/X2AP/x2ap_eNB_encoder.h @@ -0,0 +1,28 @@ +/* + * 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.1 (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 + */ + +#ifndef X2AP_ENB_ENCODER_H_ +#define X2AP_ENB_ENCODER_H_ + +int x2ap_eNB_encode_pdu(X2AP_X2AP_PDU_t *pdu, uint8_t **buffer, uint32_t *len) +__attribute__ ((warn_unused_result)); + +#endif /* X2AP_ENB_ENCODER_H_ */ diff --git a/openair2/X2AP/x2ap_eNB_generate_messages.c b/openair2/X2AP/x2ap_eNB_generate_messages.c new file mode 100644 index 0000000000..9c5a281506 --- /dev/null +++ b/openair2/X2AP/x2ap_eNB_generate_messages.c @@ -0,0 +1,405 @@ +/* + * 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.1 (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 + */ + +#include "intertask_interface.h" + +#include "x2ap_common.h" +#include "x2ap_eNB.h" +#include "x2ap_eNB_generate_messages.h" +#include "x2ap_eNB_encoder.h" + +#include "x2ap_eNB_itti_messaging.h" + +#include "msc.h" +#include "assertions.h" +#include "conversions.h" + +int x2ap_eNB_generate_x2_setup_request( + x2ap_eNB_instance_t *instance_p, x2ap_eNB_data_t *x2ap_eNB_data_p) +{ + X2AP_X2AP_PDU_t pdu; + X2AP_X2SetupRequest_t *out; + X2AP_X2SetupRequest_IEs_t *ie; + X2AP_PLMN_Identity_t *plmn; + ServedCells__Member *servedCellMember; + X2AP_GU_Group_ID_t *gu; + + uint8_t *buffer; + uint32_t len; + int ret = 0; + + DevAssert(instance_p != NULL); + DevAssert(x2ap_eNB_data_p != NULL); + + x2ap_eNB_data_p->state = X2AP_ENB_STATE_WAITING; + + /* Prepare the X2AP message to encode */ + memset(&pdu, 0, sizeof(pdu)); + pdu.present = X2AP_X2AP_PDU_PR_initiatingMessage; + pdu.choice.initiatingMessage.procedureCode = X2AP_ProcedureCode_id_x2Setup; + pdu.choice.initiatingMessage.criticality = X2AP_Criticality_reject; + pdu.choice.initiatingMessage.value.present = X2AP_InitiatingMessage__value_PR_X2SetupRequest; + out = &pdu.choice.initiatingMessage.value.choice.X2SetupRequest; + + /* mandatory */ + ie = (X2AP_X2SetupRequest_IEs_t *)calloc(1, sizeof(X2AP_X2SetupRequest_IEs_t)); + ie->id = X2AP_ProtocolIE_ID_id_GlobalENB_ID; + ie->criticality = X2AP_Criticality_reject; + ie->value.present = X2AP_X2SetupRequest_IEs__value_PR_GlobalENB_ID; + MCC_MNC_TO_PLMNID(instance_p->mcc, instance_p->mnc, instance_p->mnc_digit_length, + &ie->value.choice.GlobalENB_ID.pLMN_Identity); + ie->value.choice.GlobalENB_ID.eNB_ID.present = X2AP_ENB_ID_PR_macro_eNB_ID; + MACRO_ENB_ID_TO_BIT_STRING(instance_p->eNB_id, + &ie->value.choice.GlobalENB_ID.eNB_ID.choice.macro_eNB_ID); + X2AP_INFO("%d -> %02x%02x%02x\n", instance_p->eNB_id, + ie->value.choice.GlobalENB_ID.eNB_ID.choice.macro_eNB_ID.buf[0], + ie->value.choice.GlobalENB_ID.eNB_ID.choice.macro_eNB_ID.buf[1], + ie->value.choice.GlobalENB_ID.eNB_ID.choice.macro_eNB_ID.buf[2]); + ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); + + /* mandatory */ + ie = (X2AP_X2SetupRequest_IEs_t *)calloc(1, sizeof(X2AP_X2SetupRequest_IEs_t)); + ie->id = X2AP_ProtocolIE_ID_id_ServedCells; + ie->criticality = X2AP_Criticality_reject; + ie->value.present = X2AP_X2SetupRequest_IEs__value_PR_ServedCells; + { + for (int i = 0; inum_cc; i++){ + servedCellMember = (ServedCells__Member *)calloc(1,sizeof(ServedCells__Member)); + { + servedCellMember->servedCellInfo.pCI = instance_p->Nid_cell[i]; + + MCC_MNC_TO_PLMNID(instance_p->mcc, instance_p->mnc, instance_p->mnc_digit_length, + &servedCellMember->servedCellInfo.cellId.pLMN_Identity); + MACRO_ENB_ID_TO_CELL_IDENTITY(instance_p->eNB_id,0, + &servedCellMember->servedCellInfo.cellId.eUTRANcellIdentifier); + + INT16_TO_OCTET_STRING(instance_p->tac, &servedCellMember->servedCellInfo.tAC); + plmn = (X2AP_PLMN_Identity_t *)calloc(1,sizeof(X2AP_PLMN_Identity_t)); + { + MCC_MNC_TO_PLMNID(instance_p->mcc, instance_p->mnc, instance_p->mnc_digit_length, plmn); + ASN_SEQUENCE_ADD(&servedCellMember->servedCellInfo.broadcastPLMNs.list, plmn); + } + + if (instance_p->frame_type[i] == FDD) { + servedCellMember->servedCellInfo.eUTRA_Mode_Info.present = X2AP_EUTRA_Mode_Info_PR_fDD; + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.dL_EARFCN = instance_p->fdd_earfcn_DL[i]; + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.uL_EARFCN = instance_p->fdd_earfcn_UL[i]; + switch (instance_p->N_RB_DL[i]) { + case 6: + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.uL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw6; + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.dL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw6; + break; + case 15: + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.uL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw15; + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.dL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw15; + break; + case 25: + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.uL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw25; + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.dL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw25; + break; + case 50: + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.uL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw50; + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.dL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw50; + break; + case 75: + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.uL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw75; + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.dL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw75; + break; + case 100: + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.uL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw100; + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.dL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw100; + break; + default: + AssertFatal(0,"Failed: Check value for N_RB_DL/N_RB_UL"); + break; + } + } + else { + AssertFatal(0,"X2Setuprequest not supported for TDD!"); + } + } + ASN_SEQUENCE_ADD(&ie->value.choice.ServedCells.list, servedCellMember); + } + } + ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); + + /* mandatory */ + ie = (X2AP_X2SetupRequest_IEs_t *)calloc(1, sizeof(X2AP_X2SetupRequest_IEs_t)); + ie->id = X2AP_ProtocolIE_ID_id_GUGroupIDList; + ie->criticality = X2AP_Criticality_reject; + ie->value.present = X2AP_X2SetupRequest_IEs__value_PR_GUGroupIDList; + { + gu = (X2AP_GU_Group_ID_t *)calloc(1, sizeof(X2AP_GU_Group_ID_t)); + { + MCC_MNC_TO_PLMNID(instance_p->mcc, instance_p->mnc, instance_p->mnc_digit_length, + &gu->pLMN_Identity); + //@TODO: consider to update this value + INT16_TO_OCTET_STRING(0, &gu->mME_Group_ID); + } + ASN_SEQUENCE_ADD(&ie->value.choice.GUGroupIDList.list, gu); + } + ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); + + if (x2ap_eNB_encode_pdu(&pdu, &buffer, &len) < 0) { + X2AP_ERROR("Failed to encode X2 setup request\n"); + return -1; + } + + MSC_LOG_TX_MESSAGE (MSC_X2AP_SRC_ENB, MSC_X2AP_TARGET_ENB, NULL, 0, "0 X2Setup/initiatingMessage assoc_id %u", x2ap_eNB_data_p->assoc_id); + + x2ap_eNB_itti_send_sctp_data_req(instance_p->instance, x2ap_eNB_data_p->assoc_id, buffer, len, 0); + + return ret; +} + +int x2ap_eNB_generate_x2_setup_response(x2ap_eNB_data_t *x2ap_eNB_data_p) +{ + X2AP_X2AP_PDU_t pdu; + X2AP_X2SetupResponse_t *out; + X2AP_X2SetupResponse_IEs_t *ie; + X2AP_PLMN_Identity_t *plmn; + ServedCells__Member *servedCellMember; + X2AP_GU_Group_ID_t *gu; + + x2ap_eNB_instance_t *instance_p; + + uint8_t *buffer; + uint32_t len; + int ret = 0; + + DevAssert(x2ap_eNB_data_p != NULL); + + /* get the eNB instance */ + instance_p = x2ap_eNB_data_p->x2ap_eNB_instance; + + DevAssert(instance_p != NULL); + + /* Prepare the X2AP message to encode */ + memset(&pdu, 0, sizeof(pdu)); + pdu.present = X2AP_X2AP_PDU_PR_successfulOutcome; + pdu.choice.successfulOutcome.procedureCode = X2AP_ProcedureCode_id_x2Setup; + pdu.choice.successfulOutcome.criticality = X2AP_Criticality_reject; + pdu.choice.successfulOutcome.value.present = X2AP_SuccessfulOutcome__value_PR_X2SetupResponse; + out = &pdu.choice.successfulOutcome.value.choice.X2SetupResponse; + + /* mandatory */ + ie = (X2AP_X2SetupResponse_IEs_t *)calloc(1, sizeof(X2AP_X2SetupResponse_IEs_t)); + ie->id = X2AP_ProtocolIE_ID_id_GlobalENB_ID; + ie->criticality = X2AP_Criticality_reject; + ie->value.present = X2AP_X2SetupResponse_IEs__value_PR_GlobalENB_ID; + MCC_MNC_TO_PLMNID(instance_p->mcc, instance_p->mnc, instance_p->mnc_digit_length, + &ie->value.choice.GlobalENB_ID.pLMN_Identity); + ie->value.choice.GlobalENB_ID.eNB_ID.present = X2AP_ENB_ID_PR_macro_eNB_ID; + MACRO_ENB_ID_TO_BIT_STRING(instance_p->eNB_id, + &ie->value.choice.GlobalENB_ID.eNB_ID.choice.macro_eNB_ID); + X2AP_INFO("%d -> %02x%02x%02x\n", instance_p->eNB_id, + ie->value.choice.GlobalENB_ID.eNB_ID.choice.macro_eNB_ID.buf[0], + ie->value.choice.GlobalENB_ID.eNB_ID.choice.macro_eNB_ID.buf[1], + ie->value.choice.GlobalENB_ID.eNB_ID.choice.macro_eNB_ID.buf[2]); + ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); + + /* mandatory */ + ie = (X2AP_X2SetupResponse_IEs_t *)calloc(1, sizeof(X2AP_X2SetupResponse_IEs_t)); + ie->id = X2AP_ProtocolIE_ID_id_ServedCells; + ie->criticality = X2AP_Criticality_reject; + ie->value.present = X2AP_X2SetupResponse_IEs__value_PR_ServedCells; + { + for (int i = 0; inum_cc; i++){ + servedCellMember = (ServedCells__Member *)calloc(1,sizeof(ServedCells__Member)); + { + servedCellMember->servedCellInfo.pCI = instance_p->Nid_cell[i]; + + MCC_MNC_TO_PLMNID(instance_p->mcc, instance_p->mnc, instance_p->mnc_digit_length, + &servedCellMember->servedCellInfo.cellId.pLMN_Identity); + MACRO_ENB_ID_TO_CELL_IDENTITY(instance_p->eNB_id,0, + &servedCellMember->servedCellInfo.cellId.eUTRANcellIdentifier); + + INT16_TO_OCTET_STRING(instance_p->tac, &servedCellMember->servedCellInfo.tAC); + plmn = (X2AP_PLMN_Identity_t *)calloc(1,sizeof(X2AP_PLMN_Identity_t)); + { + MCC_MNC_TO_PLMNID(instance_p->mcc, instance_p->mnc, instance_p->mnc_digit_length, plmn); + ASN_SEQUENCE_ADD(&servedCellMember->servedCellInfo.broadcastPLMNs.list, plmn); + } + + if (instance_p->frame_type[i] == FDD) { + servedCellMember->servedCellInfo.eUTRA_Mode_Info.present = X2AP_EUTRA_Mode_Info_PR_fDD; + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.dL_EARFCN = instance_p->fdd_earfcn_DL[i]; + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.uL_EARFCN = instance_p->fdd_earfcn_UL[i]; + switch (instance_p->N_RB_DL[i]) { + case 6: + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.uL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw6; + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.dL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw6; + break; + case 15: + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.uL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw15; + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.dL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw15; + break; + case 25: + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.uL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw25; + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.dL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw25; + break; + case 50: + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.uL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw50; + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.dL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw50; + break; + case 75: + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.uL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw75; + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.dL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw75; + break; + case 100: + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.uL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw100; + servedCellMember->servedCellInfo.eUTRA_Mode_Info.choice.fDD.dL_Transmission_Bandwidth = X2AP_Transmission_Bandwidth_bw100; + break; + default: + AssertFatal(0,"Failed: Check value for N_RB_DL/N_RB_UL"); + break; + } + } + else { + AssertFatal(0,"X2Setupresponse not supported for TDD!"); + } + } + ASN_SEQUENCE_ADD(&ie->value.choice.ServedCells.list, servedCellMember); + } + } + ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); + + /* mandatory */ + ie = (X2AP_X2SetupResponse_IEs_t *)calloc(1, sizeof(X2AP_X2SetupResponse_IEs_t)); + ie->id = X2AP_ProtocolIE_ID_id_GUGroupIDList; + ie->criticality = X2AP_Criticality_reject; + ie->value.present = X2AP_X2SetupResponse_IEs__value_PR_GUGroupIDList; + { + gu = (X2AP_GU_Group_ID_t *)calloc(1, sizeof(X2AP_GU_Group_ID_t)); + { + MCC_MNC_TO_PLMNID(instance_p->mcc, instance_p->mnc, instance_p->mnc_digit_length, + &gu->pLMN_Identity); + //@TODO: consider to update this value + INT16_TO_OCTET_STRING(0, &gu->mME_Group_ID); + } + ASN_SEQUENCE_ADD(&ie->value.choice.GUGroupIDList.list, gu); + } + ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); + + if (x2ap_eNB_encode_pdu(&pdu, &buffer, &len) < 0) { + X2AP_ERROR("Failed to encode X2 setup response\n"); + return -1; + } + + x2ap_eNB_data_p->state = X2AP_ENB_STATE_READY; + + MSC_LOG_TX_MESSAGE (MSC_X2AP_SRC_ENB, MSC_X2AP_TARGET_ENB, NULL, 0, "0 X2Setup/successfulOutcome assoc_id %u", x2ap_eNB_data_p->assoc_id); + + x2ap_eNB_itti_send_sctp_data_req(instance_p->instance, x2ap_eNB_data_p->assoc_id, buffer, len, 0); + + return ret; +} + +int x2ap_eNB_generate_x2_setup_failure(instance_t instance, + uint32_t assoc_id, + X2AP_Cause_PR cause_type, + long cause_value, + long time_to_wait) +{ + X2AP_X2AP_PDU_t pdu; + X2AP_X2SetupFailure_t *out; + X2AP_X2SetupFailure_IEs_t *ie; + + uint8_t *buffer; + uint32_t len; + int ret = 0; + + /* Prepare the X2AP message to encode */ + memset(&pdu, 0, sizeof(pdu)); + pdu.present = X2AP_X2AP_PDU_PR_unsuccessfulOutcome; + pdu.choice.unsuccessfulOutcome.procedureCode = X2AP_ProcedureCode_id_x2Setup; + pdu.choice.unsuccessfulOutcome.criticality = X2AP_Criticality_reject; + pdu.choice.unsuccessfulOutcome.value.present = X2AP_UnsuccessfulOutcome__value_PR_X2SetupFailure; + out = &pdu.choice.unsuccessfulOutcome.value.choice.X2SetupFailure; + + /* mandatory */ + ie = (X2AP_X2SetupFailure_IEs_t *)calloc(1, sizeof(X2AP_X2SetupFailure_IEs_t)); + ie->id = X2AP_ProtocolIE_ID_id_Cause; + ie->criticality = X2AP_Criticality_ignore; + ie->value.present = X2AP_X2SetupFailure_IEs__value_PR_Cause; + + x2ap_eNB_set_cause (&ie->value.choice.Cause, cause_type, cause_value); + + ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); + + /* optional: consider to handle this later */ + ie = (X2AP_X2SetupFailure_IEs_t *)calloc(1, sizeof(X2AP_X2SetupFailure_IEs_t)); + ie->id = X2AP_ProtocolIE_ID_id_TimeToWait; + ie->criticality = X2AP_Criticality_ignore; + ie->value.present = X2AP_X2SetupFailure_IEs__value_PR_TimeToWait; + + if (time_to_wait > -1) { + ie->value.choice.TimeToWait = time_to_wait; + } + + ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); + + if (x2ap_eNB_encode_pdu(&pdu, &buffer, &len) < 0) { + X2AP_ERROR("Failed to encode X2 setup failure\n"); + return -1; + } + + MSC_LOG_TX_MESSAGE (MSC_X2AP_SRC_ENB, + MSC_X2AP_TARGET_ENB, NULL, 0, + "0 X2Setup/unsuccessfulOutcome assoc_id %u cause %u value %u", + assoc_id, cause_type, cause_value); + + x2ap_eNB_itti_send_sctp_data_req(instance, assoc_id, buffer, len, 0); + + return ret; +} + +int x2ap_eNB_set_cause (X2AP_Cause_t * cause_p, + X2AP_Cause_PR cause_type, + long cause_value) +{ + + DevAssert (cause_p != NULL); + cause_p->present = cause_type; + + switch (cause_type) { + case X2AP_Cause_PR_radioNetwork: + cause_p->choice.misc = cause_value; + break; + + case X2AP_Cause_PR_transport: + cause_p->choice.misc = cause_value; + break; + + case X2AP_Cause_PR_protocol: + cause_p->choice.misc = cause_value; + break; + + case X2AP_Cause_PR_misc: + cause_p->choice.misc = cause_value; + break; + + default: + return -1; + } + + return 0; +} diff --git a/openair2/X2AP/x2ap_eNB_generate_messages.h b/openair2/X2AP/x2ap_eNB_generate_messages.h new file mode 100644 index 0000000000..a72b37e743 --- /dev/null +++ b/openair2/X2AP/x2ap_eNB_generate_messages.h @@ -0,0 +1,44 @@ +/* + * 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.1 (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 + */ + +#ifndef X2AP_ENB_GENERATE_MESSAGES_H_ +#define X2AP_ENB_GENERATE_MESSAGES_H_ + +#include "x2ap_eNB_defs.h" +#include "x2ap_common.h" + +int x2ap_eNB_generate_x2_setup_request(x2ap_eNB_instance_t *instance_p, + x2ap_eNB_data_t *x2ap_enb_data_p); + +int x2ap_eNB_generate_x2_setup_response(x2ap_eNB_data_t *x2ap_enb_data_p); + +int x2ap_eNB_generate_x2_setup_failure(instance_t instance, + uint32_t assoc_id, + X2AP_Cause_PR cause_type, + long cause_value, + long time_to_wait); + +int x2ap_eNB_set_cause (X2AP_Cause_t * cause_p, + X2AP_Cause_PR cause_type, + long cause_value); + +#endif /* X2AP_ENB_GENERATE_MESSAGES_H_ */ + diff --git a/openair2/X2AP/x2ap_eNB_handler.c b/openair2/X2AP/x2ap_eNB_handler.c index 180535baa6..a16a3da5a8 100644 --- a/openair2/X2AP/x2ap_eNB_handler.c +++ b/openair2/X2AP/x2ap_eNB_handler.c @@ -27,12 +27,72 @@ #include "x2ap_common.h" #include "x2ap_eNB_defs.h" #include "x2ap_eNB_handler.h" +#include "x2ap_eNB_decoder.h" #include "x2ap_eNB_management_procedures.h" +#include "x2ap_eNB_generate_messages.h" +#include "msc.h" #include "assertions.h" #include "conversions.h" +static +int x2ap_eNB_handle_x2_setup_request (instance_t instance, + uint32_t assoc_id, + uint32_t stream, + X2AP_X2AP_PDU_t *pdu); +static +int x2ap_eNB_handle_x2_setup_response (instance_t instance, + uint32_t assoc_id, + uint32_t stream, + X2AP_X2AP_PDU_t *pdu); +static +int x2ap_eNB_handle_x2_setup_failure (instance_t instance, + uint32_t assoc_id, + uint32_t stream, + X2AP_X2AP_PDU_t *pdu); + +/* Handlers matrix. Only eNB related procedure present here */ +x2ap_message_decoded_callback x2ap_messages_callback[][3] = { + { 0, 0, 0 }, /* handoverPreparation */ + { 0, 0, 0 }, /* handoverCancel */ + { 0, 0, 0 }, /* loadIndication */ + { 0, 0, 0 }, /* errorIndication */ + { 0, 0, 0 }, /* snStatusTransfer */ + { 0, 0, 0 }, /* uEContextRelease */ + { x2ap_eNB_handle_x2_setup_request, x2ap_eNB_handle_x2_setup_response, x2ap_eNB_handle_x2_setup_failure }, /* x2Setup */ + { 0, 0, 0 }, /* reset */ + { 0, 0, 0 }, /* eNBConfigurationUpdate */ + { 0, 0, 0 }, /* resourceStatusReportingInitiation */ + { 0, 0, 0 }, /* resourceStatusReporting */ + { 0, 0, 0 }, /* privateMessage */ + { 0, 0, 0 }, /* mobilitySettingsChange */ + { 0, 0, 0 }, /* rLFIndication */ + { 0, 0, 0 }, /* handoverReport */ + { 0, 0, 0 }, /* cellActivation */ + { 0, 0, 0 }, /* x2Release */ + { 0, 0, 0 }, /* x2APMessageTransfer */ + { 0, 0, 0 }, /* x2Removal */ + { 0, 0, 0 }, /* seNBAdditionPreparation */ + { 0, 0, 0 }, /* seNBReconfigurationCompletion */ + { 0, 0, 0 }, /* meNBinitiatedSeNBModificationPreparation */ + { 0, 0, 0 }, /* seNBinitiatedSeNBModification */ + { 0, 0, 0 }, /* meNBinitiatedSeNBRelease */ + { 0, 0, 0 }, /* seNBinitiatedSeNBRelease */ + { 0, 0, 0 }, /* seNBCounterCheck */ + { 0, 0, 0 } /* retrieveUEContext */ +}; + +char *x2ap_direction2String(int x2ap_dir) { +static char *x2ap_direction_String[] = { + "", /* Nothing */ + "Originating message", /* originating message */ + "Successfull outcome", /* successfull outcome */ + "UnSuccessfull outcome", /* successfull outcome */ +}; +return(x2ap_direction_String[x2ap_dir]); +} + void x2ap_handle_x2_setup_message(x2ap_eNB_data_t *enb_desc_p, int sctp_shutdown) { if (sctp_shutdown) { @@ -77,3 +137,296 @@ void x2ap_handle_x2_setup_message(x2ap_eNB_data_t *enb_desc_p, int sctp_shutdown } } } + + +int x2ap_eNB_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream, + const uint8_t *const data, const uint32_t data_length) +{ + X2AP_X2AP_PDU_t pdu; + int ret; + + DevAssert(data != NULL); + + memset(&pdu, 0, sizeof(pdu)); + + if (x2ap_eNB_decode_pdu(&pdu, data, data_length) < 0) { + X2AP_ERROR("Failed to decode PDU\n"); + return -1; + } + + /* Checking procedure Code and direction of message */ + if (pdu.choice.initiatingMessage.procedureCode > sizeof(x2ap_messages_callback) / (3 * sizeof( + x2ap_message_decoded_callback)) + || (pdu.present > X2AP_X2AP_PDU_PR_unsuccessfulOutcome)) { + X2AP_ERROR("[SCTP %d] Either procedureCode %ld or direction %d exceed expected\n", + assoc_id, pdu.choice.initiatingMessage.procedureCode, pdu.present); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_X2AP_X2AP_PDU, &pdu); + return -1; + } + + /* No handler present. + * This can mean not implemented or no procedure for eNB (wrong direction). + */ + if (x2ap_messages_callback[pdu.choice.initiatingMessage.procedureCode][pdu.present - 1] == NULL) { + X2AP_ERROR("[SCTP %d] No handler for procedureCode %ld in %s\n", + assoc_id, pdu.choice.initiatingMessage.procedureCode, + x2ap_direction2String(pdu.present - 1)); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_X2AP_X2AP_PDU, &pdu); + return -1; + } + + /* Calling the right handler */ + ret = (*x2ap_messages_callback[pdu.choice.initiatingMessage.procedureCode][pdu.present - 1]) + (instance, assoc_id, stream, &pdu); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_X2AP_X2AP_PDU, &pdu); + return ret; +} + +int +x2ap_eNB_handle_x2_setup_request(instance_t instance, + uint32_t assoc_id, + uint32_t stream, + X2AP_X2AP_PDU_t *pdu) +{ + + X2AP_X2SetupRequest_t *x2SetupRequest; + X2AP_X2SetupRequest_IEs_t *ie; + + x2ap_eNB_data_t *x2ap_eNB_data; + uint32_t eNB_id = 0; + + DevAssert (pdu != NULL); + x2SetupRequest = &pdu->choice.initiatingMessage.value.choice.X2SetupRequest; + + /* + * We received a new valid X2 Setup Request on a stream != 0. + * * * * This should not happen -> reject eNB x2 setup request. + */ + + if (stream != 0) { + X2AP_ERROR("Received new x2 setup request on stream != 0\n"); + /* + * Send a x2 setup failure with protocol cause unspecified + */ + return x2ap_eNB_generate_x2_setup_failure (instance, + assoc_id, + X2AP_Cause_PR_protocol, + X2AP_CauseProtocol_unspecified, + -1); + } + + X2AP_DEBUG("Received a new X2 setup request\n"); + + X2AP_FIND_PROTOCOLIE_BY_ID(X2AP_X2SetupRequest_IEs_t, ie, x2SetupRequest, + X2AP_ProtocolIE_ID_id_GlobalENB_ID, true); + + if (ie->value.choice.GlobalENB_ID.eNB_ID.present == X2AP_ENB_ID_PR_home_eNB_ID) { + // Home eNB ID = 28 bits + uint8_t *eNB_id_buf = ie->value.choice.GlobalENB_ID.eNB_ID.choice.home_eNB_ID.buf; + + if (ie->value.choice.GlobalENB_ID.eNB_ID.choice.macro_eNB_ID.size != 28) { + //TODO: handle case were size != 28 -> notify ? reject ? + } + + eNB_id = (eNB_id_buf[0] << 20) + (eNB_id_buf[1] << 12) + (eNB_id_buf[2] << 4) + ((eNB_id_buf[3] & 0xf0) >> 4); + X2AP_DEBUG("Home eNB id: %07x\n", eNB_id); + } else { + // Macro eNB = 20 bits + uint8_t *eNB_id_buf = ie->value.choice.GlobalENB_ID.eNB_ID.choice.macro_eNB_ID.buf; + + if (ie->value.choice.GlobalENB_ID.eNB_ID.choice.macro_eNB_ID.size != 20) { + //TODO: handle case were size != 20 -> notify ? reject ? + } + + eNB_id = (eNB_id_buf[0] << 12) + (eNB_id_buf[1] << 4) + ((eNB_id_buf[2] & 0xf0) >> 4); + X2AP_DEBUG("macro eNB id: %05x\n", eNB_id); + } + + X2AP_DEBUG("Adding eNB to the list of associated eNBs\n"); + + if ((x2ap_eNB_data = x2ap_is_eNB_id_in_list (eNB_id)) == NULL) { + /* + * eNB has not been found in list of associated eNB, + * * * * Add it to the tail of list and initialize data + */ + if ((x2ap_eNB_data = x2ap_is_eNB_assoc_id_in_list (assoc_id)) == NULL) { + /* + * ?? + */ + return -1; + } else { + x2ap_eNB_data->state = X2AP_ENB_STATE_RESETTING; + x2ap_eNB_data->eNB_id = eNB_id; + } + } else { + x2ap_eNB_data->state = X2AP_ENB_STATE_RESETTING; + /* + * eNB has been found in list, consider the x2 setup request as a reset connection, + * * * * reseting any previous UE state if sctp association is != than the previous one + */ + if (x2ap_eNB_data->assoc_id != assoc_id) { + /* + * ??: Send an overload cause... + */ + X2AP_ERROR("Rejecting x2 setup request as eNB id %d is already associated to an active sctp association" "Previous known: %d, new one: %d\n", eNB_id, x2ap_eNB_data->assoc_id, assoc_id); + + DevAssert(x2ap_eNB_data->x2ap_eNB_instance != NULL); + x2ap_eNB_generate_x2_setup_failure (x2ap_eNB_data->x2ap_eNB_instance->instance, + assoc_id, + X2AP_Cause_PR_protocol, + X2AP_CauseProtocol_unspecified, + -1); + return -1; + } + /* + * TODO: call the reset procedure + */ + } + + return x2ap_eNB_generate_x2_setup_response(x2ap_eNB_data); +} + +static +int x2ap_eNB_handle_x2_setup_response(instance_t instance, + uint32_t assoc_id, + uint32_t stream, + X2AP_X2AP_PDU_t *pdu) +{ + + X2AP_X2SetupResponse_t *x2SetupResponse; + X2AP_X2SetupResponse_IEs_t *ie; + + x2ap_eNB_data_t *x2ap_eNB_data; + uint32_t eNB_id = 0; + + DevAssert (pdu != NULL); + x2SetupResponse = &pdu->choice.successfulOutcome.value.choice.X2SetupResponse; + + /* + * We received a new valid X2 Setup Response on a stream != 0. + * * * * This should not happen -> reject eNB x2 setup response. + */ + + if (stream != 0) { + X2AP_ERROR("Received new x2 setup response on stream != 0\n"); + } + + if ((x2ap_eNB_data = x2ap_get_eNB(NULL, assoc_id, 0)) == NULL) { + X2AP_ERROR("[SCTP %d] Received X2 setup response for non existing " + "eNB context\n", assoc_id); + return -1; + } + + X2AP_DEBUG("Received a new X2 setup response\n"); + + X2AP_FIND_PROTOCOLIE_BY_ID(X2AP_X2SetupResponse_IEs_t, ie, x2SetupResponse, + X2AP_ProtocolIE_ID_id_GlobalENB_ID, true); + + if (ie->value.choice.GlobalENB_ID.eNB_ID.present == X2AP_ENB_ID_PR_home_eNB_ID) { + // Home eNB ID = 28 bits + uint8_t *eNB_id_buf = ie->value.choice.GlobalENB_ID.eNB_ID.choice.home_eNB_ID.buf; + + if (ie->value.choice.GlobalENB_ID.eNB_ID.choice.macro_eNB_ID.size != 28) { + //TODO: handle case were size != 28 -> notify ? reject ? + } + + eNB_id = (eNB_id_buf[0] << 20) + (eNB_id_buf[1] << 12) + (eNB_id_buf[2] << 4) + ((eNB_id_buf[3] & 0xf0) >> 4); + X2AP_DEBUG("Home eNB id: %07x\n", eNB_id); + } else { + // Macro eNB = 20 bits + uint8_t *eNB_id_buf = ie->value.choice.GlobalENB_ID.eNB_ID.choice.macro_eNB_ID.buf; + + if (ie->value.choice.GlobalENB_ID.eNB_ID.choice.macro_eNB_ID.size != 20) { + //TODO: handle case were size != 20 -> notify ? reject ? + } + + eNB_id = (eNB_id_buf[0] << 12) + (eNB_id_buf[1] << 4) + ((eNB_id_buf[2] & 0xf0) >> 4); + X2AP_DEBUG("macro eNB id: %05x\n", eNB_id); + } + + X2AP_DEBUG("Adding eNB to the list of associated eNBs\n"); + + if ((x2ap_eNB_data = x2ap_is_eNB_id_in_list (eNB_id)) == NULL) { + /* + * eNB has not been found in list of associated eNB, + * * * * Add it to the tail of list and initialize data + */ + if ((x2ap_eNB_data = x2ap_is_eNB_assoc_id_in_list (assoc_id)) == NULL) { + /* + * ??: Send an overload cause... + */ + return -1; + } else { + x2ap_eNB_data->state = X2AP_ENB_STATE_RESETTING; + x2ap_eNB_data->eNB_id = eNB_id; + } + } else { + x2ap_eNB_data->state = X2AP_ENB_STATE_RESETTING; + /* + * TODO: call the reset procedure + */ + } + + /* Optionaly set the target eNB name */ + + /* The association is now ready as source and target eNBs know parameters of each other. + * Mark the association as connected. + */ + x2ap_eNB_data->state = X2AP_ENB_STATE_READY; + x2ap_eNB_data->x2ap_eNB_instance->x2_target_enb_associated_nb ++; + x2ap_handle_x2_setup_message(x2ap_eNB_data, 0); + + return 0; +} + +static +int x2ap_eNB_handle_x2_setup_failure(instance_t instance, + uint32_t assoc_id, + uint32_t stream, + X2AP_X2AP_PDU_t *pdu) +{ + + X2AP_X2SetupFailure_t *x2SetupFailure; + X2AP_X2SetupFailure_IEs_t *ie; + + x2ap_eNB_data_t *x2ap_eNB_data; + + DevAssert(pdu != NULL); + + x2SetupFailure = &pdu->choice.unsuccessfulOutcome.value.choice.X2SetupFailure; + + /* + * We received a new valid X2 Setup Failure on a stream != 0. + * * * * This should not happen -> reject eNB x2 setup failure. + */ + + if (stream != 0) { + X2AP_WARN("[SCTP %d] Received x2 setup failure on stream != 0 (%d)\n", + assoc_id, stream); + } + + if ((x2ap_eNB_data = x2ap_get_eNB (NULL, assoc_id, 0)) == NULL) { + X2AP_ERROR("[SCTP %d] Received X2 setup failure for non existing " + "eNB context\n", assoc_id); + return -1; + } + + X2AP_DEBUG("Received a new X2 setup failure\n"); + + X2AP_FIND_PROTOCOLIE_BY_ID(X2AP_X2SetupFailure_IEs_t, ie, x2SetupFailure, + X2AP_ProtocolIE_ID_id_Cause, true); + + + // need a FSM to handle all cases + if ((ie->value.choice.Cause.present == X2AP_Cause_PR_misc) && + (ie->value.choice.Cause.choice.misc == X2AP_CauseMisc_unspecified)) { + X2AP_WARN("Received X2 setup failure for eNB ... eNB is not ready\n"); + } else { + X2AP_ERROR("Received x2 setup failure for eNB... please check your parameters\n"); + } + + x2ap_eNB_data->state = X2AP_ENB_STATE_WAITING; + x2ap_handle_x2_setup_message(x2ap_eNB_data, 0); + + return 0; +} diff --git a/openair2/X2AP/x2ap_eNB_handler.h b/openair2/X2AP/x2ap_eNB_handler.h index 6d65c25a0a..0f93859a84 100644 --- a/openair2/X2AP/x2ap_eNB_handler.h +++ b/openair2/X2AP/x2ap_eNB_handler.h @@ -24,10 +24,10 @@ #include "x2ap_eNB_defs.h" -void x2ap_handle_x2_setup_message(x2ap_eNB_data_t *mme_desc_p, int sctp_shutdown); +void x2ap_handle_x2_setup_message(x2ap_eNB_data_t *eNB_desc_p, int sctp_shutdown); -//int x2ap_eNB_handle_message(uint32_t assoc_id, int32_t stream, - // const uint8_t * const data, const uint32_t data_length); +int x2ap_eNB_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream, + const uint8_t * const data, const uint32_t data_length); #endif /* X2AP_ENB_HANDLERS_H_ */ diff --git a/openair2/X2AP/x2ap_eNB_itti_messaging.c b/openair2/X2AP/x2ap_eNB_itti_messaging.c new file mode 100644 index 0000000000..d8e1e19afe --- /dev/null +++ b/openair2/X2AP/x2ap_eNB_itti_messaging.c @@ -0,0 +1,56 @@ +/* + * 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.1 (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 + */ + +#include "intertask_interface.h" + +#include "x2ap_eNB_itti_messaging.h" + +void x2ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint8_t *buffer, + uint32_t buffer_length, uint16_t stream) +{ + MessageDef *message_p; + sctp_data_req_t *sctp_data_req; + + message_p = itti_alloc_new_message(TASK_X2AP, SCTP_DATA_REQ); + + sctp_data_req = &message_p->ittiMsg.sctp_data_req; + + sctp_data_req->assoc_id = assoc_id; + sctp_data_req->buffer = buffer; + sctp_data_req->buffer_length = buffer_length; + sctp_data_req->stream = stream; + + itti_send_msg_to_task(TASK_SCTP, instance, message_p); +} + + +void x2ap_eNB_itti_send_sctp_close_association(instance_t instance, int32_t assoc_id) +{ + MessageDef *message_p = NULL; + sctp_close_association_t *sctp_close_association_p = NULL; + + message_p = itti_alloc_new_message(TASK_X2AP, SCTP_CLOSE_ASSOCIATION); + sctp_close_association_p = &message_p->ittiMsg.sctp_close_association; + sctp_close_association_p->assoc_id = assoc_id; + + itti_send_msg_to_task(TASK_SCTP, instance, message_p); +} + diff --git a/openair2/X2AP/x2ap_eNB_itti_messaging.h b/openair2/X2AP/x2ap_eNB_itti_messaging.h new file mode 100644 index 0000000000..55bf58b660 --- /dev/null +++ b/openair2/X2AP/x2ap_eNB_itti_messaging.h @@ -0,0 +1,32 @@ +/* + * 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.1 (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 + */ + +#ifndef X2AP_ENB_ITTI_MESSAGING_H_ +#define X2AP_ENB_ITTI_MESSAGING_H_ + +void x2ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint8_t *buffer, + uint32_t buffer_length, uint16_t stream); + + +void x2ap_eNB_itti_send_sctp_close_association(instance_t instance, int32_t assoc_id); + + +#endif /* X2AP_ENB_ITTI_MESSAGING_H_ */ From d85054c214d53aa9219f619c072a94a26524d646 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sat, 23 Jun 2018 13:52:38 +0200 Subject: [PATCH 233/379] Change types in RRC: list of MCC/MNC/TAC --- openair2/COMMON/rrc_messages_types.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openair2/COMMON/rrc_messages_types.h b/openair2/COMMON/rrc_messages_types.h index 4a0137d4b6..12a06f7c65 100644 --- a/openair2/COMMON/rrc_messages_types.h +++ b/openair2/COMMON/rrc_messages_types.h @@ -97,9 +97,10 @@ typedef struct RrcConfigurationReq_s { uint16_t tac; - uint16_t mcc; - uint16_t mnc; - uint8_t mnc_digit_length; + uint16_t mcc[PLMN_LIST_MAX_SIZE]; + uint16_t mnc[PLMN_LIST_MAX_SIZE]; + uint8_t mnc_digit_length[PLMN_LIST_MAX_SIZE]; + uint8_t num_plmn; paging_drx_t default_drx; From 72ef8be88eb4d19d58a6f32391f8214e31b098f5 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sat, 23 Jun 2018 13:53:14 +0200 Subject: [PATCH 234/379] Change types in S1AP Register REQ: list of MCC/MNC/TAC --- openair2/COMMON/s1ap_messages_types.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/openair2/COMMON/s1ap_messages_types.h b/openair2/COMMON/s1ap_messages_types.h index 4a5f492b0b..874286b590 100644 --- a/openair2/COMMON/s1ap_messages_types.h +++ b/openair2/COMMON/s1ap_messages_types.h @@ -325,12 +325,14 @@ typedef struct s1ap_register_enb_req_s { /* Tracking area code */ uint16_t tac; +#define PLMN_LIST_MAX_SIZE 6 /* Mobile Country Code * Mobile Network Code */ - uint16_t mcc; - uint16_t mnc; - uint8_t mnc_digit_length; + uint16_t mcc[PLMN_LIST_MAX_SIZE]; + uint16_t mnc[PLMN_LIST_MAX_SIZE]; + uint8_t mnc_digit_length[PLMN_LIST_MAX_SIZE]; + uint8_t num_plmn; /* Default Paging DRX of the eNB as defined in TS 36.304 */ paging_drx_t default_drx; From 3c6d0aed1b9e1a3a7c24254f6bf40d3e958c08e7 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sat, 23 Jun 2018 14:10:04 +0200 Subject: [PATCH 235/379] Read PLMN list configuration into RRC/S1AP --- openair2/ENB_APP/enb_config.c | 92 ++++++++++++++++++++++++++------- openair2/ENB_APP/enb_paramdef.h | 61 +++++++++++++++++++--- 2 files changed, 126 insertions(+), 27 deletions(-) diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 6d9b2edf82..0b214eeaea 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -624,7 +624,14 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { for (k=0; k eNB_name = strdup(enb_name); */ - RRC_CONFIGURATION_REQ (msg_p).tac = (uint16_t)atoi( *(ENBParamList.paramarray[i][ENB_TRACKING_AREA_CODE_IDX].strptr) ); - RRC_CONFIGURATION_REQ (msg_p).mcc = (uint16_t)atoi( *(ENBParamList.paramarray[i][ENB_MOBILE_COUNTRY_CODE_IDX].strptr) ); - RRC_CONFIGURATION_REQ (msg_p).mnc = (uint16_t)atoi( *(ENBParamList.paramarray[i][ENB_MOBILE_NETWORK_CODE_IDX].strptr) ); - RRC_CONFIGURATION_REQ (msg_p).mnc_digit_length = strlen(*(ENBParamList.paramarray[i][ENB_MOBILE_NETWORK_CODE_IDX].strptr)); - AssertFatal((RRC_CONFIGURATION_REQ (msg_p).mnc_digit_length == 2) || - (RRC_CONFIGURATION_REQ (msg_p).mnc_digit_length == 3), - "BAD MNC DIGIT LENGTH %d", - RRC_CONFIGURATION_REQ (msg_p).mnc_digit_length); + RRC_CONFIGURATION_REQ(msg_p).tac = *ENBParamList.paramarray[i][ENB_TRACKING_AREA_CODE_IDX].uptr; + AssertFatal(!ENBParamList.paramarray[i][ENB_MOBILE_COUNTRY_CODE_IDX_OLD].strptr + && !ENBParamList.paramarray[i][ENB_MOBILE_NETWORK_CODE_IDX_OLD].strptr, + "It seems that you use an old configuration file. Please change the existing\n" + " tracking_area_code = \"1\";\n" + " mobile_country_code = \"208\";\n" + " mobile_network_code = \"93\";\n" + "to\n" + " tracking_area_code = 1; // no string!!\n" + " plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } )\n"); + + config_getlist(&PLMNParamList, PLMNParams, sizeof(PLMNParams)/sizeof(paramdef_t), enbpath); + + if (PLMNParamList.numelt < 1 || PLMNParamList.numelt > 6) + AssertFatal(0, "The number of PLMN IDs must be in [1,6], but is %d\n", + PLMNParamList.numelt); + RRC_CONFIGURATION_REQ(msg_p).num_plmn = PLMNParamList.numelt; + + for (int l = 0; l < PLMNParamList.numelt; ++l) { + RRC_CONFIGURATION_REQ(msg_p).mcc[l] = *PLMNParamList.paramarray[l][ENB_MOBILE_COUNTRY_CODE_IDX].uptr; + RRC_CONFIGURATION_REQ(msg_p).mnc[l] = *PLMNParamList.paramarray[l][ENB_MOBILE_NETWORK_CODE_IDX].uptr; + RRC_CONFIGURATION_REQ(msg_p).mnc_digit_length[l] = *PLMNParamList.paramarray[l][ENB_MNC_DIGIT_LENGTH].u8ptr; + AssertFatal(RRC_CONFIGURATION_REQ(msg_p).mnc_digit_length[l] == 3 + || RRC_CONFIGURATION_REQ(msg_p).mnc[l] < 100, + "MNC %d cannot be encoded in two digits as requested (change mnc_digit_length to 3)\n", + RRC_CONFIGURATION_REQ(msg_p).mnc[l]); + } // Parse optional physical parameters - sprintf(enbpath,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k), config_getlist( &CCsParamList,NULL,0,enbpath); LOG_I(RRC,"num component carriers %d \n",CCsParamList.numelt); @@ -2246,12 +2271,21 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i) { // search if in active list for (j=0; j < ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt; j++) { if (strcmp(ENBSParams[ENB_ACTIVE_ENBS_IDX].strlistptr[j], *(ENBParamList.paramarray[k][ENB_ENB_NAME_IDX].strptr)) == 0) { + paramdef_t PLMNParams[] = PLMNPARAMS_DESC; + paramlist_def_t PLMNParamList = {ENB_CONFIG_STRING_PLMN_LIST, NULL, 0}; + /* map parameter checking array instances to parameter definition array instances */ + checkedparam_t config_check_PLMNParams [] = PLMNPARAMS_CHECK; + for (int I = 0; I < sizeof(PLMNParams) / sizeof(paramdef_t); ++I) + PLMNParams[I].chkPptr = &(config_check_PLMNParams[I]); + paramdef_t S1Params[] = S1PARAMS_DESC; paramlist_def_t S1ParamList = {ENB_CONFIG_STRING_MME_IP_ADDRESS,NULL,0}; paramdef_t SCTPParams[] = SCTPPARAMS_DESC; paramdef_t NETParams[] = NETPARAMS_DESC; - char aprefix[MAX_OPTNAME_SIZE*2 + 8]; + + char aprefix[MAX_OPTNAME_SIZE*2 + 8]; + sprintf(aprefix,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k); S1AP_REGISTER_ENB_REQ (msg_p).eNB_id = enb_id; @@ -2266,17 +2300,35 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i) { } S1AP_REGISTER_ENB_REQ (msg_p).eNB_name = strdup(*(ENBParamList.paramarray[k][ENB_ENB_NAME_IDX].strptr)); - S1AP_REGISTER_ENB_REQ (msg_p).tac = (uint16_t)atoi(*(ENBParamList.paramarray[k][ENB_TRACKING_AREA_CODE_IDX].strptr)); - S1AP_REGISTER_ENB_REQ (msg_p).mcc = (uint16_t)atoi(*(ENBParamList.paramarray[k][ENB_MOBILE_COUNTRY_CODE_IDX].strptr)); - S1AP_REGISTER_ENB_REQ (msg_p).mnc = (uint16_t)atoi(*(ENBParamList.paramarray[k][ENB_MOBILE_NETWORK_CODE_IDX].strptr)); - S1AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length = strlen(*(ENBParamList.paramarray[k][ENB_MOBILE_NETWORK_CODE_IDX].strptr)); - S1AP_REGISTER_ENB_REQ (msg_p).default_drx = 0; - AssertFatal((S1AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length == 2) || - (S1AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length == 3), - "BAD MNC DIGIT LENGTH %d", - S1AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length); + S1AP_REGISTER_ENB_REQ(msg_p).tac = *ENBParamList.paramarray[k][ENB_TRACKING_AREA_CODE_IDX].uptr; + + AssertFatal(!ENBParamList.paramarray[k][ENB_MOBILE_COUNTRY_CODE_IDX_OLD].strptr + && !ENBParamList.paramarray[k][ENB_MOBILE_NETWORK_CODE_IDX_OLD].strptr, + "It seems that you use an old configuration file. Please change the existing\n" + " tracking_area_code = \"1\";\n" + " mobile_country_code = \"208\";\n" + " mobile_network_code = \"93\";\n" + "to\n" + " tracking_area_code = 1; // no string!!\n" + " plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } )\n"); + + config_getlist(&PLMNParamList, PLMNParams, sizeof(PLMNParams)/sizeof(paramdef_t), aprefix); + if (PLMNParamList.numelt < 1 || PLMNParamList.numelt > 6) + AssertFatal(0, "The number of PLMN IDs must be in [1,6], but is %d\n", + PLMNParamList.numelt); + + S1AP_REGISTER_ENB_REQ(msg_p).num_plmn = PLMNParamList.numelt; + for (int l = 0; l < PLMNParamList.numelt; ++l) { + S1AP_REGISTER_ENB_REQ(msg_p).mcc[l] = *PLMNParamList.paramarray[l][ENB_MOBILE_COUNTRY_CODE_IDX].uptr; + S1AP_REGISTER_ENB_REQ(msg_p).mnc[l] = *PLMNParamList.paramarray[l][ENB_MOBILE_NETWORK_CODE_IDX].uptr; + S1AP_REGISTER_ENB_REQ(msg_p).mnc_digit_length[l] = *PLMNParamList.paramarray[l][ENB_MNC_DIGIT_LENGTH].u8ptr; + AssertFatal(S1AP_REGISTER_ENB_REQ(msg_p).mnc_digit_length[l] == 3 + || S1AP_REGISTER_ENB_REQ(msg_p).mnc[l] < 100, + "MNC %d cannot be encoded in two digits as requested (change mnc_digit_length to 3)\n", + S1AP_REGISTER_ENB_REQ(msg_p).mnc[l]); + } + S1AP_REGISTER_ENB_REQ(msg_p).default_drx = 0; - sprintf(aprefix,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k); config_getlist( &S1ParamList,S1Params,sizeof(S1Params)/sizeof(paramdef_t),aprefix); S1AP_REGISTER_ENB_REQ (msg_p).nb_mme = 0; diff --git a/openair2/ENB_APP/enb_paramdef.h b/openair2/ENB_APP/enb_paramdef.h index 04edea1493..fc02acf9e5 100755 --- a/openair2/ENB_APP/enb_paramdef.h +++ b/openair2/ENB_APP/enb_paramdef.h @@ -185,8 +185,8 @@ typedef enum { #define ENB_CONFIG_STRING_CELL_TYPE "cell_type" #define ENB_CONFIG_STRING_ENB_NAME "eNB_name" #define ENB_CONFIG_STRING_TRACKING_AREA_CODE "tracking_area_code" -#define ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE "mobile_country_code" -#define ENB_CONFIG_STRING_MOBILE_NETWORK_CODE "mobile_network_code" +#define ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE_OLD "mobile_country_code" +#define ENB_CONFIG_STRING_MOBILE_NETWORK_CODE_OLD "mobile_network_code" #define ENB_CONFIG_STRING_TRANSPORT_S_PREFERENCE "tr_s_preference" #define ENB_CONFIG_STRING_LOCAL_S_IF_NAME "local_s_if_name" #define ENB_CONFIG_STRING_LOCAL_S_ADDRESS "local_s_address" @@ -204,9 +204,9 @@ typedef enum { {ENB_CONFIG_STRING_ENB_ID, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ {ENB_CONFIG_STRING_CELL_TYPE, NULL, 0, strptr:NULL, defstrval:"CELL_MACRO_ENB", TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_ENB_NAME, NULL, 0, strptr:NULL, defstrval:"OAIeNodeB", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_TRACKING_AREA_CODE, NULL, 0, strptr:NULL, defstrval:"0", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, NULL, 0, strptr:NULL, defstrval:"0", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_MOBILE_NETWORK_CODE, NULL, 0, strptr:NULL, defstrval:"0", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_TRACKING_AREA_CODE, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE_OLD, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_MOBILE_NETWORK_CODE_OLD, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_TRANSPORT_S_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_mac", TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_LOCAL_S_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_LOCAL_S_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ @@ -220,8 +220,8 @@ typedef enum { #define ENB_CELL_TYPE_IDX 1 #define ENB_ENB_NAME_IDX 2 #define ENB_TRACKING_AREA_CODE_IDX 3 -#define ENB_MOBILE_COUNTRY_CODE_IDX 4 -#define ENB_MOBILE_NETWORK_CODE_IDX 5 +#define ENB_MOBILE_COUNTRY_CODE_IDX_OLD 4 +#define ENB_MOBILE_NETWORK_CODE_IDX_OLD 5 #define ENB_TRANSPORT_S_PREFERENCE_IDX 6 #define ENB_LOCAL_S_IF_NAME_IDX 7 #define ENB_LOCAL_S_ADDRESS_IDX 8 @@ -230,9 +230,56 @@ typedef enum { #define ENB_REMOTE_S_PORTC_IDX 11 #define ENB_LOCAL_S_PORTD_IDX 12 #define ENB_REMOTE_S_PORTD_IDX 13 + +#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD} +#define ENBPARAMS_CHECK { \ + { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ + { .s2 = { config_check_intrange, TRACKING_AREA_CODE_OKRANGE } },\ + { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ +} + /*-------------------------------------------------------------------------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------------------------------------------------------------------------*/ +/* PLMN ID configuration */ + +#define ENB_CONFIG_STRING_PLMN_LIST "plmn_list" + +#define ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE "mcc" +#define ENB_CONFIG_STRING_MOBILE_NETWORK_CODE "mnc" +#define ENB_CONFIG_STRING_MNC_DIGIT_LENGTH "mnc_length" + +#define ENB_MOBILE_COUNTRY_CODE_IDX 0 +#define ENB_MOBILE_NETWORK_CODE_IDX 1 +#define ENB_MNC_DIGIT_LENGTH 2 + +#define PLMNPARAMS_DESC { \ +/* optname helpstr paramflags XXXptr def val type numelt */ \ + {ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, "mobile country code", 0, uptr:NULL, defuintval:1000, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_MOBILE_NETWORK_CODE, "mobile network code", 0, uptr:NULL, defuintval:1000, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_MNC_DIGIT_LENGTH, "length of the MNC (2 or 3)", 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ +} + +#define MCC_MNC_OKRANGES {0,999} +#define MNC_DIGIT_LENGTH_OKVALUES {2,3} + +#define PLMNPARAMS_CHECK { \ + { .s2 = { config_check_intrange, MCC_MNC_OKRANGES } }, \ + { .s2 = { config_check_intrange, MCC_MNC_OKRANGES } }, \ + { .s1 = { config_check_intval, MNC_DIGIT_LENGTH_OKVALUES, 2 } }, \ +} + /* component carries configuration parameters name */ From e175363dd8c4ed04bbf40114207312acb0f2fcd7 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sat, 23 Jun 2018 14:24:15 +0200 Subject: [PATCH 236/379] S1AP eNB instance: make array of MCC/MNC, pass data --- openair3/S1AP/s1ap_eNB.c | 20 ++++++++++++++------ openair3/S1AP/s1ap_eNB_defs.h | 7 ++++--- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/openair3/S1AP/s1ap_eNB.c b/openair3/S1AP/s1ap_eNB.c index 2a6db4a5ce..6e9e6522d1 100644 --- a/openair3/S1AP/s1ap_eNB.c +++ b/openair3/S1AP/s1ap_eNB.c @@ -190,10 +190,14 @@ void s1ap_eNB_handle_register_eNB(instance_t instance, s1ap_register_enb_req_t * /* Checks if it is a retry on the same eNB */ DevCheck(new_instance->eNB_id == s1ap_register_eNB->eNB_id, new_instance->eNB_id, s1ap_register_eNB->eNB_id, 0); DevCheck(new_instance->cell_type == s1ap_register_eNB->cell_type, new_instance->cell_type, s1ap_register_eNB->cell_type, 0); + DevCheck(new_instance->num_plmn == s1ap_register_eNB->num_plmn, new_instance->num_plmn, s1ap_register_eNB->num_plmn, 0); DevCheck(new_instance->tac == s1ap_register_eNB->tac, new_instance->tac, s1ap_register_eNB->tac, 0); - DevCheck(new_instance->mcc == s1ap_register_eNB->mcc, new_instance->mcc, s1ap_register_eNB->mcc, 0); - DevCheck(new_instance->mnc == s1ap_register_eNB->mnc, new_instance->mnc, s1ap_register_eNB->mnc, 0); - DevCheck(new_instance->mnc_digit_length == s1ap_register_eNB->mnc_digit_length, new_instance->mnc_digit_length, s1ap_register_eNB->mnc_digit_length, 0); + for (int i = 0; i < new_instance->num_plmn; i++) + { + DevCheck(new_instance->mcc[i] == s1ap_register_eNB->mcc[i], new_instance->mcc[i], s1ap_register_eNB->mcc[i], 0); + DevCheck(new_instance->mnc[i] == s1ap_register_eNB->mnc[i], new_instance->mnc[i], s1ap_register_eNB->mnc[i], 0); + DevCheck(new_instance->mnc_digit_length[i] == s1ap_register_eNB->mnc_digit_length[i], new_instance->mnc_digit_length[i], s1ap_register_eNB->mnc_digit_length[i], 0); + } DevCheck(new_instance->default_drx == s1ap_register_eNB->default_drx, new_instance->default_drx, s1ap_register_eNB->default_drx, 0); } else { new_instance = calloc(1, sizeof(s1ap_eNB_instance_t)); @@ -208,9 +212,13 @@ void s1ap_eNB_handle_register_eNB(instance_t instance, s1ap_register_enb_req_t * new_instance->eNB_id = s1ap_register_eNB->eNB_id; new_instance->cell_type = s1ap_register_eNB->cell_type; new_instance->tac = s1ap_register_eNB->tac; - new_instance->mcc = s1ap_register_eNB->mcc; - new_instance->mnc = s1ap_register_eNB->mnc; - new_instance->mnc_digit_length = s1ap_register_eNB->mnc_digit_length; + for (int i = 0; i < s1ap_register_eNB->num_plmn; i++) + { + new_instance->mcc[i] = s1ap_register_eNB->mcc[i]; + new_instance->mnc[i] = s1ap_register_eNB->mnc[i]; + new_instance->mnc_digit_length[i] = s1ap_register_eNB->mnc_digit_length[i]; + } + new_instance->num_plmn = s1ap_register_eNB->num_plmn; new_instance->default_drx = s1ap_register_eNB->default_drx; /* Add the new instance to the list of eNB (meaningfull in virtual mode) */ diff --git a/openair3/S1AP/s1ap_eNB_defs.h b/openair3/S1AP/s1ap_eNB_defs.h index 11e64703ec..75ea27f635 100644 --- a/openair3/S1AP/s1ap_eNB_defs.h +++ b/openair3/S1AP/s1ap_eNB_defs.h @@ -198,9 +198,10 @@ typedef struct s1ap_eNB_instance_s { /* Mobile Country Code * Mobile Network Code */ - uint16_t mcc; - uint16_t mnc; - uint8_t mnc_digit_length; + uint16_t mcc[PLMN_LIST_MAX_SIZE]; + uint16_t mnc[PLMN_LIST_MAX_SIZE]; + uint8_t mnc_digit_length[PLMN_LIST_MAX_SIZE]; + uint8_t num_plmn; /* Default Paging DRX of the eNB as defined in TS 36.304 */ paging_drx_t default_drx; From 2f66c11db3f360fb3a13f3f5d6f27f3109c67d66 Mon Sep 17 00:00:00 2001 From: Wang Tsu-Han Date: Mon, 24 Sep 2018 15:56:24 +0200 Subject: [PATCH 237/379] adding emulate-rf feature in nr --- targets/RT/USER/nr-ru.c | 138 +++++++++++++++++++++++---------- targets/RT/USER/nr-softmodem.c | 2 +- targets/RT/USER/nr-softmodem.h | 3 + 3 files changed, 103 insertions(+), 40 deletions(-) diff --git a/targets/RT/USER/nr-ru.c b/targets/RT/USER/nr-ru.c index a9622df32d..46896f73ac 100644 --- a/targets/RT/USER/nr-ru.c +++ b/targets/RT/USER/nr-ru.c @@ -151,6 +151,9 @@ int connect_rau(RU_t *ru); extern uint16_t sf_ahead; +extern int emulate_rf; +extern int numerology; + /*************************************************************/ /* Functions to attach and configure RRU */ @@ -686,6 +689,34 @@ void fh_if4p5_north_out(RU_t *ru) { } +static void* emulatedRF_thread(void* param) { + RU_proc_t *proc = (RU_proc_t *) param; + int microsec = 500; // length of time to sleep, in miliseconds + struct timespec req = {0}; + req.tv_sec = 0; + req.tv_nsec = (numerology>0)? ((microsec * 1000L)/numerology):(microsec * 1000L)*2; + cpu_set_t cpuset; + CPU_SET(1,&cpuset); + pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset); + + int policy; + struct sched_param sparam; + memset(&sparam, 0, sizeof(sparam)); + sparam.sched_priority = sched_get_priority_max(SCHED_FIFO); + policy = SCHED_FIFO ; + pthread_setschedparam(pthread_self(), policy, &sparam); + + wait_sync("emulatedRF_thread"); + while(!oai_exit){ + nanosleep(&req, (struct timespec *)NULL); + pthread_mutex_lock(&proc->mutex_emulateRF); + ++proc->instance_cnt_emulateRF; + pthread_mutex_unlock(&proc->mutex_emulateRF); + pthread_cond_signal(&proc->cond_emulateRF); + } + return 0; +} + void rx_rf(RU_t *ru,int *frame,int *subframe) { RU_proc_t *proc = &ru->proc; @@ -702,11 +733,18 @@ void rx_rf(RU_t *ru,int *frame,int *subframe) { old_ts = proc->timestamp_rx; - rxs = ru->rfdevice.trx_read_func(&ru->rfdevice, + if(emulate_rf){ + wait_on_condition(&proc->mutex_emulateRF,&proc->cond_emulateRF,&proc->instance_cnt_emulateRF,"emulatedRF_thread"); + release_thread(&proc->mutex_emulateRF,&proc->instance_cnt_emulateRF,"emulatedRF_thread"); + rxs = fp->samples_per_tti; + } + else{ + rxs = ru->rfdevice.trx_read_func(&ru->rfdevice, &ts, rxp, fp->samples_per_subframe, ru->nb_rx); + } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 0 ); @@ -1377,26 +1415,37 @@ static void* ru_thread( void* param ) { LOG_I(PHY,"Starting RU %d (%s,%s),\n",ru->idx,NB_functions[ru->function],NB_timing[ru->if_timing]); - - // Start IF device if any - if (ru->start_if) { - LOG_I(PHY,"Starting IF interface for RU %d\n",ru->idx); - AssertFatal(ru->start_if(ru,NULL) == 0, "Could not start the IF device\n"); - if (ru->if_south == LOCAL_RF) ret = connect_rau(ru); - else ret = attach_rru(ru); - AssertFatal(ret==0,"Cannot connect to radio\n"); - } - if (ru->if_south == LOCAL_RF) { // configure RF parameters only + if(emulate_rf){ fill_rf_config(ru,ru->rf_config_file); nr_init_frame_parms(&ru->gNB_list[0]->gNB_config, fp); nr_dump_frame_parms(fp); nr_phy_init_RU(ru); - - ret = openair0_device_load(&ru->rfdevice,&ru->openair0_cfg); + if (setup_RU_buffers(ru)!=0) { + printf("Exiting, cannot initialize RU Buffers\n"); + exit(-1); + } } - if (setup_RU_buffers(ru)!=0) { - printf("Exiting, cannot initialize RU Buffers\n"); - exit(-1); + else{ + // Start IF device if any + if (ru->start_if) { + LOG_I(PHY,"Starting IF interface for RU %d\n",ru->idx); + AssertFatal(ru->start_if(ru,NULL) == 0, "Could not start the IF device\n"); + if (ru->if_south == LOCAL_RF) ret = connect_rau(ru); + else ret = attach_rru(ru); + AssertFatal(ret==0,"Cannot connect to radio\n"); + } + if (ru->if_south == LOCAL_RF) { // configure RF parameters only + fill_rf_config(ru,ru->rf_config_file); + nr_init_frame_parms(&ru->gNB_list[0]->gNB_config, fp); + nr_dump_frame_parms(fp); + nr_phy_init_RU(ru); + + ret = openair0_device_load(&ru->rfdevice,&ru->openair0_cfg); + } + if (setup_RU_buffers(ru)!=0) { + printf("Exiting, cannot initialize RU Buffers\n"); + exit(-1); + } } LOG_I(PHY, "Signaling main thread that RU %d is ready\n",ru->idx); @@ -1407,28 +1456,30 @@ static void* ru_thread( void* param ) { wait_sync("ru_thread"); - // Start RF device if any - if (ru->start_rf) { - if (ru->start_rf(ru) != 0) - LOG_E(HW,"Could not start the RF device\n"); - else LOG_I(PHY,"RU %d rf device ready\n",ru->idx); - } - else LOG_I(PHY,"RU %d no rf device\n",ru->idx); + if(!emulate_rf){ + // Start RF device if any + if (ru->start_rf) { + if (ru->start_rf(ru) != 0) + LOG_E(HW,"Could not start the RF device\n"); + else LOG_I(PHY,"RU %d rf device ready\n",ru->idx); + } + else LOG_I(PHY,"RU %d no rf device\n",ru->idx); - // if an asnych_rxtx thread exists - // wakeup the thread because the devices are ready at this point + // if an asnych_rxtx thread exists + // wakeup the thread because the devices are ready at this point - if ((ru->fh_south_asynch_in)||(ru->fh_north_asynch_in)) { - pthread_mutex_lock(&proc->mutex_asynch_rxtx); - proc->instance_cnt_asynch_rxtx=0; - pthread_mutex_unlock(&proc->mutex_asynch_rxtx); - pthread_cond_signal(&proc->cond_asynch_rxtx); - } - else LOG_I(PHY,"RU %d no asynch_south interface\n",ru->idx); + if ((ru->fh_south_asynch_in)||(ru->fh_north_asynch_in)) { + pthread_mutex_lock(&proc->mutex_asynch_rxtx); + proc->instance_cnt_asynch_rxtx=0; + pthread_mutex_unlock(&proc->mutex_asynch_rxtx); + pthread_cond_signal(&proc->cond_asynch_rxtx); + } + else LOG_I(PHY,"RU %d no asynch_south interface\n",ru->idx); - // if this is a slave RRU, try to synchronize on the DL frequency - if ((ru->is_slave) && (ru->if_south == LOCAL_RF)) do_ru_synch(ru); + // if this is a slave RRU, try to synchronize on the DL frequency + if ((ru->is_slave) && (ru->if_south == LOCAL_RF)) do_ru_synch(ru); + } // This is a forever while loop, it loops over subframes which are scheduled by incoming samples from HW devices @@ -1487,9 +1538,12 @@ static void* ru_thread( void* param ) { // do OFDM if needed if ((ru->fh_north_asynch_in == NULL) && (ru->feptx_ofdm)) ru->feptx_ofdm(ru); - // do outgoing fronthaul (south) if needed - if ((ru->fh_north_asynch_in == NULL) && (ru->fh_south_out)) ru->fh_south_out(ru); - + if (!emulate_rf) + { + // do outgoing fronthaul (south) if needed + if ((ru->fh_north_asynch_in == NULL) && (ru->fh_south_out)) ru->fh_south_out(ru); + } + if (ru->fh_north_out) ru->fh_north_out(ru); } @@ -1610,7 +1664,7 @@ void init_RU_proc(RU_t *ru) { int i=0; RU_proc_t *proc; - pthread_attr_t *attr_FH=NULL,*attr_prach=NULL,*attr_asynch=NULL;// *attr_synch=NULL; + pthread_attr_t *attr_FH=NULL,*attr_prach=NULL,*attr_asynch=NULL, *attr_emulateRF=NULL;// *attr_synch=NULL; //pthread_attr_t *attr_fep=NULL; #ifdef Rel14 //pthread_attr_t *attr_prach_br=NULL; @@ -1628,6 +1682,7 @@ void init_RU_proc(RU_t *ru) { proc->instance_cnt_synch = -1; ; proc->instance_cnt_FH = -1; proc->instance_cnt_asynch_rxtx = -1; + proc->instance_cnt_emulateRF = -1; proc->first_rx = 1; proc->first_tx = 1; proc->frame_offset = 0; @@ -1640,15 +1695,18 @@ void init_RU_proc(RU_t *ru) { pthread_mutex_init( &proc->mutex_asynch_rxtx, NULL); pthread_mutex_init( &proc->mutex_synch,NULL); pthread_mutex_init( &proc->mutex_FH,NULL); + pthread_mutex_init( &proc->mutex_emulateRF,NULL); pthread_mutex_init( &proc->mutex_gNBs, NULL); pthread_cond_init( &proc->cond_prach, NULL); pthread_cond_init( &proc->cond_FH, NULL); + pthread_cond_init( &proc->cond_emulateRF, NULL); pthread_cond_init( &proc->cond_asynch_rxtx, NULL); pthread_cond_init( &proc->cond_synch,NULL); pthread_cond_init( &proc->cond_gNBs, NULL); pthread_attr_init( &proc->attr_FH); + pthread_attr_init( &proc->attr_emulateRF); pthread_attr_init( &proc->attr_prach); pthread_attr_init( &proc->attr_synch); pthread_attr_init( &proc->attr_asynch_rxtx); @@ -1657,13 +1715,15 @@ void init_RU_proc(RU_t *ru) { #ifndef DEADLINE_SCHEDULER attr_FH = &proc->attr_FH; + attr_emulateRF = &proc->attr_emulateRF; attr_prach = &proc->attr_prach; //attr_synch = &proc->attr_synch; attr_asynch = &proc->attr_asynch_rxtx; #endif pthread_create( &proc->pthread_FH, attr_FH, ru_thread, (void*)ru ); - + if(emulate_rf) + pthread_create( &proc->pthread_emulateRF, attr_emulateRF, emulatedRF_thread, (void*)proc ); if (ru->function == NGFI_RRU_IF4p5) { pthread_create( &proc->pthread_prach, attr_prach, ru_thread_prach, (void*)ru ); ///tmp deactivation of synch thread diff --git a/targets/RT/USER/nr-softmodem.c b/targets/RT/USER/nr-softmodem.c index 992ca65981..cddefdf585 100644 --- a/targets/RT/USER/nr-softmodem.c +++ b/targets/RT/USER/nr-softmodem.c @@ -208,7 +208,7 @@ extern void init_eNB_afterRU(void); int transmission_mode=1; int emulate_rf = 0; -//int numerology = 0; +int numerology = 0; int codingw = 0; //int fepw = 0; diff --git a/targets/RT/USER/nr-softmodem.h b/targets/RT/USER/nr-softmodem.h index 13ac6dc329..ac79557f70 100644 --- a/targets/RT/USER/nr-softmodem.h +++ b/targets/RT/USER/nr-softmodem.h @@ -86,6 +86,8 @@ #define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n" #define CONFIG_HLP_DISABLNBIOT "disable nb-iot, even if defined in config\n" +#define CONFIG_HLP_EMULATE_RF "Emulated RF enabled(disable by defult)\n" + /***************************************************************************************************************************************/ /* command line options definitions, CMDLINE_XXXX_DESC macros are used to initialize paramdef_t arrays which are then used as argument when calling config_get or config_getlist functions */ @@ -167,6 +169,7 @@ {"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \ {"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \ {"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \ +{"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&emulate_rf, defintval:0, TYPE_INT, 0}, \ {"nbiot-disable", CONFIG_HLP_DISABLNBIOT,PARAMFLAG_BOOL, iptr:&nonbiotflag, defintval:0, TYPE_INT, 0} \ } From 8b8e6e1209ad7d5bb93f156aabf3cff181ed947b Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 26 Sep 2018 15:04:58 +0200 Subject: [PATCH 238/379] new data strucure for list management (decoding ok) --- .../CODING/nrPolar_tools/nr_polar_decoder.c | 167 +++--------------- .../nrPolar_tools/nr_polar_decoding_tools.c | 4 +- .../PHY/CODING/nrPolar_tools/nr_polar_defs.h | 8 +- 3 files changed, 35 insertions(+), 144 deletions(-) diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c index 475fc73a77..9e9029800e 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: + * For more information about the OpenAirInterface (OAI) Software Alliance * contact@openairinterface.org */ @@ -56,9 +56,9 @@ int8_t polar_decoder( decoder_list_t dlist[2*listSize]; for ( int i=0;i<2*listSize;i++) { - dlist[i].bit = nr_alloc_uint8_t_2D_array((polarParams->n+1), polarParams->N); - dlist[i].llr = nr_alloc_double_2D_array((polarParams->n+1), polarParams->N); - dlist[i].crcChecksum = malloc(sizeof(uint8_t)*polarParams->crcParityBits); + // dlist[i].bit = nr_alloc_uint8_t_2D_array((polarParams->n+1), polarParams->N); + // dlist[i].llr = nr_alloc_double_2D_array((polarParams->n+1), polarParams->N); + //dlist[i].crcChecksum = malloc(sizeof(uint8_t)*polarParams->crcParityBits); for (int j=0; j< polarParams->n+1; j++) { memset((void*)&dlist[i].bit[j][0],0,sizeof(uint8_t)*polarParams->N); memset((void*)&dlist[i].llr[j][0],0,sizeof(double)*polarParams->N); @@ -115,7 +115,7 @@ int8_t polar_decoder( stop_meas(init); start_meas(polar_rate_matching); - double *d_tilde = malloc(sizeof(double) * polarParams->N); + double d_tilde[polarParams->N];// = malloc(sizeof(double) * polarParams->N); nr_polar_rate_matching(input, d_tilde, polarParams->rate_matching_pattern, polarParams->K, polarParams->N, polarParams->encoderLength); memcpy((void*)&dlist[0].llr[polarParams->n][0],(void*)&d_tilde[0],sizeof(double)*polarParams->N); stop_meas(polar_rate_matching); @@ -126,8 +126,6 @@ int8_t polar_decoder( start_meas(decoding); uint32_t nonFrozenBit=0; uint8_t currentListSize=1; - uint8_t decoderIterationCheck=0; - int16_t checkCrcBits=-1; uint8_t copyIndex=0; decoder_list_t *sorted_dlist[2*listSize]; @@ -137,7 +135,7 @@ int8_t polar_decoder( for (uint8_t i = 0; i < 2*listSize; i++) sorted_dlist[i] = &dlist[i]; for (uint16_t currentBit=0; currentBitN; currentBit++){ - // printf("***************** BIT %d\n",currentBit); + // printf("***************** BIT %d\n",currentBit); start_meas(update_LLR); updateLLR(sorted_dlist, llrUpdated, bitUpdated, currentListSize, currentBit, 0, polarParams->N, (polarParams->n+1), pathMetricAppr); @@ -161,17 +159,14 @@ int8_t polar_decoder( bitUpdated[currentBit][0]=1; updateCrcChecksum(sorted_dlist, extended_crc_generator_matrix, currentListSize, nonFrozenBit, polarParams->crcParityBits); } else { + start_meas(path_metric); updatePathMetric2(sorted_dlist, currentListSize, currentBit, pathMetricAppr); stop_meas(path_metric); + start_meas(sorting); for (int i = 0; i < currentListSize; i++) { for (int k = 0; k < (polarParams->n+1); k++) { - /* - for (int j = 0; j < polarParams->N; j++) { - bit[i+currentListSize][k][j]=bit[i][k][j]; - llr[i+currentListSize][k][j]=llr[i][k][j]; - }*/ memcpy((void*)&sorted_dlist[i+currentListSize]->bit[k][0],(void*)&sorted_dlist[i]->bit[k][0],sizeof(uint8_t)*polarParams->N); memcpy((void*)&sorted_dlist[i+currentListSize]->llr[k][0],(void*)&sorted_dlist[i]->llr[k][0],sizeof(double)*polarParams->N); } @@ -181,7 +176,7 @@ int8_t polar_decoder( sorted_dlist[i]->bit[0][currentBit]=0; sorted_dlist[i+currentListSize]->crcState=sorted_dlist[i]->crcState; } - for (int i = currentListSize; i < 2*currentListSize; i++) sorted_dlist[i]->bit[currentBit]=1; + for (int i = currentListSize; i < 2*currentListSize; i++) sorted_dlist[i]->bit[0][currentBit]=1; bitUpdated[currentBit][0]=1; updateCrcChecksum2(sorted_dlist,extended_crc_generator_matrix, currentListSize, nonFrozenBit, polarParams->crcParityBits); currentListSize*=2; @@ -194,133 +189,26 @@ int8_t polar_decoder( } nr_sort_asc_double_1D_array_ind(pathMetric, listIndex, currentListSize); currentListSize = listSize; + for (uint8_t i = 0; i < 2*listSize; i++) { + sorted_dlist[i] = &dlist[listIndex[i]]; + } } stop_meas(sorting); - - /* - //sort listIndex[listSize, ..., 2*listSize-1] in descending order. - uint8_t swaps, tempInd; - for (uint8_t i = 0; i < listSize; i++) { - swaps = 0; - for (uint8_t j = listSize; j < (2*listSize - i) - 1; j++) { - if (listIndex[j+1] > listIndex[j]) { - tempInd = listIndex[j]; - listIndex[j] = listIndex[j + 1]; - listIndex[j + 1] = tempInd; - swaps++; - } - } - if (swaps == 0) - break; - } - - //First, backup the best "listSize" number of entries. - for (int k=(listSize-1); k>0; k--) { - for (int j=0; j<(polarParams->n+1); j++) { - - //for (int i=0; iN; i++) { - // bit[listIndex[(2*listSize-1)-k]][j][i]=bit[listIndex[k]][j][i]; - // llr[listIndex[(2*listSize-1)-k]][j][i]=llr[listIndex[k]][j][i]; - // } - memcpy((void*)&bit[listIndex[(2*listSize-1)-k]][j][0], - (void*)&bit[listIndex[k]][j][0], - sizeof(uint8_t)*polarParams->N); - memcpy((void*)&llr[listIndex[(2*listSize-1)-k]][j][0], - (void*)&llr[listIndex[k]][j][0], - sizeof(double)*polarParams->N); - } - } - for (int k=(listSize-1); k>0; k--) { - for (int i = 0; i < polarParams->crcParityBits; i++) { - crcChecksum[i][listIndex[(2*listSize-1)-k]] = crcChecksum[i][listIndex[k]]; - } - } - for (int k=(listSize-1); k>0; k--) crcState[listIndex[(2*listSize-1)-k]]=crcState[listIndex[k]]; - - //Copy the best "listSize" number of entries to the first indices. - for (int k = 0; k < listSize; k++) { - if (k > listIndex[k]) { - copyIndex = listIndex[(2*listSize-1)-k]; - } else { //Use the backup. - copyIndex = listIndex[k]; - } - - if (copyIndex!=k) { - for (int j = 0; j < (polarParams->n + 1); j++) { - //for (int i = 0; i < polarParams->N; i++) { - // bit[k][j][i] = bit[copyIndex][j][i]; - // llr[k][j][i] = llr[copyIndex][j][i]; - // } - memcpy((void*)&bit[k][j][0],(void*)&bit[copyIndex][j][0],sizeof(uint8_t)*polarParams->N); - memcpy((void*)&llr[k][j][0],(void*)&llr[copyIndex][j][0],sizeof(double)*polarParams->N); - } - } - } - for (int k = 0; k < listSize; k++) { - if (k > listIndex[k]) { - copyIndex = listIndex[(2*listSize-1)-k]; - } else { //Use the backup. - copyIndex = listIndex[k]; - } - for (int i = 0; i < polarParams->crcParityBits; i++) { - crcChecksum[i][k]=crcChecksum[i][copyIndex]; - } - } - for (int k = 0; k < listSize; k++) { - if (k > listIndex[k]) { - copyIndex = listIndex[(2*listSize-1)-k]; - } else { //Use the backup. - copyIndex = listIndex[k]; - } - crcState[k]=crcState[copyIndex]; - } - currentListSize = listSize; - }*/ - - } - - for (int i=0; icrcParityBits; i++) { - if (last1ind[i]==nonFrozenBit) { - checkCrcBits=i; - break; - } - } - - if ( checkCrcBits > (-1) ) { - for (uint8_t i = 0; i < currentListSize; i++) { - if (dlist[i].crcChecksum[checkCrcBits]==1) { - dlist[i].crcState=0; //0=False, 1=True - } - } - } - - for (uint8_t i = 0; i < currentListSize; i++) decoderIterationCheck+=sorted_dlist[i]->crcState; - if (decoderIterationCheck==0) { - //perror("[SCL polar decoder] All list entries have failed the CRC checks."); - free(d_tilde); - for (int i=0;i<2*listSize;i++) { - // printf("error: Freeing dlist[%d].bit %p\n",i,dlist[i].bit); - nr_free_uint8_t_2D_array(dlist[i].bit, (polarParams->n+1)); - // printf("error: Freeing dlist[%d].llr %p\n",i,dlist[i].bit); - nr_free_double_2D_array(dlist[i].llr, (polarParams->n+1)); - free(dlist[i].crcChecksum); - } - stop_meas(decoding); - return(-1); - } - - nonFrozenBit++; - decoderIterationCheck=0; - checkCrcBits=-1; - } + + } + nonFrozenBit++; + } + } - - for (uint8_t i = 0; i < 2*listSize; i++) listIndex[i]=i; - nr_sort_asc_double_1D_array_ind(pathMetric, listIndex, currentListSize); - + for (uint8_t i = 0; i < fmin(listSize, (pow(2,polarParams->crcCorrectionBits)) ); i++) { - if ( dlist[i].crcState == 1 ) { - for (int j = 0; j < polarParams->N; j++) polarParams->nr_polar_u[j]=dlist[listIndex[i]].bit[0][j]; + // printf("list index %d :",i); + // for (int j=0;jcrcParityBits;j++) printf("%d",sorted_dlist[i]->crcChecksum[j]); + // printf(" => %d (%f)\n",sorted_dlist[i]->crcState,sorted_dlist[i]->pathMetric); + int crcState = 1; + for (int j=0;jcrcParityBits;j++) if (sorted_dlist[i]->crcChecksum[j]!=0) crcState=0; + if (crcState == 1) { + for (int j = 0; j < polarParams->N; j++) polarParams->nr_polar_u[j]=sorted_dlist[i]->bit[0][j]; start_meas(bit_extraction); //Extract the information bits (û to ĉ) @@ -337,13 +225,14 @@ int8_t polar_decoder( } } - free(d_tilde); + // free(d_tilde); + /* for (int i=0;i<2*listSize;i++) { // printf("correct: Freeing dlist[%d].bit %p\n",i,dlist[i].bit); nr_free_uint8_t_2D_array(dlist[i].bit, (polarParams->n+1)); nr_free_double_2D_array(dlist[i].llr, (polarParams->n+1)); free(dlist[i].crcChecksum); - } + }*/ nr_free_uint8_t_2D_array(extended_crc_generator_matrix, polarParams->K); nr_free_uint8_t_2D_array(tempECGM, polarParams->K); stop_meas(decoding); diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c index 83ebbdb6c3..2596962d97 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c @@ -22,9 +22,9 @@ #include "PHY/CODING/nrPolar_tools/nr_polar_defs.h" //#define SHOWCOMP 1 -inline void computeLLR(double **llr, uint16_t row, uint16_t col, +inline void computeLLR(double llr[1+nmax][Nmax], uint16_t row, uint16_t col, uint16_t offset, uint8_t approximation) __attribute__((always_inline)); -inline void computeLLR(double **llr, uint16_t row, uint16_t col, +inline void computeLLR(double llr[1+nmax][Nmax], uint16_t row, uint16_t col, uint16_t offset, uint8_t approximation) { double a; diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h index b5aa841468..c35856a0ce 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h @@ -130,12 +130,14 @@ void nr_free_uint8_t_3D_array(uint8_t ***input, uint16_t xlen, uint16_t ylen); void nr_free_uint8_t_2D_array(uint8_t **input, uint16_t xlen); void nr_free_double_2D_array(double **input, uint16_t xlen); +#define Nmax 1024 +#define nmax 10 typedef struct decoder_list_s { - uint8_t **bit; - double **llr; - uint8_t *crcChecksum; + uint8_t bit[1+nmax][Nmax]; + double llr[1+nmax][Nmax]; + uint8_t crcChecksum[24]; uint8_t crcState; double pathMetric; From b8f6d254f6993946931a751649874df74fbb4adc Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 26 Sep 2018 14:19:33 +0200 Subject: [PATCH 239/379] CI: proper notifications on the formatting rules Signed-off-by: Raphael Defosseux --- ci-scripts/checkCodingFormattingRules.sh | 15 ++++++++++++++- ci-scripts/reportBuildLocally.sh | 14 +++++++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/ci-scripts/checkCodingFormattingRules.sh b/ci-scripts/checkCodingFormattingRules.sh index a18fc67c75..61cbf12560 100755 --- a/ci-scripts/checkCodingFormattingRules.sh +++ b/ci-scripts/checkCodingFormattingRules.sh @@ -120,21 +120,34 @@ echo "Source Branch is : $SOURCE_BRANCH" echo "Target Branch is : $TARGET_BRANCH" echo "Merged Commit is : $MERGE_COMMMIT" echo "Target Init is : $TARGET_INIT_COMMIT" +echo "" +echo " ----------------------------------------------------------" +echo "" # Retrieve the list of modified files since the latest develop commit MODIFIED_FILES=`git log $TARGET_INIT_COMMIT..$MERGE_COMMMIT --oneline --name-status | egrep "^M|^A" | sed -e "s@^M\t*@@" -e "s@^A\t*@@" | sort | uniq` NB_TO_FORMAT=0 +if [ -f oai_rules_result_list.txt ] +then + rm -f oai_rules_result_list.txt +fi for FULLFILE in $MODIFIED_FILES do - echo $FULLFILE filename=$(basename -- "$FULLFILE") EXT="${filename##*.}" if [ $EXT = "c" ] || [ $EXT = "h" ] || [ $EXT = "cpp" ] || [ $EXT = "hpp" ] then TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt $FULLFILE | grep -c Formatted ` NB_TO_FORMAT=$((NB_TO_FORMAT + TO_FORMAT)) + if [ $TO_FORMAT -ne 0 ] + then + echo $FULLFILE + echo $FULLFILE >> ./oai_rules_result_list.txt + fi fi done +echo "" +echo " ----------------------------------------------------------" echo "Nb Files that do NOT follow OAI rules: $NB_TO_FORMAT" echo $NB_TO_FORMAT > ./oai_rules_result.txt diff --git a/ci-scripts/reportBuildLocally.sh b/ci-scripts/reportBuildLocally.sh index 609af5f166..ea2cc5e44f 100755 --- a/ci-scripts/reportBuildLocally.sh +++ b/ci-scripts/reportBuildLocally.sh @@ -260,7 +260,7 @@ function sca_summary_table_footer { echo " " >> ./build_results.html echo " " >> ./build_results.html echo "

Full details in zipped artifact (cppcheck/cppcheck.xml)

" >> ./build_results.html - echo "

Graphical Interface tool : cppcheck-gui -l cppcheck/cppcheck.xml

" >> ./build_results.html + echo "

Graphical Interface tool : cppcheck-gui -l cppcheck/cppcheck.xml

" >> ./build_results.html } jb_checker=0 @@ -490,12 +490,20 @@ then then if [ $PU_TRIG -eq 1 ]; then echo " All files in repository follow OAI rules. " >> ./build_results.html; fi if [ $MR_TRIG -eq 1 ]; then echo " All modified files in Merge-Request follow OAI rules." >> ./build_results.html; fi + echo " " >> ./build_results.html + echo " " >> ./build_results.html else if [ $PU_TRIG -eq 1 ]; then echo " $NB_FILES files in repository DO NOT follow OAI rules. " >> ./build_results.html; fi if [ $MR_TRIG -eq 1 ]; then echo " $NB_FILES modified files in Merge-Request DO NOT follow OAI rules." >> ./build_results.html; fi + echo " " >> ./build_results.html + if [ -f ./oai_rules_result_list.txt ] + then + awk '{print " "$1""}' ./oai_rules_result_list.txt >> ./build_results.html + fi + echo " " >> ./build_results.html + echo "

Please apply the following command to this(ese) file(s):

" >> ./build_results.html + echo "

astyle --options=ci-scripts/astyle-options.txt filename(s)

" >> ./build_results.html fi - echo " " >> ./build_results.html - echo " " >> ./build_results.html fi echo "

Ubuntu 16.04 LTS -- Summary

" >> ./build_results.html From 67c089cd563e497aaa663ad8cb734e23cdbaa3d5 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 26 Sep 2018 16:10:49 +0200 Subject: [PATCH 240/379] CI: adding support for lockeable resources Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-tmp-ran | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ci-scripts/Jenkinsfile-tmp-ran b/ci-scripts/Jenkinsfile-tmp-ran index 4db4ec0b2d..1277e0d483 100644 --- a/ci-scripts/Jenkinsfile-tmp-ran +++ b/ci-scripts/Jenkinsfile-tmp-ran @@ -31,6 +31,9 @@ def testXMLFile = params.pythonTestXmlFile // Name of the test stage def testStageName = params.pipelineTestStageName +// Name of the phone resource +def ciSmartPhoneResource = params.smartphonesResource + // Terminate Status def termUE = 0 def termENB = 1 @@ -70,6 +73,7 @@ pipeline { string(name: 'pythonTestXmlFile', defaultValue: 'enb_usrpB210_band7_50PRB.xml', description: 'Location of the Test XML to be run') string(name: 'pipelineTestStageName', defaultValue: 'Test COTS-UE - OAI eNB - LTEBOX EPC', description: 'Naming of the Test Stage') booleanParam(name: 'pipelineZipsConsoleLog', defaultValue: 'True', description: 'If true, the pipeline script retrieves the job console log, zips it and archives it as artifact') + string(name: 'smartphonesResource', defaultValue: 'CI-Bench-1-Phones', description: 'Lockeable Resource to prevent multiple jobs to run simultaneously with the same resource') //eNB parameters string(name: 'eNB_IPAddress', defaultValue: '192.168.XX.XX', description: 'IP Address of eNB') @@ -112,6 +116,9 @@ pipeline { testStageName = 'Template Test Stage' } + if (params.smartphonesResource == null) { + allParametersPresent = false + } if (params.eNB_IPAddress == null) { allParametersPresent = false } @@ -178,6 +185,7 @@ pipeline { steps { script { dir ('ci-scripts') { + lock (ciSmartPhoneResource) { try { echo "\u2705 \u001B[32m${testStageName}\u001B[0m" withCredentials([ @@ -190,6 +198,7 @@ pipeline { } catch (Exception e) { currentBuild.result = 'FAILURE' } + } } } } From 34deaae4b8e17b16a37b9178b86cfa4eb430506e Mon Sep 17 00:00:00 2001 From: yilmazt Date: Wed, 26 Sep 2018 16:14:49 +0200 Subject: [PATCH 241/379] Working but uncleaned polar_decoder_dci and related code --- openair1/PHY/CODING/TESTBENCH/polartest.c | 135 ++++++++-- .../nrPolar_tools/nr_bitwise_operations.c | 4 +- .../CODING/nrPolar_tools/nr_polar_decoder.c | 249 ++++++++++++++++++ .../PHY/CODING/nrPolar_tools/nr_polar_defs.h | 10 +- .../CODING/nrPolar_tools/nr_polar_encoder.c | 65 ++++- openair1/PHY/CODING/nr_polar_init.c | 5 +- 6 files changed, 433 insertions(+), 35 deletions(-) diff --git a/openair1/PHY/CODING/TESTBENCH/polartest.c b/openair1/PHY/CODING/TESTBENCH/polartest.c index 0aa0dd118f..12892b8039 100644 --- a/openair1/PHY/CODING/TESTBENCH/polartest.c +++ b/openair1/PHY/CODING/TESTBENCH/polartest.c @@ -10,8 +10,9 @@ #include "PHY/CODING/coding_defs.h" #include "SIMULATION/TOOLS/sim.h" -//#define DEBUG_DCI_POLAR_PARAMS +#define DEBUG_DCI_POLAR_PARAMS //#define DEBUG_POLAR_TIMING +//#define DEBUG_CRC int main(int argc, char *argv[]) { @@ -136,27 +137,119 @@ int main(int argc, char *argv[]) { currentPtr = nr_polar_params(nrPolar_params, polarMessageType, testLength, aggregation_level); #ifdef DEBUG_DCI_POLAR_PARAMS + uint32_t dci_pdu[4]; + memset(dci_pdu,0,sizeof(uint32_t)*4); + dci_pdu[0]=0x01189400; + printf("dci_pdu: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n", + dci_pdu[0], dci_pdu[1], dci_pdu[2], dci_pdu[3]); + uint32_t encoder_output[54]; + memset(encoder_output,0,sizeof(uint32_t)*54); + uint16_t size=41; + uint16_t rnti=3; + aggregation_level=8; + nr_polar_init(&nrPolar_params, 1, size, aggregation_level); + t_nrPolar_paramsPtr currentPtrDCI=nr_polar_params(nrPolar_params, 1, size, aggregation_level); + + polar_encoder_dci(dci_pdu, encoder_output, currentPtrDCI, rnti); + for (int i=0;i<54;i++) + printf("encoder_output: [%2d]->0x%08x \n",i, encoder_output[i]); + + uint8_t *encoder_outputByte = malloc(sizeof(uint8_t) * currentPtrDCI->encoderLength); + double *channel_output = malloc (sizeof(double) * currentPtrDCI->encoderLength); + uint32_t dci_estimation[4]; + memset(dci_estimation,0,sizeof(uint32_t)*4); + printf("dci_estimation: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n", + dci_estimation[0], dci_estimation[1], dci_estimation[2], dci_estimation[3]); + nr_bit2byte_uint32_8_t(encoder_output, currentPtrDCI->encoderLength, encoder_outputByte); + printf("[polartest] encoder_outputByte: "); + for (int i = 0; i < currentPtrDCI->encoderLength; i++) printf("%d-", encoder_outputByte[i]); + printf("\n"); + for(int i=0; iencoderLength; i++) { + if (encoder_outputByte[i] == 0) { + channel_output[i]=1/sqrt(2); + } + else { + channel_output[i]=(-1)/sqrt(2); + } + } + + decoderState = polar_decoder_dci(channel_output, + dci_estimation, + currentPtrDCI, + NR_POLAR_DECODER_LISTSIZE, + NR_POLAR_DECODER_PATH_METRIC_APPROXIMATION, + rnti); + printf("dci_estimation: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n", + dci_estimation[0], dci_estimation[1], dci_estimation[2], dci_estimation[3]); + return 0; +#endif + +#ifdef DEBUG_CRC uint32_t crc; unsigned int poly24c = 0xb2b11700; - testInput[0]=0x01189400; - printf("testInput: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n", - testInput[0], testInput[1], testInput[2], testInput[3]); - uint8_t testInput2[8]; - nr_crc_bit2bit_uint32_8_t(testInput, 32, testInput2); - printf("testInput2: [0]->%x \t [1]->%x \t [2]->%x \t [3]->%x\n" + uint32_t testInputCRC[4]; + testInputCRC[0]=0x00291880; + //testInputCRC[0]=0x01189400; + testInputCRC[1]=0x00000000; + testInputCRC[2]=0x00000000; + testInputCRC[3]=0x00000000; + + uint32_t testInputcrc=0x01189400; + uint32_t testInputcrc2=0x00291880; + + uint8_t testInputCRC2[8]; + nr_crc_bit2bit_uint32_8_t(testInputCRC, 32, testInputCRC2); + printf("testInputCRC2: [0]->%x \t [1]->%x \t [2]->%x \t [3]->%x\n" " [4]->%x \t [5]->%x \t [6]->%x \t [7]->%x\n", - testInput2[0], testInput2[1], testInput2[2], testInput2[3], - testInput2[4], testInput2[5], testInput2[6], testInput2[7]); - printf("crc32: [0]->0x%08x\n",crc24c(testInput2, 32)); - printf("crc56: [0]->0x%08x\n",crc24c(testInput2, 56)); - crc = crc24c(testInput, testLength)>>8; + testInputCRC2[0], testInputCRC2[1], testInputCRC2[2], testInputCRC2[3], + testInputCRC2[4], testInputCRC2[5], testInputCRC2[6], testInputCRC2[7]); + unsigned int crc41 = crc24c(testInputCRC, 32); + unsigned int crc65 = crc24c(testInputCRC, 56); + printf("crc41: [0]->0x%08x\tcrc65: [0]->0x%08x\n",crc41, crc65); + for (int i=0;i<32;i++) printf("crc41[%d]=%d\tcrc65[%d]=%d\n",i,(crc41>>i)&1,i,(crc65>>i)&1); + + crc = crc24c(testInputCRC, testLength)>>8; for (int i=0;i<24;i++) printf("[i]=%d\n",(crc>>i)&1); printf("crc: [0]->0x%08x\n",crc); - testInput[testLength>>3] = ((uint8_t*)&crc)[2]; - testInput[1+(testLength>>3)] = ((uint8_t*)&crc)[1]; - testInput[2+(testLength>>3)] = ((uint8_t*)&crc)[0]; - printf("testInput: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n", - testInput[0], testInput[1], testInput[2], testInput[3]); + //crcbit(testInputCRC, sizeof(test) - 1, poly24c)); + + testInputCRC[testLength>>3] = ((uint8_t*)&crc)[2]; + testInputCRC[1+(testLength>>3)] = ((uint8_t*)&crc)[1]; + testInputCRC[2+(testLength>>3)] = ((uint8_t*)&crc)[0]; + printf("testInputCRC: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n", + testInputCRC[0], testInputCRC[1], testInputCRC[2], testInputCRC[3]); + + + //uint32_t trial32 = 0xffffffff; + uint32_t trial32 = 0xf10fffff; + uint8_t a[4]; + //memcpy(a, &trial32, sizeof(trial32)); + *(uint32_t *)a = trial32; + unsigned char trial[4]; + trial[0]=0xff; trial[1]=0xff; trial[2]=0x0f; trial[3]=0xf1; + uint32_t trialcrc = crc24c(trial, 32); + uint32_t trialcrc32 = crc24c((uint8_t *)&trial32, 32); + //uint32_t trialcrc32 = crc24c(a, 32); + printf("crcbit(trial = %x\n", crcbit(trial, 4, poly24c)); + printf("trialcrc = %x\n", trialcrc); + printf("trialcrc32 = %x\n", trialcrc32); + for (int i=0;i<32;i++) printf("trialcrc[%2d]=%d\ttrialcrc32[%2d]=%d\n",i,(trialcrc>>i)&1,i,(trialcrc32>>i)&1); + + + //uint8_t nr_polar_A[32] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; + uint8_t nr_polar_A[32] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,1}; + uint8_t nr_polar_crc[24]; + uint8_t **crc_generator_matrix = crc24c_generator_matrix(32); + nr_matrix_multiplication_uint8_t_1D_uint8_t_2D(nr_polar_A, + crc_generator_matrix, + nr_polar_crc, + 32, + 24); + for (uint8_t i = 0; i < 24; i++){ + nr_polar_crc[i] = (nr_polar_crc[i] % 2); + printf("nr_polar_crc[%d]=%d\n",i,nr_polar_crc[i]); + } + return 0; #endif #ifdef DEBUG_POLAR_TIMING @@ -207,8 +300,8 @@ int main(int argc, char *argv[]) { stop_meas(&timeEncoder); /*printf("encoderOutput: [0]->0x%08x\n", encoderOutput[0]); - printf("encoderOutput: [1]->0x%08x\n", encoderOutput[1]); -*/ + printf("encoderOutput: [1]->0x%08x\n", encoderOutput[1]);*/ + //Bit-to-byte: nr_bit2byte_uint32_8_t(encoderOutput, coderLength, encoderOutputByte); @@ -237,8 +330,8 @@ int main(int argc, char *argv[]) { aPrioriArray); stop_meas(&timeDecoder); /*printf("testInput: [0]->0x%08x\n", testInput[0]); - printf("estimatedOutput: [0]->0x%08x\n", estimatedOutput[0]); -*/ + printf("estimatedOutput: [0]->0x%08x\n", estimatedOutput[0]);*/ + //calculate errors if (decoderState==-1) { diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_bitwise_operations.c b/openair1/PHY/CODING/nrPolar_tools/nr_bitwise_operations.c index ba06922816..beabeead36 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_bitwise_operations.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_bitwise_operations.c @@ -23,11 +23,13 @@ void nr_bit2byte_uint32_8_t(uint32_t *in, uint16_t arraySize, uint8_t *out) { uint8_t arrayInd = ceil(arraySize / 32.0); - for (int i = 0; i < arrayInd; i++) { + for (int i = 0; i < (arrayInd-1); i++) { for (int j = 0; j < 32; j++) { out[j+(i*32)] = (in[i] >> j) & 1; } } + + for (int j = 0; j < arraySize - ((arrayInd-1) * 32); j++) out[j + ((arrayInd-1) * 32)] = (in[(arrayInd-1)] >> j) & 1; } void nr_byte2bit_uint8_32_t(uint8_t *in, uint16_t arraySize, uint32_t *out) { diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c index 1616c498e4..0a866381b1 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c @@ -785,3 +785,252 @@ int8_t polar_decoder_aPriori_timing(double *input, nr_byte2bit_uint8_32_t(polarParams->nr_polar_A, polarParams->payloadBits, out); return(0); } + + +int8_t polar_decoder_dci(double *input, + uint32_t *out, + t_nrPolar_paramsPtr polarParams, + uint8_t listSize, + uint8_t pathMetricAppr, + uint16_t n_RNTI) +{ + + uint8_t ***bit = nr_alloc_uint8_t_3D_array(polarParams->N, (polarParams->n+1), 2*listSize); + uint8_t **bitUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True + uint8_t **llrUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True + double ***llr = nr_alloc_double_3D_array(polarParams->N, (polarParams->n+1), 2*listSize); + uint8_t **crcChecksum = nr_alloc_uint8_t_2D_array(polarParams->crcParityBits, 2*listSize); + double *pathMetric = malloc(sizeof(double)*(2*listSize)); + uint8_t *crcState = malloc(sizeof(uint8_t)*(2*listSize)); //0=False, 1=True + uint8_t extended_crc_scrambling_pattern[polarParams->crcParityBits]; + + for (int i=0; i<(2*listSize); i++) { + pathMetric[i] = 0; + crcState[i]=1; + } + for (int i=0; iN; i++) { + llrUpdated[i][polarParams->n]=1; + bitUpdated[i][0]=((polarParams->information_bit_pattern[i]+1) % 2); + } + + uint8_t **extended_crc_generator_matrix = malloc(polarParams->K * sizeof(uint8_t *)); //G_P3: K-by-P + uint8_t **tempECGM = malloc(polarParams->K * sizeof(uint8_t *)); //G_P2: K-by-P + for (int i = 0; i < polarParams->K; i++){ + extended_crc_generator_matrix[i] = malloc(polarParams->crcParityBits * sizeof(uint8_t)); + tempECGM[i] = malloc(polarParams->crcParityBits * sizeof(uint8_t)); + } + + for (int i=0; ipayloadBits; i++) { + for (int j=0; jcrcParityBits; j++) { + tempECGM[i][j]=polarParams->crc_generator_matrix[i+polarParams->crcParityBits][j]; + } + } + for (int i=polarParams->payloadBits; iK; i++) { + for (int j=0; jcrcParityBits; j++) { + if( (i-polarParams->payloadBits) == j ){ + tempECGM[i][j]=1; + } else { + tempECGM[i][j]=0; + } + } + } + + for (int i=0; iK; i++) { + for (int j=0; jcrcParityBits; j++) { + extended_crc_generator_matrix[i][j]=tempECGM[polarParams->interleaving_pattern[i]][j]; + } + } + + //The index of the last 1-valued bit that appears in each column. + uint16_t last1ind[polarParams->crcParityBits]; + for (int j=0; jcrcParityBits; j++) { + for (int i=0; iK; i++) { + if (extended_crc_generator_matrix[i][j]==1) last1ind[j]=i; + } + } + + for (int i=0;i<8;i++) extended_crc_scrambling_pattern[i]=0; + for (int i=8; icrcParityBits; i++) { + extended_crc_scrambling_pattern[i]=(n_RNTI>>(23-i))&1; + } + + double *d_tilde = malloc(sizeof(double) * polarParams->N); + nr_polar_rate_matching(input, d_tilde, polarParams->rate_matching_pattern, polarParams->K, polarParams->N, polarParams->encoderLength); + for (int j = 0; j < polarParams->N; j++) llr[j][polarParams->n][0]=d_tilde[j]; + + /* + * SCL polar decoder. + */ + + for (int i=0; icrcParityBits; i++) { + for (int j=0; jcrcParityBits; j++) crcChecksum[i][0]=crcChecksum[i][0]+polarParams->crc_generator_matrix[j][i]; + crcChecksum[i][0]=(crcChecksum[i][0]%2); + } + + uint32_t nonFrozenBit=0; + uint8_t currentListSize=1; + uint8_t decoderIterationCheck=0; + int16_t checkCrcBits=-1; + uint8_t listIndex[2*listSize], copyIndex; + + for (uint16_t currentBit=0; currentBitN; currentBit++){ + updateLLR(llr, llrUpdated, bit, bitUpdated, currentListSize, currentBit, 0, polarParams->N, (polarParams->n+1), pathMetricAppr); + if (polarParams->information_bit_pattern[currentBit]==0) { //Frozen bit. + updatePathMetric(pathMetric, llr, currentListSize, 0, currentBit, pathMetricAppr); //approximation=0 --> 11b, approximation=1 --> 12 + } else { //Information or CRC bit. + updatePathMetric2(pathMetric, llr, currentListSize, currentBit, pathMetricAppr); + + for (int i = 0; i < currentListSize; i++) { + for (int j = 0; j < polarParams->N; j++) { + for (int k = 0; k < (polarParams->n+1); k++) { + bit[j][k][i+currentListSize]=bit[j][k][i]; + llr[j][k][i+currentListSize]=llr[j][k][i];}}} + for (int i = 0; i < currentListSize; i++) { + bit[currentBit][0][i]=0; + crcState[i+currentListSize]=crcState[i]; + } + for (int i = currentListSize; i < 2*currentListSize; i++) bit[currentBit][0][i]=1; + bitUpdated[currentBit][0]=1; + updateCrcChecksum2(crcChecksum, extended_crc_generator_matrix, currentListSize, nonFrozenBit, polarParams->crcParityBits); + currentListSize*=2; + + //Keep only the best "listSize" number of entries. + if (currentListSize > listSize) { + for (uint8_t i = 0; i < 2*listSize; i++) listIndex[i]=i; + nr_sort_asc_double_1D_array_ind(pathMetric, listIndex, currentListSize); + + //sort listIndex[listSize, ..., 2*listSize-1] in descending order. + uint8_t swaps, tempInd; + for (uint8_t i = 0; i < listSize; i++) { + swaps = 0; + for (uint8_t j = listSize; j < (2*listSize - i) - 1; j++) { + if (listIndex[j+1] > listIndex[j]) { + tempInd = listIndex[j]; + listIndex[j] = listIndex[j + 1]; + listIndex[j + 1] = tempInd; + swaps++; + } + } + if (swaps == 0) + break; + } + + //First, backup the best "listSize" number of entries. + for (int k=(listSize-1); k>0; k--) { + for (int i=0; iN; i++) { + for (int j=0; j<(polarParams->n+1); j++) { + bit[i][j][listIndex[(2*listSize-1)-k]]=bit[i][j][listIndex[k]]; + llr[i][j][listIndex[(2*listSize-1)-k]]=llr[i][j][listIndex[k]]; + } + } + } + for (int k=(listSize-1); k>0; k--) { + for (int i = 0; i < polarParams->crcParityBits; i++) { + crcChecksum[i][listIndex[(2*listSize-1)-k]] = crcChecksum[i][listIndex[k]]; + } + } + for (int k=(listSize-1); k>0; k--) crcState[listIndex[(2*listSize-1)-k]]=crcState[listIndex[k]]; + + //Copy the best "listSize" number of entries to the first indices. + for (int k = 0; k < listSize; k++) { + if (k > listIndex[k]) { + copyIndex = listIndex[(2*listSize-1)-k]; + } else { //Use the backup. + copyIndex = listIndex[k]; + } + for (int i = 0; i < polarParams->N; i++) { + for (int j = 0; j < (polarParams->n + 1); j++) { + bit[i][j][k] = bit[i][j][copyIndex]; + llr[i][j][k] = llr[i][j][copyIndex]; + } + } + } + for (int k = 0; k < listSize; k++) { + if (k > listIndex[k]) { + copyIndex = listIndex[(2*listSize-1)-k]; + } else { //Use the backup. + copyIndex = listIndex[k]; + } + for (int i = 0; i < polarParams->crcParityBits; i++) { + crcChecksum[i][k]=crcChecksum[i][copyIndex]; + } + } + for (int k = 0; k < listSize; k++) { + if (k > listIndex[k]) { + copyIndex = listIndex[(2*listSize-1)-k]; + } else { //Use the backup. + copyIndex = listIndex[k]; + } + crcState[k]=crcState[copyIndex]; + } + currentListSize = listSize; + } + + for (int i=0; icrcParityBits; i++) { + if (last1ind[i]==nonFrozenBit) { + checkCrcBits=i; + break; + } + } + + if ( checkCrcBits > (-1) ) { + for (uint8_t i = 0; i < currentListSize; i++) { + if (crcChecksum[checkCrcBits][i]!=extended_crc_scrambling_pattern[checkCrcBits]) { + crcState[i]=0; //0=False, 1=True + } + } + } + + for (uint8_t i = 0; i < currentListSize; i++) decoderIterationCheck+=crcState[i]; + if (decoderIterationCheck==0) { + //perror("[SCL polar decoder] All list entries have failed the CRC checks."); + free(d_tilde); + free(pathMetric); + free(crcState); + nr_free_uint8_t_3D_array(bit, polarParams->N, (polarParams->n+1)); + nr_free_double_3D_array(llr, polarParams->N, (polarParams->n+1)); + nr_free_uint8_t_2D_array(crcChecksum, polarParams->crcParityBits); + return(-1); + } + + nonFrozenBit++; + decoderIterationCheck=0; + checkCrcBits=-1; + } + } + + for (uint8_t i = 0; i < 2*listSize; i++) listIndex[i]=i; + nr_sort_asc_double_1D_array_ind(pathMetric, listIndex, currentListSize); + + for (uint8_t i = 0; i < fmin(listSize, (pow(2,polarParams->crcCorrectionBits)) ); i++) { + if ( crcState[listIndex[i]] == 1 ) { + for (int j = 0; j < polarParams->N; j++) polarParams->nr_polar_U[j]=bit[j][0][listIndex[i]]; + + //Extract the information bits (û to ĉ) + nr_polar_info_bit_extraction(polarParams->nr_polar_U, polarParams->nr_polar_CPrime, polarParams->information_bit_pattern, polarParams->N); + + //Deinterleaving (ĉ to b) + nr_polar_deinterleaver(polarParams->nr_polar_CPrime, polarParams->nr_polar_B, polarParams->interleaving_pattern, polarParams->K); + + //Remove the CRC (â) + for (int j = 0; j < polarParams->payloadBits; j++) polarParams->nr_polar_A[j]=polarParams->nr_polar_B[j]; + + break; + } + } + + free(d_tilde); + free(pathMetric); + free(crcState); + nr_free_uint8_t_3D_array(bit, polarParams->N, (polarParams->n+1)); + nr_free_double_3D_array(llr, polarParams->N, (polarParams->n+1)); + nr_free_uint8_t_2D_array(crcChecksum, polarParams->crcParityBits); + nr_free_uint8_t_2D_array(extended_crc_generator_matrix, polarParams->K); + nr_free_uint8_t_2D_array(tempECGM, polarParams->K); + + /* + * Return bits. + */ + nr_byte2bit_uint8_32_t(polarParams->nr_polar_A, polarParams->payloadBits, out); + return(0); +} diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h index 9615a0d245..da602b66e3 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h @@ -43,7 +43,7 @@ #include "PHY/CODING/nrPolar_tools/nr_polar_uci_defs.h" #include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h" #include "PHY/CODING/coding_defs.h" -//#include "SIMULATION/TOOLS/sim.h" +#include "SIMULATION/TOOLS/sim.h" #define NR_POLAR_DECODER_LISTSIZE 8 //uint8_t #define NR_POLAR_DECODER_PATH_METRIC_APPROXIMATION 0 //uint8_t; 0 --> eq. (8a) and (11b), 1 --> eq. (9) and (12) @@ -92,6 +92,7 @@ struct nrPolar_params { //polar_encoder vectors uint8_t *nr_polar_crc; uint8_t *nr_polar_aPrime; + uint8_t *nr_polar_APrime; uint8_t *nr_polar_D; uint8_t *nr_polar_E; @@ -141,6 +142,13 @@ int8_t polar_decoder_aPriori_timing(double *input, double cpuFreqGHz, FILE* logFile); +int8_t polar_decoder_dci(double *input, + uint32_t *out, + t_nrPolar_paramsPtr polarParams, + uint8_t listSize, + uint8_t pathMetricAppr, + uint16_t n_RNTI); + void nr_polar_init(t_nrPolar_paramsPtr *polarParams, int8_t messageType, uint16_t messageLength, diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c index c1a0c31a42..9d84bc7dc8 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c @@ -115,19 +115,64 @@ void polar_encoder_dci(uint32_t *in, #ifdef DEBUG_POLAR_ENCODER_DCI printf("[polar_encoder_dci] in: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n", in[0], in[1], in[2], in[3]); #endif - //(a to a') - nr_crc_bit2bit_uint32_8_t(in, polarParams->payloadBits, polarParams->nr_polar_aPrime); - //Parity bits computation (p) - polarParams->crcBit = crc24c(polarParams->nr_polar_aPrime, - (polarParams->payloadBits+polarParams->crcParityBits)); -#ifdef DEBUG_POLAR_ENCODER_DCI - printf("[polar_encoder_dci] crc: 0x%08x\n", polarParams->crcBit); -#endif - //(a to b) /* * Bytewise operations */ + //(a to a') + nr_bit2byte_uint32_8_t(in, polarParams->payloadBits, polarParams->nr_polar_A); + for (int i=0; icrcParityBits; i++) polarParams->nr_polar_APrime[i]=1; + for (int i=0; ipayloadBits; i++) polarParams->nr_polar_APrime[i+(polarParams->crcParityBits)]=polarParams->nr_polar_A[i]; +#ifdef DEBUG_POLAR_ENCODER_DCI + printf("[polar_encoder_dci] A: "); + for (int i=0; ipayloadBits; i++) printf("%d-", polarParams->nr_polar_A[i]); + printf("\n"); + printf("[polar_encoder_dci] APrime: "); + for (int i=0; iK; i++) printf("%d-", polarParams->nr_polar_APrime[i]); + printf("\n"); + printf("[polar_encoder_dci] GP: "); + for (int i=0; icrcParityBits; i++) printf("%d-", polarParams->crc_generator_matrix[0][i]); + printf("\n"); +#endif + //Calculate CRC. + nr_matrix_multiplication_uint8_t_1D_uint8_t_2D(polarParams->nr_polar_APrime, + polarParams->crc_generator_matrix, + polarParams->nr_polar_crc, + polarParams->K, + polarParams->crcParityBits); + for (uint8_t i = 0; i < polarParams->crcParityBits; i++) polarParams->nr_polar_crc[i] = (polarParams->nr_polar_crc[i] % 2); +#ifdef DEBUG_POLAR_ENCODER_DCI + printf("[polar_encoder_dci] CRC: "); + for (int i=0; icrcParityBits; i++) printf("%d-", polarParams->nr_polar_crc[i]); + printf("\n"); +#endif + + //Attach CRC to the Transport Block. (a to b) + for (uint16_t i = 0; i < polarParams->payloadBits; i++) + polarParams->nr_polar_B[i] = polarParams->nr_polar_A[i]; + for (uint16_t i = polarParams->payloadBits; i < polarParams->K; i++) + polarParams->nr_polar_B[i]= polarParams->nr_polar_crc[i-(polarParams->payloadBits)]; + //Scrambling (b to c) + for (int i=0; i<16; i++) { + polarParams->nr_polar_B[polarParams->payloadBits+8+i] = + ( polarParams->nr_polar_B[polarParams->payloadBits+8+i] + ((n_RNTI>>(15-i))&1) ) % 2; + } + +/* //(a to a') + nr_crc_bit2bit_uint32_8_t(in, polarParams->payloadBits, polarParams->nr_polar_aPrime); + //Parity bits computation (p) + polarParams->crcBit = crc24c(polarParams->nr_polar_aPrime, (polarParams->payloadBits+polarParams->crcParityBits)); +#ifdef DEBUG_POLAR_ENCODER_DCI + printf("[polar_encoder_dci] crc: 0x%08x\n", polarParams->crcBit); + for (int i=0; i<32; i++) + { + printf("%d\n",((polarParams->crcBit)>>i)&1); + } +#endif + //(a to b) + // + // Bytewise operations + // uint8_t arrayInd = ceil(polarParams->payloadBits / 8.0); for (int i=0; inr_polar_B[polarParams->payloadBits+8+i] = ( (((polarParams->crcBit)>>(23-i))&1) + ((n_RNTI>>(15-i))&1) ) % 2; - } + }*/ #ifdef DEBUG_POLAR_ENCODER_DCI printf("[polar_encoder_dci] B: "); for (int i = 0; i < polarParams->K; i++) printf("%d-", polarParams->nr_polar_B[i]); diff --git a/openair1/PHY/CODING/nr_polar_init.c b/openair1/PHY/CODING/nr_polar_init.c index 32e9cca553..87da29c48e 100644 --- a/openair1/PHY/CODING/nr_polar_init.c +++ b/openair1/PHY/CODING/nr_polar_init.c @@ -69,6 +69,7 @@ void nr_polar_init(t_nrPolar_paramsPtr *polarParams, newPolarInitNode->payloadBits = NR_POLAR_PBCH_PAYLOAD_BITS; newPolarInitNode->encoderLength = NR_POLAR_PBCH_E; newPolarInitNode->crcCorrectionBits = NR_POLAR_PBCH_CRC_ERROR_CORRECTION_BITS; + newPolarInitNode->crc_generator_matrix = crc24c_generator_matrix(newPolarInitNode->payloadBits);//G_P } else if (messageType == 1) { //DCI newPolarInitNode->n_max = NR_POLAR_DCI_N_MAX; newPolarInitNode->i_il = NR_POLAR_DCI_I_IL; @@ -80,6 +81,7 @@ void nr_polar_init(t_nrPolar_paramsPtr *polarParams, newPolarInitNode->payloadBits = messageLength; newPolarInitNode->encoderLength = aggregation_level*108; newPolarInitNode->crcCorrectionBits = NR_POLAR_DCI_CRC_ERROR_CORRECTION_BITS; + newPolarInitNode->crc_generator_matrix=crc24c_generator_matrix(newPolarInitNode->payloadBits+newPolarInitNode->crcParityBits);//G_P } else if (messageType == -1) { //UCI } else { @@ -89,13 +91,12 @@ void nr_polar_init(t_nrPolar_paramsPtr *polarParams, newPolarInitNode->K = newPolarInitNode->payloadBits + newPolarInitNode->crcParityBits; // Number of bits to encode. newPolarInitNode->N = nr_polar_output_length(newPolarInitNode->K, newPolarInitNode->encoderLength, newPolarInitNode->n_max); newPolarInitNode->n = log2(newPolarInitNode->N); - - newPolarInitNode->crc_generator_matrix = crc24c_generator_matrix(newPolarInitNode->payloadBits); newPolarInitNode->G_N = nr_polar_kronecker_power_matrices(newPolarInitNode->n); //polar_encoder vectors: newPolarInitNode->nr_polar_crc = malloc(sizeof(uint8_t) * newPolarInitNode->crcParityBits); newPolarInitNode->nr_polar_aPrime = malloc(sizeof(uint8_t) * ((ceil((newPolarInitNode->payloadBits)/32.0)*4)+3)); + newPolarInitNode->nr_polar_APrime = malloc(sizeof(uint8_t) * newPolarInitNode->K); newPolarInitNode->nr_polar_D = malloc(sizeof(uint8_t) * newPolarInitNode->N); newPolarInitNode->nr_polar_E = malloc(sizeof(uint8_t) * newPolarInitNode->encoderLength); From b6b86cce4150d6c1f5c14a88ec90bdf99a6e6829 Mon Sep 17 00:00:00 2001 From: Turker YILMAZ Date: Wed, 26 Sep 2018 16:20:12 +0200 Subject: [PATCH 242/379] Removing #include "SIMULATION/TOOLS/sim.h" in nr_polar_defs.h --- openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h index da602b66e3..e2e79e22a7 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h @@ -43,7 +43,7 @@ #include "PHY/CODING/nrPolar_tools/nr_polar_uci_defs.h" #include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h" #include "PHY/CODING/coding_defs.h" -#include "SIMULATION/TOOLS/sim.h" +//#include "SIMULATION/TOOLS/sim.h" #define NR_POLAR_DECODER_LISTSIZE 8 //uint8_t #define NR_POLAR_DECODER_PATH_METRIC_APPROXIMATION 0 //uint8_t; 0 --> eq. (8a) and (11b), 1 --> eq. (9) and (12) From 6177e2d8817118fb64dc1cd8a4e113dbdf0e20ca Mon Sep 17 00:00:00 2001 From: Turker YILMAZ Date: Wed, 26 Sep 2018 18:07:26 +0200 Subject: [PATCH 243/379] Update nr_dci.c --- openair1/PHY/NR_TRANSPORT/nr_dci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci.c b/openair1/PHY/NR_TRANSPORT/nr_dci.c index 4cca9e85f6..ed2cb5950d 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci.c @@ -217,7 +217,7 @@ uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars, nr_polar_init(nrPolar_params, NR_POLAR_DCI_MESSAGE_TYPE, dci_alloc.size, dci_alloc.L); t_nrPolar_paramsPtr currentPtr = nr_polar_params(*nrPolar_params, NR_POLAR_DCI_MESSAGE_TYPE, dci_alloc.size, dci_alloc.L); #endif - polar_encoder_dci(dci_alloc.dci_pdu, encoder_output, currentPtr, n_RNTI); + polar_encoder_dci(dci_alloc.dci_pdu, encoder_output, currentPtr, pdcch_params.rnti); #ifdef DEBUG_CHANNEL_CODING printf("DCI PDU: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n", From f5d384774fe69ff0c80d8f9fe586ad5d7097ee64 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Thu, 27 Sep 2018 14:08:49 +0200 Subject: [PATCH 244/379] CI: changing basic-simulator eNB conf file to PARALLEL_SINGLE_THREAD Signed-off-by: Raphael Defosseux --- ci-scripts/conf_files/lte-basic-sim.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/conf_files/lte-basic-sim.conf b/ci-scripts/conf_files/lte-basic-sim.conf index 4d4930ad88..0b02e8f871 100644 --- a/ci-scripts/conf_files/lte-basic-sim.conf +++ b/ci-scripts/conf_files/lte-basic-sim.conf @@ -232,7 +232,7 @@ RUs = ( THREAD_STRUCT = ( { #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" - parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + parallel_config = "PARALLEL_SINGLE_THREAD"; #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" worker_config = "WORKER_ENABLE"; } From dd4f1ab73c0787c97a16f9f3f85d3ec4d4a95e22 Mon Sep 17 00:00:00 2001 From: laurent Date: Thu, 27 Sep 2018 14:13:52 +0200 Subject: [PATCH 245/379] coarse gain cleaning --- cmake_targets/CMakeLists.txt | 4 +- .../PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c | 2 +- openair1/PHY/TOOLS/time_meas.c | 4 +- openair1/PHY/TOOLS/time_meas.h | 6 - openair1/SCHED/phy_procedures_lte_eNb.c | 4 +- openair1/SCHED/ru_procedures.c | 8 +- openair1/SIMULATION/LTE_PHY/ulsim.c | 1615 +++++++---------- openair2/UTIL/LISTS/list.h | 35 + 8 files changed, 738 insertions(+), 940 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 8683dfd2e1..c574b7f671 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -185,7 +185,7 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CU # these changes are related to hardcoded path to include .h files add_definitions(-DCMAKER) set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3") -set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3 -O2") +set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3 -O0") set(GIT_BRANCH "UNKNOWN") @@ -2126,7 +2126,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr target_link_libraries (${myExe} -Wl,--start-group SIMU UTIL SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY PHY_UE PHY_RU LFDS ${ITTI_LIB} LFDS7 -Wl,--end-group - pthread m rt ${CONFIG_LIBRARIES} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} dl + pthread m rt ${CONFIG_LIBRARIES} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} dl ) endforeach(myExe) diff --git a/openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c index 50b09102d8..e8f20c85de 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c @@ -782,7 +782,7 @@ int rx_pdsch(PHY_VARS_UE *ue, #if DISABLE_LOG_X printf("[AbsSFN %d.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n",frame,subframe,slot,symbol,pdsch_vars[eNB_id]->log2_maxh,proc->channel_level,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0)); #else - LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n",frame,subframe,slot,symbol,pdsch_vars[eNB_id]->log2_maxh,proc->channel_level,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0)); + LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d log2_maxh %d Channel Comp %5.2f \n",frame,subframe,slot,symbol,pdsch_vars[eNB_id]->log2_maxh,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0)); #endif #endif // MRC diff --git a/openair1/PHY/TOOLS/time_meas.c b/openair1/PHY/TOOLS/time_meas.c index cb77759040..b37f146b0a 100644 --- a/openair1/PHY/TOOLS/time_meas.c +++ b/openair1/PHY/TOOLS/time_meas.c @@ -52,8 +52,8 @@ void print_meas_now(time_stats_t *ts, const char* name, FILE* file_name){ if (ts->trials>0) { - //fprintf(file_name,"Name %25s: Processing %15.3f ms for SF %d, diff_now %15.3f \n", name,(ts->diff_now/(cpu_freq_GHz*1000000.0)),subframe,ts->diff_now); - fprintf(file_name,"%15.3f us, diff_now %15.3f \n",(ts->diff_now/(cpu_freq_GHz*1000.0)),(double)ts->diff_now); + //fprintf(file_name,"Name %25s: Processing %15.3f ms for SF %d, diff_now %15.3f \n", name,(ts->p_time/(cpu_freq_GHz*1000000.0)),subframe,ts->p_time); + fprintf(file_name,"%15.3f us, diff_now %15.3f \n",(ts->p_time/(cpu_freq_GHz*1000.0)),(double)ts->p_time); } } diff --git a/openair1/PHY/TOOLS/time_meas.h b/openair1/PHY/TOOLS/time_meas.h index 32e6883d56..eac057095a 100644 --- a/openair1/PHY/TOOLS/time_meas.h +++ b/openair1/PHY/TOOLS/time_meas.h @@ -40,7 +40,6 @@ typedef struct { long long in; long long diff; - long long diff_now; long long p_time; /*!< \brief absolute process duration */ long long diff_square; /*!< \brief process duration square */ long long max; @@ -50,7 +49,6 @@ typedef struct { #elif defined(__arm__) typedef struct { uint32_t in; - uint32_t diff_now; uint32_t diff; uint32_t p_time; /*!< \brief absolute process duration */ uint32_t diff_square; /*!< \brief process duration square */ @@ -116,9 +114,6 @@ static inline void stop_meas(time_stats_t *ts) if (opp_enabled) { long long out = rdtsc_oai(); - ts->diff_now = (out-ts->in); - - ts->diff_now = (out-ts->in); ts->diff += (out-ts->in); /// process duration is the difference between two clock points ts->p_time = (out-ts->in); @@ -135,7 +130,6 @@ static inline void reset_meas(time_stats_t *ts) { ts->trials=0; ts->diff=0; - ts->diff_now=0; ts->p_time=0; ts->diff_square=0; ts->max=0; diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index b49613b749..ece22a05fb 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -412,7 +412,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB, &eNB->dlsch_turbo_encoding_wakeup_stats1, &eNB->dlsch_interleaving_stats); stop_meas(&eNB->dlsch_encoding_stats); - if(eNB->dlsch_encoding_stats.diff_now>500*3000 && opp_enabled == 1) + if(eNB->dlsch_encoding_stats.p_time>500*3000 && opp_enabled == 1) { print_meas_now(&eNB->dlsch_encoding_stats,"total coding",stderr); } @@ -1337,7 +1337,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ret, ulsch_harq->cqi_crc_status, ulsch_harq->O_ACK, - eNB->ulsch_decoding_stats.diff_now, eNB->ulsch_decoding_stats.max); + eNB->ulsch_decoding_stats.p_time, eNB->ulsch_decoding_stats.max); //compute the expected ULSCH RX power (for the stats) ulsch_harq->delta_TF = get_hundred_times_delta_IF_eNB(eNB,i,harq_pid, 0); // 0 means bw_factor is not considered diff --git a/openair1/SCHED/ru_procedures.c b/openair1/SCHED/ru_procedures.c index 6272650f72..d7e85b807d 100644 --- a/openair1/SCHED/ru_procedures.c +++ b/openair1/SCHED/ru_procedures.c @@ -160,7 +160,7 @@ static void *feptx_thread(void *param) { exit_fun( "ERROR pthread_cond_signal" ); return NULL; } - /*if(opp_enabled == 1 && ru->ofdm_mod_wakeup_stats.diff_now>30*3000){ + /*if(opp_enabled == 1 && ru->ofdm_mod_wakeup_stats.p_time>30*3000){ print_meas_now(&ru->ofdm_mod_wakeup_stats,"fep wakeup",stderr); printf("delay in fep wakeup in frame_tx: %d subframe_rx: %d \n",proc->frame_tx,proc->subframe_tx); }*/ @@ -220,7 +220,7 @@ void feptx_ofdm_2thread(RU_t *ru) { start_meas(&ru->ofdm_mod_wait_stats); wait_on_busy_condition(&proc->mutex_feptx,&proc->cond_feptx,&proc->instance_cnt_feptx,"feptx thread"); stop_meas(&ru->ofdm_mod_wait_stats); - /*if(opp_enabled == 1 && ru->ofdm_mod_wait_stats.diff_now>30*3000){ + /*if(opp_enabled == 1 && ru->ofdm_mod_wait_stats.p_time>30*3000){ print_meas_now(&ru->ofdm_mod_wait_stats,"fep wakeup",stderr); printf("delay in feptx wait on codition in frame_rx: %d subframe_rx: %d \n",proc->frame_tx,proc->subframe_tx); }*/ @@ -467,7 +467,7 @@ static void *fep_thread(void *param) { exit_fun( "ERROR pthread_cond_signal" ); return NULL; } - /*if(opp_enabled == 1 && ru->ofdm_demod_wakeup_stats.diff_now>30*3000){ + /*if(opp_enabled == 1 && ru->ofdm_demod_wakeup_stats.p_time>30*3000){ print_meas_now(&ru->ofdm_demod_wakeup_stats,"fep wakeup",stderr); printf("delay in fep wakeup in frame_rx: %d subframe_rx: %d \n",proc->frame_rx,proc->subframe_rx); }*/ @@ -582,7 +582,7 @@ void ru_fep_full_2thread(RU_t *ru) { start_meas(&ru->ofdm_demod_wait_stats); wait_on_busy_condition(&proc->mutex_fep,&proc->cond_fep,&proc->instance_cnt_fep,"fep thread"); stop_meas(&ru->ofdm_demod_wait_stats); - if(opp_enabled == 1 && ru->ofdm_demod_wakeup_stats.diff_now>30*3000){ + if(opp_enabled == 1 && ru->ofdm_demod_wakeup_stats.p_time>30*3000){ print_meas_now(&ru->ofdm_demod_wakeup_stats,"fep wakeup",stderr); printf("delay in fep wait on codition in frame_rx: %d subframe_rx: %d \n",proc->frame_rx,proc->subframe_rx); } diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index 3fcb010685..14efab9e39 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -1,33 +1,33 @@ /* - * 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.1 (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 - */ + 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.1 (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 ulsim.c - \brief Top-level UL simulator - \author R. Knopp - \date 2011 - 2014 - \version 0.1 - \company Eurecom - \email: knopp@eurecom.fr - \note - \warning + \brief Top-level UL simulator + \author R. Knopp + \date 2011 - 2014 + \version 0.1 + \company Eurecom + \email: knopp@eurecom.fr + \note + \warning */ #include @@ -58,21 +58,43 @@ #include "common/config/config_load_configmodule.h" double cpuf; - - - +#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0)) //#define MCS_COUNT 23//added for PHY abstraction +static int cmpdouble(const void *p1, const void *p2) { + return *(double *)p1 > *(double *)p2; +} + +double median(varArray_t *input) { + return *(double *)((uint8_t *)(input+1)+(input->size/2)*input->atomSize); +} + +double q1(varArray_t *input) { + return *(double *)((uint8_t *)(input+1)+(input->size/4)*input->atomSize); +} + +double q3(varArray_t *input) { + return *(double *)((uint8_t *)(input+1)+(3*input->size/4)*input->atomSize); +} + +void dumpVarArray(varArray_t *input) { + double *ptr=dataArray(input); + printf("dumping size=%ld\n", input->size); + + for (int i=0; i < input->size; i++) + printf("%.1f:", *ptr++); + + printf("\n"); +} channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX]; channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX]; -//Added for PHY abstraction +//Added for PHY abstractionopenair1/PHY/TOOLS/lte_phy_scope.h node_desc_t *enb_data[NUMBER_OF_eNB_MAX]; node_desc_t *ue_data[NUMBER_OF_UE_MAX]; //double sinr_bler_map[MCS_COUNT][2][16]; extern uint16_t beta_ack[16],beta_ri[16],beta_cqi[16]; //extern char* namepointer_chMag ; - int xforms=0; FD_lte_phy_scope_enb *form_enb; char title[255]; @@ -88,6 +110,8 @@ int nfapi_mode = 0; extern void fep_full(RU_t *ru); extern void ru_fep_full_2thread(RU_t *ru); +extern void eNB_fep_full(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc); +extern void eNB_fep_full_2thread(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc); nfapi_dl_config_request_t DL_req; nfapi_ul_config_request_t UL_req; @@ -101,32 +125,29 @@ int codingw = 0; void fill_nfapi_ulsch_config_request(nfapi_ul_config_request_pdu_t *ul_config_pdu, - uint8_t cqi_req, - uint8_t p_eNB, - uint8_t cqi_ReportModeAperiodic, - uint8_t betaOffset_CQI_Index, - uint8_t betaOffset_RI_Index, - uint8_t dl_cqi_pmi_size, - uint8_t tmode, - uint32_t handle, - uint16_t rnti, - uint8_t resource_block_start, - uint8_t number_of_resource_blocks, - uint8_t modulation_type, - uint8_t cyclic_shift_2_for_drms, - uint8_t frequency_hopping_enabled_flag, - uint8_t frequency_hopping_bits, - uint8_t new_data_indication, - uint8_t redundancy_version, - uint8_t harq_process_number, - uint8_t ul_tx_mode, - uint8_t current_tx_nb, - uint8_t n_srs, - uint16_t size) -{ + uint8_t cqi_req, + uint8_t p_eNB, + uint8_t cqi_ReportModeAperiodic, + uint8_t betaOffset_CQI_Index, + uint8_t betaOffset_RI_Index, + uint8_t dl_cqi_pmi_size, + uint8_t tmode, + uint32_t handle, + uint16_t rnti, + uint8_t resource_block_start, + uint8_t number_of_resource_blocks, + uint8_t modulation_type, + uint8_t cyclic_shift_2_for_drms, + uint8_t frequency_hopping_enabled_flag, + uint8_t frequency_hopping_bits, + uint8_t new_data_indication, + uint8_t redundancy_version, + uint8_t harq_process_number, + uint8_t ul_tx_mode, + uint8_t current_tx_nb, + uint8_t n_srs, + uint16_t size) { memset((void *) ul_config_pdu, 0, sizeof(nfapi_ul_config_request_pdu_t)); - - ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_ULSCH_PDU_TYPE; ul_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_ul_config_ulsch_pdu)); ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_ULSCH_PDU_REL8_TAG; @@ -158,15 +179,15 @@ fill_nfapi_ulsch_config_request(nfapi_ul_config_request_pdu_t *ul_config_pdu, LOG_D(MAC, "report_type %d\n",ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.report_type); if (p_eNB <= 2 - && (tmode == 3 || tmode == 4 || tmode == 8 || tmode == 9 || tmode == 10)) + && (tmode == 3 || tmode == 4 || tmode == 8 || tmode == 9 || tmode == 10)) ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].ri_size = 1; else if (p_eNB <= 2) ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].ri_size = 0; else if (p_eNB == 4) ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].ri_size = 2; for (int ri = 0; - ri < (1 << ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].ri_size); - ri++) - ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].dl_cqi_pmi_size[ri] = dl_cqi_pmi_size; + ri < (1 << ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].ri_size); + ri++) + ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].dl_cqi_pmi_size[ri] = dl_cqi_pmi_size; ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.delta_offset_cqi = betaOffset_CQI_Index; ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.delta_offset_ri = betaOffset_RI_Index; @@ -174,585 +195,528 @@ fill_nfapi_ulsch_config_request(nfapi_ul_config_request_pdu_t *ul_config_pdu, } void fill_ulsch_dci(PHY_VARS_eNB *eNB, - int frame, - int subframe, - Sched_Rsp_t *sched_resp, - uint16_t rnti, - void *UL_dci, - int first_rb, - int nb_rb, - int mcs, - int modulation_type, - int ndi, + int frame, + int subframe, + Sched_Rsp_t *sched_resp, + uint16_t rnti, + void *UL_dci, + int first_rb, + int nb_rb, + int mcs, + int modulation_type, + int ndi, int TBS, - int cqi_flag, - uint8_t beta_CQI, - uint8_t beta_RI, - uint8_t cqi_size) { - + int cqi_flag, + uint8_t beta_CQI, + uint8_t beta_RI, + uint8_t cqi_size) { nfapi_ul_config_request_body_t *ul_req=&sched_resp->UL_req->ul_config_request_body; int harq_pid = ((frame*10)+subframe)&7; //printf("ulsch in frame %d, subframe %d => harq_pid %d, mcs %d, ndi %d\n",frame,subframe,harq_pid,mcs,ndi); switch (eNB->frame_parms.N_RB_UL) { - case 6: - break; + case 6: + break; - case 25: - if (eNB->frame_parms.frame_type == TDD) { - ((DCI0_5MHz_TDD_1_6_t*)UL_dci)->type = 0; - ((DCI0_5MHz_TDD_1_6_t*)UL_dci)->rballoc = computeRIV(eNB->frame_parms.N_RB_UL,first_rb,nb_rb);// 12 RBs from position 8 - //printf("nb_rb %d/%d, rballoc %d (dci %x)\n",nb_rb,eNB->frame_parms.N_RB_UL,((DCI0_5MHz_TDD_1_6_t*)UL_dci)->rballoc,*(uint32_t *)UL_dci); - ((DCI0_5MHz_TDD_1_6_t*)UL_dci)->mcs = mcs; - ((DCI0_5MHz_TDD_1_6_t*)UL_dci)->ndi = ndi; - ((DCI0_5MHz_TDD_1_6_t*)UL_dci)->TPC = 0; - ((DCI0_5MHz_TDD_1_6_t*)UL_dci)->cqi_req = cqi_flag&1; - ((DCI0_5MHz_TDD_1_6_t*)UL_dci)->cshift = 0; - ((DCI0_5MHz_TDD_1_6_t*)UL_dci)->dai = 1; - } else { - ((DCI0_5MHz_FDD_t*)UL_dci)->type = 0; - ((DCI0_5MHz_FDD_t*)UL_dci)->rballoc = computeRIV(eNB->frame_parms.N_RB_UL,first_rb,nb_rb);// 12 RBs from position 8 - // printf("nb_rb %d/%d, rballoc %d (dci %x) (dcip %p)\n",nb_rb,eNB->frame_parms.N_RB_UL,((DCI0_5MHz_FDD_t*)UL_dci)->rballoc,*(uint32_t *)UL_dci,UL_dci); - ((DCI0_5MHz_FDD_t*)UL_dci)->mcs = mcs; - ((DCI0_5MHz_FDD_t*)UL_dci)->ndi = ndi; - ((DCI0_5MHz_FDD_t*)UL_dci)->TPC = 0; - ((DCI0_5MHz_FDD_t*)UL_dci)->cqi_req = cqi_flag&1; - ((DCI0_5MHz_FDD_t*)UL_dci)->cshift = 0; - } + case 25: + if (eNB->frame_parms.frame_type == TDD) { + ((DCI0_5MHz_TDD_1_6_t *)UL_dci)->type = 0; + ((DCI0_5MHz_TDD_1_6_t *)UL_dci)->rballoc = computeRIV(eNB->frame_parms.N_RB_UL,first_rb,nb_rb); // 12 RBs from position 8 + //printf("nb_rb %d/%d, rballoc %d (dci %x)\n",nb_rb,eNB->frame_parms.N_RB_UL,((DCI0_5MHz_TDD_1_6_t*)UL_dci)->rballoc,*(uint32_t *)UL_dci); + ((DCI0_5MHz_TDD_1_6_t *)UL_dci)->mcs = mcs; + ((DCI0_5MHz_TDD_1_6_t *)UL_dci)->ndi = ndi; + ((DCI0_5MHz_TDD_1_6_t *)UL_dci)->TPC = 0; + ((DCI0_5MHz_TDD_1_6_t *)UL_dci)->cqi_req = cqi_flag&1; + ((DCI0_5MHz_TDD_1_6_t *)UL_dci)->cshift = 0; + ((DCI0_5MHz_TDD_1_6_t *)UL_dci)->dai = 1; + } else { + ((DCI0_5MHz_FDD_t *)UL_dci)->type = 0; + ((DCI0_5MHz_FDD_t *)UL_dci)->rballoc = computeRIV(eNB->frame_parms.N_RB_UL,first_rb,nb_rb); // 12 RBs from position 8 + // printf("nb_rb %d/%d, rballoc %d (dci %x) (dcip %p)\n",nb_rb,eNB->frame_parms.N_RB_UL,((DCI0_5MHz_FDD_t*)UL_dci)->rballoc,*(uint32_t *)UL_dci,UL_dci); + ((DCI0_5MHz_FDD_t *)UL_dci)->mcs = mcs; + ((DCI0_5MHz_FDD_t *)UL_dci)->ndi = ndi; + ((DCI0_5MHz_FDD_t *)UL_dci)->TPC = 0; + ((DCI0_5MHz_FDD_t *)UL_dci)->cqi_req = cqi_flag&1; + ((DCI0_5MHz_FDD_t *)UL_dci)->cshift = 0; + } - break; + break; - case 50: - if (eNB->frame_parms.frame_type == TDD) { - ((DCI0_10MHz_TDD_1_6_t*)UL_dci)->type = 0; - ((DCI0_10MHz_TDD_1_6_t*)UL_dci)->rballoc = computeRIV(eNB->frame_parms.N_RB_UL,first_rb,nb_rb);// 12 RBs from position 8 - // printf("nb_rb %d/%d, rballoc %d (dci %x)\n",nb_rb,eNB->frame_parms.N_RB_UL,((DCI0_10MHz_TDD_1_6_t*)UL_dci)->rballoc,*(uint32_t *)UL_dci); - ((DCI0_10MHz_TDD_1_6_t*)UL_dci)->mcs = mcs; - ((DCI0_10MHz_TDD_1_6_t*)UL_dci)->ndi = ndi; - ((DCI0_10MHz_TDD_1_6_t*)UL_dci)->TPC = 0; - ((DCI0_10MHz_TDD_1_6_t*)UL_dci)->cqi_req = cqi_flag&1; - ((DCI0_10MHz_TDD_1_6_t*)UL_dci)->cshift = 0; - ((DCI0_10MHz_TDD_1_6_t*)UL_dci)->dai = 1; - } else { - ((DCI0_10MHz_FDD_t*)UL_dci)->type = 0; - ((DCI0_10MHz_FDD_t*)UL_dci)->rballoc = computeRIV(eNB->frame_parms.N_RB_UL,first_rb,nb_rb);// 12 RBs from position 8 - //printf("nb_rb %d/%d, rballoc %d (dci %x)\n",nb_rb,eNB->frame_parms.N_RB_UL,((DCI0_10MHz_FDD_t*)UL_dci)->rballoc,*(uint32_t *)UL_dci); - ((DCI0_10MHz_FDD_t*)UL_dci)->mcs = mcs; - ((DCI0_10MHz_FDD_t*)UL_dci)->ndi = ndi; - ((DCI0_10MHz_FDD_t*)UL_dci)->TPC = 0; - ((DCI0_10MHz_FDD_t*)UL_dci)->cqi_req = cqi_flag&1; - ((DCI0_10MHz_FDD_t*)UL_dci)->cshift = 0; - } + case 50: + if (eNB->frame_parms.frame_type == TDD) { + ((DCI0_10MHz_TDD_1_6_t *)UL_dci)->type = 0; + ((DCI0_10MHz_TDD_1_6_t *)UL_dci)->rballoc = computeRIV(eNB->frame_parms.N_RB_UL,first_rb,nb_rb); // 12 RBs from position 8 + // printf("nb_rb %d/%d, rballoc %d (dci %x)\n",nb_rb,eNB->frame_parms.N_RB_UL,((DCI0_10MHz_TDD_1_6_t*)UL_dci)->rballoc,*(uint32_t *)UL_dci); + ((DCI0_10MHz_TDD_1_6_t *)UL_dci)->mcs = mcs; + ((DCI0_10MHz_TDD_1_6_t *)UL_dci)->ndi = ndi; + ((DCI0_10MHz_TDD_1_6_t *)UL_dci)->TPC = 0; + ((DCI0_10MHz_TDD_1_6_t *)UL_dci)->cqi_req = cqi_flag&1; + ((DCI0_10MHz_TDD_1_6_t *)UL_dci)->cshift = 0; + ((DCI0_10MHz_TDD_1_6_t *)UL_dci)->dai = 1; + } else { + ((DCI0_10MHz_FDD_t *)UL_dci)->type = 0; + ((DCI0_10MHz_FDD_t *)UL_dci)->rballoc = computeRIV(eNB->frame_parms.N_RB_UL,first_rb,nb_rb); // 12 RBs from position 8 + //printf("nb_rb %d/%d, rballoc %d (dci %x)\n",nb_rb,eNB->frame_parms.N_RB_UL,((DCI0_10MHz_FDD_t*)UL_dci)->rballoc,*(uint32_t *)UL_dci); + ((DCI0_10MHz_FDD_t *)UL_dci)->mcs = mcs; + ((DCI0_10MHz_FDD_t *)UL_dci)->ndi = ndi; + ((DCI0_10MHz_FDD_t *)UL_dci)->TPC = 0; + ((DCI0_10MHz_FDD_t *)UL_dci)->cqi_req = cqi_flag&1; + ((DCI0_10MHz_FDD_t *)UL_dci)->cshift = 0; + } - break; + break; - case 100: - if (eNB->frame_parms.frame_type == TDD) { - ((DCI0_20MHz_TDD_1_6_t*)UL_dci)->type = 0; - ((DCI0_20MHz_TDD_1_6_t*)UL_dci)->rballoc = computeRIV(eNB->frame_parms.N_RB_UL,first_rb,nb_rb);// 12 RBs from position 8 - // printf("nb_rb %d/%d, rballoc %d (dci %x)\n",nb_rb,eNB->frame_parms.N_RB_UL,((DCI0_20MHz_TDD_1_6_t*)UL_dci)->rballoc,*(uint32_t *)UL_dci); - ((DCI0_20MHz_TDD_1_6_t*)UL_dci)->mcs = mcs; - ((DCI0_20MHz_TDD_1_6_t*)UL_dci)->ndi = ndi; - ((DCI0_20MHz_TDD_1_6_t*)UL_dci)->TPC = 0; - ((DCI0_20MHz_TDD_1_6_t*)UL_dci)->cqi_req = cqi_flag&1; - ((DCI0_20MHz_TDD_1_6_t*)UL_dci)->cshift = 0; - ((DCI0_20MHz_TDD_1_6_t*)UL_dci)->dai = 1; - } else { - ((DCI0_20MHz_FDD_t*)UL_dci)->type = 0; - ((DCI0_20MHz_FDD_t*)UL_dci)->rballoc = computeRIV(eNB->frame_parms.N_RB_UL,first_rb,nb_rb);// 12 RBs from position 8 - // printf("nb_rb %d/%d, rballoc %d (dci %x) (UL_dci %p)\n",nb_rb,eNB->frame_parms.N_RB_UL,((DCI0_20MHz_FDD_t*)UL_dci)->rballoc,*(uint32_t *)UL_dci,(void*)UL_dci); - ((DCI0_20MHz_FDD_t*)UL_dci)->mcs = mcs; - ((DCI0_20MHz_FDD_t*)UL_dci)->ndi = ndi; - ((DCI0_20MHz_FDD_t*)UL_dci)->TPC = 0; - ((DCI0_20MHz_FDD_t*)UL_dci)->cqi_req = cqi_flag&1; - ((DCI0_20MHz_FDD_t*)UL_dci)->cshift = 0; - } + case 100: + if (eNB->frame_parms.frame_type == TDD) { + ((DCI0_20MHz_TDD_1_6_t *)UL_dci)->type = 0; + ((DCI0_20MHz_TDD_1_6_t *)UL_dci)->rballoc = computeRIV(eNB->frame_parms.N_RB_UL,first_rb,nb_rb); // 12 RBs from position 8 + // printf("nb_rb %d/%d, rballoc %d (dci %x)\n",nb_rb,eNB->frame_parms.N_RB_UL,((DCI0_20MHz_TDD_1_6_t*)UL_dci)->rballoc,*(uint32_t *)UL_dci); + ((DCI0_20MHz_TDD_1_6_t *)UL_dci)->mcs = mcs; + ((DCI0_20MHz_TDD_1_6_t *)UL_dci)->ndi = ndi; + ((DCI0_20MHz_TDD_1_6_t *)UL_dci)->TPC = 0; + ((DCI0_20MHz_TDD_1_6_t *)UL_dci)->cqi_req = cqi_flag&1; + ((DCI0_20MHz_TDD_1_6_t *)UL_dci)->cshift = 0; + ((DCI0_20MHz_TDD_1_6_t *)UL_dci)->dai = 1; + } else { + ((DCI0_20MHz_FDD_t *)UL_dci)->type = 0; + ((DCI0_20MHz_FDD_t *)UL_dci)->rballoc = computeRIV(eNB->frame_parms.N_RB_UL,first_rb,nb_rb); // 12 RBs from position 8 + // printf("nb_rb %d/%d, rballoc %d (dci %x) (UL_dci %p)\n",nb_rb,eNB->frame_parms.N_RB_UL,((DCI0_20MHz_FDD_t*)UL_dci)->rballoc,*(uint32_t *)UL_dci,(void*)UL_dci); + ((DCI0_20MHz_FDD_t *)UL_dci)->mcs = mcs; + ((DCI0_20MHz_FDD_t *)UL_dci)->ndi = ndi; + ((DCI0_20MHz_FDD_t *)UL_dci)->TPC = 0; + ((DCI0_20MHz_FDD_t *)UL_dci)->cqi_req = cqi_flag&1; + ((DCI0_20MHz_FDD_t *)UL_dci)->cshift = 0; + } - break; + break; - default: - break; + default: + break; } fill_nfapi_ulsch_config_request(&ul_req->ul_config_pdu_list[0], - cqi_flag&1, - 1, // p_eNB - 0, // reportmode Aperiodic - beta_CQI, - beta_RI, - cqi_size, - //cc, - //UE_template->physicalConfigDedicated, - 1, - 0, - 14, // rnti - first_rb, // resource_block_start - nb_rb, // number_of_resource_blocks - modulation_type, - 0, // cyclic_shift_2_for_drms - 0, // frequency_hopping_enabled_flag - 0, // frequency_hopping_bits - ndi, // new_data_indication - mcs>28?(mcs-28):0, // redundancy_version - harq_pid, // harq_process_number - 0, // ul_tx_mode - 0, // current_tx_nb - 0, // n_srs - TBS); - + cqi_flag&1, + 1, // p_eNB + 0, // reportmode Aperiodic + beta_CQI, + beta_RI, + cqi_size, + //cc, + //UE_template->physicalConfigDedicated, + 1, + 0, + 14, // rnti + first_rb, // resource_block_start + nb_rb, // number_of_resource_blocks + modulation_type, + 0, // cyclic_shift_2_for_drms + 0, // frequency_hopping_enabled_flag + 0, // frequency_hopping_bits + ndi, // new_data_indication + mcs>28?(mcs-28):0, // redundancy_version + harq_pid, // harq_process_number + 0, // ul_tx_mode + 0, // current_tx_nb + 0, // n_srs + TBS); sched_resp->UL_req->header.message_id = NFAPI_UL_CONFIG_REQUEST; ul_req->number_of_pdus=1; ul_req->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG; - } -extern void eNB_fep_full(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc); -extern void eNB_fep_full_2thread(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc); +void printStatIndent(time_stats_t *ptr, char *txt) { + printf("|__ %-50s %.2f us (%d trials)\n", + txt, + inMicroS(ptr->diff/ptr->trials), + ptr->trials); +} -int main(int argc, char **argv) -{ +void printStatIndent2(time_stats_t *ptr, char *txt, int turbo_iter) { + double timeBase=1/(1000*cpu_freq_GHz); + printf(" |__ %-45s %.2f us (cycles/block %7g, %5d trials)\n", + txt, + ((double)ptr->diff)/ptr->trials*timeBase, + round(((double)ptr->diff)/turbo_iter), + ptr->trials); +} - char c; +double squareRoot(time_stats_t *ptr) { + double timeBase=1/(1000*cpu_freq_GHz); + return sqrt((double)ptr->diff_square*pow(timeBase,2)/ptr->trials - + pow((double)ptr->diff/ptr->trials*timeBase,2)); +} + +void printDistribution(time_stats_t *ptr, varArray_t *sortedList, char *txt) { + double timeBase=1/(1000*cpu_freq_GHz); + printf("%-50s :%.2f us (%d trials)\n", + txt, + (double)ptr->diff/ptr->trials*timeBase, + ptr->trials); + printf("|__ Statistics std: %.2f us median %.2fus q1 %.2fus q3 %.2fus \n", + squareRoot(ptr), median(sortedList),q1(sortedList),q3(sortedList)); +} + +enum eTypes { eBool, eInt, eFloat, eText }; +static int verbose,disable_bundling=0,cqi_flag=0, extended_prefix_flag=0, test_perf=0, subframe=3, transmission_m=1,n_rx=1; + +int main(int argc, char **argv) { int i,j,aa,u; PHY_VARS_eNB *eNB; PHY_VARS_UE *UE; RU_t *ru; int aarx,aatx; double channelx,channely; - double sigma2, sigma2_dB=10,SNR,SNR2=0,snr0=-2.0,snr1,SNRmeas,rate,saving_bler=0; - double input_snr_step=.2,snr_int=30; + static double sigma2, sigma2_dB=10,SNR,SNR2=0,snr0=-2.0,snr1,SNRmeas,rate,saving_bler=0; + static double input_snr_step=.2,snr_int=30; double blerr; - int rvidx[8]={0,2,3,1,0,2,3,1}; + int rvidx[8]= {0,2,3,1,0,2,3,1}; int **txdata; - LTE_DL_FRAME_PARMS *frame_parms; double s_re0[30720],s_im0[30720],r_re0[30720],r_im0[30720]; double s_re1[30720],s_im1[30720],r_re1[30720],r_im1[30720]; double r_re2[30720],r_im2[30720]; double r_re3[30720],r_im3[30720]; - double *s_re[2]={s_re0,s_re1}; - double *s_im[2]={s_im0,s_im1}; - double *r_re[4]={r_re0,r_re1,r_re2,r_re3}; - double *r_im[4]={r_im0,r_im1,r_im2,r_im3}; + double *s_re[2]= {s_re0,s_re1}; + double *s_im[2]= {s_im0,s_im1}; + double *r_re[4]= {r_re0,r_re1,r_re2,r_re3}; + double *r_im[4]= {r_im0,r_im1,r_im2,r_im3}; double forgetting_factor=0.0; //in [0,1] 0 means a new channel every time, 1 means keep the same channel double iqim=0.0; - uint8_t extended_prefix_flag=0; - int cqi_flag=0,cqi_error,cqi_errors,ack_errors,cqi_crc_falsepositives,cqi_crc_falsenegatives; + int cqi_error,cqi_errors,ack_errors,cqi_crc_falsepositives,cqi_crc_falsenegatives; int ch_realization; int eNB_id = 0; int chMod = 0 ; int UE_id = 0; - unsigned char nb_rb=25,first_rb=0,mcs=0,round=0,bundling_flag=1; + static int nb_rb=25,first_rb=0,mcs=0,round=0; //unsigned char l; - - unsigned char awgn_flag = 0 ; + static int awgn_flag = 0 ; SCM_t channel_model=Rice1; - - - unsigned char *input_buffer,harq_pid; + unsigned char *input_buffer=0,harq_pid; unsigned short input_buffer_length; unsigned int ret; unsigned int coded_bits_per_codeword,nsymb; - int subframe=3; unsigned int tx_lev=0,tx_lev_dB,trials,errs[4]= {0,0,0,0},round_trials[4]= {0,0,0,0}; - uint8_t transmission_mode=1,n_rx=1; - FILE *bler_fd=NULL; char bler_fname[512]; - FILE *time_meas_fd=NULL; char time_meas_fname[256]; - FILE *input_fdUL=NULL,*trch_out_fdUL=NULL; // unsigned char input_file=0; char input_val_str[50],input_val_str2[50]; - // FILE *rx_frame_file; FILE *csv_fdUL=NULL; - /* - FILE *fperen=NULL; - char fperen_name[512]; + FILE *fperen=NULL; + char fperen_name[512]; - FILE *fmageren=NULL; - char fmageren_name[512]; + FILE *fmageren=NULL; + char fmageren_name[512]; - FILE *flogeren=NULL; - char flogeren_name[512]; + FILE *flogeren=NULL; + char flogeren_name[512]; */ - /* FILE *ftxlev; char ftxlev_name[512]; */ - char csv_fname[512]; - int n_frames=5000; - int n_ch_rlz = 1; - int abstx = 0; + static int n_frames=5000; + static int n_ch_rlz = 1; + static int abstx = 0; int hold_channel=0; channel_desc_t *UE2eNB; - //uint8_t control_only_flag = 0; - int delay = 0; - double maxDoppler = 0.0; - uint8_t srs_flag = 0; - - uint8_t N_RB_DL=25,osf=1; - + static int delay = 0; + static double maxDoppler = 0.0; + static int srs_flag = 0; + static int N_RB_DL=25,osf=1; //uint8_t cyclic_shift = 0; - uint8_t beta_ACK=0,beta_RI=0,beta_CQI=2,cqi_size=11; - uint8_t tdd_config=3,frame_type=FDD; - - uint8_t N0=30; - double tx_gain=1.0; + static uint8_t beta_ACK=0,beta_RI=0,beta_CQI=2,cqi_size=11; + static uint8_t tdd_config=3,frame_type=FDD; + static int N0=30; + static double tx_gain=1.0; double cpu_freq_GHz; - int avg_iter,iter_trials; - + int iter_trials; uint32_t UL_alloc_pdu; int s,Kr,Kr_bytes; int dump_perf=0; - int test_perf=0; - int dump_table =0; - + static int dump_table =0; double effective_rate=0.0; - char channel_model_input[10]; - - uint8_t max_turbo_iterations=4; - uint8_t parallel_flag=0; + char channel_model_input[10]= {0}; + static int max_turbo_iterations=4; + static int parallel_flag=0; int nb_rb_set = 0; int sf; - - int threequarter_fs=0; + static int threequarter_fs=0; int ndi; - opp_enabled=1; // to enable the time meas - sched_resp.DL_req = &DL_req; sched_resp.UL_req = &UL_req; sched_resp.HI_DCI0_req = &HI_DCI0_req; sched_resp.TX_req = &TX_req; - memset((void*)&DL_req,0,sizeof(DL_req)); - memset((void*)&UL_req,0,sizeof(UL_req)); - memset((void*)&HI_DCI0_req,0,sizeof(HI_DCI0_req)); - memset((void*)&TX_req,0,sizeof(TX_req)); - + memset((void *)&DL_req,0,sizeof(DL_req)); + memset((void *)&UL_req,0,sizeof(UL_req)); + memset((void *)&HI_DCI0_req,0,sizeof(HI_DCI0_req)); + memset((void *)&TX_req,0,sizeof(TX_req)); UL_req.ul_config_request_body.ul_config_pdu_list = ul_config_pdu_list; TX_req.tx_request_body.tx_pdu_list = tx_pdu_list; - cpu_freq_GHz = (double)get_cpu_freq_GHz(); cpuf = cpu_freq_GHz; - printf("Detected cpu_freq %f GHz\n",cpu_freq_GHz); AssertFatal(load_configmodule(argc,argv) != NULL, - "cannot load configuration module, exiting\n"); - + "cannot load configuration module, exiting\n"); logInit(); - // enable these lines if you need debug info // however itti will catch all signals, so ctrl-c won't work anymore // alternatively you can disable ITTI completely in CMakeLists.txt //itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, NULL); //set_comp_log(PHY,LOG_DEBUG,LOG_MED,1); //set_glog(LOG_DEBUG,LOG_MED); - + //hapZEbm:n:Y:X:x:s:w:e:q:d:D:O:c:r:i:f:y:c:oA:C:R:g:N:l:S:T:QB:PI:LF + static paramdef_t options[] = { + { "awgn", "Additive white gaussian noise", PARAMFLAG_BOOL, strptr:NULL, defintval:0, TYPE_INT, 0, NULL, NULL }, + { "BnbRBs", "The LTE bandwith in RBs (100 is 20MHz)",0, iptr:&N_RB_DL, defintval:25, TYPE_INT, 0 }, + { "mcs", "The MCS to use", 0, iptr:&mcs, defintval:10, TYPE_INT, 0 }, + { "nb_frame", "number of frame in a test",0, iptr:&n_frames, defintval:1, TYPE_INT, 0 }, + { "snr", "starting snr", 0, dblptr:&snr0, defdblval:-2.9, TYPE_DOUBLE, 0 }, + { "w_snr_int", "snr int ?", 0, dblptr:&snr_int, defdblval:30, TYPE_DOUBLE, 0 }, + { "e_snr_step", "step increasint snr",0, dblptr:&input_snr_step, defdblval:0.2, TYPE_DOUBLE, 0 }, + { "rb_dynamic", "number of rb in dynamic allocation",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, + { "first_rb", "first rb used in dynamic allocation",0, iptr:&first_rb, defintval:0, TYPE_INT, 0 }, + { "osrs", "enable srs generation",PARAMFLAG_BOOL, iptr:&srs_flag, defintval:0, TYPE_INT, 0 }, + { "gchannel", "[A:M] Use 3GPP 25.814 SCM-A/B/C/D('A','B','C','D') or 36-101 EPA('E'), EVA ('F'),ETU('G') models (ignores delay spread and Ricean factor), Rayghleigh8 ('H'), Rayleigh1('I'), Rayleigh1_corr('J'), Rayleigh1_anticorr ('K'), Rice8('L'), Rice1('M')",0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0 }, + { "delay_chan", "Channel delay",0, iptr:&delay, defintval:0, TYPE_INT, 0 }, + { "Doppler", "Maximum doppler shift",0, dblptr:&maxDoppler, defdblval:0.0, TYPE_DOUBLE, 0 }, + { "Zdump", "dump table",PARAMFLAG_BOOL, iptr:&dump_table, defintval:0, TYPE_INT, 0 }, + { "Forms", "Display the soft scope", PARAMFLAG_BOOL, iptr:&xforms, defintval:0, TYPE_INT, 0 }, + { "Lparallel", "Enable parallel execution", PARAMFLAG_BOOL, iptr:¶llel_flag, defintval:0, TYPE_INT, 0 }, + { "Iterations", "Number of iterations of turbo decoder", 0, iptr:&max_turbo_iterations, defintval:4, TYPE_INT, 0 }, + { "Performance", "Display CPU perfomance of each L1 piece", PARAMFLAG_BOOL, iptr:NULL, defintval:0, TYPE_INT, 0 }, + { "Q_cqi", "Enable CQI", PARAMFLAG_BOOL, iptr:&cqi_flag, defintval:0, TYPE_INT, 0 }, + { "prefix_extended","Extended prefix", PARAMFLAG_BOOL, iptr:&extended_prefix_flag, defintval:0, TYPE_INT, 0 }, + { "RI_beta", "TBD", 0, iptr:NULL, defintval:0, TYPE_INT, 0 }, + { "CQI_beta", "TBD",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, + { "ACK_beta", "TBD",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, + { "input_file", "input IQ data file",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, + { "N0", "N0",0, iptr:&N0, defintval:30, TYPE_INT, 0 }, + { "EsubSampling","three quarters sub-sampling",PARAMFLAG_BOOL, iptr:&threequarter_fs, defintval:0, TYPE_INT, 0 }, + { "TDD", "Enable TDD and set the tdd configuration mode",0, iptr:NULL, defintval:25, TYPE_INT, 0 }, + { "Subframe", "subframe to use",0, iptr:&subframe, defintval:3, TYPE_INT, 0 }, + { "xTransmission","transmission mode (1 or 2 are supported)",0, iptr:NULL, defintval:25, TYPE_INT, 0 }, + { "yN_rx", "TBD: n_rx",0, iptr:&n_rx, defintval:1, TYPE_INT, 0 }, + { "bundling_disable", "bundling disable",PARAMFLAG_BOOL, iptr:&disable_bundling, defintval:0, TYPE_INT, 0 }, + { "Y", "n_ch_rlz",0, iptr:&n_ch_rlz, defintval:1, TYPE_INT, 0 }, + { "X", "abstx", PARAMFLAG_BOOL, iptr:&abstx, defintval:0, TYPE_INT, 0 }, + { "Operf", "test perf mode ?",0, iptr:&test_perf, defintval:0, TYPE_INT, 0 }, + { "verbose", "display debug text", PARAMFLAG_BOOL, iptr:&verbose, defintval:0, TYPE_INT, 0 }, + { "", "",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, + }; + int l; - while ((c = getopt (argc, argv, "hapZEbm:n:Y:X:x:s:w:e:q:d:D:O:c:r:i:f:y:c:oA:C:R:g:N:l:S:T:QB:PI:LF")) != -1) { - switch (c) { - case 'a': - channel_model = AWGN; - chMod = 1; - break; + for(l=0; options[l].optname[0]!=0; l++) {}; - case 'b': - bundling_flag = 0; - break; + struct option *long_options=calloc(sizeof(struct option),l); - case 'd': - delay = atoi(optarg); - break; + for(int i=0; options[i].optname[0]!=0; i++) { + long_options[i].name=options[i].optname; + long_options[i].has_arg=options[i].paramflags==PARAMFLAG_BOOL?no_argument:required_argument; - case 'D': - maxDoppler = atoi(optarg); - break; + if ( options[i].voidptr) + switch (options[i].type) { + case TYPE_INT: + *options[i].iptr=options[i].defintval; + break; - case 'm': - mcs = atoi(optarg); - break; + case TYPE_DOUBLE: + *options[i].dblptr=options[i].defdblval; + break; - case 'n': - n_frames = atoi(optarg); - break; + default: + printf("not parsed type for default value %s\n", options[i].optname ); + exit(1); + } - case 'Y': - n_ch_rlz = atoi(optarg); - break; + continue; + }; - case 'X': - abstx= atoi(optarg); - break; + int option_index; - case 'g': - sprintf(channel_model_input,optarg,10); + int res; - switch((char)*optarg) { - case 'A': - channel_model=SCM_A; - chMod = 2; + while ((res=getopt_long_only(argc, argv, "", long_options, &option_index)) == 0) { + if (options[option_index].voidptr != NULL ) { + if (long_options[option_index].has_arg==no_argument) + *(bool *)options[option_index].iptr=1; + else switch (options[option_index].type) { + case TYPE_INT: + *(int *)options[option_index].iptr=atoi(optarg); + break; + + case TYPE_DOUBLE: + *(double *)options[option_index].dblptr=atof(optarg); + break; + + default: + printf("not decoded type.\n"); + exit(1); + } + + continue; + } + + switch (long_options[option_index].name[0]) { + case 'T': + tdd_config=atoi(optarg); + frame_type=TDD; break; - case 'B': - channel_model=SCM_B; - chMod = 3; - break; - - case 'C': - channel_model=SCM_C; - chMod = 4; - break; - - case 'D': - channel_model=SCM_D; - chMod = 5; - break; - - case 'E': - channel_model=EPA; - chMod = 6; - break; - - case 'F': - channel_model=EVA; - chMod = 7; - break; - - case 'G': - channel_model=ETU; - chMod = 8; - break; - - case 'H': - channel_model=Rayleigh8; - chMod = 9; - break; - - case 'I': - channel_model=Rayleigh1; - chMod = 10; - break; - - case 'J': - channel_model=Rayleigh1_corr; - chMod = 11; - break; - - case 'K': - channel_model=Rayleigh1_anticorr; - chMod = 12; - break; - - case 'L': - channel_model=Rice8; - chMod = 13; - break; - - case 'M': - channel_model=Rice1; - chMod = 14; - break; - - case 'N': - channel_model=AWGN; + case 'a': + channel_model = AWGN; chMod = 1; break; - default: - printf("Unsupported channel model!\n"); - exit(-1); + case 'g': + strncpy(channel_model_input,optarg,9); + struct tmp { + char opt; + int m; + int M; + } + tmp[]= { + {'A',SCM_A,2}, + {'B',SCM_B,3}, + {'C',SCM_C,4}, + {'D',SCM_D,5}, + {'E',EPA,6}, + {'G',ETU,8}, + {'H',Rayleigh8,9}, + {'I',Rayleigh1,10}, + {'J',Rayleigh1_corr,11}, + {'K',Rayleigh1_anticorr,12}, + {'L',Rice8,13}, + {'M',Rice1,14}, + {'N',AWGN,1}, + {0,0,0} + }; + struct tmp *ptr; + + for (ptr=tmp; tmp->opt!=0; ptr++) + if ( ptr->opt == optarg[0] ) { + channel_model=ptr->m; + chMod=ptr->M; + } + + AssertFatal(ptr->opt != 0, "Unsupported channel model: %s !\n", optarg ); break; - } - break; + case 'x': + transmission_m=atoi(optarg); + AssertFatal(transmission_m==1 || transmission_m==2, + "Unsupported transmission mode %d\n",transmission_m); + break; - case 's': - snr0 = atof(optarg); - break; + case 'r': + nb_rb = atoi(optarg); + nb_rb_set = 1; + break; - case 'w': - snr_int = atof(optarg); - break; + //case 'c': + // cyclic_shift = atoi(optarg); + // break; - case 'e': - input_snr_step= atof(optarg); - break; + case 'i': + input_fdUL = fopen(optarg,"r"); + printf("Reading in %s (%p)\n",optarg,input_fdUL); + AssertFatal(input_fdUL != (FILE *)NULL,"Unknown file %s\n",optarg); + break; - case 'x': - transmission_mode=atoi(optarg); + case 'A': + beta_ACK = atoi(optarg); + AssertFatal(beta_ACK>15,"beta_ack must be in (0..15)\n"); + break; - if ((transmission_mode!=1) && - (transmission_mode!=2)) { - printf("Unsupported transmission mode %d\n",transmission_mode); - exit(-1); - } + case 'C': + beta_CQI = atoi(optarg); + AssertFatal((beta_CQI>15)||(beta_CQI<2),"beta_cqi must be in (2..15)\n"); + break; - break; + case 'R': + beta_RI = atoi(optarg); + AssertFatal((beta_RI>15)||(beta_RI<2),"beta_ri must be in (0..13)\n"); + break; - case 'y': - n_rx = atoi(optarg); - break; + case 'P': + dump_perf=1; + opp_enabled=1; + break; - case 'S': - subframe = atoi(optarg); - break; - - case 'T': - tdd_config=atoi(optarg); - frame_type=TDD; - break; - - case 'p': - extended_prefix_flag=1; - break; - - case 'r': - nb_rb = atoi(optarg); - nb_rb_set = 1; - break; - - case 'f': - first_rb = atoi(optarg); - break; - - //case 'c': - // cyclic_shift = atoi(optarg); - // break; - - case 'E': - threequarter_fs=1; - break; - - case 'N': - N0 = atoi(optarg); - break; - - case 'o': - srs_flag = 1; - break; - - case 'i': - input_fdUL = fopen(optarg,"r"); - printf("Reading in %s (%p)\n",optarg,input_fdUL); - - if (input_fdUL == (FILE*)NULL) { - printf("Unknown file %s\n",optarg); - exit(-1); - } - - // input_file=1; - break; - - case 'A': - beta_ACK = atoi(optarg); - - if (beta_ACK>15) { - printf("beta_ack must be in (0..15)\n"); - exit(-1); - } - - break; - - case 'C': - beta_CQI = atoi(optarg); - - if ((beta_CQI>15)||(beta_CQI<2)) { - printf("beta_cqi must be in (2..15)\n"); - exit(-1); - } - - break; - - case 'R': - beta_RI = atoi(optarg); - - if ((beta_RI>15)||(beta_RI<2)) { - printf("beta_ri must be in (0..13)\n"); - exit(-1); - } - - break; - - case 'Q': - cqi_flag=1; - break; - - case 'B': - N_RB_DL=atoi(optarg); - break; - - case 'P': - dump_perf=1; - opp_enabled=1; - break; - - case 'O': - test_perf=atoi(optarg); - //print_perf =1; - break; - - case 'L': - parallel_flag=1; - break; - - case 'I': - max_turbo_iterations=atoi(optarg); - break; - - case 'F': - xforms=1; - break; - - case 'Z': - dump_table = 1; - break; - - case 'h': - default: - /* option "-c cyclic_shift" is not used, let's remove from documentation */ - //printf("%s -h(elp) -a(wgn on) -m mcs -n n_frames -s snr0 -t delay_spread -p (extended prefix on) -r nb_rb -f first_rb -c cyclic_shift -o (srs on) -g channel_model [A:M] Use 3GPP 25.814 SCM-A/B/C/D('A','B','C','D') or 36-101 EPA('E'), EVA ('F'),ETU('G') models (ignores delay spread and Ricean factor), Rayghleigh8 ('H'), Rayleigh1('I'), Rayleigh1_corr('J'), Rayleigh1_anticorr ('K'), Rice8('L'), Rice1('M'), -d Channel delay, -D maximum Doppler shift \n", - printf("%s -h(elp) -a(wgn on) -m mcs -n n_frames -s snr0 -t delay_spread -p (extended prefix on) -r nb_rb -f first_rb -o (srs on) -g channel_model [A:M] Use 3GPP 25.814 SCM-A/B/C/D('A','B','C','D') or 36-101 EPA('E'), EVA ('F'),ETU('G') models (ignores delay spread and Ricean factor), Rayghleigh8 ('H'), Rayleigh1('I'), Rayleigh1_corr('J'), Rayleigh1_anticorr ('K'), Rice8('L'), Rice1('M'), -d Channel delay, -D maximum Doppler shift \n", - argv[0]); - exit(1); - break; + default: + printf("Wrong option\n"); + exit(1); + break; } } + + if ( res != -1 ) { + printf("A wrong option has been found\n"); + exit(1); + } + + paramdef_t *ptr=options ; + + for( ptr=options; ptr->optname[0]!=0; ptr++) { + char varText[256]="need specific display"; + + if (ptr->voidptr != NULL) { + if ( (ptr->paramflags & PARAMFLAG_BOOL) ) + strcpy(varText, *(bool *)ptr->iptr ? "True": "False" ); + else switch (ptr->type) { + case TYPE_INT: + sprintf(varText,"%d",*ptr->iptr); + break; + + case TYPE_DOUBLE: + sprintf(varText,"%.2f",*ptr->dblptr); + break; + + default: + printf("not decoded type\n"); + exit(1); + } + } + + printf("Option: %20s set to %s\n",ptr->optname, varText); + + if (verbose) + printf("%s\n",ptr->helpstr); + } + RC.nb_L1_inst = 1; RC.nb_RU = 1; - lte_param_init(&eNB,&UE,&ru, - 1, - 1, - n_rx, 1, - 1, - extended_prefix_flag, - frame_type, - 0, - tdd_config, - N_RB_DL, - 4, - threequarter_fs, - osf, - 0); - + 1, + n_rx, + 1, + 1, + extended_prefix_flag, + frame_type, + 0, + tdd_config, + N_RB_DL, + 4, + threequarter_fs, + osf, + 0); RC.eNB = (PHY_VARS_eNB ***)malloc(sizeof(PHY_VARS_eNB **)); RC.eNB[0] = (PHY_VARS_eNB **)malloc(sizeof(PHY_VARS_eNB *)); RC.ru = (RU_t **)malloc(sizeof(RC.ru)); RC.eNB[0][0] = eNB; RC.ru[0] = ru; - for (int k=0;kRU_list[0]->nb_rx;k++) eNB->common_vars.rxdataF[k] = eNB->RU_list[0]->common.rxdataF[k]; - memset((void*)&eNB->UL_INFO,0,sizeof(eNB->UL_INFO)); + for (int k=0; kRU_list[0]->nb_rx; k++) eNB->common_vars.rxdataF[k] = eNB->RU_list[0]->common.rxdataF[k]; + memset((void *)&eNB->UL_INFO,0,sizeof(eNB->UL_INFO)); printf("Setting indication lists\n"); eNB->UL_INFO.rx_ind.rx_indication_body.rx_pdu_list = eNB->rx_pdu_list; eNB->UL_INFO.crc_ind.crc_indication_body.crc_pdu_list = eNB->crc_pdu_list; @@ -760,12 +724,10 @@ int main(int argc, char **argv) eNB->UL_INFO.harq_ind.harq_indication_body.harq_pdu_list = eNB->harq_pdu_list; eNB->UL_INFO.cqi_ind.cqi_pdu_list = eNB->cqi_pdu_list; eNB->UL_INFO.cqi_ind.cqi_raw_pdu_list = eNB->cqi_raw_pdu_list; - printf("lte_param_init done\n"); - // for a call to phy_reset_ue later we need PHY_vars_UE_g allocated and pointing to UE - PHY_vars_UE_g = (PHY_VARS_UE***)malloc(sizeof(PHY_VARS_UE**)); - PHY_vars_UE_g[0] = (PHY_VARS_UE**) malloc(sizeof(PHY_VARS_UE*)); + PHY_vars_UE_g = (PHY_VARS_UE ***)malloc(sizeof(PHY_VARS_UE **)); + PHY_vars_UE_g[0] = (PHY_VARS_UE **) malloc(sizeof(PHY_VARS_UE *)); PHY_vars_UE_g[0][0] = UE; if (nb_rb_set == 0) @@ -774,19 +736,14 @@ int main(int argc, char **argv) printf("1 . rxdataF_comp[0] %p\n",eNB->pusch_vars[0]->rxdataF_comp[0]); printf("Setting mcs = %d\n",mcs); printf("n_frames = %d\n", n_frames); - snr1 = snr0+snr_int; printf("SNR0 %f, SNR1 %f\n",snr0,snr1); - frame_parms = &eNB->frame_parms; - txdata = UE->common_vars.txdata; - nsymb = (eNB->frame_parms.Ncp == NORMAL) ? 14 : 12; - - sprintf(bler_fname,"ULbler_mcs%d_nrb%d_ChannelModel%d_nsim%d.csv",mcs,nb_rb,chMod,n_frames); bler_fd = fopen(bler_fname,"w"); + if (bler_fd==NULL) { fprintf(stderr,"Problem creating file %s\n",bler_fname); exit(-1); @@ -803,8 +760,9 @@ int main(int argc, char **argv) //sprintf(dirname, "%s//SIMU/USER/pre-ci-logs-%s", getenv("OPENAIR_TARGETS"),hostname); //mkdir(dirname, 0777); sprintf(time_meas_fname,"time_meas_prb%d_mcs%d_antrx%d_channel%s_tx%d.csv", - N_RB_DL,mcs,n_rx,channel_model_input,transmission_mode); + N_RB_DL,mcs,n_rx,channel_model_input,transmission_m); time_meas_fd = fopen(time_meas_fname,"w"); + if (time_meas_fd==NULL) { fprintf(stderr,"Cannot create file %s!\n",time_meas_fname); exit(-1); @@ -813,16 +771,17 @@ int main(int argc, char **argv) if(abstx) { // CSV file - sprintf(csv_fname,"EULdataout_tx%d_mcs%d_nbrb%d_chan%d_nsimus%d_eren.m",transmission_mode,mcs,nb_rb,chMod,n_frames); + sprintf(csv_fname,"EULdataout_tx%d_mcs%d_nbrb%d_chan%d_nsimus%d_eren.m",transmission_m,mcs,nb_rb,chMod,n_frames); csv_fdUL = fopen(csv_fname,"w"); + if (csv_fdUL == NULL) { fprintf(stderr,"Problem opening file %s\n",csv_fname); exit(-1); } + fprintf(csv_fdUL,"data_all%d=[",mcs); } - if (xforms==1) { fl_initialize (&argc, argv, NULL, 0, 0); form_enb = create_lte_phy_scope_enb(); @@ -831,7 +790,6 @@ int main(int argc, char **argv) } UE->pdcch_vars[0][0]->crnti = 14; - UE->frame_parms.soundingrs_ul_config_common.enabled_flag = srs_flag; UE->frame_parms.soundingrs_ul_config_common.srs_BandwidthConfig = 2; UE->frame_parms.soundingrs_ul_config_common.srs_SubframeConfig = 3; @@ -842,7 +800,6 @@ int main(int argc, char **argv) UE->soundingrs_ul_config_dedicated[eNB_id].transmissionComb = 0; UE->soundingrs_ul_config_dedicated[eNB_id].freqDomainPosition = 0; UE->soundingrs_ul_config_dedicated[eNB_id].cyclicShift = 0; - eNB->frame_parms.soundingrs_ul_config_common.enabled_flag = srs_flag; eNB->frame_parms.soundingrs_ul_config_common.srs_BandwidthConfig = 2; eNB->frame_parms.soundingrs_ul_config_common.srs_SubframeConfig = 3; @@ -853,29 +810,22 @@ int main(int argc, char **argv) eNB->soundingrs_ul_config_dedicated[UE_id].transmissionComb = 0; eNB->soundingrs_ul_config_dedicated[UE_id].freqDomainPosition = 0; eNB->soundingrs_ul_config_dedicated[UE_id].cyclicShift = 0; - - eNB->pusch_config_dedicated[UE_id].betaOffset_ACK_Index = beta_ACK; eNB->pusch_config_dedicated[UE_id].betaOffset_RI_Index = beta_RI; eNB->pusch_config_dedicated[UE_id].betaOffset_CQI_Index = beta_CQI; UE->pusch_config_dedicated[eNB_id].betaOffset_ACK_Index = beta_ACK; UE->pusch_config_dedicated[eNB_id].betaOffset_RI_Index = beta_RI; UE->pusch_config_dedicated[eNB_id].betaOffset_CQI_Index = beta_CQI; - UE->ul_power_control_dedicated[eNB_id].deltaMCS_Enabled = 1; - // disable periodic cqi/ri reporting UE->cqi_report_config[eNB_id].CQI_ReportPeriodic.ri_ConfigIndex = -1; UE->cqi_report_config[eNB_id].CQI_ReportPeriodic.cqi_PMI_ConfigIndex = -1; - - printf("PUSCH Beta : ACK %f, RI %f, CQI %f\n",(double)beta_ack[beta_ACK]/8,(double)beta_ri[beta_RI]/8,(double)beta_cqi[beta_CQI]/8); - UE2eNB = new_channel_desc_scm(1, n_rx, channel_model, - N_RB2sampling_rate(eNB->frame_parms.N_RB_UL), - N_RB2channel_bandwidth(eNB->frame_parms.N_RB_UL), + N_RB2sampling_rate(eNB->frame_parms.N_RB_UL), + N_RB2channel_bandwidth(eNB->frame_parms.N_RB_UL), forgetting_factor, delay, 0); @@ -883,7 +833,8 @@ int main(int argc, char **argv) UE2eNB->max_Doppler = maxDoppler; // NN: N_RB_UL has to be defined in ulsim - for (int k=0;kulsch[k] = new_eNB_ulsch(max_turbo_iterations,N_RB_DL,0); + for (int k=0; kulsch[k] = new_eNB_ulsch(max_turbo_iterations,N_RB_DL,0); + UE->ulsch[0] = new_ue_ulsch(N_RB_DL,0); printf("ULSCH %p\n",UE->ulsch[0]); @@ -893,70 +844,66 @@ int main(int argc, char **argv) init_fep_thread(eNB,NULL); init_td_thread(eNB); } + // 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); + if (!eNB->dlsch[0][i]) { printf("Can't get eNB dlsch structures\n"); exit(-1); } + eNB->dlsch[0][i]->rnti = 14; } + /* allocate memory for both subframes (only one is really used - * but there is now "copy_harq_proc_struct" which needs both - * to be valid) - * TODO: refine this somehow (necessary?) - */ + but there is now "copy_harq_proc_struct" which needs both + to be valid) + TODO: refine this somehow (necessary?) + */ for (sf = 0; sf < 2; sf++) { for (i=0; i<2; i++) { UE->dlsch[sf][0][i] = new_ue_dlsch(1,8,1827072,MAX_TURBO_ITERATIONS,N_RB_DL,0); + if (!UE->dlsch[sf][0][i]) { printf("Can't get ue dlsch structures\n"); exit(-1); } + UE->dlsch[sf][0][i]->rnti = 14; } } UE->dlsch_SI[0] = new_ue_dlsch(1,1,1827072,MAX_TURBO_ITERATIONS,N_RB_DL,0); UE->dlsch_ra[0] = new_ue_dlsch(1,1,1827072,MAX_TURBO_ITERATIONS,N_RB_DL,0); - UE->measurements.rank[0] = 0; UE->transmission_mode[0] = 2; - UE->pucch_config_dedicated[0].tdd_AckNackFeedbackMode = bundling_flag == 1 ? bundling : multiplexing; + UE->pucch_config_dedicated[0].tdd_AckNackFeedbackMode = disable_bundling == 0 ? bundling : multiplexing; eNB->transmission_mode[0] = 2; - eNB->pucch_config_dedicated[0].tdd_AckNackFeedbackMode = bundling_flag == 1 ? bundling : multiplexing; + eNB->pucch_config_dedicated[0].tdd_AckNackFeedbackMode = disable_bundling == 0 ? bundling : multiplexing; UE->frame_parms.pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = 1; eNB->frame_parms.pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = 1; UE->frame_parms.pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = 0; eNB->frame_parms.pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = 0; UE->frame_parms.pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = 0; eNB->frame_parms.pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = 0; - - UE->mac_enabled=0; - eNB_rxtx_proc_t *proc_rxtx = &eNB->proc.proc_rxtx[subframe&1]; UE_rxtx_proc_t *proc_rxtx_ue = &UE->proc.proc_rxtx[subframe&1]; proc_rxtx->frame_rx=1; proc_rxtx->subframe_rx=subframe; - proc_rxtx->frame_tx=pdcch_alloc2ul_frame(&eNB->frame_parms,1,subframe); proc_rxtx->subframe_tx=pdcch_alloc2ul_subframe(&eNB->frame_parms,subframe); - proc_rxtx_ue->frame_tx = proc_rxtx->frame_rx; proc_rxtx_ue->frame_rx = (subframe<4)?(proc_rxtx->frame_tx-1):(proc_rxtx->frame_tx); proc_rxtx_ue->subframe_tx = proc_rxtx->subframe_rx; proc_rxtx_ue->subframe_rx = (proc_rxtx->subframe_tx+6)%10; - printf("Init UL hopping UE\n"); init_ul_hopping(&UE->frame_parms); printf("Init UL hopping eNB\n"); init_ul_hopping(&eNB->frame_parms); - - 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; coded_bits_per_codeword = nb_rb * (12 * get_Qm_ul(mcs)) * nsymb; @@ -964,26 +911,20 @@ int main(int argc, char **argv) if (cqi_flag == 1) coded_bits_per_codeword-=UE->ulsch[0]->O; rate = (double)dlsch_tbs25[get_I_TBS(mcs)][nb_rb-1]/(coded_bits_per_codeword); - printf("Rate = %f (mod %d), coded bits %d\n",rate,get_Qm_ul(mcs),coded_bits_per_codeword); - - for (ch_realization=0; ch_realizationofdm_symbol_size)]; } */ - if(abstx) { printf("**********************Channel Realization Index = %d **************************\n", ch_realization); saving_bler=1; } - // if ((subframe>5) || (subframe < 4)) // UE->frame++; @@ -1001,17 +942,17 @@ int main(int argc, char **argv) cqi_crc_falsepositives=0; cqi_crc_falsenegatives=0; round=0; - //randominit(0); - - harq_pid = subframe2harq_pid(&UE->frame_parms,proc_rxtx_ue->frame_tx,subframe); input_buffer_length = UE->ulsch[0]->harq_processes[harq_pid]->TBS/8; + + if ( input_buffer != NULL ) + free(input_buffer); + input_buffer = (unsigned char *)memalign(32,input_buffer_length+64); + // printf("UL frame %d/subframe %d, harq_pid %d\n",UE->frame,subframe,harq_pid); if (input_fdUL == NULL) { - - if (n_frames == 1) { trch_out_fdUL= fopen("ulsch_trchUL.txt","w"); @@ -1033,14 +974,15 @@ int main(int argc, char **argv) while (!feof(input_fdUL)) { ret=fscanf(input_fdUL,"%s %s",input_val_str,input_val_str2);//&input_val1,&input_val2); + if (ret != 2) printf("ERROR: error reading file\n"); if ((i%4)==0) { - ((short*)txdata[0])[i/2] = (short)((1<<15)*strtod(input_val_str,NULL)); - ((short*)txdata[0])[(i/2)+1] = (short)((1<<15)*strtod(input_val_str2,NULL)); + ((short *)txdata[0])[i/2] = (short)((1<<15)*strtod(input_val_str,NULL)); + ((short *)txdata[0])[(i/2)+1] = (short)((1<<15)*strtod(input_val_str2,NULL)); if ((i/4)<100) - printf("sample %d => %e + j%e (%d +j%d)\n",i/4,strtod(input_val_str,NULL),strtod(input_val_str2,NULL),((short*)txdata[0])[i/4],((short*)txdata[0])[(i/4)+1]);//1,input_val2,); + printf("sample %d => %e + j%e (%d +j%d)\n",i/4,strtod(input_val_str,NULL),strtod(input_val_str2,NULL),((short *)txdata[0])[i/4],((short *)txdata[0])[(i/4)+1]); //1,input_val2,); } i++; @@ -1055,10 +997,8 @@ int main(int argc, char **argv) tx_lev = signal_energy(&txdata[0][0], OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES); tx_lev_dB = (unsigned int) dB_fixed(tx_lev); - } - avg_iter = 0; iter_trials=0; reset_meas(&UE->phy_proc_tx); reset_meas(&UE->ofdm_mod_stats); @@ -1069,7 +1009,6 @@ int main(int argc, char **argv) reset_meas(&UE->ulsch_turbo_encoding_stats); reset_meas(&UE->ulsch_segmentation_stats); reset_meas(&UE->ulsch_multiplexing_stats); - reset_meas(&eNB->phy_proc_rx); reset_meas(&eNB->ulsch_channel_estimation_stats); reset_meas(&eNB->ulsch_freq_offset_estimation_stats); @@ -1086,91 +1025,82 @@ int main(int argc, char **argv) reset_meas(&eNB->ulsch_tc_ext_stats); reset_meas(&eNB->ulsch_tc_intl1_stats); reset_meas(&eNB->ulsch_tc_intl2_stats); - // initialization - struct list time_vector_tx; - initialize(&time_vector_tx); - struct list time_vector_tx_ifft; - initialize(&time_vector_tx_ifft); - struct list time_vector_tx_mod; - initialize(&time_vector_tx_mod); - struct list time_vector_tx_enc; - initialize(&time_vector_tx_enc); - - struct list time_vector_rx; - initialize(&time_vector_rx); - struct list time_vector_rx_fft; - initialize(&time_vector_rx_fft); - struct list time_vector_rx_demod; - initialize(&time_vector_rx_demod); - struct list time_vector_rx_dec; - initialize(&time_vector_rx_dec); - + varArray_t *table_tx=initVarArray(1000,sizeof(double)); + varArray_t *table_tx_ifft=initVarArray(1000,sizeof(double)); + varArray_t *table_tx_mod=initVarArray(1000,sizeof(double)); + varArray_t *table_tx_enc=initVarArray(1000,sizeof(double)); + varArray_t *table_rx=initVarArray(1000,sizeof(double)); + varArray_t *table_rx_fft=initVarArray(1000,sizeof(double)); + varArray_t *table_rx_demod=initVarArray(1000,sizeof(double)); + varArray_t *table_rx_dec=initVarArray(1000,sizeof(double)); ndi=0; - phy_reset_ue(0,0,0); UE->UE_mode[eNB_id]=PUSCH; + SET_LOG_DEBUG(UE_TIMING); for (trials = 0; trialsframe++; // eNB->frame++; - ndi = (1-ndi); + ndi = (1-ndi); fflush(stdout); round=0; while (round < 4) { - proc_rxtx->frame_rx=1; - proc_rxtx->subframe_rx=subframe; - - proc_rxtx->frame_tx=pdcch_alloc2ul_frame(&eNB->frame_parms,1,subframe); - proc_rxtx->subframe_tx=pdcch_alloc2ul_subframe(&eNB->frame_parms,subframe); - - proc_rxtx_ue->frame_tx = proc_rxtx->frame_rx; - proc_rxtx_ue->frame_rx = (subframe<4)?(proc_rxtx->frame_tx-1):(proc_rxtx->frame_tx); - proc_rxtx_ue->subframe_tx = proc_rxtx->subframe_rx; - proc_rxtx_ue->subframe_rx = (proc_rxtx->subframe_tx+6)%10; - + proc_rxtx->frame_rx=1; + proc_rxtx->subframe_rx=subframe; + proc_rxtx->frame_tx=pdcch_alloc2ul_frame(&eNB->frame_parms,1,subframe); + proc_rxtx->subframe_tx=pdcch_alloc2ul_subframe(&eNB->frame_parms,subframe); + proc_rxtx_ue->frame_tx = proc_rxtx->frame_rx; + proc_rxtx_ue->frame_rx = (subframe<4)?(proc_rxtx->frame_tx-1):(proc_rxtx->frame_tx); + proc_rxtx_ue->subframe_tx = proc_rxtx->subframe_rx; + proc_rxtx_ue->subframe_rx = (proc_rxtx->subframe_tx+6)%10; eNB->ulsch[0]->harq_processes[harq_pid]->round=round; UE->ulsch[0]->harq_processes[harq_pid]->round=round; - if (n_frames==1) printf("filling ulsch: Trial %d : Round %d (subframe %d, frame %d)\n",trials,round,proc_rxtx_ue->subframe_tx,proc_rxtx_ue->frame_tx); + + if (n_frames==1) printf("filling ulsch: Trial %d : Round %d (subframe %d, frame %d)\n",trials,round,proc_rxtx_ue->subframe_tx,proc_rxtx_ue->frame_tx); + round_trials[round]++; + UL_req.sfn_sf = (1<<4)+subframe; - UL_req.sfn_sf = (1<<4)+subframe; - if (n_frames==1) printf("filling ulsch: eNB prog frame %d, subframe %d (%d,%d)\n",proc_rxtx->frame_rx,subframe,sched_resp.frame,sched_resp.subframe); + if (n_frames==1) printf("filling ulsch: eNB prog frame %d, subframe %d (%d,%d)\n",proc_rxtx->frame_rx,subframe,sched_resp.frame,sched_resp.subframe); - int modulation_type; - if (mcs < 11) modulation_type = 2; - else if (mcs < 21) modulation_type = 4; - else if (mcs < 29) modulation_type = 6; + int modulation_type; + + if (mcs < 11) modulation_type = 2; + else if (mcs < 21) modulation_type = 4; + else if (mcs < 29) modulation_type = 6; else { - LOG_E(SIM,"mcs %i is not valid\n",mcs); - exit(-1); + LOG_E(SIM,"mcs %i is not valid\n",mcs); + exit(-1); } - fill_ulsch_dci(eNB,proc_rxtx->frame_rx,subframe,&sched_resp,14,(void*)&UL_alloc_pdu,first_rb,nb_rb,(round==0)?mcs:(28+rvidx[round]),modulation_type,ndi,get_TBS_UL(mcs,nb_rb),cqi_flag,beta_CQI,beta_RI,cqi_size); + fill_ulsch_dci(eNB, proc_rxtx->frame_rx, subframe, &sched_resp, 14, + (void *)&UL_alloc_pdu, first_rb,nb_rb, (round==0)?mcs:(28+rvidx[round]), + modulation_type, ndi, get_TBS_UL(mcs,nb_rb), cqi_flag, beta_CQI, + beta_RI, cqi_size); + UE->ulsch_Msg3_active[eNB_id] = 0; + UE->ul_power_control_dedicated[eNB_id].accumulationEnabled=1; - UE->ulsch_Msg3_active[eNB_id] = 0; - UE->ul_power_control_dedicated[eNB_id].accumulationEnabled=1; - if (n_frames==1) printf("filling ulsch: ue prog SFN/SF %d/%d\n",proc_rxtx_ue->frame_rx,proc_rxtx_ue->subframe_rx); - generate_ue_ulsch_params_from_dci((void *)&UL_alloc_pdu, - 14, - (subframe+6)%10, - format0, - UE, - proc_rxtx_ue, - SI_RNTI, - 0, - P_RNTI, - CBA_RNTI, - 0, - srs_flag); - - sched_resp.subframe=(subframe+6)%10; - sched_resp.frame=(1024+eNB->proc.frame_rx+((subframe<4)?-1:0))&1023; - - schedule_response(&sched_resp); + if (n_frames==1) + printf("filling ulsch: ue prog SFN/SF %d/%d\n",proc_rxtx_ue->frame_rx,proc_rxtx_ue->subframe_rx); + generate_ue_ulsch_params_from_dci((void *)&UL_alloc_pdu, + 14, + (subframe+6)%10, + format0, + UE, + proc_rxtx_ue, + SI_RNTI, + 0, + P_RNTI, + CBA_RNTI, + 0, + srs_flag); + sched_resp.subframe=(subframe+6)%10; + sched_resp.frame=(1024+eNB->proc.frame_rx+((subframe<4)?-1:0))&1023; + schedule_response(&sched_resp); ///////////////////// if (abstx) { @@ -1189,31 +1119,24 @@ int main(int argc, char **argv) /////////////////////////////////////// if (input_fdUL == NULL) { - - eNB->proc.frame_rx = 1; - eNB->proc.subframe_rx = subframe; - ru->proc.frame_rx = 1; - ru->proc.subframe_rx = subframe; - - proc_rxtx_ue->frame_tx = proc_rxtx->frame_rx; - proc_rxtx_ue->frame_rx = proc_rxtx->frame_tx; - proc_rxtx_ue->subframe_tx = proc_rxtx->subframe_rx; - proc_rxtx_ue->subframe_rx = proc_rxtx->subframe_tx; - - phy_procedures_UE_TX(UE,proc_rxtx_ue,0,0,normal_txrx); - - - tx_lev = signal_energy(&UE->common_vars.txdata[0][eNB->frame_parms.samples_per_tti*subframe], - eNB->frame_parms.samples_per_tti); - + eNB->proc.frame_rx = 1; + eNB->proc.subframe_rx = subframe; + ru->proc.frame_rx = 1; + ru->proc.subframe_rx = subframe; + proc_rxtx_ue->frame_tx = proc_rxtx->frame_rx; + proc_rxtx_ue->frame_rx = proc_rxtx->frame_tx; + proc_rxtx_ue->subframe_tx = proc_rxtx->subframe_rx; + proc_rxtx_ue->subframe_rx = proc_rxtx->subframe_tx; + phy_procedures_UE_TX(UE,proc_rxtx_ue,0,0,normal_txrx); + tx_lev = signal_energy(&UE->common_vars.txdata[0][eNB->frame_parms.samples_per_tti*subframe], + eNB->frame_parms.samples_per_tti); if (n_frames==1) { LOG_M("txsigF0UL.m","txsF0", &UE->common_vars.txdataF[0][eNB->frame_parms.ofdm_symbol_size*nsymb*subframe],eNB->frame_parms.ofdm_symbol_size*nsymb,1, - 1); + 1); //LOG_M("txsigF1.m","txsF1", UE->common_vars.txdataF[0],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1); } - - } // input_fd == NULL + } // input_fd == NULL tx_lev_dB = (unsigned int) dB_fixed_times10(tx_lev); @@ -1226,21 +1149,17 @@ int main(int argc, char **argv) //Set target wideband RX noise level to N0 sigma2_dB = N0;//-10*log10(UE->frame_parms.ofdm_symbol_size/(UE->frame_parms.N_RB_DL*12));//10*log10((double)tx_lev) +10*log10(UE->frame_parms.ofdm_symbol_size/(UE->frame_parms.N_RB_DL*12)) - SNR; sigma2 = pow(10,sigma2_dB/10); - // compute tx_gain to achieve target SNR (per resource element!) tx_gain = sqrt(pow(10.0,.1*(N0+SNR))/(double)tx_lev);//*(nb_rb*12/(double)UE->frame_parms.ofdm_symbol_size)/(double)tx_lev); - - if (n_frames==1) + if (n_frames==1) printf("tx_lev = %d (%d.%d dB,%f), gain %f\n",tx_lev,tx_lev_dB/10,tx_lev_dB,10*log10((double)tx_lev),10*log10(tx_gain)); - // fill measurement symbol (19) with noise for (i=0; iframe_parms.nb_antennas_rx; aa++) { - - ((short*) &ru->common.rxdata[aa][(frame_parms->samples_per_tti<<1) -frame_parms->ofdm_symbol_size])[2*i] = (short) ((sqrt(sigma2/2)*gaussdouble(0.0,1.0))); - ((short*) &ru->common.rxdata[aa][(frame_parms->samples_per_tti<<1) -frame_parms->ofdm_symbol_size])[2*i+1] = (short) ((sqrt(sigma2/2)*gaussdouble(0.0,1.0))); + ((short *) &ru->common.rxdata[aa][(frame_parms->samples_per_tti<<1) -frame_parms->ofdm_symbol_size])[2*i] = (short) ((sqrt(sigma2/2)*gaussdouble(0.0,1.0))); + ((short *) &ru->common.rxdata[aa][(frame_parms->samples_per_tti<<1) -frame_parms->ofdm_symbol_size])[2*i+1] = (short) ((sqrt(sigma2/2)*gaussdouble(0.0,1.0))); } } @@ -1268,7 +1187,6 @@ int main(int argc, char **argv) if (trials==0 && round==0) { // calculate freq domain representation to compute SINR freq_channel(UE2eNB, N_RB_DL,12*N_RB_DL + 1); - // snr=pow(10.0,.1*SNR); fprintf(csv_fdUL,"%f,%d,%d,%f,%f,%f,",SNR,tx_lev,tx_lev_dB,sigma2_dB,tx_gain,SNR2); @@ -1279,7 +1197,7 @@ int main(int argc, char **argv) // abs_channel = (eNB2UE->chF[aarx+(aatx*eNB2UE->nb_rx)][u].x*eNB2UE->chF[aarx+(aatx*eNB2UE->nb_rx)][u].x + eNB2UE->chF[aarx+(aatx*eNB2UE->nb_rx)][u].y*eNB2UE->chF[aarx+(aatx*eNB2UE->nb_rx)][u].y); channelx = UE2eNB->chF[aarx+(aatx*UE2eNB->nb_rx)][u].x; channely = UE2eNB->chF[aarx+(aatx*UE2eNB->nb_rx)][u].y; - // if(transmission_mode==5){ + // if(transmission_m==5){ fprintf(csv_fdUL,"%e+i*(%e),",channelx,channely); // } // else{ @@ -1297,38 +1215,39 @@ int main(int argc, char **argv) for (i=0; iframe_parms.samples_per_tti; i++) { for (aa=0; aaframe_parms.nb_antennas_rx; aa++) { - ((short*) &ru->common.rxdata[aa][eNB->frame_parms.samples_per_tti*subframe])[2*i] = (short) ((tx_gain*r_re[aa][i]) + sqrt(sigma2/2)*gaussdouble(0.0,1.0)); - ((short*) &ru->common.rxdata[aa][eNB->frame_parms.samples_per_tti*subframe])[2*i+1] = (short) ((tx_gain*r_im[aa][i]) + (iqim*tx_gain*r_re[aa][i]) + sqrt( - sigma2/2)*gaussdouble(0.0,1.0)); + ((short *) &ru->common.rxdata[aa][eNB->frame_parms.samples_per_tti*subframe])[2*i] = + (short) ((tx_gain*r_re[aa][i]) + sqrt(sigma2/2)*gaussdouble(0.0,1.0)); + ((short *) &ru->common.rxdata[aa][eNB->frame_parms.samples_per_tti*subframe])[2*i+1] = + (short) ((tx_gain*r_im[aa][i]) + (iqim*tx_gain*r_re[aa][i]) + + sqrt(sigma2/2)*gaussdouble(0.0,1.0)); } } if (n_frames<=10) { - printf("rx_level Null symbol %f\n",10*log10((double)signal_energy((int*) - &ru->common.rxdata[0][(eNB->frame_parms.samples_per_tti<<1) -eNB->frame_parms.ofdm_symbol_size],OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES/2))); - printf("rx_level data symbol %f\n",10*log10(signal_energy((int*)&ru->common.rxdata[0][160+(eNB->frame_parms.samples_per_tti*subframe)], - OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES/2))); + printf("rx_level Null symbol %f\n",10*log10((double)signal_energy((int *) + &ru->common.rxdata[0][(eNB->frame_parms.samples_per_tti<<1) - + eNB->frame_parms.ofdm_symbol_size],OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES/2))); + printf("rx_level data symbol %f\n", + 10*log10(signal_energy((int *)&ru->common.rxdata[0][160+(eNB->frame_parms.samples_per_tti*subframe)], + OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES/2))); } - SNRmeas = 10*log10(((double)signal_energy((int*)&ru->common.rxdata[0][160+(eNB->frame_parms.samples_per_tti*subframe)], - OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES/2))/((double)signal_energy((int*) + SNRmeas = 10*log10(((double)signal_energy((int *)&ru->common.rxdata[0][160+(eNB->frame_parms.samples_per_tti*subframe)], + OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES/2))/((double)signal_energy((int *) &ru->common.rxdata[0][(eNB->frame_parms.samples_per_tti<<1) -eNB->frame_parms.ofdm_symbol_size], OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES/2)) - 1)+10*log10(eNB->frame_parms.N_RB_UL/nb_rb); if (n_frames<=10) { printf("SNRmeas %f\n",SNRmeas); + LOG_M("rxsig0UL.m","rxs0", &ru->common.rxdata[0][eNB->frame_parms.samples_per_tti*subframe],eNB->frame_parms.samples_per_tti,1,1); - LOG_M("rxsig0UL.m","rxs0", &ru->common.rxdata[0][eNB->frame_parms.samples_per_tti*subframe],eNB->frame_parms.samples_per_tti,1,1); - if (eNB->frame_parms.nb_antennas_rx>1) LOG_M("rxsig1UL.m","rxs1", &ru->common.rxdata[1][eNB->frame_parms.samples_per_tti*subframe],eNB->frame_parms.samples_per_tti,1,1); + if (eNB->frame_parms.nb_antennas_rx>1) LOG_M("rxsig1UL.m","rxs1", &ru->common.rxdata[1][eNB->frame_parms.samples_per_tti*subframe],eNB->frame_parms.samples_per_tti,1,1); } - - ru->feprx = (parallel_flag == 1) ? ru_fep_full_2thread : fep_full; - eNB->td = (parallel_flag == 1) ? ulsch_decoding_data_2thread : ulsch_decoding_data; - - - ru->feprx(ru); - phy_procedures_eNB_uespec_RX(eNB,proc_rxtx); + ru->feprx = (parallel_flag == 1) ? ru_fep_full_2thread : fep_full; + eNB->td = (parallel_flag == 1) ? ulsch_decoding_data_2thread : ulsch_decoding_data; + ru->feprx(ru); + phy_procedures_eNB_uespec_RX(eNB,proc_rxtx); if (cqi_flag > 0) { cqi_error = 0; @@ -1340,7 +1259,6 @@ int main(int argc, char **argv) cqi_error = 1; } } else { - } if (cqi_error == 1) { @@ -1358,15 +1276,10 @@ int main(int argc, char **argv) ack_errors++; // printf("ulsch_coding: O[%d] %d\n",i,o_flip[i]); + // if (ret <= eNB->ulsch[0]->max_turbo_iterations) { + iter_trials++; - - // if (ret <= eNB->ulsch[0]->max_turbo_iterations) { - - if (eNB->ulsch[0]->harq_processes[harq_pid]->status == SCH_IDLE) { - - // avg_iter += ret; - iter_trials++; - + if (eNB->ulsch[0]->harq_processes[harq_pid]->status == SCH_IDLE) { if (n_frames==1) { printf("No ULSCH errors found, o_ACK[0]= %d, cqi_crc_status=%d\n",eNB->ulsch[0]->harq_processes[harq_pid]->o_ACK[0],eNB->ulsch[0]->harq_processes[harq_pid]->cqi_crc_status); @@ -1380,9 +1293,6 @@ int main(int argc, char **argv) round=5; } else { - // avg_iter += ret-1; - iter_trials++; - errs[round]++; if (n_frames==1) { @@ -1395,7 +1305,6 @@ int main(int argc, char **argv) Kr = eNB->ulsch[0]->harq_processes[harq_pid]->Kplus; Kr_bytes = Kr>>3; - printf("Decoded_output (Segment %d):\n",s); for (i=0; iproc.frame_rx,subframe,0,round); + if (round == 4) exit(-1); } - if (n_frames==1) printf("round %d errors %d/%d\n",round,errs[round],trials); + if (n_frames==1) printf("round %d errors %d/%d\n",round,errs[round],trials); + round++; if (n_frames==1) { printf("ULSCH in error in round %d\n",round); } } // ulsch error - } // round // printf("\n"); if ((errs[0]>=100) && (trials>(n_frames/2))) break; - if (xforms==1) - phy_scope_eNB(form_enb,eNB,0); + if (xforms==1) + phy_scope_eNB(form_enb,eNB,0); - /*calculate the total processing time for each packet, get the max, min, and number of packets that exceed t>3000us*/ + double t_tx = inMicroS(UE->phy_proc_tx.p_time); + double t_tx_ifft = inMicroS(UE->ofdm_mod_stats.p_time); + double t_tx_mod = inMicroS(UE->ulsch_modulation_stats.p_time); + double t_tx_enc = inMicroS(UE->ulsch_encoding_stats.p_time); + double t_rx = inMicroS(eNB->phy_proc_rx.p_time); + double t_rx_fft = inMicroS(ru->ofdm_demod_stats.p_time); + double t_rx_demod = inMicroS(eNB->ulsch_demodulation_stats.p_time); + double t_rx_dec = inMicroS(eNB->ulsch_decoding_stats.p_time); - double t_tx = (double)UE->phy_proc_tx.p_time/cpu_freq_GHz/1000.0; - double t_tx_ifft = (double)UE->ofdm_mod_stats.p_time/cpu_freq_GHz/1000.0; - double t_tx_mod = (double)UE->ulsch_modulation_stats.p_time/cpu_freq_GHz/1000.0; - double t_tx_enc = (double)UE->ulsch_encoding_stats.p_time/cpu_freq_GHz/1000.0; - - - double t_rx = (double)eNB->phy_proc_rx.p_time/cpu_freq_GHz/1000.0; - double t_rx_fft = (double)ru->ofdm_demod_stats.p_time/cpu_freq_GHz/1000.0; - double t_rx_demod = (double)eNB->ulsch_demodulation_stats.p_time/cpu_freq_GHz/1000.0; - double t_rx_dec = (double)eNB->ulsch_decoding_stats.p_time/cpu_freq_GHz/1000.0; - - if (t_tx > t_tx_max) - t_tx_max = t_tx; - - if (t_tx < t_tx_min) - t_tx_min = t_tx; - - if (t_rx > t_rx_max) - t_rx_max = t_rx; - - if (t_rx < t_rx_min) - t_rx_min = t_rx; - - if (t_tx > 2000) + if (t_tx > 2000 )// 2ms is too much time for a subframe n_tx_dropped++; - if (t_rx > 2000) + if (t_rx > 2000 ) n_rx_dropped++; - push_front(&time_vector_tx, t_tx); - push_front(&time_vector_tx_ifft, t_tx_ifft); - push_front(&time_vector_tx_mod, t_tx_mod); - push_front(&time_vector_tx_enc, t_tx_enc); - - push_front(&time_vector_rx, t_rx); - push_front(&time_vector_rx_fft, t_rx_fft); - push_front(&time_vector_rx_demod, t_rx_demod); - push_front(&time_vector_rx_dec, t_rx_dec); - - + appendVarArray(table_tx, &t_tx); + appendVarArray(table_tx_ifft, &t_tx_ifft); + appendVarArray(table_tx_mod, &t_tx_mod ); + appendVarArray(table_tx_enc, &t_tx_enc ); + appendVarArray(table_rx, &t_rx ); + appendVarArray(table_rx_fft, &t_rx_fft ); + appendVarArray(table_rx_demod, &t_rx_demod ); + appendVarArray(table_rx_dec, &t_rx_dec ); } //trials - double table_tx[time_vector_tx.size]; - totable(table_tx, &time_vector_tx); - double table_tx_ifft[time_vector_tx_ifft.size]; - totable(table_tx_ifft, &time_vector_tx_ifft); - double table_tx_mod[time_vector_tx_mod.size]; - totable(table_tx_mod, &time_vector_tx_mod); - double table_tx_enc[time_vector_tx_enc.size]; - totable(table_tx_enc, &time_vector_tx_enc); - - double table_rx[time_vector_rx.size]; - totable(table_rx, &time_vector_rx); - double table_rx_fft[time_vector_rx_fft.size]; - totable(table_rx_fft, &time_vector_rx_fft); - double table_rx_demod[time_vector_rx_demod.size]; - totable(table_rx_demod, &time_vector_rx_demod); - double table_rx_dec[time_vector_rx_dec.size]; - totable(table_rx_dec, &time_vector_rx_dec); - // sort table - qsort (table_tx, time_vector_tx.size, sizeof(double), &compare); - qsort (table_rx, time_vector_rx.size, sizeof(double), &compare); + qsort (dataArray(table_tx), table_tx->size, table_tx->atomSize, &cmpdouble); + qsort (dataArray(table_tx_ifft), table_tx_ifft->size, table_tx_ifft->atomSize, &cmpdouble); + qsort (dataArray(table_tx_mod), table_tx_mod->size, table_tx_mod->atomSize, &cmpdouble); + qsort (dataArray(table_tx_enc), table_tx_enc->size, table_tx_enc->atomSize, &cmpdouble); + qsort (dataArray(table_rx), table_rx->size, table_rx->atomSize, &cmpdouble); + qsort (dataArray(table_rx_fft), table_rx_fft->size, table_rx_fft->atomSize, &cmpdouble); + qsort (dataArray(table_rx_demod), table_rx_demod->size, table_rx_demod->atomSize, &cmpdouble); + qsort (dataArray(table_rx_dec), table_rx_dec->size, table_rx_dec->atomSize, &cmpdouble); if (dump_table == 1 ) { set_component_filelog(SIM); // file located in /tmp/usim.txt - LOG_UDUMPMSG(SIM,table_tx,time_vector_tx.size,LOG_DUMP_DOUBLE,"The transmitter raw data: \n"); - LOG_UDUMPMSG(SIM,table_rx,time_vector_rx.size,LOG_DUMP_DOUBLE,"The receiver raw data: \n"); + LOG_UDUMPMSG(SIM,dataArray(table_tx),table_tx->size,LOG_DUMP_DOUBLE,"The transmitter raw data: \n"); + LOG_UDUMPMSG(SIM,dataArray(table_rx),table_rx->size,LOG_DUMP_DOUBLE,"The receiver raw data: \n"); } - double tx_median = table_tx[time_vector_tx.size/2]; - double tx_q1 = table_tx[time_vector_tx.size/4]; - double tx_q3 = table_tx[3*time_vector_tx.size/4]; - - double tx_ifft_median = table_tx_ifft[time_vector_tx_ifft.size/2]; - double tx_ifft_q1 = table_tx_ifft[time_vector_tx_ifft.size/4]; - double tx_ifft_q3 = table_tx_ifft[3*time_vector_tx_ifft.size/4]; - - double tx_mod_median = table_tx_mod[time_vector_tx_mod.size/2]; - double tx_mod_q1 = table_tx_mod[time_vector_tx_mod.size/4]; - double tx_mod_q3 = table_tx_mod[3*time_vector_tx_mod.size/4]; - - double tx_enc_median = table_tx_enc[time_vector_tx_enc.size/2]; - double tx_enc_q1 = table_tx_enc[time_vector_tx_enc.size/4]; - double tx_enc_q3 = table_tx_enc[3*time_vector_tx_enc.size/4]; - - double rx_median = table_rx[time_vector_rx.size/2]; - double rx_q1 = table_rx[time_vector_rx.size/4]; - double rx_q3 = table_rx[3*time_vector_rx.size/4]; - - double rx_fft_median = table_rx_fft[time_vector_rx_fft.size/2]; - double rx_fft_q1 = table_rx_fft[time_vector_rx_fft.size/4]; - double rx_fft_q3 = table_rx_fft[3*time_vector_rx_fft.size/4]; - - double rx_demod_median = table_rx_demod[time_vector_rx_demod.size/2]; - double rx_demod_q1 = table_rx_demod[time_vector_rx_demod.size/4]; - double rx_demod_q3 = table_rx_demod[3*time_vector_rx_demod.size/4]; - - double rx_dec_median = table_rx_dec[time_vector_rx_dec.size/2]; - double rx_dec_q1 = table_rx_dec[time_vector_rx_dec.size/4]; - double rx_dec_q3 = table_rx_dec[3*time_vector_rx_dec.size/4]; - - double std_phy_proc_tx=0; - double std_phy_proc_tx_ifft=0; - double std_phy_proc_tx_mod=0; - double std_phy_proc_tx_enc=0; - - double std_phy_proc_rx=0; - double std_phy_proc_rx_fft=0; - double std_phy_proc_rx_demod=0; - double std_phy_proc_rx_dec=0; - + double std_phy_proc_tx= squareRoot(&UE->phy_proc_tx); + double std_phy_proc_tx_ifft= squareRoot(&UE->ofdm_mod_stats); + double std_phy_proc_tx_mod= squareRoot(&UE->ulsch_modulation_stats); + double std_phy_proc_tx_enc= squareRoot(&UE->ulsch_encoding_stats); + double std_phy_proc_rx = squareRoot(&eNB->phy_proc_rx); + double std_phy_proc_rx_fft = squareRoot(&ru->ofdm_demod_stats); + double std_phy_proc_rx_demod = squareRoot(&eNB->ulsch_demodulation_stats); + double std_phy_proc_rx_dec = squareRoot(&eNB->ulsch_decoding_stats); printf("\n**********rb: %d ***mcs : %d *********SNR = %f dB (%f): TX %d dB (gain %f dB), N0W %f dB, I0 %d dB, delta_IF %d [ (%d,%d) dB / (%d,%d) dB ]**************************\n", nb_rb,mcs,SNR,SNR2, tx_lev_dB, 20*log10(tx_gain), (double)N0, eNB->measurements.n0_power_tot_dB, - get_hundred_times_delta_IF(UE,eNB_id,harq_pid) , + get_hundred_times_delta_IF(UE,eNB_id,harq_pid), dB_fixed(eNB->pusch_vars[0]->ulsch_power[0]), dB_fixed(eNB->pusch_vars[0]->ulsch_power[1]), eNB->measurements.n0_power_dB[0], eNB->measurements.n0_power_dB[1]); - effective_rate = ((double)(round_trials[0])/((double)round_trials[0] + round_trials[1] + round_trials[2] + round_trials[3])); - printf("Errors (%d/%d %d/%d %d/%d %d/%d), Pe = (%e,%e,%e,%e) => effective rate %f (%3.1f%%,%f,%f), normalized delay %f (%f)\n", errs[0], round_trials[0], @@ -1583,7 +1426,6 @@ int main(int argc, char **argv) if (eNB->ulsch[0]->harq_processes[harq_pid]->o_ACK[0] > 0) printf("ACK/NAK errors %d/%d\n",ack_errors,round_trials[0]+round_trials[1]+round_trials[2]+round_trials[3]); - fprintf(bler_fd,"%f;%d;%d;%d;%f;%d;%d;%d;%d;%d;%d;%d;%d\n", SNR, mcs, @@ -1598,112 +1440,53 @@ int main(int argc, char **argv) round_trials[2], errs[3], round_trials[3]); - + double timeBase=1/(1000*cpu_freq_GHz); if (dump_perf==1) { printf("UE TX function statistics (per 1ms subframe)\n\n"); - std_phy_proc_tx = sqrt((double)UE->phy_proc_tx.diff_square/pow(cpu_freq_GHz,2)/pow(1000, - 2)/UE->phy_proc_tx.trials - pow((double)UE->phy_proc_tx.diff/UE->phy_proc_tx.trials/cpu_freq_GHz/1000,2)); - printf("Total PHY proc tx :%f us (%d trials)\n",(double)UE->phy_proc_tx.diff/UE->phy_proc_tx.trials/cpu_freq_GHz/1000.0,UE->phy_proc_tx.trials); - printf("|__ Statistics std: %f us max: %fus min: %fus median %fus q1 %fus q3 %fus n_dropped: %d packet \n",std_phy_proc_tx, t_tx_max, t_tx_min, tx_median, tx_q1, tx_q3, - n_tx_dropped); - std_phy_proc_tx_ifft = sqrt((double)UE->ofdm_mod_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000, - 2)/UE->ofdm_mod_stats.trials - pow((double)UE->ofdm_mod_stats.diff/UE->ofdm_mod_stats.trials/cpu_freq_GHz/1000,2)); - printf("OFDM_mod time :%f us (%d trials)\n",(double)UE->ofdm_mod_stats.diff/UE->ofdm_mod_stats.trials/cpu_freq_GHz/1000.0,UE->ofdm_mod_stats.trials); - printf("|__ Statistics std: %f us median %fus q1 %fus q3 %fus \n",std_phy_proc_tx_ifft, tx_ifft_median, tx_ifft_q1, tx_ifft_q3); - std_phy_proc_tx_mod = sqrt((double)UE->ulsch_modulation_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000, - 2)/UE->ulsch_modulation_stats.trials - pow((double)UE->ulsch_modulation_stats.diff/UE->ulsch_modulation_stats.trials/cpu_freq_GHz/1000,2)); - printf("ULSCH modulation time :%f us (%d trials)\n",(double)UE->ulsch_modulation_stats.diff/UE->ulsch_modulation_stats.trials/cpu_freq_GHz/1000.0, - UE->ulsch_modulation_stats.trials); - printf("|__ Statistics std: %f us median %fus q1 %fus q3 %fus \n",std_phy_proc_tx_mod, tx_mod_median, tx_mod_q1, tx_mod_q3); - std_phy_proc_tx_enc = sqrt((double)UE->ulsch_encoding_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000, - 2)/UE->ulsch_encoding_stats.trials - pow((double)UE->ulsch_encoding_stats.diff/UE->ulsch_encoding_stats.trials/cpu_freq_GHz/1000,2)); - printf("ULSCH encoding time :%f us (%d trials)\n",(double)UE->ulsch_encoding_stats.diff/UE->ulsch_encoding_stats.trials/cpu_freq_GHz/1000.0, - UE->ulsch_encoding_stats.trials); - printf("|__ Statistics std: %f us median %fus q1 %fus q3 %fus \n",std_phy_proc_tx_enc, tx_enc_median, tx_enc_q1, tx_enc_q3); - printf("|__ ULSCH segmentation time :%f us (%d trials)\n",(double)UE->ulsch_segmentation_stats.diff/UE->ulsch_segmentation_stats.trials/cpu_freq_GHz/1000.0, - UE->ulsch_segmentation_stats.trials); - printf("|__ ULSCH turbo encoding time :%f us (%d trials)\n", - ((double)UE->ulsch_turbo_encoding_stats.trials/UE->ulsch_encoding_stats.trials)*(double) - UE->ulsch_turbo_encoding_stats.diff/UE->ulsch_turbo_encoding_stats.trials/cpu_freq_GHz/1000.0,UE->ulsch_turbo_encoding_stats.trials); - printf("|__ ULSCH rate-matching time :%f us (%d trials)\n", - ((double)UE->ulsch_rate_matching_stats.trials/UE->ulsch_encoding_stats.trials)*(double) - UE->ulsch_rate_matching_stats.diff/UE->ulsch_rate_matching_stats.trials/cpu_freq_GHz/1000.0,UE->ulsch_rate_matching_stats.trials); - printf("|__ ULSCH sub-block interleaving time :%f us (%d trials)\n", - ((double)UE->ulsch_interleaving_stats.trials/UE->ulsch_encoding_stats.trials)*(double) - UE->ulsch_interleaving_stats.diff/UE->ulsch_interleaving_stats.trials/cpu_freq_GHz/1000.0,UE->ulsch_interleaving_stats.trials); - printf("|__ ULSCH multiplexing time :%f us (%d trials)\n", - ((double)UE->ulsch_multiplexing_stats.trials/UE->ulsch_encoding_stats.trials)*(double) - UE->ulsch_multiplexing_stats.diff/UE->ulsch_multiplexing_stats.trials/cpu_freq_GHz/1000.0,UE->ulsch_multiplexing_stats.trials); - - printf("\n\neNB RX function statistics (per 1ms subframe)\n\n"); - std_phy_proc_rx = sqrt((double)eNB->phy_proc_rx.diff_square/pow(cpu_freq_GHz,2)/pow(1000, - 2)/eNB->phy_proc_rx.trials - pow((double)eNB->phy_proc_rx.diff/eNB->phy_proc_rx.trials/cpu_freq_GHz/1000,2)); - printf("Total PHY proc rx :%f us (%d trials)\n",(double)eNB->phy_proc_rx.diff/eNB->phy_proc_rx.trials/cpu_freq_GHz/1000.0,eNB->phy_proc_rx.trials); - 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)ru->ofdm_demod_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000, - 2)/ru->ofdm_demod_stats.trials - pow((double)ru->ofdm_demod_stats.diff/ru->ofdm_demod_stats.trials/cpu_freq_GHz/1000,2)); - printf("OFDM_demod time :%f us (%d trials)\n",(double)ru->ofdm_demod_stats.diff/ru->ofdm_demod_stats.trials/cpu_freq_GHz/1000.0, - ru->ofdm_demod_stats.trials); - printf("|__ Statistcs std: %fus median %fus q1 %fus q3 %fus \n", std_phy_proc_rx_fft, rx_fft_median, rx_fft_q1, rx_fft_q3); - std_phy_proc_rx_demod = sqrt((double)eNB->ulsch_demodulation_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000, - 2)/eNB->ulsch_demodulation_stats.trials - pow((double)eNB->ulsch_demodulation_stats.diff/eNB->ulsch_demodulation_stats.trials/cpu_freq_GHz/1000,2)); - printf("ULSCH demodulation time :%f us (%d trials)\n",(double)eNB->ulsch_demodulation_stats.diff/eNB->ulsch_demodulation_stats.trials/cpu_freq_GHz/1000.0, - eNB->ulsch_demodulation_stats.trials); - 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); - std_phy_proc_rx_dec = sqrt((double)eNB->ulsch_decoding_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000, - 2)/eNB->ulsch_decoding_stats.trials - pow((double)eNB->ulsch_decoding_stats.diff/eNB->ulsch_decoding_stats.trials/cpu_freq_GHz/1000,2)); - printf("ULSCH Decoding time (%.2f Mbit/s, avg iter %f) :%f us (%d trials, max %f)\n", - UE->ulsch[0]->harq_processes[harq_pid]->TBS/1000.0,(double)avg_iter/iter_trials, - (double)eNB->ulsch_decoding_stats.diff/eNB->ulsch_decoding_stats.trials/cpu_freq_GHz/1000.0,eNB->ulsch_decoding_stats.trials, - (double)eNB->ulsch_decoding_stats.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("|__ sub-block interleaving %f us (%d trials)\n", - (double)eNB->ulsch_deinterleaving_stats.diff/eNB->ulsch_deinterleaving_stats.trials/cpu_freq_GHz/1000.0,eNB->ulsch_deinterleaving_stats.trials); - printf("|__ demultiplexing %f us (%d trials)\n", - (double)eNB->ulsch_demultiplexing_stats.diff/eNB->ulsch_demultiplexing_stats.trials/cpu_freq_GHz/1000.0,eNB->ulsch_demultiplexing_stats.trials); - printf("|__ rate-matching %f us (%d trials)\n", - (double)eNB->ulsch_rate_unmatching_stats.diff/eNB->ulsch_rate_unmatching_stats.trials/cpu_freq_GHz/1000.0,eNB->ulsch_rate_unmatching_stats.trials); - printf("|__ turbo_decoder(%d bits) %f us (%d cycles, %d trials)\n", - eNB->ulsch[0]->harq_processes[harq_pid]->Cminus ? eNB->ulsch[0]->harq_processes[harq_pid]->Kminus : eNB->ulsch[0]->harq_processes[harq_pid]->Kplus, - (double)eNB->ulsch_turbo_decoding_stats.diff/eNB->ulsch_turbo_decoding_stats.trials/cpu_freq_GHz/1000.0, - (int)((double)eNB->ulsch_turbo_decoding_stats.diff/eNB->ulsch_turbo_decoding_stats.trials),eNB->ulsch_turbo_decoding_stats.trials); - printf(" |__ init %f us (cycles/iter %f, %d trials)\n", - (double)eNB->ulsch_tc_init_stats.diff/eNB->ulsch_tc_init_stats.trials/cpu_freq_GHz/1000.0, - (double)eNB->ulsch_tc_init_stats.diff/eNB->ulsch_tc_init_stats.trials/((double)avg_iter/iter_trials), - eNB->ulsch_tc_init_stats.trials); - printf(" |__ alpha %f us (cycles/iter %f, %d trials)\n", - (double)eNB->ulsch_tc_alpha_stats.diff/eNB->ulsch_tc_alpha_stats.trials/cpu_freq_GHz/1000.0, - (double)eNB->ulsch_tc_alpha_stats.diff/eNB->ulsch_tc_alpha_stats.trials*2, - eNB->ulsch_tc_alpha_stats.trials); - printf(" |__ beta %f us (cycles/iter %f,%d trials)\n", - (double)eNB->ulsch_tc_beta_stats.diff/eNB->ulsch_tc_beta_stats.trials/cpu_freq_GHz/1000.0, - (double)eNB->ulsch_tc_beta_stats.diff/eNB->ulsch_tc_beta_stats.trials*2, - eNB->ulsch_tc_beta_stats.trials); - printf(" |__ gamma %f us (cycles/iter %f,%d trials)\n", - (double)eNB->ulsch_tc_gamma_stats.diff/eNB->ulsch_tc_gamma_stats.trials/cpu_freq_GHz/1000.0, - (double)eNB->ulsch_tc_gamma_stats.diff/eNB->ulsch_tc_gamma_stats.trials*2, - eNB->ulsch_tc_gamma_stats.trials); - printf(" |__ ext %f us (cycles/iter %f,%d trials)\n", - (double)eNB->ulsch_tc_ext_stats.diff/eNB->ulsch_tc_ext_stats.trials/cpu_freq_GHz/1000.0, - (double)eNB->ulsch_tc_ext_stats.diff/eNB->ulsch_tc_ext_stats.trials*2, - eNB->ulsch_tc_ext_stats.trials); - printf(" |__ intl1 %f us (cycles/iter %f,%d trials)\n", - (double)eNB->ulsch_tc_intl1_stats.diff/eNB->ulsch_tc_intl1_stats.trials/cpu_freq_GHz/1000.0, - (double)eNB->ulsch_tc_intl1_stats.diff/eNB->ulsch_tc_intl1_stats.trials, - eNB->ulsch_tc_intl1_stats.trials); - printf(" |__ intl2+HD+CRC %f us (cycles/iter %f,%d trials)\n", - (double)eNB->ulsch_tc_intl2_stats.diff/eNB->ulsch_tc_intl2_stats.trials/cpu_freq_GHz/1000.0, - (double)eNB->ulsch_tc_intl2_stats.diff/eNB->ulsch_tc_intl2_stats.trials, - eNB->ulsch_tc_intl2_stats.trials); + printDistribution(&UE->phy_proc_tx,table_tx,"Total PHY proc tx"); + printDistribution(&UE->ofdm_mod_stats, table_tx_ifft, "OFDM_mod time"); + printDistribution(&UE->ulsch_modulation_stats,table_tx_mod, "ULSCH modulation time"); + printDistribution(&UE->ulsch_encoding_stats,table_tx_enc, "ULSCH encoding time"); + printStatIndent(&UE->ulsch_segmentation_stats,"ULSCH segmentation time"); + printStatIndent(&UE->ulsch_turbo_encoding_stats,"ULSCH turbo encoding time"); + printStatIndent(&UE->ulsch_rate_matching_stats,"ULSCH rate-matching time"); + printStatIndent(&UE->ulsch_interleaving_stats,"ULSCH sub-block interleaving"); + printStatIndent(&UE->ulsch_multiplexing_stats,"ULSCH multiplexing time"); + printDistribution(&eNB->phy_proc_rx,table_rx,"Total PHY proc rx"); + printDistribution(&ru->ofdm_demod_stats,table_rx_fft,"OFDM_demod time"); + printDistribution(&eNB->ulsch_demodulation_stats,table_rx_demod,"ULSCH demodulation time"); + printf("ULSCH Decoding time (%.2f Mbit/s, avg iter %.2f) :%.2f us (%d trials, max %.2f)\n", + UE->ulsch[0]->harq_processes[harq_pid]->TBS/1000.0,(double)iter_trials, + (double)eNB->ulsch_decoding_stats.diff/eNB->ulsch_decoding_stats.trials*timeBase, + eNB->ulsch_decoding_stats.trials, + (double)eNB->ulsch_decoding_stats.max*timeBase); + printf("|__ Statistcs std: %.2fus median %.2fus q1 %.2fus q3 %.2fus \n", + std_phy_proc_rx_dec, + median(table_rx_dec), q1(table_rx_dec), q3(table_rx_dec)); + printStatIndent(&eNB->ulsch_deinterleaving_stats,"sub-block interleaving" ); + printStatIndent(&eNB->ulsch_demultiplexing_stats,"sub-block demultiplexing" ); + printStatIndent(&eNB->ulsch_rate_unmatching_stats,"sub-block rate-matching" ); + printf("|__ turbo_decoder(%d bits), avg iterations: %.1f %.2f us (%d cycles, %d trials)\n", + eNB->ulsch[0]->harq_processes[harq_pid]->Cminus ? + eNB->ulsch[0]->harq_processes[harq_pid]->Kminus : + eNB->ulsch[0]->harq_processes[harq_pid]->Kplus, + eNB->ulsch_tc_intl1_stats.trials/(double)eNB->ulsch_tc_init_stats.trials, + (double)eNB->ulsch_turbo_decoding_stats.diff/eNB->ulsch_turbo_decoding_stats.trials*timeBase, + (int)((double)eNB->ulsch_turbo_decoding_stats.diff/eNB->ulsch_turbo_decoding_stats.trials), + eNB->ulsch_turbo_decoding_stats.trials); + printStatIndent2(&eNB->ulsch_tc_init_stats,"init", eNB->ulsch_tc_init_stats.trials); + printStatIndent2(&eNB->ulsch_tc_alpha_stats,"alpha", eNB->ulsch_tc_init_stats.trials); + printStatIndent2(&eNB->ulsch_tc_beta_stats,"beta", eNB->ulsch_tc_init_stats.trials); + printStatIndent2(&eNB->ulsch_tc_gamma_stats,"gamma", eNB->ulsch_tc_init_stats.trials); + printStatIndent2(&eNB->ulsch_tc_ext_stats,"ext", eNB->ulsch_tc_init_stats.trials); + printStatIndent2(&eNB->ulsch_tc_intl1_stats,"turbo internal interleaver", eNB->ulsch_tc_init_stats.trials); + printStatIndent2(&eNB->ulsch_tc_intl2_stats,"intl2+HardDecode+CRC", eNB->ulsch_tc_init_stats.trials); } if(abstx) { //ABSTRACTION blerr= (double)errs[1]/(round_trials[1]); //printf("hata yok XX,"); - - blerr = (double)errs[0]/(round_trials[0]); if(saving_bler==0) @@ -1711,12 +1494,9 @@ int main(int argc, char **argv) // printf("hata yok XX,"); - if(blerr<1) saving_bler = 0; else saving_bler =1; - - } //ABStraction if ( (test_perf != 0) && (100 * effective_rate > test_perf )) { @@ -1734,7 +1514,6 @@ int main(int argc, char **argv) round_trials[2], errs[3], round_trials[3]); - //fprintf(time_meas_fd,"SNR; MCS; TBS; rate; err0; trials0; err1; trials1; err2; trials2; err3; trials3;ND;\n"); fprintf(time_meas_fd,"%f;%d;%d;%f;%2.1f;%f;%d;%d;%d;%d;%d;%d;%d;%d;%e;%e;%e;%e;%f;%f;", SNR, @@ -1758,7 +1537,6 @@ int main(int argc, char **argv) (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->ulsch[0]->harq_processes[harq_pid]->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])); - //fprintf(time_meas_fd,"UE_PROC_TX(%d); OFDM_MOD(%d); UL_MOD(%d); UL_ENC(%d); eNB_PROC_RX(%d); OFDM_DEMOD(%d); UL_DEMOD(%d); UL_DECOD(%d);\n", fprintf(time_meas_fd,"%d; %d; %d; %d; %d; %d; %d; %d;", UE->phy_proc_tx.trials, @@ -1780,52 +1558,44 @@ int main(int argc, char **argv) get_time_meas_us(&eNB->ulsch_demodulation_stats), get_time_meas_us(&eNB->ulsch_decoding_stats) ); - //fprintf(time_meas_fd,"UE_PROC_TX_STD;UE_PROC_TX_MAX;UE_PROC_TX_MIN;UE_PROC_TX_MED;UE_PROC_TX_Q1;UE_PROC_TX_Q3;UE_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); - + fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;", std_phy_proc_tx, t_tx_max, t_tx_min, median(table_tx), q1(table_tx), q3(table_tx), n_tx_dropped); //fprintf(time_meas_fd,"IFFT;\n"); - fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_ifft, tx_ifft_median, tx_ifft_q1, tx_ifft_q3); - + fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_ifft, + median(table_tx_ifft),q1(table_tx_ifft),q3(table_tx_ifft)); //fprintf(time_meas_fd,"MOD;\n"); - fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_mod, tx_mod_median, tx_mod_q1, tx_mod_q3); - + fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_mod, + median(table_tx_mod), q1(table_tx_mod), q3(table_tx_mod)); //fprintf(time_meas_fd,"ENC;\n"); - fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_enc, tx_enc_median, tx_enc_q1, tx_enc_q3); - + fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_enc, + median(table_tx_enc),q1(table_tx_enc),q3(table_tx_enc)); //fprintf(time_meas_fd,"eNB_PROC_RX_STD;eNB_PROC_RX_MAX;eNB_PROC_RX_MIN;eNB_PROC_RX_MED;eNB_PROC_RX_Q1;eNB_PROC_RX_Q3;eNB_PROC_RX_DROPPED;\n"); - fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;", std_phy_proc_rx, t_rx_max, t_rx_min, rx_median, rx_q1, rx_q3, n_rx_dropped); - + fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;", std_phy_proc_rx, t_rx_max, t_rx_min, + median(table_rx), q1(table_rx), q3(table_rx), n_rx_dropped); //fprintf(time_meas_fd,"FFT;\n"); - fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_rx_fft, rx_fft_median, rx_fft_q1, rx_fft_q3); - + fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_rx_fft, + median(table_rx_fft), q1(table_rx_fft), q3(table_rx_fft)); //fprintf(time_meas_fd,"DEMOD;\n"); - fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_rx_demod,rx_demod_median, rx_demod_q1, rx_demod_q3); - + fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_rx_demod, + median(table_rx_demod), q1(table_rx_demod), q3(table_rx_demod)); //fprintf(time_meas_fd,"DEC;\n"); - fprintf(time_meas_fd,"%f;%f;%f;%f\n", std_phy_proc_rx_dec, rx_dec_median, rx_dec_q1, rx_dec_q3); - - + fprintf(time_meas_fd,"%f;%f;%f;%f\n", std_phy_proc_rx_dec, + median(table_rx_dec), q1(table_rx_dec), q3(table_rx_dec)); printf("[passed] effective rate : %f (%2.1f%%,%f)): log and break \n",rate*effective_rate, 100*effective_rate, rate ); break; } else if (test_perf !=0 ) { printf("[continue] effective rate : %f (%2.1f%%,%f)): increase snr \n",rate*effective_rate, 100*effective_rate, rate); } - if (((double)errs[0]/(round_trials[0]))<1e-2) break; - } // SNR + } // SNR // - - //LOG_M("chestim_f.m","chestf",eNB->pusch_vars[0]->drs_ch_estimates[0][0],300*12,2,1); // LOG_M("chestim_t.m","chestt",eNB->pusch_vars[0]->drs_ch_estimates_time[0][0], (frame_parms->ofdm_symbol_size)*2,2,1); - }//ch realization - oai_exit=1; pthread_cond_signal(&ru->proc.cond_fep); @@ -1840,7 +1610,6 @@ int main(int argc, char **argv) fclose (time_meas_fd); return(0); - } diff --git a/openair2/UTIL/LISTS/list.h b/openair2/UTIL/LISTS/list.h index bf4d7e7580..818df2be26 100644 --- a/openair2/UTIL/LISTS/list.h +++ b/openair2/UTIL/LISTS/list.h @@ -44,6 +44,8 @@ #include #include #include +#include + #include "UTIL/MEM/mem_block.h" @@ -103,4 +105,37 @@ void totable (double*, struct list*); int compare (const void * a, const void * b); int32_t calculate_median(struct list *loc_list); + +typedef struct { + size_t size; + size_t mallocedSize; + size_t atomSize; + size_t increment; +} varArray_t; + +static inline varArray_t * initVarArray(size_t increment, size_t atomSize) { + varArray_t * tmp=malloc(sizeof(varArray_t)+increment*atomSize); + tmp->size=0; + tmp->atomSize=atomSize; + tmp->mallocedSize=increment; + tmp->increment=increment; + return(tmp); +} + +static inline void * dataArray(varArray_t * input) { + return input+1; +} + +static inline void appendVarArray(varArray_t * input, void* data) { + if (input->size>=input->mallocedSize) { + input->mallocedSize+=input->increment; + input=realloc(input,sizeof(varArray_t)+input->mallocedSize*input->atomSize); + } + memcpy((uint8_t*)(input+1)+input->atomSize*input->size++, data, input->atomSize); +} + +static inline void freeVarArray(varArray_t * input) { + free(input); +} + #endif From 926b7a49d50ec69c2ad56f5642354276dd084417 Mon Sep 17 00:00:00 2001 From: hongzhi wang Date: Thu, 27 Sep 2018 14:57:27 +0200 Subject: [PATCH 246/379] NR PDCCH development: polar decoder integration --- openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 350 +++++++++++-------- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 13 +- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 6 +- 3 files changed, 226 insertions(+), 143 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index 41e3f01691..53b1c554db 100755 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -411,17 +411,18 @@ symbol 0 | ... bundle 3 bundle 6 bundle_j = (c*coreset_interleaver_size_R)+r; f_bundle_j = ((r*coreset_C)+c+n_shift)%((coreset_nbr_rb*coreset_time_dur)/reg_bundle_size_L); if (coreset_interleaved==0) f_bundle_j=bundle_j; - #ifdef NR_PDCCH_DCI_DEBUG + #ifndef NR_PDCCH_DCI_DEBUG printf("\n\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_demapping_deinterleaving)-> [r=%d,c=%d] bundle_j(%d) interleaved at f_bundle_j(%d)\n",r,c,bundle_j,f_bundle_j); #endif } f_reg = (f_bundle_j*reg_bundle_size_L)+(reg%reg_bundle_size_L); - index_z = 9*reg; + //index_z = 9*reg; + index_z = 9*(uint16_t)floor(reg/coreset_time_dur) + (9*coreset_nbr_rb)*(reg%coreset_time_dur); //index_llr = 9*(((uint16_t)floor(f_reg/reg_bundle_size_L)+(f_reg)%coreset_time_dur))*(coreset_nbr_rb); index_llr = 9*((uint16_t)floor(f_reg/coreset_time_dur)+((f_reg%coreset_time_dur)*(coreset_nbr_rb))); for (int i=0; i<9; i++){ z[index_z + i] = llr[index_llr + i]; - #ifdef NR_PDCCH_DCI_DEBUG + #ifndef NR_PDCCH_DCI_DEBUG printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_demapping_deinterleaving)-> [reg=%d,bundle_j=%d] z[%d]=(%d,%d) <-> \t[f_reg=%d,fbundle_j=%d] llr[%d]=(%d,%d) \n", reg,bundle_j,(index_z + i),*(char*) &z[index_z + i],*(1 + (char*) &z[index_z + i]), f_reg,f_bundle_j,(index_llr + i),*(char*) &llr[index_llr + i], *(1 + (char*) &llr[index_llr + i])); @@ -431,10 +432,7 @@ symbol 0 | ... bundle 3 bundle 6 } } - - - - +#if 0 void nr_pdcch_demapping(uint16_t *llr, uint16_t *wbar, NR_DL_FRAME_PARMS *frame_parms, uint8_t coreset_time_dur, uint32_t coreset_nbr_rb) { @@ -503,6 +501,7 @@ void nr_pdcch_demapping(uint16_t *llr, uint16_t *wbar, } } } +#endif //0 #endif @@ -614,7 +613,7 @@ void pdcch_demapping(uint16_t *llr,uint16_t *wbar,NR_DL_FRAME_PARMS *frame_parms static uint16_t wtemp_rx[Msymb]; - +#if 0 #ifdef NR_PDCCH_DCI_RUN void nr_pdcch_deinterleaving(NR_DL_FRAME_PARMS *frame_parms, uint16_t *z, uint16_t *wbar, uint8_t coreset_time_dur, uint8_t reg_bundle_size_L, @@ -686,6 +685,7 @@ void nr_pdcch_deinterleaving(NR_DL_FRAME_PARMS *frame_parms, uint16_t *z, } } #endif +#endif //0 @@ -851,7 +851,7 @@ int32_t pdcch_qpsk_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms, int32_t nr_pdcch_llr(NR_DL_FRAME_PARMS *frame_parms, int32_t **rxdataF_comp, char *pdcch_llr, uint8_t symbol,uint32_t coreset_nbr_rb) { - int16_t *rxF = (int16_t*) &rxdataF_comp[0][(symbol * coreset_nbr_rb * 9)]; + int16_t *rxF = (int16_t*) &rxdataF_comp[0][(symbol * coreset_nbr_rb * 12)]; int32_t i; char *pdcch_llr8; @@ -873,8 +873,8 @@ int32_t nr_pdcch_llr(NR_DL_FRAME_PARMS *frame_parms, int32_t **rxdataF_comp, *pdcch_llr8 = -32; else *pdcch_llr8 = (char) (*rxF); -#ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_llr)-> llr logs: i=%d *rxF:%d => *pdcch_llr8:%d\n",i/18,i,*rxF,*pdcch_llr8); +#ifndef NR_PDCCH_DCI_DEBUG + printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_llr)-> llr logs: rb=%d i=%d *rxF:%d => *pdcch_llr8:%d\n",i/18,i,*rxF,*pdcch_llr8); #endif rxF++; pdcch_llr8++; @@ -1249,15 +1249,15 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF, #endif } - dl_ch0_ext = &dl_ch_estimates_ext[aarx][symbol * (coreset_nbr_rb * NBR_RE_PER_RB_WITHOUT_DMRS)]; + dl_ch0_ext = &dl_ch_estimates_ext[aarx][symbol * (coreset_nbr_rb * NBR_RE_PER_RB_WITH_DMRS)]; #ifdef NR_PDCCH_DCI_DEBUG printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> dl_ch0_ext = &dl_ch_estimates_ext[aarx = (%d)][symbol * (frame_parms->N_RB_DL * 9) = (%d)]\n", - aarx,symbol * (coreset_nbr_rb * NBR_RE_PER_RB_WITHOUT_DMRS)); + aarx,symbol * (coreset_nbr_rb * NBR_RE_PER_RB_WITH_DMRS)); #endif - rxF_ext = &rxdataF_ext[aarx][symbol * (coreset_nbr_rb * NBR_RE_PER_RB_WITHOUT_DMRS)]; + rxF_ext = &rxdataF_ext[aarx][symbol * (coreset_nbr_rb * NBR_RE_PER_RB_WITH_DMRS)]; #ifdef NR_PDCCH_DCI_DEBUG printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> rxF_ext = &rxdataF_ext[aarx = (%d)][symbol * (frame_parms->N_RB_DL * 9) = (%d)]\n", - aarx,symbol * (coreset_nbr_rb * NBR_RE_PER_RB_WITHOUT_DMRS)); + aarx,symbol * (coreset_nbr_rb * NBR_RE_PER_RB_WITH_DMRS)); printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> (for symbol=%d, aarx=%d), symbol_mod=%d, nushiftmod3=%d \n",symbol,aarx,symbol_mod,nushiftmod3); #endif @@ -1307,7 +1307,7 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF, if ((c_rb < (frame_parms->N_RB_DL >> 1)) && ((frame_parms->N_RB_DL & 1) == 0)) { //if RB to be treated is lower than middle system bandwidth then rxdataF pointed at (offset + c_br + symbol * ofdm_symbol_size): even case rxF = &rxdataF[aarx][(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size)))]; - #ifdef NR_PDCCH_DCI_DEBUG + #ifndef NR_PDCCH_DCI_DEBUG printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> in even case c_rb (%d) is lower than half N_RB_DL -> rxF = &rxdataF[aarx = (%d)][(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size))) = (%d)]\n", c_rb,aarx,(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size)))); #endif @@ -1316,7 +1316,7 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF, // number of RBs is even and c_rb is higher than half system bandwidth (we don't skip DC) // if these conditions are true the pointer has to be situated at the 1st part of the rxdataF rxF = &rxdataF[aarx][(12*(c_rb - (frame_parms->N_RB_DL>>1)) + (symbol * (frame_parms->ofdm_symbol_size)))]; // we point at the 1st part of the rxdataF in symbol - #ifdef NR_PDCCH_DCI_DEBUG + #ifndef NR_PDCCH_DCI_DEBUG printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> in even case c_rb (%d) is higher than half N_RB_DL (not DC) -> rxF = &rxdataF[aarx = (%d)][(12*(c_rb - (frame_parms->N_RB_DL>>1)) + (symbol * (frame_parms->ofdm_symbol_size))) = (%d)]\n", c_rb,aarx,(12*(c_rb - (frame_parms->N_RB_DL>>1)) + (symbol * (frame_parms->ofdm_symbol_size)))); #endif @@ -1329,7 +1329,7 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF, if ((c_rb < (frame_parms->N_RB_DL >> 1)) && ((frame_parms->N_RB_DL & 1) != 0)){ //if RB to be treated is lower than middle system bandwidth then rxdataF pointed at (offset + c_br + symbol * ofdm_symbol_size): odd case rxF = &rxdataF[aarx][(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size)))]; - #ifdef NR_PDCCH_DCI_DEBUG + #ifndef NR_PDCCH_DCI_DEBUG printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> in odd case c_rb (%d) is lower or equal than half N_RB_DL -> rxF = &rxdataF[aarx = (%d)][(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size))) = (%d)]\n", c_rb,aarx,(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size)))); #endif @@ -1338,7 +1338,7 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF, // number of RBs is odd and c_rb is higher than half system bandwidth + 1 // if these conditions are true the pointer has to be situated at the 1st part of the rxdataF just after the first IQ symbols of the RB containing DC rxF = &rxdataF[aarx][(12*(c_rb - (frame_parms->N_RB_DL>>1)) - 6 + (symbol * (frame_parms->ofdm_symbol_size)))]; // we point at the 1st part of the rxdataF in symbol - #ifdef NR_PDCCH_DCI_DEBUG + #ifndef NR_PDCCH_DCI_DEBUG printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> in odd case c_rb (%d) is higher than half N_RB_DL (not DC) -> rxF = &rxdataF[aarx = (%d)][(12*(c_rb - frame_parms->N_RB_DL) - 5 + (symbol * (frame_parms->ofdm_symbol_size))) = (%d)]\n", c_rb,aarx,(12*(c_rb - (frame_parms->N_RB_DL>>1)) - 6 + (symbol * (frame_parms->ofdm_symbol_size)))); #endif @@ -1347,7 +1347,7 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF, // if odd number RBs in system bandwidth and first RB to be treated is higher than middle system bandwidth (around DC) // we have to treat the RB in two parts: first part from i=0 to 5, the data is at the end of rxdataF (pointing at the end of the table) rxF = &rxdataF[aarx][(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size)))]; - #ifdef NR_PDCCH_DCI_DEBUG + #ifndef NR_PDCCH_DCI_DEBUG printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> in odd case c_rb (%d) is half N_RB_DL + 1 we treat DC case -> rxF = &rxdataF[aarx = (%d)][(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size))) = (%d)]\n", c_rb,aarx,(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size)))); #endif @@ -1382,7 +1382,7 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF, } // then we point at the begining of the symbol part of rxdataF do process second part of RB rxF = &rxdataF[aarx][((symbol * (frame_parms->ofdm_symbol_size)))]; // we point at the 1st part of the rxdataF in symbol - #ifdef NR_PDCCH_DCI_DEBUG + #ifndef NR_PDCCH_DCI_DEBUG printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> in odd case c_rb (%d) is half N_RB_DL +1 we treat DC case -> rxF = &rxdataF[aarx = (%d)][(symbol * (frame_parms->ofdm_symbol_size)) = (%d)]\n", c_rb,aarx,(symbol * (frame_parms->ofdm_symbol_size))); #endif @@ -1417,17 +1417,17 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF, for (i = 0; i < 12; i++) { if ((i != 1) && (i != 5) && (i != 9)) { rxF_ext[j] = rxF[i]; - #ifdef NR_PDCCH_DCI_DEBUG + #ifndef NR_PDCCH_DCI_DEBUG printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> RB[c_rb %d] \t RE[re %d] => rxF_ext[%d]=(%d,%d)\t rxF[%d]=(%d,%d)", c_rb, i, j, *(short *) &rxF_ext[j],*(1 + (short*) &rxF_ext[j]), i, *(short *) &rxF[i], *(1 + (short*) &rxF[i])); #endif dl_ch0_ext[j] = dl_ch0[i]; //printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> ch %d => dl_ch0(%d,%d)\n", i, *(short *) &dl_ch0[i], *(1 + (short*) &dl_ch0[i])); - printf("\t-> dl_ch0[%d] => dl_ch0_ext[%d](%d,%d)\n", i,j, *(short *) &dl_ch0[i], *(1 + (short*) &dl_ch0[i])); + //printf("\t-> dl_ch0[%d] => dl_ch0_ext[%d](%d,%d)\n", i,j, *(short *) &dl_ch0[i], *(1 + (short*) &dl_ch0[i])); j++; } else { - #ifdef NR_PDCCH_DCI_DEBUG + #ifndef NR_PDCCH_DCI_DEBUG printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> RB[c_rb %d] \t RE[re %d] => rxF_ext[%d]=(%d,%d)\t rxF[%d]=(%d,%d) \t\t <==> DM-RS PDCCH, this is a pilot symbol\n", c_rb, i, j, *(short *) &rxF_ext[j], *(1 + (short*) &rxF_ext[j]), i, *(short *) &rxF[i], *(1 + (short*) &rxF[i])); @@ -2187,9 +2187,9 @@ void nr_pdcch_channel_compensation(int32_t **rxdataF_ext, for (aarx=0; aarxnb_antennas_rx; aarx++) { #if defined(__x86_64__) || defined(__i386__) - dl_ch128 = (__m128i *)&dl_ch_estimates_ext[(aatx<<1)+aarx][symbol*20*12]; - rxdataF128 = (__m128i *)&rxdataF_ext[aarx][symbol*20*12]; - rxdataF_comp128 = (__m128i *)&rxdataF_comp[(aatx<<1)+aarx][symbol*20*12]; + dl_ch128 = (__m128i *)&dl_ch_estimates_ext[(aatx<<1)+aarx][symbol*coreset_nbr_rb*12]; + rxdataF128 = (__m128i *)&rxdataF_ext[aarx][symbol*coreset_nbr_rb*12]; + rxdataF_comp128 = (__m128i *)&rxdataF_comp[(aatx<<1)+aarx][symbol*coreset_nbr_rb*12]; //printf("ch compensation dl_ch ext addr %p \n", &dl_ch_estimates_ext[(aatx<<1)+aarx][symbol*20*12]); //printf("rxdataf ext addr %p symbol %d\n", &rxdataF_ext[aarx][symbol*20*12], symbol); //printf("rxdataf_comp addr %p\n",&rxdataF_comp[(aatx<<1)+aarx][symbol*20*12]); @@ -2220,9 +2220,9 @@ void nr_pdcch_channel_compensation(int32_t **rxdataF_ext, // print_ints("c0",&mmtmpP2); // print_ints("c1",&mmtmpP3); rxdataF_comp128[0] = _mm_packs_epi32(mmtmpP2,mmtmpP3); - // print_shorts("rx:",rxdataF128); - // print_shorts("ch:",dl_ch128); - // print_shorts("pack:",rxdataF_comp128); + //print_shorts("rx:",rxdataF128); + //print_shorts("ch:",dl_ch128); + //print_shorts("pack:",rxdataF_comp128); // multiply by conjugated channel mmtmpP0 = _mm_madd_epi16(dl_ch128[1],rxdataF128[1]); @@ -2237,9 +2237,9 @@ void nr_pdcch_channel_compensation(int32_t **rxdataF_ext, mmtmpP2 = _mm_unpacklo_epi32(mmtmpP0,mmtmpP1); mmtmpP3 = _mm_unpackhi_epi32(mmtmpP0,mmtmpP1); rxdataF_comp128[1] = _mm_packs_epi32(mmtmpP2,mmtmpP3); - // print_shorts("rx:",rxdataF128+1); - // print_shorts("ch:",dl_ch128+1); - // print_shorts("pack:",rxdataF_comp128+1); + //print_shorts("rx:",rxdataF128+1); + //print_shorts("ch:",dl_ch128+1); + //print_shorts("pack:",rxdataF_comp128+1); // multiply by conjugated channel mmtmpP0 = _mm_madd_epi16(dl_ch128[2],rxdataF128[2]); @@ -2254,9 +2254,18 @@ void nr_pdcch_channel_compensation(int32_t **rxdataF_ext, mmtmpP2 = _mm_unpacklo_epi32(mmtmpP0,mmtmpP1); mmtmpP3 = _mm_unpackhi_epi32(mmtmpP0,mmtmpP1); rxdataF_comp128[2] = _mm_packs_epi32(mmtmpP2,mmtmpP3); - // print_shorts("rx:",rxdataF128+2); - // print_shorts("ch:",dl_ch128+2); - // print_shorts("pack:",rxdataF_comp128+2); + /////////////////////////////////////////////////////////////////////////////////////////////// + //print_shorts("rx:",rxdataF128+2); + //print_shorts("ch:",dl_ch128+2); + //print_shorts("pack:",rxdataF_comp128+2); + +#ifndef NR_PDCCH_DCI_DEBUG + for (int i=0; i<20 ; i++) + printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_channel_compensation)-> rb=%d rxdataF128[%d]=(%d,%d) rxdataF_comp128[%d]=(%d,%d)\n", + rb, i, *(short *) &rxdataF128[i],*(1 + (short*) &rxdataF128[i]), + i,*(short *) &rxdataF_comp128[i], *(1 + (short*) &rxdataF_comp128[i])); + +#endif dl_ch128+=3; rxdataF128+=3; @@ -3007,23 +3016,33 @@ nr_pdcch_demapping_deinterleaving(pdcch_vars[eNB_id]->llr, } printf("\n"); #endif +#endif + +//#if 0 + #ifdef NR_PDCCH_DCI_DEBUG +// printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> we end nr_pdcch_unscrambling()\n"); +// for (int i=0; i<(coreset_time_dur*coreset_nbr_rb*9); i++){ +// printf("\t before unscrambling : e_rx[%d]=(%d,%d)\n",i,*(char*) &pdcch_vars[eNB_id]->e_rx[i],*(1 + (char*) &pdcch_vars[eNB_id]->e_rx[i])); +// } +// printf("\n"); + #endif + nr_pdcch_unscrambling(pdcch_vars[eNB_id]->crnti, frame_parms, nr_tti_rx, - pdcch_vars[eNB_id]->e_rx, + (uint16_t*) pdcch_vars[eNB_id]->e_rx, coreset_time_dur*coreset_nbr_rb*9*2, // get_nCCE(n_pdcch_symbols, frame_parms, mi) * 72, pdcch_DMRS_scrambling_id, do_common); #ifdef NR_PDCCH_DCI_DEBUG printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> we end nr_pdcch_unscrambling()\n"); - for (int i=0; i<(coreset_time_dur*coreset_nbr_rb*9); i++){ - printf("\te_rx[%d]=(%d,%d)",i,*(char*) &pdcch_vars[eNB_id]->e_rx[i],*(1 + (char*) &pdcch_vars[eNB_id]->e_rx[i])); - if (i%10 == 0) printf("\n"); - } - printf("\n"); +// for (int i=0; i<(coreset_time_dur*coreset_nbr_rb*9); i++){ +// printf("\t after unscrambling : e_rx[%d]=(%d,%d)\n",i,*(char*) &pdcch_vars[eNB_id]->e_rx[i],*(1 + (char*) &pdcch_vars[eNB_id]->e_rx[i])); +// } +// printf("\n"); #endif -#endif +//#endif //0 /* printf("\t### in nr_rx_pdcch() function we enter pdcch_demapping()\n"); @@ -3091,6 +3110,84 @@ void pdcch_scrambling(NR_DL_FRAME_PARMS *frame_parms, #ifdef NR_PDCCH_DCI_RUN void nr_pdcch_unscrambling(uint16_t crnti, NR_DL_FRAME_PARMS *frame_parms, uint8_t nr_tti_rx, + uint16_t *z, uint32_t length, uint16_t pdcch_DMRS_scrambling_id, int do_common) { + + int i; + uint8_t reset; + uint32_t x1, x2, s = 0; + uint16_t n_id; //{0,1,...,65535} + uint32_t n_rnti; + + reset = 1; + // x1 is set in first call to lte_gold_generic + //do_common=1; +if (do_common){ + n_id = frame_parms->Nid_cell; + n_rnti = 0; +} else { + n_id = pdcch_DMRS_scrambling_id; + n_rnti = (uint32_t)crnti; +} +//x2 = ((n_rnti * (1 << 16)) + n_id)%(1 << 31); +//uint32_t puissance_2_16 = ((1<<16)*n_rnti)+n_id; +//uint32_t puissance_2_31= (1<<30)*2; +//uint32_t calc_x2=puissance_2_16%puissance_2_31; + x2 = (((1<<16)*n_rnti)+n_id)%((1<<30)*2); //this is c_init in 38.211 v15.1.0 Section 7.3.2.3 +// x2 = (nr_tti_rx << 9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.8.2 +#ifndef NR_PDCCH_DCI_DEBUG +printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_unscrambling)-> (c_init=%d, n_id=%d, n_rnti=%d, length=%d)\n",x2,n_id,n_rnti,length); +#endif + for (i = 0; i < length; i++) { + if ((i & 0x1f) == 0) { + s = lte_gold_generic(&x1, &x2, reset); + //printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_unscrambling)-> lte_gold[%d]=%x\n",i,s); + reset = 0; + } + + #ifndef NR_PDCCH_DCI_DEBUG + if (i%2 == 0) printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_unscrambling)-> unscrambling %d : scrambled_z=%d, => ", + i,*(char*) &z[(int)floor(i/2)]); + if (i%2 == 1) printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_unscrambling)-> unscrambling %d : scrambled_z=%d, => ", + i,*(1 + (char*) &z[(int)floor(i/2)])); + #endif + if (((s >> (i % 32)) & 1) == 1){ + if (i%2 == 0) *(char*) &z[(int)floor(i/2)] = -(*(char*) &z[(int)floor(i/2)]); + if (i%2 == 1) *(1 + (char*) &z[(int)floor(i/2)]) = -(*(1 + (char*) &z[(int)floor(i/2)])); + } + //llr[i] = -llr[i]; + //llr[i] = (-1)*llr[i]; + #ifndef NR_PDCCH_DCI_DEBUG + if (i%2 == 0) printf("unscrambled_z=%d\n",*(char*) &z[(int)floor(i/2)]); + if (i%2 == 1) printf("unscrambled_z=%d\n",*(1 + (char*) &z[(int)floor(i/2)])); + #endif + + } + +#ifdef NR_PDCCH_DCI_DEBUG +//k = 0; +//for (int j = 0; j < length; j++){ +// if ((j%32==0) && (j!=0)) k++; +// if ((j%2 == 0) && ((*(char*) &z[(int)floor(i/2)]) > 0)) { +// unscrambled[k] = (unscrambled[k]<<1) + 1; +// } +// if ((j%2 == 0) && ((*(char*) &z[(int)floor(i/2)]) <= 0)) { +// unscrambled[k] = (unscrambled[k]<<1) + 0; +// } +// if ((j%2 == 1) && ((*(1 + (char*) &z[(int)floor(i/2)])) > 0)) { +// unscrambled[k] = (unscrambled[k]<<1) + 1; +// } +// if ((j%2 == 1) && ((*(1 + (char*) &z[(int)floor(i/2)])) <= 0)) { +// unscrambled[k] = (unscrambled[k]<<1) + 0; +// } +//} +//for (int p=0; p after scrambling, unscrambled[%d]=%x\n",p,unscrambled[p]); +#endif + + +} + +void nr_pdcch_unscrambling_tmp(uint16_t crnti, NR_DL_FRAME_PARMS *frame_parms, uint8_t nr_tti_rx, double llr[], uint32_t length, uint16_t pdcch_DMRS_scrambling_id, int do_common) { int i; @@ -3116,19 +3213,21 @@ if (do_common){ x2 = (((1<<16)*n_rnti)+n_id)%((1<<30)*2); //this is c_init in 38.211 v15.1.0 Section 7.3.2.3 // x2 = (nr_tti_rx << 9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.8.2 #ifdef NR_PDCCH_DCI_DEBUG -printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_unscrambling)-> (c_init=%d, n_id=%d, n_rnti=%d)\n",x2,n_id,n_rnti); +printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_unscrambling)-> (c_init=%d, n_id=%d, n_rnti=%d, length=%d)\n",x2,n_id,n_rnti,length); #endif for (i = 0; i < length; i++) { if ((i & 0x1f) == 0) { s = lte_gold_generic(&x1, &x2, reset); - // printf("lte_gold[%d]=%x\n",i,s); + printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_unscrambling)-> lte_gold[%d]=%x\n",i,s); reset = 0; } - // printf("unscrambling %d : e %d, c %d => ",i,llr[i],((s>>(i&0x1f))&1)); - if (((s >> (i % 32)) & 1) == 0) + printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_unscrambling)-> unscrambling %d : scrambled_llr=%d, c %d => ",i,llr[i],((s>>(i&0x1f))&1)); + if (((s >> (i % 32)) & 1) == 1) llr[i] = -llr[i]; - // printf("%d\n",llr[i]); + //llr[i] = (-1)*llr[i]; + printf("unscrambled_llr=%d\n",llr[i]); + } } @@ -4072,18 +4171,15 @@ void nr_dci_decoding_procedure0(int s, 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) format %d\n", pdcch_vars[eNB_id]->num_pdcch_symbols,m,L2,sizeof_bits,CCEind,nCCE,*CCEmap,CCEmap_mask,format_c); #endif - #ifdef NR_PDCCH_DCI_DEBUG + #ifndef NR_PDCCH_DCI_DEBUG printf ("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> ... we enter function dci_decoding(sizeof_bits=%d L=%d) -----\n",sizeof_bits,L); printf ("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> ... we have to replace this part of the code by polar decoding\n"); #endif -// The polar_input has to be taken from the e_rx table but in the proper order -// e_rx contains the bits grouped by bundle -// polar_input has to contain the bits ordered by b_tilde_0, b_tilde_1, .... // for (int m=0; m < (nCCE[p]*6*9*2); m++) #ifdef NR_PDCCH_DCI_DEBUG - printf("polar intput (with coreset_time_dur=%d, coreset_nbr_rb=%d, p=%d, CCEind=%d): \n", + printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0: polar decoding)-> polar intput (with coreset_time_dur=%d, coreset_nbr_rb=%d, p=%d, CCEind=%d): \n", coreset_time_dur,coreset_nbr_rb,p,CCEind); #endif int reg_p,reg_e; @@ -4091,60 +4187,55 @@ void nr_dci_decoding_procedure0(int s, reg_p = (((int)floor(m/coreset_time_dur))+((m%coreset_time_dur)*(L2*6/coreset_time_dur)))*9*2; reg_e = m*9*2; for (int i=0; i<9*2; i++){ - polar_input[reg_p+i] = (pdcch_vars[eNB_id]->e_rx[((CCEind*9*6*2) + reg_e + i)]>0) ? (1.0):(-1.0); - printf("\t m=%d \tpolar_input[%d]=%lf <-> e_rx[%d]=%d\n",m,reg_p+i,polar_input[reg_p+i], - ((CCEind*9*6*2) + reg_e + i),pdcch_vars[eNB_id]->e_rx[((CCEind*9*6*2) + reg_e + i)]); + //polar_input[reg_p+i] = (pdcch_vars[eNB_id]->e_rx[((CCEind*9*6*2) + reg_e + i)]>0) ? (1.0):(-1.0); + polar_input[reg_e+i] = (pdcch_vars[eNB_id]->e_rx[((CCEind*9*6*2) + reg_e + i)]>0) ? (1/sqrt(2)):((-1)/sqrt(2)); + //printf("\t m=%d \tpolar_input[%d]=%lf <-> e_rx[%d]=%d\n",m,reg_e+i,polar_input[reg_e+i], + // ((CCEind*9*6*2) + reg_e + i),pdcch_vars[eNB_id]->e_rx[((CCEind*9*6*2) + reg_e + i)]); + //printf("\t m=%d \tpolar_input[%d]=%lf <-> e_rx[%d]=%d\n",m,reg_p+i,polar_input[reg_p+i], + // ((CCEind*9*6*2) + reg_e + i),pdcch_vars[eNB_id]->e_rx[((CCEind*9*6*2) + reg_e + i)]); } } - #ifdef NR_PDCCH_DCI_DEBUG + #ifndef NR_PDCCH_DCI_DEBUG printf("\n"); int j=0; uint32_t polar_hex[27] = {0}; for (int i=0; i polar_hex[%d]=%x\n",j,polar_hex[j]); #endif -/* nr_pdcch_unscrambling(pdcch_vars[eNB_id]->crnti, - frame_parms, - nr_tti_rx, - polar_input, - L2*6*9*2, - pdcch_DMRS_scrambling_id, - do_common);*/ +uint32_t dci_estimation[4]={0}; +uint16_t rnti=3; #ifdef PDCCH_TEST_POLAR_TEMP_FIX - t_nrPolar_paramsPtr currentPtr = NULL; - nr_polar_init(¤tPtr, NR_POLAR_DCI_MESSAGE_TYPE, 41, 8); + t_nrPolar_paramsPtr nrPolar_params = NULL; + nr_polar_init(&nrPolar_params, 1, 41, 8); + t_nrPolar_paramsPtr currentPtrDCI=nr_polar_params(nrPolar_params, 1, 41, 8); + decoderState = polar_decoder_dci(polar_input, + dci_estimation, + currentPtrDCI,//nrPolar_params, + 8,//NR_POLAR_DECODER_LISTSIZE, + 0,//NR_POLAR_DECODER_PATH_METRIC_APPROXIMATION, + rnti); //rnti + printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0: \t\tpolar decoding)-> decoderState %d\n", decoderState); + #endif + //dci_estimation[0] = 0x01189400; + printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0: \t\tdci_estimation: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n", + dci_estimation[0], dci_estimation[1], dci_estimation[2], dci_estimation[3]); - //#else - // nr_polar_init(nrPolar_params, NR_POLAR_DCI_MESSAGE_TYPE, (uint16_t)sizeof_bits, L2); - // t_nrPolar_paramsPtr currentPtr = nr_polar_params(*nrPolar_params, NR_POLAR_DCI_MESSAGE_TYPE, (uint16_t)sizeof_bits,L2); - #endif - - decoderState = polar_decoder(polar_input, - &dci_decoded_output[current_thread_id][0], - currentPtr, - 8, - 0); - printf("decoderState %d\n", decoderState); - - //dci_decoding(sizeof_bits, 2, currentPtr, polar_input, &dci_decoded_output[current_thread_id][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[current_thread_id][0], sizeof_bits) >> 16) ^ extract_crc(&dci_decoded_output[current_thread_id][0], sizeof_bits); - #ifdef NR_PDCCH_DCI_DEBUG - printf ("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> ... we end function dci_decoding() with crc=%x\n",crc); - printf ("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> ... we have to replace this part of the code by polar decoding\n"); - #endif - #ifdef DEBUG_DCI_DECODING - printf("crc =>%x\n",crc); - #endif //uint16_t tc_rnti, uint16_t int_rnti, uint16_t sfi_rnti, uint16_t tpc_pusch_rnti, uint16_t tpc_pucch_rnti, uint16_t tpc_srs__rnti - #ifdef NR_PDCCH_DCI_DEBUG + crc = rnti; + //crc = (crc16(&dci_decoded_output[current_thread_id][0], sizeof_bits) >> 16) ^ extract_crc(&dci_decoded_output[current_thread_id][0], sizeof_bits); + #ifndef NR_PDCCH_DCI_DEBUG + printf ("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> ... we end function dci_decoding() with crc=%x\n",crc); + printf ("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> ... we have to replace this part of the code by polar decoding\n"); + #endif + #ifdef DEBUG_DCI_DECODING + printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0: crc =>%d\n",crc); + #endif //uint16_t tc_rnti, uint16_t int_rnti, uint16_t sfi_rnti, uint16_t tpc_pusch_rnti, uint16_t tpc_pucch_rnti, uint16_t tpc_srs__rnti + #ifdef NR_PDCCH_DCI_DEBUG printf ("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> format_found=%d\n",*format_found); printf ("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> crc_scrambled=%d\n",*crc_scrambled); #endif @@ -4176,6 +4267,7 @@ void nr_dci_decoding_procedure0(int s, if (crc == crc_scrambled_values[_RA_RNTI_]) { *crc_scrambled =_ra_rnti; *format_found=_format_1_0_found; + printf(""); } if (crc == crc_scrambled_values[_SP_CSI_RNTI_]) { *crc_scrambled =_sp_csi_rnti; @@ -4206,57 +4298,39 @@ void nr_dci_decoding_procedure0(int s, printf ("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> crc_scrambled=%d\n",*crc_scrambled); #endif if (*format_found!=255) { - #ifdef NR_PDCCH_DCI_DEBUG - printf ("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> rnti matches -> DCI FOUND !!! crc =>%x, sizeof_bits %d, sizeof_bytes %d \n",crc, sizeof_bits, sizeof_bytes); - #endif dci_alloc[*dci_cnt].dci_length = sizeof_bits; dci_alloc[*dci_cnt].rnti = crc; dci_alloc[*dci_cnt].L = L; dci_alloc[*dci_cnt].firstCCE = CCEind; - if (sizeof_bytes <= 4) { - dci_alloc[*dci_cnt].dci_pdu[3] = dci_decoded_output[current_thread_id][0]; - dci_alloc[*dci_cnt].dci_pdu[2] = dci_decoded_output[current_thread_id][1]; - dci_alloc[*dci_cnt].dci_pdu[1] = dci_decoded_output[current_thread_id][2]; - dci_alloc[*dci_cnt].dci_pdu[0] = dci_decoded_output[current_thread_id][3]; -#ifdef DEBUG_DCI_DECODING - printf("DCI => %x,%x,%x,%x\n",dci_decoded_output[current_thread_id][0], - dci_decoded_output[current_thread_id][1], - dci_decoded_output[current_thread_id][2], - dci_decoded_output[current_thread_id][3]); -#endif - } else { -/* dci_alloc[*dci_cnt].dci_pdu[7] = dci_decoded_output[current_thread_id][0]; - dci_alloc[*dci_cnt].dci_pdu[6] = dci_decoded_output[current_thread_id][1]; - dci_alloc[*dci_cnt].dci_pdu[5] = dci_decoded_output[current_thread_id][2]; - dci_alloc[*dci_cnt].dci_pdu[4] = dci_decoded_output[current_thread_id][3];*/ - dci_alloc[*dci_cnt].dci_pdu[3] = dci_decoded_output[current_thread_id][0]; - dci_alloc[*dci_cnt].dci_pdu[2] = dci_decoded_output[current_thread_id][1]; - dci_alloc[*dci_cnt].dci_pdu[1] = dci_decoded_output[current_thread_id][2]; - dci_alloc[*dci_cnt].dci_pdu[0] = dci_decoded_output[current_thread_id][3]; - // MAX_DCI_SIZE_BITS has to be redefined for dci_decoded_output FIXME - // format2_0, format2_1 can be longer than 8 bytes. FIXME -#ifdef DEBUG_DCI_DECODING - printf("DCI => %x,%x,%x,%x,%x,%x,%x,%x\n", - dci_decoded_output[current_thread_id][0],dci_decoded_output[current_thread_id][1],dci_decoded_output[current_thread_id][2],dci_decoded_output[current_thread_id][3], - dci_decoded_output[current_thread_id][4],dci_decoded_output[current_thread_id][5],dci_decoded_output[current_thread_id][6],dci_decoded_output[current_thread_id][7]); -#endif - } + dci_alloc[*dci_cnt].dci_pdu[0] = dci_estimation[0]; + dci_alloc[*dci_cnt].dci_pdu[1] = dci_estimation[1]; + dci_alloc[*dci_cnt].dci_pdu[2] = dci_estimation[2]; + dci_alloc[*dci_cnt].dci_pdu[3] = dci_estimation[3]; + #ifdef NR_PDCCH_DCI_DEBUG + printf ("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> rnti matches -> DCI FOUND !!! crc =>%x, sizeof_bits %d, sizeof_bytes %d \n", + dci_alloc[*dci_cnt].rnti, dci_alloc[*dci_cnt].dci_length, sizeof_bytes); + printf ("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> dci_cnt %d (format_css %d crc_scrambled %d) L %d, firstCCE %d pdu[0] %x pdu[1] %x pdu[2] %x pdu[3] %x \n", + *dci_cnt, format_css,*crc_scrambled,dci_alloc[*dci_cnt].L, dci_alloc[*dci_cnt].firstCCE,dci_alloc[*dci_cnt].dci_pdu[0],dci_alloc[*dci_cnt].dci_pdu[1],dci_alloc[*dci_cnt].dci_pdu[2],dci_alloc[*dci_cnt].dci_pdu[3]); + #endif if ((format_css == cformat0_0_and_1_0) || (format_uss == uformat0_0_and_1_0)){ - if ((crc_scrambled == _p_rnti) || (crc_scrambled == _si_rnti) || (crc_scrambled == _ra_rnti)){ + if ((*crc_scrambled == _p_rnti) || (*crc_scrambled == _si_rnti) || (*crc_scrambled == _ra_rnti)){ dci_alloc[*dci_cnt].format = format1_0; *dci_cnt = *dci_cnt + 1; format_found=_format_1_0_found; - } else { - if (dci_decoded_output[current_thread_id][0]&1 == 0){ + printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> a format1_0=%d and dci_cnt=%d\n",format_found,*dci_cnt); + } else { + if (dci_estimation[0]&1 == 0){ dci_alloc[*dci_cnt].format = format0_0; *dci_cnt = *dci_cnt + 1; format_found=_format_0_0_found; + printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> b format0_0=%d and dci_cnt=%d\n",format_found,*dci_cnt); } - if (dci_decoded_output[current_thread_id][0]&1 == 1){ + if (dci_estimation[0]&1 == 1){ dci_alloc[*dci_cnt].format = format1_0; *dci_cnt = *dci_cnt + 1; format_found=_format_1_0_found; - } + printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> c format1_0=%d and dci_cnt=%d\n",format_found,*dci_cnt); + } } } if (format_css == cformat2_0){ @@ -4276,12 +4350,12 @@ void nr_dci_decoding_procedure0(int s, *dci_cnt = *dci_cnt + 1; } if (format_uss == uformat0_1_and_1_1){ - if (dci_decoded_output[current_thread_id][0]&1 == 0){ + if (dci_estimation[0]&1 == 0){ dci_alloc[*dci_cnt].format = format0_1; *dci_cnt = *dci_cnt + 1; format_found=_format_0_1_found; } - if (dci_decoded_output[current_thread_id][0]&1 == 1){ + if (dci_estimation[0]&1 == 1){ dci_alloc[*dci_cnt].format = format1_1; *dci_cnt = *dci_cnt + 1; format_found=_format_1_1_found; @@ -5243,7 +5317,7 @@ uint8_t dci_size [8] = {0,0,0,0,0,0,0,0}; // will contain size for each format i,dci_size[i],n_RB_ULBWP); #endif } -#ifdef NR_PDCCH_DCI_DEBUG +#ifndef NR_PDCCH_DCI_DEBUG printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_format_size) dci_fields_sizes[][] = { \n"); for (int j=0; j Ending function nr_dci_decoding_procedure() -> dci_cnt=%d\n",dci_cnt); #endif - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING, VCD_FUNCTION_OUT); //LOG_D(PHY,"[UE %d][PUSCH] Frame %d nr_tti_rx %d PHICH RX\n",ue->Mod_id,frame_rx,nr_tti_rx); @@ -3466,6 +3465,7 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t * ue->dl_indication.dci_ind = &ue->dci_ind; // hang on rx_ind instance for (int i=0; i Entering function nr_generate_ue_ul_dlsch_params_from_dci with eNB_id=%d dci_cnt=%d\n", + printf("<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> Entering function nr_generate_ue_ul_dlsch_params_from_dci with eNB_id=%d dci_cnt=%d format=%d, rnti=%d\n", eNB_id, - dci_cnt); + dci_cnt, + dci_alloc_rx[i].format, + dci_alloc_rx[i].rnti); #endif + nr_generate_ue_ul_dlsch_params_from_dci(ue, eNB_id, frame_rx, diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 309d3a42ba..0e589a08d8 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -108,7 +108,7 @@ int8_t nr_ue_decode_mib( }else{ //NR_MIB__subCarrierSpacingCommon_scs30or120 scs_pdcch = scs_30kHz; } - + scs_pdcch = 2; channel_bandwidth_t min_channel_bw = bw_40MHz; // deafult for testing @@ -119,6 +119,8 @@ int8_t nr_ue_decode_mib( int32_t num_rbs = -1; int32_t num_symbols = -1; int32_t rb_offset = -1; + printf("<<<<<<<<mib->pdcch_ConfigSIB1,index_4msb,index_4lsb,scs_ssb,scs_pdcch, (scs_ssb << 5)|scs_pdcch); // type0-pdcch coreset switch( (scs_ssb << 5)|scs_pdcch ){ @@ -161,6 +163,7 @@ int8_t nr_ue_decode_mib( num_rbs = table_38213_13_4_c2[index_4msb]; num_symbols = table_38213_13_4_c3[index_4msb]; rb_offset = table_38213_13_4_c4[index_4msb]; + printf("<<<<<<<<type0_pdcch_ss_mux_pattern = 1; @@ -247,6 +250,7 @@ int8_t nr_ue_decode_mib( mask = mask >> 1; mask = mask | 0x100000000000; } + printf(">>>>>>>>mask 0x%16x num_rbs %d rb_offset %d\n", mask, num_rbs, rb_offset); mac->type0_pdcch_dci_config.coreset.frequency_domain_resource = mask; mac->type0_pdcch_dci_config.coreset.rb_offset = rb_offset; // additional parameter other than coreset From 3dbd5964484bdac7a1055288d5b722e8c2ad9ca3 Mon Sep 17 00:00:00 2001 From: laurent Date: Thu, 27 Sep 2018 15:09:59 +0200 Subject: [PATCH 247/379] after testing --- cmake_targets/CMakeLists.txt | 2 +- openair1/SCHED/phy_procedures_lte_eNb.c | 3 -- openair1/SIMULATION/LTE_PHY/ulsim.c | 55 +++++++++++++++---------- 3 files changed, 34 insertions(+), 26 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index c574b7f671..51db2c60bf 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -185,7 +185,7 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CU # these changes are related to hardcoded path to include .h files add_definitions(-DCMAKER) set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3") -set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3 -O0") +set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3 -O2") set(GIT_BRANCH "UNKNOWN") diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index ece22a05fb..276006ec3b 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -2084,7 +2084,4 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC, 0 ); - - stop_meas(&eNB->phy_proc_rx); - } diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index 14efab9e39..eecee64c84 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -353,8 +353,16 @@ void printDistribution(time_stats_t *ptr, varArray_t *sortedList, char *txt) { txt, (double)ptr->diff/ptr->trials*timeBase, ptr->trials); - printf("|__ Statistics std: %.2f us median %.2fus q1 %.2fus q3 %.2fus \n", - squareRoot(ptr), median(sortedList),q1(sortedList),q3(sortedList)); + printf("|__ Statistics std=%.2f, median=%.2f, q1=%.2f, q3=%.2f µs (on %ld trials)\n", + squareRoot(ptr), median(sortedList),q1(sortedList),q3(sortedList), sortedList->size); +} + +void logDistribution(FILE* fd, time_stats_t *ptr, varArray_t *sortedList, int dropped) { + fprintf(fd,"%f;%f;%f;%f;%f;%f;%d;", + squareRoot(ptr), + (double)ptr->max, *(double*)dataArray(sortedList), + median(sortedList),q1(sortedList),q3(sortedList), + dropped); } enum eTypes { eBool, eInt, eFloat, eText }; @@ -1018,6 +1026,7 @@ int main(int argc, char **argv) { reset_meas(&eNB->ulsch_deinterleaving_stats); reset_meas(&eNB->ulsch_demultiplexing_stats); reset_meas(&eNB->ulsch_rate_unmatching_stats); + reset_meas(&eNB->ulsch_demodulation_stats); reset_meas(&eNB->ulsch_tc_init_stats); reset_meas(&eNB->ulsch_tc_alpha_stats); reset_meas(&eNB->ulsch_tc_beta_stats); @@ -1244,11 +1253,13 @@ int main(int argc, char **argv) { if (eNB->frame_parms.nb_antennas_rx>1) LOG_M("rxsig1UL.m","rxs1", &ru->common.rxdata[1][eNB->frame_parms.samples_per_tti*subframe],eNB->frame_parms.samples_per_tti,1,1); } + start_meas(&eNB->phy_proc_rx); ru->feprx = (parallel_flag == 1) ? ru_fep_full_2thread : fep_full; eNB->td = (parallel_flag == 1) ? ulsch_decoding_data_2thread : ulsch_decoding_data; ru->feprx(ru); phy_procedures_eNB_uespec_RX(eNB,proc_rxtx); - + stop_meas(&eNB->phy_proc_rx); + if (cqi_flag > 0) { cqi_error = 0; @@ -1375,14 +1386,6 @@ int main(int argc, char **argv) { LOG_UDUMPMSG(SIM,dataArray(table_rx),table_rx->size,LOG_DUMP_DOUBLE,"The receiver raw data: \n"); } - double std_phy_proc_tx= squareRoot(&UE->phy_proc_tx); - double std_phy_proc_tx_ifft= squareRoot(&UE->ofdm_mod_stats); - double std_phy_proc_tx_mod= squareRoot(&UE->ulsch_modulation_stats); - double std_phy_proc_tx_enc= squareRoot(&UE->ulsch_encoding_stats); - double std_phy_proc_rx = squareRoot(&eNB->phy_proc_rx); - double std_phy_proc_rx_fft = squareRoot(&ru->ofdm_demod_stats); - double std_phy_proc_rx_demod = squareRoot(&eNB->ulsch_demodulation_stats); - double std_phy_proc_rx_dec = squareRoot(&eNB->ulsch_decoding_stats); printf("\n**********rb: %d ***mcs : %d *********SNR = %f dB (%f): TX %d dB (gain %f dB), N0W %f dB, I0 %d dB, delta_IF %d [ (%d,%d) dB / (%d,%d) dB ]**************************\n", nb_rb,mcs,SNR,SNR2, tx_lev_dB, @@ -1453,7 +1456,7 @@ int main(int argc, char **argv) { printStatIndent(&UE->ulsch_rate_matching_stats,"ULSCH rate-matching time"); printStatIndent(&UE->ulsch_interleaving_stats,"ULSCH sub-block interleaving"); printStatIndent(&UE->ulsch_multiplexing_stats,"ULSCH multiplexing time"); - printDistribution(&eNB->phy_proc_rx,table_rx,"Total PHY proc rx"); + printDistribution(&eNB->phy_proc_rx,table_rx,"\nTotal PHY proc rx subframe"); printDistribution(&ru->ofdm_demod_stats,table_rx_fft,"OFDM_demod time"); printDistribution(&eNB->ulsch_demodulation_stats,table_rx_demod,"ULSCH demodulation time"); printf("ULSCH Decoding time (%.2f Mbit/s, avg iter %.2f) :%.2f us (%d trials, max %.2f)\n", @@ -1461,8 +1464,8 @@ int main(int argc, char **argv) { (double)eNB->ulsch_decoding_stats.diff/eNB->ulsch_decoding_stats.trials*timeBase, eNB->ulsch_decoding_stats.trials, (double)eNB->ulsch_decoding_stats.max*timeBase); - printf("|__ Statistcs std: %.2fus median %.2fus q1 %.2fus q3 %.2fus \n", - std_phy_proc_rx_dec, + printf("|__ Statistics std: %.2fus median %.2fus q1 %.2fus q3 %.2fus \n", + squareRoot(&eNB->ulsch_decoding_stats), median(table_rx_dec), q1(table_rx_dec), q3(table_rx_dec)); printStatIndent(&eNB->ulsch_deinterleaving_stats,"sub-block interleaving" ); printStatIndent(&eNB->ulsch_demultiplexing_stats,"sub-block demultiplexing" ); @@ -1559,27 +1562,35 @@ int main(int argc, char **argv) { get_time_meas_us(&eNB->ulsch_decoding_stats) ); //fprintf(time_meas_fd,"UE_PROC_TX_STD;UE_PROC_TX_MAX;UE_PROC_TX_MIN;UE_PROC_TX_MED;UE_PROC_TX_Q1;UE_PROC_TX_Q3;UE_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, median(table_tx), q1(table_tx), q3(table_tx), n_tx_dropped); + fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;", + squareRoot(&UE->phy_proc_tx), t_tx_max, t_tx_min, median(table_tx), q1(table_tx), q3(table_tx), n_tx_dropped); //fprintf(time_meas_fd,"IFFT;\n"); - fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_ifft, + fprintf(time_meas_fd,"%f;%f;%f;%f;", + squareRoot(&UE->ofdm_mod_stats), median(table_tx_ifft),q1(table_tx_ifft),q3(table_tx_ifft)); //fprintf(time_meas_fd,"MOD;\n"); - fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_mod, + fprintf(time_meas_fd,"%f;%f;%f;%f;", + squareRoot(&UE->ulsch_modulation_stats), median(table_tx_mod), q1(table_tx_mod), q3(table_tx_mod)); //fprintf(time_meas_fd,"ENC;\n"); - fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_enc, + fprintf(time_meas_fd,"%f;%f;%f;%f;", + squareRoot(&UE->ulsch_encoding_stats), median(table_tx_enc),q1(table_tx_enc),q3(table_tx_enc)); //fprintf(time_meas_fd,"eNB_PROC_RX_STD;eNB_PROC_RX_MAX;eNB_PROC_RX_MIN;eNB_PROC_RX_MED;eNB_PROC_RX_Q1;eNB_PROC_RX_Q3;eNB_PROC_RX_DROPPED;\n"); - fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;", std_phy_proc_rx, t_rx_max, t_rx_min, + fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;", + squareRoot(&eNB->phy_proc_rx), t_rx_max, t_rx_min, median(table_rx), q1(table_rx), q3(table_rx), n_rx_dropped); //fprintf(time_meas_fd,"FFT;\n"); - fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_rx_fft, + fprintf(time_meas_fd,"%f;%f;%f;%f;", + squareRoot(&ru->ofdm_demod_stats), median(table_rx_fft), q1(table_rx_fft), q3(table_rx_fft)); //fprintf(time_meas_fd,"DEMOD;\n"); - fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_rx_demod, + fprintf(time_meas_fd,"%f;%f;%f;%f;", + squareRoot(&eNB->ulsch_demodulation_stats), median(table_rx_demod), q1(table_rx_demod), q3(table_rx_demod)); //fprintf(time_meas_fd,"DEC;\n"); - fprintf(time_meas_fd,"%f;%f;%f;%f\n", std_phy_proc_rx_dec, + fprintf(time_meas_fd,"%f;%f;%f;%f\n", + squareRoot(&eNB->ulsch_decoding_stats), median(table_rx_dec), q1(table_rx_dec), q3(table_rx_dec)); printf("[passed] effective rate : %f (%2.1f%%,%f)): log and break \n",rate*effective_rate, 100*effective_rate, rate ); break; From cf99ea1937a1674855930cb148e65a888b35be2d Mon Sep 17 00:00:00 2001 From: Agustin Date: Thu, 27 Sep 2018 15:21:30 +0200 Subject: [PATCH 248/379] NR PDCCH development: modifications for interpreting DCI formats 0_1 and 1_1 --- .../nfapi/public_inc/fapi_nr_ue_interface.h | 42 +- openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c | 133 +-- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 839 ++++++++++++++++-- 3 files changed, 825 insertions(+), 189 deletions(-) diff --git a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h index d6fafae7f1..a1f4d3b856 100644 --- a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h +++ b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h @@ -226,7 +226,11 @@ typedef struct { } fapi_nr_ul_config_pucch_pdu; typedef enum {pusch_freq_hopping_disabled = 0 , pusch_freq_hopping_enabled = 1}pusch_freq_hopping_t; + typedef struct{ + uint8_t aperiodicSRS_ResourceTrigger; + } fapi_nr_ul_srs_config_t; typedef struct { + uint8_t bandwidth_part_ind; uint16_t number_rbs; uint16_t start_rb; uint16_t number_symbols; @@ -238,6 +242,16 @@ typedef struct { uint8_t harq_process_nbr; int8_t accumulated_delta_PUSCH; int8_t absolute_delta_PUSCH; + uint8_t n_layers; + uint8_t tpmi; + uint8_t n_dmrs_cdm_groups; + uint8_t dmrs_ports[4]; + uint8_t n_front_load_symb; + fapi_nr_ul_srs_config_t srs_config; + uint8_t csi_reportTriggerSize; + uint8_t maxCodeBlockGroupsPerTransportBlock; + uint8_t ptrs_dmrs_association_port; + uint8_t beta_offset_ind; } fapi_nr_ul_config_pusch_pdu_rel15_t; typedef struct { @@ -278,14 +292,21 @@ typedef struct { typedef struct { fapi_nr_dl_config_dci_dl_pdu_rel15_t dci_config_rel15; } fapi_nr_dl_config_dci_pdu; + typedef struct{ + uint8_t aperiodicSRS_ResourceTrigger; + } fapi_nr_dl_srs_config_t; typedef enum{vrb_to_prb_mapping_non_interleaved = 0, vrb_to_prb_mapping_interleaved = 1} vrb_to_prb_mapping_t; //typedef fapi_nr_dci_pdu_rel15_t fapi_nr_dl_config_dlsch_pdu_rel15_t; typedef struct { + uint8_t bandwidth_part_ind; uint16_t number_rbs; uint16_t start_rb; uint16_t number_symbols; uint16_t start_symbol; + uint8_t prb_bundling_size_ind; + uint8_t rate_matching_ind; + uint8_t zp_csi_rs_trigger; uint8_t mcs; uint8_t ndi; uint8_t rv; @@ -299,6 +320,13 @@ typedef struct { int8_t accumulated_delta_PUCCH; uint8_t pucch_resource_id; uint8_t pdsch_to_harq_feedback_time_ind; + uint8_t n_dmrs_cdm_groups; + uint8_t dmrs_ports[10]; + uint8_t n_front_load_symb; + uint8_t tci_state; + fapi_nr_dl_srs_config_t srs_config; + uint8_t cbgti; + uint8_t codeBlockGroupFlushIndicator; // to be check the fields needed to L1 with NR_DL_UE_HARQ_t and NR_UE_DLSCH_t } fapi_nr_dl_config_dlsch_pdu_rel15_t; @@ -597,7 +625,7 @@ typedef struct { typedef struct { uint8_t dmrs_type; uint8_t dmrs_addition_position; - + uint8_t ptrs_uplink_config; // to indicate if PTRS Uplink is configured of not uint8_t ptrs_type; //cp-OFDM, dft-S-OFDM uint16_t ptrs_frequency_density[2]; uint8_t ptrs_time_density[3]; @@ -623,9 +651,15 @@ typedef struct { uint8_t delta_mcs; } fapi_nr_pusch_power_control_t; + typedef enum {tx_config_codebook = 1, tx_config_nonCodebook = 2} tx_config_t; + typedef enum {transform_precoder_disabled = 0, transform_precoder_enabled = 1} transform_precoder_t; + typedef enum { + codebook_subset_fullyAndPartialAndNonCoherent = 1, + codebook_subset_partialAndNonCoherent = 2, + codebook_subset_nonCoherent = 3} codebook_subset_t; typedef struct { uint16_t data_scrambling_identity; - uint8_t tx_config; + tx_config_t tx_config; fapi_nr_dmrs_uplink_config_t dmrs_ul_for_pusch_mapping_type_a; fapi_nr_dmrs_uplink_config_t dmrs_ul_for_pusch_mapping_type_b; fapi_nr_pusch_power_control_t pusch_power_control; @@ -636,8 +670,8 @@ typedef struct { uint8_t pusch_aggregation_factor; uint8_t mcs_table; uint8_t mcs_table_transform_precoder; - uint8_t transform_precoder; - uint8_t codebook_subset; + transform_precoder_t transform_precoder; + codebook_subset_t codebook_subset; uint8_t max_rank; uint8_t rbg_size; diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c index 5980ed3bb6..a8acc735a9 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c @@ -7157,8 +7157,8 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue, NR_UE_ULSCH_t *ulsch0=NULL,*ulsch1=NULL; //NR_DCI_INFO_EXTRACTED_t nr_dci_info_extracted; uint8_t status=0;//left_shift=0; - uint64_t pdu_bitmap = 0xFFFFFFFFFFFFFFFF; - pdu_bitmap = (pdu_bitmap << (64 - dci_length)) >> (64 - dci_length); // this variable will help to remove the bits of other fields when left-switching + //uint64_t pdu_bitmap = 0xFFFFFFFFFFFFFFFF; + //pdu_bitmap = (pdu_bitmap << (64 - dci_length)) >> (64 - dci_length); // this variable will help to remove the bits of other fields when left-switching uint8_t dci_fields_sizes_format[NBR_NR_DCI_FIELDS] ={0}; for (int m=0; m Entering function nr_extract_dci_info(dci_format=%d) \n",dci_format); - #endif - status = nr_extract_dci_info(ue, - eNB_id, - frame_type, - dci_length, - rnti, - dci_pdu, - &nr_dci_info_extracted, - dci_fields_sizes, - dlsch0_harq, - dlsch0, - ulsch0, - dci_format, - nr_tti_rx, - n_RB_ULBWP, - n_RB_DLBWP, - crc_scrambled_values); - //status = check_dci_format1_1a_coherency(format1_1, frame_parms->N_RB_DL, rnti, tc_rnti, si_rnti, ra_rnti, p_rnti,frame,nr_tti_rx, &nr_dci_info_extracted, dlsch0_harq); - #ifdef NR_PDCCH_DCI_TOOLS_DEBUG - if(status == 0) - { - printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> bad DCI %d !!! \n",dci_format); - return(-1); - } - #endif -// break; -/* - case format0_1: - #ifdef NR_PDCCH_DCI_TOOLS_DEBUG - printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> format %d not implemented yet\n",dci_format); - #endif - break; - - case format1_0: - #ifdef NR_PDCCH_DCI_TOOLS_DEBUG - printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> Entering function nr_extract_dci_info(dci_format=%d)for PDSCH allocation\n",dci_format); - #endif - status = nr_extract_dci_info(ue, - eNB_id, - frame_type, - dci_length, - dci_pdu,rnti, - &nr_dci_info_extracted, - dci_fields_sizes, - dlsch0_harq, - dlsch0, - ulsch0, - dci_format, - nr_tti_rx, - n_RB_ULBWP, - n_RB_DLBWP,crc_scrambled_values); - //status = check_dci_format1_1a_coherency(format1_1, frame_parms->N_RB_DL, rnti, tc_rnti, si_rnti, ra_rnti, p_rnti,frame,nr_tti_rx, &nr_dci_info_extracted, dlsch0_harq); - #ifdef NR_PDCCH_DCI_TOOLS_DEBUG - if(status == 0) - { - printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> bad DCI %d !!! \n",dci_format); - return(-1); - } - #endif - break; - - case format1_1: - #ifdef NR_PDCCH_DCI_TOOLS_DEBUG - printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> format %d not implemented yet\n",dci_format); - #endif - break; - - case format2_0: - #ifdef NR_PDCCH_DCI_TOOLS_DEBUG - printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> format %d not implemented yet\n",dci_format); - #endif - break; - - case format2_1: - #ifdef NR_PDCCH_DCI_TOOLS_DEBUG - printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> format %d not implemented yet\n",dci_format); - #endif - break; - - case format2_2: - #ifdef NR_PDCCH_DCI_TOOLS_DEBUG - printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> format %d not implemented yet\n",dci_format); - #endif - break; - - case format2_3: - #ifdef NR_PDCCH_DCI_TOOLS_DEBUG - printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> format %d not implemented yet\n",dci_format); - #endif - break; - - default: - printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> we go to the default in switch\n"); - //LOG_E(PHY,"format %d not yet implemented\n",dci_format); - return(-1); - break; - }*/ #ifdef NR_PDCCH_DCI_TOOLS_DEBUG + printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> Entering function nr_extract_dci_info(dci_format=%d) \n",dci_format); + #endif + status = nr_extract_dci_info(ue, + eNB_id, + frame_type, + dci_length, + rnti, + dci_pdu, + &nr_dci_info_extracted, + dci_fields_sizes, + dlsch0_harq, + dlsch0, + ulsch0, + dci_format, + nr_tti_rx, + n_RB_ULBWP, + n_RB_DLBWP, + crc_scrambled_values); + //status = check_dci_format1_1a_coherency(format1_1, frame_parms->N_RB_DL, rnti, tc_rnti, si_rnti, ra_rnti, p_rnti,frame,nr_tti_rx, &nr_dci_info_extracted, dlsch0_harq); + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG + if(status == 0) { + printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> bad DCI %d !!! \n",dci_format); + return(-1); + } printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> Ending function nr_extract_dci_info()\n"); #endif return(0); } - - - #endif #if 0 int generate_ue_dlsch_params_from_dci(int frame, diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 0e589a08d8..b04540f972 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -547,7 +547,365 @@ NR_UE_L2_STATE_t nr_ue_scheduler( * This code contains all the functions needed to process all dci fields. * These functions are going to be called by function nr_ue_process_dci */ - +// table_7_3_1_1_2_2_3_4_5 contains values for number of layers and precoding information for tables 7.3.1.1.2-2/3/4/5 from TS 38.212 subclause 7.3.1.1.2 +// the first 6 columns contain table 7.3.1.1.2-2: Precoding information and number of layers, for 4 antenna ports, if transformPrecoder=disabled and maxRank = 2 or 3 or 4 +// next six columns contain table 7.3.1.1.2-3: Precoding information and number of layers for 4 antenna ports, if transformPrecoder= enabled, or if transformPrecoder=disabled and maxRank = 1 +// next four columns contain table 7.3.1.1.2-4: Precoding information and number of layers, for 2 antenna ports, if transformPrecoder=disabled and maxRank = 2 +// next four columns contain table 7.3.1.1.2-5: Precoding information and number of layers, for 2 antenna ports, if transformPrecoder= enabled, or if transformPrecoder= disabled and maxRank = 1 +uint8_t table_7_3_1_1_2_2_3_4_5[63][20] = { +{1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0}, +{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, +{1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 0, 2, 0, 1, 2, 0, 0}, +{1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 2, 0, 0, 1, 3, 0, 0}, +{2, 0, 2, 0, 2, 0, 1, 4, 1, 4, 0, 0, 1, 3, 0, 0, 1, 4, 0, 0}, +{2, 1, 2, 1, 2, 1, 1, 5, 1, 5, 0, 0, 1, 4, 0, 0, 1, 5, 0, 0}, +{2, 2, 2, 2, 2, 2, 1, 6, 1, 6, 0, 0, 1, 5, 0, 0, 0, 0, 0, 0}, +{2, 3, 2, 3, 2, 3, 1, 7, 1, 7, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0}, +{2, 4, 2, 4, 2, 4, 1, 8, 1, 8, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0}, +{2, 5, 2, 5, 2, 5, 1, 9, 1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{3, 0, 3, 0, 3, 0, 1, 10, 1, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{4, 0, 4, 0, 4, 0, 1, 11, 1, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 4, 1, 4, 0, 0, 1, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 5, 1, 5, 0, 0, 1, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 6, 1, 6, 0, 0, 1, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 7, 1, 7, 0, 0, 1, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 8, 1, 8, 0, 0, 1, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 9, 1, 9, 0, 0, 1, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 10, 1, 10, 0, 0, 1, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 11, 1, 11, 0, 0, 1, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{2, 6, 2, 6, 0, 0, 1, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{2, 7, 2, 7, 0, 0, 1, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{2, 8, 2, 8, 0, 0, 1, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{2, 9, 2, 9, 0, 0, 1, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{2, 10, 2, 10, 0, 0, 1, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{2, 11, 2, 11, 0, 0, 1, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{2, 12, 2, 12, 0, 0, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{2, 13, 2, 13, 0, 0, 1, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{3, 1, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{3, 2, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{4, 1, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{4, 2, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{1, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{2, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{2, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{2, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{2, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{2, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{2, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{2, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{2, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{3, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{3, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{4, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +}; +uint8_t table_7_3_1_1_2_12[14][3] = { +{1,0,1}, +{1,1,1}, +{2,0,1}, +{2,1,1}, +{2,2,1}, +{2,3,1}, +{2,0,2}, +{2,1,2}, +{2,2,2}, +{2,3,2}, +{2,4,2}, +{2,5,2}, +{2,6,2}, +{2,7,2} +}; +uint8_t table_7_3_1_1_2_13[10][4] = { +{1,0,1,1}, +{2,0,1,1}, +{2,2,3,1}, +{2,0,2,1}, +{2,0,1,2}, +{2,2,3,2}, +{2,4,5,2}, +{2,6,7,2}, +{2,0,4,2}, +{2,2,6,2} +}; +uint8_t table_7_3_1_1_2_14[3][5] = { +{2,0,1,2,1}, +{2,0,1,4,2}, +{2,2,3,6,2} +}; +uint8_t table_7_3_1_1_2_15[4][6] = { +{2,0,1,2,3,1}, +{2,0,1,4,5,2}, +{2,2,3,6,7,2}, +{2,0,2,4,6,2} +}; +uint8_t table_7_3_1_1_2_16[12][2] = { +{1,0}, +{1,1}, +{2,0}, +{2,1}, +{2,2}, +{2,3}, +{3,0}, +{3,1}, +{3,2}, +{3,3}, +{3,4}, +{3,5} +}; +uint8_t table_7_3_1_1_2_17[7][3] = { +{1,0,1}, +{2,0,1}, +{2,2,3}, +{3,0,1}, +{3,2,3}, +{3,4,5}, +{2,0,2} +}; +uint8_t table_7_3_1_1_2_18[3][4] = { +{2,0,1,2}, +{3,0,1,2}, +{3,3,4,5} +}; +uint8_t table_7_3_1_1_2_19[2][5] = { +{2,0,1,2,3}, +{3,0,1,2,3} +}; +uint8_t table_7_3_1_1_2_20[28][3] = { +{1,0,1}, +{1,1,1}, +{2,0,1}, +{2,1,1}, +{2,2,1}, +{2,3,1}, +{3,0,1}, +{3,1,1}, +{3,2,1}, +{3,3,1}, +{3,4,1}, +{3,5,1}, +{3,0,2}, +{3,1,2}, +{3,2,2}, +{3,3,2}, +{3,4,2}, +{3,5,2}, +{3,6,2}, +{3,7,2}, +{3,8,2}, +{3,9,2}, +{3,10,2}, +{3,11,2}, +{1,0,2}, +{1,1,2}, +{1,6,2}, +{1,7,2} +}; +uint8_t table_7_3_1_1_2_21[19][4] = { +{1,0,1,1}, +{2,0,1,1}, +{2,2,3,1}, +{3,0,1,1}, +{3,2,3,1}, +{3,4,5,1}, +{2,0,2,1}, +{3,0,1,2}, +{3,2,3,2}, +{3,4,5,2}, +{3,6,7,2}, +{3,8,9,2}, +{3,10,11,2}, +{1,0,1,2}, +{1,6,7,2}, +{2,0,1,2}, +{2,2,3,2}, +{2,6,7,2}, +{2,8,9,2} +}; +uint8_t table_7_3_1_1_2_22[6][5] = { +{2,0,1,2,1}, +{3,0,1,2,1}, +{3,3,4,5,1}, +{3,0,1,6,2}, +{3,2,3,8,2}, +{3,4,5,10,2} +}; +uint8_t table_7_3_1_1_2_23[5][6] = { +{2,0,1,2,3,1}, +{3,0,1,2,3,1}, +{3,0,1,6,7,2}, +{3,2,3,8,9,2}, +{3,4,5,10,11,2} +}; +uint8_t table_7_3_2_3_3_1[12][5] = { +{1,0,0,0,0}, +{1,1,0,0,0}, +{1,0,1,0,0}, +{2,0,0,0,0}, +{2,1,0,0,0}, +{2,2,0,0,0}, +{2,3,0,0,0}, +{2,0,1,0,0}, +{2,2,3,0,0}, +{2,0,1,2,0}, +{2,0,1,2,3}, +{2,0,2,0,0} +}; +uint8_t table_7_3_2_3_3_2_oneCodeword[31][6] = { +{1,0,0,0,0,1}, +{1,1,0,0,0,1}, +{1,0,1,0,0,1}, +{2,0,0,0,0,1}, +{2,1,0,0,0,1}, +{2,2,0,0,0,1}, +{2,3,0,0,0,1}, +{2,0,1,0,0,1}, +{2,2,3,0,0,1}, +{2,0,1,2,0,1}, +{2,0,1,2,3,1}, +{2,0,2,0,0,1}, +{2,0,0,0,0,2}, +{2,1,0,0,0,2}, +{2,2,0,0,0,2}, +{2,3,0,0,0,2}, +{2,4,0,0,0,2}, +{2,5,0,0,0,2}, +{2,6,0,0,0,2}, +{2,7,0,0,0,2}, +{2,0,1,0,0,2}, +{2,2,3,0,0,2}, +{2,4,5,0,0,2}, +{2,6,7,0,0,2}, +{2,0,4,0,0,2}, +{2,2,6,0,0,2}, +{2,0,1,4,0,2}, +{2,2,3,6,0,2}, +{2,0,1,4,5,2}, +{2,2,3,6,7,2}, +{2,0,2,4,6,2} +}; +uint8_t table_7_3_2_3_3_2_twoCodeword[4][10] = { +{2,0,1,2,3,4,0,0,0,2}, +{2,0,1,2,3,4,6,0,0,2}, +{2,0,1,2,3,4,5,6,0,2}, +{2,0,1,2,3,4,5,6,7,2} +}; +uint8_t table_7_3_2_3_3_3_oneCodeword[24][5] = { +{1,0,0,0,0}, +{1,1,0,0,0}, +{1,0,1,0,0}, +{2,0,0,0,0}, +{2,1,0,0,0}, +{2,2,0,0,0}, +{2,3,0,0,0}, +{2,0,1,0,0}, +{2,2,3,0,0}, +{2,0,1,2,0}, +{2,0,1,2,3}, +{3,0,0,0,0}, +{3,1,0,0,0}, +{3,2,0,0,0}, +{3,3,0,0,0}, +{3,4,0,0,0}, +{3,5,0,0,0}, +{3,0,1,0,0}, +{3,2,3,0,0}, +{3,4,5,0,0}, +{3,0,1,2,0}, +{3,3,4,5,0}, +{3,0,1,2,3}, +{2,0,2,0,0} +}; +uint8_t table_7_3_2_3_3_3_twoCodeword[2][7] = { +{3,0,1,2,3,4,0}, +{3,0,1,2,3,4,5} +}; +uint8_t table_7_3_2_3_3_4_oneCodeword[58][6] = { +{1,0,0,0,0,1}, +{1,1,0,0,0,1}, +{1,0,1,0,0,1}, +{2,0,0,0,0,1}, +{2,1,0,0,0,1}, +{2,2,0,0,0,1}, +{2,3,0,0,0,1}, +{2,0,1,0,0,1}, +{2,2,3,0,0,1}, +{2,0,1,2,0,1}, +{2,0,1,2,3,1}, +{3,0,0,0,0,1}, +{3,1,0,0,0,1}, +{3,2,0,0,0,1}, +{3,3,0,0,0,1}, +{3,4,0,0,0,1}, +{3,5,0,0,0,1}, +{3,0,1,0,0,1}, +{3,2,3,0,0,1}, +{3,4,5,0,0,1}, +{3,0,1,2,0,1}, +{3,3,4,5,0,1}, +{3,0,1,2,3,1}, +{2,0,2,0,0,1}, +{3,0,0,0,0,2}, +{3,1,0,0,0,2}, +{3,2,0,0,0,2}, +{3,3,0,0,0,2}, +{3,4,0,0,0,2}, +{3,5,0,0,0,2}, +{3,6,0,0,0,2}, +{3,7,0,0,0,2}, +{3,8,0,0,0,2}, +{3,9,0,0,0,2}, +{3,10,0,0,0,2}, +{3,11,0,0,0,2}, +{3,0,1,0,0,2}, +{3,2,3,0,0,2}, +{3,4,5,0,0,2}, +{3,6,7,0,0,2}, +{3,8,9,0,0,2}, +{3,10,11,0,0,2}, +{3,0,1,6,0,2}, +{3,2,3,8,0,2}, +{3,4,5,10,0,2}, +{3,0,1,6,7,2}, +{3,2,3,8,9,2}, +{3,4,5,10,11,2}, +{1,0,0,0,0,2}, +{1,1,0,0,0,2}, +{1,6,0,0,0,2}, +{1,7,0,0,0,2}, +{1,0,1,0,0,2}, +{1,6,7,0,0,2}, +{2,0,1,0,0,2}, +{2,2,3,0,0,2}, +{2,6,7,0,0,2}, +{2,8,9,0,0,2} +}; +uint8_t table_7_3_2_3_3_4_twoCodeword[6][10] = { +{3,0,1,2,3,4,0,0,0,1}, +{3,0,1,2,3,4,5,0,0,1}, +{2,0,1,2,3,6,0,0,0,2}, +{2,0,1,2,3,6,8,0,0,2}, +{2,0,1,2,3,6,7,8,0,2}, +{2,0,1,2,3,6,7,8,9,2} +}; int8_t nr_ue_process_dci_freq_dom_resource_assignment( fapi_nr_ul_config_pusch_pdu_rel15_t *ulsch_config_pdu, fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu, @@ -797,24 +1155,24 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fa ul_config->ul_config_list[ul_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_PUSCH; ul_config->ul_config_list[ul_config->number_pdus].ulsch_config_pdu.rnti = rnti; fapi_nr_ul_config_pusch_pdu_rel15_t *ulsch_config_pdu_0_0 = &ul_config->ul_config_list[ul_config->number_pdus].ulsch_config_pdu.ulsch_pdu_rel15; - /* IDENTIFIER_DCI_FORMATS */ - /* FREQ_DOM_RESOURCE_ASSIGNMENT_UL */ + /* IDENTIFIER_DCI_FORMATS */ + /* FREQ_DOM_RESOURCE_ASSIGNMENT_UL */ nr_ue_process_dci_freq_dom_resource_assignment(&ulsch_config_pdu_0_0,NULL,n_RB_ULBWP,0,dci->freq_dom_resource_assignment_UL); - /* TIME_DOM_RESOURCE_ASSIGNMENT */ + /* TIME_DOM_RESOURCE_ASSIGNMENT */ nr_ue_process_dci_time_dom_resource_assignment(&ulsch_config_pdu_0_0,NULL,dci->time_dom_resource_assignment,mac->mib->dmrs_TypeA_Position); - /* FREQ_HOPPING_FLAG */ + /* FREQ_HOPPING_FLAG */ if ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.resource_allocation != 0) && (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.frequency_hopping !=0)) ulsch_config_pdu_0_0->pusch_freq_hopping = (dci->freq_hopping_flag == 0)? pusch_freq_hopping_disabled:pusch_freq_hopping_enabled; - /* MCS */ + /* MCS */ ulsch_config_pdu_0_0->mcs = dci->mcs; - /* NDI */ + /* NDI */ ulsch_config_pdu_0_0->ndi = dci->ndi; - /* RV */ + /* RV */ ulsch_config_pdu_0_0->rv = dci->rv; - /* HARQ_PROCESS_NUMBER */ + /* HARQ_PROCESS_NUMBER */ ulsch_config_pdu_0_0->harq_process_nbr = dci->harq_process_number; - /* TPC_PUSCH */ + /* TPC_PUSCH */ // according to TS 38.213 Table Table 7.1.1-1 if (dci->tpc_pusch == 0) { ulsch_config_pdu_0_0->accumulated_delta_PUSCH = -1; @@ -832,12 +1190,9 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fa ulsch_config_pdu_0_0->accumulated_delta_PUSCH = 3; ulsch_config_pdu_0_0->absolute_delta_PUSCH = 4; } - /* SUL_IND_0_0 */ // To be implemented, FIXME!!! - // UL_CONFIG_REQ - //ulsch0->harq_processes[dci->harq_process_number]->first_rb = start_RB; - //ulsch0->harq_processes[dci->harq_process_number]->nb_rb = l_RB; - //ulsch0->harq_processes[dci->harq_process_number]->mcs = dci->mcs; - //ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->DCINdi= nr_pdci_info_extracted->ndi; + /* SUL_IND_0_0 */ // To be implemented, FIXME!!! + + ul_config->number_pdus = ul_config->number_pdus + 1; break; case format0_1: @@ -872,42 +1227,272 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fa ul_config->ul_config_list[ul_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_PUSCH; ul_config->ul_config_list[ul_config->number_pdus].ulsch_config_pdu.rnti = rnti; fapi_nr_ul_config_pusch_pdu_rel15_t *ulsch_config_pdu_0_1 = &ul_config->ul_config_list[ul_config->number_pdus].ulsch_config_pdu.ulsch_pdu_rel15; - /* FREQ_DOM_RESOURCE_ASSIGNMENT_UL */ + /* IDENTIFIER_DCI_FORMATS */ + /* CARRIER_IND */ + /* SUL_IND_0_1 */ + /* BANDWIDTH_PART_IND */ + ulsch_config_pdu_0_1->bandwidth_part_ind = dci->bandwidth_part_ind; + /* FREQ_DOM_RESOURCE_ASSIGNMENT_UL */ nr_ue_process_dci_freq_dom_resource_assignment(&ulsch_config_pdu_0_1,NULL,n_RB_ULBWP,0,dci->freq_dom_resource_assignment_UL); - /* TIME_DOM_RESOURCE_ASSIGNMENT */ + /* TIME_DOM_RESOURCE_ASSIGNMENT */ nr_ue_process_dci_time_dom_resource_assignment(&ulsch_config_pdu_0_1,NULL,dci->time_dom_resource_assignment,mac->mib->dmrs_TypeA_Position); - /* FREQ_HOPPING_FLAG */ + /* FREQ_HOPPING_FLAG */ if ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.resource_allocation != 0) && (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.frequency_hopping !=0)) ulsch_config_pdu_0_1->pusch_freq_hopping = (dci->freq_hopping_flag == 0)? pusch_freq_hopping_disabled:pusch_freq_hopping_enabled; - /* MCS */ + /* MCS */ ulsch_config_pdu_0_1->mcs = dci->mcs; - /* NDI */ + /* NDI */ ulsch_config_pdu_0_1->ndi = dci->ndi; - /* RV */ + /* RV */ ulsch_config_pdu_0_1->rv = dci->rv; - /* HARQ_PROCESS_NUMBER */ + /* HARQ_PROCESS_NUMBER */ ulsch_config_pdu_0_1->harq_process_nbr = dci->harq_process_number; - /* FIRST_DAI */ //To be implemented, FIXME!!! - /* SECOND_DAI */ //To be implemented, FIXME!!! - /* TPC_PUSCH */ + /* FIRST_DAI */ //To be implemented, FIXME!!! + /* SECOND_DAI */ //To be implemented, FIXME!!! + /* TPC_PUSCH */ // according to TS 38.213 Table Table 7.1.1-1 if (dci->tpc_pusch == 0) { - ulsch_config_pdu_0_0->accumulated_delta_PUSCH = -1; - ulsch_config_pdu_0_0->absolute_delta_PUSCH = -4; + ulsch_config_pdu_0_1->accumulated_delta_PUSCH = -1; + ulsch_config_pdu_0_1->absolute_delta_PUSCH = -4; } if (dci->tpc_pusch == 1) { - ulsch_config_pdu_0_0->accumulated_delta_PUSCH = 0; - ulsch_config_pdu_0_0->absolute_delta_PUSCH = -1; + ulsch_config_pdu_0_1->accumulated_delta_PUSCH = 0; + ulsch_config_pdu_0_1->absolute_delta_PUSCH = -1; } if (dci->tpc_pusch == 2) { - ulsch_config_pdu_0_0->accumulated_delta_PUSCH = 1; - ulsch_config_pdu_0_0->absolute_delta_PUSCH = 1; + ulsch_config_pdu_0_1->accumulated_delta_PUSCH = 1; + ulsch_config_pdu_0_1->absolute_delta_PUSCH = 1; } if (dci->tpc_pusch == 3) { - ulsch_config_pdu_0_0->accumulated_delta_PUSCH = 3; - ulsch_config_pdu_0_0->absolute_delta_PUSCH = 4; + ulsch_config_pdu_0_1->accumulated_delta_PUSCH = 3; + ulsch_config_pdu_0_1->absolute_delta_PUSCH = 4; } + /* SRS_RESOURCE_IND */ + //FIXME!! + /* PRECOD_NBR_LAYERS */ + if ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.tx_config == tx_config_nonCodebook)); + // 0 bits if the higher layer parameter txConfig = nonCodeBook + if ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.tx_config == tx_config_codebook)){ + uint8_t n_antenna_port = 0; //FIXME!!! + if (n_antenna_port == 1); // 1 antenna port and the higher layer parameter txConfig = codebook 0 bits + if (n_antenna_port == 4){ // 4 antenna port and the higher layer parameter txConfig = codebook + // Table 7.3.1.1.2-2: transformPrecoder=disabled and maxRank = 2 or 3 or 4 + if ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.transform_precoder == transform_precoder_disabled) + && ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.max_rank == 2) || + (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.max_rank == 3) || + (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.max_rank == 4))){ + if (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.codebook_subset == codebook_subset_fullyAndPartialAndNonCoherent) { + ulsch_config_pdu_0_1->n_layers = table_7_3_1_1_2_2_3_4_5[dci->precod_nbr_layers][0]; + ulsch_config_pdu_0_1->tpmi = table_7_3_1_1_2_2_3_4_5[dci->precod_nbr_layers][1]; + } + if (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.codebook_subset == codebook_subset_partialAndNonCoherent){ + ulsch_config_pdu_0_1->n_layers = table_7_3_1_1_2_2_3_4_5[dci->precod_nbr_layers][2]; + ulsch_config_pdu_0_1->tpmi = table_7_3_1_1_2_2_3_4_5[dci->precod_nbr_layers][3]; + } + if (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.codebook_subset == codebook_subset_nonCoherent){ + ulsch_config_pdu_0_1->n_layers = table_7_3_1_1_2_2_3_4_5[dci->precod_nbr_layers][4]; + ulsch_config_pdu_0_1->tpmi = table_7_3_1_1_2_2_3_4_5[dci->precod_nbr_layers][5]; + } + } + // Table 7.3.1.1.2-3: transformPrecoder= enabled, or transformPrecoder=disabled and maxRank = 1 + if (((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.transform_precoder == transform_precoder_enabled) + || (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.transform_precoder == transform_precoder_disabled)) + && (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.max_rank == 1)){ + if (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.codebook_subset == codebook_subset_fullyAndPartialAndNonCoherent) { + ulsch_config_pdu_0_1->n_layers = table_7_3_1_1_2_2_3_4_5[dci->precod_nbr_layers][6]; + ulsch_config_pdu_0_1->tpmi = table_7_3_1_1_2_2_3_4_5[dci->precod_nbr_layers][7]; + } + if (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.codebook_subset == codebook_subset_partialAndNonCoherent){ + ulsch_config_pdu_0_1->n_layers = table_7_3_1_1_2_2_3_4_5[dci->precod_nbr_layers][8]; + ulsch_config_pdu_0_1->tpmi = table_7_3_1_1_2_2_3_4_5[dci->precod_nbr_layers][9]; + } + if (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.codebook_subset == codebook_subset_nonCoherent){ + ulsch_config_pdu_0_1->n_layers = table_7_3_1_1_2_2_3_4_5[dci->precod_nbr_layers][10]; + ulsch_config_pdu_0_1->tpmi = table_7_3_1_1_2_2_3_4_5[dci->precod_nbr_layers][11]; + } + } + } + if (n_antenna_port == 4){ // 2 antenna port and the higher layer parameter txConfig = codebook + // Table 7.3.1.1.2-4: transformPrecoder=disabled and maxRank = 2 + if ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.transform_precoder == transform_precoder_disabled) + && (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.max_rank == 2)){ + if (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.codebook_subset == codebook_subset_fullyAndPartialAndNonCoherent) { + ulsch_config_pdu_0_1->n_layers = table_7_3_1_1_2_2_3_4_5[dci->precod_nbr_layers][12]; + ulsch_config_pdu_0_1->tpmi = table_7_3_1_1_2_2_3_4_5[dci->precod_nbr_layers][13]; + } + if (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.codebook_subset == codebook_subset_nonCoherent){ + ulsch_config_pdu_0_1->n_layers = table_7_3_1_1_2_2_3_4_5[dci->precod_nbr_layers][14]; + ulsch_config_pdu_0_1->tpmi = table_7_3_1_1_2_2_3_4_5[dci->precod_nbr_layers][15]; + } + } + // Table 7.3.1.1.2-5: transformPrecoder= enabled, or transformPrecoder= disabled and maxRank = 1 + if (((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.transform_precoder == transform_precoder_enabled) + || (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.transform_precoder == transform_precoder_disabled)) + && (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.max_rank == 1)){ + if (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.codebook_subset == codebook_subset_fullyAndPartialAndNonCoherent) { + ulsch_config_pdu_0_1->n_layers = table_7_3_1_1_2_2_3_4_5[dci->precod_nbr_layers][16]; + ulsch_config_pdu_0_1->tpmi = table_7_3_1_1_2_2_3_4_5[dci->precod_nbr_layers][17]; + } + if (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.codebook_subset == codebook_subset_nonCoherent){ + ulsch_config_pdu_0_1->n_layers = table_7_3_1_1_2_2_3_4_5[dci->precod_nbr_layers][18]; + ulsch_config_pdu_0_1->tpmi = table_7_3_1_1_2_2_3_4_5[dci->precod_nbr_layers][19]; + } + } + } + } + /* ANTENNA_PORTS */ + uint8_t rank=0; // We need to initialize rank FIXME!!! + if ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.transform_precoder == transform_precoder_enabled) && + (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_a.dmrs_type == 1) && + (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_a.max_length == 1)) { // tables 7.3.1.1.2-6 + ulsch_config_pdu_0_1->n_dmrs_cdm_groups = 2; + ulsch_config_pdu_0_1->dmrs_ports[0] = dci->antenna_ports; + } + if ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.transform_precoder == transform_precoder_enabled) && + (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_a.dmrs_type == 1) && + (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_a.max_length == 2)) { // tables 7.3.1.1.2-7 + ulsch_config_pdu_0_1->n_dmrs_cdm_groups = 2; + ulsch_config_pdu_0_1->dmrs_ports[0] = (dci->antenna_ports > 3)?(dci->antenna_ports-4):(dci->antenna_ports); + ulsch_config_pdu_0_1->n_front_load_symb = (dci->antenna_ports > 3)?2:1; + } + if ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.transform_precoder == transform_precoder_disabled) && + (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_a.dmrs_type == 1) && + (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_a.max_length == 1)) { // tables 7.3.1.1.2-8/9/10/11 + if (rank == 1){ + ulsch_config_pdu_0_1->n_dmrs_cdm_groups = (dci->antenna_ports > 1)?2:1; + ulsch_config_pdu_0_1->dmrs_ports[0] = (dci->antenna_ports > 1)?(dci->antenna_ports-2):(dci->antenna_ports); + } + if (rank == 2){ + ulsch_config_pdu_0_1->n_dmrs_cdm_groups = (dci->antenna_ports > 0)?2:1; + ulsch_config_pdu_0_1->dmrs_ports[0] = (dci->antenna_ports > 1)?(dci->antenna_ports > 2 ?0:2):0; + ulsch_config_pdu_0_1->dmrs_ports[1] = (dci->antenna_ports > 1)?(dci->antenna_ports > 2 ?2:3):1; + } + if (rank == 3){ + ulsch_config_pdu_0_1->n_dmrs_cdm_groups = 2; + ulsch_config_pdu_0_1->dmrs_ports[0] = 0; + ulsch_config_pdu_0_1->dmrs_ports[1] = 1; + ulsch_config_pdu_0_1->dmrs_ports[2] = 2; + } + if (rank == 4){ + ulsch_config_pdu_0_1->n_dmrs_cdm_groups = 2; + ulsch_config_pdu_0_1->dmrs_ports[0] = 0; + ulsch_config_pdu_0_1->dmrs_ports[1] = 1; + ulsch_config_pdu_0_1->dmrs_ports[2] = 2; + ulsch_config_pdu_0_1->dmrs_ports[3] = 3; + } + } + if ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.transform_precoder == transform_precoder_disabled) && + (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_a.dmrs_type == 1) && + (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_a.max_length == 2)) { // tables 7.3.1.1.2-12/13/14/15 + if (rank == 1){ + ulsch_config_pdu_0_1->n_dmrs_cdm_groups = (dci->antenna_ports > 1)?2:1; + ulsch_config_pdu_0_1->dmrs_ports[0] = (dci->antenna_ports > 1)?(dci->antenna_ports > 5 ?(dci->antenna_ports-6):(dci->antenna_ports-2)):dci->antenna_ports; + ulsch_config_pdu_0_1->n_front_load_symb = (dci->antenna_ports > 6)?2:1; + } + if (rank == 2){ + ulsch_config_pdu_0_1->n_dmrs_cdm_groups = (dci->antenna_ports > 0)?2:1; + ulsch_config_pdu_0_1->dmrs_ports[0] = table_7_3_1_1_2_13[dci->antenna_ports][1]; + ulsch_config_pdu_0_1->dmrs_ports[1] = table_7_3_1_1_2_13[dci->antenna_ports][2]; + ulsch_config_pdu_0_1->n_front_load_symb = (dci->antenna_ports > 3)?2:1; + } + if (rank == 3){ + ulsch_config_pdu_0_1->n_dmrs_cdm_groups = 2; + ulsch_config_pdu_0_1->dmrs_ports[0] = table_7_3_1_1_2_14[dci->antenna_ports][1]; + ulsch_config_pdu_0_1->dmrs_ports[1] = table_7_3_1_1_2_14[dci->antenna_ports][2]; + ulsch_config_pdu_0_1->dmrs_ports[2] = table_7_3_1_1_2_14[dci->antenna_ports][3]; + ulsch_config_pdu_0_1->n_front_load_symb = (dci->antenna_ports > 1)?2:1; + } + if (rank == 4){ + ulsch_config_pdu_0_1->n_dmrs_cdm_groups = 2; + ulsch_config_pdu_0_1->dmrs_ports[0] = table_7_3_1_1_2_15[dci->antenna_ports][1]; + ulsch_config_pdu_0_1->dmrs_ports[1] = table_7_3_1_1_2_15[dci->antenna_ports][2]; + ulsch_config_pdu_0_1->dmrs_ports[2] = table_7_3_1_1_2_15[dci->antenna_ports][3]; + ulsch_config_pdu_0_1->dmrs_ports[3] = table_7_3_1_1_2_15[dci->antenna_ports][4]; + ulsch_config_pdu_0_1->n_front_load_symb = (dci->antenna_ports > 1)?2:1; + } + } + if ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.transform_precoder == transform_precoder_disabled) && + (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_a.dmrs_type == 2) && + (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_a.max_length == 1)) { // tables 7.3.1.1.2-16/17/18/19 + if (rank == 1){ + ulsch_config_pdu_0_1->n_dmrs_cdm_groups = (dci->antenna_ports > 1)?((dci->antenna_ports > 5)?3:2):1; + ulsch_config_pdu_0_1->dmrs_ports[0] = (dci->antenna_ports > 1)?(dci->antenna_ports > 5 ?(dci->antenna_ports-6):(dci->antenna_ports-2)):dci->antenna_ports; + } + if (rank == 2){ + ulsch_config_pdu_0_1->n_dmrs_cdm_groups = (dci->antenna_ports > 0)?((dci->antenna_ports > 2)?3:2):1; + ulsch_config_pdu_0_1->dmrs_ports[0] = table_7_3_1_1_2_17[dci->antenna_ports][1]; + ulsch_config_pdu_0_1->dmrs_ports[1] = table_7_3_1_1_2_17[dci->antenna_ports][2]; + } + if (rank == 3){ + ulsch_config_pdu_0_1->n_dmrs_cdm_groups = (dci->antenna_ports > 0)?3:2; + ulsch_config_pdu_0_1->dmrs_ports[0] = table_7_3_1_1_2_18[dci->antenna_ports][1]; + ulsch_config_pdu_0_1->dmrs_ports[1] = table_7_3_1_1_2_18[dci->antenna_ports][2]; + ulsch_config_pdu_0_1->dmrs_ports[2] = table_7_3_1_1_2_18[dci->antenna_ports][3]; + } + if (rank == 4){ + ulsch_config_pdu_0_1->n_dmrs_cdm_groups = dci->antenna_ports + 2; + ulsch_config_pdu_0_1->dmrs_ports[0] = 0; + ulsch_config_pdu_0_1->dmrs_ports[1] = 1; + ulsch_config_pdu_0_1->dmrs_ports[2] = 2; + ulsch_config_pdu_0_1->dmrs_ports[3] = 3; + } + } + if ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.transform_precoder == transform_precoder_disabled) && + (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_a.dmrs_type == 2) && + (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_a.max_length == 2)) { // tables 7.3.1.1.2-20/21/22/23 + if (rank == 1){ + ulsch_config_pdu_0_1->n_dmrs_cdm_groups = table_7_3_1_1_2_20[dci->antenna_ports][0]; + ulsch_config_pdu_0_1->dmrs_ports[0] = table_7_3_1_1_2_20[dci->antenna_ports][1]; + ulsch_config_pdu_0_1->n_front_load_symb = table_7_3_1_1_2_20[dci->antenna_ports][2]; + } + if (rank == 2){ + ulsch_config_pdu_0_1->n_dmrs_cdm_groups = table_7_3_1_1_2_21[dci->antenna_ports][0]; + ulsch_config_pdu_0_1->dmrs_ports[0] = table_7_3_1_1_2_21[dci->antenna_ports][1]; + ulsch_config_pdu_0_1->dmrs_ports[1] = table_7_3_1_1_2_21[dci->antenna_ports][2]; + ulsch_config_pdu_0_1->n_front_load_symb = table_7_3_1_1_2_21[dci->antenna_ports][3]; + } + if (rank == 3){ + ulsch_config_pdu_0_1->n_dmrs_cdm_groups = table_7_3_1_1_2_22[dci->antenna_ports][0]; + ulsch_config_pdu_0_1->dmrs_ports[0] = table_7_3_1_1_2_22[dci->antenna_ports][1]; + ulsch_config_pdu_0_1->dmrs_ports[1] = table_7_3_1_1_2_22[dci->antenna_ports][2]; + ulsch_config_pdu_0_1->dmrs_ports[2] = table_7_3_1_1_2_22[dci->antenna_ports][3]; + ulsch_config_pdu_0_1->n_front_load_symb = table_7_3_1_1_2_22[dci->antenna_ports][4]; + } + if (rank == 4){ + ulsch_config_pdu_0_1->n_dmrs_cdm_groups = table_7_3_1_1_2_23[dci->antenna_ports][0]; + ulsch_config_pdu_0_1->dmrs_ports[0] = table_7_3_1_1_2_23[dci->antenna_ports][1]; + ulsch_config_pdu_0_1->dmrs_ports[1] = table_7_3_1_1_2_23[dci->antenna_ports][2]; + ulsch_config_pdu_0_1->dmrs_ports[2] = table_7_3_1_1_2_23[dci->antenna_ports][3]; + ulsch_config_pdu_0_1->dmrs_ports[3] = table_7_3_1_1_2_23[dci->antenna_ports][4]; + ulsch_config_pdu_0_1->n_front_load_symb = table_7_3_1_1_2_23[dci->antenna_ports][5]; + } + } + /* SRS_REQUEST */ + // if SUL is supported in the cell, there is an additional bit in thsi field and the value of this bit represents table 7.1.1.1-1 TS 38.212 FIXME!!! + ulsch_config_pdu_0_1->srs_config.aperiodicSRS_ResourceTrigger = (dci->srs_request & 0x11); // as per Table 7.3.1.1.2-24 TS 38.212 + /* CSI_REQUEST */ + ulsch_config_pdu_0_1->csi_reportTriggerSize = dci->csi_request; + /* CBGTI */ + ulsch_config_pdu_0_1->maxCodeBlockGroupsPerTransportBlock = dci->cbgti; + /* PTRS_DMRS */ + if (((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.transform_precoder == transform_precoder_disabled) && + (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.dmrs_ul_for_pusch_mapping_type_a.ptrs_uplink_config == 0)) || + ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.transform_precoder == transform_precoder_enabled) && + (mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.max_rank == 1))){ + } else { + ulsch_config_pdu_0_1->ptrs_dmrs_association_port = dci->ptrs_dmrs; + } + /* BETA_OFFSET_IND */ + // Table 9.3-3 in [5, TS 38.213] + ulsch_config_pdu_0_1->beta_offset_ind = dci->beta_offset_ind; + /* DMRS_SEQ_INI */ + // FIXME!! + /* UL_SCH_IND */ + // A value of "1" indicates UL-SCH shall be transmitted on the PUSCH and + // a value of "0" indicates UL-SCH shall not be transmitted on the PUSCH + + ul_config->number_pdus = ul_config->number_pdus + 1; break; case format1_0: @@ -964,54 +1549,48 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fa dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH; dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.rnti = rnti; fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu_1_0 = &dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.dlsch_config_rel15; - /* FREQ_DOM_RESOURCE_ASSIGNMENT_DL */ + /* IDENTIFIER_DCI_FORMATS */ + /* FREQ_DOM_RESOURCE_ASSIGNMENT_DL */ nr_ue_process_dci_freq_dom_resource_assignment(NULL,&dlsch_config_pdu_1_0,0,n_RB_DLBWP,dci->freq_dom_resource_assignment_DL); - /* TIME_DOM_RESOURCE_ASSIGNMENT */ + /* TIME_DOM_RESOURCE_ASSIGNMENT */ nr_ue_process_dci_time_dom_resource_assignment(NULL,&dlsch_config_pdu_1_0,dci->time_dom_resource_assignment,mac->mib->dmrs_TypeA_Position); - /* VRB_TO_PRB_MAPPING */ + /* VRB_TO_PRB_MAPPING */ dlsch_config_pdu_1_0->vrb_to_prb_mapping = (dci->vrb_to_prb_mapping == 0) ? vrb_to_prb_mapping_non_interleaved:vrb_to_prb_mapping_interleaved; - /* MCS */ + /* MCS */ dlsch_config_pdu_1_0->mcs = dci->mcs; - /* NDI (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/ + /* NDI (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/ dlsch_config_pdu_1_0->ndi = dci->ndi; - /* RV (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/ + /* RV (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/ dlsch_config_pdu_1_0->rv = dci->rv; - /* HARQ_PROCESS_NUMBER (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/ + /* HARQ_PROCESS_NUMBER (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/ dlsch_config_pdu_1_0->harq_process_nbr = dci->harq_process_number; - /* DAI (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/ + /* DAI (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/ dlsch_config_pdu_1_0->dai = dci ->dai; - /* TB_SCALING (only if CRC scrambled by P-RNTI or RA-RNTI) */ + /* TB_SCALING (only if CRC scrambled by P-RNTI or RA-RNTI) */ // according to TS 38.214 Table 5.1.3.2-3 if (dci->tb_scaling == 0) dlsch_config_pdu_1_0->scaling_factor_S = 1; if (dci->tb_scaling == 1) dlsch_config_pdu_1_0->scaling_factor_S = 0.5; if (dci->tb_scaling == 2) dlsch_config_pdu_1_0->scaling_factor_S = 0.25; if (dci->tb_scaling == 3) dlsch_config_pdu_1_0->scaling_factor_S = 0; // value not defined in table - /* TPC_PUCCH (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/ + /* TPC_PUCCH (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/ // according to TS 38.213 Table 7.2.1-1 if (dci->tpc_pucch == 0) dlsch_config_pdu_1_0->accumulated_delta_PUCCH = -1; if (dci->tpc_pucch == 1) dlsch_config_pdu_1_0->accumulated_delta_PUCCH = 0; if (dci->tpc_pucch == 2) dlsch_config_pdu_1_0->accumulated_delta_PUCCH = 1; if (dci->tpc_pucch == 3) dlsch_config_pdu_1_0->accumulated_delta_PUCCH = 3; - /* PUCCH_RESOURCE_IND (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI)*/ - if (dci->pucch_resource_ind == 0) dlsch_config_pdu_1_0->pucch_resource_id = 0; //pucch-ResourceId obtained from the 1st value of resourceList FIXME!!! - if (dci->pucch_resource_ind == 1) dlsch_config_pdu_1_0->pucch_resource_id = 0; //pucch-ResourceId obtained from the 2nd value of resourceList FIXME!! - if (dci->pucch_resource_ind == 2) dlsch_config_pdu_1_0->pucch_resource_id = 0; //pucch-ResourceId obtained from the 3rd value of resourceList FIXME!! - if (dci->pucch_resource_ind == 3) dlsch_config_pdu_1_0->pucch_resource_id = 0; //pucch-ResourceId obtained from the 4th value of resourceList FIXME!! - if (dci->pucch_resource_ind == 4) dlsch_config_pdu_1_0->pucch_resource_id = 0; //pucch-ResourceId obtained from the 5th value of resourceList FIXME!! - if (dci->pucch_resource_ind == 5) dlsch_config_pdu_1_0->pucch_resource_id = 0; //pucch-ResourceId obtained from the 6th value of resourceList FIXME!! - if (dci->pucch_resource_ind == 6) dlsch_config_pdu_1_0->pucch_resource_id = 0; //pucch-ResourceId obtained from the 7th value of resourceList FIXME!! - if (dci->pucch_resource_ind == 7) dlsch_config_pdu_1_0->pucch_resource_id = 0; //pucch-ResourceId obtained from the 8th value of resourceList FIXME!! - /* PDSCH_TO_HARQ_FEEDBACK_TIME_IND (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI)*/ + /* PUCCH_RESOURCE_IND (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI)*/ + //if (dci->pucch_resource_ind == 0) dlsch_config_pdu_1_0->pucch_resource_id = 1; //pucch-ResourceId obtained from the 1st value of resourceList FIXME!!! + //if (dci->pucch_resource_ind == 1) dlsch_config_pdu_1_0->pucch_resource_id = 2; //pucch-ResourceId obtained from the 2nd value of resourceList FIXME!! + //if (dci->pucch_resource_ind == 2) dlsch_config_pdu_1_0->pucch_resource_id = 3; //pucch-ResourceId obtained from the 3rd value of resourceList FIXME!! + //if (dci->pucch_resource_ind == 3) dlsch_config_pdu_1_0->pucch_resource_id = 4; //pucch-ResourceId obtained from the 4th value of resourceList FIXME!! + //if (dci->pucch_resource_ind == 4) dlsch_config_pdu_1_0->pucch_resource_id = 5; //pucch-ResourceId obtained from the 5th value of resourceList FIXME!! + //if (dci->pucch_resource_ind == 5) dlsch_config_pdu_1_0->pucch_resource_id = 6; //pucch-ResourceId obtained from the 6th value of resourceList FIXME!! + //if (dci->pucch_resource_ind == 6) dlsch_config_pdu_1_0->pucch_resource_id = 7; //pucch-ResourceId obtained from the 7th value of resourceList FIXME!! + //if (dci->pucch_resource_ind == 7) dlsch_config_pdu_1_0->pucch_resource_id = 8; //pucch-ResourceId obtained from the 8th value of resourceList FIXME!! + dlsch_config_pdu_1_0->pucch_resource_id = dci->pucch_resource_ind; + /* PDSCH_TO_HARQ_FEEDBACK_TIME_IND (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI)*/ dlsch_config_pdu_1_0-> pdsch_to_harq_feedback_time_ind = dci->pdsch_to_harq_feedback_time_ind; - // DL_CONFIG_REQ - //pdlsch0_harq->nb_rb = l_RB; - //pdlsch0->current_harq_pid = dci->harq_process_number; - //pdlsch0->active = 1; - //pdlsch0->rnti = rnti; - //pdlsch0_harq->mcs = nr_pdci_info_extracted->mcs; - //pdlsch0_harq->DCINdi = nr_pdci_info_extracted->ndi; - dl_config->number_pdus = dl_config->number_pdus + 1; break; @@ -1048,36 +1627,46 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fa dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH; dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.rnti = rnti; fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu_1_1 = &dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.dlsch_config_rel15; - /* FREQ_DOM_RESOURCE_ASSIGNMENT_DL */ + /* IDENTIFIER_DCI_FORMATS */ + /* CARRIER_IND */ + /* BANDWIDTH_PART_IND */ + dlsch_config_pdu_1_1->bandwidth_part_ind = dci->bandwidth_part_ind; + /* FREQ_DOM_RESOURCE_ASSIGNMENT_DL */ nr_ue_process_dci_freq_dom_resource_assignment(NULL,&dlsch_config_pdu_1_1,0,n_RB_DLBWP,dci->freq_dom_resource_assignment_DL); - /* TIME_DOM_RESOURCE_ASSIGNMENT */ + /* TIME_DOM_RESOURCE_ASSIGNMENT */ nr_ue_process_dci_time_dom_resource_assignment(NULL,&dlsch_config_pdu_1_1,dci->time_dom_resource_assignment,mac->mib->dmrs_TypeA_Position); - /* VRB_TO_PRB_MAPPING */ + /* VRB_TO_PRB_MAPPING */ if (mac->phy_config.config_req.dl_bwp_dedicated.pdsch_config_dedicated.resource_allocation != 0) dlsch_config_pdu_1_1->vrb_to_prb_mapping = (dci->vrb_to_prb_mapping == 0) ? vrb_to_prb_mapping_non_interleaved:vrb_to_prb_mapping_interleaved; - /* MCS (for transport block 1)*/ + /* PRB_BUNDLING_SIZE_IND */ + dlsch_config_pdu_1_1->prb_bundling_size_ind = dci->prb_bundling_size_ind; + /* RATE_MATCHING_IND */ + dlsch_config_pdu_1_1->rate_matching_ind = dci->rate_matching_ind; + /* ZP_CSI_RS_TRIGGER */ + dlsch_config_pdu_1_1->zp_csi_rs_trigger = dci->zp_csi_rs_trigger; + /* MCS (for transport block 1)*/ dlsch_config_pdu_1_1->mcs = dci->tb1_mcs; - /* NDI (for transport block 1)*/ + /* NDI (for transport block 1)*/ dlsch_config_pdu_1_1->ndi = dci->tb1_ndi; - /* RV (for transport block 1)*/ + /* RV (for transport block 1)*/ dlsch_config_pdu_1_1->rv = dci->tb1_rv; - /* MCS (for transport block 2)*/ + /* MCS (for transport block 2)*/ dlsch_config_pdu_1_1->tb2_mcs = dci->tb2_mcs; - /* NDI (for transport block 2)*/ + /* NDI (for transport block 2)*/ dlsch_config_pdu_1_1->tb2_ndi = dci->tb2_ndi; - /* RV (for transport block 2)*/ + /* RV (for transport block 2)*/ dlsch_config_pdu_1_1->tb2_rv = dci->tb2_rv; - /* HARQ_PROCESS_NUMBER */ + /* HARQ_PROCESS_NUMBER */ dlsch_config_pdu_1_1->harq_process_nbr = dci->harq_process_number; - /* DAI */ + /* DAI */ dlsch_config_pdu_1_0->dai = dci ->dai; - /* TPC_PUCCH */ + /* TPC_PUCCH */ // according to TS 38.213 Table 7.2.1-1 if (dci->tpc_pucch == 0) dlsch_config_pdu_1_1->accumulated_delta_PUCCH = -1; if (dci->tpc_pucch == 1) dlsch_config_pdu_1_1->accumulated_delta_PUCCH = 0; if (dci->tpc_pucch == 2) dlsch_config_pdu_1_1->accumulated_delta_PUCCH = 1; if (dci->tpc_pucch == 3) dlsch_config_pdu_1_1->accumulated_delta_PUCCH = 3; - /* PUCCH_RESOURCE_IND */ + /* PUCCH_RESOURCE_IND */ if (dci->pucch_resource_ind == 0) dlsch_config_pdu_1_1->pucch_resource_id = 0; //pucch-ResourceId obtained from the 1st value of resourceList FIXME!!! if (dci->pucch_resource_ind == 1) dlsch_config_pdu_1_1->pucch_resource_id = 0; //pucch-ResourceId obtained from the 2nd value of resourceList FIXME!! if (dci->pucch_resource_ind == 2) dlsch_config_pdu_1_1->pucch_resource_id = 0; //pucch-ResourceId obtained from the 3rd value of resourceList FIXME!! @@ -1086,11 +1675,105 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fa if (dci->pucch_resource_ind == 5) dlsch_config_pdu_1_1->pucch_resource_id = 0; //pucch-ResourceId obtained from the 6th value of resourceList FIXME!! if (dci->pucch_resource_ind == 6) dlsch_config_pdu_1_1->pucch_resource_id = 0; //pucch-ResourceId obtained from the 7th value of resourceList FIXME!! if (dci->pucch_resource_ind == 7) dlsch_config_pdu_1_1->pucch_resource_id = 0; //pucch-ResourceId obtained from the 8th value of resourceList FIXME!! - /* PDSCH_TO_HARQ_FEEDBACK_TIME_IND */ + /* PDSCH_TO_HARQ_FEEDBACK_TIME_IND */ // according to TS 38.213 Table 9.2.3-1 - dlsch_config_pdu_1_1-> pdsch_to_harq_feedback_time_ind = - mac->phy_config.config_req.ul_bwp_dedicated.pucch_config_dedicated.dl_data_to_ul_ack[dci->pdsch_to_harq_feedback_time_ind]; + dlsch_config_pdu_1_1-> pdsch_to_harq_feedback_time_ind = mac->phy_config.config_req.ul_bwp_dedicated.pucch_config_dedicated.dl_data_to_ul_ack[dci->pdsch_to_harq_feedback_time_ind]; + /* ANTENNA_PORTS */ + uint8_t n_codewords = 1; // FIXME!!! + if ((mac->phy_config.config_req.dl_bwp_dedicated.pdsch_config_dedicated.dmrs_dl_for_pdsch_mapping_type_a.dmrs_type == 1) && + (mac->phy_config.config_req.dl_bwp_dedicated.pdsch_config_dedicated.dmrs_dl_for_pdsch_mapping_type_a.max_length == 1)){ + // Table 7.3.1.2.2-1: Antenna port(s) (1000 + DMRS port), dmrs-Type=1, maxLength=1 + dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_1[dci->antenna_ports][0]; + dlsch_config_pdu_1_1->dmrs_ports[0] = table_7_3_2_3_3_1[dci->antenna_ports][1]; + dlsch_config_pdu_1_1->dmrs_ports[1] = table_7_3_2_3_3_1[dci->antenna_ports][2]; + dlsch_config_pdu_1_1->dmrs_ports[2] = table_7_3_2_3_3_1[dci->antenna_ports][3]; + dlsch_config_pdu_1_1->dmrs_ports[3] = table_7_3_2_3_3_1[dci->antenna_ports][4]; + } + if ((mac->phy_config.config_req.dl_bwp_dedicated.pdsch_config_dedicated.dmrs_dl_for_pdsch_mapping_type_a.dmrs_type == 1) && + (mac->phy_config.config_req.dl_bwp_dedicated.pdsch_config_dedicated.dmrs_dl_for_pdsch_mapping_type_a.max_length == 2)){ + // Table 7.3.1.2.2-2: Antenna port(s) (1000 + DMRS port), dmrs-Type=1, maxLength=2 + if (n_codewords == 1) { + dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports][0]; + dlsch_config_pdu_1_1->dmrs_ports[0] = table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports][1]; + dlsch_config_pdu_1_1->dmrs_ports[1] = table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports][2]; + dlsch_config_pdu_1_1->dmrs_ports[2] = table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports][3]; + dlsch_config_pdu_1_1->dmrs_ports[3] = table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports][4]; + dlsch_config_pdu_1_1->n_front_load_symb = table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports][5]; + } + if (n_codewords == 1) { + dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports][0]; + dlsch_config_pdu_1_1->dmrs_ports[0] = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports][1]; + dlsch_config_pdu_1_1->dmrs_ports[1] = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports][2]; + dlsch_config_pdu_1_1->dmrs_ports[2] = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports][3]; + dlsch_config_pdu_1_1->dmrs_ports[3] = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports][4]; + dlsch_config_pdu_1_1->dmrs_ports[4] = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports][5]; + dlsch_config_pdu_1_1->dmrs_ports[5] = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports][6]; + dlsch_config_pdu_1_1->dmrs_ports[6] = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports][7]; + dlsch_config_pdu_1_1->dmrs_ports[7] = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports][8]; + dlsch_config_pdu_1_1->n_front_load_symb = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports][9]; + } + } + if ((mac->phy_config.config_req.dl_bwp_dedicated.pdsch_config_dedicated.dmrs_dl_for_pdsch_mapping_type_a.dmrs_type == 2) && + (mac->phy_config.config_req.dl_bwp_dedicated.pdsch_config_dedicated.dmrs_dl_for_pdsch_mapping_type_a.max_length == 1)){ + // Table 7.3.1.2.2-3: Antenna port(s) (1000 + DMRS port), dmrs-Type=2, maxLength=1 + if (n_codewords == 1) { + dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_3_oneCodeword[dci->antenna_ports][0]; + dlsch_config_pdu_1_1->dmrs_ports[0] = table_7_3_2_3_3_3_oneCodeword[dci->antenna_ports][1]; + dlsch_config_pdu_1_1->dmrs_ports[1] = table_7_3_2_3_3_3_oneCodeword[dci->antenna_ports][2]; + dlsch_config_pdu_1_1->dmrs_ports[2] = table_7_3_2_3_3_3_oneCodeword[dci->antenna_ports][3]; + dlsch_config_pdu_1_1->dmrs_ports[3] = table_7_3_2_3_3_3_oneCodeword[dci->antenna_ports][4]; + } + if (n_codewords == 1) { + dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports][0]; + dlsch_config_pdu_1_1->dmrs_ports[0] = table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports][1]; + dlsch_config_pdu_1_1->dmrs_ports[1] = table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports][2]; + dlsch_config_pdu_1_1->dmrs_ports[2] = table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports][3]; + dlsch_config_pdu_1_1->dmrs_ports[3] = table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports][4]; + dlsch_config_pdu_1_1->dmrs_ports[4] = table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports][5]; + dlsch_config_pdu_1_1->dmrs_ports[5] = table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports][6]; + } + } + if ((mac->phy_config.config_req.dl_bwp_dedicated.pdsch_config_dedicated.dmrs_dl_for_pdsch_mapping_type_a.dmrs_type == 2) && + (mac->phy_config.config_req.dl_bwp_dedicated.pdsch_config_dedicated.dmrs_dl_for_pdsch_mapping_type_a.max_length == 2)){ + // Table 7.3.1.2.2-4: Antenna port(s) (1000 + DMRS port), dmrs-Type=2, maxLength=2 + if (n_codewords == 1) { + dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports][0]; + dlsch_config_pdu_1_1->dmrs_ports[0] = table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports][1]; + dlsch_config_pdu_1_1->dmrs_ports[1] = table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports][2]; + dlsch_config_pdu_1_1->dmrs_ports[2] = table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports][3]; + dlsch_config_pdu_1_1->dmrs_ports[3] = table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports][4]; + dlsch_config_pdu_1_1->n_front_load_symb = table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports][5]; + } + if (n_codewords == 1) { + dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports][0]; + dlsch_config_pdu_1_1->dmrs_ports[0] = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports][1]; + dlsch_config_pdu_1_1->dmrs_ports[1] = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports][2]; + dlsch_config_pdu_1_1->dmrs_ports[2] = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports][3]; + dlsch_config_pdu_1_1->dmrs_ports[3] = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports][4]; + dlsch_config_pdu_1_1->dmrs_ports[4] = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports][5]; + dlsch_config_pdu_1_1->dmrs_ports[5] = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports][6]; + dlsch_config_pdu_1_1->dmrs_ports[6] = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports][7]; + dlsch_config_pdu_1_1->dmrs_ports[7] = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports][8]; + dlsch_config_pdu_1_1->n_front_load_symb = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports][9]; + } + } + /* TCI */ + if (mac->dl_config_request.dl_config_list[0].dci_config_pdu.dci_config_rel15.coreset.tci_present_in_dci == 1){ + // 0 bit if higher layer parameter tci-PresentInDCI is not enabled + // otherwise 3 bits as defined in Subclause 5.1.5 of [6, TS38.214] + dlsch_config_pdu_1_1->tci_state = dci->tci; + } + /* SRS_REQUEST */ + // if SUL is supported in the cell, there is an additional bit in this field and the value of this bit represents table 7.1.1.1-1 TS 38.212 FIXME!!! + dlsch_config_pdu_1_1->srs_config.aperiodicSRS_ResourceTrigger = (dci->srs_request & 0x11); // as per Table 7.3.1.1.2-24 TS 38.212 + /* CBGTI */ + dlsch_config_pdu_1_1->cbgti = dci->cbgti; + /* CBGFI */ + dlsch_config_pdu_1_1->codeBlockGroupFlushIndicator = dci->cbgfi; + /* DMRS_SEQ_INI */ + //FIXME!!! + dl_config->number_pdus = dl_config->number_pdus + 1; break; case format2_0: From 41809d5d65dc1d8b98c2a0e7ef048a439c7804d7 Mon Sep 17 00:00:00 2001 From: hongzhi wang Date: Thu, 27 Sep 2018 17:22:53 +0200 Subject: [PATCH 249/379] NR PDCCH validation: modifications for pdcch validation --- openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 2 +- openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c | 289 ++++++------------- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 1 + targets/RT/USER/nr-ue.c | 5 + 4 files changed, 93 insertions(+), 204 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index 53b1c554db..465e278c0c 100755 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -4294,7 +4294,7 @@ uint16_t rnti=3; *format_found=_format_2_3_found; } #ifdef NR_PDCCH_DCI_DEBUG - printf ("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> format_found=%d %d %d\n",*format_found, format_found, &format_found); + printf ("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> format_found=%d\n",*format_found); printf ("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> crc_scrambled=%d\n",*crc_scrambled); #endif if (*format_found!=255) { diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c index a8acc735a9..a7a0e2b752 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c @@ -4193,129 +4193,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, printf("}\n"); #endif - uint8_t prev_ndi = pdlsch0_harq->DCINdi; - /*uint16_t l_RB; - uint16_t start_RB; - uint16_t tmp_RIV; - uint16_t l_symbol; - uint16_t start_symbol; - uint16_t tmp_symbol; - // dmrs_typeA_pos provided by higher layers. FIXME !!! - uint8_t dmrs_typeA_pos = 2; - uint8_t sliv_S; - uint8_t sliv_L; - uint8_t k_offset; - uint8_t table_5_1_2_1_1_2_time_dom_res_alloc_A[16][3]={ // for PDSCH from TS 38.214 subclause 5.1.2.1.1 - {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?12:11}, // row index 1 - {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?10:9}, // row index 2 - {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?9:8}, // row index 3 - {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?7:6}, // row index 4 - {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?5:4}, // row index 5 - {0,(dmrs_typeA_pos == 2)?9:10,(dmrs_typeA_pos == 2)?4:4}, // row index 6 - {0,(dmrs_typeA_pos == 2)?4:6, (dmrs_typeA_pos == 2)?4:4}, // row index 7 - {0,5,7}, // row index 8 - {0,5,2}, // row index 9 - {0,9,2}, // row index 10 - {0,12,2}, // row index 11 - {0,1,13}, // row index 12 - {0,1,6}, // row index 13 - {0,2,4}, // row index 14 - {0,4,7}, // row index 15 - {0,8,4} // row index 16 - }; - uint8_t table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP[16][3]={ // for PDSCH from TS 38.214 subclause 5.1.2.1.1 - {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?6:5}, // row index 1 - {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?10:9}, // row index 2 - {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?9:8}, // row index 3 - {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?7:6}, // row index 4 - {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?5:4}, // row index 5 - {0,(dmrs_typeA_pos == 2)?6:8, (dmrs_typeA_pos == 2)?4:2}, // row index 6 - {0,(dmrs_typeA_pos == 2)?4:6, (dmrs_typeA_pos == 2)?4:4}, // row index 7 - {0,5,6}, // row index 8 - {0,5,2}, // row index 9 - {0,9,2}, // row index 10 - {0,10,2}, // row index 11 - {0,1,11}, // row index 12 - {0,1,6}, // row index 13 - {0,2,4}, // row index 14 - {0,4,6}, // row index 15 - {0,8,4} // row index 16 - }; - uint8_t table_5_1_2_1_1_4_time_dom_res_alloc_B[16][3]={ // for PDSCH from TS 38.214 subclause 5.1.2.1.1 - {0,2,2}, // row index 1 - {0,4,2}, // row index 2 - {0,6,2}, // row index 3 - {0,8,2}, // row index 4 - {0,10,2}, // row index 5 - {1,2,2}, // row index 6 - {1,4,2}, // row index 7 - {0,2,4}, // row index 8 - {0,4,4}, // row index 9 - {0,6,4}, // row index 10 - {0,8,4}, // row index 11 - {0,10,4}, // row index 12 - {0,2,7}, // row index 13 - {0,(dmrs_typeA_pos == 2)?2:3,(dmrs_typeA_pos == 2)?12:11}, // row index 14 - {1,2,4}, // row index 15 - {0,0,0} // row index 16 - }; - uint8_t table_5_1_2_1_1_5_time_dom_res_alloc_C[16][3]={ // for PDSCH from TS 38.214 subclause 5.1.2.1.1 - {0,2,2}, // row index 1 - {0,4,2}, // row index 2 - {0,6,2}, // row index 3 - {0,8,2}, // row index 4 - {0,10,2}, // row index 5 - {0,0,0}, // row index 6 - {0,0,0}, // row index 7 - {0,2,4}, // row index 8 - {0,4,4}, // row index 9 - {0,6,4}, // row index 10 - {0,8,4}, // row index 11 - {0,10,4}, // row index 12 - {0,2,7}, // row index 13 - {0,(dmrs_typeA_pos == 2)?2:3,(dmrs_typeA_pos == 2)?12:11}, // row index 14 - {0,0,6}, // row index 15 - {0,2,6} // row index 16 - }; - uint8_t mu_pusch = 1; - // definition table j Table 6.1.2.1.1-4 - uint8_t j = (mu_pusch==3)?3:(mu_pusch==2)?2:1; - uint8_t table_6_1_2_1_1_2_time_dom_res_alloc_A[16][3]={ // for PUSCH from TS 38.214 subclause 6.1.2.1.1 - {j, 0,14}, // row index 1 - {j, 0,12}, // row index 2 - {j, 0,10}, // row index 3 - {j, 2,10}, // row index 4 - {j, 4,10}, // row index 5 - {j, 4,8}, // row index 6 - {j, 4,6}, // row index 7 - {j+1,0,14}, // row index 8 - {j+1,0,12}, // row index 9 - {j+1,0,10}, // row index 10 - {j+2,0,14}, // row index 11 - {j+2,0,12}, // row index 12 - {j+2,0,10}, // row index 13 - {j, 8,6}, // row index 14 - {j+3,0,14}, // row index 15 - {j+3,0,10} // row index 16 - }; - uint8_t table_6_1_2_1_1_3_time_dom_res_alloc_A_extCP[16][3]={ // for PUSCH from TS 38.214 subclause 6.1.2.1.1 - {j, 0,8}, // row index 1 - {j, 0,12}, // row index 2 - {j, 0,10}, // row index 3 - {j, 2,10}, // row index 4 - {j, 4,4}, // row index 5 - {j, 4,8}, // row index 6 - {j, 4,6}, // row index 7 - {j+1,0,8}, // row index 8 - {j+1,0,12}, // row index 9 - {j+1,0,10}, // row index 10 - {j+2,0,6}, // row index 11 - {j+2,0,12}, // row index 12 - {j+2,0,10}, // row index 13 - {j, 8,4}, // row index 14 - {j+3,0,8}, // row index 15 - {j+3,0,10} // row index 16 - };*/ +// uint8_t prev_ndi = pdlsch0_harq->DCINdi; /* @@ -4330,7 +4208,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->harq_process_number=%x\n",nr_pdci_info_extracted->harq_process_number); #endif } - +/* if ((dci_format == format1_0) || (dci_format == format1_1)) { if (rnti==crc_scrambled_values[_SI_RNTI_]) { ue->dlsch_SI[eNB_id]->active = 1; @@ -4353,7 +4231,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, } else { } } - +*/ for (dci_field=0; dci_fieldvrb_to_prb_mapping = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); - if (nr_pdci_info_extracted->vrb_to_prb_mapping == 0) { // Non-interleaved - } else { // Interleaved + //if (nr_pdci_info_extracted->vrb_to_prb_mapping == 0) { // Non-interleaved + //} else { // Interleaved // format 0_1 defined in TS 38.211 Section 6.3.1.7 // formats 1_0 and 1_1 not defined yet - } + //} #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->vrb_to_prb_mapping=%x\n",nr_pdci_info_extracted->vrb_to_prb_mapping); #endif @@ -4633,11 +4511,11 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, // 1 bit otherwise, only applicable to resource allocation type 1, as defined in Subclause 6.3 of [6, TS 38.214] nr_pdci_info_extracted->freq_hopping_flag = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); - if (nr_pdci_info_extracted->freq_hopping_flag != 0) { // PUSCH frequency hopping is performed (only resource allocation type 1) + //if (nr_pdci_info_extracted->freq_hopping_flag != 0) { // PUSCH frequency hopping is performed (only resource allocation type 1) - } else { // PUSCH frequency hopping is not performed (only resource allocation type 1) + //} else { // PUSCH frequency hopping is not performed (only resource allocation type 1) // At the moment PUSCH hopping is not implemented. We are considering that the bit is present and the value is '0' - } + //} #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->freq_hopping_flag=%x\n",nr_pdci_info_extracted->freq_hopping_flag); #endif @@ -4654,7 +4532,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, case TB1_NDI: // 19 TB1_NDI: (field defined for -,-,-,format1_1,-,-,-,-) nr_pdci_info_extracted->tb1_ndi = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); - pdlsch0_harq->DCINdi = nr_pdci_info_extracted->tb1_ndi; + //pdlsch0_harq->DCINdi = nr_pdci_info_extracted->tb1_ndi; #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tb1_ndi=%x\n",nr_pdci_info_extracted->tb1_ndi); #endif @@ -4662,7 +4540,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, case TB1_RV: // 20 TB1_RV: (field defined for -,-,-,format1_1,-,-,-,-) nr_pdci_info_extracted->tb1_rv = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); - pdlsch0_harq->rvidx = nr_pdci_info_extracted->tb1_rv; + //pdlsch0_harq->rvidx = nr_pdci_info_extracted->tb1_rv; #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tb1_rv=%x\n",nr_pdci_info_extracted->tb1_rv); #endif @@ -4670,7 +4548,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, case TB2_MCS: // 21 TB2_MCS: (field defined for -,-,-,format1_1,-,-,-,-) nr_pdci_info_extracted->tb2_mcs = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); - if (nr_pdci_info_extracted->mcs < 29) pdlsch0_harq->mcs = nr_pdci_info_extracted->tb2_mcs; + //if (nr_pdci_info_extracted->mcs < 29) pdlsch0_harq->mcs = nr_pdci_info_extracted->tb2_mcs; #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tb2_mcs=%x\n",nr_pdci_info_extracted->tb2_mcs); #endif @@ -4678,7 +4556,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, case TB2_NDI: // 22 TB2_NDI: (field defined for -,-,-,format1_1,-,-,-,-) nr_pdci_info_extracted->tb2_ndi = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); - pdlsch0_harq->DCINdi = nr_pdci_info_extracted->tb2_ndi; + //pdlsch0_harq->DCINdi = nr_pdci_info_extracted->tb2_ndi; #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tb2_ndi=%x\n",nr_pdci_info_extracted->tb2_ndi); #endif @@ -4686,7 +4564,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, case TB2_RV: // 23 TB2_RV: (field defined for -,-,-,format1_1,-,-,-,-) nr_pdci_info_extracted->tb2_rv = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); - pdlsch0_harq->rvidx = nr_pdci_info_extracted->tb2_rv; + //pdlsch0_harq->rvidx = nr_pdci_info_extracted->tb2_rv; #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tb2_rv=%x\n",nr_pdci_info_extracted->tb2_rv); #endif @@ -4695,14 +4573,14 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, case MCS: // 24 MCS: (field defined for format0_0,format0_1,format1_0,-,-,-,-,-) nr_pdci_info_extracted->mcs = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); - if (nr_pdci_info_extracted->mcs < 29) { - if (dci_format == format0_0 || dci_format == format0_1) - ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->mcs = nr_pdci_info_extracted->mcs; - else - pdlsch0_harq->mcs = nr_pdci_info_extracted->mcs; - } else { - return(0); - } + //if (nr_pdci_info_extracted->mcs < 29) { + // if (dci_format == format0_0 || dci_format == format0_1) + // ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->mcs = nr_pdci_info_extracted->mcs; + // else + // pdlsch0_harq->mcs = nr_pdci_info_extracted->mcs; + //} else { + // return(0); + //} #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->mcs=%x\n",nr_pdci_info_extracted->mcs); #endif @@ -4711,30 +4589,30 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, case NDI: // 25 NDI: (field defined for format0_0,format0_1,format1_0,-,-,-,-,-) nr_pdci_info_extracted->ndi = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); - if (dci_format == format0_0 || dci_format == format0_1) { - ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->DCINdi = nr_pdci_info_extracted->ndi; - if (ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->first_tx==1) { - ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->first_tx=0; - ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->DCINdi= nr_pdci_info_extracted->ndi; - ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->round = 0; - } else { - if (ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->DCINdi != nr_pdci_info_extracted->ndi) { // new SDU opportunity - ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->DCINdi= nr_pdci_info_extracted->ndi; - ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->round = 0; - } - } - } else { - if (rnti == crc_scrambled_values[_TC_RNTI_]) { //fix for standalone Contention Resolution Id - pdlsch0_harq->DCINdi = (uint8_t)-1; - } else { - if ((prev_ndi != nr_pdci_info_extracted->ndi) || (pdlsch0_harq->first_tx==1)) { - pdlsch0_harq->round = 0; - pdlsch0_harq->first_tx = 0; - pdlsch0_harq->status = ACTIVE; - } - pdlsch0_harq->DCINdi = nr_pdci_info_extracted->ndi; - } - } + //if (dci_format == format0_0 || dci_format == format0_1) { + // ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->DCINdi = nr_pdci_info_extracted->ndi; + // if (ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->first_tx==1) { + // ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->first_tx=0; + // ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->DCINdi= nr_pdci_info_extracted->ndi; + // ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->round = 0; + // } else { + // if (ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->DCINdi != nr_pdci_info_extracted->ndi) { // new SDU opportunity + // ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->DCINdi= nr_pdci_info_extracted->ndi; + // ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->round = 0; + // } + // } + //} else { + // if (rnti == crc_scrambled_values[_TC_RNTI_]) { //fix for standalone Contention Resolution Id + // pdlsch0_harq->DCINdi = (uint8_t)-1; + // } else { + // if ((prev_ndi != nr_pdci_info_extracted->ndi) || (pdlsch0_harq->first_tx==1)) { + // pdlsch0_harq->round = 0; + // pdlsch0_harq->first_tx = 0; + // pdlsch0_harq->status = ACTIVE; + // } + // pdlsch0_harq->DCINdi = nr_pdci_info_extracted->ndi; + // } + //} #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->ndi=%x\n",nr_pdci_info_extracted->ndi); #endif @@ -4743,29 +4621,29 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, case RV: // 26 RV: (field defined for format0_0,format0_1,format1_0,-,-,-,-,-) nr_pdci_info_extracted->rv = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); - if (dci_format == format0_0 || dci_format == format0_1) - ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->rvidx = nr_pdci_info_extracted->rv; - else - pdlsch0_harq->rvidx = nr_pdci_info_extracted->rv; - if ((prev_ndi == nr_pdci_info_extracted->ndi) && (pdlsch0_harq->rvidx != 0)) { // NDI has not been toggled but rv was increased by eNB: retransmission - if (pdlsch0_harq->status == SCH_IDLE) { + //if (dci_format == format0_0 || dci_format == format0_1) + // ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->rvidx = nr_pdci_info_extracted->rv; + //else + // pdlsch0_harq->rvidx = nr_pdci_info_extracted->rv; + //if ((prev_ndi == nr_pdci_info_extracted->ndi) && (pdlsch0_harq->rvidx != 0)) { // NDI has not been toggled but rv was increased by eNB: retransmission + // if (pdlsch0_harq->status == SCH_IDLE) { // packet was actually decoded in previous transmission (ACK was missed by eNB) // however, the round is not a good check as it might have been decoded in a retransmission prior to this one. // skip pdsch decoding and report ack - pdlsch0->harq_processes[pdlsch0->current_harq_pid]->harq_ack.ack = 1; - pdlsch0->harq_processes[pdlsch0->current_harq_pid]->harq_ack.send_harq_status; + // pdlsch0->harq_processes[pdlsch0->current_harq_pid]->harq_ack.ack = 1; + // pdlsch0->harq_processes[pdlsch0->current_harq_pid]->harq_ack.send_harq_status; #if 0 - pdlsch0->active = 0; - pdlsch0->harq_ack[nr_tti_rx].ack = 1; - pdlsch0->harq_ack[nr_tti_rx].harq_id = nr_pdci_info_extracted->harq_process_number; - pdlsch0->harq_ack[nr_tti_rx].send_harq_status = 1; + // pdlsch0->active = 0; + // pdlsch0->harq_ack[nr_tti_rx].ack = 1; + // pdlsch0->harq_ack[nr_tti_rx].harq_id = nr_pdci_info_extracted->harq_process_number; + // pdlsch0->harq_ack[nr_tti_rx].send_harq_status = 1; #endif - } else { // normal retransmission, nothing special to do - } - } else { - pdlsch0_harq->status = ACTIVE; - } + // } else { // normal retransmission, nothing special to do + // } + //} else { + // pdlsch0_harq->status = ACTIVE; + //} #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->rv=%x\n",nr_pdci_info_extracted->rv); #endif @@ -4774,7 +4652,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, case HARQ_PROCESS_NUMBER: // 27 HARQ_PROCESS_NUMBER: (field defined for format0_0,format0_1,format1_0,format1_1,-,-,-,-) nr_pdci_info_extracted->harq_process_number = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); - pdlsch0->current_harq_pid = nr_pdci_info_extracted->harq_process_number; + //pdlsch0->current_harq_pid = nr_pdci_info_extracted->harq_process_number; #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->harq_process_number=%x\n",nr_pdci_info_extracted->harq_process_number); #endif @@ -4787,7 +4665,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, // 0 otherwise nr_pdci_info_extracted->dai = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); - pdlsch0->harq_processes[pdlsch0->current_harq_pid]->harq_ack.vDAI_DL = nr_pdci_info_extracted->dai+1; + //pdlsch0->harq_processes[pdlsch0->current_harq_pid]->harq_ack.vDAI_DL = nr_pdci_info_extracted->dai+1; //pdlsch0->harq_ack[nr_tti_rx].vDAI_DL = nr_pdci_info_extracted->dai+1; #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->dai=%x\n",nr_pdci_info_extracted->dai); @@ -4824,12 +4702,12 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, // defined in Subclause 7.1.1 TS 38.213 nr_pdci_info_extracted->tpc_pusch = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); - ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->TPC = nr_pdci_info_extracted->tpc_pusch; - if (ue->ul_power_control_dedicated[eNB_id].accumulationEnabled == 1) { - ulsch0->f_pusch += nr_delta_PUSCH_acc[ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->TPC]; - } else { - ulsch0->f_pusch = nr_delta_PUSCH_abs[ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->TPC]; - } + //ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->TPC = nr_pdci_info_extracted->tpc_pusch; + //if (ue->ul_power_control_dedicated[eNB_id].accumulationEnabled == 1) { + // ulsch0->f_pusch += nr_delta_PUSCH_acc[ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->TPC]; + //} else { + // ulsch0->f_pusch = nr_delta_PUSCH_abs[ulsch0->harq_processes[nr_pdci_info_extracted->harq_process_number]->TPC]; + //} #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tpc_pusch=%x\n",nr_pdci_info_extracted->tpc_pusch); #endif @@ -4839,7 +4717,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, // defined in Subclause 7.2.1 TS 38.213 nr_pdci_info_extracted->tpc_pucch = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); - pdlsch0_harq->delta_PUCCH = nr_delta_PUCCH_lut[nr_pdci_info_extracted->tpc_pucch &3]; + //pdlsch0_harq->delta_PUCCH = nr_delta_PUCCH_lut[nr_pdci_info_extracted->tpc_pucch &3]; #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tpc_pucch=%x\n",nr_pdci_info_extracted->tpc_pucch); #endif @@ -7156,13 +7034,17 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue, NR_DL_UE_HARQ_t *dlsch0_harq=NULL,*dlsch1_harq=NULL; NR_UE_ULSCH_t *ulsch0=NULL,*ulsch1=NULL; //NR_DCI_INFO_EXTRACTED_t nr_dci_info_extracted; - uint8_t status=0;//left_shift=0; - //uint64_t pdu_bitmap = 0xFFFFFFFFFFFFFFFF; - //pdu_bitmap = (pdu_bitmap << (64 - dci_length)) >> (64 - dci_length); // this variable will help to remove the bits of other fields when left-switching + uint8_t status=0; + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG + printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> dci_format=%d, rnti=%d, dci_length=%d, dci_pdu[0]=%x, dci_pdu[2]=%x, dci_pdu[2]=%x, dci_pdu[3]=%x\n", + dci_format,rnti,dci_length,dci_pdu[0],dci_pdu[1],dci_pdu[2],dci_pdu[3]); + #endif + + uint8_t dci_fields_sizes_format[NBR_NR_DCI_FIELDS] ={0}; for (int m=0; mactive = 0; if (dci_fields_sizes[HARQ_PROCESS_NUMBER][dci_format] != 0) { // 27 HARQ_PROCESS_NUMBER (27 is the position in dci_fields_sizes array for field HARQ_PROCESS_NUMBER) @@ -7172,19 +7054,20 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue, //left_shift = 0; #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> nr_dci_info_extracted->harq_process_number=%x\n",nr_dci_info_extracted->harq_process_number); - #endif + for (int i=0; i<1000; i++) printf("%d",i); + #endif } dlsch0_harq = dlsch[0]->harq_processes[nr_dci_info_extracted->harq_process_number]; ulsch0 = ulsch; -/* printf("nr_dci_info_extracted.harq_process_number = %d\n",nr_dci_info_extracted.harq_process_number); - printf("dlsch0 = %d\n",dlsch0); - printf("dlsch0_harq = %d\n",dlsch0_harq);*/ + //printf("nr_dci_info_extracted.harq_process_number = %d\n",nr_dci_info_extracted.harq_process_number); + //printf("dlsch0 = %d\n",dlsch0); + //printf("dlsch0_harq = %d\n",dlsch0_harq); if (!dlsch[0]) return -1; if (!ulsch) return -1; - +*/ memset(&nr_dci_info_extracted,0,sizeof(nr_dci_info_extracted)); // printf("we reach this point\n"); #ifdef NR_PDCCH_DCI_TOOLS_DEBUG diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index b04540f972..c2bca72271 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -1135,6 +1135,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fa const uint16_t n_RB_ULBWP = 106; const uint16_t n_RB_DLBWP = 106; +printf(">>> nr_ue_process_dci at MAC layer"); switch(dci_format){ case format0_0: diff --git a/targets/RT/USER/nr-ue.c b/targets/RT/USER/nr-ue.c index 04da3067c2..05e25f7371 100644 --- a/targets/RT/USER/nr-ue.c +++ b/targets/RT/USER/nr-ue.c @@ -684,12 +684,16 @@ static void *UE_thread_rxn_txnp4(void *arg) { phy_procedures_slot_parallelization_UE_RX( UE, proc, 0, 0, 1, UE->mode, no_relay, NULL ); #else phy_procedures_nrUE_RX( UE, proc, 0, 0, 1, UE->mode, no_relay, NULL ); + printf(">>> nr_ue_pdcch_procedures ended\n"); + #endif } #if UE_TIMING_TRACE start_meas(&UE->generic_stat); #endif +printf(">>> mac init\n"); + if (UE->mac_enabled==1) { // trigger L2 to run ue_scheduler thru IF module @@ -759,6 +763,7 @@ static void *UE_thread_rxn_txnp4(void *arg) { #if UE_TIMING_TRACE stop_meas(&UE->generic_stat); #endif +printf(">>> mac ended\n"); // Prepare the future Tx data #if 0 From de2362761c973b1f627b24603893b8a55b951ed2 Mon Sep 17 00:00:00 2001 From: laurent Date: Thu, 27 Sep 2018 18:10:03 +0200 Subject: [PATCH 250/379] after testing other targets --- openair1/PHY/LTE_TRANSPORT/dlsch_coding.c | 4 ++-- targets/RT/USER/lte-enb.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c index a766bb8202..ccdc4f25b0 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c @@ -363,7 +363,7 @@ void *te_thread(void *param) { exit_fun( "ERROR pthread_cond_signal" ); return(NULL); } - /*if(opp_enabled == 1 && te_wakeup_stats0->diff_now>50*3000){ + /*if(opp_enabled == 1 && te_wakeup_stats0->p_time>50*3000){ print_meas_now(te_wakeup_stats0,"coding_wakeup",stderr); printf("te_thread0 delay for waking up in frame_rx: %d subframe_rx: %d \n",proc->frame_rx,proc->subframe_rx); }*/ @@ -573,7 +573,7 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB, } stop_meas(te_wait_stats); - /*if(opp_enabled == 1 && te_wait_stats->diff_now>100*3000){ + /*if(opp_enabled == 1 && te_wait_stats->p_time>100*3000){ print_meas_now(te_wait_stats,"coding_wait",stderr); printf("coding delay in wait on codition in frame_rx: %d \n",proc->frame_rx); }*/ diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 8c6f6dd766..93c53a37a0 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -259,7 +259,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam LOG_D(PHY,"%s() Exit proc[rx:%d%d tx:%d%d]\n", __FUNCTION__, proc->frame_rx, proc->subframe_rx, proc->frame_tx, proc->subframe_tx); LOG_D(PHY, "rxtx:%lld nfapi:%lld phy:%lld tx:%lld rx:%lld prach:%lld ofdm:%lld ", - softmodem_stats_rxtx_sf.diff_now, nfapi_meas.diff_now, + softmodem_stats_rxtx_sf.p_time, nfapi_meas.p_time, TICK_TO_US(eNB->phy_proc), TICK_TO_US(eNB->phy_proc_tx), TICK_TO_US(eNB->phy_proc_rx), From c4afc399fca155b5e2419435e8e26c5f14a9ef08 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Fri, 28 Sep 2018 00:08:13 -0700 Subject: [PATCH 251/379] astyling usrp_lib.cpp --- targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 1858 +++++++++--------- 1 file changed, 949 insertions(+), 909 deletions(-) diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index 47cd12d816..2af0e481b0 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -65,211 +65,191 @@ /*! \brief USRP Configuration */ typedef struct { - // -------------------------------- - // variables for USRP configuration - // -------------------------------- - //! USRP device pointer - uhd::usrp::multi_usrp::sptr usrp; + // -------------------------------- + // variables for USRP configuration + // -------------------------------- + //! USRP device pointer + uhd::usrp::multi_usrp::sptr usrp; - //create a send streamer and a receive streamer - //! USRP TX Stream - uhd::tx_streamer::sptr tx_stream; - //! USRP RX Stream - uhd::rx_streamer::sptr rx_stream; + //create a send streamer and a receive streamer + //! USRP TX Stream + uhd::tx_streamer::sptr tx_stream; + //! USRP RX Stream + uhd::rx_streamer::sptr rx_stream; - //! USRP TX Metadata - uhd::tx_metadata_t tx_md; - //! USRP RX Metadata - uhd::rx_metadata_t rx_md; + //! USRP TX Metadata + uhd::tx_metadata_t tx_md; + //! USRP RX Metadata + uhd::rx_metadata_t rx_md; - //! Sampling rate - double sample_rate; + //! Sampling rate + double sample_rate; - //! TX forward samples. We use usrp_time_offset to get this value - int tx_forward_nsamps; //166 for 20Mhz + //! TX forward samples. We use usrp_time_offset to get this value + int tx_forward_nsamps; //166 for 20Mhz - // -------------------------------- - // Debug and output control - // -------------------------------- - int num_underflows; - int num_overflows; - int num_seq_errors; - int64_t tx_count; - int64_t rx_count; - int wait_for_first_pps; - int use_gps; - //! timestamp of RX packet - openair0_timestamp rx_timestamp; + // -------------------------------- + // Debug and output control + // -------------------------------- + int num_underflows; + int num_overflows; + int num_seq_errors; + int64_t tx_count; + int64_t rx_count; + int wait_for_first_pps; + int use_gps; + //! timestamp of RX packet + openair0_timestamp rx_timestamp; } usrp_state_t; //void print_notes(void) //{ - // Helpful notes - // std::cout << boost::format("**************************************Helpful Notes on Clock/PPS Selection**************************************\n"); - // std::cout << boost::format("As you can see, the default 10 MHz Reference and 1 PPS signals are now from the GPSDO.\n"); - // std::cout << boost::format("If you would like to use the internal reference(TCXO) in other applications, you must configure that explicitly.\n"); - // std::cout << boost::format("You can no longer select the external SMAs for 10 MHz or 1 PPS signaling.\n"); - // std::cout << boost::format("****************************************************************************************************************\n"); +// Helpful notes +// std::cout << boost::format("**************************************Helpful Notes on Clock/PPS Selection**************************************\n"); +// std::cout << boost::format("As you can see, the default 10 MHz Reference and 1 PPS signals are now from the GPSDO.\n"); +// std::cout << boost::format("If you would like to use the internal reference(TCXO) in other applications, you must configure that explicitly.\n"); +// std::cout << boost::format("You can no longer select the external SMAs for 10 MHz or 1 PPS signaling.\n"); +// std::cout << boost::format("****************************************************************************************************************\n"); //} -static int sync_to_gps(openair0_device *device) -{ - uhd::set_thread_priority_safe(); +static int sync_to_gps(openair0_device *device) { + uhd::set_thread_priority_safe(); + //std::string args; + //Set up program options + //po::options_description desc("Allowed options"); + //desc.add_options() + //("help", "help message") + //("args", po::value(&args)->default_value(""), "USRP device arguments") + //; + //po::variables_map vm; + //po::store(po::parse_command_line(argc, argv, desc), vm); + //po::notify(vm); + //Print the help message + //if (vm.count("help")) + //{ + // std::cout << boost::format("Synchronize USRP to GPS %s") % desc << std::endl; + // return EXIT_FAILURE; + //} + //Create a USRP device + //std::cout << boost::format("\nCreating the USRP device with: %s...\n") % args; + //uhd::usrp::multi_usrp::sptr usrp = uhd::usrp::multi_usrp::make(args); + //std::cout << boost::format("Using Device: %s\n") % usrp->get_pp_string(); + usrp_state_t *s = (usrp_state_t *)device->priv; - //std::string args; + try { + size_t num_mboards = s->usrp->get_num_mboards(); + size_t num_gps_locked = 0; - //Set up program options - //po::options_description desc("Allowed options"); - //desc.add_options() - //("help", "help message") - //("args", po::value(&args)->default_value(""), "USRP device arguments") - //; - //po::variables_map vm; - //po::store(po::parse_command_line(argc, argv, desc), vm); - //po::notify(vm); + for (size_t mboard = 0; mboard < num_mboards; mboard++) { + std::cout << "Synchronizing mboard " << mboard << ": " << s->usrp->get_mboard_name(mboard) << std::endl; + //Set references to GPSDO + s->usrp->set_clock_source("gpsdo", mboard); + s->usrp->set_time_source("gpsdo", mboard); + //std::cout << std::endl; + //print_notes(); + //std::cout << std::endl; + //Check for 10 MHz lock + std::vector sensor_names = s->usrp->get_mboard_sensor_names(mboard); - //Print the help message - //if (vm.count("help")) - //{ - // std::cout << boost::format("Synchronize USRP to GPS %s") % desc << std::endl; - // return EXIT_FAILURE; - //} + if(std::find(sensor_names.begin(), sensor_names.end(), "ref_locked") != sensor_names.end()) { + std::cout << "Waiting for reference lock..." << std::flush; + bool ref_locked = false; - //Create a USRP device - //std::cout << boost::format("\nCreating the USRP device with: %s...\n") % args; - //uhd::usrp::multi_usrp::sptr usrp = uhd::usrp::multi_usrp::make(args); - //std::cout << boost::format("Using Device: %s\n") % usrp->get_pp_string(); - - usrp_state_t *s = (usrp_state_t*)device->priv; + for (int i = 0; i < 30 and not ref_locked; i++) { + ref_locked = s->usrp->get_mboard_sensor("ref_locked", mboard).to_bool(); - try - { - size_t num_mboards = s->usrp->get_num_mboards(); - size_t num_gps_locked = 0; - for (size_t mboard = 0; mboard < num_mboards; mboard++) - { - std::cout << "Synchronizing mboard " << mboard << ": " << s->usrp->get_mboard_name(mboard) << std::endl; - - //Set references to GPSDO - s->usrp->set_clock_source("gpsdo", mboard); - s->usrp->set_time_source("gpsdo", mboard); - - //std::cout << std::endl; - //print_notes(); - //std::cout << std::endl; - - //Check for 10 MHz lock - std::vector sensor_names = s->usrp->get_mboard_sensor_names(mboard); - if(std::find(sensor_names.begin(), sensor_names.end(), "ref_locked") != sensor_names.end()) - { - std::cout << "Waiting for reference lock..." << std::flush; - bool ref_locked = false; - for (int i = 0; i < 30 and not ref_locked; i++) - { - ref_locked = s->usrp->get_mboard_sensor("ref_locked", mboard).to_bool(); - if (not ref_locked) - { - std::cout << "." << std::flush; - boost::this_thread::sleep(boost::posix_time::seconds(1)); - } - } - if(ref_locked) - { - std::cout << "LOCKED" << std::endl; - } else { - std::cout << "FAILED" << std::endl; - std::cout << "Failed to lock to GPSDO 10 MHz Reference. Exiting." << std::endl; - exit(EXIT_FAILURE); - } - } - else - { - std::cout << boost::format("ref_locked sensor not present on this board.\n"); - } - - //Wait for GPS lock - bool gps_locked = s->usrp->get_mboard_sensor("gps_locked", mboard).to_bool(); - if(gps_locked) - { - num_gps_locked++; - std::cout << boost::format("GPS Locked\n"); - } - else - { - std::cerr << "WARNING: GPS not locked - time will not be accurate until locked" << std::endl; - } - - //Set to GPS time - uhd::time_spec_t gps_time = uhd::time_spec_t(time_t(s->usrp->get_mboard_sensor("gps_time", mboard).to_int())); - //s->usrp->set_time_next_pps(gps_time+1.0, mboard); - s->usrp->set_time_next_pps(uhd::time_spec_t(0.0)); - - //Wait for it to apply - //The wait is 2 seconds because N-Series has a known issue where - //the time at the last PPS does not properly update at the PPS edge - //when the time is actually set. - boost::this_thread::sleep(boost::posix_time::seconds(2)); - - //Check times - gps_time = uhd::time_spec_t(time_t(s->usrp->get_mboard_sensor("gps_time", mboard).to_int())); - uhd::time_spec_t time_last_pps = s->usrp->get_time_last_pps(mboard); - std::cout << "USRP time: " << (boost::format("%0.9f") % time_last_pps.get_real_secs()) << std::endl; - std::cout << "GPSDO time: " << (boost::format("%0.9f") % gps_time.get_real_secs()) << std::endl; - //if (gps_time.get_real_secs() == time_last_pps.get_real_secs()) - // std::cout << std::endl << "SUCCESS: USRP time synchronized to GPS time" << std::endl << std::endl; - //else - // std::cerr << std::endl << "ERROR: Failed to synchronize USRP time to GPS time" << std::endl << std::endl; + if (not ref_locked) { + std::cout << "." << std::flush; + boost::this_thread::sleep(boost::posix_time::seconds(1)); + } } - if (num_gps_locked == num_mboards and num_mboards > 1) - { - //Check to see if all USRP times are aligned - //First, wait for PPS. - uhd::time_spec_t time_last_pps = s->usrp->get_time_last_pps(); - while (time_last_pps == s->usrp->get_time_last_pps()) - { - boost::this_thread::sleep(boost::posix_time::milliseconds(1)); - } - - //Sleep a little to make sure all devices have seen a PPS edge - boost::this_thread::sleep(boost::posix_time::milliseconds(200)); - - //Compare times across all mboards - bool all_matched = true; - uhd::time_spec_t mboard0_time = s->usrp->get_time_last_pps(0); - for (size_t mboard = 1; mboard < num_mboards; mboard++) - { - uhd::time_spec_t mboard_time = s->usrp->get_time_last_pps(mboard); - if (mboard_time != mboard0_time) - { - all_matched = false; - std::cerr << (boost::format("ERROR: Times are not aligned: USRP 0=%0.9f, USRP %d=%0.9f") - % mboard0_time.get_real_secs() - % mboard - % mboard_time.get_real_secs()) << std::endl; - } - } - if (all_matched) - { - std::cout << "SUCCESS: USRP times aligned" << std::endl << std::endl; - } else { - std::cout << "ERROR: USRP times are not aligned" << std::endl << std::endl; - } + if(ref_locked) { + std::cout << "LOCKED" << std::endl; + } else { + std::cout << "FAILED" << std::endl; + std::cout << "Failed to lock to GPSDO 10 MHz Reference. Exiting." << std::endl; + exit(EXIT_FAILURE); } - } - catch (std::exception& e) - { - std::cout << boost::format("\nError: %s") % e.what(); - std::cout << boost::format("This could mean that you have not installed the GPSDO correctly.\n\n"); - std::cout << boost::format("Visit one of these pages if the problem persists:\n"); - std::cout << boost::format(" * N2X0/E1X0: http://files.ettus.com/manual/page_gpsdo.html"); - std::cout << boost::format(" * X3X0: http://files.ettus.com/manual/page_gpsdo_x3x0.html\n\n"); - std::cout << boost::format(" * E3X0: http://files.ettus.com/manual/page_usrp_e3x0.html#e3x0_hw_gps\n\n"); - exit(EXIT_FAILURE); + } else { + std::cout << boost::format("ref_locked sensor not present on this board.\n"); + } + + //Wait for GPS lock + bool gps_locked = s->usrp->get_mboard_sensor("gps_locked", mboard).to_bool(); + + if(gps_locked) { + num_gps_locked++; + std::cout << boost::format("GPS Locked\n"); + } else { + std::cerr << "WARNING: GPS not locked - time will not be accurate until locked" << std::endl; + } + + //Set to GPS time + uhd::time_spec_t gps_time = uhd::time_spec_t(time_t(s->usrp->get_mboard_sensor("gps_time", mboard).to_int())); + //s->usrp->set_time_next_pps(gps_time+1.0, mboard); + s->usrp->set_time_next_pps(uhd::time_spec_t(0.0)); + //Wait for it to apply + //The wait is 2 seconds because N-Series has a known issue where + //the time at the last PPS does not properly update at the PPS edge + //when the time is actually set. + boost::this_thread::sleep(boost::posix_time::seconds(2)); + //Check times + gps_time = uhd::time_spec_t(time_t(s->usrp->get_mboard_sensor("gps_time", mboard).to_int())); + uhd::time_spec_t time_last_pps = s->usrp->get_time_last_pps(mboard); + std::cout << "USRP time: " << (boost::format("%0.9f") % time_last_pps.get_real_secs()) << std::endl; + std::cout << "GPSDO time: " << (boost::format("%0.9f") % gps_time.get_real_secs()) << std::endl; + //if (gps_time.get_real_secs() == time_last_pps.get_real_secs()) + // std::cout << std::endl << "SUCCESS: USRP time synchronized to GPS time" << std::endl << std::endl; + //else + // std::cerr << std::endl << "ERROR: Failed to synchronize USRP time to GPS time" << std::endl << std::endl; } - return EXIT_SUCCESS; + if (num_gps_locked == num_mboards and num_mboards > 1) { + //Check to see if all USRP times are aligned + //First, wait for PPS. + uhd::time_spec_t time_last_pps = s->usrp->get_time_last_pps(); + + while (time_last_pps == s->usrp->get_time_last_pps()) { + boost::this_thread::sleep(boost::posix_time::milliseconds(1)); + } + + //Sleep a little to make sure all devices have seen a PPS edge + boost::this_thread::sleep(boost::posix_time::milliseconds(200)); + //Compare times across all mboards + bool all_matched = true; + uhd::time_spec_t mboard0_time = s->usrp->get_time_last_pps(0); + + for (size_t mboard = 1; mboard < num_mboards; mboard++) { + uhd::time_spec_t mboard_time = s->usrp->get_time_last_pps(mboard); + + if (mboard_time != mboard0_time) { + all_matched = false; + std::cerr << (boost::format("ERROR: Times are not aligned: USRP 0=%0.9f, USRP %d=%0.9f") + % mboard0_time.get_real_secs() + % mboard + % mboard_time.get_real_secs()) << std::endl; + } + } + + if (all_matched) { + std::cout << "SUCCESS: USRP times aligned" << std::endl << std::endl; + } else { + std::cout << "ERROR: USRP times are not aligned" << std::endl << std::endl; + } + } + } catch (std::exception &e) { + std::cout << boost::format("\nError: %s") % e.what(); + std::cout << boost::format("This could mean that you have not installed the GPSDO correctly.\n\n"); + std::cout << boost::format("Visit one of these pages if the problem persists:\n"); + std::cout << boost::format(" * N2X0/E1X0: http://files.ettus.com/manual/page_gpsdo.html"); + std::cout << boost::format(" * X3X0: http://files.ettus.com/manual/page_gpsdo_x3x0.html\n\n"); + std::cout << boost::format(" * E3X0: http://files.ettus.com/manual/page_usrp_e3x0.html#e3x0_hw_gps\n\n"); + exit(EXIT_FAILURE); + } + + return EXIT_SUCCESS; } #if defined(USRP_REC_PLAY) @@ -315,24 +295,18 @@ char config_hlp_sf_wdelay[] = CONFIG_HLP_SF_WDELAY; @param device pointer to the device structure specific to the RF hardware target */ static int trx_usrp_start(openair0_device *device) { - #if defined(USRP_REC_PLAY) - if (u_sf_mode != 2) { // not replay mode -#endif - usrp_state_t *s = (usrp_state_t*)device->priv; - - - // setup GPIO for TDD, GPIO(4) = ATR_RX - //set data direction register (DDR) to output + if (u_sf_mode != 2) { // not replay mode +#endif + usrp_state_t *s = (usrp_state_t *)device->priv; + // setup GPIO for TDD, GPIO(4) = ATR_RX + //set data direction register (DDR) to output s->usrp->set_gpio_attr("FP0", "DDR", 0x1f, 0x1f); - - //set control register to ATR + //set control register to ATR s->usrp->set_gpio_attr("FP0", "CTRL", 0x1f,0x1f); - - //set ATR register + //set ATR register s->usrp->set_gpio_attr("FP0", "ATR_RX", 1<<4, 0x1f); - // init recv and send streaming uhd::stream_cmd_t cmd(uhd::stream_cmd_t::STREAM_MODE_START_CONTINUOUS); LOG_I(PHY,"Time in secs now: %llu \n", s->usrp->get_time_now().to_ticks(s->sample_rate)); @@ -340,28 +314,26 @@ static int trx_usrp_start(openair0_device *device) { if (s->use_gps == 1) { s->wait_for_first_pps = 1; - cmd.time_spec = s->usrp->get_time_last_pps() + uhd::time_spec_t(1.0); - } - else { - s->wait_for_first_pps = 0; + cmd.time_spec = s->usrp->get_time_last_pps() + uhd::time_spec_t(1.0); + } else { + s->wait_for_first_pps = 0; cmd.time_spec = s->usrp->get_time_now() + uhd::time_spec_t(0.05); } cmd.stream_now = false; // start at constant delay s->rx_stream->issue_stream_cmd(cmd); - s->tx_md.time_spec = cmd.time_spec + uhd::time_spec_t(1-(double)s->tx_forward_nsamps/s->sample_rate); s->tx_md.has_time_spec = true; s->tx_md.start_of_burst = true; s->tx_md.end_of_burst = false; - s->rx_count = 0; s->tx_count = 0; s->rx_timestamp = 0; #if defined(USRP_REC_PLAY) - } -#endif - return 0; + } + +#endif + return 0; } /*! \brief Terminate operation of the USRP transceiver -- free all associated resources * \param device the hardware to use @@ -369,12 +341,14 @@ static int trx_usrp_start(openair0_device *device) { static void trx_usrp_end(openair0_device *device) { #if defined(USRP_REC_PLAY) // For some ugly reason, this can be called several times... static int done = 0; - if (done == 1) return; - done = 1; - if (u_sf_mode != 2) { // not subframes replay -#endif - usrp_state_t *s = (usrp_state_t*)device->priv; + if (done == 1) return; + + done = 1; + + if (u_sf_mode != 2) { // not subframes replay +#endif + usrp_state_t *s = (usrp_state_t *)device->priv; s->rx_stream->issue_stream_cmd(uhd::stream_cmd_t::STREAM_MODE_STOP_CONTINUOUS); //send a mini EOB packet s->tx_md.end_of_burst = true; @@ -382,55 +356,67 @@ static void trx_usrp_end(openair0_device *device) { s->tx_md.end_of_burst = false; sleep(1); #if defined(USRP_REC_PLAY) - } + } + #endif #if defined(USRP_REC_PLAY) - if (u_sf_mode == 1) { // subframes store - pFile = fopen (u_sf_filename,"wb+"); - if (pFile == NULL) { - std::cerr << "Cannot open " << u_sf_filename << std::endl; - } else { - unsigned int i = 0; - unsigned int modu = 0; - if ((modu = nb_samples % 10) != 0) { - nb_samples -= modu; // store entire number of frames - } - std::cerr << "Writing " << nb_samples << " subframes to " << u_sf_filename << " ..." << std::endl; - for (i = 0; i < nb_samples; i++) { - fwrite(ms_sample+i, sizeof(unsigned char), sizeof(iqrec_t), pFile); - } - fclose (pFile); - std::cerr << "File " << u_sf_filename << " closed." << std::endl; + + if (u_sf_mode == 1) { // subframes store + pFile = fopen (u_sf_filename,"wb+"); + + if (pFile == NULL) { + std::cerr << "Cannot open " << u_sf_filename << std::endl; + } else { + unsigned int i = 0; + unsigned int modu = 0; + + if ((modu = nb_samples % 10) != 0) { + nb_samples -= modu; // store entire number of frames } + + std::cerr << "Writing " << nb_samples << " subframes to " << u_sf_filename << " ..." << std::endl; + + for (i = 0; i < nb_samples; i++) { + fwrite(ms_sample+i, sizeof(unsigned char), sizeof(iqrec_t), pFile); + } + + fclose (pFile); + std::cerr << "File " << u_sf_filename << " closed." << std::endl; } - if (u_sf_mode == 1) { // record + } + + if (u_sf_mode == 1) { // record + if (ms_sample != NULL) { + free((void *)ms_sample); + ms_sample = NULL; + } + } + + if (u_sf_mode == 2) { // replay + if (use_mmap) { + if (ms_sample != MAP_FAILED) { + munmap(ms_sample, sb.st_size); + ms_sample = NULL; + } + + if (mmapfd != 0) { + close(mmapfd); + mmapfd = 0; + } + } else { if (ms_sample != NULL) { - free((void*)ms_sample); - ms_sample = NULL; + free(ms_sample); + ms_sample = NULL; + } + + if (iqfd != 0) { + close(iqfd); + iqfd = 0; } } - if (u_sf_mode == 2) { // replay - if (use_mmap) { - if (ms_sample != MAP_FAILED) { - munmap(ms_sample, sb.st_size); - ms_sample = NULL; - } - if (mmapfd != 0) { - close(mmapfd); - mmapfd = 0; - } - } else { - if (ms_sample != NULL) { - free(ms_sample); - ms_sample = NULL; - } - if (iqfd != 0) { - close(iqfd); - iqfd = 0; - } - } - } -#endif + } + +#endif } /*! \brief Called to send samples to the USRP RF target @@ -444,78 +430,80 @@ static void trx_usrp_end(openair0_device *device) { static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps, int cc, int flags) { int ret=0; #if defined(USRP_REC_PLAY) + if (u_sf_mode != 2) { // not replay mode -#endif - usrp_state_t *s = (usrp_state_t*)device->priv; - - int nsamps2; // aligned to upper 32 or 16 byte boundary +#endif + usrp_state_t *s = (usrp_state_t *)device->priv; + int nsamps2; // aligned to upper 32 or 16 byte boundary #if defined(__x86_64) || defined(__i386__) #ifdef __AVX2__ - nsamps2 = (nsamps+7)>>3; - __m256i buff_tx[2][nsamps2]; + nsamps2 = (nsamps+7)>>3; + __m256i buff_tx[2][nsamps2]; #else - nsamps2 = (nsamps+3)>>2; - __m128i buff_tx[2][nsamps2]; + nsamps2 = (nsamps+3)>>2; + __m128i buff_tx[2][nsamps2]; #endif #elif defined(__arm__) - nsamps2 = (nsamps+3)>>2; - int16x8_t buff_tx[2][nsamps2]; + nsamps2 = (nsamps+3)>>2; + int16x8_t buff_tx[2][nsamps2]; #endif - - // bring RX data into 12 LSBs for softmodem RX - for (int i=0; itx_md.time_spec = uhd::time_spec_t::from_ticks(timestamp, s->sample_rate); - s->tx_md.has_time_spec = flags; - - - if(flags>0) - s->tx_md.has_time_spec = true; - else - s->tx_md.has_time_spec = false; - - if (flags == 2) { // start of burst - s->tx_md.start_of_burst = true; - s->tx_md.end_of_burst = false; - } else if (flags == 3) { // end of burst - s->tx_md.start_of_burst = false; - s->tx_md.end_of_burst = true; - } else if (flags == 4) { // start and end - s->tx_md.start_of_burst = true; - s->tx_md.end_of_burst = true; - } else if (flags==1) { // middle of burst - s->tx_md.start_of_burst = false; - s->tx_md.end_of_burst = false; - } - if(flags==10){ // fail safe mode - s->tx_md.has_time_spec = false; - s->tx_md.start_of_burst = false; - s->tx_md.end_of_burst = true; - } - if (cc>1) { - std::vector buff_ptrs; - for (int i=0; itx_stream->send(buff_ptrs, nsamps, s->tx_md,1e-3); - } else - ret = (int)s->tx_stream->send(buff_tx[0], nsamps, s->tx_md,1e-3); - - - - if (ret != nsamps) - LOG_E(PHY,"[xmit] tx samples %d != %d\n",ret,nsamps); + s->tx_md.time_spec = uhd::time_spec_t::from_ticks(timestamp, s->sample_rate); + s->tx_md.has_time_spec = flags; + + if(flags>0) + s->tx_md.has_time_spec = true; + else + s->tx_md.has_time_spec = false; + + if (flags == 2) { // start of burst + s->tx_md.start_of_burst = true; + s->tx_md.end_of_burst = false; + } else if (flags == 3) { // end of burst + s->tx_md.start_of_burst = false; + s->tx_md.end_of_burst = true; + } else if (flags == 4) { // start and end + s->tx_md.start_of_burst = true; + s->tx_md.end_of_burst = true; + } else if (flags==1) { // middle of burst + s->tx_md.start_of_burst = false; + s->tx_md.end_of_burst = false; + } + + if(flags==10) { // fail safe mode + s->tx_md.has_time_spec = false; + s->tx_md.start_of_burst = false; + s->tx_md.end_of_burst = true; + } + + if (cc>1) { + std::vector buff_ptrs; + + for (int i=0; itx_stream->send(buff_ptrs, nsamps, s->tx_md,1e-3); + } else + ret = (int)s->tx_stream->send(buff_tx[0], nsamps, s->tx_md,1e-3); + + if (ret != nsamps) + LOG_E(PHY,"[xmit] tx samples %d != %d\n",ret,nsamps); + #if defined(USRP_REC_PLAY) } else { struct timespec req; @@ -524,8 +512,8 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp, nanosleep(&req, NULL); ret = nsamps; } -#endif +#endif return ret; } @@ -541,12 +529,13 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp, * \returns the number of sample read */ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp, void **buff, int nsamps, int cc) { - usrp_state_t *s = (usrp_state_t*)device->priv; + usrp_state_t *s = (usrp_state_t *)device->priv; int samples_received=0,i,j; int nsamps2; // aligned to upper 32 or 16 byte boundary #if defined(USRP_REC_PLAY) + if (u_sf_mode != 2) { // not replay mode -#endif +#endif #if defined(__x86_64) || defined(__i386__) #ifdef __AVX2__ nsamps2 = (nsamps+7)>>3; @@ -561,66 +550,79 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp #endif if (device->type == USRP_B200_DEV) { - if (cc>1) { - // receive multiple channels (e.g. RF A and RF B) - std::vector buff_ptrs; - for (int i=0; irx_stream->recv(buff_ptrs, nsamps, s->rx_md); - } else { - // receive a single channel (e.g. from connector RF A) - samples_received=0; - while (samples_received != nsamps) { - samples_received += s->rx_stream->recv(buff_tmp[0]+samples_received, - nsamps-samples_received, s->rx_md); - if ((s->wait_for_first_pps == 0) && (s->rx_md.error_code!=uhd::rx_metadata_t::ERROR_CODE_NONE)) - break; - if ((s->wait_for_first_pps == 1) && (samples_received != nsamps)) { printf("sleep...\n");} //usleep(100); - } - if (samples_received == nsamps) s->wait_for_first_pps=0; + if (cc>1) { + // receive multiple channels (e.g. RF A and RF B) + std::vector buff_ptrs; + + for (int i=0; irx_stream->recv(buff_ptrs, nsamps, s->rx_md); + } else { + // receive a single channel (e.g. from connector RF A) + samples_received=0; + + while (samples_received != nsamps) { + samples_received += s->rx_stream->recv(buff_tmp[0]+samples_received, + nsamps-samples_received, s->rx_md); + + if ((s->wait_for_first_pps == 0) && (s->rx_md.error_code!=uhd::rx_metadata_t::ERROR_CODE_NONE)) + break; + + if ((s->wait_for_first_pps == 1) && (samples_received != nsamps)) { + printf("sleep...\n"); //usleep(100); + } } - // bring RX data into 12 LSBs for softmodem RX - for (int i=0; iwait_for_first_pps=0; + } + + // bring RX data into 12 LSBs for softmodem RX + for (int i=0; itype == USRP_X300_DEV) { - if (cc>1) { - // receive multiple channels (e.g. RF A and RF B) - std::vector buff_ptrs; + if (cc>1) { + // receive multiple channels (e.g. RF A and RF B) + std::vector buff_ptrs; - for (int i=0; irx_stream->recv(buff_ptrs, nsamps, s->rx_md); - } else { - // receive a single channel (e.g. from connector RF A) - samples_received = s->rx_stream->recv(buff[0], nsamps, s->rx_md); - } + for (int i=0; irx_stream->recv(buff_ptrs, nsamps, s->rx_md); + } else { + // receive a single channel (e.g. from connector RF A) + samples_received = s->rx_stream->recv(buff[0], nsamps, s->rx_md); + } } + if (samples_received < nsamps) - LOG_E(PHY,"[recv] received %d samples out of %d\n",samples_received,nsamps); + LOG_E(PHY,"[recv] received %d samples out of %d\n",samples_received,nsamps); if ( s->rx_md.error_code != uhd::rx_metadata_t::ERROR_CODE_NONE) - LOG_E(PHY, "%s\n", s->rx_md.to_pp_string(true).c_str()); + LOG_E(PHY, "%s\n", s->rx_md.to_pp_string(true).c_str()); s->rx_count += nsamps; s->rx_timestamp = s->rx_md.time_spec.to_ticks(s->sample_rate); *ptimestamp = s->rx_timestamp; #if defined (USRP_REC_PLAY) } -#endif + +#endif #if defined(USRP_REC_PLAY) + if (u_sf_mode == 1) { // record mode // Copy subframes to memory (later dump on a file) if (nb_samples < u_sf_max) { - (ms_sample+nb_samples)->header = BELL_LABS_IQ_HEADER; + (ms_sample+nb_samples)->header = BELL_LABS_IQ_HEADER; (ms_sample+nb_samples)->ts = *ptimestamp; memcpy((ms_sample+nb_samples)->samples, buff[0], nsamps*4); nb_samples++; @@ -629,62 +631,78 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp if (cur_samples == nb_samples) { cur_samples = 0; wrap_count++; + if (wrap_count == u_sf_loops) { - std::cerr << "USRP device terminating subframes replay mode after " << u_sf_loops << " loops." << std::endl; - return 0; // should make calling process exit + std::cerr << "USRP device terminating subframes replay mode after " << u_sf_loops << " loops." << std::endl; + return 0; // should make calling process exit } + wrap_ts = wrap_count * (nb_samples * (((int)(device->openair0_cfg[0].sample_rate)) / 1000)); + if (!use_mmap) { - if (lseek(iqfd, 0, SEEK_SET) == 0) { - std::cerr << "Seeking at the beginning of IQ file" << std::endl; - } else { - std::cerr << "Problem seeking at the beginning of IQ file" << std::endl; - } + if (lseek(iqfd, 0, SEEK_SET) == 0) { + std::cerr << "Seeking at the beginning of IQ file" << std::endl; + } else { + std::cerr << "Problem seeking at the beginning of IQ file" << std::endl; + } } } + if (use_mmap) { if (cur_samples < nb_samples) { - *ptimestamp = (ms_sample[0].ts + (cur_samples * (((int)(device->openair0_cfg[0].sample_rate)) / 1000))) + wrap_ts; - if (cur_samples == 0) { - std::cerr << "starting subframes file with wrap_count=" << wrap_count << " wrap_ts=" << wrap_ts - << " ts=" << *ptimestamp << std::endl; - } - memcpy(buff[0], &ms_sample[cur_samples].samples[0], nsamps*4); - cur_samples++; + *ptimestamp = (ms_sample[0].ts + (cur_samples * (((int)(device->openair0_cfg[0].sample_rate)) / 1000))) + wrap_ts; + + if (cur_samples == 0) { + std::cerr << "starting subframes file with wrap_count=" << wrap_count << " wrap_ts=" << wrap_ts + << " ts=" << *ptimestamp << std::endl; + } + + memcpy(buff[0], &ms_sample[cur_samples].samples[0], nsamps*4); + cur_samples++; } } else { // read sample from file if (read(iqfd, ms_sample, sizeof(iqrec_t)) != sizeof(iqrec_t)) { - std::cerr << "pb reading iqfile at index " << sizeof(iqrec_t)*cur_samples << std::endl; - close(iqfd); - free(ms_sample); - ms_sample = NULL; - iqfd = 0; - exit(-1); + std::cerr << "pb reading iqfile at index " << sizeof(iqrec_t)*cur_samples << std::endl; + close(iqfd); + free(ms_sample); + ms_sample = NULL; + iqfd = 0; + exit(-1); } if (cur_samples < nb_samples) { - static int64_t ts0 = 0; - if ((cur_samples == 0) && (wrap_count == 0)) { - ts0 = ms_sample->ts; - } - *ptimestamp = ts0 + (cur_samples * (((int)(device->openair0_cfg[0].sample_rate)) / 1000)) + wrap_ts; - if (cur_samples == 0) { - std::cerr << "starting subframes file with wrap_count=" << wrap_count << " wrap_ts=" << wrap_ts - << " ts=" << *ptimestamp << std::endl; - } - memcpy(buff[0], &ms_sample->samples[0], nsamps*4); - cur_samples++; - // Prepare for next read - off_t where = lseek(iqfd, cur_samples * sizeof(iqrec_t), SEEK_SET); + static int64_t ts0 = 0; + + if ((cur_samples == 0) && (wrap_count == 0)) { + ts0 = ms_sample->ts; + } + + *ptimestamp = ts0 + (cur_samples * (((int)(device->openair0_cfg[0].sample_rate)) / 1000)) + wrap_ts; + + if (cur_samples == 0) { + std::cerr << "starting subframes file with wrap_count=" << wrap_count << " wrap_ts=" << wrap_ts + << " ts=" << *ptimestamp << std::endl; + } + + memcpy(buff[0], &ms_sample->samples[0], nsamps*4); + cur_samples++; + // Prepare for next read + off_t where = lseek(iqfd, cur_samples * sizeof(iqrec_t), SEEK_SET); } } + struct timespec req; + req.tv_sec = 0; + req.tv_nsec = u_sf_read_delay * 1000; + nanosleep(&req, NULL); + return nsamps; } + #endif return samples_received; } @@ -694,16 +712,14 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp * \param b second variable */ static bool is_equal(double a, double b) { - return std::fabs(a-b) < std::numeric_limits::epsilon(); + return std::fabs(a-b) < std::numeric_limits::epsilon(); } void *freq_thread(void *arg) { - - openair0_device *device=(openair0_device *)arg; - usrp_state_t *s = (usrp_state_t*)device->priv; - - s->usrp->set_tx_freq(device->openair0_cfg[0].tx_freq[0]); - s->usrp->set_rx_freq(device->openair0_cfg[0].rx_freq[0]); + openair0_device *device=(openair0_device *)arg; + usrp_state_t *s = (usrp_state_t *)device->priv; + s->usrp->set_tx_freq(device->openair0_cfg[0].tx_freq[0]); + s->usrp->set_rx_freq(device->openair0_cfg[0].rx_freq[0]); } /*! \brief Set frequencies (TX/RX). Spawns a thread to handle the frequency change to not block the calling thread * \param device the hardware to use @@ -711,23 +727,20 @@ void *freq_thread(void *arg) { * \param dummy dummy variable not used * \returns 0 in success */ -int trx_usrp_set_freq(openair0_device* device, openair0_config_t *openair0_cfg, int dont_block) { +int trx_usrp_set_freq(openair0_device *device, openair0_config_t *openair0_cfg, int dont_block) { + usrp_state_t *s = (usrp_state_t *)device->priv; + pthread_t f_thread; + printf("Setting USRP TX Freq %f, RX Freq %f\n",openair0_cfg[0].tx_freq[0],openair0_cfg[0].rx_freq[0]); - usrp_state_t *s = (usrp_state_t*)device->priv; - pthread_t f_thread; - - printf("Setting USRP TX Freq %f, RX Freq %f\n",openair0_cfg[0].tx_freq[0],openair0_cfg[0].rx_freq[0]); - - // spawn a thread to handle the frequency change to not block the calling thread - if (dont_block == 1) - pthread_create(&f_thread,NULL,freq_thread,(void*)device); - else { - s->usrp->set_tx_freq(device->openair0_cfg[0].tx_freq[0]); - s->usrp->set_rx_freq(device->openair0_cfg[0].rx_freq[0]); - } - - return(0); + // spawn a thread to handle the frequency change to not block the calling thread + if (dont_block == 1) + pthread_create(&f_thread,NULL,freq_thread,(void *)device); + else { + s->usrp->set_tx_freq(device->openair0_cfg[0].tx_freq[0]); + s->usrp->set_rx_freq(device->openair0_cfg[0].rx_freq[0]); + } + return(0); } /*! \brief Set RX frequencies @@ -735,21 +748,16 @@ int trx_usrp_set_freq(openair0_device* device, openair0_config_t *openair0_cfg, * \param openair0_cfg RF frontend parameters set by application * \returns 0 in success */ -int openair0_set_rx_frequencies(openair0_device* device, openair0_config_t *openair0_cfg) { - - usrp_state_t *s = (usrp_state_t*)device->priv; - static int first_call=1; - static double rf_freq,diff; - - uhd::tune_request_t rx_tune_req(openair0_cfg[0].rx_freq[0]); - - rx_tune_req.rf_freq_policy = uhd::tune_request_t::POLICY_MANUAL; - rx_tune_req.rf_freq = openair0_cfg[0].rx_freq[0]; - rf_freq=openair0_cfg[0].rx_freq[0]; - s->usrp->set_rx_freq(rx_tune_req); - - return(0); - +int openair0_set_rx_frequencies(openair0_device *device, openair0_config_t *openair0_cfg) { + usrp_state_t *s = (usrp_state_t *)device->priv; + static int first_call=1; + static double rf_freq,diff; + uhd::tune_request_t rx_tune_req(openair0_cfg[0].rx_freq[0]); + rx_tune_req.rf_freq_policy = uhd::tune_request_t::POLICY_MANUAL; + rx_tune_req.rf_freq = openair0_cfg[0].rx_freq[0]; + rf_freq=openair0_cfg[0].rx_freq[0]; + s->usrp->set_rx_freq(rx_tune_req); + return(0); } /*! \brief Set Gains (TX/RX) @@ -757,62 +765,62 @@ int openair0_set_rx_frequencies(openair0_device* device, openair0_config_t *open * \param openair0_cfg RF frontend parameters set by application * \returns 0 in success */ -int trx_usrp_set_gains(openair0_device* device, +int trx_usrp_set_gains(openair0_device *device, openair0_config_t *openair0_cfg) { + usrp_state_t *s = (usrp_state_t *)device->priv; + ::uhd::gain_range_t gain_range_tx = s->usrp->get_tx_gain_range(0); + s->usrp->set_tx_gain(gain_range_tx.stop()-openair0_cfg[0].tx_gain[0]); + ::uhd::gain_range_t gain_range = s->usrp->get_rx_gain_range(0); - usrp_state_t *s = (usrp_state_t*)device->priv; - ::uhd::gain_range_t gain_range_tx = s->usrp->get_tx_gain_range(0); - s->usrp->set_tx_gain(gain_range_tx.stop()-openair0_cfg[0].tx_gain[0]); - ::uhd::gain_range_t gain_range = s->usrp->get_rx_gain_range(0); - // limit to maximum gain - if (openair0_cfg[0].rx_gain[0]-openair0_cfg[0].rx_gain_offset[0] > gain_range.stop()) { - LOG_E(PHY,"RX Gain 0 too high, reduce by %f dB\n", - openair0_cfg[0].rx_gain[0]-openair0_cfg[0].rx_gain_offset[0] - gain_range.stop()); - exit(-1); - } - s->usrp->set_rx_gain(openair0_cfg[0].rx_gain[0]-openair0_cfg[0].rx_gain_offset[0]); - LOG_I(PHY,"Setting USRP RX gain to %f (rx_gain %f,gain_range.stop() %f)\n", - openair0_cfg[0].rx_gain[0]-openair0_cfg[0].rx_gain_offset[0], - openair0_cfg[0].rx_gain[0],gain_range.stop()); + // limit to maximum gain + if (openair0_cfg[0].rx_gain[0]-openair0_cfg[0].rx_gain_offset[0] > gain_range.stop()) { + LOG_E(PHY,"RX Gain 0 too high, reduce by %f dB\n", + openair0_cfg[0].rx_gain[0]-openair0_cfg[0].rx_gain_offset[0] - gain_range.stop()); + exit(-1); + } - return(0); + s->usrp->set_rx_gain(openair0_cfg[0].rx_gain[0]-openair0_cfg[0].rx_gain_offset[0]); + LOG_I(PHY,"Setting USRP RX gain to %f (rx_gain %f,gain_range.stop() %f)\n", + openair0_cfg[0].rx_gain[0]-openair0_cfg[0].rx_gain_offset[0], + openair0_cfg[0].rx_gain[0],gain_range.stop()); + return(0); } /*! \brief Stop USRP * \param card refers to the hardware index to use */ -int trx_usrp_stop(openair0_device* device) { - return(0); +int trx_usrp_stop(openair0_device *device) { + return(0); } /*! \brief USRPB210 RX calibration table */ rx_gain_calib_table_t calib_table_b210[] = { - {3500000000.0,44.0}, - {2660000000.0,49.0}, - {2300000000.0,50.0}, - {1880000000.0,53.0}, - {816000000.0,58.0}, - {-1,0} + {3500000000.0,44.0}, + {2660000000.0,49.0}, + {2300000000.0,50.0}, + {1880000000.0,53.0}, + {816000000.0,58.0}, + {-1,0} }; /*! \brief USRPB210 RX calibration table */ rx_gain_calib_table_t calib_table_b210_38[] = { - {3500000000.0,44.0}, - {2660000000.0,49.8}, - {2300000000.0,51.0}, - {1880000000.0,53.0}, - {816000000.0,57.0}, - {-1,0} + {3500000000.0,44.0}, + {2660000000.0,49.8}, + {2300000000.0,51.0}, + {1880000000.0,53.0}, + {816000000.0,57.0}, + {-1,0} }; /*! \brief USRPx310 RX calibration table */ rx_gain_calib_table_t calib_table_x310[] = { - {3500000000.0,77.0}, - {2660000000.0,81.0}, - {2300000000.0,81.0}, - {1880000000.0,82.0}, - {816000000.0,85.0}, - {-1,0} + {3500000000.0,77.0}, + {2660000000.0,81.0}, + {2300000000.0,81.0}, + {1880000000.0,82.0}, + {816000000.0,85.0}, + {-1,0} }; /*! \brief Set RX gain offset @@ -821,72 +829,81 @@ rx_gain_calib_table_t calib_table_x310[] = { * \returns 0 in success */ void set_rx_gain_offset(openair0_config_t *openair0_cfg, int chain_index,int bw_gain_adjust) { + int i=0; + // loop through calibration table to find best adjustment factor for RX frequency + double min_diff = 6e9,diff,gain_adj=0.0; - int i=0; - // loop through calibration table to find best adjustment factor for RX frequency - double min_diff = 6e9,diff,gain_adj=0.0; - if (bw_gain_adjust==1) { - switch ((int)openair0_cfg[0].sample_rate) { - case 30720000: - break; - case 23040000: - gain_adj=1.25; - break; - case 15360000: - gain_adj=3.0; - break; - case 7680000: - gain_adj=6.0; - break; - case 3840000: - gain_adj=9.0; - break; - case 1920000: - gain_adj=12.0; - break; - default: - LOG_E(PHY,"unknown sampling rate %d\n",(int)openair0_cfg[0].sample_rate); - exit(-1); - break; - } + if (bw_gain_adjust==1) { + switch ((int)openair0_cfg[0].sample_rate) { + case 30720000: + break; + + case 23040000: + gain_adj=1.25; + break; + + case 15360000: + gain_adj=3.0; + break; + + case 7680000: + gain_adj=6.0; + break; + + case 3840000: + gain_adj=9.0; + break; + + case 1920000: + gain_adj=12.0; + break; + + default: + LOG_E(PHY,"unknown sampling rate %d\n",(int)openair0_cfg[0].sample_rate); + exit(-1); + break; } - while (openair0_cfg->rx_gain_calib_table[i].freq>0) { - diff = fabs(openair0_cfg->rx_freq[chain_index] - openair0_cfg->rx_gain_calib_table[i].freq); - LOG_I(PHY,"cal %d: freq %f, offset %f, diff %f\n", - i, - openair0_cfg->rx_gain_calib_table[i].freq, - openair0_cfg->rx_gain_calib_table[i].offset,diff); - if (min_diff > diff) { - min_diff = diff; - openair0_cfg->rx_gain_offset[chain_index] = openair0_cfg->rx_gain_calib_table[i].offset+gain_adj; - } - i++; + } + + while (openair0_cfg->rx_gain_calib_table[i].freq>0) { + diff = fabs(openair0_cfg->rx_freq[chain_index] - openair0_cfg->rx_gain_calib_table[i].freq); + LOG_I(PHY,"cal %d: freq %f, offset %f, diff %f\n", + i, + openair0_cfg->rx_gain_calib_table[i].freq, + openair0_cfg->rx_gain_calib_table[i].offset,diff); + + if (min_diff > diff) { + min_diff = diff; + openair0_cfg->rx_gain_offset[chain_index] = openair0_cfg->rx_gain_calib_table[i].offset+gain_adj; } + + i++; + } } /*! \brief print the USRP statistics * \param device the hardware to use * \returns 0 on success */ -int trx_usrp_get_stats(openair0_device* device) { - return(0); +int trx_usrp_get_stats(openair0_device *device) { + return(0); } /*! \brief Reset the USRP statistics * \param device the hardware to use * \returns 0 on success */ -int trx_usrp_reset_stats(openair0_device* device) { - return(0); +int trx_usrp_reset_stats(openair0_device *device) { + return(0); } #if defined(USRP_REC_PLAY) extern "C" { -/*! \brief Initializer for USRP record/playback config - * \param parameter array description - * \returns 0 on success - */ -int trx_usrp_recplay_config_init(paramdef_t *usrp_recplay_params) { + /*! \brief Initializer for USRP record/playback config + * \param parameter array description + * \returns 0 on success + */ + int trx_usrp_recplay_config_init(paramdef_t *usrp_recplay_params) { // --subframes-file memcpy(usrp_recplay_params[0].optname, config_opt_sf_file, strlen(config_opt_sf_file)); usrp_recplay_params[0].helpstr = config_hlp_sf_file; @@ -943,9 +960,8 @@ int trx_usrp_recplay_config_init(paramdef_t *usrp_recplay_params) { usrp_recplay_params[6].defuintval=DEF_SF_DELAY_WRITE; usrp_recplay_params[6].type=TYPE_UINT; usrp_recplay_params[6].numelt=0; - return 0; // always ok -} + } } #endif @@ -954,86 +970,90 @@ extern "C" { * \param device the hardware to use * \param openair0_cfg RF frontend parameters set by application */ - int device_init(openair0_device* device, openair0_config_t *openair0_cfg) { - + int device_init(openair0_device *device, openair0_config_t *openair0_cfg) { LOG_D(PHY, "openair0_cfg[0].sdr_addrs == '%s'\n", openair0_cfg[0].sdr_addrs); LOG_D(PHY, "openair0_cfg[0].clock_source == '%d'\n", openair0_cfg[0].clock_source); - #if defined(USRP_REC_PLAY) - paramdef_t usrp_recplay_params[7]; - struct sysinfo systeminfo; - // to check - static int done = 0; - if (done == 1) { - return 0; - } // prevent from multiple init - done = 1; - // end to check - // Use mmap for IQ files for systems with less than 6GB total RAM - sysinfo(&systeminfo); - if (systeminfo.totalram < 6144000000) { - use_mmap = 0; - } - memset(usrp_recplay_params, 0, 7*sizeof(paramdef_t)); - memset(&u_sf_filename[0], 0, 1024); - if (trx_usrp_recplay_config_init(usrp_recplay_params) != 0) { - std::cerr << "USRP device record/replay mode configuration error exiting" << std::endl; - return -1; - } - config_process_cmdline(usrp_recplay_params,sizeof(usrp_recplay_params)/sizeof(paramdef_t),NULL); + paramdef_t usrp_recplay_params[7]; + struct sysinfo systeminfo; + // to check + static int done = 0; - if (strlen(u_sf_filename) == 0) { - (void) strcpy(u_sf_filename, DEF_SF_FILE); - } + if (done == 1) { + return 0; + } // prevent from multiple init - if (u_sf_replay == 1) u_sf_mode = 2; - if (u_sf_record == 1) u_sf_mode = 1; - - if (u_sf_mode == 2) { - // Replay subframes from from file - int bw_gain_adjust=0; - device->openair0_cfg = openair0_cfg; - device->type = USRP_B200_DEV; - openair0_cfg[0].rx_gain_calib_table = calib_table_b210_38; - bw_gain_adjust=1; - openair0_cfg[0].tx_sample_advance = 80; - openair0_cfg[0].tx_bw = 20e6; - openair0_cfg[0].rx_bw = 20e6; - openair0_cfg[0].iq_txshift = 4;//shift - openair0_cfg[0].iq_rxrescale = 15;//rescale iqs - set_rx_gain_offset(&openair0_cfg[0],0,bw_gain_adjust); - device->priv = NULL; - device->trx_start_func = trx_usrp_start; - device->trx_write_func = trx_usrp_write; - device->trx_read_func = trx_usrp_read; - device->trx_get_stats_func = trx_usrp_get_stats; - device->trx_reset_stats_func = trx_usrp_reset_stats; - device->trx_end_func = trx_usrp_end; - device->trx_stop_func = trx_usrp_stop; - device->trx_set_freq_func = trx_usrp_set_freq; - device->trx_set_gains_func = trx_usrp_set_gains; - device->openair0_cfg = openair0_cfg; - std::cerr << "USRP device initialized in subframes replay mode for " << u_sf_loops << " loops. Use mmap=" - << use_mmap << std::endl; - } else { + done = 1; + // end to check + // Use mmap for IQ files for systems with less than 6GB total RAM + sysinfo(&systeminfo); + + if (systeminfo.totalram < 6144000000) { + use_mmap = 0; + } + + memset(usrp_recplay_params, 0, 7*sizeof(paramdef_t)); + memset(&u_sf_filename[0], 0, 1024); + + if (trx_usrp_recplay_config_init(usrp_recplay_params) != 0) { + std::cerr << "USRP device record/replay mode configuration error exiting" << std::endl; + return -1; + } + + config_process_cmdline(usrp_recplay_params,sizeof(usrp_recplay_params)/sizeof(paramdef_t),NULL); + + if (strlen(u_sf_filename) == 0) { + (void) strcpy(u_sf_filename, DEF_SF_FILE); + } + + if (u_sf_replay == 1) u_sf_mode = 2; + + if (u_sf_record == 1) u_sf_mode = 1; + + if (u_sf_mode == 2) { + // Replay subframes from from file + int bw_gain_adjust=0; + device->openair0_cfg = openair0_cfg; + device->type = USRP_B200_DEV; + openair0_cfg[0].rx_gain_calib_table = calib_table_b210_38; + bw_gain_adjust=1; + openair0_cfg[0].tx_sample_advance = 80; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + openair0_cfg[0].iq_txshift = 4;//shift + openair0_cfg[0].iq_rxrescale = 15;//rescale iqs + set_rx_gain_offset(&openair0_cfg[0],0,bw_gain_adjust); + device->priv = NULL; + device->trx_start_func = trx_usrp_start; + device->trx_write_func = trx_usrp_write; + device->trx_read_func = trx_usrp_read; + device->trx_get_stats_func = trx_usrp_get_stats; + device->trx_reset_stats_func = trx_usrp_reset_stats; + device->trx_end_func = trx_usrp_end; + device->trx_stop_func = trx_usrp_stop; + device->trx_set_freq_func = trx_usrp_set_freq; + device->trx_set_gains_func = trx_usrp_set_gains; + device->openair0_cfg = openair0_cfg; + std::cerr << "USRP device initialized in subframes replay mode for " << u_sf_loops << " loops. Use mmap=" + << use_mmap << std::endl; + } else { #endif - uhd::set_thread_priority_safe(1.0); - usrp_state_t *s = (usrp_state_t*)calloc(sizeof(usrp_state_t),1); - - if (openair0_cfg[0].clock_source==gpsdo) - s->use_gps =1; + uhd::set_thread_priority_safe(1.0); + usrp_state_t *s = (usrp_state_t *)calloc(sizeof(usrp_state_t),1); - // Initialize USRP device - device->openair0_cfg = openair0_cfg; + if (openair0_cfg[0].clock_source==gpsdo) + s->use_gps =1; + // Initialize USRP device + device->openair0_cfg = openair0_cfg; std::string args = "type=b200"; - char *addr_args = NULL; + // Check whether sdr_addrs is set in the config or not if (openair0_cfg[0].sdr_addrs != NULL) { - if (strcmp(openair0_cfg[0].sdr_addrs, "0.0.0.0") != 0) { - // Check whether sdr_addrs contains multiple IP addresses - // and split and add them to addr_args + if (strcmp(openair0_cfg[0].sdr_addrs, "0.0.0.0") != 0) { + // Check whether sdr_addrs contains multiple IP addresses + // and split and add them to addr_args if (strstr(openair0_cfg[0].sdr_addrs, ",") != NULL) { char *addr0 = openair0_cfg[0].sdr_addrs; // Replace , with \0 @@ -1045,387 +1065,407 @@ extern "C" { snprintf(addr_args, addr_args_len, ",addr0=%s,addr1=%s", addr0, addr1); args += addr_args; LOG_D(PHY, "addr_args == '%s'\n", addr_args); - } + } } } uhd::device_addrs_t device_adds = uhd::device::find(args); - - int vers=0,subvers=0,subsubvers=0; - int bw_gain_adjust=0; - + int vers=0,subvers=0,subsubvers=0; + int bw_gain_adjust=0; #if defined(USRP_REC_PLAY) - if (u_sf_mode == 1) { - std::cerr << "USRP device initialized in subframes record mode" << std::endl; - } -#endif - sscanf(uhd::get_version_string().c_str(),"%d.%d.%d",&vers,&subvers,&subsubvers); - LOG_I(PHY,"Checking for USRPs : UHD %s (%d.%d.%d)\n", - uhd::get_version_string().c_str(),vers,subvers,subsubvers); + + if (u_sf_mode == 1) { + std::cerr << "USRP device initialized in subframes record mode" << std::endl; + } + +#endif + sscanf(uhd::get_version_string().c_str(),"%d.%d.%d",&vers,&subvers,&subsubvers); + LOG_I(PHY,"Checking for USRPs : UHD %s (%d.%d.%d)\n", + uhd::get_version_string().c_str(),vers,subvers,subsubvers); if(device_adds.size() == 0) { - double usrp_master_clock = 184.32e6; std::string args = "type=x300"; - - if (addr_args) { + + if (addr_args) { args += addr_args; } // workaround for an api problem, master clock has to be set with the constructor not via set_master_clock_rate args += boost::str(boost::format(",master_clock_rate=%f") % usrp_master_clock); + // args += ",num_send_frames=256,num_recv_frames=256, send_frame_size=4096, recv_frame_size=4096"; + uhd::device_addrs_t device_adds = uhd::device::find(args); - // args += ",num_send_frames=256,num_recv_frames=256, send_frame_size=4096, recv_frame_size=4096"; - uhd::device_addrs_t device_adds = uhd::device::find(args); + if(device_adds.size() == 0) { + args += ",addr=192.168.30.2"; + uhd::device_addrs_t device_adds = uhd::device::find(args); - if(device_adds.size() == 0) { - args += ",addr=192.168.30.2"; + if(device_adds.size() == 0) { + std::cerr<<"No USRP Device Found. " << std::endl; + free(s); + return -1; + } + } - uhd::device_addrs_t device_adds = uhd::device::find(args); + LOG_I(PHY,"Found USRP X300\n"); + s->usrp = uhd::usrp::multi_usrp::make(args); - if(device_adds.size() == 0) { - - std::cerr<<"No USRP Device Found. " << std::endl; - free(s); - return -1; - } - } - LOG_I(PHY,"Found USRP X300\n"); - s->usrp = uhd::usrp::multi_usrp::make(args); - // lock mboard clocks - if (openair0_cfg[0].clock_source == internal) - s->usrp->set_clock_source("internal"); - else - s->usrp->set_clock_source("external"); - - //Setting device type to USRP X300/X310 - device->type=USRP_X300_DEV; - - // this is not working yet, master clock has to be set via constructor - // set master clock rate and sample rate for tx & rx for streaming - //s->usrp->set_master_clock_rate(usrp_master_clock); - - openair0_cfg[0].rx_gain_calib_table = calib_table_x310; + // lock mboard clocks + if (openair0_cfg[0].clock_source == internal) + s->usrp->set_clock_source("internal"); + else + s->usrp->set_clock_source("external"); + //Setting device type to USRP X300/X310 + device->type=USRP_X300_DEV; + // this is not working yet, master clock has to be set via constructor + // set master clock rate and sample rate for tx & rx for streaming + //s->usrp->set_master_clock_rate(usrp_master_clock); + openair0_cfg[0].rx_gain_calib_table = calib_table_x310; #if defined(USRP_REC_PLAY) - std::cerr << "-- Using calibration table: calib_table_x310" << std::endl; // Bell Labs info + std::cerr << "-- Using calibration table: calib_table_x310" << std::endl; // Bell Labs info #endif + LOG_I(PHY,"%s() sample_rate:%u\n", __FUNCTION__, (int)openair0_cfg[0].sample_rate); - LOG_I(PHY,"%s() sample_rate:%u\n", __FUNCTION__, (int)openair0_cfg[0].sample_rate); + switch ((int)openair0_cfg[0].sample_rate) { + case 122880000: + // from usrp_time_offset + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 15; //to be checked + openair0_cfg[0].tx_bw = 80e6; + openair0_cfg[0].rx_bw = 80e6; + break; - switch ((int)openair0_cfg[0].sample_rate) { - case 122880000: - // from usrp_time_offset - //openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 15; //to be checked - openair0_cfg[0].tx_bw = 80e6; - openair0_cfg[0].rx_bw = 80e6; - break; - case 61440000: - // from usrp_time_offset - //openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 15; - openair0_cfg[0].tx_bw = 40e6; - openair0_cfg[0].rx_bw = 40e6; - break; - case 30720000: - // from usrp_time_offset - //openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 15; - openair0_cfg[0].tx_bw = 20e6; - openair0_cfg[0].rx_bw = 20e6; - break; - case 15360000: - //openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 45; - openair0_cfg[0].tx_bw = 10e6; - openair0_cfg[0].rx_bw = 10e6; - break; - case 7680000: - //openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 50; - openair0_cfg[0].tx_bw = 5e6; - openair0_cfg[0].rx_bw = 5e6; - break; - case 1920000: - //openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 50; - openair0_cfg[0].tx_bw = 1.25e6; - openair0_cfg[0].rx_bw = 1.25e6; - break; - default: - LOG_E(PHY,"Error: unknown sampling rate %f\n",openair0_cfg[0].sample_rate); - exit(-1); - break; - } + case 61440000: + // from usrp_time_offset + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 15; + openair0_cfg[0].tx_bw = 40e6; + openair0_cfg[0].rx_bw = 40e6; + break; + case 30720000: + // from usrp_time_offset + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 15; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + break; + + case 15360000: + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 45; + openair0_cfg[0].tx_bw = 10e6; + openair0_cfg[0].rx_bw = 10e6; + break; + + case 7680000: + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 50; + openair0_cfg[0].tx_bw = 5e6; + openair0_cfg[0].rx_bw = 5e6; + break; + + case 1920000: + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 50; + openair0_cfg[0].tx_bw = 1.25e6; + openair0_cfg[0].rx_bw = 1.25e6; + break; + + default: + LOG_E(PHY,"Error: unknown sampling rate %f\n",openair0_cfg[0].sample_rate); + exit(-1); + break; + } + } else { + LOG_I(PHY,"Found USRP B200\n"); + args += ",num_send_frames=256,num_recv_frames=256, send_frame_size=15360, recv_frame_size=15360" ; + s->usrp = uhd::usrp::multi_usrp::make(args); + + // s->usrp->set_rx_subdev_spec(rx_subdev); + // s->usrp->set_tx_subdev_spec(tx_subdev); + + // do not explicitly set the clock to "internal", because this will disable the gpsdo + // // lock mboard clocks + // s->usrp->set_clock_source("internal"); + // set master clock rate and sample rate for tx & rx for streaming + + // lock mboard clocks + if (openair0_cfg[0].clock_source == internal) { + s->usrp->set_clock_source("internal"); } else { - LOG_I(PHY,"Found USRP B200\n"); - args += ",num_send_frames=256,num_recv_frames=256, send_frame_size=15360, recv_frame_size=15360" ; - s->usrp = uhd::usrp::multi_usrp::make(args); - - // s->usrp->set_rx_subdev_spec(rx_subdev); - // s->usrp->set_tx_subdev_spec(tx_subdev); - - // do not explicitly set the clock to "internal", because this will disable the gpsdo - // // lock mboard clocks - // s->usrp->set_clock_source("internal"); - // set master clock rate and sample rate for tx & rx for streaming - - // lock mboard clocks - if (openair0_cfg[0].clock_source == internal){ - s->usrp->set_clock_source("internal"); - } - else{ - s->usrp->set_clock_source("external"); - s->usrp->set_time_source("external"); - } - - device->type = USRP_B200_DEV; - if ((vers == 3) && (subvers == 9) && (subsubvers>=2)) { - openair0_cfg[0].rx_gain_calib_table = calib_table_b210; - bw_gain_adjust=0; -#if defined(USRP_REC_PLAY) - std::cerr << "-- Using calibration table: calib_table_b210" << std::endl; // Bell Labs info -#endif - } else { - openair0_cfg[0].rx_gain_calib_table = calib_table_b210_38; - bw_gain_adjust=1; -#if defined(USRP_REC_PLAY) - std::cerr << "-- Using calibration table: calib_table_b210_38" << std::endl; // Bell Labs info -#endif - } - - switch ((int)openair0_cfg[0].sample_rate) { - case 30720000: - s->usrp->set_master_clock_rate(30.72e6); - //openair0_cfg[0].samples_per_packet = 1024; - openair0_cfg[0].tx_sample_advance = 115; - openair0_cfg[0].tx_bw = 20e6; - openair0_cfg[0].rx_bw = 20e6; - break; - case 23040000: - s->usrp->set_master_clock_rate(23.04e6); //to be checked - //openair0_cfg[0].samples_per_packet = 1024; - openair0_cfg[0].tx_sample_advance = 113; - openair0_cfg[0].tx_bw = 20e6; - openair0_cfg[0].rx_bw = 20e6; - break; - case 15360000: - s->usrp->set_master_clock_rate(30.72e06); - //openair0_cfg[0].samples_per_packet = 1024; - openair0_cfg[0].tx_sample_advance = 103; - openair0_cfg[0].tx_bw = 20e6; - openair0_cfg[0].rx_bw = 20e6; - break; - case 7680000: - s->usrp->set_master_clock_rate(30.72e6); - //openair0_cfg[0].samples_per_packet = 1024; - openair0_cfg[0].tx_sample_advance = 80; - openair0_cfg[0].tx_bw = 20e6; - openair0_cfg[0].rx_bw = 20e6; - break; - case 1920000: - s->usrp->set_master_clock_rate(30.72e6); - //openair0_cfg[0].samples_per_packet = 1024; - openair0_cfg[0].tx_sample_advance = 40; - openair0_cfg[0].tx_bw = 20e6; - openair0_cfg[0].rx_bw = 20e6; - break; - default: - LOG_E(PHY,"Error: unknown sampling rate %f\n",openair0_cfg[0].sample_rate); - exit(-1); - break; - } + s->usrp->set_clock_source("external"); + s->usrp->set_time_source("external"); } - /* device specific */ - //openair0_cfg[0].txlaunch_wait = 1;//manage when TX processing is triggered - //openair0_cfg[0].txlaunch_wait_slotcount = 1; //manage when TX processing is triggered - openair0_cfg[0].iq_txshift = 4;//shift - openair0_cfg[0].iq_rxrescale = 15;//rescale iqs + device->type = USRP_B200_DEV; - for(int i=0; iusrp->get_rx_num_channels(); i++) { - if (iusrp->set_rx_rate(openair0_cfg[0].sample_rate,i); - s->usrp->set_rx_freq(openair0_cfg[0].rx_freq[i],i); - set_rx_gain_offset(&openair0_cfg[0],i,bw_gain_adjust); - - ::uhd::gain_range_t gain_range = s->usrp->get_rx_gain_range(i); - // limit to maximum gain - AssertFatal( openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i] <= gain_range.stop(), - "RX Gain too high, lower by %f dB\n", - openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i] - gain_range.stop()); - s->usrp->set_rx_gain(openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i],i); - LOG_I(PHY,"RX Gain %d %f (%f) => %f (max %f)\n",i, - openair0_cfg[0].rx_gain[i],openair0_cfg[0].rx_gain_offset[i], - openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i],gain_range.stop()); - } + if ((vers == 3) && (subvers == 9) && (subsubvers>=2)) { + openair0_cfg[0].rx_gain_calib_table = calib_table_b210; + bw_gain_adjust=0; +#if defined(USRP_REC_PLAY) + std::cerr << "-- Using calibration table: calib_table_b210" << std::endl; // Bell Labs info +#endif + } else { + openair0_cfg[0].rx_gain_calib_table = calib_table_b210_38; + bw_gain_adjust=1; +#if defined(USRP_REC_PLAY) + std::cerr << "-- Using calibration table: calib_table_b210_38" << std::endl; // Bell Labs info +#endif } + switch ((int)openair0_cfg[0].sample_rate) { + case 30720000: + s->usrp->set_master_clock_rate(30.72e6); + //openair0_cfg[0].samples_per_packet = 1024; + openair0_cfg[0].tx_sample_advance = 115; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + break; + + case 23040000: + s->usrp->set_master_clock_rate(23.04e6); //to be checked + //openair0_cfg[0].samples_per_packet = 1024; + openair0_cfg[0].tx_sample_advance = 113; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + break; + + case 15360000: + s->usrp->set_master_clock_rate(30.72e06); + //openair0_cfg[0].samples_per_packet = 1024; + openair0_cfg[0].tx_sample_advance = 103; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + break; + + case 7680000: + s->usrp->set_master_clock_rate(30.72e6); + //openair0_cfg[0].samples_per_packet = 1024; + openair0_cfg[0].tx_sample_advance = 80; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + break; + + case 1920000: + s->usrp->set_master_clock_rate(30.72e6); + //openair0_cfg[0].samples_per_packet = 1024; + openair0_cfg[0].tx_sample_advance = 40; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + break; + + default: + LOG_E(PHY,"Error: unknown sampling rate %f\n",openair0_cfg[0].sample_rate); + exit(-1); + break; + } + } + + /* device specific */ + //openair0_cfg[0].txlaunch_wait = 1;//manage when TX processing is triggered + //openair0_cfg[0].txlaunch_wait_slotcount = 1; //manage when TX processing is triggered + openair0_cfg[0].iq_txshift = 4;//shift + openair0_cfg[0].iq_rxrescale = 15;//rescale iqs + + for(int i=0; iusrp->get_rx_num_channels(); i++) { + if (iusrp->set_rx_rate(openair0_cfg[0].sample_rate,i); + s->usrp->set_rx_freq(openair0_cfg[0].rx_freq[i],i); + set_rx_gain_offset(&openair0_cfg[0],i,bw_gain_adjust); + ::uhd::gain_range_t gain_range = s->usrp->get_rx_gain_range(i); + // limit to maximum gain + AssertFatal( openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i] <= gain_range.stop(), + "RX Gain too high, lower by %f dB\n", + openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i] - gain_range.stop()); + s->usrp->set_rx_gain(openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i],i); + LOG_I(PHY,"RX Gain %d %f (%f) => %f (max %f)\n",i, + openair0_cfg[0].rx_gain[i],openair0_cfg[0].rx_gain_offset[i], + openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i],gain_range.stop()); + } + } + LOG_D(PHY, "usrp->get_tx_num_channels() == %zd\n", s->usrp->get_tx_num_channels()); LOG_D(PHY, "openair0_cfg[0].tx_num_channels == %d\n", openair0_cfg[0].tx_num_channels); + for(int i=0; iusrp->get_tx_num_channels(); i++) { ::uhd::gain_range_t gain_range_tx = s->usrp->get_tx_gain_range(i); + if (iusrp->set_tx_rate(openair0_cfg[0].sample_rate,i); s->usrp->set_tx_freq(openair0_cfg[0].tx_freq[i],i); s->usrp->set_tx_gain(gain_range_tx.stop()-openair0_cfg[0].tx_gain[i],i); - - LOG_I(PHY,"USRP TX_GAIN:%3.2lf gain_range:%3.2lf tx_gain:%3.2lf\n", gain_range_tx.stop()-openair0_cfg[0].tx_gain[i], gain_range_tx.stop(), openair0_cfg[0].tx_gain[i]); - } + LOG_I(PHY,"USRP TX_GAIN:%3.2lf gain_range:%3.2lf tx_gain:%3.2lf\n", gain_range_tx.stop()-openair0_cfg[0].tx_gain[i], gain_range_tx.stop(), openair0_cfg[0].tx_gain[i]); } - - //s->usrp->set_clock_source("external"); - //s->usrp->set_time_source("external"); - - // display USRP settings - LOG_I(PHY,"Actual master clock: %fMHz...\n",s->usrp->get_master_clock_rate()/1e6); - sleep(1); - - // create tx & rx streamer - uhd::stream_args_t stream_args_rx("sc16", "sc16"); - int samples=openair0_cfg[0].sample_rate; - int max=s->usrp->get_rx_stream(stream_args_rx)->get_max_num_samps(); - samples/=10000; - LOG_I(PHY,"RF board max packet size %u, size for 100µs jitter %d \n", max, samples); - if ( samples < max ) - stream_args_rx.args["spp"] = str(boost::format("%d") % samples ); - LOG_I(PHY,"rx_max_num_samps %zu\n", - s->usrp->get_rx_stream(stream_args_rx)->get_max_num_samps()); - - for (int i = 0; irx_stream = s->usrp->get_rx_stream(stream_args_rx); - - uhd::stream_args_t stream_args_tx("sc16", "sc16"); - for (int i = 0; itx_stream = s->usrp->get_tx_stream(stream_args_tx); - - /* Setting TX/RX BW after streamers are created due to USRP calibration issue */ - for(int i=0; iusrp->get_tx_num_channels() && iusrp->set_tx_bandwidth(openair0_cfg[0].tx_bw,i); - - for(int i=0; iusrp->get_rx_num_channels() && iusrp->set_rx_bandwidth(openair0_cfg[0].rx_bw,i); - - for (int i=0; iusrp->get_rx_rate(i)/1e6); - LOG_I(PHY," Actual RX frequency: %fGHz...\n", s->usrp->get_rx_freq(i)/1e9); - LOG_I(PHY," Actual RX gain: %f...\n", s->usrp->get_rx_gain(i)); - LOG_I(PHY," Actual RX bandwidth: %fM...\n", s->usrp->get_rx_bandwidth(i)/1e6); - LOG_I(PHY," Actual RX antenna: %s...\n", s->usrp->get_rx_antenna(i).c_str()); - } - - for (int i=0; iusrp->get_tx_rate(i)/1e6); - LOG_I(PHY," Actual TX frequency: %fGHz...\n", s->usrp->get_tx_freq(i)/1e9); - LOG_I(PHY," Actual TX gain: %f...\n", s->usrp->get_tx_gain(i)); - LOG_I(PHY," Actual TX bandwidth: %fM...\n", s->usrp->get_tx_bandwidth(i)/1e6); - LOG_I(PHY," Actual TX antenna: %s...\n", s->usrp->get_tx_antenna(i).c_str()); - } - - LOG_I(PHY,"Device timestamp: %f...\n", s->usrp->get_time_now().get_real_secs()); - - device->priv = s; - device->trx_start_func = trx_usrp_start; - device->trx_write_func = trx_usrp_write; - device->trx_read_func = trx_usrp_read; - device->trx_get_stats_func = trx_usrp_get_stats; - device->trx_reset_stats_func = trx_usrp_reset_stats; - device->trx_end_func = trx_usrp_end; - device->trx_stop_func = trx_usrp_stop; - device->trx_set_freq_func = trx_usrp_set_freq; - device->trx_set_gains_func = trx_usrp_set_gains; - device->openair0_cfg = openair0_cfg; - - s->sample_rate = openair0_cfg[0].sample_rate; - // TODO: - // init tx_forward_nsamps based usrp_time_offset ex - if(is_equal(s->sample_rate, (double)30.72e6)) - s->tx_forward_nsamps = 176; - if(is_equal(s->sample_rate, (double)15.36e6)) - s->tx_forward_nsamps = 90; - if(is_equal(s->sample_rate, (double)7.68e6)) - s->tx_forward_nsamps = 50; - - if (s->use_gps == 1) { - if (sync_to_gps(device)) { - LOG_I(PHY,"USRP fails to sync with GPS...\n"); - exit(0); - } - } - -#if defined(USRP_REC_PLAY) } + + //s->usrp->set_clock_source("external"); + //s->usrp->set_time_source("external"); + // display USRP settings + LOG_I(PHY,"Actual master clock: %fMHz...\n",s->usrp->get_master_clock_rate()/1e6); + sleep(1); + // create tx & rx streamer + uhd::stream_args_t stream_args_rx("sc16", "sc16"); + int samples=openair0_cfg[0].sample_rate; + int max=s->usrp->get_rx_stream(stream_args_rx)->get_max_num_samps(); + samples/=10000; + LOG_I(PHY,"RF board max packet size %u, size for 100µs jitter %d \n", max, samples); + + if ( samples < max ) + stream_args_rx.args["spp"] = str(boost::format("%d") % samples ); + + LOG_I(PHY,"rx_max_num_samps %zu\n", + s->usrp->get_rx_stream(stream_args_rx)->get_max_num_samps()); + + for (int i = 0; irx_stream = s->usrp->get_rx_stream(stream_args_rx); + uhd::stream_args_t stream_args_tx("sc16", "sc16"); + + for (int i = 0; itx_stream = s->usrp->get_tx_stream(stream_args_tx); + + /* Setting TX/RX BW after streamers are created due to USRP calibration issue */ + for(int i=0; iusrp->get_tx_num_channels() && iusrp->set_tx_bandwidth(openair0_cfg[0].tx_bw,i); + + for(int i=0; iusrp->get_rx_num_channels() && iusrp->set_rx_bandwidth(openair0_cfg[0].rx_bw,i); + + for (int i=0; iusrp->get_rx_rate(i)/1e6); + LOG_I(PHY," Actual RX frequency: %fGHz...\n", s->usrp->get_rx_freq(i)/1e9); + LOG_I(PHY," Actual RX gain: %f...\n", s->usrp->get_rx_gain(i)); + LOG_I(PHY," Actual RX bandwidth: %fM...\n", s->usrp->get_rx_bandwidth(i)/1e6); + LOG_I(PHY," Actual RX antenna: %s...\n", s->usrp->get_rx_antenna(i).c_str()); + } + + for (int i=0; iusrp->get_tx_rate(i)/1e6); + LOG_I(PHY," Actual TX frequency: %fGHz...\n", s->usrp->get_tx_freq(i)/1e9); + LOG_I(PHY," Actual TX gain: %f...\n", s->usrp->get_tx_gain(i)); + LOG_I(PHY," Actual TX bandwidth: %fM...\n", s->usrp->get_tx_bandwidth(i)/1e6); + LOG_I(PHY," Actual TX antenna: %s...\n", s->usrp->get_tx_antenna(i).c_str()); + } + + LOG_I(PHY,"Device timestamp: %f...\n", s->usrp->get_time_now().get_real_secs()); + device->priv = s; + device->trx_start_func = trx_usrp_start; + device->trx_write_func = trx_usrp_write; + device->trx_read_func = trx_usrp_read; + device->trx_get_stats_func = trx_usrp_get_stats; + device->trx_reset_stats_func = trx_usrp_reset_stats; + device->trx_end_func = trx_usrp_end; + device->trx_stop_func = trx_usrp_stop; + device->trx_set_freq_func = trx_usrp_set_freq; + device->trx_set_gains_func = trx_usrp_set_gains; + device->openair0_cfg = openair0_cfg; + s->sample_rate = openair0_cfg[0].sample_rate; + + // TODO: + // init tx_forward_nsamps based usrp_time_offset ex + if(is_equal(s->sample_rate, (double)30.72e6)) + s->tx_forward_nsamps = 176; + + if(is_equal(s->sample_rate, (double)15.36e6)) + s->tx_forward_nsamps = 90; + + if(is_equal(s->sample_rate, (double)7.68e6)) + s->tx_forward_nsamps = 50; + + if (s->use_gps == 1) { + if (sync_to_gps(device)) { + LOG_I(PHY,"USRP fails to sync with GPS...\n"); + exit(0); + } + } + +#if defined(USRP_REC_PLAY) + } + #endif #if defined(USRP_REC_PLAY) - if (u_sf_mode == 1) { // record mode - ms_sample = (iqrec_t*) malloc(u_sf_max * sizeof(iqrec_t)); - if (ms_sample == NULL) { - std::cerr<< "Memory allocation failed for subframe record or replay mode." << std::endl; - exit(-1); - } - memset(ms_sample, 0, u_sf_max * BELL_LABS_IQ_BYTES_PER_SF); + + if (u_sf_mode == 1) { // record mode + ms_sample = (iqrec_t *) malloc(u_sf_max * sizeof(iqrec_t)); + + if (ms_sample == NULL) { + std::cerr<< "Memory allocation failed for subframe record or replay mode." << std::endl; + exit(-1); } - if (u_sf_mode == 2) { - if (use_mmap) { - // use mmap - mmapfd = open(u_sf_filename, O_RDONLY | O_LARGEFILE); - if (mmapfd != 0) { - fstat(mmapfd, &sb); - std::cerr << "Loading subframes using mmap() from " << u_sf_filename << " size=" << (uint64_t)sb.st_size << " bytes ..." << std::endl; - ms_sample = (iqrec_t*) mmap(NULL, sb.st_size, PROT_WRITE, MAP_PRIVATE, mmapfd, 0); - if (ms_sample != MAP_FAILED) { - nb_samples = (sb.st_size / sizeof(iqrec_t)); - int aligned = (((unsigned long)ms_sample & 31) == 0)? 1:0; - std::cerr<< "Loaded "<< nb_samples << " subframes." << std::endl; - if (aligned == 0) { - std::cerr<< "mmap address is not 32 bytes aligned, exiting." << std::endl; - close(mmapfd); - exit(-1); - } - } else { - std::cerr << "Cannot mmap file, exiting." << std::endl; - close(mmapfd); - exit(-1); - } - } else { - std::cerr << "Cannot open " << u_sf_filename << " , exiting." << std::endl; - exit(-1); - } - } else { - iqfd = open(u_sf_filename, O_RDONLY | O_LARGEFILE); - if (iqfd != 0) { - fstat(iqfd, &sb); - nb_samples = (sb.st_size / sizeof(iqrec_t)); - std::cerr << "Loading " << nb_samples << " subframes from " << u_sf_filename - << " size=" << (uint64_t)sb.st_size << " bytes ..." << std::endl; - // allocate buffer for 1 sample at a time - ms_sample = (iqrec_t*) malloc(sizeof(iqrec_t)); - if (ms_sample == NULL) { - std::cerr<< "Memory allocation failed for individual subframe replay mode." << std::endl; - close(iqfd); - exit(-1); - } - memset(ms_sample, 0, sizeof(iqrec_t)); - // point at beginning of file - if (lseek(iqfd, 0, SEEK_SET) == 0) { - std::cerr << "Initial seek at beginning of the file" << std::endl; - } else { - std::cerr << "Problem initial seek at beginning of the file" << std::endl; - } - } else { - std::cerr << "Cannot open " << u_sf_filename << " , exiting." << std::endl; - exit(-1); - } - } - } -#endif - return 0; + + memset(ms_sample, 0, u_sf_max * BELL_LABS_IQ_BYTES_PER_SF); } + + if (u_sf_mode == 2) { + if (use_mmap) { + // use mmap + mmapfd = open(u_sf_filename, O_RDONLY | O_LARGEFILE); + + if (mmapfd != 0) { + fstat(mmapfd, &sb); + std::cerr << "Loading subframes using mmap() from " << u_sf_filename << " size=" << (uint64_t)sb.st_size << " bytes ..." << std::endl; + ms_sample = (iqrec_t *) mmap(NULL, sb.st_size, PROT_WRITE, MAP_PRIVATE, mmapfd, 0); + + if (ms_sample != MAP_FAILED) { + nb_samples = (sb.st_size / sizeof(iqrec_t)); + int aligned = (((unsigned long)ms_sample & 31) == 0)? 1:0; + std::cerr<< "Loaded "<< nb_samples << " subframes." << std::endl; + + if (aligned == 0) { + std::cerr<< "mmap address is not 32 bytes aligned, exiting." << std::endl; + close(mmapfd); + exit(-1); + } + } else { + std::cerr << "Cannot mmap file, exiting." << std::endl; + close(mmapfd); + exit(-1); + } + } else { + std::cerr << "Cannot open " << u_sf_filename << " , exiting." << std::endl; + exit(-1); + } + } else { + iqfd = open(u_sf_filename, O_RDONLY | O_LARGEFILE); + + if (iqfd != 0) { + fstat(iqfd, &sb); + nb_samples = (sb.st_size / sizeof(iqrec_t)); + std::cerr << "Loading " << nb_samples << " subframes from " << u_sf_filename + << " size=" << (uint64_t)sb.st_size << " bytes ..." << std::endl; + // allocate buffer for 1 sample at a time + ms_sample = (iqrec_t *) malloc(sizeof(iqrec_t)); + + if (ms_sample == NULL) { + std::cerr<< "Memory allocation failed for individual subframe replay mode." << std::endl; + close(iqfd); + exit(-1); + } + + memset(ms_sample, 0, sizeof(iqrec_t)); + + // point at beginning of file + if (lseek(iqfd, 0, SEEK_SET) == 0) { + std::cerr << "Initial seek at beginning of the file" << std::endl; + } else { + std::cerr << "Problem initial seek at beginning of the file" << std::endl; + } + } else { + std::cerr << "Cannot open " << u_sf_filename << " , exiting." << std::endl; + exit(-1); + } + } + } + +#endif + return 0; + } } /*@}*/ From 84d04b3cd5e6e238b3c205677806499c67e6c590 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Fri, 28 Sep 2018 00:11:35 -0700 Subject: [PATCH 252/379] new interpretation of sdr_addrs string in RU config file: this is now directly passed to the uhd to specify a device. It may contain a device type (i.e., "type=x300") or an IP address (i.e., "addr=192.168.10.2") --- openair2/ENB_APP/enb_paramdef.h | 2 +- targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 127 +++++++------------ 2 files changed, 50 insertions(+), 79 deletions(-) diff --git a/openair2/ENB_APP/enb_paramdef.h b/openair2/ENB_APP/enb_paramdef.h index 04edea1493..84e900611c 100755 --- a/openair2/ENB_APP/enb_paramdef.h +++ b/openair2/ENB_APP/enb_paramdef.h @@ -146,7 +146,7 @@ typedef enum { {CONFIG_STRING_RU_ATT_TX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ {CONFIG_STRING_RU_ATT_RX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ {CONFIG_STRING_RU_NBIOTRRC_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFENBS, TYPE_INTARRAY, 1}, \ -{CONFIG_STRING_RU_SDR_ADDRS, NULL, 0, strptr:NULL, defstrval:"0.0.0.0", TYPE_STRING, 0}, \ +{CONFIG_STRING_RU_SDR_ADDRS, NULL, 0, strptr:NULL, defstrval:"type=b200", TYPE_STRING, 0}, \ {CONFIG_STRING_RU_SDR_CLK_SRC, NULL, 0, strptr:NULL, defstrval:"internal", TYPE_STRING, 0}, \ } diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index 2af0e481b0..c591cc6c0f 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -1046,30 +1046,6 @@ extern "C" { // Initialize USRP device device->openair0_cfg = openair0_cfg; - std::string args = "type=b200"; - char *addr_args = NULL; - - // Check whether sdr_addrs is set in the config or not - if (openair0_cfg[0].sdr_addrs != NULL) { - if (strcmp(openair0_cfg[0].sdr_addrs, "0.0.0.0") != 0) { - // Check whether sdr_addrs contains multiple IP addresses - // and split and add them to addr_args - if (strstr(openair0_cfg[0].sdr_addrs, ",") != NULL) { - char *addr0 = openair0_cfg[0].sdr_addrs; - // Replace , with \0 - strsep(&openair0_cfg[0].sdr_addrs, ","); - char *addr1 = openair0_cfg[0].sdr_addrs; - // Allocate memory for ",addr0=,addr1=\0" and the addresses - size_t addr_args_len = sizeof(char)*(15 + strlen(addr0) + strlen(addr1)); - addr_args = (char *)malloc(addr_args_len); - snprintf(addr_args, addr_args_len, ",addr0=%s,addr1=%s", addr0, addr1); - args += addr_args; - LOG_D(PHY, "addr_args == '%s'\n", addr_args); - } - } - } - - uhd::device_addrs_t device_adds = uhd::device::find(args); int vers=0,subvers=0,subsubvers=0; int bw_gain_adjust=0; #if defined(USRP_REC_PLAY) @@ -1083,44 +1059,59 @@ extern "C" { LOG_I(PHY,"Checking for USRPs : UHD %s (%d.%d.%d)\n", uhd::get_version_string().c_str(),vers,subvers,subsubvers); - if(device_adds.size() == 0) { - double usrp_master_clock = 184.32e6; - std::string args = "type=x300"; + std::string args; + if (openair0_cfg[0].sdr_addrs == NULL) { + args = "type=b200"; + } else { + args = openair0_cfg[0].sdr_addrs; + } - if (addr_args) { - args += addr_args; - } + uhd::device_addrs_t device_adds = uhd::device::find(args); - // workaround for an api problem, master clock has to be set with the constructor not via set_master_clock_rate + if (device_adds.size() == 0) { + std::cerr<<"No USRP Device Found. " << std::endl; + free(s); + return -1; + } else if (device_adds.size() > 1) { + std::cerr<<"More than one USRP Device Found. Please specify device more precisely in config file." << std::endl; + free(s); + return -1; + } + + std::cerr << "Found USRP " << device_adds[0].get("type") << "\n"; + double usrp_master_clock; + + if (device_adds[0].get("type") == "b200") { + printf("Found USRP b200\n"); + device->type = USRP_B200_DEV; + usrp_master_clock = 30.72e6; args += boost::str(boost::format(",master_clock_rate=%f") % usrp_master_clock); - // args += ",num_send_frames=256,num_recv_frames=256, send_frame_size=4096, recv_frame_size=4096"; - uhd::device_addrs_t device_adds = uhd::device::find(args); + args += ",num_send_frames=256,num_recv_frames=256, send_frame_size=15360, recv_frame_size=15360" ; + } - if(device_adds.size() == 0) { - args += ",addr=192.168.30.2"; - uhd::device_addrs_t device_adds = uhd::device::find(args); + if (device_adds[0].get("type") == "n3xx") { + printf("Found USRP n300\n"); + device->type=USRP_X300_DEV; //treat it as X300 for now + usrp_master_clock = 122.88e6; + args += boost::str(boost::format(",master_clock_rate=%f") % usrp_master_clock); + } - if(device_adds.size() == 0) { - std::cerr<<"No USRP Device Found. " << std::endl; - free(s); - return -1; - } - } - - LOG_I(PHY,"Found USRP X300\n"); - s->usrp = uhd::usrp::multi_usrp::make(args); - - // lock mboard clocks - if (openair0_cfg[0].clock_source == internal) - s->usrp->set_clock_source("internal"); - else - s->usrp->set_clock_source("external"); - - //Setting device type to USRP X300/X310 + if (device_adds[0].get("type") == "x300") { + printf("Found USRP x300\n"); device->type=USRP_X300_DEV; - // this is not working yet, master clock has to be set via constructor - // set master clock rate and sample rate for tx & rx for streaming - //s->usrp->set_master_clock_rate(usrp_master_clock); + usrp_master_clock = 184.32e6; + args += boost::str(boost::format(",master_clock_rate=%f") % usrp_master_clock); + } + + s->usrp = uhd::usrp::multi_usrp::make(args); + + // lock mboard clocks + if (openair0_cfg[0].clock_source == internal) + s->usrp->set_clock_source("internal"); + else + s->usrp->set_clock_source("external"); + + if (device->type==USRP_X300_DEV) { openair0_cfg[0].rx_gain_calib_table = calib_table_x310; #if defined(USRP_REC_PLAY) std::cerr << "-- Using calibration table: calib_table_x310" << std::endl; // Bell Labs info @@ -1178,29 +1169,9 @@ extern "C" { exit(-1); break; } - } else { - LOG_I(PHY,"Found USRP B200\n"); - args += ",num_send_frames=256,num_recv_frames=256, send_frame_size=15360, recv_frame_size=15360" ; - s->usrp = uhd::usrp::multi_usrp::make(args); - - // s->usrp->set_rx_subdev_spec(rx_subdev); - // s->usrp->set_tx_subdev_spec(tx_subdev); - - // do not explicitly set the clock to "internal", because this will disable the gpsdo - // // lock mboard clocks - // s->usrp->set_clock_source("internal"); - // set master clock rate and sample rate for tx & rx for streaming - - // lock mboard clocks - if (openair0_cfg[0].clock_source == internal) { - s->usrp->set_clock_source("internal"); - } else { - s->usrp->set_clock_source("external"); - s->usrp->set_time_source("external"); - } - - device->type = USRP_B200_DEV; + } + if (device->type == USRP_B200_DEV) { if ((vers == 3) && (subvers == 9) && (subsubvers>=2)) { openair0_cfg[0].rx_gain_calib_table = calib_table_b210; bw_gain_adjust=0; From 413b3074418d877acf2a1a80a22135eeb1151a80 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sun, 23 Sep 2018 10:05:12 +0200 Subject: [PATCH 253/379] SIB1: Add all configured PLMN IDs in System Information --- openair2/RRC/LTE/MESSAGES/asn1_msg.c | 95 +++++++++++++++------------- 1 file changed, 51 insertions(+), 44 deletions(-) diff --git a/openair2/RRC/LTE/MESSAGES/asn1_msg.c b/openair2/RRC/LTE/MESSAGES/asn1_msg.c index 5e07d9e936..9ab2351b44 100644 --- a/openair2/RRC/LTE/MESSAGES/asn1_msg.c +++ b/openair2/RRC/LTE/MESSAGES/asn1_msg.c @@ -345,8 +345,13 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, { // SystemInformation_t systemInformation; - PLMN_IdentityInfo_t PLMN_identity_info; - MCC_MNC_Digit_t dummy_mcc[3],dummy_mnc[3]; +#if defined(ENABLE_ITTI) + int num_plmn = configuration->num_plmn; +#else + int num_plmn = 1; +#endif + PLMN_IdentityInfo_t PLMN_identity_info[num_plmn]; + MCC_MNC_Digit_t dummy_mcc[num_plmn][3], dummy_mnc[num_plmn][3]; asn_enc_rval_t enc_rval; SchedulingInfo_t schedulingInfo; SIB_Type_t sib_type; @@ -354,6 +359,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, uint8_t *buffer = carrier->SIB1; BCCH_DL_SCH_Message_t *bcch_message = &carrier->siblock1; SystemInformationBlockType1_t **sib1 = &carrier->sib1; + int i; memset(bcch_message,0,sizeof(BCCH_DL_SCH_Message_t)); @@ -363,67 +369,68 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, *sib1 = &bcch_message->message.choice.c1.choice.systemInformationBlockType1; - memset(&PLMN_identity_info,0,sizeof(PLMN_IdentityInfo_t)); + memset(PLMN_identity_info,0,num_plmn * sizeof(PLMN_IdentityInfo_t)); memset(&schedulingInfo,0,sizeof(SchedulingInfo_t)); memset(&sib_type,0,sizeof(SIB_Type_t)); + /* as per TS 36.311, up to 6 PLMN_identity_info are allowed in list -> add one by one */ + for (i = 0; i < configuration->num_plmn; ++i) { + PLMN_identity_info[i].plmn_Identity.mcc = CALLOC(1,sizeof(*PLMN_identity_info[i].plmn_Identity.mcc)); + memset(PLMN_identity_info[i].plmn_Identity.mcc,0,sizeof(*PLMN_identity_info[i].plmn_Identity.mcc)); - - PLMN_identity_info.plmn_Identity.mcc = CALLOC(1,sizeof(*PLMN_identity_info.plmn_Identity.mcc)); - memset(PLMN_identity_info.plmn_Identity.mcc,0,sizeof(*PLMN_identity_info.plmn_Identity.mcc)); - - asn_set_empty(&PLMN_identity_info.plmn_Identity.mcc->list);//.size=0; + asn_set_empty(&PLMN_identity_info[i].plmn_Identity.mcc->list);//.size=0; #if defined(ENABLE_ITTI) - dummy_mcc[0] = (configuration->mcc / 100) % 10; - dummy_mcc[1] = (configuration->mcc / 10) % 10; - dummy_mcc[2] = (configuration->mcc / 1) % 10; + dummy_mcc[i][0] = (configuration->mcc[i] / 100) % 10; + dummy_mcc[i][1] = (configuration->mcc[i] / 10) % 10; + dummy_mcc[i][2] = (configuration->mcc[i] / 1) % 10; #else - dummy_mcc[0] = 0; - dummy_mcc[1] = 0; - dummy_mcc[2] = 1; + dummy_mcc[i][0] = 0; + dummy_mcc[i][1] = 0; + dummy_mcc[i][2] = 1; #endif - ASN_SEQUENCE_ADD(&PLMN_identity_info.plmn_Identity.mcc->list,&dummy_mcc[0]); - ASN_SEQUENCE_ADD(&PLMN_identity_info.plmn_Identity.mcc->list,&dummy_mcc[1]); - ASN_SEQUENCE_ADD(&PLMN_identity_info.plmn_Identity.mcc->list,&dummy_mcc[2]); + ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mcc->list,&dummy_mcc[i][0]); + ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mcc->list,&dummy_mcc[i][1]); + ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mcc->list,&dummy_mcc[i][2]); - PLMN_identity_info.plmn_Identity.mnc.list.size=0; - PLMN_identity_info.plmn_Identity.mnc.list.count=0; + PLMN_identity_info[i].plmn_Identity.mnc.list.size=0; + PLMN_identity_info[i].plmn_Identity.mnc.list.count=0; #if defined(ENABLE_ITTI) - if (configuration->mnc >= 100) { - dummy_mnc[0] = (configuration->mnc / 100) % 10; - dummy_mnc[1] = (configuration->mnc / 10) % 10; - dummy_mnc[2] = (configuration->mnc / 1) % 10; - } else { - if (configuration->mnc_digit_length == 2) { - dummy_mnc[0] = (configuration->mnc / 10) % 10; - dummy_mnc[1] = (configuration->mnc / 1) % 10; - dummy_mnc[2] = 0xf; + if (configuration->mnc[i] >= 100) { + dummy_mnc[i][0] = (configuration->mnc[i] / 100) % 10; + dummy_mnc[i][1] = (configuration->mnc[i] / 10) % 10; + dummy_mnc[i][2] = (configuration->mnc[i] / 1) % 10; } else { - dummy_mnc[0] = (configuration->mnc / 100) % 100; - dummy_mnc[1] = (configuration->mnc / 10) % 10; - dummy_mnc[2] = (configuration->mnc / 1) % 10; + if (configuration->mnc_digit_length[i] == 2) { + dummy_mnc[i][0] = (configuration->mnc[i] / 10) % 10; + dummy_mnc[i][1] = (configuration->mnc[i] / 1) % 10; + dummy_mnc[i][2] = 0xf; + } else { + dummy_mnc[i][0] = (configuration->mnc[i] / 100) % 100; + dummy_mnc[i][1] = (configuration->mnc[i] / 10) % 10; + dummy_mnc[i][2] = (configuration->mnc[i] / 1) % 10; + } } - } #else - dummy_mnc[0] = 0; - dummy_mnc[1] = 1; - dummy_mnc[2] = 0xf; + dummy_mnc[i][0] = 0; + dummy_mnc[i][1] = 1; + dummy_mnc[i][2] = 0xf; #endif - ASN_SEQUENCE_ADD(&PLMN_identity_info.plmn_Identity.mnc.list,&dummy_mnc[0]); - ASN_SEQUENCE_ADD(&PLMN_identity_info.plmn_Identity.mnc.list,&dummy_mnc[1]); + ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mnc.list,&dummy_mnc[i][0]); + ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mnc.list,&dummy_mnc[i][1]); - if (dummy_mnc[2] != 0xf) { - ASN_SEQUENCE_ADD(&PLMN_identity_info.plmn_Identity.mnc.list,&dummy_mnc[2]); + if (dummy_mnc[i][2] != 0xf) { + ASN_SEQUENCE_ADD(&PLMN_identity_info[i].plmn_Identity.mnc.list,&dummy_mnc[i][2]); + } + + //assign_enum(&PLMN_identity_info.cellReservedForOperatorUse,PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved); + PLMN_identity_info[i].cellReservedForOperatorUse=PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved; + + ASN_SEQUENCE_ADD(&(*sib1)->cellAccessRelatedInfo.plmn_IdentityList.list,&PLMN_identity_info[i]); } - //assign_enum(&PLMN_identity_info.cellReservedForOperatorUse,PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved); - PLMN_identity_info.cellReservedForOperatorUse=PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved; - - ASN_SEQUENCE_ADD(&(*sib1)->cellAccessRelatedInfo.plmn_IdentityList.list,&PLMN_identity_info); - // 16 bits (*sib1)->cellAccessRelatedInfo.trackingAreaCode.buf = MALLOC(2); From 514b8d833ad51afba5e2aa2b909ce5e2ee2c8284 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 4 Jul 2018 12:14:52 +0200 Subject: [PATCH 254/379] Use selectedPLMN_Identity IE to fill GUMMEI at NAS_FIRST_REQ --- openair2/RRC/LTE/rrc_eNB_S1AP.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/openair2/RRC/LTE/rrc_eNB_S1AP.c b/openair2/RRC/LTE/rrc_eNB_S1AP.c index 7d24228602..2c28dd4e0f 100644 --- a/openair2/RRC/LTE/rrc_eNB_S1AP.c +++ b/openair2/RRC/LTE/rrc_eNB_S1AP.c @@ -755,17 +755,19 @@ rrc_eNB_send_S1AP_NAS_FIRST_REQ( ue_context_pP->ue_context.rnti); } + /* selected_plmn_identity: IE is 1-based, convert to 0-based (C array) */ + int selected_plmn_identity = rrcConnectionSetupComplete->selectedPLMN_Identity - 1; + if (rrcConnectionSetupComplete->registeredMME != NULL) { /* Fill GUMMEI */ struct RegisteredMME *r_mme = rrcConnectionSetupComplete->registeredMME; - //int selected_plmn_identity = rrcConnectionSetupComplete->selectedPLMN_Identity; S1AP_NAS_FIRST_REQ (message_p).ue_identity.presenceMask |= UE_IDENTITIES_gummei; if (r_mme->plmn_Identity != NULL) { if ((r_mme->plmn_Identity->mcc != NULL) && (r_mme->plmn_Identity->mcc->list.count > 0)) { /* Use first indicated PLMN MCC if it is defined */ - S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mcc = *r_mme->plmn_Identity->mcc->list.array[0]; + S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mcc = *r_mme->plmn_Identity->mcc->list.array[selected_plmn_identity]; LOG_I(S1AP, "[eNB %d] Build S1AP_NAS_FIRST_REQ adding in s_TMSI: GUMMEI MCC %u ue %x\n", ctxt_pP->module_id, S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mcc, @@ -774,20 +776,16 @@ rrc_eNB_send_S1AP_NAS_FIRST_REQ( if (r_mme->plmn_Identity->mnc.list.count > 0) { /* Use first indicated PLMN MNC if it is defined */ - S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mnc = *r_mme->plmn_Identity->mnc.list.array[0]; + S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mnc = *r_mme->plmn_Identity->mnc.list.array[selected_plmn_identity]; LOG_I(S1AP, "[eNB %d] Build S1AP_NAS_FIRST_REQ adding in s_TMSI: GUMMEI MNC %u ue %x\n", ctxt_pP->module_id, S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mnc, ue_context_pP->ue_context.rnti); } } else { - // const Enb_properties_array_t *enb_properties_p = NULL; - // enb_properties_p = enb_config_get(); - - // actually the eNB configuration contains only one PLMN (can be up to 6) - S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mcc = rrc->mcc; - S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mnc = rrc->mnc; - S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mnc_len = rrc->mnc_digit_length; + S1AP_NAS_FIRST_REQ(message_p).ue_identity.gummei.mcc = rrc->configuration.mcc[selected_plmn_identity]; + S1AP_NAS_FIRST_REQ(message_p).ue_identity.gummei.mnc = rrc->configuration.mnc[selected_plmn_identity]; + S1AP_NAS_FIRST_REQ(message_p).ue_identity.gummei.mnc_len = rrc->configuration.mnc_digit_length[selected_plmn_identity]; } S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mme_code = BIT_STRING_to_uint8 (&r_mme->mmec); From a52156cf268b14d90a8d17adad75e0626609a8ba Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 29 Jun 2018 13:29:44 +0200 Subject: [PATCH 255/379] Remove unused MCC/MNC in eNB_RRC_INST --- openair2/RRC/LTE/rrc_defs.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/openair2/RRC/LTE/rrc_defs.h b/openair2/RRC/LTE/rrc_defs.h index e21cb9255a..ae87075489 100644 --- a/openair2/RRC/LTE/rrc_defs.h +++ b/openair2/RRC/LTE/rrc_defs.h @@ -699,13 +699,6 @@ typedef struct eNB_RRC_INST_s { #if defined(ENABLE_ITTI) RrcConfigurationReq configuration; #endif - // other PLMN parameters - /// Mobile country code - int mcc; - /// Mobile network code - int mnc; - /// number of mnc digits - int mnc_digit_length; // other RAN parameters int srb1_timer_poll_retransmit; From 77b9ad2bfc6cfee5b35624285edc7e9398fffab4 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 3 Jul 2018 15:23:32 +0200 Subject: [PATCH 256/379] Change type S1AP REG REQ: Pass Broadcast PLMN index for MME selection --- openair2/COMMON/s1ap_messages_types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openair2/COMMON/s1ap_messages_types.h b/openair2/COMMON/s1ap_messages_types.h index 874286b590..6f7aab9422 100644 --- a/openair2/COMMON/s1ap_messages_types.h +++ b/openair2/COMMON/s1ap_messages_types.h @@ -344,6 +344,8 @@ typedef struct s1ap_register_enb_req_s { uint8_t nb_mme; /* List of MME to connect to */ net_ip_address_t mme_ip_address[S1AP_MAX_NB_MME_IP_ADDRESS]; + uint8_t broadcast_plmn_num[S1AP_MAX_NB_MME_IP_ADDRESS]; + uint8_t broadcast_plmn_index[S1AP_MAX_NB_MME_IP_ADDRESS][PLMN_LIST_MAX_SIZE]; /* Number of SCTP streams used for a mme association */ uint16_t sctp_in_streams; From 5f4432a3515243c851559d46c201a38d01e86707 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 3 Jul 2018 15:26:23 +0200 Subject: [PATCH 257/379] Read configuration parameter `Broadcast PLMN index` for MME --- openair2/ENB_APP/enb_config.c | 24 ++++++++++++++++++++++++ openair2/ENB_APP/enb_paramdef.h | 3 +++ 2 files changed, 27 insertions(+) diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 0b214eeaea..7a68535fce 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -2349,6 +2349,30 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i) { S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4 = 1; S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6 = 1; } + if (S1ParamList.paramarray[l][ENB_MME_BROADCAST_PLMN_INDEX].iptr) + S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_num[l] = S1ParamList.paramarray[l][ENB_MME_BROADCAST_PLMN_INDEX].numelt; + else + S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_num[l] = 0; + AssertFatal(S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_num[l] <= S1AP_REGISTER_ENB_REQ(msg_p).num_plmn, + "List of broadcast PLMN to be sent to MME can not be longer than actual " + "PLMN list (max %d, but is %d)\n", + S1AP_REGISTER_ENB_REQ(msg_p).num_plmn, + S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_num[l]); + for (int el = 0; el < S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_num[l]; ++el) { + /* UINTARRAY gets mapped to int, see config_libconfig.c:223 */ + S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_index[l][el] = S1ParamList.paramarray[l][ENB_MME_BROADCAST_PLMN_INDEX].iptr[el]; + AssertFatal(S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_index[l][el] >= 0 + && S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_index[l][el] < S1AP_REGISTER_ENB_REQ(msg_p).num_plmn, + "index for MME's MCC/MNC (%d) is an invalid index for the registered PLMN IDs (%d)\n", + S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_index[l][el], + S1AP_REGISTER_ENB_REQ(msg_p).num_plmn); + } + /* if no broadcasst_plmn array is defined, fill default values */ + if (S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_num[l] == 0) { + S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_num[l] = S1AP_REGISTER_ENB_REQ(msg_p).num_plmn; + for (int el = 0; el < S1AP_REGISTER_ENB_REQ(msg_p).num_plmn; ++el) + S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_index[l][el] = el; + } } diff --git a/openair2/ENB_APP/enb_paramdef.h b/openair2/ENB_APP/enb_paramdef.h index fc02acf9e5..725f9a0895 100755 --- a/openair2/ENB_APP/enb_paramdef.h +++ b/openair2/ENB_APP/enb_paramdef.h @@ -728,6 +728,7 @@ typedef enum { #define ENB_CONFIG_STRING_MME_IPV6_ADDRESS "ipv6" #define ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE "active" #define ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE "preference" +#define ENB_CONFIG_STRING_MME_BROADCAST_PLMN_INDEX "broadcast_plmn_index" /*-------------------------------------------------------------------------------------------------------------------------------------*/ @@ -739,12 +740,14 @@ typedef enum { {ENB_CONFIG_STRING_MME_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_MME_BROADCAST_PLMN_INDEX, NULL, 0, uptr:NULL, defintarrayval:NULL,TYPE_UINTARRAY, 6} \ } #define ENB_MME_IPV4_ADDRESS_IDX 0 #define ENB_MME_IPV6_ADDRESS_IDX 1 #define ENB_MME_IP_ADDRESS_ACTIVE_IDX 2 #define ENB_MME_IP_ADDRESS_PREFERENCE_IDX 3 +#define ENB_MME_BROADCAST_PLMN_INDEX 4 /*---------------------------------------------------------------------------------------------------------------------------------------*/ /* X2 configuration parameters section name */ From f954bb7700f3cf7481a85db9d3340eeb4479ba92 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 3 Jul 2018 15:45:47 +0200 Subject: [PATCH 258/379] S1AP MME data: Pass and store Broadcast PLMN index --- openair3/S1AP/s1ap_eNB.c | 11 +++++++++-- openair3/S1AP/s1ap_eNB_defs.h | 5 +++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/openair3/S1AP/s1ap_eNB.c b/openair3/S1AP/s1ap_eNB.c index 6e9e6522d1..2ae2733cab 100644 --- a/openair3/S1AP/s1ap_eNB.c +++ b/openair3/S1AP/s1ap_eNB.c @@ -97,7 +97,9 @@ static void s1ap_eNB_register_mme(s1ap_eNB_instance_t *instance_p, net_ip_address_t *mme_ip_address, net_ip_address_t *local_ip_addr, uint16_t in_streams, - uint16_t out_streams) + uint16_t out_streams, + uint8_t broadcast_plmn_num, + uint8_t broadcast_plmn_index[PLMN_LIST_MAX_SIZE]) { MessageDef *message_p = NULL; sctp_new_association_req_t *sctp_new_association_req_p = NULL; @@ -139,6 +141,9 @@ static void s1ap_eNB_register_mme(s1ap_eNB_instance_t *instance_p, sctp_new_association_req_p->ulp_cnx_id = s1ap_mme_data_p->cnx_id; s1ap_mme_data_p->assoc_id = -1; + s1ap_mme_data_p->broadcast_plmn_num = broadcast_plmn_num; + for (int i = 0; i < broadcast_plmn_num; ++i) + s1ap_mme_data_p->broadcast_plmn_index[i] = broadcast_plmn_index[i]; s1ap_mme_data_p->s1ap_eNB_instance = instance_p; STAILQ_INIT(&s1ap_mme_data_p->served_gummei); @@ -239,7 +244,9 @@ void s1ap_eNB_handle_register_eNB(instance_t instance, s1ap_register_enb_req_t * &s1ap_register_eNB->mme_ip_address[index], &s1ap_register_eNB->enb_ip_address, s1ap_register_eNB->sctp_in_streams, - s1ap_register_eNB->sctp_out_streams); + s1ap_register_eNB->sctp_out_streams, + s1ap_register_eNB->broadcast_plmn_num[index], + s1ap_register_eNB->broadcast_plmn_index[index]); } } diff --git a/openair3/S1AP/s1ap_eNB_defs.h b/openair3/S1AP/s1ap_eNB_defs.h index 75ea27f635..5bffa0df0c 100644 --- a/openair3/S1AP/s1ap_eNB_defs.h +++ b/openair3/S1AP/s1ap_eNB_defs.h @@ -154,6 +154,11 @@ typedef struct s1ap_eNB_mme_data_s { /* SCTP association id */ int32_t assoc_id; + /* This is served PLMN IDs communicated to the MME via an index over the + * MCC/MNC array in s1ap_eNB_instance */ + uint8_t broadcast_plmn_num; + uint8_t broadcast_plmn_index[PLMN_LIST_MAX_SIZE]; + /* Only meaningfull in virtual mode */ struct s1ap_eNB_instance_s *s1ap_eNB_instance; } s1ap_eNB_mme_data_t; From 81e70dfc25e87c63eac442d500ffe5147f45d2c9 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 4 Jul 2018 15:17:27 +0200 Subject: [PATCH 259/379] NAS First REQ: Forward selected PLMN Identity --- openair2/COMMON/s1ap_messages_types.h | 4 ++++ openair2/RRC/LTE/rrc_eNB_S1AP.c | 1 + 2 files changed, 5 insertions(+) diff --git a/openair2/COMMON/s1ap_messages_types.h b/openair2/COMMON/s1ap_messages_types.h index 6f7aab9422..f56a340cb2 100644 --- a/openair2/COMMON/s1ap_messages_types.h +++ b/openair2/COMMON/s1ap_messages_types.h @@ -376,6 +376,10 @@ typedef struct s1ap_nas_first_req_s { /* UE id for initial connection to S1AP */ uint16_t ue_initial_id; + /* the chosen PLMN identity as index, see TS 36.331 6.2.2 RRC Connection + * Setup Complete. This index here is zero-based, unlike the standard! */ + int selected_plmn_identity; + /* Establishment cause as sent by UE */ rrc_establishment_cause_t establishment_cause; diff --git a/openair2/RRC/LTE/rrc_eNB_S1AP.c b/openair2/RRC/LTE/rrc_eNB_S1AP.c index 2c28dd4e0f..5eb495f37b 100644 --- a/openair2/RRC/LTE/rrc_eNB_S1AP.c +++ b/openair2/RRC/LTE/rrc_eNB_S1AP.c @@ -757,6 +757,7 @@ rrc_eNB_send_S1AP_NAS_FIRST_REQ( /* selected_plmn_identity: IE is 1-based, convert to 0-based (C array) */ int selected_plmn_identity = rrcConnectionSetupComplete->selectedPLMN_Identity - 1; + S1AP_NAS_FIRST_REQ(message_p).selected_plmn_identity = selected_plmn_identity; if (rrcConnectionSetupComplete->registeredMME != NULL) { /* Fill GUMMEI */ From 418455bc8c109ac407d5a7be88d5294fe7eecc30 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 4 Jul 2018 10:12:38 +0200 Subject: [PATCH 260/379] NAS First REQ/NAS Uplink: Use selected PLMN ID --- openair3/S1AP/s1ap_eNB_nas_procedures.c | 25 +++++++++++++------------ openair3/S1AP/s1ap_eNB_ue_context.h | 5 +++++ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/openair3/S1AP/s1ap_eNB_nas_procedures.c b/openair3/S1AP/s1ap_eNB_nas_procedures.c index ebd5bab4fd..c87f1106e0 100644 --- a/openair3/S1AP/s1ap_eNB_nas_procedures.c +++ b/openair3/S1AP/s1ap_eNB_nas_procedures.c @@ -124,6 +124,7 @@ int s1ap_eNB_handle_nas_first_req( ue_desc_p->mme_ref = mme_desc_p; ue_desc_p->ue_initial_id = s1ap_nas_first_req_p->ue_initial_id; ue_desc_p->eNB_instance = instance_p; + ue_desc_p->selected_plmn_identity = s1ap_nas_first_req_p->selected_plmn_identity; do { struct s1ap_eNB_ue_context_s *collision_p; @@ -172,9 +173,9 @@ int s1ap_eNB_handle_nas_first_req( ie->value.present = S1AP_InitialUEMessage_IEs__value_PR_TAI; /* Assuming TAI is the TAI from the cell */ INT16_TO_OCTET_STRING(instance_p->tac, &ie->value.choice.TAI.tAC); - MCC_MNC_TO_PLMNID(instance_p->mcc, - instance_p->mnc, - instance_p->mnc_digit_length, + MCC_MNC_TO_PLMNID(instance_p->mcc[ue_desc_p->selected_plmn_identity], + instance_p->mnc[ue_desc_p->selected_plmn_identity], + instance_p->mnc_digit_length[ue_desc_p->selected_plmn_identity], &ie->value.choice.TAI.pLMNidentity); ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); @@ -191,9 +192,9 @@ int s1ap_eNB_handle_nas_first_req( MACRO_ENB_ID_TO_CELL_IDENTITY(instance_p->eNB_id, 0, // Cell ID &ie->value.choice.EUTRAN_CGI.cell_ID); - MCC_MNC_TO_TBCD(instance_p->mcc, - instance_p->mnc, - instance_p->mnc_digit_length, + MCC_MNC_TO_TBCD(instance_p->mcc[ue_desc_p->selected_plmn_identity], + instance_p->mnc[ue_desc_p->selected_plmn_identity], + instance_p->mnc_digit_length[ue_desc_p->selected_plmn_identity], &ie->value.choice.EUTRAN_CGI.pLMNidentity); ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); @@ -608,9 +609,9 @@ int s1ap_eNB_nas_uplink(instance_t instance, s1ap_uplink_nas_t *s1ap_uplink_nas_ ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_UplinkNASTransport_IEs__value_PR_EUTRAN_CGI; MCC_MNC_TO_PLMNID( - s1ap_eNB_instance_p->mcc, - s1ap_eNB_instance_p->mnc, - s1ap_eNB_instance_p->mnc_digit_length, + s1ap_eNB_instance_p->mcc[ue_context_p->selected_plmn_identity], + s1ap_eNB_instance_p->mnc[ue_context_p->selected_plmn_identity], + s1ap_eNB_instance_p->mnc_digit_length[ue_context_p->selected_plmn_identity], &ie->value.choice.EUTRAN_CGI.pLMNidentity); //#warning "TODO get cell id from RRC" MACRO_ENB_ID_TO_CELL_IDENTITY(s1ap_eNB_instance_p->eNB_id, @@ -624,9 +625,9 @@ int s1ap_eNB_nas_uplink(instance_t instance, s1ap_uplink_nas_t *s1ap_uplink_nas_ ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_UplinkNASTransport_IEs__value_PR_TAI; MCC_MNC_TO_PLMNID( - s1ap_eNB_instance_p->mcc, - s1ap_eNB_instance_p->mnc, - s1ap_eNB_instance_p->mnc_digit_length, + s1ap_eNB_instance_p->mcc[ue_context_p->selected_plmn_identity], + s1ap_eNB_instance_p->mnc[ue_context_p->selected_plmn_identity], + s1ap_eNB_instance_p->mnc_digit_length[ue_context_p->selected_plmn_identity], &ie->value.choice.TAI.pLMNidentity); TAC_TO_ASN1(s1ap_eNB_instance_p->tac, &ie->value.choice.TAI.tAC); ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); diff --git a/openair3/S1AP/s1ap_eNB_ue_context.h b/openair3/S1AP/s1ap_eNB_ue_context.h index d78c6f7f1a..9adbc5fb2c 100644 --- a/openair3/S1AP/s1ap_eNB_ue_context.h +++ b/openair3/S1AP/s1ap_eNB_ue_context.h @@ -67,6 +67,11 @@ typedef struct s1ap_eNB_ue_context_s { /* Reference to MME data this UE is attached to */ struct s1ap_eNB_mme_data_s *mme_ref; + /* Signaled by the UE in RRC Connection Setup Complete and used in NAS Uplink + * to route NAS messages correctly. 0-based, not 1-based as in TS 36.331 + * 6.2.2 RRC Connection Setup Complete! */ + int selected_plmn_identity; + /* Reference to eNB data this UE is attached to */ s1ap_eNB_instance_t *eNB_instance; } s1ap_eNB_ue_context_t; From 4f997239c16b7a67aa9bb79850178b4e7585324f Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 4 Jul 2018 12:07:34 +0200 Subject: [PATCH 261/379] S1SetupRequest: Register with PLMN ID/Broadcast PLMNs --- openair3/S1AP/s1ap_eNB.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/openair3/S1AP/s1ap_eNB.c b/openair3/S1AP/s1ap_eNB.c index 2ae2733cab..91da0f06f7 100644 --- a/openair3/S1AP/s1ap_eNB.c +++ b/openair3/S1AP/s1ap_eNB.c @@ -463,7 +463,9 @@ static int s1ap_eNB_generate_s1_setup_request( ie->id = S1AP_ProtocolIE_ID_id_Global_ENB_ID; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_S1SetupRequestIEs__value_PR_Global_ENB_ID; - MCC_MNC_TO_PLMNID(instance_p->mcc, instance_p->mnc, instance_p->mnc_digit_length, + MCC_MNC_TO_PLMNID(instance_p->mcc[s1ap_mme_data_p->broadcast_plmn_index[0]], + instance_p->mnc[s1ap_mme_data_p->broadcast_plmn_index[0]], + instance_p->mnc_digit_length[s1ap_mme_data_p->broadcast_plmn_index[0]], &ie->value.choice.Global_ENB_ID.pLMNidentity); ie->value.choice.Global_ENB_ID.eNB_ID.present = S1AP_ENB_ID_PR_macroENB_ID; MACRO_ENB_ID_TO_BIT_STRING(instance_p->eNB_id, @@ -494,9 +496,14 @@ static int s1ap_eNB_generate_s1_setup_request( ta = (S1AP_SupportedTAs_Item_t *)calloc(1, sizeof(S1AP_SupportedTAs_Item_t)); INT16_TO_OCTET_STRING(instance_p->tac, &ta->tAC); { - plmn = (S1AP_PLMNidentity_t *)calloc(1, sizeof(S1AP_PLMNidentity_t)); - MCC_MNC_TO_TBCD(instance_p->mcc, instance_p->mnc, instance_p->mnc_digit_length, plmn); - ASN_SEQUENCE_ADD(&ta->broadcastPLMNs.list, plmn); + for (int i = 0; i < s1ap_mme_data_p->broadcast_plmn_num; ++i) { + plmn = (S1AP_PLMNidentity_t *)calloc(1, sizeof(S1AP_PLMNidentity_t)); + MCC_MNC_TO_TBCD(instance_p->mcc[s1ap_mme_data_p->broadcast_plmn_index[i]], + instance_p->mnc[s1ap_mme_data_p->broadcast_plmn_index[i]], + instance_p->mnc_digit_length[s1ap_mme_data_p->broadcast_plmn_index[i]], + plmn); + ASN_SEQUENCE_ADD(&ta->broadcastPLMNs.list, plmn); + } } ASN_SEQUENCE_ADD(&ie->value.choice.SupportedTAs.list, ta); } From a4bc48a2f7800e759cf4edce597a8cef25e6290b Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sat, 23 Jun 2018 15:56:53 +0200 Subject: [PATCH 262/379] Fix in paging: iterate list of MCC/MNC/TAC --- openair2/RRC/LTE/rrc_eNB_S1AP.c | 234 ++++++++++++++++---------------- 1 file changed, 118 insertions(+), 116 deletions(-) diff --git a/openair2/RRC/LTE/rrc_eNB_S1AP.c b/openair2/RRC/LTE/rrc_eNB_S1AP.c index 5eb495f37b..d225b6eae0 100644 --- a/openair2/RRC/LTE/rrc_eNB_S1AP.c +++ b/openair2/RRC/LTE/rrc_eNB_S1AP.c @@ -1849,125 +1849,127 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance for (uint16_t tai_size = 0; tai_size < S1AP_PAGING_IND(msg_p).tai_size; tai_size++) { LOG_D(RRC,"[eNB %d] In S1AP_PAGING_IND: MCC %d, MNC %d, TAC %d\n", instance, S1AP_PAGING_IND(msg_p).plmn_identity[tai_size].mcc, S1AP_PAGING_IND(msg_p).plmn_identity[tai_size].mnc, S1AP_PAGING_IND(msg_p).tac[tai_size]); - if (RC.rrc[instance]->configuration.mcc == S1AP_PAGING_IND(msg_p).plmn_identity[tai_size].mcc - && RC.rrc[instance]->configuration.mnc == S1AP_PAGING_IND(msg_p).plmn_identity[tai_size].mnc - && RC.rrc[instance]->configuration.tac == S1AP_PAGING_IND(msg_p).tac[tai_size]) { - for (uint8_t CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { - lte_frame_type_t frame_type = RC.eNB[instance][CC_id]->frame_parms.frame_type; - /* get nB from configuration */ - /* get default DRX cycle from configuration */ - Tc = (uint8_t)RC.rrc[instance]->configuration.pcch_defaultPagingCycle[CC_id]; - if (Tc < PCCH_Config__defaultPagingCycle_rf32 || Tc > PCCH_Config__defaultPagingCycle_rf256) { - continue; - } - Tue = (uint8_t)S1AP_PAGING_IND(msg_p).paging_drx; - /* set T = min(Tc,Tue) */ - T = Tc < Tue ? Ttab[Tc] : Ttab[Tue]; - /* set pcch_nB = PCCH-Config->nB */ - pcch_nB = (uint32_t)RC.rrc[instance]->configuration.pcch_nB[CC_id]; - switch (pcch_nB) { - case PCCH_Config__nB_fourT: - Ns = 4; - break; - case PCCH_Config__nB_twoT: - Ns = 2; - break; - default: - Ns = 1; - break; - } - /* set N = min(T,nB) */ - if (pcch_nB > PCCH_Config__nB_oneT) { - switch (pcch_nB) { - case PCCH_Config__nB_halfT: - N = T/2; - break; - case PCCH_Config__nB_quarterT: - N = T/4; - break; - case PCCH_Config__nB_oneEighthT: - N = T/8; - break; - case PCCH_Config__nB_oneSixteenthT: - N = T/16; - break; - case PCCH_Config__nB_oneThirtySecondT: - N = T/32; - break; - default: - /* pcch_nB error */ - LOG_E(RRC, "[eNB %d] In S1AP_PAGING_IND: pcch_nB error (pcch_nB %d) \n", - instance, pcch_nB); - return (-1); - } - } else { - N = T; - } - - /* insert data to UE_PF_PO or update data in UE_PF_PO */ - pthread_mutex_lock(&ue_pf_po_mutex); - uint16_t i = 0; - for (i = 0; i < MAX_MOBILES_PER_ENB; i++) { - if ((UE_PF_PO[CC_id][i].enable_flag == TRUE && UE_PF_PO[CC_id][i].ue_index_value == (uint16_t)(S1AP_PAGING_IND(msg_p).ue_index_value)) - || (UE_PF_PO[CC_id][i].enable_flag != TRUE)) { - /* set T = min(Tc,Tue) */ - UE_PF_PO[CC_id][i].T = T; - /* set UE_ID */ - UE_PF_PO[CC_id][i].ue_index_value = (uint16_t)S1AP_PAGING_IND(msg_p).ue_index_value; - /* calculate PF and PO */ - /* set PF_min : SFN mod T = (T div N)*(UE_ID mod N) */ - UE_PF_PO[CC_id][i].PF_min = (T / N) * (UE_PF_PO[CC_id][i].ue_index_value % N); - /* set PO */ - /* i_s = floor(UE_ID/N) mod Ns */ - i_s = (uint8_t)((UE_PF_PO[CC_id][i].ue_index_value / N) % Ns); - if (Ns == 1) { - UE_PF_PO[CC_id][i].PO = (frame_type==FDD) ? 9 : 0; - } else if (Ns==2) { - UE_PF_PO[CC_id][i].PO = (frame_type==FDD) ? (4+(5*i_s)) : (5*i_s); - } else if (Ns==4) { - UE_PF_PO[CC_id][i].PO = (frame_type==FDD) ? (4*(i_s&1)+(5*(i_s>>1))) : ((i_s&1)+(5*(i_s>>1))); + for (uint8_t j = 0; j < RC.rrc[instance]->configuration.num_plmn; j++) { + if (RC.rrc[instance]->configuration.mcc[j] == S1AP_PAGING_IND(msg_p).plmn_identity[tai_size].mcc + && RC.rrc[instance]->configuration.mnc[j] == S1AP_PAGING_IND(msg_p).plmn_identity[tai_size].mnc + && RC.rrc[instance]->configuration.tac == S1AP_PAGING_IND(msg_p).tac[tai_size]) { + for (uint8_t CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { + lte_frame_type_t frame_type = RC.eNB[instance][CC_id]->frame_parms.frame_type; + /* get nB from configuration */ + /* get default DRX cycle from configuration */ + Tc = (uint8_t)RC.rrc[instance]->configuration.pcch_defaultPagingCycle[CC_id]; + if (Tc < PCCH_Config__defaultPagingCycle_rf32 || Tc > PCCH_Config__defaultPagingCycle_rf256) { + continue; + } + Tue = (uint8_t)S1AP_PAGING_IND(msg_p).paging_drx; + /* set T = min(Tc,Tue) */ + T = Tc < Tue ? Ttab[Tc] : Ttab[Tue]; + /* set pcch_nB = PCCH-Config->nB */ + pcch_nB = (uint32_t)RC.rrc[instance]->configuration.pcch_nB[CC_id]; + switch (pcch_nB) { + case PCCH_Config__nB_fourT: + Ns = 4; + break; + case PCCH_Config__nB_twoT: + Ns = 2; + break; + default: + Ns = 1; + break; + } + /* set N = min(T,nB) */ + if (pcch_nB > PCCH_Config__nB_oneT) { + switch (pcch_nB) { + case PCCH_Config__nB_halfT: + N = T/2; + break; + case PCCH_Config__nB_quarterT: + N = T/4; + break; + case PCCH_Config__nB_oneEighthT: + N = T/8; + break; + case PCCH_Config__nB_oneSixteenthT: + N = T/16; + break; + case PCCH_Config__nB_oneThirtySecondT: + N = T/32; + break; + default: + /* pcch_nB error */ + LOG_E(RRC, "[eNB %d] In S1AP_PAGING_IND: pcch_nB error (pcch_nB %d) \n", + instance, pcch_nB); + return (-1); } - if (UE_PF_PO[CC_id][i].enable_flag == TRUE) { - //paging exist UE log - LOG_D(RRC,"[eNB %d] CC_id %d In S1AP_PAGING_IND: Update exist UE %d, T %d, PF %d, PO %d\n", instance, CC_id, UE_PF_PO[CC_id][i].ue_index_value, T, UE_PF_PO[CC_id][i].PF_min, UE_PF_PO[CC_id][i].PO); - } else { - /* set enable_flag */ - UE_PF_PO[CC_id][i].enable_flag = TRUE; - //paging new UE log - LOG_D(RRC,"[eNB %d] CC_id %d In S1AP_PAGING_IND: Insert a new UE %d, T %d, PF %d, PO %d\n", instance, CC_id, UE_PF_PO[CC_id][i].ue_index_value, T, UE_PF_PO[CC_id][i].PF_min, UE_PF_PO[CC_id][i].PO); - } - break; - } - } - pthread_mutex_unlock(&ue_pf_po_mutex); + } else { + N = T; + } - uint32_t length; - uint8_t buffer[RRC_BUF_SIZE]; - uint8_t *message_buffer; - /* Transfer data to PDCP */ - MessageDef *message_p; - message_p = itti_alloc_new_message (TASK_RRC_ENB, RRC_PCCH_DATA_REQ); - /* Create message for PDCP (DLInformationTransfer_t) */ - length = do_Paging (instance, - buffer, - S1AP_PAGING_IND(msg_p).ue_paging_identity, - S1AP_PAGING_IND(msg_p).cn_domain); - if(length == -1) - { - LOG_I(RRC, "do_Paging error"); - return -1; + /* insert data to UE_PF_PO or update data in UE_PF_PO */ + pthread_mutex_lock(&ue_pf_po_mutex); + uint8_t i = 0; + for (i = 0; i < MAX_MOBILES_PER_ENB; i++) { + if ((UE_PF_PO[CC_id][i].enable_flag == TRUE && UE_PF_PO[CC_id][i].ue_index_value == (uint16_t)(S1AP_PAGING_IND(msg_p).ue_index_value)) + || (UE_PF_PO[CC_id][i].enable_flag != TRUE)) { + /* set T = min(Tc,Tue) */ + UE_PF_PO[CC_id][i].T = T; + /* set UE_ID */ + UE_PF_PO[CC_id][i].ue_index_value = (uint16_t)S1AP_PAGING_IND(msg_p).ue_index_value; + /* calculate PF and PO */ + /* set PF_min : SFN mod T = (T div N)*(UE_ID mod N) */ + UE_PF_PO[CC_id][i].PF_min = (T / N) * (UE_PF_PO[CC_id][i].ue_index_value % N); + /* set PO */ + /* i_s = floor(UE_ID/N) mod Ns */ + i_s = (uint8_t)((UE_PF_PO[CC_id][i].ue_index_value / N) % Ns); + if (Ns == 1) { + UE_PF_PO[CC_id][i].PO = (frame_type==FDD) ? 9 : 0; + } else if (Ns==2) { + UE_PF_PO[CC_id][i].PO = (frame_type==FDD) ? (4+(5*i_s)) : (5*i_s); + } else if (Ns==4) { + UE_PF_PO[CC_id][i].PO = (frame_type==FDD) ? (4*(i_s&1)+(5*(i_s>>1))) : ((i_s&1)+(5*(i_s>>1))); + } + if (UE_PF_PO[CC_id][i].enable_flag == TRUE) { + //paging exist UE log + LOG_D(RRC,"[eNB %d] CC_id %d In S1AP_PAGING_IND: Update exist UE %d, T %d, PF %d, PO %d\n", instance, CC_id, UE_PF_PO[CC_id][i].ue_index_value, T, UE_PF_PO[CC_id][i].PF_min, UE_PF_PO[CC_id][i].PO); + } else { + /* set enable_flag */ + UE_PF_PO[CC_id][i].enable_flag = TRUE; + //paging new UE log + LOG_D(RRC,"[eNB %d] CC_id %d In S1AP_PAGING_IND: Insert a new UE %d, T %d, PF %d, PO %d\n", instance, CC_id, UE_PF_PO[CC_id][i].ue_index_value, T, UE_PF_PO[CC_id][i].PF_min, UE_PF_PO[CC_id][i].PO); + } + break; + } + } + pthread_mutex_unlock(&ue_pf_po_mutex); + + uint32_t length; + uint8_t buffer[RRC_BUF_SIZE]; + uint8_t *message_buffer; + /* Transfer data to PDCP */ + MessageDef *message_p; + message_p = itti_alloc_new_message (TASK_RRC_ENB, RRC_PCCH_DATA_REQ); + /* Create message for PDCP (DLInformationTransfer_t) */ + length = do_Paging (instance, + buffer, + S1AP_PAGING_IND(msg_p).ue_paging_identity, + S1AP_PAGING_IND(msg_p).cn_domain); + if(length == -1) + { + LOG_I(RRC, "do_Paging error"); + return -1; + } + message_buffer = itti_malloc (TASK_RRC_ENB, TASK_PDCP_ENB, length); + /* Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling). */ + memcpy (message_buffer, buffer, length); + RRC_PCCH_DATA_REQ (message_p).sdu_size = length; + RRC_PCCH_DATA_REQ (message_p).sdu_p = message_buffer; + RRC_PCCH_DATA_REQ (message_p).mode = PDCP_TRANSMISSION_MODE_TRANSPARENT; /* not used */ + RRC_PCCH_DATA_REQ (message_p).rnti = P_RNTI; + RRC_PCCH_DATA_REQ (message_p).ue_index = i; + RRC_PCCH_DATA_REQ (message_p).CC_id = CC_id; + LOG_D(RRC, "[eNB %d] CC_id %d In S1AP_PAGING_IND: send encdoed buffer to PDCP buffer_size %d\n", instance, CC_id, length); + itti_send_msg_to_task (TASK_PDCP_ENB, instance, message_p); } - message_buffer = itti_malloc (TASK_RRC_ENB, TASK_PDCP_ENB, length); - /* Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling). */ - memcpy (message_buffer, buffer, length); - RRC_PCCH_DATA_REQ (message_p).sdu_size = length; - RRC_PCCH_DATA_REQ (message_p).sdu_p = message_buffer; - RRC_PCCH_DATA_REQ (message_p).mode = PDCP_TRANSMISSION_MODE_TRANSPARENT; /* not used */ - RRC_PCCH_DATA_REQ (message_p).rnti = P_RNTI; - RRC_PCCH_DATA_REQ (message_p).ue_index = i; - RRC_PCCH_DATA_REQ (message_p).CC_id = CC_id; - LOG_D(RRC, "[eNB %d] CC_id %d In S1AP_PAGING_IND: send encdoed buffer to PDCP buffer_size %d\n", instance, CC_id, length); - itti_send_msg_to_task (TASK_PDCP_ENB, instance, message_p); } } } From 6c0680db12cd073ca4b252fc2e9d17a2cb11299a Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 2 Jul 2018 10:21:05 +0200 Subject: [PATCH 263/379] Add config_getlist in config module --- common/config/config_userapi.c | 31 +++++++++++++++++++++++++++++++ common/config/config_userapi.h | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/common/config/config_userapi.c b/common/config/config_userapi.c index 57a680044b..57b312494a 100644 --- a/common/config/config_userapi.c +++ b/common/config/config_userapi.c @@ -29,6 +29,9 @@ * \note * \warning */ + +#define _GNU_SOURCE + #include #include #include @@ -210,6 +213,34 @@ configmodule_interface_t *cfgif = config_get_if(); return ret; } +int config_getlist(paramlist_def_t *ParamList, paramdef_t *params, int numparams, char *prefix) +{ + if (CONFIG_ISFLAGSET(CONFIG_ABORT)) { + fprintf(stderr,"[CONFIG] config_get skipped, config module not properly initialized\n"); + return -1; + } + if (!config_get_if()) + return -1; + + const int ret = config_get_if()->getlist(ParamList, params, numparams, prefix); + if (ret >= 0 && params) { + char *newprefix; + if (prefix) + asprintf(&newprefix, "%s.%s", prefix, ParamList->listname); + else + newprefix = ParamList->listname; + char cfgpath[MAX_OPTNAME_SIZE*2 + 6]; /* prefix.listname.[listindex] */ + for (int i = 0; i < ParamList->numelt; ++i) { + // TODO config_process_cmdline? + sprintf(cfgpath, "%s.[%i]", newprefix, i); + config_execcheck(ParamList->paramarray[i], numparams, cfgpath); + } + if (prefix) + free(newprefix); + } + return ret; +} + int config_isparamset(paramdef_t *params,int paramidx) { if ((params[paramidx].paramflags & PARAMFLAG_PARAMSET) != 0) { diff --git a/common/config/config_userapi.h b/common/config/config_userapi.h index 25306b8778..2b40f8401b 100644 --- a/common/config/config_userapi.h +++ b/common/config/config_userapi.h @@ -57,7 +57,7 @@ extern int config_assign_ipv4addr(paramdef_t *cfgoptions, char *ipv4addr); /* apis to get parameters, to be used by oai modules, at configuration time */ extern int config_get(paramdef_t *params,int numparams, char *prefix); -#define config_getlist config_get_if()->getlist +extern int config_getlist(paramlist_def_t *ParamList, paramdef_t *params, int numparams, char *prefix); /* apis to retrieve parameters info after calling get or getlist functions */ extern int config_isparamset(paramdef_t *params,int paramidx); From ff688f163bfd73c3987991bf026449c8803afc7c Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 4 Jul 2018 15:20:16 +0200 Subject: [PATCH 264/379] NNSF my MME code: respect selected PLMN ID --- openair3/S1AP/s1ap_eNB_nas_procedures.c | 1 + openair3/S1AP/s1ap_eNB_nnsf.c | 36 ++++++++++++++----------- openair3/S1AP/s1ap_eNB_nnsf.h | 1 + 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/openair3/S1AP/s1ap_eNB_nas_procedures.c b/openair3/S1AP/s1ap_eNB_nas_procedures.c index c87f1106e0..91d3da4745 100644 --- a/openair3/S1AP/s1ap_eNB_nas_procedures.c +++ b/openair3/S1AP/s1ap_eNB_nas_procedures.c @@ -89,6 +89,7 @@ int s1ap_eNB_handle_nas_first_req( mme_desc_p = s1ap_eNB_nnsf_select_mme_by_mme_code( instance_p, s1ap_nas_first_req_p->establishment_cause, + s1ap_nas_first_req_p->selected_plmn_identity, s1ap_nas_first_req_p->ue_identity.s_tmsi.mme_code); } } diff --git a/openair3/S1AP/s1ap_eNB_nnsf.c b/openair3/S1AP/s1ap_eNB_nnsf.c index 8b7d65cb01..a3fa634db1 100644 --- a/openair3/S1AP/s1ap_eNB_nnsf.c +++ b/openair3/S1AP/s1ap_eNB_nnsf.c @@ -92,11 +92,10 @@ s1ap_eNB_nnsf_select_mme(s1ap_eNB_instance_t *instance_p, struct s1ap_eNB_mme_data_s * s1ap_eNB_nnsf_select_mme_by_mme_code(s1ap_eNB_instance_t *instance_p, rrc_establishment_cause_t cause, + int selected_plmn_identity, uint8_t mme_code) { struct s1ap_eNB_mme_data_s *mme_data_p = NULL; - struct s1ap_eNB_mme_data_s *mme_highest_capacity_p = NULL; - uint8_t current_capacity = 0; RB_FOREACH(mme_data_p, s1ap_mme_map, &instance_p->s1ap_mme_head) { struct served_gummei_s *gummei_p = NULL; @@ -135,30 +134,37 @@ s1ap_eNB_nnsf_select_mme_by_mme_code(s1ap_eNB_instance_t *instance_p, } } - if (current_capacity < mme_data_p->relative_mme_capacity) { - /* We find a better MME, keep a reference to it */ - current_capacity = mme_data_p->relative_mme_capacity; - mme_highest_capacity_p = mme_data_p; - } - /* Looking for MME code matching the one provided by NAS */ STAILQ_FOREACH(gummei_p, &mme_data_p->served_gummei, next) { struct mme_code_s *mme_code_p = NULL; + struct plmn_identity_s *served_plmn_p = NULL; + STAILQ_FOREACH(served_plmn_p, &gummei_p->served_plmns, next) { + if ((served_plmn_p->mcc == instance_p->mcc[selected_plmn_identity]) && + (served_plmn_p->mnc == instance_p->mnc[selected_plmn_identity])) { + break; + } + } STAILQ_FOREACH(mme_code_p, &gummei_p->mme_codes, next) { if (mme_code_p->mme_code == mme_code) { - return mme_data_p; + break; } } + + /* The MME matches the parameters provided by the NAS layer -> + * the MME is knwown and the association is ready. + * Return the reference to the MME to use it for this UE. + */ + if (mme_code_p && served_plmn_p) { + return mme_data_p; + } } } - /* At this point no MME matches the provided GUMMEI. Select the one with the - * highest relative capacity. - * In case the list of known MME is empty, simply return NULL, that way the RRC - * layer should know about it and reject RRC connectivity. - */ - return mme_highest_capacity_p; + /* At this point no MME matches the selected PLMN and MME code. In this case, + * return NULL. That way the RRC layer should know about it and reject RRC + * connectivity. */ + return NULL; } struct s1ap_eNB_mme_data_s * diff --git a/openair3/S1AP/s1ap_eNB_nnsf.h b/openair3/S1AP/s1ap_eNB_nnsf.h index 78405f34d1..5a3d44416f 100644 --- a/openair3/S1AP/s1ap_eNB_nnsf.h +++ b/openair3/S1AP/s1ap_eNB_nnsf.h @@ -29,6 +29,7 @@ s1ap_eNB_nnsf_select_mme(s1ap_eNB_instance_t *instance_p, struct s1ap_eNB_mme_data_s* s1ap_eNB_nnsf_select_mme_by_mme_code(s1ap_eNB_instance_t *instance_p, rrc_establishment_cause_t cause, + int selected_plmn_identity, uint8_t mme_code); struct s1ap_eNB_mme_data_s* From 067f6e7a38305b72f0574fc9d47cc0bda0e5f4b9 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 4 Jul 2018 15:21:34 +0200 Subject: [PATCH 265/379] NNSF by GUMMEI: do not use highest capacity --- openair3/S1AP/s1ap_eNB_nnsf.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/openair3/S1AP/s1ap_eNB_nnsf.c b/openair3/S1AP/s1ap_eNB_nnsf.c index a3fa634db1..0d5519149c 100644 --- a/openair3/S1AP/s1ap_eNB_nnsf.c +++ b/openair3/S1AP/s1ap_eNB_nnsf.c @@ -173,8 +173,6 @@ s1ap_eNB_nnsf_select_mme_by_gummei(s1ap_eNB_instance_t *instance_p, s1ap_gummei_t gummei) { struct s1ap_eNB_mme_data_s *mme_data_p = NULL; - struct s1ap_eNB_mme_data_s *mme_highest_capacity_p = NULL; - uint8_t current_capacity = 0; RB_FOREACH(mme_data_p, s1ap_mme_map, &instance_p->s1ap_mme_head) { struct served_gummei_s *gummei_p = NULL; @@ -213,12 +211,6 @@ s1ap_eNB_nnsf_select_mme_by_gummei(s1ap_eNB_instance_t *instance_p, } } - if (current_capacity < mme_data_p->relative_mme_capacity) { - /* We find a better MME, keep a reference to it */ - current_capacity = mme_data_p->relative_mme_capacity; - mme_highest_capacity_p = mme_data_p; - } - /* Looking for MME gummei matching the one provided by NAS */ STAILQ_FOREACH(gummei_p, &mme_data_p->served_gummei, next) { struct served_group_id_s *group_id_p = NULL; @@ -254,10 +246,8 @@ s1ap_eNB_nnsf_select_mme_by_gummei(s1ap_eNB_instance_t *instance_p, } } - /* At this point no MME matches the provided GUMMEI. Select the one with the - * highest relative capacity. - * In case the list of known MME is empty, simply return NULL, that way the RRC - * layer should know about it and reject RRC connectivity. - */ - return mme_highest_capacity_p; + /* At this point no MME matches the provided GUMMEI. In this case, return + * NULL. That way the RRC layer should know about it and reject RRC + * connectivity. */ + return NULL; } From 02d09453061f5dea6d94712708bdc35f73c565c0 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 4 Jul 2018 16:45:32 +0200 Subject: [PATCH 266/379] Add NNSF by selected PLMN Identity --- openair3/S1AP/s1ap_eNB_nas_procedures.c | 13 ++++- openair3/S1AP/s1ap_eNB_nnsf.c | 70 +++++++++++++++++++++++++ openair3/S1AP/s1ap_eNB_nnsf.h | 5 ++ 3 files changed, 86 insertions(+), 2 deletions(-) diff --git a/openair3/S1AP/s1ap_eNB_nas_procedures.c b/openair3/S1AP/s1ap_eNB_nas_procedures.c index 91d3da4745..750bcd02fc 100644 --- a/openair3/S1AP/s1ap_eNB_nas_procedures.c +++ b/openair3/S1AP/s1ap_eNB_nas_procedures.c @@ -94,10 +94,19 @@ int s1ap_eNB_handle_nas_first_req( } } + if (mme_desc_p == NULL) { + /* Select MME based on the selected PLMN identity, received through RRC + * Connection Setup Complete */ + mme_desc_p = s1ap_eNB_nnsf_select_mme_by_plmn_id( + instance_p, + s1ap_nas_first_req_p->establishment_cause, + s1ap_nas_first_req_p->selected_plmn_identity); + } + if (mme_desc_p == NULL) { /* - * If no MME corresponds to the GUMMEI or the s-TMSI, selects the MME with the - * highest capacity. + * If no MME corresponds to the GUMMEI, the s-TMSI, or the selected PLMN + * identity, selects the MME with the highest capacity. */ mme_desc_p = s1ap_eNB_nnsf_select_mme( instance_p, diff --git a/openair3/S1AP/s1ap_eNB_nnsf.c b/openair3/S1AP/s1ap_eNB_nnsf.c index 0d5519149c..63dc92b5e2 100644 --- a/openair3/S1AP/s1ap_eNB_nnsf.c +++ b/openair3/S1AP/s1ap_eNB_nnsf.c @@ -89,6 +89,76 @@ s1ap_eNB_nnsf_select_mme(s1ap_eNB_instance_t *instance_p, return mme_highest_capacity_p; } +struct s1ap_eNB_mme_data_s * +s1ap_eNB_nnsf_select_mme_by_plmn_id(s1ap_eNB_instance_t *instance_p, + rrc_establishment_cause_t cause, + int selected_plmn_identity) +{ + struct s1ap_eNB_mme_data_s *mme_data_p = NULL; + struct s1ap_eNB_mme_data_s *mme_highest_capacity_p = NULL; + uint8_t current_capacity = 0; + + RB_FOREACH(mme_data_p, s1ap_mme_map, &instance_p->s1ap_mme_head) { + struct served_gummei_s *gummei_p = NULL; + struct plmn_identity_s *served_plmn_p = NULL; + if (mme_data_p->state != S1AP_ENB_STATE_CONNECTED) { + /* The association between MME and eNB is not ready for the moment, + * go to the next known MME. + */ + if (mme_data_p->state == S1AP_ENB_OVERLOAD) { + /* MME is overloaded. We have to check the RRC establishment + * cause and take decision to the select this MME depending on + * the overload state. + */ + if ((cause == RRC_CAUSE_MO_DATA) + && (mme_data_p->overload_state == S1AP_OVERLOAD_REJECT_MO_DATA)) { + continue; + } + + if ((mme_data_p->overload_state == S1AP_OVERLOAD_REJECT_ALL_SIGNALLING) + && ((cause == RRC_CAUSE_MO_SIGNALLING) || (cause == RRC_CAUSE_MO_DATA))) { + continue; + } + + if ((mme_data_p->overload_state == S1AP_OVERLOAD_ONLY_EMERGENCY_AND_MT) + && ((cause == RRC_CAUSE_MO_SIGNALLING) || (cause == RRC_CAUSE_MO_DATA) + || (cause == RRC_CAUSE_HIGH_PRIO_ACCESS))) { + continue; + } + + /* At this point, the RRC establishment can be handled by the MME + * even if it is in overload state. + */ + } else { + /* The MME is not overloaded, association is simply not ready. */ + continue; + } + } + + /* Looking for served GUMMEI PLMN Identity selected matching the one provided by the UE */ + STAILQ_FOREACH(gummei_p, &mme_data_p->served_gummei, next) { + STAILQ_FOREACH(served_plmn_p, &gummei_p->served_plmns, next) { + if ((served_plmn_p->mcc == instance_p->mcc[selected_plmn_identity]) && + (served_plmn_p->mnc == instance_p->mnc[selected_plmn_identity])) { + break; + } + } + /* if found, we can stop the outer loop, too */ + if (served_plmn_p) break; + } + /* if we didn't find such a served PLMN, go on with the next MME */ + if (!served_plmn_p) continue; + + if (current_capacity < mme_data_p->relative_mme_capacity) { + /* We find a better MME, keep a reference to it */ + current_capacity = mme_data_p->relative_mme_capacity; + mme_highest_capacity_p = mme_data_p; + } + } + + return mme_highest_capacity_p; +} + struct s1ap_eNB_mme_data_s * s1ap_eNB_nnsf_select_mme_by_mme_code(s1ap_eNB_instance_t *instance_p, rrc_establishment_cause_t cause, diff --git a/openair3/S1AP/s1ap_eNB_nnsf.h b/openair3/S1AP/s1ap_eNB_nnsf.h index 5a3d44416f..706f3ada6f 100644 --- a/openair3/S1AP/s1ap_eNB_nnsf.h +++ b/openair3/S1AP/s1ap_eNB_nnsf.h @@ -26,6 +26,11 @@ struct s1ap_eNB_mme_data_s * s1ap_eNB_nnsf_select_mme(s1ap_eNB_instance_t *instance_p, rrc_establishment_cause_t cause); +struct s1ap_eNB_mme_data_s * +s1ap_eNB_nnsf_select_mme_by_plmn_id(s1ap_eNB_instance_t *instance_p, + rrc_establishment_cause_t cause, + int selected_plmn_identity); + struct s1ap_eNB_mme_data_s* s1ap_eNB_nnsf_select_mme_by_mme_code(s1ap_eNB_instance_t *instance_p, rrc_establishment_cause_t cause, From b1408fd35e4aa3decbf353cf4c7e136ddf24a8fb Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 4 Jul 2018 14:52:39 +0200 Subject: [PATCH 267/379] Print information about chosen MME by NNSF --- openair3/S1AP/s1ap_eNB_nas_procedures.c | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/openair3/S1AP/s1ap_eNB_nas_procedures.c b/openair3/S1AP/s1ap_eNB_nas_procedures.c index 750bcd02fc..80266a4d9c 100644 --- a/openair3/S1AP/s1ap_eNB_nas_procedures.c +++ b/openair3/S1AP/s1ap_eNB_nas_procedures.c @@ -81,6 +81,16 @@ int s1ap_eNB_handle_nas_first_req( instance_p, s1ap_nas_first_req_p->establishment_cause, s1ap_nas_first_req_p->ue_identity.gummei); + if (mme_desc_p) { + S1AP_INFO("[eNB %d] Chose MME '%s' (assoc_id %d) through GUMMEI MCC %d MNC %d MMEGI %d MMEC %d\n", + instance, + mme_desc_p->mme_name, + mme_desc_p->assoc_id, + s1ap_nas_first_req_p->ue_identity.gummei.mcc, + s1ap_nas_first_req_p->ue_identity.gummei.mnc, + s1ap_nas_first_req_p->ue_identity.gummei.mme_group_id, + s1ap_nas_first_req_p->ue_identity.gummei.mme_code); + } } if (mme_desc_p == NULL) { @@ -91,6 +101,16 @@ int s1ap_eNB_handle_nas_first_req( s1ap_nas_first_req_p->establishment_cause, s1ap_nas_first_req_p->selected_plmn_identity, s1ap_nas_first_req_p->ue_identity.s_tmsi.mme_code); + if (mme_desc_p) { + S1AP_INFO("[eNB %d] Chose MME '%s' (assoc_id %d) through S-TMSI MMEC %d and selected PLMN Identity index %d MCC %d MNC %d\n", + instance, + mme_desc_p->mme_name, + mme_desc_p->assoc_id, + s1ap_nas_first_req_p->ue_identity.s_tmsi.mme_code, + s1ap_nas_first_req_p->selected_plmn_identity, + instance_p->mcc[s1ap_nas_first_req_p->selected_plmn_identity], + instance_p->mnc[s1ap_nas_first_req_p->selected_plmn_identity]); + } } } @@ -101,6 +121,15 @@ int s1ap_eNB_handle_nas_first_req( instance_p, s1ap_nas_first_req_p->establishment_cause, s1ap_nas_first_req_p->selected_plmn_identity); + if (mme_desc_p) { + S1AP_INFO("[eNB %d] Chose MME '%s' (assoc_id %d) through selected PLMN Identity index %d MCC %d MNC %d\n", + instance, + mme_desc_p->mme_name, + mme_desc_p->assoc_id, + s1ap_nas_first_req_p->selected_plmn_identity, + instance_p->mcc[s1ap_nas_first_req_p->selected_plmn_identity], + instance_p->mnc[s1ap_nas_first_req_p->selected_plmn_identity]); + } } if (mme_desc_p == NULL) { @@ -111,6 +140,12 @@ int s1ap_eNB_handle_nas_first_req( mme_desc_p = s1ap_eNB_nnsf_select_mme( instance_p, s1ap_nas_first_req_p->establishment_cause); + if (mme_desc_p) { + S1AP_INFO("[eNB %d] Chose MME '%s' (assoc_id %d) through highest relative capacity\n", + instance, + mme_desc_p->mme_name, + mme_desc_p->assoc_id); + } } if (mme_desc_p == NULL) { From 751a54820bce9fe730512892a973975dc813987e Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 24 Jul 2018 13:15:59 +0200 Subject: [PATCH 268/379] Create new SCTP conn for all MME reg REQs --- openair3/S1AP/s1ap_eNB.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair3/S1AP/s1ap_eNB.c b/openair3/S1AP/s1ap_eNB.c index 91da0f06f7..4a4f947101 100644 --- a/openair3/S1AP/s1ap_eNB.c +++ b/openair3/S1AP/s1ap_eNB.c @@ -128,8 +128,8 @@ static void s1ap_eNB_register_mme(s1ap_eNB_instance_t *instance_p, sizeof(*local_ip_addr)); S1AP_INFO("[eNB %d] check the mme registration state\n",instance_p->instance); - - mme = s1ap_eNB_get_MME_from_instance(instance_p); + + mme = NULL; if ( mme == NULL ) { From f1cc914d4e15e723f2362532a58222f28c83d64b Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 16 Jul 2018 13:28:36 +0200 Subject: [PATCH 269/379] Change configuration to match new format --- .../CONF/enb.band38.tm1.100PRB.usrpx310.conf | 5 ++--- .../GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf | 5 ++--- .../CONF/enb.band7.tm1.100PRB.usrpx310.conf | 6 ++---- .../CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf | 6 ++---- .../CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf | 6 ++---- .../GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf | 6 ++---- .../CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf | 6 ++---- .../CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf | 6 ++---- .../CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf | 7 ++----- .../GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf | 6 ++---- .../GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf | 6 ++---- .../GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf | 6 ++---- 12 files changed, 24 insertions(+), 47 deletions(-) diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.100PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.100PRB.usrpx310.conf index bec9c2c6dd..9411d7e296 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.100PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.100PRB.usrpx310.conf @@ -13,10 +13,9 @@ eNBs = eNB_name = "eNB_Eurecom_LTEBox"; // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = "1"; + tracking_area_code = 1; - mobile_country_code = "208"; - mobile_network_code = "92"; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); ////////// Physical parameters: diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf index 834b6cf044..b5047f1ba9 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.usrpx310.conf @@ -13,10 +13,9 @@ eNBs = eNB_name = "eNB_Eurecom_LTEBox"; // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = "1"; + tracking_area_code = 1; - mobile_country_code = "208"; - mobile_network_code = "92"; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); ////////// Physical parameters: diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf index 6b3614f490..1ca6636cd1 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf @@ -13,11 +13,9 @@ eNBs = eNB_name = "eNB_Eurecom_LTEBox"; // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = "1"; + tracking_area_code = 1; - mobile_country_code = "208"; - - mobile_network_code = "93"; + plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } ); tr_s_preference = "local_mac" diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf index fb184549c5..bfeacfc9d5 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpb210.replay.conf @@ -13,11 +13,9 @@ eNBs = eNB_name = "eNB-Eurecom-LTEBox"; // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = "1"; + tracking_area_code = 1; - mobile_country_code = "208"; - - mobile_network_code = "92"; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); tr_s_preference = "local_mac" diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf index c6ace3b68f..14a7b22a4b 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210-d2d.conf @@ -13,11 +13,9 @@ eNBs = eNB_name = "eNB_Eurecom_LTEBox"; // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = "1"; + tracking_area_code = 1; - mobile_country_code = "208"; - - mobile_network_code = "93"; + plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } ); tr_s_preference = "local_mac" diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf index c2f10e20ae..bc60bc2526 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf @@ -13,11 +13,9 @@ eNBs = eNB_name = "eNB-Eurecom-LTEBox"; // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = "1"; + tracking_area_code = 1; - mobile_country_code = "208"; - - mobile_network_code = "93"; + plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } ); tr_s_preference = "local_mac" diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf index e46467598e..039e9f9748 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210_ue_expansion.conf @@ -13,11 +13,9 @@ eNBs = eNB_name = "eNB_Eurecom_LTEBox"; // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = "1"; + tracking_area_code = 1; - mobile_country_code = "208"; - - mobile_network_code = "93"; + plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } ); tr_s_preference = "local_mac" diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf index a6efe74283..f5050e54de 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf @@ -16,11 +16,9 @@ eNBs = eNB_name = "eNB-Eurecom-LTEBox"; // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = "1"; + tracking_area_code = 1; - mobile_country_code = "208"; - - mobile_network_code = "93"; + plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } ); tr_s_preference = "local_mac" diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf index fefb4b11de..860ea198eb 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi-STUB.conf @@ -13,12 +13,9 @@ eNBs = eNB_name = "eNB_Eurecom_LTEBox"; // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = "1"; + tracking_area_code = 1; - mobile_country_code = "208"; - - #mobile_network_code = "93"; - mobile_network_code = "92"; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); tr_s_preference = "local_mac" diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf index cd21fb935e..ccdee8cb54 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf @@ -13,11 +13,9 @@ eNBs = eNB_name = "eNB-Eurecom-LTEBox"; // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = "1"; + tracking_area_code = 1; - mobile_country_code = "208"; - - mobile_network_code = "93"; + plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } ); tr_s_preference = "local_mac" diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf index 581012d7d3..bc5a82d741 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf @@ -16,11 +16,9 @@ eNBs = eNB_name = "eNB-Eurecom-LTEBox"; // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = "1"; + tracking_area_code = 1; - mobile_country_code = "208"; - - mobile_network_code = "93"; + plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } ); tr_s_preference = "local_mac" diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf index 5f9f8c4d7b..8fb124bced 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf @@ -16,11 +16,9 @@ eNBs = eNB_name = "eNB-Eurecom-LTEBox"; // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = "1"; + tracking_area_code = 1; - mobile_country_code = "208"; - - mobile_network_code = "93"; + plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } ); tr_s_preference = "local_mac" From b485310ef64f36ca0f8b7c50afc2b0b16ae40113 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 28 Sep 2018 11:37:06 +0200 Subject: [PATCH 270/379] Read X2AP PLMN ID from new configuration file structure --- openair2/ENB_APP/enb_config.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 7a68535fce..ad1fb5b0e6 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -2465,6 +2465,12 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) // search if in active list for (j = 0; j < ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt; j++) { if (strcmp(ENBSParams[ENB_ACTIVE_ENBS_IDX].strlistptr[j], *(ENBParamList.paramarray[k][ENB_ENB_NAME_IDX].strptr)) == 0) { + paramdef_t PLMNParams[] = PLMNPARAMS_DESC; + paramlist_def_t PLMNParamList = {ENB_CONFIG_STRING_PLMN_LIST, NULL, 0}; + /* map parameter checking array instances to parameter definition array instances */ + checkedparam_t config_check_PLMNParams [] = PLMNPARAMS_CHECK; + for (int I = 0; I < sizeof(PLMNParams) / sizeof(paramdef_t); ++I) + PLMNParams[I].chkPptr = &(config_check_PLMNParams[I]); paramdef_t X2Params[] = X2PARAMS_DESC; paramlist_def_t X2ParamList = {ENB_CONFIG_STRING_TARGET_ENB_X2_IP_ADDRESS,NULL,0}; @@ -2472,6 +2478,7 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) paramdef_t SCTPParams[] = SCTPPARAMS_DESC; paramdef_t NETParams[] = NETPARAMS_DESC; char aprefix[MAX_OPTNAME_SIZE*2 + 8]; + sprintf(aprefix,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k); /* Some default/random parameters */ @@ -2488,17 +2495,24 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) } X2AP_REGISTER_ENB_REQ (msg_p).eNB_name = strdup(*(ENBParamList.paramarray[k][ENB_ENB_NAME_IDX].strptr)); - X2AP_REGISTER_ENB_REQ (msg_p).tac = (uint16_t)atoi(*(ENBParamList.paramarray[k][ENB_TRACKING_AREA_CODE_IDX].strptr)); - X2AP_REGISTER_ENB_REQ (msg_p).mcc = (uint16_t)atoi(*(ENBParamList.paramarray[k][ENB_MOBILE_COUNTRY_CODE_IDX].strptr)); - X2AP_REGISTER_ENB_REQ (msg_p).mnc = (uint16_t)atoi(*(ENBParamList.paramarray[k][ENB_MOBILE_NETWORK_CODE_IDX].strptr)); - X2AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length = strlen(*(ENBParamList.paramarray[k][ENB_MOBILE_NETWORK_CODE_IDX].strptr)); + X2AP_REGISTER_ENB_REQ (msg_p).tac = *ENBParamList.paramarray[k][ENB_TRACKING_AREA_CODE_IDX].uptr; - AssertFatal((X2AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length == 2) || - (X2AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length == 3), - "BAD MNC DIGIT LENGTH %d", - X2AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length); + config_getlist(&PLMNParamList, PLMNParams, sizeof(PLMNParams)/sizeof(paramdef_t), aprefix); + if (PLMNParamList.numelt < 1 || PLMNParamList.numelt > 6) + AssertFatal(0, "The number of PLMN IDs must be in [1,6], but is %d\n", + PLMNParamList.numelt); + + if (PLMNParamList.numelt > 1) + LOG_W(X2AP, "X2AP currently handles only one PLMN, ignoring the others!\n"); + + X2AP_REGISTER_ENB_REQ (msg_p).mcc = *PLMNParamList.paramarray[0][ENB_MOBILE_COUNTRY_CODE_IDX].uptr; + X2AP_REGISTER_ENB_REQ (msg_p).mnc = *PLMNParamList.paramarray[0][ENB_MOBILE_NETWORK_CODE_IDX].uptr; + X2AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length = *PLMNParamList.paramarray[0][ENB_MNC_DIGIT_LENGTH].u8ptr; + AssertFatal(X2AP_REGISTER_ENB_REQ(msg_p).mnc_digit_length == 3 + || X2AP_REGISTER_ENB_REQ(msg_p).mnc < 100, + "MNC %d cannot be encoded in two digits as requested (change mnc_digit_length to 3)\n", + X2AP_REGISTER_ENB_REQ(msg_p).mnc); - sprintf(aprefix,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k); config_getlist( &X2ParamList,X2Params,sizeof(X2Params)/sizeof(paramdef_t),aprefix); if(X2ParamList.numelt>X2AP_MAX_NB_ENB_IP_ADDRESS){ From b1d1d4c8349accb5cdaa78cea3a5810b422aa488 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 28 Sep 2018 11:37:31 +0200 Subject: [PATCH 271/379] X2AP configuration: Use more idiomatic AssertFatal than if --- openair2/ENB_APP/enb_config.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index ad1fb5b0e6..011d3f7963 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -2515,10 +2515,9 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) config_getlist( &X2ParamList,X2Params,sizeof(X2Params)/sizeof(paramdef_t),aprefix); - if(X2ParamList.numelt>X2AP_MAX_NB_ENB_IP_ADDRESS){ - LOG_E(RRC,"value of X2ParamList.numelt %d must be lower than X2AP_MAX_NB_ENB_IP_ADDRESS %d value: reconsider to increase X2AP_MAX_NB_ENB_IP_ADDRESS\n",X2ParamList.numelt,X2AP_MAX_NB_ENB_IP_ADDRESS); - exit(1); - } + AssertFatal(X2ParamList.numelt <= X2AP_MAX_NB_ENB_IP_ADDRESS, + "value of X2ParamList.numelt %d must be lower than X2AP_MAX_NB_ENB_IP_ADDRESS %d value: reconsider to increase X2AP_MAX_NB_ENB_IP_ADDRESS\n", + X2ParamList.numelt,X2AP_MAX_NB_ENB_IP_ADDRESS); X2AP_REGISTER_ENB_REQ (msg_p).nb_x2 = 0; for (l = 0; l < X2ParamList.numelt; l++) { @@ -2554,10 +2553,8 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) X2AP_REGISTER_ENB_REQ (msg_p).enb_port_for_X2C = (uint32_t)*(NETParams[ENB_PORT_FOR_X2C_IDX].uptr); - if ((NETParams[ENB_IPV4_ADDR_FOR_X2C_IDX].strptr == NULL) || (X2AP_REGISTER_ENB_REQ (msg_p).enb_port_for_X2C == 0)) { - LOG_E(RRC,"Add eNB IPv4 address and/or port for X2C in the CONF file!\n"); - exit(1); - } + AssertFatal(NETParams[ENB_IPV4_ADDR_FOR_X2C_IDX].strptr != NULL && X2AP_REGISTER_ENB_REQ (msg_p).enb_port_for_X2C > 0, + "Add eNB IPv4 address and/or port for X2C in the CONF file!\n"); cidr = *(NETParams[ENB_IPV4_ADDR_FOR_X2C_IDX].strptr); address = strtok(cidr, "/"); From 05262f668498231afb0e689fc615d68286275f97 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 28 Sep 2018 13:50:29 +0200 Subject: [PATCH 272/379] Fix warning of ignored return val of asprintf --- common/config/config_userapi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/common/config/config_userapi.c b/common/config/config_userapi.c index 57b312494a..0ec2e23790 100644 --- a/common/config/config_userapi.c +++ b/common/config/config_userapi.c @@ -225,10 +225,12 @@ int config_getlist(paramlist_def_t *ParamList, paramdef_t *params, int numparams const int ret = config_get_if()->getlist(ParamList, params, numparams, prefix); if (ret >= 0 && params) { char *newprefix; - if (prefix) - asprintf(&newprefix, "%s.%s", prefix, ParamList->listname); - else + if (prefix) { + int rc = asprintf(&newprefix, "%s.%s", prefix, ParamList->listname); + if (rc < 0) newprefix = NULL; + } else { newprefix = ParamList->listname; + } char cfgpath[MAX_OPTNAME_SIZE*2 + 6]; /* prefix.listname.[listindex] */ for (int i = 0; i < ParamList->numelt; ++i) { // TODO config_process_cmdline? From 5c45163dd1e4b2d6bb4d7020dcf0223c1478ba3d Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Fri, 28 Sep 2018 16:29:10 +0200 Subject: [PATCH 273/379] CI: adding retry strategy when connecting to remote server Signed-off-by: Raphael Defosseux --- ci-scripts/main.py | 63 ++++++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index f210fd4518..c0b8b6309f 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -90,38 +90,47 @@ class SSHConnection(): self.htmlUEConnected = 0 def open(self, ipaddress, username, password): - self.ssh = pexpect.spawn('ssh', [username + '@' + ipaddress], timeout = 5) - self.sshresponse = self.ssh.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', 'Last login', pexpect.EOF, pexpect.TIMEOUT]) - if self.sshresponse == 0: - self.ssh.sendline('yes') - self.ssh.expect('password:') - self.ssh.sendline(password) - self.sshresponse = self.ssh.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT]) + count = 0 + connect_status = False + while count < 4: + self.ssh = pexpect.spawn('ssh', [username + '@' + ipaddress], timeout = 5) + self.sshresponse = self.ssh.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', 'Last login', pexpect.EOF, pexpect.TIMEOUT]) if self.sshresponse == 0: - pass + self.ssh.sendline('yes') + self.ssh.expect('password:') + self.ssh.sendline(password) + self.sshresponse = self.ssh.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT]) + if self.sshresponse == 0: + count = 10 + connect_status = True + else: + logging.debug('self.sshresponse = ' + str(self.sshresponse)) + elif self.sshresponse == 1: + self.ssh.sendline(password) + self.sshresponse = self.ssh.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT]) + if self.sshresponse == 0: + count = 10 + connect_status = True + else: + logging.debug('self.sshresponse = ' + str(self.sshresponse)) + elif self.sshresponse == 2: + # Checking if we are really on the remote client defined by its IP address + self.command('stdbuf -o0 ifconfig | egrep --color=never "inet addr:"', '\$', 5) + result = re.search(str(ipaddress), str(self.ssh.before)) + if result is None: + self.close() + else: + count = 10 + connect_status = True else: + # debug output + logging.debug(str(self.ssh.before)) logging.debug('self.sshresponse = ' + str(self.sshresponse)) - sys.exit('SSH Connection Failed') - elif self.sshresponse == 1: - self.ssh.sendline(password) - self.sshresponse = self.ssh.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT]) - if self.sshresponse == 0: - pass - else: - logging.debug('self.sshresponse = ' + str(self.sshresponse)) - sys.exit('SSH Connection Failed') - elif self.sshresponse == 2: - # Checking if we are really on the remote client defined by its IP address - self.command('stdbuf -o0 ifconfig | egrep --color=never "inet addr:"', '\$', 5) - result = re.search(str(ipaddress), str(self.ssh.before)) - if result is None: - sys.exit('SSH Connection Failed: TIMEOUT !!!') + count += 1 + if connect_status: pass else: - # debug output - logging.debug(str(self.ssh.before)) - logging.debug('self.sshresponse = ' + str(self.sshresponse)) - sys.exit('SSH Connection Failed!!!') + sys.exit('SSH Connection Failed') def command(self, commandline, expectedline, timeout): logging.debug(commandline) From 4aa5650cdadcdfadcf894757943122a842f1cd99 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Fri, 28 Sep 2018 16:49:30 +0200 Subject: [PATCH 274/379] CI: little tweak Signed-off-by: Raphael Defosseux --- ci-scripts/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index c0b8b6309f..589f389850 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -126,6 +126,9 @@ class SSHConnection(): # debug output logging.debug(str(self.ssh.before)) logging.debug('self.sshresponse = ' + str(self.sshresponse)) + # adding a tempo when failure + if not connect_status: + time.sleep(1) count += 1 if connect_status: pass From ee048120c4facaece1dede1b2b1778b8b7413524 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 28 Sep 2018 17:40:37 +0200 Subject: [PATCH 275/379] Change remaining config files to plmn_list style --- .../enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf | 6 ++---- .../enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf | 6 ++---- .../enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf | 6 ++---- ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf | 7 ++----- ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf | 7 ++----- ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf | 7 ++----- ci-scripts/conf_files/lte-basic-sim.conf | 7 ++----- .../v2/config/enb.band38.tm1.usrpb210.tdd.10MHz.conf | 7 ++----- .../v2/config/enb.band38.tm1.usrpb210.tdd.20MHz.conf | 7 ++----- .../v2/config/enb.band38.tm1.usrpb210.tdd.5MHz.conf | 7 ++----- .../v2/config/enb.band7.tm1.usrpb210.fdd.10MHz.conf | 7 ++----- .../v2/config/enb.band7.tm1.usrpb210.fdd.20MHz.conf | 7 ++----- .../v2/config/enb.band7.tm1.usrpb210.fdd.5MHz.conf | 7 ++----- .../autotests/v2/config/rcc.band7.tm1.if4p5.10MHz.conf | 7 ++----- .../autotests/v2/config/rcc.band7.tm1.if4p5.20MHz.conf | 7 ++----- .../autotests/v2/config/rcc.band7.tm1.if4p5.5MHz.conf | 7 ++----- .../config/rru.band7.tm1.if4p5.10MHz.udp.usrpb210.conf | 7 ++----- .../config/rru.band7.tm1.if4p5.20MHz.udp.usrpb210.conf | 7 ++----- .../v2/config/rru.band7.tm1.if4p5.5MHz.udp.usrpb210.conf | 7 ++----- .../enb.band7.tm1.usrpb210.epc.local.conf | 7 ++----- .../EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/enb1.conf | 6 ++---- .../CONF/enb.centos.calisson.conf | 9 +++------ .../CONF/enb.centos.memphis.conf | 9 +++------ .../CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.nord.conf | 9 +++------ targets/PROJECTS/E-MBMS/enb.conf | 9 +++------ 25 files changed, 54 insertions(+), 125 deletions(-) diff --git a/ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf index 14230c125f..b6f525e40b 100644 --- a/ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf @@ -13,10 +13,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); ////////// Physical parameters: diff --git a/ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf index 8a66e3131f..5b133f0250 100644 --- a/ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf @@ -13,10 +13,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); ////////// Physical parameters: diff --git a/ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf index ede864b733..63c343764f 100644 --- a/ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf @@ -13,10 +13,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); ////////// Physical parameters: diff --git a/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf index 37656de755..bb61dd75c4 100644 --- a/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf @@ -13,11 +13,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); tr_s_preference = "local_mac" diff --git a/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf index 01c1ca1428..63731eaf37 100644 --- a/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf @@ -13,11 +13,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); tr_s_preference = "local_mac" diff --git a/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf index eb5822cb22..27ac7f0768 100644 --- a/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf @@ -13,11 +13,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); tr_s_preference = "local_mac" diff --git a/ci-scripts/conf_files/lte-basic-sim.conf b/ci-scripts/conf_files/lte-basic-sim.conf index f0fab0bdcb..c0efb9d534 100644 --- a/ci-scripts/conf_files/lte-basic-sim.conf +++ b/ci-scripts/conf_files/lte-basic-sim.conf @@ -13,11 +13,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } ); tr_s_preference = "local_mac" 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 index 08eb76e09d..398b763888 100644 --- 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 @@ -13,11 +13,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); ////////// Physical parameters: 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 index eff42040ad..46b6484737 100644 --- 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 @@ -13,11 +13,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); ////////// Physical parameters: 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 index 8eb66d4643..93b82773e6 100644 --- 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 @@ -13,11 +13,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); ////////// Physical parameters: diff --git a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.10MHz.conf b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.10MHz.conf index dc3b3bc4f0..b412b00e52 100644 --- a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.10MHz.conf +++ b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.10MHz.conf @@ -13,11 +13,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); ////////// Physical parameters: diff --git a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.20MHz.conf b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.20MHz.conf index 6af71831f5..f0d688903a 100644 --- a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.20MHz.conf +++ b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.20MHz.conf @@ -13,11 +13,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); ////////// Physical parameters: diff --git a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.5MHz.conf b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.5MHz.conf index 077b6e4ead..929c91fffb 100644 --- a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.5MHz.conf +++ b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.5MHz.conf @@ -13,11 +13,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); ////////// Physical parameters: 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 index e2f5981418..98358eb269 100644 --- a/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.10MHz.conf +++ b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.10MHz.conf @@ -13,11 +13,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); ////////// Physical parameters: 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 index 9e08414ab3..bc31e051e5 100644 --- a/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.20MHz.conf +++ b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.20MHz.conf @@ -13,11 +13,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); ////////// Physical parameters: 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 index 2a598c31d3..2cfc227e67 100644 --- a/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.5MHz.conf +++ b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.5MHz.conf @@ -13,11 +13,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); ////////// Physical parameters: 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 index 4966108d03..9b135a9498 100644 --- 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 @@ -13,11 +13,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); ////////// Physical parameters: 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 index 4f3b25349a..9f84057299 100644 --- 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 @@ -13,11 +13,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); ////////// Physical parameters: 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 index 54e5a327cd..7197e93322 100644 --- 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 @@ -13,11 +13,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); ////////// Physical parameters: diff --git a/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/enb.band7.tm1.usrpb210.epc.local.conf b/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/enb.band7.tm1.usrpb210.epc.local.conf index 2571db70a0..85cee4dda0 100644 --- a/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/enb.band7.tm1.usrpb210.epc.local.conf +++ b/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/enb.band7.tm1.usrpb210.epc.local.conf @@ -13,11 +13,8 @@ eNBs = 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 = "95"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 95; mnc_length = 2; } ); ////////// Physical parameters: diff --git a/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/enb1.conf b/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/enb1.conf index e71e7e03f5..df06231e4a 100755 --- a/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/enb1.conf +++ b/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/enb1.conf @@ -13,10 +13,8 @@ eNBs = 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 = "95"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 95; mnc_length = 2; } ); ////////// Physical parameters: diff --git a/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.calisson.conf b/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.calisson.conf index 7ec670d568..86131b3e8e 100755 --- a/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.calisson.conf +++ b/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.calisson.conf @@ -15,12 +15,9 @@ eNBs = eNB_name = "eNB_Eurecom_LTEBox"; // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = "15"; - - mobile_country_code = "208"; - - mobile_network_code = "92"; - + tracking_area_code = 15; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); + ////////// Channel parameters: // Default Paging DRX of the eNB as defined in TS 36.304 default_paging_drx = "PAGING_DRX_256"; diff --git a/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.memphis.conf b/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.memphis.conf index e3a0ea3c56..e87a37f9fb 100755 --- a/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.memphis.conf +++ b/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.memphis.conf @@ -15,12 +15,9 @@ eNBs = eNB_name = "eNB_Eurecom_LTEBox"; // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = "15"; - - mobile_country_code = "208"; - - mobile_network_code = "92"; - + tracking_area_code = 15; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); + ////////// Channel parameters: // Default Paging DRX of the eNB as defined in TS 36.304 default_paging_drx = "PAGING_DRX_256"; diff --git a/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.nord.conf b/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.nord.conf index 591257ff71..af4f4236a7 100755 --- a/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.nord.conf +++ b/targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.nord.conf @@ -14,12 +14,9 @@ eNBs = eNB_name = "eNB_Eurecom_LTEBox"; // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = "15"; - - mobile_country_code = "208"; - - mobile_network_code = "92"; - + tracking_area_code = 15; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); + ////////// Channel parameters: // Default Paging DRX of the eNB as defined in TS 36.304 default_paging_drx = "PAGING_DRX_256"; diff --git a/targets/PROJECTS/E-MBMS/enb.conf b/targets/PROJECTS/E-MBMS/enb.conf index 852f7bbf5f..ea256487b0 100755 --- a/targets/PROJECTS/E-MBMS/enb.conf +++ b/targets/PROJECTS/E-MBMS/enb.conf @@ -11,12 +11,9 @@ eNBs = eNB_name = "eNB_Eurecom_0"; // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 1; - - mobile_country_code = 208; - - mobile_network_code = 10; - + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 10; mnc_length = 2; } ); + ////////// Channel parameters: // Default Paging DRX of the eNB as defined in TS 36.304 default_paging_drx = "PAGING_DRX_256"; From d8e9a80f511909d94a9ac0d1d6342a30fbfdfc5e Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Sat, 29 Sep 2018 11:23:40 +0200 Subject: [PATCH 276/379] initialization of 7.5 kHz tables moved to RU initialization so that IF4p5 RRU doesn't crash anymore. --- openair1/PHY/INIT/init_top.c | 2 +- openair1/PHY/INIT/lte_init_ru.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/openair1/PHY/INIT/init_top.c b/openair1/PHY/INIT/init_top.c index 25898d0b8c..1bb36bd2e5 100644 --- a/openair1/PHY/INIT/init_top.c +++ b/openair1/PHY/INIT/init_top.c @@ -76,7 +76,7 @@ void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms) { init_unscrambling_lut(); init_scrambling_lut(); //set_taus_seed(1328); - init_7_5KHz(); +// init_7_5KHz(); init_sss(); } diff --git a/openair1/PHY/INIT/lte_init_ru.c b/openair1/PHY/INIT/lte_init_ru.c index 1ceed40f8b..e8846d7433 100644 --- a/openair1/PHY/INIT/lte_init_ru.c +++ b/openair1/PHY/INIT/lte_init_ru.c @@ -31,6 +31,8 @@ #include "assertions.h" #include +void init_7_5KHz(); + int phy_init_RU(RU_t *ru) { LTE_DL_FRAME_PARMS *fp = &ru->frame_parms; @@ -65,6 +67,7 @@ int phy_init_RU(RU_t *ru) { } if (ru->function != NGFI_RRU_IF5) { // we need to do RX/TX RU processing + init_7_5KHz(); LOG_I(PHY,"nb_tx %d\n",ru->nb_tx); ru->common.rxdata_7_5kHz = (int32_t**)malloc16(ru->nb_rx*sizeof(int32_t*) ); for (i=0;inb_rx;i++) { From 9f5f0ade7e3cb28c324fe4c204bc689074fd138f Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Sun, 30 Sep 2018 09:54:34 -0700 Subject: [PATCH 277/379] removing some dead code --- openair1/SCHED/ru_procedures.c | 4 -- targets/RT/USER/lte-enb.c | 2 - targets/RT/USER/lte-softmodem.c | 116 -------------------------------- 3 files changed, 122 deletions(-) diff --git a/openair1/SCHED/ru_procedures.c b/openair1/SCHED/ru_procedures.c index 6272650f72..d49147cf21 100644 --- a/openair1/SCHED/ru_procedures.c +++ b/openair1/SCHED/ru_procedures.c @@ -50,10 +50,6 @@ #include "targets/RT/USER/rt_wrapper.h" -// RU OFDM Modulator, used in IF4p5 RRU, RCC/RAU with IF5, eNodeB - -extern openair0_config_t openair0_cfg[MAX_CARDS]; - extern int oai_exit; diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 91a3c2e479..441bc6df21 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -111,8 +111,6 @@ extern volatile int start_UE; #endif extern volatile int oai_exit; -extern openair0_config_t openair0_cfg[MAX_CARDS]; - extern int transmission_mode; extern int oaisim_flag; diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 9a93bc4cbc..006f3390d2 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -171,8 +171,6 @@ double rx_gain_off = 0.0; double sample_rate=30.72e6; double bw = 10.0e6; -static int tx_max_power[MAX_NUM_CCs]; /* = {0,0}*/; - char rf_config_file[1024]; int chain_offset=0; @@ -199,7 +197,6 @@ int otg_enabled; //int number_of_cards = 1; -static LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]; uint32_t target_dl_mcs = 28; //maximum allowed mcs uint32_t target_ul_mcs = 20; uint32_t timing_advance = 0; @@ -250,8 +247,6 @@ WORKER_CONF_t get_thread_worker_conf(void) /* struct for ethernet specific parameters given in eNB conf file */ eth_params_t *eth_params; -openair0_config_t openair0_cfg[MAX_CARDS]; - double cpuf; extern char uecap_xer[1024]; @@ -632,112 +627,6 @@ void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) { } - -void init_openair0(void) { - - int card; - int i; - - - for (card=0; cardN_RB_DL == 100) { - if(numerology == 0) - { - if (frame_parms[0]->threequarter_fs) { - openair0_cfg[card].sample_rate=23.04e6; - openair0_cfg[card].samples_per_frame = 230400; - openair0_cfg[card].tx_bw = 10e6; - openair0_cfg[card].rx_bw = 10e6; - } else { - openair0_cfg[card].sample_rate=30.72e6; - openair0_cfg[card].samples_per_frame = 307200; - openair0_cfg[card].tx_bw = 10e6; - openair0_cfg[card].rx_bw = 10e6; - } - }else if(numerology == 1) - { - openair0_cfg[card].sample_rate=61.44e6; - openair0_cfg[card].samples_per_frame = 307200; - openair0_cfg[card].tx_bw = 20e6; - openair0_cfg[card].rx_bw = 20e6; - }else if(numerology == 2) - { - openair0_cfg[card].sample_rate=122.88e6; - openair0_cfg[card].samples_per_frame = 307200; - openair0_cfg[card].tx_bw = 20e6; - openair0_cfg[card].rx_bw = 20e6; - }else - { - printf("Un supported numerology\n"); - } - } else if(frame_parms[0]->N_RB_DL == 50) { - openair0_cfg[card].sample_rate=15.36e6; - openair0_cfg[card].samples_per_frame = 153600; - openair0_cfg[card].tx_bw = 5e6; - openair0_cfg[card].rx_bw = 5e6; - } else if (frame_parms[0]->N_RB_DL == 25) { - openair0_cfg[card].sample_rate=7.68e6; - openair0_cfg[card].samples_per_frame = 76800; - openair0_cfg[card].tx_bw = 2.5e6; - openair0_cfg[card].rx_bw = 2.5e6; - } else if (frame_parms[0]->N_RB_DL == 6) { - openair0_cfg[card].sample_rate=1.92e6; - openair0_cfg[card].samples_per_frame = 19200; - openair0_cfg[card].tx_bw = 1.5e6; - openair0_cfg[card].rx_bw = 1.5e6; - } - - - if (frame_parms[0]->frame_type==TDD) - openair0_cfg[card].duplex_mode = duplex_mode_TDD; - else //FDD - openair0_cfg[card].duplex_mode = duplex_mode_FDD; - - printf("HW: Configuring card %d, nb_antennas_tx/rx %d/%d\n",card, - RC.eNB[0][0]->frame_parms.nb_antennas_tx , - RC.eNB[0][0]->frame_parms.nb_antennas_rx ); - openair0_cfg[card].Mod_id = 0; - - openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL; - - openair0_cfg[card].clock_source = clock_source; - - - openair0_cfg[card].tx_num_channels=min(2,RC.eNB[0][0]->frame_parms.nb_antennas_tx ); - openair0_cfg[card].rx_num_channels=min(2,RC.eNB[0][0]->frame_parms.nb_antennas_rx ); - - for (i=0; i<4; i++) { - - if (irx_total_gain_dB; - - - openair0_cfg[card].configFilename = rf_config_file; - printf("Card %d, channel %d, Setting tx_gain %f, rx_gain %f, tx_freq %f, rx_freq %f\n", - card,i, openair0_cfg[card].tx_gain[i], - openair0_cfg[card].rx_gain[i], - openair0_cfg[card].tx_freq[i], - openair0_cfg[card].rx_freq[i]); - } - } /* for loop on cards */ -} - - void wait_RUs(void) { LOG_I(PHY,"Waiting for RUs to be configured ... RC.ru_mask:%02lx\n", RC.ru_mask); @@ -922,9 +811,6 @@ int main( int argc, char **argv ) mode = normal_txrx; - memset(&openair0_cfg[0],0,sizeof(openair0_config_t)*MAX_CARDS); - - memset(tx_max_power,0,sizeof(int)*MAX_NUM_CCs); set_latency_target(); @@ -1283,8 +1169,6 @@ int main( int argc, char **argv ) pthread_mutex_destroy(&ue_pf_po_mutex); - // *** Handle per CC_id openair0 - for(ru_id=0; ru_idrfdevice.trx_end_func) { From 1942d2674c508034cc090768ada029b65c814c55 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Sun, 30 Sep 2018 11:25:37 -0700 Subject: [PATCH 278/379] adding command line paramter usrp-args and usrp-clksrc to UE --- targets/RT/USER/lte-softmodem.h | 7 ++++++- targets/RT/USER/lte-uesoftmodem.c | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/targets/RT/USER/lte-softmodem.h b/targets/RT/USER/lte-softmodem.h index 2b087e5456..96ab799c3d 100644 --- a/targets/RT/USER/lte-softmodem.h +++ b/targets/RT/USER/lte-softmodem.h @@ -98,6 +98,9 @@ #define CONFIG_HLP_DISABLNBIOT "disable nb-iot, even if defined in config\n" +#define CONFIG_HLP_USRP_ARGS "set the arguments to identify USRP (same syntax as in UHD)\n" +#define CONFIG_HLP_USRP_CLK_SRC "USRP clock source: 'internal' or 'external'\n" + /***************************************************************************************************************************************/ /* command line options definitions, CMDLINE_XXXX_DESC macros are used to initialize paramdef_t arrays which are then used as argument when calling config_get or config_getlist functions */ @@ -147,7 +150,9 @@ {"num-ues", NULL, 0, u8ptr:&(NB_UE_INST), defuintval:1, TYPE_UINT8, 0}, \ {"r" , CONFIG_HLP_PRB, 0, u8ptr:&(frame_parms[0]->N_RB_DL), defintval:25, TYPE_UINT8, 0}, \ {"dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \ -} +{"usrp-args", CONFIG_HLP_USRP_ARGS, 0, strptr:(char **)&usrp_args, defstrval:"type=b200", TYPE_STRING, 0}, \ +{"usrp-clksrc", CONFIG_HLP_USRP_CLK_SRC,0, strptr:(char **)&usrp_clksrc, defstrval:"internal", TYPE_STRING, 0} \ + } #define DEFAULT_DLF 2680000000 diff --git a/targets/RT/USER/lte-uesoftmodem.c b/targets/RT/USER/lte-uesoftmodem.c index c52fe130a1..69556b19f2 100644 --- a/targets/RT/USER/lte-uesoftmodem.c +++ b/targets/RT/USER/lte-uesoftmodem.c @@ -223,6 +223,9 @@ int numerology = 0; char *parallel_config = NULL; char *worker_config = NULL; +char* usrp_args=NULL; +char* usrp_clksrc=NULL; + static THREAD_STRUCT thread_struct; void set_parallel_conf(char *parallel_conf) { @@ -739,6 +742,26 @@ void init_openair0(LTE_DL_FRAME_PARMS *frame_parms,int rxgain) { openair0_cfg[card].tx_freq[i], openair0_cfg[card].rx_freq[i]); } + + if (usrp_args) openair0_cfg[card].sdr_addrs = usrp_args; + if (usrp_clksrc) { + if (strcmp(usrp_clksrc, "internal") == 0) { + openair0_cfg[card].clock_source = internal; + LOG_D(PHY, "USRP clock source set as internal\n"); + } else if (strcmp(usrp_clksrc, "external") == 0) { + openair0_cfg[card].clock_source = external; + LOG_D(PHY, "USRP clock source set as external\n"); + } else if (strcmp(usrp_clksrc, "gpsdo") == 0) { + openair0_cfg[card].clock_source = gpsdo; + LOG_D(PHY, "USRP clock source set as gpsdo\n"); + } else { + openair0_cfg[card].clock_source = internal; + LOG_I(PHY, "USRP clock source unknown ('%s'). defaulting to internal\n", usrp_clksrc); + } + } else { + openair0_cfg[card].clock_source = internal; + LOG_I(PHY, "USRP clock source not specified. defaulting to internal\n"); + } } } From 8cda0a0f7bd793cbd1c5a40086b7c0e6b9668769 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Sun, 30 Sep 2018 23:38:07 +0200 Subject: [PATCH 279/379] 16-bit integer optimization, reduced memcpy after list sorting --- openair1/PHY/CODING/TESTBENCH/polartest.c | 27 +- .../CODING/nrPolar_tools/nr_polar_decoder.c | 656 +++++++++++++----- .../nrPolar_tools/nr_polar_decoding_tools.c | 185 ++++- .../PHY/CODING/nrPolar_tools/nr_polar_defs.h | 33 +- .../nrPolar_tools/nr_polar_matrix_and_array.c | 25 + .../nrPolar_tools/nr_polar_rate_match.c | 21 + 6 files changed, 731 insertions(+), 216 deletions(-) diff --git a/openair1/PHY/CODING/TESTBENCH/polartest.c b/openair1/PHY/CODING/TESTBENCH/polartest.c index e844ed74db..9a10b42edb 100644 --- a/openair1/PHY/CODING/TESTBENCH/polartest.c +++ b/openair1/PHY/CODING/TESTBENCH/polartest.c @@ -18,6 +18,7 @@ int main(int argc, char *argv[]) { time_stats_t polar_decoder_init,polar_rate_matching,decoding,bit_extraction,deinterleaving; time_stats_t path_metric,sorting,update_LLR; opp_enabled=1; + int decoder_int8=0; cpu_freq_GHz = get_cpu_freq_GHz(); reset_meas(&timeEncoder); reset_meas(&timeDecoder); @@ -30,7 +31,7 @@ int main(int argc, char *argv[]) { reset_meas(&path_metric); reset_meas(&update_LLR); - randominit(0); + randominit(1234); //Default simulation values (Aim for iterations = 1000000.) int itr, iterations = 1000, arguments, polarMessageType = 1; //0=DCI, 1=PBCH, 2=UCI double SNRstart = -20.0, SNRstop = 0.0, SNRinc= 0.5; //dB @@ -43,7 +44,7 @@ int main(int argc, char *argv[]) { uint8_t decoderListSize = 8, pathMetricAppr = 0; //0 --> eq. (8a) and (11b), 1 --> eq. (9) and (12) - while ((arguments = getopt (argc, argv, "s:d:f:m:i:l:a:h")) != -1) + while ((arguments = getopt (argc, argv, "s:d:f:m:i:l:a:h:q")) != -1) switch (arguments) { case 's': @@ -75,6 +76,10 @@ int main(int argc, char *argv[]) { pathMetricAppr = (uint8_t) atoi(optarg); break; + case 'q': + decoder_int8=1; + break; + case 'h': printf("./polartest -s SNRstart -d SNRinc -f SNRstop -m [0=DCI|1=PBCH|2=UCI] -i iterations -l decoderListSize -a pathMetricAppr\n"); exit(-1); @@ -131,6 +136,7 @@ int main(int argc, char *argv[]) { double *modulatedInput = malloc (sizeof(double) * coderLength); //channel input double *channelOutput = malloc (sizeof(double) * coderLength); //add noise + int16_t *channelOutput_int8 = malloc (sizeof(int16_t) * coderLength); //add noise uint8_t *estimatedOutput = malloc(sizeof(uint8_t) * testLength); //decoder output t_nrPolar_params nrPolar_params; @@ -159,12 +165,19 @@ int main(int argc, char *argv[]) { modulatedInput[i]=(-1)/sqrt(2); channelOutput[i] = modulatedInput[i] + (gaussdouble(0.0,1.0) * (1/sqrt(2*SNR_lin))); + if (decoder_int8==1) { + if (channelOutput[i] > 1024) channelOutput_int8[i] = 32768; + else if (channelOutput[i] < -1023) channelOutput_int8[i] = -32767; + else channelOutput_int8[i] = (int16_t) (32*channelOutput[i]); + } } start_meas(&timeDecoder); - decoderState = polar_decoder(channelOutput, estimatedOutput, &nrPolar_params, decoderListSize, aPrioriArray, pathMetricAppr,&polar_decoder_init,&polar_rate_matching,&decoding,&bit_extraction,&deinterleaving,&sorting,&path_metric,&update_LLR); - stop_meas(&timeDecoder); + if (decoder_int8==0) decoderState = polar_decoder(channelOutput, estimatedOutput, &nrPolar_params, decoderListSize, aPrioriArray, pathMetricAppr,&polar_decoder_init,&polar_rate_matching,&decoding,&bit_extraction,&deinterleaving,&sorting,&path_metric,&update_LLR); + else + decoderState = polar_decoder_int8(channelOutput_int8, estimatedOutput, &nrPolar_params, decoderListSize, &polar_decoder_init,&polar_rate_matching,&decoding,&bit_extraction,&deinterleaving,&sorting,&path_metric,&update_LLR); + stop_meas(&timeDecoder); //calculate errors if (decoderState==-1) { @@ -207,9 +220,9 @@ int main(int argc, char *argv[]) { printf("decoding decoding %9.3fus\n",decoding.diff/(cpu_freq_GHz*1000.0*decoding.trials)); printf("decoding bit_extraction %9.3fus\n",bit_extraction.diff/(cpu_freq_GHz*1000.0*bit_extraction.trials)); printf("decoding deinterleaving %9.3fus\n",deinterleaving.diff/(cpu_freq_GHz*1000.0*deinterleaving.trials)); - printf("decoding path_metric %9.3fus\n",path_metric.diff/(cpu_freq_GHz*1000.0*deinterleaving.trials)); - printf("decoding sorting %9.3fus\n",sorting.diff/(cpu_freq_GHz*1000.0*deinterleaving.trials)); - printf("decoding updateLLR %9.3fus\n",update_LLR.diff/(cpu_freq_GHz*1000.0*deinterleaving.trials)); + printf("decoding path_metric %9.3fus\n",path_metric.diff/(cpu_freq_GHz*1000.0*decoding.trials)); + printf("decoding sorting %9.3fus\n",sorting.diff/(cpu_freq_GHz*1000.0*decoding.trials)); + printf("decoding updateLLR %9.3fus\n",update_LLR.diff/(cpu_freq_GHz*1000.0*decoding.trials)); blockErrorCumulative = 0; bitErrorCumulative = 0; timeEncoderCumulative = 0; timeDecoderCumulative = 0; } diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c index 9e9029800e..e1b248b27e 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c @@ -48,193 +48,499 @@ int8_t polar_decoder( time_stats_t *update_LLR) { - start_meas(init); - - - uint8_t **bitUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True - uint8_t **llrUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True - decoder_list_t dlist[2*listSize]; - - for ( int i=0;i<2*listSize;i++) { - // dlist[i].bit = nr_alloc_uint8_t_2D_array((polarParams->n+1), polarParams->N); - // dlist[i].llr = nr_alloc_double_2D_array((polarParams->n+1), polarParams->N); - //dlist[i].crcChecksum = malloc(sizeof(uint8_t)*polarParams->crcParityBits); - for (int j=0; j< polarParams->n+1; j++) { - memset((void*)&dlist[i].bit[j][0],0,sizeof(uint8_t)*polarParams->N); - memset((void*)&dlist[i].llr[j][0],0,sizeof(double)*polarParams->N); - } - for (int j=0;jcrcParityBits;j++) dlist[i].crcChecksum[j] = 0; - dlist[i].crcState = 1; - dlist[i].pathMetric = 0; - } - - for (int i=0; iN; i++) { - memset((void *)&llrUpdated[i][0],0,sizeof(uint8_t)*polarParams->n); - memset((void *)&bitUpdated[i][0],0,sizeof(uint8_t)*polarParams->n); - llrUpdated[i][polarParams->n]=1; - bitUpdated[i][0]=((polarParams->information_bit_pattern[i]+1) % 2); - } - + start_meas(init); + + + uint8_t **bitUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True + uint8_t **llrUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True + decoder_list_t dlist[2*listSize]; + + for ( int i=0;i<2*listSize;i++) { + // dlist[i].bit = nr_alloc_uint8_t_2D_array((polarParams->n+1), polarParams->N); + // dlist[i].llr = nr_alloc_double_2D_array((polarParams->n+1), polarParams->N); + //dlist[i].crcChecksum = malloc(sizeof(uint8_t)*polarParams->crcParityBits); + for (int j=0; j< polarParams->n+1; j++) { + memset((void*)&dlist[i].bit[j][0],0,sizeof(uint8_t)*polarParams->N); + memset((void*)&dlist[i].llr[j][0],0,sizeof(double)*polarParams->N); + } + for (int j=0;jcrcParityBits;j++) dlist[i].crcChecksum[j] = 0; + dlist[i].pathMetric = 0; + } + + for (int i=0; iN; i++) { + memset((void *)&llrUpdated[i][0],0,sizeof(uint8_t)*polarParams->n); + memset((void *)&bitUpdated[i][0],0,sizeof(uint8_t)*polarParams->n); + llrUpdated[i][polarParams->n]=1; + bitUpdated[i][0]=((polarParams->information_bit_pattern[i]+1) % 2); + } + + + uint8_t **extended_crc_generator_matrix = malloc(polarParams->K * sizeof(uint8_t *)); //G_P3 + uint8_t **tempECGM = malloc(polarParams->K * sizeof(uint8_t *)); //G_P2 + for (int i = 0; i < polarParams->K; i++){ + extended_crc_generator_matrix[i] = malloc(polarParams->crcParityBits * sizeof(uint8_t)); + tempECGM[i] = malloc(polarParams->crcParityBits * sizeof(uint8_t)); + } + + for (int i=0; ipayloadBits; i++) { + for (int j=0; jcrcParityBits; j++) { + tempECGM[i][j]=polarParams->crc_generator_matrix[i][j]; + } + } + for (int i=polarParams->payloadBits; iK; i++) { + for (int j=0; jcrcParityBits; j++) { + if( (i-polarParams->payloadBits) == j ){ + tempECGM[i][j]=1; + } else { + tempECGM[i][j]=0; + } + } + } + + for (int i=0; iK; i++) { + for (int j=0; jcrcParityBits; j++) { + extended_crc_generator_matrix[i][j]=tempECGM[polarParams->interleaving_pattern[i]][j]; + } + } + + stop_meas(init); + start_meas(polar_rate_matching); + + double d_tilde[polarParams->N];// = malloc(sizeof(double) * polarParams->N); + nr_polar_rate_matching(input, d_tilde, polarParams->rate_matching_pattern, polarParams->K, polarParams->N, polarParams->encoderLength); + memcpy((void*)&dlist[0].llr[polarParams->n][0],(void*)&d_tilde[0],sizeof(double)*polarParams->N); + stop_meas(polar_rate_matching); + + /* + * SCL polar decoder. + */ + start_meas(decoding); + uint32_t nonFrozenBit=0; + uint8_t currentListSize=1; + + decoder_list_t *sorted_dlist[2*listSize]; + decoder_list_t *temp_dlist[2*listSize]; + int listIndex[2*listSize]; + double pathMetric[2*listSize]; + + for (uint8_t i = 0; i < 2*listSize; i++) sorted_dlist[i] = &dlist[i]; + + for (uint16_t currentBit=0; currentBitN; currentBit++){ + printf("***************** BIT %d (currentListSize %d, information_bit_pattern %d)\n", + currentBit,currentListSize,polarParams->information_bit_pattern[currentBit]); + + start_meas(update_LLR); + updateLLR(sorted_dlist, llrUpdated, bitUpdated, currentListSize, currentBit, 0, polarParams->N, (polarParams->n+1), pathMetricAppr); + stop_meas(update_LLR); + + if (polarParams->information_bit_pattern[currentBit]==0) { //Frozen bit. + updatePathMetric(sorted_dlist,currentListSize, 0, currentBit, pathMetricAppr); //approximation=0 --> 11b, approximation=1 --> 12 + } else { //Information or CRC bit. + if ( (polarParams->interleaving_pattern[nonFrozenBit] < polarParams->payloadBits) && (aPrioriPayload[polarParams->interleaving_pattern[nonFrozenBit]] == 0) ) { + //Information bit with known value of "0". + updatePathMetric(sorted_dlist, currentListSize, 0, currentBit, pathMetricAppr); + bitUpdated[currentBit][0]=1; //0=False, 1=True + } else if ( (polarParams->interleaving_pattern[nonFrozenBit] < polarParams->payloadBits) && (aPrioriPayload[polarParams->interleaving_pattern[nonFrozenBit]] == 1) ) { + //Information bit with known value of "1". + printf("Information bit with known value of 1\n"); + updatePathMetric(sorted_dlist, currentListSize, 1, currentBit, pathMetricAppr); + for (uint8_t i=0; ibit[0][currentBit]=1; + bitUpdated[currentBit][0]=1; + updateCrcChecksum(sorted_dlist, extended_crc_generator_matrix, currentListSize, nonFrozenBit, polarParams->crcParityBits); + } else { - uint8_t **extended_crc_generator_matrix = malloc(polarParams->K * sizeof(uint8_t *)); //G_P3 - uint8_t **tempECGM = malloc(polarParams->K * sizeof(uint8_t *)); //G_P2 - for (int i = 0; i < polarParams->K; i++){ - extended_crc_generator_matrix[i] = malloc(polarParams->crcParityBits * sizeof(uint8_t)); - tempECGM[i] = malloc(polarParams->crcParityBits * sizeof(uint8_t)); - } + start_meas(path_metric); + updatePathMetric2(sorted_dlist, currentListSize, currentBit, pathMetricAppr); + stop_meas(path_metric); + + start_meas(sorting); - for (int i=0; ipayloadBits; i++) { - for (int j=0; jcrcParityBits; j++) { - tempECGM[i][j]=polarParams->crc_generator_matrix[i][j]; - } - } - for (int i=polarParams->payloadBits; iK; i++) { - for (int j=0; jcrcParityBits; j++) { - if( (i-polarParams->payloadBits) == j ){ - tempECGM[i][j]=1; - } else { - tempECGM[i][j]=0; - } - } - } - - for (int i=0; iK; i++) { - for (int j=0; jcrcParityBits; j++) { - extended_crc_generator_matrix[i][j]=tempECGM[polarParams->interleaving_pattern[i]][j]; - } - } - - //The index of the last 1-valued bit that appears in each column. - uint16_t last1ind[polarParams->crcParityBits]; - for (int j=0; jcrcParityBits; j++) { - for (int i=0; iK; i++) { - if (extended_crc_generator_matrix[i][j]==1) last1ind[j]=i; - } - } - - stop_meas(init); - start_meas(polar_rate_matching); - - double d_tilde[polarParams->N];// = malloc(sizeof(double) * polarParams->N); - nr_polar_rate_matching(input, d_tilde, polarParams->rate_matching_pattern, polarParams->K, polarParams->N, polarParams->encoderLength); - memcpy((void*)&dlist[0].llr[polarParams->n][0],(void*)&d_tilde[0],sizeof(double)*polarParams->N); - stop_meas(polar_rate_matching); - - /* - * SCL polar decoder. - */ - start_meas(decoding); - uint32_t nonFrozenBit=0; - uint8_t currentListSize=1; - uint8_t copyIndex=0; - - decoder_list_t *sorted_dlist[2*listSize]; - int listIndex[2*listSize]; - double pathMetric[2*listSize]; - - for (uint8_t i = 0; i < 2*listSize; i++) sorted_dlist[i] = &dlist[i]; - - for (uint16_t currentBit=0; currentBitN; currentBit++){ - // printf("***************** BIT %d\n",currentBit); - - start_meas(update_LLR); - updateLLR(sorted_dlist, llrUpdated, bitUpdated, currentListSize, currentBit, 0, polarParams->N, (polarParams->n+1), pathMetricAppr); - stop_meas(update_LLR); - - if (polarParams->information_bit_pattern[currentBit]==0) { //Frozen bit. - updatePathMetric(sorted_dlist,currentListSize, 0, currentBit, pathMetricAppr); //approximation=0 --> 11b, approximation=1 --> 12 - } else { //Information or CRC bit. - if ( (polarParams->interleaving_pattern[nonFrozenBit] < polarParams->payloadBits) && (aPrioriPayload[polarParams->interleaving_pattern[nonFrozenBit]] == 0) ) { - printf("app[%d] %f, payloadBits %d\n",polarParams->interleaving_pattern[nonFrozenBit], - polarParams->payloadBits, - aPrioriPayload[polarParams->interleaving_pattern[nonFrozenBit]]); + for (int i=0;ipathMetric); + } + if (currentListSize <= listSize/2) { + // until listsize is full we need to copy bit and LLR arrays to new entries + // below we only copy the ones we need to keep for sure + + for (int i = 0; i < currentListSize; i++) { + for (int k = 0; k < (polarParams->n+1); k++) { - //Information bit with known value of "0". - updatePathMetric(sorted_dlist, currentListSize, 0, currentBit, pathMetricAppr); - bitUpdated[currentBit][0]=1; //0=False, 1=True - } else if ( (polarParams->interleaving_pattern[nonFrozenBit] < polarParams->payloadBits) && (aPrioriPayload[polarParams->interleaving_pattern[nonFrozenBit]] == 1) ) { - //Information bit with known value of "1". - updatePathMetric(sorted_dlist, currentListSize, 1, currentBit, pathMetricAppr); - for (uint8_t i=0; ibit[0][currentBit]=1; - bitUpdated[currentBit][0]=1; - updateCrcChecksum(sorted_dlist, extended_crc_generator_matrix, currentListSize, nonFrozenBit, polarParams->crcParityBits); - } else { + memcpy((void*)&sorted_dlist[i+currentListSize]->bit[k][0],(void*)&sorted_dlist[i]->bit[k][0],sizeof(uint8_t)*polarParams->N); + memcpy((void*)&sorted_dlist[i+currentListSize]->llr[k][0],(void*)&sorted_dlist[i]->llr[k][0],sizeof(double)*polarParams->N); + } + } + } + + for (int i = 0; i < currentListSize; i++) { + sorted_dlist[i]->bit[0][currentBit]=0; + sorted_dlist[i+currentListSize]->bit[0][currentBit]=1; + } + bitUpdated[currentBit][0]=1; + updateCrcChecksum2(sorted_dlist,extended_crc_generator_matrix, currentListSize, nonFrozenBit, polarParams->crcParityBits); + + currentListSize*=2; + + //Keep only the best "listSize" number of entries. + if (currentListSize > listSize) { + int listIndex2[listSize]; + + for (int i = 0; i < currentListSize; i++) { + listIndex[i]=i; + pathMetric[i] = sorted_dlist[i]->pathMetric; + } + nr_sort_asc_double_1D_array_ind(pathMetric, listIndex, currentListSize); + for (int i=0;in+1); k++) { - memcpy((void*)&sorted_dlist[i+currentListSize]->bit[k][0],(void*)&sorted_dlist[i]->bit[k][0],sizeof(uint8_t)*polarParams->N); - memcpy((void*)&sorted_dlist[i+currentListSize]->llr[k][0],(void*)&sorted_dlist[i]->llr[k][0],sizeof(double)*polarParams->N); - } - } + + // copy the llr/bit arrays that are needed + for (int i = 0; i < listSize; i++) { + printf("listIndex[%d] %d\n",i,listIndex[i]); + if ((listIndex2[i+listSize]bit[0][currentBit]=0; - sorted_dlist[i+currentListSize]->crcState=sorted_dlist[i]->crcState; + for (int k = 0; k < (polarParams->n+1); k++) { + + memcpy((void*)&sorted_dlist[i+listSize]->bit[k][0], + (void*)&sorted_dlist[i]->bit[k][0], + sizeof(uint8_t)*polarParams->N); + memcpy((void*)&sorted_dlist[i+listSize]->llr[k][0], + (void*)&sorted_dlist[i]->llr[k][0], + sizeof(double)*polarParams->N); } - for (int i = currentListSize; i < 2*currentListSize; i++) sorted_dlist[i]->bit[0][currentBit]=1; - bitUpdated[currentBit][0]=1; - updateCrcChecksum2(sorted_dlist,extended_crc_generator_matrix, currentListSize, nonFrozenBit, polarParams->crcParityBits); - currentListSize*=2; + sorted_dlist[i]->bit[0][currentBit]=0; + sorted_dlist[i+listSize]->bit[0][currentBit]=1; + } + else if (listIndex2[i+listSize] listSize) { - for (int i = 0; i < currentListSize; i++) { - listIndex[i]=i; - pathMetric[i] = dlist[i].pathMetric; - } - nr_sort_asc_double_1D_array_ind(pathMetric, listIndex, currentListSize); - currentListSize = listSize; - for (uint8_t i = 0; i < 2*listSize; i++) { - sorted_dlist[i] = &dlist[listIndex[i]]; - } + for (int k = 0; k < (polarParams->n+1); k++) { + memcpy((void*)&sorted_dlist[i+listSize]->bit[k][0], + (void*)&sorted_dlist[i]->bit[k][0], + sizeof(uint8_t)*polarParams->N); + memcpy((void*)&sorted_dlist[i+listSize]->llr[k][0], + (void*)&sorted_dlist[i]->llr[k][0], + sizeof(double)*polarParams->N); } - stop_meas(sorting); + sorted_dlist[i+listSize]->bit[0][currentBit]=1; + + /* + decoder_list_t *tmp = sorted_dlist[i+listSize]; + sorted_dlist[i+listSize] = sorted_dlist[i]; + sorted_dlist[i+listSize]->pathMetric = tmp->pathMetric; + sorted_dlist[i+listSize]->bit[0][currentBit]=1; + memcpy((void*)&sorted_dlist[i+listSize]->crcChecksum[0], + (void*)&tmp->crcChecksum[0], + 24*sizeof(uint8_t));*/ } - nonFrozenBit++; } - - } - - for (uint8_t i = 0; i < fmin(listSize, (pow(2,polarParams->crcCorrectionBits)) ); i++) { - // printf("list index %d :",i); - // for (int j=0;jcrcParityBits;j++) printf("%d",sorted_dlist[i]->crcChecksum[j]); - // printf(" => %d (%f)\n",sorted_dlist[i]->crcState,sorted_dlist[i]->pathMetric); - int crcState = 1; - for (int j=0;jcrcParityBits;j++) if (sorted_dlist[i]->crcChecksum[j]!=0) crcState=0; - if (crcState == 1) { - for (int j = 0; j < polarParams->N; j++) polarParams->nr_polar_u[j]=sorted_dlist[i]->bit[0][j]; - - start_meas(bit_extraction); - //Extract the information bits (û to ĉ) - nr_polar_info_bit_extraction(polarParams->nr_polar_u, polarParams->nr_polar_cPrime, polarParams->information_bit_pattern, polarParams->N); - stop_meas(bit_extraction); - //Deinterleaving (ĉ to b) - start_meas(deinterleaving); - nr_polar_deinterleaver(polarParams->nr_polar_cPrime, polarParams->nr_polar_b, polarParams->interleaving_pattern, polarParams->K); - stop_meas(deinterleaving); - //Remove the CRC (â) - for (int j = 0; j < polarParams->payloadBits; j++) output[j]=polarParams->nr_polar_b[j]; - - break; + + currentListSize = listSize; + + for (int i = 0; i < 2*listSize; i++) { + temp_dlist[i] = sorted_dlist[i]; + } + for (int i = 0; i < 2*listSize; i++) { + // printf("i %d => %d\n",i,listIndex[i]); + sorted_dlist[i] = temp_dlist[listIndex[i]]; } } + stop_meas(sorting); - // free(d_tilde); - /* - for (int i=0;i<2*listSize;i++) { - // printf("correct: Freeing dlist[%d].bit %p\n",i,dlist[i].bit); - nr_free_uint8_t_2D_array(dlist[i].bit, (polarParams->n+1)); - nr_free_double_2D_array(dlist[i].llr, (polarParams->n+1)); - free(dlist[i].crcChecksum); - }*/ - nr_free_uint8_t_2D_array(extended_crc_generator_matrix, polarParams->K); - nr_free_uint8_t_2D_array(tempECGM, polarParams->K); - stop_meas(decoding); - return(0); + } + nonFrozenBit++; + } + + } + + for (uint8_t i = 0; i < fmin(listSize, (pow(2,polarParams->crcCorrectionBits)) ); i++) { + // printf("list index %d :",i); + // for (int j=0;jcrcParityBits;j++) printf("%d",sorted_dlist[i]->crcChecksum[j]); + // printf(" => %d (%f)\n",sorted_dlist[i]->crcState,sorted_dlist[i]->pathMetric); + int crcState = 1; + for (int j=0;jcrcParityBits;j++) if (sorted_dlist[i]->crcChecksum[j]!=0) crcState=0; + if (crcState == 1) { + for (int j = 0; j < polarParams->N; j++) polarParams->nr_polar_u[j]=sorted_dlist[i]->bit[0][j]; + + start_meas(bit_extraction); + //Extract the information bits (û to ĉ) + nr_polar_info_bit_extraction(polarParams->nr_polar_u, polarParams->nr_polar_cPrime, polarParams->information_bit_pattern, polarParams->N); + stop_meas(bit_extraction); + //Deinterleaving (ĉ to b) + start_meas(deinterleaving); + nr_polar_deinterleaver(polarParams->nr_polar_cPrime, polarParams->nr_polar_b, polarParams->interleaving_pattern, polarParams->K); + stop_meas(deinterleaving); + //Remove the CRC (â) + for (int j = 0; j < polarParams->payloadBits; j++) output[j]=polarParams->nr_polar_b[j]; + + break; + } + } + + // free(d_tilde); + /* + for (int i=0;i<2*listSize;i++) { + // printf("correct: Freeing dlist[%d].bit %p\n",i,dlist[i].bit); + nr_free_uint8_t_2D_array(dlist[i].bit, (polarParams->n+1)); + nr_free_double_2D_array(dlist[i].llr, (polarParams->n+1)); + free(dlist[i].crcChecksum); + }*/ + nr_free_uint8_t_2D_array(extended_crc_generator_matrix, polarParams->K); + nr_free_uint8_t_2D_array(tempECGM, polarParams->K); + stop_meas(decoding); + return(0); +} + + +int8_t polar_decoder_int8(int16_t *input, + uint8_t *output, + t_nrPolar_params *polarParams, + uint8_t listSize, + time_stats_t *init, + time_stats_t *polar_rate_matching, + time_stats_t *decoding, + time_stats_t *bit_extraction, + time_stats_t *deinterleaving, + time_stats_t *sorting, + time_stats_t *path_metric, + time_stats_t *update_LLR) +{ + + start_meas(init); + + + uint8_t **bitUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True + uint8_t **llrUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True + decoder_list_int8_t dlist[2*listSize]; + + + for ( int i=0;i<2*listSize;i++) { + // dlist[i].bit = nr_alloc_uint8_t_2D_array((polarParams->n+1), polarParams->N); + // dlist[i].llr = nr_alloc_double_2D_array((polarParams->n+1), polarParams->N); + //dlist[i].crcChecksum = malloc(sizeof(uint8_t)*polarParams->crcParityBits); + for (int j=0; j< polarParams->n+1; j++) { + memset((void*)&dlist[i].bit[j][0],0,sizeof(uint8_t)*polarParams->N); + memset((void*)&dlist[i].llr[j][0],0,sizeof(int16_t)*polarParams->N); + } + for (int j=0;jcrcParityBits;j++) dlist[i].crcChecksum[j] = 0; + dlist[i].pathMetric = 0; + } + + for (int i=0; iN; i++) { + memset((void *)&llrUpdated[i][0],0,sizeof(uint8_t)*polarParams->n); + memset((void *)&bitUpdated[i][0],0,sizeof(uint8_t)*polarParams->n); + llrUpdated[i][polarParams->n]=1; + bitUpdated[i][0]=((polarParams->information_bit_pattern[i]+1) % 2); + } + + + uint8_t **extended_crc_generator_matrix = malloc(polarParams->K * sizeof(uint8_t *)); //G_P3 + uint8_t **tempECGM = malloc(polarParams->K * sizeof(uint8_t *)); //G_P2 + for (int i = 0; i < polarParams->K; i++){ + extended_crc_generator_matrix[i] = malloc(polarParams->crcParityBits * sizeof(uint8_t)); + tempECGM[i] = malloc(polarParams->crcParityBits * sizeof(uint8_t)); + } + + for (int i=0; ipayloadBits; i++) { + for (int j=0; jcrcParityBits; j++) { + tempECGM[i][j]=polarParams->crc_generator_matrix[i][j]; + } + } + for (int i=polarParams->payloadBits; iK; i++) { + for (int j=0; jcrcParityBits; j++) { + if( (i-polarParams->payloadBits) == j ){ + tempECGM[i][j]=1; + } else { + tempECGM[i][j]=0; + } + } + } + + for (int i=0; iK; i++) { + for (int j=0; jcrcParityBits; j++) { + extended_crc_generator_matrix[i][j]=tempECGM[polarParams->interleaving_pattern[i]][j]; + } + } + + stop_meas(init); + start_meas(polar_rate_matching); + + int16_t d_tilde[polarParams->N];// = malloc(sizeof(double) * polarParams->N); + nr_polar_rate_matching_int8(input, d_tilde, polarParams->rate_matching_pattern, polarParams->K, polarParams->N, polarParams->encoderLength); + memcpy((void*)&dlist[0].llr[polarParams->n][0],(void*)&d_tilde[0],sizeof(int16_t)*polarParams->N); + stop_meas(polar_rate_matching); + + /* + * SCL polar decoder. + */ + start_meas(decoding); + uint32_t nonFrozenBit=0; + uint8_t currentListSize=1; + + decoder_list_int8_t *sorted_dlist[2*listSize]; + decoder_list_int8_t *temp_dlist[2*listSize]; + int listIndex[2*listSize]; + int32_t pathMetric[2*listSize]; + + for (uint8_t i = 0; i < 2*listSize; i++) sorted_dlist[i] = &dlist[i]; + + for (uint16_t currentBit=0; currentBitN; currentBit++){ + // printf("***************** BIT %d (currentListSize %d, information_bit_pattern %d)\n", + // currentBit,currentListSize,polarParams->information_bit_pattern[currentBit]); + + start_meas(update_LLR); + updateLLR_int8(sorted_dlist, llrUpdated, bitUpdated, currentListSize, currentBit, 0, polarParams->N, (polarParams->n+1)); + stop_meas(update_LLR); + + if (polarParams->information_bit_pattern[currentBit]==0) { //Frozen bit. + updatePathMetric0_int8(sorted_dlist,currentListSize, currentBit); //approximation=0 --> 11b, approximation=1 --> 12 + } else { //Information or CRC bit. + start_meas(path_metric); + updatePathMetric2_int8(sorted_dlist, currentListSize, currentBit); + stop_meas(path_metric); + + start_meas(sorting); + + // for (int i=0;ipathMetric); + // } + if (currentListSize <= listSize/2) { + // until listsize is full we need to copy bit and LLR arrays to new entries + // below we only copy the ones we need to keep for sure + + for (int i = 0; i < currentListSize; i++) { + for (int k = 0; k < (polarParams->n+1); k++) { + + memcpy((void*)&sorted_dlist[i+currentListSize]->bit[k][0], + (void*)&sorted_dlist[i]->bit[k][0], + sizeof(uint8_t)*polarParams->N); + memcpy((void*)&sorted_dlist[i+currentListSize]->llr[k][0], + (void*)&sorted_dlist[i]->llr[k][0], + sizeof(int16_t)*polarParams->N); + } + } + } + + for (int i = 0; i < currentListSize; i++) { + sorted_dlist[i]->bit[0][currentBit]=0; + sorted_dlist[i+currentListSize]->bit[0][currentBit]=1; + } + bitUpdated[currentBit][0]=1; + updateCrcChecksum2_int8(sorted_dlist,extended_crc_generator_matrix, currentListSize, nonFrozenBit, polarParams->crcParityBits); + + currentListSize*=2; + + //Keep only the best "listSize" number of entries. + if (currentListSize > listSize) { + int listIndex2[listSize]; + + for (int i = 0; i < currentListSize; i++) { + listIndex[i]=i; + pathMetric[i] = sorted_dlist[i]->pathMetric; + } + nr_sort_asc_int16_1D_array_ind(pathMetric, listIndex, currentListSize); + for (int i=0;in+1); k++) { + + memcpy((void*)&sorted_dlist[i+listSize]->bit[k][0], + (void*)&sorted_dlist[i]->bit[k][0], + sizeof(uint8_t)*polarParams->N); + memcpy((void*)&sorted_dlist[i+listSize]->llr[k][0], + (void*)&sorted_dlist[i]->llr[k][0], + sizeof(int16_t)*polarParams->N); + } + sorted_dlist[i]->bit[0][currentBit]=0; + sorted_dlist[i+listSize]->bit[0][currentBit]=1; + } + else if (listIndex2[i+listSize]n+1); k++) { + memcpy((void*)&sorted_dlist[i+listSize]->bit[k][0], + (void*)&sorted_dlist[i]->bit[k][0], + sizeof(uint8_t)*polarParams->N); + memcpy((void*)&sorted_dlist[i+listSize]->llr[k][0], + (void*)&sorted_dlist[i]->llr[k][0], + sizeof(int16_t)*polarParams->N); + } + sorted_dlist[i+listSize]->bit[0][currentBit]=1; + + /* + decoder_list_t *tmp = sorted_dlist[i+listSize]; + sorted_dlist[i+listSize] = sorted_dlist[i]; + sorted_dlist[i+listSize]->pathMetric = tmp->pathMetric; + sorted_dlist[i+listSize]->bit[0][currentBit]=1; + memcpy((void*)&sorted_dlist[i+listSize]->crcChecksum[0], + (void*)&tmp->crcChecksum[0], + 24*sizeof(uint8_t));*/ + + } + } + + currentListSize = listSize; + + for (int i = 0; i < 2*listSize; i++) { + temp_dlist[i] = sorted_dlist[i]; + } + for (int i = 0; i < 2*listSize; i++) { + // printf("i %d => %d\n",i,listIndex[i]); + sorted_dlist[i] = temp_dlist[listIndex[i]]; + } + } + stop_meas(sorting); + + nonFrozenBit++; + } + + } + + + + for (uint8_t i = 0; i < fmin(listSize, (pow(2,polarParams->crcCorrectionBits)) ); i++) { + // printf("list index %d :",i); + // for (int j=0;jcrcParityBits;j++) printf("%d",sorted_dlist[i]->crcChecksum[j]); + // printf(" => %d (%f)\n",sorted_dlist[i]->crcState,sorted_dlist[i]->pathMetric); + int crcState = 1; + for (int j=0;jcrcParityBits;j++) if (sorted_dlist[i]->crcChecksum[j]!=0) crcState=0; + if (crcState == 1) { + for (int j = 0; j < polarParams->N; j++) polarParams->nr_polar_u[j]=sorted_dlist[i]->bit[0][j]; + + start_meas(bit_extraction); + //Extract the information bits (û to ĉ) + nr_polar_info_bit_extraction(polarParams->nr_polar_u, polarParams->nr_polar_cPrime, polarParams->information_bit_pattern, polarParams->N); + stop_meas(bit_extraction); + //Deinterleaving (ĉ to b) + start_meas(deinterleaving); + nr_polar_deinterleaver(polarParams->nr_polar_cPrime, polarParams->nr_polar_b, polarParams->interleaving_pattern, polarParams->K); + stop_meas(deinterleaving); + //Remove the CRC (â) + for (int j = 0; j < polarParams->payloadBits; j++) output[j]=polarParams->nr_polar_b[j]; + + break; + } + } + + // free(d_tilde); + /* + for (int i=0;i<2*listSize;i++) { + // printf("correct: Freeing dlist[%d].bit %p\n",i,dlist[i].bit); + nr_free_uint8_t_2D_array(dlist[i].bit, (polarParams->n+1)); + nr_free_double_2D_array(dlist[i].llr, (polarParams->n+1)); + free(dlist[i].crcChecksum); + }*/ + nr_free_uint8_t_2D_array(extended_crc_generator_matrix, polarParams->K); + nr_free_uint8_t_2D_array(tempECGM, polarParams->K); + stop_meas(decoding); + return(0); } diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c index 2596962d97..6cc67965fb 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c @@ -33,7 +33,7 @@ inline void computeLLR(double llr[1+nmax][Nmax], uint16_t row, uint16_t col, #ifdef SHOWCOMP - printf("computeLLR (%d,%d,%d,%d)\n",row,col,offset,i); + printf("computeLLR (%d,%d,%d)\n",row,col,offset); #endif a = llr[col + 1][row]; b = llr[col+1][row + offset]; @@ -45,6 +45,37 @@ inline void computeLLR(double llr[1+nmax][Nmax], uint16_t row, uint16_t col, } else { //eq. (8a) llr[col][row] = log((exp(a + b) + 1) / (exp(a) + exp(b))); } + // printf("LLR (a %f, b %f): llr[%d][%d] %f\n",32*a,32*b,col,row,32*llr[col][row]); +} + +inline void computeLLR_int8(int16_t llr[1+nmax][Nmax], uint16_t row, uint16_t col, + uint16_t offset) __attribute__((always_inline)); +inline void computeLLR_int8(int16_t llr[1+nmax][Nmax], uint16_t row, uint16_t col, + uint16_t offset) { + + int16_t a; + int16_t b; + int16_t absA,absB; + int16_t maska,maskb; + int16_t minabs; + +#ifdef SHOWCOMP + printf("computeLLR_int8 (%d,%d,%d)\n",row,col,offset); +#endif + a = llr[col + 1][row]; + b = llr[col+1][row + offset]; + // printf("LLR: a %d, b %d\n",a,b); + maska = a>>15; + maskb = b>>15; + absA = (a+maska)^maska; + absB = (b+maskb)^maskb; + // printf("LLR: absA %d, absB %d\n",absA,absB); + minabs = absAllr[col][row] = (pow((-1),dlist[i]->bit[col][row-offset])*dlist[i]->llr[col+1][row-offset]) + dlist[i]->llr[col+1][row]; + // printf("updating dlist[%d]->llr[%d][%d] => %f (%f,%f) offset %d\n",i,col,row,32*dlist[i]->llr[col][row], + // (pow((-1),dlist[i]->bit[col][row-offset])*32*dlist[i]->llr[col+1][row-offset]),32*dlist[i]->llr[col+1][row],offset); } } else { if (llrU[row][col+1]==0) updateLLR(dlist, llrU, bitU, listSize, row, (col+1), xlen, ylen, approximation); if (llrU[row+offset][col+1]==0) updateLLR(dlist, llrU, bitU, listSize, (row+offset), (col+1), xlen, ylen, approximation); for (int i=0;illr, row, col, offset, approximation); - + } + + llrU[row][col]=1; +} + +void updateLLR_int8(decoder_list_int8_t **dlist,uint8_t **llrU, uint8_t **bitU, + uint8_t listSize, uint16_t row, uint16_t col, uint16_t xlen, uint8_t ylen) { + uint16_t offset = (xlen/(1<<(ylen-col-1))); + if (( (row) % (2*offset) ) >= offset ) { + if (bitU[row-offset][col]==0) updateBit_int8(dlist, bitU, listSize, (row-offset), col, xlen, ylen); + if (llrU[row-offset][col+1]==0) updateLLR_int8(dlist, llrU, bitU, listSize, (row-offset), (col+1), xlen, ylen); + if (llrU[row][col+1]==0) updateLLR_int8(dlist, llrU, bitU, listSize, row, (col+1), xlen, ylen); + for (uint8_t i=0; ibit[col][row-offset]==0) + dlist[i]->llr[col][row] = dlist[i]->llr[col+1][row-offset] + dlist[i]->llr[col+1][row]; + else + dlist[i]->llr[col][row] = -dlist[i]->llr[col+1][row-offset] + dlist[i]->llr[col+1][row]; + // printf("updating dlist[%d]->llr[%d][%d] => %d (%d,%d) offset %d\n",i,col,row,dlist[i]->llr[col][row], + // (dlist[i]->bit[col][row-offset]==0 ? 1 : -1)*dlist[i]->llr[col+1][row-offset],dlist[i]->llr[col+1][row], offset); + } + } else { + if (llrU[row][col+1]==0) updateLLR_int8(dlist, llrU, bitU, listSize, row, (col+1), xlen, ylen); + if (llrU[row+offset][col+1]==0) updateLLR_int8(dlist, llrU, bitU, listSize, (row+offset), (col+1), xlen, ylen); + for (int i=0;illr, row, col, offset); } llrU[row][col]=1; @@ -90,6 +148,34 @@ void updateBit(decoder_list_t **dlist, uint8_t **bitU, uint8_t listSize, uint16_ if (bitU[row][col-1]==0) updateBit(dlist, bitU, listSize, row, (col-1), xlen, ylen); if (bitU[row+offset][col-1]==0) updateBit(dlist, bitU, listSize, (row+offset), (col-1), xlen, ylen); dlist[i]->bit[col][row] = ( (dlist[i]->bit[col-1][row]+dlist[i]->bit[col-1][row+offset]) % 2); + // printf("updating dlist[%d]->bit[%d][%d] => %d\n",i,col,row,dlist[i]->bit[col][row]); +#ifdef SHOWCOMP + printf("updating bit (%d,%d,%d) from (%d,%d,%d)+(%d,%d,%d)\n", + row,col,i,row,col-1,i,row+offset,col-1,i); +#endif + } + } + + bitU[row][col]=1; +} + +void updateBit_int8(decoder_list_int8_t **dlist, uint8_t **bitU, uint8_t listSize, uint16_t row, + uint16_t col, uint16_t xlen, uint8_t ylen) { + uint16_t offset = ( xlen/(pow(2,(ylen-col))) ); + + for (uint8_t i=0; i= offset ) { + if (bitU[row][col-1]==0) updateBit_int8(dlist, bitU, listSize, row, (col-1), xlen, ylen); + dlist[i]->bit[col][row] = dlist[i]->bit[col-1][row]; +#ifdef SHOWCOMP + printf("updating bit (%d,%d,%d) from (%d,%d,%d)\n", + row,col,i,row,col-1,i); +#endif + } else { + if (bitU[row][col-1]==0) updateBit_int8(dlist, bitU, listSize, row, (col-1), xlen, ylen); + if (bitU[row+offset][col-1]==0) updateBit_int8(dlist, bitU, listSize, (row+offset), (col-1), xlen, ylen); + dlist[i]->bit[col][row] = dlist[i]->bit[col-1][row]^dlist[i]->bit[col-1][row+offset]; + // printf("updating dlist[%d]->bit[%d][%d] => %d\n",i,col,row,dlist[i]->bit[col][row]); #ifdef SHOWCOMP printf("updating bit (%d,%d,%d) from (%d,%d,%d)+(%d,%d,%d)\n", row,col,i,row,col-1,i,row+offset,col-1,i); @@ -111,44 +197,42 @@ void updatePathMetric(decoder_list_t **dlist,uint8_t listSize, uint8_t bitValue, if (approximation) { //eq. (12) for (uint8_t i=0; illr[0][row]) )) dlist[i]->pathMetric += fabs(dlist[i]->llr[0][row]); + // printf("updatepathmetric : llr %f pathMetric %f (bitValue %d)\n",32*dlist[i]->llr[0][row],32*dlist[i]->pathMetric,bitValue); } } else { //eq. (11b) - int8_t multiplier = (2*bitValue) - 1; - for (uint8_t i=0; ipathMetric += log ( 1 + exp(multiplier*dlist[i]->llr[0][row]) ) ; + int8_t multiplier = (2*bitValue) - 1; + for (uint8_t i=0; ipathMetric += log ( 1 + exp(multiplier*dlist[i]->llr[0][row]) ) ; + // printf("updatepathmetric : llr %f pathMetric %f\n",32*dlist[i]->llr[0][row],32*dlist[i]->pathMetric); + } } } -/* -void updatePathMetric2(double *pathMetric, double ***llr, uint8_t listSize, uint16_t row, uint8_t appr) { - double *tempPM = malloc(sizeof(double) * listSize); - for (int i=0; i < listSize; i++) tempPM[i]=pathMetric[i]; +void updatePathMetric0_int8(decoder_list_int8_t **dlist,uint8_t listSize, uint16_t row) { - uint8_t bitValue = 0; - if (appr) { //eq. (12) - for (uint8_t i = 0; i < listSize; i++) { - if ((2 * bitValue) != (1 - copysign(1.0, llr[row][0][i]))) pathMetric[i] += fabs(llr[row][0][i]); - } - } else { //eq. (11b) - int8_t multiplier = (2 * bitValue) - 1; - for (uint8_t i = 0; i < listSize; i++) pathMetric[i] += log(1 + exp(multiplier * llr[row][0][i])); - } +#ifdef SHOWCOMP + printf("updating path_metric from Frozen bit (%d,%d) \n", + row,0); +#endif + int16_t mask; + for (uint8_t i=0; illr[0][row]) )) dlist[i]->pathMetric += fabs(dlist[i]->llr[0][row]); + // equiv: if ((llr>0 && bitValue==1) || (llr<0 && bitValue==0) ... + // equiv: (llr>>7 + bitValue) != 0, in opposite case (llr>8 + bitValue) = -1 or 1 + - bitValue = 1; - if (appr) { //eq. (12) - for (uint8_t i = listSize; i < 2*listSize; i++) { - if ((2 * bitValue) != (1 - copysign(1.0, llr[row][0][(i-listSize)]))) pathMetric[i] = tempPM[(i-listSize)] + fabs(llr[row][0][(i-listSize)]); - } - } else { //eq. (11b) - int8_t multiplier = (2 * bitValue) - 1; - for (uint8_t i = listSize; i < 2*listSize; i++) pathMetric[i] = tempPM[(i-listSize)] + log(1 + exp(multiplier * llr[row][0][(i-listSize)])); - } - - free(tempPM); + mask = dlist[i]->llr[0][row]>>15; + + if (mask != 0) { + int16_t absllr = (dlist[i]->llr[0][row]+mask)^mask; + dlist[i]->pathMetric += absllr; + } + // printf("updatepathmetric : llr %d, pathMetric %d (bitValue %d)\n",dlist[i]->llr[0][row],dlist[i]->pathMetric); + } } -*/ void updatePathMetric2(decoder_list_t **dlist, uint8_t listSize, uint16_t row, uint8_t appr) { @@ -174,10 +258,29 @@ void updatePathMetric2(decoder_list_t **dlist, uint8_t listSize, uint16_t row, u dlist[i]->pathMetric += log(1 + exp(-dlist[i]->llr[0][row])); // bitValue=1 dlist2[i]->pathMetric += log(1 + exp(dlist[i]->llr[0][row])); + } } } +void updatePathMetric2_int8(decoder_list_int8_t **dlist, uint8_t listSize, uint16_t row) { + + int i; + + for (i=0;ipathMetric = dlist[i]->pathMetric; + decoder_list_int8_t **dlist2 = &dlist[listSize]; + +#ifdef SHOWCOMP + printf("updating path_metric from information bit (%d,%d) \n", + row,0); +#endif + for (i = 0; i < listSize; i++) { + // bitValue=0 + if (dlist[i]->llr[0][row]<0) dlist[i]->pathMetric -= dlist[i]->llr[0][row]; + // bitValue=1 + else dlist2[i]->pathMetric += dlist[i]->llr[0][row]; + } +} void updateCrcChecksum(decoder_list_t **dlist, uint8_t **crcGen, @@ -197,3 +300,21 @@ void updateCrcChecksum2(decoder_list_t **dlist, uint8_t **crcGen, } } } + +void updateCrcChecksum_int8(decoder_list_int8_t **dlist, uint8_t **crcGen, + uint8_t listSize, uint32_t i2, uint8_t len) { + for (uint8_t i = 0; i < listSize; i++) { + for (uint8_t j = 0; j < len; j++) { + dlist[i]->crcChecksum[j] = ( (dlist[i]->crcChecksum[j] + crcGen[i2][j]) % 2 ); + } + } +} + +void updateCrcChecksum2_int8(decoder_list_int8_t **dlist, uint8_t **crcGen, + uint8_t listSize, uint32_t i2, uint8_t len) { + for (uint8_t i = 0; i < listSize; i++) { + for (uint8_t j = 0; j < len; j++) { + dlist[i+listSize]->crcChecksum[j] = ( (dlist[i]->crcChecksum[j] + crcGen[i2][j]) % 2 ); + } + } +} diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h index c35856a0ce..43142864cb 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h @@ -104,6 +104,9 @@ void nr_polar_rate_matching_pattern(uint16_t *rmp, uint16_t *J, const uint8_t *P void nr_polar_rate_matching(double *input, double *output, uint16_t *rmp, uint16_t K, uint16_t N, uint16_t E); +void nr_polar_rate_matching_int8(int16_t *input, int16_t *output, uint16_t *rmp, + uint16_t K, uint16_t N, uint16_t E); + void nr_polar_interleaving_pattern(uint16_t K, uint8_t I_IL, uint16_t *PI_k_); void nr_polar_info_bit_pattern(uint8_t *ibp, int16_t *Q_I_N, int16_t *Q_F_N, @@ -138,31 +141,57 @@ typedef struct decoder_list_s { uint8_t bit[1+nmax][Nmax]; double llr[1+nmax][Nmax]; uint8_t crcChecksum[24]; - uint8_t crcState; double pathMetric; } decoder_list_t; +typedef struct decoder_list_int8_s { + + uint8_t bit[1+nmax][Nmax]; + int16_t llr[1+nmax][Nmax]; + uint8_t crcChecksum[24]; + int32_t pathMetric; + +} decoder_list_int8_t; + void updateLLR(decoder_list_t **dlist,uint8_t **llrU, uint8_t **bitU, uint8_t listSize, uint16_t row, uint16_t col, uint16_t xlen, uint8_t ylen, uint8_t approximation); +void updateLLR_int8(decoder_list_int8_t **dlist,uint8_t **llrU, uint8_t **bitU, + uint8_t listSize, uint16_t row, uint16_t col, uint16_t xlen, uint8_t ylen); + void updateBit(decoder_list_t **dlist, uint8_t **bitU, uint8_t listSize, uint16_t row, uint16_t col, uint16_t xlen, uint8_t ylen); +void updateBit_int8(decoder_list_int8_t **dlist, uint8_t **bitU, uint8_t listSize, uint16_t row, + uint16_t col, uint16_t xlen, uint8_t ylen); + void updatePathMetric(decoder_list_t **dlist,uint8_t listSize, uint8_t bitValue, - uint16_t row, uint8_t approximation); + uint16_t row, uint8_t approximation); + +void updatePathMetric0_int8(decoder_list_int8_t **dlist,uint8_t listSize, uint16_t row); void updatePathMetric2(decoder_list_t **dlist, uint8_t listSize, uint16_t row, uint8_t appr); +void updatePathMetric2_int8(decoder_list_int8_t **dlist, uint8_t listSize, uint16_t row); + void updateCrcChecksum(decoder_list_t **dlist, uint8_t **crcGen, uint8_t listSize, uint32_t i2, uint8_t len); +void updateCrcChecksum_int8(decoder_list_int8_t **dlist, uint8_t **crcGen, + uint8_t listSize, uint32_t i2, uint8_t len); + void updateCrcChecksum2(decoder_list_t **dlist, uint8_t **crcGen, uint8_t listSize, uint32_t i2, uint8_t len); +void updateCrcChecksum2_int8(decoder_list_int8_t **dlist, uint8_t **crcGen, + uint8_t listSize, uint32_t i2, uint8_t len); + void nr_sort_asc_double_1D_array_ind(double *matrix, int *ind, int len); +void nr_sort_asc_int16_1D_array_ind(int32_t *matrix, int *ind, int len); + uint8_t **crc24c_generator_matrix(uint16_t payloadSizeBits); uint8_t **crc11_generator_matrix(uint16_t payloadSizeBits); uint8_t **crc6_generator_matrix(uint16_t payloadSizeBits); diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_matrix_and_array.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_matrix_and_array.c index 87da27a59f..23ec51a400 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_matrix_and_array.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_matrix_and_array.c @@ -168,3 +168,28 @@ void nr_sort_asc_double_1D_array_ind(double *matrix, int *ind, int len) { break; } } + +void nr_sort_asc_int16_1D_array_ind(int32_t *matrix, int *ind, int len) { + int swaps; + int16_t temp; + int tempInd; + + for (int i = 0; i < len; i++) { + swaps = 0; + for (int j = 0; j < (len - i) - 1; j++) { + if (matrix[j] > matrix[j + 1]) { + temp = matrix[j]; + matrix[j] = matrix[j + 1]; + matrix[j + 1] = temp; + + tempInd = ind[j]; + ind[j] = ind[j + 1]; + ind[j + 1] = tempInd; + + swaps++; + } + } + if (swaps == 0) + break; + } +} diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_rate_match.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_rate_match.c index 90f16183c8..d237603059 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_rate_match.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_rate_match.c @@ -79,3 +79,24 @@ void nr_polar_rate_matching(double *input, double *output, uint16_t *rmp, uint16 } } + +void nr_polar_rate_matching_int8(int16_t *input, int16_t *output, uint16_t *rmp, uint16_t K, uint16_t N, uint16_t E){ + + if (E>=N) { //repetition + for (int i=0; i<=N-1; i++) output[i]=0; + for (int i=0; i<=E-1; i++){ + output[rmp[i]]+=input[i]; + } + } else { + if ( (K/(double)E) <= (7.0/16) ) { //puncturing + for (int i=0; i<=N-1; i++) output[i]=0; + } else { //shortening + for (int i=0; i<=N-1; i++) output[i]=INFINITY; + } + + for (int i=0; i<=E-1; i++){ + output[rmp[i]]=input[i]; + } + } + +} From 59c4ddef2454b801859349248ec2dfa00eaa0ed4 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Mon, 1 Oct 2018 02:30:29 +0200 Subject: [PATCH 280/379] completed most of code generation tool for polar decoder integrated into "polartest" --- .../CODING/nrPolar_tools/nr_polar_decoder.c | 203 ++++++++++-------- .../nrPolar_tools/nr_polar_decoding_tools.c | 159 +++++++------- .../PHY/CODING/nrPolar_tools/nr_polar_defs.h | 4 +- 3 files changed, 188 insertions(+), 178 deletions(-) diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c index e1b248b27e..24d3a8d404 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c @@ -30,7 +30,6 @@ #include "PHY/TOOLS/time_meas.h" - int8_t polar_decoder( double *input, uint8_t *output, @@ -294,6 +293,92 @@ int8_t polar_decoder( } +#define decoder_int8_A(sorted_dlist,currentListSize,polarParams) {for (int i = 0; i < currentListSize; i++) { \ + for (int k = 0; k < (polarParams->n+1); k++) { \ + memcpy((void*)&sorted_dlist[i+currentListSize]->bit[k][0],\ + (void*)&sorted_dlist[i]->bit[k][0],\ + sizeof(uint8_t)*polarParams->N);\ + memcpy((void*)&sorted_dlist[i+currentListSize]->llr[k][0],\ + (void*)&sorted_dlist[i]->llr[k][0],\ + sizeof(int16_t)*polarParams->N);}}} + +#define decoder_int8_B(sorted_dlist,currentListSize) {for (int i = 0; i < currentListSize; i++) {sorted_dlist[i]->bit[0][currentBit]=0;sorted_dlist[i+currentListSize]->bit[0][currentBit]=1;}} + +void inline decoder_int8_C(decoder_list_int8_t *sorted_dlist[], + t_nrPolar_params *polarParams, + int currentBit, + int currentListSize, + int listSize) { + + int32_t pathMetric[2*listSize]; + decoder_list_int8_t *temp_dlist[2*listSize]; + + int listIndex[2*listSize]; + int listIndex2[2*listSize]; + + for (int i = 0; i < currentListSize; i++) { + listIndex[i]=i; + pathMetric[i] = sorted_dlist[i]->pathMetric; + } + nr_sort_asc_int16_1D_array_ind(pathMetric, listIndex, currentListSize); + for (int i=0;in+1); k++) { + + memcpy((void*)&sorted_dlist[i+listSize]->bit[k][0], + (void*)&sorted_dlist[i]->bit[k][0], + sizeof(uint8_t)*polarParams->N); + memcpy((void*)&sorted_dlist[i+listSize]->llr[k][0], + (void*)&sorted_dlist[i]->llr[k][0], + sizeof(int16_t)*polarParams->N); + } + sorted_dlist[i]->bit[0][currentBit]=0; + sorted_dlist[i+listSize]->bit[0][currentBit]=1; + } + else if (listIndex2[i+listSize]n+1); k++) { + memcpy((void*)&sorted_dlist[i+listSize]->bit[k][0], + (void*)&sorted_dlist[i]->bit[k][0], + sizeof(uint8_t)*polarParams->N); + memcpy((void*)&sorted_dlist[i+listSize]->llr[k][0], + (void*)&sorted_dlist[i]->llr[k][0], + sizeof(int16_t)*polarParams->N); + } + sorted_dlist[i+listSize]->bit[0][currentBit]=1; + + /* + decoder_list_t *tmp = sorted_dlist[i+listSize]; + sorted_dlist[i+listSize] = sorted_dlist[i]; + sorted_dlist[i+listSize]->pathMetric = tmp->pathMetric; + sorted_dlist[i+listSize]->bit[0][currentBit]=1; + memcpy((void*)&sorted_dlist[i+listSize]->crcChecksum[0], + (void*)&tmp->crcChecksum[0], + 24*sizeof(uint8_t));*/ + + } + } + + + + for (int i = 0; i < 2*listSize; i++) { + temp_dlist[i] = sorted_dlist[i]; + } + for (int i = 0; i < 2*listSize; i++) { + // printf("i %d => %d\n",i,listIndex[i]); + sorted_dlist[i] = temp_dlist[listIndex[i]]; + } +} + int8_t polar_decoder_int8(int16_t *input, uint8_t *output, t_nrPolar_params *polarParams, @@ -380,12 +465,9 @@ int8_t polar_decoder_int8(int16_t *input, uint8_t currentListSize=1; decoder_list_int8_t *sorted_dlist[2*listSize]; - decoder_list_int8_t *temp_dlist[2*listSize]; - int listIndex[2*listSize]; - int32_t pathMetric[2*listSize]; - + for (uint8_t i = 0; i < 2*listSize; i++) sorted_dlist[i] = &dlist[i]; - + for (uint16_t currentBit=0; currentBitN; currentBit++){ // printf("***************** BIT %d (currentListSize %d, information_bit_pattern %d)\n", // currentBit,currentListSize,polarParams->information_bit_pattern[currentBit]); @@ -402,110 +484,45 @@ int8_t polar_decoder_int8(int16_t *input, stop_meas(path_metric); start_meas(sorting); - - // for (int i=0;ipathMetric); - // } + if (currentListSize <= listSize/2) { // until listsize is full we need to copy bit and LLR arrays to new entries // below we only copy the ones we need to keep for sure + decoder_int8_A(sorted_dlist,currentListSize,polarParams); +#ifdef SHOWCOMP + printf("decoder_int8_A(sorted_dlist,%d,polarParams);\n",currentListSize); +#endif + } + decoder_int8_B(sorted_dlist,currentListSize); +#ifdef SHOWCOMP + printf("decoder_int8_B(sorted_dlist,%d);\n",currentListSize); +#endif - for (int i = 0; i < currentListSize; i++) { - for (int k = 0; k < (polarParams->n+1); k++) { - - memcpy((void*)&sorted_dlist[i+currentListSize]->bit[k][0], - (void*)&sorted_dlist[i]->bit[k][0], - sizeof(uint8_t)*polarParams->N); - memcpy((void*)&sorted_dlist[i+currentListSize]->llr[k][0], - (void*)&sorted_dlist[i]->llr[k][0], - sizeof(int16_t)*polarParams->N); - } - } - } - - for (int i = 0; i < currentListSize; i++) { - sorted_dlist[i]->bit[0][currentBit]=0; - sorted_dlist[i+currentListSize]->bit[0][currentBit]=1; - } bitUpdated[currentBit][0]=1; + updateCrcChecksum2_int8(sorted_dlist,extended_crc_generator_matrix, currentListSize, nonFrozenBit, polarParams->crcParityBits); currentListSize*=2; //Keep only the best "listSize" number of entries. if (currentListSize > listSize) { - int listIndex2[listSize]; - - for (int i = 0; i < currentListSize; i++) { - listIndex[i]=i; - pathMetric[i] = sorted_dlist[i]->pathMetric; - } - nr_sort_asc_int16_1D_array_ind(pathMetric, listIndex, currentListSize); - for (int i=0;in+1); k++) { - - memcpy((void*)&sorted_dlist[i+listSize]->bit[k][0], - (void*)&sorted_dlist[i]->bit[k][0], - sizeof(uint8_t)*polarParams->N); - memcpy((void*)&sorted_dlist[i+listSize]->llr[k][0], - (void*)&sorted_dlist[i]->llr[k][0], - sizeof(int16_t)*polarParams->N); - } - sorted_dlist[i]->bit[0][currentBit]=0; - sorted_dlist[i+listSize]->bit[0][currentBit]=1; - } - else if (listIndex2[i+listSize]n+1); k++) { - memcpy((void*)&sorted_dlist[i+listSize]->bit[k][0], - (void*)&sorted_dlist[i]->bit[k][0], - sizeof(uint8_t)*polarParams->N); - memcpy((void*)&sorted_dlist[i+listSize]->llr[k][0], - (void*)&sorted_dlist[i]->llr[k][0], - sizeof(int16_t)*polarParams->N); - } - sorted_dlist[i+listSize]->bit[0][currentBit]=1; - - /* - decoder_list_t *tmp = sorted_dlist[i+listSize]; - sorted_dlist[i+listSize] = sorted_dlist[i]; - sorted_dlist[i+listSize]->pathMetric = tmp->pathMetric; - sorted_dlist[i+listSize]->bit[0][currentBit]=1; - memcpy((void*)&sorted_dlist[i+listSize]->crcChecksum[0], - (void*)&tmp->crcChecksum[0], - 24*sizeof(uint8_t));*/ - - } - } - + + decoder_int8_C(sorted_dlist, + polarParams, + currentBit, + currentListSize, + listSize); currentListSize = listSize; - - for (int i = 0; i < 2*listSize; i++) { - temp_dlist[i] = sorted_dlist[i]; - } - for (int i = 0; i < 2*listSize; i++) { - // printf("i %d => %d\n",i,listIndex[i]); - sorted_dlist[i] = temp_dlist[listIndex[i]]; - } } + stop_meas(sorting); - + nonFrozenBit++; + } + } - - } - + for (uint8_t i = 0; i < fmin(listSize, (pow(2,polarParams->crcCorrectionBits)) ); i++) { // printf("list index %d :",i); diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c index 6cc67965fb..206dfb955f 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c @@ -32,9 +32,6 @@ inline void computeLLR(double llr[1+nmax][Nmax], uint16_t row, uint16_t col, double absA,absB; -#ifdef SHOWCOMP - printf("computeLLR (%d,%d,%d)\n",row,col,offset); -#endif a = llr[col + 1][row]; b = llr[col+1][row + offset]; @@ -60,7 +57,7 @@ inline void computeLLR_int8(int16_t llr[1+nmax][Nmax], uint16_t row, uint16_t co int16_t minabs; #ifdef SHOWCOMP - printf("computeLLR_int8 (%d,%d,%d)\n",row,col,offset); + printf("computeLLR_int8(llr,%d,%d,%d);\n",row,col,offset); #endif a = llr[col + 1][row]; b = llr[col+1][row + offset]; @@ -87,13 +84,7 @@ void updateLLR(decoder_list_t **dlist,uint8_t **llrU, uint8_t **bitU, if (llrU[row-offset][col+1]==0) updateLLR(dlist, llrU, bitU, listSize, (row-offset), (col+1), xlen, ylen, approximation); if (llrU[row][col+1]==0) updateLLR(dlist, llrU, bitU, listSize, row, (col+1), xlen, ylen, approximation); for (uint8_t i=0; illr[col][row] = (pow((-1),dlist[i]->bit[col][row-offset])*dlist[i]->llr[col+1][row-offset]) + dlist[i]->llr[col+1][row]; - // printf("updating dlist[%d]->llr[%d][%d] => %f (%f,%f) offset %d\n",i,col,row,32*dlist[i]->llr[col][row], - // (pow((-1),dlist[i]->bit[col][row-offset])*32*dlist[i]->llr[col+1][row-offset]),32*dlist[i]->llr[col+1][row],offset); } } else { if (llrU[row][col+1]==0) updateLLR(dlist, llrU, bitU, listSize, row, (col+1), xlen, ylen, approximation); @@ -104,6 +95,9 @@ void updateLLR(decoder_list_t **dlist,uint8_t **llrU, uint8_t **bitU, llrU[row][col]=1; } +#define updateLLR_int8_A(dlist,i,col,row,offset) if (dlist[(i)]->bit[(col)][(row)-(offset)]==0) dlist[(i)]->llr[(col)][(row)] = dlist[(i)]->llr[(col)+1][(row)-(offset)] + dlist[(i)]->llr[(col)+1][(row)]; else dlist[(i)]->llr[(col)][(row)] = -dlist[(i)]->llr[(col)+1][(row)-(offset)] + dlist[(i)]->llr[(col)+1][(row)]; + + void updateLLR_int8(decoder_list_int8_t **dlist,uint8_t **llrU, uint8_t **bitU, uint8_t listSize, uint16_t row, uint16_t col, uint16_t xlen, uint8_t ylen) { uint16_t offset = (xlen/(1<<(ylen-col-1))); @@ -111,18 +105,19 @@ void updateLLR_int8(decoder_list_int8_t **dlist,uint8_t **llrU, uint8_t **bitU, if (bitU[row-offset][col]==0) updateBit_int8(dlist, bitU, listSize, (row-offset), col, xlen, ylen); if (llrU[row-offset][col+1]==0) updateLLR_int8(dlist, llrU, bitU, listSize, (row-offset), (col+1), xlen, ylen); if (llrU[row][col+1]==0) updateLLR_int8(dlist, llrU, bitU, listSize, row, (col+1), xlen, ylen); + + for (uint8_t i=0; ibit[col][row-offset]==0) dlist[i]->llr[col][row] = dlist[i]->llr[col+1][row-offset] + dlist[i]->llr[col+1][row]; else - dlist[i]->llr[col][row] = -dlist[i]->llr[col+1][row-offset] + dlist[i]->llr[col+1][row]; - // printf("updating dlist[%d]->llr[%d][%d] => %d (%d,%d) offset %d\n",i,col,row,dlist[i]->llr[col][row], - // (dlist[i]->bit[col][row-offset]==0 ? 1 : -1)*dlist[i]->llr[col+1][row-offset],dlist[i]->llr[col+1][row], offset); - } + dlist[i]->llr[col][row] = -dlist[i]->llr[col+1][row-offset] + dlist[i]->llr[col+1][row];*/ + } } else { if (llrU[row][col+1]==0) updateLLR_int8(dlist, llrU, bitU, listSize, row, (col+1), xlen, ylen); if (llrU[row+offset][col+1]==0) updateLLR_int8(dlist, llrU, bitU, listSize, (row+offset), (col+1), xlen, ylen); @@ -140,25 +135,19 @@ void updateBit(decoder_list_t **dlist, uint8_t **bitU, uint8_t listSize, uint16_ if (( (row) % (2*offset) ) >= offset ) { if (bitU[row][col-1]==0) updateBit(dlist, bitU, listSize, row, (col-1), xlen, ylen); dlist[i]->bit[col][row] = dlist[i]->bit[col-1][row]; -#ifdef SHOWCOMP - printf("updating bit (%d,%d,%d) from (%d,%d,%d)\n", - row,col,i,row,col-1,i); -#endif } else { if (bitU[row][col-1]==0) updateBit(dlist, bitU, listSize, row, (col-1), xlen, ylen); if (bitU[row+offset][col-1]==0) updateBit(dlist, bitU, listSize, (row+offset), (col-1), xlen, ylen); dlist[i]->bit[col][row] = ( (dlist[i]->bit[col-1][row]+dlist[i]->bit[col-1][row+offset]) % 2); - // printf("updating dlist[%d]->bit[%d][%d] => %d\n",i,col,row,dlist[i]->bit[col][row]); -#ifdef SHOWCOMP - printf("updating bit (%d,%d,%d) from (%d,%d,%d)+(%d,%d,%d)\n", - row,col,i,row,col-1,i,row+offset,col-1,i); -#endif } } bitU[row][col]=1; } +#define updateBit_int8_A(dlist,i,col,row) dlist[(i)]->bit[(col)][(row)] = dlist[(i)]->bit[(col)-1][(row)] +#define updateBit_int8_B(dlist,i,col,row,offset) dlist[(i)]->bit[(col)][(row)] = dlist[(i)]->bit[(col)-1][(row)]^dlist[(i)]->bit[(col)-1][(row)+(offset)] + void updateBit_int8(decoder_list_int8_t **dlist, uint8_t **bitU, uint8_t listSize, uint16_t row, uint16_t col, uint16_t xlen, uint8_t ylen) { uint16_t offset = ( xlen/(pow(2,(ylen-col))) ); @@ -166,71 +155,66 @@ void updateBit_int8(decoder_list_int8_t **dlist, uint8_t **bitU, uint8_t listSiz for (uint8_t i=0; i= offset ) { if (bitU[row][col-1]==0) updateBit_int8(dlist, bitU, listSize, row, (col-1), xlen, ylen); - dlist[i]->bit[col][row] = dlist[i]->bit[col-1][row]; + // dlist[i]->bit[col][row] = dlist[i]->bit[col-1][row]; #ifdef SHOWCOMP - printf("updating bit (%d,%d,%d) from (%d,%d,%d)\n", - row,col,i,row,col-1,i); + printf("updateBit_int8_A(dlist,%d,%d,%d);\n",i,col,row); #endif + updateBit_int8_A(dlist,i,col,row); + } else { if (bitU[row][col-1]==0) updateBit_int8(dlist, bitU, listSize, row, (col-1), xlen, ylen); if (bitU[row+offset][col-1]==0) updateBit_int8(dlist, bitU, listSize, (row+offset), (col-1), xlen, ylen); - dlist[i]->bit[col][row] = dlist[i]->bit[col-1][row]^dlist[i]->bit[col-1][row+offset]; + // dlist[i]->bit[col][row] = dlist[i]->bit[col-1][row]^dlist[i]->bit[col-1][row+offset]; // printf("updating dlist[%d]->bit[%d][%d] => %d\n",i,col,row,dlist[i]->bit[col][row]); #ifdef SHOWCOMP - printf("updating bit (%d,%d,%d) from (%d,%d,%d)+(%d,%d,%d)\n", - row,col,i,row,col-1,i,row+offset,col-1,i); + printf("updateBit_int8_B(dlist,%d,%d,%d,%d);\n",i,col,row,offset); #endif + updateBit_int8_B(dlist,i,col,row,offset); } } bitU[row][col]=1; } - + void updatePathMetric(decoder_list_t **dlist,uint8_t listSize, uint8_t bitValue, - uint16_t row, uint8_t approximation) { - -#ifdef SHOWCOMP - printf("updating path_metric from Frozen bit (%d,%d) \n", - row,0); -#endif - - if (approximation) { //eq. (12) - for (uint8_t i=0; illr[0][row]) )) dlist[i]->pathMetric += fabs(dlist[i]->llr[0][row]); - // printf("updatepathmetric : llr %f pathMetric %f (bitValue %d)\n",32*dlist[i]->llr[0][row],32*dlist[i]->pathMetric,bitValue); - } - } else { //eq. (11b) - int8_t multiplier = (2*bitValue) - 1; - for (uint8_t i=0; illr[0][row]) )) dlist[i]->pathMetric += fabs(dlist[i]->llr[0][row]); + } + } else { //eq. (11b) + int8_t multiplier = (2*bitValue) - 1; + for (uint8_t i=0; ipathMetric += log ( 1 + exp(multiplier*dlist[i]->llr[0][row]) ) ; - // printf("updatepathmetric : llr %f pathMetric %f\n",32*dlist[i]->llr[0][row],32*dlist[i]->pathMetric); } - } - + } + } - + +#define updatePathMetric0_int8_A(dlist,i,row,mask,absllr) { mask=dlist[i]->llr[0][row]>>15;if(mask!=0){absllr=(dlist[i]->llr[0][row]+mask)^mask;dlist[i]->pathMetric+=absllr;}} void updatePathMetric0_int8(decoder_list_int8_t **dlist,uint8_t listSize, uint16_t row) { -#ifdef SHOWCOMP - printf("updating path_metric from Frozen bit (%d,%d) \n", - row,0); -#endif - int16_t mask; + int16_t mask,absllr; for (uint8_t i=0; illr[0][row]) )) dlist[i]->pathMetric += fabs(dlist[i]->llr[0][row]); - // equiv: if ((llr>0 && bitValue==1) || (llr<0 && bitValue==0) ... - // equiv: (llr>>7 + bitValue) != 0, in opposite case (llr>8 + bitValue) = -1 or 1 - + updatePathMetric0_int8_A(dlist,i,row,mask,absllr); +#ifdef SHOWCOMP + printf("updatePathMetric0_int8_A(dlist,i,%d,%d);\n",listSize,row); +#endif + + + /* mask = dlist[i]->llr[0][row]>>15; if (mask != 0) { int16_t absllr = (dlist[i]->llr[0][row]+mask)^mask; dlist[i]->pathMetric += absllr; - } - // printf("updatepathmetric : llr %d, pathMetric %d (bitValue %d)\n",dlist[i]->llr[0][row],dlist[i]->pathMetric); - } + }*/ + + + } } @@ -241,10 +225,6 @@ void updatePathMetric2(decoder_list_t **dlist, uint8_t listSize, uint16_t row, u for (i=0;ipathMetric = dlist[i]->pathMetric; decoder_list_t **dlist2 = &dlist[listSize]; -#ifdef SHOWCOMP - printf("updating path_metric from information bit (%d,%d) \n", - row,0); -#endif if (appr) { //eq. (12) for (i = 0; i < listSize; i++) { // bitValue=0 @@ -263,22 +243,23 @@ void updatePathMetric2(decoder_list_t **dlist, uint8_t listSize, uint16_t row, u } } +#define updatePathMetric2_int8_A(dlist,i,listSize,row) {dlist[i+listSize]->pathMetric = dlist[i]->pathMetric;if (dlist[i]->llr[0][row]<0) dlist[i]->pathMetric-=dlist[i]->llr[0][row];else dlist[i+listSize]->pathMetric += dlist[i]->llr[0][row];} + + void updatePathMetric2_int8(decoder_list_int8_t **dlist, uint8_t listSize, uint16_t row) { int i; - for (i=0;ipathMetric = dlist[i]->pathMetric; - decoder_list_int8_t **dlist2 = &dlist[listSize]; -#ifdef SHOWCOMP - printf("updating path_metric from information bit (%d,%d) \n", - row,0); -#endif for (i = 0; i < listSize; i++) { - // bitValue=0 - if (dlist[i]->llr[0][row]<0) dlist[i]->pathMetric -= dlist[i]->llr[0][row]; - // bitValue=1 - else dlist2[i]->pathMetric += dlist[i]->llr[0][row]; +#ifdef SHOWCOMP + printf("updatePathMetric2_int8_A(dlist,%d,%d,%d);\n", + i,listSize,row); +#endif + updatePathMetric2_int8_A(dlist,i,listSize,row); + // dlist[i+listSize]->pathMetric = dlist[i]->pathMetric; + //if (dlist[i]->llr[0][row]<0) dlist[i]->pathMetric -= dlist[i]->llr[0][row]; + //else dlist[i+listSize]->pathMetric += dlist[i]->llr[0][row]; } } @@ -301,20 +282,32 @@ void updateCrcChecksum2(decoder_list_t **dlist, uint8_t **crcGen, } } +#define updateCrcChecksum_int8_A(dlist,i,crcGen,i2,len) {for (uint8_t j = 0; j < len; j++) dlist[i]->crcChecksum[j] = (dlist[i]->crcChecksum[j]^crcGen[i2][j]);} + void updateCrcChecksum_int8(decoder_list_int8_t **dlist, uint8_t **crcGen, uint8_t listSize, uint32_t i2, uint8_t len) { for (uint8_t i = 0; i < listSize; i++) { - for (uint8_t j = 0; j < len; j++) { - dlist[i]->crcChecksum[j] = ( (dlist[i]->crcChecksum[j] + crcGen[i2][j]) % 2 ); - } +#ifdef SHOWCOMP + printf("updateCrcChecksum_int8_A(dlist,%d,crcGen,%d,%d);\n",i,i2,len); +#endif + updateCrcChecksum_int8_A(dlist,i,crcGen,i2,len); + // for (uint8_t j = 0; j < len; j++) { + // dlist[i]->crcChecksum[j] = ( (dlist[i]->crcChecksum[j] + crcGen[i2][j]) % 2 ); + // } } } +#define updateCrcChecksum2_int8_A(dlist,i,listSize,crcGen,i2,len) {for (uint8_t j = 0; j < len; j++) dlist[i+listSize]->crcChecksum[j]=dlist[i]->crcChecksum[j]^crcGen[i2][j];} + void updateCrcChecksum2_int8(decoder_list_int8_t **dlist, uint8_t **crcGen, uint8_t listSize, uint32_t i2, uint8_t len) { for (uint8_t i = 0; i < listSize; i++) { - for (uint8_t j = 0; j < len; j++) { - dlist[i+listSize]->crcChecksum[j] = ( (dlist[i]->crcChecksum[j] + crcGen[i2][j]) % 2 ); - } +#ifdef SHOWCOMP + printf("updateCrcChecksum2_int8_A(dlist,%d,%d,crcGen,%d,%d);\n",i,listSize,i2,len); +#endif + updateCrcChecksum2_int8_A(dlist,i,listSize,crcGen,i2,len); + // for (uint8_t j = 0; j < len; j++) { + // dlist[i+listSize]->crcChecksum[j] = ( (dlist[i]->crcChecksum[j] + crcGen[i2][j]) % 2 ); + // } } } diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h index 43142864cb..c9339e308d 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h @@ -147,8 +147,8 @@ typedef struct decoder_list_s { typedef struct decoder_list_int8_s { - uint8_t bit[1+nmax][Nmax]; - int16_t llr[1+nmax][Nmax]; + uint8_t bit[1+nmax][Nmax] __attribute__((aligned(32))); + int16_t llr[1+nmax][Nmax]__attribute__((aligned(32))); uint8_t crcChecksum[24]; int32_t pathMetric; From ecd180be471e9debc8a4facc9459c2ec8989bf90 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 1 Oct 2018 10:56:36 +0200 Subject: [PATCH 281/379] Fixing compilation warning in function declaration Signed-off-by: Raphael Defosseux --- openair1/PHY/INIT/lte_init_ru.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/INIT/lte_init_ru.c b/openair1/PHY/INIT/lte_init_ru.c index e8846d7433..3a1364620e 100644 --- a/openair1/PHY/INIT/lte_init_ru.c +++ b/openair1/PHY/INIT/lte_init_ru.c @@ -31,7 +31,7 @@ #include "assertions.h" #include -void init_7_5KHz(); +void init_7_5KHz(void); int phy_init_RU(RU_t *ru) { From 4cbd98174846c1803ff403d1ddab7943fbf0f88c Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 1 Oct 2018 16:38:05 +0200 Subject: [PATCH 282/379] CI: adding a TDD scenario for basic-simulator Signed-off-by: Raphael Defosseux --- ...-basic-sim.conf => lte-fdd-basic-sim.conf} | 0 ci-scripts/conf_files/lte-tdd-basic-sim.conf | 229 ++++++++++++ ci-scripts/reportTestLocally.sh | 342 +++++++++--------- ci-scripts/runTestOnVM.sh | 220 ++++++++--- 4 files changed, 577 insertions(+), 214 deletions(-) rename ci-scripts/conf_files/{lte-basic-sim.conf => lte-fdd-basic-sim.conf} (100%) create mode 100644 ci-scripts/conf_files/lte-tdd-basic-sim.conf diff --git a/ci-scripts/conf_files/lte-basic-sim.conf b/ci-scripts/conf_files/lte-fdd-basic-sim.conf similarity index 100% rename from ci-scripts/conf_files/lte-basic-sim.conf rename to ci-scripts/conf_files/lte-fdd-basic-sim.conf diff --git a/ci-scripts/conf_files/lte-tdd-basic-sim.conf b/ci-scripts/conf_files/lte-tdd-basic-sim.conf new file mode 100644 index 0000000000..fe9b8a3601 --- /dev/null +++ b/ci-scripts/conf_files/lte-tdd-basic-sim.conf @@ -0,0 +1,229 @@ +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 = ( + { + node_function = "eNodeB_3GPP"; + node_timing = "synch_to_ext_device"; + node_synch_ref = 0; + frame_type = "TDD"; + tdd_config = 1; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 40; + downlink_frequency = 2350000000L; + uplink_frequency_offset = 0; + Nid_cell = 0; + N_RB_DL = 25; + Nid_cell_mbsfn = 0; + nb_antenna_ports = 1; + nb_antennas_tx = 1; + nb_antennas_rx = 1; + tx_gain = 90; + rx_gain = 125; + prach_root = 0; + prach_config_index = 0; + prach_high_speed = "DISABLE"; + prach_zero_correlation = 1; + prach_freq_offset = 2; + pucch_delta_shift = 1; + pucch_nRB_CQI = 1; + pucch_nCS_AN = 0; + pucch_n1_AN = 0; + pdsch_referenceSignalPower =-27; + pdsch_p_b = 0; + pusch_n_SB = 1; + pusch_enable64QAM = "DISABLE"; + pusch_hoppingMode = "interSubFrame"; + pusch_hoppingOffset = 0; + pusch_groupHoppingEnabled = "ENABLE"; + pusch_groupAssignment = 0; + pusch_sequenceHoppingEnabled = "DISABLE"; + pusch_nDMRS1 = 1; + phich_duration = "NORMAL"; + phich_resource = "ONESIXTH"; + srs_enable = "DISABLE"; + /* srs_BandwidthConfig =; + srs_SubframeConfig =; + srs_ackNackST =; + srs_MaxUpPts =;*/ + + pusch_p0_Nominal = -96; + pusch_alpha = "AL1"; + pucch_p0_Nominal = -106; + msg3_delta_Preamble = 6; + pucch_deltaF_Format1 = "deltaF2"; + pucch_deltaF_Format1b = "deltaF3"; + pucch_deltaF_Format2 = "deltaF0"; + pucch_deltaF_Format2a = "deltaF0"; + pucch_deltaF_Format2b = "deltaF0"; + + rach_numberOfRA_Preambles = 64; + rach_preamblesGroupAConfig = "DISABLE"; + /* + rach_sizeOfRA_PreamblesGroupA = ; + rach_messageSizeGroupA = ; + rach_messagePowerOffsetGroupB = ; + */ + rach_powerRampingStep = 4; + rach_preambleInitialReceivedTargetPower = -108; + rach_preambleTransMax = 10; + rach_raResponseWindowSize = 10; + rach_macContentionResolutionTimer = 48; + rach_maxHARQ_Msg3Tx = 4; + + pcch_default_PagingCycle = 128; + pcch_nB = "oneT"; + bcch_modificationPeriodCoeff = 2; + ue_TimersAndConstants_t300 = 1000; + ue_TimersAndConstants_t301 = 1000; + ue_TimersAndConstants_t310 = 1000; + ue_TimersAndConstants_t311 = 10000; + ue_TimersAndConstants_n310 = 20; + ue_TimersAndConstants_n311 = 1; + + ue_TransmissionMode = 1; + } + ); + + + srb1_parameters : + { + # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] + timer_poll_retransmit = 80; + + # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] + timer_reordering = 35; + + # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] + timer_status_prohibit = 0; + + # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] + poll_pdu = 4; + + # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] + poll_byte = 99999; + + # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] + max_retx_threshold = 4; + } + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + ////////// MME parameters: + mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; + + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 + }; + + log_config : + { + global_log_level ="debug"; + global_log_verbosity ="medium"; + hw_log_level ="info"; + hw_log_verbosity ="medium"; + phy_log_level ="info"; + phy_log_verbosity ="medium"; + mac_log_level ="info"; + mac_log_verbosity ="high"; + rlc_log_level ="info"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="info"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="info"; + rrc_log_verbosity ="medium"; + }; + + } +); +MACRLCs = ( + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + scheduler_mode = "fairRR"; + puSch10xSnr = 200; + puCch10xSnr = 200; + } +); + +L1s = ( + { + num_cc = 1; + tr_n_preference = "local_mac"; + } +); + +RUs = ( + { + local_rf = "yes" + nb_tx = 1 + nb_rx = 1 + att_tx = 0 + att_rx = 0; + bands = [38]; + max_pdschReferenceSignalPower = -27; + max_rxgain = 125; + eNB_instances = [0]; + + } +); + +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_SINGLE_THREAD"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + +NETWORK_CONTROLLER : +{ + FLEXRAN_ENABLED = "no"; + FLEXRAN_INTERFACE_NAME = "lo"; + FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; + FLEXRAN_PORT = 2210; + FLEXRAN_CACHE = "/mnt/oai_agent_cache"; + FLEXRAN_AWAIT_RECONF = "no"; +}; diff --git a/ci-scripts/reportTestLocally.sh b/ci-scripts/reportTestLocally.sh index 569b62bc3d..24e3255958 100755 --- a/ci-scripts/reportTestLocally.sh +++ b/ci-scripts/reportTestLocally.sh @@ -317,188 +317,192 @@ then echo " Statistics" >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html + TRANS_MODES=("fdd" "tdd") BW_CASES=(05 10 20) - for BW in ${BW_CASES[@]} + for TMODE in ${TRANS_MODES[@]} do - ENB_LOG=$ARCHIVES_LOC/enb_${BW}MHz.log - UE_LOG=`echo $ENB_LOG | sed -e "s#enb#ue#"` - if [ -f $ENB_LOG ] && [ -f $UE_LOG ] - then - NAME_ENB=`echo $ENB_LOG | sed -e "s#$ARCHIVES_LOC/##"` - NAME_UE=`echo $UE_LOG | sed -e "s#$ARCHIVES_LOC/##"` - echo " " >> ./test_simulator_results.html - echo " $NAME_ENB --- $NAME_UE" >> ./test_simulator_results.html - echo " N/A" >> ./test_simulator_results.html - NB_ENB_GOT_SYNC=`egrep -c "got sync" $ENB_LOG` - NB_UE_GOT_SYNC=`egrep -c "got sync" $UE_LOG` - NB_ENB_SYNCED_WITH_UE=`egrep -c "got UE capabilities for UE" $ENB_LOG` - if [ $NB_ENB_GOT_SYNC -eq 1 ] && [ $NB_UE_GOT_SYNC -eq 2 ] && [ $NB_ENB_SYNCED_WITH_UE -eq 1 ] + for BW in ${BW_CASES[@]} + do + ENB_LOG=$ARCHIVES_LOC/${TMODE}_${BW}MHz_enb.log + UE_LOG=`echo $ENB_LOG | sed -e "s#enb#ue#"` + if [ -f $ENB_LOG ] && [ -f $UE_LOG ] then - echo " OK" >> ./test_simulator_results.html - else - echo " OK" >> ./test_simulator_results.html - fi - echo "
" >> ./test_simulator_results.html
-            if [ $NB_ENB_GOT_SYNC -eq 1 ]
-            then
-                echo "- eNB --> got sync" >> ./test_simulator_results.html
-            else
-                echo "- eNB NEVER got sync" >> ./test_simulator_results.html
-            fi
-            if [ $NB_UE_GOT_SYNC -eq 2 ]
-            then
-                echo "- UE --> got sync" >> ./test_simulator_results.html
-            else
-                echo "- UE NEVER got sync" >> ./test_simulator_results.html
-            fi
-            if [ $NB_ENB_SYNCED_WITH_UE -eq 1 ]
-            then
-                echo "- UE attached to eNB" >> ./test_simulator_results.html
-            else
-                echo "- UE NEVER attached to eNB" >> ./test_simulator_results.html
-            fi
-            NB_SEGFAULT_ENB=`egrep -i -c "Segmentation Fault" $ENB_LOG`
-            if [ $NB_SEGFAULT_ENB -ne 0 ]
-            then
-                echo "- eNB --> Segmentation Fault" >> ./test_simulator_results.html
-            fi
-            NB_SEGFAULT_UE=`egrep -i -c "Segmentation Fault" $UE_LOG`
-            if [ $NB_SEGFAULT_UE -ne 0 ]
-            then
-                echo "- UE --> Segmentation Fault" >> ./test_simulator_results.html
-            fi
-            NB_ASSERTION_ENB=`egrep -i -c "Assertion" $ENB_LOG`
-            if [ $NB_ASSERTION_ENB -ne 0 ]
-            then
-                echo "- eNB --> Assertion" >> ./test_simulator_results.html
-                awk 'BEGIN{assertion=10}{if(assertion < 3){print "    " $0; assertion++};if ($0 ~/Assertion/){print "    " $0;assertion=1}}END{}' $ENB_LOG >> ./test_simulator_results.html
-            fi
-            NB_ASSERTION_UE=`egrep -i -c "Assertion" $UE_LOG`
-            if [ $NB_ASSERTION_UE -ne 0 ]
-            then
-                echo "- eNB --> Assertion" >> ./test_simulator_results.html
-                awk 'BEGIN{assertion=10}{if(assertion < 3){print "    " $0; assertion++};if ($0 ~/Assertion/){print "    " $0;assertion=1}}END{}' $UE_LOG >> ./test_simulator_results.html
-            fi
-            echo "        
" >> ./test_simulator_results.html - echo " " >> ./test_simulator_results.html - fi - PING_CASE=$ARCHIVES_LOC/${BW}MHz_ping_ue.txt - if [ -f $PING_CASE ] - then - echo " " >> ./test_simulator_results.html - NAME=`echo $PING_CASE | sed -e "s#$ARCHIVES_LOC/##"` - echo " $NAME" >> ./test_simulator_results.html - CMD=`egrep "COMMAND IS" $PING_CASE | sed -e "s#COMMAND IS: ##"` - echo " $CMD" >> ./test_simulator_results.html - FILE_COMPLETE=`egrep -c "ping statistics" $PING_CASE` - if [ $FILE_COMPLETE -eq 0 ] - then - echo " KO" >> ./test_simulator_results.html + NAME_ENB=`echo $ENB_LOG | sed -e "s#$ARCHIVES_LOC/##"` + NAME_UE=`echo $UE_LOG | sed -e "s#$ARCHIVES_LOC/##"` + echo " " >> ./test_simulator_results.html + echo " $NAME_ENB --- $NAME_UE" >> ./test_simulator_results.html echo " N/A" >> ./test_simulator_results.html - else - NB_TR_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s# packets transmitted.*##"` - NB_RC_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*packets transmitted, ##" -e "s# received,.*##"` - if [ $NB_TR_PACKETS -eq $NB_RC_PACKETS ] + NB_ENB_GOT_SYNC=`egrep -c "got sync" $ENB_LOG` + NB_UE_GOT_SYNC=`egrep -c "got sync" $UE_LOG` + NB_ENB_SYNCED_WITH_UE=`egrep -c "got UE capabilities for UE" $ENB_LOG` + if [ $NB_ENB_GOT_SYNC -eq 1 ] && [ $NB_UE_GOT_SYNC -eq 2 ] && [ $NB_ENB_SYNCED_WITH_UE -eq 1 ] then echo " OK" >> ./test_simulator_results.html else + echo " OK" >> ./test_simulator_results.html + fi + echo "
" >> ./test_simulator_results.html
+                if [ $NB_ENB_GOT_SYNC -eq 1 ]
+                then
+                    echo "- eNB --> got sync" >> ./test_simulator_results.html
+                else
+                    echo "- eNB NEVER got sync" >> ./test_simulator_results.html
+                fi
+                if [ $NB_UE_GOT_SYNC -eq 2 ]
+                then
+                    echo "- UE --> got sync" >> ./test_simulator_results.html
+                else
+                    echo "- UE NEVER got sync" >> ./test_simulator_results.html
+                fi
+                if [ $NB_ENB_SYNCED_WITH_UE -eq 1 ]
+                then
+                    echo "- UE attached to eNB" >> ./test_simulator_results.html
+                else
+                    echo "- UE NEVER attached to eNB" >> ./test_simulator_results.html
+                fi
+                NB_SEGFAULT_ENB=`egrep -i -c "Segmentation Fault" $ENB_LOG`
+                if [ $NB_SEGFAULT_ENB -ne 0 ]
+                then
+                    echo "- eNB --> Segmentation Fault" >> ./test_simulator_results.html
+                fi
+                NB_SEGFAULT_UE=`egrep -i -c "Segmentation Fault" $UE_LOG`
+                if [ $NB_SEGFAULT_UE -ne 0 ]
+                then
+                    echo "- UE --> Segmentation Fault" >> ./test_simulator_results.html
+                fi
+                NB_ASSERTION_ENB=`egrep -i -c "Assertion" $ENB_LOG`
+                if [ $NB_ASSERTION_ENB -ne 0 ]
+                then
+                    echo "- eNB --> Assertion" >> ./test_simulator_results.html
+                    awk 'BEGIN{assertion=10}{if(assertion < 3){print "    " $0; assertion++};if ($0 ~/Assertion/){print "    " $0;assertion=1}}END{}' $ENB_LOG >> ./test_simulator_results.html
+                fi
+                NB_ASSERTION_UE=`egrep -i -c "Assertion" $UE_LOG`
+                if [ $NB_ASSERTION_UE -ne 0 ]
+                then
+                    echo "- eNB --> Assertion" >> ./test_simulator_results.html
+                    awk 'BEGIN{assertion=10}{if(assertion < 3){print "    " $0; assertion++};if ($0 ~/Assertion/){print "    " $0;assertion=1}}END{}' $UE_LOG >> ./test_simulator_results.html
+                fi
+                echo "        
" >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + fi + PING_CASE=$ARCHIVES_LOC/${TMODE}_${BW}MHz_ping_ue.txt + if [ -f $PING_CASE ] + then + echo " " >> ./test_simulator_results.html + NAME=`echo $PING_CASE | sed -e "s#$ARCHIVES_LOC/##"` + echo " $NAME" >> ./test_simulator_results.html + CMD=`egrep "COMMAND IS" $PING_CASE | sed -e "s#COMMAND IS: ##"` + echo " $CMD" >> ./test_simulator_results.html + FILE_COMPLETE=`egrep -c "ping statistics" $PING_CASE` + if [ $FILE_COMPLETE -eq 0 ] + then echo " KO" >> ./test_simulator_results.html + echo " N/A" >> ./test_simulator_results.html + else + NB_TR_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s# packets transmitted.*##"` + NB_RC_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*packets transmitted, ##" -e "s# received,.*##"` + if [ $NB_TR_PACKETS -eq $NB_RC_PACKETS ] + then + echo " OK" >> ./test_simulator_results.html + else + echo " KO" >> ./test_simulator_results.html + fi + echo " " >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html
+                    STATS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*received, ##" -e "s#, time.*##" -e "s# packet loss##"`
+                    echo "Packet Loss : $STATS" >> ./test_simulator_results.html
+                    RTTMIN=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[1] " " $5}'`
+                    echo "RTT Minimal : $RTTMIN" >> ./test_simulator_results.html
+                    RTTAVG=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[2] " " $5}'`
+                    echo "RTT Average : $RTTAVG" >> ./test_simulator_results.html
+                    RTTMAX=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[3] " " $5}'`
+                    echo "RTT Maximal : $RTTMAX" >> ./test_simulator_results.html
+                    echo "            
" >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + fi + echo " " >> ./test_simulator_results.html + fi + + if [ -f $ARCHIVES_LOC/${TMODE}_${BW}*iperf*dl*client*txt ] + then + IPERF_TESTS=`ls $ARCHIVES_LOC/${TMODE}_${BW}*iperf*client*txt` + else + echo "There are no iperf files" + IPERF_TESTS="" + fi + for IPERF_CASE in $IPERF_TESTS + do + echo " " >> ./test_simulator_results.html + NAME=`echo $IPERF_CASE | sed -e "s#$ARCHIVES_LOC/##"` + echo " $NAME" >> ./test_simulator_results.html + CMD=`egrep "COMMAND IS" $IPERF_CASE | sed -e "s#COMMAND IS: ##"` + echo " $CMD" >> ./test_simulator_results.html + REQ_BITRATE=`echo $CMD | sed -e "s#^.*-b ##" -e "s#-i 1.*##"` + if [[ $REQ_BITRATE =~ .*K.* ]] + then + REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#K##"` + FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000.0" | bc -l` + fi + if [[ $REQ_BITRATE =~ .*M.* ]] + then + REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#M##"` + FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000.0" | bc -l` + fi + if [[ $REQ_BITRATE =~ .*G.* ]] + then + REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#G##"` + FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000000.0" | bc -l` + fi + FILE_COMPLETE=`egrep -c "Server Report" $IPERF_CASE` + if [ $FILE_COMPLETE -eq 0 ] + then + echo " KO" >> ./test_simulator_results.html + SERVER_FILE=`echo $IPERF_CASE | sed -e "s#client#server#"` + FLOAT_EFF_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; printf "%.0f", br}'` + EFFECTIVE_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; if(br>1000000){printf "%.2f MBits/sec", br/1000000}}'` + PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'` + JITTER=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*/sec *##" -e "s# *ms.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{jitter=s/n; printf "%.3f ms", jitter}'` + PACKETLOSS_NOSIGN=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*(##" -e "s#%.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{per=s/n; printf "%.1f", per}'` + PACKETLOSS=`echo "${PACKETLOSS_NOSIGN}%"` + else + EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"` + if [[ $EFFECTIVE_BITRATE =~ .*Kbits/sec.* ]] + then + EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Kbits/sec.*##"` + FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000" | bc -l` + fi + if [[ $EFFECTIVE_BITRATE =~ .*Mbits/sec.* ]] + then + EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Mbits/sec.*##"` + FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000" | bc -l` + fi + if [[ $EFFECTIVE_BITRATE =~ .*Gbits/sec.* ]] + then + EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Gbits/sec.*##"` + FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000000" | bc -l` + fi + PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'` + PERF_INT=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.0f", $0}'` + if [[ $PERF_INT -lt 90 ]] + then + echo " KO" >> ./test_simulator_results.html + else + echo " OK" >> ./test_simulator_results.html + fi + EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"` + JITTER=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*Mbits/sec *##" -e "s#ms.*#ms#"` + PACKETLOSS=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*(##" -e "s#).*##"` fi echo " " >> ./test_simulator_results.html echo "
" >> ./test_simulator_results.html
-                STATS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*received, ##" -e "s#, time.*##" -e "s# packet loss##"`
-                echo "Packet Loss : $STATS" >> ./test_simulator_results.html
-                RTTMIN=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[1] " " $5}'`
-                echo "RTT Minimal : $RTTMIN" >> ./test_simulator_results.html
-                RTTAVG=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[2] " " $5}'`
-                echo "RTT Average : $RTTAVG" >> ./test_simulator_results.html
-                RTTMAX=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[3] " " $5}'`
-                echo "RTT Maximal : $RTTMAX" >> ./test_simulator_results.html
+                echo "Bitrate      : $EFFECTIVE_BITRATE" >> ./test_simulator_results.html
+                echo "Bitrate Perf : $PERF %" >> ./test_simulator_results.html
+                echo "Jitter       : $JITTER" >> ./test_simulator_results.html
+                echo "Packet Loss  : $PACKETLOSS" >> ./test_simulator_results.html
                 echo "            
" >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html - fi - echo " " >> ./test_simulator_results.html - fi - - if [ -f $ARCHIVES_LOC/${BW}*iperf*dl*client*txt ] - then - IPERF_TESTS=`ls $ARCHIVES_LOC/${BW}*iperf*client*txt` - else - echo "There are no iperf files" - IPERF_TESTS="" - fi - for IPERF_CASE in $IPERF_TESTS - do - echo " " >> ./test_simulator_results.html - NAME=`echo $IPERF_CASE | sed -e "s#$ARCHIVES_LOC/##"` - echo " $NAME" >> ./test_simulator_results.html - CMD=`egrep "COMMAND IS" $IPERF_CASE | sed -e "s#COMMAND IS: ##"` - echo " $CMD" >> ./test_simulator_results.html - REQ_BITRATE=`echo $CMD | sed -e "s#^.*-b ##" -e "s#-i 1.*##"` - if [[ $REQ_BITRATE =~ .*K.* ]] - then - REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#K##"` - FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000.0" | bc -l` - fi - if [[ $REQ_BITRATE =~ .*M.* ]] - then - REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#M##"` - FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000.0" | bc -l` - fi - if [[ $REQ_BITRATE =~ .*G.* ]] - then - REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#G##"` - FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000000.0" | bc -l` - fi - FILE_COMPLETE=`egrep -c "Server Report" $IPERF_CASE` - if [ $FILE_COMPLETE -eq 0 ] - then - echo " KO" >> ./test_simulator_results.html - SERVER_FILE=`echo $IPERF_CASE | sed -e "s#client#server#"` - FLOAT_EFF_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; printf "%.0f", br}'` - EFFECTIVE_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; if(br>1000000){printf "%.2f MBits/sec", br/1000000}}'` - PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'` - JITTER=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*/sec *##" -e "s# *ms.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{jitter=s/n; printf "%.3f ms", jitter}'` - PACKETLOSS_NOSIGN=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*(##" -e "s#%.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{per=s/n; printf "%.1f", per}'` - PACKETLOSS=`echo "${PACKETLOSS_NOSIGN}%"` - else - EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"` - if [[ $EFFECTIVE_BITRATE =~ .*Kbits/sec.* ]] - then - EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Kbits/sec.*##"` - FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000" | bc -l` - fi - if [[ $EFFECTIVE_BITRATE =~ .*Mbits/sec.* ]] - then - EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Mbits/sec.*##"` - FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000" | bc -l` - fi - if [[ $EFFECTIVE_BITRATE =~ .*Gbits/sec.* ]] - then - EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Gbits/sec.*##"` - FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000000" | bc -l` - fi - PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'` - PERF_INT=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.0f", $0}'` - if [[ $PERF_INT -lt 90 ]] - then - echo " KO" >> ./test_simulator_results.html - else - echo " OK" >> ./test_simulator_results.html - fi - EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"` - JITTER=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*Mbits/sec *##" -e "s#ms.*#ms#"` - PACKETLOSS=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*(##" -e "s#).*##"` - fi - echo " " >> ./test_simulator_results.html - echo "
" >> ./test_simulator_results.html
-            echo "Bitrate      : $EFFECTIVE_BITRATE" >> ./test_simulator_results.html
-            echo "Bitrate Perf : $PERF %" >> ./test_simulator_results.html
-            echo "Jitter       : $JITTER" >> ./test_simulator_results.html
-            echo "Packet Loss  : $PACKETLOSS" >> ./test_simulator_results.html
-            echo "            
" >> ./test_simulator_results.html - echo " " >> ./test_simulator_results.html - echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + done done done diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index ea536b749a..d74d6e2eab 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -75,6 +75,7 @@ function start_basic_sim_enb { local LOC_EPC_IP_ADDR=$3 local LOC_LOG_FILE=$4 local LOC_NB_RBS=$5 + local LOC_CONF_FILE=$6 echo "cd /home/ubuntu/tmp" > $1 echo "echo \"sudo apt-get --yes --quiet install daemon \"" >> $1 echo "sudo apt-get --yes install daemon >> /home/ubuntu/tmp/cmake_targets/log/daemon-install.txt 2>&1" >> $1 @@ -83,13 +84,13 @@ function start_basic_sim_enb { echo "echo \"source oaienv\"" >> $1 echo "source oaienv" >> $1 echo "cd ci-scripts/conf_files/" >> $1 - echo "cp lte-basic-sim.conf ci-lte-basic-sim.conf" >> $1 - echo "sed -i -e 's#N_RB_DL.*=.*;#N_RB_DL = $LOC_NB_RBS;#' -e 's#CI_MME_IP_ADDR#$LOC_EPC_IP_ADDR#' -e 's#CI_ENB_IP_ADDR#$LOC_VM_IP_ADDR#' ci-lte-basic-sim.conf" >> $1 - echo "echo \"grep N_RB_DL ci-lte-basic-sim.conf\"" >> $1 - echo "grep N_RB_DL ci-lte-basic-sim.conf | sed -e 's#N_RB_DL.*=#N_RB_DL =#'" >> $1 + echo "cp $LOC_CONF_FILE ci-$LOC_CONF_FILE" >> $1 + echo "sed -i -e 's#N_RB_DL.*=.*;#N_RB_DL = $LOC_NB_RBS;#' -e 's#CI_MME_IP_ADDR#$LOC_EPC_IP_ADDR#' -e 's#CI_ENB_IP_ADDR#$LOC_VM_IP_ADDR#' ci-$LOC_CONF_FILE" >> $1 + echo "echo \"grep N_RB_DL ci-$LOC_CONF_FILE\"" >> $1 + echo "grep N_RB_DL ci-$LOC_CONF_FILE | sed -e 's#N_RB_DL.*=#N_RB_DL =#'" >> $1 echo "echo \"cd /home/ubuntu/tmp/cmake_targets/basic_simulator/enb/\"" >> $1 echo "cd /home/ubuntu/tmp/cmake_targets/basic_simulator/enb/" >> $1 - echo "echo \"ulimit -c unlimited && ./lte-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-lte-basic-sim.conf\" > ./my-lte-softmodem-run.sh " >> $1 + echo "echo \"ulimit -c unlimited && ./lte-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE\" > ./my-lte-softmodem-run.sh " >> $1 echo "chmod 775 ./my-lte-softmodem-run.sh" >> $1 echo "cat ./my-lte-softmodem-run.sh" >> $1 echo "sudo -E daemon --inherit --unsafe --name=enb_daemon --chdir=/home/ubuntu/tmp/cmake_targets/basic_simulator/enb -o /home/ubuntu/tmp/cmake_targets/log/$LOC_LOG_FILE ./my-lte-softmodem-run.sh" >> $1 @@ -102,9 +103,10 @@ function start_basic_sim_enb { function start_basic_sim_ue { local LOC_UE_LOG_FILE=$3 local LOC_NB_RBS=$4 + local LOC_FREQUENCY=$5 echo "echo \"cd /home/ubuntu/tmp/cmake_targets/basic_simulator/ue\"" > $1 echo "cd /home/ubuntu/tmp/cmake_targets/basic_simulator/ue" > $1 - echo "echo \"./lte-uesoftmodem -C 2680000000 -r $LOC_NB_RBS --ue-rxgain 140\" > ./my-lte-uesoftmodem-run.sh" >> $1 + echo "echo \"./lte-uesoftmodem -C ${LOC_FREQUENCY}000000 -r $LOC_NB_RBS --ue-rxgain 140\" > ./my-lte-uesoftmodem-run.sh" >> $1 echo "chmod 775 ./my-lte-uesoftmodem-run.sh" >> $1 echo "cat ./my-lte-uesoftmodem-run.sh" >> $1 echo "sudo -E daemon --inherit --unsafe --name=ue_daemon --chdir=/home/ubuntu/tmp/cmake_targets/basic_simulator/ue -o /home/ubuntu/tmp/cmake_targets/log/$LOC_UE_LOG_FILE ./my-lte-uesoftmodem-run.sh" >> $1 @@ -270,7 +272,6 @@ function recover_core_dump { local TC=`echo $3 | sed -e "s#^.*enb_##" -e "s#Hz.*#Hz#"` echo "Segmentation fault detected on enb -> recovering core dump" echo "cd /home/ubuntu/tmp/cmake_targets/basic_simulator/enb" > $1 - echo "cp /home/ubuntu/tmp/ci-scripts/conf_files/ci-lte-basic-sim.conf ." >> $1 echo "sync" >> $1 echo "sudo tar -cjhf basic-simulator-enb-core-${TC}.bz2 core lte-softmodem *.so ci-lte-basic-sim.conf my-lte-softmodem-run.sh" >> $1 echo "sudo rm core" >> $1 @@ -694,16 +695,16 @@ then fi echo "############################################################" - echo "Starting the eNB at 5MHz" + echo "Starting the eNB in FDD-5MHz mode" echo "############################################################" - CURRENT_ENB_LOG_FILE=enb_05MHz.log - start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 25 + CURRENT_ENB_LOG_FILE=fdd_05MHz_enb.log + start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 25 lte-fdd-basic-sim.conf echo "############################################################" - echo "Starting the UE at 5MHz" + echo "Starting the UE in FDD-5MHz mode" echo "############################################################" - CURRENT_UE_LOG_FILE=ue_05MHz.log - start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 25 + CURRENT_UE_LOG_FILE=fdd_05MHz_ue.log + start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 25 2680 if [ $UE_SYNC -eq 0 ] then echo "Problem w/ eNB and UE not syncing" @@ -719,14 +720,15 @@ then echo "############################################################" echo "Pinging the UE" echo "############################################################" - ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR 05MHz_ping_ue.txt - scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/05MHz_ping_ue.txt $ARCHIVES_LOC - check_ping_result $ARCHIVES_LOC/05MHz_ping_ue.txt 20 + PING_LOG_FILE=fdd_05MHz_ping_ue.txt + ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC + check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 echo "############################################################" echo "Iperf DL" echo "############################################################" - CURR_IPERF_LOG_BASE=05MHz_iperf_dl + CURR_IPERF_LOG_BASE=fdd_05MHz_iperf_dl iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC @@ -735,7 +737,7 @@ then echo "############################################################" echo "Iperf UL" echo "############################################################" - CURR_IPERF_LOG_BASE=05MHz_iperf_ul + CURR_IPERF_LOG_BASE=fdd_05MHz_iperf_ul iperf_ul $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 2 $CURR_IPERF_LOG_BASE scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC @@ -750,16 +752,16 @@ then recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC echo "############################################################" - echo "Starting the eNB at 10MHz" + echo "Starting the eNB in FDD-10MHz mode" echo "############################################################" - CURRENT_ENB_LOG_FILE=enb_10MHz.log - start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 + CURRENT_ENB_LOG_FILE=fdd_10MHz_enb.log + start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 lte-fdd-basic-sim.conf echo "############################################################" - echo "Starting the UE at 10MHz" + echo "Starting the UE in FDD-10MHz mode" echo "############################################################" - CURRENT_UE_LOG_FILE=ue_10MHz.log - start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 50 + CURRENT_UE_LOG_FILE=fdd_10MHz_ue.log + start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 50 2680 if [ $UE_SYNC -eq 0 ] then echo "Problem w/ eNB and UE not syncing" @@ -775,14 +777,15 @@ then echo "############################################################" echo "Pinging the UE" echo "############################################################" - ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR 10MHz_ping_ue.txt - scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/10MHz_ping_ue.txt $ARCHIVES_LOC - check_ping_result $ARCHIVES_LOC/10MHz_ping_ue.txt 20 + PING_LOG_FILE=fdd_10MHz_ping_ue.txt + ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC + check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 echo "############################################################" echo "Iperf DL" echo "############################################################" - CURR_IPERF_LOG_BASE=10MHz_iperf_dl + CURR_IPERF_LOG_BASE=fdd_10MHz_iperf_dl iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC @@ -791,7 +794,7 @@ then echo "############################################################" echo "Iperf UL" echo "############################################################" - CURR_IPERF_LOG_BASE=10MHz_iperf_ul + CURR_IPERF_LOG_BASE=fdd_10MHz_iperf_ul iperf_ul $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 2 $CURR_IPERF_LOG_BASE scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC @@ -806,16 +809,16 @@ then recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC echo "############################################################" - echo "Starting the eNB at 20MHz" + echo "Starting the eNB in FDD-20MHz mode" echo "############################################################" - CURRENT_ENB_LOG_FILE=enb_20MHz.log - start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 100 + CURRENT_ENB_LOG_FILE=fdd_20MHz_enb.log + start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 100 lte-fdd-basic-sim.conf echo "############################################################" - echo "Starting the UE at 20MHz" + echo "Starting the UE in FDD-20MHz mode" echo "############################################################" - CURRENT_UE_LOG_FILE=ue_20MHz.log - start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 100 + CURRENT_UE_LOG_FILE=fdd_20MHz_ue.log + start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 100 2680 if [ $UE_SYNC -eq 0 ] then echo "Problem w/ eNB and UE not syncing" @@ -831,27 +834,154 @@ then echo "############################################################" echo "Pinging the UE" echo "############################################################" - ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR 20MHz_ping_ue.txt - scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/20MHz_ping_ue.txt $ARCHIVES_LOC - check_ping_result $ARCHIVES_LOC/20MHz_ping_ue.txt 20 + PING_LOG_FILE=fdd_20MHz_ping_ue.txt + ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC + check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 echo "############################################################" echo "Iperf DL" echo "############################################################" - CURR_IPERF_LOG_BASE=20MHz_iperf_dl + CURR_IPERF_LOG_BASE=fdd_20MHz_iperf_dl iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15 echo "############################################################" - echo "Iperf UL" + echo "Terminate enb/ue simulators" echo "############################################################" -# CURR_IPERF_LOG_BASE=20MHz_iperf_ul -# iperf_ul $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 1 $CURR_IPERF_LOG_BASE -# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC -# check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 1 + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + + echo "############################################################" + echo "Starting the eNB in TDD-5MHz mode" + echo "############################################################" + CURRENT_ENB_LOG_FILE=tdd_05MHz_enb.log + start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 25 lte-tdd-basic-sim.conf + + echo "############################################################" + echo "Starting the UE in TDD-5MHz mode" + echo "############################################################" + CURRENT_UE_LOG_FILE=tdd_05MHz_ue.log + start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 25 2350 + if [ $UE_SYNC -eq 0 ] + then + echo "Problem w/ eNB and UE not syncing" + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR + exit -1 + fi + get_ue_ip_addr $VM_CMDS $VM_IP_ADDR + + echo "############################################################" + echo "Pinging the UE" + echo "############################################################" + PING_LOG_FILE=tdd_05MHz_ping_ue.txt + ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC + check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 + + echo "############################################################" + echo "Terminate enb/ue simulators" + echo "############################################################" + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + + echo "############################################################" + echo "Starting the eNB in TDD-10MHz mode" + echo "############################################################" + CURRENT_ENB_LOG_FILE=tdd_10MHz_enb.log + start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 lte-tdd-basic-sim.conf + + echo "############################################################" + echo "Starting the UE in TDD-10MHz mode" + echo "############################################################" + CURRENT_UE_LOG_FILE=tdd_10MHz_ue.log + start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 50 2350 + if [ $UE_SYNC -eq 0 ] + then + echo "Problem w/ eNB and UE not syncing" + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR + exit -1 + fi + get_ue_ip_addr $VM_CMDS $VM_IP_ADDR + + echo "############################################################" + echo "Pinging the UE" + echo "############################################################" + PING_LOG_FILE=tdd_10MHz_ping_ue.txt + ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC + check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 + + echo "############################################################" + echo "Iperf DL" + echo "############################################################" + CURR_IPERF_LOG_BASE=tdd_10MHz_iperf_dl + iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 6 $CURR_IPERF_LOG_BASE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC + check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6 + + echo "############################################################" + echo "Terminate enb/ue simulators" + echo "############################################################" + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + + echo "############################################################" + echo "Starting the eNB in TDD-20MHz mode" + echo "############################################################" + CURRENT_ENB_LOG_FILE=tdd_20MHz_enb.log + start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 100 lte-tdd-basic-sim.conf + + echo "############################################################" + echo "Starting the UE in TDD-20MHz mode" + echo "############################################################" + CURRENT_UE_LOG_FILE=tdd_20MHz_ue.log + start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 100 2350 + if [ $UE_SYNC -eq 0 ] + then + echo "Problem w/ eNB and UE not syncing" + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR + exit -1 + fi + get_ue_ip_addr $VM_CMDS $VM_IP_ADDR + + echo "############################################################" + echo "Pinging the UE" + echo "############################################################" + PING_LOG_FILE=tdd_20MHz_ping_ue.txt + ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC + check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 + + echo "############################################################" + echo "Iperf DL" + echo "############################################################" + CURR_IPERF_LOG_BASE=tdd_20MHz_iperf_dl + iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 6 $CURR_IPERF_LOG_BASE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC + check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6 echo "############################################################" echo "Terminate enb/ue simulators" From 1132bbab3da4095c0d271b4f36f847ae7c90a7e9 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 2 Oct 2018 11:36:40 +0200 Subject: [PATCH 283/379] Fixing 7.5 kHz tables init for UE Signed-off-by: Raphael Defosseux --- openair1/PHY/INIT/lte_init_ue.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openair1/PHY/INIT/lte_init_ue.c b/openair1/PHY/INIT/lte_init_ue.c index 1ed9e20d60..bcdd782073 100644 --- a/openair1/PHY/INIT/lte_init_ue.c +++ b/openair1/PHY/INIT/lte_init_ue.c @@ -34,6 +34,8 @@ #include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h" #include "PHY/LTE_REFSIG/lte_refsig.h" +void init_7_5KHz(void); + uint8_t dmrs1_tab_ue[8] = {0,2,3,4,6,8,9,10}; extern uint8_t nfapi_mode; @@ -662,6 +664,7 @@ int init_lte_ue_signal(PHY_VARS_UE *ue, init_frame_parms(&ue->frame_parms,1); init_lte_top(&ue->frame_parms); + init_7_5KHz(); init_ul_hopping(&ue->frame_parms); From 1bdc059f88d99ffc1bc64a232202883a46d6b0d3 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 2 Oct 2018 17:56:31 +0200 Subject: [PATCH 284/379] CI: adding UL iperf test in TDD also at eNB init, no sync will result into an error Signed-off-by: Raphael Defosseux --- ...d40.tm1.100PRB.FairScheduler.usrpb210.conf | 9 +++ ...nd40.tm1.25PRB.FairScheduler.usrpb210.conf | 9 +++ ...nd40.tm1.50PRB.FairScheduler.usrpb210.conf | 9 +++ ci-scripts/main.py | 26 ++----- ci-scripts/xml_files/enb_usrpb210_band40.xml | 67 ++++++++++++++----- 5 files changed, 85 insertions(+), 35 deletions(-) diff --git a/ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf index 14230c125f..bae8dcfd97 100644 --- a/ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf @@ -209,6 +209,15 @@ RUs = ( } ); +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + NETWORK_CONTROLLER : { FLEXRAN_ENABLED = "no"; diff --git a/ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf index 8a66e3131f..673d5a7957 100644 --- a/ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf @@ -209,6 +209,15 @@ RUs = ( } ); +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + NETWORK_CONTROLLER : { FLEXRAN_ENABLED = "no"; diff --git a/ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf index ede864b733..fd9de112dc 100644 --- a/ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf @@ -209,6 +209,15 @@ RUs = ( } ); +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + NETWORK_CONTROLLER : { FLEXRAN_ENABLED = "no"; diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 589f389850..febd50f726 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -326,26 +326,13 @@ class SSHConnection(): loopCounter = loopCounter - 1 if (loopCounter == 0): doLoop = False - # Checking if process is still alive - #self.command('stdbuf -o0 ps -aux | grep -v grep | grep --color=never lte-softmodem', '\$', 5) - #result = re.search('lte-softmodem', str(self.ssh.before)) - #if result is None: - # self.command('rsync -v enb_' + SSH.testCase_id + '.log enb_' + SSH.testCase_id + '.txt; stdbuf -o0 cat enb_' + SSH.testCase_id + '.log | egrep --color=never -i "segmentation fault"', '\$', 5) - # result = re.search('egmentation fault', str(self.ssh.before)) - # logging.debug('\u001B[1;37;41m eNB process is already down \u001B[0m') - # if result is not None: - # logging.debug('\u001B[1;37;41m Segmentation fault \u001B[0m') - # logging.debug(str(self.ssh.before)) - # self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'KO', 0) - # self.CreateHtmlFooter() - # self.close() - # sys.exit(1) - logging.debug('\u001B[1;30;43m eNB logging system did not show got sync! See with attach later \u001B[0m') - self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'eNB not showing got sync!', 0) - # Not getting got sync is bypassed for the moment - #sys.exit(1) + logging.error('\u001B[1;37;41m eNB logging system did not show got sync! See with attach later \u001B[0m') + self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'KO', 0) + self.CreateHtmlFooter() + self.close() + sys.exit(1) else: - self.command('rsync -v enb_' + SSH.testCase_id + '.log enb_' + SSH.testCase_id + '.txt; stdbuf -o0 cat enb_' + SSH.testCase_id + '.log | grep --color=never -i sync', '\$', 4) + self.command('stdbuf -o0 cat enb_' + SSH.testCase_id + '.log | grep --color=never -i sync', '\$', 4) result = re.search('got sync', str(self.ssh.before)) if result is None: time.sleep(6) @@ -354,7 +341,6 @@ class SSHConnection(): self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'OK', 0) logging.debug('\u001B[1m Initialize eNB Completed\u001B[0m') - self.command('rm -f enb_' + SSH.testCase_id + '.txt', '\$', 5) self.close() def InitializeUE_common(self, device_id): diff --git a/ci-scripts/xml_files/enb_usrpb210_band40.xml b/ci-scripts/xml_files/enb_usrpb210_band40.xml index e364d9acd4..6023046a86 100644 --- a/ci-scripts/xml_files/enb_usrpb210_band40.xml +++ b/ci-scripts/xml_files/enb_usrpb210_band40.xml @@ -21,7 +21,7 @@ --> - 010101 050101 060101 070101 040101 030104 040301 040501 040602 040601 040603 040401 040201 030201 030105 040301 040502 040702 040701 040401 040201 030201 050201 060201 070201 + 010101 050101 060101 070101 040101 030104 040301 040501 040602 040601 040603 040642 040641 040643 040401 040201 030201 030105 040301 040502 040612 040611 040613 040652 040651 040653 040401 040201 030201 050201 060201 070201 @@ -42,6 +42,12 @@ -O ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf --codingw --fepw + + Initialize_eNB + Initialize eNB (TDD/Band40/20MHz/info) + -O ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf --codingw --fepw + + Terminate_eNB Terminate eNB @@ -105,7 +111,7 @@ unbalanced - + Iperf iperf (10MHz - DL/13.5Mbps/UDP)(30 sec)(balanced) -u -b 13.5M -t 30 -i 1 @@ -113,7 +119,7 @@ balanced - + Iperf iperf (10MHz - DL/13.5Mbps/UDP)(30 sec)(single-ue) -u -b 13.5M -t 30 -i 1 @@ -121,27 +127,58 @@ single-ue + + Iperf + iperf (10MHz - DL/13.5Mbps/UDP)(30 sec)(unbalanced) + -u -b 13.5M -t 30 -i 1 + 50 + unbalanced + Iperf - iperf (5MHz - UL/1Mbps/UDP)(30 sec)(single-ue) - -u -b 1M -t 30 -i 1 -R - 50 - single-ue - - - - Iperf - iperf (5MHz - UL/1Mbps/UDP)(30 sec)(balanced) - -u -b 1M -t 30 -i 1 -R + iperf (5MHz - UL/2Mbps/UDP)(30 sec)(balanced) + -u -b 2M -t 30 -i 1 -R 50 balanced + + Iperf + iperf (5MHz - UL/2Mbps/UDP)(30 sec)(single-ue) + -u -b 2M -t 30 -i 1 -R + 50 + single-ue + + Iperf - iperf (5MHz - UL/8Mbps/UDP)(30 sec)(unbalanced) - -u -b 8M -t 30 -i 1 -R + iperf (5MHz - UL/2Mbps/UDP)(30 sec)(unbalanced) + -u -b 2M -t 30 -i 1 -R + 50 + unbalanced + + + + Iperf + iperf (10MHz - UL/2Mbps/UDP)(30 sec)(balanced) + -u -b 2M -t 30 -i 1 -R + 50 + balanced + + + + Iperf + iperf (10MHz - UL/2Mbps/UDP)(30 sec)(single-ue) + -u -b 2M -t 30 -i 1 -R + 50 + single-ue + + + + Iperf + iperf (10MHz - UL/2Mbps/UDP)(30 sec)(unbalanced) + -u -b 2M -t 30 -i 1 -R 50 unbalanced From 7aad1584e6e518a6858d28985deab33e2bbfa827 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 3 Oct 2018 09:31:16 +0200 Subject: [PATCH 285/379] removed logging --- .../CODING/nrPolar_tools/nr_polar_decoder.c | 12 +++---- .../nrPolar_tools/nr_polar_decoding_tools.c | 33 ++++++++++--------- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c index 24d3a8d404..11d4eb522f 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c @@ -29,6 +29,7 @@ #include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h" #include "PHY/TOOLS/time_meas.h" +#define SHOWCOMP 1 int8_t polar_decoder( double *input, @@ -125,8 +126,8 @@ int8_t polar_decoder( for (uint8_t i = 0; i < 2*listSize; i++) sorted_dlist[i] = &dlist[i]; for (uint16_t currentBit=0; currentBitN; currentBit++){ - printf("***************** BIT %d (currentListSize %d, information_bit_pattern %d)\n", - currentBit,currentListSize,polarParams->information_bit_pattern[currentBit]); + // printf("***************** BIT %d (currentListSize %d, information_bit_pattern %d)\n", + // currentBit,currentListSize,polarParams->information_bit_pattern[currentBit]); start_meas(update_LLR); updateLLR(sorted_dlist, llrUpdated, bitUpdated, currentListSize, currentBit, 0, polarParams->N, (polarParams->n+1), pathMetricAppr); @@ -154,9 +155,6 @@ int8_t polar_decoder( start_meas(sorting); - for (int i=0;ipathMetric); - } if (currentListSize <= listSize/2) { // until listsize is full we need to copy bit and LLR arrays to new entries // below we only copy the ones we need to keep for sure @@ -195,7 +193,6 @@ int8_t polar_decoder( // copy the llr/bit arrays that are needed for (int i = 0; i < listSize; i++) { - printf("listIndex[%d] %d\n",i,listIndex[i]); if ((listIndex2[i+listSize]llr; #ifdef SHOWCOMP - printf("computeLLR_int8(llr,%d,%d,%d);\n",row,col,offset); + printf("computeLLR_int8(sorted_dlist,%d,%d,%d);\n",i,row,col,offset); #endif - a = llr[col + 1][row]; - b = llr[col+1][row + offset]; + a = dlist[i]->llr[col + 1][row]; + b = dlist[i]->llr[col+1][row + offset]; // printf("LLR: a %d, b %d\n",a,b); maska = a>>15; maskb = b>>15; @@ -69,9 +70,9 @@ inline void computeLLR_int8(int16_t llr[1+nmax][Nmax], uint16_t row, uint16_t co // printf("LLR: absA %d, absB %d\n",absA,absB); minabs = absAllr[col][row] = minabs; else - llr[col][row] = -minabs; + dlist[i]->llr[col][row] = -minabs; // printf("LLR (a %d, b %d): llr[%d][%d] %d\n",a,b,col,row,llr[col][row]); } @@ -109,7 +110,7 @@ void updateLLR_int8(decoder_list_int8_t **dlist,uint8_t **llrU, uint8_t **bitU, for (uint8_t i=0; illr, row, col, offset); + for (int i=0;ibit[col][row] = dlist[i]->bit[col-1][row]; #ifdef SHOWCOMP - printf("updateBit_int8_A(dlist,%d,%d,%d);\n",i,col,row); + printf("updateBit_int8_A(sorted_dlist,%d,%d,%d);\n",i,col,row); #endif updateBit_int8_A(dlist,i,col,row); @@ -167,7 +168,7 @@ void updateBit_int8(decoder_list_int8_t **dlist, uint8_t **bitU, uint8_t listSiz // dlist[i]->bit[col][row] = dlist[i]->bit[col-1][row]^dlist[i]->bit[col-1][row+offset]; // printf("updating dlist[%d]->bit[%d][%d] => %d\n",i,col,row,dlist[i]->bit[col][row]); #ifdef SHOWCOMP - printf("updateBit_int8_B(dlist,%d,%d,%d,%d);\n",i,col,row,offset); + printf("updateBit_int8_B(sorted_dlist,%d,%d,%d,%d);\n",i,col,row,offset); #endif updateBit_int8_B(dlist,i,col,row,offset); } @@ -201,7 +202,7 @@ void updatePathMetric0_int8(decoder_list_int8_t **dlist,uint8_t listSize, uint16 updatePathMetric0_int8_A(dlist,i,row,mask,absllr); #ifdef SHOWCOMP - printf("updatePathMetric0_int8_A(dlist,i,%d,%d);\n",listSize,row); + printf("updatePathMetric0_int8_A(sorted_dlist,i,%d,%d);\n",listSize,row); #endif @@ -253,7 +254,7 @@ void updatePathMetric2_int8(decoder_list_int8_t **dlist, uint8_t listSize, uint1 for (i = 0; i < listSize; i++) { #ifdef SHOWCOMP - printf("updatePathMetric2_int8_A(dlist,%d,%d,%d);\n", + printf("updatePathMetric2_int8_A(sorted_dlist,%d,%d,%d);\n", i,listSize,row); #endif updatePathMetric2_int8_A(dlist,i,listSize,row); @@ -288,7 +289,7 @@ void updateCrcChecksum_int8(decoder_list_int8_t **dlist, uint8_t **crcGen, uint8_t listSize, uint32_t i2, uint8_t len) { for (uint8_t i = 0; i < listSize; i++) { #ifdef SHOWCOMP - printf("updateCrcChecksum_int8_A(dlist,%d,crcGen,%d,%d);\n",i,i2,len); + printf("updateCrcChecksum_int8_A(sorted_dlist,%d,crcGen,%d,%d);\n",i,i2,len); #endif updateCrcChecksum_int8_A(dlist,i,crcGen,i2,len); // for (uint8_t j = 0; j < len; j++) { @@ -303,7 +304,7 @@ void updateCrcChecksum2_int8(decoder_list_int8_t **dlist, uint8_t **crcGen, uint8_t listSize, uint32_t i2, uint8_t len) { for (uint8_t i = 0; i < listSize; i++) { #ifdef SHOWCOMP - printf("updateCrcChecksum2_int8_A(dlist,%d,%d,crcGen,%d,%d);\n",i,listSize,i2,len); + printf("updateCrcChecksum2_int8_A(sorted_dlist,%d,%d,crcGen,%d,%d);\n",i,listSize,i2,len); #endif updateCrcChecksum2_int8_A(dlist,i,listSize,crcGen,i2,len); // for (uint8_t j = 0; j < len; j++) { From 1f1160ae37a470b3d56c456a72e2c92c2e91f48e Mon Sep 17 00:00:00 2001 From: hongzhi wang Date: Wed, 3 Oct 2018 15:00:17 +0200 Subject: [PATCH 286/379] NR PDCCH development: validation modifications --- openair1/PHY/INIT/nr_init_ue.c | 2 + openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c | 153 +++++++++--------- .../PHY/NR_UE_TRANSPORT/nr_transport_ue.h | 8 +- openair1/SCHED_NR_UE/fapi_nr_ue_l1.c | 30 +++- openair1/SCHED_NR_UE/harq_nr.c | 18 +-- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 71 +++++--- openair1/SCHED_NR_UE/pucch_uci_ue_nr.c | 8 +- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 71 ++++++-- openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c | 4 +- 9 files changed, 228 insertions(+), 137 deletions(-) diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c index 151a917f23..fc2d762178 100644 --- a/openair1/PHY/INIT/nr_init_ue.c +++ b/openair1/PHY/INIT/nr_init_ue.c @@ -942,6 +942,8 @@ void init_nr_ue_transport(PHY_VARS_NR_UE *ue,int abstraction_flag) { void phy_init_nr_top(PHY_VARS_NR_UE *ue) { NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; + NR_UE_DLSCH_t *dlsch0 = ue->dlsch[0][0][0]; + dlsch0 =(NR_UE_DLSCH_t *)malloc16(sizeof(NR_UE_DLSCH_t)); crcTableInit(); diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c index a7a0e2b752..86959ee66d 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c @@ -4000,6 +4000,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, uint16_t n_RB_DLBWP, uint16_t crc_scrambled_values[TOTAL_NBR_SCRAMBLED_VALUES]) { + /* * This function will extract the different elements of the dci pdu and interpret the values extracted to update correctly the parameters in: * NR_DL_UE_HARQ_t *pdlsch0_harq, @@ -4255,72 +4256,72 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, // 0 or 3 bits, as defined in Subclause x.x of [5, TS38.213] nr_pdci_info_extracted->carrier_ind = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->carrier_ind=%x\n",nr_pdci_info_extracted->carrier_ind); -#endif + #endif break; case SUL_IND_0_1: // 2 SUL_IND_0_1: (field defined for -,format0_1,-,-,-,-,-,-) nr_pdci_info_extracted->sul_ind_0_1 = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->sul_ind_0_1=%x\n",nr_pdci_info_extracted->sul_ind_0_1); -#endif + #endif break; case SLOT_FORMAT_IND: // 3 SLOT_FORMAT_IND: (field defined for -,-,-,-,format2_0,-,-,-) // size of DCI format 2_0 is configurable by higher layers up to 128 bits, according to Subclause 11.1.1 of [5, TS 38.213] nr_pdci_info_extracted->slot_format_ind = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->slot_format_ind=%x\n",nr_pdci_info_extracted->slot_format_ind); -#endif + #endif break; case PRE_EMPTION_IND: // 4 PRE_EMPTION_IND: (field defined for -,-,-,-,-,format2_1,-,-) // size of DCI format 2_1 is configurable by higher layers up to 126 bits, according to Subclause 11.2 of [5, TS 38.213]. Each pre-emption indication is 14 bits nr_pdci_info_extracted->pre_emption_ind = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->pre_emption_ind=%x\n",nr_pdci_info_extracted->pre_emption_ind); -#endif + #endif break; case BLOCK_NUMBER: // 5 BLOCK_NUMBER: (field defined for -,-,-,-,-,-,-,format2_3) // starting position of a block is determined by the parameter startingBitOfFormat2_3 nr_pdci_info_extracted->block_number = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->block_number=%x\n",nr_pdci_info_extracted->block_number); -#endif + #endif break; case CLOSE_LOOP_IND: // 6 CLOSE_LOOP_IND: (field defined for -,-,-,-,-,-,format2_2,-) // The parameter xxx provided by higher layers determines the index to the TPC command number for an UL of a cell. Each TPC command number is 2 bits nr_pdci_info_extracted->close_loop_ind = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->close_loop_ind=%x\n",nr_pdci_info_extracted->close_loop_ind); -#endif + #endif break; case BANDWIDTH_PART_IND: // 7 BANDWIDTH_PART_IND: (field defined for -,format0_1,-,format1_1,-,-,-,-) nr_pdci_info_extracted->bandwidth_part_ind = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->bandwidth_part_ind=%x\n",nr_pdci_info_extracted->bandwidth_part_ind); -#endif + #endif break; case SHORT_MESSAGE_IND: // 8 SHORT_MESSAGE_IND: (field defined for -,-,format1_0,format1_1,-,-,-,-) nr_pdci_info_extracted->short_message_ind = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->short_message_ind=%x\n",nr_pdci_info_extracted->short_message_ind); -#endif + #endif break; case SHORT_MESSAGES: // 9 SHORT_MESSAGES: (field defined for -,-,format1_0,format1_1,-,-,-,-) nr_pdci_info_extracted->short_messages = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->short_messages=%x\n",nr_pdci_info_extracted->short_messages); -#endif + #endif break; case FREQ_DOM_RESOURCE_ASSIGNMENT_UL: // 10 FREQ_DOM_RESOURCE_ASSIGNMENT_UL: (field defined for format0_0,format0_1,-,-,-,-,-,-) @@ -4486,24 +4487,24 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, // 0 bit if the higher layer parameter PRB_bundling is not configured or is set to 'static', or 1 bit if the higher layer parameter PRB_bundling is set to 'dynamic' according to Subclause 5.1.2.3 of [6, TS 38.214] nr_pdci_info_extracted->prb_bundling_size_ind = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->prb_bundling_size_ind=%x\n",nr_pdci_info_extracted->prb_bundling_size_ind); -#endif + #endif break; case RATE_MATCHING_IND: // 15 RATE_MATCHING_IND: (field defined for -,-,-,format1_1,-,-,-,-) // 0, 1, or 2 bits according to higher layer parameter rate-match-PDSCH-resource-set nr_pdci_info_extracted->rate_matching_ind = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->rate_matching_ind=%x\n",nr_pdci_info_extracted->rate_matching_ind); -#endif + #endif break; case ZP_CSI_RS_TRIGGER: // 16 ZP_CSI_RS_TRIGGER: (field defined for -,-,-,format1_1,-,-,-,-) nr_pdci_info_extracted->zp_csi_rs_trigger = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->zp_csi_rs_trigger=%x\n",nr_pdci_info_extracted->zp_csi_rs_trigger); -#endif + #endif break; case FREQ_HOPPING_FLAG: // 17 FREQ_HOPPING_FLAG: (field defined for format0_0,format0_1,-,-,-,-,-,-) @@ -4676,26 +4677,26 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, // (1 or 2 bits) 1 bit for semi-static HARQ-ACK nr_pdci_info_extracted->first_dai = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->first_dai=%x\n",nr_pdci_info_extracted->first_dai); -#endif + #endif break; case SECOND_DAI: // 30 SECOND_DAI: (field defined for -,format0_1,-,-,-,-,-,-) // (0 or 2 bits) 2 bits for dynamic HARQ-ACK codebook with two HARQ-ACK sub-codebooks nr_pdci_info_extracted->second_dai = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->second_dai=%x\n",nr_pdci_info_extracted->second_dai); -#endif + #endif break; case TB_SCALING: // 31 TB_SCALING: (field defined for -,format0_1,-,-,-,-,-,-) // (0 or 2 bits) 2 bits for dynamic HARQ-ACK codebook with two HARQ-ACK sub-codebooks nr_pdci_info_extracted->tb_scaling = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tb_scaling=%x\n",nr_pdci_info_extracted->tb_scaling); -#endif + #endif break; case TPC_PUSCH: // 32 TPC_PUSCH: (field defined for format0_0,format0_1,-,-,-,-,-,-) @@ -4746,161 +4747,160 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, case SRS_RESOURCE_IND: // 36 SRS_RESOURCE_IND: (field defined for -,format0_1,-,-,-,-,-,-) nr_pdci_info_extracted->srs_resource_ind = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->srs_resource_ind=%x\n",nr_pdci_info_extracted->srs_resource_ind); -#endif + #endif break; case PRECOD_NBR_LAYERS: // 37 PRECOD_NBR_LAYERS: (field defined for -,format0_1,-,-,-,-,-,-) nr_pdci_info_extracted->precod_nbr_layers = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->precod_nbr_layers=%x\n",nr_pdci_info_extracted->precod_nbr_layers); -#endif + #endif break; case ANTENNA_PORTS: // 38 ANTENNA_PORTS: (field defined for -,format0_1,-,format1_1,-,-,-,-) nr_pdci_info_extracted->antenna_ports = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->antenna_ports=%x\n",nr_pdci_info_extracted->antenna_ports); -#endif + #endif break; case TCI: // 39 TCI: (field defined for -,-,-,format1_1,-,-,-,-) // 0 bit if higher layer parameter tci-PresentInDCI is not enabled; otherwise 3 bits nr_pdci_info_extracted->tci = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tci=%x\n",nr_pdci_info_extracted->tci); -#endif + #endif break; case SRS_REQUEST: // 40 SRS_REQUEST: (field defined for -,format0_1,-,format1_1,-,-,-,format2_3) nr_pdci_info_extracted->srs_request = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->srs_request=%x\n",nr_pdci_info_extracted->srs_request); -#endif + #endif break; case TPC_CMD: // 41 TPC_CMD: (field defined for -,-,-,-,-,-,-,format2_3) nr_pdci_info_extracted->tpc_cmd = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tpc_cmd=%x\n",nr_pdci_info_extracted->tpc_cmd); -#endif + #endif break; case CSI_REQUEST: // 42 CSI_REQUEST: (field defined for -,format0_1,-,-,-,-,-,-) nr_pdci_info_extracted->csi_request = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->csi_request=%x\n",nr_pdci_info_extracted->csi_request); -#endif + #endif break; case CBGTI: // 43 CBGTI: (field defined for -,format0_1,-,format1_1,-,-,-,-) // 0, 2, 4, 6, or 8 bits determined by higher layer parameter maxCodeBlockGroupsPerTransportBlock for the PDSCH nr_pdci_info_extracted->cbgti = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->cbgti=%x\n",nr_pdci_info_extracted->cbgti); -#endif + #endif break; case CBGFI: // 44 CBGFI: (field defined for -,-,-,format1_1,-,-,-,-) // 0 or 1 bit determined by higher layer parameter codeBlockGroupFlushIndicator nr_pdci_info_extracted->cbgfi = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->cbgfi=%x\n",nr_pdci_info_extracted->cbgfi); -#endif + #endif break; case PTRS_DMRS: // 45 PTRS_DMRS: (field defined for -,format0_1,-,-,-,-,-,-) nr_pdci_info_extracted->ptrs_dmrs = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->ptrs_dmrs=%x\n",nr_pdci_info_extracted->ptrs_dmrs); -#endif + #endif break; case BETA_OFFSET_IND: // 46 BETA_OFFSET_IND: (field defined for -,format0_1,-,-,-,-,-,-) nr_pdci_info_extracted->beta_offset_ind = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->beta_offset_ind=%x\n",nr_pdci_info_extracted->beta_offset_ind); -#endif + #endif break; case DMRS_SEQ_INI: // 47 DMRS_SEQ_INI: (field defined for -,format0_1,-,format1_1,-,-,-,-) // 1 bit if the cell has two ULs and the number of bits for DCI format 1_0 before padding is larger than the number of bits for DCI format 0_0 before padding; 0 bit otherwise nr_pdci_info_extracted->dmrs_seq_ini = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->dmrs_seq_ini=%x\n",nr_pdci_info_extracted->dmrs_seq_ini); -#endif + #endif break; case UL_SCH_IND: // 48 UL_SCH_IND: (field defined for -,format0_1,-,-,-,-,-,-) // value of "1" indicates UL-SCH shall be transmitted on the PUSCH and a value of "0" indicates UL-SCH shall not be transmitted on the PUSCH nr_pdci_info_extracted->ul_sch_ind = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->dmrs_seq_ini=%x\n",nr_pdci_info_extracted->ul_sch_ind); -#endif + #endif break; case PADDING_NR_DCI: // 49 PADDING_NR_DCI: (field defined for format0_0,-,format1_0,-,-,-,-,-) // (Note 2) If DCI format 0_0 is monitored in common search space nr_pdci_info_extracted->padding_nr_dci = (uint16_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->padding=%x\n",nr_pdci_info_extracted->padding_nr_dci); -#endif + #endif break; case SUL_IND_0_0: // 50 SUL_IND_0_0: (field defined for format0_0,-,-,-,-,-,-,-) nr_pdci_info_extracted->sul_ind_0_0 = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->sul_ind_0_0=%x\n",nr_pdci_info_extracted->sul_ind_0_0); -#endif + #endif break; case RA_PREAMBLE_INDEX: // 51 RA_PREAMBLE_INDEX: (field defined for format0_0,-,-,-,-,-,-,-) nr_pdci_info_extracted->ra_preamble_index = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->ra_preamble_index=%x\n",nr_pdci_info_extracted->ra_preamble_index); -#endif + #endif break; case SUL_IND_1_0: // 52 SUL_IND_1_0: (field defined for -,-,format1_0,-,-,-,-,-) nr_pdci_info_extracted->sul_ind_1_0 = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->sul_ind_1_0=%x\n",nr_pdci_info_extracted->sul_ind_1_0); -#endif + #endif break; case SS_PBCH_INDEX: // 53 SS_PBCH_INDEX: (field defined for -,-,format1_0,-,-,-,-,-) nr_pdci_info_extracted->ss_pbch_index = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->ss_pbch_index=%x\n",nr_pdci_info_extracted->ss_pbch_index); -#endif + #endif break; case PRACH_MASK_INDEX: // 54 PRACH_MASK_INDEX: (field defined for -,-,-,format1_0,-,-,-,-) nr_pdci_info_extracted->prach_mask_index = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->prach_mask_index=%x\n",nr_pdci_info_extracted->prach_mask_index); -#endif + #endif break; case RESERVED_NR_DCI: // 55 RESERVED_NR_DCI: (field defined for -,-,-,format1_0,-,-,-,-) nr_pdci_info_extracted->reserved_nr_dci = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field); //(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format])); -#ifdef NR_PDCCH_DCI_TOOLS_DEBUG + #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->reserved_nr_dci=%x\n",nr_pdci_info_extracted->reserved_nr_dci); -#endif + #endif break; } } } - #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> Ending function nr_extract_dci_info()\n"); #endif @@ -7033,7 +7033,11 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue, NR_UE_DLSCH_t *dlsch0=NULL,*dlsch1=NULL; NR_DL_UE_HARQ_t *dlsch0_harq=NULL,*dlsch1_harq=NULL; NR_UE_ULSCH_t *ulsch0=NULL,*ulsch1=NULL; - //NR_DCI_INFO_EXTRACTED_t nr_dci_info_extracted; + + + NR_DCI_INFO_EXTRACTED_t *ptr_nr_dci_info_extracted = nr_dci_info_extracted; + + uint8_t status=0; #ifdef NR_PDCCH_DCI_TOOLS_DEBUG printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> dci_format=%d, rnti=%d, dci_length=%d, dci_pdu[0]=%x, dci_pdu[2]=%x, dci_pdu[2]=%x, dci_pdu[3]=%x\n", @@ -7079,7 +7083,7 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue, dci_length, rnti, dci_pdu, - &nr_dci_info_extracted, + ptr_nr_dci_info_extracted,//&nr_dci_info_extracted, dci_fields_sizes, dlsch0_harq, dlsch0, @@ -7089,12 +7093,13 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue, n_RB_ULBWP, n_RB_DLBWP, crc_scrambled_values); - //status = check_dci_format1_1a_coherency(format1_1, frame_parms->N_RB_DL, rnti, tc_rnti, si_rnti, ra_rnti, p_rnti,frame,nr_tti_rx, &nr_dci_info_extracted, dlsch0_harq); + //printf("\n>>> inside nr_generate_ue_ul_dlsch_params_from_dci after nr_extract_dci_info: mcs=%d\n",nr_dci_info_extracted->mcs); #ifdef NR_PDCCH_DCI_TOOLS_DEBUG if(status == 0) { printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> bad DCI %d !!! \n",dci_format); return(-1); } + //printf("\n>>> inside nr_generate_ue_ul_dlsch_params_from_dci after nr_extract_dci_info: modified mcs=%d \n",nr_dci_info_extracted->mcs); printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> Ending function nr_extract_dci_info()\n"); #endif return(0); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h index 92bdb71f0f..7d2ebd4aea 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h @@ -317,6 +317,8 @@ typedef struct { uint16_t rnti; /// Active flag for DLSCH demodulation uint8_t active; + /// accumulated tx power adjustment for PUCCH + int8_t g_pucch; /// Transmission mode uint8_t mode1_flag; /// amplitude of PDSCH (compared to RS) in symbols without pilots @@ -338,7 +340,7 @@ typedef struct { //#if defined(UPGRADE_RAT_NR) #if 1 /// Pointers to up to HARQ processes - NR_DL_UE_HARQ_t *harq_processes[NR_MAX_DLSCH_HARQ_PROCESSES]; + NR_DL_UE_HARQ_t harq_processes[NR_MAX_DLSCH_HARQ_PROCESSES]; // DL number of harq processes uint8_t number_harq_processes_for_pdsch; /* higher layer parameter for reception of two transport blocks TS 38.213 9.1.3.1 Type-2 HARQ-ACK codebook dtermination */ @@ -356,8 +358,8 @@ typedef struct { uint8_t max_turbo_iterations; /// number of iterations used in last turbo decoding uint8_t last_iteration_cnt; - /// accumulated tx power adjustment for PUCCH - int8_t g_pucch; + + } NR_UE_DLSCH_t; typedef enum {format0_0, diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c index 188beb3ec7..bd3690546d 100644 --- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c +++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c @@ -95,17 +95,31 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ uint8_t current_harq_pid = dlsch_config_pdu->harq_process_nbr; dlsch0->current_harq_pid = current_harq_pid; dlsch0->active = 1; - dlsch0->harq_processes[current_harq_pid]->nb_rb = dlsch_config_pdu->number_rbs; - dlsch0->harq_processes[current_harq_pid]->start_rb = dlsch_config_pdu->start_rb; - dlsch0->harq_processes[current_harq_pid]->nb_symbols = dlsch_config_pdu->number_symbols; - dlsch0->harq_processes[current_harq_pid]->start_symbol = dlsch_config_pdu->start_symbol; + + //dlsch0->harq_processes[0]->mcs = &dlsch_config_pdu->mcs; + + NR_DL_UE_HARQ_t dlsch0_harq = dlsch0->harq_processes[current_harq_pid]; + + //dlsch0->harq_processes[current_harq_pid]->nb_rb = dlsch_config_pdu->number_rbs; + + dlsch0_harq.nb_rb = dlsch_config_pdu->number_rbs; + dlsch0_harq.start_rb = dlsch_config_pdu->start_rb; + dlsch0_harq.nb_symbols = dlsch_config_pdu->number_symbols; + dlsch0_harq.start_symbol = dlsch_config_pdu->start_symbol; + dlsch0_harq.mcs = dlsch_config_pdu->mcs; + dlsch0_harq.DCINdi = dlsch_config_pdu->ndi; + dlsch0_harq.rvidx = dlsch_config_pdu->rv; + dlsch0->g_pucch = dlsch_config_pdu->accumulated_delta_PUCCH; + dlsch0_harq.harq_ack.pucch_resource_indicator = dlsch_config_pdu->pucch_resource_id; + dlsch0_harq.harq_ack.slot_for_feedback_ack = dlsch_config_pdu->pdsch_to_harq_feedback_time_ind; + printf(">>>> \tdlsch0->g_pucch=%d\tdlsch0_harq.mcs=%d\n",dlsch0->g_pucch,dlsch0_harq.mcs); + //for (int j = 0 ; j<1000; j++) printf("\nk = %d",j); + + #if 0 dlsch0->harq_processes[current_harq_pid]->mcs = dlsch_config_pdu->mcs; - dlsch0->harq_processes[current_harq_pid]->DCINdi = dlsch_config_pdu->ndi; - dlsch0->harq_processes[current_harq_pid]->rvidx = dlsch_config_pdu->rv; dlsch0->g_pucch = dlsch_config_pdu->accumulated_delta_PUCCH; - dlsch0->harq_processes[current_harq_pid]->harq_ack.pucch_resource_indicator = dlsch_config_pdu->pucch_resource_id; - dlsch0->harq_processes[current_harq_pid]->harq_ack.slot_for_feedback_ack = dlsch_config_pdu->pdsch_to_harq_feedback_time_ind; //pdlsch0->rnti = rnti; + #endif } } }else{ diff --git a/openair1/SCHED_NR_UE/harq_nr.c b/openair1/SCHED_NR_UE/harq_nr.c index f88ffa3afc..599b76324b 100644 --- a/openair1/SCHED_NR_UE/harq_nr.c +++ b/openair1/SCHED_NR_UE/harq_nr.c @@ -337,7 +337,7 @@ void config_downlink_harq_process(PHY_VARS_NR_UE *ue, int gNB_id, int TB_id, int { NR_UE_DLSCH_t *dlsch; - dlsch = (NR_UE_DLSCH_t *)malloc16(sizeof(NR_UE_DLSCH_t)); + //dlsch = (NR_UE_DLSCH_t *)malloc16(sizeof(NR_UE_DLSCH_t)); if (dlsch != NULL) { @@ -356,18 +356,18 @@ void config_downlink_harq_process(PHY_VARS_NR_UE *ue, int gNB_id, int TB_id, int /* allocation of HARQ process context */ for (int harq_pid = 0; harq_pid < number_harq_processes_for_pdsch; harq_pid++) { - dlsch->harq_processes[harq_pid] = (NR_DL_UE_HARQ_t *)malloc16(sizeof(NR_DL_UE_HARQ_t)); + //dlsch->harq_processes[harq_pid] = (NR_DL_UE_HARQ_t *)malloc16(sizeof(NR_DL_UE_HARQ_t)); - if (dlsch->harq_processes[harq_pid] == NULL) { + /*if (dlsch->harq_processes[harq_pid] == NULL) { LOG_E(PHY, "Fatal memory allocation problem at line %d in function %s of file %s \n", __LINE__ , __func__, __FILE__); assert(0); - } + }*/ - memset(dlsch->harq_processes[harq_pid],0,sizeof(NR_DL_UE_HARQ_t)); + memset(&dlsch->harq_processes[harq_pid],0,sizeof(NR_DL_UE_HARQ_t)); - NR_DL_UE_HARQ_t *dl_harq = dlsch->harq_processes[harq_pid]; + NR_DL_UE_HARQ_t dl_harq = dlsch->harq_processes[harq_pid]; - init_downlink_harq_status(dl_harq); + init_downlink_harq_status(&dl_harq); } } @@ -389,12 +389,12 @@ void release_downlink_harq_process(PHY_VARS_NR_UE *ue, int gNB_id, int TB_id, in { NR_UE_DLSCH_t *dlsch = ue->dlsch[execution_thread_number][gNB_id][TB_id]; - for (int process_id = 0; process_id < dlsch->Mdlharq; process_id++) { + /*for (int process_id = 0; process_id < dlsch->Mdlharq; process_id++) { free16(dlsch->harq_processes[process_id],sizeof(NR_DL_UE_HARQ_t)); dlsch->harq_processes[process_id] = NULL; - } + }*/ free16(dlsch,sizeof(NR_UE_DLSCH_t)); diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index e1624f680d..8966bbb821 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -3129,15 +3129,19 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t * // table dci_fields_sizes_cnt[dci_cnt-1][i][j] will then be used in function nr_extract_dci_info uint8_t dci_fields_sizes_cnt[MAX_NR_DCI_DECODED_SLOT][NBR_NR_DCI_FIELDS][NBR_NR_FORMATS] = {0}; - uint16_t tc_rnti = 1; // FIXME - uint16_t int_rnti = 1; // FIXME - uint16_t sfi_rnti = 1; // FIXME - uint16_t tpc_pusch_rnti =1; // FIXME - uint16_t tpc_pucch_rnti = 1; // FIXME - uint16_t tpc_srs_rnti = 1; // FIXME int nb_searchspace_active=0; NR_UE_PDCCH **pdcch_vars = ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]]; NR_UE_PDCCH *pdcch_vars2 = ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]; + + uint16_t c_rnti=pdcch_vars[eNB_id]->crnti; + uint16_t cs_rnti=1,new_rnti=1,tc_rnti=1; + uint16_t p_rnti=P_RNTI; + uint16_t si_rnti=SI_RNTI; + uint16_t ra_rnti=3; + uint16_t sp_csi_rnti=1,sfi_rnti=1,int_rnti=1,tpc_pusch_rnti=1,tpc_pucch_rnti=1,tpc_srs_rnti=1; //FIXME + uint16_t crc_scrambled_values[TOTAL_NBR_SCRAMBLED_VALUES] = + {c_rnti,cs_rnti,new_rnti,tc_rnti,p_rnti,si_rnti,ra_rnti,sp_csi_rnti,sfi_rnti,int_rnti,tpc_pusch_rnti,tpc_pucch_rnti,tpc_srs_rnti}; + // s in TS 38.212 Subclause 10.1, for each active BWP the UE can deal with 10 different search spaces // Higher layers have updated the number of searchSpaces with are active in the current slot and this value is stored in variable nb_searchspace_total int nb_searchspace_total = pdcch_vars2->nb_search_space; @@ -3366,7 +3370,6 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t * #endif - dci_cnt += nr_dci_decoding_procedure(nb_searchspace_active, nb_coreset_active, ue, @@ -3378,7 +3381,8 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t * n_RB_ULBWP, n_RB_DLBWP, &crc_scrambled, - &format_found); + &format_found, + crc_scrambled_values); #ifdef NR_PDCCH_SCHED_DEBUG printf("<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> Ending function nr_dci_decoding_procedure() -> dci_cnt=%d\n",dci_cnt); #endif @@ -3469,14 +3473,6 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t * /* * This is the NR part */ - uint16_t c_rnti=pdcch_vars[eNB_id]->crnti; - uint16_t cs_rnti,new_rnti,tc_rnti; - uint16_t p_rnti=P_RNTI; - uint16_t si_rnti=SI_RNTI; - uint16_t ra_rnti=3; - uint16_t sp_csi_rnti,sfi_rnti,int_rnti,tpc_pusch_rnti,tpc_pucch_rnti,tpc_srs_rnti; //FIXME - uint16_t crc_scrambled_values[TOTAL_NBR_SCRAMBLED_VALUES] = - {c_rnti,cs_rnti,new_rnti,tc_rnti,p_rnti,si_rnti,ra_rnti,sp_csi_rnti,sfi_rnti,int_rnti,tpc_pusch_rnti,tpc_pucch_rnti,tpc_srs_rnti}; if ((dci_alloc_rx[i].format == format0_0)) if ((dci_alloc_rx[i].format == format1_0) && @@ -3499,6 +3495,7 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t * if ((dci_alloc_rx[i].format == format1_1)){ // This format not implemented at a first time. FIXME } NR_DCI_INFO_EXTRACTED_t nr_dci_info_extracted; + NR_DCI_INFO_EXTRACTED_t *ptr_nr_dci_info_extracted = &nr_dci_info_extracted; #ifdef NR_PDCCH_SCHED_DEBUG printf("<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> Entering function nr_generate_ue_ul_dlsch_params_from_dci with eNB_id=%d dci_cnt=%d format=%d, rnti=%d\n", eNB_id, @@ -3526,15 +3523,19 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t * n_RB_ULBWP, n_RB_DLBWP, crc_scrambled_values, - &nr_dci_info_extracted); + ptr_nr_dci_info_extracted);//&nr_dci_info_extracted); ue->dci_ind.dci_list[i].rnti = dci_alloc_rx[i].rnti; ue->dci_ind.dci_list[i].dci_format = dci_alloc_rx[i].format; memcpy(&ue->dci_ind.dci_list[i].dci, &nr_dci_info_extracted, sizeof(fapi_nr_dci_pdu_rel15_t) ); - - // TODO: check where should we send up this message. - //ue->if_inst->dl_indication(&ue->dl_indication); + + //printf(">>> example mcs=%d\n",nr_dci_info_extracted.mcs); + //printf(">>> calling MAC with dl_indication DCI_IND\n"); + + // TODO: check where should we send up this message. + ue->dl_indication.dci_ind=&ue->dci_ind; + ue->if_inst->dl_indication(&ue->dl_indication); /* * This is the LTE part to be removed @@ -4040,11 +4041,11 @@ void ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_id if ((pdsch==PDSCH) && (ue->transmission_mode[eNB_id] == 5) && - (dlsch0->harq_processes[harq_pid]->dl_power_off==0) && + (dlsch0->harq_processes[harq_pid].dl_power_off==0) && (ue->use_ia_receiver ==1)) { dual_stream_UE = 1; eNB_id_i = ue->n_connected_eNB; - i_mod = dlsch0->harq_processes[harq_pid]->Qm; + i_mod = dlsch0->harq_processes[harq_pid].Qm; } else if((pdsch==PDSCH) && (ue->transmission_mode[eNB_id]==3)) @@ -5473,6 +5474,10 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN #endif pmch_flag = is_pmch_subframe(frame_rx,nr_tti_rx,&ue->frame_parms) ? 1 : 0; + + + + if (do_pdcch_flag) { // deactivate reception until we scan pdcch @@ -5557,10 +5562,30 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN // LOG_D(PHY,"[UE %d] Frame %d: Calling pdcch procedures (eNB %d)\n",ue->Mod_id,frame_rx,eNB_id); //start_meas(&ue->rx_pdcch_stats[ue->current_thread_id[nr_tti_rx]]); + +//printf(">>> at phy_procedures_nrUE_RX, nr_ue_pdcch_procedures init, dlsch->active=%d\n", +// ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id][0]->active); if (nr_ue_pdcch_procedures(eNB_id,ue,proc,abstraction_flag) == -1) { LOG_E(PHY,"[UE %d] Frame %d, nr_tti_rx %d: Error in pdcch procedures\n",ue->Mod_id,frame_rx,nr_tti_rx); return(-1); } +//for (int m=0;m<1000;m++) printf("%d",m); +//printf("\n>>> at phy_procedures_nrUE_RX, nr_ue_pdcch_procedures end, dlsch->active=%d\n", +// ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id][0]->active); + + // preparing for PDSCH procedures +// if (ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id][0]->active == 1) { +// ue_pdsch_procedures(ue, +// proc, +// eNB_id, +// PDSCH, +// ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id][0], +// NULL, +// ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->num_pdcch_symbols, +// ue->frame_parms.symbols_per_tti>>1, +// abstraction_flag); +// } +#if 0 //stop_meas(&ue->rx_pdcch_stats[ue->current_thread_id[nr_tti_rx]]); //printf("nr_tti_rx %d n_pdcch_sym %d pdcch procedures %5.3f \n", // nr_tti_rx, ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->num_pdcch_symbols, @@ -5571,7 +5596,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN // } // for l=1..l2 -#if 0 + ue_measurement_procedures(l-1,ue,proc,eNB_id,(nr_tti_rx<<1),abstraction_flag,mode); LOG_D(PHY," ------ end FFT/ChannelEst/PDCCH slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, nr_tti_rx); diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c index b64c3ab114..326410be73 100644 --- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c +++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c @@ -139,7 +139,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ if (dl_harq_pid < ue->dlsch[ue->current_thread_id[proc->nr_tti_rx]][gNB_id][0]->number_harq_processes_for_pdsch) { /* pucch indicator can be reseted in function get_downlink_ack so it should be get now */ - pucch_resource_indicator = ue->dlsch[ue->current_thread_id[proc->nr_tti_rx]][gNB_id][0]->harq_processes[dl_harq_pid]->harq_ack.pucch_resource_indicator; + pucch_resource_indicator = ue->dlsch[ue->current_thread_id[proc->nr_tti_rx]][gNB_id][0]->harq_processes[dl_harq_pid].harq_ack.pucch_resource_indicator; } /* Part - I @@ -238,7 +238,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ int occ_length = 0; int occ_Index = 0; - NR_UE_HARQ_STATUS_t *harq_status = &ue->dlsch[ue->current_thread_id[proc->nr_tti_rx]][gNB_id][0]->harq_processes[dl_harq_pid]->harq_ack; + NR_UE_HARQ_STATUS_t *harq_status = &ue->dlsch[ue->current_thread_id[proc->nr_tti_rx]][gNB_id][0]->harq_processes[dl_harq_pid].harq_ack; if (select_pucch_resource(ue, gNB_id, N_UCI, pucch_resource_indicator, &initial_pucch_id, &pucch_resource_set, &pucch_resource_id, harq_status) == TRUE) { @@ -630,7 +630,7 @@ uint8_t get_downlink_ack(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_t for (int dl_harq_pid = 0; dl_harq_pid < number_pid_dl; dl_harq_pid++) { - harq_status = &ue->dlsch[ue->current_thread_id[proc->nr_tti_rx]][gNB_id][code_word]->harq_processes[dl_harq_pid]->harq_ack; + harq_status = &ue->dlsch[ue->current_thread_id[proc->nr_tti_rx]][gNB_id][code_word]->harq_processes[dl_harq_pid].harq_ack; /* check if current tx slot should transmit downlink acknowlegment */ if (harq_status->slot_for_feedback_ack == proc->nr_tti_tx) { @@ -668,7 +668,7 @@ uint8_t get_downlink_ack(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_t } } if (do_reset == TRUE) { - init_downlink_harq_status(ue->dlsch[ue->current_thread_id[proc->nr_tti_rx]][gNB_id][code_word]->harq_processes[dl_harq_pid]); + init_downlink_harq_status(&ue->dlsch[ue->current_thread_id[proc->nr_tti_rx]][gNB_id][code_word]->harq_processes[dl_harq_pid]); } } } diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index c2bca72271..9b79f35231 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -119,8 +119,8 @@ int8_t nr_ue_decode_mib( int32_t num_rbs = -1; int32_t num_symbols = -1; int32_t rb_offset = -1; - printf("<<<<<<<<mib->pdcch_ConfigSIB1,index_4msb,index_4lsb,scs_ssb,scs_pdcch, (scs_ssb << 5)|scs_pdcch); + //printf("<<<<<<<<mib->pdcch_ConfigSIB1,index_4msb,index_4lsb,scs_ssb,scs_pdcch, (scs_ssb << 5)|scs_pdcch); // type0-pdcch coreset switch( (scs_ssb << 5)|scs_pdcch ){ @@ -250,7 +250,7 @@ int8_t nr_ue_decode_mib( mask = mask >> 1; mask = mask | 0x100000000000; } - printf(">>>>>>>>mask 0x%16x num_rbs %d rb_offset %d\n", mask, num_rbs, rb_offset); + //printf(">>>>>>>>mask %x num_rbs %d rb_offset %d\n", mask, num_rbs, rb_offset); mac->type0_pdcch_dci_config.coreset.frequency_domain_resource = mask; mac->type0_pdcch_dci_config.coreset.rb_offset = rb_offset; // additional parameter other than coreset @@ -545,14 +545,14 @@ NR_UE_L2_STATE_t nr_ue_scheduler( ////////////// /* * This code contains all the functions needed to process all dci fields. - * These functions are going to be called by function nr_ue_process_dci + * These tables and functions are going to be called by function nr_ue_process_dci */ // table_7_3_1_1_2_2_3_4_5 contains values for number of layers and precoding information for tables 7.3.1.1.2-2/3/4/5 from TS 38.212 subclause 7.3.1.1.2 // the first 6 columns contain table 7.3.1.1.2-2: Precoding information and number of layers, for 4 antenna ports, if transformPrecoder=disabled and maxRank = 2 or 3 or 4 // next six columns contain table 7.3.1.1.2-3: Precoding information and number of layers for 4 antenna ports, if transformPrecoder= enabled, or if transformPrecoder=disabled and maxRank = 1 // next four columns contain table 7.3.1.1.2-4: Precoding information and number of layers, for 2 antenna ports, if transformPrecoder=disabled and maxRank = 2 // next four columns contain table 7.3.1.1.2-5: Precoding information and number of layers, for 2 antenna ports, if transformPrecoder= enabled, or if transformPrecoder= disabled and maxRank = 1 -uint8_t table_7_3_1_1_2_2_3_4_5[63][20] = { +uint8_t table_7_3_1_1_2_2_3_4_5[64][20] = { {1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 0, 2, 0, 1, 2, 0, 0}, @@ -1135,7 +1135,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fa const uint16_t n_RB_ULBWP = 106; const uint16_t n_RB_DLBWP = 106; -printf(">>> nr_ue_process_dci at MAC layer"); +printf("\n>>> nr_ue_process_dci at MAC layer with dci_format=%d\n",dci_format); switch(dci_format){ case format0_0: @@ -1547,19 +1547,19 @@ printf(">>> nr_ue_process_dci at MAC layer"); * 28 DAI_: For format1_1: 4 if more than one serving cell are configured in the DL and the higher layer parameter HARQ-ACK-codebook=dynamic, where the 2 MSB bits are the counter DAI and the 2 LSB bits are the total DAI * 33 TPC_PUCCH: */ - dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH; dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.rnti = rnti; + //fapi_nr_dl_config_dlsch_pdu_rel15_t dlsch_config_pdu_1_0 = dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.dlsch_config_rel15; fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu_1_0 = &dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.dlsch_config_rel15; /* IDENTIFIER_DCI_FORMATS */ /* FREQ_DOM_RESOURCE_ASSIGNMENT_DL */ - nr_ue_process_dci_freq_dom_resource_assignment(NULL,&dlsch_config_pdu_1_0,0,n_RB_DLBWP,dci->freq_dom_resource_assignment_DL); + nr_ue_process_dci_freq_dom_resource_assignment(NULL,dlsch_config_pdu_1_0,0,n_RB_DLBWP,dci->freq_dom_resource_assignment_DL); /* TIME_DOM_RESOURCE_ASSIGNMENT */ - nr_ue_process_dci_time_dom_resource_assignment(NULL,&dlsch_config_pdu_1_0,dci->time_dom_resource_assignment,mac->mib->dmrs_TypeA_Position); + nr_ue_process_dci_time_dom_resource_assignment(NULL,dlsch_config_pdu_1_0,dci->time_dom_resource_assignment,mac->mib->dmrs_TypeA_Position); /* VRB_TO_PRB_MAPPING */ dlsch_config_pdu_1_0->vrb_to_prb_mapping = (dci->vrb_to_prb_mapping == 0) ? vrb_to_prb_mapping_non_interleaved:vrb_to_prb_mapping_interleaved; /* MCS */ dlsch_config_pdu_1_0->mcs = dci->mcs; - /* NDI (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/ + /* NDI (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/ dlsch_config_pdu_1_0->ndi = dci->ndi; /* RV (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/ dlsch_config_pdu_1_0->rv = dci->rv; @@ -1590,9 +1590,45 @@ printf(">>> nr_ue_process_dci at MAC layer"); //if (dci->pucch_resource_ind == 7) dlsch_config_pdu_1_0->pucch_resource_id = 8; //pucch-ResourceId obtained from the 8th value of resourceList FIXME!! dlsch_config_pdu_1_0->pucch_resource_id = dci->pucch_resource_ind; /* PDSCH_TO_HARQ_FEEDBACK_TIME_IND (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI)*/ - dlsch_config_pdu_1_0-> pdsch_to_harq_feedback_time_ind = dci->pdsch_to_harq_feedback_time_ind; + dlsch_config_pdu_1_0->pdsch_to_harq_feedback_time_ind = dci->pdsch_to_harq_feedback_time_ind; dl_config->number_pdus = dl_config->number_pdus + 1; + + printf("\n>>> (nr_ue_procedures.c) rnti=%d dl_config->number_pdus=%d\n", + dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.rnti, + dl_config->number_pdus); + printf(">>> (nr_ue_procedures.c) frequency_domain_resource_assignment=%d \t number_rbs=%d \t start_rb=%d\n", + dci->freq_dom_resource_assignment_DL, + dlsch_config_pdu_1_0->number_rbs, + dlsch_config_pdu_1_0->start_rb); + printf(">>> (nr_ue_procedures.c) time_domain_resource_assignment=%d \t number_symbols=%d \t start_symbol=%d\n", + dci->time_dom_resource_assignment, + dlsch_config_pdu_1_0->number_symbols, + dlsch_config_pdu_1_0->start_symbol); + printf(">>> (nr_ue_procedures.c) vrb_to_prb_mapping=%d \n>>> mcs=%d\n>>> ndi=%d\n>>> rv=%d\n>>> harq_process_nbr=%d\n>>> dai=%d\n>>> scaling_factor_S=%d\n>>> tpc_pucch=%d\n>>> pucch_res_ind=%d\n>>> pdsch_to_harq_feedback_time_ind=%d\n", + dlsch_config_pdu_1_0->vrb_to_prb_mapping, + dlsch_config_pdu_1_0->mcs, + dlsch_config_pdu_1_0->ndi, + dlsch_config_pdu_1_0->rv, + dlsch_config_pdu_1_0->harq_process_nbr, + dlsch_config_pdu_1_0->dai, + dlsch_config_pdu_1_0->scaling_factor_S, + dlsch_config_pdu_1_0->accumulated_delta_PUCCH, + dlsch_config_pdu_1_0->pucch_resource_id, + dlsch_config_pdu_1_0->pdsch_to_harq_feedback_time_ind); + + dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH; + printf(">>> (nr_ue_procedures.c) pdu_type=%d\n\n",dl_config->dl_config_list[dl_config->number_pdus].pdu_type); + + if(mac->if_module != NULL && mac->if_module->dl_indication != NULL) + //printf(">>> mac->if_module->dl_indication(&mac->phy_config); \n"); + //for (int k=0;k<1000;k++) printf(">>> %d ",k); + //mac->if_module->dl_indication(&mac->dl_info); + //mac->if_module->dl_indication(&mac->dl_config_request); + mac->if_module->dl_indication(&mac->phy_config); + + + break; case format1_1: @@ -1633,9 +1669,9 @@ printf(">>> nr_ue_process_dci at MAC layer"); /* BANDWIDTH_PART_IND */ dlsch_config_pdu_1_1->bandwidth_part_ind = dci->bandwidth_part_ind; /* FREQ_DOM_RESOURCE_ASSIGNMENT_DL */ - nr_ue_process_dci_freq_dom_resource_assignment(NULL,&dlsch_config_pdu_1_1,0,n_RB_DLBWP,dci->freq_dom_resource_assignment_DL); + nr_ue_process_dci_freq_dom_resource_assignment(NULL,dlsch_config_pdu_1_1,0,n_RB_DLBWP,dci->freq_dom_resource_assignment_DL); /* TIME_DOM_RESOURCE_ASSIGNMENT */ - nr_ue_process_dci_time_dom_resource_assignment(NULL,&dlsch_config_pdu_1_1,dci->time_dom_resource_assignment,mac->mib->dmrs_TypeA_Position); + nr_ue_process_dci_time_dom_resource_assignment(NULL,dlsch_config_pdu_1_1,dci->time_dom_resource_assignment,mac->mib->dmrs_TypeA_Position); /* VRB_TO_PRB_MAPPING */ if (mac->phy_config.config_req.dl_bwp_dedicated.pdsch_config_dedicated.resource_allocation != 0) dlsch_config_pdu_1_1->vrb_to_prb_mapping = (dci->vrb_to_prb_mapping == 0) ? vrb_to_prb_mapping_non_interleaved:vrb_to_prb_mapping_interleaved; @@ -1660,7 +1696,7 @@ printf(">>> nr_ue_process_dci at MAC layer"); /* HARQ_PROCESS_NUMBER */ dlsch_config_pdu_1_1->harq_process_nbr = dci->harq_process_number; /* DAI */ - dlsch_config_pdu_1_0->dai = dci ->dai; + dlsch_config_pdu_1_1->dai = dci ->dai; /* TPC_PUCCH */ // according to TS 38.213 Table 7.2.1-1 if (dci->tpc_pucch == 0) dlsch_config_pdu_1_1->accumulated_delta_PUCCH = -1; @@ -1775,6 +1811,13 @@ printf(">>> nr_ue_process_dci at MAC layer"); //FIXME!!! dl_config->number_pdus = dl_config->number_pdus + 1; + + dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH; + printf(">>> (nr_ue_procedures.c) pdu_type=%d\n\n",dl_config->dl_config_list[dl_config->number_pdus].pdu_type); + + if(mac->if_module != NULL && mac->if_module->dl_indication != NULL) + mac->if_module->dl_indication(&mac->phy_config); + break; case format2_0: diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c index 3e9bb6285b..657b414714 100644 --- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c @@ -142,7 +142,8 @@ int8_t nr_ue_dl_indication(nr_downlink_indication_t *dl_info){ if(dl_info->dci_ind != NULL){ printf("[L2][IF MODULE][DL INDICATION][DCI_IND]\n"); - for(i=0; dl_info->dci_ind->number_of_dcis; ++i){ + for(i=0; idci_ind->number_of_dcis; ++i){ + //printf(">>>NR_IF_Module i=%d, dl_info->dci_ind->number_of_dcis=%d\n",i,dl_info->dci_ind->number_of_dcis); fapi_nr_dci_pdu_rel15_t *dci = &dl_info->dci_ind->dci_list[i].dci; ret_mask |= (handle_dci( @@ -193,7 +194,6 @@ int8_t nr_ue_dl_indication(nr_downlink_indication_t *dl_info){ break; }*/ - //(dl_info->dci_list+i)->rnti From 70e0bba3d72d9e7878671de779841b58653725cb Mon Sep 17 00:00:00 2001 From: hongzhi wang Date: Wed, 3 Oct 2018 15:31:34 +0200 Subject: [PATCH 287/379] NR PDCCH development: validation modification dci_nr.c file --- openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 64 +++++++-------------------- 1 file changed, 16 insertions(+), 48 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index 465e278c0c..59412aa469 100755 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -3162,31 +3162,9 @@ printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_unscrambling)-> (c_init=%d, n_id=%d, #endif } - -#ifdef NR_PDCCH_DCI_DEBUG -//k = 0; -//for (int j = 0; j < length; j++){ -// if ((j%32==0) && (j!=0)) k++; -// if ((j%2 == 0) && ((*(char*) &z[(int)floor(i/2)]) > 0)) { -// unscrambled[k] = (unscrambled[k]<<1) + 1; -// } -// if ((j%2 == 0) && ((*(char*) &z[(int)floor(i/2)]) <= 0)) { -// unscrambled[k] = (unscrambled[k]<<1) + 0; -// } -// if ((j%2 == 1) && ((*(1 + (char*) &z[(int)floor(i/2)])) > 0)) { -// unscrambled[k] = (unscrambled[k]<<1) + 1; -// } -// if ((j%2 == 1) && ((*(1 + (char*) &z[(int)floor(i/2)])) <= 0)) { -// unscrambled[k] = (unscrambled[k]<<1) + 0; -// } -//} -//for (int p=0; p after scrambling, unscrambled[%d]=%x\n",p,unscrambled[p]); -#endif - - } +#if 0 void nr_pdcch_unscrambling_tmp(uint16_t crnti, NR_DL_FRAME_PARMS *frame_parms, uint8_t nr_tti_rx, double llr[], uint32_t length, uint16_t pdcch_DMRS_scrambling_id, int do_common) { @@ -3233,7 +3211,6 @@ printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_unscrambling)-> (c_init=%d, n_id=%d, } -#if 0 void nr_pdcch_unscrambling_old(uint16_t crnti, NR_DL_FRAME_PARMS *frame_parms, uint8_t nr_tti_rx, int8_t* llr, uint32_t length, uint16_t pdcch_DMRS_scrambling_id, int do_common) { @@ -3939,21 +3916,20 @@ int get_nCCE_offset_l1(int *CCE_table, #ifdef NR_PDCCH_DCI_RUN -void nr_dci_decoding_procedure0(int s, //x +void nr_dci_decoding_procedure0(int s, int p, int coreset_time_dur, - uint16_t coreset_nbr_rb, //x - NR_UE_PDCCH **pdcch_vars, //x - int do_common, //x - //dci_detect_mode_t mode, //not sure if necessary - uint8_t nr_tti_rx, //x - NR_DCI_ALLOC_t *dci_alloc, //x - int16_t eNB_id, //x - uint8_t current_thread_id, //x + uint16_t coreset_nbr_rb, + NR_UE_PDCCH **pdcch_vars, + int do_common, + uint8_t nr_tti_rx, + NR_DCI_ALLOC_t *dci_alloc, + int16_t eNB_id, + uint8_t current_thread_id, NR_DL_FRAME_PARMS *frame_parms, - t_nrPolar_paramsPtr *nrPolar_params, //x + t_nrPolar_paramsPtr *nrPolar_params, uint8_t mi, - uint16_t crc_scrambled_values[13], //x + uint16_t crc_scrambled_values[TOTAL_NBR_SCRAMBLED_VALUES], uint8_t L, NR_UE_SEARCHSPACE_CSS_DCI_FORMAT_t format_css, NR_UE_SEARCHSPACE_USS_DCI_FORMAT_t format_uss, @@ -5407,8 +5383,10 @@ uint8_t nr_dci_decoding_procedure(int s, uint16_t n_RB_ULBWP, uint16_t n_RB_DLBWP, crc_scrambled_t *crc_scrambled, - format_found_t *format_found) { + format_found_t *format_found, + uint16_t crc_scrambled_values[TOTAL_NBR_SCRAMBLED_VALUES]) { // uint8_t dci_fields_sizes[NBR_NR_DCI_FIELDS][NBR_NR_FORMATS], + for (int n=0; n<13; n++) printf("################ 2 crc_scrambled_values[%d]=%d\n",n,crc_scrambled_values[n]); #ifdef NR_PDCCH_DCI_DEBUG printf("\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure) nr_tti_rx=%d n_RB_ULBWP=%d n_RB_DLBWP=%d format_found=%d\n", @@ -5437,18 +5415,7 @@ uint8_t nr_dci_decoding_procedure(int s, NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; t_nrPolar_paramsPtr *nrPolar_params = &ue->nrPolar_params; uint8_t mi;// = get_mi(&ue->frame_parms, nr_tti_rx); - // we need to initialize this values as crc is going to be compared with them - //uint16_t c_rnti=pdcch_vars[eNB_id]->crnti; - uint16_t c_rnti=pdcch_vars2->crnti; //to be removed FIXME!!! - printf("c_rnti=%d\n",c_rnti); - uint16_t cs_rnti,new_rnti,tc_rnti; - uint16_t p_rnti=P_RNTI; - uint16_t si_rnti=SI_RNTI; - uint16_t ra_rnti=3; //at the moment this value is hardcoded FIXME!!! - uint16_t sp_csi_rnti,sfi_rnti,int_rnti,tpc_pusch_rnti,tpc_pucch_rnti,tpc_srs_rnti; //FIXME !!! - uint16_t crc_scrambled_values[13] = {c_rnti,cs_rnti,new_rnti,tc_rnti,p_rnti,si_rnti,ra_rnti,sp_csi_rnti,sfi_rnti,int_rnti,tpc_pusch_rnti,tpc_pucch_rnti,tpc_srs_rnti}; - - //uint8_t format0_found = 0, format_c_found = 0; + uint8_t tmode = ue->transmission_mode[eNB_id]; uint8_t frame_type = frame_parms->frame_type; @@ -5458,6 +5425,7 @@ uint8_t nr_dci_decoding_procedure(int s, uint8_t format_2_1_size_bits = 0, format_2_1_size_bytes = 0; //FIXME uint8_t format_2_2_size_bits = 0, format_2_2_size_bytes = 0; //FIXME uint8_t format_2_3_size_bits = 0, format_2_3_size_bytes = 0; //FIXME + /* * * The implementation of this function will depend on the information given by the searchSpace IE From 64959754f485e4f1a6a90cc4f689edc1a15a4cd8 Mon Sep 17 00:00:00 2001 From: laurent Date: Wed, 3 Oct 2018 19:49:54 +0200 Subject: [PATCH 288/379] changed CI for ulsim and fixed one bug in ulsim options parsing --- cmake_targets/autotests/test_case_list.xml | 12 ++++++------ openair1/SIMULATION/LTE_PHY/ulsim.c | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index f0b3256015..e7f274c2d0 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -990,12 +990,12 @@ $OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash $OPENAIR_DIR/targets/bin/ulsim.Rel14 - -B25 -m5 -y1 -gN -x1 -s6 -w1.0 -e.1 -P -n500 -O70 - -B25 -m16 -y1 -gN -x1 -s12 -w1.0 -e.1 -P -n500 -O70 - -B50 -m5 -y1 -gN -x1 -s6 -w1.0 -e.1 -P -n500 -O70 - -B50 -m16 -y1 -gN -x1 -s12 -w1.0 -e.1 -P -n500 -O70 - -B100 -m5 -y1 -gN -x1 -s6 -w1.0 -e.1 -P -n500 -O70 - -B100 -m16 -y1 -gN -x1 -s12 -w1.0 -e.1 -P -n500 -O70 + -BnbRBs=25 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 + -BnbRBs=25 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 + -BnbRBs=50 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 + -BnbRBs=50 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 + -BnbRBs=100 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 + -BnbRBs=100 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 ulsim.test1 ulsim.test2 ulsim.test3 ulsim.test4 ulsim.test5 ulsim.test6 "passed" segmentation fault|assertion|exiting|fatal diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index eecee64c84..e1a57cf898 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -487,7 +487,7 @@ int main(int argc, char **argv) { { "mcs", "The MCS to use", 0, iptr:&mcs, defintval:10, TYPE_INT, 0 }, { "nb_frame", "number of frame in a test",0, iptr:&n_frames, defintval:1, TYPE_INT, 0 }, { "snr", "starting snr", 0, dblptr:&snr0, defdblval:-2.9, TYPE_DOUBLE, 0 }, - { "w_snr_int", "snr int ?", 0, dblptr:&snr_int, defdblval:30, TYPE_DOUBLE, 0 }, + { "wsnrInterrupt", "snr int ?", 0, dblptr:&snr_int, defdblval:30, TYPE_DOUBLE, 0 }, { "e_snr_step", "step increasint snr",0, dblptr:&input_snr_step, defdblval:0.2, TYPE_DOUBLE, 0 }, { "rb_dynamic", "number of rb in dynamic allocation",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, { "first_rb", "first rb used in dynamic allocation",0, iptr:&first_rb, defintval:0, TYPE_INT, 0 }, @@ -608,10 +608,11 @@ int main(int argc, char **argv) { }; struct tmp *ptr; - for (ptr=tmp; tmp->opt!=0; ptr++) + for (ptr=tmp; ptr->opt!=0; ptr++) if ( ptr->opt == optarg[0] ) { channel_model=ptr->m; chMod=ptr->M; + break; } AssertFatal(ptr->opt != 0, "Unsupported channel model: %s !\n", optarg ); From 39fd45946642277c9ae0b146d0c9f394622f4457 Mon Sep 17 00:00:00 2001 From: Agustin Date: Thu, 4 Oct 2018 18:03:31 +0200 Subject: [PATCH 289/379] NR PDCCH development warning clean up --- .../nfapi/public_inc/fapi_nr_ue_interface.h | 2 + openair1/PHY/NR_REFSIG/nr_dmrs_rx.c | 5 +- openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 117 +++++++++--------- openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c | 14 +-- .../PHY/NR_UE_TRANSPORT/nr_initial_sync.c | 2 +- openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c | 5 +- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 77 +++++++++--- openair1/SCHED_NR_UE/pucch_uci_ue_nr.c | 54 ++++++++ openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 8 +- targets/RT/USER/nr-uesoftmodem.c | 16 +-- 10 files changed, 205 insertions(+), 95 deletions(-) diff --git a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h index a1f4d3b856..6feecc68f4 100644 --- a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h +++ b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h @@ -233,6 +233,7 @@ typedef struct { uint8_t bandwidth_part_ind; uint16_t number_rbs; uint16_t start_rb; + uint8_t frame_offset; uint16_t number_symbols; uint16_t start_symbol; pusch_freq_hopping_t pusch_freq_hopping; @@ -302,6 +303,7 @@ typedef struct { uint8_t bandwidth_part_ind; uint16_t number_rbs; uint16_t start_rb; + uint8_t frame_offset; uint16_t number_symbols; uint16_t start_symbol; uint8_t prb_bundling_size_ind; diff --git a/openair1/PHY/NR_REFSIG/nr_dmrs_rx.c b/openair1/PHY/NR_REFSIG/nr_dmrs_rx.c index e2ca70d82f..3c58f5535d 100644 --- a/openair1/PHY/NR_REFSIG/nr_dmrs_rx.c +++ b/openair1/PHY/NR_REFSIG/nr_dmrs_rx.c @@ -115,7 +115,8 @@ int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue, unsigned short nb_rb_pdsch) { int32_t qpsk[4],nqpsk[4],*qpsk_p, n; - int w,mprime,ind,l,ind_dword,ind_qpsk_symb,kp,lp, config_type, k; + //int w,mprime,ind,l,ind_dword,ind_qpsk_symb,kp,lp, config_type, k; + int w,ind,ind_dword,ind_qpsk_symb,kp,lp, config_type, k=0; short pamp; typedef int array_of_w[2]; @@ -196,7 +197,7 @@ int nr_pdcch_dmrs_rx(PHY_VARS_NR_UE *ue, { uint8_t idx=0; - uint8_t pdcch_rb_offset =0; + //uint8_t pdcch_rb_offset =0; //nr_gold_pdcch += ((int)floor(ue->frame_parms.ssb_start_subcarrier/12)+pdcch_rb_offset)*3/32; if (p==2000) { diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index 59412aa469..2f44497d04 100755 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -390,8 +390,8 @@ symbol 0 | ... bundle 3 bundle 6 */ int c=0,r=0; - uint16_t bundle_j=0, f_bundle_j,f_reg; - uint32_t coreset_C; + uint16_t bundle_j=0, f_bundle_j=0,f_reg=0; + uint32_t coreset_C=0; uint16_t index_z, index_llr; int coreset_interleaved = 0; @@ -504,7 +504,7 @@ void nr_pdcch_demapping(uint16_t *llr, uint16_t *wbar, #endif //0 #endif - +#if 0 void pdcch_demapping(uint16_t *llr,uint16_t *wbar,NR_DL_FRAME_PARMS *frame_parms,uint8_t num_pdcch_symbols,uint8_t mi) { @@ -610,8 +610,9 @@ void pdcch_demapping(uint16_t *llr,uint16_t *wbar,NR_DL_FRAME_PARMS *frame_parms } // kprime loop } +#endif //0 -static uint16_t wtemp_rx[Msymb]; +//static uint16_t wtemp_rx[Msymb]; #if 0 #ifdef NR_PDCCH_DCI_RUN @@ -691,7 +692,7 @@ void nr_pdcch_deinterleaving(NR_DL_FRAME_PARMS *frame_parms, uint16_t *z, - +#if 0 void pdcch_deinterleaving(NR_DL_FRAME_PARMS *frame_parms,uint16_t *z, uint16_t *wbar,uint8_t number_pdcch_symbols,uint8_t mi) { @@ -794,8 +795,9 @@ void pdcch_deinterleaving(NR_DL_FRAME_PARMS *frame_parms,uint16_t *z, uint16_t * } } +#endif //0 - +#if 0 int32_t pdcch_qpsk_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms, int32_t **rxdataF_comp, int32_t **rxdataF_comp_i, @@ -845,7 +847,7 @@ int32_t pdcch_qpsk_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms, return(0); } - +#endif //0 #ifdef NR_PDCCH_DCI_RUN int32_t nr_pdcch_llr(NR_DL_FRAME_PARMS *frame_parms, int32_t **rxdataF_comp, @@ -861,7 +863,7 @@ int32_t nr_pdcch_llr(NR_DL_FRAME_PARMS *frame_parms, int32_t **rxdataF_comp, printf("pdcch_qpsk_llr: llr is null, symbol %d\n", symbol); return (-1); } -#ifdef NR_PDCCH_DCI_DEBUG +#ifndef NR_PDCCH_DCI_DEBUG printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_llr)-> llr logs: pdcch qpsk llr for symbol %d (pos %d), llr offset %d\n",symbol,(symbol*frame_parms->N_RB_DL*12),pdcch_llr8-pdcch_llr); #endif //for (i = 0; i < (frame_parms->N_RB_DL * ((symbol == 0) ? 16 : 24)); i++) { @@ -1219,10 +1221,11 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF, // after removing the 3 DMRS RE, the RB contains 9 RE with PDCCH #define NBR_RE_PER_RB_WITHOUT_DMRS 9 - uint16_t c_rb, c_rb_tmp, rb, nb_rb = 0; + uint16_t c_rb, nb_rb = 0; // this variable will be incremented by 1 each time a bit set to '0' is found in coreset_freq_dom bitmap uint16_t offset_discontiguous=0; - uint8_t rb_count_bit,i, j, aarx, bitcnt_coreset_freq_dom=0; + //uint8_t rb_count_bit; + uint8_t i, j, aarx, bitcnt_coreset_freq_dom=0; int32_t *dl_ch0, *dl_ch0_ext, *rxF, *rxF_ext; int nushiftmod3 = frame_parms->nushift % 3; uint8_t symbol_mod; @@ -1294,7 +1297,7 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF, c_rb = c_rb + BIT_TO_NBR_RB_CORESET_FREQ_DOMAIN; offset_discontiguous ++; #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> we entered here as coreset_freq_dom=%llx (bit %d) is 0, coreset_freq_domain is discontiguous\n",coreset_freq_dom,(46 - bitcnt_coreset_freq_dom)); + printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> we entered here as coreset_freq_dom=%lx (bit %d) is 0, coreset_freq_domain is discontiguous\n",coreset_freq_dom,(46 - bitcnt_coreset_freq_dom)); #endif } } @@ -2631,9 +2634,9 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, if (searchSpaceType == ue_specific) do_common=0; uint8_t log2_maxh, aatx, aarx; int32_t avgs; - uint8_t n_pdcch_symbols; + //uint8_t n_pdcch_symbols; // the variable mi can be removed for NR - uint8_t mi = get_mi(frame_parms, nr_tti_rx); + //uint8_t mi = get_mi(frame_parms, nr_tti_rx); /* * The following variables have been extracted from higher layer parameters @@ -2683,9 +2686,9 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, NR_UE_CORESET_REG_bundlesize_t reg_bundle_size_L = pdcch_vars2->coreset[nb_coreset_active].cce_reg_mappingType.reg_bundlesize; // higher-layer parameter CORESET-interleaver-size {2,3,6} NR_UE_CORESET_interleaversize_t coreset_interleaver_size_R= pdcch_vars2->coreset[nb_coreset_active].cce_reg_mappingType.interleaversize; - NR_UE_CORESET_precoder_granularity_t precoder_granularity = pdcch_vars2->coreset[nb_coreset_active].precoderGranularity; - int tci_statesPDCCH = pdcch_vars2->coreset[nb_coreset_active].tciStatesPDCCH; - int tci_present = pdcch_vars2->coreset[nb_coreset_active].tciPresentInDCI; + //NR_UE_CORESET_precoder_granularity_t precoder_granularity = pdcch_vars2->coreset[nb_coreset_active].precoderGranularity; + //int tci_statesPDCCH = pdcch_vars2->coreset[nb_coreset_active].tciStatesPDCCH; + //int tci_present = pdcch_vars2->coreset[nb_coreset_active].tciPresentInDCI; uint16_t pdcch_DMRS_scrambling_id = pdcch_vars2->coreset[nb_coreset_active].pdcchDMRSScramblingID; // The UE can be assigned 4 different BWP but only one active at a time. @@ -2700,7 +2703,7 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, // at the moment we are considering that the PDCCH is always starting at symbol 0 of current slot // the following code to initialize start_symbol must be activated once we implement PDCCH demapping on symbol not equal to 0 (considering symbol_mon) for (int i=0; i < 14; i++) { - if ((symbol_mon >> (i+1))&0x1 != 0) { + if (((symbol_mon >> (i+1))&0x1) != 0) { start_symbol = i; i=14; } @@ -2708,7 +2711,7 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, #ifdef NR_PDCCH_DCI_DEBUG printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> symbol_mon=(%d) and start_symbol=(%d)\n",symbol_mon,start_symbol); - printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> coreset_freq_dom=(%lld) n_rb_offset=(%d) coreset_time_dur=(%d) n_shift=(%d) reg_bundle_size_L=(%d) coreset_interleaver_size_R=(%d) \n", + printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> coreset_freq_dom=(%ld) n_rb_offset=(%d) coreset_time_dur=(%d) n_shift=(%d) reg_bundle_size_L=(%d) coreset_interleaver_size_R=(%d) \n", coreset_freq_dom,n_rb_offset,coreset_time_dur,n_shift,reg_bundle_size_L,coreset_interleaver_size_R); #endif @@ -2722,7 +2725,7 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, // this may lead to a modification in ue scheduler // indicates the number of active CORESETs for the current BWP to decode PDCCH: max is 3 (this variable is not useful here, to be removed) - uint8_t coreset_nbr_act; + //uint8_t coreset_nbr_act; // indicates the number of REG contained in the PDCCH (number of RBs * number of symbols, in CORESET) uint8_t coreset_nbr_reg; uint32_t coreset_C; @@ -2732,7 +2735,7 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, // for each active CORESET (max number of active CORESETs in a BWP is 3), // we calculate the number of RB for each CORESET bitmap #ifdef NR_PDCCH_DCI_DEBUG - printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> coreset_freq_dom=(%lld)\n",coreset_freq_dom); + printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> coreset_freq_dom=(%ld)\n",coreset_freq_dom); #endif int i; //for each bit in the coreset_freq_dom bitmap for (i = 0; i < 45; i++) { @@ -2741,7 +2744,7 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, } coreset_nbr_rb = 6 * coreset_nbr_rb; // coreset_nbr_rb has to be multiplied by 6 to indicate the number of PRB or REG(=12 RE) within the CORESET #ifdef NR_PDCCH_DCI_DEBUG - printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> coreset_freq_dom=(%lld,%llx), coreset_nbr_rb=%d\n", coreset_freq_dom,coreset_freq_dom,coreset_nbr_rb); + printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> coreset_freq_dom=(%ld,%lx), coreset_nbr_rb=%d\n", coreset_freq_dom,coreset_freq_dom,coreset_nbr_rb); #endif coreset_nbr_reg = coreset_time_dur * coreset_nbr_rb; coreset_C = (uint32_t)(coreset_nbr_reg / (reg_bundle_size_L * coreset_interleaver_size_R)); @@ -3066,10 +3069,10 @@ nr_pdcch_demapping_deinterleaving(pdcch_vars[eNB_id]->llr, nr_tti_rx, pdcch_vars[eNB_id]->e_rx, get_nCCE(n_pdcch_symbols,frame_parms,mi)*72); -*/ + pdcch_vars[eNB_id]->num_pdcch_symbols = n_pdcch_symbols; - +*/ #ifdef NR_PDCCH_DCI_DEBUG printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> Ending nr_rx_pdcch() function\n"); #endif @@ -3754,7 +3757,7 @@ uint8_t generate_dci_top_emul(PHY_VARS_eNB *phy_vars_eNB, #endif -static uint8_t dci_decoded_output[RX_NB_TH][(MAX_DCI_SIZE_BITS+64)/8]; +//static uint8_t dci_decoded_output[RX_NB_TH][(MAX_DCI_SIZE_BITS+64)/8]; /*uint16_t get_nCCE(uint8_t num_pdcch_symbols,NR_DL_FRAME_PARMS *frame_parms,uint8_t mi) { @@ -3928,7 +3931,7 @@ void nr_dci_decoding_procedure0(int s, uint8_t current_thread_id, NR_DL_FRAME_PARMS *frame_parms, t_nrPolar_paramsPtr *nrPolar_params, - uint8_t mi, + //uint8_t mi, uint16_t crc_scrambled_values[TOTAL_NBR_SCRAMBLED_VALUES], uint8_t L, NR_UE_SEARCHSPACE_CSS_DCI_FORMAT_t format_css, @@ -3972,7 +3975,7 @@ void nr_dci_decoding_procedure0(int s, //} #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> frequencyDomainResources=%llx, duration=%d\n", + printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> frequencyDomainResources=%lx, duration=%d\n", pdcch_vars[eNB_id]->coreset[p].frequencyDomainResources, pdcch_vars[eNB_id]->coreset[p].duration); #endif @@ -4158,7 +4161,7 @@ void nr_dci_decoding_procedure0(int s, printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0: polar decoding)-> polar intput (with coreset_time_dur=%d, coreset_nbr_rb=%d, p=%d, CCEind=%d): \n", coreset_time_dur,coreset_nbr_rb,p,CCEind); #endif - int reg_p,reg_e; + int reg_p=0,reg_e=0; for (int m=0; m < (L2*6); m++){ reg_p = (((int)floor(m/coreset_time_dur))+((m%coreset_time_dur)*(L2*6/coreset_time_dur)))*9*2; reg_e = m*9*2; @@ -4243,7 +4246,6 @@ uint16_t rnti=3; if (crc == crc_scrambled_values[_RA_RNTI_]) { *crc_scrambled =_ra_rnti; *format_found=_format_1_0_found; - printf(""); } if (crc == crc_scrambled_values[_SP_CSI_RNTI_]) { *crc_scrambled =_sp_csi_rnti; @@ -4292,49 +4294,53 @@ uint16_t rnti=3; if ((*crc_scrambled == _p_rnti) || (*crc_scrambled == _si_rnti) || (*crc_scrambled == _ra_rnti)){ dci_alloc[*dci_cnt].format = format1_0; *dci_cnt = *dci_cnt + 1; - format_found=_format_1_0_found; - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> a format1_0=%d and dci_cnt=%d\n",format_found,*dci_cnt); + *format_found=_format_1_0_found; + printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> a format1_0=%d and dci_cnt=%d\n",*format_found,*dci_cnt); } else { - if (dci_estimation[0]&1 == 0){ + if ((dci_estimation[0]&1) == 0){ dci_alloc[*dci_cnt].format = format0_0; *dci_cnt = *dci_cnt + 1; - format_found=_format_0_0_found; - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> b format0_0=%d and dci_cnt=%d\n",format_found,*dci_cnt); + *format_found=_format_0_0_found; + printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> b format0_0=%d and dci_cnt=%d\n",*format_found,*dci_cnt); } - if (dci_estimation[0]&1 == 1){ + if ((dci_estimation[0]&1) == 1){ dci_alloc[*dci_cnt].format = format1_0; *dci_cnt = *dci_cnt + 1; - format_found=_format_1_0_found; - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> c format1_0=%d and dci_cnt=%d\n",format_found,*dci_cnt); + *format_found=_format_1_0_found; + printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> c format1_0=%d and dci_cnt=%d\n",*format_found,*dci_cnt); } } } if (format_css == cformat2_0){ dci_alloc[*dci_cnt].format = format2_0; *dci_cnt = *dci_cnt + 1; + *format_found=_format_2_0_found; } if (format_css == cformat2_1){ dci_alloc[*dci_cnt].format = format2_1; *dci_cnt = *dci_cnt + 1; + *format_found=_format_2_1_found; } if (format_css == cformat2_2){ dci_alloc[*dci_cnt].format = format2_2; *dci_cnt = *dci_cnt + 1; + *format_found=_format_2_2_found; } if (format_css == cformat2_3){ dci_alloc[*dci_cnt].format = format2_3; *dci_cnt = *dci_cnt + 1; + *format_found=_format_2_3_found; } if (format_uss == uformat0_1_and_1_1){ - if (dci_estimation[0]&1 == 0){ + if ((dci_estimation[0]&1) == 0){ dci_alloc[*dci_cnt].format = format0_1; *dci_cnt = *dci_cnt + 1; - format_found=_format_0_1_found; + *format_found=_format_0_1_found; } - if (dci_estimation[0]&1 == 1){ + if ((dci_estimation[0]&1) == 1){ dci_alloc[*dci_cnt].format = format1_1; *dci_cnt = *dci_cnt + 1; - format_found=_format_1_1_found; + *format_found=_format_1_1_found; } } // store first nCCE of group for PUCCH transmission of ACK/NAK @@ -4928,10 +4934,10 @@ uint16_t nr_dci_format_size (PHY_VARS_NR_UE *ue, // 7 BANDWIDTH_PART_IND // number of UL BWPs configured by higher layers uint8_t n_UL_BWP_RRC=1; // initialized to 1 but it has to be initialized by higher layers FIXME!!! - (n_UL_BWP_RRC > 3)?n_UL_BWP_RRC:(n_UL_BWP_RRC+1); + n_UL_BWP_RRC = ((n_UL_BWP_RRC > 3)?n_UL_BWP_RRC:(n_UL_BWP_RRC+1)); // number of DL BWPs configured by higher layers uint8_t n_DL_BWP_RRC=1; // initialized to 1 but it has to be initialized by higher layers FIXME!!! - (n_DL_BWP_RRC > 3)?n_DL_BWP_RRC:(n_DL_BWP_RRC+1); + n_DL_BWP_RRC = ((n_DL_BWP_RRC > 3)?n_DL_BWP_RRC:(n_DL_BWP_RRC+1)); // 10 FREQ_DOM_RESOURCE_ASSIGNMENT_UL @@ -4958,7 +4964,7 @@ uint16_t nr_dci_format_size (PHY_VARS_NR_UE *ue, ul_res_alloc_type_0 = 1; ul_res_alloc_type_1 = 1; } - uint8_t n_bits_freq_dom_res_assign_ul,n_ul_RGB_tmp; + uint8_t n_bits_freq_dom_res_assign_ul=0,n_ul_RGB_tmp; if (ul_res_alloc_type_0 == 1){ // implementation of Table 6.1.2.2.1-1 TC 38.214 subclause 6.1.2.2.1 // config1: PUSCH-Config IE contains rbg-Size ENUMERATED {config1 config2} ul_rgb_Size_t config = pusch_config.ul_rgbSize; @@ -4985,7 +4991,7 @@ uint16_t nr_dci_format_size (PHY_VARS_NR_UE *ue, dl_res_alloc_type_0 = 1; dl_res_alloc_type_1 = 1; } - uint8_t n_bits_freq_dom_res_assign_dl,n_dl_RGB_tmp; + uint8_t n_bits_freq_dom_res_assign_dl=0,n_dl_RGB_tmp; if (dl_res_alloc_type_0 == 1){ // implementation of Table 5.1.2.2.1-1 TC 38.214 subclause 6.1.2.2.1 // config1: PDSCH-Config IE contains rbg-Size ENUMERATED {config1, config2} dl_rgb_Size_t config = pdsch_config.dl_rgbSize; @@ -5386,7 +5392,6 @@ uint8_t nr_dci_decoding_procedure(int s, format_found_t *format_found, uint16_t crc_scrambled_values[TOTAL_NBR_SCRAMBLED_VALUES]) { // uint8_t dci_fields_sizes[NBR_NR_DCI_FIELDS][NBR_NR_FORMATS], - for (int n=0; n<13; n++) printf("################ 2 crc_scrambled_values[%d]=%d\n",n,crc_scrambled_values[n]); #ifdef NR_PDCCH_DCI_DEBUG printf("\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure) nr_tti_rx=%d n_RB_ULBWP=%d n_RB_DLBWP=%d format_found=%d\n", @@ -5405,7 +5410,7 @@ uint8_t nr_dci_decoding_procedure(int s, uint16_t pdcch_DMRS_scrambling_id = pdcch_vars2->coreset[p].pdcchDMRSScramblingID; uint64_t coreset_freq_dom = pdcch_vars2->coreset[p].frequencyDomainResources; int coreset_time_dur = pdcch_vars2->coreset[p].duration; - uint16_t coreset_nbr_rb; + uint16_t coreset_nbr_rb=0; for (int i = 0; i < 45; i++) { // this loop counts each bit of the bit map coreset_freq_dom, and increments nbr_RB_coreset for each bit set to '1' if (((coreset_freq_dom & 0x1FFFFFFFFFFF) >> i) & 0x1) coreset_nbr_rb++; @@ -5414,10 +5419,10 @@ uint8_t nr_dci_decoding_procedure(int s, // coreset_time_dur,coreset_nbr_rb, NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; t_nrPolar_paramsPtr *nrPolar_params = &ue->nrPolar_params; - uint8_t mi;// = get_mi(&ue->frame_parms, nr_tti_rx); + //uint8_t mi;// = get_mi(&ue->frame_parms, nr_tti_rx); - uint8_t tmode = ue->transmission_mode[eNB_id]; - uint8_t frame_type = frame_parms->frame_type; + //uint8_t tmode = ue->transmission_mode[eNB_id]; + //uint8_t frame_type = frame_parms->frame_type; uint8_t format_0_0_1_0_size_bits = 0, format_0_0_1_0_size_bytes = 0; //FIXME uint8_t format_0_1_1_1_size_bits = 0, format_0_1_1_1_size_bytes = 0; //FIXME @@ -5508,7 +5513,7 @@ uint8_t nr_dci_decoding_procedure(int s, css_dci_format,(1<current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, + nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params, crc_scrambled_values, aggregationLevel, cformat0_0_and_1_0, uformat0_0_and_1_0, format_0_0_1_0_size_bits, format_0_0_1_0_size_bytes, &dci_cnt, @@ -5542,7 +5547,7 @@ uint8_t nr_dci_decoding_procedure(int s, #endif // for aggregation level 'aggregationLevelSFI'. The number of candidates (nrofCandidates-SFI) will be calculated in function nr_dci_decoding_procedure0 old_dci_cnt = dci_cnt; - nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, + nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params, crc_scrambled_values, aggregationLevelSFI, cformat2_0, uformat0_0_and_1_0, format_2_0_size_bits, format_2_0_size_bytes, &dci_cnt, @@ -5572,7 +5577,7 @@ uint8_t nr_dci_decoding_procedure(int s, #endif // for aggregation level 'aggregationLevelSFI'. The number of candidates (nrofCandidates-SFI) will be calculated in function nr_dci_decoding_procedure0 old_dci_cnt = dci_cnt; - nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, + nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params, crc_scrambled_values, aggregationLevel, cformat2_1, uformat0_0_and_1_0, format_2_1_size_bits, format_2_1_size_bytes, &dci_cnt, @@ -5602,7 +5607,7 @@ uint8_t nr_dci_decoding_procedure(int s, #endif // for aggregation level 'aggregationLevelSFI'. The number of candidates (nrofCandidates-SFI) will be calculated in function nr_dci_decoding_procedure0 old_dci_cnt = dci_cnt; - nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, + nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params, crc_scrambled_values, aggregationLevel, cformat2_2, uformat0_0_and_1_0, format_2_2_size_bits, format_2_2_size_bytes, &dci_cnt, @@ -5632,7 +5637,7 @@ uint8_t nr_dci_decoding_procedure(int s, #endif // for aggregation level 'aggregationLevelSFI'. The number of candidates (nrofCandidates-SFI) will be calculated in function nr_dci_decoding_procedure0 old_dci_cnt = dci_cnt; - nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params,mi, + nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 1, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms, nrPolar_params, crc_scrambled_values, aggregationLevel, cformat2_3, uformat0_0_and_1_0, format_2_3_size_bits, format_2_3_size_bytes, &dci_cnt, @@ -5667,7 +5672,7 @@ uint8_t nr_dci_decoding_procedure(int s, css_dci_format,(1<current_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, + nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 0, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms,nrPolar_params, crc_scrambled_values, aggregationLevel, cformat0_0_and_1_0, uformat0_0_and_1_0, format_0_0_1_0_size_bits, format_0_0_1_0_size_bytes, &dci_cnt, @@ -5699,7 +5704,7 @@ uint8_t nr_dci_decoding_procedure(int s, css_dci_format,(1<current_thread_id[nr_tti_rx], frame_parms,nrPolar_params, mi, + nr_dci_decoding_procedure0(s,p,coreset_time_dur,coreset_nbr_rb,pdcch_vars, 0, nr_tti_rx, dci_alloc, eNB_id, ue->current_thread_id[nr_tti_rx], frame_parms,nrPolar_params, crc_scrambled_values, aggregationLevel, cformat0_0_and_1_0, uformat0_1_and_1_1, format_0_1_1_1_size_bits, format_0_1_1_1_size_bytes, &dci_cnt, diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c index 86959ee66d..72c575d49f 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c @@ -7027,12 +7027,12 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue, * Note only format0_0 and format1_0 are implemented */ - uint8_t harq_pid=0; + //uint8_t harq_pid=0; uint8_t frame_type=frame_parms->frame_type; - uint8_t tpmi=0; - NR_UE_DLSCH_t *dlsch0=NULL,*dlsch1=NULL; - NR_DL_UE_HARQ_t *dlsch0_harq=NULL,*dlsch1_harq=NULL; - NR_UE_ULSCH_t *ulsch0=NULL,*ulsch1=NULL; + //uint8_t tpmi=0; + NR_UE_DLSCH_t *dlsch0=NULL;//*dlsch1=NULL; + NR_DL_UE_HARQ_t *dlsch0_harq=NULL;//*dlsch1_harq=NULL; + NR_UE_ULSCH_t *ulsch0=NULL;//*ulsch1=NULL; NR_DCI_INFO_EXTRACTED_t *ptr_nr_dci_info_extracted = nr_dci_info_extracted; @@ -7046,8 +7046,8 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue, - uint8_t dci_fields_sizes_format[NBR_NR_DCI_FIELDS] ={0}; - for (int m=0; mactive = 0; diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c index 095832128c..d64c0e916b 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c @@ -144,7 +144,7 @@ char prefix_string[2][9] = {"NORMAL","EXTENDED"}; int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode) { - int32_t sync_pos, sync_pos2, k_ssb, N_ssb_crb, sync_pos_slot; + int32_t sync_pos, sync_pos2, sync_pos_slot; // k_ssb, N_ssb_crb, int32_t metric_fdd_ncp=0; uint8_t phase_fdd_ncp; diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c index 11a1d54990..d98d866271 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c @@ -648,7 +648,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, for (i=0; i<16; i++){ printf("unscrambling demod_pbch_e[%d] r = %2.3f i = %2.3f\n", i<<1 , demod_pbch_e[i<<1], demod_pbch_e[(i<<1)+1]);} //#endif - uint32_t pbch_out; +// uint32_t pbch_out; //polar decoding de-rate matching t_nrPolar_paramsPtr nrPolar_params = NULL, currentPtr = NULL; nr_polar_init(&nrPolar_params, @@ -673,7 +673,8 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, nr_pbch_unscrambling(nr_ue_pbch_vars,frame_parms->Nid_cell,nushift,M,NR_POLAR_PBCH_PAYLOAD_BITS,1); //payload deinterleaving - uint32_t in=0, out=0; + //uint32_t in=0; + uint32_t out=0; for (int i=0; i<32; i++) { out |= ((nr_ue_pbch_vars->pbch_a_interleaved>>i)&1)<<(pbch_deinterleaving_pattern[i]); diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 8966bbb821..6048c741de 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -89,7 +89,51 @@ fifo_dump_emos_UE emos_dump_UE; extern double cpuf; +int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, + uint32_t frame, + uint8_t nr_tti_rx, + uint8_t eNB_id, + MIMO_mode_t mimo_mode, + uint32_t high_speed_flag, + uint8_t is_secondary_ue, + int nb_coreset_active, + uint16_t symbol_mon, + NR_SEARCHSPACE_TYPE_t searchSpaceType); +uint8_t nr_dci_decoding_procedure(int s, + int p, + PHY_VARS_NR_UE *ue, + NR_DCI_ALLOC_t *dci_alloc, + NR_SEARCHSPACE_TYPE_t searchSpacetype, + int16_t eNB_id, + uint8_t nr_tti_rx, + uint8_t dci_fields_sizes_cnt[MAX_NR_DCI_DECODED_SLOT][NBR_NR_DCI_FIELDS][NBR_NR_FORMATS], + uint16_t n_RB_ULBWP, + uint16_t n_RB_DLBWP, + crc_scrambled_t *crc_scrambled, + format_found_t *format_found, + uint16_t crc_scrambled_values[TOTAL_NBR_SCRAMBLED_VALUES]); + +int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue, + uint8_t eNB_id, + int frame, + uint8_t nr_tti_rx, + uint32_t dci_pdu[4], + uint16_t rnti, + uint8_t dci_length, + NR_DCI_format_t dci_format, + NR_UE_PDCCH *pdcch_vars, + NR_UE_PDSCH *pdsch_vars, + NR_UE_DLSCH_t **dlsch, + NR_UE_ULSCH_t *ulsch, + NR_DL_FRAME_PARMS *frame_parms, + PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated, + uint8_t beamforming_mode, + uint8_t dci_fields_sizes[NBR_NR_DCI_FIELDS][NBR_NR_FORMATS], + uint16_t n_RB_ULBWP, + uint16_t n_RB_DLBWP, + uint16_t crc_scrambled_values[TOTAL_NBR_SCRAMBLED_VALUES], + NR_DCI_INFO_EXTRACTED_t *nr_dci_info_extracted); #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706) extern uint32_t downlink_frequency[MAX_NUM_CCs][4]; @@ -3155,7 +3199,7 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t * nr_tti_rx,nb_searchspace_total); #endif // p in TS 38.212 Subclause 10.1, for each active BWP the UE can deal with 3 different CORESETs (including coresetId 0 for common search space) - int nb_coreset_total = NR_NBR_CORESET_ACT_BWP; + //int nb_coreset_total = NR_NBR_CORESET_ACT_BWP; uint8_t dci_cnt=0; // this table contains 56 (NBR_NR_DCI_FIELDS) elements for each dci field and format described in TS 38.212. Each element represents the size in bits for each dci field //uint8_t dci_fields_sizes[NBR_NR_DCI_FIELDS][NBR_NR_FORMATS] = {0}; @@ -3191,7 +3235,7 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t * * To be implemented LATER !!! */ //int _offset,_index,_M; - int searchSpace_id = pdcch_vars2->searchSpace[nb_searchspace_active].searchSpaceId; + //int searchSpace_id = pdcch_vars2->searchSpace[nb_searchspace_active].searchSpaceId; /* * The following code has been removed as it is handled by higher layers (fapi) if (searchSpace_id == 0){ // Implementing TS 38.213 subclause 13, UE procedure for monitoring Type0-PDCCH common search space @@ -3221,16 +3265,16 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t * // the searchSpace indicates that we need to monitor PDCCH in current nr_tti_rx // get the parameters describing the current SEARCHSPACE // the CORESET id applicable to the current SearchSpace - int searchSpace_coreset_id = pdcch_vars2->searchSpace[nb_searchspace_active].controlResourceSetId; + //int searchSpace_coreset_id = pdcch_vars2->searchSpace[nb_searchspace_active].controlResourceSetId; // FIXME this variable is a bit string (14 bits) identifying every OFDM symbol in a slot. // at the moment we will not take into consideration this variable and we will consider that the OFDM symbol offset is always the first OFDM in a symbol uint16_t symbol_within_slot_mon = pdcch_vars2->searchSpace[nb_searchspace_active].monitoringSymbolWithinSlot; // get the remaining parameters describing the current SEARCHSPACE: // FIXME! To be defined where we get this information from - NR_UE_SEARCHSPACE_nbrCAND_t num_cand_L1 = pdcch_vars2->searchSpace[nb_searchspace_active].nrofCandidates_aggrlevel1; - NR_UE_SEARCHSPACE_nbrCAND_t num_cand_L2 = pdcch_vars2->searchSpace[nb_searchspace_active].nrofCandidates_aggrlevel2; - NR_UE_SEARCHSPACE_nbrCAND_t num_cand_L4 = pdcch_vars2->searchSpace[nb_searchspace_active].nrofCandidates_aggrlevel4; - NR_UE_SEARCHSPACE_nbrCAND_t num_cand_L8 = pdcch_vars2->searchSpace[nb_searchspace_active].nrofCandidates_aggrlevel8; - NR_UE_SEARCHSPACE_nbrCAND_t num_cand_L16 = pdcch_vars2->searchSpace[nb_searchspace_active].nrofCandidates_aggrlevel16; + //NR_UE_SEARCHSPACE_nbrCAND_t num_cand_L1 = pdcch_vars2->searchSpace[nb_searchspace_active].nrofCandidates_aggrlevel1; + //NR_UE_SEARCHSPACE_nbrCAND_t num_cand_L2 = pdcch_vars2->searchSpace[nb_searchspace_active].nrofCandidates_aggrlevel2; + //NR_UE_SEARCHSPACE_nbrCAND_t num_cand_L4 = pdcch_vars2->searchSpace[nb_searchspace_active].nrofCandidates_aggrlevel4; + //NR_UE_SEARCHSPACE_nbrCAND_t num_cand_L8 = pdcch_vars2->searchSpace[nb_searchspace_active].nrofCandidates_aggrlevel8; + //NR_UE_SEARCHSPACE_nbrCAND_t num_cand_L16 = pdcch_vars2->searchSpace[nb_searchspace_active].nrofCandidates_aggrlevel16; // FIXME! A table of five enum elements // searchSpaceType indicates whether this is a common search space or a UE-specific search space //int searchSpaceType = pdcch_vars2->searchSpace[nb_searchspace_active].searchSpaceType.type; @@ -3531,8 +3575,6 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t * //printf(">>> example mcs=%d\n",nr_dci_info_extracted.mcs); //printf(">>> calling MAC with dl_indication DCI_IND\n"); - - // TODO: check where should we send up this message. ue->dl_indication.dci_ind=&ue->dci_ind; ue->if_inst->dl_indication(&ue->dl_indication); @@ -3764,7 +3806,7 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t * #ifdef DEBUG_PHY_PROC LOG_D(PHY,"[UE %d][PUSCH] Frame %d nr_tti_rx %d: Found cba rnti %x, format 0, dci_cnt %d\n", ue->Mod_id,frame_rx,nr_tti_rx,dci_alloc_rx[i].rnti,i); - /* + if (((frame_rx%100) == 0) || (frame_rx < 20)) dump_dci(&ue->frame_parms, &dci_alloc_rx[i]); @@ -4022,6 +4064,7 @@ void copy_harq_proc_struct(NR_DL_UE_HARQ_t *harq_processes_dest, NR_DL_UE_HARQ_t memcpy(harq_ack_dest, current_harq_ack, sizeof(nr_harq_status_t)); }*/ +#if 0 void ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_id, PDSCH_t pdsch, NR_UE_DLSCH_t *dlsch0, NR_UE_DLSCH_t *dlsch1, int s0, int s1, int abstraction_flag) { int nr_tti_rx = proc->nr_tti_rx; @@ -4110,6 +4153,8 @@ void ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_id } // CRNTI active } } +#endif + #if 0 void process_rar(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_id, runmode_t mode, int abstraction_flag) { @@ -5441,16 +5486,16 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN uint8_t abstraction_flag,uint8_t do_pdcch_flag,runmode_t mode, relaying_type_t r_type) { - int l,l2; - int pilot1; - int pmch_flag=0; + //int l,l2; + //int pilot1; + //int pmch_flag=0; int frame_rx = proc->frame_rx; int nr_tti_rx = proc->nr_tti_rx; proc->decoder_switch = 0; //int counter_decoder = 0; - uint8_t next1_thread_id = ue->current_thread_id[nr_tti_rx]== (RX_NB_TH-1) ? 0:(ue->current_thread_id[nr_tti_rx]+1); - uint8_t next2_thread_id = next1_thread_id== (RX_NB_TH-1) ? 0:(next1_thread_id+1); + //uint8_t next1_thread_id = ue->current_thread_id[nr_tti_rx]== (RX_NB_TH-1) ? 0:(ue->current_thread_id[nr_tti_rx]+1); + //uint8_t next2_thread_id = next1_thread_id== (RX_NB_TH-1) ? 0:(next1_thread_id+1); #if 0 VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_IN); diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c index 326410be73..20a9f76a9f 100644 --- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c +++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c @@ -48,6 +48,60 @@ #endif +int8_t nr_ue_get_SR(module_id_t module_idP, int CC_id, frame_t frameP, uint8_t eNB_id, uint16_t rnti, sub_frame_t subframe); +uint8_t is_cqi_TXOp(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t gNB_id); +uint8_t is_ri_TXOp(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t gNB_id); +/* +void nr_generate_pucch0(int32_t **txdataF, + NR_DL_FRAME_PARMS *frame_parms, + PUCCH_CONFIG_DEDICATED *pucch_config_dedicated, + int16_t amp, + int nr_tti_tx, + uint8_t mcs, + uint8_t nrofSymbols, + uint8_t startingSymbolIndex, + uint16_t startingPRB); + +void nr_generate_pucch1(int32_t **txdataF, + NR_DL_FRAME_PARMS *frame_parms, + PUCCH_CONFIG_DEDICATED *pucch_config_dedicated, + uint64_t payload, + int16_t amp, + int nr_tti_tx, + uint8_t nrofSymbols, + uint8_t startingSymbolIndex, + uint16_t startingPRB, + uint16_t startingPRB_intraSlotHopping, + uint8_t timeDomainOCC, + uint8_t nr_bit); + +void nr_generate_pucch2(int32_t **txdataF, + NR_DL_FRAME_PARMS *frame_parms, + PUCCH_CONFIG_DEDICATED *pucch_config_dedicated, + uint64_t payload, + int16_t amp, + int nr_tti_tx, + uint8_t nrofSymbols, + uint8_t startingSymbolIndex, + uint8_t nrofPRB, + uint16_t startingPRB, + uint8_t nr_bit); + +void nr_generate_pucch3_4(int32_t **txdataF, + NR_DL_FRAME_PARMS *frame_parms, + pucch_format_nr_t fmt, + PUCCH_CONFIG_DEDICATED *pucch_config_dedicated, + uint64_t payload, + int16_t amp, + int nr_tti_tx, + uint8_t nrofSymbols, + uint8_t startingSymbolIndex, + uint8_t nrofPRB, + uint16_t startingPRB, + uint8_t nr_bit, + uint8_t occ_length_format4, + uint8_t occ_index_format4); +*/ /**************** variables **************************************/ diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 9b79f35231..da6d844cb7 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -977,9 +977,9 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment( uint8_t time_domain_ind, long dmrs_typeA_pos ){ - uint8_t k_offset; - uint8_t sliv_S; - uint8_t sliv_L; + uint8_t k_offset=0; + uint8_t sliv_S=0; + uint8_t sliv_L=0; uint8_t table_5_1_2_1_1_2_time_dom_res_alloc_A[16][3]={ // for PDSCH from TS 38.214 subclause 5.1.2.1.1 {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?12:11}, // row index 1 {0,(dmrs_typeA_pos == 2)?2:3, (dmrs_typeA_pos == 2)?10:9}, // row index 2 @@ -1108,6 +1108,7 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment( // k_offset = table_5_1_2_1_1_5_time_dom_res_alloc_C[nr_pdci_info_extracted->time_dom_resource_assignment][0]; // sliv_S = table_5_1_2_1_1_5_time_dom_res_alloc_C[nr_pdci_info_extracted->time_dom_resource_assignment][1]; // sliv_L = table_5_1_2_1_1_5_time_dom_res_alloc_C[nr_pdci_info_extracted->time_dom_resource_assignment][2]; + dlsch_config_pdu->frame_offset = k_offset; dlsch_config_pdu->number_symbols = sliv_L; dlsch_config_pdu->start_symbol = sliv_S; } /* @@ -1120,6 +1121,7 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment( // k_offset = table_6_1_2_1_1_3_time_dom_res_alloc_A_extCP[nr_pdci_info_extracted->time_dom_resource_assignment][0]; // sliv_S = table_6_1_2_1_1_3_time_dom_res_alloc_A_extCP[nr_pdci_info_extracted->time_dom_resource_assignment][1]; // sliv_L = table_6_1_2_1_1_3_time_dom_res_alloc_A_extCP[nr_pdci_info_extracted->time_dom_resource_assignment][2]; + ulsch_config_pdu->frame_offset = k_offset; ulsch_config_pdu->number_symbols = sliv_L; ulsch_config_pdu->start_symbol = sliv_S; } diff --git a/targets/RT/USER/nr-uesoftmodem.c b/targets/RT/USER/nr-uesoftmodem.c index 54d169a171..f8f37ef861 100644 --- a/targets/RT/USER/nr-uesoftmodem.c +++ b/targets/RT/USER/nr-uesoftmodem.c @@ -123,7 +123,7 @@ uint32_t downlink_frequency[MAX_NUM_CCs][4]; int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; -static char *conf_config_file_name = NULL; +//static char *conf_config_file_name = NULL; #if defined(ENABLE_ITTI) static char *itti_dump_file = NULL; #endif @@ -171,7 +171,7 @@ int codingw = 0; int fepw = 0; int rx_input_level_dBm; -static int online_log_messages=0; +//static int online_log_messages=0; #ifdef XFORMS extern int otg_enabled; static char do_forms=0; @@ -410,7 +410,7 @@ void exit_fun(const char* s) { void reset_stats(FL_OBJECT *button, long arg) { - int i,j,k; + //int i,j,k; /*PHY_VARS_eNB *phy_vars_eNB = PHY_vars_eNB_g[0][0]; for (i=0; i Date: Fri, 5 Oct 2018 13:23:20 +0200 Subject: [PATCH 290/379] CI: Adding support for TCP iperf2 Signed-off-by: Raphael Defosseux --- ci-scripts/main.py | 92 +++++++++- ci-scripts/tcp_iperf_stats.awk | 14 ++ ci-scripts/xml_files/enb_usrp210_band7.xml | 193 ++++++++++++++------- 3 files changed, 233 insertions(+), 66 deletions(-) create mode 100644 ci-scripts/tcp_iperf_stats.awk diff --git a/ci-scripts/main.py b/ci-scripts/main.py index febd50f726..aac81cb036 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -166,7 +166,7 @@ class SSHConnection(): else: logging.debug('\u001B[1;37;41m Unexpected Others \u001B[0m') - def copy(self, ipaddress, username, password, source, destination): + def copyin(self, ipaddress, username, password, source, destination): logging.debug('scp '+ username + '@' + ipaddress + ':' + source + ' ' + destination) scp_spawn = pexpect.spawn('scp '+ username + '@' + ipaddress + ':' + source + ' ' + destination, timeout = 5) scp_response = scp_spawn.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', pexpect.EOF, pexpect.TIMEOUT]) @@ -194,6 +194,34 @@ class SSHConnection(): logging.debug('3 - scp_response = ' + str(scp_response)) sys.exit('SCP failed') + def copyout(self, ipaddress, username, password, source, destination): + logging.debug('scp ' + source + ' ' + username + '@' + ipaddress + ':' + destination) + scp_spawn = pexpect.spawn('scp ' + source + ' ' + username + '@' + ipaddress + ':' + destination, timeout = 5) + scp_response = scp_spawn.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', pexpect.EOF, pexpect.TIMEOUT]) + if scp_response == 0: + scp_spawn.sendline('yes') + scp_spawn.expect('password:') + scp_spawn.sendline(password) + scp_response = scp_spawn.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT]) + if scp_response == 0: + pass + else: + logging.debug('1 - scp_response = ' + str(scp_response)) + sys.exit('SCP failed') + elif scp_response == 1: + scp_spawn.sendline(password) + scp_response = scp_spawn.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT]) + if scp_response == 0 or scp_response == 3: + pass + else: + logging.debug('2 - scp_response = ' + str(scp_response)) + sys.exit('SCP failed') + elif scp_response == 2: + pass + else: + logging.debug('3 - scp_response = ' + str(scp_response)) + sys.exit('SCP failed') + def BuildeNB(self): if self.eNBIPAddress == '' or self.eNBRepository == '' or self.eNBBranch == '' or self.eNBUserName == '' or self.eNBPassword == '' or self.eNBSourceCodePath == '': Usage() @@ -739,7 +767,37 @@ class SSHConnection(): sys.exit(1) return result + def Iperf_analyzeV2TCPOutput(self, lock, UE_IPAddress, device_id, statusQueue, iperf_real_options): + self.command('awk -f /tmp/tcp_iperf_stats.awk /tmp/CI-eNB/scripts/iperf_' + SSH.testCase_id + '_' + device_id + '.log', '\$', 5) + result = re.search('Avg Bitrate : (?P[0-9\.]+ Mbits\/sec) Max Bitrate : (?P[0-9\.]+ Mbits\/sec) Min Bitrate : (?P[0-9\.]+ Mbits\/sec)', str(self.ssh.before)) + if result is not None: + avgbitrate = result.group('average') + maxbitrate = result.group('maximum') + minbitrate = result.group('minimum') + lock.acquire() + logging.debug('\u001B[1;37;44m TCP iperf result (' + UE_IPAddress + ') \u001B[0m') + msg = 'TCP Stats :\n' + if avgbitrate is not None: + logging.debug('\u001B[1;34m Avg Bitrate : ' + avgbitrate + '\u001B[0m') + msg += 'Avg Bitrate : ' + avgbitrate + '\n' + if maxbitrate is not None: + logging.debug('\u001B[1;34m Max Bitrate : ' + maxbitrate + '\u001B[0m') + msg += 'Max Bitrate : ' + maxbitrate + '\n' + if minbitrate is not None: + logging.debug('\u001B[1;34m Min Bitrate : ' + minbitrate + '\u001B[0m') + msg += 'Min Bitrate : ' + minbitrate + '\n' + statusQueue.put(0) + statusQueue.put(device_id) + statusQueue.put(UE_IPAddress) + statusQueue.put(msg) + lock.release() + return 0 + def Iperf_analyzeV2Output(self, lock, UE_IPAddress, device_id, statusQueue, iperf_real_options): + result = re.search('-u', str(iperf_real_options)) + if result is None: + return self.Iperf_analyzeV2TCPOutput(lock, UE_IPAddress, device_id, statusQueue, iperf_real_options) + result = re.search('Server Report:', str(self.ssh.before)) if result is None: result = re.search('read failed: Connection refused', str(self.ssh.before)) @@ -968,6 +1026,10 @@ class SSHConnection(): lock.release() def Iperf_UL_common(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue): + udpIperf = True + result = re.search('-u', str(self.iperf_args)) + if result is None: + udpIperf = False ipnumbers = UE_IPAddress.split('.') if (len(ipnumbers) == 4): ipnumbers[3] = '1' @@ -978,7 +1040,10 @@ class SSHConnection(): self.command('cd ' + self.EPCSourceCodePath + '/scripts', '\$', 5) self.command('rm -f iperf_server_' + SSH.testCase_id + '_' + device_id + '.log', '\$', 5) port = 5001 + idx - self.command('echo $USER; nohup iperf -u -s -i 1 -p ' + str(port) + ' > iperf_server_' + SSH.testCase_id + '_' + device_id + '.log &', self.EPCUserName, 5) + if udpIperf: + self.command('echo $USER; nohup iperf -u -s -i 1 -p ' + str(port) + ' > iperf_server_' + SSH.testCase_id + '_' + device_id + '.log &', self.EPCUserName, 5) + else: + self.command('echo $USER; nohup iperf -s -i 1 -p ' + str(port) + ' > iperf_server_' + SSH.testCase_id + '_' + device_id + '.log &', self.EPCUserName, 5) time.sleep(0.5) self.close() @@ -988,7 +1053,10 @@ class SSHConnection(): iperf_time = self.Iperf_ComputeTime() time.sleep(0.5) - modified_options = self.Iperf_ComputeModifiedBW(idx, ue_num) + if udpIperf: + modified_options = self.Iperf_ComputeModifiedBW(idx, ue_num) + else: + modified_options = str(self.iperf_args) modified_options = modified_options.replace('-R','') time.sleep(0.5) @@ -1004,7 +1072,7 @@ class SSHConnection(): time.sleep(1) if (os.path.isfile('iperf_server_' + SSH.testCase_id + '_' + device_id + '.log')): os.remove('iperf_server_' + SSH.testCase_id + '_' + device_id + '.log') - self.copy(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, self.EPCSourceCodePath + '/scripts/iperf_server_' + SSH.testCase_id + '_' + device_id + '.log', '.') + self.copyin(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, self.EPCSourceCodePath + '/scripts/iperf_server_' + SSH.testCase_id + '_' + device_id + '.log', '.') self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, modified_options) def Iperf_common(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue): @@ -1013,6 +1081,7 @@ class SSHConnection(): if SSH.iperf_profile == 'single-ue' and idx != 0: return useIperf3 = False + udpIperf = True self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword) # if by chance ADB server and EPC are on the same remote host, at least log collection will take care of it self.command('if [ ! -d ' + self.EPCSourceCodePath + '/scripts ]; then mkdir -p ' + self.EPCSourceCodePath + '/scripts ; fi', '\$', 5) @@ -1047,7 +1116,12 @@ class SSHConnection(): self.command('stdbuf -o0 adb -s ' + device_id + ' shell /data/local/tmp/iperf3 -s &', '\$', 5) else: self.command('rm -f iperf_server_' + SSH.testCase_id + '_' + device_id + '.log', '\$', 5) - self.command('echo $USER; nohup adb -s ' + device_id + ' shell "/data/local/tmp/iperf -u -s -i 1" > iperf_server_' + SSH.testCase_id + '_' + device_id + '.log &', self.ADBUserName, 5) + result = re.search('-u', str(self.iperf_args)) + if result is None: + self.command('echo $USER; nohup adb -s ' + device_id + ' shell "/data/local/tmp/iperf -s -i 1" > iperf_server_' + SSH.testCase_id + '_' + device_id + '.log &', self.ADBUserName, 5) + udpIperf = False + else: + self.command('echo $USER; nohup adb -s ' + device_id + ' shell "/data/local/tmp/iperf -u -s -i 1" > iperf_server_' + SSH.testCase_id + '_' + device_id + '.log &', self.ADBUserName, 5) time.sleep(0.5) self.close() @@ -1056,7 +1130,10 @@ class SSHConnection(): iperf_time = self.Iperf_ComputeTime() time.sleep(0.5) - modified_options = self.Iperf_ComputeModifiedBW(idx, ue_num) + if udpIperf: + modified_options = self.Iperf_ComputeModifiedBW(idx, ue_num) + else: + modified_options = str(self.iperf_args) time.sleep(0.5) self.command('rm -f iperf_' + SSH.testCase_id + '_' + device_id + '.log', '\$', 5) @@ -1082,7 +1159,7 @@ class SSHConnection(): time.sleep(1) if (os.path.isfile('iperf_server_' + SSH.testCase_id + '_' + device_id + '.log')): os.remove('iperf_server_' + SSH.testCase_id + '_' + device_id + '.log') - self.copy(self.ADBIPAddress, self.ADBUserName, self.ADBPassword, self.EPCSourceCodePath + '/scripts/iperf_server_' + SSH.testCase_id + '_' + device_id + '.log', '.') + self.copyin(self.ADBIPAddress, self.ADBUserName, self.ADBPassword, self.EPCSourceCodePath + '/scripts/iperf_server_' + SSH.testCase_id + '_' + device_id + '.log', '.') self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, modified_options) except: os.kill(os.getppid(),signal.SIGUSR1) @@ -1784,6 +1861,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE): Usage() sys.exit('Insufficient Parameter') + SSH.copyout(SSH.EPCIPAddress, SSH.EPCUserName, SSH.EPCPassword, sys.path[0] + "/tcp_iperf_stats.awk", "/tmp") SSH.CreateHtmlHeader() #read test_case_list.xml file diff --git a/ci-scripts/tcp_iperf_stats.awk b/ci-scripts/tcp_iperf_stats.awk new file mode 100644 index 0000000000..e5c64b6283 --- /dev/null +++ b/ci-scripts/tcp_iperf_stats.awk @@ -0,0 +1,14 @@ +BEGIN{max=0;min=10000} +{ + if ($0 ~/Mbits/) { + split($0,a,"MBytes") + split(a[2],b) + if (b[1]>max) { + max=b[1] + } + if (b[1] - 010101 050101 060101 070101 040101 030101 040301 040501 040601 040602 040603 040604 040605 040641 040642 040401 040201 030201 030111 040301 040511 040611 040612 040613 040614 040615 040651 040652 040401 040201 030201 030121 040301 040521 040621 040622 040623 040624 040625 040662 040661 040401 040201 030201 + 010101 050101 060101 070101 040101 030101 040301 040501 040603 040604 040605 040606 040607 040641 040642 040643 040644 040401 040201 030201 030111 040301 040511 040613 040614 040615 040616 040617 040651 040652 040653 040654 040401 040201 030201 030121 040301 040521 040623 040624 040625 040626 040627 040662 040661 040663 040664 040401 040201 030201 050201 060201 070201 @@ -94,162 +94,222 @@ 5 - - Iperf - iperf (5MHz - DL/6Mbps/UDP)(60 sec) - -u -b 6M -t 60 -i 1 - 50 - - - - Iperf - iperf (5MHz - DL/13Mbps/UDP)(60 sec) - -u -b 13M -t 60 -i 1 - 50 - - Iperf - iperf (5MHz - DL/15Mbps/UDP)(60 sec) - -u -b 15M -t 60 -i 1 + iperf (5MHz - DL/15Mbps/UDP)(30 sec)(balanced profile) + -u -b 15M -t 30 -i 1 50 + balanced Iperf - iperf (5MHz - DL/15Mbps/UDP)(60 sec)(single-ue profile) - -u -b 15M -t 60 -i 1 + iperf (5MHz - DL/15Mbps/UDP)(30 sec)(single-ue profile) + -u -b 15M -t 30 -i 1 50 single-ue Iperf - iperf (5MHz - DL/15Mbps/UDP)(60 sec)(unbalanced profile) - -u -b 15M -t 60 -i 1 + iperf (5MHz - DL/15Mbps/UDP)(30 sec)(unbalanced profile) + -u -b 15M -t 30 -i 1 50 unbalanced + + Iperf + iperf (5MHz - DL/TCP)(30 sec)(single-ue profile) + -t 30 -i 1 -fm + 50 + single-ue + + + + Iperf + iperf (5MHz - DL/TCP)(30 sec)(balanced profile) + -t 30 -i 1 -fm + 50 + balanced + + Iperf - iperf (5MHz - UL/9Mbps/UDP)(60 sec) - -u -b 9M -t 60 -i 1 -R + iperf (5MHz - UL/9Mbps/UDP)(30 sec)(balanced profile) + -u -b 9M -t 30 -i 1 -R 50 + balanced Iperf - iperf (5MHz - UL/9Mbps/UDP)(60 sec)(single-ue profile) - -u -b 9M -t 60 -i 1 -R + iperf (5MHz - UL/9Mbps/UDP)(30 sec)(single-ue profile) + -u -b 9M -t 30 -i 1 -R 50 single-ue - + Iperf - iperf (10MHz - DL/10Mbps/UDP)(60 sec) - -u -b 10M -t 60 -i 1 + iperf (5MHz - UL/TCP)(30 sec)(single-ue profile) + -t 30 -i 1 -fm -R 50 - + single-ue + - + Iperf - iperf (10MHz - DL/20Mbps/UDP)(60 sec) - -u -b 20M -t 60 -i 1 + iperf (5MHz - UL/TCP)(30 sec)(balanced profile) + -t 30 -i 1 -fm -R 50 + balanced Iperf - iperf (10MHz - DL/30Mbps/UDP)(60 sec) - -u -b 30M -t 60 -i 1 + iperf (10MHz - DL/30Mbps/UDP)(30 sec)(balanced profile) + -u -b 30M -t 30 -i 1 50 + balanced Iperf - iperf (10MHz - DL/30Mbps/UDP)(60 sec)(single-ue profile) - -u -b 30M -t 60 -i 1 + iperf (10MHz - DL/30Mbps/UDP)(30 sec)(single-ue profile) + -u -b 30M -t 30 -i 1 50 single-ue Iperf - iperf (10MHz - DL/30Mbps/UDP)(60 sec)(unbalanced profile) - -u -b 30M -t 60 -i 1 + iperf (10MHz - DL/30Mbps/UDP)(30 sec)(unbalanced profile) + -u -b 30M -t 30 -i 1 50 unbalanced + + Iperf + iperf (10MHz - DL/TCP)(30 sec)(single-ue profile) + -t 30 -i 1 -fm + 50 + single-ue + + + + Iperf + iperf (10MHz - DL/TCP)(30 sec)(balanced profile) + -t 30 -i 1 -fm + 50 + balanced + + Iperf - iperf (10MHz - UL/20Mbps/UDP)(60 sec) - -u -b 20M -t 60 -i 1 -R + iperf (10MHz - UL/20Mbps/UDP)(30 sec)(balanced profile) + -u -b 20M -t 30 -i 1 -R 50 + balanced Iperf - iperf (10MHz - UL/20Mbps/UDP)(60 sec)(single-ue profile) - -u -b 20M -t 60 -i 1 -R + iperf (10MHz - UL/20Mbps/UDP)(30 sec)(single-ue profile) + -u -b 20M -t 30 -i 1 -R 50 single-ue - + Iperf - iperf (20MHz - DL/20Mbps/UDP)(60 sec) - -u -b 20M -t 60 -i 1 + iperf (10MHz - UL/TCP)(30 sec)(single-ue profile) + -t 30 -i 1 -fm -R 50 - + single-ue + - + Iperf - iperf (20MHz - DL/40Mbps/UDP)(60 sec) - -u -b 40M -t 60 -i 1 + iperf (10MHz - UL/TCP)(30 sec)(balanced profile) + -t 30 -i 1 -fm -R 50 + balanced Iperf - iperf (20MHz - DL/70Mbps/UDP)(60 sec) - -u -b 70M -t 60 -i 1 + iperf (20MHz - DL/70Mbps/UDP)(30 sec)(balanced profile) + -u -b 70M -t 30 -i 1 50 + balanced Iperf - iperf (20MHz - DL/70Mbps/UDP)(60 sec)(single-ue profile) - -u -b 70M -t 60 -i 1 + iperf (20MHz - DL/70Mbps/UDP)(30 sec)(single-ue profile) + -u -b 70M -t 30 -i 1 50 single-ue Iperf - iperf (20MHz - DL/70Mbps/UDP)(60 sec)(unbalanced profile) - -u -b 70M -t 60 -i 1 + iperf (20MHz - DL/70Mbps/UDP)(30 sec)(unbalanced profile) + -u -b 70M -t 30 -i 1 50 unbalanced + + Iperf + iperf (20MHz - DL/TCP)(30 sec)(single-ue profile) + -t 30 -i 1 -fm + 50 + single-ue + + + + Iperf + iperf (20MHz - DL/TCP)(30 sec)(balanced profile) + -t 30 -i 1 -fm + 50 + balanced + + Iperf - iperf (20MHz - UL/20Mbps/UDP)(60 sec) - -u -b 20M -t 60 -i 1 -R + iperf (20MHz - UL/20Mbps/UDP)(30 sec)(balanced profile) + -u -b 20M -t 30 -i 1 -R 50 + balanced Iperf - iperf (20MHz - UL/20Mbps/UDP)(60 sec)(single-ue profile) - -u -b 20M -t 60 -i 1 -R + iperf (20MHz - UL/20Mbps/UDP)(30 sec)(single-ue profile) + -u -b 20M -t 30 -i 1 -R 50 single-ue + + Iperf + iperf (20MHz - UL/TCP)(30 sec)(single-ue profile) + -t 30 -i 1 -fm -R + 50 + single-ue + + + + Iperf + iperf (20MHz - UL/TCP)(30 sec)(balanced profile) + -t 30 -i 1 -fm -R + 50 + balanced + + Initialize_HSS Initialize HSS @@ -265,4 +325,19 @@ Initialize SPGW + + Terminate_HSS + Terminate HSS + + + + Terminate_MME + Terminate MME + + + + Terminate_SPGW + Terminate SPGW + + From 3f48a5d9ac8ab9901a09c76fe408ebe9ae006d6d Mon Sep 17 00:00:00 2001 From: Agustin Date: Fri, 5 Oct 2018 17:39:34 +0200 Subject: [PATCH 291/379] NR PDCCH development code clean up --- openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 2793 +----- openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c | 9046 ------------------- 2 files changed, 3 insertions(+), 11836 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index 2f44497d04..497a44b201 100755 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -63,66 +63,6 @@ //extern uint16_t phich_reg[MAX_NUM_PHICH_GROUPS][3]; //extern uint16_t pcfich_reg[4]; -/*uint32_t check_phich_reg(NR_DL_FRAME_PARMS *frame_parms,uint32_t kprime,uint8_t lprime,uint8_t mi) -{ - - uint16_t i; - uint16_t Ngroup_PHICH = (frame_parms->phich_config_common.phich_resource*frame_parms->N_RB_DL)/48; - uint16_t mprime; - uint16_t *pcfich_reg = frame_parms->pcfich_reg; - - if ((lprime>0) && (frame_parms->Ncp==0) ) - return(0); - - // printf("check_phich_reg : mi %d\n",mi); - - // compute REG based on symbol - if ((lprime == 0)|| - ((lprime==1)&&(frame_parms->nb_antenna_ports_eNB == 4))) - mprime = kprime/6; - else - mprime = kprime>>2; - - // check if PCFICH uses mprime - if ((lprime==0) && - ((mprime == pcfich_reg[0]) || - (mprime == pcfich_reg[1]) || - (mprime == pcfich_reg[2]) || - (mprime == pcfich_reg[3]))) { -#ifdef DEBUG_DCI_ENCODING - printf("[PHY] REG %d allocated to PCFICH\n",mprime); -#endif - return(1); - } - - // handle Special subframe case for TDD !!! - - // printf("Checking phich_reg %d\n",mprime); - if (mi > 0) { - if (((frame_parms->phich_config_common.phich_resource*frame_parms->N_RB_DL)%48) > 0) - Ngroup_PHICH++; - - if (frame_parms->Ncp == 1) { - Ngroup_PHICH<<=1; - } - - - - for (i=0; iphich_reg[i][0]) || - (mprime == frame_parms->phich_reg[i][1]) || - (mprime == frame_parms->phich_reg[i][2])) { -#ifdef DEBUG_DCI_ENCODING - printf("[PHY] REG %d (lprime %d) allocated to PHICH\n",mprime,lprime); -#endif - return(1); - } - } - } - - return(0); -}*/ - uint16_t extract_crc(uint8_t *dci,uint8_t dci_len) { @@ -432,423 +372,8 @@ symbol 0 | ... bundle 3 bundle 6 } } -#if 0 -void nr_pdcch_demapping(uint16_t *llr, uint16_t *wbar, - NR_DL_FRAME_PARMS *frame_parms, - uint8_t coreset_time_dur, uint32_t coreset_nbr_rb) { -/* - * LLR contains the PDCCH for the coreset_time_dur symbols in the following sequence: - * - * The REGs have to be numbered in increasing order in a time-first manner, - * starting with 0 for the first OFDM symbol and the lowest-numbered resource - * block in the control resource set - * - * | ... | ... | ... | - * | REG 3 | REG 4 | REG 5 | - * | REG 0 | REG 1 | REG 2 | - * | symbol0 | symbol1 | symbol2 | - * - * ................. - * ___________REG 1+2l - * ___________REG 1+l - * symbol 1___REG 1 - * ................. - * ___________REG 2l - * ___________REG l - * symbol 0___REG 0 - * - * WBAR will contain the PDCCH organized in REGx where x will be consecutive: - * REG 0 - * REG 1 - * REG 2 - * ... - * REG l - * REG 1+l - * REG 2+l - * ... - * - */ - - uint32_t m,i,k,l; - uint32_t num_re_pdcch = 12 * coreset_nbr_rb; - i=0; - m=0; - for (k=0; k k,l=(%d,%d) DM-RS PDCCH signal\n",k,l); - #endif - } else { - if ((m%9)==0 && (m !=0) && (l==0)) { - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_demapping)-> we have modified m: old_m=%d, new_m=%d\n", - m,m+(9*(coreset_time_dur-1))); - #endif - m=m+(9*(coreset_time_dur-1)); // to avoid overwriting m+1 when a whole REG has been completed - } - wbar[(l*9)+m] = llr[(l*9*coreset_nbr_rb)+i]; - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_demapping)-> k,l=(%d,%d) i,m=(%d,%d) REG (%d) > wbar(%d,%d) \t llr[%d]->wbar[%d]\n", - k,l,i,m, (m+(l*9)) / 9, *(char*) &wbar[m+(l*9)], *(1 + (char*) &wbar[m+(l*9)]), - (l*9*coreset_nbr_rb)+i,m+(l*9)); - #endif - if (l==coreset_time_dur-1) { - i++; - m++; - } - } - } - } -} -#endif //0 #endif -#if 0 -void pdcch_demapping(uint16_t *llr,uint16_t *wbar,NR_DL_FRAME_PARMS *frame_parms,uint8_t num_pdcch_symbols,uint8_t mi) -{ - - uint32_t i, lprime; - uint16_t kprime,kprime_mod12,mprime,symbol_offset,tti_offset,tti_offset0; - int16_t re_offset,re_offset0; - - // This is the REG allocation algorithm from 36-211, second part of Section 6.8.5 - - int Msymb2; - - switch (frame_parms->N_RB_DL) { - case 100: - Msymb2 = Msymb; - break; - - case 75: - Msymb2 = 3*Msymb/4; - break; - - case 50: - Msymb2 = Msymb>>1; - break; - - case 25: - Msymb2 = Msymb>>2; - break; - - case 15: - Msymb2 = Msymb*15/100; - break; - - case 6: - Msymb2 = Msymb*6/100; - break; - - default: - Msymb2 = Msymb>>2; - break; - } - - mprime=0; - - - re_offset = 0; - re_offset0 = 0; // counter for symbol with pilots (extracted outside!) - - for (kprime=0; kprimeN_RB_DL*12; kprime++) { - for (lprime=0; lprimeN_RB_DL*12*lprime; - - tti_offset = symbol_offset + re_offset; - tti_offset0 = symbol_offset + re_offset0; - - // if REG is allocated to PHICH, skip it - if (check_phich_reg(frame_parms,kprime,lprime,mi) == 1) { - // printf("dci_demapping : skipping REG %d (RE %d)\n",(lprime==0)?kprime/6 : kprime>>2,kprime); - if ((lprime == 0)&&((kprime%6)==0)) - re_offset0+=4; - } else { // not allocated to PHICH/PCFICH - // printf("dci_demapping: REG %d\n",(lprime==0)?kprime/6 : kprime>>2); - if (lprime == 0) { - // first symbol, or second symbol+4 TX antennas skip pilots - kprime_mod12 = kprime%12; - - if ((kprime_mod12 == 0) || (kprime_mod12 == 6)) { - // kprime represents REG - - for (i=0; i<4; i++) { - wbar[mprime] = llr[tti_offset0+i]; -#ifdef DEBUG_DCI_DECODING -// LOG_I(PHY,"PDCCH demapping mprime %d.%d <= llr %d (symbol %d re %d) -> (%d,%d)\n",mprime/4,i,tti_offset0+i,symbol_offset,re_offset0,*(char*)&wbar[mprime],*(1+(char*)&wbar[mprime])); -#endif - mprime++; - re_offset0++; - } - } - } else if ((lprime==1)&&(frame_parms->nb_antenna_ports_eNB == 4)) { - // LATER!!!! - } else { // no pilots in this symbol - kprime_mod12 = kprime%12; - - if ((kprime_mod12 == 0) || (kprime_mod12 == 4) || (kprime_mod12 == 8)) { - // kprime represents REG - for (i=0; i<4; i++) { - wbar[mprime] = llr[tti_offset+i]; -#ifdef DEBUG_DCI_DECODING -// LOG_I(PHY,"PDCCH demapping mprime %d.%d <= llr %d (symbol %d re %d) -> (%d,%d)\n",mprime/4,i,tti_offset+i,symbol_offset,re_offset+i,*(char*)&wbar[mprime],*(1+(char*)&wbar[mprime])); -#endif - mprime++; - } - } // is representative - } // no pilots case - } // not allocated to PHICH/PCFICH - - // Stop when all REGs are copied in - if (mprime>=Msymb2) - break; - } //lprime loop - - re_offset++; - - } // kprime loop -} -#endif //0 - -//static uint16_t wtemp_rx[Msymb]; - -#if 0 -#ifdef NR_PDCCH_DCI_RUN -void nr_pdcch_deinterleaving(NR_DL_FRAME_PARMS *frame_parms, uint16_t *z, - uint16_t *wbar, uint8_t coreset_time_dur, uint8_t reg_bundle_size_L, - uint8_t coreset_interleaver_size_R, uint8_t n_shift, uint32_t coreset_nbr_rb) -{ -/* - * This function will perform deinterleaving described in 38.211 Section 7.3.2.2 - * coreset_freq_dom (bit map 45 bits: each bit indicates 6 RB in CORESET -> 1 bit MSB indicates PRB 0..6 are part of CORESET) - * coreset_time_dur (1,2,3) - * coreset_CCE_REG_mapping_type (interleaved, non-interleaved) - * reg_bundle_size (2,3,6) - */ -#ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_deinterleaving)-> coreset_nbr_rb=(%lld), reg_bundle_size_L=(%d), coreset_interleaver_size_R=(%d), n_shift=(%d)\n", - coreset_nbr_rb,reg_bundle_size_L,coreset_interleaver_size_R,n_shift); -#endif -/* - * First verify that CORESET is interleaved or not interleaved depending on parameter cce-REG-MappingType - * if non-interleaved then do nothing: wbar table stays as it is (if REG bundle size is set to 0 by higher layer, then we consider that there is no interleaving) - */ - int coreset_interleaved = 1; - if (reg_bundle_size_L==0) coreset_interleaved=0; -/* - * if interleaved then do this: wbar table has bundles interleaved. We have to de-interleave then - * following procedure described in 38.211 Section 7.3.2.2: - */ - int c=0 ,r=-1; - uint32_t bundle_id, bundle_interleaved, k, l, i=0; - uint32_t coreset_C = (uint32_t)(coreset_nbr_rb * coreset_time_dur/ (coreset_interleaver_size_R*reg_bundle_size_L)); - //uint16_t *wptr; - //wptr = &wtemp_rx[0]; - //z = &wtemp_rx[0]; - bundle_id=0; - for (k=0 ; k<9*coreset_nbr_rb*coreset_time_dur; k++){ - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_deinterleaving)-> k=%d \t coreset_interleaved=%d reg_bundle_size_L=%d coreset_C=%d coreset_interleaver_R=%d", - k,coreset_interleaved,reg_bundle_size_L, coreset_C,coreset_interleaver_size_R); - #endif - if (k%(9*reg_bundle_size_L)==0) { - // calculate offset properly - if (r==coreset_interleaver_size_R-1) { - //if (bundle_id>=(c+1)*coreset_interleaver_size_R) { - c++; - r=0; - } else { - r++; - } - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t --> time to modify bundle_interleaved and bundle_id --> r=%d c=%d\n",r,c); - #endif - bundle_id=c*coreset_interleaver_size_R+r; - bundle_interleaved=(r*coreset_C+c+n_shift)%(coreset_nbr_rb * coreset_time_dur/reg_bundle_size_L); - } - if (coreset_interleaved == 1){ - //wptr[i+(bundle_interleaved-bundle_id)*9*reg_bundle_size_L]=wbar[i]; - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t\t\t\t wptr[%d] = (%d,%d) <-> wbar[%d]",i, *(char*) &wbar[i], *(1 + (char*) &wbar[i]),i+(bundle_interleaved-bundle_id)*9*reg_bundle_size_L); - #endif - z[i]=wbar[i+(bundle_interleaved-bundle_id)*9*reg_bundle_size_L]; - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t\t bundle_id = %d \t bundle_interleaved = %d (r=%d, c=%d)\n",bundle_id,bundle_interleaved,r,c); - #endif - i++; - } else { - z[i]=wbar[i]; - i++; - } - //bundle_id=c*coreset_interleaver_size_R+r; - } -} -#endif -#endif //0 - - - - - -#if 0 - -void pdcch_deinterleaving(NR_DL_FRAME_PARMS *frame_parms,uint16_t *z, uint16_t *wbar,uint8_t number_pdcch_symbols,uint8_t mi) -{ - - uint16_t *wptr,*zptr,*wptr2; - - uint16_t Mquad=get_nquad(number_pdcch_symbols,frame_parms,mi); - uint32_t RCC = (Mquad>>5), ND; - uint32_t row,col,Kpi,index; - int32_t i,k; - - - // printf("Mquad %d, RCC %d\n",Mquad,RCC); - - if (!z) { - printf("dci.c: pdcch_deinterleaving: FATAL z is Null\n"); - return; - } - - // undo permutation - for (i=0; iNid_cell)%Mquad)<<2]; - wptr2 = &wbar[i<<2]; - - wptr[0] = wptr2[0]; - wptr[1] = wptr2[1]; - wptr[2] = wptr2[2]; - wptr[3] = wptr2[3]; - /* - printf("pdcch_deinterleaving (%p,%p): quad %d (%d) -> (%d,%d %d,%d %d,%d %d,%d)\n",wptr,wptr2,i,(i+frame_parms->Nid_cell)%Mquad, - ((char*)wptr2)[0], - ((char*)wptr2)[1], - ((char*)wptr2)[2], - ((char*)wptr2)[3], - ((char*)wptr2)[4], - ((char*)wptr2)[5], - ((char*)wptr2)[6], - ((char*)wptr2)[7]); - */ - - } - - if ((Mquad&0x1f) > 0) - RCC++; - - Kpi = (RCC<<5); - ND = Kpi - Mquad; - - k=0; - - for (col=0; col<32; col++) { - index = bitrev_cc_dci[col]; - - for (row=0; row=ND) { - - - - wptr = &wtemp_rx[k<<2]; - zptr = &z[(index-ND)<<2]; - - zptr[0] = wptr[0]; - zptr[1] = wptr[1]; - zptr[2] = wptr[2]; - zptr[3] = wptr[3]; - - /* - printf("deinterleaving ; k %d, index-Nd %d => (%d,%d,%d,%d,%d,%d,%d,%d)\n",k,(index-ND), - ((int8_t *)wptr)[0], - ((int8_t *)wptr)[1], - ((int8_t *)wptr)[2], - ((int8_t *)wptr)[3], - ((int8_t *)wptr)[4], - ((int8_t *)wptr)[5], - ((int8_t *)wptr)[6], - ((int8_t *)wptr)[7]); - */ - k++; - } - - index+=32; - - } - } - - for (i=0; i (%d,%d,%d,%d,%d,%d,%d,%d)\n",i, - ((int8_t *)zptr)[0], - ((int8_t *)zptr)[1], - ((int8_t *)zptr)[2], - ((int8_t *)zptr)[3], - ((int8_t *)zptr)[4], - ((int8_t *)zptr)[5], - ((int8_t *)zptr)[6], - ((int8_t *)zptr)[7]); - */ - } - -} -#endif //0 - -#if 0 -int32_t pdcch_qpsk_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms, - int32_t **rxdataF_comp, - int32_t **rxdataF_comp_i, - int32_t **rho_i, - int16_t *pdcch_llr16, - int16_t *pdcch_llr8in, - uint8_t symbol) -{ - - int16_t *rxF=(int16_t*)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)]; - int16_t *rxF_i=(int16_t*)&rxdataF_comp_i[0][(symbol*frame_parms->N_RB_DL*12)]; - int16_t *rho=(int16_t*)&rho_i[0][(symbol*frame_parms->N_RB_DL*12)]; - int16_t *llr128; - int32_t i; - char *pdcch_llr8; - int16_t *pdcch_llr; - pdcch_llr8 = (char *)&pdcch_llr8in[symbol*frame_parms->N_RB_DL*12]; - pdcch_llr = &pdcch_llr16[symbol*frame_parms->N_RB_DL*12]; - - // printf("dlsch_qpsk_qpsk: symbol %d\n",symbol); - - llr128 = (int16_t*)pdcch_llr; - - if (!llr128) { - printf("dlsch_qpsk_qpsk_llr: llr is null, symbol %d\n",symbol); - return -1; - } - - qpsk_qpsk(rxF, - rxF_i, - llr128, - rho, - frame_parms->N_RB_DL*12); - - //prepare for Viterbi which accepts 8 bit, but prefers 4 bit, soft input. - for (i=0; i<(frame_parms->N_RB_DL*24); i++) { - if (*pdcch_llr>7) - *pdcch_llr8=7; - else if (*pdcch_llr<-8) - *pdcch_llr8=-8; - else - *pdcch_llr8 = (char)(*pdcch_llr); - - pdcch_llr++; - pdcch_llr8++; - } - - return(0); -} -#endif //0 - #ifdef NR_PDCCH_DCI_RUN int32_t nr_pdcch_llr(NR_DL_FRAME_PARMS *frame_parms, int32_t **rxdataF_comp, char *pdcch_llr, uint8_t symbol,uint32_t coreset_nbr_rb) { @@ -993,117 +518,7 @@ __m128i mmtmpPD0,mmtmpPD1,mmtmpPD2,mmtmpPD3; #elif defined(__arm__) #endif -/* -void pdcch_dual_stream_correlation(NR_DL_FRAME_PARMS *frame_parms, - uint8_t symbol, - int32_t **dl_ch_estimates_ext, - int32_t **dl_ch_estimates_ext_i, - int32_t **dl_ch_rho_ext, - uint8_t output_shift) -{ - uint16_t rb; -#if defined(__x86_64__) || defined(__i386__) - __m128i *dl_ch128,*dl_ch128i,*dl_ch_rho128; -#elif defined(__arm__) - -#endif - uint8_t aarx; - - // printf("dlsch_dual_stream_correlation: symbol %d\n",symbol); - - - for (aarx=0; aarxnb_antennas_rx; aarx++) { - -#if defined(__x86_64__) || defined(__i386__) - dl_ch128 = (__m128i *)&dl_ch_estimates_ext[aarx][symbol*frame_parms->N_RB_DL*12]; - dl_ch128i = (__m128i *)&dl_ch_estimates_ext_i[aarx][symbol*frame_parms->N_RB_DL*12]; - dl_ch_rho128 = (__m128i *)&dl_ch_rho_ext[aarx][symbol*frame_parms->N_RB_DL*12]; - -#elif defined(__arm__) - -#endif - - for (rb=0; rbN_RB_DL; rb++) { - // multiply by conjugated channel -#if defined(__x86_64__) || defined(__i386__) - mmtmpPD0 = _mm_madd_epi16(dl_ch128[0],dl_ch128i[0]); - // print_ints("re",&mmtmpPD0); - - // mmtmpD0 contains real part of 4 consecutive outputs (32-bit) - mmtmpPD1 = _mm_shufflelo_epi16(dl_ch128[0],_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_shufflehi_epi16(mmtmpPD1,_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_sign_epi16(mmtmpPD1,*(__m128i*)&conjugate[0]); - // print_ints("im",&mmtmpPD1); - mmtmpPD1 = _mm_madd_epi16(mmtmpPD1,dl_ch128i[0]); - // mmtmpD1 contains imag part of 4 consecutive outputs (32-bit) - mmtmpPD0 = _mm_srai_epi32(mmtmpPD0,output_shift); - // print_ints("re(shift)",&mmtmpPD0); - mmtmpPD1 = _mm_srai_epi32(mmtmpPD1,output_shift); - // print_ints("im(shift)",&mmtmpPD1); - mmtmpPD2 = _mm_unpacklo_epi32(mmtmpPD0,mmtmpPD1); - mmtmpPD3 = _mm_unpackhi_epi32(mmtmpPD0,mmtmpPD1); - // print_ints("c0",&mmtmpPD2); - // print_ints("c1",&mmtmpPD3); - dl_ch_rho128[0] = _mm_packs_epi32(mmtmpPD2,mmtmpPD3); - - //print_shorts("rx:",dl_ch128_2); - //print_shorts("ch:",dl_ch128); - //print_shorts("pack:",rho128); - - // multiply by conjugated channel - mmtmpPD0 = _mm_madd_epi16(dl_ch128[1],dl_ch128i[1]); - // mmtmpPD0 contains real part of 4 consecutive outputs (32-bit) - mmtmpPD1 = _mm_shufflelo_epi16(dl_ch128[1],_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_shufflehi_epi16(mmtmpPD1,_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_sign_epi16(mmtmpPD1,*(__m128i*)conjugate); - mmtmpPD1 = _mm_madd_epi16(mmtmpPD1,dl_ch128i[1]); - // mmtmpPD1 contains imag part of 4 consecutive outputs (32-bit) - mmtmpPD0 = _mm_srai_epi32(mmtmpPD0,output_shift); - mmtmpPD1 = _mm_srai_epi32(mmtmpPD1,output_shift); - mmtmpPD2 = _mm_unpacklo_epi32(mmtmpPD0,mmtmpPD1); - mmtmpPD3 = _mm_unpackhi_epi32(mmtmpPD0,mmtmpPD1); - - - dl_ch_rho128[1] =_mm_packs_epi32(mmtmpPD2,mmtmpPD3); - //print_shorts("rx:",dl_ch128_2+1); - //print_shorts("ch:",dl_ch128+1); - //print_shorts("pack:",rho128+1); - // multiply by conjugated channel - mmtmpPD0 = _mm_madd_epi16(dl_ch128[2],dl_ch128i[2]); - // mmtmpPD0 contains real part of 4 consecutive outputs (32-bit) - mmtmpPD1 = _mm_shufflelo_epi16(dl_ch128[2],_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_shufflehi_epi16(mmtmpPD1,_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_sign_epi16(mmtmpPD1,*(__m128i*)conjugate); - mmtmpPD1 = _mm_madd_epi16(mmtmpPD1,dl_ch128i[2]); - // mmtmpPD1 contains imag part of 4 consecutive outputs (32-bit) - mmtmpPD0 = _mm_srai_epi32(mmtmpPD0,output_shift); - mmtmpPD1 = _mm_srai_epi32(mmtmpPD1,output_shift); - mmtmpPD2 = _mm_unpacklo_epi32(mmtmpPD0,mmtmpPD1); - mmtmpPD3 = _mm_unpackhi_epi32(mmtmpPD0,mmtmpPD1); - - dl_ch_rho128[2] = _mm_packs_epi32(mmtmpPD2,mmtmpPD3); - //print_shorts("rx:",dl_ch128_2+2); - //print_shorts("ch:",dl_ch128+2); - //print_shorts("pack:",rho128+2); - - dl_ch128+=3; - dl_ch128i+=3; - dl_ch_rho128+=3; - - -#elif defined(__arm__) - -#endif - } - } -#if defined(__x86_64__) || defined(__i386__) - _mm_empty(); - _m_empty(); -#endif - -} -*/ void pdcch_detection_mrc_i(NR_DL_FRAME_PARMS *frame_parms, int32_t **rxdataF_comp, @@ -1449,248 +864,6 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF, } #endif -#ifdef NR_PDCCH_DCI_RUN_bis -// this function is just a second implementation of nr_pdcch_extract_rbs_single -// the code modification is minimum but it can be slower in processing time -// to be removed - -void nr_pdcch_extract_rbs_single_bis(int32_t **rxdataF, int32_t **dl_ch_estimates, - int32_t **rxdataF_ext, int32_t **dl_ch_estimates_ext, uint8_t symbol, - uint32_t high_speed_flag, NR_DL_FRAME_PARMS *frame_parms, uint64_t coreset_freq_dom, uint32_t coreset_nbr_rb, uint32_t n_BWP_start) { - - uint16_t rb, nb_rb = 0; - uint8_t i, j, aarx; - int32_t *dl_ch0, *dl_ch0_ext, *rxF, *rxF_ext; - int nushiftmod3 = frame_parms->nushift % 3; - uint8_t symbol_mod; - - symbol_mod = (symbol >= (7 - frame_parms->Ncp)) ? symbol - (7 - frame_parms->Ncp) : symbol; -#ifdef DEBUG_DCI_DECODING - LOG_I(PHY, "extract_rbs_single: symbol_mod %d\n",symbol_mod); -#endif - for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) { - if (high_speed_flag == 1){ - dl_ch0 = &dl_ch_estimates[aarx][5 + (symbol * (frame_parms->ofdm_symbol_size))]; - printf("\t\t### in function nr_pdcch_extract_rbs_single(), \t ### dl_ch0 = &dl_ch_estimates[aarx = (%d) ][5 + (symbol * (frame_parms->ofdm_symbol_size)) = (%d)]\n", - aarx,5 + (symbol * (frame_parms->ofdm_symbol_size))); - } else { - dl_ch0 = &dl_ch_estimates[aarx][5]; - printf("\t\t### in function nr_pdcch_extract_rbs_single(), \t ### dl_ch0 = &dl_ch_estimates[aarx = (%d)][5]\n",aarx); - } - dl_ch0_ext = &dl_ch_estimates_ext[aarx][symbol * (frame_parms->N_RB_DL * 12)]; - printf("\t\t### in function nr_pdcch_extract_rbs_single(), \t ### dl_ch0_ext = &dl_ch_estimates_ext[aarx = (%d)][symbol * (frame_parms->N_RB_DL * 12) = (%d)]\n", - aarx,symbol * (frame_parms->N_RB_DL * 12)); - rxF_ext = &rxdataF_ext[aarx][symbol * (frame_parms->N_RB_DL * 12)]; - printf("\t\t### in function nr_pdcch_extract_rbs_single(), \t ### rxF_ext = &rxdataF_ext[aarx = (%d)][symbol * (frame_parms->N_RB_DL * 12) = (%d)]\n", - aarx,symbol * (frame_parms->N_RB_DL * 12)); - rxF = &rxdataF[aarx][(frame_parms->first_carrier_offset + (symbol * (frame_parms->ofdm_symbol_size)))]; - printf("\t\t### in function nr_pdcch_extract_rbs_single(), \t ### rxF = &rxdataF[aarx = (%d)][(frame_parms->first_carrier_offset + (symbol * (frame_parms->ofdm_symbol_size))) = (%d)]\n", - aarx,(frame_parms->first_carrier_offset + (symbol * (frame_parms->ofdm_symbol_size)))); - printf("\t\t ###### in function pdcch_extract_rbs_single(for symbol=%d, aarx=%d), symbol_mod=%d, nushiftmod3=%d \n",symbol,aarx,symbol_mod,nushiftmod3); - printf("\t\t ###### rxF_ext = &rxdataF_ext[aarx(%d)][symbol(%d) * (frame_parms->N_RB_DL(%d) * 12)]\n",aarx,symbol,frame_parms->N_RB_DL); - printf("\t\t ###### rxF = &rxdataF[aarx(%d)][(frame_parms->first_carrier_offset(%d) + (symbol(%d) * (frame_parms->ofdm_symbol_size(%d))))]\n", - aarx,frame_parms->first_carrier_offset,symbol,frame_parms->ofdm_symbol_size); - - if ((frame_parms->N_RB_DL & 1) == 0) { // even number of RBs - for (rb = 0; rb < frame_parms->N_RB_DL; rb++) { - printf("\t\t\t ###### rb=%d\n",rb); - if (rb == (frame_parms->N_RB_DL >> 1)) { // For second half of RBs skip DC carrier - rxF = &rxdataF[aarx][(1 + (symbol * (frame_parms->ofdm_symbol_size)))]; - printf("\t\t\t ###### if rb (%d) is half N_RB_DL, skip DC carrier -> rxF = &rxdataF[aarx(%d)][(1 + (symbol(%d) * (frame_parms->ofdm_symbol_size(%d))))\n", - rb,aarx,symbol,frame_parms->ofdm_symbol_size); - //dl_ch0++; - } - if (symbol_mod > 0) { - memcpy(dl_ch0_ext, dl_ch0, 12 * sizeof(int32_t)); - for (i = 0; i < 12; i++) { - rxF_ext[i] = rxF[i]; - } - nb_rb++; - dl_ch0_ext += 12; - rxF_ext += 12; - dl_ch0 += 12; - rxF += 12; - } else { - j = 0; - for (i = 0; i < 12; i++) { - if ((i != 1) && (i != 5) && (i != 9)) { - rxF_ext[j] = rxF[i]; - printf("\textract rb %d \t re %d => rxF_ext[%d]=(%d,%d)", rb, i, j, *(short *) &rxF_ext[j], *(1 + (short*) &rxF_ext[j])); - dl_ch0_ext[j++] = dl_ch0[i]; - printf("\t\tch %d => dl_ch0(%d,%d)\n", i, *(short *) &dl_ch0[i], *(1 + (short*) &dl_ch0[i])); - } - } - nb_rb++; - dl_ch0_ext += 9; - rxF_ext += 9; - dl_ch0 += 12; - rxF += 12; - } - } - } else { // Odd number of RBs - for (rb = 0; rb < frame_parms->N_RB_DL >> 1; rb++) { - printf("\t\t\t ###### rb=%d (Odd number of RBs, rb < half of band)\n",rb); - if (symbol_mod > 0) { - memcpy(dl_ch0_ext, dl_ch0, 12 * sizeof(int32_t)); - for (i = 0; i < 12; i++) - rxF_ext[i] = rxF[i]; - nb_rb++; - dl_ch0_ext += 12; - rxF_ext += 12; - dl_ch0 += 12; - rxF += 12; - } else { - j = 0; - for (i = 0; i < 12; i++) { - if ((i != 1) && (i != 5) && (i != 9)) { - rxF_ext[j] = rxF[i]; - printf("\t\t\t\t ###### extract rb %d, re %d => rxF_ext[%d]=(%d,%d) rxF[%d]=(%d,%d)", - rb,i,j,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j]),i,*(short *)&rxF[i],*(1+(short*)&rxF[i])); - dl_ch0_ext[j++] = dl_ch0[i]; - printf("\t ###### extract rb %d, re %d => dl_ch0 []=(%d,%d)\n",rb,i,*(short *)&dl_ch0[i],*(1+(short*)&dl_ch0[i])); - } else { - printf("\t\t\t\t ###### THIS IS a pilot rb %d \t re %d => rxF_ext[%d]=(%d,%d)\t rxF[%d]=(%d,%d) \t this is a pilot symbol\n", - rb,i,j,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j]),i,*(short *)&rxF[i],*(1+(short*)&rxF[i])); - } - } - nb_rb++; - dl_ch0_ext += 9; - rxF_ext += 9; - dl_ch0 += 12; - rxF += 12; - } - } - // Do middle RB (around DC) - //printf("dlch_ext %d\n",dl_ch0_ext-&dl_ch_estimates_ext[aarx][0]); - if (symbol_mod == 0) { - j = 0; - for (i = 0; i < 6; i++) { - if ((i != 1) && (i != 5)) { - dl_ch0_ext[j] = dl_ch0[i]; - rxF_ext[j++] = rxF[i]; - //printf("**extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j-1],*(1+(short*)&rxF_ext[j-1])); - } - } - rxF = &rxdataF[aarx][((symbol * (frame_parms->ofdm_symbol_size)))]; - for (; i < 12; i++) { - if (i != 9) { - dl_ch0_ext[j] = dl_ch0[i]; - rxF_ext[j++] = rxF[(1 + i - 6)]; - //printf("**extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j-1],*(1+(short*)&rxF_ext[j-1])); - } - } - nb_rb++; - dl_ch0_ext += 9; - rxF_ext += 9; - dl_ch0 += 12; - rxF += 7; - rb++; - } else { - for (i = 0; i < 6; i++) { - dl_ch0_ext[i] = dl_ch0[i]; - rxF_ext[i] = rxF[i]; - } - rxF = &rxdataF[aarx][((symbol * (frame_parms->ofdm_symbol_size)))]; - for (; i < 12; i++) { - dl_ch0_ext[i] = dl_ch0[i]; - rxF_ext[i] = rxF[(1 + i - 6)]; - } - nb_rb++; - dl_ch0_ext += 12; - rxF_ext += 12; - dl_ch0 += 12; - rxF += 7; - rb++; - } - for (; rb < frame_parms->N_RB_DL; rb++) { - printf("\t\t\t ###### rb=%d (Even number of RBs, rb > half of band)\n",rb); - if (symbol_mod > 0) { - memcpy(dl_ch0_ext, dl_ch0, 12 * sizeof(int32_t)); - for (i = 0; i < 12; i++) - rxF_ext[i] = rxF[i]; - nb_rb++; - dl_ch0_ext += 12; - rxF_ext += 12; - dl_ch0 += 12; - rxF += 12; - } else { - j = 0; - for (i = 0; i < 12; i++) { - if ((i != 1) && (i != 5) && (i != 9)) { - rxF_ext[j] = rxF[i]; - printf("\t\t\t\t ###### extract rb %d, re %d => rxF_ext[]=(%d,%d)",rb,i,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); - //printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); - dl_ch0_ext[j++] = dl_ch0[i]; - printf("\t ###### extract rb %d, re %d => dl_ch0 []=(%d,%d)\n",rb,i,*(short *)&dl_ch0[i],*(1+(short*)&dl_ch0[i])); - } else { - printf("\t\t\t\t ###### THIS IS a RS at re %d\n",i); - } - } - nb_rb++; - dl_ch0_ext += 9; - rxF_ext += 9; - dl_ch0 += 12; - rxF += 12; - } - } - } - } - -// The function has created table rxdataF_ext with the contents of rxdataF and removing the pilots at positions 1,5,9 in every RB. -// Now we need to check the contents of rxdataF_ext and keep only the values which correspond to our CORESET depending on variables: -// - coreset_freq_dom (45 bit map) -// - n_BWP_start (first RB within the active BWP and the CORESET) - j=0; - k=0; - rxF_ext = &rxdataF_ext[aarx][(symbol * (frame_parms->N_RB_DL * 12))]; - printf("\t\t### in function nr_pdcch_extract_rbs_single(), \t ### rxF_ext = &rxdataF_ext[aarx = (%d)][n_BWP_start + (symbol * (frame_parms->N_RB_DL * 12)) = (%d)]\n", - aarx,(n_BWP_start + (symbol * (frame_parms->N_RB_DL * 12)))); - - int bitcnt_coreset_freq_dom = 1; // this variable will allow to check each bit of the 45 bitmap coreset_freq_dom. - //Eg: if bitcnt_coreset_freq_dom = 3, (46-3) we verify bit 43 starting from LSB - for (rb=0; rbN_RB_DL;rb++) { - if (rb < n_BWP_start) { - // while rb is not within CORESET, then remove values - for (i=0; i<8; i++) { - //rxF_ext[i] = 0; - j++; - } - //rxF_ext = &rxdataF_ext[aarx][(j + (symbol * (frame_parms->N_RB_DL * 12)))]; - } else if ((rb >= n_BWP_start) && (rb < (n_BWP_start + 6 * 45))) { - // rb is within CORESET, we need to verify now whether bit in coreset_freq_dom is set or not - if ((((coreset_freq_dom & 0x1FFFFFFFFFFF) >> (46 - bitcnt_coreset_freq_dom)) & 0x1)== 0){ - // if bit is 0, next 6 consecutive RBs do not belong to CORESET - bitcnt_coreset_freq_dom ++; - rb = rb + 6; - for (i=0; i<(9*6); i++) { - //rxF_ext[i] = 0; - j++; - } - //rxF_ext = &rxdataF_ext[aarx][(j + (symbol * (frame_parms->N_RB_DL * 12)))]; - } else { - // if bit is 1, next 6 consecutive RBs belong to CORESET - bitcnt_coreset_freq_dom ++; - rb = rb + 6; - for (i=0; i<(9*6); i++) { - rxF_ext[k] = rxF_ext[j]; - k++; - j++; - } - //rxF_ext = &rxdataF_ext[aarx][(j + (symbol * (frame_parms->N_RB_DL * 12)))]; - } - } else { // for the RBs that are in the upper side of the CORESET bitmap - for (i=0; i<8; i++) { - rxF_ext[k] = 0; - k++; - j++; - } - //rxF_ext = &rxdataF_ext[aarx][(j + (symbol * (frame_parms->N_RB_DL * 12)))]; - } - } -} - -#endif - void pdcch_extract_rbs_single(int32_t **rxdataF, @@ -2286,227 +1459,6 @@ void nr_pdcch_channel_compensation(int32_t **rxdataF_ext, } - -/* -void pdcch_channel_compensation(int32_t **rxdataF_ext, - int32_t **dl_ch_estimates_ext, - int32_t **rxdataF_comp, - int32_t **rho, - NR_DL_FRAME_PARMS *frame_parms, - uint8_t symbol, - uint8_t output_shift) -{ - - uint16_t rb; -#if defined(__x86_64__) || defined(__i386__) - __m128i *dl_ch128,*rxdataF128,*rxdataF_comp128; - __m128i *dl_ch128_2, *rho128; -#elif defined(__arm__) - -#endif - uint8_t aatx,aarx,pilots=0; - - - - -#ifdef DEBUG_DCI_DECODING - LOG_I(PHY, "PDCCH comp: symbol %d\n",symbol); -#endif - - if (symbol==0) - pilots=1; - - for (aatx=0; aatxnb_antenna_ports_eNB; aatx++) { - //if (frame_parms->mode1_flag && aatx>0) break; //if mode1_flag is set then there is only one stream to extract, independent of nb_antenna_ports_eNB - - for (aarx=0; aarxnb_antennas_rx; aarx++) { - -#if defined(__x86_64__) || defined(__i386__) - dl_ch128 = (__m128i *)&dl_ch_estimates_ext[(aatx<<1)+aarx][symbol*frame_parms->N_RB_DL*12]; - rxdataF128 = (__m128i *)&rxdataF_ext[aarx][symbol*frame_parms->N_RB_DL*12]; - rxdataF_comp128 = (__m128i *)&rxdataF_comp[(aatx<<1)+aarx][symbol*frame_parms->N_RB_DL*12]; -#elif defined(__arm__) - -#endif - - for (rb=0; rbN_RB_DL; rb++) { - -#if defined(__x86_64__) || defined(__i386__) - // multiply by conjugated channel - mmtmpPD0 = _mm_madd_epi16(dl_ch128[0],rxdataF128[0]); - // print_ints("re",&mmtmpPD0); - - // mmtmpPD0 contains real part of 4 consecutive outputs (32-bit) - mmtmpPD1 = _mm_shufflelo_epi16(dl_ch128[0],_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_shufflehi_epi16(mmtmpPD1,_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_sign_epi16(mmtmpPD1,*(__m128i*)&conjugate[0]); - // print_ints("im",&mmtmpPD1); - mmtmpPD1 = _mm_madd_epi16(mmtmpPD1,rxdataF128[0]); - // mmtmpPD1 contains imag part of 4 consecutive outputs (32-bit) - mmtmpPD0 = _mm_srai_epi32(mmtmpPD0,output_shift); - // print_ints("re(shift)",&mmtmpPD0); - mmtmpPD1 = _mm_srai_epi32(mmtmpPD1,output_shift); - // print_ints("im(shift)",&mmtmpPD1); - mmtmpPD2 = _mm_unpacklo_epi32(mmtmpPD0,mmtmpPD1); - mmtmpPD3 = _mm_unpackhi_epi32(mmtmpPD0,mmtmpPD1); - // print_ints("c0",&mmtmpPD2); - // print_ints("c1",&mmtmpPD3); - rxdataF_comp128[0] = _mm_packs_epi32(mmtmpPD2,mmtmpPD3); - // print_shorts("rx:",rxdataF128); - // print_shorts("ch:",dl_ch128); - // print_shorts("pack:",rxdataF_comp128); - - // multiply by conjugated channel - mmtmpPD0 = _mm_madd_epi16(dl_ch128[1],rxdataF128[1]); - // mmtmpPD0 contains real part of 4 consecutive outputs (32-bit) - mmtmpPD1 = _mm_shufflelo_epi16(dl_ch128[1],_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_shufflehi_epi16(mmtmpPD1,_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_sign_epi16(mmtmpPD1,*(__m128i*)conjugate); - mmtmpPD1 = _mm_madd_epi16(mmtmpPD1,rxdataF128[1]); - // mmtmpPD1 contains imag part of 4 consecutive outputs (32-bit) - mmtmpPD0 = _mm_srai_epi32(mmtmpPD0,output_shift); - mmtmpPD1 = _mm_srai_epi32(mmtmpPD1,output_shift); - mmtmpPD2 = _mm_unpacklo_epi32(mmtmpPD0,mmtmpPD1); - mmtmpPD3 = _mm_unpackhi_epi32(mmtmpPD0,mmtmpPD1); - - rxdataF_comp128[1] = _mm_packs_epi32(mmtmpPD2,mmtmpPD3); - - // print_shorts("rx:",rxdataF128+1); - // print_shorts("ch:",dl_ch128+1); - // print_shorts("pack:",rxdataF_comp128+1); - // multiply by conjugated channel - if (pilots == 0) { - mmtmpPD0 = _mm_madd_epi16(dl_ch128[2],rxdataF128[2]); - // mmtmpPD0 contains real part of 4 consecutive outputs (32-bit) - mmtmpPD1 = _mm_shufflelo_epi16(dl_ch128[2],_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_shufflehi_epi16(mmtmpPD1,_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_sign_epi16(mmtmpPD1,*(__m128i*)conjugate); - mmtmpPD1 = _mm_madd_epi16(mmtmpPD1,rxdataF128[2]); - // mmtmpPD1 contains imag part of 4 consecutive outputs (32-bit) - mmtmpPD0 = _mm_srai_epi32(mmtmpPD0,output_shift); - mmtmpPD1 = _mm_srai_epi32(mmtmpPD1,output_shift); - mmtmpPD2 = _mm_unpacklo_epi32(mmtmpPD0,mmtmpPD1); - mmtmpPD3 = _mm_unpackhi_epi32(mmtmpPD0,mmtmpPD1); - - rxdataF_comp128[2] = _mm_packs_epi32(mmtmpPD2,mmtmpPD3); - } - - // print_shorts("rx:",rxdataF128+2); - // print_shorts("ch:",dl_ch128+2); - // print_shorts("pack:",rxdataF_comp128+2); - - if (pilots==0) { - dl_ch128+=3; - rxdataF128+=3; - rxdataF_comp128+=3; - } else { - dl_ch128+=2; - rxdataF128+=2; - rxdataF_comp128+=2; - } -#elif defined(__arm__) - -#endif - } - } - } - - - if (rho) { - - for (aarx=0; aarxnb_antennas_rx; aarx++) { - -#if defined(__x86_64__) || defined(__i386__) - rho128 = (__m128i *)&rho[aarx][symbol*frame_parms->N_RB_DL*12]; - dl_ch128 = (__m128i *)&dl_ch_estimates_ext[aarx][symbol*frame_parms->N_RB_DL*12]; - dl_ch128_2 = (__m128i *)&dl_ch_estimates_ext[2+aarx][symbol*frame_parms->N_RB_DL*12]; - -#elif defined(__arm__) - -#endif - for (rb=0; rbN_RB_DL; rb++) { -#if defined(__x86_64__) || defined(__i386__) - - // multiply by conjugated channel - mmtmpPD0 = _mm_madd_epi16(dl_ch128[0],dl_ch128_2[0]); - // print_ints("re",&mmtmpD0); - - // mmtmpD0 contains real part of 4 consecutive outputs (32-bit) - mmtmpPD1 = _mm_shufflelo_epi16(dl_ch128[0],_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_shufflehi_epi16(mmtmpPD1,_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_sign_epi16(mmtmpPD1,*(__m128i*)&conjugate[0]); - // print_ints("im",&mmtmpPD1); - mmtmpPD1 = _mm_madd_epi16(mmtmpPD1,dl_ch128_2[0]); - // mmtmpPD1 contains imag part of 4 consecutive outputs (32-bit) - mmtmpPD0 = _mm_srai_epi32(mmtmpPD0,output_shift); - // print_ints("re(shift)",&mmtmpD0); - mmtmpPD1 = _mm_srai_epi32(mmtmpPD1,output_shift); - // print_ints("im(shift)",&mmtmpD1); - mmtmpPD2 = _mm_unpacklo_epi32(mmtmpPD0,mmtmpPD1); - mmtmpPD3 = _mm_unpackhi_epi32(mmtmpPD0,mmtmpPD1); - // print_ints("c0",&mmtmpPD2); - // print_ints("c1",&mmtmpPD3); - rho128[0] = _mm_packs_epi32(mmtmpPD2,mmtmpPD3); - - //print_shorts("rx:",dl_ch128_2); - //print_shorts("ch:",dl_ch128); - //print_shorts("pack:",rho128); - - // multiply by conjugated channel - mmtmpPD0 = _mm_madd_epi16(dl_ch128[1],dl_ch128_2[1]); - // mmtmpD0 contains real part of 4 consecutive outputs (32-bit) - mmtmpPD1 = _mm_shufflelo_epi16(dl_ch128[1],_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_shufflehi_epi16(mmtmpPD1,_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_sign_epi16(mmtmpPD1,*(__m128i*)conjugate); - mmtmpPD1 = _mm_madd_epi16(mmtmpPD1,dl_ch128_2[1]); - // mmtmpD1 contains imag part of 4 consecutive outputs (32-bit) - mmtmpPD0 = _mm_srai_epi32(mmtmpPD0,output_shift); - mmtmpPD1 = _mm_srai_epi32(mmtmpPD1,output_shift); - mmtmpPD2 = _mm_unpacklo_epi32(mmtmpPD0,mmtmpPD1); - mmtmpPD3 = _mm_unpackhi_epi32(mmtmpPD0,mmtmpPD1); - - - rho128[1] =_mm_packs_epi32(mmtmpPD2,mmtmpPD3); - //print_shorts("rx:",dl_ch128_2+1); - //print_shorts("ch:",dl_ch128+1); - //print_shorts("pack:",rho128+1); - // multiply by conjugated channel - mmtmpPD0 = _mm_madd_epi16(dl_ch128[2],dl_ch128_2[2]); - // mmtmpPD0 contains real part of 4 consecutive outputs (32-bit) - mmtmpPD1 = _mm_shufflelo_epi16(dl_ch128[2],_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_shufflehi_epi16(mmtmpPD1,_MM_SHUFFLE(2,3,0,1)); - mmtmpPD1 = _mm_sign_epi16(mmtmpPD1,*(__m128i*)conjugate); - mmtmpPD1 = _mm_madd_epi16(mmtmpPD1,dl_ch128_2[2]); - // mmtmpPD1 contains imag part of 4 consecutive outputs (32-bit) - mmtmpPD0 = _mm_srai_epi32(mmtmpPD0,output_shift); - mmtmpPD1 = _mm_srai_epi32(mmtmpPD1,output_shift); - mmtmpPD2 = _mm_unpacklo_epi32(mmtmpPD0,mmtmpPD1); - mmtmpPD3 = _mm_unpackhi_epi32(mmtmpPD0,mmtmpPD1); - - rho128[2] = _mm_packs_epi32(mmtmpPD2,mmtmpPD3); - //print_shorts("rx:",dl_ch128_2+2); - //print_shorts("ch:",dl_ch128+2); - //print_shorts("pack:",rho128+2); - - dl_ch128+=3; - dl_ch128_2+=3; - rho128+=3; - -#elif defined(__arm_) - - -#endif - } - } - - } - -#if defined(__x86_64__) || defined(__i386__) - _mm_empty(); - _m_empty(); -#endif -} -*/ void pdcch_detection_mrc(NR_DL_FRAME_PARMS *frame_parms, int32_t **rxdataF_comp, uint8_t symbol) @@ -2634,46 +1586,6 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, if (searchSpaceType == ue_specific) do_common=0; uint8_t log2_maxh, aatx, aarx; int32_t avgs; - //uint8_t n_pdcch_symbols; - // the variable mi can be removed for NR - //uint8_t mi = get_mi(frame_parms, nr_tti_rx); - -/* - * The following variables have been extracted from higher layer parameters - * MIB1 => pdcchConfigSIB1 - * ControlResourceSet IE - * pdcch-Config - * pdcch-ConfigCommon - */ -#if 0 -/* - * initialize this values for testing - */ - - pdcch_vars2->coreset[nb_coreset_active].frequencyDomainResources = 0x1FFF2FF00000; - //pdcch_vars2->coreset[nb_coreset_active].frequencyDomainResources = 0x1E0000000000; - pdcch_vars2->coreset[nb_coreset_active].duration = 2; - pdcch_vars2->coreset[nb_coreset_active].cce_reg_mappingType.shiftIndex = 0; - pdcch_vars2->coreset[nb_coreset_active].cce_reg_mappingType.reg_bundlesize = bundle_n6; - pdcch_vars2->coreset[nb_coreset_active].cce_reg_mappingType.interleaversize = interleave_n2; - pdcch_vars2->coreset[nb_coreset_active].pdcchDMRSScramblingID = 1; - for (int i=0; i < NR_NBR_SEARCHSPACE_ACT_BWP; i++){ - pdcch_vars[eNB_id]->searchSpace[i].nrofCandidates_aggrlevel1 = 7; - pdcch_vars[eNB_id]->searchSpace[i].nrofCandidates_aggrlevel2 = 6; - pdcch_vars[eNB_id]->searchSpace[i].nrofCandidates_aggrlevel4 = 4; - pdcch_vars[eNB_id]->searchSpace[i].nrofCandidates_aggrlevel8 = 3; - pdcch_vars[eNB_id]->searchSpace[i].nrofCandidates_aggrlevel16 = 1; - pdcch_vars[eNB_id]->searchSpace[i].searchSpaceType.sfi_nrofCandidates_aggrlevel1 = 7; - pdcch_vars[eNB_id]->searchSpace[i].searchSpaceType.sfi_nrofCandidates_aggrlevel2 = 6; - pdcch_vars[eNB_id]->searchSpace[i].searchSpaceType.sfi_nrofCandidates_aggrlevel4 = 4; - pdcch_vars[eNB_id]->searchSpace[i].searchSpaceType.sfi_nrofCandidates_aggrlevel8 = 3; - pdcch_vars[eNB_id]->searchSpace[i].searchSpaceType.sfi_nrofCandidates_aggrlevel16 = 1; - } - -/* - * to be removed after testing - */ -#endif //(0) // number of RB (1 symbol) or REG (12 RE) in one CORESET: higher-layer parameter CORESET-freq-dom // (bit map 45 bits: each bit indicates 6 RB in CORESET -> 1 bit MSB indicates PRB 0..6 are part of CORESET) @@ -2756,32 +1668,7 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, for (int s = start_symbol; s < (start_symbol + coreset_time_dur); s++) { printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> we enter process pdcch ofdm symbol s=%d where coreset_time_dur=%d\n",s,coreset_time_dur); -/* if (is_secondary_ue == 1) { - pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF, - common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates[eNB_id+1], //add 1 to eNB_id to compensate for the shifted B/F'd pilots from the SeNB - pdcch_vars[eNB_id]->rxdataF_ext, - pdcch_vars[eNB_id]->dl_ch_estimates_ext, - 0, - high_speed_flag, - frame_parms); -#ifdef MU_RECEIVER - pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF, - common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates[eNB_id_i - 1], //subtract 1 to eNB_id_i to compensate for the non-shifted pilots from the PeNB - pdcch_vars[eNB_id_i]->rxdataF_ext,//shift by two to simulate transmission from a second antenna - pdcch_vars[eNB_id_i]->dl_ch_estimates_ext,//shift by two to simulate transmission from a second antenna - 0, - high_speed_flag, - frame_parms); -#endif //MU_RECEIVER - } else if (frame_parms->nb_antenna_ports_eNB>1) { - pdcch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF, - common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates[eNB_id], - pdcch_vars[eNB_id]->rxdataF_ext, - pdcch_vars[eNB_id]->dl_ch_estimates_ext, - 0, - high_speed_flag, - frame_parms); - } else {*/ + #ifdef NR_PDCCH_DCI_DEBUG printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> we enter nr_pdcch_extract_rbs_single(is_secondary_ue=%d) to remove DM-RS PDCCH\n", is_secondary_ue); @@ -2797,18 +1684,6 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, coreset_freq_dom, coreset_nbr_rb, n_rb_offset); -/* - printf("\t### in nr_rx_pdcch() function we enter pdcch_extract_rbs_single(is_secondary_ue=%d) to remove DM-RS PDCCH\n",is_secondary_ue); - pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF, - common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates[eNB_id], - pdcch_vars[eNB_id]->rxdataF_ext, - pdcch_vars[eNB_id]->dl_ch_estimates_ext, - 0, - high_speed_flag, - frame_parms); -*/ - -//} #ifdef NR_PDCCH_DCI_DEBUG printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> we enter pdcch_channel_level(avgP=%d) => compute channel level based on ofdm symbol 0, pdcch_vars[eNB_id]->dl_ch_estimates_ext\n",avgP); @@ -2818,7 +1693,7 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, pdcch_channel_level(pdcch_vars[eNB_id]->dl_ch_estimates_ext, frame_parms, avgP, - coreset_nbr_rb); + coreset_nbr_rb); avgs = 0; for (aatx = 0; aatx < frame_parms->nb_antenna_ports_eNB; aatx++) for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) @@ -2846,19 +1721,6 @@ T(T_UE_PHY_PDCCH_ENERGY, T_INT(eNB_id), T_INT(0), T_INT(frame%1024), T_INT(nr_tt log2_maxh, coreset_nbr_rb); // log2_maxh+I0_shift -/* -printf("\t### in nr_rx_pdcch() function we enter pdcch_channel_compensation(log2_maxh=%d) => compute LLRs for ofdm symbol 0 only, pdcch_vars[eNB_id]->rxdataF_ext ---> pdcch_vars[eNB_id]->rxdataF_comp\n",log2_maxh); - - // compute LLRs for ofdm symbol 0 only - pdcch_channel_compensation(pdcch_vars[eNB_id]->rxdataF_ext, - pdcch_vars[eNB_id]->dl_ch_estimates_ext, - pdcch_vars[eNB_id]->rxdataF_comp, - (aatx>1) ? pdcch_vars[eNB_id]->rho : NULL, - frame_parms, - 0, - log2_maxh);// log2_maxh+I0_shift -*/ - #ifdef DEBUG_PHY @@ -2949,13 +1811,6 @@ printf("\t### in nr_rx_pdcch() function we enter pdcch_channel_compensation(log2 (char *) pdcch_vars[eNB_id]->llr, s, coreset_nbr_rb); - /* - printf("\t### in nr_rx_pdcch() function we enter pdcch_llr(for symbol 0), pdcch_vars[eNB_id]->rxdataF_comp ---> pdcch_vars[eNB_id]->llr \n"); - pdcch_llr(frame_parms, pdcch_vars[eNB_id]->rxdataF_comp,(char *) pdcch_vars[eNB_id]->llr, 0); - */ - /*#ifdef DEBUG_PHY - write_output("llr8_seq.m","llr8",&pdcch_vars[eNB_id]->llr[s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,4); - #endif*/ #ifdef MU_RECEIVER } @@ -2986,50 +1841,6 @@ nr_pdcch_demapping_deinterleaving(pdcch_vars[eNB_id]->llr, n_shift); - - - - -#if 0 - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> we enter nr_pdcch_demapping()\n"); - #endif - - nr_pdcch_demapping(pdcch_vars[eNB_id]->llr, - pdcch_vars[eNB_id]->wbar, - frame_parms, - coreset_time_dur, - coreset_nbr_rb); - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> we enter nr_pdcch_deinterleaving()\n"); - #endif - nr_pdcch_deinterleaving(frame_parms, - (uint16_t*) pdcch_vars[eNB_id]->e_rx, - pdcch_vars[eNB_id]->wbar, - coreset_time_dur, - reg_bundle_size_L, - coreset_interleaver_size_R, - n_shift, - coreset_nbr_rb); - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> we enter nr_pdcch_unscrambling()\n"); - for (int i=0; i<(coreset_time_dur*coreset_nbr_rb*9); i++){ - printf("\te_rx[%d]=(%d,%d)",i,*(char*) &pdcch_vars[eNB_id]->e_rx[i],*(1 + (char*) &pdcch_vars[eNB_id]->e_rx[i])); - if (i%10 == 0) printf("\n"); - } - printf("\n"); - #endif -#endif - -//#if 0 - #ifdef NR_PDCCH_DCI_DEBUG -// printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> we end nr_pdcch_unscrambling()\n"); -// for (int i=0; i<(coreset_time_dur*coreset_nbr_rb*9); i++){ -// printf("\t before unscrambling : e_rx[%d]=(%d,%d)\n",i,*(char*) &pdcch_vars[eNB_id]->e_rx[i],*(1 + (char*) &pdcch_vars[eNB_id]->e_rx[i])); -// } -// printf("\n"); - #endif - nr_pdcch_unscrambling(pdcch_vars[eNB_id]->crnti, frame_parms, nr_tti_rx, @@ -3038,41 +1849,10 @@ nr_pdcch_demapping_deinterleaving(pdcch_vars[eNB_id]->llr, // get_nCCE(n_pdcch_symbols, frame_parms, mi) * 72, pdcch_DMRS_scrambling_id, do_common); - #ifdef NR_PDCCH_DCI_DEBUG + #ifdef NR_PDCCH_DCI_DEBUG printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> we end nr_pdcch_unscrambling()\n"); -// for (int i=0; i<(coreset_time_dur*coreset_nbr_rb*9); i++){ -// printf("\t after unscrambling : e_rx[%d]=(%d,%d)\n",i,*(char*) &pdcch_vars[eNB_id]->e_rx[i],*(1 + (char*) &pdcch_vars[eNB_id]->e_rx[i])); -// } -// printf("\n"); #endif -//#endif //0 -/* - printf("\t### in nr_rx_pdcch() function we enter pdcch_demapping()\n"); - pdcch_demapping(pdcch_vars[eNB_id]->llr, - pdcch_vars[eNB_id]->wbar, - frame_parms, - n_pdcch_symbols, - get_mi(frame_parms,nr_tti_rx)); - - printf("\t### in nr_rx_pdcch() function we enter pdcch_deinterleaving()\n"); - - pdcch_deinterleaving(frame_parms, - (uint16_t*)pdcch_vars[eNB_id]->e_rx, - pdcch_vars[eNB_id]->wbar, - n_pdcch_symbols, - mi); - - printf("\t### in nr_rx_pdcch() function we enter pdcch_unscrambling()\n"); - - pdcch_unscrambling(frame_parms, - nr_tti_rx, - pdcch_vars[eNB_id]->e_rx, - get_nCCE(n_pdcch_symbols,frame_parms,mi)*72); - - - pdcch_vars[eNB_id]->num_pdcch_symbols = n_pdcch_symbols; -*/ #ifdef NR_PDCCH_DCI_DEBUG printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> Ending nr_rx_pdcch() function\n"); #endif @@ -3167,504 +1947,9 @@ printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_unscrambling)-> (c_init=%d, n_id=%d, } } -#if 0 -void nr_pdcch_unscrambling_tmp(uint16_t crnti, NR_DL_FRAME_PARMS *frame_parms, uint8_t nr_tti_rx, - double llr[], uint32_t length, uint16_t pdcch_DMRS_scrambling_id, int do_common) { - - int i; - uint8_t reset; - uint32_t x1, x2, s = 0; - uint16_t n_id; //{0,1,...,65535} - uint32_t n_rnti; - - reset = 1; - // x1 is set in first call to lte_gold_generic - //do_common=1; -if (do_common){ - n_id = frame_parms->Nid_cell; - n_rnti = 0; -} else { - n_id = pdcch_DMRS_scrambling_id; - n_rnti = (uint32_t)crnti; -} -//x2 = ((n_rnti * (1 << 16)) + n_id)%(1 << 31); -//uint32_t puissance_2_16 = ((1<<16)*n_rnti)+n_id; -//uint32_t puissance_2_31= (1<<30)*2; -//uint32_t calc_x2=puissance_2_16%puissance_2_31; - x2 = (((1<<16)*n_rnti)+n_id)%((1<<30)*2); //this is c_init in 38.211 v15.1.0 Section 7.3.2.3 -// x2 = (nr_tti_rx << 9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.8.2 -#ifdef NR_PDCCH_DCI_DEBUG -printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_unscrambling)-> (c_init=%d, n_id=%d, n_rnti=%d, length=%d)\n",x2,n_id,n_rnti,length); -#endif - for (i = 0; i < length; i++) { - if ((i & 0x1f) == 0) { - s = lte_gold_generic(&x1, &x2, reset); - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_unscrambling)-> lte_gold[%d]=%x\n",i,s); - reset = 0; - } - - printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_unscrambling)-> unscrambling %d : scrambled_llr=%d, c %d => ",i,llr[i],((s>>(i&0x1f))&1)); - if (((s >> (i % 32)) & 1) == 1) - llr[i] = -llr[i]; - //llr[i] = (-1)*llr[i]; - printf("unscrambled_llr=%d\n",llr[i]); - - - } -} - - - -void nr_pdcch_unscrambling_old(uint16_t crnti, NR_DL_FRAME_PARMS *frame_parms, uint8_t nr_tti_rx, - int8_t* llr, uint32_t length, uint16_t pdcch_DMRS_scrambling_id, int do_common) { - - int i; - uint8_t reset; - uint32_t x1, x2, s = 0; - uint16_t n_id; //{0,1,...,65535} - uint32_t n_rnti; - - reset = 1; - // x1 is set in first call to lte_gold_generic - //do_common=1; -if (do_common){ - n_id = frame_parms->Nid_cell; - n_rnti = 0; -} else { - n_id = pdcch_DMRS_scrambling_id; - n_rnti = (uint32_t)crnti; -} -//x2 = ((n_rnti * (1 << 16)) + n_id)%(1 << 31); -//uint32_t puissance_2_16 = ((1<<16)*n_rnti)+n_id; -//uint32_t puissance_2_31= (1<<30)*2; -//uint32_t calc_x2=puissance_2_16%puissance_2_31; - x2 = (((1<<16)*n_rnti)+n_id)%((1<<30)*2); //this is c_init in 38.211 v15.1.0 Section 7.3.2.3 -// x2 = (nr_tti_rx << 9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.8.2 -#ifdef NR_PDCCH_DCI_DEBUG -printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_unscrambling)-> (c_init=%d, n_id=%d, n_rnti=%d)\n",x2,n_id,n_rnti); -#endif - for (i = 0; i < length; i++) { - if ((i & 0x1f) == 0) { - s = lte_gold_generic(&x1, &x2, reset); - // printf("lte_gold[%d]=%x\n",i,s); - reset = 0; - } - - // printf("unscrambling %d : e %d, c %d => ",i,llr[i],((s>>(i&0x1f))&1)); - if (((s >> (i % 32)) & 1) == 0) - llr[i] = -llr[i]; - // printf("%d\n",llr[i]); - - } -} -#endif // 0 - #endif - - -void pdcch_unscrambling(NR_DL_FRAME_PARMS *frame_parms, - uint8_t nr_tti_rx, - int8_t* llr, - uint32_t length) -{ - - int i; - uint8_t reset; - uint32_t x1, x2, s=0; - - reset = 1; - // x1 is set in first call to lte_gold_generic - - x2 = (nr_tti_rx<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.8.2 - - for (i=0; i ",i,llr[i],((s>>(i&0x1f))&1)); - if (((s>>(i%32))&1)==0) - llr[i] = -llr[i]; - // printf("%d\n",llr[i]); - - } -} - - -/*uint8_t get_num_pdcch_symbols(uint8_t num_dci, - DCI_ALLOC_t *dci_alloc, - NR_DL_FRAME_PARMS *frame_parms, - uint8_t nr_tti_rx) -{ - - uint16_t numCCE = 0; - uint8_t i; - uint8_t nCCEmin = 0; - uint16_t CCE_max_used_index = 0; - uint16_t firstCCE_max = dci_alloc[0].firstCCE; - uint8_t L = dci_alloc[0].L; - - // check pdcch duration imposed by PHICH duration (Section 6.9 of 36-211) - if (frame_parms->Ncp==1) { // extended prefix - if ((frame_parms->frame_type == TDD) && - ((frame_parms->tdd_config<3)||(frame_parms->tdd_config==6)) && - ((nr_tti_rx==1) || (nr_tti_rx==6))) // subframes 1 and 6 (S-subframes) for 5ms switching periodicity are 2 symbols - nCCEmin = 2; - else { // 10ms switching periodicity is always 3 symbols, any DL-only subframe is 3 symbols - nCCEmin = 3; - } - } - - // compute numCCE - for (i=0; i %d\n",i,dci_alloc[i].L); - numCCE += (1<<(dci_alloc[i].L)); - - if(firstCCE_max < dci_alloc[i].firstCCE) { - firstCCE_max = dci_alloc[i].firstCCE; - L = dci_alloc[i].L; - } - } - CCE_max_used_index = firstCCE_max + (1<N_RB_DL*2)) - if (CCE_max_used_index < get_nCCE(1, frame_parms, get_mi(frame_parms, nr_tti_rx))) - return(cmax(1,nCCEmin)); - //else if ((9*numCCE) <= (frame_parms->N_RB_DL*((frame_parms->nb_antenna_ports_eNB==4) ? 4 : 5))) - else if (CCE_max_used_index < get_nCCE(2, frame_parms, get_mi(frame_parms, nr_tti_rx))) - return(cmax(2,nCCEmin)); - //else if ((9*numCCE) <= (frame_parms->N_RB_DL*((frame_parms->nb_antenna_ports_eNB==4) ? 7 : 8))) - else if (CCE_max_used_index < get_nCCE(3, frame_parms, get_mi(frame_parms, nr_tti_rx))) - return(cmax(3,nCCEmin)); - else if (frame_parms->N_RB_DL<=10) { - if (frame_parms->Ncp == 0) { // normal CP - printf("numCCE %d, N_RB_DL = %d : should be returning 4 PDCCH symbols (%d,%d,%d)\n",numCCE,frame_parms->N_RB_DL, - get_nCCE(1, frame_parms, get_mi(frame_parms, nr_tti_rx)), - get_nCCE(2, frame_parms, get_mi(frame_parms, nr_tti_rx)), - get_nCCE(3, frame_parms, get_mi(frame_parms, nr_tti_rx))); - - if ((9*numCCE) <= (frame_parms->N_RB_DL*((frame_parms->nb_antenna_ports_eNB==4) ? 10 : 11))) - return(4); - } else { // extended CP - if ((9*numCCE) <= (frame_parms->N_RB_DL*((frame_parms->nb_antenna_ports_eNB==4) ? 9 : 10))) - return(4); - } - } - - - LOG_D(PHY," dci.c: get_num_pdcch_symbols nr_tti_rx %d FATAL, illegal numCCE %d (num_dci %d)\n",nr_tti_rx,numCCE,num_dci); - //for (i=0;inushift%3; - - int Msymb2; - int split_flag=0; - - switch (frame_parms->N_RB_DL) { - case 100: - Msymb2 = Msymb; - break; - - case 75: - Msymb2 = 3*Msymb/4; - break; - - case 50: - Msymb2 = Msymb>>1; - break; - - case 25: - Msymb2 = Msymb>>2; - break; - - case 15: - Msymb2 = Msymb*15/100; - break; - - case 6: - Msymb2 = Msymb*6/100; - break; - - default: - Msymb2 = Msymb>>2; - break; - } - - num_pdcch_symbols = get_num_pdcch_symbols(num_dci,dci_alloc,frame_parms,nr_tti_rx); - // printf("nr_tti_rx %d in generate_dci_top num_pdcch_symbols = %d, num_dci %d\n", - // nr_tti_rx,num_pdcch_symbols,num_dci); - generate_pcfich(num_pdcch_symbols, - amp, - frame_parms, - txdataF, - nr_tti_rx); - wbar[0] = &wbar0[0]; - wbar[1] = &wbar1[0]; - y[0] = &yseq0[0]; - y[1] = &yseq1[0]; - - // reset all bits to , here we set elements as 2 - // memset(e, 2, DCI_BITS_MAX); - // here we interpret NIL as a random QPSK sequence. That makes power estimation easier. - for (i=0; i=0) { - e_ptr = generate_dci0(dci_alloc[i].dci_pdu, - e+(72*dci_alloc[i].firstCCE), - dci_alloc[i].dci_length, - dci_alloc[i].L, - dci_alloc[i].rnti); - } - } - - // Scrambling - // printf("pdcch scrambling\n"); - pdcch_scrambling(frame_parms, - nr_tti_rx, - e, - 8*get_nquad(num_pdcch_symbols, frame_parms, mi)); - //72*get_nCCE(num_pdcch_symbols,frame_parms,mi)); - - - - - // Now do modulation - if (frame_parms->mode1_flag==1) - gain_lin_QPSK = (int16_t)((amp*ONE_OVER_SQRT2_Q15)>>15); - else - gain_lin_QPSK = amp/2; - - e_ptr = e; - -#ifdef DEBUG_DCI_ENCODING - printf(" PDCCH Modulation, Msymb %d, Msymb2 %d,gain_lin_QPSK %d\n",Msymb,Msymb2,gain_lin_QPSK); -#endif - - - if (frame_parms->mode1_flag) { //SISO - - - for (i=0; i>2); -#endif - // first antenna position n -> x0 - ((int16_t*)&y[0][i])[0] = (*e_ptr==2) ? 0 : (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK; - e_ptr++; - ((int16_t*)&y[0][i])[1] = (*e_ptr==2) ? 0 : (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK; - e_ptr++; - - // second antenna position n -> -x1* - ((int16_t*)&y[1][i])[0] = (*e_ptr==2) ? 0 : (*e_ptr == 1) ? gain_lin_QPSK : -gain_lin_QPSK; - e_ptr++; - ((int16_t*)&y[1][i])[1] = (*e_ptr==2) ? 0 : (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK; - e_ptr++; - - // fill in the rest of the ALAMOUTI precoding - ((int16_t*)&y[0][i+1])[0] = -((int16_t*)&y[1][i])[0]; - ((int16_t*)&y[0][i+1])[1] = ((int16_t*)&y[1][i])[1]; - ((int16_t*)&y[1][i+1])[0] = ((int16_t*)&y[0][i])[0]; - ((int16_t*)&y[1][i+1])[1] = -((int16_t*)&y[0][i])[1]; - - } - } - - -#ifdef DEBUG_DCI_ENCODING - printf(" PDCCH Interleaving\n"); -#endif - - // printf("y %p (%p,%p), wbar %p (%p,%p)\n",y,y[0],y[1],wbar,wbar[0],wbar[1]); - // This is the interleaving procedure defined in 36-211, first part of Section 6.8.5 - pdcch_interleaving(frame_parms,&y[0],&wbar[0],num_pdcch_symbols,mi); - - mprime=0; - nsymb = (frame_parms->Ncp==0) ? 14:12; - re_offset = frame_parms->first_carrier_offset; - - // This is the REG allocation algorithm from 36-211, second part of Section 6.8.5 - // printf("DCI (SF %d) : txdataF %p (0 %p)\n",subframe,&txdataF[0][512*14*subframe],&txdataF[0][0]); - for (kprime=0; kprimeN_RB_DL*12; kprime++) { - for (lprime=0; lprimeofdm_symbol_size*(lprime+(nr_tti_rx*nsymb)); - - - - tti_offset = symbol_offset + re_offset; - - (re_offset==(frame_parms->ofdm_symbol_size-2)) ? (split_flag=1) : (split_flag=0); - - // printf("kprime %d, lprime %d => REG %d (symbol %d)\n",kprime,lprime,(lprime==0)?(kprime/6) : (kprime>>2),symbol_offset); - // if REG is allocated to PHICH, skip it - if (check_phich_reg(frame_parms,kprime,lprime,mi) == 1) { -#ifdef DEBUG_DCI_ENCODING - printf("generate_dci: skipping REG %d (kprime %d, lprime %d)\n",(lprime==0)?(kprime/6) : (kprime>>2),kprime,lprime); -#endif - } else { - // Copy REG to TX buffer - - if ((lprime == 0)|| - ((lprime==1)&&(frame_parms->nb_antenna_ports_eNB == 4))) { - // first symbol, or second symbol+4 TX antennas skip pilots - - kprime_mod12 = kprime%12; - - if ((kprime_mod12 == 0) || (kprime_mod12 == 6)) { - // kprime represents REG - - for (i=0; i<6; i++) { - if ((i!=(nushiftmod3))&&(i!=(nushiftmod3+3))) { - txdataF[0][tti_offset+i] = wbar[0][mprime]; - - if (frame_parms->nb_antenna_ports_eNB > 1) - txdataF[1][tti_offset+i] = wbar[1][mprime]; - -#ifdef DEBUG_DCI_ENCODING - printf(" PDCCH mapping mprime %d => %d (symbol %d re %d) -> (%d,%d)\n",mprime,tti_offset,symbol_offset,re_offset+i,*(short*)&wbar[0][mprime],*(1+(short*)&wbar[0][mprime])); -#endif - - mprime++; - } - } - } - } else { // no pilots in this symbol - kprime_mod12 = kprime%12; - - if ((kprime_mod12 == 0) || (kprime_mod12 == 4) || (kprime_mod12 == 8)) { - // kprime represents REG - if (split_flag==0) { - for (i=0; i<4; i++) { - txdataF[0][tti_offset+i] = wbar[0][mprime]; - - if (frame_parms->nb_antenna_ports_eNB > 1) - txdataF[1][tti_offset+i] = wbar[1][mprime]; - -#ifdef DEBUG_DCI_ENCODING - LOG_I(PHY," PDCCH mapping mprime %d => %d (symbol %d re %d) -> (%d,%d)\n",mprime,tti_offset,symbol_offset,re_offset+i,*(short*)&wbar[0][mprime],*(1+(short*)&wbar[0][mprime])); -#endif - mprime++; - } - } else { - txdataF[0][tti_offset+0] = wbar[0][mprime]; - - if (frame_parms->nb_antenna_ports_eNB > 1) - txdataF[1][tti_offset+0] = wbar[1][mprime]; - -#ifdef DEBUG_DCI_ENCODING - printf(" PDCCH mapping mprime %d => %d (symbol %d re %d) -> (%d,%d)\n",mprime,tti_offset,symbol_offset,re_offset,*(short*)&wbar[0][mprime],*(1+(short*)&wbar[0][mprime])); -#endif - mprime++; - txdataF[0][tti_offset+1] = wbar[0][mprime]; - - if (frame_parms->nb_antenna_ports_eNB > 1) - txdataF[1][tti_offset+1] = wbar[1][mprime]; - -#ifdef DEBUG_DCI_ENCODING - printf("PDCCH mapping mprime %d => %d (symbol %d re %d) -> (%d,%d)\n",mprime,tti_offset,symbol_offset,re_offset+1,*(short*)&wbar[0][mprime],*(1+(short*)&wbar[0][mprime])); -#endif - mprime++; - txdataF[0][tti_offset-frame_parms->ofdm_symbol_size+3] = wbar[0][mprime]; - - if (frame_parms->nb_antenna_ports_eNB > 1) - txdataF[1][tti_offset-frame_parms->ofdm_symbol_size+3] = wbar[1][mprime]; - -#ifdef DEBUG_DCI_ENCODING - printf(" PDCCH mapping mprime %d => %d (symbol %d re %d) -> (%d,%d)\n",mprime,tti_offset,symbol_offset,re_offset-frame_parms->ofdm_symbol_size+3,*(short*)&wbar[0][mprime], - *(1+(short*)&wbar[0][mprime])); -#endif - mprime++; - txdataF[0][tti_offset-frame_parms->ofdm_symbol_size+4] = wbar[0][mprime]; - - if (frame_parms->nb_antenna_ports_eNB > 1) - txdataF[1][tti_offset-frame_parms->ofdm_symbol_size+4] = wbar[1][mprime]; - -#ifdef DEBUG_DCI_ENCODING - printf(" PDCCH mapping mprime %d => %d (symbol %d re %d) -> (%d,%d)\n",mprime,tti_offset,symbol_offset,re_offset-frame_parms->ofdm_symbol_size+4,*(short*)&wbar[0][mprime], - *(1+(short*)&wbar[0][mprime])); -#endif - mprime++; - - } - } - } - - if (mprime>=Msymb2) - return(num_pdcch_symbols); - } // check_phich_reg - - } //lprime loop - - re_offset++; - - if (re_offset == (frame_parms->ofdm_symbol_size)) - re_offset = 1; - } // kprime loop - - return(num_pdcch_symbols); -} -*/ #ifdef PHY_ABSTRACTION uint8_t generate_dci_top_emul(PHY_VARS_eNB *phy_vars_eNB, int num_dci, @@ -5725,1088 +4010,16 @@ uint8_t nr_dci_decoding_procedure(int s, #ifdef NR_PDCCH_DCI_DEBUG printf("\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure)-> at the end crc_scrambled=%d and format_found=%d\n",*crc_scrambled,*format_found); #endif - /*if (uss_dci_format == uformat0_1_and_1_1) { // Not implemented yet. FIXME!!! - // for format0_1, first we calculate dci pdu size - format0_1_size_bits = nr_dci_format_size(format0_1,c_rnti,16,n_RB_ULBWP,n_RB_DLBWP,dci_fields_sizes); - format0_1_size_bytes = (format0_1_size_bits%8 == 0) ? (uint8_t)floor(format0_1_size_bits/8) : (uint8_t)(floor(format0_1_size_bits/8) + 1); - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure)-> calculating dci format size for UE-specific searchSpaces with format uss_dci_format=%d, format0_1_size_bits=%d, format0_1_size_bytes=%d\n", - css_dci_format,format0_1_size_bits,format0_1_size_bytes); - #endif - // blind decoding format0_1 for aggregation level 1. The number of candidates (nrofCandidates) will be calculated in function nr_dci_decoding_procedure0 - // blind decoding format0_1 for aggregation level 2. The number of candidates (nrofCandidates) will be calculated in function nr_dci_decoding_procedure0 - // blind decoding format0_1 for aggregation level 4. The number of candidates (nrofCandidates) will be calculated in function nr_dci_decoding_procedure0 - // blind decoding format0_1 for aggregation level 8. The number of candidates (nrofCandidates) will be calculated in function nr_dci_decoding_procedure0 - // blind decoding format0_1 for aggregation level 16. The number of candidates (nrofCandidates) will be calculated in function nr_dci_decoding_procedure0 - // for format1_1, first we calculate dci pdu size - format1_1_size_bits = nr_dci_format_size(format1_1,c_rnti,16,n_RB_ULBWP,n_RB_DLBWP,dci_fields_sizes); - format1_1_size_bytes = (format1_1_size_bits%8 == 0) ? (uint8_t)floor(format1_1_size_bits/8) : (uint8_t)(floor(format1_1_size_bits/8) + 1); - #ifdef NR_PDCCH_DCI_DEBUG - printf("\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure)-> calculating dci format size for UE-specific searchSpaces with format uss_dci_format=%d, format1_1_size_bits=%d, format1_1_size_bytes=%d\n", - css_dci_format,format1_1_size_bits,format1_1_size_bytes); - #endif - // blind decoding format1_1 for aggregation level 1. The number of candidates (nrofCandidates) will be calculated in function nr_dci_decoding_procedure0 - // blind decoding format1_1 for aggregation level 2. The number of candidates (nrofCandidates) will be calculated in function nr_dci_decoding_procedure0 - // blind decoding format1_1 for aggregation level 4. The number of candidates (nrofCandidates) will be calculated in function nr_dci_decoding_procedure0 - // blind decoding format1_1 for aggregation level 8. The number of candidates (nrofCandidates) will be calculated in function nr_dci_decoding_procedure0 - // blind decoding format1_1 for aggregation level 16. The number of candidates (nrofCandidates) will be calculated in function nr_dci_decoding_procedure0 - }*/ - //} #ifdef NR_PDCCH_DCI_DEBUG printf("\t<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure)-> at the end dci_cnt=%d \n",dci_cnt); #endif return(dci_cnt); } - - - #endif - - - -/* -uint16_t dci_decoding_procedure(PHY_VARS_NR_UE *ue, - DCI_ALLOC_t *dci_alloc, - int do_common, - int16_t eNB_id, - uint8_t nr_tti_rx) -{ - - uint8_t dci_cnt=0,old_dci_cnt=0; - uint32_t CCEmap0=0,CCEmap1=0,CCEmap2=0; - NR_UE_PDCCH **pdcch_vars = ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]]; - NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; - uint8_t mi = get_mi(&ue->frame_parms,nr_tti_rx); - uint16_t ra_rnti=99; - uint8_t format0_found=0,format_c_found=0; - uint8_t tmode = ue->transmission_mode[eNB_id]; - uint8_t frame_type = frame_parms->frame_type; - uint8_t format1A_size_bits=0,format1A_size_bytes=0; - uint8_t format1C_size_bits=0,format1C_size_bytes=0; - uint8_t format0_size_bits=0,format0_size_bytes=0; - uint8_t format1_size_bits=0,format1_size_bytes=0; - uint8_t format2_size_bits=0,format2_size_bytes=0; - uint8_t format2A_size_bits=0,format2A_size_bytes=0; - dci_detect_mode_t mode = dci_detect_mode_select(&ue->frame_parms,nr_tti_rx); - - switch (frame_parms->N_RB_DL) { - case 6: - if (frame_type == TDD) { - format1A_size_bits = sizeof_DCI1A_1_5MHz_TDD_1_6_t; - format1A_size_bytes = sizeof(DCI1A_1_5MHz_TDD_1_6_t); - format1C_size_bits = sizeof_DCI1C_1_5MHz_t; - format1C_size_bytes = sizeof(DCI1C_1_5MHz_t); - format0_size_bits = sizeof_DCI0_1_5MHz_TDD_1_6_t; - format0_size_bytes = sizeof(DCI0_1_5MHz_TDD_1_6_t); - format1_size_bits = sizeof_DCI1_1_5MHz_TDD_t; - format1_size_bytes = sizeof(DCI1_1_5MHz_TDD_t); - - if (frame_parms->nb_antenna_ports_eNB == 2) { - format2_size_bits = sizeof_DCI2_1_5MHz_2A_TDD_t; - format2_size_bytes = sizeof(DCI2_1_5MHz_2A_TDD_t); - format2A_size_bits = sizeof_DCI2A_1_5MHz_2A_TDD_t; - format2A_size_bytes = sizeof(DCI2A_1_5MHz_2A_TDD_t); - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - format2_size_bits = sizeof_DCI2_1_5MHz_4A_TDD_t; - format2_size_bytes = sizeof(DCI2_1_5MHz_4A_TDD_t); - format2A_size_bits = sizeof_DCI2A_1_5MHz_4A_TDD_t; - format2A_size_bytes = sizeof(DCI2A_1_5MHz_4A_TDD_t); - } - } else { - format1A_size_bits = sizeof_DCI1A_1_5MHz_FDD_t; - format1A_size_bytes = sizeof(DCI1A_1_5MHz_FDD_t); - format1C_size_bits = sizeof_DCI1C_1_5MHz_t; - format1C_size_bytes = sizeof(DCI1C_1_5MHz_t); - format0_size_bits = sizeof_DCI0_1_5MHz_FDD_t; - format0_size_bytes = sizeof(DCI0_1_5MHz_FDD_t); - format1_size_bits = sizeof_DCI1_1_5MHz_FDD_t; - format1_size_bytes = sizeof(DCI1_1_5MHz_FDD_t); - - if (frame_parms->nb_antenna_ports_eNB == 2) { - format2_size_bits = sizeof_DCI2_1_5MHz_2A_FDD_t; - format2_size_bytes = sizeof(DCI2_1_5MHz_2A_FDD_t); - format2A_size_bits = sizeof_DCI2A_1_5MHz_2A_FDD_t; - format2A_size_bytes = sizeof(DCI2A_1_5MHz_2A_FDD_t); - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - format2_size_bits = sizeof_DCI2_1_5MHz_4A_FDD_t; - format2_size_bytes = sizeof(DCI2_1_5MHz_4A_FDD_t); - format2A_size_bits = sizeof_DCI2A_1_5MHz_4A_FDD_t; - format2A_size_bytes = sizeof(DCI2A_1_5MHz_4A_FDD_t); - } - } - - break; - - case 25: - default: - if (frame_type == TDD) { - format1A_size_bits = sizeof_DCI1A_5MHz_TDD_1_6_t; - format1A_size_bytes = sizeof(DCI1A_5MHz_TDD_1_6_t); - format1C_size_bits = sizeof_DCI1C_5MHz_t; - format1C_size_bytes = sizeof(DCI1C_5MHz_t); - format0_size_bits = sizeof_DCI0_5MHz_TDD_1_6_t; - format0_size_bytes = sizeof(DCI0_5MHz_TDD_1_6_t); - format1_size_bits = sizeof_DCI1_5MHz_TDD_t; - format1_size_bytes = sizeof(DCI1_5MHz_TDD_t); - - if (frame_parms->nb_antenna_ports_eNB == 2) { - format2_size_bits = sizeof_DCI2_5MHz_2A_TDD_t; - format2_size_bytes = sizeof(DCI2_5MHz_2A_TDD_t); - format2A_size_bits = sizeof_DCI2A_5MHz_2A_TDD_t; - format2A_size_bytes = sizeof(DCI2A_5MHz_2A_TDD_t); - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - format2_size_bits = sizeof_DCI2_5MHz_4A_TDD_t; - format2_size_bytes = sizeof(DCI2_5MHz_4A_TDD_t); - format2A_size_bits = sizeof_DCI2A_5MHz_4A_TDD_t; - format2A_size_bytes = sizeof(DCI2A_5MHz_4A_TDD_t); - } - } else { - format1A_size_bits = sizeof_DCI1A_5MHz_FDD_t; - format1A_size_bytes = sizeof(DCI1A_5MHz_FDD_t); - format1C_size_bits = sizeof_DCI1C_5MHz_t; - format1C_size_bytes = sizeof(DCI1C_5MHz_t); - format0_size_bits = sizeof_DCI0_5MHz_FDD_t; - format0_size_bytes = sizeof(DCI0_5MHz_FDD_t); - format1_size_bits = sizeof_DCI1_5MHz_FDD_t; - format1_size_bytes = sizeof(DCI1_5MHz_FDD_t); - - if (frame_parms->nb_antenna_ports_eNB == 2) { - format2_size_bits = sizeof_DCI2_5MHz_2A_FDD_t; - format2_size_bytes = sizeof(DCI2_5MHz_2A_FDD_t); - format2A_size_bits = sizeof_DCI2A_5MHz_2A_FDD_t; - format2A_size_bytes = sizeof(DCI2A_5MHz_2A_FDD_t); - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - format2_size_bits = sizeof_DCI2_5MHz_4A_FDD_t; - format2_size_bytes = sizeof(DCI2_5MHz_4A_FDD_t); - format2A_size_bits = sizeof_DCI2A_5MHz_4A_FDD_t; - format2A_size_bytes = sizeof(DCI2A_5MHz_4A_FDD_t); - } - } - - break; - - case 50: - if (frame_type == TDD) { - format1A_size_bits = sizeof_DCI1A_10MHz_TDD_1_6_t; - format1A_size_bytes = sizeof(DCI1A_10MHz_TDD_1_6_t); - format1C_size_bits = sizeof_DCI1C_10MHz_t; - format1C_size_bytes = sizeof(DCI1C_10MHz_t); - format0_size_bits = sizeof_DCI0_10MHz_TDD_1_6_t; - format0_size_bytes = sizeof(DCI0_10MHz_TDD_1_6_t); - format1_size_bits = sizeof_DCI1_10MHz_TDD_t; - format1_size_bytes = sizeof(DCI1_10MHz_TDD_t); - - if (frame_parms->nb_antenna_ports_eNB == 2) { - format2_size_bits = sizeof_DCI2_10MHz_2A_TDD_t; - format2_size_bytes = sizeof(DCI2_10MHz_2A_TDD_t); - format2A_size_bits = sizeof_DCI2A_10MHz_2A_TDD_t; - format2A_size_bytes = sizeof(DCI2A_10MHz_2A_TDD_t); - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - format2_size_bits = sizeof_DCI2_10MHz_4A_TDD_t; - format2_size_bytes = sizeof(DCI2_10MHz_4A_TDD_t); - format2A_size_bits = sizeof_DCI2A_10MHz_4A_TDD_t; - format2A_size_bytes = sizeof(DCI2A_10MHz_4A_TDD_t); - } - } else { - format1A_size_bits = sizeof_DCI1A_10MHz_FDD_t; - format1A_size_bytes = sizeof(DCI1A_10MHz_FDD_t); - format1C_size_bits = sizeof_DCI1C_10MHz_t; - format1C_size_bytes = sizeof(DCI1C_10MHz_t); - format0_size_bits = sizeof_DCI0_10MHz_FDD_t; - format0_size_bytes = sizeof(DCI0_10MHz_FDD_t); - format1_size_bits = sizeof_DCI1_10MHz_FDD_t; - format1_size_bytes = sizeof(DCI1_10MHz_FDD_t); - - if (frame_parms->nb_antenna_ports_eNB == 2) { - format2_size_bits = sizeof_DCI2_10MHz_2A_FDD_t; - format2_size_bytes = sizeof(DCI2_10MHz_2A_FDD_t); - format2A_size_bits = sizeof_DCI2A_10MHz_2A_FDD_t; - format2A_size_bytes = sizeof(DCI2A_10MHz_2A_FDD_t); - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - format2_size_bits = sizeof_DCI2_10MHz_4A_FDD_t; - format2_size_bytes = sizeof(DCI2_10MHz_4A_FDD_t); - format2A_size_bits = sizeof_DCI2A_10MHz_4A_FDD_t; - format2A_size_bytes = sizeof(DCI2A_10MHz_4A_FDD_t); - } - } - - break; - - case 100: - if (frame_type == TDD) { - format1A_size_bits = sizeof_DCI1A_20MHz_TDD_1_6_t; - format1A_size_bytes = sizeof(DCI1A_20MHz_TDD_1_6_t); - format1C_size_bits = sizeof_DCI1C_20MHz_t; - format1C_size_bytes = sizeof(DCI1C_20MHz_t); - format0_size_bits = sizeof_DCI0_20MHz_TDD_1_6_t; - format0_size_bytes = sizeof(DCI0_20MHz_TDD_1_6_t); - format1_size_bits = sizeof_DCI1_20MHz_TDD_t; - format1_size_bytes = sizeof(DCI1_20MHz_TDD_t); - - if (frame_parms->nb_antenna_ports_eNB == 2) { - format2_size_bits = sizeof_DCI2_20MHz_2A_TDD_t; - format2_size_bytes = sizeof(DCI2_20MHz_2A_TDD_t); - format2A_size_bits = sizeof_DCI2A_20MHz_2A_TDD_t; - format2A_size_bytes = sizeof(DCI2A_20MHz_2A_TDD_t); - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - format2_size_bits = sizeof_DCI2_20MHz_4A_TDD_t; - format2_size_bytes = sizeof(DCI2_20MHz_4A_TDD_t); - format2A_size_bits = sizeof_DCI2A_20MHz_4A_TDD_t; - format2A_size_bytes = sizeof(DCI2A_20MHz_4A_TDD_t); - } - } else { - format1A_size_bits = sizeof_DCI1A_20MHz_FDD_t; - format1A_size_bytes = sizeof(DCI1A_20MHz_FDD_t); - format1C_size_bits = sizeof_DCI1C_20MHz_t; - format1C_size_bytes = sizeof(DCI1C_20MHz_t); - format0_size_bits = sizeof_DCI0_20MHz_FDD_t; - format0_size_bytes = sizeof(DCI0_20MHz_FDD_t); - format1_size_bits = sizeof_DCI1_20MHz_FDD_t; - format1_size_bytes = sizeof(DCI1_20MHz_FDD_t); - - if (frame_parms->nb_antenna_ports_eNB == 2) { - format2_size_bits = sizeof_DCI2_20MHz_2A_FDD_t; - format2_size_bytes = sizeof(DCI2_20MHz_2A_FDD_t); - format2A_size_bits = sizeof_DCI2A_20MHz_2A_FDD_t; - format2A_size_bytes = sizeof(DCI2A_20MHz_2A_FDD_t); - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - format2_size_bits = sizeof_DCI2_20MHz_4A_FDD_t; - format2_size_bytes = sizeof(DCI2_20MHz_4A_FDD_t); - format2A_size_bits = sizeof_DCI2A_20MHz_4A_FDD_t; - format2A_size_bytes = sizeof(DCI2A_20MHz_4A_FDD_t); - } - } - - break; - } - - if (do_common == 1) { -#ifdef DEBUG_DCI_DECODING - printf("[DCI search] doing common search/format0 aggregation 4\n"); -#endif - - if (ue->prach_resources[eNB_id]) - ra_rnti = ue->prach_resources[eNB_id]->ra_RNTI; - - // First check common search spaces at aggregation 4 (SI_RNTI, P_RNTI and RA_RNTI format 0/1A), - // and UE_SPEC format0 (PUSCH) too while we're at it - dci_decoding_procedure0(pdcch_vars,1,mode,nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0) , - ra_rnti, - P_RNTI, - 2, - format1A, - format1A, - format1A, - format0, - format1A_size_bits, - format1A_size_bytes, - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - - if ((CCEmap0==0xffff) || - ((format0_found==1)&&(format_c_found==1))) - return(dci_cnt); - - // Now check common search spaces at aggregation 4 (SI_RNTI,P_RNTI and RA_RNTI and C-RNTI format 1C), - // and UE_SPEC format0 (PUSCH) too while we're at it - dci_decoding_procedure0(pdcch_vars,1,mode,nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 2, - format1C, - format1C, - format1C, - format1C, - format1C_size_bits, - format1C_size_bytes, - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - - if ((CCEmap0==0xffff) || - ((format0_found==1)&&(format_c_found==1))) - return(dci_cnt); - - // Now check common search spaces at aggregation 8 (SI_RNTI,P_RNTI and RA_RNTI format 1A), - // and UE_SPEC format0 (PUSCH) too while we're at it - // printf("[DCI search] doing common search/format0 aggregation 3\n"); -#ifdef DEBUG_DCI_DECODING - printf("[DCI search] doing common search/format0 aggregation 8\n"); -#endif - dci_decoding_procedure0(pdcch_vars,1,mode,nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - P_RNTI, - ra_rnti, - 3, - format1A, - format1A, - format1A, - format0, - format1A_size_bits, - format1A_size_bytes, - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - - if ((CCEmap0==0xffff)|| - ((format0_found==1)&&(format_c_found==1))) - return(dci_cnt); - - // Now check common search spaces at aggregation 8 (SI_RNTI and RA_RNTI and C-RNTI format 1C), - // and UE_SPEC format0 (PUSCH) too while we're at it - dci_decoding_procedure0(pdcch_vars,1,mode,nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 3, - format1C, - format1C, - format1C, - format1C, - format1C_size_bits, - format1C_size_bytes, - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - //#endif - - } - - if (ue->UE_mode[eNB_id] <= PRACH) - return(dci_cnt); - - if (ue->prach_resources[eNB_id]) - ra_rnti = ue->prach_resources[eNB_id]->ra_RNTI; - - // Now check UE_SPEC format0/1A ue_spec search spaces at aggregation 8 - // printf("[DCI search] Format 0/1A aggregation 8\n"); - dci_decoding_procedure0(pdcch_vars,0,mode, - nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 0, - format1A, - format1A, - format1A, - format0, - format0_size_bits, - format0_size_bytes, - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - - if ((CCEmap0==0xffff)|| - ((format0_found==1)&&(format_c_found==1))) - return(dci_cnt); - - //printf("[DCI search] Format 0 aggregation 1 dci_cnt %d\n",dci_cnt); - - if (dci_cnt == 0) - { - // Now check UE_SPEC format 0 search spaces at aggregation 4 - dci_decoding_procedure0(pdcch_vars,0,mode, - nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 1, - format1A, - format1A, - format1A, - format0, - format0_size_bits, - format0_size_bytes, - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - - if ((CCEmap0==0xffff)|| - ((format0_found==1)&&(format_c_found==1))) - return(dci_cnt); - - - //printf("[DCI search] Format 0 aggregation 2 dci_cnt %d\n",dci_cnt); - } - - if (dci_cnt == 0) - { - // Now check UE_SPEC format 0 search spaces at aggregation 2 - dci_decoding_procedure0(pdcch_vars,0,mode, - nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 2, - format1A, - format1A, - format1A, - format0, - format0_size_bits, - format0_size_bytes, - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - - if ((CCEmap0==0xffff)|| - ((format0_found==1)&&(format_c_found==1))) - return(dci_cnt); - - //printf("[DCI search] Format 0 aggregation 4 dci_cnt %d\n",dci_cnt); - } - - if (dci_cnt == 0) - { - // Now check UE_SPEC format 0 search spaces at aggregation 1 - dci_decoding_procedure0(pdcch_vars,0,mode, - nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 3, - format1A, - format1A, - format1A, - format0, - format0_size_bits, - format0_size_bytes, - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - - if ((CCEmap0==0xffff)|| - ((format0_found==1)&&(format_c_found==1))) - return(dci_cnt); - - //printf("[DCI search] Format 0 aggregation 8 dci_cnt %d\n",dci_cnt); - - } - // These are for CRNTI based on transmission mode - if ((tmode < 3) || (tmode == 7)) { - // Now check UE_SPEC format 1 search spaces at aggregation 1 - old_dci_cnt=dci_cnt; - dci_decoding_procedure0(pdcch_vars,0,mode,nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 0, - format1A, - format1A, - format1A, - format1, - format1_size_bits, - format1_size_bytes, - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - //printf("[DCI search] Format 1 aggregation 1 dci_cnt %d\n",dci_cnt); - - if ((CCEmap0==0xffff) || - (format_c_found==1)) - return(dci_cnt); - - if (dci_cnt>old_dci_cnt) - return(dci_cnt); - - // Now check UE_SPEC format 1 search spaces at aggregation 2 - old_dci_cnt=dci_cnt; - dci_decoding_procedure0(pdcch_vars,0,mode,nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 1, - format1A, - format1A, - format1A, - format1, - format1_size_bits, - format1_size_bytes, - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - //printf("[DCI search] Format 1 aggregation 2 dci_cnt %d\n",dci_cnt); - - if ((CCEmap0==0xffff)|| - (format_c_found==1)) - return(dci_cnt); - - if (dci_cnt>old_dci_cnt) - return(dci_cnt); - - // Now check UE_SPEC format 1 search spaces at aggregation 4 - old_dci_cnt=dci_cnt; - dci_decoding_procedure0(pdcch_vars,0,mode,nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 2, - format1A, - format1A, - format1A, - format1, - format1_size_bits, - format1_size_bytes, - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - //printf("[DCI search] Format 1 aggregation 4 dci_cnt %d\n",dci_cnt); - - if ((CCEmap0==0xffff)|| - ((format0_found==1)&&(format_c_found==1))) - return(dci_cnt); - - if (dci_cnt>old_dci_cnt) - return(dci_cnt); - - //#ifdef ALL_AGGREGATION - // Now check UE_SPEC format 1 search spaces at aggregation 8 - old_dci_cnt=dci_cnt; - dci_decoding_procedure0(pdcch_vars,0,mode,nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 3, - format1A, - format1A, - format1A, - format1, - format1_size_bits, - format1_size_bytes, - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - //printf("[DCI search] Format 1 aggregation 8 dci_cnt %d\n",dci_cnt); - - if ((CCEmap0==0xffff)|| - ((format0_found==1)&&(format_c_found==1))) - return(dci_cnt); - - if (dci_cnt>old_dci_cnt) - return(dci_cnt); - - //#endif //ALL_AGGREGATION - } else if (tmode == 3) { - - - 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, - nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 0, - format1A, - format1A, - format1A, - format2A, - format2A_size_bits, - format2A_size_bytes, - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &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 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, - nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 1, - format1A, - format1A, - format1A, - format2A, - format2A_size_bits, - format2A_size_bytes, - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - - 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_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, - nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 2, - format1A, - format1A, - format1A, - format2A, - format2A_size_bits, - format2A_size_bytes, - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - - 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); - - //#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 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, - nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 3, - format1A, - format1A, - format1A, - format2A, - format2A_size_bits, - format2A_size_bytes, - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &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, - nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 0, - format1A, - format1A, - format1A, - format2, - format2_size_bits, - format2_size_bytes, - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - - if ((CCEmap0==0xffff)|| - ((format0_found==1)&&(format_c_found==1))) - return(dci_cnt); - - if (dci_cnt>old_dci_cnt) - 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, - nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 1, - format1A, - format1A, - format1A, - format2, - format2_size_bits, - format2_size_bytes, - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - - if ((CCEmap0==0xffff)|| - ((format0_found==1)&&(format_c_found==1))) - return(dci_cnt); - - if (dci_cnt>old_dci_cnt) - 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, - nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 2, - format1A, - format1A, - format1A, - format2, - format2_size_bits, - format2_size_bytes, - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - - if ((CCEmap0==0xffff)|| - ((format0_found==1)&&(format_c_found==1))) - return(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 - old_dci_cnt=dci_cnt; - dci_decoding_procedure0(pdcch_vars,0,mode, - nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 3, - format1A, - format1A, - format1A, - format2, - format2_size_bits, - format2_size_bytes, - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - //#endif - } else if ((tmode==5) || (tmode==6)) { // This is MU-MIMO - - // Now check UE_SPEC format 1E_2A_M10PRB search spaces aggregation 1 -#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, - nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 0, - format1A, - format1A, - format1A, - format1E_2A_M10PRB, - sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t, - sizeof(DCI1E_5MHz_2A_M10PRB_TDD_t), - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - - - if ((CCEmap0==0xffff)|| - ((format0_found==1)&&(format_c_found==1))) - return(dci_cnt); - - if (dci_cnt>old_dci_cnt) - 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, - nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 1, - format1A, - format1A, - format1A, - format1E_2A_M10PRB, - sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t, - sizeof(DCI1E_5MHz_2A_M10PRB_TDD_t), - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - - if ((CCEmap0==0xffff)|| - ((format0_found==1)&&(format_c_found==1))) - return(dci_cnt); - - if (dci_cnt>old_dci_cnt) - 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, - nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 2, - format1A, - format1A, - format1A, - format1E_2A_M10PRB, - sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t, - sizeof(DCI1E_5MHz_2A_M10PRB_TDD_t), - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - - if ((CCEmap0==0xffff)|| - ((format0_found==1)&&(format_c_found==1))) - return(dci_cnt); - - if (dci_cnt>old_dci_cnt) - return(dci_cnt); - - //#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, - nr_tti_rx, - dci_alloc, - eNB_id, - ue->current_thread_id[nr_tti_rx], - frame_parms, - mi, - ((ue->decode_SIB == 1) ? SI_RNTI : 0), - ra_rnti, - P_RNTI, - 3, - format1A, - format1A, - format1A, - format1E_2A_M10PRB, - sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t, - sizeof(DCI1E_5MHz_2A_M10PRB_TDD_t), - &dci_cnt, - &format0_found, - &format_c_found, - &CCEmap0, - &CCEmap1, - &CCEmap2); - - if ((CCEmap0==0xffff)|| - ((format0_found==1)&&(format_c_found==1))) - return(dci_cnt); - - if (dci_cnt>old_dci_cnt) - return(dci_cnt); - - //#endif //ALL_AGGREGATION - - } - - return(dci_cnt); -} -*/ #ifdef PHY_ABSTRACTION uint16_t dci_decoding_procedure_emul(NR_UE_PDCCH **pdcch_vars, uint8_t num_ue_spec_dci, diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c index 72c575d49f..e45cb1de9d 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c @@ -54,3906 +54,12 @@ typedef unsigned __int128 uint128_t; - -#if 0 - -uint32_t localRIV2alloc_LUT6[32]; -uint32_t distRIV2alloc_even_LUT6[32]; -uint32_t distRIV2alloc_odd_LUT6[32]; -uint16_t RIV2nb_rb_LUT6[32]; -uint16_t RIV2first_rb_LUT6[32]; -uint16_t RIV_max6=0; - -uint32_t localRIV2alloc_LUT25[512]; -uint32_t distRIV2alloc_even_LUT25[512]; -uint32_t distRIV2alloc_odd_LUT25[512]; -uint16_t RIV2nb_rb_LUT25[512]; -uint16_t RIV2first_rb_LUT25[512]; -uint16_t RIV_max25=0; - - -uint32_t localRIV2alloc_LUT50_0[1600]; -uint32_t localRIV2alloc_LUT50_1[1600]; -uint32_t distRIV2alloc_gap0_even_LUT50_0[1600]; -uint32_t distRIV2alloc_gap0_odd_LUT50_0[1600]; -uint32_t distRIV2alloc_gap0_even_LUT50_1[1600]; -uint32_t distRIV2alloc_gap0_odd_LUT50_1[1600]; -uint32_t distRIV2alloc_gap1_even_LUT50_0[1600]; -uint32_t distRIV2alloc_gap1_odd_LUT50_0[1600]; -uint32_t distRIV2alloc_gap1_even_LUT50_1[1600]; -uint32_t distRIV2alloc_gap1_odd_LUT50_1[1600]; -uint16_t RIV2nb_rb_LUT50[1600]; -uint16_t RIV2first_rb_LUT50[1600]; -uint16_t RIV_max50=0; - -uint32_t localRIV2alloc_LUT100_0[6000]; -uint32_t localRIV2alloc_LUT100_1[6000]; -uint32_t localRIV2alloc_LUT100_2[6000]; -uint32_t localRIV2alloc_LUT100_3[6000]; -uint32_t distRIV2alloc_gap0_even_LUT100_0[6000]; -uint32_t distRIV2alloc_gap0_odd_LUT100_0[6000]; -uint32_t distRIV2alloc_gap0_even_LUT100_1[6000]; -uint32_t distRIV2alloc_gap0_odd_LUT100_1[6000]; -uint32_t distRIV2alloc_gap0_even_LUT100_2[6000]; -uint32_t distRIV2alloc_gap0_odd_LUT100_2[6000]; -uint32_t distRIV2alloc_gap0_even_LUT100_3[6000]; -uint32_t distRIV2alloc_gap0_odd_LUT100_3[6000]; -uint32_t distRIV2alloc_gap1_even_LUT100_0[6000]; -uint32_t distRIV2alloc_gap1_odd_LUT100_0[6000]; -uint32_t distRIV2alloc_gap1_even_LUT100_1[6000]; -uint32_t distRIV2alloc_gap1_odd_LUT100_1[6000]; -uint32_t distRIV2alloc_gap1_even_LUT100_2[6000]; -uint32_t distRIV2alloc_gap1_odd_LUT100_2[6000]; -uint32_t distRIV2alloc_gap1_even_LUT100_3[6000]; -uint32_t distRIV2alloc_gap1_odd_LUT100_3[6000]; -uint16_t RIV2nb_rb_LUT100[6000]; -uint16_t RIV2first_rb_LUT100[6000]; -uint16_t RIV_max100=0; - - -extern uint32_t current_dlsch_cqi; - -// Table 8.6.3-3 36.213 -uint16_t beta_cqi[16] = {0, //reserved - 0, //reserved - 9, //1.125 - 10, //1.250 - 11, //1.375 - 13, //1.625 - 14, //1.750 - 16, //2.000 - 18, //2.250 - 20, //2.500 - 23, //2.875 - 25, //3.125 - 28, //3.500 - 32, //4.000 - 40, //5.000 - 50 - }; //6.250 - -// Table 8.6.3-2 36.213 -uint16_t beta_ri[16] = {10, //1.250 - 13, //1.625 - 16, //2.000 - 20, //2.500 - 25, //3.125 - 32, //4.000 - 40, //5.000 - 50, //6.250 - 64, //8.000 - 80, //10.000 - 101, //12.625 - 127, //15.875 - 160, //20.000 - 0, //reserved - 0, //reserved - 0 - }; //reserved - -// Table 8.6.3-2 36.213 -uint16_t beta_ack[16] = {16, //2.000 - 20, //2.500 - 25, //3.125 - 32, //4.000 - 40, //5.000 - 50, //6.250 - 64, //8.000 - 80, //10.000 - 101, //12.625 - 127, //15.875 - 160, //20.000 - 248, //31.000 - 400, //50.000 - 640, //80.000 - 808 - };//126.00 - - -#endif int8_t nr_delta_PUSCH_abs[4] = {-4,-1,1,4}; int8_t nr_delta_PUSCH_acc[4] = {-1,0,1,3}; int8_t *nr_delta_PUCCH_lut = nr_delta_PUSCH_acc; -#if 0 -void conv_rballoc(uint8_t ra_header,uint32_t rb_alloc,uint32_t N_RB_DL,uint32_t *rb_alloc2) -{ - uint32_t i,shift,subset; - rb_alloc2[0] = 0; - rb_alloc2[1] = 0; - rb_alloc2[2] = 0; - rb_alloc2[3] = 0; - // printf("N_RB_DL %d, ra_header %d, rb_alloc %x\n",N_RB_DL,ra_header,rb_alloc); - - switch (N_RB_DL) { - - case 6: - rb_alloc2[0] = rb_alloc&0x3f; - break; - - case 25: - if (ra_header == 0) {// Type 0 Allocation - - for (i=12; i>0; i--) { - if ((rb_alloc&(1<>1)&1; - - for (i=0; i<11; i++) { - if ((rb_alloc&(1<<(i+2))) != 0) - rb_alloc2[0] |= (1<<(2*i)); - - //printf("rb_alloc2 (type 1) %x\n",rb_alloc2); - } - - if ((shift == 0) && (subset == 1)) - rb_alloc2[0]<<=1; - else if ((shift == 1) && (subset == 0)) - rb_alloc2[0]<<=4; - else if ((shift == 1) && (subset == 1)) - rb_alloc2[0]<<=3; - } - - break; - - case 50: - if (ra_header == 0) {// Type 0 Allocation - - for (i=16; i>0; i--) { - if ((rb_alloc&(1<>5] |= (7<<((3*(16-i))%32)); - } - - /* - for (i=1;i<=16;i++) { - if ((rb_alloc&(1<<(16-i))) != 0) - rb_alloc2[(3*i)>>5] |= (7<<((3*i)%32)); - } - */ - // bit mask across - if ((rb_alloc2[0]>>31)==1) - rb_alloc2[1] |= 1; - - if ((rb_alloc&1) != 0) - rb_alloc2[1] |= (3<<16); - - /* - for (i=0;i<16;i++) { - if (((rb_alloc>>(16-i))&1) != 0) - rb_alloc2[(3*i)>>5] |= (7<<((3*i)%32)); - if ((i==10)&&((rb_alloc&(1<<6))!=0)) - rb_alloc2[1] = 1; - // printf("rb_alloc2[%d] (type 0) %x ((%x>>%d)&1=%d)\n",(3*i)>>5,rb_alloc2[(3*i)>>5],rb_alloc,i,(rb_alloc>>i)&1); - - } - // fill in 2 from last bit instead of 3 - if ((rb_alloc&1) != 0) - rb_alloc2[1] |= (3<>%d)&1=%d)\n",(3*i)>>5,rb_alloc2[(3*i)>>5],rb_alloc,i,(rb_alloc>>i)&1); - */ - // printf("rb_alloc[1]=%x,rb_alloc[0]=%x\n",rb_alloc2[1],rb_alloc2[0]); - } else { - LOG_E(PHY,"resource type 1 not supported for N_RB_DL=50\n"); - // mac_xface->macphy_exit("resource type 1 not supported for N_RB_DL=100\n"); - /* - subset = rb_alloc&1; - shift = (rb_alloc>>1)&1; - for (i=0;i<11;i++) { - if ((rb_alloc&(1<<(i+2))) != 0) - rb_alloc2 |= (1<<(2*i)); - // printf("rb_alloc2 (type 1) %x\n",rb_alloc2); - } - if ((shift == 0) && (subset == 1)) - rb_alloc2<<=1; - else if ((shift == 1) && (subset == 0)) - rb_alloc2<<=4; - else if ((shift == 1) && (subset == 1)) - rb_alloc2<<=3; - */ - } - - break; - - case 100: - if (ra_header == 0) {// Type 0 Allocation - for (i=0; i<25; i++) { - if ((rb_alloc&(1<<(24-i))) != 0) - rb_alloc2[(4*i)>>5] |= (0xf<<((4*i)%32)); - - // printf("rb_alloc2[%d] (type 0) %x (%d)\n",(4*i)>>5,rb_alloc2[(4*i)>>5],rb_alloc&(1<macphy_exit("resource type 1 not supported for N_RB_DL=100\n"); - /* - subset = rb_alloc&1; - shift = (rb_alloc>>1)&1; - for (i=0;i<11;i++) { - if ((rb_alloc&(1<<(i+2))) != 0) - rb_alloc2 |= (1<<(2*i)); - // printf("rb_alloc2 (type 1) %x\n",rb_alloc2); - } - if ((shift == 0) && (subset == 1)) - rb_alloc2<<=1; - else if ((shift == 1) && (subset == 0)) - rb_alloc2<<=4; - else if ((shift == 1) && (subset == 1)) - rb_alloc2<<=3; - */ - } - - break; - - default: - LOG_E(PHY,"Invalid N_RB_DL %d\n", N_RB_DL); - DevParam (N_RB_DL, 0, 0); - break; - } - -} - - - -uint32_t conv_nprb(uint8_t ra_header,uint32_t rb_alloc,int N_RB_DL) -{ - - uint32_t nprb=0,i; - - switch (N_RB_DL) { - case 6: - for (i=0; i<6; i++) { - if ((rb_alloc&(1<0; i--) { - if ((rb_alloc&(1<>1))) - RIV = (N_RB_DL*(Lcrbs-1)) + RBstart; - else - RIV = (N_RB_DL*(N_RB_DL+1-Lcrbs)) + (N_RB_DL-1-RBstart); - - return(RIV); -} - -// Convert a DCI Format 1C RIV to a Format 1A RIV -// This extracts the start and length in PRBs from the 1C rballoc and -// recomputes the RIV as if it were the 1A rballoc - -uint32_t conv_1C_RIV(int32_t rballoc,uint32_t N_RB_DL) { - - int NpDLVRB,N_RB_step,LpCRBsm1,RBpstart; - - switch (N_RB_DL) { - - case 6: // N_RB_step = 2, NDLVRB = 6, NpDLVRB = 3 - NpDLVRB = 3; - N_RB_step = 2; - break; - case 25: // N_RB_step = 2, NDLVRB = 24, NpDLVRB = 12 - NpDLVRB = 12; - N_RB_step = 2; - break; - case 50: // N_RB_step = 4, NDLVRB = 46, NpDLVRB = 11 - NpDLVRB = 11; - N_RB_step = 4; - break; - case 100: // N_RB_step = 4, NDLVRB = 96, NpDLVRB = 24 - NpDLVRB = 24; - N_RB_step = 4; - break; - default: - NpDLVRB = 24; - N_RB_step = 4; - break; - } - - // This is the 1C part from 7.1.6.3 in 36.213 - LpCRBsm1 = rballoc/NpDLVRB; - // printf("LpCRBs = %d\n",LpCRBsm1+1); - - if (LpCRBsm1 <= (NpDLVRB/2)) { - RBpstart = rballoc % NpDLVRB; - } - else { - LpCRBsm1 = NpDLVRB-LpCRBsm1; - RBpstart = NpDLVRB-(rballoc%NpDLVRB); - } - // printf("RBpstart %d\n",RBpstart); - return(computeRIV(N_RB_DL,N_RB_step*RBpstart,N_RB_step*(LpCRBsm1+1))); - -} - -uint32_t get_prb(int N_RB_DL,int odd_slot,int vrb,int Ngap) { - - int offset; - - switch (N_RB_DL) { - - case 6: - // N_RB_DL = tildeN_RB_DL = 6 - // Ngap = 4 , P=1, Nrow = 2, Nnull = 2 - - switch (vrb) { - case 0: // even: 0->0, 1->2, odd: 0->3, 1->5 - case 1: - return ((3*odd_slot) + 2*(vrb&3))%6; - break; - case 2: // even: 2->3, 3->5, odd: 2->0, 3->2 - case 3: - return ((3*odd_slot) + 2*(vrb&3) + 5)%6; - break; - case 4: // even: 4->1, odd: 4->4 - return ((3*odd_slot) + 1)%6; - case 5: // even: 5->4, odd: 5->1 - return ((3*odd_slot) + 4)%6; - break; - } - break; - - case 15: - if (vrb<12) { - if ((vrb&3) < 2) // even: 0->0, 1->4, 4->1, 5->5, 8->2, 9->6 odd: 0->7, 1->11 - return(((7*odd_slot) + 4*(vrb&3) + (vrb>>2))%14) + 14*(vrb/14); - else if (vrb < 12) // even: 2->7, 3->11, 6->8, 7->12, 10->9, 11->13 - return (((7*odd_slot) + 4*(vrb&3) + (vrb>>2) +13 )%14) + 14*(vrb/14); - } - if (vrb==12) - return (3+(7*odd_slot)) % 14; - if (vrb==13) - return (10+(7*odd_slot)) % 14; - return 14; - break; - - case 25: - return (((12*odd_slot) + 6*(vrb&3) + (vrb>>2))%24) + 24*(vrb/24); - break; - - case 50: // P=3 - if (Ngap==0) { - // Nrow=12,Nnull=2,NVRBDL=46,Ngap1= 27 - if (vrb>=23) - offset=4; - else - offset=0; - if (vrb<44) { - if ((vrb&3)>=2) - return offset+((23*odd_slot) + 12*(vrb&3) + (vrb>>2) + 45)%46; - else - return offset+((23*odd_slot) + 12*(vrb&3) + (vrb>>2))%46; - } - if (vrb==44) // even: 44->11, odd: 45->34 - return offset+((23*odd_slot) + 22-12+1); - if (vrb==45) // even: 45->10, odd: 45->33 - return offset+((23*odd_slot) + 22+12); - if (vrb==46) - return offset+46+((23*odd_slot) + 23-12+1) % 46; - if (vrb==47) - return offset+46+((23*odd_slot) + 23+12) % 46; - if (vrb==48) - return offset+46+((23*odd_slot) + 23-12+1) % 46; - if (vrb==49) - return offset+46+((23*odd_slot) + 23+12) % 46; - } - else { - // Nrow=6,Nnull=6,NVRBDL=18,Ngap1= 27 - if (vrb>=9) - offset=18; - else - offset=0; - - if (vrb<12) { - if ((vrb&3)>=2) - return offset+((9*odd_slot) + 6*(vrb&3) + (vrb>>2) + 17)%18; - else - return offset+((9*odd_slot) + 6*(vrb&3) + (vrb>>2))%18; - } - else { - return offset+((9*odd_slot) + 12*(vrb&1)+(vrb>>1) )%18 + 18*(vrb/18); - } - } - break; - case 75: - // Ngap1 = 32, NVRBRL=64, P=4, Nrow= 16, Nnull=0 - if (Ngap ==0) { - return ((32*odd_slot) + 16*(vrb&3) + (vrb>>2))%64 + (vrb/64); - } else { - // Ngap2 = 16, NVRBDL=32, Nrow=8, Nnull=0 - return ((16*odd_slot) + 8*(vrb&3) + (vrb>>2))%32 + (vrb/32); - } - break; - case 100: - // Ngap1 = 48, NVRBDL=96, Nrow=24, Nnull=0 - if (Ngap ==0) { - return ((48*odd_slot) + 24*(vrb&3) + (vrb>>2))%96 + (vrb/96); - } else { - // Ngap2 = 16, NVRBDL=32, Nrow=8, Nnull=0 - return ((16*odd_slot) + 8*(vrb&3) + (vrb>>2))%32 + (vrb/32); - } - break; - default: - LOG_E(PHY,"Unknown N_RB_DL %d\n",N_RB_DL); - return 0; - } - return 0; - -} - - -void generate_RIV_tables() -{ - - // 6RBs localized RIV - uint8_t Lcrbs,RBstart; - uint16_t RIV; - uint32_t alloc0,allocdist0_0_even,allocdist0_0_odd,allocdist0_1_even,allocdist0_1_odd; - uint32_t alloc1,allocdist1_0_even,allocdist1_0_odd,allocdist1_1_even,allocdist1_1_odd; - uint32_t alloc2,allocdist2_0_even,allocdist2_0_odd,allocdist2_1_even,allocdist2_1_odd; - uint32_t alloc3,allocdist3_0_even,allocdist3_0_odd,allocdist3_1_even,allocdist3_1_odd; - uint32_t nVRB,nVRB_even_dist,nVRB_odd_dist; - - for (RBstart=0; RBstart<6; RBstart++) { - alloc0 = 0; - allocdist0_0_even = 0; - allocdist0_0_odd = 0; - for (Lcrbs=1; Lcrbs<=(6-RBstart); Lcrbs++) { - //printf("RBstart %d, len %d --> ",RBstart,Lcrbs); - nVRB = Lcrbs-1+RBstart; - alloc0 |= (1<RIV_max6) - RIV_max6 = RIV; - - // printf("RIV %d (%d) : first_rb %d NBRB %d\n",RIV,localRIV2alloc_LUT25[RIV],RBstart,Lcrbs); - localRIV2alloc_LUT6[RIV] = alloc0; - distRIV2alloc_even_LUT6[RIV] = allocdist0_0_even; - distRIV2alloc_odd_LUT6[RIV] = allocdist0_0_odd; - RIV2nb_rb_LUT6[RIV] = Lcrbs; - RIV2first_rb_LUT6[RIV] = RBstart; - } - } - - - for (RBstart=0; RBstart<25; RBstart++) { - alloc0 = 0; - allocdist0_0_even = 0; - allocdist0_0_odd = 0; - for (Lcrbs=1; Lcrbs<=(25-RBstart); Lcrbs++) { - nVRB = Lcrbs-1+RBstart; - //printf("RBstart %d, len %d --> ",RBstart,Lcrbs); - alloc0 |= (1<RIV_max25) - RIV_max25 = RIV;; - - - localRIV2alloc_LUT25[RIV] = alloc0; - distRIV2alloc_even_LUT25[RIV] = allocdist0_0_even; - distRIV2alloc_odd_LUT25[RIV] = allocdist0_0_odd; - RIV2nb_rb_LUT25[RIV] = Lcrbs; - RIV2first_rb_LUT25[RIV] = RBstart; - } - } - - - for (RBstart=0; RBstart<50; RBstart++) { - alloc0 = 0; - alloc1 = 0; - allocdist0_0_even=0; - allocdist1_0_even=0; - allocdist0_0_odd=0; - allocdist1_0_odd=0; - allocdist0_1_even=0; - allocdist1_1_even=0; - allocdist0_1_odd=0; - allocdist1_1_odd=0; - - for (Lcrbs=1; Lcrbs<=(50-RBstart); Lcrbs++) { - - nVRB = Lcrbs-1+RBstart; - - - if (nVRB<32) - alloc0 |= (1<RIV_max50) - RIV_max50 = RIV; - - // printf("RIV %d : first_rb %d NBRB %d\n",RIV,RBstart,Lcrbs); - localRIV2alloc_LUT50_0[RIV] = alloc0; - localRIV2alloc_LUT50_1[RIV] = alloc1; - distRIV2alloc_gap0_even_LUT50_0[RIV] = allocdist0_0_even; - distRIV2alloc_gap0_even_LUT50_1[RIV] = allocdist1_0_even; - distRIV2alloc_gap0_odd_LUT50_0[RIV] = allocdist0_0_odd; - distRIV2alloc_gap0_odd_LUT50_1[RIV] = allocdist1_0_odd; - distRIV2alloc_gap1_even_LUT50_0[RIV] = allocdist0_1_even; - distRIV2alloc_gap1_even_LUT50_1[RIV] = allocdist1_1_even; - distRIV2alloc_gap1_odd_LUT50_0[RIV] = allocdist0_1_odd; - distRIV2alloc_gap1_odd_LUT50_1[RIV] = allocdist1_1_odd; - RIV2nb_rb_LUT50[RIV] = Lcrbs; - RIV2first_rb_LUT50[RIV] = RBstart; - } - } - - - for (RBstart=0; RBstart<100; RBstart++) { - alloc0 = 0; - alloc1 = 0; - alloc2 = 0; - alloc3 = 0; - allocdist0_0_even=0; - allocdist1_0_even=0; - allocdist2_0_even=0; - allocdist3_0_even=0; - allocdist0_0_odd=0; - allocdist1_0_odd=0; - allocdist2_0_odd=0; - allocdist3_0_odd=0; - allocdist0_1_even=0; - allocdist1_1_even=0; - allocdist2_1_even=0; - allocdist3_1_even=0; - allocdist0_1_odd=0; - allocdist1_1_odd=0; - allocdist2_1_odd=0; - allocdist3_1_odd=0; - - for (Lcrbs=1; Lcrbs<=(100-RBstart); Lcrbs++) { - - nVRB = Lcrbs-1+RBstart; - - if (nVRB<32) - alloc0 |= (1< nVRB_even_dist %d\n",nVRB,nVRB_even_dist); - - - if (nVRB_even_dist<32) - allocdist0_0_even |= (1<(%08x.%08x.%08x.%08x)\n", - allocdist0_0_even, - allocdist1_0_even, - allocdist2_0_even, - allocdist3_0_even - ); -*/ - // Distributed Gap1, odd slot - nVRB_odd_dist = get_prb(100,1,nVRB,0); - if (nVRB_odd_dist<32) - allocdist0_0_odd |= (1<RIV_max100) - RIV_max100 = RIV; - - // printf("RIV %d : first_rb %d NBRB %d\n",RIV,RBstart,Lcrbs); - localRIV2alloc_LUT100_0[RIV] = alloc0; - localRIV2alloc_LUT100_1[RIV] = alloc1; - localRIV2alloc_LUT100_2[RIV] = alloc2; - localRIV2alloc_LUT100_3[RIV] = alloc3; - distRIV2alloc_gap0_even_LUT100_0[RIV] = allocdist0_0_even; - distRIV2alloc_gap0_even_LUT100_1[RIV] = allocdist1_0_even; - distRIV2alloc_gap0_even_LUT100_2[RIV] = allocdist2_0_even; - distRIV2alloc_gap0_even_LUT100_3[RIV] = allocdist3_0_even; - distRIV2alloc_gap0_odd_LUT100_0[RIV] = allocdist0_0_odd; - distRIV2alloc_gap0_odd_LUT100_1[RIV] = allocdist1_0_odd; - distRIV2alloc_gap0_odd_LUT100_2[RIV] = allocdist2_0_odd; - distRIV2alloc_gap0_odd_LUT100_3[RIV] = allocdist3_0_odd; - distRIV2alloc_gap1_even_LUT100_0[RIV] = allocdist0_1_even; - distRIV2alloc_gap1_even_LUT100_1[RIV] = allocdist1_1_even; - distRIV2alloc_gap1_even_LUT100_2[RIV] = allocdist2_1_even; - distRIV2alloc_gap1_even_LUT100_3[RIV] = allocdist3_1_even; - distRIV2alloc_gap1_odd_LUT100_0[RIV] = allocdist0_1_odd; - distRIV2alloc_gap1_odd_LUT100_1[RIV] = allocdist1_1_odd; - distRIV2alloc_gap1_odd_LUT100_2[RIV] = allocdist2_1_odd; - distRIV2alloc_gap1_odd_LUT100_3[RIV] = allocdist3_1_odd; - - RIV2nb_rb_LUT100[RIV] = Lcrbs; - RIV2first_rb_LUT100[RIV] = RBstart; - } - } -} - -// Ngap = 3, N_VRB_DL=6, P=1, N_row=2, N_null=4*2-6=2 -// permutation for even slots : -// n_PRB'(0,2,4) = (0,1,2), n_PRB'(1,3,5) = (4,5,6) -// n_PRB''(0,1,2,3) = (0,2,4,6) -// => n_tilde_PRB(5) = (4) -// n_tilde_PRB(4) = (1) -// n_tilde_PRB(2,3) = (3,5) -// n_tilde_PRB(0,1) = (0,2) - - - -uint32_t get_rballoc(vrb_t vrb_type,uint16_t rb_alloc_dci) -{ - - return(localRIV2alloc_LUT25[rb_alloc_dci]); - -} - -uint8_t get_transmission_mode(module_id_t Mod_id, uint8_t CC_id, rnti_t rnti) -{ - unsigned char UE_id; - - // find the UE_index corresponding to rnti - UE_id = find_ue(rnti,PHY_vars_eNB_g[Mod_id][CC_id]); - DevAssert( UE_id != (unsigned char)-1 ); - - return(PHY_vars_eNB_g[Mod_id][CC_id]->transmission_mode[UE_id]); -} - -int generate_eNB_dlsch_params_from_dci(int frame, - uint8_t subframe, - void *dci_pdu, - uint16_t rnti, - DCI_format_t dci_format, - LTE_eNB_DLSCH_t **dlsch, - NR_DL_FRAME_PARMS *frame_parms, - PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated, - uint16_t si_rnti, - uint16_t ra_rnti, - uint16_t p_rnti, - uint16_t DL_pmi_single, - uint8_t beamforming_mode) -{ - - uint8_t harq_pid = UINT8_MAX; - uint32_t rballoc = UINT32_MAX; - uint32_t RIV_max = 0; - uint8_t NPRB,tbswap,tpmi=0; - LTE_eNB_DLSCH_t *dlsch0=NULL,*dlsch1=NULL; - uint8_t frame_type=frame_parms->frame_type; - uint8_t vrb_type=0; - uint8_t mcs=0,mcs1=0,mcs2=0; - uint8_t I_mcs = 0; - uint8_t rv=0,rv1=0,rv2=0; - uint8_t rah=0; - uint8_t TPC=0; - uint8_t TB0_active=0,TB1_active=0; - LTE_DL_eNB_HARQ_t *dlsch0_harq=NULL,*dlsch1_harq=NULL; - - // printf("Generate eNB DCI, format %d, rnti %x (pdu %p)\n",dci_format,rnti,dci_pdu); - - switch (dci_format) { - - case format0: - return(-1); - break; - - case format1A: // This is DLSCH allocation for control traffic - - - - dlsch[0]->subframe_tx[subframe] = 1; - - - switch (frame_parms->N_RB_DL) { - case 6: - if (frame_type == TDD) { - vrb_type = ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->vrb_type; - mcs = ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->mcs; - rballoc = ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->rballoc; - rv = ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->rv; - TPC = ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->TPC; - harq_pid = ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->harq_pid; - - // printf("TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB); - } else { - vrb_type = ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->vrb_type; - mcs = ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->mcs; - rballoc = ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->rballoc; - rv = ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->rv; - TPC = ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->TPC; - harq_pid = ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->harq_pid; - - // printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB); - } - - dlsch0_harq = dlsch[0]->harq_processes[harq_pid]; - dlsch0_harq->codeword=0; - - if (vrb_type==LOCALIZED) { - dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT6[rballoc]; - } - else { - LOG_E(PHY,"Distributed RB allocation not done yet\n"); - mac_xface->macphy_exit("exiting"); - } - dlsch0_harq->vrb_type = vrb_type; - dlsch0_harq->nb_rb = RIV2nb_rb_LUT6[rballoc];//NPRB; - RIV_max = RIV_max6; - - - break; - - case 25: - if (frame_type == TDD) { - vrb_type = ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->vrb_type; - mcs = ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->mcs; - rballoc = ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->rballoc; - rv = ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->rv; - TPC = ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->TPC; - harq_pid = ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->harq_pid; - - // printf("TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB); - } else { - vrb_type = ((DCI1A_5MHz_FDD_t *)dci_pdu)->vrb_type; - mcs = ((DCI1A_5MHz_FDD_t *)dci_pdu)->mcs; - rballoc = ((DCI1A_5MHz_FDD_t *)dci_pdu)->rballoc; - rv = ((DCI1A_5MHz_FDD_t *)dci_pdu)->rv; - TPC = ((DCI1A_5MHz_FDD_t *)dci_pdu)->TPC; - harq_pid = ((DCI1A_5MHz_FDD_t *)dci_pdu)->harq_pid; - - // printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB); - } - - dlsch0_harq = dlsch[0]->harq_processes[harq_pid]; - - - if (vrb_type==LOCALIZED) { - dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT25[rballoc]; - } - else { - LOG_E(PHY,"Distributed RB allocation not done yet\n"); - mac_xface->macphy_exit("exiting"); - } - dlsch0_harq->vrb_type = vrb_type; - dlsch0_harq->nb_rb = RIV2nb_rb_LUT25[rballoc];//NPRB; - RIV_max = RIV_max25; - break; - - case 50: - if (frame_type == TDD) { - vrb_type = ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->vrb_type; - mcs = ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->mcs; - rballoc = ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->rballoc; - rv = ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->rv; - TPC = ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->TPC; - harq_pid = ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->harq_pid; - - // printf("TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB); - } else { - vrb_type = ((DCI1A_10MHz_FDD_t *)dci_pdu)->vrb_type; - mcs = ((DCI1A_10MHz_FDD_t *)dci_pdu)->mcs; - rballoc = ((DCI1A_10MHz_FDD_t *)dci_pdu)->rballoc; - rv = ((DCI1A_10MHz_FDD_t *)dci_pdu)->rv; - TPC = ((DCI1A_10MHz_FDD_t *)dci_pdu)->TPC; - harq_pid = ((DCI1A_10MHz_FDD_t *)dci_pdu)->harq_pid; - //printf("FDD 1A: mcs %d, rballoc %x,rv %d, TPC %d\n",mcs,rballoc,rv,TPC); - } - - dlsch0_harq = dlsch[0]->harq_processes[harq_pid]; - if (vrb_type==LOCALIZED) { - dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT50_0[rballoc]; - dlsch0_harq->rb_alloc[1] = localRIV2alloc_LUT50_1[rballoc]; - } - else { - LOG_E(PHY,"Distributed RB allocation not done yet\n"); - mac_xface->macphy_exit("exiting"); - } - - - dlsch0_harq->vrb_type = vrb_type; - dlsch0_harq->nb_rb = RIV2nb_rb_LUT50[rballoc];//NPRB; - RIV_max = RIV_max50; - break; - - case 100: - if (frame_type == TDD) { - vrb_type = ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->vrb_type; - mcs = ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->mcs; - rballoc = ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->rballoc; - rv = ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->rv; - TPC = ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->TPC; - harq_pid = ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->harq_pid; - // printf("TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB); - } else { - vrb_type = ((DCI1A_20MHz_FDD_t *)dci_pdu)->vrb_type; - mcs = ((DCI1A_20MHz_FDD_t *)dci_pdu)->mcs; - rballoc = ((DCI1A_20MHz_FDD_t *)dci_pdu)->rballoc; - rv = ((DCI1A_20MHz_FDD_t *)dci_pdu)->rv; - TPC = ((DCI1A_20MHz_FDD_t *)dci_pdu)->TPC; - harq_pid = ((DCI1A_20MHz_FDD_t *)dci_pdu)->harq_pid; - // printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB); - } - - dlsch0_harq = dlsch[0]->harq_processes[harq_pid]; - - dlsch0_harq->vrb_type = vrb_type; - if (vrb_type==LOCALIZED) { - dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT100_0[rballoc]; - dlsch0_harq->rb_alloc[1] = localRIV2alloc_LUT100_1[rballoc]; - dlsch0_harq->rb_alloc[2] = localRIV2alloc_LUT100_2[rballoc]; - dlsch0_harq->rb_alloc[3] = localRIV2alloc_LUT100_3[rballoc]; - } - else { - LOG_E(PHY,"Distributed RB allocation not done yet\n"); - mac_xface->macphy_exit("exiting"); - } - - - - dlsch0_harq->nb_rb = RIV2nb_rb_LUT100[rballoc];//NPRB; - RIV_max = RIV_max100; - break; - - default: - LOG_E(PHY,"Invalid N_RB_D %dL\n", frame_parms->N_RB_DL); - DevParam (frame_parms->N_RB_DL, 0, 0); - break; - } - - // harq_pid field is reserved - if ((rnti==si_rnti) || (rnti==ra_rnti) || (rnti==p_rnti)) { // - harq_pid=0; - // see 36-212 V8.6.0 p. 45 - NPRB = (TPC&1)+2; - // 36-213 sec.7.1.7.2 p.26 - I_mcs = mcs; - } else { - if (harq_pid>=8) { - LOG_E(PHY,"ERROR: Format 1A: harq_pid=%d >= 8\n", harq_pid); - return(-1); - } - - if (rballoc>RIV_max) { - LOG_E(PHY,"ERROR: Format 1A: rb_alloc (%x) > RIV_max (%x)\n",rballoc,RIV_max); - return(-1); - } - - NPRB = dlsch0_harq->nb_rb; - I_mcs = get_I_TBS(mcs); - } - - if (NPRB==0) - return(-1); - - //printf("NPRB %d, nb_rb %d, ndi %d\n",NPRB,dlsch0_harq->nb_rb,ndi); - dlsch0_harq->rvidx = rv; - - dlsch0_harq->Nl = 1; - //dlsch0_harq->layer_index = 0; - - dlsch0_harq->mimo_mode = (frame_parms->mode1_flag == 1) ? SISO : ALAMOUTI; - /* - if ((rnti!=si_rnti)&&(rnti!=ra_rnti)&&(rnti!=p_rnti)) { //handle toggling for C-RNTI - if (dlsch0_harq->first_tx == 1) { - LOG_D(PHY,"First TX for TC-RNTI %x, clearing first_tx flag\n",rnti); - dlsch0_harq->first_tx=0; - dlsch0_harq->Ndi = 1; - } - else { - if (ndi == dlsch0_harq->DCINdi) - dlsch0_harq->Ndi = 0; - else - dlsch0_harq->Ndi = 1; - } - - dlsch0_harq->DCINdi=ndi; - } - else { - dlsch0_harq->Ndi = 1; - } - */ - dlsch0_harq->dl_power_off = 1; - - - - dlsch0_harq->mcs = mcs; - dlsch0_harq->TBS = TBStable[I_mcs][NPRB-1]; - - dlsch[0]->current_harq_pid = harq_pid; - dlsch[0]->harq_ids[subframe] = harq_pid; - - dlsch[0]->active = 1; - dlsch0 = dlsch[0]; - - dlsch[0]->rnti = rnti; - - dlsch[0]->harq_ids[subframe] = harq_pid; - - if (dlsch0_harq->round == 0) - dlsch0_harq->status = ACTIVE; - - break; - - case format1: - - switch (frame_parms->N_RB_DL) { - - case 6: - if (frame_type == TDD) { - mcs = ((DCI1_1_5MHz_TDD_t *)dci_pdu)->mcs; - rballoc = ((DCI1_1_5MHz_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI1_1_5MHz_TDD_t *)dci_pdu)->rah; - rv = ((DCI1_1_5MHz_TDD_t *)dci_pdu)->rv; - harq_pid = ((DCI1_1_5MHz_TDD_t *)dci_pdu)->harq_pid; - } else { - mcs = ((DCI1_1_5MHz_FDD_t *)dci_pdu)->mcs; - rah = ((DCI1_1_5MHz_FDD_t *)dci_pdu)->rah; - rballoc = ((DCI1_1_5MHz_FDD_t *)dci_pdu)->rballoc; - rv = ((DCI1_1_5MHz_FDD_t *)dci_pdu)->rv; - harq_pid = ((DCI1_1_5MHz_FDD_t *)dci_pdu)->harq_pid; - } - - break; - - case 25: - - if (frame_type == TDD) { - mcs = ((DCI1_5MHz_TDD_t *)dci_pdu)->mcs; - rballoc = ((DCI1_5MHz_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI1_5MHz_TDD_t *)dci_pdu)->rah; - rv = ((DCI1_5MHz_TDD_t *)dci_pdu)->rv; - harq_pid = ((DCI1_5MHz_TDD_t *)dci_pdu)->harq_pid; - LOG_D(PHY,"eNB: subframe %d UE %x, Format1 DCI: ndi %d, harq_pid %d\n",subframe,rnti,((DCI1_5MHz_TDD_t *)dci_pdu)->ndi,harq_pid); - } else { - mcs = ((DCI1_5MHz_FDD_t *)dci_pdu)->mcs; - rah = ((DCI1_5MHz_FDD_t *)dci_pdu)->rah; - rballoc = ((DCI1_5MHz_FDD_t *)dci_pdu)->rballoc; - rv = ((DCI1_5MHz_FDD_t *)dci_pdu)->rv; - harq_pid = ((DCI1_5MHz_FDD_t *)dci_pdu)->harq_pid; - LOG_D(PHY,"eNB: subframe %d UE %x, Format1 DCI: ndi %d, harq_pid %d\n",subframe,rnti,((DCI1_5MHz_FDD_t *)dci_pdu)->ndi,harq_pid); - - } - - break; - - case 50: - if (frame_type == TDD) { - mcs = ((DCI1_10MHz_TDD_t *)dci_pdu)->mcs; - rballoc = ((DCI1_10MHz_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI1_10MHz_TDD_t *)dci_pdu)->rah; - rv = ((DCI1_10MHz_TDD_t *)dci_pdu)->rv; - harq_pid = ((DCI1_10MHz_TDD_t *)dci_pdu)->harq_pid; - } else { - mcs = ((DCI1_10MHz_FDD_t *)dci_pdu)->mcs; - rah = ((DCI1_10MHz_FDD_t *)dci_pdu)->rah; - rballoc = ((DCI1_10MHz_FDD_t *)dci_pdu)->rballoc; - rv = ((DCI1_10MHz_FDD_t *)dci_pdu)->rv; - harq_pid = ((DCI1_10MHz_FDD_t *)dci_pdu)->harq_pid; - } - - break; - - case 100: - if (frame_type == TDD) { - mcs = ((DCI1_20MHz_TDD_t *)dci_pdu)->mcs; - rballoc = ((DCI1_20MHz_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI1_20MHz_TDD_t *)dci_pdu)->rah; - rv = ((DCI1_20MHz_TDD_t *)dci_pdu)->rv; - harq_pid = ((DCI1_20MHz_TDD_t *)dci_pdu)->harq_pid; - } else { - mcs = ((DCI1_20MHz_FDD_t *)dci_pdu)->mcs; - rah = ((DCI1_20MHz_FDD_t *)dci_pdu)->rah; - rballoc = ((DCI1_20MHz_FDD_t *)dci_pdu)->rballoc; - rv = ((DCI1_20MHz_FDD_t *)dci_pdu)->rv; - harq_pid = ((DCI1_20MHz_FDD_t *)dci_pdu)->harq_pid; - } - - break; - - } - - if (harq_pid>=8) { - LOG_E(PHY,"ERROR: Format 1: harq_pid=%d >= 8\n", harq_pid); - return(-1); - } - - dlsch0_harq = dlsch[0]->harq_processes[harq_pid]; - dlsch0_harq->codeword=0; - - // printf("DCI: Setting subframe_tx for subframe %d\n",subframe); - dlsch[0]->subframe_tx[subframe] = 1; - - conv_rballoc(rah, - rballoc,frame_parms->N_RB_DL, - dlsch0_harq->rb_alloc); - - dlsch0_harq->nb_rb = conv_nprb(rah, - rballoc, - frame_parms->N_RB_DL); - - NPRB = dlsch0_harq->nb_rb; - - - if (NPRB==0) - return(-1); - - - dlsch0_harq->rvidx = rv; - - dlsch0_harq->Nl = 1; - // dlsch[0]->layer_index = 0; - if (beamforming_mode == 0) - dlsch0_harq->mimo_mode = (frame_parms->mode1_flag == 1) ? SISO : ALAMOUTI; - else if (beamforming_mode == 7) - dlsch0_harq->mimo_mode = TM7; - else - LOG_E(PHY,"Invalid beamforming mode %dL\n", beamforming_mode); - - dlsch0_harq->dl_power_off = 1; - /* - if (dlsch[0]->harq_processes[harq_pid]->first_tx == 1) { - LOG_D(PHY,"First TX for C-RNTI %x, clearing first_tx flag, shouldn't happen!\n",rnti); - dlsch[0]->harq_processes[harq_pid]->first_tx=0; - dlsch[0]->harq_processes[harq_pid]->Ndi = 1; - } - else { - LOG_D(PHY,"Checking for Toggled Ndi for C-RNTI %x, old value %d, DCINdi %d\n",rnti,dlsch[0]->harq_processes[harq_pid]->DCINdi,ndi); - if (ndi == dlsch[0]->harq_processes[harq_pid]->DCINdi) - dlsch[0]->harq_processes[harq_pid]->Ndi = 0; - else - dlsch[0]->harq_processes[harq_pid]->Ndi = 1; - } - dlsch[0]->harq_processes[harq_pid]->DCINdi=ndi; - */ - - dlsch[0]->active = 1; - - - - if (dlsch0_harq->round == 0) { - dlsch0_harq->status = ACTIVE; - // MCS and TBS don't change across HARQ rounds - dlsch0_harq->mcs = mcs; - dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][NPRB-1]; - - } - - dlsch[0]->current_harq_pid = harq_pid; - dlsch[0]->harq_ids[subframe] = harq_pid; - - - - dlsch0 = dlsch[0]; - - dlsch[0]->rnti = rnti; - - - break; - - case format2: // DL Scheduling assignment for MIMO including closed loop spatial multiplexing - - switch (frame_parms->N_RB_DL) { - - case 6: - if (frame_parms->nb_antenna_ports_eNB == 2) { - if (frame_type == TDD) { - mcs1 = ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->tpmi; - } else { - mcs1 = ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->tpmi; - } - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - if (frame_type == TDD) { - mcs1 = ((DCI2_1_5MHz_4A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_1_5MHz_4A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_1_5MHz_4A_TDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2_1_5MHz_4A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_1_5MHz_4A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_1_5MHz_4A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_1_5MHz_4A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_1_5MHz_4A_TDD_t *)dci_pdu)->tpmi; - } else { - mcs1 = ((DCI2_1_5MHz_4A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_1_5MHz_4A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_1_5MHz_4A_FDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2_1_5MHz_4A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_1_5MHz_4A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_1_5MHz_4A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_1_5MHz_4A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_1_5MHz_4A_FDD_t *)dci_pdu)->tpmi; - } - } else { - LOG_E(PHY,"eNB: subframe %d UE %x, Format2 DCI: unsupported number of TX antennas %d\n",subframe,rnti,frame_parms->nb_antenna_ports_eNB); - } - - break; - - case 25: - if (frame_parms->nb_antenna_ports_eNB == 2) { - if (frame_type == TDD) { - mcs1 = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->tpmi; - } else { - mcs1 = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->tpmi; - } - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - if (frame_type == TDD) { - mcs1 = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->tpmi; - } else { - mcs1 = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->tpmi; - } - } else { - LOG_E(PHY,"eNB: subframe %d UE %x, Format2 DCI: unsupported number of TX antennas %d\n",subframe,rnti,frame_parms->nb_antenna_ports_eNB); - } - - break; - - case 50: - if (frame_parms->nb_antenna_ports_eNB == 2) { - if (frame_type == TDD) { - mcs1 = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->tpmi; - } else { - mcs1 = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->tpmi; - } - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - if (frame_type == TDD) { - mcs1 = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->tpmi; - } else { - mcs1 = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->tpmi; - } - } else { - LOG_E(PHY,"eNB: subframe %d UE %x, Format2 DCI: unsupported number of TX antennas %d\n",subframe,rnti,frame_parms->nb_antenna_ports_eNB); - } - - break; - - case 100: - if (frame_parms->nb_antenna_ports_eNB == 2) { - if (frame_type == TDD) { - mcs1 = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->tpmi; - } else { - mcs1 = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->tpmi; - } - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - if (frame_type == TDD) { - mcs1 = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->tpmi; - } else { - mcs1 = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->tpmi; - } - } else { - LOG_E(PHY,"eNB: subframe %d UE %x, Format2 DCI: unsupported number of TX antennas %d\n",subframe,rnti,frame_parms->nb_antenna_ports_eNB); - } - - break; - } - - if (harq_pid>=8) { - LOG_E(PHY,"ERROR: Format 2_2A: harq_pid=%d >= 8\n", harq_pid); - return(-1); - } - - - // Flip the TB to codeword mapping as described in 5.3.3.1.5 of 36-212 V11.3.0 - // note that we must set tbswap=0 in eNB scheduler if one TB is deactivated - TB0_active = 1; - TB1_active = 1; - - if ((rv1 == 1) && (mcs1 == 0)) { - TB0_active=0; - } - if ((rv2 == 1) && (mcs2 == 0)) { - TB1_active=0; - } -#ifdef DEBUG_HARQ - printf(" eNOdeB RV0 = %d, RV1 = %d. MCS0 = %d, MCS1=%d\n", rv1, rv2, mcs1, mcs2); -#endif - if (TB0_active && TB1_active && tbswap==0) { - dlsch0=dlsch[0]; - dlsch1=dlsch[1]; - dlsch0->active = 1; - dlsch1->active = 1; - dlsch0_harq = dlsch0->harq_processes[harq_pid]; - dlsch1_harq = dlsch1->harq_processes[harq_pid]; - dlsch0_harq->mcs = mcs1; - dlsch1_harq->mcs = mcs2; - dlsch0_harq->rvidx = rv1; - dlsch1_harq->rvidx = rv2; - dlsch0_harq->status = ACTIVE; - dlsch1_harq->status = ACTIVE; - dlsch0_harq->codeword=0; - dlsch1_harq->codeword=1; -#ifdef DEBUG_HARQ - printf("\n ENB: BOTH ACTIVE\n"); -#endif - } - else if (TB0_active && TB1_active && tbswap==1) { - dlsch0=dlsch[0]; - dlsch1=dlsch[1]; - dlsch0->active = 1; - dlsch1->active = 1; - dlsch0_harq = dlsch0->harq_processes[harq_pid]; - dlsch1_harq = dlsch1->harq_processes[harq_pid]; - dlsch0_harq->mcs = mcs1; - dlsch1_harq->mcs = mcs2; - dlsch0_harq->rvidx = rv1; - dlsch1_harq->rvidx = rv2; - dlsch0_harq->status = ACTIVE; - dlsch1_harq->status = ACTIVE; - dlsch0_harq->codeword=1; - dlsch1_harq->codeword=0; - } - else if (TB0_active && (TB1_active==0)) { - dlsch0=dlsch[0]; - dlsch0->active = 1; - dlsch0_harq = dlsch0->harq_processes[harq_pid]; - dlsch0_harq->mcs = mcs1; - dlsch0_harq->rvidx = rv1; - dlsch0_harq->status = ACTIVE; - dlsch0_harq->codeword = 0; - dlsch1=NULL; - dlsch1_harq = NULL; -#ifdef DEBUG_HARQ - printf("\n ENB: TB1 is deactivated, retransmit TB0 transmit in TM6\n"); -#endif - } - else if ((TB0_active==0) && TB1_active) { - dlsch1=dlsch[1]; - dlsch1->active = 1; - dlsch1_harq = dlsch1->harq_processes[harq_pid]; - dlsch1_harq->mcs = mcs2; - dlsch1_harq->rvidx = rv2; - dlsch1_harq->status = ACTIVE; - dlsch1_harq->codeword = 0; - dlsch0=NULL; - dlsch0_harq = NULL; -#ifdef DEBUG_HARQ - printf("\n ENB: TB0 is deactivated, retransmit TB1 transmit in TM6\n"); -#endif - } - // printf("[eNB] dlsch0_harq->round = %d, dlsch1_harq->round = %d \n", dlsch0_harq->round, dlsch1_harq->round); - - - if (dlsch0 != NULL){ - dlsch0->subframe_tx[subframe] = 1; - - dlsch0->current_harq_pid = harq_pid; - dlsch0->harq_ids[subframe] = harq_pid; - } - - if (dlsch1_harq != NULL){ - dlsch1->current_harq_pid = harq_pid; - dlsch1->harq_ids[subframe] = harq_pid; - } - - - if (dlsch0 != NULL ){ - conv_rballoc(rah, - rballoc, - frame_parms->N_RB_DL, - dlsch0_harq->rb_alloc); - - dlsch0_harq->nb_rb = conv_nprb(rah, rballoc, frame_parms->N_RB_DL); - - if (dlsch1 != NULL){ - dlsch1_harq->rb_alloc[0] = dlsch0_harq->rb_alloc[0]; - dlsch1_harq->nb_rb = dlsch0_harq->nb_rb; - } - } else if ((dlsch0 == NULL ) && (dlsch1 != NULL )){ - conv_rballoc(rah, - rballoc, - frame_parms->N_RB_DL, - dlsch1_harq->rb_alloc); - - dlsch1_harq->nb_rb = conv_nprb(rah, rballoc, frame_parms->N_RB_DL); - } - - - /*if (dlsch0_harq->nb_rb == 0) - return(-1);*/ - - - // assume both TBs are active - if (dlsch0_harq != NULL) - dlsch0_harq->Nl = 1; - if (dlsch1_harq != NULL) - dlsch1_harq->Nl = 1; - - - // check if either TB is disabled (see 36-213 V11.3 Section ) - - if (frame_parms->nb_antenna_ports_eNB == 2) { - if ((dlsch0 != NULL) && (dlsch1 != NULL)) { //two CW active - - dlsch0_harq->dl_power_off = 1; - dlsch1_harq->dl_power_off = 1; - dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1]; - dlsch1_harq->TBS = TBStable[get_I_TBS(dlsch1_harq->mcs)][dlsch1_harq->nb_rb-1]; - switch (tpmi) { - case 0: - dlsch0_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODING1; - dlsch1_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODING1; - dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,0,1); - dlsch1_harq->pmi_alloc = pmi_extend(frame_parms,0,1); - break; - case 1: - dlsch0_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODINGj; - dlsch1_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODINGj; - dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,1,1); - dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,1,1); - - break; - case 2: // PUSCH precoding - dlsch0_harq->mimo_mode = DUALSTREAM_PUSCH_PRECODING; - dlsch0_harq->pmi_alloc = DL_pmi_single; - dlsch1_harq->mimo_mode = DUALSTREAM_PUSCH_PRECODING; - dlsch1_harq->pmi_alloc = DL_pmi_single; - break; - default: - break; - } - } else if ((dlsch0 != NULL) && (dlsch1 == NULL)) { // only CW 0 active - dlsch0_harq->dl_power_off = 1; - dlsch0_harq->TBS= TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1]; - switch (tpmi) { - case 0 : - dlsch0_harq->mimo_mode = ALAMOUTI; - break; - case 1: - dlsch0_harq->mimo_mode = UNIFORM_PRECODING11; - dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,0,0); - break; - case 2: - dlsch0_harq->mimo_mode = UNIFORM_PRECODING1m1; - dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,1,0); - break; - case 3: - dlsch0_harq->mimo_mode = UNIFORM_PRECODING1j; - dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,2,0); - break; - case 4: - dlsch0_harq->mimo_mode = UNIFORM_PRECODING1mj; - dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,3,0); - break; - case 5: - dlsch0_harq->mimo_mode = PUSCH_PRECODING0; - dlsch0_harq->pmi_alloc = DL_pmi_single; - break; - case 6: - dlsch0_harq->mimo_mode = PUSCH_PRECODING1; - dlsch0_harq->pmi_alloc = DL_pmi_single; - break; - } - } else if ((dlsch0 == NULL) && (dlsch1 != NULL)) { - dlsch1_harq->dl_power_off = 1; - dlsch1_harq->TBS= TBStable[get_I_TBS(dlsch1_harq->mcs)][dlsch1_harq->nb_rb-1]; - switch (tpmi) { - case 0 : - dlsch1_harq->mimo_mode = ALAMOUTI; - break; - case 1: - dlsch1_harq->mimo_mode = UNIFORM_PRECODING11; - dlsch1_harq->pmi_alloc = pmi_extend(frame_parms,0,0); - break; - case 2: - dlsch1_harq->mimo_mode = UNIFORM_PRECODING1m1; - dlsch1_harq->pmi_alloc = pmi_extend(frame_parms,1,0); - break; - case 3: - dlsch1_harq->mimo_mode = UNIFORM_PRECODING1j; - dlsch1_harq->pmi_alloc = pmi_extend(frame_parms,2,0); - break; - case 4: - dlsch1_harq->mimo_mode = UNIFORM_PRECODING1mj; - dlsch1_harq->pmi_alloc = pmi_extend(frame_parms,3,0); - break; - case 5: - dlsch1_harq->mimo_mode = PUSCH_PRECODING0; - dlsch1_harq->pmi_alloc = DL_pmi_single; - break; - case 6: - dlsch1_harq->mimo_mode = PUSCH_PRECODING1; - dlsch1_harq->pmi_alloc = DL_pmi_single; - break; - } - // printf ("[eNB] dlsch1_harq->pmi_alloc %d\n", dlsch1_harq->pmi_alloc); - } - - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - // fill in later - } - - // reset HARQ process if this is the first transmission - /* if (dlsch0_harq->round == 0) - dlsch0_harq->status = ACTIVE; - - if (dlsch1_harq->round == 0) - dlsch1_harq->status = ACTIVE;*/ - if (dlsch0_harq != NULL) - dlsch0->rnti = rnti; - if (dlsch1 != NULL) - dlsch1->rnti = rnti; - - - break; - - case format2A: - - switch (frame_parms->N_RB_DL) { - - case 6: - if (frame_parms->nb_antenna_ports_eNB == 2) { - if (frame_type == TDD) { - mcs1 = ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->tb_swap; - } else { - mcs1 = ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->tb_swap; - } - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - if (frame_type == TDD) { - mcs1 = ((DCI2A_1_5MHz_4A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_1_5MHz_4A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_1_5MHz_4A_TDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2A_1_5MHz_4A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_1_5MHz_4A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2A_1_5MHz_4A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_1_5MHz_4A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2A_1_5MHz_4A_TDD_t *)dci_pdu)->tpmi; - } else { - mcs1 = ((DCI2A_1_5MHz_4A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_1_5MHz_4A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_1_5MHz_4A_FDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2A_1_5MHz_4A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_1_5MHz_4A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2A_1_5MHz_4A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_1_5MHz_4A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2A_1_5MHz_4A_FDD_t *)dci_pdu)->tpmi; - } - } else { - LOG_E(PHY,"eNB: subframe %d UE %x, Format2A DCI: unsupported number of TX antennas %d\n",subframe,rnti,frame_parms->nb_antenna_ports_eNB); - } - - break; - - case 25: - if (frame_parms->nb_antenna_ports_eNB == 2) { - if (frame_type == TDD) { - mcs1 = ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->tb_swap; - } else { - mcs1 = ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->tb_swap; - } - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - if (frame_type == TDD) { - mcs1 = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->tpmi; - } else { - mcs1 = ((DCI2A_5MHz_4A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_5MHz_4A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_5MHz_4A_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_5MHz_4A_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_5MHz_4A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_5MHz_4A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2A_5MHz_4A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_5MHz_4A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2A_5MHz_4A_FDD_t *)dci_pdu)->tpmi; - } - } else { - LOG_E(PHY,"eNB: subframe %d UE %x, Format2A DCI: unsupported number of TX antennas %d\n",subframe,rnti,frame_parms->nb_antenna_ports_eNB); - } - - break; - - case 50: - if (frame_parms->nb_antenna_ports_eNB == 2) { - if (frame_type == TDD) { - mcs1 = ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->tb_swap; - } else { - mcs1 = ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->tb_swap; - } - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - if (frame_type == TDD) { - mcs1 = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->tpmi; - } else { - mcs1 = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->tpmi; - } - } else { - LOG_E(PHY,"eNB: subframe %d UE %x, Format2A DCI: unsupported number of TX antennas %d\n",subframe,rnti,frame_parms->nb_antenna_ports_eNB); - } - - break; - - case 100: - if (frame_parms->nb_antenna_ports_eNB == 2) { - if (frame_type == TDD) { - mcs1 = ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->tb_swap; - } else { - mcs1 = ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->tb_swap; - } - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - if (frame_type == TDD) { - mcs1 = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->tpmi; - } else { - mcs1 = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->tpmi; - } - } else { - LOG_E(PHY,"eNB: subframe %d UE %x, Format2A DCI: unsupported number of TX antennas %d\n",subframe,rnti,frame_parms->nb_antenna_ports_eNB); - } - - break; - } - - - if (harq_pid>=8) { - LOG_E(PHY,"ERROR: Format 2_2A: harq_pid=%d >= 8\n", harq_pid); - return(-1); - } - - - // Flip the TB to codeword mapping as described in 5.3.3.1.5 of 36-212 V11.3.0 - // note that we must set tbswap=0 in eNB scheduler if one TB is deactivated - // This must be set as in TM4, does not work properly now. - if (tbswap == 0) { - dlsch0 = dlsch[0]; - dlsch1 = dlsch[1]; - } else { - dlsch0 = dlsch[1]; - dlsch1 = dlsch[0]; - } - - dlsch0_harq = dlsch0->harq_processes[harq_pid]; - dlsch1_harq = dlsch1->harq_processes[harq_pid]; - - dlsch0->subframe_tx[subframe] = 1; - - dlsch0->current_harq_pid = harq_pid; - dlsch1->current_harq_pid = harq_pid; - dlsch0->harq_ids[subframe] = harq_pid; - dlsch1->harq_ids[subframe] = harq_pid; - // printf("Setting DLSCH harq id %d to subframe %d\n",harq_pid,subframe); - - - conv_rballoc(rah, - rballoc, - frame_parms->N_RB_DL, - dlsch0_harq->rb_alloc); - - dlsch1_harq->rb_alloc[0] = dlsch0_harq->rb_alloc[0]; - dlsch0_harq->nb_rb = conv_nprb(rah, - rballoc, - frame_parms->N_RB_DL); - dlsch1_harq->nb_rb = dlsch0_harq->nb_rb; - - if (dlsch0_harq->nb_rb == 0) - return(-1); - - dlsch0_harq->mcs = mcs1; - dlsch1_harq->mcs = mcs2; - dlsch0_harq->rvidx = rv1; - dlsch1_harq->rvidx = rv2; - - // assume both TBs are active - dlsch0_harq->Nl = 1; - dlsch1_harq->Nl = 1; - dlsch0->active = 1; - dlsch1->active = 1; - - - // check if either TB is disabled (see 36-213 V11.3 Section ) - if ((dlsch0_harq->rvidx == 1) && (dlsch0_harq->mcs == 0)) { - dlsch0->active = 0; - } - - if ((dlsch1_harq->rvidx == 1) && (dlsch1_harq->mcs == 0)) { - dlsch1->active = 0; - } - - // dlsch0_harq->dl_power_off = 0; - // dlsch1_harq->dl_power_off = 0; - - - if (frame_parms->nb_antenna_ports_eNB == 2) { - dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1]; - dlsch1_harq->TBS = TBStable[get_I_TBS(dlsch1_harq->mcs)][dlsch0_harq->nb_rb-1]; - - if ((dlsch0->active==1) && (dlsch1->active==1)) { - - dlsch0_harq->mimo_mode = LARGE_CDD; - dlsch1_harq->mimo_mode = LARGE_CDD; - dlsch0_harq->dl_power_off = 1; - dlsch1_harq->dl_power_off = 1; - } else { - dlsch0_harq->mimo_mode = ALAMOUTI; - dlsch1_harq->mimo_mode = ALAMOUTI; - } - } else if (frame_parms->nb_antenna_ports_eNB == 4) { // 4 antenna case - if ((dlsch0->active==1) && (dlsch1->active==1)) { - switch (tpmi) { - case 0: // one layer per transport block - dlsch0_harq->mimo_mode = LARGE_CDD; - dlsch1_harq->mimo_mode = LARGE_CDD; - dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1]; - dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1]; - dlsch0_harq->dl_power_off = 1; - dlsch1_harq->dl_power_off = 1; - break; - - case 1: // one-layers on TB 0, two on TB 1 - dlsch0_harq->mimo_mode = LARGE_CDD; - dlsch1_harq->mimo_mode = LARGE_CDD; - dlsch1_harq->Nl = 2; - dlsch1_harq->TBS = TBStable[get_I_TBS(dlsch1_harq->mcs)][(dlsch1_harq->nb_rb<<1)-1]; - dlsch0_harq->dl_power_off = 1; - dlsch1_harq->dl_power_off = 1; - break; - - case 2: // two-layers on TB 0, two on TB 1 - dlsch0_harq->mimo_mode = LARGE_CDD; - dlsch1_harq->mimo_mode = LARGE_CDD; - dlsch0_harq->Nl = 2; - dlsch0_harq->dl_power_off = 1; - dlsch1_harq->dl_power_off = 1; - - if (frame_parms->N_RB_DL <= 56) { - dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][(dlsch0_harq->nb_rb<<1)-1]; - dlsch1_harq->TBS = TBStable[get_I_TBS(dlsch1_harq->mcs)][(dlsch1_harq->nb_rb<<1)-1]; - } else { - LOG_E(PHY,"Add implementation of Table 7.1.7.2.2-1 for two-layer TBS conversion with N_RB_DL > 56\n"); - } - - break; - - case 3: // - LOG_E(PHY,"Illegal value (3) for TPMI in Format 2A DCI\n"); - break; - } - } else if (dlsch0->active == 1) { - switch (tpmi) { - case 0: // one layer per transport block - dlsch0_harq->mimo_mode = ALAMOUTI; - dlsch1_harq->mimo_mode = ALAMOUTI; - dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1]; - break; - - case 1: // two-layers on TB 0 - dlsch0_harq->mimo_mode = LARGE_CDD; - dlsch0_harq->Nl = 2; - dlsch0_harq->dl_power_off = 1; - dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][(dlsch0_harq->nb_rb<<1)-1]; - break; - - case 2: // two-layers on TB 0, two on TB 1 - case 3: // - LOG_E(PHY,"Illegal value %d for TPMI in Format 2A DCI with one transport block enabled\n",tpmi); - break; - } - } else if (dlsch1->active == 1) { - switch (tpmi) { - case 0: // one layer per transport block - dlsch0_harq->mimo_mode = ALAMOUTI; - dlsch1_harq->mimo_mode = ALAMOUTI; - dlsch1_harq->TBS = TBStable[get_I_TBS(dlsch1_harq->mcs)][dlsch1_harq->nb_rb-1]; - break; - - case 1: // two-layers on TB 0 - dlsch1_harq->mimo_mode = LARGE_CDD; - dlsch1_harq->Nl = 2; - dlsch1_harq->dl_power_off = 1; - dlsch1_harq->TBS = TBStable[get_I_TBS(dlsch1_harq->mcs)][(dlsch1_harq->nb_rb<<1)-1]; - break; - - case 2: // two-layers on TB 0, two on TB 1 - case 3: // - LOG_E(PHY,"Illegal value %d for TPMI in Format 2A DCI with one transport block enabled\n",tpmi); - break; - } - } - } else { - LOG_E(PHY,"Illegal number of antennas for eNB %d\n",frame_parms->nb_antenna_ports_eNB); - } - - // reset HARQ process if this is the first transmission - if ((dlsch0->active==1) && (dlsch0_harq->round == 0)) - dlsch0_harq->status = ACTIVE; - - if ((dlsch1->active==1) && (dlsch1_harq->round == 0)) - dlsch1_harq->status = ACTIVE; - - dlsch0->rnti = rnti; - dlsch1->rnti = rnti; - - - // printf("eNB: Format 2A TBS0 %d, TBS1 %d\n",dlsch0_harq->TBS,dlsch1_harq->TBS); - - break; - - case format2B: - - switch (frame_parms->N_RB_DL) { - - case 6: - if (frame_type == TDD) { - mcs1 = ((DCI2B_1_5MHz_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2B_1_5MHz_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2B_1_5MHz_TDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2B_1_5MHz_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2B_1_5MHz_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2B_1_5MHz_TDD_t *)dci_pdu)->harq_pid; - } else { - mcs1 = ((DCI2B_1_5MHz_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2B_1_5MHz_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2B_1_5MHz_FDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2B_1_5MHz_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2B_1_5MHz_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2B_1_5MHz_FDD_t *)dci_pdu)->harq_pid; - } - - break; - - case 25: - if (frame_type == TDD) { - mcs1 = ((DCI2B_5MHz_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2B_5MHz_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2B_5MHz_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2B_5MHz_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2B_5MHz_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2B_5MHz_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2B_5MHz_TDD_t *)dci_pdu)->harq_pid; - } else { - mcs1 = ((DCI2B_5MHz_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2B_5MHz_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2B_5MHz_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2B_5MHz_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2B_5MHz_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2B_5MHz_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2B_5MHz_FDD_t *)dci_pdu)->harq_pid; - } - - break; - - case 50: - if (frame_type == TDD) { - mcs1 = ((DCI2B_10MHz_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2B_10MHz_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2B_10MHz_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2B_10MHz_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2B_10MHz_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2B_10MHz_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2B_10MHz_TDD_t *)dci_pdu)->harq_pid; - } else { - mcs1 = ((DCI2B_10MHz_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2B_10MHz_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2B_10MHz_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2B_10MHz_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2B_10MHz_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2B_10MHz_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2B_10MHz_FDD_t *)dci_pdu)->harq_pid; - } - - break; - - case 100: - if (frame_type == TDD) { - mcs1 = ((DCI2B_20MHz_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2B_20MHz_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2B_20MHz_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2B_20MHz_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2B_20MHz_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2B_20MHz_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2B_20MHz_TDD_t *)dci_pdu)->harq_pid; - } else { - mcs1 = ((DCI2B_20MHz_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2B_20MHz_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2B_20MHz_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2B_20MHz_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2B_20MHz_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2B_20MHz_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2B_20MHz_FDD_t *)dci_pdu)->harq_pid; - } - - break; - } - - - if (harq_pid>=8) { - LOG_E(PHY,"ERROR: Format 2_2A: harq_pid=%d >= 8\n", harq_pid); - return(-1); - } - - - - dlsch0 = dlsch[0]; - dlsch1 = dlsch[1]; - - - dlsch0->subframe_tx[subframe] = 1; - - dlsch0->current_harq_pid = harq_pid; - dlsch1->current_harq_pid = harq_pid; - dlsch0->harq_ids[subframe] = harq_pid; - dlsch1->harq_ids[subframe] = harq_pid; - // printf("Setting DLSCH harq id %d to subframe %d\n",harq_pid,subframe); - - - dlsch0_harq = dlsch0->harq_processes[harq_pid]; - dlsch1_harq = dlsch1->harq_processes[harq_pid]; - - // Needs to be checked - dlsch0_harq->codeword=0; - dlsch1_harq->codeword=1; - - conv_rballoc(rah, - rballoc, - frame_parms->N_RB_DL, - dlsch0_harq->rb_alloc); - - dlsch1_harq->rb_alloc[0] = dlsch0_harq->rb_alloc[0]; - - dlsch0_harq->nb_rb = conv_nprb(rah, - rballoc, - frame_parms->N_RB_DL); - dlsch1_harq->nb_rb = dlsch0_harq->nb_rb; - - dlsch0_harq->mcs = mcs1; - dlsch1_harq->mcs = mcs2; - dlsch0_harq->rvidx = rv1; - dlsch1_harq->rvidx = rv2; - - // check if either TB is disabled (see 36-213 V8.6 p. 26) - - - if ((dlsch0_harq->rvidx == 1) && (dlsch0_harq->mcs == 0)) - dlsch0_harq->status = DISABLED; - - if ((dlsch1_harq->rvidx == 1) && (dlsch1_harq->mcs == 0)) - dlsch1_harq->status = DISABLED; - - dlsch0_harq->Nl = 1; - - - if (dlsch0_harq->round == 0) { - dlsch0_harq->status = ACTIVE; - // printf("Setting DLSCH process %d to ACTIVE\n",harq_pid); - } - - dlsch0_harq->mcs = mcs1; - - if (dlsch0_harq->nb_rb > 0) { - dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1]; - } else { - dlsch0_harq->TBS = 0; - } - - dlsch0->active = 1; - - dlsch0->rnti = rnti; - dlsch1->rnti = rnti; - - dlsch0_harq->dl_power_off = 1; - dlsch1_harq->dl_power_off = 1; - - break; - - case format2C: - - switch (frame_parms->N_RB_DL) { - - case 6: - if (frame_type == TDD) { - mcs1 = ((DCI2C_1_5MHz_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2C_1_5MHz_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2C_1_5MHz_TDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2C_1_5MHz_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2C_1_5MHz_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2C_1_5MHz_TDD_t *)dci_pdu)->harq_pid; - } else { - mcs1 = ((DCI2C_1_5MHz_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2C_1_5MHz_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2C_1_5MHz_FDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2C_1_5MHz_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2C_1_5MHz_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2C_1_5MHz_FDD_t *)dci_pdu)->harq_pid; - } - - break; - - case 25: - if (frame_type == TDD) { - mcs1 = ((DCI2C_5MHz_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2C_5MHz_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2C_5MHz_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2C_5MHz_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2C_5MHz_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2C_5MHz_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2C_5MHz_TDD_t *)dci_pdu)->harq_pid; - } else { - mcs1 = ((DCI2C_5MHz_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2C_5MHz_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2C_5MHz_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2C_5MHz_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2C_5MHz_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2C_5MHz_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2C_5MHz_FDD_t *)dci_pdu)->harq_pid; - } - - break; - - case 50: - if (frame_type == TDD) { - mcs1 = ((DCI2C_10MHz_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2C_10MHz_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2C_10MHz_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2C_10MHz_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2C_10MHz_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2C_10MHz_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2C_10MHz_TDD_t *)dci_pdu)->harq_pid; - } else { - mcs1 = ((DCI2C_10MHz_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2C_10MHz_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2C_10MHz_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2C_10MHz_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2C_10MHz_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2C_10MHz_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2C_10MHz_FDD_t *)dci_pdu)->harq_pid; - } - - break; - - case 100: - if (frame_type == TDD) { - mcs1 = ((DCI2C_20MHz_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2C_20MHz_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2C_20MHz_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2C_20MHz_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2C_20MHz_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2C_20MHz_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2C_20MHz_TDD_t *)dci_pdu)->harq_pid; - } else { - mcs1 = ((DCI2C_20MHz_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2C_20MHz_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2C_20MHz_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2C_20MHz_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2C_20MHz_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2C_20MHz_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2C_20MHz_FDD_t *)dci_pdu)->harq_pid; - } - - break; - } - - - if (harq_pid>=8) { - LOG_E(PHY,"ERROR: Format 2_2A: harq_pid=%d >= 8\n", harq_pid); - return(-1); - } - - - - dlsch0 = dlsch[0]; - dlsch1 = dlsch[1]; - - dlsch0->subframe_tx[subframe] = 1; - - dlsch0->current_harq_pid = harq_pid; - dlsch1->current_harq_pid = harq_pid; - dlsch0->harq_ids[subframe] = harq_pid; - dlsch1->harq_ids[subframe] = harq_pid; - // printf("Setting DLSCH harq id %d to subframe %d\n",harq_pid,subframe); - - dlsch0_harq = dlsch0->harq_processes[harq_pid]; - dlsch1_harq = dlsch1->harq_processes[harq_pid]; - - // Needs to be checked - dlsch0_harq->codeword=0; - dlsch1_harq->codeword=1; - - conv_rballoc(rah, - rballoc, - frame_parms->N_RB_DL, - dlsch0_harq->rb_alloc); - dlsch1_harq->rb_alloc[0] = dlsch0_harq->rb_alloc[0]; - - dlsch0_harq->nb_rb = conv_nprb(rah, - rballoc, - frame_parms->N_RB_DL); - dlsch1_harq->nb_rb = dlsch0_harq->nb_rb; - - if (dlsch0_harq->nb_rb == 0) - return(-1); - - dlsch0_harq->mcs = mcs1; - dlsch1_harq->mcs = mcs2; - dlsch0_harq->rvidx = rv1; - dlsch1_harq->rvidx = rv2; - - // check if either TB is disabled (see 36-213 V8.6 p. 26) - - - if ((dlsch0_harq->rvidx == 1) && (dlsch0_harq->mcs == 0)) { - dlsch0->active = 0; - } - - if ((dlsch1_harq->rvidx == 1) && (dlsch1_harq->mcs == 0)) { - dlsch1->active = 0; - } - - - - if ((dlsch0_harq->round == 0) && (dlsch0->active == 1) ) { - dlsch0_harq->status = ACTIVE; - dlsch0_harq->mcs = mcs1; - } - - if ((dlsch1_harq->round == 0) && (dlsch1->active == 1) ) { - dlsch1_harq->status = ACTIVE; - dlsch1_harq->mcs = mcs2; - } - - // check TPMI information to compute TBS - if (frame_parms->nb_antenna_ports_eNB == 2) { - if (dlsch1->active == 1) { // both TBs are active - dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1]; - dlsch1_harq->TBS = TBStable[get_I_TBS(dlsch1_harq->mcs)][dlsch0_harq->nb_rb-1]; - } else { - dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1]; - } - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - - } - - dlsch0->rnti = rnti; - dlsch1->rnti = rnti; - - dlsch0_harq->dl_power_off = 1; - dlsch1_harq->dl_power_off = 1; - - break; - - case format2D: - - switch (frame_parms->N_RB_DL) { - - case 6: - if (frame_type == TDD) { - mcs1 = ((DCI2D_1_5MHz_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2D_1_5MHz_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2D_1_5MHz_TDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2D_1_5MHz_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2D_1_5MHz_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2D_1_5MHz_TDD_t *)dci_pdu)->harq_pid; - } else { - mcs1 = ((DCI2D_1_5MHz_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2D_1_5MHz_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2D_1_5MHz_FDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2D_1_5MHz_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2D_1_5MHz_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2D_1_5MHz_FDD_t *)dci_pdu)->harq_pid; - } - - break; - - case 25: - if (frame_type == TDD) { - mcs1 = ((DCI2D_5MHz_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2D_5MHz_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2D_5MHz_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2D_5MHz_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2D_5MHz_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2D_5MHz_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2D_5MHz_TDD_t *)dci_pdu)->harq_pid; - } else { - mcs1 = ((DCI2D_5MHz_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2D_5MHz_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2D_5MHz_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2D_5MHz_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2D_5MHz_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2D_5MHz_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2D_5MHz_FDD_t *)dci_pdu)->harq_pid; - } - - break; - - case 50: - if (frame_type == TDD) { - mcs1 = ((DCI2D_10MHz_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2D_10MHz_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2D_10MHz_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2D_10MHz_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2D_10MHz_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2D_10MHz_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2D_10MHz_TDD_t *)dci_pdu)->harq_pid; - } else { - mcs1 = ((DCI2D_10MHz_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2D_10MHz_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2D_10MHz_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2D_10MHz_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2D_10MHz_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2D_10MHz_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2D_10MHz_FDD_t *)dci_pdu)->harq_pid; - } - - break; - - case 100: - if (frame_type == TDD) { - mcs1 = ((DCI2D_20MHz_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2D_20MHz_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2D_20MHz_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2D_20MHz_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2D_20MHz_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2D_20MHz_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2D_20MHz_TDD_t *)dci_pdu)->harq_pid; - } else { - mcs1 = ((DCI2D_20MHz_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2D_20MHz_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2D_20MHz_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2D_20MHz_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2D_20MHz_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2D_20MHz_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2D_20MHz_FDD_t *)dci_pdu)->harq_pid; - } - - break; - } - - - if (harq_pid>=8) { - LOG_E(PHY,"ERROR: Format 2_2A: harq_pid=%d >= 8\n", harq_pid); - return(-1); - } - - - - dlsch0 = dlsch[0]; - dlsch1 = dlsch[1]; - - dlsch0->subframe_tx[subframe] = 1; - - dlsch0->current_harq_pid = harq_pid; - dlsch1->current_harq_pid = harq_pid; - dlsch0->harq_ids[subframe] = harq_pid; - dlsch1->harq_ids[subframe] = harq_pid; - // printf("Setting DLSCH harq id %d to subframe %d\n",harq_pid,subframe); - - - dlsch0_harq = dlsch0->harq_processes[harq_pid]; - dlsch1_harq = dlsch1->harq_processes[harq_pid]; - - // Needs to be checked - dlsch0_harq->codeword=0; - dlsch1_harq->codeword=1; - - conv_rballoc(rah, - rballoc, - frame_parms->N_RB_DL, - dlsch0_harq->rb_alloc); - dlsch1_harq->rb_alloc[0] = dlsch0_harq->rb_alloc[0]; - - dlsch0_harq->nb_rb = conv_nprb(rah, - rballoc, - frame_parms->N_RB_DL); - dlsch1_harq->nb_rb = dlsch0_harq->nb_rb; - - dlsch0_harq->mcs = mcs1; - dlsch1_harq->mcs = mcs2; - dlsch0_harq->rvidx = rv1; - dlsch1_harq->rvidx = rv2; - - // check if either TB is disabled (see 36-213 V8.6 p. 26) - - - if ((dlsch0_harq->rvidx == 1) && (dlsch0_harq->mcs == 0)) - dlsch0_harq->status = DISABLED; - - if ((dlsch1_harq->rvidx == 1) && (dlsch1_harq->mcs == 0)) - dlsch1_harq->status = DISABLED; - - dlsch0_harq->Nl = 1; - - - if (dlsch0_harq->round == 0) { - dlsch0_harq->status = ACTIVE; - // printf("Setting DLSCH process %d to ACTIVE\n",harq_pid); - } - - dlsch0_harq->mcs = mcs1; - - if (dlsch0_harq->nb_rb > 0) { - dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1]; - } else { - dlsch0_harq->TBS = 0; - } - - dlsch0->active = 1; - - dlsch0->rnti = rnti; - dlsch1->rnti = rnti; - - dlsch0_harq->dl_power_off = 1; - dlsch1_harq->dl_power_off = 1; - - break; - - - case format1E_2A_M10PRB: - - harq_pid = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->harq_pid; - - if (harq_pid>=8) { - LOG_E(PHY,"ERROR: Format 1E_2A_M10PRB: harq_pid=%d >= 8\n", harq_pid); - return(-1); - } - - /* - tbswap = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->tb_swap; - if (tbswap == 0) { - dlsch0 = dlsch[0]; - dlsch1 = dlsch[1]; - } - else{ - dlsch0 = dlsch[1]; - dlsch1 = dlsch[0]; - } - */ - dlsch0 = dlsch[0]; - dlsch0->subframe_tx[subframe] = 1; - - dlsch0->current_harq_pid = harq_pid; - //dlsch1->current_harq_pid = harq_pid; - dlsch0->harq_ids[subframe] = harq_pid; - //dlsch1->harq_ids[subframe] = harq_pid; - // printf("Setting DLSCH harq id %d to subframe %d\n",harq_pid,subframe); - dlsch0_harq = dlsch0->harq_processes[harq_pid]; - // Needs to be checked - dlsch0_harq->codeword=0; - - conv_rballoc(((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->rah, - ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->rballoc,frame_parms->N_RB_DL, - dlsch0_harq->rb_alloc); - - //dlsch1->rb_alloc[0] = dlsch0->rb_alloc[0]; - - dlsch0_harq->nb_rb = conv_nprb(((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->rah, - ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->rballoc, - frame_parms->N_RB_DL); - //dlsch1->nb_rb = dlsch0->nb_rb; - - dlsch0_harq->mcs = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->mcs; - //dlsch1_harq->mcs = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->mcs2; - dlsch0_harq->rvidx = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->rv; - //dlsch1_harq->rvidx = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->rv2; - - // check if either TB is disabled (see 36-213 V8.6 p. 26) --> only for format 2 and 2A - - //if ((dlsch0_harq->rvidx == 1) && (dlsch0_harq->mcs == 0)) - // dlsch0_harq->status = DISABLED; - - //if ((dlsch1_harq->rvidx == 1) && (dlsch1_harq->mcs == 0)) - // dlsch1_harq->status = DISABLED; - - dlsch0_harq->Nl = 1; - - //dlsch0->layer_index = tbswap; - //dlsch1->layer_index = 1-tbswap; - - // Fix this - tpmi = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->tpmi; - - switch (tpmi) { - case 0 : - dlsch0_harq->mimo_mode = ALAMOUTI; - break; - - case 1: - dlsch0_harq->mimo_mode = UNIFORM_PRECODING11; - dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,0, 0); - - break; - - case 2: - dlsch0_harq->mimo_mode = UNIFORM_PRECODING1m1; - dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,1, 0); - - break; - - case 3: - dlsch0_harq->mimo_mode = UNIFORM_PRECODING1j; - dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,2, 0); - - break; - - case 4: - dlsch0_harq->mimo_mode = UNIFORM_PRECODING1mj; - dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,3, 0); - break; - - case 5: - dlsch0_harq->mimo_mode = PUSCH_PRECODING0; - dlsch0_harq->pmi_alloc = DL_pmi_single; - break; - - case 6: - dlsch0_harq->mimo_mode = PUSCH_PRECODING1; - return(-1); - break; - } - - // printf("Set pmi %x (tpmi %d)\n",dlsch0->pmi_alloc,tpmi); - - - if (frame_parms->mode1_flag == 1) - dlsch0_harq->mimo_mode = SISO; - - // dlsch0_harq->Ndi = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->ndi; - if (dlsch0_harq->round == 0) { - dlsch0_harq->status = ACTIVE; - // printf("Setting DLSCH process %d to ACTIVE\n",harq_pid); - } - - dlsch0_harq->mcs = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->mcs; - - if (dlsch0_harq->nb_rb > 0) { - dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1]; - } else { - dlsch0_harq->TBS = 0; - } - - dlsch0->active = 1; - - dlsch0->rnti = rnti; - //dlsch1->rnti = rnti; - - // dlsch0->dl_power_off = 1; - dlsch0_harq->dl_power_off = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->dl_power_off; - //dlsch1->dl_power_off = 1; - - break; - - default: - LOG_E(PHY,"Unknown DCI format\n"); - return(-1); - break; - } - - - if (dlsch0_harq) { - dlsch0_harq->frame = frame; - dlsch0_harq->subframe = subframe; - } - if (dlsch1_harq) { - dlsch1_harq->frame = frame; - dlsch1_harq->subframe = subframe; - } - -#ifdef DEBUG_DCI - - if (dlsch0) { - printf("dlsch0 eNB: dlsch0 %p\n",dlsch0); - printf("dlsch0 eNB: rnti %x\n",dlsch0->rnti); - printf("dlsch0 eNB: NBRB %d\n",dlsch0_harq->nb_rb); - printf("dlsch0 eNB: rballoc %x\n",dlsch0_harq->rb_alloc[0]); - printf("dlsch0 eNB: harq_pid %d\n",harq_pid); - printf("dlsch0 eNB: round %d\n",dlsch0_harq->round); - printf("dlsch0 eNB: rvidx %d\n",dlsch0_harq->rvidx); - printf("dlsch0 eNB: TBS %d (NPRB %d)\n",dlsch0_harq->TBS,NPRB); - printf("dlsch0 eNB: mcs %d\n",dlsch0_harq->mcs); - printf("dlsch0 eNB: tpmi %d\n",tpmi); - printf("dlsch0 eNB: mimo_mode %d\n",dlsch0_harq->mimo_mode); - } - - if (dlsch1) { - printf("dlsch1 eNB: dlsch1 %p\n",dlsch1); - printf("dlsch1 eNB: rnti %x\n",dlsch1->rnti); - printf("dlsch1 eNB: NBRB %d\n",dlsch1_harq->nb_rb); - printf("dlsch1 eNB: rballoc %x\n",dlsch1_harq->rb_alloc[0]); - printf("dlsch1 eNB: harq_pid %d\n",harq_pid); - printf("dlsch1 eNB: round %d\n",dlsch1_harq->round); - printf("dlsch1 eNB: rvidx %d\n",dlsch1_harq->rvidx); - printf("dlsch1 eNB: TBS %d (NPRB %d)\n",dlsch1_harq->TBS,NPRB); - printf("dlsch1 eNB: mcs %d\n",dlsch1_harq->mcs); - printf("dlsch1 eNB: tpmi %d\n",tpmi); - printf("dlsch1 eNB: mimo_mode %d\n",dlsch1_harq->mimo_mode); - } - -#endif - - // compute DL power control parameters - - if (dlsch0 != NULL){ - computeRhoA_eNB(pdsch_config_dedicated, dlsch[0],dlsch0_harq->dl_power_off, frame_parms->nb_antenna_ports_eNB); - computeRhoB_eNB(pdsch_config_dedicated,&(frame_parms->pdsch_config_common),frame_parms->nb_antenna_ports_eNB,dlsch[0],dlsch0_harq->dl_power_off); -} - if (dlsch1 != NULL){ - computeRhoA_eNB(pdsch_config_dedicated, dlsch[1],dlsch1_harq->dl_power_off, frame_parms->nb_antenna_ports_eNB); - computeRhoB_eNB(pdsch_config_dedicated,&(frame_parms->pdsch_config_common),frame_parms->nb_antenna_ports_eNB,dlsch[1],dlsch1_harq->dl_power_off); - } - - - return(0); -} - - -int dump_dci(NR_DL_FRAME_PARMS *frame_parms, DCI_ALLOC_t *dci) -{ - switch (dci->format) { - - case format0: // This is an UL SCH allocation so nothing here, inform MAC - if ((frame_parms->frame_type == TDD) && - (frame_parms->tdd_config>0)) - switch(frame_parms->N_RB_DL) { - case 6: - LOG_D(PHY,"DCI format0 (TDD, 1.5MHz), rnti %x (%x): hopping %d, rb_alloc %x, mcs %d, ndi %d, TPC %d, cshift %d, dai %d, cqi_req %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu[0])[0], - ((DCI0_1_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->hopping, - ((DCI0_1_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc, - ((DCI0_1_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->mcs, - ((DCI0_1_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->ndi, - ((DCI0_1_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->TPC, - ((DCI0_1_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->cshift, - ((DCI0_1_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->dai, - ((DCI0_1_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->cqi_req); - break; - - case 25: - LOG_D(PHY,"DCI format0 (TDD1-6, 5MHz), rnti %x (%x): hopping %d, rb_alloc %x, mcs %d, ndi %d, TPC %d, cshift %d, dai %d, cqi_req %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu[0])[0], - ((DCI0_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->hopping, - ((DCI0_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc, - ((DCI0_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->mcs, - ((DCI0_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->ndi, - ((DCI0_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->TPC, - ((DCI0_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->cshift, - ((DCI0_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->dai, - ((DCI0_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->cqi_req); - break; - - case 50: - LOG_D(PHY,"DCI format0 (TDD1-6, 10MHz), rnti %x (%x): hopping %d, rb_alloc %x, mcs %d, ndi %d, TPC %d, cshift %d, dai %d, cqi_req %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu[0])[0], - ((DCI0_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->hopping, - ((DCI0_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc, - ((DCI0_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->mcs, - ((DCI0_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->ndi, - ((DCI0_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->TPC, - ((DCI0_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->cshift, - ((DCI0_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->dai, - ((DCI0_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->cqi_req); - break; - - case 100: - LOG_D(PHY,"DCI format0 (TDD1-6, 20MHz), rnti %x (%x): hopping %d, rb_alloc %x, mcs %d, ndi %d, TPC %d, cshift %d, dai %d, cqi_req %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu[0])[0], - ((DCI0_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->hopping, - ((DCI0_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc, - ((DCI0_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->mcs, - ((DCI0_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->ndi, - ((DCI0_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->TPC, - ((DCI0_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->cshift, - ((DCI0_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->dai, - ((DCI0_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->cqi_req); - break; - - default: - LOG_E(PHY,"Invalid N_RB_DL %d\n", frame_parms->N_RB_DL); - DevParam (frame_parms->N_RB_DL, 0, 0); - break; - } - else if (frame_parms->frame_type == FDD) - switch(frame_parms->N_RB_DL) { - case 6: - LOG_D(PHY,"DCI format0 (FDD, 1.5MHz), rnti %x (%x): hopping %d, rb_alloc %x, mcs %d, ndi %d, TPC %d, cshift %d, cqi_req %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu[0])[0], - ((DCI0_1_5MHz_FDD_t *)&dci->dci_pdu[0])->hopping, - ((DCI0_1_5MHz_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI0_1_5MHz_FDD_t *)&dci->dci_pdu[0])->mcs, - ((DCI0_1_5MHz_FDD_t *)&dci->dci_pdu[0])->ndi, - ((DCI0_1_5MHz_FDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI0_1_5MHz_FDD_t *)&dci->dci_pdu[0])->cshift, - ((DCI0_1_5MHz_FDD_t *)&dci->dci_pdu[0])->cqi_req); - break; - - case 25: - LOG_D(PHY,"DCI format0 (FDD, 5MHz), rnti %x (%x): hopping %d, rb_alloc %x, mcs %d, ndi %d, TPC %d, cshift %d, cqi_req %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu[0])[0], - ((DCI0_5MHz_FDD_t *)&dci->dci_pdu[0])->hopping, - ((DCI0_5MHz_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI0_5MHz_FDD_t *)&dci->dci_pdu[0])->mcs, - ((DCI0_5MHz_FDD_t *)&dci->dci_pdu[0])->ndi, - ((DCI0_5MHz_FDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI0_5MHz_FDD_t *)&dci->dci_pdu[0])->cshift, - ((DCI0_5MHz_FDD_t *)&dci->dci_pdu[0])->cqi_req); - break; - - case 50: - LOG_D(PHY,"DCI format0 (FDD, 10MHz), rnti %x (%x): hopping %d, rb_alloc %x, mcs %d, ndi %d, TPC %d, cshift %d, cqi_req %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu[0])[0], - ((DCI0_10MHz_FDD_t *)&dci->dci_pdu[0])->hopping, - ((DCI0_10MHz_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI0_10MHz_FDD_t *)&dci->dci_pdu[0])->mcs, - ((DCI0_10MHz_FDD_t *)&dci->dci_pdu[0])->ndi, - ((DCI0_10MHz_FDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI0_10MHz_FDD_t *)&dci->dci_pdu[0])->cshift, - ((DCI0_10MHz_FDD_t *)&dci->dci_pdu[0])->cqi_req); - break; - - case 100: - LOG_D(PHY,"DCI format0 (FDD, 20MHz), rnti %x (%x): hopping %d, rb_alloc %x, mcs %d, ndi %d, TPC %d, cshift %d, cqi_req %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu[0])[0], - ((DCI0_20MHz_FDD_t *)&dci->dci_pdu[0])->hopping, - ((DCI0_20MHz_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI0_20MHz_FDD_t *)&dci->dci_pdu[0])->mcs, - ((DCI0_20MHz_FDD_t *)&dci->dci_pdu[0])->ndi, - ((DCI0_20MHz_FDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI0_20MHz_FDD_t *)&dci->dci_pdu[0])->cshift, - ((DCI0_20MHz_FDD_t *)&dci->dci_pdu[0])->cqi_req); - break; - - default: - LOG_E(PHY,"Invalid N_RB_DL %d\n", frame_parms->N_RB_DL); - DevParam (frame_parms->N_RB_DL, 0, 0); - break; - } - else - LOG_E(PHY,"Don't know how to handle TDD format 0 yet\n"); - - break; - - case format1: - if ((frame_parms->frame_type == TDD) && - (frame_parms->tdd_config>0)) - - switch(frame_parms->N_RB_DL) { - case 6: - LOG_D(PHY,"DCI format1 (TDD 1.5 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d, harq_pid %d, ndi %d, RV %d, TPC %d, dai %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI1_1_5MHz_TDD_t *)&dci->dci_pdu[0])->rah, - ((DCI1_1_5MHz_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI1_1_5MHz_TDD_t *)&dci->dci_pdu[0])->mcs, - ((DCI1_1_5MHz_TDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI1_1_5MHz_TDD_t *)&dci->dci_pdu[0])->ndi, - ((DCI1_1_5MHz_TDD_t *)&dci->dci_pdu[0])->rv, - ((DCI1_1_5MHz_TDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI1_1_5MHz_TDD_t *)&dci->dci_pdu[0])->dai); - break; - - case 25: - LOG_D(PHY,"DCI format1 (TDD 5 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d, harq_pid %d, ndi %d, RV %d, TPC %d, dai %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI1_5MHz_TDD_t *)&dci->dci_pdu[0])->rah, - ((DCI1_5MHz_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI1_5MHz_TDD_t *)&dci->dci_pdu[0])->mcs, - ((DCI1_5MHz_TDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI1_5MHz_TDD_t *)&dci->dci_pdu[0])->ndi, - ((DCI1_5MHz_TDD_t *)&dci->dci_pdu[0])->rv, - ((DCI1_5MHz_TDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI1_5MHz_TDD_t *)&dci->dci_pdu[0])->dai); - break; - - case 50: - LOG_D(PHY,"DCI format1 (TDD 10 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d, harq_pid %d, ndi %d, RV %d, TPC %d, dai %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI1_10MHz_TDD_t *)&dci->dci_pdu[0])->rah, - ((DCI1_10MHz_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI1_10MHz_TDD_t *)&dci->dci_pdu[0])->mcs, - ((DCI1_10MHz_TDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI1_10MHz_TDD_t *)&dci->dci_pdu[0])->ndi, - ((DCI1_10MHz_TDD_t *)&dci->dci_pdu[0])->rv, - ((DCI1_10MHz_TDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI1_10MHz_TDD_t *)&dci->dci_pdu[0])->dai); - break; - - case 100: - LOG_D(PHY,"DCI format1 (TDD 20 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d, harq_pid %d, ndi %d, RV %d, TPC %d, dai %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI1_20MHz_TDD_t *)&dci->dci_pdu[0])->rah, - ((DCI1_20MHz_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI1_20MHz_TDD_t *)&dci->dci_pdu[0])->mcs, - ((DCI1_20MHz_TDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI1_20MHz_TDD_t *)&dci->dci_pdu[0])->ndi, - ((DCI1_20MHz_TDD_t *)&dci->dci_pdu[0])->rv, - ((DCI1_20MHz_TDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI1_20MHz_TDD_t *)&dci->dci_pdu[0])->dai); - break; - - default: - LOG_E(PHY,"Invalid N_RB_DL %d\n", frame_parms->N_RB_DL); - DevParam (frame_parms->N_RB_DL, 0, 0); - break; - } - else if (frame_parms->frame_type == FDD) { - switch(frame_parms->N_RB_DL) { - case 6: - LOG_D(PHY,"DCI format1 (FDD, 1.5 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d, harq_pid %d, ndi %d, RV %d, TPC %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI1_1_5MHz_FDD_t *)&dci->dci_pdu[0])->rah, - ((DCI1_1_5MHz_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI1_1_5MHz_FDD_t *)&dci->dci_pdu[0])->mcs, - ((DCI1_1_5MHz_FDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI1_1_5MHz_FDD_t *)&dci->dci_pdu[0])->ndi, - ((DCI1_1_5MHz_FDD_t *)&dci->dci_pdu[0])->rv, - ((DCI1_1_5MHz_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - case 25: - LOG_D(PHY,"DCI format1 (FDD, 5 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d, harq_pid %d, ndi %d, RV %d, TPC %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI1_5MHz_FDD_t *)&dci->dci_pdu[0])->rah, - ((DCI1_5MHz_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI1_5MHz_FDD_t *)&dci->dci_pdu[0])->mcs, - ((DCI1_5MHz_FDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI1_5MHz_FDD_t *)&dci->dci_pdu[0])->ndi, - ((DCI1_5MHz_FDD_t *)&dci->dci_pdu[0])->rv, - ((DCI1_5MHz_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - case 50: - LOG_D(PHY,"DCI format1 (FDD, 10 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d, harq_pid %d, ndi %d, RV %d, TPC %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI1_10MHz_FDD_t *)&dci->dci_pdu[0])->rah, - ((DCI1_10MHz_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI1_10MHz_FDD_t *)&dci->dci_pdu[0])->mcs, - ((DCI1_10MHz_FDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI1_10MHz_FDD_t *)&dci->dci_pdu[0])->ndi, - ((DCI1_10MHz_FDD_t *)&dci->dci_pdu[0])->rv, - ((DCI1_10MHz_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - case 100: - LOG_D(PHY,"DCI format1 (FDD, 20 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d, harq_pid %d, ndi %d, RV %d, TPC %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI1_20MHz_FDD_t *)&dci->dci_pdu[0])->rah, - ((DCI1_20MHz_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI1_20MHz_FDD_t *)&dci->dci_pdu[0])->mcs, - ((DCI1_20MHz_FDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI1_20MHz_FDD_t *)&dci->dci_pdu[0])->ndi, - ((DCI1_20MHz_FDD_t *)&dci->dci_pdu[0])->rv, - ((DCI1_20MHz_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - default: - LOG_E(PHY,"Invalid N_RB_DL %d\n", frame_parms->N_RB_DL); - DevParam (frame_parms->N_RB_DL, 0, 0); - break; - } - } - - else - LOG_E(PHY,"Don't know how to handle TDD format 0 yet\n"); - - break; - - case format1A: // This is DLSCH allocation for control traffic - if ((frame_parms->frame_type == TDD) && - (frame_parms->tdd_config>0)) { - switch (frame_parms->N_RB_DL) { - case 6: - LOG_D(PHY,"DCI format1A (TDD1-6, 1_5MHz), rnti %x (%x)\n",dci->rnti,((uint32_t*)&dci->dci_pdu[0])[0]); - LOG_D(PHY,"VRB_TYPE %d\n",((DCI1A_1_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->vrb_type); - LOG_D(PHY,"RB_ALLOC %x (NB_RB %d)\n",((DCI1A_1_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT25[((DCI1A_1_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc]); - LOG_D(PHY,"MCS %d\n",((DCI1A_1_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->mcs); - LOG_D(PHY,"HARQ_PID %d\n",((DCI1A_1_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->harq_pid); - LOG_D(PHY,"NDI %d\n",((DCI1A_1_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->ndi); - LOG_D(PHY,"RV %d\n",((DCI1A_1_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rv); - LOG_D(PHY,"TPC %d\n",((DCI1A_1_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->TPC); - LOG_D(PHY,"DAI %d\n",((DCI1A_1_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->dai); - break; - - case 25: - LOG_D(PHY,"DCI format1A (TDD1-6, 5MHz), rnti %x (%x)\n",dci->rnti,((uint32_t*)&dci->dci_pdu[0])[0]); - LOG_D(PHY,"VRB_TYPE %d\n",((DCI1A_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->vrb_type); - LOG_D(PHY,"RB_ALLOC %d (NB_RB %d)\n",((DCI1A_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT25[((DCI1A_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc]); - LOG_D(PHY,"MCS %d\n",((DCI1A_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->mcs); - LOG_D(PHY,"HARQ_PID %d\n",((DCI1A_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->harq_pid); - LOG_D(PHY,"NDI %d\n",((DCI1A_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->ndi); - LOG_D(PHY,"RV %d\n",((DCI1A_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rv); - LOG_D(PHY,"TPC %d\n",((DCI1A_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->TPC); - LOG_D(PHY,"DAI %d\n",((DCI1A_5MHz_TDD_1_6_t *)&dci->dci_pdu[0])->dai); - break; - - case 50: - LOG_D(PHY,"DCI format1A (TDD1-6, 10MHz), rnti %x (%x)\n",dci->rnti,((uint32_t*)&dci->dci_pdu[0])[0]); - LOG_D(PHY,"VRB_TYPE %d\n",((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->vrb_type); - LOG_D(PHY,"RB_ALLOC %x (NB_RB %d)\n",((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT50[((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc]); - LOG_D(PHY,"MCS %d\n",((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->mcs); - LOG_D(PHY,"HARQ_PID %d\n",((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->harq_pid); - LOG_D(PHY,"NDI %d\n",((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->ndi); - LOG_D(PHY,"RV %d\n",((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rv); - LOG_D(PHY,"TPC %d\n",((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->TPC); - LOG_D(PHY,"DAI %d\n",((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->dai); - break; - - case 100: - LOG_D(PHY,"DCI format1A (TDD1-6, 20MHz), rnti %x (%x)\n",dci->rnti,((uint32_t*)&dci->dci_pdu[0])[0]); - LOG_D(PHY,"VRB_TYPE %d\n",((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->vrb_type); - LOG_D(PHY,"RB_ALLOC %x (NB_RB %d)\n",((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT100[((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc]); - LOG_D(PHY,"MCS %d\n",((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->mcs); - LOG_D(PHY,"HARQ_PID %d\n",((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->harq_pid); - LOG_D(PHY,"NDI %d\n",((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->ndi); - LOG_D(PHY,"RV %d\n",((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rv); - LOG_D(PHY,"TPC %d\n",((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->TPC); - LOG_D(PHY,"DAI %d\n",((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->dai); - break; - - default: - LOG_E(PHY,"Invalid N_RB_DL %d\n", frame_parms->N_RB_DL); - DevParam (frame_parms->N_RB_DL, 0, 0); - break; - } - - } else if (frame_parms->frame_type == FDD) { - switch (frame_parms->N_RB_DL) { - case 6: - LOG_D(PHY,"DCI format1A(FDD, 1.5MHz), rnti %x (%x)\n",dci->rnti,((uint32_t*)&dci->dci_pdu[0])[0]); - LOG_D(PHY,"VRB_TYPE %d\n",((DCI1A_1_5MHz_FDD_t *)&dci->dci_pdu[0])->vrb_type); - LOG_D(PHY,"RB_ALLOC %x (NB_RB %d)\n",((DCI1A_1_5MHz_FDD_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT25[((DCI1A_1_5MHz_FDD_t *)&dci->dci_pdu[0])->rballoc]); - LOG_D(PHY,"MCS %d\n",((DCI1A_1_5MHz_FDD_t *)&dci->dci_pdu[0])->mcs); - LOG_D(PHY,"HARQ_PID %d\n",((DCI1A_1_5MHz_FDD_t *)&dci->dci_pdu[0])->harq_pid); - LOG_D(PHY,"NDI %d\n",((DCI1A_1_5MHz_FDD_t *)&dci->dci_pdu[0])->ndi); - LOG_D(PHY,"RV %d\n",((DCI1A_1_5MHz_FDD_t *)&dci->dci_pdu[0])->rv); - LOG_D(PHY,"TPC %d\n",((DCI1A_1_5MHz_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - case 25: - LOG_D(PHY,"DCI format1A(FDD, 5MHz), rnti %x (%x)\n",dci->rnti,((uint32_t*)&dci->dci_pdu[0])[0]); - LOG_D(PHY,"VRB_TYPE %d\n",((DCI1A_5MHz_FDD_t *)&dci->dci_pdu[0])->vrb_type); - LOG_D(PHY,"RB_ALLOC %x (NB_RB %d)\n",((DCI1A_5MHz_FDD_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT25[((DCI1A_5MHz_FDD_t *)&dci->dci_pdu[0])->rballoc]); - LOG_D(PHY,"MCS %d\n",((DCI1A_5MHz_FDD_t *)&dci->dci_pdu[0])->mcs); - LOG_D(PHY,"HARQ_PID %d\n",((DCI1A_5MHz_FDD_t *)&dci->dci_pdu[0])->harq_pid); - LOG_D(PHY,"NDI %d\n",((DCI1A_5MHz_FDD_t *)&dci->dci_pdu[0])->ndi); - LOG_D(PHY,"RV %d\n",((DCI1A_5MHz_FDD_t *)&dci->dci_pdu[0])->rv); - LOG_D(PHY,"TPC %d\n",((DCI1A_5MHz_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - case 50: - LOG_D(PHY,"DCI format1A(FDD, 10MHz), rnti %x (%x)\n",dci->rnti,((uint32_t*)&dci->dci_pdu[0])[0]); - LOG_D(PHY,"VRB_TYPE %d\n",((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->vrb_type); - LOG_D(PHY,"RB_ALLOC %x (NB_RB %d)\n",((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT50[((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->rballoc]); - LOG_D(PHY,"MCS %d\n",((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->mcs); - LOG_D(PHY,"HARQ_PID %d\n",((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->harq_pid); - LOG_D(PHY,"NDI %d\n",((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->ndi); - LOG_D(PHY,"RV %d\n",((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->rv); - LOG_D(PHY,"TPC %d\n",((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - case 100: - LOG_D(PHY,"DCI format1A(FDD, 20MHz), rnti %x (%x)\n",dci->rnti,((uint32_t*)&dci->dci_pdu[0])[0]); - LOG_D(PHY,"VRB_TYPE %d\n",((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->vrb_type); - LOG_D(PHY,"RB_ALLOC %x (NB_RB %d)\n",((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT100[((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->rballoc]); - LOG_D(PHY,"MCS %d\n",((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->mcs); - LOG_D(PHY,"HARQ_PID %d\n",((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->harq_pid); - LOG_D(PHY,"NDI %d\n",((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->ndi); - LOG_D(PHY,"RV %d\n",((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->rv); - LOG_D(PHY,"TPC %d\n",((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - default: - LOG_E(PHY,"Invalid N_RB_DL %d\n", frame_parms->N_RB_DL); - DevParam (frame_parms->N_RB_DL, 0, 0); - break; - } - } - - break; - - case format1C: // This is DLSCH allocation for control traffic - switch (frame_parms->N_RB_DL) { - case 6: - LOG_D(PHY,"DCI format1C (1.5MHz), rnti %x (%x)\n",dci->rnti,((uint32_t*)&dci->dci_pdu[0])[0]); - LOG_D(PHY,"RB_ALLOC %x (NB_RB %d)\n", - ((DCI1C_1_5MHz_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT6[conv_1C_RIV(((DCI1C_1_5MHz_t *)&dci->dci_pdu[0])->rballoc,6)]); - LOG_D(PHY,"MCS %d\n",((DCI1C_1_5MHz_t *)&dci->dci_pdu[0])->mcs); - break; - - case 25: - LOG_D(PHY,"DCI format1C (5MHz), rnti %x (%x)\n",dci->rnti,((uint32_t*)&dci->dci_pdu[0])[0]); - LOG_D(PHY,"RB_ALLOC %x (NB_RB %d)\n",((DCI1C_5MHz_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT25[conv_1C_RIV(((DCI1C_5MHz_t *)&dci->dci_pdu[0])->rballoc,25)]); - LOG_D(PHY,"MCS %d\n",((DCI1C_5MHz_t *)&dci->dci_pdu[0])->mcs); - break; - - case 50: - LOG_D(PHY,"DCI format1C (10MHz), rnti %x (%x)\n",dci->rnti,((uint32_t*)&dci->dci_pdu[0])[0]); - LOG_D(PHY,"Ngap %d\n",((DCI1C_10MHz_t *)&dci->dci_pdu[0])->Ngap); - LOG_D(PHY,"RB_ALLOC %x (NB_RB %d)\n",((DCI1C_10MHz_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT50[conv_1C_RIV(((DCI1C_10MHz_t *)&dci->dci_pdu[0])->rballoc,50)]); - LOG_D(PHY,"MCS %d\n",((DCI1C_10MHz_t *)&dci->dci_pdu[0])->mcs); - break; - - case 100: - LOG_D(PHY,"DCI format1C (20MHz), rnti %x (%x)\n",dci->rnti,((uint32_t*)&dci->dci_pdu[0])[0]); - LOG_D(PHY,"Ngap %d\n",((DCI1C_20MHz_t *)&dci->dci_pdu[0])->Ngap); - LOG_D(PHY,"RB_ALLOC %x (NB_RB %d)\n",((DCI1C_20MHz_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT50[conv_1C_RIV(((DCI1C_20MHz_t *)&dci->dci_pdu[0])->rballoc,100)]); - LOG_D(PHY,"MCS %d\n",((DCI1C_20MHz_t *)&dci->dci_pdu[0])->mcs); - break; - - - default: - LOG_E(PHY,"Invalid N_RB_DL %d\n", frame_parms->N_RB_DL); - DevParam (frame_parms->N_RB_DL, 0, 0); - break; - } - - - break; - - case format2: - - if ((frame_parms->frame_type == TDD) && - (frame_parms->tdd_config>0)) { - if (frame_parms->nb_antenna_ports_eNB == 2) { - switch(frame_parms->N_RB_DL) { - case 6: - LOG_D(PHY,"DCI format2 2 antennas (TDD 1.5 MHz), rnti %x (%x): rb_alloc %x, mcs %d|%d, harq_pid %d, ndi %d|%d, RV %d|%d, TPC %d, dai %d, tbswap %d, tpmi %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI2_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI2_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->dai, - ((DCI2_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->tpmi - ); - break; - - case 25: - LOG_D(PHY,"DCI format2 2 antennas (TDD 5 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d|%d, harq_pid %d, ndi %d|%d, RV %d|%d, TPC %d, dai %d, tb_swap %d, tpmi %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI2_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI2_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->dai, - ((DCI2_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->tpmi); - break; - - case 50: - LOG_D(PHY,"DCI format2 2 antennas (TDD 10 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d|%d, harq_pid %d, ndi %d|%d, RV %d|%d, TPC %d, dai %d, tb_swap %d, tpmi %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI2_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI2_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->dai, - ((DCI2_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->tpmi); - break; - - case 100: - LOG_D(PHY,"DCI format2 2 antennas (TDD 20 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d|%d, harq_pid %d, ndi %d|%d, RV %d|%d, TPC %d, dai %d, tb_swap %d, tpmi %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI2_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI2_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->dai, - ((DCI2_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->tpmi); - break; - - default: - LOG_E(PHY,"Invalid N_RB_DL %d\n", frame_parms->N_RB_DL); - DevParam (frame_parms->N_RB_DL, 0, 0); - break; - } - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - switch(frame_parms->N_RB_DL) { - case 6: - LOG_D(PHY,"DCI format2 2 antennas (TDD 1.5 MHz), rnti %x (%x): rb_alloc %x, mcs %d|%d, harq_pid %d, ndi %d|%d, RV %d|%d, TPC %d, dai %d, tbswap %d, tpmi %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI2_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI2_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->dai, - ((DCI2_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->tpmi - ); - break; - - case 25: - LOG_D(PHY,"DCI format2 2 antennas (TDD 5 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d|%d, harq_pid %d, ndi %d|%d, RV %d|%d, TPC %d, dai %d, tb_swap %d, tpmi %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI2_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI2_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->dai, - ((DCI2_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->tpmi); - break; - - case 50: - LOG_D(PHY,"DCI format2 2 antennas (TDD 10 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d|%d, harq_pid %d, ndi %d|%d, RV %d|%d, TPC %d, dai %d, tb_swap %d, tpmi %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI2_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI2_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->dai, - ((DCI2_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->tpmi); - break; - - case 100: - LOG_D(PHY,"DCI format2 2 antennas (TDD 20 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d|%d, harq_pid %d, ndi %d|%d, RV %d|%d, TPC %d, dai %d, tb_swap %d, tpmi %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI2_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI2_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->dai, - ((DCI2_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->tpmi); - break; - - default: - LOG_E(PHY,"Invalid N_RB_DL %d\n", frame_parms->N_RB_DL); - DevParam (frame_parms->N_RB_DL, 0, 0); - break; - } - } - } else if (frame_parms->frame_type == FDD) { - if (frame_parms->nb_antenna_ports_eNB == 2) { - switch(frame_parms->N_RB_DL) { - case 6: - LOG_D(PHY,"DCI format2 2 antennas (FDD, 1.5 MHz), rnti %x (%x): rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, tb_swap %d, tpmi %d, TPC %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI2_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->tpmi, - ((DCI2_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - case 25: - - LOG_D(PHY,"DCI format2 2 antennas (FDD, 5 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, swap %d, TPMI %d, TPC %d\n", - - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI2_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->tpmi, - ((DCI2_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - case 50: - LOG_D(PHY,"DCI format2 2 antennas (FDD, 10 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d|%d, harq_pid %d, ndi %d|%d, RV %d|%d, tb_swap %d, tpmi %d, TPC %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI2_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->tpmi, - ((DCI2_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - case 100: - LOG_D(PHY,"DCI format2 2 antennas (FDD, 20 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d|%d, harq_pid %d, ndi %d|%d, RV %d|%d, tb_swap %d, tpmi %d, TPC %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI2_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->tpmi, - ((DCI2_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - default: - LOG_E(PHY,"Invalid N_RB_DL %d\n", frame_parms->N_RB_DL); - DevParam (frame_parms->N_RB_DL, 0, 0); - break; - } - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - switch(frame_parms->N_RB_DL) { - - case 6: - LOG_D(PHY,"DCI format2 4 antennas (FDD, 1.5 MHz), rnti %x (%x): rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, tb_swap %d, tpmi %d, TPC %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI2_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->tpmi, - ((DCI2_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - case 25: - LOG_D(PHY,"DCI format2 4 antennas (FDD, 5 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d|%d, harq_pid %d, ndi %d|%d, RV %d|%d, tb_swap %d, tpmi %d, TPC %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI2_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->tpmi, - ((DCI2_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - case 50: - LOG_D(PHY,"DCI format2 4 antennas (FDD, 10 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d|%d, harq_pid %d, ndi %d|%d, RV %d|%d, tb_swap %d, tpmi %d, TPC %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI2_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->tpmi, - ((DCI2_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - case 100: - LOG_D(PHY,"DCI format2 4 antennas (FDD, 20 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d|%d, harq_pid %d, ndi %d|%d, RV %d|%d, tb_swap %d, tpmi %d, TPC %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI2_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->tpmi, - ((DCI2_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - default: - LOG_E(PHY,"Invalid N_RB_DL %d\n", frame_parms->N_RB_DL); - DevParam (frame_parms->N_RB_DL, 0, 0); - break; - } - } - } - - else - LOG_E(PHY,"Don't know how to handle TDD format 0 yet\n"); - - break; - - case format2A: - - if ((frame_parms->frame_type == TDD) && - (frame_parms->tdd_config>0)) { - if (frame_parms->nb_antenna_ports_eNB == 2) { - switch(frame_parms->N_RB_DL) { - case 6: - LOG_D(PHY,"DCI format2A 2 antennas (FDD 1.5 MHz), rnti %x (%x): rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, TPC %d, dai %d, tbswap %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI2A_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2A_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2A_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2A_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2A_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2A_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2A_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2A_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2A_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI2A_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->dai, - ((DCI2A_1_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->tb_swap - ); - break; - - case 25: - LOG_D(PHY,"DCI format2A 2 antennas (FDD 5 MHz), rnti %x (%"PRIu64"): rah %d, rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, TPC %d, dai %d, tbswap %d\n", - dci->rnti, - ((uint64_t*)&dci->dci_pdu)[0], - ((DCI2A_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2A_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2A_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2A_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2A_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2A_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2A_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2A_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2A_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2A_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI2A_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->dai, - ((DCI2A_5MHz_2A_TDD_t *)&dci->dci_pdu[0])->tb_swap); - break; - - case 50: - LOG_D(PHY,"DCI format2A 2 antennas (FDD 10 MHz), rnti %x (%"PRIu64"): rah %d, rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, TPC %d, dai %d, tbswap %d\n", - dci->rnti, - ((uint64_t*)&dci->dci_pdu)[0], - ((DCI2A_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2A_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2A_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2A_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2A_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2A_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2A_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2A_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2A_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2A_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI2A_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->dai, - ((DCI2A_10MHz_2A_TDD_t *)&dci->dci_pdu[0])->tb_swap); - break; - - case 100: - LOG_D(PHY,"DCI format2A 2 antennas (FDD 20 MHz), rnti %x (%"PRIu64"): rah %d, rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, TPC %d, dai %d, tbswap %d\n", - dci->rnti, - ((uint64_t*)&dci->dci_pdu)[0], - ((DCI2A_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2A_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2A_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2A_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2A_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2A_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2A_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2A_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2A_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2A_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI2A_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->dai, - ((DCI2A_20MHz_2A_TDD_t *)&dci->dci_pdu[0])->tb_swap); - break; - - default: - LOG_E(PHY,"Invalid N_RB_DL %d\n", frame_parms->N_RB_DL); - DevParam (frame_parms->N_RB_DL, 0, 0); - break; - } - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - switch(frame_parms->N_RB_DL) { - case 6: - LOG_D(PHY,"DCI format2A 4 antennas (TDD 1.5 MHz), rnti %x (%"PRIu64"): rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, TPC %d, dai %d, tbswap %d, tpmi %d\n", - dci->rnti, - ((uint64_t*)&dci->dci_pdu)[0], - ((DCI2A_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2A_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2A_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2A_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2A_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2A_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2A_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2A_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2A_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI2A_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->dai, - ((DCI2A_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2A_1_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->tpmi - ); - break; - - case 25: - LOG_D(PHY,"DCI format2A 4 antennas (TDD 5 MHz), rnti %x (%"PRIu64"): rah %d, rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, TPC %d, dai %d, tbswap %d, tpmi %d\n", - dci->rnti, - ((uint64_t*)&dci->dci_pdu)[0], - ((DCI2A_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2A_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2A_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2A_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2A_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2A_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2A_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2A_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2A_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2A_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI2A_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->dai, - ((DCI2A_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2A_5MHz_4A_TDD_t *)&dci->dci_pdu[0])->tpmi); - break; - - case 50: - LOG_D(PHY,"DCI format2A 4 antennas (TDD 10 MHz), rnti %x (%"PRIu64"): rah %d, rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, TPC %d, dai %d, tbswap %d, tpmi %d\n", - dci->rnti, - ((uint64_t*)&dci->dci_pdu)[0], - ((DCI2A_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2A_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2A_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2A_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2A_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2A_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2A_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2A_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2A_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2A_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI2A_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->dai, - ((DCI2A_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2A_10MHz_4A_TDD_t *)&dci->dci_pdu[0])->tpmi); - break; - - case 100: - LOG_D(PHY,"DCI format2A 4 antennas (TDD 20 MHz), rnti %x (%"PRIu64"): rah %d, rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, TPC %d, dai %d, tbswap %d, tpmi %d\n", - dci->rnti, - ((uint64_t*)&dci->dci_pdu)[0], - ((DCI2A_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2A_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2A_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2A_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2A_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2A_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2A_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2A_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2A_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2A_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->TPC, - ((DCI2A_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->dai, - ((DCI2A_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2A_20MHz_4A_TDD_t *)&dci->dci_pdu[0])->tpmi); - break; - - default: - LOG_E(PHY,"Invalid N_RB_DL %d\n", frame_parms->N_RB_DL); - DevParam (frame_parms->N_RB_DL, 0, 0); - break; - } - } - } else if (frame_parms->frame_type == FDD) { - if (frame_parms->nb_antenna_ports_eNB == 2) { - switch(frame_parms->N_RB_DL) { - case 6: - LOG_D(PHY,"DCI format2A 2 antennas (FDD, 1.5 MHz), rnti %x (%x): rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, tb_swap %d, TPC %d\n", - dci->rnti, - ((uint32_t*)&dci->dci_pdu)[0], - ((DCI2A_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2A_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2A_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2A_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2A_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2A_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2A_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2A_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2A_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2A_1_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - case 25: - LOG_D(PHY,"DCI format2A 2 antennas (FDD, 5 MHz), rnti %x (%"PRIu64"): rah %d, rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, tb_swap %d, TPC %d\n", - dci->rnti, - ((uint64_t*)&dci->dci_pdu)[0], - ((DCI2A_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2A_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2A_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2A_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2A_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2A_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2A_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2A_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2A_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2A_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2A_5MHz_2A_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - case 50: - LOG_D(PHY,"DCI format2A 2 antennas (FDD, 10 MHz), rnti %x (%"PRIu64"): rah %d, rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, tb_swap %d, TPC %d\n", - dci->rnti, - ((uint64_t*)&dci->dci_pdu)[0], - ((DCI2A_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2A_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2A_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2A_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2A_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2A_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2A_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2A_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2A_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2A_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2A_10MHz_2A_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - case 100: - LOG_D(PHY,"DCI format2A 2 antennas (FDD, 20 MHz), rnti %x (%"PRIu64"): rah %d, rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, tb_swap %d, TPC %d\n", - dci->rnti, - ((uint64_t*)&dci->dci_pdu)[0], - ((DCI2A_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2A_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2A_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2A_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2A_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2A_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2A_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2A_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2A_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2A_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2A_20MHz_2A_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - default: - LOG_E(PHY,"Invalid N_RB_DL %d\n", frame_parms->N_RB_DL); - DevParam (frame_parms->N_RB_DL, 0, 0); - break; - } - } else if (frame_parms->nb_antenna_ports_eNB == 4) { - switch(frame_parms->N_RB_DL) { - - case 6: - LOG_D(PHY,"DCI format2A 4 antennas (FDD, 1.5 MHz), rnti %x (%"PRIu64"): rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, tb_swap %d, tpmi %d, TPC %d\n", - dci->rnti, - ((uint64_t*)&dci->dci_pdu)[0], - ((DCI2A_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2A_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2A_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2A_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2A_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2A_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2A_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2A_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2A_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2A_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->tpmi, - ((DCI2A_1_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - case 25: - LOG_D(PHY,"DCI format2A 4 antennas (FDD, 5 MHz), rnti %x (%"PRIu64"): rah %d, rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, tb_swap %d, tpmi %d, TPC %d\n", - dci->rnti, - ((uint64_t*)&dci->dci_pdu)[0], - ((DCI2A_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2A_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2A_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2A_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2A_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2A_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2A_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2A_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2A_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2A_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2A_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->tpmi, - ((DCI2A_5MHz_4A_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - case 50: - LOG_D(PHY,"DCI format2A 4 antennas (FDD, 5 MHz), rnti %x (%"PRIu64"): rah %d, rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, tb_swap %d, tpmi %d, TPC %d\n", - dci->rnti, - ((uint64_t*)&dci->dci_pdu)[0], - ((DCI2A_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2A_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2A_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2A_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2A_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2A_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2A_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2A_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2A_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2A_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2A_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->tpmi, - ((DCI2A_10MHz_4A_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - case 100: - LOG_D(PHY,"DCI format2A 4 antennas (FDD, 5 MHz), rnti %x (%"PRIu64"): rah %d, rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, tb_swap %d, tpmi %d, TPC %d\n", - dci->rnti, - ((uint64_t*)&dci->dci_pdu)[0], - ((DCI2A_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->rah, - ((DCI2A_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI2A_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->mcs1, - ((DCI2A_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->mcs2, - ((DCI2A_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->harq_pid, - ((DCI2A_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->ndi1, - ((DCI2A_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->ndi2, - ((DCI2A_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->rv1, - ((DCI2A_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->rv2, - ((DCI2A_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI2A_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->tpmi, - ((DCI2A_20MHz_4A_FDD_t *)&dci->dci_pdu[0])->TPC); - break; - - default: - LOG_E(PHY,"Invalid N_RB_DL %d\n", frame_parms->N_RB_DL); - DevParam (frame_parms->N_RB_DL, 0, 0); - break; - } - } - } - - else - LOG_E(PHY,"Don't know how to handle TDD format 0 yet\n"); - - break; - - case format1E_2A_M10PRB: - - LOG_D(PHY,"DCI format1E_2A_M10PRB, rnti %x (%8x): harq_pid %d, rah %d, rb_alloc %x, mcs %d, rv %d, tpmi %d, ndi %d, dl_power_offset %d\n", - dci->rnti, - ((uint32_t *)&dci->dci_pdu)[0], - ((DCI1E_5MHz_2A_M10PRB_TDD_t *)&dci->dci_pdu[0])->harq_pid, - //((DCI1E_5MHz_2A_M10PRB_TDD_t *)&dci->dci_pdu[0])->tb_swap, - ((DCI1E_5MHz_2A_M10PRB_TDD_t *)&dci->dci_pdu[0])->rah, - ((DCI1E_5MHz_2A_M10PRB_TDD_t *)&dci->dci_pdu[0])->rballoc, - ((DCI1E_5MHz_2A_M10PRB_TDD_t *)&dci->dci_pdu[0])->mcs, - ((DCI1E_5MHz_2A_M10PRB_TDD_t *)&dci->dci_pdu[0])->rv, - ((DCI1E_5MHz_2A_M10PRB_TDD_t *)&dci->dci_pdu[0])->tpmi, - ((DCI1E_5MHz_2A_M10PRB_TDD_t *)&dci->dci_pdu[0])->ndi, - ((DCI1E_5MHz_2A_M10PRB_TDD_t *)&dci->dci_pdu[0])->dl_power_off - ); - - break; - - default: - LOG_E(PHY,"dci_tools.c: dump_dci, unknown format %d\n",dci->format); - return(-1); - } - - return(0); -} -#endif //(0) #ifdef NR_PDCCH_DCI_TOOLS uint16_t nr_dci_field(uint32_t dci_pdu[4], @@ -4909,2097 +1015,6 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, #endif -#if 0 -void extract_dci1A_info(uint8_t N_RB_DL, lte_frame_type_t frame_type, void *dci_pdu, DCI_INFO_EXTRACTED_t *pdci_info_extarcted) -{ - uint8_t harq_pid=0; - uint32_t rballoc=0; - uint8_t vrb_type=0; - uint8_t mcs=0; - uint8_t rv=0; - uint8_t ndi=0; - uint8_t TPC=0; - - uint8_t dai=0; - - switch (N_RB_DL) { - case 6: - if (frame_type == TDD) { - vrb_type = ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->vrb_type; - mcs = ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->mcs; - rballoc = ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->rballoc; - rv = ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->rv; - ndi = ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->ndi; - TPC = ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->TPC; - harq_pid = ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->harq_pid; - dai = ((DCI1A_1_5MHz_TDD_1_6_t *)dci_pdu)->dai; - // printf("TDD 1A: mcs %d, rballoc %x,rv %d, TPC %d\n",mcs,rballoc,rv,TPC); - } else { - vrb_type = ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->vrb_type; - mcs = ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->mcs; - rballoc = ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->rballoc; - rv = ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->rv; - ndi = ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->ndi; - TPC = ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->TPC; - harq_pid = ((DCI1A_1_5MHz_FDD_t *)dci_pdu)->harq_pid; - //printf("FDD 1A: mcs %d, rballoc %x,rv %d, TPC %d\n",mcs,rballoc,rv,TPC); - } - break; - - case 25: - - if (frame_type == TDD) { - vrb_type = ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->vrb_type; - mcs = ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->mcs; - rballoc = ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->rballoc; - rv = ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->rv; - ndi = ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->ndi; - TPC = ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->TPC; - harq_pid = ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->harq_pid; - dai = ((DCI1A_5MHz_TDD_1_6_t *)dci_pdu)->dai; - //printf("TDD 1A: mcs %d, rballoc %x,rv %d, TPC %d\n",mcs,rballoc,rv,TPC); - } else { - vrb_type = ((DCI1A_5MHz_FDD_t *)dci_pdu)->vrb_type; - mcs = ((DCI1A_5MHz_FDD_t *)dci_pdu)->mcs; - rballoc = ((DCI1A_5MHz_FDD_t *)dci_pdu)->rballoc; - rv = ((DCI1A_5MHz_FDD_t *)dci_pdu)->rv; - ndi = ((DCI1A_5MHz_FDD_t *)dci_pdu)->ndi; - TPC = ((DCI1A_5MHz_FDD_t *)dci_pdu)->TPC; - harq_pid = ((DCI1A_5MHz_FDD_t *)dci_pdu)->harq_pid; - //printf("FDD 1A: mcs %d, rballoc %x,rv %d, TPC %d\n",mcs,rballoc,rv,TPC); - } - - break; - - case 50: - if (frame_type == TDD) { - vrb_type = ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->vrb_type; - mcs = ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->mcs; - rballoc = ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->rballoc; - rv = ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->rv; - ndi = ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->ndi; - TPC = ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->TPC; - harq_pid = ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->harq_pid; - dai = ((DCI1A_10MHz_TDD_1_6_t *)dci_pdu)->dai; - // printf("TDD 1A: mcs %d, rballoc %x,rv %d, TPC %d\n",mcs,rballoc,rv,TPC); - } else { - vrb_type = ((DCI1A_10MHz_FDD_t *)dci_pdu)->vrb_type; - mcs = ((DCI1A_10MHz_FDD_t *)dci_pdu)->mcs; - rballoc = ((DCI1A_10MHz_FDD_t *)dci_pdu)->rballoc; - rv = ((DCI1A_10MHz_FDD_t *)dci_pdu)->rv; - ndi = ((DCI1A_10MHz_FDD_t *)dci_pdu)->ndi; - TPC = ((DCI1A_10MHz_FDD_t *)dci_pdu)->TPC; - harq_pid = ((DCI1A_10MHz_FDD_t *)dci_pdu)->harq_pid; - //printf("FDD 1A: mcs %d, vrb_type %d, rballoc %x,ndi %d, rv %d, TPC %d\n",mcs,vrb_type,rballoc,ndi,rv,TPC); - } - break; - - case 100: - if (frame_type == TDD) { - vrb_type = ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->vrb_type; - mcs = ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->mcs; - rballoc = ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->rballoc; - rv = ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->rv; - ndi = ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->ndi; - TPC = ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->TPC; - harq_pid = ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->harq_pid; - dai = ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->dai; - // printf("TDD 1A: mcs %d, rballoc %x,rv %d, TPC %d\n",mcs,rballoc,rv,TPC); - } else { - vrb_type = ((DCI1A_20MHz_FDD_t *)dci_pdu)->vrb_type; - mcs = ((DCI1A_20MHz_FDD_t *)dci_pdu)->mcs; - rballoc = ((DCI1A_20MHz_FDD_t *)dci_pdu)->rballoc; - rv = ((DCI1A_20MHz_FDD_t *)dci_pdu)->rv; - ndi = ((DCI1A_20MHz_FDD_t *)dci_pdu)->ndi; - TPC = ((DCI1A_20MHz_FDD_t *)dci_pdu)->TPC; - harq_pid = ((DCI1A_20MHz_FDD_t *)dci_pdu)->harq_pid; - //printf("FDD 1A: mcs %d, rballoc %x,rv %d, TPC %d\n",mcs,rballoc,rv,TPC); - } - break; - } - - pdci_info_extarcted->vrb_type = vrb_type; - pdci_info_extarcted->mcs1 = mcs; - pdci_info_extarcted->rballoc = rballoc; - pdci_info_extarcted->rv1 = rv; - pdci_info_extarcted->ndi1 = ndi; - pdci_info_extarcted->TPC = TPC; - pdci_info_extarcted->harq_pid = harq_pid; - pdci_info_extarcted->dai = dai; -} - -void extract_dci1C_info(uint8_t N_RB_DL, lte_frame_type_t frame_type, void *dci_pdu, DCI_INFO_EXTRACTED_t *pdci_info_extarcted) -{ - - uint32_t rballoc=0; - uint8_t mcs=0; - - switch (N_RB_DL) { - case 6: - mcs = ((DCI1C_5MHz_t *)dci_pdu)->mcs; - rballoc = conv_1C_RIV(((DCI1C_5MHz_t *)dci_pdu)->rballoc,6); - - break; - - case 25: - mcs = ((DCI1C_5MHz_t *)dci_pdu)->mcs; - rballoc = conv_1C_RIV(((DCI1C_5MHz_t *)dci_pdu)->rballoc,6); - - break; - - case 50: - mcs = ((DCI1C_10MHz_t *)dci_pdu)->mcs; - rballoc = conv_1C_RIV(((DCI1C_10MHz_t *)dci_pdu)->rballoc,6); - - break; - - case 100: - mcs = ((DCI1C_20MHz_t *)dci_pdu)->mcs; - rballoc = conv_1C_RIV(((DCI1C_20MHz_t *)dci_pdu)->rballoc,6); - break; - - default: - AssertFatal(0,"Format 1C: Unknown N_RB_DL %d\n",N_RB_DL); - break; - } - - pdci_info_extarcted->mcs1 = mcs; - pdci_info_extarcted->rballoc = rballoc; -} - -void extract_dci1_info(uint8_t N_RB_DL, lte_frame_type_t frame_type, void *dci_pdu, DCI_INFO_EXTRACTED_t *pdci_info_extarcted) -{ - - uint32_t rballoc=0; - uint8_t mcs=0; - uint8_t rah=0; - uint8_t rv=0; - uint8_t TPC=0; - uint8_t ndi=0; - uint8_t harq_pid=0; - - switch (N_RB_DL) { - case 6: - if (frame_type == TDD) { - mcs = ((DCI1_1_5MHz_TDD_t *)dci_pdu)->mcs; - rballoc = ((DCI1_1_5MHz_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI1_1_5MHz_TDD_t *)dci_pdu)->rah; - rv = ((DCI1_1_5MHz_TDD_t *)dci_pdu)->rv; - TPC = ((DCI1_1_5MHz_TDD_t *)dci_pdu)->TPC; - ndi = ((DCI1_1_5MHz_TDD_t *)dci_pdu)->ndi; - harq_pid = ((DCI1_1_5MHz_TDD_t *)dci_pdu)->harq_pid; - } else { - mcs = ((DCI1_1_5MHz_FDD_t *)dci_pdu)->mcs; - rah = ((DCI1_1_5MHz_FDD_t *)dci_pdu)->rah; - rballoc = ((DCI1_1_5MHz_FDD_t *)dci_pdu)->rballoc; - rv = ((DCI1_1_5MHz_FDD_t *)dci_pdu)->rv; - TPC = ((DCI1_1_5MHz_FDD_t *)dci_pdu)->TPC; - ndi = ((DCI1_1_5MHz_FDD_t *)dci_pdu)->ndi; - harq_pid = ((DCI1_1_5MHz_FDD_t *)dci_pdu)->harq_pid; - } - - break; - - case 25: - if (frame_type == TDD) { - mcs = ((DCI1_5MHz_TDD_t *)dci_pdu)->mcs; - rballoc = ((DCI1_5MHz_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI1_5MHz_TDD_t *)dci_pdu)->rah; - rv = ((DCI1_5MHz_TDD_t *)dci_pdu)->rv; - TPC = ((DCI1_5MHz_TDD_t *)dci_pdu)->TPC; - ndi = ((DCI1_5MHz_TDD_t *)dci_pdu)->ndi; - harq_pid = ((DCI1_5MHz_TDD_t *)dci_pdu)->harq_pid; - } else { - mcs = ((DCI1_5MHz_FDD_t *)dci_pdu)->mcs; - rah = ((DCI1_5MHz_FDD_t *)dci_pdu)->rah; - rballoc = ((DCI1_5MHz_FDD_t *)dci_pdu)->rballoc; - rv = ((DCI1_5MHz_FDD_t *)dci_pdu)->rv; - TPC = ((DCI1_5MHz_FDD_t *)dci_pdu)->TPC; - ndi = ((DCI1_5MHz_FDD_t *)dci_pdu)->ndi; - harq_pid = ((DCI1_5MHz_FDD_t *)dci_pdu)->harq_pid; - } - - break; - - case 50: - if (frame_type == TDD) { - mcs = ((DCI1_10MHz_TDD_t *)dci_pdu)->mcs; - rballoc = ((DCI1_10MHz_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI1_10MHz_TDD_t *)dci_pdu)->rah; - rv = ((DCI1_10MHz_TDD_t *)dci_pdu)->rv; - TPC = ((DCI1_10MHz_TDD_t *)dci_pdu)->TPC; - ndi = ((DCI1_10MHz_TDD_t *)dci_pdu)->ndi; - harq_pid = ((DCI1_10MHz_TDD_t *)dci_pdu)->harq_pid; - } else { - mcs = ((DCI1_10MHz_FDD_t *)dci_pdu)->mcs; - rah = ((DCI1_10MHz_FDD_t *)dci_pdu)->rah; - rballoc = ((DCI1_10MHz_FDD_t *)dci_pdu)->rballoc; - rv = ((DCI1_10MHz_FDD_t *)dci_pdu)->rv; - TPC = ((DCI1_10MHz_FDD_t *)dci_pdu)->TPC; - ndi = ((DCI1_10MHz_FDD_t *)dci_pdu)->ndi; - harq_pid = ((DCI1_10MHz_FDD_t *)dci_pdu)->harq_pid; - } - - break; - - case 100: - if (frame_type == TDD) { - mcs = ((DCI1_20MHz_TDD_t *)dci_pdu)->mcs; - rballoc = ((DCI1_20MHz_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI1_20MHz_TDD_t *)dci_pdu)->rah; - rv = ((DCI1_20MHz_TDD_t *)dci_pdu)->rv; - TPC = ((DCI1_20MHz_TDD_t *)dci_pdu)->TPC; - ndi = ((DCI1_20MHz_TDD_t *)dci_pdu)->ndi; - harq_pid = ((DCI1_20MHz_TDD_t *)dci_pdu)->harq_pid; - } else { - mcs = ((DCI1_20MHz_FDD_t *)dci_pdu)->mcs; - rah = ((DCI1_20MHz_FDD_t *)dci_pdu)->rah; - rballoc = ((DCI1_20MHz_FDD_t *)dci_pdu)->rballoc; - rv = ((DCI1_20MHz_FDD_t *)dci_pdu)->rv; - TPC = ((DCI1_20MHz_FDD_t *)dci_pdu)->TPC; - ndi = ((DCI1_20MHz_FDD_t *)dci_pdu)->ndi; - harq_pid = ((DCI1_20MHz_FDD_t *)dci_pdu)->harq_pid; - } - - break; - } - - pdci_info_extarcted->mcs1 = mcs; - pdci_info_extarcted->rah = rah; - pdci_info_extarcted->rballoc = rballoc; - pdci_info_extarcted->rv1 = rv; - pdci_info_extarcted->TPC = TPC; - pdci_info_extarcted->ndi1 = ndi; - pdci_info_extarcted->harq_pid = harq_pid; - -} - -void extract_dci2_info(uint8_t N_RB_DL, lte_frame_type_t frame_type, uint8_t nb_antenna_ports_eNB, void *dci_pdu, DCI_INFO_EXTRACTED_t *pdci_info_extarcted) -{ - - uint32_t rballoc=0; - uint8_t rah=0; - uint8_t mcs1=0; - uint8_t mcs2=0; - uint8_t rv1=0; - uint8_t rv2=0; - uint8_t ndi1=0; - uint8_t ndi2=0; - uint8_t tbswap=0; - uint8_t tpmi=0; - uint8_t harq_pid=0; - uint8_t TPC=0; - - switch (N_RB_DL) { - - case 6: - if (nb_antenna_ports_eNB == 2) { - if (frame_type == TDD) { - rah = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->rah; - mcs1 = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->TPC; - ndi1 = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->ndi2; - } else { - rah = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->rah; - mcs1 = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->TPC; - ndi1 = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->ndi2; - } - } else if (nb_antenna_ports_eNB == 4) { - if (frame_type == TDD) { - rah = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->rah; - mcs1 = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->TPC; - ndi1 = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->ndi2; - } else { - rah = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->rah; - mcs1 = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->TPC; - ndi1 = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->ndi2; - } - } else { - LOG_E(PHY,"UE: Format2 DCI: unsupported number of TX antennas %d\n",nb_antenna_ports_eNB); - } - - break; - - case 25: - if (nb_antenna_ports_eNB == 2) { - if (frame_type == TDD) { - rah = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->rah; - mcs1 = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->TPC; - ndi1 = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->ndi2; - } else { - rah = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->rah; - mcs1 = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->TPC; - ndi1 = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->ndi2; - } - } else if (nb_antenna_ports_eNB == 4) { - if (frame_type == TDD) { - rah = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->rah; - mcs1 = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->TPC; - ndi1 = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->ndi2; - } else { - rah = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->rah; - mcs1 = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->TPC; - ndi1 = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->ndi2; - } - } else { - LOG_E(PHY,"UE: Format2 DCI: unsupported number of TX antennas %d\n",nb_antenna_ports_eNB); - } - - break; - - case 50: - if (nb_antenna_ports_eNB == 2) { - if (frame_type == TDD) { - rah = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->rah; - mcs1 = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->TPC; - ndi1 = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->ndi2; - } else { - rah = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->rah; - mcs1 = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->TPC; - ndi1 = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->ndi2; - } - } else if (nb_antenna_ports_eNB == 4) { - if (frame_type == TDD) { - rah = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->rah; - mcs1 = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->TPC; - ndi1 = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->ndi2; - } else { - rah = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->rah; - mcs1 = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->TPC; - ndi1 = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->ndi2; - } - } else { - LOG_E(PHY,"UE: Format2A DCI: unsupported number of TX antennas %d\n",nb_antenna_ports_eNB); - } - - break; - - case 100: - if (nb_antenna_ports_eNB == 2) { - if (frame_type == TDD) { - rah = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->rah; - mcs1 = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->TPC; - ndi1 = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->ndi2; - } else { - rah = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->rah; - mcs1 = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->TPC; - ndi1 = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->ndi2; - } - } else if (nb_antenna_ports_eNB == 4) { - if (frame_type == TDD) { - rah = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->rah; - mcs1 = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->TPC; - ndi1 = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->ndi2; - } else { - rah = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->rah; - mcs1 = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->rv2; - harq_pid = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->TPC; - ndi1 = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->ndi2; - } - } else { - LOG_E(PHY,"UE: Format2A DCI: unsupported number of TX antennas %d\n",nb_antenna_ports_eNB); - } - - break; - } - - pdci_info_extarcted->rah = rah; - pdci_info_extarcted->mcs1 = mcs1; - pdci_info_extarcted->mcs2 = mcs2; - pdci_info_extarcted->rv1 = rv1; - pdci_info_extarcted->rv2 = rv2; - pdci_info_extarcted->harq_pid = harq_pid; - pdci_info_extarcted->rballoc = rballoc; - pdci_info_extarcted->tb_swap = tbswap; - pdci_info_extarcted->tpmi = tpmi; - pdci_info_extarcted->TPC = TPC; - pdci_info_extarcted->ndi1 = ndi1; - pdci_info_extarcted->ndi2 = ndi2; - -} - -void extract_dci2A_info(uint8_t N_RB_DL, lte_frame_type_t frame_type, uint8_t nb_antenna_ports_eNB, void *dci_pdu, DCI_INFO_EXTRACTED_t *pdci_info_extarcted) -{ - - uint32_t rballoc=0; - uint8_t rah=0; - uint8_t mcs1=0; - uint8_t mcs2=0; - uint8_t rv1=0; - uint8_t rv2=0; - uint8_t ndi1=0; - uint8_t ndi2=0; - uint8_t tbswap=0; - uint8_t tpmi=0; - uint8_t harq_pid=0; - uint8_t TPC=0; - - AssertFatal( (nb_antenna_ports_eNB == 2) || (nb_antenna_ports_eNB == 4), "unsupported nb_antenna_ports_eNB %d\n", nb_antenna_ports_eNB); - switch (N_RB_DL) { - - case 6: - if (nb_antenna_ports_eNB == 2) { - if (frame_type == TDD) { - mcs1 = ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->rv2; - ndi1 = ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->ndi2; - harq_pid = ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->tb_swap; - TPC = ((DCI2A_1_5MHz_2A_TDD_t *)dci_pdu)->TPC; - } else { - mcs1 = ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->rv2; - ndi1 = ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->ndi2; - harq_pid = ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->tb_swap; - TPC = ((DCI2A_1_5MHz_2A_FDD_t *)dci_pdu)->TPC; - } - } else if (nb_antenna_ports_eNB == 4) { - if (frame_type == TDD) { - mcs1 = ((DCI2A_1_5MHz_4A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_1_5MHz_4A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_1_5MHz_4A_TDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2A_1_5MHz_4A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_1_5MHz_4A_TDD_t *)dci_pdu)->rv2; - ndi1 = ((DCI2A_1_5MHz_4A_TDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2A_1_5MHz_4A_TDD_t *)dci_pdu)->ndi2; - harq_pid = ((DCI2A_1_5MHz_4A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_1_5MHz_4A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2A_1_5MHz_4A_TDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2A_1_5MHz_4A_TDD_t *)dci_pdu)->TPC; - } else { - mcs1 = ((DCI2A_1_5MHz_4A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_1_5MHz_4A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_1_5MHz_4A_FDD_t *)dci_pdu)->rballoc; - rv1 = ((DCI2A_1_5MHz_4A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_1_5MHz_4A_FDD_t *)dci_pdu)->rv2; - ndi1 = ((DCI2A_1_5MHz_4A_FDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2A_1_5MHz_4A_FDD_t *)dci_pdu)->ndi2; - harq_pid = ((DCI2A_1_5MHz_4A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_1_5MHz_4A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2A_1_5MHz_4A_FDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2A_1_5MHz_4A_FDD_t *)dci_pdu)->TPC; - } - } - - break; - - case 25: - if (nb_antenna_ports_eNB == 2) { - if (frame_type == TDD) { - mcs1 = ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->rv2; - ndi1 = ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->ndi2; - harq_pid = ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->tb_swap; - TPC = ((DCI2A_5MHz_2A_TDD_t *)dci_pdu)->TPC; - } else { - mcs1 = ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->rv2; - ndi1 = ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->ndi2; - harq_pid = ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->tb_swap; - TPC = ((DCI2A_5MHz_2A_FDD_t *)dci_pdu)->TPC; - } - } else if (nb_antenna_ports_eNB == 4) { - if (frame_type == TDD) { - mcs1 = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->rv2; - ndi1 = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->ndi2; - harq_pid = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->TPC; - } else { - mcs1 = ((DCI2A_5MHz_4A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_5MHz_4A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_5MHz_4A_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_5MHz_4A_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_5MHz_4A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_5MHz_4A_FDD_t *)dci_pdu)->rv2; - ndi1 = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2A_5MHz_4A_TDD_t *)dci_pdu)->ndi2; - harq_pid = ((DCI2A_5MHz_4A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_5MHz_4A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2A_5MHz_4A_FDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2A_5MHz_4A_FDD_t *)dci_pdu)->TPC; - } - } - break; - - case 50: - if (nb_antenna_ports_eNB == 2) { - if (frame_type == TDD) { - mcs1 = ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->rv2; - ndi1 = ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->ndi2; - harq_pid = ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->tb_swap; - TPC = ((DCI2A_10MHz_2A_TDD_t *)dci_pdu)->TPC; - } else { - mcs1 = ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->rv2; - ndi1 = ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->ndi2; - harq_pid = ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->tb_swap; - TPC = ((DCI2A_10MHz_2A_FDD_t *)dci_pdu)->TPC; - } - } else if (nb_antenna_ports_eNB == 4) { - if (frame_type == TDD) { - mcs1 = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->rv2; - ndi1 = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->ndi2; - harq_pid = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2A_10MHz_4A_TDD_t *)dci_pdu)->TPC; - } else { - mcs1 = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->rv2; - ndi1 = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->ndi2; - harq_pid = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2A_10MHz_4A_FDD_t *)dci_pdu)->TPC; - } - } - - break; - - case 100: - if (nb_antenna_ports_eNB == 2) { - if (frame_type == TDD) { - mcs1 = ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->rv2; - ndi1 = ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->ndi2; - harq_pid = ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->tb_swap; - TPC = ((DCI2A_20MHz_2A_TDD_t *)dci_pdu)->TPC; - } else { - mcs1 = ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->rv2; - ndi1 = ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->ndi2; - harq_pid = ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->tb_swap; - TPC = ((DCI2A_20MHz_2A_FDD_t *)dci_pdu)->TPC; - } - } else if (nb_antenna_ports_eNB == 4) { - if (frame_type == TDD) { - mcs1 = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->rv2; - ndi1 = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->ndi2; - harq_pid = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2A_20MHz_4A_TDD_t *)dci_pdu)->TPC; - } else { - mcs1 = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->mcs1; - mcs2 = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->mcs2; - rballoc = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->rballoc; - rah = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->rah; - rv1 = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->rv1; - rv2 = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->rv2; - ndi1 = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->ndi1; - ndi2 = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->ndi2; - harq_pid = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->harq_pid; - tbswap = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->tb_swap; - tpmi = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->tpmi; - TPC = ((DCI2A_20MHz_4A_FDD_t *)dci_pdu)->TPC; - } - } - - break; - } - - pdci_info_extarcted->mcs1 = mcs1; - pdci_info_extarcted->mcs2 = mcs2; - pdci_info_extarcted->rballoc = rballoc; - pdci_info_extarcted->rah = rah; - pdci_info_extarcted->rv1 = rv1; - pdci_info_extarcted->rv2 = rv2; - pdci_info_extarcted->ndi1 = ndi1; - pdci_info_extarcted->ndi2 = ndi2; - pdci_info_extarcted->harq_pid = harq_pid; - pdci_info_extarcted->tb_swap = tbswap; - pdci_info_extarcted->TPC = TPC; - pdci_info_extarcted->tpmi = tpmi; -} - -int check_dci_format1_1a_coherency(DCI_format_t dci_format, - uint8_t N_RB_DL, - uint16_t rnti, - uint16_t tc_rnti, - uint16_t si_rnti, - uint16_t ra_rnti, - uint16_t p_rnti, - uint32_t frame, - uint8_t nr_tti_rx, - DCI_INFO_EXTRACTED_t *pdci_info_extarcted, - NR_DL_UE_HARQ_t *pdlsch0_harq) -{ - 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 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; - -#ifdef DEBUG_DCI - LOG_I(PHY,"[DCI-FORMAT-1-1A] AbsSubframe %d.%d dci_format %d\n", frame, nr_tti_rx, 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 - - - // I- check dci content minimum coherency - if( ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti)) && harq_pid > 0) - { - return(0); - } - - if(harq_pid>=8) - { - LOG_I(PHY,"bad harq id \n"); - return(0); - } - - if(dci_format == format1 && ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti)) ) - { - LOG_I(PHY,"bad dci format \n"); - return(0); - } - - - if( mcs1 > 28) - { - if(pdlsch0_harq->round == 0) - { - LOG_I(PHY,"bad dci mcs + round \n"); - return(0); - } - - if((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti)) - { - LOG_I(PHY,"bad dci mcs + rnti \n"); - return(0); - } - } - - if ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti)) - { - NPRB = (TPC&1) + 2; - switch (N_RB_DL) { - case 6: - RIV_max = RIV_max6; - break; - case 25: - RIV_max = RIV_max25; - break; - case 50: - RIV_max = RIV_max50; - break; - case 100: - RIV_max = RIV_max100; - break; - } - } - /*else - { - switch (N_RB_DL) { - case 6: - NPRB = RIV2nb_rb_LUT6[rballoc];//NPRB; - if(rah) - RIV_max = RIV_max6; - else - RIV_max = 0x3F; - break; - case 25: - NPRB = RIV2nb_rb_LUT25[rballoc];//NPRB; - if(rah) - RIV_max = RIV_max25; - else - RIV_max = 0x1FFF; - break; - case 50: - NPRB = RIV2nb_rb_LUT50[rballoc];//NPRB; - if(rah) - RIV_max = RIV_max50; - else - RIV_max = 0x1FFFF; - break; - case 100: - NPRB = RIV2nb_rb_LUT100[rballoc];//NPRB; - if(rah) - RIV_max = RIV_max100; - else - RIV_max = 0x1FFFFFF; - break; - } - }*/ - - - if(dci_format == format1) - { - NPRB = conv_nprb(rah, rballoc, N_RB_DL); - } - - /* - if(rballoc > RIV_max) - { - LOG_I(PHY,"bad dci rballoc rballoc %d RIV_max %lld \n",rballoc, RIV_max); - // DCI false detection - return(0); - } - */ - - if(NPRB == 0) - { - // DCI false detection - LOG_I(PHY,"bad NPRB = 0 \n"); - return(0); - } - - // this a retransmission - if(pdlsch0_harq->round>0) - { - // compare old TBS to new TBS - if((mcs1<29) && (pdlsch0_harq->TBS != TBStable[get_I_TBS(mcs1)][NPRB-1])) - { - // this is an eNB issue - // retransmisison but old and new TBS are different !!! - // work around, consider it as a new transmission - LOG_E(PHY,"Format1A Retransmission but TBS are different: consider it as new transmission !!! \n"); - pdlsch0_harq->round = 0; - //return(0); // ?? to cross check - } - } - - return(1); -} - -int check_dci_format1c_coherency(uint8_t N_RB_DL, - DCI_INFO_EXTRACTED_t *pdci_info_extarcted, - uint16_t rnti, - uint16_t si_rnti, - uint16_t ra_rnti, - uint16_t p_rnti, - NR_DL_UE_HARQ_t *pdlsch0_harq) -{ - uint32_t rballoc = pdci_info_extarcted->rballoc; - - uint8_t NPRB = 0; - uint32_t RIV_max = 0; - - // I- check dci content minimum coherency - - if((rnti!=si_rnti) && (rnti!=p_rnti) && (rnti!=ra_rnti)) - return(0); - - switch (N_RB_DL) { - case 6: - NPRB = RIV2nb_rb_LUT6[rballoc];//NPRB; - RIV_max = RIV_max6; - break; - case 25: - NPRB = RIV2nb_rb_LUT25[rballoc];//NPRB; - RIV_max = RIV_max25; - break; - case 50: - NPRB = RIV2nb_rb_LUT50[rballoc];//NPRB; - RIV_max = RIV_max50; - break; - case 100: - NPRB = RIV2nb_rb_LUT100[rballoc];//NPRB; - RIV_max = RIV_max100; - break; - } - - if(rballoc > RIV_max) - { - // DCI false detection - return(0); - } - - if(NPRB == 0) - { - // DCI false detection - return(0); - } - - return(1); -} - -int check_dci_format2_2a_coherency(DCI_format_t dci_format, - uint8_t N_RB_DL, - DCI_INFO_EXTRACTED_t *pdci_info_extarcted, - uint16_t rnti, - uint16_t si_rnti, - uint16_t ra_rnti, - uint16_t p_rnti, - NR_DL_UE_HARQ_t *pdlsch0_harq, - NR_DL_UE_HARQ_t *pdlsch1_harq) -{ - uint8_t rah = pdci_info_extarcted->rah; - uint8_t mcs1 = pdci_info_extarcted->mcs1; - uint8_t mcs2 = pdci_info_extarcted->mcs2; - uint8_t rv1 = pdci_info_extarcted->rv1; - 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); - 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 - rballoc %x \n", rballoc); - 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 - - // I- check dci content minimum coherency - if(harq_pid>=8) - { - LOG_I(PHY,"bad harq pid\n"); - return(0); - } - - if( (rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti) ) - { - LOG_I(PHY,"bad rnti\n"); - return(0); - } - - - if( mcs1 > 28) - { - if(pdlsch0_harq->round == 0) - { - LOG_I(PHY,"bad mcs1\n"); - return(0); - } - } - - if( mcs2 > 28) - { - if(pdlsch1_harq->round == 0) - { - LOG_I(PHY,"bad mcs2\n"); - return(0); - } - - } - - - if((pdlsch0_harq->round == 0) && (rv1 > 0) && (mcs1 != 0)) - { - // DCI false detection - LOG_I(PHY,"bad rv1\n"); - return(0); - } - - if((pdlsch1_harq->round == 0) && (rv2 > 0) && (mcs2 != 0)) - { - // DCI false detection - LOG_I(PHY,"bad rv2\n"); - return(0); - } - - - switch (N_RB_DL) { - case 6: - if (rah == 0) - { - //RBG = 1; - RIV_max = 0x3F; - } - else - { - RIV_max = RIV_max6; - } - break; - case 25: - if (rah == 0) - { - //RBG = 2; - RIV_max = 0x1FFF; - } - else - { - RIV_max = RIV_max25; - } - break; - case 50: - if (rah == 0) - { - //RBG = 3; - RIV_max = 0x1FFFF; - } - else - { - RIV_max = RIV_max50; - } - break; - case 100: - if (rah == 0) - { - //RBG = 4; - RIV_max = 0x1FFFFFF; - } - else - { - RIV_max = RIV_max100; - } - break; - } - - NPRB = conv_nprb(rah, - rballoc, - N_RB_DL); - - - - if( (rballoc > RIV_max) && (rah == 1) ) - { - // DCI false detection - LOG_I(PHY,"bad rballoc %d RIV_max %lld\n", rballoc, RIV_max); - return(0); - } - - if(NPRB == 0) - { - // DCI false detection - LOG_I(PHY,"bad NPRB\n"); - return(0); - } - - return(1); -} - -void compute_llr_offset(NR_DL_FRAME_PARMS *frame_parms, - NR_UE_PDCCH *pdcch_vars, - NR_UE_PDSCH *pdsch_vars, - NR_DL_UE_HARQ_t *dlsch0_harq, - uint8_t nb_rb_alloc, - uint8_t nr_tti_rx) -{ - uint32_t pbch_pss_sss_re; - uint32_t crs_re; - uint32_t granted_re; - uint32_t data_re; - uint32_t llr_offset; - uint8_t symbol; - uint8_t symbol_mod; - - pdsch_vars->llr_offset[pdcch_vars->num_pdcch_symbols] = 0; - - //LOG_I(PHY,"compute_llr_offset: nb RB %d - Qm %d \n", nb_rb_alloc, dlsch0_harq->Qm); - - //dlsch0_harq->rb_alloc_even; - //dlsch0_harq->rb_alloc_odd; - - for(symbol=pdcch_vars->num_pdcch_symbols; symbolsymbols_per_tti; symbol++) - { - symbol_mod = (symbol >= (7-frame_parms->Ncp))? (symbol-(7-frame_parms->Ncp)) : symbol; - if((symbol_mod == 0) || symbol_mod == (4-frame_parms->Ncp)) - { - if (frame_parms->mode1_flag==0) - crs_re = 4; - else - crs_re = 2; - } - else - { - crs_re = 0; - } - - granted_re = nb_rb_alloc * (12-crs_re); - pbch_pss_sss_re = adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,dlsch0_harq->Qm,nr_tti_rx,symbol); - pbch_pss_sss_re = (double)pbch_pss_sss_re * ((double)(12-crs_re)/12); - data_re = granted_re - pbch_pss_sss_re; - llr_offset = data_re * dlsch0_harq->Qm * 2; - - pdsch_vars->llr_length[symbol] = data_re; - if(symbol < (frame_parms->symbols_per_tti-1)) - pdsch_vars->llr_offset[symbol+1] = pdsch_vars->llr_offset[symbol] + llr_offset; - - //LOG_I(PHY,"Granted Re nr_tti_rx %d / symbol %d => %d (%d RBs)\n", nr_tti_rx, symbol_mod, granted_re,dlsch0_harq->nb_rb); - //LOG_I(PHY,"Pbch/PSS/SSS Re nr_tti_rx %d / symbol %d => %d \n", nr_tti_rx, symbol_mod, pbch_pss_sss_re); - //LOG_I(PHY,"CRS Re Per PRB nr_tti_rx %d / symbol %d => %d \n", nr_tti_rx, symbol_mod, crs_re); - //LOG_I(PHY,"Data Re nr_tti_rx %d / symbol %d => %d \n", nr_tti_rx, symbol_mod, data_re); - - - - //LOG_I(PHY,"Data Re nr_tti_rx %d-symbol %d => llr length %d, llr offset %d \n", nr_tti_rx, symbol, - // pdsch_vars->llr_length[symbol], pdsch_vars->llr_offset[symbol]); - } -} -void prepare_dl_decoding_format1_1A(DCI_format_t dci_format, - uint8_t N_RB_DL, - DCI_INFO_EXTRACTED_t *pdci_info_extarcted, - NR_DL_FRAME_PARMS *frame_parms, - NR_UE_PDCCH *pdcch_vars, - NR_UE_PDSCH *pdsch_vars, - uint8_t nr_tti_rx, - uint16_t rnti, - uint16_t tc_rnti, - uint16_t si_rnti, - uint16_t ra_rnti, - uint16_t p_rnti, - NR_DL_UE_HARQ_t *pdlsch0_harq, - NR_UE_DLSCH_t *pdlsch0) -{ - - uint8_t harq_pid = pdci_info_extarcted->harq_pid; - uint8_t vrb_type = pdci_info_extarcted->vrb_type; - 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; - uint8_t dai = pdci_info_extarcted->dai; - - uint8_t NPRB = 0; - uint8_t nb_rb_alloc = 0; - - if(dci_format == format1A) - { - if ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti)) - { - NPRB = (TPC&1) + 2; - switch (N_RB_DL) { - case 6: - nb_rb_alloc = RIV2nb_rb_LUT6[rballoc];//NPRB; - break; - case 25: - nb_rb_alloc = RIV2nb_rb_LUT25[rballoc];//NPRB; - break; - case 50: - nb_rb_alloc = RIV2nb_rb_LUT50[rballoc];//NPRB; - break; - case 100: - nb_rb_alloc = RIV2nb_rb_LUT100[rballoc];//NPRB; - break; - } - } - else - { - switch (N_RB_DL) { - case 6: - NPRB = RIV2nb_rb_LUT6[rballoc];//NPRB; - break; - case 25: - NPRB = RIV2nb_rb_LUT25[rballoc];//NPRB; - break; - case 50: - NPRB = RIV2nb_rb_LUT50[rballoc];//NPRB; - break; - case 100: - NPRB = RIV2nb_rb_LUT100[rballoc];//NPRB; - break; - } - nb_rb_alloc = NPRB; - } - } - else // format1 - { - NPRB = conv_nprb(rah, rballoc, N_RB_DL); - nb_rb_alloc = NPRB; - } - - pdlsch0->current_harq_pid = harq_pid; - pdlsch0->active = 1; - pdlsch0->rnti = rnti; - if(dci_format == format1A) - pdlsch0->harq_ack[nr_tti_rx].vDAI_DL = dai+1; - - if ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti)) - { - pdlsch0_harq->round = 0; - pdlsch0_harq->status = ACTIVE; - } - 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); - } - - // NDI has been toggled or this is the first transmission - if ((ndi1!=pdlsch0_harq->DCINdi) || (pdlsch0_harq->first_tx==1)) - { - pdlsch0_harq->round = 0; - pdlsch0_harq->first_tx = 0; - pdlsch0_harq->status = ACTIVE; - - }else if (rv1 != 0 ) - //NDI has not been toggled but rv was increased by eNB: retransmission - { - if (pdlsch0_harq->status == SCH_IDLE) - //packet was actually decoded in previous transmission (ACK was missed by eNB) - //However, the round is not a good check as it might have been decoded in a retransmission prior to this one. - { - LOG_D(PHY,"skip pdsch decoding and report ack\n"); - // skip pdsch decoding and report ack - //pdlsch0_harq->status = SCH_IDLE; - pdlsch0->active = 0; - pdlsch0->harq_ack[nr_tti_rx].ack = 1; - pdlsch0->harq_ack[nr_tti_rx].harq_id = harq_pid; - pdlsch0->harq_ack[nr_tti_rx].send_harq_status = 1; - - //pdlsch0_harq->first_tx = 0; - } - else //normal retransmission - { - // nothing special to do - } - } - else - { - pdlsch0_harq->status = ACTIVE; - } - } - - pdlsch0_harq->DCINdi = ndi1; - pdlsch0_harq->mcs = mcs1; - pdlsch0_harq->rvidx = rv1; - pdlsch0_harq->nb_rb = NPRB; - - pdlsch0_harq->codeword = 0; - pdlsch0_harq->Nl = 1; - pdlsch0_harq->mimo_mode = frame_parms->mode1_flag == 1 ?SISO : ALAMOUTI; - pdlsch0_harq->dl_power_off = 1; //no power offset - pdlsch0_harq->delta_PUCCH = nr_delta_PUCCH_lut[TPC &3]; - - // compute resource allocation - if(dci_format == format1A) - { - switch (N_RB_DL) { - case 6: - if (vrb_type == LOCALIZED) { - pdlsch0_harq->rb_alloc_even[0] = localRIV2alloc_LUT6[rballoc]; - pdlsch0_harq->rb_alloc_odd[0] = localRIV2alloc_LUT6[rballoc]; - } - else { - pdlsch0_harq->rb_alloc_even[0] = distRIV2alloc_even_LUT6[rballoc]; - pdlsch0_harq->rb_alloc_odd[0] = distRIV2alloc_odd_LUT6[rballoc]; - } - break; - - case 25: - if (vrb_type == LOCALIZED) { - pdlsch0_harq->rb_alloc_even[0] = localRIV2alloc_LUT25[rballoc]; - pdlsch0_harq->rb_alloc_odd[0] = localRIV2alloc_LUT25[rballoc]; - } - else { - pdlsch0_harq->rb_alloc_even[0] = distRIV2alloc_even_LUT25[rballoc]; - pdlsch0_harq->rb_alloc_odd[0] = distRIV2alloc_odd_LUT25[rballoc]; - } - break; - - case 50: - if (vrb_type == LOCALIZED) { - pdlsch0_harq->rb_alloc_even[0] = localRIV2alloc_LUT50_0[rballoc]; - pdlsch0_harq->rb_alloc_even[1] = localRIV2alloc_LUT50_1[rballoc]; - pdlsch0_harq->rb_alloc_odd[0] = localRIV2alloc_LUT50_0[rballoc]; - pdlsch0_harq->rb_alloc_odd[1] = localRIV2alloc_LUT50_1[rballoc]; - // printf("rballoc: %08x.%08x\n",pdlsch0_harq->rb_alloc_even[0],pdlsch0_harq->rb_alloc_even[1]); - } else { // DISTRIBUTED - if ((rballoc&(1<<10)) == 0) { - rballoc = rballoc&(~(1<<10)); - pdlsch0_harq->rb_alloc_even[0] = distRIV2alloc_gap0_even_LUT50_0[rballoc]; - pdlsch0_harq->rb_alloc_even[1] = distRIV2alloc_gap0_even_LUT50_1[rballoc]; - pdlsch0_harq->rb_alloc_odd[0] = distRIV2alloc_gap0_odd_LUT50_0[rballoc]; - pdlsch0_harq->rb_alloc_odd[1] = distRIV2alloc_gap0_odd_LUT50_1[rballoc]; - } - else { - rballoc = rballoc&(~(1<<10)); - pdlsch0_harq->rb_alloc_even[0] = distRIV2alloc_gap0_even_LUT50_0[rballoc]; - pdlsch0_harq->rb_alloc_even[1] = distRIV2alloc_gap0_even_LUT50_1[rballoc]; - pdlsch0_harq->rb_alloc_odd[0] = distRIV2alloc_gap0_odd_LUT50_0[rballoc]; - pdlsch0_harq->rb_alloc_odd[1] = distRIV2alloc_gap0_odd_LUT50_1[rballoc]; - } - } - break; - - case 100: - if (vrb_type == LOCALIZED) { - pdlsch0_harq->rb_alloc_even[0] = localRIV2alloc_LUT100_0[rballoc]; - pdlsch0_harq->rb_alloc_even[1] = localRIV2alloc_LUT100_1[rballoc]; - pdlsch0_harq->rb_alloc_even[2] = localRIV2alloc_LUT100_2[rballoc]; - pdlsch0_harq->rb_alloc_even[3] = localRIV2alloc_LUT100_3[rballoc]; - pdlsch0_harq->rb_alloc_odd[0] = localRIV2alloc_LUT100_0[rballoc]; - pdlsch0_harq->rb_alloc_odd[1] = localRIV2alloc_LUT100_1[rballoc]; - pdlsch0_harq->rb_alloc_odd[2] = localRIV2alloc_LUT100_2[rballoc]; - pdlsch0_harq->rb_alloc_odd[3] = localRIV2alloc_LUT100_3[rballoc]; - } else { - if ((rballoc&(1<<10)) == 0) { //Gap 1 - rballoc = rballoc&(~(1<<12)); - pdlsch0_harq->rb_alloc_even[0] = distRIV2alloc_gap0_even_LUT100_0[rballoc]; - pdlsch0_harq->rb_alloc_even[1] = distRIV2alloc_gap0_even_LUT100_1[rballoc]; - pdlsch0_harq->rb_alloc_even[2] = distRIV2alloc_gap0_even_LUT100_2[rballoc]; - pdlsch0_harq->rb_alloc_even[3] = distRIV2alloc_gap0_even_LUT100_3[rballoc]; - pdlsch0_harq->rb_alloc_odd[0] = distRIV2alloc_gap0_odd_LUT100_0[rballoc]; - pdlsch0_harq->rb_alloc_odd[1] = distRIV2alloc_gap0_odd_LUT100_1[rballoc]; - pdlsch0_harq->rb_alloc_odd[2] = distRIV2alloc_gap0_odd_LUT100_2[rballoc]; - pdlsch0_harq->rb_alloc_odd[3] = distRIV2alloc_gap0_odd_LUT100_3[rballoc]; - } - else { //Gap 2 - rballoc = rballoc&(~(1<<12)); - pdlsch0_harq->rb_alloc_even[0] = distRIV2alloc_gap1_even_LUT100_0[rballoc]; - pdlsch0_harq->rb_alloc_even[1] = distRIV2alloc_gap1_even_LUT100_1[rballoc]; - pdlsch0_harq->rb_alloc_even[2] = distRIV2alloc_gap1_even_LUT100_2[rballoc]; - pdlsch0_harq->rb_alloc_even[3] = distRIV2alloc_gap1_even_LUT100_3[rballoc]; - pdlsch0_harq->rb_alloc_odd[0] = distRIV2alloc_gap1_odd_LUT100_0[rballoc]; - pdlsch0_harq->rb_alloc_odd[1] = distRIV2alloc_gap1_odd_LUT100_1[rballoc]; - pdlsch0_harq->rb_alloc_odd[2] = distRIV2alloc_gap1_odd_LUT100_2[rballoc]; - pdlsch0_harq->rb_alloc_odd[3] = distRIV2alloc_gap1_odd_LUT100_3[rballoc]; - } - } - break; - } - } - else // format1 - { - conv_rballoc(rah,rballoc,frame_parms->N_RB_DL,pdlsch0_harq->rb_alloc_even); - pdlsch0_harq->rb_alloc_odd[0]= pdlsch0_harq->rb_alloc_even[0]; - pdlsch0_harq->rb_alloc_odd[1]= pdlsch0_harq->rb_alloc_even[1]; - pdlsch0_harq->rb_alloc_odd[2]= pdlsch0_harq->rb_alloc_even[2]; - pdlsch0_harq->rb_alloc_odd[3]= pdlsch0_harq->rb_alloc_even[3]; - } - if ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti)) - { - pdlsch0_harq->TBS = TBStable[mcs1][NPRB-1]; - pdlsch0_harq->Qm = 2; - } - else - { - if(mcs1 < 29) - { - pdlsch0_harq->TBS = TBStable[get_I_TBS(mcs1)][NPRB-1]; - pdlsch0_harq->Qm = get_Qm(mcs1); - } - } - - compute_llr_offset(frame_parms, - pdcch_vars, - pdsch_vars, - pdlsch0_harq, - nb_rb_alloc, - nr_tti_rx); -} - -void prepare_dl_decoding_format1C(uint8_t N_RB_DL, - DCI_INFO_EXTRACTED_t *pdci_info_extarcted, - NR_DL_FRAME_PARMS *frame_parms, - NR_UE_PDCCH *pdcch_vars, - NR_UE_PDSCH *pdsch_vars, - uint32_t rnti, - uint32_t si_rnti, - uint32_t ra_rnti, - uint32_t p_rnti, - uint32_t frame, - uint8_t nr_tti_rx, - NR_DL_UE_HARQ_t *pdlsch0_harq, - NR_UE_DLSCH_t *pdlsch0) -{ - - 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 Ngap = pdci_info_extarcted->Ngap; - - pdlsch0_harq->round = 0; - pdlsch0_harq->first_tx = 1; - pdlsch0_harq->vrb_type = DISTRIBUTED; - - if (rnti==si_rnti) { // rule from Section 5.3.1 of 36.321 - if (((frame&1) == 0) && (nr_tti_rx == 5)) - pdlsch0_harq->rvidx = (((3*((frame>>1)&3))+1)>>1)&3; // SIB1 - else - pdlsch0_harq->rvidx = (((3*(nr_tti_rx&3))+1)>>1)&3; // other SIBs - } - else if ((rnti==p_rnti) || (rnti==ra_rnti)) { // Section 7.1.7.3 - pdlsch0_harq->rvidx = 0; - } - - - pdlsch0_harq->Nl = 1; - pdlsch0_harq->mimo_mode = frame_parms->mode1_flag == 1 ?SISO : ALAMOUTI; - pdlsch0_harq->dl_power_off = 1; //no power offset - - pdlsch0_harq->codeword = 0; - pdlsch0_harq->mcs = mcs1; - pdlsch0_harq->TBS = TBStable1C[mcs1]; - pdlsch0_harq->Qm = 2; - - - pdlsch0->current_harq_pid = harq_pid; - pdlsch0->active = 1; - pdlsch0->rnti = rnti; - - switch (N_RB_DL) { - case 6: - pdlsch0_harq->nb_rb = RIV2nb_rb_LUT6[rballoc]; - pdlsch0_harq->rb_alloc_even[0] = distRIV2alloc_even_LUT6[rballoc]; - pdlsch0_harq->rb_alloc_odd[0] = distRIV2alloc_odd_LUT6[rballoc]; - - break; - - case 25: - pdlsch0_harq->nb_rb = RIV2nb_rb_LUT25[rballoc]; - pdlsch0_harq->rb_alloc_even[0] = distRIV2alloc_even_LUT25[rballoc]; - pdlsch0_harq->rb_alloc_odd[0] = distRIV2alloc_odd_LUT25[rballoc]; - break; - - case 50: - pdlsch0_harq->nb_rb = RIV2nb_rb_LUT50[rballoc]; - if (Ngap == 0) { - pdlsch0_harq->rb_alloc_even[0] = distRIV2alloc_gap0_even_LUT50_0[rballoc]; - pdlsch0_harq->rb_alloc_odd[0] = distRIV2alloc_gap0_odd_LUT50_0[rballoc]; - pdlsch0_harq->rb_alloc_even[1] = distRIV2alloc_gap0_even_LUT50_1[rballoc]; - pdlsch0_harq->rb_alloc_odd[1] = distRIV2alloc_gap0_odd_LUT50_1[rballoc]; - } - else { - pdlsch0_harq->rb_alloc_even[0] = distRIV2alloc_gap1_even_LUT50_0[rballoc]; - pdlsch0_harq->rb_alloc_odd[0] = distRIV2alloc_gap1_odd_LUT50_0[rballoc]; - pdlsch0_harq->rb_alloc_even[1] = distRIV2alloc_gap1_even_LUT50_1[rballoc]; - pdlsch0_harq->rb_alloc_odd[1] = distRIV2alloc_gap1_odd_LUT50_1[rballoc]; - } - break; - - case 100: - pdlsch0_harq->nb_rb = RIV2nb_rb_LUT100[rballoc]; - if (Ngap==0) { - pdlsch0_harq->rb_alloc_even[0] = distRIV2alloc_gap0_even_LUT100_0[rballoc]; - pdlsch0_harq->rb_alloc_odd[0] = distRIV2alloc_gap0_odd_LUT100_0[rballoc]; - pdlsch0_harq->rb_alloc_even[1] = distRIV2alloc_gap0_even_LUT100_1[rballoc]; - pdlsch0_harq->rb_alloc_odd[1] = distRIV2alloc_gap0_odd_LUT100_1[rballoc]; - pdlsch0_harq->rb_alloc_even[2] = distRIV2alloc_gap0_even_LUT100_2[rballoc]; - pdlsch0_harq->rb_alloc_odd[2] = distRIV2alloc_gap0_odd_LUT100_2[rballoc]; - pdlsch0_harq->rb_alloc_even[3] = distRIV2alloc_gap0_even_LUT100_3[rballoc]; - pdlsch0_harq->rb_alloc_odd[3] = distRIV2alloc_gap0_odd_LUT100_3[rballoc]; - } - else { - pdlsch0_harq->rb_alloc_even[0] = distRIV2alloc_gap1_even_LUT100_0[rballoc]; - pdlsch0_harq->rb_alloc_odd[0] = distRIV2alloc_gap1_odd_LUT100_0[rballoc]; - pdlsch0_harq->rb_alloc_even[1] = distRIV2alloc_gap1_even_LUT100_1[rballoc]; - pdlsch0_harq->rb_alloc_odd[1] = distRIV2alloc_gap1_odd_LUT100_1[rballoc]; - pdlsch0_harq->rb_alloc_even[2] = distRIV2alloc_gap1_even_LUT100_2[rballoc]; - pdlsch0_harq->rb_alloc_odd[2] = distRIV2alloc_gap1_odd_LUT100_2[rballoc]; - pdlsch0_harq->rb_alloc_even[3] = distRIV2alloc_gap1_even_LUT100_3[rballoc]; - pdlsch0_harq->rb_alloc_odd[3] = distRIV2alloc_gap1_odd_LUT100_3[rballoc]; - } - break; - - default: - AssertFatal(0,"Format 1C: Unknown N_RB_DL %d\n",frame_parms->N_RB_DL); - break; - } - - compute_llr_offset(frame_parms, - pdcch_vars, - pdsch_vars, - pdlsch0_harq, - pdlsch0_harq->nb_rb, - nr_tti_rx); - -} - -void compute_precoding_info_2cw(uint8_t tpmi, uint8_t tbswap, uint16_t pmi_alloc, NR_DL_FRAME_PARMS *frame_parms, NR_DL_UE_HARQ_t *dlsch0_harq, NR_DL_UE_HARQ_t *dlsch1_harq) -{ - -switch (tpmi) { - case 0: - dlsch0_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODING1; - dlsch1_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODING1; - dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,0, 1); - dlsch1_harq->pmi_alloc = pmi_extend(frame_parms,0, 1); - break; - case 1: - dlsch0_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODINGj; - dlsch1_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODINGj; - dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,1, 1); - dlsch1_harq->pmi_alloc = pmi_extend(frame_parms,1, 1); - break; - case 2: // PUSCH precoding - dlsch0_harq->mimo_mode = DUALSTREAM_PUSCH_PRECODING; - dlsch1_harq->mimo_mode = DUALSTREAM_PUSCH_PRECODING; - if (tbswap==0){ - dlsch0_harq->pmi_alloc = pmi_alloc; - dlsch1_harq->pmi_alloc = pmi_alloc^0x1555; - } else { - dlsch1_harq->pmi_alloc = pmi_alloc; - dlsch0_harq->pmi_alloc = pmi_alloc^0x1555; - } -#ifdef DEBUG_HARQ - printf ("\n \n compute_precoding_info_2cw pmi_alloc_new = %d\n", dlsch0_harq->pmi_alloc); - #endif - break; - default: - break; - } -} - -void compute_precoding_info_1cw(uint8_t tpmi, uint16_t pmi_alloc, NR_DL_FRAME_PARMS *frame_parms, NR_DL_UE_HARQ_t *dlsch_harq) -{ - -switch (tpmi) { - case 0 : - dlsch_harq->mimo_mode = ALAMOUTI; - break; - case 1: - dlsch_harq->mimo_mode = UNIFORM_PRECODING11; - dlsch_harq->pmi_alloc = pmi_extend(frame_parms,0, 0); - break; - case 2: - dlsch_harq->mimo_mode = UNIFORM_PRECODING1m1; - dlsch_harq->pmi_alloc = pmi_extend(frame_parms,1, 0); - break; - case 3: - dlsch_harq->mimo_mode = UNIFORM_PRECODING1j; - dlsch_harq->pmi_alloc = pmi_extend(frame_parms,2, 0); - break; - case 4: - dlsch_harq->mimo_mode = UNIFORM_PRECODING1mj; - dlsch_harq->pmi_alloc = pmi_extend(frame_parms,3, 0); - break; - case 5: - dlsch_harq->mimo_mode = PUSCH_PRECODING0; - dlsch_harq->pmi_alloc = pmi_alloc;//pmi_convert(frame_parms,dlsch0->pmi_alloc,0); - break; - case 6: - dlsch_harq->mimo_mode = PUSCH_PRECODING1; - dlsch_harq->pmi_alloc = pmi_alloc;//pmi_convert(frame_parms,dlsch0->pmi_alloc,1); - break; - } - #ifdef DEBUG_HARQ - printf ("[DCI UE] I am calling from the UE side pmi_alloc_new = %d with tpmi %d\n", dlsch_harq->pmi_alloc, tpmi); - #endif - } - -void compute_precoding_info_format2A(uint8_t tpmi, - uint8_t nb_antenna_ports_eNB, - uint8_t tb0_active, - uint8_t tb1_active, - NR_DL_UE_HARQ_t *dlsch0_harq, - NR_DL_UE_HARQ_t *dlsch1_harq) -{ - - dlsch0_harq->dl_power_off = 0; - dlsch1_harq->dl_power_off = 0; - - if (nb_antenna_ports_eNB == 2) { - if ((tb0_active==1) && (tb1_active==1)) { - dlsch0_harq->mimo_mode = LARGE_CDD; - dlsch1_harq->mimo_mode = LARGE_CDD; - dlsch0_harq->dl_power_off = 1; - dlsch1_harq->dl_power_off = 1; - } else { - dlsch0_harq->mimo_mode = ALAMOUTI; - dlsch1_harq->mimo_mode = ALAMOUTI; - } - } else if (nb_antenna_ports_eNB == 4) { // 4 antenna case - if ((tb0_active==1) && (tb1_active==1)) { - switch (tpmi) { - case 0: // one layer per transport block - dlsch0_harq->mimo_mode = LARGE_CDD; - dlsch1_harq->mimo_mode = LARGE_CDD; - dlsch0_harq->dl_power_off = 1; - dlsch1_harq->dl_power_off = 1; - break; - - case 1: // one-layers on TB 0, two on TB 1 - dlsch0_harq->mimo_mode = LARGE_CDD; - dlsch1_harq->mimo_mode = LARGE_CDD; - dlsch1_harq->Nl = 2; - dlsch0_harq->dl_power_off = 1; - dlsch1_harq->dl_power_off = 1; - break; - - case 2: // two-layers on TB 0, two on TB 1 - dlsch0_harq->mimo_mode = LARGE_CDD; - dlsch1_harq->mimo_mode = LARGE_CDD; - dlsch0_harq->Nl = 2; - dlsch0_harq->dl_power_off = 1; - dlsch1_harq->dl_power_off = 1; - break; - - case 3: // - LOG_E(PHY,"Illegal value (3) for TPMI in Format 2A DCI\n"); - break; - } - } else if (tb0_active == 1) { - switch (tpmi) { - case 0: // one layer per transport block - dlsch0_harq->mimo_mode = ALAMOUTI; - dlsch1_harq->mimo_mode = ALAMOUTI; - break; - - case 1: // two-layers on TB 0 - dlsch0_harq->mimo_mode = LARGE_CDD; - dlsch0_harq->Nl = 2; - dlsch0_harq->dl_power_off = 1; - break; - - case 2: // two-layers on TB 0, two on TB 1 - case 3: // - LOG_E(PHY,"Illegal value %d for TPMI in Format 2A DCI with one transport block enabled\n",tpmi); - break; - } - } else if (tb1_active == 1) { - switch (tpmi) { - case 0: // one layer per transport block - dlsch0_harq->mimo_mode = ALAMOUTI; - dlsch1_harq->mimo_mode = ALAMOUTI; - break; - - case 1: // two-layers on TB 0 - dlsch1_harq->mimo_mode = LARGE_CDD; - dlsch1_harq->Nl = 2; - dlsch0_harq->dl_power_off = 1; - break; - - case 2: // two-layers on TB 0, two on TB 1 - case 3: // - LOG_E(PHY,"Illegal value %d for TPMI in Format 2A DCI with one transport block enabled\n",tpmi); - break; - } - } - } - // printf("Format 2A: NPRB=%d (rballoc %x,mcs1 %d, mcs2 %d, frame_type %d N_RB_DL %d,active %d/%d)\n",NPRB,rballoc,mcs1,mcs2,frame_parms->frame_type,frame_parms->N_RB_DL,dlsch0->active,dlsch1->active); - //printf("UE (%x/%d): nr_tti_rx %d Format2A DCI: ndi1 %d, old_ndi1 %d, ndi2 %d, old_ndi2 %d (first tx1 %d, first tx2 %d) harq_status1 %d, harq_status2 %d\n",dlsch0->rnti,harq_pid,nr_tti_rx,ndi,dlsch0_harq->DCINdi, - // dlsch0_harq->first_tx,dlsch1_harq->first_tx,dlsch0_harq->status,dlsch1_harq->status); - //printf("TBS0 %d, TBS1 %d\n",dlsch0_harq->TBS,dlsch1_harq->TBS); - -} - -void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, - DCI_INFO_EXTRACTED_t *pdci_info_extarcted, - NR_DL_FRAME_PARMS *frame_parms, - NR_UE_PDCCH *pdcch_vars, - NR_UE_PDSCH *pdsch_vars, - uint16_t rnti, - uint8_t nr_tti_rx, - NR_DL_UE_HARQ_t *dlsch0_harq, - NR_DL_UE_HARQ_t *dlsch1_harq, - NR_UE_DLSCH_t *pdlsch0, - NR_UE_DLSCH_t *pdlsch1) -{ - - uint8_t rah = pdci_info_extarcted->rah; - uint8_t mcs1 = pdci_info_extarcted->mcs1; - uint8_t mcs2 = pdci_info_extarcted->mcs2; - uint8_t rv1 = pdci_info_extarcted->rv1; - uint8_t rv2 = pdci_info_extarcted->rv2; - uint8_t harq_pid = pdci_info_extarcted->harq_pid; - uint32_t rballoc = pdci_info_extarcted->rballoc; - uint8_t tbswap = pdci_info_extarcted->tb_swap; - uint8_t tpmi = pdci_info_extarcted->tpmi; - uint8_t TPC = pdci_info_extarcted->TPC; - uint8_t ndi1 = pdci_info_extarcted->ndi1; - uint8_t ndi2 = pdci_info_extarcted->ndi2; - - uint8_t TB0_active = 1; - uint8_t TB1_active = 1; - - // printf("inside prepare pdlsch1->pmi_alloc %d \n",pdlsch1->pmi_alloc); - - - if ((rv1 == 1) && (mcs1 == 0)) { - TB0_active=0; - } - if ((rv2 == 1) && (mcs2 == 0)) { - TB1_active=0; - } - -#ifdef DEBUG_HARQ - printf("[DCI UE]: TB0 status %d , TB1 status %d\n", TB0_active, TB1_active); -#endif - - dlsch0_harq->mcs = mcs1; - dlsch1_harq->mcs = mcs2; - dlsch0_harq->rvidx = rv1; - dlsch1_harq->rvidx = rv2; - dlsch0_harq->DCINdi = ndi1; - dlsch1_harq->DCINdi = ndi2; - - dlsch0_harq->codeword = 0; - dlsch1_harq->codeword = 1; - dlsch0_harq->Nl = 1; - dlsch1_harq->Nl = 1; - dlsch0_harq->delta_PUCCH = nr_delta_PUCCH_lut[TPC&3]; - dlsch1_harq->delta_PUCCH = nr_delta_PUCCH_lut[TPC&3]; - dlsch0_harq->dl_power_off = 1; - dlsch1_harq->dl_power_off = 1; - - pdlsch0->current_harq_pid = harq_pid; - pdlsch0->harq_ack[nr_tti_rx].harq_id = harq_pid; - pdlsch1->current_harq_pid = harq_pid; - pdlsch1->harq_ack[nr_tti_rx].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) { - dlsch0_harq->codeword = 1; - dlsch1_harq->codeword = 0; - } - - - if (!TB0_active && TB1_active){ - dlsch1_harq->codeword = 0; - } - - if (TB0_active && !TB1_active){ - dlsch0_harq->codeword = 0; - } - - - if (TB0_active==0) { - dlsch0_harq->status = SCH_IDLE; - pdlsch0->active = 0; - #ifdef DEBUG_HARQ - printf("[DCI UE]: TB0 is deactivated, retransmit TB1 transmit in TM6\n"); - #endif - } - - if (TB1_active==0) { - dlsch1_harq->status = SCH_IDLE; - pdlsch1->active = 0; - } - -#ifdef DEBUG_HARQ - printf("[DCI UE]: dlsch0_harq status %d , dlsch1_harq status %d\n", dlsch0_harq->status, dlsch1_harq->status); -#endif - - // compute resource allocation - if (TB0_active == 1){ - - dlsch0_harq->nb_rb = conv_nprb(rah, - rballoc, - frame_parms->N_RB_DL); - conv_rballoc(rah, - rballoc, - frame_parms->N_RB_DL, - dlsch0_harq->rb_alloc_even); - - dlsch0_harq->rb_alloc_odd[0]= dlsch0_harq->rb_alloc_even[0]; - dlsch0_harq->rb_alloc_odd[1]= dlsch0_harq->rb_alloc_even[1]; - dlsch0_harq->rb_alloc_odd[2]= dlsch0_harq->rb_alloc_even[2]; - dlsch0_harq->rb_alloc_odd[3]= dlsch0_harq->rb_alloc_even[3]; - - if (TB1_active == 1){ - dlsch1_harq->rb_alloc_even[0]= dlsch0_harq->rb_alloc_even[0]; - dlsch1_harq->rb_alloc_even[1]= dlsch0_harq->rb_alloc_even[1]; - dlsch1_harq->rb_alloc_even[2]= dlsch0_harq->rb_alloc_even[2]; - dlsch1_harq->rb_alloc_even[3]= dlsch0_harq->rb_alloc_even[3]; - dlsch1_harq->rb_alloc_odd[0] = dlsch0_harq->rb_alloc_odd[0]; - dlsch1_harq->rb_alloc_odd[1] = dlsch0_harq->rb_alloc_odd[1]; - dlsch1_harq->rb_alloc_odd[2] = dlsch0_harq->rb_alloc_odd[2]; - 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)){ - - conv_rballoc(rah, - rballoc, - frame_parms->N_RB_DL, - dlsch1_harq->rb_alloc_even); - - dlsch1_harq->rb_alloc_odd[0]= dlsch1_harq->rb_alloc_even[0]; - dlsch1_harq->rb_alloc_odd[1]= dlsch1_harq->rb_alloc_even[1]; - dlsch1_harq->rb_alloc_odd[2]= dlsch1_harq->rb_alloc_even[2]; - dlsch1_harq->rb_alloc_odd[3]= dlsch1_harq->rb_alloc_even[3]; - dlsch1_harq->nb_rb = conv_nprb(rah, - rballoc, - frame_parms->N_RB_DL); - } - - - // compute precoding matrix + mimo mode - if(dci_format == format2) - { - if ((TB0_active) && (TB1_active)){ //two CW active - compute_precoding_info_2cw(tpmi, tbswap, pdlsch0->pmi_alloc,frame_parms, dlsch0_harq, dlsch1_harq); - - // printf("[DCI UE 1]: dlsch0_harq status %d , dlsch1_harq status %d\n", dlsch0_harq->status, dlsch1_harq->status); - } else if ((TB0_active) && (!TB1_active)) { // only CW 0 active - compute_precoding_info_1cw(tpmi, pdlsch0->pmi_alloc, frame_parms, dlsch0_harq); - } else { - compute_precoding_info_1cw(tpmi, pdlsch1->pmi_alloc, frame_parms, dlsch1_harq); - // printf("I am doing compute_precoding_info_1cw with tpmi %d \n", tpmi); - } - //printf(" UE DCI harq0 MIMO mode = %d\n", dlsch0_harq->mimo_mode); - if ((frame_parms->mode1_flag == 1) && (TB0_active)) - dlsch0_harq->mimo_mode = SISO; - } - else - { - compute_precoding_info_format2A( tpmi, - frame_parms->nb_antenna_ports_eNB, - TB0_active, - TB1_active, - dlsch0_harq, - dlsch1_harq); - } - // printf("[DCI UE 2]: dlsch0_harq status %d , dlsch1_harq status %d\n", dlsch0_harq->status, dlsch1_harq->status); - // reset round + compute Qm - if (TB0_active) { - // printf("TB0 ndi1 =%d, dlsch0_harq->DCINdi =%d, dlsch0_harq->first_tx = %d\n", ndi1, dlsch0_harq->DCINdi, dlsch0_harq->first_tx); - if ((ndi1!=dlsch0_harq->DCINdi) || (dlsch0_harq->first_tx==1)) { - dlsch0_harq->round = 0; - dlsch0_harq->status = ACTIVE; - dlsch0_harq->DCINdi = ndi1; - - //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 (rv1 != 0 ) - //NDI has not been toggled but rv was increased by eNB: retransmission - { - if(dlsch0_harq->status == SCH_IDLE) { - // 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; - }*/ - - // 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 nr_tti_rx %d (pid %d, round %d) TBS %d \n", - nr_tti_rx,harq_pid,dlsch0_harq->round, dlsch0_harq->TBS); - } - else - { - LOG_D(PHY,"[UE] DLSCH: Keep the same TBS CW0 nr_tti_rx %d (pid %d, round %d) TBS %d \n", - nr_tti_rx,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) - dlsch0_harq->Qm = (mcs1-28)<<1; - } - - // printf("[DCI UE 3]: dlsch0_harq status %d , dlsch1_harq status %d\n", dlsch0_harq->status, dlsch1_harq->status); - - if (TB1_active) { - // printf("TB1 ndi2 =%d, dlsch1_harq->DCINdi =%d, dlsch1_harq->first_tx = %d\n", ndi2, dlsch1_harq->DCINdi, dlsch1_harq->first_tx); - if ((ndi2!=dlsch1_harq->DCINdi) || (dlsch1_harq->first_tx==1)) { - dlsch1_harq->round = 0; - dlsch1_harq->status = ACTIVE; - dlsch1_harq->DCINdi = ndi2; - //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 (rv1 != 0 ) - //NDI has not been toggled but rv was increased by eNB: retransmission - { - if(dlsch1_harq->status == SCH_IDLE) { - // skip pdsch decoding and report ack - //dlsch1_harq->status = SCH_IDLE; - pdlsch1->active = 0; - pdlsch1->harq_ack[subframe].ack = 1; - pdlsch1->harq_ack[subframe].harq_id = harq_pid; - pdlsch1->harq_ack[subframe].send_harq_status = 1; - } - }*/ - - // 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 nr_tti_rx %d (pid %d, round %d) TBS %d \n", - nr_tti_rx,harq_pid,dlsch1_harq->round, dlsch1_harq->TBS); - } - else - { - LOG_D(PHY,"[UE] DLSCH: Keep the same TBS CW1 nr_tti_rx %d (pid %d, round %d) TBS %d \n", - nr_tti_rx,harq_pid,dlsch1_harq->round, dlsch1_harq->TBS); - } - if (mcs2 <= 28) - dlsch1_harq->Qm = get_Qm(mcs2); - else if (mcs1<=31) - dlsch1_harq->Qm = (mcs2-28)<<1; - } - - - compute_llr_offset(frame_parms, - pdcch_vars, - pdsch_vars, - dlsch0_harq, - dlsch0_harq->nb_rb, - nr_tti_rx); - - - /* #ifdef DEBUG_HARQ - printf("[DCI UE]: dlsch0_harq status %d , dlsch1_harq status %d\n", dlsch0_harq->status, dlsch1_harq->status); - printf("[DCI UE]: TB0_active %d , TB1_active %d\n", TB0_active, TB1_active); - if (dlsch0 != NULL && dlsch1 != NULL) - printf("[DCI UE] dlsch0_harq status = %d, dlsch1_harq status = %d\n", dlsch0_harq->status, dlsch1_harq->status); - else if (dlsch0 == NULL && dlsch1 != NULL) - printf("[DCI UE] dlsch0_harq NULL dlsch1_harq status = %d\n", dlsch1_harq->status); - else if (dlsch0 != NULL && dlsch1 == NULL) - printf("[DCI UE] dlsch1_harq NULL dlsch0_harq status = %d\n", dlsch0_harq->status); - #endif*/ -} -#endif //(0) - #ifdef NR_PDCCH_DCI_TOOLS int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue, @@ -7106,563 +1121,7 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue, } #endif -#if 0 -int generate_ue_dlsch_params_from_dci(int frame, - uint8_t nr_tti_rx, - void *dci_pdu, - uint16_t rnti, - DCI_format_t dci_format, - NR_UE_PDCCH *pdcch_vars, - NR_UE_PDSCH *pdsch_vars, - NR_UE_DLSCH_t **dlsch, - NR_DL_FRAME_PARMS *frame_parms, - PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated, - uint16_t si_rnti, - uint16_t ra_rnti, - uint16_t p_rnti, - uint8_t beamforming_mode, - uint16_t tc_rnti) -{ - uint8_t harq_pid=0; - uint8_t frame_type=frame_parms->frame_type; - uint8_t tpmi=0; - NR_UE_DLSCH_t *dlsch0=NULL,*dlsch1=NULL; - NR_DL_UE_HARQ_t *dlsch0_harq=NULL,*dlsch1_harq=NULL; - - DCI_INFO_EXTRACTED_t dci_info_extarcted; - uint8_t status=0; -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// - printf("####################### verifying pointer\n"); - dlsch0 = dlsch[0]; - dlsch0->active = 0; - dlsch0_harq = dlsch[0]->harq_processes[dci_info_extarcted.harq_pid]; - printf("####################### verifying pointer, dlsch0 = %p, dlsch0_harq = %p\n",dlsch0,dlsch0_harq); -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// - if (!dlsch[0]) return -1; - - #ifdef DEBUG_DCI - LOG_D(PHY,"dci_tools.c: Filling ue dlsch params -> rnti %x, SFN/SF %d/%d, dci_format %s\n", - rnti, - frame%1024, - nr_tti_rx, - (dci_format==format0? "Format 0":( - dci_format==format1? "format 1":( - dci_format==format1A? "format 1A":( - dci_format==format1B? "format 1B":( - dci_format==format1C? "format 1C":( - dci_format==format1D? "format 1D":( - dci_format==format1E_2A_M10PRB? "format 1E_2A_M10PRB":( - dci_format==format2? "format 2":( - dci_format==format2A? "format 2A":( - dci_format==format2B? "format 2B":( - dci_format==format2C? "format 2C":( - dci_format==format2D? "format 2D":( - dci_format==format3? "format 3": "UNKNOWN" - )))))))))))))); - #endif - - memset(&dci_info_extarcted,0,sizeof(dci_info_extarcted)); - switch (dci_format) { - - case format0: // This is an ULSCH allocation so nothing here, inform MAC - LOG_E(PHY,"format0 not possible\n"); - return(-1); - break; - - case format1A: - { - // extract dci infomation -#ifdef DEBUG_DCI - LOG_I(PHY,"[DCI-FORMAT-1A] AbsSubframe %d.%d extarct dci info \n", frame, nr_tti_rx); -#endif - extract_dci1A_info(frame_parms->N_RB_DL, - frame_type, - dci_pdu, - &dci_info_extarcted); - - - // check dci content - dlsch0 = dlsch[0]; - dlsch0->active = 0; - dlsch0_harq = dlsch[0]->harq_processes[dci_info_extarcted.harq_pid]; -#ifdef DEBUG_DCI - LOG_I(PHY,"[DCI-FORMAT-1A] AbsSubframe %d.%d check dci coherency \n", frame, nr_tti_rx); -#endif - status = check_dci_format1_1a_coherency(format1A, - frame_parms->N_RB_DL, - rnti, - tc_rnti, - si_rnti, - ra_rnti, - p_rnti,frame,nr_tti_rx, - &dci_info_extarcted, - dlsch0_harq); - if(status == 0) - { - printf("bad DCI 1A !!! \n"); - return(-1); - } - - // dci is correct ==> update internal structure and prepare dl decoding -#ifdef DEBUG_DCI - LOG_I(PHY,"[DCI-FORMAT-1A] AbsSubframe %d.%d prepare dl decoding \n", frame, nr_tti_rx); -#endif - prepare_dl_decoding_format1_1A(format1A, - frame_parms->N_RB_DL, - &dci_info_extarcted, - frame_parms, - pdcch_vars, - pdsch_vars, - nr_tti_rx, - rnti, - tc_rnti, - si_rnti, - ra_rnti, - p_rnti, - dlsch0_harq, - dlsch0); - - - - break; - } - case format1C: - { - // extract dci infomation -#ifdef DEBUG_DL_DECODING - LOG_I(PHY,"[DCI Format-1C] extact dci information \n"); -#endif - extract_dci1C_info(frame_parms->N_RB_DL, - frame_type, - dci_pdu, - &dci_info_extarcted); - - - // check dci content -#ifdef DEBUG_DL_DECODING - LOG_I(PHY,"[DCI Format-1C] check dci content \n"); -#endif - dlsch0 = dlsch[0]; - dlsch0->active = 0; - dlsch0_harq = dlsch[0]->harq_processes[dci_info_extarcted.harq_pid]; - - status = check_dci_format1c_coherency(frame_parms->N_RB_DL, - &dci_info_extarcted, - rnti, - si_rnti, - ra_rnti, - p_rnti, - dlsch0_harq); - if(status == 0) - return(-1); - - // dci is correct ==> update internal structure and prepare dl decoding -#ifdef DEBUG_DL_DECODING - LOG_I(PHY,"[DCI Format-1C] prepare downlink decoding \n"); -#endif - prepare_dl_decoding_format1C(frame_parms->N_RB_DL, - &dci_info_extarcted, - frame_parms, - pdcch_vars, - pdsch_vars, - rnti, - si_rnti, - ra_rnti, - p_rnti, - frame, - nr_tti_rx, - dlsch0_harq, - dlsch0); - - break; - } - - case format1: - { - // extract dci infomation -#ifdef DEBUG_DCI - LOG_I(PHY,"[DCI-FORMAT-1] AbsSubframe %d.%d extarct dci info \n", frame, nr_tti_rx); -#endif - extract_dci1_info(frame_parms->N_RB_DL, - frame_type, - dci_pdu, - &dci_info_extarcted); - - // check dci content - dlsch0 = dlsch[0]; - dlsch0->active = 0; - dlsch0_harq = dlsch[0]->harq_processes[dci_info_extarcted.harq_pid]; - -#ifdef DEBUG_DCI - LOG_I(PHY,"[DCI-FORMAT-1] AbsSubframe %d.%d check dci coherency \n", frame, nr_tti_rx); -#endif - status = check_dci_format1_1a_coherency(format1, - frame_parms->N_RB_DL, - rnti, - tc_rnti, - si_rnti, - ra_rnti, - p_rnti,frame,nr_tti_rx, - &dci_info_extarcted, - dlsch0_harq); - if(status == 0) - { - printf("bad DCI 1 !!! \n"); - return(-1); - } - - - // dci is correct ==> update internal structure and prepare dl decoding -#ifdef DEBUG_DCI - LOG_I(PHY,"[DCI-FORMAT-1] AbsSubframe %d.%d prepare dl decoding \n", frame, nr_tti_rx); -#endif - prepare_dl_decoding_format1_1A(format1, - frame_parms->N_RB_DL, - &dci_info_extarcted, - frame_parms, - pdcch_vars, - pdsch_vars, - nr_tti_rx, - rnti, - tc_rnti, - si_rnti, - ra_rnti, - p_rnti, - dlsch0_harq, - dlsch0); - break; - } - - case format2: - { - // extract dci infomation - //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, - dci_pdu, - &dci_info_extarcted); - - - // check dci content - dlsch[0]->active = 1; - dlsch[1]->active = 1; - - dlsch0 = dlsch[0]; - dlsch1 = dlsch[1]; - - dlsch0_harq = dlsch0->harq_processes[dci_info_extarcted.harq_pid]; - dlsch1_harq = dlsch1->harq_processes[dci_info_extarcted.harq_pid]; - // printf("before coherency dlsch[1]->pmi_alloc %d\n",dlsch[1]->pmi_alloc); - // printf("before coherency dlsch1->pmi_alloc %d\n",dlsch1->pmi_alloc); - // printf("before coherency dlsch1_harq->pmi_alloc %d\n",dlsch1_harq->pmi_alloc); - - //LOG_I(PHY,"[DCI-format2] check dci content \n"); - status = check_dci_format2_2a_coherency(format2, - frame_parms->N_RB_DL, - &dci_info_extarcted, - rnti, - si_rnti, - ra_rnti, - p_rnti, - dlsch0_harq, - dlsch1_harq); - if(status == 0) - 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"); - prepare_dl_decoding_format2_2A(format2, - &dci_info_extarcted, - frame_parms, - pdcch_vars, - pdsch_vars, - rnti, - nr_tti_rx, - dlsch0_harq, - dlsch1_harq, - dlsch0, - dlsch1); - } - break; - - case format2A: - { - // extract dci infomation - LOG_I(PHY,"[DCI-format2] AbsSubframe %d.%d extract dci infomation \n", frame%1024, nr_tti_rx); - extract_dci2A_info(frame_parms->N_RB_DL, - frame_type, - frame_parms->nb_antenna_ports_eNB, - dci_pdu, - &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; - - if (dci_info_extarcted.tb_swap == 0) { - dlsch0 = dlsch[0]; - dlsch1 = dlsch[1]; - } else { - dlsch0 = dlsch[1]; - dlsch1 = dlsch[0]; - } - 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"); - status = check_dci_format2_2a_coherency(format2A, - frame_parms->N_RB_DL, - &dci_info_extarcted, - rnti, - si_rnti, - ra_rnti, - p_rnti, - dlsch0_harq, - dlsch1_harq); - if(status == 0) - 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"); - prepare_dl_decoding_format2_2A(format2A, - &dci_info_extarcted, - frame_parms, - pdcch_vars, - pdsch_vars, - rnti, - nr_tti_rx, - dlsch0_harq, - dlsch1_harq, - dlsch0, - dlsch1); - } - break; - - case format1E_2A_M10PRB: - if (!dlsch[0]) return -1; - - harq_pid = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->harq_pid; - - if (harq_pid>=8) { - LOG_E(PHY,"Format 1E_2A_M10PRB: harq_pid=%d >= 8\n", harq_pid); - return(-1); - } - - dlsch[0]->current_harq_pid = harq_pid; - dlsch[0]->harq_ack[nr_tti_rx].harq_id = harq_pid; - - /* - tbswap = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->tb_swap; - if (tbswap == 0) { - dlsch0 = dlsch[0]; - dlsch1 = dlsch[1]; - } - else{ - dlsch0 = dlsch[1]; - dlsch1 = dlsch[0]; - } - */ - dlsch0 = dlsch[0]; - - dlsch0_harq = dlsch[0]->harq_processes[harq_pid]; - // Needs to be checked - dlsch0_harq->codeword=0; - conv_rballoc(((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->rah, - ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->rballoc,frame_parms->N_RB_DL, - dlsch0_harq->rb_alloc_even); - - dlsch0_harq->rb_alloc_odd[0] = dlsch0_harq->rb_alloc_even[0]; - dlsch0_harq->rb_alloc_odd[1] = dlsch0_harq->rb_alloc_even[1]; - dlsch0_harq->rb_alloc_odd[2] = dlsch0_harq->rb_alloc_even[2]; - dlsch0_harq->rb_alloc_odd[3] = dlsch0_harq->rb_alloc_even[3]; - /* - dlsch1_harq->rb_alloc_even[0] = dlsch0_harq->rb_alloc_even[0]; - dlsch1_harq->rb_alloc_even[1] = dlsch0_harq->rb_alloc_even[1]; - dlsch1_harq->rb_alloc_even[2] = dlsch0_harq->rb_alloc_even[2]; - dlsch1_harq->rb_alloc_even[3] = dlsch0_harq->rb_alloc_even[3]; - */ - dlsch0_harq->nb_rb = conv_nprb(((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->rah, - ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->rballoc, - frame_parms->N_RB_DL); - //dlsch1_harq->nb_rb = dlsch0_harq->nb_rb; - - dlsch0_harq->mcs = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->mcs; - dlsch0_harq->delta_PUCCH = nr_delta_PUCCH_lut[((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->TPC&3]; - - - - /* - if (dlsch0_harq->mcs>20) { - printf("dci_tools.c: mcs > 20 disabled for now (asked %d)\n",dlsch0_harq->mcs); - return(-1); - } - */ - - //dlsch1_harq->mcs = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->mcs2; - dlsch0_harq->rvidx = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->rv; - //dlsch1_harq->rvidx = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->rv2; - - // check if either TB is disabled (see 36-213 V8.6 p. 26) - - if ((dlsch0_harq->rvidx == 1) && (dlsch0_harq->mcs == 0)) { - dlsch0_harq->status = DISABLED; - } - - //if ((dlsch1_harq->rvidx == 1) && (dlsch1_harq->mcs == 0)) { - //dlsch1_harq->status = DISABLED; - //} - dlsch0_harq->Nl = 1; - - //dlsch0->layer_index = tbswap; - //dlsch1->layer_index = 1-tbswap; - - - // Fix this - tpmi = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->tpmi; - // printf("ue: tpmi %d\n",tpmi); - - switch (tpmi) { - case 0 : - dlsch0_harq->mimo_mode = ALAMOUTI; - break; - - case 1: - dlsch0_harq->mimo_mode = UNIFORM_PRECODING11; - dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,0,0); - break; - - case 2: - dlsch0_harq->mimo_mode = UNIFORM_PRECODING1m1; - dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,1, 0); - break; - - case 3: - dlsch0_harq->mimo_mode = UNIFORM_PRECODING1j; - dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,2, 0); - - break; - - case 4: - dlsch0_harq->mimo_mode = UNIFORM_PRECODING1mj; - dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,3, 0); - break; - - case 5: - dlsch0_harq->mimo_mode = PUSCH_PRECODING0; - // pmi stored from ulsch allocation routine - dlsch0_harq->pmi_alloc = dlsch0->pmi_alloc; - //LOG_I(PHY,"XXX using PMI %x\n",pmi2hex_2Ar1(dlsch0_harq->pmi_alloc)); - break; - - case 6: - dlsch0_harq->mimo_mode = PUSCH_PRECODING1; - LOG_E(PHY,"Unsupported TPMI\n"); - return(-1); - break; - } - - - if (frame_parms->mode1_flag == 1) - dlsch0_harq->mimo_mode = SISO; - - - if ((dlsch0_harq->DCINdi != ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->ndi) || - (dlsch0_harq->first_tx==1)) { - - dlsch0_harq->round = 0; - dlsch0_harq->first_tx = 0; - dlsch0_harq->status = ACTIVE; - } - /* - else if (dlsch0_harq->status == SCH_IDLE) { // we got same ndi for a previously decoded process, - // this happens if either another harq process in the same - // is NAK or an ACK was not received - - dlsch0->harq_ack[subframe].ack = 1; - dlsch0->harq_ack[subframe].harq_id = harq_pid; - dlsch0->harq_ack[subframe].send_harq_status = 1; - dlsch0->active = 0; - return(0); - } - */ - - dlsch0_harq->DCINdi = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->ndi; - dlsch0_harq->mcs = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->mcs; - - if (dlsch0_harq->nb_rb>1) { - dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1]; - } else - dlsch0_harq->TBS =0; - - dlsch0->rnti = rnti; - //dlsch1->rnti = rnti; - - dlsch0->active = 1; - //dlsch1->active = 1; - - dlsch0_harq->dl_power_off = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->dl_power_off; - //dlsch1_harq->dl_power_off = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->dl_power_off; - - - break; - - default: - LOG_E(PHY,"format %d not yet implemented\n",dci_format); - return(-1); - break; - } - -#ifdef UE_DEBUG_TRACE - - if (dlsch[0] && (dlsch[0]->rnti != 0xffff)) { - LOG_I(PHY,"dci_format:%d Abssubframe: %d.%d \n",dci_format,frame%1024,nr_tti_rx); - LOG_I(PHY,"PDSCH dlsch0 UE: rnti %x\n",dlsch[0]->rnti); - LOG_D(PHY,"PDSCH dlsch0 UE: NBRB %d\n",dlsch0_harq->nb_rb); - LOG_D(PHY,"PDSCH dlsch0 UE: rballoc %x\n",dlsch0_harq->rb_alloc_even[0]); - LOG_I(PHY,"PDSCH dlsch0 UE: harq_pid %d\n",dci_info_extarcted.harq_pid); - LOG_I(PHY,"PDSCH dlsch0 UE: g %d\n",dlsch[0]->g_pucch); - LOG_D(PHY,"PDSCH dlsch0 UE: round %d\n",dlsch0_harq->round); - LOG_D(PHY,"PDSCH dlsch0 UE: DCINdi %d\n",dlsch0_harq->DCINdi); - LOG_D(PHY,"PDSCH dlsch0 UE: rvidx %d\n",dlsch0_harq->rvidx); - LOG_D(PHY,"PDSCH dlsch0 UE: TBS %d\n",dlsch0_harq->TBS); - LOG_D(PHY,"PDSCH dlsch0 UE: mcs %d\n",dlsch0_harq->mcs); - LOG_D(PHY,"PDSCH dlsch0 UE: pwr_off %d\n",dlsch0_harq->dl_power_off); - } -#endif - - #if T_TRACER - if( (dlsch[0]->rnti != si_rnti) && (dlsch[0]->rnti != ra_rnti) && (dlsch[0]->rnti != p_rnti)) - { - T(T_UE_PHY_DLSCH_UE_DCI, T_INT(0), T_INT(frame%1024), T_INT(nr_tti_rx), T_INT(0), - T_INT(dlsch[0]->rnti), T_INT(dci_format), - T_INT(harq_pid), - T_INT(dlsch0_harq->mcs), - T_INT(dlsch0_harq->TBS)); - } - #endif - - - // compute DL power control parameters - if (dlsch0_harq != NULL){ - computeRhoA_UE(pdsch_config_dedicated, dlsch[0],dlsch0_harq->dl_power_off, frame_parms->nb_antenna_ports_eNB); - computeRhoB_UE(pdsch_config_dedicated,&(frame_parms->pdsch_config_common),frame_parms->nb_antenna_ports_eNB,dlsch[0],dlsch0_harq->dl_power_off); - } - - if (dlsch1_harq != NULL) { - computeRhoA_UE(pdsch_config_dedicated, dlsch[1],dlsch1_harq->dl_power_off, frame_parms->nb_antenna_ports_eNB); - computeRhoB_UE(pdsch_config_dedicated,&(frame_parms->pdsch_config_common),frame_parms->nb_antenna_ports_eNB,dlsch[1],dlsch1_harq->dl_power_off); - } - - - return(0); -} - -#endif //(0) uint8_t nr_subframe2harq_pid(NR_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t nr_tti_rx) { /* @@ -7781,26 +1240,6 @@ uint8_t nr_pdcch_alloc2ul_subframe(NR_DL_FRAME_PARMS *frame_parms,uint8_t n) LOG_D(PHY, "subframe %d: PUSCH subframe = %d\n", n, ul_subframe); return ul_subframe; } -#if 0 -uint8_t ul_subframe2pdcch_alloc_subframe(NR_DL_FRAME_PARMS *frame_parms,uint8_t n) -{ - if ((frame_parms->frame_type == TDD) && - (frame_parms->tdd_config == 1) && - ((n==7)||(n==2))) // tdd_config 0,1 SF 1,5 - return((n==7)? 1 : 6); - else if ((frame_parms->frame_type == TDD) && - (frame_parms->tdd_config == 6) && - ((n==7)||(n==8)||(n==2)||(n==3))) - return((n+3)%10); - else if ((frame_parms->frame_type == TDD) && - (frame_parms->tdd_config == 6) && - (n==4)) // tdd_config 6 SF 9 - return(9); - else - return((n+6)%10); - -} -#endif //(0) uint32_t nr_pdcch_alloc2ul_frame(NR_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t n) { @@ -7825,2489 +1264,4 @@ uint32_t nr_pdcch_alloc2ul_frame(NR_DL_FRAME_PARMS *frame_parms,uint32_t frame, return ul_frame; } -#if 0 -int32_t pmi_convert_rank1_from_rank2(uint16_t pmi_alloc, int tpmi, int nb_rb) -{ - int nb_subbands = 0; - int32_t pmi_alloc_new = 0, pmi_new = 0, pmi_old = 0; - int i; - - switch (nb_rb) { - case 6: - nb_subbands = 6; - break; - default: - case 25: - nb_subbands = 7; - break; - case 50: - nb_subbands = 9; - break; - case 100: - nb_subbands = 13; - break; - } - - for (i = 0; i < nb_subbands; i++) { - pmi_old = (pmi_alloc >> i)&1; - - if (pmi_old == 0) - if (tpmi == 5) - pmi_new = 0; - else - pmi_new = 1; - else - if (tpmi == 5) - pmi_new = 2; - else - pmi_new = 3; - - pmi_alloc_new|=pmi_new<<(2*i); - - } -#ifdef DEBUG_HARQ -printf(" [DCI UE] pmi_alloc_old %d, pmi_alloc_new %d pmi_old %d , pmi_new %d\n", pmi_alloc, pmi_alloc_new,pmi_old, pmi_new ); -#endif -return(pmi_alloc_new); - -} - -uint16_t quantize_subband_pmi(PHY_MEASUREMENTS *meas,uint8_t eNB_id,int nb_rb) -{ - - int i, aarx; - uint16_t pmiq=0; - uint32_t pmivect = 0; - uint8_t rank = meas->rank[eNB_id]; - int pmi_re,pmi_im; - int nb_subbands=0; - - - switch (nb_rb) { - case 6: - nb_subbands = 6; - break; - default: - case 25: - nb_subbands = 7; - break; - case 50: - nb_subbands = 9; - break; - case 100: - nb_subbands = 13; - break; - } - - - for (i=0; inb_antennas_rx; aarx++) { - pmi_re += meas->subband_pmi_re[eNB_id][i][aarx]; - pmi_im += meas->subband_pmi_im[eNB_id][i][aarx]; - } - - // pmi_re = meas->subband_pmi_re[eNB_id][i][meas->selected_rx_antennas[eNB_id][i]]; - // pmi_im = meas->subband_pmi_im[eNB_id][i][meas->selected_rx_antennas[eNB_id][i]]; - - // printf("pmi => (%d,%d)\n",pmi_re,pmi_im); - if ((pmi_re > pmi_im) && (pmi_re > -pmi_im)) - pmiq = PMI_2A_11; - else if ((pmi_re < pmi_im) && (pmi_re > -pmi_im)) - pmiq = PMI_2A_1j; - else if ((pmi_re < pmi_im) && (pmi_re < -pmi_im)) - pmiq = PMI_2A_1m1; - else if ((pmi_re > pmi_im) && (pmi_re < -pmi_im)) - pmiq = PMI_2A_1mj; - - // printf("subband %d, pmi%d \n",i,pmiq); - pmivect |= (pmiq<<(2*i)); - } - - else if (rank==1) { - for (aarx=0; aarxnb_antennas_rx; aarx++) { - pmi_re += meas->subband_pmi_re[eNB_id][i][aarx]; - //printf("meas->subband_pmi_re[eNB_id][i][%d]=%d\n", aarx, meas->subband_pmi_re[eNB_id][i][aarx]); - pmi_im += meas->subband_pmi_im[eNB_id][i][aarx]; - //printf("meas->subband_pmi_im[eNB_id][i][%d]=%d\n",aarx, meas->subband_pmi_im[eNB_id][i][aarx]); - } - if (pmi_re >= pmi_im) // this is not orthogonal - // this is orthogonal - //if (((pmi_re >= pmi_im) && (pmi_re >= -pmi_im)) || ((pmi_re <= pmi_im) && (pmi_re >= -pmi_im))) - pmiq = PMI_2A_R1_11; - else - pmiq = PMI_2A_R1_1j; - - // printf("subband %d, pmi_re %d, pmi_im %d, pmiq %d \n",i,pmi_re,pmi_im,pmiq); - // printf("subband %d, pmi%d \n",i,pmiq); - //According to Section 7.2.4 of 36.213 - - pmivect |= ((pmiq-1)<<(i)); //shift 1 since only one bit - } - else { - LOG_E(PHY,"PMI feedback for rank>1 not supported!\n"); - pmivect = 0; - } - - } -#ifdef DEBUG_HARQ - printf( "quantize_subband_pmi pmivect %d \n", pmivect); -#endif - return(pmivect); -} - -uint16_t quantize_subband_pmi2(PHY_MEASUREMENTS *meas,uint8_t eNB_id,uint8_t a_id,int nb_subbands) -{ - - uint8_t i; - uint16_t pmiq=0; - uint16_t pmivect = 0; - uint8_t rank = meas->rank[eNB_id]; - int pmi_re,pmi_im; - - for (i=0; isubband_pmi_re[eNB_id][i][a_id]; - pmi_im = meas->subband_pmi_im[eNB_id][i][a_id]; - - if ((pmi_re > pmi_im) && (pmi_re > -pmi_im)) - pmiq = PMI_2A_11; - else if ((pmi_re < pmi_im) && (pmi_re > -pmi_im)) - pmiq = PMI_2A_1j; - else if ((pmi_re < pmi_im) && (pmi_re < -pmi_im)) - pmiq = PMI_2A_1m1; - else if ((pmi_re > pmi_im) && (pmi_re < -pmi_im)) - pmiq = PMI_2A_1mj; - - pmivect |= (pmiq<<(2*i)); - } else { - // This needs to be done properly!!! - pmivect = 0; - } - } - - return(pmivect); -} - -uint16_t quantize_wideband_pmi(PHY_MEASUREMENTS *meas,uint8_t eNB_id) -{ - - uint16_t pmiq=0; - uint8_t rank = meas->rank[eNB_id]; - //int pmi; - int pmi_re,pmi_im; - - if (rank == 1) { - //pmi = - pmi_re = meas->wideband_pmi_re[eNB_id][meas->selected_rx_antennas[eNB_id][0]]; - pmi_im = meas->wideband_pmi_im[eNB_id][meas->selected_rx_antennas[eNB_id][0]]; - - if ((pmi_re > pmi_im) && (pmi_re > -pmi_im)) - pmiq = PMI_2A_11; - else if ((pmi_re < pmi_im) && (pmi_re > -pmi_im)) - pmiq = PMI_2A_1j; - else if ((pmi_re < pmi_im) && (pmi_re < -pmi_im)) - pmiq = PMI_2A_1m1; - else if ((pmi_re > pmi_im) && (pmi_re < -pmi_im)) - pmiq = PMI_2A_1mj; - - } else { - // This needs to be done properly! - pmiq = PMI_2A_11; - } - - - return(pmiq); -} -/* - uint8_t sinr2cqi(int sinr) { - if (sinr<-3) - return(0); - if (sinr>14) - return(10); - else - return(3+(sinr>>1)); - } -*/ - -uint8_t sinr2cqi(double sinr,uint8_t trans_mode) -{ - // int flag_LA=0; - - uint8_t retValue = 0; - - if(flag_LA==0) { - // Ideal Channel Estimation - if (sinr<=-4.89) - retValue = (0); - else if (sinr < -3.53) - retValue = (3); - else if (sinr <= -1.93) - retValue = (4); - else if (sinr <= -0.43) - retValue = (5); - else if (sinr <= 1.11) - retValue = (6); - else if (sinr <= 3.26) - retValue = (7); - else if (sinr <= 5.0) - retValue = (8); - else if (sinr <= 7.0) - retValue = (9); - else if (sinr <= 9.0) - retValue = (10); - else if (sinr <= 11.0) - retValue = (11); - else if (sinr <= 13.0) - retValue = (12); - else if (sinr <= 15.5) - retValue = (13); - else if (sinr <= 17.5) - retValue = (14); - else - retValue = (15); - } else { - int h=0; - int trans_mode_tmp; - - if (trans_mode ==5) - trans_mode_tmp=2; - else if(trans_mode ==6) - trans_mode_tmp=3; - else - trans_mode_tmp = trans_mode-1; - - for(h=0; h<16; h++) { - if(sinr<=sinr_to_cqi[trans_mode_tmp][h]) - retValue = (h); - } - } - - LOG_D(PHY, "sinr=%f trans_mode=%d cqi=%d\n", sinr, trans_mode, retValue); - return retValue; -} -//uint32_t fill_subband_cqi(PHY_MEASUREMENTS *meas,uint8_t eNB_id) { -// -// uint8_t i; -//// uint16_t cqivect = 0; -// uint32_t cqivect = 0; -// -//// char diff_cqi; -// int diff_cqi=0; -// -// for (i=0;iwideband_cqi_dB[eNB_id][0]) + sinr2cqi(meas->subband_cqi_dB[eNB_id][0][i]); -// -// // Note, this is Table 7.2.1-2 from 36.213 -// if (diff_cqi<=-1) -// diff_cqi = 3; -// else if (diff_cqi>2) -// diff_cqi = 2; -// cqivect |= (diff_cqi<<(2*i)); -// -// } -// -// return(cqivect); -//} - - -uint32_t fill_subband_cqi(PHY_MEASUREMENTS *meas,uint8_t eNB_id,uint8_t trans_mode,int nb_subbands) -{ - - uint8_t i; - - uint32_t cqivect = 0,offset=0; - - - int diff_cqi=0; - - for (i=0; iwideband_cqi_avg[eNB_id],trans_mode) + sinr2cqi(meas->subband_cqi_tot_dB[eNB_id][i],trans_mode); - - // Note, this is Table 7.2.1-2 from 36.213 - if (diff_cqi<=-1) - offset = 3; - else if (diff_cqi>=2) - offset = 2; - else - offset=(uint32_t)diff_cqi; - - cqivect |= (offset<<(2*i)); - - } - - return(cqivect); -} - -void fill_CQI(NR_UE_ULSCH_t *ulsch,PHY_MEASUREMENTS *meas,uint8_t eNB_id,uint8_t harq_pid,int N_RB_DL,uint16_t rnti, uint8_t trans_mode, double sinr_eff) -{ - - // printf("[PHY][UE] Filling CQI for eNB %d, meas->wideband_cqi_tot[%d] %d\n", - // eNB_id,eNB_id,meas->wideband_cqi_tot[eNB_id]); - double sinr_tmp; - uint8_t *o = ulsch->o; - UCI_format_t uci_format = ulsch->uci_format; - - if(flag_LA==1) - sinr_tmp = sinr_eff; - else - sinr_tmp = (double) meas->wideband_cqi_avg[eNB_id]; - - - - //LOG_I(PHY,"[UE][UCI] Filling CQI format %d for eNB %d N_RB_DL %d\n",uci_format,eNB_id,N_RB_DL); - - switch (N_RB_DL) { - - case 6: - switch (uci_format) { - case wideband_cqi_rank1_2A: - ((wideband_cqi_rank1_2A_1_5MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode); - ((wideband_cqi_rank1_2A_1_5MHz *)o)->pmi = quantize_subband_pmi(meas,eNB_id,6); - break; - - case wideband_cqi_rank2_2A: - ((wideband_cqi_rank2_2A_1_5MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode); //FIXME: calculate rank2 cqi - ((wideband_cqi_rank2_2A_1_5MHz *)o)->cqi2 = sinr2cqi(sinr_tmp,trans_mode); //FIXME: calculate rank2 cqi - ((wideband_cqi_rank2_2A_1_5MHz *)o)->pmi = quantize_subband_pmi(meas,eNB_id,6); - break; - - case HLC_subband_cqi_nopmi: - ((HLC_subband_cqi_nopmi_1_5MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode); - ((HLC_subband_cqi_nopmi_1_5MHz *)o)->diffcqi1 = fill_subband_cqi(meas,eNB_id,trans_mode,6); - break; - - case HLC_subband_cqi_rank1_2A: - ((HLC_subband_cqi_rank1_2A_1_5MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode); - ((HLC_subband_cqi_rank1_2A_1_5MHz *)o)->diffcqi1 = fill_subband_cqi(meas,eNB_id,trans_mode,6); - ((HLC_subband_cqi_rank1_2A_1_5MHz *)o)->pmi = quantize_wideband_pmi(meas,eNB_id); - break; - - case HLC_subband_cqi_rank2_2A: - // This has to be improved!!! - ((HLC_subband_cqi_rank2_2A_1_5MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode); - ((HLC_subband_cqi_rank2_2A_1_5MHz *)o)->diffcqi1 = fill_subband_cqi(meas,eNB_id,trans_mode,6); - ((HLC_subband_cqi_rank2_2A_1_5MHz *)o)->cqi2 = sinr2cqi(sinr_tmp,trans_mode); - ((HLC_subband_cqi_rank2_2A_1_5MHz *)o)->diffcqi2 = fill_subband_cqi(meas,eNB_id,trans_mode,6); - ((HLC_subband_cqi_rank2_2A_1_5MHz *)o)->pmi = quantize_subband_pmi(meas,eNB_id,6); - break; - - case HLC_subband_cqi_mcs_CBA: - // this is the cba mcs uci for cba transmission - ((HLC_subband_cqi_mcs_CBA_1_5MHz *)o)->mcs = ulsch->harq_processes[harq_pid]->mcs; - ((HLC_subband_cqi_mcs_CBA_1_5MHz *)o)->crnti = rnti; - LOG_D(PHY,"fill uci for cba rnti %x, mcs %d \n", rnti, ulsch->harq_processes[harq_pid]->mcs); - break; - - case ue_selected: - LOG_E(PHY,"fill_CQI ue_selected CQI not supported yet!!!\n"); - mac_xface->macphy_exit("fill_CQI ue_selected CQI not supported yet!!!"); - break; - - default: - LOG_E(PHY,"unsupported CQI mode (%d)!!!\n",uci_format); - mac_xface->macphy_exit("unsupported CQI mode !!!"); - break; - - } - - break; - - case 25: - switch (uci_format) { - case wideband_cqi_rank1_2A: - ((wideband_cqi_rank1_2A_5MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode); - ((wideband_cqi_rank1_2A_5MHz *)o)->pmi = quantize_subband_pmi(meas,eNB_id,7); - break; - - case wideband_cqi_rank2_2A: - ((wideband_cqi_rank2_2A_5MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode); //FIXME: calculate rank2 cqi - ((wideband_cqi_rank2_2A_5MHz *)o)->cqi2 = sinr2cqi(sinr_tmp,trans_mode); //FIXME: calculate rank2 cqi - ((wideband_cqi_rank2_2A_5MHz *)o)->pmi = quantize_subband_pmi(meas,eNB_id,7); - break; - - case HLC_subband_cqi_nopmi: - ((HLC_subband_cqi_nopmi_5MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode); - ((HLC_subband_cqi_nopmi_5MHz *)o)->diffcqi1 = fill_subband_cqi(meas,eNB_id,trans_mode,7); - break; - - case HLC_subband_cqi_rank1_2A: - ((HLC_subband_cqi_rank1_2A_5MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode); - ((HLC_subband_cqi_rank1_2A_5MHz *)o)->diffcqi1 = fill_subband_cqi(meas,eNB_id,trans_mode,7); - ((HLC_subband_cqi_rank1_2A_5MHz *)o)->pmi = quantize_wideband_pmi(meas,eNB_id); - break; - - case HLC_subband_cqi_rank2_2A: - // This has to be improved!!! - ((HLC_subband_cqi_rank2_2A_5MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode); - ((HLC_subband_cqi_rank2_2A_5MHz *)o)->diffcqi1 = fill_subband_cqi(meas,eNB_id,trans_mode,7); - ((HLC_subband_cqi_rank2_2A_5MHz *)o)->cqi2 = sinr2cqi(sinr_tmp,trans_mode); - ((HLC_subband_cqi_rank2_2A_5MHz *)o)->diffcqi2 = fill_subband_cqi(meas,eNB_id,trans_mode,7); - ((HLC_subband_cqi_rank2_2A_5MHz *)o)->pmi = quantize_subband_pmi(meas,eNB_id,7); - break; - - case HLC_subband_cqi_mcs_CBA: - // this is the cba mcs uci for cba transmission - ((HLC_subband_cqi_mcs_CBA_5MHz *)o)->mcs = ulsch->harq_processes[harq_pid]->mcs; - ((HLC_subband_cqi_mcs_CBA_5MHz *)o)->crnti = rnti; - LOG_N(PHY,"fill uci for cba rnti %x, mcs %d \n", rnti, ulsch->harq_processes[harq_pid]->mcs); - break; - - case ue_selected: - LOG_E(PHY,"fill_CQI ue_selected CQI not supported yet!!!\n"); - mac_xface->macphy_exit("fill_CQI ue_selected CQI not supported yet!!!"); - break; - - default: - LOG_E(PHY,"unsupported CQI mode (%d)!!!\n",uci_format); - mac_xface->macphy_exit("unsupported CQI mode !!!"); - break; - - } - - break; - - case 50: - switch (uci_format) { - case wideband_cqi_rank1_2A: - ((wideband_cqi_rank1_2A_10MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode); - ((wideband_cqi_rank1_2A_10MHz *)o)->pmi = quantize_subband_pmi(meas,eNB_id,9); - break; - - case wideband_cqi_rank2_2A: - ((wideband_cqi_rank2_2A_10MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode); //FIXME: calculate rank2 cqi - ((wideband_cqi_rank2_2A_10MHz *)o)->cqi2 = sinr2cqi(sinr_tmp,trans_mode); //FIXME: calculate rank2 cqi - ((wideband_cqi_rank2_2A_10MHz *)o)->pmi = quantize_subband_pmi(meas,eNB_id,9); - break; - - case HLC_subband_cqi_nopmi: - ((HLC_subband_cqi_nopmi_10MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode); - ((HLC_subband_cqi_nopmi_10MHz *)o)->diffcqi1 = fill_subband_cqi(meas,eNB_id,trans_mode,9); - break; - - case HLC_subband_cqi_rank1_2A: - ((HLC_subband_cqi_rank1_2A_10MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode); - ((HLC_subband_cqi_rank1_2A_10MHz *)o)->diffcqi1 = fill_subband_cqi(meas,eNB_id,trans_mode,9); - ((HLC_subband_cqi_rank1_2A_10MHz *)o)->pmi = quantize_wideband_pmi(meas,eNB_id); - break; - - case HLC_subband_cqi_rank2_2A: - // This has to be improved!!! - ((HLC_subband_cqi_rank2_2A_10MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode); - ((HLC_subband_cqi_rank2_2A_10MHz *)o)->diffcqi1 = fill_subband_cqi(meas,eNB_id,trans_mode,9); - ((HLC_subband_cqi_rank2_2A_10MHz *)o)->cqi2 = sinr2cqi(sinr_tmp,trans_mode); - ((HLC_subband_cqi_rank2_2A_10MHz *)o)->diffcqi2 = fill_subband_cqi(meas,eNB_id,trans_mode,9); - ((HLC_subband_cqi_rank2_2A_10MHz *)o)->pmi = quantize_subband_pmi(meas,eNB_id,9); - break; - - case HLC_subband_cqi_mcs_CBA: - // this is the cba mcs uci for cba transmission - ((HLC_subband_cqi_mcs_CBA_10MHz *)o)->mcs = ulsch->harq_processes[harq_pid]->mcs; - ((HLC_subband_cqi_mcs_CBA_10MHz *)o)->crnti = rnti; - LOG_N(PHY,"fill uci for cba rnti %x, mcs %d \n", rnti, ulsch->harq_processes[harq_pid]->mcs); - break; - - case ue_selected: - LOG_E(PHY,"fill_CQI ue_selected CQI not supported yet!!!\n"); - mac_xface->macphy_exit("fill_CQI ue_selected CQI not supported yet!!!"); - break; - - default: - LOG_E(PHY,"unsupported CQI mode (%d)!!!\n",uci_format); - mac_xface->macphy_exit("unsupported CQI mode !!!"); - break; - - } - - break; - - case 100: - switch (uci_format) { - case wideband_cqi_rank1_2A: - ((wideband_cqi_rank1_2A_20MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode); - ((wideband_cqi_rank1_2A_20MHz *)o)->pmi = quantize_subband_pmi(meas,eNB_id,13); - break; - - case wideband_cqi_rank2_2A: - ((wideband_cqi_rank2_2A_20MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode); //FIXME: calculate rank2 cqi - ((wideband_cqi_rank2_2A_20MHz *)o)->cqi2 = sinr2cqi(sinr_tmp,trans_mode); //FIXME: calculate rank2 cqi - ((wideband_cqi_rank2_2A_20MHz *)o)->pmi = quantize_subband_pmi(meas,eNB_id,13); - break; - - case HLC_subband_cqi_nopmi: - ((HLC_subband_cqi_nopmi_20MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode); - ((HLC_subband_cqi_nopmi_20MHz *)o)->diffcqi1 = fill_subband_cqi(meas,eNB_id,trans_mode,13); - break; - - case HLC_subband_cqi_rank1_2A: - ((HLC_subband_cqi_rank1_2A_20MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode); - ((HLC_subband_cqi_rank1_2A_20MHz *)o)->diffcqi1 = fill_subband_cqi(meas,eNB_id,trans_mode,13); - ((HLC_subband_cqi_rank1_2A_20MHz *)o)->pmi = quantize_wideband_pmi(meas,eNB_id); - break; - - case HLC_subband_cqi_rank2_2A: - // This has to be improved!!! - ((HLC_subband_cqi_rank2_2A_20MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode); - ((HLC_subband_cqi_rank2_2A_20MHz *)o)->diffcqi1 = fill_subband_cqi(meas,eNB_id,trans_mode,13); - ((HLC_subband_cqi_rank2_2A_20MHz *)o)->cqi2 = sinr2cqi(sinr_tmp,trans_mode); - ((HLC_subband_cqi_rank2_2A_20MHz *)o)->diffcqi2 = fill_subband_cqi(meas,eNB_id,trans_mode,13); - ((HLC_subband_cqi_rank2_2A_20MHz *)o)->pmi = quantize_subband_pmi(meas,eNB_id,13); - break; - - case HLC_subband_cqi_mcs_CBA: - // this is the cba mcs uci for cba transmission - ((HLC_subband_cqi_mcs_CBA_20MHz *)o)->mcs = ulsch->harq_processes[harq_pid]->mcs; - ((HLC_subband_cqi_mcs_CBA_20MHz *)o)->crnti = rnti; - LOG_N(PHY,"fill uci for cba rnti %x, mcs %d \n", rnti, ulsch->harq_processes[harq_pid]->mcs); - break; - - case ue_selected: - LOG_E(PHY,"fill_CQI ue_selected CQI not supported yet!!!\n"); - mac_xface->macphy_exit("fill_CQI ue_selected CQI not supported yet!!!"); - break; - - default: - LOG_E(PHY,"unsupported CQI mode (%d)!!!\n",uci_format); - mac_xface->macphy_exit("unsupported CQI mode !!!"); - break; - - } - - break; - - } - - -} - -void reset_cba_uci(void *o) -{ - // this is the cba mcs uci for cba transmission - ((HLC_subband_cqi_mcs_CBA_5MHz *)o)->mcs = 0; //fixme - ((HLC_subband_cqi_mcs_CBA_5MHz *)o)->crnti = 0x0; -} - - -uint32_t pmi_extend(NR_DL_FRAME_PARMS *frame_parms,uint8_t wideband_pmi, uint8_t rank) -{ - - uint8_t i,wideband_pmi2; - uint32_t pmi_ex = 0; - - if (frame_parms->N_RB_DL!=25) { - LOG_E(PHY,"pmi_extend not yet implemented for anything else than 25PRB\n"); - return(-1); - } - - if (rank==0) { - wideband_pmi2=wideband_pmi&3; - for (i=0; i<14; i+=2) - pmi_ex|=(wideband_pmi2<transmission_mode[eNB_id]; - ANFBmode_t AckNackFBMode; - NR_UE_ULSCH_t *ulsch = ue->ulsch[eNB_id]; - NR_UE_DLSCH_t **dlsch = ue->dlsch[ue->current_thread_id[nr_tti_rx]][0]; - PHY_MEASUREMENTS *meas = &ue->measurements; - NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; - // uint32_t current_dlsch_cqi = ue->current_dlsch_cqi[eNB_id]; - - if(frame_parms->frame_type == TDD) - { - AckNackFBMode = ue->pucch_config_dedicated[eNB_id].tdd_AckNackFeedbackMode; - } - else - { - AckNackFBMode = 1; // 1: multiplexing for FDD - } - - uint32_t cqi_req; - uint32_t dai=3; - uint32_t cshift; - uint32_t TPC; - uint32_t ndi; - uint32_t mcs; - uint32_t rballoc,RIV_max; - uint16_t* RIV2first_rb_LUT; - uint16_t* RIV2nb_rb_LUT; - - // uint32_t hopping; - // uint32_t type; - - if (dci_format == format0) { - - if (!ulsch) - return -1; - - if (rnti == ra_rnti) - harq_pid = 0; - else - harq_pid = nr_subframe2harq_pid(frame_parms, - nr_pdcch_alloc2ul_frame(frame_parms,proc->frame_rx,nr_tti_rx), - nr_pdcch_alloc2ul_subframe(frame_parms,nr_tti_rx)); - - if (harq_pid == 255) { - LOG_E(PHY, "frame %d, nr_tti_rx %d, rnti %x, format %d: illegal harq_pid!\n", - proc->frame_rx, nr_tti_rx, rnti, dci_format); - return(-1); - } - - switch (frame_parms->N_RB_DL) { - case 6: - if (frame_parms->frame_type == TDD) { - cqi_req = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->cqi_req; - dai = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->dai; - cshift = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->cshift; - TPC = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->TPC; - ndi = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->ndi; - mcs = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->mcs; - rballoc = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->rballoc; - // hopping = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->hopping; - // type = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->type; - } else { - cqi_req = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->cqi_req; - cshift = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->cshift; - TPC = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->TPC; - ndi = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->ndi; - mcs = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->mcs; - rballoc = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->rballoc; - // hopping = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->hopping; - // type = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->type; - } - - RIV_max = RIV_max6; - RIV2first_rb_LUT = RIV2first_rb_LUT6; - RIV2nb_rb_LUT = RIV2nb_rb_LUT6; - - break; - - case 25: - if (frame_parms->frame_type == TDD) { - cqi_req = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->cqi_req; - dai = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->dai; - cshift = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->cshift; - TPC = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->TPC; - ndi = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->ndi; - mcs = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->mcs; - rballoc = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->rballoc; - // hopping = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->hopping; - // type = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->type; - } else { - cqi_req = ((DCI0_5MHz_FDD_t *)dci_pdu)->cqi_req; - cshift = ((DCI0_5MHz_FDD_t *)dci_pdu)->cshift; - TPC = ((DCI0_5MHz_FDD_t *)dci_pdu)->TPC; - ndi = ((DCI0_5MHz_FDD_t *)dci_pdu)->ndi; - mcs = ((DCI0_5MHz_FDD_t *)dci_pdu)->mcs; - rballoc = ((DCI0_5MHz_FDD_t *)dci_pdu)->rballoc; - // hopping = ((DCI0_5MHz_FDD_t *)dci_pdu)->hopping; - // type = ((DCI0_5MHz_FDD_t *)dci_pdu)->type; - } - - RIV_max = RIV_max25; - RIV2first_rb_LUT = RIV2first_rb_LUT25; - RIV2nb_rb_LUT = RIV2nb_rb_LUT25; - // printf("***********rballoc %d, first_rb %d, nb_rb %d (dci %p)\n",rballoc,ulsch->harq_processes[harq_pid]->first_rb,ulsch->harq_processes[harq_pid]->nb_rb,dci_pdu); - break; - - case 50: - if (frame_parms->frame_type == TDD) { - cqi_req = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->cqi_req; - dai = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->dai; - cshift = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->cshift; - TPC = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->TPC; - ndi = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->ndi; - mcs = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->mcs; - rballoc = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->rballoc; - // hopping = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->hopping; - // type = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->type; - } else { - cqi_req = ((DCI0_10MHz_FDD_t *)dci_pdu)->cqi_req; - cshift = ((DCI0_10MHz_FDD_t *)dci_pdu)->cshift; - TPC = ((DCI0_10MHz_FDD_t *)dci_pdu)->TPC; - ndi = ((DCI0_10MHz_FDD_t *)dci_pdu)->ndi; - mcs = ((DCI0_10MHz_FDD_t *)dci_pdu)->mcs; - rballoc = ((DCI0_10MHz_FDD_t *)dci_pdu)->rballoc; - // hopping = ((DCI0_10MHz_FDD_t *)dci_pdu)->hopping; - // type = ((DCI0_10MHz_FDD_t *)dci_pdu)->type; - } - - RIV_max = RIV_max50; - RIV2first_rb_LUT = RIV2first_rb_LUT50; - RIV2nb_rb_LUT = RIV2nb_rb_LUT50; - - break; - - case 100: - if (frame_parms->frame_type == TDD) { - cqi_req = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->cqi_req; - dai = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->dai; - cshift = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->cshift; - TPC = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->TPC; - ndi = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->ndi; - mcs = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->mcs; - rballoc = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->rballoc; - // hopping = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->hopping; - // type = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->type; - } else { - cqi_req = ((DCI0_20MHz_FDD_t *)dci_pdu)->cqi_req; - cshift = ((DCI0_20MHz_FDD_t *)dci_pdu)->cshift; - TPC = ((DCI0_20MHz_FDD_t *)dci_pdu)->TPC; - ndi = ((DCI0_20MHz_FDD_t *)dci_pdu)->ndi; - mcs = ((DCI0_20MHz_FDD_t *)dci_pdu)->mcs; - rballoc = ((DCI0_20MHz_FDD_t *)dci_pdu)->rballoc; - // hopping = ((DCI0_20MHz_FDD_t *)dci_pdu)->hopping; - // type = ((DCI0_20MHz_FDD_t *)dci_pdu)->type; - } - - RIV_max = RIV_max100; - RIV2first_rb_LUT = RIV2first_rb_LUT100; - RIV2nb_rb_LUT = RIV2nb_rb_LUT100; - - // printf("rb_alloc (20 MHz dci) %d\n",rballoc); - break; - - default: - LOG_E(PHY,"Invalid N_RB_DL %d\n", frame_parms->N_RB_DL); - DevParam (frame_parms->N_RB_DL, 0, 0); - break; - } - - - if (rballoc > RIV_max) { - LOG_E(PHY,"frame %d, nr_tti_rx %d, rnti %x, format %d: FATAL ERROR: generate_ue_ulsch_params_from_dci, rb_alloc[%d] > RIV_max[%d]\n", - proc->frame_rx, nr_tti_rx, rnti, dci_format,rballoc,RIV_max); - LOG_E(PHY,"Wrong DCI0 detection, do not transmit PUSCH for HARQID: %d\n",harq_pid); - ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 0; - return(-1); - } - - - // indicate that this process is to be serviced in subframe n+4 - if ((rnti >= cba_rnti) && (rnti < p_rnti)) - ulsch->harq_processes[harq_pid]->subframe_cba_scheduling_flag = 1; //+=1 this indicates the number of dci / cba group: not supported in the data struct - else - { - ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 1; - //LOG_I(PHY,"[HARQ-UL harqId: %d] DCI0 ==> subframe_scheduling_flag = %d round: %d\n", harq_pid, ulsch->harq_processes[harq_pid]->subframe_scheduling_flag, ulsch->harq_processes[harq_pid]->round); - - } - - ulsch->harq_processes[harq_pid]->TPC = TPC; - ulsch->harq_processes[harq_pid]->first_rb = RIV2first_rb_LUT[rballoc]; - ulsch->harq_processes[harq_pid]->nb_rb = RIV2nb_rb_LUT[rballoc]; - - if (ue->ul_power_control_dedicated[eNB_id].accumulationEnabled == 1) { - LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d nr_tti_rx %d: f_pusch (ACC) %d, adjusting by %d (TPC %d)\n", - ue->Mod_id,harq_pid,proc->frame_rx,nr_tti_rx,ulsch->f_pusch, - nr_delta_PUSCH_acc[ue->ulsch[eNB_id]->harq_processes[harq_pid]->TPC], - ue->ulsch[eNB_id]->harq_processes[harq_pid]->TPC); - ulsch->f_pusch += nr_delta_PUSCH_acc[ue->ulsch[eNB_id]->harq_processes[harq_pid]->TPC]; - } else { - LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d nr_tti_rx %d: f_pusch (ABS) %d, adjusting to %d (TPC %d)\n", - ue->Mod_id,harq_pid,proc->frame_rx,nr_tti_rx,ulsch->f_pusch, - nr_delta_PUSCH_abs[ue->ulsch[eNB_id]->harq_processes[harq_pid]->TPC], - ue->ulsch[eNB_id]->harq_processes[harq_pid]->TPC); - ulsch->f_pusch = nr_delta_PUSCH_abs[ue->ulsch[eNB_id]->harq_processes[harq_pid]->TPC]; - } - - if (ulsch->harq_processes[harq_pid]->first_tx==1) { - // ulsch->harq_processes[harq_pid]->Ndi = 1; - ulsch->harq_processes[harq_pid]->first_tx=0; - ulsch->harq_processes[harq_pid]->DCINdi= ndi; - ulsch->harq_processes[harq_pid]->round = 0; - } else { - if (ulsch->harq_processes[harq_pid]->DCINdi!=ndi) { // new SDU opportunity - // ulsch->harq_processes[harq_pid]->Ndi = 1; - ulsch->harq_processes[harq_pid]->DCINdi= ndi; - ulsch->harq_processes[harq_pid]->round = 0; - } else { - // ulsch->harq_processes[harq_pid]->Ndi = 0; - //ulsch->harq_processes[harq_pid]->round++; // This is done in phich RX - - //#ifdef DEBUG_PHICH - //LOG_I(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d Adaptative Retrans, NDI not toggled => Nack. maxHARQ_Tx %d \n", - // ue->Mod_id,harq_pid, - // proc->frame_rx, - // subframe, - // ulsch->Mlimit); - //#endif -/* - if (ulsch->harq_processes[harq_pid]->round > 0) // NACK detected on phich - { - // ulsch->harq_processes[harq_pid]->round++; already done on phich_rx - // ulsch->harq_processes[harq_pid] = ulsch->harq_processes[8]; - // LOG_I(PHY," Adaptative retransmission - copy temporary harq Process to current harq process. [harqId %d round %d] \n",harq_pid, ulsch->harq_processes[8]->round); - - if (ulsch->harq_processes[harq_pid]->round >= ulsch->Mlimit) //UE_mac_inst[eNB_id].scheduling_info.maxHARQ_Tx) - { - ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 0; - ulsch->harq_processes[harq_pid]->round = 0; - ulsch->harq_processes[harq_pid]->status = IDLE; - //LOG_I(PHY," PUSCH MAX Retransmission acheived ==> flush harq buff (%d) \n",harq_pid); - //LOG_I(PHY," [HARQ-UL harqId: %d] Adaptative retransmission NACK MAX RETRANS(%d) ==> subframe_scheduling_flag = %d round: %d\n", harq_pid, UE_mac_inst[eNB_id].scheduling_info.maxHARQ_Tx, ulsch->harq_processes[harq_pid]->subframe_scheduling_flag, ulsch->harq_processes[harq_pid]->round); - } - else - { - // ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 1; - uint8_t rv_table[4] = {0, 2, 3, 1}; - ulsch->harq_processes[harq_pid]->rvidx = rv_table[ulsch->harq_processes[harq_pid]->round&3]; - ulsch->O_RI = 0; - ulsch->O = 0; - ulsch->uci_format = HLC_subband_cqi_nopmi; - //LOG_I(PHY," [HARQ-UL harqId: %d] Adaptative retransmission NACK ==> subframe_scheduling_flag = %d round: %d\n", harq_pid, ulsch->harq_processes[harq_pid]->subframe_scheduling_flag,ulsch->harq_processes[harq_pid]->round); - } - } -*/ - } - } - - ulsch->harq_processes[harq_pid]->n_DMRS = cshift; - - //printf("nb_rb %d, first_rb %d (RIV %d)\n",ulsch->harq_processes[harq_pid]->nb_rb,ulsch->harq_processes[harq_pid]->first_rb,rballoc); - if ((rnti >= cba_rnti) && (rnti < p_rnti)) { - // ulsch->cba_rnti[0]=rnti; - } else { - ulsch->rnti = rnti; - } - - // printf("[PHY][UE] DCI format 0: harq_pid %d nb_rb %d, rballoc %d\n",harq_pid,ulsch->harq_processes[harq_pid]->nb_rb, - // ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->rballoc); - //Mapping of cyclic shift field in DCI format0 to n_DMRS2 (3GPP 36.211, Table 5.5.2.1.1-1) - if(cshift == 0) - ulsch->harq_processes[harq_pid]->n_DMRS2 = 0; - else if(cshift == 1) - ulsch->harq_processes[harq_pid]->n_DMRS2 = 6; - else if(cshift == 2) - ulsch->harq_processes[harq_pid]->n_DMRS2 = 3; - else if(cshift == 3) - ulsch->harq_processes[harq_pid]->n_DMRS2 = 4; - else if(cshift == 4) - ulsch->harq_processes[harq_pid]->n_DMRS2 = 2; - else if(cshift == 5) - ulsch->harq_processes[harq_pid]->n_DMRS2 = 8; - else if(cshift == 6) - ulsch->harq_processes[harq_pid]->n_DMRS2 = 10; - else if(cshift == 7) - ulsch->harq_processes[harq_pid]->n_DMRS2 = 9; - - - //reserved for cooperative communication - /* - if(ulsch->n_DMRS2 == 6) - ulsch->cooperation_flag = 2; - else - ulsch->cooperation_flag = 0; - */ - - if ((ulsch->harq_processes[harq_pid]->nb_rb>0) && (ulsch->harq_processes[harq_pid]->nb_rb < 25)) - ulsch->power_offset = ue_power_offsets[ulsch->harq_processes[harq_pid]->nb_rb-1]; - - // if (ulsch->harq_processes[harq_pid]->Ndi == 1) - // ulsch->harq_processes[harq_pid]->status = ACTIVE; - - - if (cqi_req == 1) { - - if( (AntennaInfoDedicated__transmissionMode_tm3 == transmission_mode) || (AntennaInfoDedicated__transmissionMode_tm4 == transmission_mode) ) - { - ulsch->O_RI = 1; - } - else - { - ulsch->O_RI = 0; - } - //ulsch->O_RI = 0; //we only support 2 antenna ports, so this is always 1 according to 3GPP 36.213 Table - - switch(transmission_mode) { - // The aperiodic CQI reporting mode is fixed for every transmission mode instead of being configured by higher layer signaling - case 1: - if ((rnti >= cba_rnti) && (rnti < p_rnti)) { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_5MHz; - break; - - case 50: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_10MHz; - break; - - case 100: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_20MHz; - break; - } - - ulsch->uci_format = HLC_subband_cqi_mcs_CBA; - ulsch->o_RI[0] = 0; - } else if(meas->rank[eNB_id] == 0) { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_5MHz; - break; - - case 50: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_10MHz; - break; - - case 100: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_20MHz; - break; - } - - ulsch->uci_format = HLC_subband_cqi_nopmi; - ulsch->o_RI[0] = 0; - } else { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_5MHz; - break; - - case 50: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_10MHz; - break; - - case 100: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_20MHz; - break; - } - - ulsch->uci_format = HLC_subband_cqi_nopmi; - ulsch->o_RI[0] = 1; - } - - break; - - case 2: - if ((rnti >= cba_rnti) && (rnti < p_rnti)) { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_5MHz; - break; - - case 50: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_10MHz; - break; - - case 100: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_20MHz; - break; - } - - ulsch->uci_format = HLC_subband_cqi_mcs_CBA; - ulsch->o_RI[0] = 0; - } else if(meas->rank[eNB_id] == 0) { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_5MHz; - break; - - case 50: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_10MHz; - break; - - case 100: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_20MHz; - break; - } - - ulsch->uci_format = HLC_subband_cqi_nopmi; - ulsch->o_RI[0] = 0; - } else { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_5MHz; - break; - - case 50: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_10MHz; - break; - - case 100: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_20MHz; - break; - } - - ulsch->uci_format = HLC_subband_cqi_nopmi; - ulsch->o_RI[0] = 1; - } - - break; - - case 3: - if ((rnti >= cba_rnti) && (rnti < p_rnti)) { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_5MHz; - break; - - case 50: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_10MHz; - break; - - case 100: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_20MHz; - break; - } - - ulsch->uci_format = HLC_subband_cqi_mcs_CBA; - ulsch->o_RI[0] = 0; - } else if(meas->rank[eNB_id] == 0) { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_5MHz; - break; - - case 50: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_10MHz; - break; - - case 100: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_20MHz; - break; - } - - ulsch->uci_format = HLC_subband_cqi_nopmi; - ulsch->o_RI[0] = 0; - } else { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_5MHz; - break; - - case 50: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_10MHz; - break; - - case 100: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_20MHz; - break; - } - - ulsch->uci_format = HLC_subband_cqi_nopmi; - ulsch->o_RI[0] = 1; - } - - break; - - case 4: - if ((rnti >= cba_rnti) && (rnti < p_rnti)) { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_5MHz; - break; - - case 50: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_10MHz; - break; - - case 100: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_20MHz; - break; - } - - ulsch->uci_format = HLC_subband_cqi_mcs_CBA; - ulsch->o_RI[0] = 0; - } else if(meas->rank[eNB_id] == 0) { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_wideband_cqi_rank1_2A_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_wideband_cqi_rank1_2A_5MHz; - break; - - case 50: - ulsch->O = sizeof_wideband_cqi_rank1_2A_10MHz; - break; - - case 100: - ulsch->O = sizeof_wideband_cqi_rank1_2A_20MHz; - break; - } - - ulsch->uci_format = wideband_cqi_rank1_2A; - ulsch->o_RI[0] = 0; - } else { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_wideband_cqi_rank2_2A_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_wideband_cqi_rank2_2A_5MHz; - break; - - case 50: - ulsch->O = sizeof_wideband_cqi_rank2_2A_10MHz; - break; - - case 100: - ulsch->O = sizeof_wideband_cqi_rank2_2A_20MHz; - break; - } - - ulsch->uci_format = wideband_cqi_rank2_2A; - ulsch->o_RI[0] = 1; - } - - break; - - case 5: - if ((rnti >= cba_rnti) && (rnti < p_rnti)) { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_5MHz; - break; - - case 50: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_10MHz; - break; - - case 100: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_20MHz; - break; - } - - ulsch->uci_format = HLC_subband_cqi_mcs_CBA; - ulsch->o_RI[0] = 0; - } else if(meas->rank[eNB_id] == 0) { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_wideband_cqi_rank1_2A_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_wideband_cqi_rank1_2A_5MHz; - break; - - case 50: - ulsch->O = sizeof_wideband_cqi_rank1_2A_10MHz; - break; - - case 100: - ulsch->O = sizeof_wideband_cqi_rank1_2A_20MHz; - break; - } - - ulsch->uci_format = wideband_cqi_rank1_2A; - ulsch->o_RI[0] = 0; - } else { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_wideband_cqi_rank2_2A_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_wideband_cqi_rank2_2A_5MHz; - break; - - case 50: - ulsch->O = sizeof_wideband_cqi_rank2_2A_10MHz; - break; - - case 100: - ulsch->O = sizeof_wideband_cqi_rank2_2A_20MHz; - break; - } - - ulsch->uci_format = wideband_cqi_rank2_2A; - ulsch->o_RI[0] = 1; - } - - break; - - case 6: - if ((rnti >= cba_rnti) && (rnti < p_rnti)) { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_5MHz; - break; - - case 50: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_10MHz; - break; - - case 100: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_20MHz; - break; - } - - ulsch->uci_format = HLC_subband_cqi_mcs_CBA; - ulsch->o_RI[0] = 0; - } else if(meas->rank[eNB_id] == 0) { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_wideband_cqi_rank1_2A_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_wideband_cqi_rank1_2A_5MHz; - break; - - case 50: - ulsch->O = sizeof_wideband_cqi_rank1_2A_10MHz; - break; - - case 100: - ulsch->O = sizeof_wideband_cqi_rank1_2A_20MHz; - break; - } - - ulsch->uci_format = wideband_cqi_rank1_2A; - ulsch->o_RI[0] = 0; - } else { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_wideband_cqi_rank2_2A_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_wideband_cqi_rank2_2A_5MHz; - break; - - case 50: - ulsch->O = sizeof_wideband_cqi_rank2_2A_10MHz; - break; - - case 100: - ulsch->O = sizeof_wideband_cqi_rank2_2A_20MHz; - break; - } - - ulsch->uci_format = wideband_cqi_rank2_2A; - ulsch->o_RI[0] = 1; - } - - break; - - case 7: - if ((rnti >= cba_rnti) && (rnti < p_rnti)) { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_5MHz; - break; - - case 50: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_10MHz; - break; - - case 100: - ulsch->O = sizeof_HLC_subband_cqi_mcs_CBA_20MHz; - break; - } - - ulsch->uci_format = HLC_subband_cqi_mcs_CBA; - ulsch->o_RI[0] = 0; - } else if(meas->rank[eNB_id] == 0) { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_5MHz; - break; - - case 50: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_10MHz; - break; - - case 100: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_20MHz; - break; - } - - ulsch->uci_format = HLC_subband_cqi_nopmi; - ulsch->o_RI[0] = 0; - } else { - switch (ue->frame_parms.N_RB_DL) { - case 6: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_1_5MHz; - break; - - case 25: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_5MHz; - break; - - case 50: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_10MHz; - break; - - case 100: - ulsch->O = sizeof_HLC_subband_cqi_nopmi_20MHz; - break; - } - - ulsch->uci_format = HLC_subband_cqi_nopmi; - ulsch->o_RI[0] = 1; - } - - break; - - default: - LOG_E(PHY,"Incorrect Transmission Mode \n"); - break; - } - } else { - ulsch->O_RI = 0; - ulsch->O = 0; - ulsch->uci_format = HLC_subband_cqi_nopmi; - } - - print_CQI(ulsch->o,ulsch->uci_format,eNB_id,ue->frame_parms.N_RB_DL); - - ulsch->bundling = 1-AckNackFBMode; - - if (frame_parms->frame_type == FDD) { - //int dl_subframe = (subframe<4) ? (subframe+6) : (subframe-4); - int dl_tti = nr_tti_rx; - - if (ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id][0]->harq_ack[dl_tti].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; - } - /*LOG_I(PHY,"DCI 0 Processing: dl_subframe %d send_harq_status Odd %d send_harq_status Even %d harq_pid %d O_ACK %d\n", dl_subframe, - ue->dlsch[0][eNB_id][0]->harq_ack[dl_subframe].send_harq_status, - ue->dlsch[1][eNB_id][0]->harq_ack[dl_subframe].send_harq_status, - harq_pid, - ulsch->harq_processes[harq_pid]->O_ACK);*/ - - } else { - if (ulsch->bundling) - ulsch->harq_processes[harq_pid]->O_ACK = (dai == 3)? 0 : 1; - else - ulsch->harq_processes[harq_pid]->O_ACK = (dai >= 2)? 2 : (dai+1)&3; //(dai+1)&3; - - // ulsch->harq_processes[harq_pid]->V_UL_DAI = dai+1; - } - - dlsch[0]->harq_ack[nr_tti_rx].vDAI_UL = dai+1; - - - /*LOG_I(PHY, "[PUSCH %d] Format0 DCI %s, CQI_req=%d, cshift=%d, TPC=%d, DAI=%d, vDAI_UL[sf#%d]=%d, NDI=%d, MCS=%d, RBalloc=%d, first_rb=%d, harq_pid=%d, nb_rb=%d, subframe_scheduling_flag=%d" - " ulsch->bundling %d, O_ACK %d \n", - harq_pid, - (frame_parms->frame_type == TDD? "TDD" : "FDD"), - cqi_req, cshift, TPC, dai, subframe, dlsch[0]->harq_ack[subframe].vDAI_UL, ndi, mcs, rballoc, - ulsch->harq_processes[harq_pid]->first_rb, harq_pid, ulsch->harq_processes[harq_pid]->nb_rb, - ulsch->harq_processes[harq_pid]->subframe_scheduling_flag, - ulsch->bundling, - ulsch->harq_processes[harq_pid]->O_ACK);*/ - - ulsch->beta_offset_cqi_times8 = beta_cqi[ue->pusch_config_dedicated[eNB_id].betaOffset_CQI_Index];//18; - ulsch->beta_offset_ri_times8 = beta_ri[ue->pusch_config_dedicated[eNB_id].betaOffset_RI_Index];//10; - ulsch->beta_offset_harqack_times8 = beta_ack[ue->pusch_config_dedicated[eNB_id].betaOffset_ACK_Index];//16; - - ulsch->Nsymb_pusch = 12-(frame_parms->Ncp<<1)-(use_srs==0?0:1); - ulsch->srs_active = use_srs; - - if ((rnti >= cba_rnti) && (rnti < p_rnti)) - ulsch->harq_processes[harq_pid]->status = CBA_ACTIVE; - else - ulsch->harq_processes[harq_pid]->status = ACTIVE; - - ulsch->harq_processes[harq_pid]->rvidx = 0; - - // ulsch->harq_processes[harq_pid]->calibration_flag =0; - if (mcs < 29) { - ulsch->harq_processes[harq_pid]->mcs = mcs; - // ulsch->harq_processes[harq_pid]->round = 0; - } else { - ulsch->harq_processes[harq_pid]->rvidx = mcs - 28; - if (ulsch->harq_processes[harq_pid]->round == 0) { - LOG_W(PHY,"PUSCH::mcs = %d and DCI0::mcs(%d) > 28 and round == %d\n", ulsch->harq_processes[harq_pid]->mcs, mcs, ulsch->harq_processes[harq_pid]->round); - } else { - LOG_D(PHY,"PUSCH::mcs = %d and DCI0::mcs(%d) > 28 and round == %d\n", ulsch->harq_processes[harq_pid]->mcs, mcs, ulsch->harq_processes[harq_pid]->round); - } - //LOG_E(PHY,"Fatal: mcs(%d) > 28!!! and round == 0\n", mcs); - } - ulsch->harq_processes[harq_pid]->TBS = TBStableUL[get_I_TBS_UL(ulsch->harq_processes[harq_pid]->mcs)][ulsch->harq_processes[harq_pid]->nb_rb-1]; - - /* - else if (ulsch->harq_processes[harq_pid]->mcs == 29) { - ulsch->harq_processes[harq_pid]->mcs = 4; - ulsch->harq_processes[harq_pid]->TBS = TBStable[get_I_TBS_UL(ulsch->harq_processes[harq_pid]->mcs)][ulsch->harq_processes[harq_pid]->nb_rb-1]; - // ulsch->harq_processes[harq_pid]->calibration_flag =1; - // printf("Auto-Calibration (UE): mcs %d, TBS %d, nb_rb %d\n",ulsch->harq_processes[harq_pid]->mcs,ulsch->harq_processes[harq_pid]->TBS,ulsch->harq_processes[harq_pid]->nb_rb); - }*/ - ulsch->harq_processes[harq_pid]->Msc_initial = 12*ulsch->harq_processes[harq_pid]->nb_rb; - ulsch->harq_processes[harq_pid]->Nsymb_initial = ulsch->Nsymb_pusch; - - // a Ndi=1 automatically acknowledges previous PUSCH transmission - if (ue->ulsch_Msg3_active[eNB_id] == 1) - ue->ulsch_Msg3_active[eNB_id] = 0; - - LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d, nr_tti_rx %d : Programming PUSCH with n_DMRS2 %d (cshift %d), nb_rb %d, first_rb %d, mcs %d, round %d, rv %d, ulsch_ue_Msg3_active %d\n", - ue->Mod_id,harq_pid, - proc->frame_rx,nr_tti_rx,ulsch->harq_processes[harq_pid]->n_DMRS2,cshift,ulsch->harq_processes[harq_pid]->nb_rb,ulsch->harq_processes[harq_pid]->first_rb, - ulsch->harq_processes[harq_pid]->mcs,ulsch->harq_processes[harq_pid]->round,ulsch->harq_processes[harq_pid]->rvidx, ue->ulsch_Msg3_active[eNB_id]); - - // ulsch->n_DMRS2 = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->cshift; - -//printf("Format 0 DCI : ulsch (ue): AbsSubframe %d.%d nrb %d harq_pid %d round %d mcs %d\n",proc->frame_rx%1024,nr_tti_rx,ulsch->harq_processes[harq_pid]->nb_rb, - // harq_pid,ulsch->harq_processes[harq_pid]->round,ulsch->harq_processes[harq_pid]->mcs); - -#ifdef UE_DEBUG_TRACE - - LOG_I(PHY,"Format 0 DCI : ulsch (ue): AbsSubframe %d.%d\n",proc->frame_rx%1024,nr_tti_rx); - LOG_D(PHY,"Format 0 DCI : ulsch (ue): NBRB %d\n",ulsch->harq_processes[harq_pid]->nb_rb); - LOG_D(PHY,"Format 0 DCI :ulsch (ue): first_rb %d\n",ulsch->harq_processes[harq_pid]->first_rb); - LOG_D(PHY,"Format 0 DCI :ulsch (ue): rballoc %d\n",rballoc); - LOG_D(PHY,"Format 0 DCI :ulsch (ue): harq_pid %d\n",harq_pid); - LOG_D(PHY,"Format 0 DCI :ulsch (ue): first_tx %d\n",ulsch->harq_processes[harq_pid]->first_tx); - LOG_D(PHY,"Format 0 DCI :ulsch (ue): DCINdi %d\n",ulsch->harq_processes[harq_pid]->DCINdi); - LOG_D(PHY,"Format 0 DCI :ulsch (ue): round %d\n",ulsch->harq_processes[harq_pid]->round); - //LOG_I(PHY,"Format 0 DCI :ulsch (ue): TBS %d\n",ulsch->harq_processes[harq_pid]->TBS); - LOG_D(PHY,"Format 0 DCI :ulsch (ue): mcs %d\n",ulsch->harq_processes[harq_pid]->mcs); - //LOG_I(PHY,"Format 0 DCI :ulsch (ue): O %d\n",ulsch->O); - //LOG_I(PHY,"Format 0 DCI :ulsch (ue): cqiReq %d\n",cqi_req); - //if (frame_parms->frame_type == TDD) - // LOG_I(PHY,"Format 0 DCI :ulsch (ue): O_ACK/DAI %d/%d\n",ulsch->harq_processes[harq_pid]->O_ACK,dai); - //else - // LOG_I(PHY,"Format 0 DCI :ulsch (ue): O_ACK %d\n",ulsch->harq_processes[harq_pid]->O_ACK); - - LOG_D(PHY,"Format 0 DCI :ulsch (ue): Nsymb_pusch %d\n",ulsch->Nsymb_pusch); - LOG_D(PHY,"Format 0 DCI :ulsch (ue): cshift %d\n",ulsch->harq_processes[harq_pid]->n_DMRS2); - LOG_D(PHY,"Format 0 DCI :ulsch (ue): phich status %d\n",ulsch->harq_processes[harq_pid]->status); -#else - UNUSED_VARIABLE(dai); -#endif - return(0); - } else { - LOG_E(PHY,"frame %d, nr_tti_rx %d: FATAL ERROR, generate_ue_ulsch_params_from_dci, Illegal dci_format %d\n", - proc->frame_rx, nr_tti_rx,dci_format); - return(-1); - } - -} - -int generate_eNB_ulsch_params_from_dci(PHY_VARS_eNB *eNB, - eNB_rxtx_proc_t *proc, - void *dci_pdu, - uint16_t rnti, - DCI_format_t dci_format, - uint8_t UE_id, - uint16_t si_rnti, - uint16_t ra_rnti, - uint16_t p_rnti, - uint16_t cba_rnti, - uint8_t use_srs) -{ - - uint8_t harq_pid; - uint32_t rb_alloc; - uint8_t transmission_mode=eNB->transmission_mode[UE_id]; - ANFBmode_t AckNackFBMode = eNB->pucch_config_dedicated[UE_id].tdd_AckNackFeedbackMode; - LTE_eNB_ULSCH_t *ulsch=eNB->ulsch[UE_id]; - NR_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms; - int subframe = proc->subframe_tx; - - uint32_t cqi_req = 0; - uint32_t dai = 0; - uint32_t cshift = 0; - uint32_t TPC = 0; - uint32_t mcs = 0; - uint32_t rballoc = UINT32_MAX; - uint32_t RIV_max = 0; - // uint32_t hopping; - // uint32_t type; - -#ifdef DEBUG_DCI - printf("filling eNB ulsch params for rnti %x, dci format %d, dci %x, subframe %d\n", - rnti,dci_format,*(uint32_t*)dci_pdu,subframe); -#endif - - if (dci_format == format0) { - - harq_pid = nr_subframe2harq_pid(frame_parms, - nr_pdcch_alloc2ul_frame(frame_parms, - proc->frame_tx, - subframe), - nr_pdcch_alloc2ul_subframe(frame_parms,subframe)); - switch (frame_parms->N_RB_DL) { - case 6: - if (frame_parms->frame_type == TDD) { - cqi_req = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->cqi_req; - dai = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->dai; - cshift = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->cshift; - TPC = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->TPC; - mcs = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->mcs; - rballoc = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->rballoc; - // hopping = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->hopping; - // type = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->type; - } else { - cqi_req = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->cqi_req; - cshift = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->cshift; - TPC = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->TPC; - mcs = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->mcs; - rballoc = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->rballoc; - // hopping = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->hopping; - // type = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->type; - } - - RIV_max = RIV_max6; - ulsch->harq_processes[harq_pid]->first_rb = RIV2first_rb_LUT6[rballoc]; - ulsch->harq_processes[harq_pid]->nb_rb = RIV2nb_rb_LUT6[rballoc]; - - break; - - case 25: - if (frame_parms->frame_type == TDD) { - cqi_req = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->cqi_req; - dai = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->dai; - cshift = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->cshift; - TPC = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->TPC; - mcs = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->mcs; - rballoc = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->rballoc; - // hopping = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->hopping; - // type = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->type; - } else { - cqi_req = ((DCI0_5MHz_FDD_t *)dci_pdu)->cqi_req; - cshift = ((DCI0_5MHz_FDD_t *)dci_pdu)->cshift; - TPC = ((DCI0_5MHz_FDD_t *)dci_pdu)->TPC; - mcs = ((DCI0_5MHz_FDD_t *)dci_pdu)->mcs; - rballoc = ((DCI0_5MHz_FDD_t *)dci_pdu)->rballoc; - // hopping = ((DCI0_5MHz_FDD_t *)dci_pdu)->hopping; - // type = ((DCI0_5MHz_FDD_t *)dci_pdu)->type; - } - - RIV_max = RIV_max25; - ulsch->harq_processes[harq_pid]->first_rb = RIV2first_rb_LUT25[rballoc]; - ulsch->harq_processes[harq_pid]->nb_rb = RIV2nb_rb_LUT25[rballoc]; - - break; - - case 50: - if (frame_parms->frame_type == TDD) { - cqi_req = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->cqi_req; - dai = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->dai; - cshift = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->cshift; - TPC = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->TPC; - mcs = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->mcs; - rballoc = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->rballoc; - // hopping = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->hopping; - // type = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->type; - } else { - cqi_req = ((DCI0_10MHz_FDD_t *)dci_pdu)->cqi_req; - cshift = ((DCI0_10MHz_FDD_t *)dci_pdu)->cshift; - TPC = ((DCI0_10MHz_FDD_t *)dci_pdu)->TPC; - mcs = ((DCI0_10MHz_FDD_t *)dci_pdu)->mcs; - rballoc = ((DCI0_10MHz_FDD_t *)dci_pdu)->rballoc; - // hopping = ((DCI0_10MHz_FDD_t *)dci_pdu)->hopping; - // type = ((DCI0_10MHz_FDD_t *)dci_pdu)->type; - } - - RIV_max = RIV_max50; - ulsch->harq_processes[harq_pid]->first_rb = RIV2first_rb_LUT50[rballoc]; - ulsch->harq_processes[harq_pid]->nb_rb = RIV2nb_rb_LUT50[rballoc]; - - break; - - case 100: - if (frame_parms->frame_type == TDD) { - cqi_req = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->cqi_req; - dai = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->dai; - cshift = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->cshift; - TPC = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->TPC; - mcs = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->mcs; - rballoc = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->rballoc; - // hopping = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->hopping; - // type = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->type; - } else { - cqi_req = ((DCI0_20MHz_FDD_t *)dci_pdu)->cqi_req; - cshift = ((DCI0_20MHz_FDD_t *)dci_pdu)->cshift; - TPC = ((DCI0_20MHz_FDD_t *)dci_pdu)->TPC; - mcs = ((DCI0_20MHz_FDD_t *)dci_pdu)->mcs; - rballoc = ((DCI0_20MHz_FDD_t *)dci_pdu)->rballoc; - // hopping = ((DCI0_20MHz_FDD_t *)dci_pdu)->hopping; - // type = ((DCI0_20MHz_FDD_t *)dci_pdu)->type; - } - - RIV_max = RIV_max100; - ulsch->harq_processes[harq_pid]->first_rb = RIV2first_rb_LUT100[rballoc]; - ulsch->harq_processes[harq_pid]->nb_rb = RIV2nb_rb_LUT100[rballoc]; - - //printf("eNB: rb_alloc (20 MHz dci) %d\n",rballoc); - break; - - default: - LOG_E(PHY,"Invalid N_RB_DL %d\n", frame_parms->N_RB_DL); - DevParam (frame_parms->N_RB_DL, 0, 0); - break; - } - - rb_alloc = rballoc; - - if (rb_alloc>RIV_max) { - LOG_E(PHY,"Format 0: rb_alloc (%d) > RIV_max (%d)\n",rb_alloc,RIV_max); - mac_xface->macphy_exit("Format 0: error"); - return(-1); - } - -#ifdef DEBUG_DCI - printf("generate_eNB_ulsch_params_from_dci: subframe %d, rnti %x,harq_pid %d,cqi_req %d\n",subframe,rnti,harq_pid,cqi_req); -#endif - - ulsch->harq_processes[harq_pid]->dci_alloc = 1; - ulsch->harq_processes[harq_pid]->rar_alloc = 0; - ulsch->harq_processes[harq_pid]->TPC = TPC; - ulsch->harq_processes[harq_pid]->n_DMRS = cshift; - - - if (cqi_req == 1) { - /* 36.213 7.2.1 (release 10) says: - * "RI is only reported for transmission modes 3 and 4, - * as well as transmission modes 8 and 9 with PMI/RI reporting" - * This is for aperiodic reporting. - * TODO: deal with TM 8&9 correctly when they are implemented. - * TODO: deal with periodic reporting if we implement it. - */ - if (transmission_mode == 3 || transmission_mode == 4) - ulsch->harq_processes[harq_pid]->O_RI = 1; //we only support 2 antenna ports, so this is always 1 according to 3GPP 36.213 Table - else - ulsch->harq_processes[harq_pid]->O_RI = 0; - - switch(transmission_mode) { - // The aperiodic CQI reporting mode is fixed for every transmission mode instead of being configured by higher layer signaling - case 1: - if ((rnti >= cba_rnti) && (rnti < p_rnti)) { - ulsch->harq_processes[harq_pid]->Or2 = 0; - - switch (frame_parms->N_RB_DL) { - case 6: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_1_5MHz; - break; - - case 25: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_5MHz; - break; - - case 50: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_10MHz; - break; - - case 100: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_20MHz; - break; - } - - ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_mcs_CBA; - } else { - ulsch->harq_processes[harq_pid]->Or2 = 0; - - switch (frame_parms->N_RB_DL) { - case 6: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_nopmi_1_5MHz; - break; - - case 25: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_nopmi_5MHz; - break; - - case 50: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_nopmi_10MHz; - break; - - case 100: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_nopmi_20MHz; - break; - } - - ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_nopmi; - } - - break; - - case 2: - if ((rnti >= cba_rnti) && (rnti < p_rnti)) { - ulsch->harq_processes[harq_pid]->Or2 = 0; - - switch (frame_parms->N_RB_DL) { - case 6: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_1_5MHz; - break; - - case 25: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_5MHz; - break; - - case 50: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_10MHz; - break; - - case 100: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_20MHz; - break; - } - - ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_mcs_CBA; - } else { - ulsch->harq_processes[harq_pid]->Or2 = 0; - - switch (frame_parms->N_RB_DL) { - case 6: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_nopmi_1_5MHz; - break; - - case 25: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_nopmi_5MHz; - break; - - case 50: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_nopmi_10MHz; - break; - - case 100: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_nopmi_20MHz; - break; - } - - ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_nopmi; - } - - break; - - case 3: - if ((rnti >= cba_rnti) && (rnti < p_rnti)) { - ulsch->harq_processes[harq_pid]->Or2 = 0; - - switch (frame_parms->N_RB_DL) { - case 6: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_1_5MHz; - break; - - case 25: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_5MHz; - break; - - case 50: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_10MHz; - break; - - case 100: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_20MHz; - break; - } - - ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_mcs_CBA; - } else { - ulsch->harq_processes[harq_pid]->Or2 = 0; - - switch (frame_parms->N_RB_DL) { - case 6: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_nopmi_1_5MHz; - break; - - case 25: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_nopmi_5MHz; - break; - - case 50: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_nopmi_10MHz; - break; - - case 100: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_nopmi_20MHz; - break; - } - - ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_nopmi; - } - - break; - - case 4: - if ((rnti >= cba_rnti) && (rnti < p_rnti)) { - ulsch->harq_processes[harq_pid]->Or2 = 0; - - switch (frame_parms->N_RB_DL) { - case 6: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_1_5MHz; - break; - - case 25: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_5MHz; - break; - - case 50: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_10MHz; - break; - - case 100: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_20MHz; - break; - } - - ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_mcs_CBA; - } else { - switch (frame_parms->N_RB_DL) { - case 6: - ulsch->harq_processes[harq_pid]->Or2 = sizeof_wideband_cqi_rank2_2A_1_5MHz; - ulsch->harq_processes[harq_pid]->Or1 = sizeof_wideband_cqi_rank1_2A_1_5MHz; - break; - - case 25: - ulsch->harq_processes[harq_pid]->Or2 = sizeof_wideband_cqi_rank2_2A_5MHz; - ulsch->harq_processes[harq_pid]->Or1 = sizeof_wideband_cqi_rank1_2A_5MHz; - break; - - case 50: - ulsch->harq_processes[harq_pid]->Or2 = sizeof_wideband_cqi_rank2_2A_10MHz; - ulsch->harq_processes[harq_pid]->Or1 = sizeof_wideband_cqi_rank1_2A_10MHz; - break; - - case 100: - ulsch->harq_processes[harq_pid]->Or2 = sizeof_wideband_cqi_rank2_2A_20MHz; - ulsch->harq_processes[harq_pid]->Or1 = sizeof_wideband_cqi_rank1_2A_20MHz; - break; - - } - - ulsch->harq_processes[harq_pid]->uci_format = wideband_cqi_rank1_2A; - } - - break; - - case 5: - if ((rnti >= cba_rnti) && (rnti < p_rnti)) { - ulsch->harq_processes[harq_pid]->Or2 = 0; - - switch (frame_parms->N_RB_DL) { - case 6: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_1_5MHz; - break; - - case 25: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_5MHz; - break; - - case 50: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_10MHz; - break; - - case 100: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_20MHz; - break; - } - - ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_mcs_CBA; - } else { - switch (frame_parms->N_RB_DL) { - case 6: - ulsch->harq_processes[harq_pid]->Or2 = sizeof_wideband_cqi_rank2_2A_1_5MHz; - ulsch->harq_processes[harq_pid]->Or1 = sizeof_wideband_cqi_rank1_2A_1_5MHz; - break; - - case 25: - ulsch->harq_processes[harq_pid]->Or2 = sizeof_wideband_cqi_rank2_2A_5MHz; - ulsch->harq_processes[harq_pid]->Or1 = sizeof_wideband_cqi_rank1_2A_5MHz; - break; - - case 50: - ulsch->harq_processes[harq_pid]->Or2 = sizeof_wideband_cqi_rank2_2A_10MHz; - ulsch->harq_processes[harq_pid]->Or1 = sizeof_wideband_cqi_rank1_2A_10MHz; - break; - - case 100: - ulsch->harq_processes[harq_pid]->Or2 = sizeof_wideband_cqi_rank2_2A_20MHz; - ulsch->harq_processes[harq_pid]->Or1 = sizeof_wideband_cqi_rank1_2A_20MHz; - break; - } - - ulsch->harq_processes[harq_pid]->uci_format = wideband_cqi_rank1_2A; - } - - break; - - case 6: - if ((rnti >= cba_rnti) && (rnti < p_rnti)) { - ulsch->harq_processes[harq_pid]->Or2 = 0; - - switch (frame_parms->N_RB_DL) { - case 6: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_1_5MHz; - break; - - case 25: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_5MHz; - break; - - case 50: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_10MHz; - break; - - case 100: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_mcs_CBA_20MHz; - break; - } - - ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_mcs_CBA; - } else { - switch (frame_parms->N_RB_DL) { - case 6: - ulsch->harq_processes[harq_pid]->Or2 = sizeof_wideband_cqi_rank2_2A_1_5MHz; - ulsch->harq_processes[harq_pid]->Or1 = sizeof_wideband_cqi_rank1_2A_1_5MHz; - break; - - case 25: - ulsch->harq_processes[harq_pid]->Or2 = sizeof_wideband_cqi_rank2_2A_5MHz; - ulsch->harq_processes[harq_pid]->Or1 = sizeof_wideband_cqi_rank1_2A_5MHz; - break; - - case 50: - ulsch->harq_processes[harq_pid]->Or2 = sizeof_wideband_cqi_rank2_2A_10MHz; - ulsch->harq_processes[harq_pid]->Or1 = sizeof_wideband_cqi_rank1_2A_10MHz; - break; - - case 100: - ulsch->harq_processes[harq_pid]->Or2 = sizeof_wideband_cqi_rank2_2A_20MHz; - ulsch->harq_processes[harq_pid]->Or1 = sizeof_wideband_cqi_rank1_2A_20MHz; - break; - } - - ulsch->harq_processes[harq_pid]->uci_format = wideband_cqi_rank1_2A; - } - - break; - - case 7: - ulsch->harq_processes[harq_pid]->Or2 = 0; - - switch (frame_parms->N_RB_DL) { - case 6: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_nopmi_1_5MHz; - break; - - case 25: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_nopmi_5MHz; - break; - - case 50: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_nopmi_10MHz; - break; - - case 100: - ulsch->harq_processes[harq_pid]->Or1 = sizeof_HLC_subband_cqi_nopmi_20MHz; - break; - } - - ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_nopmi; - break; - - default: - LOG_E(PHY,"Incorrect Transmission Mode \n"); - break; - } - } else { - ulsch->harq_processes[harq_pid]->O_RI = 0; - ulsch->harq_processes[harq_pid]->Or2 = 0; - ulsch->harq_processes[harq_pid]->Or1 = 0; - ulsch->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_nopmi; - } - - ulsch->bundling = 1-AckNackFBMode; - - if (frame_parms->frame_type == FDD) { - int dl_subframe = (subframe<4) ? (subframe+6) : (subframe-4); - - if (eNB->dlsch[UE_id][0]->subframe_tx[dl_subframe]>0) { // we have downlink transmission - ulsch->harq_processes[harq_pid]->O_ACK = 1; - } else { - ulsch->harq_processes[harq_pid]->O_ACK = 0; - } - } else { - if (ulsch->bundling) - ulsch->harq_processes[harq_pid]->O_ACK = (dai == 3)? 0 : 1; - else - ulsch->harq_processes[harq_pid]->O_ACK = (dai+1)&3; - - ulsch->harq_processes[harq_pid]->V_UL_DAI = dai+1; - } - - ulsch->beta_offset_cqi_times8 = beta_cqi[eNB->pusch_config_dedicated[UE_id].betaOffset_CQI_Index];//18; - ulsch->beta_offset_ri_times8 = beta_ri[eNB->pusch_config_dedicated[UE_id].betaOffset_RI_Index];//10; - ulsch->beta_offset_harqack_times8 = beta_ack[eNB->pusch_config_dedicated[UE_id].betaOffset_ACK_Index];//16; - - ulsch->harq_processes[harq_pid]->Nsymb_pusch = 12-(frame_parms->Ncp<<1)-(use_srs==0?0:1); - ulsch->harq_processes[harq_pid]->srs_active = use_srs; - - //Mapping of cyclic shift field in DCI format0 to n_DMRS2 (3GPP 36.211, Table 5.5.2.1.1-1) - if(cshift == 0) - ulsch->harq_processes[harq_pid]->n_DMRS2 = 0; - else if(cshift == 1) - ulsch->harq_processes[harq_pid]->n_DMRS2 = 6; - else if(cshift == 2) - ulsch->harq_processes[harq_pid]->n_DMRS2 = 3; - else if(cshift == 3) - ulsch->harq_processes[harq_pid]->n_DMRS2 = 4; - else if(cshift == 4) - ulsch->harq_processes[harq_pid]->n_DMRS2 = 2; - else if(cshift == 5) - ulsch->harq_processes[harq_pid]->n_DMRS2 = 8; - else if(cshift == 6) - ulsch->harq_processes[harq_pid]->n_DMRS2 = 10; - else if(cshift == 7) - ulsch->harq_processes[harq_pid]->n_DMRS2 = 9; - - - LOG_D(PHY,"[eNB %d][PUSCH %d] Frame %d, subframe %d : Programming PUSCH with n_DMRS2 %d (cshift %d)\n", - eNB->Mod_id,harq_pid,proc->frame_tx,subframe,ulsch->harq_processes[harq_pid]->n_DMRS2,cshift); - - - - if (ulsch->harq_processes[harq_pid]->round == 0) { - if ((rnti >= cba_rnti) && (rnti < p_rnti)) - ulsch->harq_processes[harq_pid]->status = CBA_ACTIVE; - else - ulsch->harq_processes[harq_pid]->status = ACTIVE; - - ulsch->harq_processes[harq_pid]->rvidx = 0; - ulsch->harq_processes[harq_pid]->mcs = mcs; - // ulsch->harq_processes[harq_pid]->calibration_flag = 0; - //if (ulsch->harq_processes[harq_pid]->mcs) - /* - if (ulsch->harq_processes[harq_pid]->mcs == 29) { - ulsch->harq_processes[harq_pid]->mcs = 4; - // ulsch->harq_processes[harq_pid]->calibration_flag = 1; - // printf("Auto-Calibration (eNB): mcs %d, nb_rb %d\n",ulsch->harq_processes[harq_pid]->mcs,ulsch->harq_processes[harq_pid]->nb_rb); - } - */ - ulsch->harq_processes[harq_pid]->TBS = TBStableUL[get_I_TBS_UL(ulsch->harq_processes[harq_pid]->mcs)][ulsch->harq_processes[harq_pid]->nb_rb-1]; - - ulsch->harq_processes[harq_pid]->Msc_initial = 12*ulsch->harq_processes[harq_pid]->nb_rb; - ulsch->harq_processes[harq_pid]->Nsymb_initial = ulsch->harq_processes[harq_pid]->Nsymb_pusch; - ulsch->harq_processes[harq_pid]->round = 0; - } else { - if (mcs>28) - ulsch->harq_processes[harq_pid]->rvidx = mcs - 28; - else { - ulsch->harq_processes[harq_pid]->rvidx = 0; - ulsch->harq_processes[harq_pid]->mcs = mcs; - } - - // ulsch->harq_processes[harq_pid]->round++; - } - - if ((rnti >= cba_rnti) && (rnti < p_rnti)) { - ulsch->cba_rnti[0] = rnti; - } else { - ulsch->rnti = rnti; - } - - //ulsch->n_DMRS2 = cshift; - -#ifdef DEBUG_DCI - printf("ulsch (eNB): NBRB %d\n",ulsch->harq_processes[harq_pid]->nb_rb); - printf("ulsch (eNB): first_rb %d\n",ulsch->harq_processes[harq_pid]->first_rb); - printf("ulsch (eNB): harq_pid %d\n",harq_pid); - printf("ulsch (eNB): round %d\n",ulsch->harq_processes[harq_pid]->round); - printf("ulsch (eNB): TBS %d\n",ulsch->harq_processes[harq_pid]->TBS); - printf("ulsch (eNB): mcs %d\n",ulsch->harq_processes[harq_pid]->mcs); - printf("ulsch (eNB): Or1 %d\n",ulsch->harq_processes[harq_pid]->Or1); - printf("ulsch (eNB): Nsymb_pusch %d\n",ulsch->harq_processes[harq_pid]->Nsymb_pusch); - printf("ulsch (eNB): cshift %d\n",ulsch->harq_processes[harq_pid]->n_DMRS2); -#else - UNUSED_VARIABLE(dai); -#endif - return(0); - } else { - LOG_E(PHY,"generate_eNB_ulsch_params_from_dci, Illegal dci_format %d\n",dci_format); - return(-1); - } - -} - - -double sinr_eff_cqi_calc(PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t nr_tti_rx) -{ - uint8_t transmission_mode = ue->transmission_mode[eNB_id]; - PHY_MEASUREMENTS *meas = &ue->measurements; - NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; - int32_t **dl_channel_est = ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates[eNB_id]; - double *s_dB; - s_dB = ue->sinr_CQI_dB; - // NR_UE_ULSCH_t *ulsch = ue->ulsch[eNB_id]; - //for the calculation of SINR_eff for CQI calculation - int count,a_rx,a_tx; - double abs_channel=0; - double channelx=0; - double channely=0; - double channelx_i=0; - double channely_i=0; - uint16_t q = quantize_subband_pmi(meas,eNB_id,7); - uint8_t qq; - - switch(transmission_mode) { - case 1: - for (count=0; countN_RB_DL*12; count++) { - for(a_tx=0; a_txnb_antenna_ports_eNB; a_tx++) { - for (a_rx=0; a_rxnb_antennas_rx; a_rx++) { - s_dB[count] = 10*log10(pow(((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2],2) + pow(((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2], - 2)) - meas->n0_power_avg_dB; - } - } - } - - break; - - case 2: - for (count=0; countN_RB_DL*12; count++) { - abs_channel=0; - - for(a_tx=0; a_txnb_antenna_ports_eNB; a_tx++) { - for (a_rx=0; a_rxnb_antennas_rx; a_rx++) { - abs_channel += (pow(((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2],2) + pow(((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2],2)); - } - } - - s_dB[count] = 10*log10(abs_channel/2) - meas->n0_power_avg_dB; - } - - break; - - case 5: - for (count=0; countN_RB_DL*12; count++) { - channelx=0; - channely=0; - channelx_i=0; - channely_i=0; - qq = (q>>(((count/12)>>2)<<1))&3; - - //printf("pmi_alloc %d: rb %d, pmi %d\n",q,count/12,qq); - for(a_tx=0; a_txnb_antenna_ports_eNB; a_tx++) { - for (a_rx=0; a_rxnb_antennas_rx; a_rx++) { - switch(qq) { - case 0: - if (channelx==0 || channely==0) { - channelx = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - channely = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - channelx_i = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - channely_i = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - } else { - channelx += ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - channely += ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - channelx_i -= ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - channely_i -= ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - } - - break; - - case 1: - if (channelx==0 || channely==0) { - channelx = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - channely = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - channelx_i = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - channely_i = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - } else { - channelx -= ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - channely -= ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - channelx_i += ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - channely_i += ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - } - - break; - - case 2: - if (channelx==0 || channely==0) { - channelx = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - channely = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - channelx_i = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - channely_i = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - } else { - channelx -= ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - channely += ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - channelx_i += ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - channely_i -= ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - } - - break; - - case 3: - if (channelx==0 || channely==0) { - channelx = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - channely = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - channelx_i = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - channely_i = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - } else { - channelx += ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - channely -= ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - channelx_i -= ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - channely_i += ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - } - - break; - - default: - printf("Problem in SINR Calculation for TM5 \n"); - break; - }//switch(qq) - }//a_rx - }//a_tx - - s_dB[count] = 10 * log10 ((pow(channelx,2) + pow(channely,2))/2) - 10 * log10 ((pow(channelx_i,2) + pow(channely_i,2))/2) - meas->n0_power_avg_dB; - }//count - - break; - - case 6: - for (count=0; countN_RB_DL*12; count++) { - channelx=0; - channely=0; - qq = (q>>(((count/12)>>2)<<1))&3; - - //printf("pmi_alloc %d: rb %d, pmi %d\n",q,count/12,qq); - for(a_tx=0; a_txnb_antenna_ports_eNB; a_tx++) { - for (a_rx=0; a_rxnb_antennas_rx; a_rx++) { - switch(qq) { - case 0: - if (channelx==0 || channely==0) { - channelx = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - channely = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - } else { - channelx += ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - channely += ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - } - - break; - - case 1: - if (channelx==0 || channely==0) { - channelx = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - channely = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - } else { - channelx -= ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - channely -= ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - } - - break; - - case 2: - if (channelx==0 || channely==0) { - channelx = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - channely = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - } else { - channelx -= ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - channely += ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - } - - break; - - case 3: - if (channelx==0 || channely==0) { - channelx = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - channely = ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - } else { - channelx += ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+1+(LTE_CE_FILTER_LENGTH)*2]; - channely -= ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count+(LTE_CE_FILTER_LENGTH)*2]; - } - - break; - - default: - printf("Problem in SINR Calculation for TM6 \n"); - break; - }//switch(qq) - }//a_rx - }//a_tx - - s_dB[count] = 10 * log10 ((pow(channelx,2) + pow(channely,2))/2) - meas->n0_power_avg_dB; - }//count - - break; - - default: - printf("Problem in SINR Calculation for CQI \n"); - break; - } - - int ii; - double sinr_eff = 0; - double sinr_eff_qpsk=0; - double sinr_eff_qam16=0; - double sinr_eff_qam64=0; - double x = 0; - double I_qpsk=0; - double I_qam16=0; - double I_qam64=0; - double I_qpsk_avg=0; - double I_qam16_avg=0; - double I_qam64_avg=0; - double qpsk_max=12.2; - double qam16_max=19.2; - double qam64_max=25.2; - double sinr_min = -20; - int offset=0; - - - for (offset = 0; offset <= 24; offset++) { - for(ii=0; ii<12; ii++) { - //x is the sinr_dB in dB - x = s_dB[(offset*12)+ii]; - - if(xqpsk_max) - I_qpsk += 1; - else - I_qpsk += (q_qpsk[0]*pow(x,7) + q_qpsk[1]*pow(x,6) + q_qpsk[2]*pow(x,5) + q_qpsk[3]*pow(x,4) + q_qpsk[4]*pow(x,3) + q_qpsk[5]*pow(x,2) + q_qpsk[6]*x + q_qpsk[7]); - - if(x>qam16_max) - I_qam16 += 1; - else - I_qam16 += (q_qam16[0]*pow(x,7) + q_qam16[1]*pow(x,6) + q_qam16[2]*pow(x,5) + q_qam16[3]*pow(x,4) + q_qam16[4]*pow(x,3) + q_qam16[5]*pow(x,2) + q_qam16[6]*x + q_qam16[7]); - - if(x>qam64_max) - I_qam64 += 1; - else - I_qam64 += (q_qam64[0]*pow(x,7) + q_qam64[1]*pow(x,6) + q_qam64[2]*pow(x,5) + q_qam64[3]*pow(x,4) + q_qam64[4]*pow(x,3) + q_qam64[5]*pow(x,2) + q_qam64[6]*x + q_qam64[7]); - - } - } - } - - // averaging of accumulated MI - I_qpsk_avg = I_qpsk/(12*frame_parms->N_RB_DL); - I_qam16_avg = I_qam16/(12*frame_parms->N_RB_DL); - I_qam64_avg = I_qam64/(12*frame_parms->N_RB_DL); - - // I->SINR_effective Mapping - - sinr_eff_qpsk = (p_qpsk[0]*pow(I_qpsk_avg,7) + p_qpsk[1]*pow(I_qpsk_avg,6) + p_qpsk[2]*pow(I_qpsk_avg,5) + p_qpsk[3]*pow(I_qpsk_avg,4) + p_qpsk[4]*pow(I_qpsk_avg,3) + p_qpsk[5]*pow(I_qpsk_avg, - 2) + p_qpsk[6]*I_qpsk_avg + p_qpsk[7]); - - sinr_eff_qam16 = (p_qam16[0]*pow(I_qam16_avg,7) + p_qam16[1]*pow(I_qam16_avg,6) + p_qam16[2]*pow(I_qam16_avg,5) + p_qam16[3]*pow(I_qam16_avg,4) + p_qam16[4]*pow(I_qam16_avg, - 3) + p_qam16[5]*pow(I_qam16_avg,2) + p_qam16[6]*I_qam16_avg + p_qam16[7]); - - sinr_eff_qam64 = (p_qam64[0]*pow(I_qam64_avg,7) + p_qam64[1]*pow(I_qam64_avg,6) + p_qam64[2]*pow(I_qam64_avg,5) + p_qam64[3]*pow(I_qam64_avg,4) + p_qam64[4]*pow(I_qam64_avg, - 3) + p_qam64[5]*pow(I_qam64_avg,2) + p_qam64[6]*I_qam64_avg + p_qam64[7]); - sinr_eff = cmax3(sinr_eff_qpsk,sinr_eff_qam16,sinr_eff_qam64); - - //printf("SINR_Eff = %e\n",sinr_eff); - - return(sinr_eff); -} -// - - -#ifdef DEBUG_DLSCH_TOOLS -main() -{ - - int i; - uint8_t rah; - uint32_t rballoc; - - generate_RIV_tables(); - - rah = 0; - rballoc = 0x1fff; - printf("rballoc 0 %x => %x\n",rballoc,conv_rballoc(rah,rballoc)); - rah = 1; - - rballoc = 0x1678; - printf("rballoc 1 %x => %x\n",rballoc,conv_rballoc(rah,rballoc)); - - rballoc = 0xfffc; - printf("rballoc 1 %x => %x\n",rballoc,conv_rballoc(rah,rballoc)); - rballoc = 0xfffd; - printf("rballoc 1 %x => %x\n",rballoc,conv_rballoc(rah,rballoc)); - rballoc = 0xffff; - printf("rballoc 1 %x => %x\n",rballoc,conv_rballoc(rah,rballoc)); - rballoc = 0xfffe; - printf("rballoc 1 %x => %x\n",rballoc,conv_rballoc(rah,rballoc)); -} - -#endif -#endif //(0) From 090fcc5aae072cf9c45af1a64caa6f48a4c64f95 Mon Sep 17 00:00:00 2001 From: laurent Date: Mon, 8 Oct 2018 11:25:16 +0200 Subject: [PATCH 292/379] move mem_block to heap --- openair2/UTIL/MEM/mem_block.c | 2 ++ openair2/UTIL/MEM/mem_block.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/openair2/UTIL/MEM/mem_block.c b/openair2/UTIL/MEM/mem_block.c index 6d1a289f08..0150ef00cd 100644 --- a/openair2/UTIL/MEM/mem_block.c +++ b/openair2/UTIL/MEM/mem_block.c @@ -61,6 +61,7 @@ uint32_t counters[14] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; /* * initialize all ures */ +extern mem_pool *memBlockVar; void * pool_buffer_init (void) { @@ -68,6 +69,7 @@ pool_buffer_init (void) uint32_t index, mb_index, pool_index; mem_pool *memory = (mem_pool *) &mem_block_var; + memBlockVar=malloc(sizeof(mem_pool)); int pool_sizes[14] = { MEM_MNGT_MB0_NB_BLOCKS, MEM_MNGT_MB1_NB_BLOCKS, MEM_MNGT_MB2_NB_BLOCKS, MEM_MNGT_MB3_NB_BLOCKS, MEM_MNGT_MB4_NB_BLOCKS, MEM_MNGT_MB5_NB_BLOCKS, diff --git a/openair2/UTIL/MEM/mem_block.h b/openair2/UTIL/MEM/mem_block.h index 861e4a8ea4..18ded1a599 100644 --- a/openair2/UTIL/MEM/mem_block.h +++ b/openair2/UTIL/MEM/mem_block.h @@ -178,7 +178,8 @@ typedef struct { } mem_pool; -mem_pool mem_block_var; +mem_pool *memBlockVar; +#define mem_block_var (*memBlockVar) #ifdef __cplusplus } From 24e9667ced8e7264b308cccb34ab3583d621beb4 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 8 Oct 2018 11:57:39 +0200 Subject: [PATCH 293/379] CI: adding --mu option to one of the VM-built variant Signed-off-by: Raphael Defosseux --- ci-scripts/buildOnVM.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-scripts/buildOnVM.sh b/ci-scripts/buildOnVM.sh index 3eb24932bf..2a358c9bac 100755 --- a/ci-scripts/buildOnVM.sh +++ b/ci-scripts/buildOnVM.sh @@ -127,7 +127,7 @@ case $key in ARCHIVES_LOC=enb_usrp LOG_PATTERN=.Rel14.txt NB_PATTERN_FILES=4 - BUILD_OPTIONS="--eNB -w USRP" + BUILD_OPTIONS="--eNB -w USRP --mu" shift ;; -v2) @@ -181,7 +181,7 @@ case $key in ARCHIVES_LOC=enb_usrp LOG_PATTERN=.Rel14.txt NB_PATTERN_FILES=4 - BUILD_OPTIONS="--eNB -w USRP" + BUILD_OPTIONS="--eNB -w USRP --mu" ;; basic-sim) VM_NAME=ci-basic-sim From 5eceff9ff071daf7ce9c5c9b2896b3e0fab2406f Mon Sep 17 00:00:00 2001 From: "Bi-Ruei, Chiu" Date: Tue, 9 Oct 2018 09:18:27 +0800 Subject: [PATCH 294/379] Update asn1c to commit d3aed06bb2bec7df1b5c6d0333f8c7dfc5993372 1. Fix the problem of compiling NR_RangeToBestCell.c of NR-RRC 15.3.0 2. Fix the problem that default OCTET/BIT STRING value not used in APER 3. Add support of extension group inside CHOICE type used in LTE-RRC 15.3.0 4. Fix the problem that NGAP 15.0.0 ASN.1 can not generate C files --- cmake_targets/tools/build_helper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 3363bd2e76..18e0d54746 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -683,7 +683,7 @@ install_asn1c_from_source(){ # better to use a given commit than a branch in case the branch # is updated and requires modifications in the source of OAI #git checkout velichkov_s1ap_plus_option_group - git checkout 73d6b23dcec9ab36605b4af884143824392134c1 + git checkout d3aed06bb2bec7df1b5c6d0333f8c7dfc5993372 autoreconf -iv ./configure make -j`nproc` From 061fb00feafea070d56e3b23776194973c6e4a79 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Tue, 9 Oct 2018 08:46:43 +0200 Subject: [PATCH 295/379] added new polar decoder implementation --- cmake_targets/CMakeLists.txt | 1 + openair1/PHY/CODING/TESTBENCH/polartest.c | 37 +- openair1/PHY/CODING/nrPolar_init.c | 39 ++ .../CODING/nrPolar_tools/nr_polar_decoder.c | 394 ++++++++--------- .../nrPolar_tools/nr_polar_decoding_tools.c | 416 +++++++++++++----- .../PHY/CODING/nrPolar_tools/nr_polar_defs.h | 324 +++++++++++--- 6 files changed, 817 insertions(+), 394 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 5d5fc808d4..d1659c7067 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -1123,6 +1123,7 @@ set(PHY_POLARSRC ${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_bit_insertion.c ${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_channel_interleaver_pattern.c # ${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_crc.c +# ${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/decoder_K56_N512_E864.c ${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c ${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_info_bit_pattern.c ${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_interleaving_pattern.c diff --git a/openair1/PHY/CODING/TESTBENCH/polartest.c b/openair1/PHY/CODING/TESTBENCH/polartest.c index 9a10b42edb..e23c69215a 100644 --- a/openair1/PHY/CODING/TESTBENCH/polartest.c +++ b/openair1/PHY/CODING/TESTBENCH/polartest.c @@ -43,8 +43,9 @@ int main(int argc, char *argv[]) { double timeEncoderCumulative = 0, timeDecoderCumulative = 0; uint8_t decoderListSize = 8, pathMetricAppr = 0; //0 --> eq. (8a) and (11b), 1 --> eq. (9) and (12) + int generate_optim_code=0; - while ((arguments = getopt (argc, argv, "s:d:f:m:i:l:a:h:q")) != -1) + while ((arguments = getopt (argc, argv, "s:d:f:m:i:l:a:h:qg")) != -1) switch (arguments) { case 's': @@ -80,6 +81,13 @@ int main(int argc, char *argv[]) { decoder_int8=1; break; + case 'g': + generate_optim_code=1; + iterations=1; + SNRstart=-6.0; + SNRstop =-6.0; + decoder_int8=1; + break; case 'h': printf("./polartest -s SNRstart -d SNRinc -f SNRstop -m [0=DCI|1=PBCH|2=UCI] -i iterations -l decoderListSize -a pathMetricAppr\n"); exit(-1); @@ -141,12 +149,18 @@ int main(int argc, char *argv[]) { t_nrPolar_params nrPolar_params; nr_polar_init(&nrPolar_params, polarMessageType); + nr_polar_llrtableinit(); + + if (generate_optim_code==1) nrPolar_params.decoder_kernel = NULL; // We assume no a priori knowledge available about the payload. double aPrioriArray[nrPolar_params.payloadBits]; for (int i=0; i<=nrPolar_params.payloadBits; i++) aPrioriArray[i] = NAN; + printf("SNRstart %f, SNRstop %f,, SNRinc %f\n",SNRstart,SNRstop,SNRinc); + for (SNR = SNRstart; SNR <= SNRstop; SNR += SNRinc) { + printf("SNR %f\n",SNR); SNR_lin = pow(10, SNR/10); for (itr = 1; itr <= iterations; itr++) { @@ -165,20 +179,29 @@ int main(int argc, char *argv[]) { modulatedInput[i]=(-1)/sqrt(2); channelOutput[i] = modulatedInput[i] + (gaussdouble(0.0,1.0) * (1/sqrt(2*SNR_lin))); + if (decoder_int8==1) { - if (channelOutput[i] > 1024) channelOutput_int8[i] = 32768; - else if (channelOutput[i] < -1023) channelOutput_int8[i] = -32767; - else channelOutput_int8[i] = (int16_t) (32*channelOutput[i]); + if (channelOutput[i] > 15) channelOutput_int8[i] = 127; + else if (channelOutput[i] < -16) channelOutput_int8[i] = -128; + else channelOutput_int8[i] = (int16_t) (8*channelOutput[i]); } } start_meas(&timeDecoder); - if (decoder_int8==0) decoderState = polar_decoder(channelOutput, estimatedOutput, &nrPolar_params, decoderListSize, aPrioriArray, pathMetricAppr,&polar_decoder_init,&polar_rate_matching,&decoding,&bit_extraction,&deinterleaving,&sorting,&path_metric,&update_LLR); + if (decoder_int8==0) + decoderState = polar_decoder(channelOutput, estimatedOutput, &nrPolar_params, + decoderListSize, aPrioriArray, pathMetricAppr, + &polar_decoder_init,&polar_rate_matching,&decoding, + &bit_extraction,&deinterleaving,&sorting,&path_metric,&update_LLR); else - decoderState = polar_decoder_int8(channelOutput_int8, estimatedOutput, &nrPolar_params, decoderListSize, &polar_decoder_init,&polar_rate_matching,&decoding,&bit_extraction,&deinterleaving,&sorting,&path_metric,&update_LLR); + decoderState = polar_decoder_int8_new(channelOutput_int8, estimatedOutput, &nrPolar_params, + decoderListSize, &polar_decoder_init,&polar_rate_matching, + &decoding,&bit_extraction,&deinterleaving, + &sorting,&path_metric,&update_LLR, + generate_optim_code); stop_meas(&timeDecoder); - + //calculate errors if (decoderState==-1) { blockErrorState=-1; diff --git a/openair1/PHY/CODING/nrPolar_init.c b/openair1/PHY/CODING/nrPolar_init.c index 65422ee073..5928e0684f 100644 --- a/openair1/PHY/CODING/nrPolar_init.c +++ b/openair1/PHY/CODING/nrPolar_init.c @@ -62,6 +62,11 @@ uint32_t poly24c = 0xB2B11700; //101100101011000100010111 -> D^24... polarParams->nr_polar_u = malloc(sizeof(uint8_t) * polarParams->N); //Decoder: nr_polar_uHat polarParams->nr_polar_cPrime = malloc(sizeof(uint8_t) * polarParams->K); //Decoder: nr_polar_cHat polarParams->nr_polar_b = malloc(sizeof(uint8_t) * polarParams->K); //Decoder: nr_polar_bHat + + polarParams->decoder_kernel = NULL;//polar_decoder_K56_N512_E864; + + + } else if (messageType == 2) { //UCI polarParams->payloadBits = NR_POLAR_PUCCH_PAYLOAD_BITS; //A depends on what they carry... polarParams->encoderLength = NR_POLAR_PUCCH_E ; //E depends on other standards 6.3.1.4 @@ -131,6 +136,7 @@ uint32_t poly24c = 0xB2B11700; //101100101011000100010111 -> D^24... polarParams->nr_polar_u = malloc(sizeof(uint8_t) * polarParams->N); //Decoder: nr_polar_uHat polarParams->nr_polar_cPrime = malloc(sizeof(uint8_t) * polarParams->K); //Decoder: nr_polar_cHat polarParams->nr_polar_b = malloc(sizeof(uint8_t) * polarParams->K); //Decoder: nr_polar_bHat + } polarParams->crcCorrectionBits = NR_POLAR_CRC_ERROR_CORRECTION_BITS; @@ -161,5 +167,38 @@ uint32_t poly24c = 0xB2B11700; //101100101011000100010111 -> D^24... nr_polar_channel_interleaver_pattern(polarParams->channel_interleaver_pattern, polarParams->i_bil, polarParams->encoderLength); + polarParams->extended_crc_generator_matrix = malloc(polarParams->K * sizeof(uint8_t *)); //G_P3 + uint8_t tempECGM[polarParams->K][polarParams->crcParityBits]; + for (int i = 0; i < polarParams->K; i++){ + polarParams->extended_crc_generator_matrix[i] = malloc(polarParams->crcParityBits * sizeof(uint8_t)); + } + + for (int i=0; ipayloadBits; i++) { + for (int j=0; jcrcParityBits; j++) { + tempECGM[i][j]=polarParams->crc_generator_matrix[i][j]; + } + } + for (int i=polarParams->payloadBits; iK; i++) { + for (int j=0; jcrcParityBits; j++) { + if( (i-polarParams->payloadBits) == j ){ + tempECGM[i][j]=1; + } else { + tempECGM[i][j]=0; + } + } + } + + for (int i=0; iK; i++) { + for (int j=0; jcrcParityBits; j++) { + polarParams->extended_crc_generator_matrix[i][j]=tempECGM[polarParams->interleaving_pattern[i]][j]; + } + } + + + build_decoder_tree(polarParams); + printf("decoder tree nodes %d\n",polarParams->tree.num_nodes); + + + free(J); } diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c index 11d4eb522f..67fe489424 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c @@ -29,7 +29,6 @@ #include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h" #include "PHY/TOOLS/time_meas.h" -#define SHOWCOMP 1 int8_t polar_decoder( double *input, @@ -50,31 +49,6 @@ int8_t polar_decoder( start_meas(init); - - uint8_t **bitUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True - uint8_t **llrUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True - decoder_list_t dlist[2*listSize]; - - for ( int i=0;i<2*listSize;i++) { - // dlist[i].bit = nr_alloc_uint8_t_2D_array((polarParams->n+1), polarParams->N); - // dlist[i].llr = nr_alloc_double_2D_array((polarParams->n+1), polarParams->N); - //dlist[i].crcChecksum = malloc(sizeof(uint8_t)*polarParams->crcParityBits); - for (int j=0; j< polarParams->n+1; j++) { - memset((void*)&dlist[i].bit[j][0],0,sizeof(uint8_t)*polarParams->N); - memset((void*)&dlist[i].llr[j][0],0,sizeof(double)*polarParams->N); - } - for (int j=0;jcrcParityBits;j++) dlist[i].crcChecksum[j] = 0; - dlist[i].pathMetric = 0; - } - - for (int i=0; iN; i++) { - memset((void *)&llrUpdated[i][0],0,sizeof(uint8_t)*polarParams->n); - memset((void *)&bitUpdated[i][0],0,sizeof(uint8_t)*polarParams->n); - llrUpdated[i][polarParams->n]=1; - bitUpdated[i][0]=((polarParams->information_bit_pattern[i]+1) % 2); - } - - uint8_t **extended_crc_generator_matrix = malloc(polarParams->K * sizeof(uint8_t *)); //G_P3 uint8_t **tempECGM = malloc(polarParams->K * sizeof(uint8_t *)); //G_P2 for (int i = 0; i < polarParams->K; i++){ @@ -102,6 +76,31 @@ int8_t polar_decoder( extended_crc_generator_matrix[i][j]=tempECGM[polarParams->interleaving_pattern[i]][j]; } } + uint8_t **bitUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True + uint8_t **llrUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True + + decoder_list_t dlist[2*listSize]; + + for ( int i=0;i<2*listSize;i++) { + // dlist[i].bit = nr_alloc_uint8_t_2D_array((polarParams->n+1), polarParams->N); + // dlist[i].llr = nr_alloc_double_2D_array((polarParams->n+1), polarParams->N); + //dlist[i].crcChecksum = malloc(sizeof(uint8_t)*polarParams->crcParityBits); + for (int j=0; j< polarParams->n+1; j++) { + memset((void*)&dlist[i].bit[j][0],0,sizeof(uint8_t)*polarParams->N); + memset((void*)&dlist[i].llr[j][0],0,sizeof(double)*polarParams->N); + } + for (int j=0;jcrcParityBits;j++) dlist[i].crcChecksum[j] = 0; + dlist[i].pathMetric = 0; + } + + + for (int i=0; iN; i++) { + memset((void *)&llrUpdated[i][0],0,sizeof(uint8_t)*polarParams->n); + memset((void *)&bitUpdated[i][0],0,sizeof(uint8_t)*polarParams->n); + llrUpdated[i][polarParams->n]=1; + bitUpdated[i][0]=((polarParams->information_bit_pattern[i]+1) % 2); + } + stop_meas(init); start_meas(polar_rate_matching); @@ -155,6 +154,7 @@ int8_t polar_decoder( start_meas(sorting); + if (currentListSize <= listSize/2) { // until listsize is full we need to copy bit and LLR arrays to new entries // below we only copy the ones we need to keep for sure @@ -290,92 +290,8 @@ int8_t polar_decoder( } -#define decoder_int8_A(sorted_dlist,currentListSize,polarParams) {for (int i = 0; i < currentListSize; i++) { \ - for (int k = 0; k < (polarParams->n+1); k++) { \ - memcpy((void*)&sorted_dlist[i+currentListSize]->bit[k][0],\ - (void*)&sorted_dlist[i]->bit[k][0],\ - sizeof(uint8_t)*polarParams->N);\ - memcpy((void*)&sorted_dlist[i+currentListSize]->llr[k][0],\ - (void*)&sorted_dlist[i]->llr[k][0],\ - sizeof(int16_t)*polarParams->N);}}} -#define decoder_int8_B(sorted_dlist,currentListSize) {for (int i = 0; i < currentListSize; i++) {sorted_dlist[i]->bit[0][currentBit]=0;sorted_dlist[i+currentListSize]->bit[0][currentBit]=1;}} - -void inline decoder_int8_C(decoder_list_int8_t *sorted_dlist[], - t_nrPolar_params *polarParams, - int currentBit, - int currentListSize, - int listSize) { - - int32_t pathMetric[2*listSize]; - decoder_list_int8_t *temp_dlist[2*listSize]; - - int listIndex[2*listSize]; - int listIndex2[2*listSize]; - for (int i = 0; i < currentListSize; i++) { - listIndex[i]=i; - pathMetric[i] = sorted_dlist[i]->pathMetric; - } - nr_sort_asc_int16_1D_array_ind(pathMetric, listIndex, currentListSize); - for (int i=0;in+1); k++) { - - memcpy((void*)&sorted_dlist[i+listSize]->bit[k][0], - (void*)&sorted_dlist[i]->bit[k][0], - sizeof(uint8_t)*polarParams->N); - memcpy((void*)&sorted_dlist[i+listSize]->llr[k][0], - (void*)&sorted_dlist[i]->llr[k][0], - sizeof(int16_t)*polarParams->N); - } - sorted_dlist[i]->bit[0][currentBit]=0; - sorted_dlist[i+listSize]->bit[0][currentBit]=1; - } - else if (listIndex2[i+listSize]n+1); k++) { - memcpy((void*)&sorted_dlist[i+listSize]->bit[k][0], - (void*)&sorted_dlist[i]->bit[k][0], - sizeof(uint8_t)*polarParams->N); - memcpy((void*)&sorted_dlist[i+listSize]->llr[k][0], - (void*)&sorted_dlist[i]->llr[k][0], - sizeof(int16_t)*polarParams->N); - } - sorted_dlist[i+listSize]->bit[0][currentBit]=1; - - /* - decoder_list_t *tmp = sorted_dlist[i+listSize]; - sorted_dlist[i+listSize] = sorted_dlist[i]; - sorted_dlist[i+listSize]->pathMetric = tmp->pathMetric; - sorted_dlist[i+listSize]->bit[0][currentBit]=1; - memcpy((void*)&sorted_dlist[i+listSize]->crcChecksum[0], - (void*)&tmp->crcChecksum[0], - 24*sizeof(uint8_t));*/ - - } - } - - - - for (int i = 0; i < 2*listSize; i++) { - temp_dlist[i] = sorted_dlist[i]; - } - for (int i = 0; i < 2*listSize; i++) { - // printf("i %d => %d\n",i,listIndex[i]); - sorted_dlist[i] = temp_dlist[listIndex[i]]; - } -} - int8_t polar_decoder_int8(int16_t *input, uint8_t *output, t_nrPolar_params *polarParams, @@ -387,16 +303,22 @@ int8_t polar_decoder_int8(int16_t *input, time_stats_t *deinterleaving, time_stats_t *sorting, time_stats_t *path_metric, - time_stats_t *update_LLR) + time_stats_t *update_LLR, + int generate_optim_code) { - start_meas(init); - - - uint8_t **bitUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True - uint8_t **llrUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True + + uint8_t **bitUpdated; + uint8_t **llrUpdated; + + if (generate_optim_code == 1 || polarParams->decoder_kernel==NULL) { + bitUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True + llrUpdated = nr_alloc_uint8_t_2D_array(polarParams->N, (polarParams->n+1)); //0=False, 1=True + } decoder_list_int8_t dlist[2*listSize]; + + start_meas(init); for ( int i=0;i<2*listSize;i++) { // dlist[i].bit = nr_alloc_uint8_t_2D_array((polarParams->n+1), polarParams->N); @@ -409,48 +331,28 @@ int8_t polar_decoder_int8(int16_t *input, for (int j=0;jcrcParityBits;j++) dlist[i].crcChecksum[j] = 0; dlist[i].pathMetric = 0; } - - for (int i=0; iN; i++) { - memset((void *)&llrUpdated[i][0],0,sizeof(uint8_t)*polarParams->n); - memset((void *)&bitUpdated[i][0],0,sizeof(uint8_t)*polarParams->n); - llrUpdated[i][polarParams->n]=1; - bitUpdated[i][0]=((polarParams->information_bit_pattern[i]+1) % 2); - } - - - uint8_t **extended_crc_generator_matrix = malloc(polarParams->K * sizeof(uint8_t *)); //G_P3 - uint8_t **tempECGM = malloc(polarParams->K * sizeof(uint8_t *)); //G_P2 - for (int i = 0; i < polarParams->K; i++){ - extended_crc_generator_matrix[i] = malloc(polarParams->crcParityBits * sizeof(uint8_t)); - tempECGM[i] = malloc(polarParams->crcParityBits * sizeof(uint8_t)); - } - - for (int i=0; ipayloadBits; i++) { - for (int j=0; jcrcParityBits; j++) { - tempECGM[i][j]=polarParams->crc_generator_matrix[i][j]; - } - } - for (int i=polarParams->payloadBits; iK; i++) { - for (int j=0; jcrcParityBits; j++) { - if( (i-polarParams->payloadBits) == j ){ - tempECGM[i][j]=1; - } else { - tempECGM[i][j]=0; - } - } - } - - for (int i=0; iK; i++) { - for (int j=0; jcrcParityBits; j++) { - extended_crc_generator_matrix[i][j]=tempECGM[polarParams->interleaving_pattern[i]][j]; - } - } - + stop_meas(init); + + if (generate_optim_code == 1 || polarParams->decoder_kernel==NULL) { + for (int i=0; iN; i++) { + memset((void *)&llrUpdated[i][0],0,sizeof(uint8_t)*polarParams->n); + memset((void *)&bitUpdated[i][0],0,sizeof(uint8_t)*polarParams->n); + llrUpdated[i][polarParams->n]=1; + bitUpdated[i][0]=((polarParams->information_bit_pattern[i]+1) % 2); + } + } + + + start_meas(polar_rate_matching); int16_t d_tilde[polarParams->N];// = malloc(sizeof(double) * polarParams->N); nr_polar_rate_matching_int8(input, d_tilde, polarParams->rate_matching_pattern, polarParams->K, polarParams->N, polarParams->encoderLength); + for (int i=0;iN;i++) { + if (d_tilde[i]<-128) d_tilde[i]=-128; + else if (d_tilde[i]>127) d_tilde[i]=128; + } memcpy((void*)&dlist[0].llr[polarParams->n][0],(void*)&d_tilde[0],sizeof(int16_t)*polarParams->N); stop_meas(polar_rate_matching); @@ -464,70 +366,81 @@ int8_t polar_decoder_int8(int16_t *input, decoder_list_int8_t *sorted_dlist[2*listSize]; for (uint8_t i = 0; i < 2*listSize; i++) sorted_dlist[i] = &dlist[i]; + char fname[100]; + FILE *fd; + if (generate_optim_code==1) { + sprintf(fname,"decoder_K%d_N%d_E%d.c",polarParams->K,polarParams->N,polarParams->encoderLength); + if ((fd=fopen(fname,"w"))==NULL) {printf("Cannot open %s\n",fname); exit(-1);} + fprintf(fd,"#include \"nr_polar_defs.h\"\n"); + fprintf(fd,"void polar_decoder_K%d_N%d_E%d(t_nrPolar_params *polarParams,decoder_list_int8_t **sorted_dlist) {\n", + polarParams->K,polarParams->N,polarParams->encoderLength); + fprintf(fd,"int16_t mask,absllr;\n"); + } - for (uint16_t currentBit=0; currentBitN; currentBit++){ - // printf("***************** BIT %d (currentListSize %d, information_bit_pattern %d)\n", - // currentBit,currentListSize,polarParams->information_bit_pattern[currentBit]); - - start_meas(update_LLR); - updateLLR_int8(sorted_dlist, llrUpdated, bitUpdated, currentListSize, currentBit, 0, polarParams->N, (polarParams->n+1)); - stop_meas(update_LLR); - - if (polarParams->information_bit_pattern[currentBit]==0) { //Frozen bit. - updatePathMetric0_int8(sorted_dlist,currentListSize, currentBit); //approximation=0 --> 11b, approximation=1 --> 12 - } else { //Information or CRC bit. - start_meas(path_metric); - updatePathMetric2_int8(sorted_dlist, currentListSize, currentBit); - stop_meas(path_metric); + if (polarParams->decoder_kernel) polarParams->decoder_kernel(polarParams,sorted_dlist); + else { + for (uint16_t currentBit=0; currentBitN; currentBit++){ + printf("***************** BIT %d (currentListSize %d, information_bit_pattern %d)\n", + currentBit,currentListSize,polarParams->information_bit_pattern[currentBit]); - start_meas(sorting); + start_meas(update_LLR); + updateLLR_int8(sorted_dlist, llrUpdated, bitUpdated, currentListSize, currentBit, 0, polarParams->N, (polarParams->n+1),generate_optim_code,fd); + stop_meas(update_LLR); - if (currentListSize <= listSize/2) { - // until listsize is full we need to copy bit and LLR arrays to new entries - // below we only copy the ones we need to keep for sure - decoder_int8_A(sorted_dlist,currentListSize,polarParams); -#ifdef SHOWCOMP - printf("decoder_int8_A(sorted_dlist,%d,polarParams);\n",currentListSize); -#endif - } - decoder_int8_B(sorted_dlist,currentListSize); -#ifdef SHOWCOMP - printf("decoder_int8_B(sorted_dlist,%d);\n",currentListSize); -#endif + if (polarParams->information_bit_pattern[currentBit]==0) { //Frozen bit. + updatePathMetric0_int8(sorted_dlist,currentListSize, currentBit,generate_optim_code,fd); //approximation=0 --> 11b, approximation=1 --> 12 + } else { //Information or CRC bit. + start_meas(path_metric); + updatePathMetric2_int8(sorted_dlist, currentListSize, currentBit,generate_optim_code,fd); + stop_meas(path_metric); - bitUpdated[currentBit][0]=1; - - updateCrcChecksum2_int8(sorted_dlist,extended_crc_generator_matrix, currentListSize, nonFrozenBit, polarParams->crcParityBits); - - currentListSize*=2; - - //Keep only the best "listSize" number of entries. - if (currentListSize > listSize) { - - decoder_int8_C(sorted_dlist, - polarParams, - currentBit, - currentListSize, - listSize); -#ifdef SHOWCOMP - printf("decoder_int8_C(sorted_dlist,polarParams,%d,%d,%d);\n",currentBit,currentListSize,listSize); -#endif - currentListSize = listSize; + start_meas(sorting); + + if (currentListSize <= listSize/2) { + // until listsize is full we need to copy bit and LLR arrays to new entries + // below we only copy the ones we need to keep for sure + decoder_int8_A(sorted_dlist,currentListSize,polarParams); + if (generate_optim_code == 1) fprintf(fd,"decoder_int8_A(sorted_dlist,%d,polarParams);\n",currentListSize); + } + decoder_int8_B(sorted_dlist,currentBit,currentListSize); + if (generate_optim_code == 1) fprintf(fd,"decoder_int8_B(sorted_dlist,%d,%d);\n",currentBit,currentListSize); + + + bitUpdated[currentBit][0]=1; + + updateCrcChecksum2_int8(sorted_dlist,polarParams->extended_crc_generator_matrix, currentListSize, nonFrozenBit, polarParams->crcParityBits,generate_optim_code,fd); + + currentListSize*=2; + + //Keep only the best "listSize" number of entries. + if (currentListSize > listSize) { + + decoder_int8_C(sorted_dlist, + polarParams, + currentBit, + currentListSize, + listSize); + + if (generate_optim_code == 1) fprintf(fd,"decoder_int8_C(sorted_dlist,polarParams,%d,%d,%d);\n",currentBit,currentListSize,listSize); + + currentListSize = listSize; + } + + stop_meas(sorting); + + nonFrozenBit++; } - - stop_meas(sorting); - nonFrozenBit++; - } - } - - + + } + + if (generate_optim_code==1) fprintf(fd,"}\n"); for (uint8_t i = 0; i < fmin(listSize, (pow(2,polarParams->crcCorrectionBits)) ); i++) { - // printf("list index %d :",i); - // for (int j=0;jcrcParityBits;j++) printf("%d",sorted_dlist[i]->crcChecksum[j]); - // printf(" => %d (%f)\n",sorted_dlist[i]->crcState,sorted_dlist[i]->pathMetric); + // printf("list index %d / %d :",i,listSize); + // for (int j=0;jcrcParityBits;j++) printf("%d",sorted_dlist[i]->crcChecksum[j]); + // printf(" => (%d)\n",sorted_dlist[i]->pathMetric); int crcState = 1; for (int j=0;jcrcParityBits;j++) if (sorted_dlist[i]->crcChecksum[j]!=0) crcState=0; if (crcState == 1) { @@ -556,8 +469,69 @@ int8_t polar_decoder_int8(int16_t *input, nr_free_double_2D_array(dlist[i].llr, (polarParams->n+1)); free(dlist[i].crcChecksum); }*/ - nr_free_uint8_t_2D_array(extended_crc_generator_matrix, polarParams->K); - nr_free_uint8_t_2D_array(tempECGM, polarParams->K); + stop_meas(decoding); + return(0); +} + + +int8_t polar_decoder_int8_new(int16_t *input, + uint8_t *output, + t_nrPolar_params *polarParams, + uint8_t listSize, + time_stats_t *init, + time_stats_t *polar_rate_matching, + time_stats_t *decoding, + time_stats_t *bit_extraction, + time_stats_t *deinterleaving, + time_stats_t *sorting, + time_stats_t *path_metric, + time_stats_t *update_LLR, + int generate_optim_code) +{ + + + start_meas(init); + stop_meas(init); + + start_meas(polar_rate_matching); + + int16_t d_tilde[polarParams->N];// = malloc(sizeof(double) * polarParams->N); + nr_polar_rate_matching_int8(input, d_tilde, polarParams->rate_matching_pattern, polarParams->K, polarParams->N, polarParams->encoderLength); + for (int i=0;iN;i++) { + if (d_tilde[i]<-128) d_tilde[i]=-128; + else if (d_tilde[i]>127) d_tilde[i]=128; + } + memcpy((void*)&polarParams->tree.root->alpha[0],(void*)&d_tilde[0],sizeof(int16_t)*polarParams->N); + stop_meas(polar_rate_matching); + + /* + * SCL polar decoder. + */ + start_meas(decoding); + + generic_polar_decoder(polarParams,polarParams->tree.root); + + start_meas(bit_extraction); + //Extract the information bits (û to ĉ) + nr_polar_info_bit_extraction(polarParams->nr_polar_u, polarParams->nr_polar_cPrime, polarParams->information_bit_pattern, polarParams->N); + stop_meas(bit_extraction); + //Deinterleaving (ĉ to b) + start_meas(deinterleaving); + nr_polar_deinterleaver(polarParams->nr_polar_cPrime, polarParams->nr_polar_b, polarParams->interleaving_pattern, polarParams->K); + stop_meas(deinterleaving); + //Remove the CRC (â) + for (int j = 0; j < polarParams->payloadBits; j++) output[j]=polarParams->nr_polar_b[j]; + + + + // free(d_tilde); + /* + for (int i=0;i<2*listSize;i++) { + // printf("correct: Freeing dlist[%d].bit %p\n",i,dlist[i].bit); + nr_free_uint8_t_2D_array(dlist[i].bit, (polarParams->n+1)); + nr_free_double_2D_array(dlist[i].llr, (polarParams->n+1)); + free(dlist[i].crcChecksum); + }*/ stop_meas(decoding); return(0); } diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c index 723131584e..e215be2e2b 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c @@ -19,8 +19,9 @@ * contact@openairinterface.org */ +#include "PHY/impl_defs_top.h" #include "PHY/CODING/nrPolar_tools/nr_polar_defs.h" -#define SHOWCOMP 1 +#include "PHY/sse_intrin.h" inline void computeLLR(double llr[1+nmax][Nmax], uint16_t row, uint16_t col, uint16_t offset, uint8_t approximation) __attribute__((always_inline)); @@ -45,40 +46,28 @@ inline void computeLLR(double llr[1+nmax][Nmax], uint16_t row, uint16_t col, // printf("LLR (a %f, b %f): llr[%d][%d] %f\n",32*a,32*b,col,row,32*llr[col][row]); } -inline void computeLLR_int8(decoder_list_int8_t **dlist,int i, uint16_t row, uint16_t col, - uint16_t offset) __attribute__((always_inline)); -inline void computeLLR_int8(decoder_list_int8_t **dlist,int i, uint16_t row, uint16_t col, - uint16_t offset) { +int16_t llrtab[256][256]; - int16_t a; - int16_t b; - int16_t absA,absB; - int16_t maska,maskb; - int16_t minabs; - // int16_t **llr=dlist[i]->llr; +void nr_polar_llrtableinit() { + int16_t absA,absB; + int16_t maska,maskb; + int16_t minabs; -#ifdef SHOWCOMP - printf("computeLLR_int8(sorted_dlist,%d,%d,%d);\n",i,row,col,offset); -#endif - a = dlist[i]->llr[col + 1][row]; - b = dlist[i]->llr[col+1][row + offset]; - // printf("LLR: a %d, b %d\n",a,b); - maska = a>>15; - maskb = b>>15; - absA = (a+maska)^maska; - absB = (b+maskb)^maskb; - // printf("LLR: absA %d, absB %d\n",absA,absB); - minabs = absAllr[col][row] = minabs; - else - dlist[i]->llr[col][row] = -minabs; - // printf("LLR (a %d, b %d): llr[%d][%d] %d\n",a,b,col,row,llr[col][row]); + for (int a=-128;a<128;a++) { + for (int b=-128;b<128;b++) { + absA=abs(a); + absB=abs(b); + minabs = absA=0 && b>=0)) llrtab[a+128][b+128] = minabs; + else llrtab[a+128][b+128] = -minabs; + } + } } void updateLLR(decoder_list_t **dlist,uint8_t **llrU, uint8_t **bitU, uint8_t listSize, uint16_t row, uint16_t col, uint16_t xlen, uint8_t ylen, uint8_t approximation) { + uint16_t offset = (xlen/(1<<(ylen-col-1))); if (( (row) % (2*offset) ) >= offset ) { if (bitU[row-offset][col]==0) updateBit(dlist, bitU, listSize, (row-offset), col, xlen, ylen); @@ -96,33 +85,25 @@ void updateLLR(decoder_list_t **dlist,uint8_t **llrU, uint8_t **bitU, llrU[row][col]=1; } -#define updateLLR_int8_A(dlist,i,col,row,offset) if (dlist[(i)]->bit[(col)][(row)-(offset)]==0) dlist[(i)]->llr[(col)][(row)] = dlist[(i)]->llr[(col)+1][(row)-(offset)] + dlist[(i)]->llr[(col)+1][(row)]; else dlist[(i)]->llr[(col)][(row)] = -dlist[(i)]->llr[(col)+1][(row)-(offset)] + dlist[(i)]->llr[(col)+1][(row)]; - - void updateLLR_int8(decoder_list_int8_t **dlist,uint8_t **llrU, uint8_t **bitU, - uint8_t listSize, uint16_t row, uint16_t col, uint16_t xlen, uint8_t ylen) { + uint8_t listSize, uint16_t row, uint16_t col, uint16_t xlen, uint8_t ylen, + int generate_optim_code,FILE *fd) { uint16_t offset = (xlen/(1<<(ylen-col-1))); if (( (row) % (2*offset) ) >= offset ) { - if (bitU[row-offset][col]==0) updateBit_int8(dlist, bitU, listSize, (row-offset), col, xlen, ylen); - if (llrU[row-offset][col+1]==0) updateLLR_int8(dlist, llrU, bitU, listSize, (row-offset), (col+1), xlen, ylen); - if (llrU[row][col+1]==0) updateLLR_int8(dlist, llrU, bitU, listSize, row, (col+1), xlen, ylen); + if (bitU[row-offset][col]==0) updateBit_int8(dlist, bitU, listSize, (row-offset), col, xlen, ylen,generate_optim_code,fd); + if (llrU[row-offset][col+1]==0) updateLLR_int8(dlist, llrU, bitU, listSize, (row-offset), (col+1), xlen, ylen,generate_optim_code,fd); + if (llrU[row][col+1]==0) updateLLR_int8(dlist, llrU, bitU, listSize, row, (col+1), xlen, ylen,generate_optim_code,fd); - for (uint8_t i=0; ibit[col][row-offset]==0) - dlist[i]->llr[col][row] = dlist[i]->llr[col+1][row-offset] + dlist[i]->llr[col+1][row]; - else - dlist[i]->llr[col][row] = -dlist[i]->llr[col+1][row-offset] + dlist[i]->llr[col+1][row];*/ - } + if (generate_optim_code==1) fprintf(fd,"updateLLR_int8_A(sorted_dlist,%d,%d,%d,%d);\n",listSize,col,row,offset); + + updateLLR_int8_A(dlist,listSize,col,row,offset); + } else { - if (llrU[row][col+1]==0) updateLLR_int8(dlist, llrU, bitU, listSize, row, (col+1), xlen, ylen); - if (llrU[row+offset][col+1]==0) updateLLR_int8(dlist, llrU, bitU, listSize, (row+offset), (col+1), xlen, ylen); - for (int i=0;ibit[(col)][(row)] = dlist[(i)]->bit[(col)-1][(row)] -#define updateBit_int8_B(dlist,i,col,row,offset) dlist[(i)]->bit[(col)][(row)] = dlist[(i)]->bit[(col)-1][(row)]^dlist[(i)]->bit[(col)-1][(row)+(offset)] -void updateBit_int8(decoder_list_int8_t **dlist, uint8_t **bitU, uint8_t listSize, uint16_t row, - uint16_t col, uint16_t xlen, uint8_t ylen) { + +void updateBit_int8(decoder_list_int8_t **dlist, uint8_t **bitU, + uint8_t listSize, uint16_t row, + uint16_t col, uint16_t xlen, uint8_t ylen, + int generate_optim_code,FILE *fd) { + uint16_t offset = ( xlen/(pow(2,(ylen-col))) ); - for (uint8_t i=0; i= offset ) { - if (bitU[row][col-1]==0) updateBit_int8(dlist, bitU, listSize, row, (col-1), xlen, ylen); - // dlist[i]->bit[col][row] = dlist[i]->bit[col-1][row]; -#ifdef SHOWCOMP - printf("updateBit_int8_A(sorted_dlist,%d,%d,%d);\n",i,col,row); -#endif - updateBit_int8_A(dlist,i,col,row); + if (( (row) % (2*offset) ) >= offset ) { - } else { - if (bitU[row][col-1]==0) updateBit_int8(dlist, bitU, listSize, row, (col-1), xlen, ylen); - if (bitU[row+offset][col-1]==0) updateBit_int8(dlist, bitU, listSize, (row+offset), (col-1), xlen, ylen); + if (bitU[row][col-1]==0) updateBit_int8(dlist, bitU, listSize, row, (col-1), xlen, ylen,generate_optim_code,fd); + // dlist[i]->bit[col][row] = dlist[i]->bit[col-1][row]; + + if (generate_optim_code==1) fprintf(fd,"updateBit_int8_A(sorted_dlist,%d,%d,%d);\n",listSize,col,row); + + updateBit_int8_A(dlist,listSize,col,row); + + } else { + if (bitU[row][col-1]==0) updateBit_int8(dlist, bitU, listSize, row, (col-1), xlen, ylen,generate_optim_code,fd); + if (bitU[row+offset][col-1]==0) updateBit_int8(dlist, bitU, listSize, (row+offset), (col-1), xlen, ylen,generate_optim_code,fd); // dlist[i]->bit[col][row] = dlist[i]->bit[col-1][row]^dlist[i]->bit[col-1][row+offset]; // printf("updating dlist[%d]->bit[%d][%d] => %d\n",i,col,row,dlist[i]->bit[col][row]); -#ifdef SHOWCOMP - printf("updateBit_int8_B(sorted_dlist,%d,%d,%d,%d);\n",i,col,row,offset); -#endif - updateBit_int8_B(dlist,i,col,row,offset); - } + + if (generate_optim_code==1) fprintf(fd,"updateBit_int8_B(sorted_dlist,%d,%d,%d,%d);\n",listSize,col,row,offset); + + updateBit_int8_B(dlist,listSize,col,row,offset); } + bitU[row][col]=1; } @@ -193,17 +176,15 @@ void updatePathMetric(decoder_list_t **dlist,uint8_t listSize, uint8_t bitValue, } -#define updatePathMetric0_int8_A(dlist,i,row,mask,absllr) { mask=dlist[i]->llr[0][row]>>15;if(mask!=0){absllr=(dlist[i]->llr[0][row]+mask)^mask;dlist[i]->pathMetric+=absllr;}} -void updatePathMetric0_int8(decoder_list_int8_t **dlist,uint8_t listSize, uint16_t row) { + +void updatePathMetric0_int8(decoder_list_int8_t **dlist,uint8_t listSize, uint16_t row,int generate_optim_code,FILE *fd) { int16_t mask,absllr; - for (uint8_t i=0; ipathMetric = dlist[i]->pathMetric;if (dlist[i]->llr[0][row]<0) dlist[i]->pathMetric-=dlist[i]->llr[0][row];else dlist[i+listSize]->pathMetric += dlist[i]->llr[0][row];} -void updatePathMetric2_int8(decoder_list_int8_t **dlist, uint8_t listSize, uint16_t row) { + +void updatePathMetric2_int8(decoder_list_int8_t **dlist, uint8_t listSize, uint16_t row,int generate_optim_code,FILE *fd) { int i; - for (i = 0; i < listSize; i++) { -#ifdef SHOWCOMP - printf("updatePathMetric2_int8_A(sorted_dlist,%d,%d,%d);\n", - i,listSize,row); -#endif - updatePathMetric2_int8_A(dlist,i,listSize,row); - // dlist[i+listSize]->pathMetric = dlist[i]->pathMetric; - //if (dlist[i]->llr[0][row]<0) dlist[i]->pathMetric -= dlist[i]->llr[0][row]; - //else dlist[i+listSize]->pathMetric += dlist[i]->llr[0][row]; - } + + if (generate_optim_code == 1) fprintf(fd,"updatePathMetric2_int8_A(sorted_dlist,%d,%d);\n", + listSize,row); + + updatePathMetric2_int8_A(dlist,listSize,row); + // dlist[i+listSize]->pathMetric = dlist[i]->pathMetric; + //if (dlist[i]->llr[0][row]<0) dlist[i]->pathMetric -= dlist[i]->llr[0][row]; + //else dlist[i+listSize]->pathMetric += dlist[i]->llr[0][row]; + } @@ -283,32 +262,253 @@ void updateCrcChecksum2(decoder_list_t **dlist, uint8_t **crcGen, } } -#define updateCrcChecksum_int8_A(dlist,i,crcGen,i2,len) {for (uint8_t j = 0; j < len; j++) dlist[i]->crcChecksum[j] = (dlist[i]->crcChecksum[j]^crcGen[i2][j]);} + void updateCrcChecksum_int8(decoder_list_int8_t **dlist, uint8_t **crcGen, - uint8_t listSize, uint32_t i2, uint8_t len) { - for (uint8_t i = 0; i < listSize; i++) { -#ifdef SHOWCOMP - printf("updateCrcChecksum_int8_A(sorted_dlist,%d,crcGen,%d,%d);\n",i,i2,len); -#endif - updateCrcChecksum_int8_A(dlist,i,crcGen,i2,len); - // for (uint8_t j = 0; j < len; j++) { - // dlist[i]->crcChecksum[j] = ( (dlist[i]->crcChecksum[j] + crcGen[i2][j]) % 2 ); - // } - } + uint8_t listSize, uint32_t i2, uint8_t len,int generate_optim_code,FILE *fd) { + + if (generate_optim_code == 1) fprintf(fd,"updateCrcChecksum_int8_A(sorted_dlist,%d,crcGen,%d,%d);\n",listSize,i2,len); + + updateCrcChecksum_int8_A(dlist,listSize,crcGen,i2,len); + // for (uint8_t j = 0; j < len; j++) { + // dlist[i]->crcChecksum[j] = ( (dlist[i]->crcChecksum[j] + crcGen[i2][j]) % 2 ); + // } + } -#define updateCrcChecksum2_int8_A(dlist,i,listSize,crcGen,i2,len) {for (uint8_t j = 0; j < len; j++) dlist[i+listSize]->crcChecksum[j]=dlist[i]->crcChecksum[j]^crcGen[i2][j];} + void updateCrcChecksum2_int8(decoder_list_int8_t **dlist, uint8_t **crcGen, - uint8_t listSize, uint32_t i2, uint8_t len) { - for (uint8_t i = 0; i < listSize; i++) { -#ifdef SHOWCOMP - printf("updateCrcChecksum2_int8_A(sorted_dlist,%d,%d,crcGen,%d,%d);\n",i,listSize,i2,len); -#endif - updateCrcChecksum2_int8_A(dlist,i,listSize,crcGen,i2,len); - // for (uint8_t j = 0; j < len; j++) { + uint8_t listSize, uint32_t i2, uint8_t len,int generate_optim_code,FILE *fd) { + + if (generate_optim_code == 1) fprintf(fd,"updateCrcChecksum2_int8_A(sorted_dlist,%d,polarParams->extended_crc_generator_matrix,%d,%d);\n",listSize,i2,len); + + updateCrcChecksum2_int8_A(dlist,listSize,crcGen,i2,len); + // for (uint8_t j = 0; j < len; j++) { // dlist[i+listSize]->crcChecksum[j] = ( (dlist[i]->crcChecksum[j] + crcGen[i2][j]) % 2 ); // } + +} + + +decoder_node_t *new_decoder_node(int first_leaf_index,int level) { + + decoder_node_t *node=(decoder_node_t *)malloc(sizeof(decoder_node_t)); + + node->first_leaf_index=first_leaf_index; + node->level=level; + node->Nv = 1<leaf = 0; + node->left=(decoder_node_t *)NULL; + node->right=(decoder_node_t *)NULL; + node->all_frozen=0; + node->alpha = (int16_t*)malloc16(node->Nv*sizeof(int16_t)); + node->beta = (int8_t*)malloc16(node->Nv*sizeof(int16_t)); + memset((void*)node->beta,-1,node->Nv*sizeof(int16_t)); + + + return(node); +} + +decoder_node_t *add_nodes(int level,int first_leaf_index,t_nrPolar_params *pp) { + + int all_frozen_below=1; + int Nv = 1<tree.num_nodes,Nv,level); + pp->tree.num_nodes++; +#endif + if (level==0) { +#ifdef DEBUG_NEW_IMPL + printf("leaf %d (%s)\n",first_leaf_index,pp->information_bit_pattern[first_leaf_index]==1 ? "information or crc" : "frozen"); +#endif + new_node->leaf=1; + new_node->all_frozen = pp->information_bit_pattern[first_leaf_index]==0 ? 1 : 0; + return new_node; // this is a leaf node + } + + for (int i=0;iinformation_bit_pattern[i+first_leaf_index]>0) all_frozen_below=0; + } +if (all_frozen_below==0) new_node->left=add_nodes(level-1,first_leaf_index,pp); + else { +#ifdef DEBUG_NEW_IMPL + printf("aggregating frozen bits %d ... %d at level %d (%s)\n",first_leaf_index,first_leaf_index+Nv-1,level,((first_leaf_index/Nv)&1)==0?"left":"right"); +#endif + new_node->leaf=1; + new_node->all_frozen=1; + } + if (all_frozen_below==0) new_node->right=add_nodes(level-1,first_leaf_index+(Nv/2),pp); + + return(new_node); +} + +void build_decoder_tree(t_nrPolar_params *pp) { + + pp->tree.num_nodes=0; + pp->tree.root = add_nodes(pp->n,0,pp); + +} + +void applyFtoleft(t_nrPolar_params *pp,decoder_node_t *node) { + int16_t *alpha_v=node->alpha; + int16_t *alpha_l=node->left->alpha; + int16_t *betal = node->left->beta; + int16_t a,b,absa,absb,maska,maskb,minabs; + +#ifdef DEBUG_NEW_IMPL + printf("applyFtoleft %d, Nv %d (level %d,node->left (leaf %d, AF %d))\n",node->first_leaf_index,node->Nv,node->level,node->left->leaf,node->left->all_frozen); + + + for (int i=0;iNv;i++) printf("i%d (frozen %d): alpha_v[i] = %d\n",i,1-pp->information_bit_pattern[node->first_leaf_index+i],alpha_v[i]); +#endif + + + + if (node->left->all_frozen == 0) { + +#if defined(__AVX2__) + int avx2mod = (node->Nv/2)&15; + if (avx2mod == 0) { + __m256i a256,b256,absa256,absb256,minabs256; + int avx2len = node->Nv/2/16; + + for (int i=0;iNv/2;i++) { + a=alpha_v[i]; + b=alpha_v[i+(node->Nv/2)]; + maska=a>>15; + maskb=b>>15; + absa=(a+maska)^maska; + absb=(b+maskb)^maskb; + minabs = absaNv == 2) { // apply hard decision on left node + betal[0] = (alpha_l[0]>0) ? -1 : 1; +#ifdef DEBUG_NEW_IMPL + printf("betal[0] %d (%p)\n",betal[0],&betal[0]); +#endif + pp->nr_polar_u[node->first_leaf_index] = (betal[0]+1)>>1; +#ifdef DEBUG_NEW_IMPL + printf("Setting bit %d to %d (LLR %d)\n",node->first_leaf_index,(betal[0]+1)>>1,alpha_l[0]); +#endif + } } } + +void applyGtoright(t_nrPolar_params *pp,decoder_node_t *node) { + + int16_t *alpha_v=node->alpha; + int16_t *alpha_r=node->right->alpha; + int16_t *betal = node->left->beta; + int16_t *betar = node->right->beta; + int8_t frozen_mask=-1; + + if (node->Nv == 2) frozen_mask=-pp->information_bit_pattern[node->first_leaf_index+1]; +#ifdef DEBUG_NEW_IMPL + printf("applyGtoright %d, Nv %d (level %d), (leaf %d, AF %d)\n",node->first_leaf_index,node->Nv,node->level,node->right->leaf,node->right->all_frozen); +#endif + + if (node->right->all_frozen == 0) { +#if defined(__AVX2__) + int avx2mod = (node->Nv/2)&15; + if (avx2mod == 0) { + int avx2len = node->Nv/2/16; + + for (int i=0;iNv/2;i++) { + alpha_r[i] = alpha_v[i+(node->Nv/2)] - (betal[i]*alpha_v[i]); + } + } + if (node->Nv == 2) { // apply hard decision on right node + betar[0] = (alpha_r[0]>0) ? -1 : 1; + pp->nr_polar_u[node->first_leaf_index+1] = (betar[0]+1)>>1; +#ifdef DEBUG_NEW_IMPL + printf("Setting bit %d to %d (LLR %d frozen_mask %d)\n",node->first_leaf_index+1,(betar[0]+1)>>1,alpha_r[0],frozen_mask); +#endif + } + } +} + + +void computeBeta(t_nrPolar_params *pp,decoder_node_t *node) { + + int16_t *betav = node->beta; + int16_t *betal = node->left->beta; + int16_t *betar = node->right->beta; +#ifdef DEBUG_NEW_IMPL + printf("Computing beta @ level %d first_leaf_index %d (all_frozen %d)\n",node->level,node->first_leaf_index,node->left->all_frozen); +#endif + if (node->left->all_frozen==0) { // if left node is not aggregation of frozen bits + for (int i=0;iNv/2;i++) { + betav[i] = (betal[i] != betar[i]) ? 1 : -1; +#ifdef DEBUG_NEW_IMPL + printf("COMPUTE betav[%d] %d (%p)\n",i, + betav[i], + &betav[i]); +#endif + } + } + else memcpy((void*)&betav[0],betar,(node->Nv/2)*sizeof(int16_t)); + memcpy((void*)&betav[node->Nv/2],betar,(node->Nv/2)*sizeof(int16_t)); + +} + +void generic_polar_decoder(t_nrPolar_params *pp,decoder_node_t *node) { + + + // Apply F to left + applyFtoleft(pp,node); + // if left is not a leaf recurse down to the left + if (node->left->leaf==0) generic_polar_decoder(pp,node->left); + + applyGtoright(pp,node); + if (node->right->leaf==0) generic_polar_decoder(pp,node->right); + + computeBeta(pp,node); + +} diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h index c9339e308d..7acd92324f 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h @@ -34,58 +34,125 @@ static const uint8_t nr_polar_subblock_interleaver_pattern[32] = { 0, 1, 2, 4, 3, 5, 6, 7, 8, 16, 9, 17, 10, 18, 11, 19, 12, 20, 13, 21, 14, 22, 15, 23, 24, 25, 26, 28, 27, 29, 30, 31 }; + +#define Nmax 1024 +#define nmax 10 + +typedef struct decoder_list_s { + + uint8_t bit[1+nmax][Nmax]; + double llr[1+nmax][Nmax]; + uint8_t crcChecksum[24]; + double pathMetric; + +} decoder_list_t; + +typedef struct decoder_list_int8_s { + + uint8_t bit[1+nmax][Nmax] __attribute__((aligned(32))); + int16_t llr[1+nmax][Nmax]__attribute__((aligned(32))); + uint8_t crcChecksum[24]; + int32_t pathMetric; + +} decoder_list_int8_t; + + + +typedef struct decoder_node_t_s { + struct decoder_node_t_s *left; + struct decoder_node_t_s *right; + int level; + int leaf; + int Nv; + int first_leaf_index; + int all_frozen; + int16_t *alpha; + int8_t *beta; +} decoder_node_t; + +typedef struct decoder_tree_t_s { + decoder_node_t *root; + int num_nodes; +} decoder_tree_t; + struct nrPolar_params { - uint8_t n_max; - uint8_t i_il; - uint8_t i_seg; - uint8_t n_pc; - uint8_t n_pc_wm; - uint8_t i_bil; - uint16_t payloadBits; - uint16_t encoderLength; - uint8_t crcParityBits; - uint8_t crcCorrectionBits; - uint16_t K; - uint16_t N; - uint8_t n; + uint8_t n_max; + uint8_t i_il; + uint8_t i_seg; + uint8_t n_pc; + uint8_t n_pc_wm; + uint8_t i_bil; + uint16_t payloadBits; + uint16_t encoderLength; + uint8_t crcParityBits; + uint8_t crcCorrectionBits; + uint16_t K; + uint16_t N; + uint8_t n; + + uint16_t *interleaving_pattern; + uint16_t *rate_matching_pattern; + const uint16_t *Q_0_Nminus1; + int16_t *Q_I_N; + int16_t *Q_F_N; + int16_t *Q_PC_N; + uint8_t *information_bit_pattern; + uint16_t *channel_interleaver_pattern; + uint32_t crc_polynomial; + + uint8_t **crc_generator_matrix; //G_P + uint8_t **G_N; + uint32_t* crc256Table; + uint8_t **extended_crc_generator_matrix; - uint16_t *interleaving_pattern; - uint16_t *rate_matching_pattern; - const uint16_t *Q_0_Nminus1; - int16_t *Q_I_N; - int16_t *Q_F_N; - int16_t *Q_PC_N; - uint8_t *information_bit_pattern; - uint16_t *channel_interleaver_pattern; - uint32_t crc_polynomial; - - uint8_t **crc_generator_matrix; //G_P - uint8_t **G_N; - uint32_t* crc256Table; - - //polar_encoder vectors: - uint8_t *nr_polar_crc; - uint8_t *nr_polar_b; - uint8_t *nr_polar_cPrime; - uint8_t *nr_polar_u; - uint8_t *nr_polar_d; + //polar_encoder vectors: + uint8_t *nr_polar_crc; + uint8_t *nr_polar_b; + uint8_t *nr_polar_cPrime; + uint8_t *nr_polar_u; + uint8_t *nr_polar_d; + + void (*decoder_kernel)(struct nrPolar_params *,decoder_list_int8_t **); + decoder_tree_t tree; } __attribute__ ((__packed__)); typedef struct nrPolar_params t_nrPolar_params; + + + + void polar_encoder(uint8_t *input, uint8_t *output, t_nrPolar_params* polarParams); void nr_polar_kernal_operation(uint8_t *u, uint8_t *d, uint16_t N); int8_t polar_decoder(double *input, uint8_t *output, t_nrPolar_params *polarParams, - uint8_t listSize, double *aPrioriPayload, uint8_t pathMetricAppr, - time_stats_t *init, - time_stats_t *polar_rate_matching, - time_stats_t *decoding, - time_stats_t *bit_extraction, - time_stats_t *deinterleaving, - time_stats_t *sorting, - time_stats_t *path_metric, - time_stats_t *update_LLR); + uint8_t listSize, double *aPrioriPayload, uint8_t pathMetricAppr, + time_stats_t *init, + time_stats_t *polar_rate_matching, + time_stats_t *decoding, + time_stats_t *bit_extraction, + time_stats_t *deinterleaving, + time_stats_t *sorting, + time_stats_t *path_metric, + time_stats_t *update_LLR); + +int8_t polar_decoder_int8(int16_t *input, + uint8_t *output, + t_nrPolar_params *polarParams, + uint8_t listSize, + time_stats_t *init, + time_stats_t *polar_rate_matching, + time_stats_t *decoding, + time_stats_t *bit_extraction, + time_stats_t *deinterleaving, + time_stats_t *sorting, + time_stats_t *path_metric, + time_stats_t *update_LLR, + int generate_optim_code); + + + +void nr_polar_llrtableinit(void); void nr_polar_init(t_nrPolar_params* polarParams, int messageType); @@ -133,59 +200,38 @@ void nr_free_uint8_t_3D_array(uint8_t ***input, uint16_t xlen, uint16_t ylen); void nr_free_uint8_t_2D_array(uint8_t **input, uint16_t xlen); void nr_free_double_2D_array(double **input, uint16_t xlen); -#define Nmax 1024 -#define nmax 10 - -typedef struct decoder_list_s { - - uint8_t bit[1+nmax][Nmax]; - double llr[1+nmax][Nmax]; - uint8_t crcChecksum[24]; - double pathMetric; - -} decoder_list_t; - -typedef struct decoder_list_int8_s { - - uint8_t bit[1+nmax][Nmax] __attribute__((aligned(32))); - int16_t llr[1+nmax][Nmax]__attribute__((aligned(32))); - uint8_t crcChecksum[24]; - int32_t pathMetric; - -} decoder_list_int8_t; - void updateLLR(decoder_list_t **dlist,uint8_t **llrU, uint8_t **bitU, uint8_t listSize, uint16_t row, uint16_t col, uint16_t xlen, uint8_t ylen, uint8_t approximation); void updateLLR_int8(decoder_list_int8_t **dlist,uint8_t **llrU, uint8_t **bitU, - uint8_t listSize, uint16_t row, uint16_t col, uint16_t xlen, uint8_t ylen); + uint8_t listSize, uint16_t row, uint16_t col, uint16_t xlen, uint8_t ylen,int generate_optim_code,FILE *fd); void updateBit(decoder_list_t **dlist, uint8_t **bitU, uint8_t listSize, uint16_t row, uint16_t col, uint16_t xlen, uint8_t ylen); void updateBit_int8(decoder_list_int8_t **dlist, uint8_t **bitU, uint8_t listSize, uint16_t row, - uint16_t col, uint16_t xlen, uint8_t ylen); + uint16_t col, uint16_t xlen, uint8_t ylen,int generate_optim_code,FILE *fd); void updatePathMetric(decoder_list_t **dlist,uint8_t listSize, uint8_t bitValue, uint16_t row, uint8_t approximation); -void updatePathMetric0_int8(decoder_list_int8_t **dlist,uint8_t listSize, uint16_t row); +void updatePathMetric0_int8(decoder_list_int8_t **dlist,uint8_t listSize, uint16_t row,int generate_optim_code,FILE *fd); void updatePathMetric2(decoder_list_t **dlist, uint8_t listSize, uint16_t row, uint8_t appr); -void updatePathMetric2_int8(decoder_list_int8_t **dlist, uint8_t listSize, uint16_t row); +void updatePathMetric2_int8(decoder_list_int8_t **dlist, uint8_t listSize, uint16_t row,int generate_optim_code,FILE *fd); void updateCrcChecksum(decoder_list_t **dlist, uint8_t **crcGen, uint8_t listSize, uint32_t i2, uint8_t len); void updateCrcChecksum_int8(decoder_list_int8_t **dlist, uint8_t **crcGen, - uint8_t listSize, uint32_t i2, uint8_t len); + uint8_t listSize, uint32_t i2, uint8_t len,int generate_optim_code,FILE *fd); void updateCrcChecksum2(decoder_list_t **dlist, uint8_t **crcGen, uint8_t listSize, uint32_t i2, uint8_t len); void updateCrcChecksum2_int8(decoder_list_int8_t **dlist, uint8_t **crcGen, - uint8_t listSize, uint32_t i2, uint8_t len); + uint8_t listSize, uint32_t i2, uint8_t len,int generate_optim_code,FILE *fd); void nr_sort_asc_double_1D_array_ind(double *matrix, int *ind, int len); @@ -213,4 +259,144 @@ static inline void nr_polar_deinterleaver(uint8_t *input, uint8_t *output, uint1 for (int i=0; ibit[(col)][(row)-(offset)]==0) dlist[(i)]->llr[(col)][(row)] = dlist[(i)]->llr[(col)+1][(row)-(offset)] + dlist[(i)]->llr[(col)+1][(row)]; else dlist[(i)]->llr[(col)][(row)] = -dlist[(i)]->llr[(col)+1][(row)-(offset)] + dlist[(i)]->llr[(col)+1][(row)];if(dlist[(i)]->llr[col][row]>127 || dlist[i]->llr[col][row]<-128) printf("dlist[%d]->llr[%d][%d] = %d> 8bit\n",i,col,row,dlist[i]->llr[col][row]);}} + +#define updateBit_int8_A(dlist,listSize,col,row) {for (int i=0;ibit[(col)][(row)] = dlist[(i)]->bit[(col)-1][(row)];}} +#define updateBit_int8_B(dlist,listSize,col,row,offset) {for (int i=0;ibit[(col)][(row)] = dlist[(i)]->bit[(col)-1][(row)]^dlist[(i)]->bit[(col)-1][(row)+(offset)];}} + +#define updatePathMetric0_int8_A(dlist,listSize,row,mask,absllr) {for (int i=0;illr[0][row]>>15;if(mask!=0){absllr=(dlist[i]->llr[0][row]+mask)^mask;dlist[i]->pathMetric+=absllr;}}} + +#define updatePathMetric2_int8_A(dlist,listSize,row) {for (int i=0;ipathMetric = dlist[i]->pathMetric;if (dlist[i]->llr[0][row]<0) dlist[i]->pathMetric-=dlist[i]->llr[0][row];else dlist[i+listSize]->pathMetric += dlist[i]->llr[0][row];}}} + +#define updateCrcChecksum_int8_A(dlist,listSize,crcGen,i2,len) {for (int i=0;icrcChecksum[j] = (dlist[i]->crcChecksum[j]^crcGen[i2][j]);}} + +#define updateCrcChecksum2_int8_A(dlist,listSize,crcGen,i2,len) {for (int i=0;icrcChecksum[j]=dlist[i]->crcChecksum[j]^crcGen[i2][j];}} + +extern int16_t llrtab[256][256]; + +inline void computeLLR_int8(decoder_list_int8_t **dlist,int listSize, uint16_t row, uint16_t col, + uint16_t offset) __attribute__((always_inline)); +inline void computeLLR_int8(decoder_list_int8_t **dlist,int listSize, uint16_t row, uint16_t col, + uint16_t offset) { + + int16_t a; + int16_t b; + + int16_t absA,absB; + int16_t maska,maskb; + int16_t minabs; + // int16_t **llr=dlist[i]->llr; + + + for (int i=0;illr[col + 1][row]; + b = dlist[i]->llr[col+1][row + offset]; + + // printf("LLR: a %d, b %d\n",a,b); + maska = a>>15; + maskb = b>>15; + absA = (a+maska)^maska; + absB = (b+maskb)^maskb; + // printf("LLR: absA %d, absB %d\n",absA,absB); + minabs = absAllr[col][row] = minabs; + else + dlist[i]->llr[col][row] = -minabs; + // printf("LLR (a %d, b %d): llr[%d][%d] %d\n",a,b,col,row,llr[col][row]); + + //dlist[i]->llr[col][row] = llrtab[a+128][b+128]; + // printf("newLLR [%d,%d]: %d\n",col,row,dlist[i]->llr[col][row]); + } +} + +#define decoder_int8_A(sorted_dlist,currentListSize,polarParams) {for (int i = 0; i < currentListSize; i++) { \ + for (int k = 0; k < (polarParams->n+1); k++) { \ + memcpy((void*)&sorted_dlist[i+currentListSize]->bit[k][0],\ + (void*)&sorted_dlist[i]->bit[k][0],\ + sizeof(uint8_t)*polarParams->N);\ + memcpy((void*)&sorted_dlist[i+currentListSize]->llr[k][0],\ + (void*)&sorted_dlist[i]->llr[k][0],\ + sizeof(int16_t)*polarParams->N);}}} + +#define decoder_int8_B(sorted_dlist,currentBit,currentListSize) {for (int i = 0; i < currentListSize; i++) {sorted_dlist[i]->bit[0][currentBit]=0;sorted_dlist[i+currentListSize]->bit[0][currentBit]=1;}} + +void inline decoder_int8_C(decoder_list_int8_t *sorted_dlist[], + t_nrPolar_params *polarParams, + int currentBit, + int currentListSize, + int listSize) { + + int32_t pathMetric[2*listSize]; + decoder_list_int8_t *temp_dlist[2*listSize]; + + int listIndex[2*listSize]; + int listIndex2[2*listSize]; + + for (int i = 0; i < currentListSize; i++) { + listIndex[i]=i; + pathMetric[i] = sorted_dlist[i]->pathMetric; + } + nr_sort_asc_int16_1D_array_ind(pathMetric, listIndex, currentListSize); + for (int i=0;in+1); k++) { + + memcpy((void*)&sorted_dlist[i+listSize]->bit[k][0], + (void*)&sorted_dlist[i]->bit[k][0], + sizeof(uint8_t)*polarParams->N); + memcpy((void*)&sorted_dlist[i+listSize]->llr[k][0], + (void*)&sorted_dlist[i]->llr[k][0], + sizeof(int16_t)*polarParams->N); + } + sorted_dlist[i]->bit[0][currentBit]=0; + sorted_dlist[i+listSize]->bit[0][currentBit]=1; + } + else if (listIndex2[i+listSize]n+1); k++) { + memcpy((void*)&sorted_dlist[i+listSize]->bit[k][0], + (void*)&sorted_dlist[i]->bit[k][0], + sizeof(uint8_t)*polarParams->N); + memcpy((void*)&sorted_dlist[i+listSize]->llr[k][0], + (void*)&sorted_dlist[i]->llr[k][0], + sizeof(int16_t)*polarParams->N); + } + sorted_dlist[i+listSize]->bit[0][currentBit]=1; + + /* + decoder_list_t *tmp = sorted_dlist[i+listSize]; + sorted_dlist[i+listSize] = sorted_dlist[i]; + sorted_dlist[i+listSize]->pathMetric = tmp->pathMetric; + sorted_dlist[i+listSize]->bit[0][currentBit]=1; + memcpy((void*)&sorted_dlist[i+listSize]->crcChecksum[0], + (void*)&tmp->crcChecksum[0], + 24*sizeof(uint8_t));*/ + + } + } + + + + for (int i = 0; i < 2*listSize; i++) { + temp_dlist[i] = sorted_dlist[i]; + } + for (int i = 0; i < 2*listSize; i++) { + // printf("i %d => %d\n",i,listIndex[i]); + sorted_dlist[i] = temp_dlist[listIndex[i]]; + } +} #endif From 22dae457b78b792f246ebe37458eab4c531391d0 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Tue, 9 Oct 2018 13:32:43 +0200 Subject: [PATCH 296/379] additional SIMD optimizations --- .../nrPolar_tools/nr_polar_decoding_tools.c | 36 +++++++++++++------ .../PHY/CODING/nrPolar_tools/nr_polar_defs.h | 2 +- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c index e215be2e2b..f9105844d1 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c @@ -420,7 +420,7 @@ void applyFtoleft(t_nrPolar_params *pp,decoder_node_t *node) { #ifdef DEBUG_NEW_IMPL printf("betal[0] %d (%p)\n",betal[0],&betal[0]); #endif - pp->nr_polar_u[node->first_leaf_index] = (betal[0]+1)>>1; + pp->nr_polar_u[node->first_leaf_index] = (1+betal[0])>>1; #ifdef DEBUG_NEW_IMPL printf("Setting bit %d to %d (LLR %d)\n",node->first_leaf_index,(betal[0]+1)>>1,alpha_l[0]); #endif @@ -466,7 +466,7 @@ void applyGtoright(t_nrPolar_params *pp,decoder_node_t *node) { } if (node->Nv == 2) { // apply hard decision on right node betar[0] = (alpha_r[0]>0) ? -1 : 1; - pp->nr_polar_u[node->first_leaf_index+1] = (betar[0]+1)>>1; + pp->nr_polar_u[node->first_leaf_index+1] = (1+betar[0])>>1; #ifdef DEBUG_NEW_IMPL printf("Setting bit %d to %d (LLR %d frozen_mask %d)\n",node->first_leaf_index+1,(betar[0]+1)>>1,alpha_r[0],frozen_mask); #endif @@ -474,7 +474,6 @@ void applyGtoright(t_nrPolar_params *pp,decoder_node_t *node) { } } - void computeBeta(t_nrPolar_params *pp,decoder_node_t *node) { int16_t *betav = node->beta; @@ -484,14 +483,31 @@ void computeBeta(t_nrPolar_params *pp,decoder_node_t *node) { printf("Computing beta @ level %d first_leaf_index %d (all_frozen %d)\n",node->level,node->first_leaf_index,node->left->all_frozen); #endif if (node->left->all_frozen==0) { // if left node is not aggregation of frozen bits - for (int i=0;iNv/2;i++) { - betav[i] = (betal[i] != betar[i]) ? 1 : -1; -#ifdef DEBUG_NEW_IMPL - printf("COMPUTE betav[%d] %d (%p)\n",i, - betav[i], - &betav[i]); -#endif + /*#if defined(__AVX2__) + int avx2mod = (node->Nv/2)&15; + if (avx2mod == 0) { + int avx2len = node->Nv/2/16; + + for (int i=0;iNv/2;i++) { + betav[i] = (betal[i] != betar[i]) ? 1 : -1; + } + } } else memcpy((void*)&betav[0],betar,(node->Nv/2)*sizeof(int16_t)); memcpy((void*)&betav[node->Nv/2],betar,(node->Nv/2)*sizeof(int16_t)); diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h index 7acd92324f..34c2e9a50b 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h @@ -67,7 +67,7 @@ typedef struct decoder_node_t_s { int first_leaf_index; int all_frozen; int16_t *alpha; - int8_t *beta; + int16_t *beta; } decoder_node_t; typedef struct decoder_tree_t_s { From 9d9aadd420773c7ede511fde0a583b7e0ffe928d Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Tue, 9 Oct 2018 15:08:59 +0200 Subject: [PATCH 297/379] more SIMD modifications --- .../nrPolar_tools/nr_polar_decoding_tools.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c index f9105844d1..f9d8d7fbb3 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c @@ -474,6 +474,11 @@ void applyGtoright(t_nrPolar_params *pp,decoder_node_t *node) { } } +int16_t minus1[16] = {-1,-1,-1,-1, + -1,-1,-1,-1, + -1,-1,-1,-1, + -1,-1,-1,-1}; + void computeBeta(t_nrPolar_params *pp,decoder_node_t *node) { int16_t *betav = node->beta; @@ -483,7 +488,7 @@ void computeBeta(t_nrPolar_params *pp,decoder_node_t *node) { printf("Computing beta @ level %d first_leaf_index %d (all_frozen %d)\n",node->level,node->first_leaf_index,node->left->all_frozen); #endif if (node->left->all_frozen==0) { // if left node is not aggregation of frozen bits - /*#if defined(__AVX2__) +#if defined(__AVX2__) int avx2mod = (node->Nv/2)&15; if (avx2mod == 0) { int avx2len = node->Nv/2/16; @@ -491,18 +496,24 @@ void computeBeta(t_nrPolar_params *pp,decoder_node_t *node) { for (int i=0;iNv/2;i++) { betav[i] = (betal[i] != betar[i]) ? 1 : -1; From 874c165fce22a0acc7b5a1d933c6737cdfe57f47 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Tue, 9 Oct 2018 06:33:09 -0700 Subject: [PATCH 298/379] WIP --- openair1/PHY/NR_TRANSPORT/nr_pss.c | 6 +++--- openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c | 6 ++++-- openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c | 15 +++++++++++---- openair1/PHY/NR_UE_TRANSPORT/pss_nr.c | 14 ++------------ openair1/PHY/phy_extern_nr_ue.h | 2 +- openair1/SIMULATION/NR_PHY/pbchsim.c | 8 ++++++++ targets/RT/USER/nr-ru.c | 4 ++-- 7 files changed, 31 insertions(+), 24 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_pss.c b/openair1/PHY/NR_TRANSPORT/nr_pss.c index 3c4f296cd6..1f653038a6 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_pss.c +++ b/openair1/PHY/NR_TRANSPORT/nr_pss.c @@ -22,7 +22,7 @@ #include "PHY/NR_TRANSPORT/nr_transport.h" -//#define NR_PSS_DEBUG +#define NR_PSS_DEBUG int nr_generate_pss( int16_t *d_pss, int32_t **txdataF, @@ -52,7 +52,7 @@ int nr_generate_pss( int16_t *d_pss, } #ifdef NR_PSS_DEBUG - write_output("d_pss.m", "d_pss", (void*)d_pss, NR_PSS_LENGTH, 1, 1); + write_output("d_pss.m", "d_pss", (void*)d_pss, NR_PSS_LENGTH, 1, 0); #endif /// Resource mapping @@ -75,7 +75,7 @@ int nr_generate_pss( int16_t *d_pss, } #ifdef NR_PSS_DEBUG - write_output("pss_0.m", "pss_0", (void*)txdataF[0][2*l*frame_parms->ofdm_symbol_size], frame_parms->ofdm_symbol_size, 1, 1); + write_output("pss_0.m", "pss_0", (void*)&txdataF[0][2*l*frame_parms->ofdm_symbol_size], frame_parms->ofdm_symbol_size, 1, 1); #endif return 0; diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c index 0937fa6036..7acc0d082d 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c @@ -197,13 +197,15 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode) * sync_pos SS/PBCH block */ cnt++; - if (cnt >100){ - cnt =0; + if (1){ + cnt =0; /* process pss search on received buffer */ sync_pos = pss_synchro_nr(ue, NO_RATE_CHANGE); sync_pos_slot = (frame_parms->samples_per_tti>>1) - 3*(frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples); + sync_pos = sync_pos_slot+frame_parms->nb_prefix_samples; + if (sync_pos >= frame_parms->nb_prefix_samples) sync_pos2 = sync_pos - frame_parms->nb_prefix_samples; else diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c index dd25d4639b..7efadfb9fd 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c @@ -35,7 +35,7 @@ #include "PHY/sse_intrin.h" //#include "SIMULATION/TOOLS/sim.h" -//#define DEBUG_PBCH 1 +#define DEBUG_PBCH 1 //#define DEBUG_PBCH_ENCODING #ifdef OPENAIR2 @@ -247,6 +247,9 @@ void nr_pbch_channel_compensation(int **rxdataF_ext, uint8_t output_shift) { + short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1}; + short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1}; + uint16_t rb,nb_rb=20; uint8_t aatx,aarx; #if defined(__x86_64__) || defined(__i386__) @@ -552,8 +555,10 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, for (symbol=5; symbol<8; symbol++) { +#ifdef DEBUG_PBCH //printf("address dataf %p",nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF); - //write_output("rxdataF0_pbch.m","rxF0pbch",nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF,frame_parms->ofdm_symbol_size*4,2,1); + write_output("rxdataF0_pbch.m","rxF0pbch",nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF,frame_parms->ofdm_symbol_size*4,2,1); +#endif nr_pbch_extract(nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF, nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].dl_ch_estimates[eNB_id], @@ -583,8 +588,10 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, symbol, log2_maxh); // log2_maxh+I0_shift - //write_output("rxdataF_comp.m","rxFcomp",nr_ue_pbch_vars->rxdataF_comp,180,2,1); - +#ifdef DEBUG_PBCH + write_output("rxdataF_comp.m","rxFcomp",nr_ue_pbch_vars->rxdataF_comp,180,2,1); +#endif + /*if (frame_parms->nb_antennas_rx > 1) pbch_detection_mrc(frame_parms, nr_ue_pbch_vars->rxdataF_comp, diff --git a/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c b/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c index 32f906c1d9..969fe1b1e5 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c @@ -57,6 +57,8 @@ * *********************************************************************/ +#define DBG_PSS_NR + void *get_idft(int ofdm_symbol_size) { void (*idft)(int16_t *,int16_t *, int); @@ -791,18 +793,6 @@ int pss_search_time_nr(int **rxdata, ///rx data in time domain /* Correlation computation is based on a a dot product which is realized thank to SIMS extensions */ for (n=0; n < length; n+=4) { -#ifdef RTAI_ENABLED - - // This is necessary since the sync takes a long time and it seems to block all other threads thus screwing up RTAI. If we pause it for a little while during its execution we give RTAI a chance to catch up with its other tasks. - if ((n%frame_parms->samples_per_subframe == 0) && (n>0) && (openair_daq_vars.sync_state==0)) { -#ifdef DEBUG_PHY - msg("[SYNC TIME] pausing for 1000ns, n=%d\n",n); -#endif - rt_sleep(nano2count(1000)); - } - -#endif - for (int pss_index = 0; pss_index < NUMBER_PSS_SEQUENCE; pss_index++) { pss_corr_ue[pss_index][n] = 0; /* clean correlation for position n */ diff --git a/openair1/PHY/phy_extern_nr_ue.h b/openair1/PHY/phy_extern_nr_ue.h index 253c5b7fb9..2fa9ef511e 100644 --- a/openair1/PHY/phy_extern_nr_ue.h +++ b/openair1/PHY/phy_extern_nr_ue.h @@ -32,7 +32,7 @@ extern char fmageren_name2[512]; extern unsigned int RX_DMA_BUFFER[4][NB_ANTENNAS_RX]; extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX]; -#include "PHY/LTE_TRANSPORT/transport_extern.h" +//#include "PHY/LTE_TRANSPORT/transport_extern.h" extern int number_of_cards; diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index 4b90dce15c..1d91510304 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -117,6 +117,8 @@ int main(int argc, char **argv) int frame_length_complex_samples_no_prefix; NR_DL_FRAME_PARMS *frame_parms; nfapi_nr_config_request_t *gNB_config; + + int ret; cpuf = get_cpu_freq_GHz(); @@ -309,6 +311,9 @@ int main(int argc, char **argv) } } + if (snr1set==0) + snr1 = snr0+10; + gNB2UE = new_channel_desc_scm(n_tx, n_rx, channel_model, @@ -443,6 +448,9 @@ int main(int argc, char **argv) if (gNB->frame_parms.nb_antennas_tx>1) LOG_M("rxsig1.m","rxs1", UE->common_vars.rxdata[1],frame_length_complex_samples,1,1); } + + ret = nr_initial_sync(UE, normal_txrx); + printf("nr_initial_sync1 returns %d\n",ret); } //noise trials diff --git a/targets/RT/USER/nr-ru.c b/targets/RT/USER/nr-ru.c index f0b7a766af..8cacda5880 100644 --- a/targets/RT/USER/nr-ru.c +++ b/targets/RT/USER/nr-ru.c @@ -806,10 +806,10 @@ void tx_rf(RU_t *ru) { for (i=0; inb_tx; i++) txp[i] = (void*)&ru->common.txdata[i][(proc->subframe_tx*fp->samples_per_subframe)-sf_extension]; - /*if (proc->subframe_tx == 0){ + if (proc->subframe_tx == 0){ write_output("txdataF_frame.m","txdataF_frame",&ru->common.txdataF_BF[i],fp->samples_per_subframe_wCP, 1, 1); write_output("txdata_frame.m","txdata_frame",&ru->common.txdata[i],fp->samples_per_subframe, 1, 1); - }*/ + } VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (proc->timestamp_tx-ru->openair0_cfg.tx_sample_advance)&0xffffffff ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 ); From 4b0730f7672691aa64c6849f17234488bd3fb36f Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 9 Oct 2018 18:29:49 +0200 Subject: [PATCH 299/379] CI: enhancements with timeouts and build timestamps in HTML reports Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 69 ++++++++++++++++++++++++-------- ci-scripts/main.py | 4 ++ ci-scripts/reportBuildLocally.sh | 4 ++ ci-scripts/reportTestLocally.sh | 4 ++ 4 files changed, 64 insertions(+), 17 deletions(-) diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index 92611670ba..6313e77f9c 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -48,6 +48,9 @@ pipeline { stage ("Verify Parameters") { steps { script { + JOB_TIMESTAMP = sh returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"' + JOB_TIMESTAMP = JOB_TIMESTAMP.trim() + echo '\u2705 \u001B[32mVerify Parameters\u001B[0m' def allParametersPresent = true @@ -114,37 +117,49 @@ pipeline { stage ("Start VM -- cppcheck") { steps { - sh "./ci-scripts/createVM.sh --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + timeout (time: 5, unit: 'MINUTES') { + sh "./ci-scripts/createVM.sh --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + } } } stage ("Start VM -- enb-usrp") { steps { - sh "./ci-scripts/createVM.sh --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + timeout (time: 5, unit: 'MINUTES') { + sh "./ci-scripts/createVM.sh --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + } } } stage ("Start VM -- basic-sim") { steps { - sh "./ci-scripts/createVM.sh --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + timeout (time: 5, unit: 'MINUTES') { + sh "./ci-scripts/createVM.sh --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + } } } stage ("Start VM -- phy-sim") { steps { - sh "./ci-scripts/createVM.sh --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + timeout (time: 5, unit: 'MINUTES') { + sh "./ci-scripts/createVM.sh --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + } } } stage ("Start VM -- enb-ethernet") { steps { - sh "./ci-scripts/createVM.sh --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + timeout (time: 5, unit: 'MINUTES') { + sh "./ci-scripts/createVM.sh --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + } } } stage ("Start VM -- ue-ethernet") { steps { - sh "./ci-scripts/createVM.sh --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + timeout (time: 5, unit: 'MINUTES') { + sh "./ci-scripts/createVM.sh --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + } } } @@ -153,42 +168,54 @@ pipeline { stage ("Analysis with cppcheck") { steps { gitlabCommitStatus(name: "Analysis with cppcheck") { - sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + timeout (time: 20, unit: 'MINUTES') { + sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + } } } } stage ("Build eNb-USRP") { steps { gitlabCommitStatus(name: "Build eNb-USRP") { - sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + timeout (time: 20, unit: 'MINUTES') { + sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + } } } } stage ("Build basic simulator") { steps { gitlabCommitStatus(name: "Build basic-sim") { - sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + timeout (time: 20, unit: 'MINUTES') { + sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + } } } } stage ("Build physical simulators") { steps { gitlabCommitStatus(name: "Build phy-sim") { - sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + timeout (time: 20, unit: 'MINUTES') { + sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + } } } } stage ("Build eNb-ethernet") { steps { gitlabCommitStatus(name: "Build eNb-ethernet") { - sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + timeout (time: 20, unit: 'MINUTES') { + sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + } } } } stage ("Build UE-ethernet") { steps { gitlabCommitStatus(name: "Build UE-ethernet") { - sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + timeout (time: 20, unit: 'MINUTES') { + sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + } } } } @@ -203,7 +230,9 @@ pipeline { withCredentials([ [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.RedHatRemoteCredentials}", usernameVariable: 'RH_Username', passwordVariable: 'RH_Password'] ]) { - sh "./ci-scripts/buildOnRH.sh --workspace $WORKSPACE --job-name ${JOB_NAME} --build-id ${BUILD_ID} --remote-host ${params.RedHatRemoteServer} --remote-path ${params.RedHatWorkingPath} --remote-user-name ${RH_Username} --remote-password ${RH_Password}" + timeout (time: 20, unit: 'MINUTES') { + sh "./ci-scripts/buildOnRH.sh --workspace $WORKSPACE --job-name ${JOB_NAME} --build-id ${BUILD_ID} --remote-host ${params.RedHatRemoteServer} --remote-path ${params.RedHatWorkingPath} --remote-user-name ${RH_Username} --remote-password ${RH_Password}" + } } } catch (Exception e) { echo "Red Hat build failed not an error now" @@ -237,7 +266,7 @@ pipeline { sh "./ci-scripts/reportBuildLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}" } if(fileExists('build_results.html')) { - sh "sed -i -e 's#Build-ID: ${BUILD_ID}#Build-ID: ${BUILD_ID}#' build_results.html" + sh "sed -i -e 's#Build-ID: ${BUILD_ID}#Build-ID: ${BUILD_ID}#' -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' build_results.html" archiveArtifacts artifacts: 'build_results.html' } } @@ -250,14 +279,18 @@ pipeline { stage ("Test physical simulators") { steps { gitlabCommitStatus(name: "Test phy-sim") { - sh "./ci-scripts/runTestOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + timeout (time: 20, unit: 'MINUTES') { + sh "./ci-scripts/runTestOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + } } } } stage ("Test basic simulator") { steps { gitlabCommitStatus(name: "Test basic-sim") { - sh "./ci-scripts/runTestOnVM.sh --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + timeout (time: 20, unit: 'MINUTES') { + sh "./ci-scripts/runTestOnVM.sh --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + } } } } @@ -304,6 +337,7 @@ pipeline { filter: 'test_results*.html', selector: lastCompleted()) if (fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) { + sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-FDD-Band7-B210.html" archiveArtifacts artifacts: 'test_results-eNB-CI-FDD-Band7-B210.html' } } @@ -352,6 +386,7 @@ pipeline { filter: 'test_results*.html', selector: lastCompleted()) if (fileExists('test_results-eNB-CI-TDD-Band40-B210.html')) { + sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-TDD-Band40-B210.html" archiveArtifacts artifacts: 'test_results-eNB-CI-TDD-Band40-B210.html' } } @@ -376,7 +411,7 @@ pipeline { sh "./ci-scripts/reportTestLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}" } if(fileExists('test_simulator_results.html')) { - sh "sed -i -e 's#Build-ID: ${BUILD_ID}#Build-ID: ${BUILD_ID}#' test_simulator_results.html" + sh "sed -i -e 's#Build-ID: ${BUILD_ID}#Build-ID: ${BUILD_ID}#' -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_simulator_results.html" archiveArtifacts artifacts: 'test_simulator_results.html' } } diff --git a/ci-scripts/main.py b/ci-scripts/main.py index aac81cb036..1c10e07edc 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -1518,6 +1518,10 @@ class SSHConnection(): self.htmlFile.write('
\n') self.htmlFile.write(' \n') self.htmlFile.write(' \n') + self.htmlFile.write(' \n') + self.htmlFile.write(' \n') + self.htmlFile.write(' \n') + self.htmlFile.write(' \n') self.htmlFile.write(' \n') self.htmlFile.write(' \n') self.htmlFile.write(' \n') diff --git a/ci-scripts/reportBuildLocally.sh b/ci-scripts/reportBuildLocally.sh index ea2cc5e44f..a499fa3b66 100755 --- a/ci-scripts/reportBuildLocally.sh +++ b/ci-scripts/reportBuildLocally.sh @@ -438,6 +438,10 @@ echo "
Build Start Time (UTC)TEMPLATE_BUILD_TIME
GIT Repository' + SSH.eNBRepository + '
" >> ./build_results.html echo "
" >> ./build_results.html echo " " >> ./build_results.html echo " " >> ./build_results.html +echo " " >> ./build_results.html +echo " " >> ./build_results.html +echo " " >> ./build_results.html +echo " " >> ./build_results.html echo " " >> ./build_results.html echo " " >> ./build_results.html echo " " >> ./build_results.html diff --git a/ci-scripts/reportTestLocally.sh b/ci-scripts/reportTestLocally.sh index 24e3255958..3a56acb7c1 100755 --- a/ci-scripts/reportTestLocally.sh +++ b/ci-scripts/reportTestLocally.sh @@ -263,6 +263,10 @@ echo "
Build Start Time (UTC)TEMPLATE_BUILD_TIME
GIT Repository$GIT_URL
" >> ./test_simulator_results.html echo "
" >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html +echo " " >> ./test_simulator_results.html +echo " " >> ./test_simulator_results.html +echo " " >> ./test_simulator_results.html +echo " " >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html From ffc5faf30a0a8d177d276b0fafb08435558fee9e Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 10 Oct 2018 08:33:33 +0200 Subject: [PATCH 300/379] removal of warnings --- openair1/PHY/CODING/nrPolar_init.c | 6 +++--- .../nrPolar_tools/nr_polar_decoding_tools.c | 6 +----- openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h | 15 +++++++++++++++ openair1/PHY/NR_TRANSPORT/nr_pbch.c | 8 ++++---- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/openair1/PHY/CODING/nrPolar_init.c b/openair1/PHY/CODING/nrPolar_init.c index 5928e0684f..f606acbe95 100644 --- a/openair1/PHY/CODING/nrPolar_init.c +++ b/openair1/PHY/CODING/nrPolar_init.c @@ -27,9 +27,9 @@ void nr_polar_init(t_nrPolar_params* polarParams, int messageType) { uint32_t poly6 = 0x84000000; // 1000100000... -> D^6+D^5+1 uint32_t poly11 = 0x63200000; //11000100001000... -> D^11+D^10+D^9+D^5+1 -uint32_t poly16 = 0x81080000; //100000010000100... - > D^16+D^12+D^5+1 -uint32_t poly24a = 0x864cfb00; //100001100100110011111011 -> D^24+D^23+D^18+D^17+D^14+D^11+D^10+D^7+D^6+D^5+D^4+D^3+D+1 -uint32_t poly24b = 0x80006300; //100000000000000001100011 -> D^24+D^23+D^6+D^5+D+1 +//uint32_t poly16 = 0x81080000; //100000010000100... - > D^16+D^12+D^5+1 +//uint32_t poly24a = 0x864cfb00; //100001100100110011111011 -> D^24+D^23+D^18+D^17+D^14+D^11+D^10+D^7+D^6+D^5+D^4+D^3+D+1 +//uint32_t poly24b = 0x80006300; //100000000000000001100011 -> D^24+D^23+D^6+D^5+D+1 uint32_t poly24c = 0xB2B11700; //101100101011000100010111 -> D^24... if (messageType == 0) { //DCI diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c index f9d8d7fbb3..d2a3903dd9 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c @@ -50,7 +50,6 @@ int16_t llrtab[256][256]; void nr_polar_llrtableinit() { int16_t absA,absB; - int16_t maska,maskb; int16_t minabs; for (int a=-128;a<128;a++) { @@ -229,7 +228,6 @@ void updatePathMetric2(decoder_list_t **dlist, uint8_t listSize, uint16_t row, u void updatePathMetric2_int8(decoder_list_int8_t **dlist, uint8_t listSize, uint16_t row,int generate_optim_code,FILE *fd) { - int i; @@ -303,7 +301,7 @@ decoder_node_t *new_decoder_node(int first_leaf_index,int level) { node->right=(decoder_node_t *)NULL; node->all_frozen=0; node->alpha = (int16_t*)malloc16(node->Nv*sizeof(int16_t)); - node->beta = (int8_t*)malloc16(node->Nv*sizeof(int16_t)); + node->beta = (int16_t*)malloc16(node->Nv*sizeof(int16_t)); memset((void*)node->beta,-1,node->Nv*sizeof(int16_t)); @@ -434,9 +432,7 @@ void applyGtoright(t_nrPolar_params *pp,decoder_node_t *node) { int16_t *alpha_r=node->right->alpha; int16_t *betal = node->left->beta; int16_t *betar = node->right->beta; - int8_t frozen_mask=-1; - if (node->Nv == 2) frozen_mask=-pp->information_bit_pattern[node->first_leaf_index+1]; #ifdef DEBUG_NEW_IMPL printf("applyGtoright %d, Nv %d (level %d), (leaf %d, AF %d)\n",node->first_leaf_index,node->Nv,node->level,node->right->leaf,node->right->all_frozen); #endif diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h index 34c2e9a50b..4a4055d404 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h @@ -125,6 +125,8 @@ void polar_encoder(uint8_t *input, uint8_t *output, t_nrPolar_params* polarParam void nr_polar_kernal_operation(uint8_t *u, uint8_t *d, uint16_t N); +void generic_polar_decoder(t_nrPolar_params *,decoder_node_t *); + int8_t polar_decoder(double *input, uint8_t *output, t_nrPolar_params *polarParams, uint8_t listSize, double *aPrioriPayload, uint8_t pathMetricAppr, time_stats_t *init, @@ -150,6 +152,19 @@ int8_t polar_decoder_int8(int16_t *input, time_stats_t *update_LLR, int generate_optim_code); +int8_t polar_decoder_int8_new(int16_t *input, + uint8_t *output, + t_nrPolar_params *polarParams, + uint8_t listSize, + time_stats_t *init, + time_stats_t *polar_rate_matching, + time_stats_t *decoding, + time_stats_t *bit_extraction, + time_stats_t *deinterleaving, + time_stats_t *sorting, + time_stats_t *path_metric, + time_stats_t *update_LLR, + int generate_optim_code); void nr_polar_llrtableinit(void); diff --git a/openair1/PHY/NR_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_TRANSPORT/nr_pbch.c index 1e761ea0bb..871e32a6b1 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_pbch.c @@ -219,7 +219,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch, uint8_t nushift; uint8_t *xbyte = pbch->pbch_a; memset((void*) xbyte, 0, 1); - uint8_t pbch_a_b[32]; + //uint8_t pbch_a_b[32]; LOG_I(PHY, "PBCH generation started\n"); @@ -282,10 +282,10 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch, printf("pbch_a_prime[%d]: 0x%02x\n", i, pbch->pbch_a_prime[i]); #endif -for (int m=0;m<32;m++){ -pbch_a_b[m] = ((pbch->pbch_a_prime[m/8]>>(m&7))&01); +//for (int m=0;m<32;m++){ +//pbch_a_b[m] = ((pbch->pbch_a_prime[m/8]>>(m&7))&01); //printf("pbch_a_b[%d] %d\n", m, pbch_a_b[m] ); -} +//} /// CRC, coding and rate matching polar_encoder (pbch->pbch_a_prime, pbch->pbch_e, &frame_parms->pbch_polar_params); From a780c31d0aade680ce41350ca9d2bf000727b4ca Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 10 Oct 2018 17:19:57 +0200 Subject: [PATCH 301/379] changes to integrate fixed-point polar decoder --- openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c | 43 ++++++++++++++++---------- openair1/PHY/defs_nr_UE.h | 4 +-- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c index 7efadfb9fd..3d86947a7a 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c @@ -399,7 +399,7 @@ void nr_pbch_unscrambling(NR_UE_PBCH *pbch, int i; uint8_t reset, offset; uint32_t x1, x2, s=0; - double *demod_pbch_e = pbch->demod_pbch_e; + int16_t *demod_pbch_e = pbch->llr; uint32_t *pbch_a_prime = (uint32_t*)pbch->pbch_a_prime; uint32_t *pbch_a_interleaved = (uint32_t*)pbch->pbch_a_interleaved; uint32_t unscrambling_mask = 0x100006D; @@ -481,9 +481,9 @@ void nr_pbch_alamouti(NR_DL_FRAME_PARMS *frame_parms, } -void nr_pbch_quantize(int8_t *pbch_llr8, - int16_t *pbch_llr, - uint16_t len) +void nr_pbch_quantize(int16_t *pbch_llr8, + int16_t *pbch_llr, + uint16_t len) { uint16_t i; @@ -498,10 +498,11 @@ void nr_pbch_quantize(int8_t *pbch_llr8, } } - +/* unsigned char sign(int8_t x) { return (unsigned char)x >> 7; } +*/ uint8_t pbch_deinterleaving_pattern[32] = {28,0,31,30,1,29,25,27,22,2,24,3,4,5,6,7,18,21,20,8,9,10,11,19,26,12,13,14,15,16,23,17}; @@ -533,18 +534,27 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, uint8_t ssb_index=0; //uint16_t crc; //short nr_demod_table[8] = {0,0,0,1,1,0,1,1}; - double nr_demod_table[8] = {0.707,0.707,-0.707,0.707,0.707,-0.707,-0.707,-0.707}; - double *demod_pbch_e = malloc (sizeof(double) * 864); + //double nr_demod_table[8] = {0.707,0.707,-0.707,0.707,0.707,-0.707,-0.707,-0.707}; + //int16_t *demod_pbch_e; // = malloc (sizeof(int16_t) * 864); unsigned short idx_demod =0; int8_t decoderState=0; uint8_t decoderListSize = 8, pathMetricAppr = 0; - double aPrioriArray[frame_parms->pbch_polar_params.payloadBits]; // assume no a priori knowledge available about the payload. + time_stats_t polar_decoder_init,polar_rate_matching,decoding,bit_extraction,deinterleaving; + time_stats_t path_metric,sorting,update_LLR; memset(&pbch_a[0], 0, sizeof(uint8_t) * NR_POLAR_PBCH_PAYLOAD_BITS); //printf("nr_pbch_ue nid_cell %d\n",frame_parms->Nid_cell); - for (int i=0; ipbch_polar_params.payloadBits; i++) aPrioriArray[i] = NAN; + reset_meas(&polar_decoder_init); + reset_meas(&polar_rate_matching); + reset_meas(&decoding); + reset_meas(&bit_extraction); + reset_meas(&deinterleaving); + reset_meas(&sorting); + reset_meas(&path_metric); + reset_meas(&update_LLR); + int subframe_rx = proc->subframe_rx; @@ -597,14 +607,14 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, nr_ue_pbch_vars->rxdataF_comp, symbol);*/ - +/* if (mimo_mode == ALAMOUTI) { nr_pbch_alamouti(frame_parms,nr_ue_pbch_vars->rxdataF_comp,symbol); } else if (mimo_mode != SISO) { msg("[PBCH][RX] Unsupported MIMO mode\n"); return(-1); } - +*/ if (symbol==6) { nr_pbch_quantize(pbch_e_rx, (short*)&(nr_ue_pbch_vars->rxdataF_comp[0][symbol*240]), @@ -623,7 +633,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, } pbch_e_rx = nr_ue_pbch_vars->llr; - demod_pbch_e = nr_ue_pbch_vars->demod_pbch_e; + //demod_pbch_e = nr_ue_pbch_vars->demod_pbch_e; pbch_a = nr_ue_pbch_vars->pbch_a; pbch_a_prime = nr_ue_pbch_vars->pbch_a_prime; @@ -634,7 +644,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, for (int cnt = 0; cnt < 8 ; cnt++) printf("pbch rx llr %d rxdata_comp %d addr %p\n",*(pbch_e_rx+cnt), p[cnt], &p[0]); //#endif - +/* for (i=0; iNid_cell,nushift,M,NR_POLAR_PBCH_E,0); +/* //#ifdef DEBUG_PBCH for (i=0; i<16; i++){ printf("unscrambling demod_pbch_e[%d] r = %2.3f i = %2.3f\n", i<<1 , demod_pbch_e[i<<1], demod_pbch_e[(i<<1)+1]);} //#endif - +*/ //polar decoding de-rate matching - decoderState = polar_decoder(demod_pbch_e, pbch_a_b, &frame_parms->pbch_polar_params, decoderListSize, aPrioriArray, pathMetricAppr); + decoderState = polar_decoder_int8_new(pbch_e_rx, pbch_a_b, &frame_parms->pbch_polar_params, decoderListSize, &polar_decoder_init,&polar_rate_matching, &decoding,&bit_extraction,&deinterleaving, &sorting,&path_metric,&update_LLR,0); printf("polar decoder state %d\n", decoderState); if(decoderState == -1) return(decoderState); diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index b31436f161..1069ee7783 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -924,10 +924,10 @@ typedef struct { uint8_t pbch_a_interleaved[NR_POLAR_PBCH_PAYLOAD_BITS>>3]; uint8_t pbch_a_prime[NR_POLAR_PBCH_PAYLOAD_BITS>>3]; uint8_t pbch_e[NR_POLAR_PBCH_E]; - double demod_pbch_e[NR_POLAR_PBCH_E]; + int16_t demod_pbch_e[NR_POLAR_PBCH_E]; /// \brief Pointer to PBCH llrs. /// - first index: ? [0..1919] (hard coded) - int8_t *llr; + int16_t *llr; /// \brief Pointer to PBCH decoded output. /// - first index: ? [0..63] (hard coded) uint8_t *decoded_output; From 7e7acef76495832bf9357995ace621648d15f454 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Thu, 11 Oct 2018 15:07:16 +0200 Subject: [PATCH 302/379] CI: astyling to ease merge Signed-off-by: Raphael Defosseux --- openair2/ENB_APP/enb_config.c | 3540 ++++++++++++++++----------------- 1 file changed, 1676 insertions(+), 1864 deletions(-) diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 011d3f7963..5e3e335742 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -37,12 +37,12 @@ #include "UTIL/OTG/otg_externs.h" #if defined(ENABLE_ITTI) # include "intertask_interface.h" -# if defined(ENABLE_USE_MME) +# if defined(ENABLE_USE_MME) # include "s1ap_eNB.h" # include "sctp_eNB_task.h" # else # define EPC_MODE_ENABLED 0 -# endif +# endif #endif #include "sctp_default_values.h" #include "SystemInformationBlockType2.h" @@ -62,8 +62,7 @@ extern uint16_t sf_ahead; -void RCconfig_flexran() -{ +void RCconfig_flexran() { uint16_t i; uint16_t num_enbs; char aprefix[MAX_OPTNAME_SIZE*2 + 8]; @@ -73,93 +72,87 @@ void RCconfig_flexran() int32_t Nid_cell = 0; uint16_t Nid_cell_tr = 0; uint32_t enb_id = 0; - /* * the only reason for all these variables is, that they are "hard-encoded" * into the CCPARAMS_DESC macro and we need it for the Nid_cell variable ... */ char *frame_type, *prefix_type, *pbch_repetition, *prach_high_speed, - *pusch_hoppingMode, *pusch_enable64QAM, *pusch_groupHoppingEnabled, - *pusch_sequenceHoppingEnabled, *phich_duration, *phich_resource, - *srs_enable, *srs_ackNackST, *srs_MaxUpPts, *pusch_alpha, - *pucch_deltaF_Format1, *pucch_deltaF_Format1b, *pucch_deltaF_Format2, - *pucch_deltaF_Format2a, *pucch_deltaF_Format2b, - *rach_preamblesGroupAConfig, *rach_messagePowerOffsetGroupB, *pcch_nB; + *pusch_hoppingMode, *pusch_enable64QAM, *pusch_groupHoppingEnabled, + *pusch_sequenceHoppingEnabled, *phich_duration, *phich_resource, + *srs_enable, *srs_ackNackST, *srs_MaxUpPts, *pusch_alpha, + *pucch_deltaF_Format1, *pucch_deltaF_Format1b, *pucch_deltaF_Format2, + *pucch_deltaF_Format2a, *pucch_deltaF_Format2b, + *rach_preamblesGroupAConfig, *rach_messagePowerOffsetGroupB, *pcch_nB; long long int downlink_frequency; int32_t tdd_config, tdd_config_s, eutra_band, uplink_frequency_offset, - Nid_cell_mbsfn, N_RB_DL, nb_antenna_ports, prach_root, prach_config_index, - prach_zero_correlation, prach_freq_offset, pucch_delta_shift, - pucch_nRB_CQI, pucch_nCS_AN, pucch_n1_AN, pdsch_referenceSignalPower, - pdsch_p_b, pusch_n_SB, pusch_hoppingOffset, pusch_groupAssignment, - pusch_nDMRS1, srs_BandwidthConfig, srs_SubframeConfig, pusch_p0_Nominal, - pucch_p0_Nominal, msg3_delta_Preamble, rach_numberOfRA_Preambles, - rach_sizeOfRA_PreamblesGroupA, rach_messageSizeGroupA, - rach_powerRampingStep, rach_preambleInitialReceivedTargetPower, - rach_preambleTransMax, rach_raResponseWindowSize, - rach_macContentionResolutionTimer, rach_maxHARQ_Msg3Tx, - pcch_defaultPagingCycle, bcch_modificationPeriodCoeff, - ue_TimersAndConstants_t300, ue_TimersAndConstants_t301, - ue_TimersAndConstants_t310, ue_TimersAndConstants_t311, - ue_TimersAndConstants_n310, ue_TimersAndConstants_n311, - ue_TransmissionMode, ue_multiple_max; - - const char* rxPool_sc_CP_Len; - const char* rxPool_sc_Period; - const char* rxPool_data_CP_Len; + Nid_cell_mbsfn, N_RB_DL, nb_antenna_ports, prach_root, prach_config_index, + prach_zero_correlation, prach_freq_offset, pucch_delta_shift, + pucch_nRB_CQI, pucch_nCS_AN, pucch_n1_AN, pdsch_referenceSignalPower, + pdsch_p_b, pusch_n_SB, pusch_hoppingOffset, pusch_groupAssignment, + pusch_nDMRS1, srs_BandwidthConfig, srs_SubframeConfig, pusch_p0_Nominal, + pucch_p0_Nominal, msg3_delta_Preamble, rach_numberOfRA_Preambles, + rach_sizeOfRA_PreamblesGroupA, rach_messageSizeGroupA, + rach_powerRampingStep, rach_preambleInitialReceivedTargetPower, + rach_preambleTransMax, rach_raResponseWindowSize, + rach_macContentionResolutionTimer, rach_maxHARQ_Msg3Tx, + pcch_defaultPagingCycle, bcch_modificationPeriodCoeff, + ue_TimersAndConstants_t300, ue_TimersAndConstants_t301, + ue_TimersAndConstants_t310, ue_TimersAndConstants_t311, + ue_TimersAndConstants_n310, ue_TimersAndConstants_n311, + ue_TransmissionMode, ue_multiple_max; + const char *rxPool_sc_CP_Len; + const char *rxPool_sc_Period; + const char *rxPool_data_CP_Len; libconfig_int rxPool_ResourceConfig_prb_Num; libconfig_int rxPool_ResourceConfig_prb_Start; libconfig_int rxPool_ResourceConfig_prb_End; - const char* rxPool_ResourceConfig_offsetIndicator_present; + const char *rxPool_ResourceConfig_offsetIndicator_present; libconfig_int rxPool_ResourceConfig_offsetIndicator_choice; - const char* rxPool_ResourceConfig_subframeBitmap_present; - char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf; + const char *rxPool_ResourceConfig_subframeBitmap_present; + char *rxPool_ResourceConfig_subframeBitmap_choice_bs_buf; libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_size; libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused; - //SIB19 //for discRxPool - const char* discRxPool_cp_Len; - const char* discRxPool_discPeriod; + const char *discRxPool_cp_Len; + const char *discRxPool_discPeriod; libconfig_int discRxPool_numRetx; libconfig_int discRxPool_numRepetition; libconfig_int discRxPool_ResourceConfig_prb_Num; libconfig_int discRxPool_ResourceConfig_prb_Start; libconfig_int discRxPool_ResourceConfig_prb_End; - const char* discRxPool_ResourceConfig_offsetIndicator_present; + const char *discRxPool_ResourceConfig_offsetIndicator_present; libconfig_int discRxPool_ResourceConfig_offsetIndicator_choice; - const char* discRxPool_ResourceConfig_subframeBitmap_present; - char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf; + const char *discRxPool_ResourceConfig_subframeBitmap_present; + char *discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf; libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_size; libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused; - //for discRxPoolPS - const char* discRxPoolPS_cp_Len; - const char* discRxPoolPS_discPeriod; + const char *discRxPoolPS_cp_Len; + const char *discRxPoolPS_discPeriod; libconfig_int discRxPoolPS_numRetx; libconfig_int discRxPoolPS_numRepetition; libconfig_int discRxPoolPS_ResourceConfig_prb_Num; libconfig_int discRxPoolPS_ResourceConfig_prb_Start; libconfig_int discRxPoolPS_ResourceConfig_prb_End; - const char* discRxPoolPS_ResourceConfig_offsetIndicator_present; + const char *discRxPoolPS_ResourceConfig_offsetIndicator_present; libconfig_int discRxPoolPS_ResourceConfig_offsetIndicator_choice; - const char* discRxPoolPS_ResourceConfig_subframeBitmap_present; - char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf; + const char *discRxPoolPS_ResourceConfig_subframeBitmap_present; + char *discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf; libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size; libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused; - /* get number of eNBs */ paramdef_t ENBSParams[] = ENBSPARAMS_DESC; config_get(ENBSParams, sizeof(ENBSParams)/sizeof(paramdef_t), NULL); num_enbs = ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt; - /* for eNB ID */ paramdef_t ENBParams[] = ENBPARAMS_DESC; paramlist_def_t ENBParamList = {ENB_CONFIG_STRING_ENB_LIST, NULL, 0}; - /* for Nid_cell */ checkedparam_t config_check_CCparams[] = CCPARAMS_CHECK; paramdef_t CCsParams[] = CCPARAMS_DESC; paramlist_def_t CCsParamList = {ENB_CONFIG_STRING_COMPONENT_CARRIERS, NULL, 0}; + /* map parameter checking array instances to parameter definition array instances */ for (int I = 0; I < (sizeof(CCsParams) / sizeof(paramdef_t)); I++) { CCsParams[I].chkPptr = &(config_check_CCparams[I]); @@ -169,11 +162,11 @@ void RCconfig_flexran() config_get(flexranParams, sizeof(flexranParams)/sizeof(paramdef_t), CONFIG_STRING_NETWORK_CONTROLLER_CONFIG); if (!RC.flexran) { - RC.flexran = calloc(num_enbs, sizeof(flexran_agent_info_t*)); + RC.flexran = calloc(num_enbs, sizeof(flexran_agent_info_t *)); AssertFatal(RC.flexran, "can't ALLOCATE %zu Bytes for %d flexran agent info with size %zu\n", - num_enbs * sizeof(flexran_agent_info_t*), - num_enbs, sizeof(flexran_agent_info_t*)); + num_enbs * sizeof(flexran_agent_info_t *), + num_enbs, sizeof(flexran_agent_info_t *)); } for (i = 0; i < num_enbs; i++) { @@ -183,31 +176,34 @@ void RCconfig_flexran() sizeof(flexran_agent_info_t), i + 1, num_enbs); /* if config says "yes", enable Agent, in all other cases it's like "no" */ RC.flexran[i]->enabled = strcasecmp(*(flexranParams[FLEXRAN_ENABLED].strptr), "yes") == 0; + /* if not enabled, simply skip the rest, it is not needed anyway */ if (!RC.flexran[i]->enabled) continue; + RC.flexran[i]->interface_name = strdup(*(flexranParams[FLEXRAN_INTERFACE_NAME_IDX].strptr)); //inet_ntop(AF_INET, &(enb_properties->properties[mod_id]->flexran_agent_ipv4_address), in_ip, INET_ADDRSTRLEN); RC.flexran[i]->remote_ipv4_addr = strdup(*(flexranParams[FLEXRAN_IPV4_ADDRESS_IDX].strptr)); RC.flexran[i]->remote_port = *(flexranParams[FLEXRAN_PORT_IDX].uptr); RC.flexran[i]->cache_name = strdup(*(flexranParams[FLEXRAN_CACHE_IDX].strptr)); RC.flexran[i]->node_ctrl_state = strcasecmp(*(flexranParams[FLEXRAN_AWAIT_RECONF_IDX].strptr), "yes") == 0 ? ENB_WAIT : ENB_NORMAL_OPERATION; - config_getlist(&ENBParamList, ENBParams, sizeof(ENBParams)/sizeof(paramdef_t),NULL); + /* eNB ID from configuration, as read in by RCconfig_RRC() */ if (!ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr) { // Calculate a default eNB ID if (EPC_MODE_ENABLED) - enb_id = i + (s1ap_generate_eNB_id () & 0xFFFF8); + enb_id = i + (s1ap_generate_eNB_id () & 0xFFFF8); else - enb_id = i; + enb_id = i; } else { - enb_id = *(ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr); + enb_id = *(ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr); } /* cell ID */ sprintf(aprefix, "%s.[%i]", ENB_CONFIG_STRING_ENB_LIST, i); config_getlist(&CCsParamList, NULL, 0, aprefix); + if (CCsParamList.numelt > 0) { sprintf(aprefix, "%s.[%i].%s.[%i]", ENB_CONFIG_STRING_ENB_LIST, i, ENB_CONFIG_STRING_COMPONENT_CARRIERS, 0); config_get(CCsParams, sizeof(CCsParams)/sizeof(paramdef_t), aprefix); @@ -216,13 +212,12 @@ void RCconfig_flexran() RC.flexran[i]->mod_id = i; RC.flexran[i]->agent_id = (((uint64_t)i) << 48) | (((uint64_t)enb_id) << 16) | ((uint64_t)Nid_cell_tr); - /* assume for the moment the monolithic case, i.e. agent can provide * information for all layers */ RC.flexran[i]->capability_mask = FLEXRAN_CAP_LOPHY | FLEXRAN_CAP_HIPHY - | FLEXRAN_CAP_LOMAC | FLEXRAN_CAP_HIMAC - | FLEXRAN_CAP_RLC | FLEXRAN_CAP_PDCP - | FLEXRAN_CAP_SDAP | FLEXRAN_CAP_RRC; + | FLEXRAN_CAP_LOMAC | FLEXRAN_CAP_HIMAC + | FLEXRAN_CAP_RLC | FLEXRAN_CAP_PDCP + | FLEXRAN_CAP_SDAP | FLEXRAN_CAP_RRC; } } @@ -232,29 +227,29 @@ void RCconfig_L1(void) { paramdef_t L1_Params[] = L1PARAMS_DESC; paramlist_def_t L1_ParamList = {CONFIG_STRING_L1_LIST,NULL,0}; - if (RC.eNB == NULL) { - RC.eNB = (PHY_VARS_eNB ***)malloc((1+NUMBER_OF_eNB_MAX)*sizeof(PHY_VARS_eNB**)); + RC.eNB = (PHY_VARS_eNB ** *)malloc((1+NUMBER_OF_eNB_MAX)*sizeof(PHY_VARS_eNB **)); LOG_I(PHY,"RC.eNB = %p\n",RC.eNB); - memset(RC.eNB,0,(1+NUMBER_OF_eNB_MAX)*sizeof(PHY_VARS_eNB**)); + memset(RC.eNB,0,(1+NUMBER_OF_eNB_MAX)*sizeof(PHY_VARS_eNB **)); RC.nb_L1_CC = malloc((1+RC.nb_L1_inst)*sizeof(int)); } config_getlist( &L1_ParamList,L1_Params,sizeof(L1_Params)/sizeof(paramdef_t), NULL); + if (L1_ParamList.numelt > 0) { for (j = 0; j < RC.nb_L1_inst; j++) { RC.nb_L1_CC[j] = *(L1_ParamList.paramarray[j][L1_CC_IDX].uptr); if (RC.eNB[j] == NULL) { - RC.eNB[j] = (PHY_VARS_eNB **)malloc((1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB*)); - LOG_I(PHY,"RC.eNB[%d] = %p\n",j,RC.eNB[j]); - memset(RC.eNB[j],0,(1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB*)); + RC.eNB[j] = (PHY_VARS_eNB **)malloc((1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB *)); + LOG_I(PHY,"RC.eNB[%d] = %p\n",j,RC.eNB[j]); + memset(RC.eNB[j],0,(1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB *)); } - for (i=0;iMod_id = j; RC.eNB[j][i]->CC_id = i; @@ -262,63 +257,51 @@ void RCconfig_L1(void) { } if (strcmp(*(L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_mac") == 0) { - sf_ahead = 4; // Need 4 subframe gap between RX and TX - } - else if (strcmp(*(L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "nfapi") == 0) { + } else if (strcmp(*(L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "nfapi") == 0) { RC.eNB[j][0]->eth_params_n.local_if_name = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_IF_NAME_IDX].strptr)); - RC.eNB[j][0]->eth_params_n.my_addr = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_ADDRESS_IDX].strptr)); - RC.eNB[j][0]->eth_params_n.remote_addr = strdup(*(L1_ParamList.paramarray[j][L1_REMOTE_N_ADDRESS_IDX].strptr)); - RC.eNB[j][0]->eth_params_n.my_portc = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTC_IDX].iptr); - RC.eNB[j][0]->eth_params_n.remote_portc = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTC_IDX].iptr); - RC.eNB[j][0]->eth_params_n.my_portd = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTD_IDX].iptr); - RC.eNB[j][0]->eth_params_n.remote_portd = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTD_IDX].iptr); - RC.eNB[j][0]->eth_params_n.transp_preference = ETH_UDP_MODE; - + RC.eNB[j][0]->eth_params_n.my_addr = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_ADDRESS_IDX].strptr)); + RC.eNB[j][0]->eth_params_n.remote_addr = strdup(*(L1_ParamList.paramarray[j][L1_REMOTE_N_ADDRESS_IDX].strptr)); + RC.eNB[j][0]->eth_params_n.my_portc = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTC_IDX].iptr); + RC.eNB[j][0]->eth_params_n.remote_portc = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTC_IDX].iptr); + RC.eNB[j][0]->eth_params_n.my_portd = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTD_IDX].iptr); + RC.eNB[j][0]->eth_params_n.remote_portd = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTD_IDX].iptr); + RC.eNB[j][0]->eth_params_n.transp_preference = ETH_UDP_MODE; sf_ahead = 2; // Cannot cope with 4 subframes betweem RX and TX - set it to 2 - RC.nb_macrlc_inst = 1; // This is used by mac_top_init_eNB() - // This is used by init_eNB_afterRU() RC.nb_CC = (int *)malloc((1+RC.nb_inst)*sizeof(int)); RC.nb_CC[0]=1; - RC.nb_inst =1; // DJP - feptx_prec uses num_eNB but phy_init_RU uses nb_inst - LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_inst=1 this is because phy_init_RU() uses that to index and not RC.num_eNB - why the 2 similar variables?\n", __FUNCTION__); LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_CC[0]=%d for init_eNB_afterRU()\n", __FUNCTION__, RC.nb_CC[0]); LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_macrlc_inst:%d because used by mac_top_init_eNB()\n", __FUNCTION__, RC.nb_macrlc_inst); - //mac_top_init_eNB(); - - configure_nfapi_pnf(RC.eNB[j][0]->eth_params_n.remote_addr, RC.eNB[j][0]->eth_params_n.remote_portc, RC.eNB[j][0]->eth_params_n.my_addr, RC.eNB[j][0]->eth_params_n.my_portd, RC.eNB[j][0]->eth_params_n .remote_portd); + configure_nfapi_pnf(RC.eNB[j][0]->eth_params_n.remote_addr, RC.eNB[j][0]->eth_params_n.remote_portc, RC.eNB[j][0]->eth_params_n.my_addr, RC.eNB[j][0]->eth_params_n.my_portd, + RC.eNB[j][0]->eth_params_n .remote_portd); + } else { // other midhaul } - else { // other midhaul - } }// j=0..num_inst + printf("Initializing northbound interface for L1\n"); l1_north_init_eNB(); } else { - LOG_I(PHY,"No " CONFIG_STRING_L1_LIST " configuration found"); - + LOG_I(PHY,"No " CONFIG_STRING_L1_LIST " configuration found"); // DJP need to create some structures for VNF - j = 0; - RC.nb_L1_CC = malloc((1+RC.nb_L1_inst)*sizeof(int)); // DJP - 1 lot then??? - RC.nb_L1_CC[j]=1; // DJP - hmmm if (RC.eNB[j] == NULL) { - RC.eNB[j] = (PHY_VARS_eNB **)malloc((1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB**)); + RC.eNB[j] = (PHY_VARS_eNB **)malloc((1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB **)); LOG_I(PHY,"RC.eNB[%d] = %p\n",j,RC.eNB[j]); - memset(RC.eNB[j],0,(1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB***)); + memset(RC.eNB[j],0,(1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB ** *)); } - for (i=0;iMod_id = j; RC.eNB[j][i]->CC_id = i; @@ -329,20 +312,16 @@ void RCconfig_L1(void) { void RCconfig_macrlc() { int j; - - paramdef_t MacRLC_Params[] = MACRLCPARAMS_DESC; paramlist_def_t MacRLC_ParamList = {CONFIG_STRING_MACRLC_LIST,NULL,0}; + config_getlist( &MacRLC_ParamList,MacRLC_Params,sizeof(MacRLC_Params)/sizeof(paramdef_t), NULL); - config_getlist( &MacRLC_ParamList,MacRLC_Params,sizeof(MacRLC_Params)/sizeof(paramdef_t), NULL); - if ( MacRLC_ParamList.numelt > 0) { + RC.nb_macrlc_inst=MacRLC_ParamList.numelt; + mac_top_init_eNB(); + RC.nb_mac_CC = (int *)malloc(RC.nb_macrlc_inst*sizeof(int)); - RC.nb_macrlc_inst=MacRLC_ParamList.numelt; - mac_top_init_eNB(); - RC.nb_mac_CC = (int*)malloc(RC.nb_macrlc_inst*sizeof(int)); - - for (j=0;jpuSch10xSnr = *(MacRLC_ParamList.paramarray[j][MACRLC_PUSCH10xSNR_IDX ].iptr); RC.mac[j]->puCch10xSnr = *(MacRLC_ParamList.paramarray[j][MACRLC_PUCCH10xSNR_IDX ].iptr); RC.nb_mac_CC[j] = *(MacRLC_ParamList.paramarray[j][MACRLC_CC_IDX].iptr); @@ -350,75 +329,65 @@ void RCconfig_macrlc() { //printf("PHY_TEST = %d,%d\n", RC.mac[j]->phy_test, j); if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_RRC") == 0) { - // check number of instances is same as RRC/PDCP - + // check number of instances is same as RRC/PDCP } else if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "cudu") == 0) { - RC.mac[j]->eth_params_n.local_if_name = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_IF_NAME_IDX].strptr)); - RC.mac[j]->eth_params_n.my_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_ADDRESS_IDX].strptr)); - RC.mac[j]->eth_params_n.remote_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_ADDRESS_IDX].strptr)); - RC.mac[j]->eth_params_n.my_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_PORTC_IDX].iptr); - RC.mac[j]->eth_params_n.remote_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTC_IDX].iptr); - RC.mac[j]->eth_params_n.my_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_PORTD_IDX].iptr); - RC.mac[j]->eth_params_n.remote_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTD_IDX].iptr);; - RC.mac[j]->eth_params_n.transp_preference = ETH_UDP_MODE; + RC.mac[j]->eth_params_n.local_if_name = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_IF_NAME_IDX].strptr)); + RC.mac[j]->eth_params_n.my_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_ADDRESS_IDX].strptr)); + RC.mac[j]->eth_params_n.remote_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_ADDRESS_IDX].strptr)); + RC.mac[j]->eth_params_n.my_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_PORTC_IDX].iptr); + RC.mac[j]->eth_params_n.remote_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTC_IDX].iptr); + RC.mac[j]->eth_params_n.my_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_PORTD_IDX].iptr); + RC.mac[j]->eth_params_n.remote_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTD_IDX].iptr);; + RC.mac[j]->eth_params_n.transp_preference = ETH_UDP_MODE; } else { // other midhaul - AssertFatal(1==0,"MACRLC %d: %s unknown northbound midhaul\n",j, *(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr)); - } + AssertFatal(1==0,"MACRLC %d: %s unknown northbound midhaul\n",j, *(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr)); + } if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr), "local_L1") == 0) { - - } else if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr), "nfapi") == 0) { - RC.mac[j]->eth_params_s.local_if_name = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_IF_NAME_IDX].strptr)); - RC.mac[j]->eth_params_s.my_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_ADDRESS_IDX].strptr)); - RC.mac[j]->eth_params_s.remote_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_ADDRESS_IDX].strptr)); - RC.mac[j]->eth_params_s.my_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_PORTC_IDX].iptr); - RC.mac[j]->eth_params_s.remote_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_PORTC_IDX].iptr); - RC.mac[j]->eth_params_s.my_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_PORTD_IDX].iptr); - RC.mac[j]->eth_params_s.remote_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_PORTD_IDX].iptr); - RC.mac[j]->eth_params_s.transp_preference = ETH_UDP_MODE; - + RC.mac[j]->eth_params_s.local_if_name = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_IF_NAME_IDX].strptr)); + RC.mac[j]->eth_params_s.my_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_ADDRESS_IDX].strptr)); + RC.mac[j]->eth_params_s.remote_addr = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_ADDRESS_IDX].strptr)); + RC.mac[j]->eth_params_s.my_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_PORTC_IDX].iptr); + RC.mac[j]->eth_params_s.remote_portc = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_PORTC_IDX].iptr); + RC.mac[j]->eth_params_s.my_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_PORTD_IDX].iptr); + RC.mac[j]->eth_params_s.remote_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_PORTD_IDX].iptr); + RC.mac[j]->eth_params_s.transp_preference = ETH_UDP_MODE; sf_ahead = 2; // Cannot cope with 4 subframes betweem RX and TX - set it to 2 - printf("**************** vnf_port:%d\n", RC.mac[j]->eth_params_s.my_portc); configure_nfapi_vnf(RC.mac[j]->eth_params_s.my_addr, RC.mac[j]->eth_params_s.my_portc); printf("**************** RETURNED FROM configure_nfapi_vnf() vnf_port:%d\n", RC.mac[j]->eth_params_s.my_portc); } else { // other midhaul - AssertFatal(1==0,"MACRLC %d: %s unknown southbound midhaul\n",j,*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr)); + AssertFatal(1==0,"MACRLC %d: %s unknown southbound midhaul\n",j,*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr)); } - if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr), "default") == 0){ - global_scheduler_mode=SCHED_MODE_DEFAULT; - printf("sched mode = default %d [%s]\n",global_scheduler_mode,*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr)); - }else if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr), "fairRR") == 0){ - global_scheduler_mode=SCHED_MODE_FAIR_RR; - printf("sched mode = fairRR %d [%s]\n",global_scheduler_mode,*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr)); - }else{ - global_scheduler_mode=SCHED_MODE_DEFAULT; - printf("sched mode = default %d [%s]\n",global_scheduler_mode,*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr)); + + if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr), "default") == 0) { + global_scheduler_mode=SCHED_MODE_DEFAULT; + printf("sched mode = default %d [%s]\n",global_scheduler_mode,*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr)); + } else if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr), "fairRR") == 0) { + global_scheduler_mode=SCHED_MODE_FAIR_RR; + printf("sched mode = fairRR %d [%s]\n",global_scheduler_mode,*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr)); + } else { + global_scheduler_mode=SCHED_MODE_DEFAULT; + printf("sched mode = default %d [%s]\n",global_scheduler_mode,*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr)); } }// j=0..num_inst } else {// MacRLC_ParamList.numelt > 0 - AssertFatal (0, - "No " CONFIG_STRING_MACRLC_LIST " configuration found"); + AssertFatal (0, + "No " CONFIG_STRING_MACRLC_LIST " configuration found"); } } - -int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { +int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { int num_enbs = 0; - int j,k = 0; int32_t enb_id = 0; int nb_cc = 0; - - - char* frame_type = NULL; + char *frame_type = NULL; int32_t tdd_config = 0; int32_t tdd_config_s = 0; - - char* prefix_type = NULL; - char* pbch_repetition = NULL; - + char *prefix_type = NULL; + char *pbch_repetition = NULL; int32_t eutra_band = 0; long long int downlink_frequency = 0; int32_t uplink_frequency_offset = 0; @@ -426,51 +395,50 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { int32_t Nid_cell_mbsfn = 0; int32_t N_RB_DL = 0; int32_t nb_antenna_ports = 0; - int32_t prach_root = 0; int32_t prach_config_index = 0; - char* prach_high_speed = NULL; + char *prach_high_speed = NULL; int32_t prach_zero_correlation = 0; int32_t prach_freq_offset = 0; int32_t pucch_delta_shift = 0; int32_t pucch_nRB_CQI = 0; int32_t pucch_nCS_AN = 0; -//#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) + //#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) int32_t pucch_n1_AN = 0; -//#endif + //#endif int32_t pdsch_referenceSignalPower = 0; int32_t pdsch_p_b = 0; int32_t pusch_n_SB = 0; - char * pusch_hoppingMode = NULL; + char *pusch_hoppingMode = NULL; int32_t pusch_hoppingOffset = 0; - char* pusch_enable64QAM = NULL; - char* pusch_groupHoppingEnabled = NULL; + char *pusch_enable64QAM = NULL; + char *pusch_groupHoppingEnabled = NULL; int32_t pusch_groupAssignment = 0; - char* pusch_sequenceHoppingEnabled = NULL; + char *pusch_sequenceHoppingEnabled = NULL; int32_t pusch_nDMRS1 = 0; - char* phich_duration = NULL; - char* phich_resource = NULL; - char* srs_enable = NULL; + char *phich_duration = NULL; + char *phich_resource = NULL; + char *srs_enable = NULL; int32_t srs_BandwidthConfig = 0; int32_t srs_SubframeConfig = 0; - char* srs_ackNackST = NULL; - char* srs_MaxUpPts = NULL; + char *srs_ackNackST = NULL; + char *srs_MaxUpPts = NULL; int32_t pusch_p0_Nominal = 0; - char* pusch_alpha = NULL; + char *pusch_alpha = NULL; int32_t pucch_p0_Nominal = 0; int32_t msg3_delta_Preamble = 0; //int32_t ul_CyclicPrefixLength = 0; - char* pucch_deltaF_Format1 = NULL; + char *pucch_deltaF_Format1 = NULL; //const char* pucch_deltaF_Format1a = NULL; - char* pucch_deltaF_Format1b = NULL; - char* pucch_deltaF_Format2 = NULL; - char* pucch_deltaF_Format2a = NULL; - char* pucch_deltaF_Format2b = NULL; + char *pucch_deltaF_Format1b = NULL; + char *pucch_deltaF_Format2 = NULL; + char *pucch_deltaF_Format2a = NULL; + char *pucch_deltaF_Format2b = NULL; int32_t rach_numberOfRA_Preambles = 0; - char* rach_preamblesGroupAConfig = NULL; + char *rach_preamblesGroupAConfig = NULL; int32_t rach_sizeOfRA_PreamblesGroupA = 0; int32_t rach_messageSizeGroupA = 0; - char* rach_messagePowerOffsetGroupB = NULL; + char *rach_messagePowerOffsetGroupB = NULL; int32_t rach_powerRampingStep = 0; int32_t rach_preambleInitialReceivedTargetPower = 0; int32_t rach_preambleTransMax = 0; @@ -478,7 +446,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { int32_t rach_macContentionResolutionTimer = 0; int32_t rach_maxHARQ_Msg3Tx = 0; int32_t pcch_defaultPagingCycle = 0; - char* pcch_nB = NULL; + char *pcch_nB = NULL; int32_t bcch_modificationPeriodCoeff = 0; int32_t ue_TimersAndConstants_t300 = 0; int32_t ue_TimersAndConstants_t301 = 0; @@ -487,1821 +455,1694 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { int32_t ue_TimersAndConstants_n310 = 0; int32_t ue_TimersAndConstants_n311 = 0; int32_t ue_TransmissionMode = 0; - int32_t ue_multiple_max = 0; - //TTN - for D2D //SIB18 - const char* rxPool_sc_CP_Len = NULL; - const char* rxPool_sc_Period = NULL; - const char* rxPool_data_CP_Len = NULL; + const char *rxPool_sc_CP_Len = NULL; + const char *rxPool_sc_Period = NULL; + const char *rxPool_data_CP_Len = NULL; libconfig_int rxPool_ResourceConfig_prb_Num = 0; libconfig_int rxPool_ResourceConfig_prb_Start = 0; libconfig_int rxPool_ResourceConfig_prb_End = 0; - const char* rxPool_ResourceConfig_offsetIndicator_present = NULL; + const char *rxPool_ResourceConfig_offsetIndicator_present = NULL; libconfig_int rxPool_ResourceConfig_offsetIndicator_choice = 0; - const char* rxPool_ResourceConfig_subframeBitmap_present = NULL; - char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = NULL; + const char *rxPool_ResourceConfig_subframeBitmap_present = NULL; + char *rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = NULL; libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 0; libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; //SIB19 //For discRxPool - const char* discRxPool_cp_Len = NULL; - const char* discRxPool_discPeriod = NULL; + const char *discRxPool_cp_Len = NULL; + const char *discRxPool_discPeriod = NULL; libconfig_int discRxPool_numRetx = 0; libconfig_int discRxPool_numRepetition = 0; - libconfig_int discRxPool_ResourceConfig_prb_Num = 0; libconfig_int discRxPool_ResourceConfig_prb_Start = 0; libconfig_int discRxPool_ResourceConfig_prb_End = 0; - const char* discRxPool_ResourceConfig_offsetIndicator_present = NULL; + const char *discRxPool_ResourceConfig_offsetIndicator_present = NULL; libconfig_int discRxPool_ResourceConfig_offsetIndicator_choice = 0; - const char* discRxPool_ResourceConfig_subframeBitmap_present = NULL; - char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = NULL; + const char *discRxPool_ResourceConfig_subframeBitmap_present = NULL; + char *discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = NULL; libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 0; libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; //For discRxPoolPS - const char* discRxPoolPS_cp_Len = NULL; - const char* discRxPoolPS_discPeriod = NULL; + const char *discRxPoolPS_cp_Len = NULL; + const char *discRxPoolPS_discPeriod = NULL; libconfig_int discRxPoolPS_numRetx = 0; libconfig_int discRxPoolPS_numRepetition = 0; - libconfig_int discRxPoolPS_ResourceConfig_prb_Num = 0; libconfig_int discRxPoolPS_ResourceConfig_prb_Start = 0; libconfig_int discRxPoolPS_ResourceConfig_prb_End = 0; - const char* discRxPoolPS_ResourceConfig_offsetIndicator_present = NULL; + const char *discRxPoolPS_ResourceConfig_offsetIndicator_present = NULL; libconfig_int discRxPoolPS_ResourceConfig_offsetIndicator_choice = 0; - const char* discRxPoolPS_ResourceConfig_subframeBitmap_present = NULL; - char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf = NULL; + const char *discRxPoolPS_ResourceConfig_subframeBitmap_present = NULL; + char *discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf = NULL; libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size = 0; libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; - int32_t srb1_timer_poll_retransmit = 0; int32_t srb1_timer_reordering = 0; int32_t srb1_timer_status_prohibit = 0; int32_t srb1_poll_pdu = 0; int32_t srb1_poll_byte = 0; int32_t srb1_max_retx_threshold = 0; - int32_t my_int; - - // for no gcc warnings + // for no gcc warnings (void)my_int; paramdef_t ENBSParams[] = ENBSPARAMS_DESC; - paramdef_t ENBParams[] = ENBPARAMS_DESC; - paramlist_def_t ENBParamList = {ENB_CONFIG_STRING_ENB_LIST,NULL,0}; - + paramlist_def_t ENBParamList = {ENB_CONFIG_STRING_ENB_LIST,NULL,0}; checkedparam_t config_check_CCparams[] = CCPARAMS_CHECK; paramdef_t CCsParams[] = CCPARAMS_DESC; paramlist_def_t CCsParamList = {ENB_CONFIG_STRING_COMPONENT_CARRIERS,NULL,0}; - - paramdef_t SRB1Params[] = SRB1PARAMS_DESC; + paramdef_t SRB1Params[] = SRB1PARAMS_DESC; -/* map parameter checking array instances to parameter definition array instances */ + /* map parameter checking array instances to parameter definition array instances */ for (int I=0; I< ( sizeof(CCsParams)/ sizeof(paramdef_t) ) ; I++) { - CCsParams[I].chkPptr = &(config_check_CCparams[I]); + CCsParams[I].chkPptr = &(config_check_CCparams[I]); } -/* get global parameters, defined outside any section in the config file */ - - config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); + /* get global parameters, defined outside any section in the config file */ + config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); num_enbs = ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt; AssertFatal (i0) { // Output a list of all eNBs. - config_getlist( &ENBParamList,ENBParams,sizeof(ENBParams)/sizeof(paramdef_t),NULL); - - - - - if (ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr == NULL) { - // Calculate a default eNB ID - if (EPC_MODE_ENABLED) { - uint32_t hash; - - hash = s1ap_generate_eNB_id (); - enb_id = i + (hash & 0xFFFF8); - } else { - enb_id = i; - } + config_getlist( &ENBParamList,ENBParams,sizeof(ENBParams)/sizeof(paramdef_t),NULL); + + if (ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr == NULL) { + // Calculate a default eNB ID + if (EPC_MODE_ENABLED) { + uint32_t hash; + hash = s1ap_generate_eNB_id (); + enb_id = i + (hash & 0xFFFF8); } else { - enb_id = *(ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr); + enb_id = i; } + } else { + enb_id = *(ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr); + } - - printf("RRC %d: Southbound Transport %s\n",i,*(ENBParamList.paramarray[i][ENB_TRANSPORT_S_PREFERENCE_IDX].strptr)); - - if (strcmp(*(ENBParamList.paramarray[i][ENB_TRANSPORT_S_PREFERENCE_IDX].strptr), "local_mac") == 0) { + printf("RRC %d: Southbound Transport %s\n",i,*(ENBParamList.paramarray[i][ENB_TRANSPORT_S_PREFERENCE_IDX].strptr)); + if (strcmp(*(ENBParamList.paramarray[i][ENB_TRANSPORT_S_PREFERENCE_IDX].strptr), "local_mac") == 0) { + } else if (strcmp(*(ENBParamList.paramarray[i][ENB_TRANSPORT_S_PREFERENCE_IDX].strptr), "cudu") == 0) { + rrc->eth_params_s.local_if_name = strdup(*(ENBParamList.paramarray[i][ENB_LOCAL_S_IF_NAME_IDX].strptr)); + rrc->eth_params_s.my_addr = strdup(*(ENBParamList.paramarray[i][ENB_LOCAL_S_ADDRESS_IDX].strptr)); + rrc->eth_params_s.remote_addr = strdup(*(ENBParamList.paramarray[i][ENB_REMOTE_S_ADDRESS_IDX].strptr)); + rrc->eth_params_s.my_portc = *(ENBParamList.paramarray[i][ENB_LOCAL_S_PORTC_IDX].uptr); + rrc->eth_params_s.remote_portc = *(ENBParamList.paramarray[i][ENB_REMOTE_S_PORTC_IDX].uptr); + rrc->eth_params_s.my_portd = *(ENBParamList.paramarray[i][ENB_LOCAL_S_PORTD_IDX].uptr); + rrc->eth_params_s.remote_portd = *(ENBParamList.paramarray[i][ENB_REMOTE_S_PORTD_IDX].uptr); + rrc->eth_params_s.transp_preference = ETH_UDP_MODE; + } else { // other midhaul + } - } - else if (strcmp(*(ENBParamList.paramarray[i][ENB_TRANSPORT_S_PREFERENCE_IDX].strptr), "cudu") == 0) { - rrc->eth_params_s.local_if_name = strdup(*(ENBParamList.paramarray[i][ENB_LOCAL_S_IF_NAME_IDX].strptr)); - rrc->eth_params_s.my_addr = strdup(*(ENBParamList.paramarray[i][ENB_LOCAL_S_ADDRESS_IDX].strptr)); - rrc->eth_params_s.remote_addr = strdup(*(ENBParamList.paramarray[i][ENB_REMOTE_S_ADDRESS_IDX].strptr)); - rrc->eth_params_s.my_portc = *(ENBParamList.paramarray[i][ENB_LOCAL_S_PORTC_IDX].uptr); - rrc->eth_params_s.remote_portc = *(ENBParamList.paramarray[i][ENB_REMOTE_S_PORTC_IDX].uptr); - rrc->eth_params_s.my_portd = *(ENBParamList.paramarray[i][ENB_LOCAL_S_PORTD_IDX].uptr); - rrc->eth_params_s.remote_portd = *(ENBParamList.paramarray[i][ENB_REMOTE_S_PORTD_IDX].uptr); - rrc->eth_params_s.transp_preference = ETH_UDP_MODE; - } - - else { // other midhaul - } + // search if in active list - // search if in active list + for (k=0; k cell_type = CELL_MACRO_ENB; + } else if (strcmp(cell_type, "CELL_HOME_ENB") == 0) { + enb_properties_loc.properties[enb_properties_loc_index]->cell_type = CELL_HOME_ENB; + } else { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n", + lib_config_file_name_pP, i, cell_type); + } - paramdef_t PLMNParams[] = PLMNPARAMS_DESC; - paramlist_def_t PLMNParamList = {ENB_CONFIG_STRING_PLMN_LIST, NULL, 0}; - /* map parameter checking array instances to parameter definition array instances */ - checkedparam_t config_check_PLMNParams [] = PLMNPARAMS_CHECK; - for (int I = 0; I < sizeof(PLMNParams) / sizeof(paramdef_t); ++I) - PLMNParams[I].chkPptr = &(config_check_PLMNParams[I]); - - RRC_CONFIGURATION_REQ (msg_p).cell_identity = enb_id; - - /* - if (strcmp(*(ENBParamList.paramarray[i][ENB_CELL_TYPE_IDX].strptr), "CELL_MACRO_ENB") == 0) { - enb_properties_loc.properties[enb_properties_loc_index]->cell_type = CELL_MACRO_ENB; - } else if (strcmp(cell_type, "CELL_HOME_ENB") == 0) { - enb_properties_loc.properties[enb_properties_loc_index]->cell_type = CELL_HOME_ENB; - } else { - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n", - lib_config_file_name_pP, i, cell_type); - } - - enb_properties_loc.properties[enb_properties_loc_index]->eNB_name = strdup(enb_name); - */ - RRC_CONFIGURATION_REQ(msg_p).tac = *ENBParamList.paramarray[i][ENB_TRACKING_AREA_CODE_IDX].uptr; - AssertFatal(!ENBParamList.paramarray[i][ENB_MOBILE_COUNTRY_CODE_IDX_OLD].strptr - && !ENBParamList.paramarray[i][ENB_MOBILE_NETWORK_CODE_IDX_OLD].strptr, - "It seems that you use an old configuration file. Please change the existing\n" - " tracking_area_code = \"1\";\n" - " mobile_country_code = \"208\";\n" - " mobile_network_code = \"93\";\n" - "to\n" - " tracking_area_code = 1; // no string!!\n" - " plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } )\n"); + enb_properties_loc.properties[enb_properties_loc_index]->eNB_name = strdup(enb_name); + */ + RRC_CONFIGURATION_REQ(msg_p).tac = *ENBParamList.paramarray[i][ENB_TRACKING_AREA_CODE_IDX].uptr; + AssertFatal(!ENBParamList.paramarray[i][ENB_MOBILE_COUNTRY_CODE_IDX_OLD].strptr + && !ENBParamList.paramarray[i][ENB_MOBILE_NETWORK_CODE_IDX_OLD].strptr, + "It seems that you use an old configuration file. Please change the existing\n" + " tracking_area_code = \"1\";\n" + " mobile_country_code = \"208\";\n" + " mobile_network_code = \"93\";\n" + "to\n" + " tracking_area_code = 1; // no string!!\n" + " plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } )\n"); + config_getlist(&PLMNParamList, PLMNParams, sizeof(PLMNParams)/sizeof(paramdef_t), enbpath); - config_getlist(&PLMNParamList, PLMNParams, sizeof(PLMNParams)/sizeof(paramdef_t), enbpath); + if (PLMNParamList.numelt < 1 || PLMNParamList.numelt > 6) + AssertFatal(0, "The number of PLMN IDs must be in [1,6], but is %d\n", + PLMNParamList.numelt); - if (PLMNParamList.numelt < 1 || PLMNParamList.numelt > 6) - AssertFatal(0, "The number of PLMN IDs must be in [1,6], but is %d\n", - PLMNParamList.numelt); - RRC_CONFIGURATION_REQ(msg_p).num_plmn = PLMNParamList.numelt; + RRC_CONFIGURATION_REQ(msg_p).num_plmn = PLMNParamList.numelt; - for (int l = 0; l < PLMNParamList.numelt; ++l) { - RRC_CONFIGURATION_REQ(msg_p).mcc[l] = *PLMNParamList.paramarray[l][ENB_MOBILE_COUNTRY_CODE_IDX].uptr; - RRC_CONFIGURATION_REQ(msg_p).mnc[l] = *PLMNParamList.paramarray[l][ENB_MOBILE_NETWORK_CODE_IDX].uptr; - RRC_CONFIGURATION_REQ(msg_p).mnc_digit_length[l] = *PLMNParamList.paramarray[l][ENB_MNC_DIGIT_LENGTH].u8ptr; - AssertFatal(RRC_CONFIGURATION_REQ(msg_p).mnc_digit_length[l] == 3 - || RRC_CONFIGURATION_REQ(msg_p).mnc[l] < 100, - "MNC %d cannot be encoded in two digits as requested (change mnc_digit_length to 3)\n", - RRC_CONFIGURATION_REQ(msg_p).mnc[l]); - } - - - // Parse optional physical parameters - config_getlist( &CCsParamList,NULL,0,enbpath); - - LOG_I(RRC,"num component carriers %d \n",CCsParamList.numelt); - if ( CCsParamList.numelt> 0) { - char ccspath[MAX_OPTNAME_SIZE*2 + 16]; - - for (j = 0; j < CCsParamList.numelt ;j++) { + for (int l = 0; l < PLMNParamList.numelt; ++l) { + RRC_CONFIGURATION_REQ(msg_p).mcc[l] = *PLMNParamList.paramarray[l][ENB_MOBILE_COUNTRY_CODE_IDX].uptr; + RRC_CONFIGURATION_REQ(msg_p).mnc[l] = *PLMNParamList.paramarray[l][ENB_MOBILE_NETWORK_CODE_IDX].uptr; + RRC_CONFIGURATION_REQ(msg_p).mnc_digit_length[l] = *PLMNParamList.paramarray[l][ENB_MNC_DIGIT_LENGTH].u8ptr; + AssertFatal(RRC_CONFIGURATION_REQ(msg_p).mnc_digit_length[l] == 3 + || RRC_CONFIGURATION_REQ(msg_p).mnc[l] < 100, + "MNC %d cannot be encoded in two digits as requested (change mnc_digit_length to 3)\n", + RRC_CONFIGURATION_REQ(msg_p).mnc[l]); + } - sprintf(ccspath,"%s.%s.[%i]",enbpath,ENB_CONFIG_STRING_COMPONENT_CARRIERS,j); - LOG_I(RRC, "enb_config::RCconfig_RRC() parameter number: %d, total number of parameters: %zd, ccspath: %s \n \n", j, sizeof(CCsParams)/sizeof(paramdef_t), ccspath); - config_get( CCsParams,sizeof(CCsParams)/sizeof(paramdef_t),ccspath); + // Parse optional physical parameters + config_getlist( &CCsParamList,NULL,0,enbpath); + LOG_I(RRC,"num component carriers %d \n",CCsParamList.numelt); + if ( CCsParamList.numelt> 0) { + char ccspath[MAX_OPTNAME_SIZE*2 + 16]; - //printf("Component carrier %d\n",component_carrier); + for (j = 0; j < CCsParamList.numelt ; j++) { + sprintf(ccspath,"%s.%s.[%i]",enbpath,ENB_CONFIG_STRING_COMPONENT_CARRIERS,j); + LOG_I(RRC, "enb_config::RCconfig_RRC() parameter number: %d, total number of parameters: %zd, ccspath: %s \n \n", j, sizeof(CCsParams)/sizeof(paramdef_t), ccspath); + config_get( CCsParams,sizeof(CCsParams)/sizeof(paramdef_t),ccspath); + //printf("Component carrier %d\n",component_carrier); + nb_cc++; + RRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = tdd_config; + AssertFatal (tdd_config <= TDD_Config__subframeAssignment_sa6, + "Failed to parse eNB configuration file %s, enb %d illegal tdd_config %d (should be 0-%d)!", + RC.config_file_name, i, tdd_config, TDD_Config__subframeAssignment_sa6); + RRC_CONFIGURATION_REQ (msg_p).tdd_config_s[j] = tdd_config_s; + AssertFatal (tdd_config_s <= TDD_Config__specialSubframePatterns_ssp8, + "Failed to parse eNB configuration file %s, enb %d illegal tdd_config_s %d (should be 0-%d)!", + RC.config_file_name, i, tdd_config_s, TDD_Config__specialSubframePatterns_ssp8); - + if (!prefix_type) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: NORMAL,EXTENDED!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PREFIX_TYPE); + else if (strcmp(prefix_type, "NORMAL") == 0) { + RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = NORMAL; + } else if (strcmp(prefix_type, "EXTENDED") == 0) { + RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = EXTENDED; + } else { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n", + RC.config_file_name, i, prefix_type); + } - nb_cc++; - - - RRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = tdd_config; - - AssertFatal (tdd_config <= TDD_Config__subframeAssignment_sa6, - "Failed to parse eNB configuration file %s, enb %d illegal tdd_config %d (should be 0-%d)!", - RC.config_file_name, i, tdd_config, TDD_Config__subframeAssignment_sa6); - - RRC_CONFIGURATION_REQ (msg_p).tdd_config_s[j] = tdd_config_s; - AssertFatal (tdd_config_s <= TDD_Config__specialSubframePatterns_ssp8, - "Failed to parse eNB configuration file %s, enb %d illegal tdd_config_s %d (should be 0-%d)!", - RC.config_file_name, i, tdd_config_s, TDD_Config__specialSubframePatterns_ssp8); - - if (!prefix_type) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d define %s: NORMAL,EXTENDED!\n", - RC.config_file_name, i, ENB_CONFIG_STRING_PREFIX_TYPE); - else if (strcmp(prefix_type, "NORMAL") == 0) { - RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = NORMAL; - } else if (strcmp(prefix_type, "EXTENDED") == 0) { - RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = EXTENDED; - } else { - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n", - RC.config_file_name, i, prefix_type); - } #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) - if (!pbch_repetition) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n", - RC.config_file_name, i, ENB_CONFIG_STRING_PBCH_REPETITION); - else if (strcmp(pbch_repetition, "TRUE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pbch_repetition[j] = 1; - } else if (strcmp(pbch_repetition, "FALSE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pbch_repetition[j] = 0; - } else { - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pbch_repetition choice: TRUE or FALSE !\n", - RC.config_file_name, i, pbch_repetition); - } + + if (!pbch_repetition) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PBCH_REPETITION); + else if (strcmp(pbch_repetition, "TRUE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pbch_repetition[j] = 1; + } else if (strcmp(pbch_repetition, "FALSE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pbch_repetition[j] = 0; + } else { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pbch_repetition choice: TRUE or FALSE !\n", + RC.config_file_name, i, pbch_repetition); + } + #endif - - RRC_CONFIGURATION_REQ (msg_p).eutra_band[j] = eutra_band; - RRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j] = (uint32_t) downlink_frequency; - RRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j] = (unsigned int) uplink_frequency_offset; - RRC_CONFIGURATION_REQ (msg_p).Nid_cell[j]= Nid_cell; - - if (Nid_cell>503) { - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for Nid_cell choice: 0...503 !\n", - RC.config_file_name, i, Nid_cell); - } - - RRC_CONFIGURATION_REQ (msg_p).N_RB_DL[j]= N_RB_DL; - - if ((N_RB_DL!=6) && (N_RB_DL!=15) && (N_RB_DL!=25) && (N_RB_DL!=50) && (N_RB_DL!=75) && (N_RB_DL!=100)) { - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 6,15,25,50,75,100 !\n", - RC.config_file_name, i, N_RB_DL); - } - - if (strcmp(frame_type, "FDD") == 0) { - RRC_CONFIGURATION_REQ (msg_p).frame_type[j] = FDD; - } else if (strcmp(frame_type, "TDD") == 0) { - RRC_CONFIGURATION_REQ (msg_p).frame_type[j] = TDD; - } else { - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for frame_type choice: FDD or TDD !\n", - RC.config_file_name, i, frame_type); - } - - - RRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = tdd_config; - AssertFatal (tdd_config <= TDD_Config__subframeAssignment_sa6, - "Failed to parse eNB configuration file %s, enb %d illegal tdd_config %d (should be 0-%d)!", - RC.config_file_name, i, tdd_config, TDD_Config__subframeAssignment_sa6); - - - RRC_CONFIGURATION_REQ (msg_p).tdd_config_s[j] = tdd_config_s; - AssertFatal (tdd_config_s <= TDD_Config__specialSubframePatterns_ssp8, - "Failed to parse eNB configuration file %s, enb %d illegal tdd_config_s %d (should be 0-%d)!", - RC.config_file_name, i, tdd_config_s, TDD_Config__specialSubframePatterns_ssp8); - - - - if (!prefix_type) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d define %s: NORMAL,EXTENDED!\n", - RC.config_file_name, i, ENB_CONFIG_STRING_PREFIX_TYPE); - else if (strcmp(prefix_type, "NORMAL") == 0) { - RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = NORMAL; - } else if (strcmp(prefix_type, "EXTENDED") == 0) { - RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = EXTENDED; - } else { - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n", - RC.config_file_name, i, prefix_type); - } - - - - RRC_CONFIGURATION_REQ (msg_p).eutra_band[j] = eutra_band; - // printf( "\teutra band:\t%d\n",RRC_CONFIGURATION_REQ (msg_p).eutra_band); - - - - RRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j] = (uint32_t) downlink_frequency; - //printf( "\tdownlink freq:\t%u\n",RRC_CONFIGURATION_REQ (msg_p).downlink_frequency); - - - RRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j] = (unsigned int) uplink_frequency_offset; - - if (config_check_band_frequencies(j, - RRC_CONFIGURATION_REQ (msg_p).eutra_band[j], - RRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j], - RRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j], - RRC_CONFIGURATION_REQ (msg_p).frame_type[j])) { - AssertFatal(0, "error calling enb_check_band_frequencies\n"); - } - - if ((nb_antenna_ports <1) || (nb_antenna_ports > 2)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nb_antenna_ports choice: 1..2 !\n", - RC.config_file_name, i, nb_antenna_ports); - - RRC_CONFIGURATION_REQ (msg_p).nb_antenna_ports[j] = nb_antenna_ports; - - - RRC_CONFIGURATION_REQ (msg_p).prach_root[j] = prach_root; - - if ((prach_root <0) || (prach_root > 1023)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_root choice: 0..1023 !\n", - RC.config_file_name, i, prach_root); - - RRC_CONFIGURATION_REQ (msg_p).prach_config_index[j] = prach_config_index; - - if ((prach_config_index <0) || (prach_config_index > 63)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_config_index choice: 0..1023 !\n", - RC.config_file_name, i, prach_config_index); - - if (!prach_high_speed) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", - RC.config_file_name, i, ENB_CONFIG_STRING_PRACH_HIGH_SPEED); - else if (strcmp(prach_high_speed, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).prach_high_speed[j] = TRUE; - } else if (strcmp(prach_high_speed, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).prach_high_speed[j] = FALSE; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prach_config choice: ENABLE,DISABLE !\n", - RC.config_file_name, i, prach_high_speed); - - RRC_CONFIGURATION_REQ (msg_p).prach_zero_correlation[j] =prach_zero_correlation; - - if ((prach_zero_correlation <0) || (prach_zero_correlation > 15)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_zero_correlation choice: 0..15!\n", - RC.config_file_name, i, prach_zero_correlation); - - RRC_CONFIGURATION_REQ (msg_p).prach_freq_offset[j] = prach_freq_offset; - if ((prach_freq_offset <0) || (prach_freq_offset > 94)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_freq_offset choice: 0..94!\n", - RC.config_file_name, i, prach_freq_offset); - - RRC_CONFIGURATION_REQ (msg_p).pucch_delta_shift[j] = pucch_delta_shift-1; - - if ((pucch_delta_shift <1) || (pucch_delta_shift > 3)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_delta_shift choice: 1..3!\n", - RC.config_file_name, i, pucch_delta_shift); - - RRC_CONFIGURATION_REQ (msg_p).pucch_nRB_CQI[j] = pucch_nRB_CQI; + RRC_CONFIGURATION_REQ (msg_p).eutra_band[j] = eutra_band; + RRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j] = (uint32_t) downlink_frequency; + RRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j] = (unsigned int) uplink_frequency_offset; + RRC_CONFIGURATION_REQ (msg_p).Nid_cell[j]= Nid_cell; - if ((pucch_nRB_CQI <0) || (pucch_nRB_CQI > 98)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nRB_CQI choice: 0..98!\n", - RC.config_file_name, i, pucch_nRB_CQI); + if (Nid_cell>503) { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for Nid_cell choice: 0...503 !\n", + RC.config_file_name, i, Nid_cell); + } - RRC_CONFIGURATION_REQ (msg_p).pucch_nCS_AN[j] = pucch_nCS_AN; + RRC_CONFIGURATION_REQ (msg_p).N_RB_DL[j]= N_RB_DL; - if ((pucch_nCS_AN <0) || (pucch_nCS_AN > 7)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nCS_AN choice: 0..7!\n", - RC.config_file_name, i, pucch_nCS_AN); + if ((N_RB_DL!=6) && (N_RB_DL!=15) && (N_RB_DL!=25) && (N_RB_DL!=50) && (N_RB_DL!=75) && (N_RB_DL!=100)) { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 6,15,25,50,75,100 !\n", + RC.config_file_name, i, N_RB_DL); + } -//#if (RRC_VERSION < MAKE_VERSION(10, 0, 0)) - RRC_CONFIGURATION_REQ (msg_p).pucch_n1_AN[j] = pucch_n1_AN; + if (strcmp(frame_type, "FDD") == 0) { + RRC_CONFIGURATION_REQ (msg_p).frame_type[j] = FDD; + } else if (strcmp(frame_type, "TDD") == 0) { + RRC_CONFIGURATION_REQ (msg_p).frame_type[j] = TDD; + } else { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for frame_type choice: FDD or TDD !\n", + RC.config_file_name, i, frame_type); + } - if ((pucch_n1_AN <0) || (pucch_n1_AN > 2047)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_n1_AN choice: 0..2047!\n", - RC.config_file_name, i, pucch_n1_AN); + RRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = tdd_config; + AssertFatal (tdd_config <= TDD_Config__subframeAssignment_sa6, + "Failed to parse eNB configuration file %s, enb %d illegal tdd_config %d (should be 0-%d)!", + RC.config_file_name, i, tdd_config, TDD_Config__subframeAssignment_sa6); + RRC_CONFIGURATION_REQ (msg_p).tdd_config_s[j] = tdd_config_s; + AssertFatal (tdd_config_s <= TDD_Config__specialSubframePatterns_ssp8, + "Failed to parse eNB configuration file %s, enb %d illegal tdd_config_s %d (should be 0-%d)!", + RC.config_file_name, i, tdd_config_s, TDD_Config__specialSubframePatterns_ssp8); -//#endif - RRC_CONFIGURATION_REQ (msg_p).pdsch_referenceSignalPower[j] = pdsch_referenceSignalPower; + if (!prefix_type) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: NORMAL,EXTENDED!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PREFIX_TYPE); + else if (strcmp(prefix_type, "NORMAL") == 0) { + RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = NORMAL; + } else if (strcmp(prefix_type, "EXTENDED") == 0) { + RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = EXTENDED; + } else { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n", + RC.config_file_name, i, prefix_type); + } - if ((pdsch_referenceSignalPower <-60) || (pdsch_referenceSignalPower > 50)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_referenceSignalPower choice:-60..50!\n", - RC.config_file_name, i, pdsch_referenceSignalPower); + RRC_CONFIGURATION_REQ (msg_p).eutra_band[j] = eutra_band; + // printf( "\teutra band:\t%d\n",RRC_CONFIGURATION_REQ (msg_p).eutra_band); + RRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j] = (uint32_t) downlink_frequency; + //printf( "\tdownlink freq:\t%u\n",RRC_CONFIGURATION_REQ (msg_p).downlink_frequency); + RRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j] = (unsigned int) uplink_frequency_offset; - RRC_CONFIGURATION_REQ (msg_p).pdsch_p_b[j] = pdsch_p_b; + if (config_check_band_frequencies(j, + RRC_CONFIGURATION_REQ (msg_p).eutra_band[j], + RRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j], + RRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j], + RRC_CONFIGURATION_REQ (msg_p).frame_type[j])) { + AssertFatal(0, "error calling enb_check_band_frequencies\n"); + } - if ((pdsch_p_b <0) || (pdsch_p_b > 3)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_p_b choice: 0..3!\n", - RC.config_file_name, i, pdsch_p_b); + if ((nb_antenna_ports <1) || (nb_antenna_ports > 2)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nb_antenna_ports choice: 1..2 !\n", + RC.config_file_name, i, nb_antenna_ports); - RRC_CONFIGURATION_REQ (msg_p).pusch_n_SB[j] = pusch_n_SB; + RRC_CONFIGURATION_REQ (msg_p).nb_antenna_ports[j] = nb_antenna_ports; + RRC_CONFIGURATION_REQ (msg_p).prach_root[j] = prach_root; - if ((pusch_n_SB <1) || (pusch_n_SB > 4)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_n_SB choice: 1..4!\n", - RC.config_file_name, i, pusch_n_SB); + if ((prach_root <0) || (prach_root > 1023)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_root choice: 0..1023 !\n", + RC.config_file_name, i, prach_root); - if (!pusch_hoppingMode) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d define %s: interSubframe,intraAndInterSubframe!\n", - RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_HOPPINGMODE); - else if (strcmp(pusch_hoppingMode,"interSubFrame")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_hoppingMode[j] = PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_interSubFrame; - } else if (strcmp(pusch_hoppingMode,"intraAndInterSubFrame")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_hoppingMode[j] = PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_intraAndInterSubFrame; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingMode choice: interSubframe,intraAndInterSubframe!\n", - RC.config_file_name, i, pusch_hoppingMode); + RRC_CONFIGURATION_REQ (msg_p).prach_config_index[j] = prach_config_index; - RRC_CONFIGURATION_REQ (msg_p).pusch_hoppingOffset[j] = pusch_hoppingOffset; + if ((prach_config_index <0) || (prach_config_index > 63)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_config_index choice: 0..1023 !\n", + RC.config_file_name, i, prach_config_index); - if ((pusch_hoppingOffset<0) || (pusch_hoppingOffset>98)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingOffset choice: 0..98!\n", - RC.config_file_name, i, pusch_hoppingMode); + if (!prach_high_speed) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PRACH_HIGH_SPEED); + else if (strcmp(prach_high_speed, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).prach_high_speed[j] = TRUE; + } else if (strcmp(prach_high_speed, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).prach_high_speed[j] = FALSE; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prach_config choice: ENABLE,DISABLE !\n", + RC.config_file_name, i, prach_high_speed); - if (!pusch_enable64QAM) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", - RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_ENABLE64QAM); - else if (strcmp(pusch_enable64QAM, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_enable64QAM[j] = TRUE; - } else if (strcmp(pusch_enable64QAM, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_enable64QAM[j] = FALSE; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n", - RC.config_file_name, i, pusch_enable64QAM); + RRC_CONFIGURATION_REQ (msg_p).prach_zero_correlation[j] =prach_zero_correlation; - if (!pusch_groupHoppingEnabled) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", - RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN); - else if (strcmp(pusch_groupHoppingEnabled, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_groupHoppingEnabled[j] = TRUE; - } else if (strcmp(pusch_groupHoppingEnabled, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_groupHoppingEnabled[j] = FALSE; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n", - RC.config_file_name, i, pusch_groupHoppingEnabled); + if ((prach_zero_correlation <0) || (prach_zero_correlation > 15)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_zero_correlation choice: 0..15!\n", + RC.config_file_name, i, prach_zero_correlation); + RRC_CONFIGURATION_REQ (msg_p).prach_freq_offset[j] = prach_freq_offset; - RRC_CONFIGURATION_REQ (msg_p).pusch_groupAssignment[j] = pusch_groupAssignment; + if ((prach_freq_offset <0) || (prach_freq_offset > 94)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_freq_offset choice: 0..94!\n", + RC.config_file_name, i, prach_freq_offset); - if ((pusch_groupAssignment<0)||(pusch_groupAssignment>29)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_groupAssignment choice: 0..29!\n", - RC.config_file_name, i, pusch_groupAssignment); + RRC_CONFIGURATION_REQ (msg_p).pucch_delta_shift[j] = pucch_delta_shift-1; - if (!pusch_sequenceHoppingEnabled) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", - RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN); - else if (strcmp(pusch_sequenceHoppingEnabled, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_sequenceHoppingEnabled[j] = TRUE; - } else if (strcmp(pusch_sequenceHoppingEnabled, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_sequenceHoppingEnabled[j] = FALSE; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_sequenceHoppingEnabled choice: ENABLE,DISABLE!\n", - RC.config_file_name, i, pusch_sequenceHoppingEnabled); + if ((pucch_delta_shift <1) || (pucch_delta_shift > 3)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_delta_shift choice: 1..3!\n", + RC.config_file_name, i, pucch_delta_shift); - RRC_CONFIGURATION_REQ (msg_p).pusch_nDMRS1[j] = pusch_nDMRS1; //cyclic_shift in RRC! + RRC_CONFIGURATION_REQ (msg_p).pucch_nRB_CQI[j] = pucch_nRB_CQI; - if ((pusch_nDMRS1 <0) || (pusch_nDMRS1>7)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_nDMRS1 choice: 0..7!\n", - RC.config_file_name, i, pusch_nDMRS1); + if ((pucch_nRB_CQI <0) || (pucch_nRB_CQI > 98)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nRB_CQI choice: 0..98!\n", + RC.config_file_name, i, pucch_nRB_CQI); - if (strcmp(phich_duration,"NORMAL")==0) { - RRC_CONFIGURATION_REQ (msg_p).phich_duration[j] = PHICH_Config__phich_Duration_normal; - } else if (strcmp(phich_duration,"EXTENDED")==0) { - RRC_CONFIGURATION_REQ (msg_p).phich_duration[j] = PHICH_Config__phich_Duration_extended; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_duration choice: NORMAL,EXTENDED!\n", - RC.config_file_name, i, phich_duration); + RRC_CONFIGURATION_REQ (msg_p).pucch_nCS_AN[j] = pucch_nCS_AN; - if (strcmp(phich_resource,"ONESIXTH")==0) { - RRC_CONFIGURATION_REQ (msg_p).phich_resource[j] = PHICH_Config__phich_Resource_oneSixth ; - } else if (strcmp(phich_resource,"HALF")==0) { - RRC_CONFIGURATION_REQ (msg_p).phich_resource[j] = PHICH_Config__phich_Resource_half; - } else if (strcmp(phich_resource,"ONE")==0) { - RRC_CONFIGURATION_REQ (msg_p).phich_resource[j] = PHICH_Config__phich_Resource_one; - } else if (strcmp(phich_resource,"TWO")==0) { - RRC_CONFIGURATION_REQ (msg_p).phich_resource[j] = PHICH_Config__phich_Resource_two; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_resource choice: ONESIXTH,HALF,ONE,TWO!\n", - RC.config_file_name, i, phich_resource); + if ((pucch_nCS_AN <0) || (pucch_nCS_AN > 7)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nCS_AN choice: 0..7!\n", + RC.config_file_name, i, pucch_nCS_AN); - printf("phich.resource %ld (%s), phich.duration %ld (%s)\n", - RRC_CONFIGURATION_REQ (msg_p).phich_resource[j],phich_resource, - RRC_CONFIGURATION_REQ (msg_p).phich_duration[j],phich_duration); + //#if (RRC_VERSION < MAKE_VERSION(10, 0, 0)) + RRC_CONFIGURATION_REQ (msg_p).pucch_n1_AN[j] = pucch_n1_AN; - if (strcmp(srs_enable, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).srs_enable[j] = TRUE; - } else if (strcmp(srs_enable, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).srs_enable[j] = FALSE; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n", - RC.config_file_name, i, srs_enable); + if ((pucch_n1_AN <0) || (pucch_n1_AN > 2047)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_n1_AN choice: 0..2047!\n", + RC.config_file_name, i, pucch_n1_AN); - if (RRC_CONFIGURATION_REQ (msg_p).srs_enable[j] == TRUE) { + //#endif + RRC_CONFIGURATION_REQ (msg_p).pdsch_referenceSignalPower[j] = pdsch_referenceSignalPower; - RRC_CONFIGURATION_REQ (msg_p).srs_BandwidthConfig[j] = srs_BandwidthConfig; + if ((pdsch_referenceSignalPower <-60) || (pdsch_referenceSignalPower > 50)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_referenceSignalPower choice:-60..50!\n", + RC.config_file_name, i, pdsch_referenceSignalPower); - if ((srs_BandwidthConfig < 0) || (srs_BandwidthConfig >7)) - AssertFatal (0, "Failed to parse eNB configuration file %s, enb %d unknown value %d for srs_BandwidthConfig choice: 0...7\n", - RC.config_file_name, i, srs_BandwidthConfig); + RRC_CONFIGURATION_REQ (msg_p).pdsch_p_b[j] = pdsch_p_b; - RRC_CONFIGURATION_REQ (msg_p).srs_SubframeConfig[j] = srs_SubframeConfig; + if ((pdsch_p_b <0) || (pdsch_p_b > 3)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_p_b choice: 0..3!\n", + RC.config_file_name, i, pdsch_p_b); - if ((srs_SubframeConfig<0) || (srs_SubframeConfig>15)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for srs_SubframeConfig choice: 0..15 !\n", - RC.config_file_name, i, srs_SubframeConfig); + RRC_CONFIGURATION_REQ (msg_p).pusch_n_SB[j] = pusch_n_SB; - if (strcmp(srs_ackNackST, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).srs_ackNackST[j] = TRUE; - } else if (strcmp(srs_ackNackST, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).srs_ackNackST[j] = FALSE; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n", - RC.config_file_name, i, srs_ackNackST); + if ((pusch_n_SB <1) || (pusch_n_SB > 4)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_n_SB choice: 1..4!\n", + RC.config_file_name, i, pusch_n_SB); - if (strcmp(srs_MaxUpPts, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).srs_MaxUpPts[j] = TRUE; - } else if (strcmp(srs_MaxUpPts, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).srs_MaxUpPts[j] = FALSE; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_MaxUpPts choice: ENABLE,DISABLE !\n", - RC.config_file_name, i, srs_MaxUpPts); - } + if (!pusch_hoppingMode) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: interSubframe,intraAndInterSubframe!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_HOPPINGMODE); + else if (strcmp(pusch_hoppingMode,"interSubFrame")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_hoppingMode[j] = PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_interSubFrame; + } else if (strcmp(pusch_hoppingMode,"intraAndInterSubFrame")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_hoppingMode[j] = PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_intraAndInterSubFrame; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingMode choice: interSubframe,intraAndInterSubframe!\n", + RC.config_file_name, i, pusch_hoppingMode); - RRC_CONFIGURATION_REQ (msg_p).pusch_p0_Nominal[j] = pusch_p0_Nominal; + RRC_CONFIGURATION_REQ (msg_p).pusch_hoppingOffset[j] = pusch_hoppingOffset; - if ((pusch_p0_Nominal<-126) || (pusch_p0_Nominal>24)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_p0_Nominal choice: -126..24 !\n", - RC.config_file_name, i, pusch_p0_Nominal); + if ((pusch_hoppingOffset<0) || (pusch_hoppingOffset>98)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingOffset choice: 0..98!\n", + RC.config_file_name, i, pusch_hoppingMode); + + if (!pusch_enable64QAM) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_ENABLE64QAM); + else if (strcmp(pusch_enable64QAM, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_enable64QAM[j] = TRUE; + } else if (strcmp(pusch_enable64QAM, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_enable64QAM[j] = FALSE; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n", + RC.config_file_name, i, pusch_enable64QAM); + + if (!pusch_groupHoppingEnabled) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN); + else if (strcmp(pusch_groupHoppingEnabled, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_groupHoppingEnabled[j] = TRUE; + } else if (strcmp(pusch_groupHoppingEnabled, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_groupHoppingEnabled[j] = FALSE; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n", + RC.config_file_name, i, pusch_groupHoppingEnabled); + + RRC_CONFIGURATION_REQ (msg_p).pusch_groupAssignment[j] = pusch_groupAssignment; + + if ((pusch_groupAssignment<0)||(pusch_groupAssignment>29)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_groupAssignment choice: 0..29!\n", + RC.config_file_name, i, pusch_groupAssignment); + + if (!pusch_sequenceHoppingEnabled) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN); + else if (strcmp(pusch_sequenceHoppingEnabled, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_sequenceHoppingEnabled[j] = TRUE; + } else if (strcmp(pusch_sequenceHoppingEnabled, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_sequenceHoppingEnabled[j] = FALSE; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_sequenceHoppingEnabled choice: ENABLE,DISABLE!\n", + RC.config_file_name, i, pusch_sequenceHoppingEnabled); + + RRC_CONFIGURATION_REQ (msg_p).pusch_nDMRS1[j] = pusch_nDMRS1; //cyclic_shift in RRC! + + if ((pusch_nDMRS1 <0) || (pusch_nDMRS1>7)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_nDMRS1 choice: 0..7!\n", + RC.config_file_name, i, pusch_nDMRS1); + + if (strcmp(phich_duration,"NORMAL")==0) { + RRC_CONFIGURATION_REQ (msg_p).phich_duration[j] = PHICH_Config__phich_Duration_normal; + } else if (strcmp(phich_duration,"EXTENDED")==0) { + RRC_CONFIGURATION_REQ (msg_p).phich_duration[j] = PHICH_Config__phich_Duration_extended; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_duration choice: NORMAL,EXTENDED!\n", + RC.config_file_name, i, phich_duration); + + if (strcmp(phich_resource,"ONESIXTH")==0) { + RRC_CONFIGURATION_REQ (msg_p).phich_resource[j] = PHICH_Config__phich_Resource_oneSixth ; + } else if (strcmp(phich_resource,"HALF")==0) { + RRC_CONFIGURATION_REQ (msg_p).phich_resource[j] = PHICH_Config__phich_Resource_half; + } else if (strcmp(phich_resource,"ONE")==0) { + RRC_CONFIGURATION_REQ (msg_p).phich_resource[j] = PHICH_Config__phich_Resource_one; + } else if (strcmp(phich_resource,"TWO")==0) { + RRC_CONFIGURATION_REQ (msg_p).phich_resource[j] = PHICH_Config__phich_Resource_two; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_resource choice: ONESIXTH,HALF,ONE,TWO!\n", + RC.config_file_name, i, phich_resource); + + printf("phich.resource %ld (%s), phich.duration %ld (%s)\n", + RRC_CONFIGURATION_REQ (msg_p).phich_resource[j],phich_resource, + RRC_CONFIGURATION_REQ (msg_p).phich_duration[j],phich_duration); + + if (strcmp(srs_enable, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).srs_enable[j] = TRUE; + } else if (strcmp(srs_enable, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).srs_enable[j] = FALSE; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n", + RC.config_file_name, i, srs_enable); + + if (RRC_CONFIGURATION_REQ (msg_p).srs_enable[j] == TRUE) { + RRC_CONFIGURATION_REQ (msg_p).srs_BandwidthConfig[j] = srs_BandwidthConfig; + + if ((srs_BandwidthConfig < 0) || (srs_BandwidthConfig >7)) + AssertFatal (0, "Failed to parse eNB configuration file %s, enb %d unknown value %d for srs_BandwidthConfig choice: 0...7\n", + RC.config_file_name, i, srs_BandwidthConfig); + + RRC_CONFIGURATION_REQ (msg_p).srs_SubframeConfig[j] = srs_SubframeConfig; + + if ((srs_SubframeConfig<0) || (srs_SubframeConfig>15)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for srs_SubframeConfig choice: 0..15 !\n", + RC.config_file_name, i, srs_SubframeConfig); + + if (strcmp(srs_ackNackST, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).srs_ackNackST[j] = TRUE; + } else if (strcmp(srs_ackNackST, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).srs_ackNackST[j] = FALSE; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n", + RC.config_file_name, i, srs_ackNackST); + + if (strcmp(srs_MaxUpPts, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).srs_MaxUpPts[j] = TRUE; + } else if (strcmp(srs_MaxUpPts, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).srs_MaxUpPts[j] = FALSE; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_MaxUpPts choice: ENABLE,DISABLE !\n", + RC.config_file_name, i, srs_MaxUpPts); + } + + RRC_CONFIGURATION_REQ (msg_p).pusch_p0_Nominal[j] = pusch_p0_Nominal; + + if ((pusch_p0_Nominal<-126) || (pusch_p0_Nominal>24)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_p0_Nominal choice: -126..24 !\n", + RC.config_file_name, i, pusch_p0_Nominal); #if (RRC_VERSION <= MAKE_VERSION(12, 0, 0)) - if (strcmp(pusch_alpha,"AL0")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al0; - } else if (strcmp(pusch_alpha,"AL04")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al04; - } else if (strcmp(pusch_alpha,"AL05")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al05; - } else if (strcmp(pusch_alpha,"AL06")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al06; - } else if (strcmp(pusch_alpha,"AL07")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al07; - } else if (strcmp(pusch_alpha,"AL08")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al08; - } else if (strcmp(pusch_alpha,"AL09")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al09; - } else if (strcmp(pusch_alpha,"AL1")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al1; - } -#endif + if (strcmp(pusch_alpha,"AL0")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al0; + } else if (strcmp(pusch_alpha,"AL04")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al04; + } else if (strcmp(pusch_alpha,"AL05")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al05; + } else if (strcmp(pusch_alpha,"AL06")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al06; + } else if (strcmp(pusch_alpha,"AL07")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al07; + } else if (strcmp(pusch_alpha,"AL08")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al08; + } else if (strcmp(pusch_alpha,"AL09")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al09; + } else if (strcmp(pusch_alpha,"AL1")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al1; + } + +#endif #if (RRC_VERSION >= MAKE_VERSION(12, 0, 0)) - if (strcmp(pusch_alpha,"AL0")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al0; - } else if (strcmp(pusch_alpha,"AL04")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al04; - } else if (strcmp(pusch_alpha,"AL05")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al05; - } else if (strcmp(pusch_alpha,"AL06")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al06; - } else if (strcmp(pusch_alpha,"AL07")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al07; - } else if (strcmp(pusch_alpha,"AL08")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al08; - } else if (strcmp(pusch_alpha,"AL09")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al09; - } else if (strcmp(pusch_alpha,"AL1")==0) { - RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al1; - } + + if (strcmp(pusch_alpha,"AL0")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al0; + } else if (strcmp(pusch_alpha,"AL04")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al04; + } else if (strcmp(pusch_alpha,"AL05")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al05; + } else if (strcmp(pusch_alpha,"AL06")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al06; + } else if (strcmp(pusch_alpha,"AL07")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al07; + } else if (strcmp(pusch_alpha,"AL08")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al08; + } else if (strcmp(pusch_alpha,"AL09")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al09; + } else if (strcmp(pusch_alpha,"AL1")==0) { + RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al1; + } + #endif - else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_Alpha choice: AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1!\n", - RC.config_file_name, i, pusch_alpha); + else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_Alpha choice: AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1!\n", + RC.config_file_name, i, pusch_alpha); - RRC_CONFIGURATION_REQ (msg_p).pucch_p0_Nominal[j] = pucch_p0_Nominal; + RRC_CONFIGURATION_REQ (msg_p).pucch_p0_Nominal[j] = pucch_p0_Nominal; - if ((pucch_p0_Nominal<-127) || (pucch_p0_Nominal>-96)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_p0_Nominal choice: -127..-96 !\n", - RC.config_file_name, i, pucch_p0_Nominal); + if ((pucch_p0_Nominal<-127) || (pucch_p0_Nominal>-96)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_p0_Nominal choice: -127..-96 !\n", + RC.config_file_name, i, pucch_p0_Nominal); - RRC_CONFIGURATION_REQ (msg_p).msg3_delta_Preamble[j] = msg3_delta_Preamble; + RRC_CONFIGURATION_REQ (msg_p).msg3_delta_Preamble[j] = msg3_delta_Preamble; - if ((msg3_delta_Preamble<-1) || (msg3_delta_Preamble>6)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for msg3_delta_Preamble choice: -1..6 !\n", - RC.config_file_name, i, msg3_delta_Preamble); + if ((msg3_delta_Preamble<-1) || (msg3_delta_Preamble>6)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for msg3_delta_Preamble choice: -1..6 !\n", + RC.config_file_name, i, msg3_delta_Preamble); + if (strcmp(pucch_deltaF_Format1,"deltaF_2")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF_2; + } else if (strcmp(pucch_deltaF_Format1,"deltaF0")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF0; + } else if (strcmp(pucch_deltaF_Format1,"deltaF2")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF2; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1 choice: deltaF_2,dltaF0,deltaF2!\n", + RC.config_file_name, i, pucch_deltaF_Format1); - if (strcmp(pucch_deltaF_Format1,"deltaF_2")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF_2; - } else if (strcmp(pucch_deltaF_Format1,"deltaF0")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF0; - } else if (strcmp(pucch_deltaF_Format1,"deltaF2")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF2; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1 choice: deltaF_2,dltaF0,deltaF2!\n", - RC.config_file_name, i, pucch_deltaF_Format1); + if (strcmp(pucch_deltaF_Format1b,"deltaF1")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF1; + } else if (strcmp(pucch_deltaF_Format1b,"deltaF3")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF3; + } else if (strcmp(pucch_deltaF_Format1b,"deltaF5")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF5; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1b choice: deltaF1,dltaF3,deltaF5!\n", + RC.config_file_name, i, pucch_deltaF_Format1b); - if (strcmp(pucch_deltaF_Format1b,"deltaF1")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF1; - } else if (strcmp(pucch_deltaF_Format1b,"deltaF3")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF3; - } else if (strcmp(pucch_deltaF_Format1b,"deltaF5")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format1b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF5; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1b choice: deltaF1,dltaF3,deltaF5!\n", - RC.config_file_name, i, pucch_deltaF_Format1b); + if (strcmp(pucch_deltaF_Format2,"deltaF_2")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF_2; + } else if (strcmp(pucch_deltaF_Format2,"deltaF0")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF0; + } else if (strcmp(pucch_deltaF_Format2,"deltaF1")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF1; + } else if (strcmp(pucch_deltaF_Format2,"deltaF2")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF2; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2 choice: deltaF_2,dltaF0,deltaF1,deltaF2!\n", + RC.config_file_name, i, pucch_deltaF_Format2); + if (strcmp(pucch_deltaF_Format2a,"deltaF_2")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2a[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF_2; + } else if (strcmp(pucch_deltaF_Format2a,"deltaF0")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2a[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF0; + } else if (strcmp(pucch_deltaF_Format2a,"deltaF2")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2a[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF2; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2a choice: deltaF_2,dltaF0,deltaF2!\n", + RC.config_file_name, i, pucch_deltaF_Format2a); - if (strcmp(pucch_deltaF_Format2,"deltaF_2")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF_2; - } else if (strcmp(pucch_deltaF_Format2,"deltaF0")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF0; - } else if (strcmp(pucch_deltaF_Format2,"deltaF1")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF1; - } else if (strcmp(pucch_deltaF_Format2,"deltaF2")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF2; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2 choice: deltaF_2,dltaF0,deltaF1,deltaF2!\n", - RC.config_file_name, i, pucch_deltaF_Format2); + if (strcmp(pucch_deltaF_Format2b,"deltaF_2")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF_2; + } else if (strcmp(pucch_deltaF_Format2b,"deltaF0")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF0; + } else if (strcmp(pucch_deltaF_Format2b,"deltaF2")==0) { + RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF2; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2b choice: deltaF_2,dltaF0,deltaF2!\n", + RC.config_file_name, i, pucch_deltaF_Format2b); - if (strcmp(pucch_deltaF_Format2a,"deltaF_2")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2a[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF_2; - } else if (strcmp(pucch_deltaF_Format2a,"deltaF0")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2a[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF0; - } else if (strcmp(pucch_deltaF_Format2a,"deltaF2")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2a[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF2; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2a choice: deltaF_2,dltaF0,deltaF2!\n", - RC.config_file_name, i, pucch_deltaF_Format2a); + RRC_CONFIGURATION_REQ (msg_p).rach_numberOfRA_Preambles[j] = (rach_numberOfRA_Preambles/4)-1; - if (strcmp(pucch_deltaF_Format2b,"deltaF_2")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF_2; - } else if (strcmp(pucch_deltaF_Format2b,"deltaF0")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF0; - } else if (strcmp(pucch_deltaF_Format2b,"deltaF2")==0) { - RRC_CONFIGURATION_REQ (msg_p).pucch_deltaF_Format2b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF2; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2b choice: deltaF_2,dltaF0,deltaF2!\n", - RC.config_file_name, i, pucch_deltaF_Format2b); + if ((rach_numberOfRA_Preambles <4) || (rach_numberOfRA_Preambles>64) || ((rach_numberOfRA_Preambles&3)!=0)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_numberOfRA_Preambles choice: 4,8,12,...,64!\n", + RC.config_file_name, i, rach_numberOfRA_Preambles); + if (strcmp(rach_preamblesGroupAConfig, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).rach_preamblesGroupAConfig[j] = TRUE; + RRC_CONFIGURATION_REQ (msg_p).rach_sizeOfRA_PreamblesGroupA[j] = (rach_sizeOfRA_PreamblesGroupA/4)-1; + if ((rach_numberOfRA_Preambles <4) || (rach_numberOfRA_Preambles>60) || ((rach_numberOfRA_Preambles&3)!=0)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_sizeOfRA_PreamblesGroupA choice: 4,8,12,...,60!\n", + RC.config_file_name, i, rach_sizeOfRA_PreamblesGroupA); + switch (rach_messageSizeGroupA) { + case 56: + RRC_CONFIGURATION_REQ (msg_p).rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b56; + break; - RRC_CONFIGURATION_REQ (msg_p).rach_numberOfRA_Preambles[j] = (rach_numberOfRA_Preambles/4)-1; + case 144: + RRC_CONFIGURATION_REQ (msg_p).rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b144; + break; - if ((rach_numberOfRA_Preambles <4) || (rach_numberOfRA_Preambles>64) || ((rach_numberOfRA_Preambles&3)!=0)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_numberOfRA_Preambles choice: 4,8,12,...,64!\n", - RC.config_file_name, i, rach_numberOfRA_Preambles); + case 208: + RRC_CONFIGURATION_REQ (msg_p).rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b208; + break; - if (strcmp(rach_preamblesGroupAConfig, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).rach_preamblesGroupAConfig[j] = TRUE; + case 256: + RRC_CONFIGURATION_REQ (msg_p).rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b256; + break; + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_messageSizeGroupA choice: 56,144,208,256!\n", + RC.config_file_name, i, rach_messageSizeGroupA); + break; + } - RRC_CONFIGURATION_REQ (msg_p).rach_sizeOfRA_PreamblesGroupA[j] = (rach_sizeOfRA_PreamblesGroupA/4)-1; + if (strcmp(rach_messagePowerOffsetGroupB,"minusinfinity")==0) { + RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_minusinfinity; + } else if (strcmp(rach_messagePowerOffsetGroupB,"dB0")==0) { + RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB0; + } else if (strcmp(rach_messagePowerOffsetGroupB,"dB5")==0) { + RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB5; + } else if (strcmp(rach_messagePowerOffsetGroupB,"dB8")==0) { + RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB8; + } else if (strcmp(rach_messagePowerOffsetGroupB,"dB10")==0) { + RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB10; + } else if (strcmp(rach_messagePowerOffsetGroupB,"dB12")==0) { + RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB12; + } else if (strcmp(rach_messagePowerOffsetGroupB,"dB15")==0) { + RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB15; + } else if (strcmp(rach_messagePowerOffsetGroupB,"dB18")==0) { + RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB18; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_messagePowerOffsetGroupB choice: minusinfinity,dB0,dB5,dB8,dB10,dB12,dB15,dB18!\n", + RC.config_file_name, i, rach_messagePowerOffsetGroupB); + } else if (strcmp(rach_preamblesGroupAConfig, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ (msg_p).rach_preamblesGroupAConfig[j] = FALSE; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_preamblesGroupAConfig choice: ENABLE,DISABLE !\n", + RC.config_file_name, i, rach_preamblesGroupAConfig); - if ((rach_numberOfRA_Preambles <4) || (rach_numberOfRA_Preambles>60) || ((rach_numberOfRA_Preambles&3)!=0)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_sizeOfRA_PreamblesGroupA choice: 4,8,12,...,60!\n", - RC.config_file_name, i, rach_sizeOfRA_PreamblesGroupA); + RRC_CONFIGURATION_REQ (msg_p).rach_preambleInitialReceivedTargetPower[j] = (rach_preambleInitialReceivedTargetPower+120)/2; + if ((rach_preambleInitialReceivedTargetPower<-120) || (rach_preambleInitialReceivedTargetPower>-90) || ((rach_preambleInitialReceivedTargetPower&1)!=0)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleInitialReceivedTargetPower choice: -120,-118,...,-90 !\n", + RC.config_file_name, i, rach_preambleInitialReceivedTargetPower); - switch (rach_messageSizeGroupA) { - case 56: - RRC_CONFIGURATION_REQ (msg_p).rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b56; - break; + RRC_CONFIGURATION_REQ (msg_p).rach_powerRampingStep[j] = rach_powerRampingStep/2; - case 144: - RRC_CONFIGURATION_REQ (msg_p).rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b144; - break; + if ((rach_powerRampingStep<0) || (rach_powerRampingStep>6) || ((rach_powerRampingStep&1)!=0)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_powerRampingStep choice: 0,2,4,6 !\n", + RC.config_file_name, i, rach_powerRampingStep); - case 208: - RRC_CONFIGURATION_REQ (msg_p).rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b208; - break; - - case 256: - RRC_CONFIGURATION_REQ (msg_p).rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b256; - break; - - default: - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_messageSizeGroupA choice: 56,144,208,256!\n", - RC.config_file_name, i, rach_messageSizeGroupA); - break; - } - - if (strcmp(rach_messagePowerOffsetGroupB,"minusinfinity")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_minusinfinity; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB0")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB0; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB5")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB5; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB8")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB8; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB10")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB10; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB12")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB12; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB15")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB15; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB18")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB18; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_messagePowerOffsetGroupB choice: minusinfinity,dB0,dB5,dB8,dB10,dB12,dB15,dB18!\n", - RC.config_file_name, i, rach_messagePowerOffsetGroupB); - - } else if (strcmp(rach_preamblesGroupAConfig, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ (msg_p).rach_preamblesGroupAConfig[j] = FALSE; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_preamblesGroupAConfig choice: ENABLE,DISABLE !\n", - RC.config_file_name, i, rach_preamblesGroupAConfig); - - RRC_CONFIGURATION_REQ (msg_p).rach_preambleInitialReceivedTargetPower[j] = (rach_preambleInitialReceivedTargetPower+120)/2; - - if ((rach_preambleInitialReceivedTargetPower<-120) || (rach_preambleInitialReceivedTargetPower>-90) || ((rach_preambleInitialReceivedTargetPower&1)!=0)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleInitialReceivedTargetPower choice: -120,-118,...,-90 !\n", - RC.config_file_name, i, rach_preambleInitialReceivedTargetPower); - - - RRC_CONFIGURATION_REQ (msg_p).rach_powerRampingStep[j] = rach_powerRampingStep/2; - - if ((rach_powerRampingStep<0) || (rach_powerRampingStep>6) || ((rach_powerRampingStep&1)!=0)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_powerRampingStep choice: 0,2,4,6 !\n", - RC.config_file_name, i, rach_powerRampingStep); - - - - switch (rach_preambleTransMax) { + switch (rach_preambleTransMax) { #if (RRC_VERSION < MAKE_VERSION(14, 0, 0)) - case 3: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3; - break; - case 4: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n4; - break; + case 3: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3; + break; - case 5: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n5; - break; + case 4: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n4; + break; - case 6: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n6; - break; + case 5: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n5; + break; - case 7: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n7; - break; + case 6: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n6; + break; - case 8: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n8; - break; + case 7: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n7; + break; - case 10: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10; - break; + case 8: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n8; + break; - case 20: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n20; - break; + case 10: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10; + break; - case 50: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n50; - break; + case 20: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n20; + break; - case 100: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n100; - break; + case 50: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n50; + break; - case 200: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n200; - break; + case 100: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n100; + break; + case 200: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n200; + break; #else - case 3: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n3; - break; + case 3: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n3; + break; - case 4: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n4; - break; + case 4: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n4; + break; - case 5: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n5; - break; + case 5: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n5; + break; - case 6: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n6; - break; + case 6: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n6; + break; - case 7: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n7; - break; + case 7: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n7; + break; - case 8: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n8; - break; + case 8: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n8; + break; - case 10: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n10; - break; + case 10: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n10; + break; - case 20: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n20; - break; + case 20: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n20; + break; - case 50: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n50; - break; + case 50: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n50; + break; - case 100: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n100; - break; + case 100: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n100; + break; - case 200: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n200; - break; + case 200: + RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n200; + break; #endif - default: - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleTransMax choice: 3,4,5,6,7,8,10,20,50,100,200!\n", - RC.config_file_name, i, rach_preambleTransMax); - break; - } + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleTransMax choice: 3,4,5,6,7,8,10,20,50,100,200!\n", + RC.config_file_name, i, rach_preambleTransMax); + break; + } - RRC_CONFIGURATION_REQ (msg_p).rach_raResponseWindowSize[j] = (rach_raResponseWindowSize==10)?7:rach_raResponseWindowSize-2; + RRC_CONFIGURATION_REQ (msg_p).rach_raResponseWindowSize[j] = (rach_raResponseWindowSize==10)?7:rach_raResponseWindowSize-2; - if ((rach_raResponseWindowSize<0)||(rach_raResponseWindowSize==9)||(rach_raResponseWindowSize>10)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_raResponseWindowSize choice: 2,3,4,5,6,7,8,10!\n", - RC.config_file_name, i, rach_preambleTransMax); + if ((rach_raResponseWindowSize<0)||(rach_raResponseWindowSize==9)||(rach_raResponseWindowSize>10)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_raResponseWindowSize choice: 2,3,4,5,6,7,8,10!\n", + RC.config_file_name, i, rach_preambleTransMax); + RRC_CONFIGURATION_REQ (msg_p).rach_macContentionResolutionTimer[j] = (rach_macContentionResolutionTimer/8)-1; - RRC_CONFIGURATION_REQ (msg_p).rach_macContentionResolutionTimer[j] = (rach_macContentionResolutionTimer/8)-1; + if ((rach_macContentionResolutionTimer<8) || (rach_macContentionResolutionTimer>64) || ((rach_macContentionResolutionTimer&7)!=0)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_macContentionResolutionTimer choice: 8,16,...,56,64!\n", + RC.config_file_name, i, rach_preambleTransMax); - if ((rach_macContentionResolutionTimer<8) || (rach_macContentionResolutionTimer>64) || ((rach_macContentionResolutionTimer&7)!=0)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_macContentionResolutionTimer choice: 8,16,...,56,64!\n", - RC.config_file_name, i, rach_preambleTransMax); + RRC_CONFIGURATION_REQ (msg_p).rach_maxHARQ_Msg3Tx[j] = rach_maxHARQ_Msg3Tx; - RRC_CONFIGURATION_REQ (msg_p).rach_maxHARQ_Msg3Tx[j] = rach_maxHARQ_Msg3Tx; + if ((rach_maxHARQ_Msg3Tx<0) || (rach_maxHARQ_Msg3Tx>8)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_maxHARQ_Msg3Tx choice: 1..8!\n", + RC.config_file_name, i, rach_preambleTransMax); - if ((rach_maxHARQ_Msg3Tx<0) || (rach_maxHARQ_Msg3Tx>8)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_maxHARQ_Msg3Tx choice: 1..8!\n", - RC.config_file_name, i, rach_preambleTransMax); + switch (pcch_defaultPagingCycle) { + case 32: + RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf32; + break; + case 64: + RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf64; + break; - switch (pcch_defaultPagingCycle) { - case 32: - RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf32; - break; + case 128: + RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf128; + break; - case 64: - RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf64; - break; + case 256: + RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf256; + break; - case 128: - RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf128; - break; + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pcch_defaultPagingCycle choice: 32,64,128,256!\n", + RC.config_file_name, i, pcch_defaultPagingCycle); + break; + } - case 256: - RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf256; - break; + if (strcmp(pcch_nB, "fourT") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_fourT; + } else if (strcmp(pcch_nB, "twoT") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_twoT; + } else if (strcmp(pcch_nB, "oneT") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_oneT; + } else if (strcmp(pcch_nB, "halfT") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_halfT; + } else if (strcmp(pcch_nB, "quarterT") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_quarterT; + } else if (strcmp(pcch_nB, "oneEighthT") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_oneEighthT; + } else if (strcmp(pcch_nB, "oneSixteenthT") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_oneSixteenthT; + } else if (strcmp(pcch_nB, "oneThirtySecondT") == 0) { + RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_oneThirtySecondT; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pcch_nB choice: fourT,twoT,oneT,halfT,quarterT,oneighthT,oneSixteenthT,oneThirtySecondT !\n", + RC.config_file_name, i, pcch_defaultPagingCycle); - default: - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pcch_defaultPagingCycle choice: 32,64,128,256!\n", - RC.config_file_name, i, pcch_defaultPagingCycle); - break; - } + switch (bcch_modificationPeriodCoeff) { + case 2: + RRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n2; + break; - if (strcmp(pcch_nB, "fourT") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_fourT; - } else if (strcmp(pcch_nB, "twoT") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_twoT; - } else if (strcmp(pcch_nB, "oneT") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_oneT; - } else if (strcmp(pcch_nB, "halfT") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_halfT; - } else if (strcmp(pcch_nB, "quarterT") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_quarterT; - } else if (strcmp(pcch_nB, "oneEighthT") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_oneEighthT; - } else if (strcmp(pcch_nB, "oneSixteenthT") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_oneSixteenthT; - } else if (strcmp(pcch_nB, "oneThirtySecondT") == 0) { - RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_oneThirtySecondT; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pcch_nB choice: fourT,twoT,oneT,halfT,quarterT,oneighthT,oneSixteenthT,oneThirtySecondT !\n", - RC.config_file_name, i, pcch_defaultPagingCycle); + case 4: + RRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n4; + break; + case 8: + RRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n8; + break; + case 16: + RRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n16; + break; - switch (bcch_modificationPeriodCoeff) { - case 2: - RRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n2; - break; + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for bcch_modificationPeriodCoeff choice: 2,4,8,16", + RC.config_file_name, i, bcch_modificationPeriodCoeff); + break; + } - case 4: - RRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n4; - break; + RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t300[j] = ue_TimersAndConstants_t300; + RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t301[j] = ue_TimersAndConstants_t301; + RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t310[j] = ue_TimersAndConstants_t310; + RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t311[j] = ue_TimersAndConstants_t311; + RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n310[j] = ue_TimersAndConstants_n310; + RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n311[j] = ue_TimersAndConstants_n311; - case 8: - RRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n8; - break; + switch (ue_TransmissionMode) { + case 1: + RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm1; + break; - case 16: - RRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n16; - break; + case 2: + RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm2; + break; - default: - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for bcch_modificationPeriodCoeff choice: 2,4,8,16", - RC.config_file_name, i, bcch_modificationPeriodCoeff); + case 3: + RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm3; + break; - break; - } + case 4: + RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm4; + break; - - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t300[j] = ue_TimersAndConstants_t300; - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t301[j] = ue_TimersAndConstants_t301; - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t310[j] = ue_TimersAndConstants_t310; - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t311[j] = ue_TimersAndConstants_t311; - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n310[j] = ue_TimersAndConstants_n310; - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n311[j] = ue_TimersAndConstants_n311; + case 5: + RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm5; + break; - switch (ue_TransmissionMode) { - case 1: - RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm1; - break; - case 2: - RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm2; - break; - case 3: - RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm3; - break; - case 4: - RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm4; - break; - case 5: - RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm5; - break; - case 6: - RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm6; - break; - case 7: - RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm7; - break; - default: - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TransmissionMode choice: 1,2,3,4,5,6,7", - RC.config_file_name, i, ue_TransmissionMode); - break; - } + case 6: + RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm6; + break; - RRC_CONFIGURATION_REQ (msg_p).ue_multiple_max[j] = ue_multiple_max; + case 7: + RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm7; + break; - switch (N_RB_DL) { - case 25: - if ((ue_multiple_max < 1) || (ue_multiple_max > 4)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..4!\n", - RC.config_file_name, i, ue_multiple_max); - break; - case 50: - if ((ue_multiple_max < 1) || (ue_multiple_max > 8)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..8!\n", - RC.config_file_name, i, ue_multiple_max); - break; - case 100: - if ((ue_multiple_max < 1) || (ue_multiple_max > 16)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..16!\n", - RC.config_file_name, i, ue_multiple_max); - break; - default: - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 25,50,100 !\n", - RC.config_file_name, i, N_RB_DL); - break; + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TransmissionMode choice: 1,2,3,4,5,6,7", + RC.config_file_name, i, ue_TransmissionMode); + break; + } + + RRC_CONFIGURATION_REQ (msg_p).ue_multiple_max[j] = ue_multiple_max; + + switch (N_RB_DL) { + case 25: + if ((ue_multiple_max < 1) || (ue_multiple_max > 4)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..4!\n", + RC.config_file_name, i, ue_multiple_max); + + break; + + case 50: + if ((ue_multiple_max < 1) || (ue_multiple_max > 8)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..8!\n", + RC.config_file_name, i, ue_multiple_max); + + break; + + case 100: + if ((ue_multiple_max < 1) || (ue_multiple_max > 16)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..16!\n", + RC.config_file_name, i, ue_multiple_max); + + break; + + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 25,50,100 !\n", + RC.config_file_name, i, N_RB_DL); + break; + } + + //TTN - for D2D + //SIB18 + if (strcmp(rxPool_sc_CP_Len,"normal")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_CP_Len[j] = SL_CP_Len_r12_normal; + } else if (strcmp(rxPool_sc_CP_Len,"extended")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_CP_Len[j] = SL_CP_Len_r12_extended; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_CP_Len choice: normal,extended!\n", + RC.config_file_name, i, rxPool_sc_CP_Len); + + if (strcmp(rxPool_sc_Period,"sf40")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf40; + } else if (strcmp(rxPool_sc_Period,"sf60")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf60; + } else if (strcmp(rxPool_sc_Period,"sf70")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf70; + } else if (strcmp(rxPool_sc_Period,"sf80")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf80; + } else if (strcmp(rxPool_sc_Period,"sf120")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf120; + } else if (strcmp(rxPool_sc_Period,"sf140")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf140; + } else if (strcmp(rxPool_sc_Period,"sf160")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf160; + } else if (strcmp(rxPool_sc_Period,"sf240")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf240; + } else if (strcmp(rxPool_sc_Period,"sf280")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf280; + } else if (strcmp(rxPool_sc_Period,"sf320")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf320; + } else if (strcmp(rxPool_sc_Period,"spare6")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare6; + } else if (strcmp(rxPool_sc_Period,"spare5")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare5; + } else if (strcmp(rxPool_sc_Period,"spare4")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare4; + } else if (strcmp(rxPool_sc_Period,"spare3")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare3; + } else if (strcmp(rxPool_sc_Period,"spare2")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare2; + } else if (strcmp(rxPool_sc_Period,"spare")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_Period choice: sf40,sf60,sf70,sf80,sf120,sf140,sf160,sf240,sf280,sf320,spare6,spare5,spare4,spare3,spare2,spare!\n", + RC.config_file_name, i, rxPool_sc_Period); + + if (strcmp(rxPool_data_CP_Len,"normal")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_data_CP_Len[j] = SL_CP_Len_r12_normal; + } else if (strcmp(rxPool_data_CP_Len,"extended")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_data_CP_Len[j] = SL_CP_Len_r12_extended; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_data_CP_Len choice: normal,extended!\n", + RC.config_file_name, i, rxPool_data_CP_Len); + + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_Num[j] = rxPool_ResourceConfig_prb_Num; + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_Start[j] = rxPool_ResourceConfig_prb_Start; + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_End[j] = rxPool_ResourceConfig_prb_End; + + if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING; + } else if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12; + } else if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prLarge")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n", + RC.config_file_name, i, rxPool_ResourceConfig_offsetIndicator_present); + + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_choice[j] = rxPool_ResourceConfig_offsetIndicator_choice; + + if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING; + } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12; + } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs8")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12; + } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs12")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12; + } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs16")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12; + } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs30")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12; + } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs40")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12; + } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs42")==0) { + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n", + RC.config_file_name, i, rxPool_ResourceConfig_subframeBitmap_present); + + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_buf; + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_size[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_size; + RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused; + + //SIB19 - for discRxPool + if (strcmp(discRxPool_cp_Len,"normal")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_cp_Len[j] = SL_CP_Len_r12_normal; + } else if (strcmp(discRxPool_cp_Len,"extended")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_cp_Len[j] = SL_CP_Len_r12_extended; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_cp_Len choice: normal,extended!\n", + RC.config_file_name, i, discRxPool_cp_Len); + + if (strcmp(discRxPool_discPeriod,"rf32")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf32; + } else if (strcmp(discRxPool_discPeriod,"rf64")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf64; + } else if (strcmp(discRxPool_discPeriod,"rf128")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf128; + } else if (strcmp(discRxPool_discPeriod,"rf256")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf256; + } else if (strcmp(discRxPool_discPeriod,"rf512")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf512; + } else if (strcmp(discRxPool_discPeriod,"rf1024")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf1024; + } else if (strcmp(discRxPool_discPeriod,"rf16")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf16_v1310; + } else if (strcmp(discRxPool_discPeriod,"spare")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_spare; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n", + RC.config_file_name, i, discRxPool_discPeriod); + + RRC_CONFIGURATION_REQ (msg_p).discRxPool_numRetx[j] = discRxPool_numRetx; + RRC_CONFIGURATION_REQ (msg_p).discRxPool_numRepetition[j] = discRxPool_numRepetition; + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_Num[j] = discRxPool_ResourceConfig_prb_Num; + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_Start[j] = discRxPool_ResourceConfig_prb_Start; + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_End[j] = discRxPool_ResourceConfig_prb_End; + + if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING; + } else if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12; + } else if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prLarge")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n", + RC.config_file_name, i, discRxPool_ResourceConfig_offsetIndicator_present); + + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_choice[j] = discRxPool_ResourceConfig_offsetIndicator_choice; + + if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING; + } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12; + } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs8")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12; + } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs12")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12; + } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs16")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12; + } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs30")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12; + } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs40")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12; + } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs42")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n", + RC.config_file_name, i, discRxPool_ResourceConfig_subframeBitmap_present); + + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf; + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_size; + RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused; + + //SIB19 - For discRxPoolPS + if (strcmp(discRxPoolPS_cp_Len,"normal")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_cp_Len[j] = SL_CP_Len_r12_normal; + } else if (strcmp(discRxPoolPS_cp_Len,"extended")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_cp_Len[j] = SL_CP_Len_r12_extended; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_cp_Len choice: normal,extended!\n", + RC.config_file_name, i, discRxPoolPS_cp_Len); + + if (strcmp(discRxPoolPS_discPeriod,"rf32")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf32; + } else if (strcmp(discRxPoolPS_discPeriod,"rf64")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf64; + } else if (strcmp(discRxPoolPS_discPeriod,"rf128")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf128; + } else if (strcmp(discRxPoolPS_discPeriod,"rf256")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf256; + } else if (strcmp(discRxPoolPS_discPeriod,"rf512")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf512; + } else if (strcmp(discRxPoolPS_discPeriod,"rf1024")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf1024; + } else if (strcmp(discRxPoolPS_discPeriod,"rf16")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf16_v1310; + } else if (strcmp(discRxPoolPS_discPeriod,"spare")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_spare; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n", + RC.config_file_name, i, discRxPoolPS_discPeriod); + + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_numRetx[j] = discRxPoolPS_numRetx; + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_numRepetition[j] = discRxPoolPS_numRepetition; + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_Num[j] = discRxPoolPS_ResourceConfig_prb_Num; + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_Start[j] = discRxPoolPS_ResourceConfig_prb_Start; + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_End[j] = discRxPoolPS_ResourceConfig_prb_End; + + if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prNothing")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING; + } else if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prSmall")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12; + } else if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prLarge")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n", + RC.config_file_name, i, discRxPoolPS_ResourceConfig_offsetIndicator_present); + + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_choice[j] = discRxPoolPS_ResourceConfig_offsetIndicator_choice; + + if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prNothing")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING; + } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs4")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12; + } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs8")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12; + } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs12")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12; + } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs16")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12; + } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs30")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12; + } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs40")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12; + } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs42")==0) { + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12; + } else + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n", + RC.config_file_name, i, discRxPoolPS_ResourceConfig_subframeBitmap_present); + + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf; + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size; + RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused; + } } - //TTN - for D2D - //SIB18 - if (strcmp(rxPool_sc_CP_Len,"normal")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_CP_Len[j] = SL_CP_Len_r12_normal; - } else if (strcmp(rxPool_sc_CP_Len,"extended")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_CP_Len[j] = SL_CP_Len_r12_extended; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_CP_Len choice: normal,extended!\n", - RC.config_file_name, i, rxPool_sc_CP_Len); - - if (strcmp(rxPool_sc_Period,"sf40")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf40; - } else if (strcmp(rxPool_sc_Period,"sf60")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf60; - } else if (strcmp(rxPool_sc_Period,"sf70")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf70; - } else if (strcmp(rxPool_sc_Period,"sf80")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf80; - } else if (strcmp(rxPool_sc_Period,"sf120")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf120; - } else if (strcmp(rxPool_sc_Period,"sf140")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf140; - } else if (strcmp(rxPool_sc_Period,"sf160")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf160; - } else if (strcmp(rxPool_sc_Period,"sf240")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf240; - } else if (strcmp(rxPool_sc_Period,"sf280")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf280; - } else if (strcmp(rxPool_sc_Period,"sf320")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf320; - } else if (strcmp(rxPool_sc_Period,"spare6")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare6; - } else if (strcmp(rxPool_sc_Period,"spare5")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare5; - } else if (strcmp(rxPool_sc_Period,"spare4")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare4; - } else if (strcmp(rxPool_sc_Period,"spare3")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare3; - } else if (strcmp(rxPool_sc_Period,"spare2")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare2; - } else if (strcmp(rxPool_sc_Period,"spare")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_Period choice: sf40,sf60,sf70,sf80,sf120,sf140,sf160,sf240,sf280,sf320,spare6,spare5,spare4,spare3,spare2,spare!\n", - RC.config_file_name, i, rxPool_sc_Period); - - if (strcmp(rxPool_data_CP_Len,"normal")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_data_CP_Len[j] = SL_CP_Len_r12_normal; - } else if (strcmp(rxPool_data_CP_Len,"extended")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_data_CP_Len[j] = SL_CP_Len_r12_extended; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_data_CP_Len choice: normal,extended!\n", - RC.config_file_name, i, rxPool_data_CP_Len); - - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_Num[j] = rxPool_ResourceConfig_prb_Num; - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_Start[j] = rxPool_ResourceConfig_prb_Start; - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_End[j] = rxPool_ResourceConfig_prb_End; - - if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING; - } else if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12; - } else if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prLarge")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n", - RC.config_file_name, i, rxPool_ResourceConfig_offsetIndicator_present); - - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_choice[j] = rxPool_ResourceConfig_offsetIndicator_choice; - - if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING; - } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12; - } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs8")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12; - } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs12")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12; - } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs16")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12; - } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs30")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12; - } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs40")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12; - } else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs42")==0) { - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n", - RC.config_file_name, i, rxPool_ResourceConfig_subframeBitmap_present); - - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_buf; - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_size[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_size; - RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused; - - //SIB19 - for discRxPool - if (strcmp(discRxPool_cp_Len,"normal")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_cp_Len[j] = SL_CP_Len_r12_normal; - } else if (strcmp(discRxPool_cp_Len,"extended")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_cp_Len[j] = SL_CP_Len_r12_extended; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_cp_Len choice: normal,extended!\n", - RC.config_file_name, i, discRxPool_cp_Len); - - - if (strcmp(discRxPool_discPeriod,"rf32")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf32; - } else if (strcmp(discRxPool_discPeriod,"rf64")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf64; - } else if (strcmp(discRxPool_discPeriod,"rf128")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf128; - } else if (strcmp(discRxPool_discPeriod,"rf256")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf256; - } else if (strcmp(discRxPool_discPeriod,"rf512")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf512; - } else if (strcmp(discRxPool_discPeriod,"rf1024")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf1024; - } else if (strcmp(discRxPool_discPeriod,"rf16")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf16_v1310; - } else if (strcmp(discRxPool_discPeriod,"spare")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_spare; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n", - RC.config_file_name, i, discRxPool_discPeriod); - - - - RRC_CONFIGURATION_REQ (msg_p).discRxPool_numRetx[j] = discRxPool_numRetx; - RRC_CONFIGURATION_REQ (msg_p).discRxPool_numRepetition[j] = discRxPool_numRepetition; - - - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_Num[j] = discRxPool_ResourceConfig_prb_Num; - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_Start[j] = discRxPool_ResourceConfig_prb_Start; - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_End[j] = discRxPool_ResourceConfig_prb_End; - - if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING; - } else if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12; - } else if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prLarge")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n", - RC.config_file_name, i, discRxPool_ResourceConfig_offsetIndicator_present); - - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_choice[j] = discRxPool_ResourceConfig_offsetIndicator_choice; - - if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING; - } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12; - } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs8")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12; - } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs12")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12; - } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs16")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12; - } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs30")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12; - } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs40")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12; - } else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs42")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n", - RC.config_file_name, i, discRxPool_ResourceConfig_subframeBitmap_present); - - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf; - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_size; - RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused; - - //SIB19 - For discRxPoolPS - if (strcmp(discRxPoolPS_cp_Len,"normal")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_cp_Len[j] = SL_CP_Len_r12_normal; - } else if (strcmp(discRxPoolPS_cp_Len,"extended")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_cp_Len[j] = SL_CP_Len_r12_extended; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_cp_Len choice: normal,extended!\n", - RC.config_file_name, i, discRxPoolPS_cp_Len); - - - if (strcmp(discRxPoolPS_discPeriod,"rf32")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf32; - } else if (strcmp(discRxPoolPS_discPeriod,"rf64")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf64; - } else if (strcmp(discRxPoolPS_discPeriod,"rf128")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf128; - } else if (strcmp(discRxPoolPS_discPeriod,"rf256")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf256; - } else if (strcmp(discRxPoolPS_discPeriod,"rf512")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf512; - } else if (strcmp(discRxPoolPS_discPeriod,"rf1024")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf1024; - } else if (strcmp(discRxPoolPS_discPeriod,"rf16")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf16_v1310; - } else if (strcmp(discRxPoolPS_discPeriod,"spare")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_spare; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n", - RC.config_file_name, i, discRxPoolPS_discPeriod); - - - - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_numRetx[j] = discRxPoolPS_numRetx; - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_numRepetition[j] = discRxPoolPS_numRepetition; - - - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_Num[j] = discRxPoolPS_ResourceConfig_prb_Num; - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_Start[j] = discRxPoolPS_ResourceConfig_prb_Start; - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_End[j] = discRxPoolPS_ResourceConfig_prb_End; - - if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prNothing")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING; - } else if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prSmall")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12; - } else if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prLarge")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n", - RC.config_file_name, i, discRxPoolPS_ResourceConfig_offsetIndicator_present); - - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_choice[j] = discRxPoolPS_ResourceConfig_offsetIndicator_choice; - - if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prNothing")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING; - } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs4")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12; - } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs8")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12; - } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs12")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12; - } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs16")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12; - } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs30")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12; - } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs40")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12; - } else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs42")==0) { - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12; - } else - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n", - RC.config_file_name, i, discRxPoolPS_ResourceConfig_subframeBitmap_present); - - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf; - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size; - RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused; - - - } - } - char srb1path[MAX_OPTNAME_SIZE*2 + 8]; - sprintf(srb1path,"%s.%s",enbpath,ENB_CONFIG_STRING_SRB1); - int npar = config_get( SRB1Params,sizeof(SRB1Params)/sizeof(paramdef_t), srb1path); - if (npar == sizeof(SRB1Params)/sizeof(paramdef_t)) { - switch (srb1_max_retx_threshold) { - case 1: - rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t1; - break; - - case 2: - rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t2; - break; - - case 3: - rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t3; - break; - - case 4: - rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t4; - break; - - case 6: - rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t6; - break; - - case 8: - rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t8; - break; - - case 16: - rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t16; - break; - - case 32: - rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t32; - break; - - default: - AssertFatal (0, - "Bad config value when parsing eNB configuration file %s, enb %d srb1_max_retx_threshold %u!\n", - RC.config_file_name, i, srb1_max_retx_threshold); - } - - - switch (srb1_poll_pdu) { - case 4: - rrc->srb1_poll_pdu = PollPDU_p4; - break; - - case 8: - rrc->srb1_poll_pdu = PollPDU_p8; - break; - - case 16: - rrc->srb1_poll_pdu = PollPDU_p16; - break; - - case 32: - rrc->srb1_poll_pdu = PollPDU_p32; - break; - - case 64: - rrc->srb1_poll_pdu = PollPDU_p64; - break; - - case 128: - rrc->srb1_poll_pdu = PollPDU_p128; - break; - - case 256: - rrc->srb1_poll_pdu = PollPDU_p256; - break; - - default: - if (srb1_poll_pdu >= 10000) - rrc->srb1_poll_pdu = PollPDU_pInfinity; - else - AssertFatal (0, - "Bad config value when parsing eNB configuration file %s, enb %d srb1_poll_pdu %u!\n", - RC.config_file_name, i, srb1_poll_pdu); - } - - rrc->srb1_poll_byte = srb1_poll_byte; - - switch (srb1_poll_byte) { - case 25: - rrc->srb1_poll_byte = PollByte_kB25; - break; - - case 50: - rrc->srb1_poll_byte = PollByte_kB50; - break; - - case 75: - rrc->srb1_poll_byte = PollByte_kB75; - break; - - case 100: - rrc->srb1_poll_byte = PollByte_kB100; - break; - - case 125: - rrc->srb1_poll_byte = PollByte_kB125; - break; - - case 250: - rrc->srb1_poll_byte = PollByte_kB250; - break; - - case 375: - rrc->srb1_poll_byte = PollByte_kB375; - break; - - case 500: - rrc->srb1_poll_byte = PollByte_kB500; - break; - - case 750: - rrc->srb1_poll_byte = PollByte_kB750; - break; - - case 1000: - rrc->srb1_poll_byte = PollByte_kB1000; - break; - - case 1250: - rrc->srb1_poll_byte = PollByte_kB1250; - break; - - case 1500: - rrc->srb1_poll_byte = PollByte_kB1500; - break; - - case 2000: - rrc->srb1_poll_byte = PollByte_kB2000; - break; - - case 3000: - rrc->srb1_poll_byte = PollByte_kB3000; - break; - - default: - if (srb1_poll_byte >= 10000) - rrc->srb1_poll_byte = PollByte_kBinfinity; - else - AssertFatal (0, - "Bad config value when parsing eNB configuration file %s, enb %d srb1_poll_byte %u!\n", - RC.config_file_name, i, srb1_poll_byte); - } - - if (srb1_timer_poll_retransmit <= 250) { - rrc->srb1_timer_poll_retransmit = (srb1_timer_poll_retransmit - 5)/5; - } else if (srb1_timer_poll_retransmit <= 500) { - rrc->srb1_timer_poll_retransmit = (srb1_timer_poll_retransmit - 300)/50 + 50; - } else { - AssertFatal (0, - "Bad config value when parsing eNB configuration file %s, enb %d srb1_timer_poll_retransmit %u!\n", - RC.config_file_name, i, srb1_timer_poll_retransmit); - } - - if (srb1_timer_status_prohibit <= 250) { - rrc->srb1_timer_status_prohibit = srb1_timer_status_prohibit/5; - } else if ((srb1_timer_poll_retransmit >= 300) && (srb1_timer_poll_retransmit <= 500)) { - rrc->srb1_timer_status_prohibit = (srb1_timer_status_prohibit - 300)/50 + 51; - } else { - AssertFatal (0, - "Bad config value when parsing eNB configuration file %s, enb %d srb1_timer_status_prohibit %u!\n", - RC.config_file_name, i, srb1_timer_status_prohibit); - } - - switch (srb1_timer_reordering) { - case 0: - rrc->srb1_timer_reordering = T_Reordering_ms0; - break; - - case 5: - rrc->srb1_timer_reordering = T_Reordering_ms5; - break; - - case 10: - rrc->srb1_timer_reordering = T_Reordering_ms10; - break; - - case 15: - rrc->srb1_timer_reordering = T_Reordering_ms15; - break; - - case 20: - rrc->srb1_timer_reordering = T_Reordering_ms20; - break; - - case 25: - rrc->srb1_timer_reordering = T_Reordering_ms25; - break; - - case 30: - rrc->srb1_timer_reordering = T_Reordering_ms30; - break; - - case 35: - rrc->srb1_timer_reordering = T_Reordering_ms35; - break; - - case 40: - rrc->srb1_timer_reordering = T_Reordering_ms40; - break; - - case 45: - rrc->srb1_timer_reordering = T_Reordering_ms45; - break; - - case 50: - rrc->srb1_timer_reordering = T_Reordering_ms50; - break; - - case 55: - rrc->srb1_timer_reordering = T_Reordering_ms55; - break; - - case 60: - rrc->srb1_timer_reordering = T_Reordering_ms60; - break; - - case 65: - rrc->srb1_timer_reordering = T_Reordering_ms65; - break; - - case 70: - rrc->srb1_timer_reordering = T_Reordering_ms70; - break; - - case 75: - rrc->srb1_timer_reordering = T_Reordering_ms75; - break; - - case 80: - rrc->srb1_timer_reordering = T_Reordering_ms80; - break; - - case 85: - rrc->srb1_timer_reordering = T_Reordering_ms85; - break; - - case 90: - rrc->srb1_timer_reordering = T_Reordering_ms90; - break; - - case 95: - rrc->srb1_timer_reordering = T_Reordering_ms95; - break; - - case 100: - rrc->srb1_timer_reordering = T_Reordering_ms100; - break; - - case 110: - rrc->srb1_timer_reordering = T_Reordering_ms110; - break; - - case 120: - rrc->srb1_timer_reordering = T_Reordering_ms120; - break; - - case 130: - rrc->srb1_timer_reordering = T_Reordering_ms130; - break; - - case 140: - rrc->srb1_timer_reordering = T_Reordering_ms140; - break; - - case 150: - rrc->srb1_timer_reordering = T_Reordering_ms150; - break; - - case 160: - rrc->srb1_timer_reordering = T_Reordering_ms160; - break; - - case 170: - rrc->srb1_timer_reordering = T_Reordering_ms170; - break; - - case 180: - rrc->srb1_timer_reordering = T_Reordering_ms180; - break; - - case 190: - rrc->srb1_timer_reordering = T_Reordering_ms190; - break; - - case 200: - rrc->srb1_timer_reordering = T_Reordering_ms200; - break; - - default: - AssertFatal (0, - "Bad config value when parsing eNB configuration file %s, enb %d srb1_timer_reordering %u!\n", - RC.config_file_name, i, srb1_timer_reordering); - } - - } else { - rrc->srb1_timer_poll_retransmit = T_PollRetransmit_ms80; - rrc->srb1_timer_reordering = T_Reordering_ms35; - rrc->srb1_timer_status_prohibit = T_StatusProhibit_ms0; - rrc->srb1_poll_pdu = PollPDU_p4; - rrc->srb1_poll_byte = PollByte_kBinfinity; - rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t8; - } - - /* - // Network Controller - subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_NETWORK_CONTROLLER_CONFIG); - - if (subsetting != NULL) { - if ( ( - config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_INTERFACE_NAME, - (const char **)&flexran_agent_interface_name) - && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_IPV4_ADDRESS, - (const char **)&flexran_agent_ipv4_address) - && config_setting_lookup_int(subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_PORT, - &flexran_agent_port) - && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_CACHE, - (const char **)&flexran_agent_cache) - ) - ) { - enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_interface_name = strdup(flexran_agent_interface_name); - cidr = flexran_agent_ipv4_address; - address = strtok(cidr, "/"); - //enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_ipv4_address = strdup(address); - if (address) { - IPV4_STR_ADDR_TO_INT_NWBO (address, enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_ipv4_address, "BAD IP ADDRESS FORMAT FOR eNB Agent !\n" ); - } - - enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_port = flexran_agent_port; - enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_cache = strdup(flexran_agent_cache); - } - } - */ - break; - } - + char srb1path[MAX_OPTNAME_SIZE*2 + 8]; + sprintf(srb1path,"%s.%s",enbpath,ENB_CONFIG_STRING_SRB1); + int npar = config_get( SRB1Params,sizeof(SRB1Params)/sizeof(paramdef_t), srb1path); + + if (npar == sizeof(SRB1Params)/sizeof(paramdef_t)) { + switch (srb1_max_retx_threshold) { + case 1: + rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t1; + break; + + case 2: + rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t2; + break; + + case 3: + rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t3; + break; + + case 4: + rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t4; + break; + + case 6: + rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t6; + break; + + case 8: + rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t8; + break; + + case 16: + rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t16; + break; + + case 32: + rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t32; + break; + + default: + AssertFatal (0, + "Bad config value when parsing eNB configuration file %s, enb %d srb1_max_retx_threshold %u!\n", + RC.config_file_name, i, srb1_max_retx_threshold); + } + + switch (srb1_poll_pdu) { + case 4: + rrc->srb1_poll_pdu = PollPDU_p4; + break; + + case 8: + rrc->srb1_poll_pdu = PollPDU_p8; + break; + + case 16: + rrc->srb1_poll_pdu = PollPDU_p16; + break; + + case 32: + rrc->srb1_poll_pdu = PollPDU_p32; + break; + + case 64: + rrc->srb1_poll_pdu = PollPDU_p64; + break; + + case 128: + rrc->srb1_poll_pdu = PollPDU_p128; + break; + + case 256: + rrc->srb1_poll_pdu = PollPDU_p256; + break; + + default: + if (srb1_poll_pdu >= 10000) + rrc->srb1_poll_pdu = PollPDU_pInfinity; + else + AssertFatal (0, + "Bad config value when parsing eNB configuration file %s, enb %d srb1_poll_pdu %u!\n", + RC.config_file_name, i, srb1_poll_pdu); + } + + rrc->srb1_poll_byte = srb1_poll_byte; + + switch (srb1_poll_byte) { + case 25: + rrc->srb1_poll_byte = PollByte_kB25; + break; + + case 50: + rrc->srb1_poll_byte = PollByte_kB50; + break; + + case 75: + rrc->srb1_poll_byte = PollByte_kB75; + break; + + case 100: + rrc->srb1_poll_byte = PollByte_kB100; + break; + + case 125: + rrc->srb1_poll_byte = PollByte_kB125; + break; + + case 250: + rrc->srb1_poll_byte = PollByte_kB250; + break; + + case 375: + rrc->srb1_poll_byte = PollByte_kB375; + break; + + case 500: + rrc->srb1_poll_byte = PollByte_kB500; + break; + + case 750: + rrc->srb1_poll_byte = PollByte_kB750; + break; + + case 1000: + rrc->srb1_poll_byte = PollByte_kB1000; + break; + + case 1250: + rrc->srb1_poll_byte = PollByte_kB1250; + break; + + case 1500: + rrc->srb1_poll_byte = PollByte_kB1500; + break; + + case 2000: + rrc->srb1_poll_byte = PollByte_kB2000; + break; + + case 3000: + rrc->srb1_poll_byte = PollByte_kB3000; + break; + + default: + if (srb1_poll_byte >= 10000) + rrc->srb1_poll_byte = PollByte_kBinfinity; + else + AssertFatal (0, + "Bad config value when parsing eNB configuration file %s, enb %d srb1_poll_byte %u!\n", + RC.config_file_name, i, srb1_poll_byte); + } + + if (srb1_timer_poll_retransmit <= 250) { + rrc->srb1_timer_poll_retransmit = (srb1_timer_poll_retransmit - 5)/5; + } else if (srb1_timer_poll_retransmit <= 500) { + rrc->srb1_timer_poll_retransmit = (srb1_timer_poll_retransmit - 300)/50 + 50; + } else { + AssertFatal (0, + "Bad config value when parsing eNB configuration file %s, enb %d srb1_timer_poll_retransmit %u!\n", + RC.config_file_name, i, srb1_timer_poll_retransmit); + } + + if (srb1_timer_status_prohibit <= 250) { + rrc->srb1_timer_status_prohibit = srb1_timer_status_prohibit/5; + } else if ((srb1_timer_poll_retransmit >= 300) && (srb1_timer_poll_retransmit <= 500)) { + rrc->srb1_timer_status_prohibit = (srb1_timer_status_prohibit - 300)/50 + 51; + } else { + AssertFatal (0, + "Bad config value when parsing eNB configuration file %s, enb %d srb1_timer_status_prohibit %u!\n", + RC.config_file_name, i, srb1_timer_status_prohibit); + } + + switch (srb1_timer_reordering) { + case 0: + rrc->srb1_timer_reordering = T_Reordering_ms0; + break; + + case 5: + rrc->srb1_timer_reordering = T_Reordering_ms5; + break; + + case 10: + rrc->srb1_timer_reordering = T_Reordering_ms10; + break; + + case 15: + rrc->srb1_timer_reordering = T_Reordering_ms15; + break; + + case 20: + rrc->srb1_timer_reordering = T_Reordering_ms20; + break; + + case 25: + rrc->srb1_timer_reordering = T_Reordering_ms25; + break; + + case 30: + rrc->srb1_timer_reordering = T_Reordering_ms30; + break; + + case 35: + rrc->srb1_timer_reordering = T_Reordering_ms35; + break; + + case 40: + rrc->srb1_timer_reordering = T_Reordering_ms40; + break; + + case 45: + rrc->srb1_timer_reordering = T_Reordering_ms45; + break; + + case 50: + rrc->srb1_timer_reordering = T_Reordering_ms50; + break; + + case 55: + rrc->srb1_timer_reordering = T_Reordering_ms55; + break; + + case 60: + rrc->srb1_timer_reordering = T_Reordering_ms60; + break; + + case 65: + rrc->srb1_timer_reordering = T_Reordering_ms65; + break; + + case 70: + rrc->srb1_timer_reordering = T_Reordering_ms70; + break; + + case 75: + rrc->srb1_timer_reordering = T_Reordering_ms75; + break; + + case 80: + rrc->srb1_timer_reordering = T_Reordering_ms80; + break; + + case 85: + rrc->srb1_timer_reordering = T_Reordering_ms85; + break; + + case 90: + rrc->srb1_timer_reordering = T_Reordering_ms90; + break; + + case 95: + rrc->srb1_timer_reordering = T_Reordering_ms95; + break; + + case 100: + rrc->srb1_timer_reordering = T_Reordering_ms100; + break; + + case 110: + rrc->srb1_timer_reordering = T_Reordering_ms110; + break; + + case 120: + rrc->srb1_timer_reordering = T_Reordering_ms120; + break; + + case 130: + rrc->srb1_timer_reordering = T_Reordering_ms130; + break; + + case 140: + rrc->srb1_timer_reordering = T_Reordering_ms140; + break; + + case 150: + rrc->srb1_timer_reordering = T_Reordering_ms150; + break; + + case 160: + rrc->srb1_timer_reordering = T_Reordering_ms160; + break; + + case 170: + rrc->srb1_timer_reordering = T_Reordering_ms170; + break; + + case 180: + rrc->srb1_timer_reordering = T_Reordering_ms180; + break; + + case 190: + rrc->srb1_timer_reordering = T_Reordering_ms190; + break; + + case 200: + rrc->srb1_timer_reordering = T_Reordering_ms200; + break; + + default: + AssertFatal (0, + "Bad config value when parsing eNB configuration file %s, enb %d srb1_timer_reordering %u!\n", + RC.config_file_name, i, srb1_timer_reordering); + } + } else { + rrc->srb1_timer_poll_retransmit = T_PollRetransmit_ms80; + rrc->srb1_timer_reordering = T_Reordering_ms35; + rrc->srb1_timer_status_prohibit = T_StatusProhibit_ms0; + rrc->srb1_poll_pdu = PollPDU_p4; + rrc->srb1_poll_byte = PollByte_kBinfinity; + rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t8; + } + + /* + // Network Controller + subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_NETWORK_CONTROLLER_CONFIG); + + if (subsetting != NULL) { + if ( ( + config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_INTERFACE_NAME, + (const char **)&flexran_agent_interface_name) + && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_IPV4_ADDRESS, + (const char **)&flexran_agent_ipv4_address) + && config_setting_lookup_int(subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_PORT, + &flexran_agent_port) + && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_CACHE, + (const char **)&flexran_agent_cache) + ) + ) { + enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_interface_name = strdup(flexran_agent_interface_name); + cidr = flexran_agent_ipv4_address; + address = strtok(cidr, "/"); + //enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_ipv4_address = strdup(address); + if (address) { + IPV4_STR_ADDR_TO_INT_NWBO (address, enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_ipv4_address, "BAD IP ADDRESS FORMAT FOR eNB Agent !\n" ); + } + + enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_port = flexran_agent_port; + enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_cache = strdup(flexran_agent_cache); + } + } + */ + break; + } } } -return 0; + + return 0; } int RCconfig_gtpu(void ) { - int num_enbs = 0; - - - - char* enb_interface_name_for_S1U = NULL; - char* enb_ipv4_address_for_S1U = NULL; + char *enb_interface_name_for_S1U = NULL; + char *enb_ipv4_address_for_S1U = NULL; uint32_t enb_port_for_S1U = 0; char *address = NULL; char *cidr = NULL; char gtpupath[MAX_OPTNAME_SIZE*2 + 8]; - - paramdef_t ENBSParams[] = ENBSPARAMS_DESC; - paramdef_t GTPUParams[] = GTPUPARAMS_DESC; LOG_I(GTPU,"Configuring GTPu\n"); - -/* get number of active eNodeBs */ - config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); + /* get number of active eNodeBs */ + config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); num_enbs = ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt; AssertFatal (num_enbs >0, - "Failed to parse config file no active eNodeBs in %s \n", ENB_CONFIG_STRING_ACTIVE_ENBS); - - + "Failed to parse config file no active eNodeBs in %s \n", ENB_CONFIG_STRING_ACTIVE_ENBS); sprintf(gtpupath,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,0,ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG); - config_get( GTPUParams,sizeof(GTPUParams)/sizeof(paramdef_t),gtpupath); + config_get( GTPUParams,sizeof(GTPUParams)/sizeof(paramdef_t),gtpupath); + cidr = enb_ipv4_address_for_S1U; + address = strtok(cidr, "/"); + if (address) { + IPV4_STR_ADDR_TO_INT_NWBO ( address, RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up, "BAD IP ADDRESS FORMAT FOR eNB S1_U !\n" ); + LOG_I(GTPU,"Configuring GTPu address : %s -> %x\n",address,RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up); + } - - cidr = enb_ipv4_address_for_S1U; - address = strtok(cidr, "/"); - - if (address) { - IPV4_STR_ADDR_TO_INT_NWBO ( address, RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up, "BAD IP ADDRESS FORMAT FOR eNB S1_U !\n" ); - - LOG_I(GTPU,"Configuring GTPu address : %s -> %x\n",address,RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up); - - } - - RC.gtpv1u_data_g->enb_port_for_S1u_S12_S4_up = enb_port_for_S1U; -return 0; + RC.gtpv1u_data_g->enb_port_for_S1u_S12_S4_up = enb_port_for_S1U; + return 0; } int RCconfig_S1(MessageDef *msg_p, uint32_t i) { - int j,k = 0; - - int enb_id; - int32_t my_int; - - - - const char* active_enb[MAX_ENB]; - - + const char *active_enb[MAX_ENB]; char *address = NULL; char *cidr = NULL; - - - // for no gcc warnings - + // for no gcc warnings (void)my_int; - - memset((char*)active_enb, 0 , MAX_ENB * sizeof(char*)); - + memset((char *)active_enb, 0 , MAX_ENB * sizeof(char *)); paramdef_t ENBSParams[] = ENBSPARAMS_DESC; - paramdef_t ENBParams[] = ENBPARAMS_DESC; paramlist_def_t ENBParamList = {ENB_CONFIG_STRING_ENB_LIST,NULL,0}; - -/* get global parameters, defined outside any section in the config file */ - + /* get global parameters, defined outside any section in the config file */ config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); - + AssertFatal (i0) { // Output a list of all eNBs. - config_getlist( &ENBParamList,ENBParams,sizeof(ENBParams)/sizeof(paramdef_t),NULL); - - - - - + config_getlist( &ENBParamList,ENBParams,sizeof(ENBParams)/sizeof(paramdef_t),NULL); + if (ENBParamList.numelt > 0) { for (k = 0; k < ENBParamList.numelt; k++) { - if (ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr == NULL) { - // Calculate a default eNB ID + if (ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr == NULL) { + // Calculate a default eNB ID + if (EPC_MODE_ENABLED) { + uint32_t hash; + hash = s1ap_generate_eNB_id (); + enb_id = k + (hash & 0xFFFF8); + } else { + enb_id = k; + } + } else { + enb_id = *(ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr); + } - if (EPC_MODE_ENABLED) { - uint32_t hash; - - hash = s1ap_generate_eNB_id (); - enb_id = k + (hash & 0xFFFF8); - } else { - enb_id = k; - } - } else { - enb_id = *(ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr); - } - - - // search if in active list - for (j=0; j < ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt; j++) { - if (strcmp(ENBSParams[ENB_ACTIVE_ENBS_IDX].strlistptr[j], *(ENBParamList.paramarray[k][ENB_ENB_NAME_IDX].strptr)) == 0) { + // search if in active list + for (j=0; j < ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt; j++) { + if (strcmp(ENBSParams[ENB_ACTIVE_ENBS_IDX].strlistptr[j], *(ENBParamList.paramarray[k][ENB_ENB_NAME_IDX].strptr)) == 0) { paramdef_t PLMNParams[] = PLMNPARAMS_DESC; paramlist_def_t PLMNParamList = {ENB_CONFIG_STRING_PLMN_LIST, NULL, 0}; /* map parameter checking array instances to parameter definition array instances */ checkedparam_t config_check_PLMNParams [] = PLMNPARAMS_CHECK; + for (int I = 0; I < sizeof(PLMNParams) / sizeof(paramdef_t); ++I) PLMNParams[I].chkPptr = &(config_check_PLMNParams[I]); - paramdef_t S1Params[] = S1PARAMS_DESC; - paramlist_def_t S1ParamList = {ENB_CONFIG_STRING_MME_IP_ADDRESS,NULL,0}; - - paramdef_t SCTPParams[] = SCTPPARAMS_DESC; - paramdef_t NETParams[] = NETPARAMS_DESC; - + paramdef_t S1Params[] = S1PARAMS_DESC; + paramlist_def_t S1ParamList = {ENB_CONFIG_STRING_MME_IP_ADDRESS,NULL,0}; + paramdef_t SCTPParams[] = SCTPPARAMS_DESC; + paramdef_t NETParams[] = NETPARAMS_DESC; char aprefix[MAX_OPTNAME_SIZE*2 + 8]; - sprintf(aprefix,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k); - - S1AP_REGISTER_ENB_REQ (msg_p).eNB_id = enb_id; - - if (strcmp(*(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr), "CELL_MACRO_ENB") == 0) { - S1AP_REGISTER_ENB_REQ (msg_p).cell_type = CELL_MACRO_ENB; - } else if (strcmp(*(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr), "CELL_HOME_ENB") == 0) { - S1AP_REGISTER_ENB_REQ (msg_p).cell_type = CELL_HOME_ENB; - } else { - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n", - RC.config_file_name, i, *(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr)); - } - - S1AP_REGISTER_ENB_REQ (msg_p).eNB_name = strdup(*(ENBParamList.paramarray[k][ENB_ENB_NAME_IDX].strptr)); - S1AP_REGISTER_ENB_REQ(msg_p).tac = *ENBParamList.paramarray[k][ENB_TRACKING_AREA_CODE_IDX].uptr; + sprintf(aprefix,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k); + S1AP_REGISTER_ENB_REQ (msg_p).eNB_id = enb_id; + if (strcmp(*(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr), "CELL_MACRO_ENB") == 0) { + S1AP_REGISTER_ENB_REQ (msg_p).cell_type = CELL_MACRO_ENB; + } else if (strcmp(*(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr), "CELL_HOME_ENB") == 0) { + S1AP_REGISTER_ENB_REQ (msg_p).cell_type = CELL_HOME_ENB; + } else { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n", + RC.config_file_name, i, *(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr)); + } + + S1AP_REGISTER_ENB_REQ (msg_p).eNB_name = strdup(*(ENBParamList.paramarray[k][ENB_ENB_NAME_IDX].strptr)); + S1AP_REGISTER_ENB_REQ(msg_p).tac = *ENBParamList.paramarray[k][ENB_TRACKING_AREA_CODE_IDX].uptr; AssertFatal(!ENBParamList.paramarray[k][ENB_MOBILE_COUNTRY_CODE_IDX_OLD].strptr && !ENBParamList.paramarray[k][ENB_MOBILE_NETWORK_CODE_IDX_OLD].strptr, "It seems that you use an old configuration file. Please change the existing\n" @@ -2311,13 +2152,14 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i) { "to\n" " tracking_area_code = 1; // no string!!\n" " plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } )\n"); - config_getlist(&PLMNParamList, PLMNParams, sizeof(PLMNParams)/sizeof(paramdef_t), aprefix); + if (PLMNParamList.numelt < 1 || PLMNParamList.numelt > 6) AssertFatal(0, "The number of PLMN IDs must be in [1,6], but is %d\n", PLMNParamList.numelt); S1AP_REGISTER_ENB_REQ(msg_p).num_plmn = PLMNParamList.numelt; + for (int l = 0; l < PLMNParamList.numelt; ++l) { S1AP_REGISTER_ENB_REQ(msg_p).mcc[l] = *PLMNParamList.paramarray[l][ENB_MOBILE_COUNTRY_CODE_IDX].uptr; S1AP_REGISTER_ENB_REQ(msg_p).mnc[l] = *PLMNParamList.paramarray[l][ENB_MOBILE_NETWORK_CODE_IDX].uptr; @@ -2327,37 +2169,36 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i) { "MNC %d cannot be encoded in two digits as requested (change mnc_digit_length to 3)\n", S1AP_REGISTER_ENB_REQ(msg_p).mnc[l]); } + S1AP_REGISTER_ENB_REQ(msg_p).default_drx = 0; - - config_getlist( &S1ParamList,S1Params,sizeof(S1Params)/sizeof(paramdef_t),aprefix); - - S1AP_REGISTER_ENB_REQ (msg_p).nb_mme = 0; + config_getlist( &S1ParamList,S1Params,sizeof(S1Params)/sizeof(paramdef_t),aprefix); + S1AP_REGISTER_ENB_REQ (msg_p).nb_mme = 0; - for (int l = 0; l < S1ParamList.numelt; l++) { + for (int l = 0; l < S1ParamList.numelt; l++) { + S1AP_REGISTER_ENB_REQ (msg_p).nb_mme += 1; + strcpy(S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4_address,*(S1ParamList.paramarray[l][ENB_MME_IPV4_ADDRESS_IDX].strptr)); + strcpy(S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6_address,*(S1ParamList.paramarray[l][ENB_MME_IPV6_ADDRESS_IDX].strptr)); - S1AP_REGISTER_ENB_REQ (msg_p).nb_mme += 1; + if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv4") == 0) { + S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4 = 1; + } else if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv6") == 0) { + S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6 = 1; + } else if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_PREFERENCE_IDX].strptr), "no") == 0) { + S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4 = 1; + S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6 = 1; + } - strcpy(S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4_address,*(S1ParamList.paramarray[l][ENB_MME_IPV4_ADDRESS_IDX].strptr)); - strcpy(S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6_address,*(S1ParamList.paramarray[l][ENB_MME_IPV6_ADDRESS_IDX].strptr)); - - - if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv4") == 0) { - S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4 = 1; - } else if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv6") == 0) { - S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6 = 1; - } else if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_PREFERENCE_IDX].strptr), "no") == 0) { - S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4 = 1; - S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6 = 1; - } if (S1ParamList.paramarray[l][ENB_MME_BROADCAST_PLMN_INDEX].iptr) S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_num[l] = S1ParamList.paramarray[l][ENB_MME_BROADCAST_PLMN_INDEX].numelt; else S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_num[l] = 0; + AssertFatal(S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_num[l] <= S1AP_REGISTER_ENB_REQ(msg_p).num_plmn, "List of broadcast PLMN to be sent to MME can not be longer than actual " "PLMN list (max %d, but is %d)\n", S1AP_REGISTER_ENB_REQ(msg_p).num_plmn, S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_num[l]); + for (int el = 0; el < S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_num[l]; ++el) { /* UINTARRAY gets mapped to int, see config_libconfig.c:223 */ S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_index[l][el] = S1ParamList.paramarray[l][ENB_MME_BROADCAST_PLMN_INDEX].iptr[el]; @@ -2367,78 +2208,71 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i) { S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_index[l][el], S1AP_REGISTER_ENB_REQ(msg_p).num_plmn); } + /* if no broadcasst_plmn array is defined, fill default values */ if (S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_num[l] == 0) { S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_num[l] = S1AP_REGISTER_ENB_REQ(msg_p).num_plmn; + for (int el = 0; el < S1AP_REGISTER_ENB_REQ(msg_p).num_plmn; ++el) S1AP_REGISTER_ENB_REQ(msg_p).broadcast_plmn_index[l][el] = el; } - } + } + + // SCTP SETTING + S1AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = SCTP_OUT_STREAMS; + S1AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = SCTP_IN_STREAMS; - - // SCTP SETTING - S1AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = SCTP_OUT_STREAMS; - S1AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = SCTP_IN_STREAMS; if (EPC_MODE_ENABLED) { - sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_SCTP_CONFIG); - config_get( SCTPParams,sizeof(SCTPParams)/sizeof(paramdef_t),aprefix); + sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_SCTP_CONFIG); + config_get( SCTPParams,sizeof(SCTPParams)/sizeof(paramdef_t),aprefix); S1AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[ENB_SCTP_INSTREAMS_IDX].uptr); S1AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = (uint16_t)*(SCTPParams[ENB_SCTP_OUTSTREAMS_IDX].uptr); - } + } sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG); - // NETWORK_INTERFACES - config_get( NETParams,sizeof(NETParams)/sizeof(paramdef_t),aprefix); - - // S1AP_REGISTER_ENB_REQ (msg_p).enb_interface_name_for_S1U = strdup(enb_interface_name_for_S1U); - cidr = *(NETParams[ENB_IPV4_ADDRESS_FOR_S1_MME_IDX].strptr); - address = strtok(cidr, "/"); - - S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv6 = 0; - S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv4 = 1; - - strcpy(S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv4_address, address); - - break; - } - } + // NETWORK_INTERFACES + config_get( NETParams,sizeof(NETParams)/sizeof(paramdef_t),aprefix); + // S1AP_REGISTER_ENB_REQ (msg_p).enb_interface_name_for_S1U = strdup(enb_interface_name_for_S1U); + cidr = *(NETParams[ENB_IPV4_ADDRESS_FOR_S1_MME_IDX].strptr); + address = strtok(cidr, "/"); + S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv6 = 0; + S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv4 = 1; + strcpy(S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv4_address, address); + break; + } + } } } } -return 0; + + return 0; } -int RCconfig_X2(MessageDef *msg_p, uint32_t i) -{ +int RCconfig_X2(MessageDef *msg_p, uint32_t i) { int j, k, l; - int enb_id; - char *address = NULL; char *cidr = NULL; - paramdef_t ENBSParams[] = ENBSPARAMS_DESC; paramdef_t ENBParams[] = ENBPARAMS_DESC; paramlist_def_t ENBParamList = {ENB_CONFIG_STRING_ENB_LIST,NULL,0}; - /* get global parameters, defined outside any section in the config file */ config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); -/*#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME) - if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) { - asn_debug = 0; - asn1_xer_print = 0; - } else if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO) == 0) { - asn_debug = 1; - asn1_xer_print = 1; - } else if (strcasecmp(*(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr) , ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING) == 0) { - asn_debug = 1; - asn1_xer_print = 2; - } else { - asn_debug = 0; - asn1_xer_print = 0; - } -#endif */ - + /*#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME) + if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) { + asn_debug = 0; + asn1_xer_print = 0; + } else if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO) == 0) { + asn_debug = 1; + asn1_xer_print = 1; + } else if (strcasecmp(*(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr) , ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING) == 0) { + asn_debug = 1; + asn1_xer_print = 2; + } else { + asn_debug = 0; + asn1_xer_print = 0; + } + #endif */ AssertFatal(i < ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt, "Failed to parse config file %s, %uth attribute %s \n", RC.config_file_name, i, ENB_CONFIG_STRING_ACTIVE_ENBS); @@ -2446,13 +2280,13 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) if (ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt > 0) { // Output a list of all eNBs. config_getlist( &ENBParamList,ENBParams,sizeof(ENBParams)/sizeof(paramdef_t),NULL); + if (ENBParamList.numelt > 0) { for (k = 0; k < ENBParamList.numelt; k++) { if (ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr == NULL) { // Calculate a default eNB ID # if defined(ENABLE_USE_MME) uint32_t hash; - hash = s1ap_generate_eNB_id (); enb_id = k + (hash & 0xFFFF8); # else @@ -2469,19 +2303,17 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) paramlist_def_t PLMNParamList = {ENB_CONFIG_STRING_PLMN_LIST, NULL, 0}; /* map parameter checking array instances to parameter definition array instances */ checkedparam_t config_check_PLMNParams [] = PLMNPARAMS_CHECK; + for (int I = 0; I < sizeof(PLMNParams) / sizeof(paramdef_t); ++I) PLMNParams[I].chkPptr = &(config_check_PLMNParams[I]); paramdef_t X2Params[] = X2PARAMS_DESC; paramlist_def_t X2ParamList = {ENB_CONFIG_STRING_TARGET_ENB_X2_IP_ADDRESS,NULL,0}; - paramdef_t SCTPParams[] = SCTPPARAMS_DESC; paramdef_t NETParams[] = NETPARAMS_DESC; char aprefix[MAX_OPTNAME_SIZE*2 + 8]; sprintf(aprefix,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k); - /* Some default/random parameters */ - X2AP_REGISTER_ENB_REQ (msg_p).eNB_id = enb_id; if (strcmp(*(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr), "CELL_MACRO_ENB") == 0) { @@ -2490,14 +2322,14 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) X2AP_REGISTER_ENB_REQ (msg_p).cell_type = CELL_HOME_ENB; } else { AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n", - RC.config_file_name, i, *(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr)); + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n", + RC.config_file_name, i, *(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr)); } X2AP_REGISTER_ENB_REQ (msg_p).eNB_name = strdup(*(ENBParamList.paramarray[k][ENB_ENB_NAME_IDX].strptr)); X2AP_REGISTER_ENB_REQ (msg_p).tac = *ENBParamList.paramarray[k][ENB_TRACKING_AREA_CODE_IDX].uptr; - config_getlist(&PLMNParamList, PLMNParams, sizeof(PLMNParams)/sizeof(paramdef_t), aprefix); + if (PLMNParamList.numelt < 1 || PLMNParamList.numelt > 6) AssertFatal(0, "The number of PLMN IDs must be in [1,6], but is %d\n", PLMNParamList.numelt); @@ -2512,17 +2344,14 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) || X2AP_REGISTER_ENB_REQ(msg_p).mnc < 100, "MNC %d cannot be encoded in two digits as requested (change mnc_digit_length to 3)\n", X2AP_REGISTER_ENB_REQ(msg_p).mnc); - config_getlist( &X2ParamList,X2Params,sizeof(X2Params)/sizeof(paramdef_t),aprefix); - AssertFatal(X2ParamList.numelt <= X2AP_MAX_NB_ENB_IP_ADDRESS, "value of X2ParamList.numelt %d must be lower than X2AP_MAX_NB_ENB_IP_ADDRESS %d value: reconsider to increase X2AP_MAX_NB_ENB_IP_ADDRESS\n", X2ParamList.numelt,X2AP_MAX_NB_ENB_IP_ADDRESS); - X2AP_REGISTER_ENB_REQ (msg_p).nb_x2 = 0; + for (l = 0; l < X2ParamList.numelt; l++) { X2AP_REGISTER_ENB_REQ (msg_p).nb_x2 += 1; - strcpy(X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv4_address,*(X2ParamList.paramarray[l][ENB_X2_IPV4_ADDRESS_IDX].strptr)); strcpy(X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv6_address,*(X2ParamList.paramarray[l][ENB_X2_IPV6_ADDRESS_IDX].strptr)); @@ -2545,49 +2374,36 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) X2AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[ENB_SCTP_INSTREAMS_IDX].uptr); X2AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = (uint16_t)*(SCTPParams[ENB_SCTP_OUTSTREAMS_IDX].uptr); #endif - sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG); - // NETWORK_INTERFACES config_get( NETParams,sizeof(NETParams)/sizeof(paramdef_t),aprefix); - X2AP_REGISTER_ENB_REQ (msg_p).enb_port_for_X2C = (uint32_t)*(NETParams[ENB_PORT_FOR_X2C_IDX].uptr); - AssertFatal(NETParams[ENB_IPV4_ADDR_FOR_X2C_IDX].strptr != NULL && X2AP_REGISTER_ENB_REQ (msg_p).enb_port_for_X2C > 0, "Add eNB IPv4 address and/or port for X2C in the CONF file!\n"); - cidr = *(NETParams[ENB_IPV4_ADDR_FOR_X2C_IDX].strptr); address = strtok(cidr, "/"); - X2AP_REGISTER_ENB_REQ (msg_p).enb_x2_ip_address.ipv6 = 0; X2AP_REGISTER_ENB_REQ (msg_p).enb_x2_ip_address.ipv4 = 1; - strcpy(X2AP_REGISTER_ENB_REQ (msg_p).enb_x2_ip_address.ipv4_address, address); } } } } } -return 0; + + return 0; } void RCConfig(void) { - paramlist_def_t MACRLCParamList = {CONFIG_STRING_MACRLC_LIST,NULL,0}; paramlist_def_t L1ParamList = {CONFIG_STRING_L1_LIST,NULL,0}; paramlist_def_t RUParamList = {CONFIG_STRING_RU_LIST,NULL,0}; paramdef_t ENBSParams[] = ENBSPARAMS_DESC; paramlist_def_t CCsParamList = {ENB_CONFIG_STRING_COMPONENT_CARRIERS,NULL,0}; - - char aprefix[MAX_OPTNAME_SIZE*2 + 8]; - - - -/* get global parameters, defined outside any section in the config file */ - + char aprefix[MAX_OPTNAME_SIZE*2 + 8]; + /* get global parameters, defined outside any section in the config file */ printf("Getting ENBSParams\n"); - - config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); + config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); # if defined(ENABLE_USE_MME) EPC_MODE_ENABLED = ((*ENBSParams[ENB_NOS1_IDX].uptr) == 0); #endif @@ -2595,25 +2411,21 @@ void RCConfig(void) { if (RC.nb_inst > 0) { RC.nb_CC = (int *)malloc((1+RC.nb_inst)*sizeof(int)); - for (int i=0;i Date: Thu, 11 Oct 2018 15:08:21 +0200 Subject: [PATCH 303/379] CI: astyling for ease of merge Signed-off-by: Raphael Defosseux --- openair2/ENB_APP/enb_config.c | 205 +++++++++++++++------------------- 1 file changed, 92 insertions(+), 113 deletions(-) diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 2506a0a9dc..8caf72251e 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -36,13 +36,13 @@ #include "UTIL/OTG/otg.h" #include "UTIL/OTG/otg_externs.h" #if defined(ENABLE_ITTI) - #include "intertask_interface.h" - #if defined(ENABLE_USE_MME) - #include "s1ap_eNB.h" - #include "sctp_eNB_task.h" - #else - #define EPC_MODE_ENABLED 0 - #endif +#include "intertask_interface.h" +#if defined(ENABLE_USE_MME) +#include "s1ap_eNB.h" +#include "sctp_eNB_task.h" +#else +#define EPC_MODE_ENABLED 0 +#endif #endif #include "sctp_default_values.h" #include "SystemInformationBlockType2.h" @@ -61,8 +61,8 @@ #include "enb_paramdef.h" extern uint16_t sf_ahead; -extern void set_parallel_conf(char* parallel_conf); -extern void set_worker_conf(char* worker_conf); +extern void set_parallel_conf(char *parallel_conf); +extern void set_worker_conf(char *worker_conf); extern PARALLEL_CONF_t get_thread_parallel_conf(void); extern WORKER_CONF_t get_thread_worker_conf(void); extern uint32_t to_earfcn_DL(int eutra_bandP, uint32_t dl_CarrierFreq, uint32_t bw); @@ -234,7 +234,7 @@ void RCconfig_L1(void) { paramlist_def_t L1_ParamList = {CONFIG_STRING_L1_LIST,NULL,0}; if (RC.eNB == NULL) { - RC.eNB = (PHY_VARS_eNB ***)malloc((1+NUMBER_OF_eNB_MAX)*sizeof(PHY_VARS_eNB **)); + RC.eNB = (PHY_VARS_eNB ** *)malloc((1+NUMBER_OF_eNB_MAX)*sizeof(PHY_VARS_eNB **)); LOG_I(PHY,"RC.eNB = %p\n",RC.eNB); memset(RC.eNB,0,(1+NUMBER_OF_eNB_MAX)*sizeof(PHY_VARS_eNB **)); RC.nb_L1_CC = malloc((1+RC.nb_L1_inst)*sizeof(int)); @@ -283,7 +283,8 @@ void RCconfig_L1(void) { LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_CC[0]=%d for init_eNB_afterRU()\n", __FUNCTION__, RC.nb_CC[0]); LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_macrlc_inst:%d because used by mac_top_init_eNB()\n", __FUNCTION__, RC.nb_macrlc_inst); //mac_top_init_eNB(); - configure_nfapi_pnf(RC.eNB[j][0]->eth_params_n.remote_addr, RC.eNB[j][0]->eth_params_n.remote_portc, RC.eNB[j][0]->eth_params_n.my_addr, RC.eNB[j][0]->eth_params_n.my_portd, RC.eNB[j][0]->eth_params_n .remote_portd); + configure_nfapi_pnf(RC.eNB[j][0]->eth_params_n.remote_addr, RC.eNB[j][0]->eth_params_n.remote_portc, RC.eNB[j][0]->eth_params_n.my_addr, RC.eNB[j][0]->eth_params_n.my_portd, + RC.eNB[j][0]->eth_params_n .remote_portd); } else { // other midhaul } }// j=0..num_inst @@ -300,7 +301,7 @@ void RCconfig_L1(void) { if (RC.eNB[j] == NULL) { RC.eNB[j] = (PHY_VARS_eNB **)malloc((1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB **)); LOG_I(PHY,"RC.eNB[%d] = %p\n",j,RC.eNB[j]); - memset(RC.eNB[j],0,(1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB ***)); + memset(RC.eNB[j],0,(1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB ** *)); } for (i=0; i 0) { - //char ccspath[MAX_OPTNAME_SIZE*2 + 16]; - for (J = 0; J < CCsParamList.numelt ; J++) { - sprintf(aprefix, "%s.[%i].%s.[%i]", ENB_CONFIG_STRING_ENB_LIST, k, ENB_CONFIG_STRING_COMPONENT_CARRIERS, J); config_get(CCsParams, sizeof(CCsParams)/sizeof(paramdef_t), aprefix); - X2AP_REGISTER_ENB_REQ (msg_p).eutra_band[J] = eutra_band; - X2AP_REGISTER_ENB_REQ (msg_p).downlink_frequency[J] = (uint32_t) downlink_frequency; - X2AP_REGISTER_ENB_REQ (msg_p).uplink_frequency_offset[J] = (unsigned int) uplink_frequency_offset; - X2AP_REGISTER_ENB_REQ (msg_p).Nid_cell[J]= Nid_cell; + X2AP_REGISTER_ENB_REQ (msg_p).downlink_frequency[J] = (uint32_t) downlink_frequency; + X2AP_REGISTER_ENB_REQ (msg_p).uplink_frequency_offset[J] = (unsigned int) uplink_frequency_offset; + X2AP_REGISTER_ENB_REQ (msg_p).Nid_cell[J]= Nid_cell; - if (Nid_cell>503) { - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for Nid_cell choice: 0...503 !\n", - RC.config_file_name, k, Nid_cell); - } + if (Nid_cell>503) { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for Nid_cell choice: 0...503 !\n", + RC.config_file_name, k, Nid_cell); + } - X2AP_REGISTER_ENB_REQ (msg_p).N_RB_DL[J]= N_RB_DL; + X2AP_REGISTER_ENB_REQ (msg_p).N_RB_DL[J]= N_RB_DL; - if ((N_RB_DL!=6) && (N_RB_DL!=15) && (N_RB_DL!=25) && (N_RB_DL!=50) && (N_RB_DL!=75) && (N_RB_DL!=100)) { - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 6,15,25,50,75,100 !\n", - RC.config_file_name, k, N_RB_DL); - } + if ((N_RB_DL!=6) && (N_RB_DL!=15) && (N_RB_DL!=25) && (N_RB_DL!=50) && (N_RB_DL!=75) && (N_RB_DL!=100)) { + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 6,15,25,50,75,100 !\n", + RC.config_file_name, k, N_RB_DL); + } - if (strcmp(frame_type, "FDD") == 0) { + if (strcmp(frame_type, "FDD") == 0) { X2AP_REGISTER_ENB_REQ (msg_p).frame_type[J] = FDD; - } else if (strcmp(frame_type, "TDD") == 0) { + } else if (strcmp(frame_type, "TDD") == 0) { X2AP_REGISTER_ENB_REQ (msg_p).frame_type[J] = TDD; } else { - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for frame_type choice: FDD or TDD !\n", - RC.config_file_name, k, frame_type); - } + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for frame_type choice: FDD or TDD !\n", + RC.config_file_name, k, frame_type); + } X2AP_REGISTER_ENB_REQ (msg_p).fdd_earfcn_DL[J] = to_earfcn_DL(eutra_band, downlink_frequency, N_RB_DL); X2AP_REGISTER_ENB_REQ (msg_p).fdd_earfcn_UL[J] = to_earfcn_UL(eutra_band, downlink_frequency + uplink_frequency_offset, N_RB_DL); @@ -2444,39 +2431,31 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) { return 0; } -int RCconfig_parallel(void) -{ +int RCconfig_parallel(void) { char *parallel_conf = NULL; char *worker_conf = NULL; extern char *parallel_config; extern char *worker_config; - paramdef_t ThreadParams[] = THREAD_CONF_DESC; paramlist_def_t THREADParamList = {THREAD_CONFIG_STRING_THREAD_STRUCT,NULL,0}; - config_getlist( &THREADParamList,NULL,0,NULL); - if(THREADParamList.numelt>0) - { + if(THREADParamList.numelt>0) { config_getlist( &THREADParamList,ThreadParams,sizeof(ThreadParams)/sizeof(paramdef_t),NULL); parallel_conf = strdup(*(THREADParamList.paramarray[0][THREAD_PARALLEL_IDX].strptr)); - } - else - { + } else { parallel_conf = strdup("PARALLEL_RU_L1_TRX_SPLIT"); } - if(THREADParamList.numelt>0) - { + + if(THREADParamList.numelt>0) { config_getlist( &THREADParamList,ThreadParams,sizeof(ThreadParams)/sizeof(paramdef_t),NULL); worker_conf = strdup(*(THREADParamList.paramarray[0][THREAD_WORKER_IDX].strptr)); - } - else - { + } else { worker_conf = strdup("WORKER_ENABLE"); } - if(parallel_config == NULL) set_parallel_conf(parallel_conf); + if(worker_config == NULL) set_worker_conf(worker_conf); return 0; From 496eae672e10feb465e430b38697ec5d1c93b70c Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 11 Oct 2018 15:36:48 +0200 Subject: [PATCH 304/379] minor changes in initial synchronization --- cmake_targets/CMakeLists.txt | 4 +- openair1/PHY/INIT/nr_init.c | 2 + openair1/PHY/INIT/nr_init_ue.c | 2 + openair1/PHY/MODULATION/slot_fep_nr.c | 15 +++---- openair1/PHY/NR_REFSIG/sss_nr.h | 2 +- openair1/PHY/NR_TRANSPORT/nr_sss.c | 5 ++- openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c | 6 ++- openair1/PHY/NR_UE_TRANSPORT/pss_nr.c | 5 +++ openair1/PHY/NR_UE_TRANSPORT/sss_nr.c | 62 +++++++++++++++----------- openair1/PHY/TOOLS/lte_dfts.c | 9 ++-- 10 files changed, 67 insertions(+), 45 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index eb06b151cb..e2cd462386 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -1297,7 +1297,7 @@ set(PHY_SRC_UE ${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gold.c ${OPENAIR1_DIR}/PHY/TOOLS/file_output.c ${OPENAIR1_DIR}/PHY/TOOLS/cadd_vv.c - ${OPENAIR1_DIR}/PHY/TOOLS/lte_dfts.c + #${OPENAIR1_DIR}/PHY/TOOLS/lte_dfts.c ${OPENAIR1_DIR}/PHY/TOOLS/log2_approx.c ${OPENAIR1_DIR}/PHY/TOOLS/cmult_sv.c ${OPENAIR1_DIR}/PHY/TOOLS/cmult_vv.c @@ -1334,7 +1334,7 @@ set(PHY_SRC_UE ${OPENAIR1_DIR}/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c ${OPENAIR1_DIR}/PHY/TOOLS/file_output.c ${OPENAIR1_DIR}/PHY/TOOLS/cadd_vv.c - ${OPENAIR1_DIR}/PHY/TOOLS/lte_dfts.c + # ${OPENAIR1_DIR}/PHY/TOOLS/lte_dfts.c ${OPENAIR1_DIR}/PHY/TOOLS/log2_approx.c ${OPENAIR1_DIR}/PHY/TOOLS/cmult_sv.c ${OPENAIR1_DIR}/PHY/TOOLS/cmult_vv.c diff --git a/openair1/PHY/INIT/nr_init.c b/openair1/PHY/INIT/nr_init.c index 94486c48e9..4cd2f62ae3 100644 --- a/openair1/PHY/INIT/nr_init.c +++ b/openair1/PHY/INIT/nr_init.c @@ -100,6 +100,8 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB, gNB->check_for_MUMIMO_transmissions=0; while(gNB->configured == 0) usleep(10000); + + init_dfts(); /* LOG_I(PHY,"[gNB %"PRIu8"] Initializing DL_FRAME_PARMS : N_RB_DL %"PRIu8", PHICH Resource %d, PHICH Duration %d nb_antennas_tx:%u nb_antennas_rx:%u PRACH[rootSequenceIndex:%u prach_Config_enabled:%u configIndex:%u highSpeed:%u zeroCorrelationZoneConfig:%u freqOffset:%u]\n", gNB->Mod_id, diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c index b70c90791f..75b3b8bf42 100644 --- a/openair1/PHY/INIT/nr_init_ue.c +++ b/openair1/PHY/INIT/nr_init_ue.c @@ -655,6 +655,8 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, fp->nb_antennas_tx = 1; fp->nb_antennas_rx=1; + init_dfts(); + printf("Initializing UE vars (abstraction %"PRIu8") for eNB TXant %"PRIu8", UE RXant %"PRIu8"\n",abstraction_flag,fp->nb_antennas_tx,fp->nb_antennas_rx); //LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_eNB_INST); diff --git a/openair1/PHY/MODULATION/slot_fep_nr.c b/openair1/PHY/MODULATION/slot_fep_nr.c index c3e49a42df..5ad1648490 100644 --- a/openair1/PHY/MODULATION/slot_fep_nr.c +++ b/openair1/PHY/MODULATION/slot_fep_nr.c @@ -25,17 +25,17 @@ #include "PHY/LTE_ESTIMATION/lte_estimation.h" #include "PHY/NR_UE_ESTIMATION/nr_estimation.h" -//#define DEBUG_FEP +#define DEBUG_FEP #define SOFFSET 0 int nr_slot_fep(PHY_VARS_NR_UE *ue, - unsigned char l, - unsigned char Ns, - int sample_offset, - int no_prefix, - int reset_freq_est, - NR_CHANNEL_EST_t channel) + unsigned char l, + unsigned char Ns, + int sample_offset, + int no_prefix, + int reset_freq_est, + NR_CHANNEL_EST_t channel) { NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; NR_UE_COMMON *common_vars = &ue->common_vars; @@ -143,7 +143,6 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue, #if UE_TIMING_TRACE stop_meas(&ue->rx_dft_stats); #endif - } } else { rx_offset += (frame_parms->ofdm_symbol_size+nb_prefix_samples)*l;// + diff --git a/openair1/PHY/NR_REFSIG/sss_nr.h b/openair1/PHY/NR_REFSIG/sss_nr.h index 64200deb31..c260abd071 100644 --- a/openair1/PHY/NR_REFSIG/sss_nr.h +++ b/openair1/PHY/NR_REFSIG/sss_nr.h @@ -51,7 +51,7 @@ #define NUMBER_SSS_SEQUENCE (336) #define INVALID_SSS_SEQUENCE (NUMBER_SSS_SEQUENCE) #define LENGTH_SSS_NR (127) -#define SCALING_METRIC_SSS_NR (19) +#define SCALING_METRIC_SSS_NR (15)//(19) #define N_ID_2_NUMBER (NUMBER_PSS_SEQUENCE) #define N_ID_1_NUMBER (NUMBER_SSS_SEQUENCE) diff --git a/openair1/PHY/NR_TRANSPORT/nr_sss.c b/openair1/PHY/NR_TRANSPORT/nr_sss.c index 9b318d74ef..865e14465e 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_sss.c +++ b/openair1/PHY/NR_TRANSPORT/nr_sss.c @@ -21,7 +21,7 @@ #include "PHY/NR_TRANSPORT/nr_transport.h" -//#define NR_SSS_DEBUG +#define NR_SSS_DEBUG int nr_generate_sss( int16_t *d_sss, int32_t **txdataF, @@ -76,6 +76,7 @@ int nr_generate_sss( int16_t *d_sss, for (int m = 0; m < NR_SSS_LENGTH; m++) { ((int16_t*)txdataF[aa])[2*(l*frame_parms->ofdm_symbol_size + k)] = (a * d_sss[m]) >> 15; + printf("sss %d: %d\n",m,((int16_t*)txdataF[aa])[2*(l*frame_parms->ofdm_symbol_size + k)]); k++; if (k >= frame_parms->ofdm_symbol_size) @@ -83,7 +84,7 @@ int nr_generate_sss( int16_t *d_sss, } } #ifdef NR_SSS_DEBUG - write_output("sss_0.m", "sss_0", (void*)txdataF[0][2*l*frame_parms->ofdm_symbol_size], frame_parms->ofdm_symbol_size, 1, 1); + // write_output("sss_0.m", "sss_0", (void*)txdataF[0][l*frame_parms->ofdm_symbol_size], frame_parms->ofdm_symbol_size, 1, 1); #endif return 0; diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c index 3d86947a7a..4608f3dc28 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c @@ -567,7 +567,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, #ifdef DEBUG_PBCH //printf("address dataf %p",nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF); - write_output("rxdataF0_pbch.m","rxF0pbch",nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF,frame_parms->ofdm_symbol_size*4,2,1); + write_output("rxdataF0_pbch.m","rxF0pbch",nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF,frame_parms->ofdm_symbol_size*4,1,1); #endif nr_pbch_extract(nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF, @@ -718,6 +718,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, printf("[PBCH] decoder payload[%d] = %x\n",i,decoded_output[i]); } //#endif + ue->dl_indication.rx_ind = &ue->rx_ind; // hang on rx_ind instance //ue->rx_ind.sfn_slot = 0; //should be set by higher-1-layer, i.e. clean_and_set_if_instance() ue->rx_ind.number_pdus = ue->rx_ind.number_pdus + 1; @@ -729,7 +730,8 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, ue->rx_ind.rx_indication_body->mib_pdu.ssb_length = Lmax; // confirm with TCL ue->rx_ind.rx_indication_body->mib_pdu.cell_id = frame_parms->Nid_cell; // confirm with TCL - ue->if_inst->dl_indication(&ue->dl_indication); + if (ue->if_inst && ue->if_inst->dl_indication) + ue->if_inst->dl_indication(&ue->dl_indication); return 0; } diff --git a/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c b/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c index 969fe1b1e5..8c1f96b6ee 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c @@ -269,6 +269,8 @@ void generate_pss_nr(int N_ID_2, int ofdm_symbol_size) #ifdef DBG_PSS_NR if (N_ID_2 == 0) { + for (int i=0;i<16;i++) printf("f %d: %d,%d\n",i,synchroF_tmp[i<<1],synchroF_tmp[1+(i<<1)]); + for (int i=0;i<16;i++) printf("t %d: %d,%d\n",i,primary_synchro_time[i<<1],primary_synchro_time[1+(i<<1)]); char output_file[255]; char sequence_name[255]; sprintf(output_file, "%s%d_%d%s","pss_seq_t_", N_ID_2, length, ".m"); @@ -277,6 +279,9 @@ void generate_pss_nr(int N_ID_2, int ofdm_symbol_size) printf("file %s sequence %s\n", output_file, sequence_name); write_output(output_file, sequence_name, primary_synchro_time, length, 1, 1); + sprintf(output_file, "%s%d_%d%s","pss_seq_f_", N_ID_2, length, ".m"); + sprintf(sequence_name, "%s%d_%d","pss_seq_f_", N_ID_2, length); + write_output(output_file, sequence_name, synchroF_tmp, length, 1, 1); } #endif diff --git a/openair1/PHY/NR_UE_TRANSPORT/sss_nr.c b/openair1/PHY/NR_UE_TRANSPORT/sss_nr.c index 3231e82035..a29b676330 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/sss_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/sss_nr.c @@ -96,7 +96,8 @@ void init_context_sss_nr(int amp) /* Modulation of SSS is a BPSK TS 36.211 chapter 5.1.2 BPSK */ #if 1 - d_sss[N_ID_2][N_ID_1][n] = dss_current * amp; + d_sss[N_ID_2][N_ID_1][n] = dss_current;// * amp; + (void) amp; #else (void) amp; d_sss[N_ID_2][N_ID_1][n] = (dss_current * SHRT_MAX)>>SCALING_PSS_NR; @@ -126,6 +127,8 @@ void init_context_sss_nr(int amp) * *********************************************************************/ +#define DEBUG_SSS_NR +#define DEBUG_PLOT_SSS void insert_sss_nr(int16_t *sss_time, NR_DL_FRAME_PARMS *frame_parms) { @@ -425,21 +428,21 @@ int rx_sss_nr(PHY_VARS_NR_UE *ue, int32_t *tot_metric,uint8_t *phase_max) // Do FFTs for SSS/PSS // SSS nr_slot_fep(ue, - SSS_SYMBOL_NB, // symbol number - 0, // Ns slot number - ue->rx_offset, // sample_offset of int16_t - 0, // no_prefix - 1, // reset frequency estimation - NR_SSS_EST); + SSS_SYMBOL_NB, // symbol number + 0, // Ns slot number + ue->rx_offset, // sample_offset of int16_t + 0, // no_prefix + 1, // reset frequency estimation + NR_SSS_EST); // PSS nr_slot_fep(ue, - PSS_SYMBOL_NB, - 0, - ue->rx_offset, - 0, - 1, - NR_SSS_EST); + PSS_SYMBOL_NB, + 0, + ue->rx_offset, + 0, + 1, + NR_SSS_EST); frame_parms->nb_prefix_samples0 = nb_prefix_samples0; @@ -452,17 +455,11 @@ int rx_sss_nr(PHY_VARS_NR_UE *ue, int32_t *tot_metric,uint8_t *phase_max) #ifdef DEBUG_PLOT_SSS write_output("rxsig0.m","rxs0",&ue->common_vars.rxdata[0][0],ue->frame_parms.samples_per_tti,1,1); - write_output("rxdataF0.m","rxF0",&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[0]].rxdataF[0],frame_parms->ofdm_symbol_size,2,1); + write_output("rxdataF0.m","rxF0",&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[0]].rxdataF[0][frame_parms->ofdm_symbol_size*SSS_SYMBOL_NB],frame_parms->ofdm_symbol_size,2,1); write_output("pss_ext.m","pss_ext",pss_ext,LENGTH_PSS_NR,1,1); #endif -#if 0 - - write_output("sss_ext.m","sss_ext",sss_ext,LENGTH_SSS_NR,1,1); - write_output("sss_ref.m","sss_ref", d_sss,LENGTH_SSS_NR,1,1); - -#endif #if 0 int16_t *p = (int16_t *)sss_ext[0]; @@ -489,6 +486,14 @@ int rx_sss_nr(PHY_VARS_NR_UE *ue, int32_t *tot_metric,uint8_t *phase_max) sss = (int16_t*)&sss_ext[0][0]; +#ifdef DEBUG_PLOT_SSS + + write_output("sss_ext.m","sss_ext",sss_ext[0],LENGTH_SSS_NR,1,1); + write_output("sss_ref.m","sss_ref", d_sss,LENGTH_SSS_NR,1,1); + +#endif + + #if 0 /* simulate of a phase shift on the signal */ @@ -499,11 +504,11 @@ int rx_sss_nr(PHY_VARS_NR_UE *ue, int32_t *tot_metric,uint8_t *phase_max) #endif -#if 0 +#if 1 int16_t *ps = (int16_t *)pss_ext; for (int i = 0; i < LENGTH_SSS_NR; i++) { - printf("sss ref [%i] : %d %d \n", i, d_sss[0][0][i], d_sss[0][0][i]); + printf("sss ref [%i] : %d \n", i, d_sss[0][0][i]); printf("sss ext [%i] : %d %d \n", i, sss[2*i], sss[2*i+1]); printf("pss ref [%i] : %d %d \n", i, primary_synchro_nr[0][2*i], primary_synchro_nr[0][2*i+1]); @@ -528,8 +533,11 @@ int rx_sss_nr(PHY_VARS_NR_UE *ue, int32_t *tot_metric,uint8_t *phase_max) // This is the inner product using one particular value of each unknown parameter for (i=0; i < LENGTH_SSS_NR; i++) { + metric_re += d[i]*(((phase_re_nr[phase]*sss[2*i])>>SCALING_METRIC_SSS_NR) - ((phase_im_nr[phase]*sss[2*i+1])>>SCALING_METRIC_SSS_NR)) + d[i]*(((phase_im_nr[phase]*sss[2*i])>>SCALING_METRIC_SSS_NR) + ((phase_re_nr[phase]*sss[2*i+1])>>SCALING_METRIC_SSS_NR)); + if (Nid1 ==0 && phase==3) + printf("i %d, phase %d/%d: metric %d, phase (%d,%d) sss (%d,%d) d %d\n",i,phase,PHASE_HYPOTHESIS_NUMBER,metric_re,phase_re_nr[phase],phase_im_nr[phase],sss[2*i],sss[1+(2*i)],d[i]); } metric = metric_re; @@ -550,14 +558,14 @@ int rx_sss_nr(PHY_VARS_NR_UE *ue, int32_t *tot_metric,uint8_t *phase_max) } //#ifdef DEBUG_SSS_NR - + #define SSS_METRIC_FLOOR_NR (30000) -if (*tot_metric > SSS_METRIC_FLOOR_NR) { + if (*tot_metric > SSS_METRIC_FLOOR_NR) { Nid2 = GET_NID2(frame_parms->Nid_cell); Nid1 = GET_NID1(frame_parms->Nid_cell); printf("Nid2 %d Nid1 %d tot_metric %d, phase_max %d \n", Nid2, Nid1, *tot_metric, *phase_max); -} -//#endif - + } + //#endif + return(0); } diff --git a/openair1/PHY/TOOLS/lte_dfts.c b/openair1/PHY/TOOLS/lte_dfts.c index 0c6bab6557..1a04a3774a 100644 --- a/openair1/PHY/TOOLS/lte_dfts.c +++ b/openair1/PHY/TOOLS/lte_dfts.c @@ -74,7 +74,7 @@ static inline void cmac(__m128i a,__m128i b, __m128i *re32, __m128i *im32) cmac_tmp = _mm_sign_epi16(b,*(__m128i*)reflip); cmac_tmp_re32 = _mm_madd_epi16(a,cmac_tmp); - + // cmac_tmp = _mm_shufflelo_epi16(b,_MM_SHUFFLE(2,3,0,1)); // cmac_tmp = _mm_shufflehi_epi16(cmac_tmp,_MM_SHUFFLE(2,3,0,1)); cmac_tmp = _mm_shuffle_epi8(b,_mm_set_epi8(13,12,15,14,9,8,11,10,5,4,7,6,1,0,3,2)); @@ -4464,6 +4464,7 @@ void dft2048(int16_t *x,int16_t *y,int scale) _mm_empty(); _m_empty(); + } void idft2048(int16_t *x,int16_t *y,int scale) @@ -4567,6 +4568,8 @@ void dft2048(int16_t *x,int16_t *y,int scale) int i; simd256_q15_t ONE_OVER_SQRT2_Q15_128 = set1_int16_simd256(ONE_OVER_SQRT2_Q15); + write_output("dftin.m","dftin",x,2048,1,1); + xtmpp = xtmp; for (i=0; i<4; i++) { @@ -4645,7 +4648,7 @@ void dft2048(int16_t *x,int16_t *y,int scale) _mm_empty(); _m_empty(); - + write_output("dftout.m","dftout",y,2048,1,1); } void idft2048(int16_t *x,int16_t *y,int scale) @@ -4658,7 +4661,7 @@ void idft2048(int16_t *x,int16_t *y,int scale) simd256_q15_t ONE_OVER_SQRT2_Q15_128 = set1_int16_simd256(ONE_OVER_SQRT2_Q15); xtmpp = xtmp; - + for (i=0; i<4; i++) { transpose4_ooff_simd256(x256 ,xtmpp,128); transpose4_ooff_simd256(x256+2,xtmpp+1,128); From dbbc9c41afb472acb72e4711bfe6fa64b8e3970d Mon Sep 17 00:00:00 2001 From: Agustin Date: Thu, 11 Oct 2018 16:03:15 +0200 Subject: [PATCH 305/379] NR PRACH development integration --- cmake_targets/CMakeLists.txt | 1 + openair1/PHY/NR_UE_TRANSPORT/nr_prach.c | 1205 +++++++++++++++++ openair1/PHY/NR_UE_TRANSPORT/nr_prach.h | 891 ++++++++++++ .../PHY/NR_UE_TRANSPORT/nr_transport_ue.h | 2 + openair1/PHY/defs_nr_common.h | 24 + openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 326 +++++ targets/RT/USER/nr-ue.c | 3 +- 7 files changed, 2451 insertions(+), 1 deletion(-) create mode 100644 openair1/PHY/NR_UE_TRANSPORT/nr_prach.c create mode 100644 openair1/PHY/NR_UE_TRANSPORT/nr_prach.h diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index c0a17fe18a..4d6b07d736 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -1321,6 +1321,7 @@ set(PHY_SRC_UE ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_initial_sync.c ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_pbch.c ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/ + ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_prach.c ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/dci_nr.c ${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/dci_tools_nr.c diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c b/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c new file mode 100644 index 0000000000..0a662304dd --- /dev/null +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c @@ -0,0 +1,1205 @@ +/* + * 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.1 (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/prach_common.c + * \brief Common routines for UE/eNB PRACH physical channel V8.6 2009-03 + * \author R. Knopp + * \date 2011 + * \version 0.1 + * \company Eurecom + * \email: knopp@eurecom.fr + * \note + * \warning + */ +#include "PHY/sse_intrin.h" +//#include "PHY/defs_common.h" +//#include "PHY/phy_extern.h" +//#include "PHY/phy_extern_ue.h" +#include "common/utils/LOG/vcd_signal_dumper.h" + +//#include "PHY/defs.h" +#include "PHY/impl_defs_nr.h" +//#include "PHY/defs_nr_common.h" +#include "PHY/defs_nr_UE.h" +#include "PHY/NR_UE_TRANSPORT/nr_prach.h" +//#include "PHY/extern.h" +//#include "LAYER2/MAC/extern.h" +//#include "PHY/NR_UE_TRANSPORT/pucch_nr.h" + +#include "common/utils/LOG/log.h" +#include "common/utils/LOG/vcd_signal_dumper.h" + +#include "T.h" + + + +#define NR_PRACH_DEBUG 1 + + + + +void dump_nr_prach_config(NR_DL_FRAME_PARMS *frame_parms,uint8_t subframe) +{ + + FILE *fd; + + fd = fopen("prach_config.txt","w"); + fprintf(fd,"prach_config: subframe = %d\n",subframe); + fprintf(fd,"prach_config: N_RB_UL = %d\n",frame_parms->N_RB_UL); + fprintf(fd,"prach_config: frame_type = %s\n",(frame_parms->frame_type==1) ? "TDD":"FDD"); + + if(frame_parms->frame_type==1) fprintf(fd,"prach_config: tdd_config = %d\n",frame_parms->tdd_config); + + fprintf(fd,"prach_config: rootSequenceIndex = %d\n",frame_parms->prach_config_common.rootSequenceIndex); + fprintf(fd,"prach_config: prach_ConfigIndex = %d\n",frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex); + fprintf(fd,"prach_config: Ncs_config = %d\n",frame_parms->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig); + fprintf(fd,"prach_config: highSpeedFlag = %d\n",frame_parms->prach_config_common.prach_ConfigInfo.highSpeedFlag); + fprintf(fd,"prach_config: n_ra_prboffset = %d\n",frame_parms->prach_config_common.prach_ConfigInfo.prach_FreqOffset); + fclose(fd); + +} + +// This function computes the du +void nr_fill_du(uint8_t prach_fmt) +{ + + uint16_t iu,u,p; + uint16_t N_ZC; + uint16_t *prach_root_sequence_map; + + if (prach_fmt<4) { + N_ZC = 839; + prach_root_sequence_map = prach_root_sequence_map_0_3; + } else { + N_ZC = 139; + prach_root_sequence_map = prach_root_sequence_map_abc; + } + + for (iu=0; iu<(N_ZC-1); iu++) { + + u=prach_root_sequence_map[iu]; + p=1; + + while (((u*p)%N_ZC)!=1) + p++; + + nr_du[u] = ((p<(N_ZC>>1)) ? p : (N_ZC-p)); + } + +} + +#if 0 +uint8_t get_num_prach_tdd(module_id_t Mod_id) +{ + NR_DL_FRAME_PARMS *fp = &PHY_vars_UE_g[Mod_id][0]->frame_parms; + return(tdd_preamble_map[fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex][fp->tdd_config].num_prach); +} + +uint8_t get_fid_prach_tdd(module_id_t Mod_id,uint8_t tdd_map_index) +{ + NR_DL_FRAME_PARMS *fp = &PHY_vars_UE_g[Mod_id][0]->frame_parms; + return(tdd_preamble_map[fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex][fp->tdd_config].map[tdd_map_index].f_ra); +} +#endif + +uint16_t get_nr_prach_fmt(uint8_t prach_ConfigIndex) +{ + //return (table_6_3_3_2_2_prachConfig_Index[prach_ConfigIndex][0]); // if using table 6.3.3.2-2: Random access configurations for FR1 and paired spectrum/supplementary uplink + return (table_6_3_3_2_3_prachConfig_Index[prach_ConfigIndex][0]); // if using table 6.3.3.2-3: Random access configurations for FR1 and unpaired spectrum + // For FR2 not implemented. FIXME +} + +#if 0 +uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,lte_frame_type_t frame_type) +{ + + if (frame_type == FDD) // FDD + return(prach_ConfigIndex>>4); + + else { + if (prach_ConfigIndex < 20) + return (0); + + if (prach_ConfigIndex < 30) + return (1); + + if (prach_ConfigIndex < 40) + return (2); + + if (prach_ConfigIndex < 48) + return (3); + else + return (4); + } +} + +uint8_t get_prach_prb_offset(NR_DL_FRAME_PARMS *frame_parms, + uint8_t prach_ConfigIndex, + uint8_t n_ra_prboffset, + uint8_t tdd_mapindex, uint16_t Nf, uint16_t prach_fmt) +{ + lte_frame_type_t frame_type = frame_parms->frame_type; + uint8_t tdd_config = frame_parms->tdd_config; + + uint8_t n_ra_prb; + uint8_t f_ra,t1_ra; + uint8_t Nsp=2; + + if (frame_type == TDD) { // TDD + + if (tdd_preamble_map[prach_ConfigIndex][tdd_config].num_prach==0) { + LOG_E(PHY, "Illegal prach_ConfigIndex %"PRIu8"", prach_ConfigIndex); + return(-1); + } + + // adjust n_ra_prboffset for frequency multiplexing (p.36 36.211) + f_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[tdd_mapindex].f_ra; + + if (prach_fmt < 4) { + if ((f_ra&1) == 0) { + n_ra_prb = n_ra_prboffset + 6*(f_ra>>1); + } else { + n_ra_prb = frame_parms->N_RB_UL - 6 - n_ra_prboffset + 6*(f_ra>>1); + } + } else { + if ((tdd_config >2) && (tdd_config<6)) + Nsp = 2; + + t1_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t1_ra; + + if ((((Nf&1)*(2-Nsp)+t1_ra)&1) == 0) { + n_ra_prb = 6*f_ra; + } else { + n_ra_prb = frame_parms->N_RB_UL - 6*(f_ra+1); + } + } + } + else { //FDD + n_ra_prb = n_ra_prboffset; + } + return(n_ra_prb); +} +#endif //0 + +int is_nr_prach_subframe(NR_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t subframe) { + + uint8_t prach_ConfigIndex = frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex; +/* + // For FR1 paired + if (((frame%table_6_3_3_2_2_prachConfig_Index[prach_ConfigIndex][2]) == table_6_3_3_2_2_prachConfig_Index[prach_ConfigIndex][3]) && + ((table_6_3_3_2_2_prachConfig_Index[prach_ConfigIndex][4]&(1<prach_config_common.prach_ConfigInfo.prach_ConfigIndex; + uint8_t tdd_config = frame_parms->tdd_config; + uint8_t t0_ra; + uint8_t t1_ra; + uint8_t t2_ra; + + int prach_mask = 0; + + if (frame_parms->frame_type == FDD) { //FDD + //implement Table 5.7.1-2 from 36.211 (Rel-10, p.41) + if ((((frame&1) == 1) && (subframe < 9)) || + (((frame&1) == 0) && (subframe == 9))) // This is an odd frame, ignore even-only PRACH frames + if (((prach_ConfigIndex&0xf)<3) || // 0,1,2,16,17,18,32,33,34,48,49,50 + ((prach_ConfigIndex&0x1f)==18) || // 18,50 + ((prach_ConfigIndex&0xf)==15)) // 15,47 + return(0); + + switch (prach_ConfigIndex&0x1f) { + case 0: + case 3: + if (subframe==1) prach_mask = 1; + break; + + case 1: + case 4: + if (subframe==4) prach_mask = 1; + break; + + case 2: + case 5: + if (subframe==7) prach_mask = 1; + break; + + case 6: + if ((subframe==1) || (subframe==6)) prach_mask=1; + break; + + case 7: + if ((subframe==2) || (subframe==7)) prach_mask=1; + break; + + case 8: + if ((subframe==3) || (subframe==8)) prach_mask=1; + break; + + case 9: + if ((subframe==1) || (subframe==4) || (subframe==7)) prach_mask=1; + break; + + case 10: + if ((subframe==2) || (subframe==5) || (subframe==8)) prach_mask=1; + break; + + case 11: + if ((subframe==3) || (subframe==6) || (subframe==9)) prach_mask=1; + break; + + case 12: + if ((subframe&1)==0) prach_mask=1; + break; + + case 13: + if ((subframe&1)==1) prach_mask=1; + break; + + case 14: + prach_mask=1; + break; + + case 15: + if (subframe==9) prach_mask=1; + break; + } + } else { // TDD + + AssertFatal(prach_ConfigIndex<64, + "Illegal prach_ConfigIndex %d for ",prach_ConfigIndex); + AssertFatal(tdd_preamble_map[prach_ConfigIndex][tdd_config].num_prach>0, + "Illegal prach_ConfigIndex %d for ",prach_ConfigIndex); + + t0_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t0_ra; + t1_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t1_ra; + t2_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t2_ra; +#ifdef PRACH_DEBUG + LOG_I(PHY,"[PRACH] Checking for PRACH format (ConfigIndex %d) in TDD subframe %d (%d,%d,%d)\n", + prach_ConfigIndex, + subframe, + t0_ra,t1_ra,t2_ra); +#endif + + if ((((t0_ra == 1) && ((frame &1)==0))|| // frame is even and PRACH is in even frames + ((t0_ra == 2) && ((frame &1)==1))|| // frame is odd and PRACH is in odd frames + (t0_ra == 0)) && // PRACH is in all frames + (((subframe<5)&&(t1_ra==0)) || // PRACH is in 1st half-frame + (((subframe>4)&&(t1_ra==1))))) { // PRACH is in 2nd half-frame + if ((prach_ConfigIndex<48) && // PRACH only in normal UL subframe + (((subframe%5)-2)==t2_ra)) prach_mask=1; + else if ((prach_ConfigIndex>47) && (((subframe%5)-1)==t2_ra)) prach_mask=1; // PRACH can be in UpPTS + } + } + + return(prach_mask); +} + +int is_prach_subframe(NR_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t subframe) { + + uint8_t prach_ConfigIndex = frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex; + int prach_mask = is_prach_subframe0(frame_parms,prach_ConfigIndex,frame,subframe); + +#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) + int i; + + for (i=0;i<4;i++) { + if (frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[i] == 1) + prach_mask|=(is_prach_subframe0(frame_parms,frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[i],frame,subframe)<<(i+1)); + } +#endif + return(prach_mask); +} +#endif //0 + +void compute_nr_prach_seq(uint16_t rootSequenceIndex, + uint8_t prach_ConfigIndex, + uint8_t zeroCorrelationZoneConfig, + uint8_t highSpeedFlag, + lte_frame_type_t frame_type, + uint32_t X_u[64][839]) +{ + + // Compute DFT of x_u => X_u[k] = x_u(inv(u)*k)^* X_u[k] = exp(j\pi u*inv(u)*k*(inv(u)*k+1)/N_ZC) + unsigned int k,inv_u,i,NCS=0,num_preambles; + int N_ZC; + uint8_t prach_fmt = get_prach_fmt(prach_ConfigIndex,frame_type); + uint16_t *prach_root_sequence_map; + uint16_t u, preamble_offset; + uint16_t n_shift_ra,n_shift_ra_bar, d_start,numshift; + uint8_t not_found; + + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_COMPUTE_PRACH, VCD_FUNCTION_IN); + +#ifdef PRACH_DEBUG + LOG_I(PHY,"compute_prach_seq: NCS_config %d, prach_fmt %d\n",zeroCorrelationZoneConfig, prach_fmt); +#endif + + AssertFatal(prach_fmt<4, + "PRACH sequence is only precomputed for prach_fmt<4 (have %"PRIu8")\n", prach_fmt ); + N_ZC = (prach_fmt < 4) ? 839 : 139; + //init_prach_tables(N_ZC); //moved to phy_init_lte_ue/eNB, since it takes to long in real-time + + if (prach_fmt < 4) { + prach_root_sequence_map = prach_root_sequence_map_0_3; + } else { + // FIXME cannot be reached + prach_root_sequence_map = prach_root_sequence_map_abc; + } + + +#ifdef PRACH_DEBUG + LOG_I( PHY, "compute_prach_seq: done init prach_tables\n" ); +#endif + + + + + int restricted_Type = 0; //this is hardcoded ('0' for restricted_TypeA; and '1' for restricted_TypeB). FIXME + if (highSpeedFlag== 0) { + +#ifdef PRACH_DEBUG + LOG_I(PHY,"Low speed prach : NCS_config %d\n",zeroCorrelationZoneConfig); +#endif + + AssertFatal(zeroCorrelationZoneConfig<=15, + "FATAL, Illegal Ncs_config for unrestricted format %"PRIu8"\n", zeroCorrelationZoneConfig ); + if (prach_fmt<3) NCS = NCS_unrestricted_delta_f_RA_125[zeroCorrelationZoneConfig]; + if (prach_fmt==3) NCS = NCS_unrestricted_delta_f_RA_5[zeroCorrelationZoneConfig]; + if (prach_fmt>3) NCS = NCS_unrestricted_delta_f_RA_15[zeroCorrelationZoneConfig]; + + num_preambles = (NCS==0) ? 64 : ((64*NCS)/N_ZC); + + if (NCS>0) num_preambles++; + + preamble_offset = 0; + } else { + +#ifdef PRACH_DEBUG + LOG_I( PHY, "high speed prach : NCS_config %"PRIu8"\n", zeroCorrelationZoneConfig ); +#endif + + AssertFatal(zeroCorrelationZoneConfig<=14, + "FATAL, Illegal Ncs_config for restricted format %"PRIu8"\n", zeroCorrelationZoneConfig ); + if (prach_fmt<3){ + if (restricted_Type == 0) NCS = NCS_restricted_TypeA_delta_f_RA_125[zeroCorrelationZoneConfig]; // for TypeA, this is hardcoded. FIXME + if (restricted_Type == 1) NCS = NCS_restricted_TypeB_delta_f_RA_125[zeroCorrelationZoneConfig]; // for TypeB, this is hardcoded. FIXME + } + if (prach_fmt==3){ + if (restricted_Type == 0) NCS = NCS_restricted_TypeA_delta_f_RA_5[zeroCorrelationZoneConfig]; // for TypeA, this is hardcoded. FIXME + if (restricted_Type == 1) NCS = NCS_restricted_TypeB_delta_f_RA_5[zeroCorrelationZoneConfig]; // for TypeB, this is hardcoded. FIXME + } + if (prach_fmt>3){ + + } + //NCS = NCS_restricted[zeroCorrelationZoneConfig]; + nr_fill_du(prach_fmt); + + num_preambles = 64; // compute ZC sequence for 64 possible roots + // find first non-zero shift root (stored in preamble_offset) + not_found = 1; + preamble_offset = 0; + + while (not_found == 1) { + // current root depending on rootSequenceIndex + int index = (rootSequenceIndex + preamble_offset) % N_ZC; + + if (prach_fmt<4) { + // prach_root_sequence_map points to prach_root_sequence_map0_3 + DevAssert( index < sizeof(prach_root_sequence_map_0_3) / sizeof(prach_root_sequence_map_0_3[0]) ); + } else { + // prach_root_sequence_map points to prach_root_sequence_map4 + DevAssert( index < sizeof(prach_root_sequence_map_abc) / sizeof(prach_root_sequence_map_abc[0]) ); + } + + u = prach_root_sequence_map[index]; + + uint16_t n_group_ra = 0; + + if ( (nr_du[u]<(N_ZC/3)) && (nr_du[u]>=NCS) ) { + n_shift_ra = nr_du[u]/NCS; + d_start = (nr_du[u]<<1) + (n_shift_ra * NCS); + n_group_ra = N_ZC/d_start; + n_shift_ra_bar = max(0,(N_ZC-(nr_du[u]<<1)-(n_group_ra*d_start))/N_ZC); + } else if ( (nr_du[u]>=(N_ZC/3)) && (nr_du[u]<=((N_ZC - NCS)>>1)) ) { + n_shift_ra = (N_ZC - (nr_du[u]<<1))/NCS; + d_start = N_ZC - (nr_du[u]<<1) + (n_shift_ra * NCS); + n_group_ra = nr_du[u]/d_start; + n_shift_ra_bar = min(n_shift_ra,max(0,(nr_du[u]- (n_group_ra*d_start))/NCS)); + } else { + n_shift_ra = 0; + n_shift_ra_bar = 0; + } + + // This is the number of cyclic shifts for the current root u + numshift = (n_shift_ra*n_group_ra) + n_shift_ra_bar; + + // skip to next root and recompute parameters if numshift==0 + if (numshift>0) + not_found = 0; + else + preamble_offset++; + } + } + +#ifdef PRACH_DEBUG + + if (NCS>0) + LOG_I( PHY, "Initializing %u preambles for PRACH (NCS_config %"PRIu8", NCS %u, N_ZC/NCS %u)\n", + num_preambles, zeroCorrelationZoneConfig, NCS, N_ZC/NCS ); + +#endif + + for (i=0; iframe_parms.frame_type; + //uint8_t tdd_config = ue->frame_parms.tdd_config; + uint16_t rootSequenceIndex = ue->frame_parms.prach_config_common.rootSequenceIndex; + uint8_t prach_ConfigIndex = ue->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex; + uint8_t Ncs_config = ue->frame_parms.prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig; + uint8_t restricted_set = ue->frame_parms.prach_config_common.prach_ConfigInfo.highSpeedFlag; + //uint8_t n_ra_prboffset = ue->frame_parms.prach_config_common.prach_ConfigInfo.prach_FreqOffset; + uint8_t preamble_index = ue->prach_resources[eNB_id]->ra_PreambleIndex; + uint8_t tdd_mapindex = ue->prach_resources[eNB_id]->ra_TDD_map_index; + int16_t *prachF = ue->prach_vars[eNB_id]->prachF; + static int16_t prach_tmp[45600*2] __attribute__((aligned(32))); + int16_t *prach = prach_tmp; + int16_t *prach2; + int16_t amp = ue->prach_vars[eNB_id]->amp; + int16_t Ncp; + uint8_t n_ra_prb; + uint16_t NCS; + uint16_t *prach_root_sequence_map; + uint16_t preamble_offset,preamble_shift; + uint16_t preamble_index0,n_shift_ra,n_shift_ra_bar; + uint16_t d_start,numshift; + + uint16_t prach_fmt = get_nr_prach_fmt(prach_ConfigIndex); + //uint8_t Nsp=2; + //uint8_t f_ra,t1_ra; + uint16_t N_ZC = (prach_fmt<4)?839:139; + uint8_t not_found; + int k; + int16_t *Xu; + uint16_t u; + int32_t Xu_re,Xu_im; + uint16_t offset,offset2; + int prach_start; + int i, prach_len; + uint16_t first_nonzero_root_idx=0; + +#if defined(EXMIMO) || defined(OAI_USRP) + prach_start = (ue->rx_offset+subframe*ue->frame_parms.samples_per_tti-ue->hw_timing_advance-ue->N_TA_offset); +#ifdef PRACH_DEBUG + LOG_I(PHY,"[UE %d] prach_start %d, rx_offset %d, hw_timing_advance %d, N_TA_offset %d\n", ue->Mod_id, + prach_start, + ue->rx_offset, + ue->hw_timing_advance, + ue->N_TA_offset); +#endif + + if (prach_start<0) + prach_start+=(ue->frame_parms.samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME); + + if (prach_start>=(ue->frame_parms.samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME)) + prach_start-=(ue->frame_parms.samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME); + +#else //normal case (simulation) + prach_start = subframe*ue->frame_parms.samples_per_tti-ue->N_TA_offset; + LOG_I(PHY,"[UE %d] prach_start %d, rx_offset %d, hw_timing_advance %d, N_TA_offset %d\n", ue->Mod_id, + prach_start, + ue->rx_offset, + ue->hw_timing_advance, + ue->N_TA_offset); + +#endif + + + // First compute physical root sequence + /************************************************************************ + * 4G and NR NCS tables are slightly different and depend on prach format + * Table 6.3.3.1-5: for preamble formats with delta_f_RA = 1.25 Khz (formats 0,1,2) + * Table 6.3.3.1-6: for preamble formats with delta_f_RA = 5 Khz (formats 3) + * NOTE: Restricted set type B is not implemented + *************************************************************************/ + + int restricted_Type = 0; //this is hardcoded ('0' for restricted_TypeA; and '1' for restricted_TypeB). FIXME + if (prach_fmt<3){ + if (restricted_set == 0) { + NCS = NCS_unrestricted_delta_f_RA_125[Ncs_config]; + } else { + if (restricted_Type == 0) NCS = NCS_restricted_TypeA_delta_f_RA_125[Ncs_config]; // for TypeA, this is hardcoded. FIXME + if (restricted_Type == 1) NCS = NCS_restricted_TypeB_delta_f_RA_125[Ncs_config]; // for TypeB, this is hardcoded. FIXME + } + } + if (prach_fmt==3){ + if (restricted_set == 0) { + NCS = NCS_unrestricted_delta_f_RA_5[Ncs_config]; + } else { + if (restricted_Type == 0) NCS = NCS_restricted_TypeA_delta_f_RA_5[Ncs_config]; // for TypeA, this is hardcoded. FIXME + if (restricted_Type == 1) NCS = NCS_restricted_TypeB_delta_f_RA_5[Ncs_config]; // for TypeB, this is hardcoded. FIXME + } + } + if (prach_fmt>3){ + NCS = NCS_unrestricted_delta_f_RA_15[Ncs_config]; + } + + n_ra_prb = ue->frame_parms.prach_config_common.prach_ConfigInfo.prach_FreqOffset; +// n_ra_prb = get_nr_prach_prb_offset(&(ue->frame_parms), +// ue->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex, +// ue->frame_parms.prach_config_common.prach_ConfigInfo.prach_FreqOffset, +// tdd_mapindex, +// Nf, +// prach_fmt); + prach_root_sequence_map = (prach_fmt<4) ? prach_root_sequence_map_0_3 : prach_root_sequence_map_abc; + + /* + // this code is not part of get_prach_prb_offset + if (frame_type == TDD) { // TDD + + if (tdd_preamble_map[prach_ConfigIndex][tdd_config].num_prach==0) { + LOG_E( PHY, "[PHY][UE %"PRIu8"] Illegal prach_ConfigIndex %"PRIu8" for ", ue->Mod_id, prach_ConfigIndex ); + } + + // adjust n_ra_prboffset for frequency multiplexing (p.36 36.211) + f_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[tdd_mapindex].f_ra; + + if (prach_fmt < 4) { + if ((f_ra&1) == 0) { + n_ra_prb = n_ra_prboffset + 6*(f_ra>>1); + } else { + n_ra_prb = ue->frame_parms.N_RB_UL - 6 - n_ra_prboffset + 6*(f_ra>>1); + } + } else { + if ((tdd_config >2) && (tdd_config<6)) + Nsp = 2; + + t1_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t1_ra; + + if ((((Nf&1)*(2-Nsp)+t1_ra)&1) == 0) { + n_ra_prb = 6*f_ra; + } else { + n_ra_prb = ue->frame_parms.N_RB_UL - 6*(f_ra+1); + } + } + } + */ + + // This is the relative offset (for unrestricted case) in the root sequence table (5.7.2-4 from 36.211) for the given preamble index + preamble_offset = ((NCS==0)? preamble_index : (preamble_index/(N_ZC/NCS))); + + if (restricted_set == 0) { + // This is the \nu corresponding to the preamble index + preamble_shift = (NCS==0)? 0 : (preamble_index % (N_ZC/NCS)); + preamble_shift *= NCS; + } else { // This is the high-speed case + +#ifdef PRACH_DEBUG + LOG_I(PHY,"[UE %d] High-speed mode, NCS_config %d\n",ue->Mod_id,Ncs_config); +#endif + + not_found = 1; + preamble_index0 = preamble_index; + // set preamble_offset to initial rootSequenceIndex and look if we need more root sequences for this + // preamble index and find the corresponding cyclic shift + preamble_offset = 0; // relative rootSequenceIndex; + + while (not_found == 1) { + // current root depending on rootSequenceIndex and preamble_offset + int index = (rootSequenceIndex + preamble_offset) % N_ZC; + + if (prach_fmt<4) { + // prach_root_sequence_map points to prach_root_sequence_map0_3 + DevAssert( index < sizeof(prach_root_sequence_map_0_3) / sizeof(prach_root_sequence_map_0_3[0]) ); + } else { + // prach_root_sequence_map points to prach_root_sequence_map4 + DevAssert( index < sizeof(prach_root_sequence_map_abc) / sizeof(prach_root_sequence_map_abc[0]) ); + } + + u = prach_root_sequence_map[index]; + + uint16_t n_group_ra = 0; + + if ( (nr_du[u]<(N_ZC/3)) && (nr_du[u]>=NCS) ) { + n_shift_ra = nr_du[u]/NCS; + d_start = (nr_du[u]<<1) + (n_shift_ra * NCS); + n_group_ra = N_ZC/d_start; + n_shift_ra_bar = max(0,(N_ZC-(nr_du[u]<<1)-(n_group_ra*d_start))/N_ZC); + } else if ( (nr_du[u]>=(N_ZC/3)) && (nr_du[u]<=((N_ZC - NCS)>>1)) ) { + n_shift_ra = (N_ZC - (nr_du[u]<<1))/NCS; + d_start = N_ZC - (nr_du[u]<<1) + (n_shift_ra * NCS); + n_group_ra = nr_du[u]/d_start; + n_shift_ra_bar = min(n_shift_ra,max(0,(nr_du[u]- (n_group_ra*d_start))/NCS)); + } else { + n_shift_ra = 0; + n_shift_ra_bar = 0; + } + + // This is the number of cyclic shifts for the current root u + numshift = (n_shift_ra*n_group_ra) + n_shift_ra_bar; + + if (numshift>0 && preamble_index0==preamble_index) + first_nonzero_root_idx = preamble_offset; + + if (preamble_index0 < numshift) { + not_found = 0; + preamble_shift = (d_start * (preamble_index0/n_shift_ra)) + ((preamble_index0%n_shift_ra)*NCS); + + } else { // skip to next rootSequenceIndex and recompute parameters + preamble_offset++; + preamble_index0 -= numshift; + } + } + } + + // now generate PRACH signal +#ifdef PRACH_DEBUG + + if (NCS>0) + LOG_I(PHY,"Generate PRACH for RootSeqIndex %d, Preamble Index %d, NCS %d (NCS_config %d, N_ZC/NCS %d) n_ra_prb %d: Preamble_offset %d, Preamble_shift %d\n", + rootSequenceIndex,preamble_index,NCS,Ncs_config,N_ZC/NCS,n_ra_prb, + preamble_offset,preamble_shift); + +#endif + + // nsymb = (frame_parms->Ncp==0) ? 14:12; + // subframe_offset = (unsigned int)frame_parms->ofdm_symbol_size*subframe*nsymb; + + k = (12*n_ra_prb) - 6*ue->frame_parms.N_RB_UL; + + if (k<0) + k+=ue->frame_parms.ofdm_symbol_size; + + k*=12; + k+=13; + + Xu = (int16_t*)ue->X_u[preamble_offset-first_nonzero_root_idx]; + + /* + k+=(12*ue->frame_parms.first_carrier_offset); + if (k>(12*ue->frame_parms.ofdm_symbol_size)) + k-=(12*ue->frame_parms.ofdm_symbol_size); + */ + k*=2; + + switch (ue->frame_parms.N_RB_UL) { + case 6: + memset((void*)prachF,0,4*1536); + break; + + case 15: + memset((void*)prachF,0,4*3072); + break; + + case 25: + memset((void*)prachF,0,4*6144); + break; + + case 50: + memset((void*)prachF,0,4*12288); + break; + + case 75: + memset((void*)prachF,0,4*18432); + break; + + case 100: + if (ue->frame_parms.threequarter_fs == 0) + memset((void*)prachF,0,4*24576); + else + memset((void*)prachF,0,4*18432); + break; + + case 106: + memset((void*)prachF,0,4*24576); + break; +} + + /******************************************************** + * + * In function init_prach_tables: + * to compute quantized roots of unity ru(n) = 32767 * exp j*[ (2 * PI * n) / N_ZC ] + * + * In compute_prach_seq: + * to calculate Xu = DFT xu = xu (inv_u*k) * Xu[0] (This is a Zadoff-Chou sequence property: DFT ZC sequence is another ZC sequence) + * + * In generate_prach: + * to do the cyclic-shifted DFT by multiplying Xu[k] * ru[k*preamble_shift] as: + * If X[k] = DFT x(n) -> X_shifted[k] = DFT x(n+preamble_shift) = X[k] * exp -j*[ (2*PI*k*preamble_shift) / N_ZC ] + * + *********************************************************/ + + for (offset=0,offset2=0; offset= N_ZC) + offset2 -= N_ZC; + + Xu_re = (((int32_t)Xu[offset<<1]*amp)>>15); + Xu_im = (((int32_t)Xu[1+(offset<<1)]*amp)>>15); + prachF[k++]= ((Xu_re*nr_ru[offset2<<1]) - (Xu_im*nr_ru[1+(offset2<<1)]))>>15; + prachF[k++]= ((Xu_im*nr_ru[offset2<<1]) + (Xu_re*nr_ru[1+(offset2<<1)]))>>15; + + if (k==(12*2*ue->frame_parms.ofdm_symbol_size)) + k=0; + } + + int mu = 1; // numerology is hardcoded. FIXME!!! + switch (prach_fmt) { + case 0: + Ncp = 3168; + break; + + case 1: + Ncp = 21024; + break; + + case 2: + Ncp = 4688; + break; + + case 3: + Ncp = 3168; + break; + + case 0xa1: + Ncp = 288/(1<frame_parms.N_RB_UL) { + case 6: + Ncp>>=4; + prach+=4; // makes prach2 aligned to 128-bit + break; + + case 15: + Ncp>>=3; + break; + + case 25: + Ncp>>=2; + break; + + case 50: + Ncp>>=1; + break; + + case 75: + Ncp=(Ncp*3)>>2; + break; + } +#endif + if (ue->frame_parms.threequarter_fs == 1) + Ncp=(Ncp*3)>>2; + + prach2 = prach+(Ncp<<1); + + // do IDFT + switch (ue->frame_parms.N_RB_UL) { + case 6: + if (prach_fmt == 4) { + idft256(prachF,prach2,1); + memmove( prach, prach+512, Ncp<<2 ); + prach_len = 256+Ncp; + } else { + idft1536(prachF,prach2,1); + memmove( prach, prach+3072, Ncp<<2 ); + prach_len = 1536+Ncp; + + if (prach_fmt>1) { + memmove( prach2+3072, prach2, 6144 ); + prach_len = 2*1536+Ncp; + } + } + + break; + + case 15: + if (prach_fmt == 4) { + idft512(prachF,prach2,1); + //TODO: account for repeated format in dft output + memmove( prach, prach+1024, Ncp<<2 ); + prach_len = 512+Ncp; + } else { + idft3072(prachF,prach2,1); + memmove( prach, prach+6144, Ncp<<2 ); + prach_len = 3072+Ncp; + + if (prach_fmt>1) { + memmove( prach2+6144, prach2, 12288 ); + prach_len = 2*3072+Ncp; + } + } + + break; + + case 25: + default: + if (prach_fmt == 4) { + idft1024(prachF,prach2,1); + memmove( prach, prach+2048, Ncp<<2 ); + prach_len = 1024+Ncp; + } else { + idft6144(prachF,prach2,1); + /*for (i=0;i<6144*2;i++) + prach2[i]<<=1;*/ + memmove( prach, prach+12288, Ncp<<2 ); + prach_len = 6144+Ncp; + + if (prach_fmt>1) { + memmove( prach2+12288, prach2, 24576 ); + prach_len = 2*6144+Ncp; + } + } + + break; + + case 50: + if (prach_fmt == 4) { + idft2048(prachF,prach2,1); + memmove( prach, prach+4096, Ncp<<2 ); + prach_len = 2048+Ncp; + } else { + idft12288(prachF,prach2,1); + memmove( prach, prach+24576, Ncp<<2 ); + prach_len = 12288+Ncp; + + if (prach_fmt>1) { + memmove( prach2+24576, prach2, 49152 ); + prach_len = 2*12288+Ncp; + } + } + + break; + + case 75: + if (prach_fmt == 4) { + idft3072(prachF,prach2,1); + //TODO: account for repeated format in dft output + memmove( prach, prach+6144, Ncp<<2 ); + prach_len = 3072+Ncp; + } else { + idft18432(prachF,prach2,1); + memmove( prach, prach+36864, Ncp<<2 ); + prach_len = 18432+Ncp; + + if (prach_fmt>1) { + memmove( prach2+36834, prach2, 73728 ); + prach_len = 2*18432+Ncp; + } + } + + break; + + case 100: + if (ue->frame_parms.threequarter_fs == 0) { + if (prach_fmt == 4) { + idft4096(prachF,prach2,1); + memmove( prach, prach+8192, Ncp<<2 ); + prach_len = 4096+Ncp; + } else { + idft24576(prachF,prach2,1); + memmove( prach, prach+49152, Ncp<<2 ); + prach_len = 24576+Ncp; + if (prach_fmt>1) { + memmove( prach2+49152, prach2, 98304 ); + prach_len = 2* 24576+Ncp; + } + } + } + else { + if (prach_fmt == 4) { + idft3072(prachF,prach2,1); + //TODO: account for repeated format in dft output + memmove( prach, prach+6144, Ncp<<2 ); + prach_len = 3072+Ncp; + } else { + idft18432(prachF,prach2,1); + memmove( prach, prach+36864, Ncp<<2 ); + prach_len = 18432+Ncp; + printf("Generated prach for 100 PRB, 3/4 sampling\n"); + if (prach_fmt>1) { + memmove( prach2+36834, prach2, 73728 ); + prach_len = 2*18432+Ncp; + } + } + } + break; + + case 106: + if (prach_fmt == 0) { + idft24576(prachF,prach2,1); + memmove(prach, prach+49152, Ncp<<2); + prach_len = 24576+Ncp; + } + if (prach_fmt == 1) { + idft24576(prachF,prach2,1); + memmove(prach2+49152, prach2, 98304); + memmove(prach, prach+49152, Ncp<<2); + prach_len = 2 * 24576 + Ncp; + } + if (prach_fmt == 2) { + idft24576(prachF,prach2,1); + memmove(prach2+49152, prach2, 98304); + memmove(prach2+98304, prach2, 98304); + memmove(prach, prach+49152, Ncp<<2); + prach_len = 4 * 24576 + Ncp; + } + if (prach_fmt == 3) { + idft6144(prachF,prach2,1); + memmove(prach2+6144, prach2, 12288); + memmove(prach2+12288, prach2, 12288); + memmove(prach, prach+12288, Ncp<<2); + prach_len = 4 * 6144 + Ncp; + } +// For FR2 + if (prach_fmt == 0xa1) { // we consider numderology mu = 1 + idft1024(prachF,prach2,1); + memmove(prach2+2048, prach2, 4096); + memmove(prach, prach+2048, Ncp<<2); + prach_len = 2 * 1024 + Ncp; + } +#if 0 + if (prach_fmt == 0xa2) { + } + if (prach_fmt == 0xa3) { + } + if (prach_fmt == 0xb1) { + } + if (prach_fmt == 0xb2) { + } + if (prach_fmt == 0xb3) { + } + if (prach_fmt == 0xb4) { + } + if (prach_fmt == 0xc0) { + } + if (prach_fmt == 0xc2) { + } +#endif + break; + } + + //LOG_I(PHY,"prach_len=%d\n",prach_len); + +// AssertFatal(prach_fmt<4, +// "prach_fmt4 not fully implemented" ); +#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) + int j; + int overflow = prach_start + prach_len - LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*ue->frame_parms.samples_per_tti; + LOG_I( PHY, "prach_start=%d, overflow=%d\n", prach_start, overflow ); + + for (i=prach_start,j=0; iframe_parms.samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME,prach_start+prach_len); i++,j++) { + ((int16_t*)ue->common_vars.txdata[0])[2*i] = prach[2*j]; + ((int16_t*)ue->common_vars.txdata[0])[2*i+1] = prach[2*j+1]; + } + + for (i=0; icommon_vars.txdata[0])[2*i] = prach[2*j]; + ((int16_t*)ue->common_vars.txdata[0])[2*i+1] = prach[2*j+1]; + } +#if defined(EXMIMO) + // handle switch before 1st TX subframe, guarantee that the slot prior to transmission is switch on + for (k=prach_start - (ue->frame_parms.samples_per_tti>>1) ; kcommon_vars.txdata[0][k+ue->frame_parms.samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME] &= 0xFFFEFFFE; + else if (k>(ue->frame_parms.samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME)) + ue->common_vars.txdata[0][k-ue->frame_parms.samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME] &= 0xFFFEFFFE; + else + ue->common_vars.txdata[0][k] &= 0xFFFEFFFE; + } +#endif +#else + + for (i=0; icommon_vars.txdata[0][prach_start]))[2*i] = prach[2*i]; + ((int16_t*)(&ue->common_vars.txdata[0][prach_start]))[2*i+1] = prach[2*i+1]; + } + +#endif + + + +#if defined(PRACH_WRITE_OUTPUT_DEBUG) + LOG_M("prach_txF0.m","prachtxF0",prachF,prach_len-Ncp,1,1); + LOG_M("prach_tx0.m","prachtx0",prach+(Ncp<<1),prach_len-Ncp,1,1); + LOG_M("txsig.m","txs",(int16_t*)(&ue->common_vars.txdata[0][0]),2*ue->frame_parms.samples_per_tti,1,1); + exit(-1); +#endif + + return signal_energy( (int*)prach, 256 ); +} + diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_prach.h b/openair1/PHY/NR_UE_TRANSPORT/nr_prach.h new file mode 100644 index 0000000000..1e2b758035 --- /dev/null +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_prach.h @@ -0,0 +1,891 @@ +/* + * 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.1 (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/prach_common.c + * \brief Common routines for UE/eNB PRACH physical channel V8.6 2009-03 + * \author Agustin Mico Pereperez + * \date 2018 + * \version 0.1 + * \company + * \email: + * \note + * \warning + */ + +int16_t nr_ru[2*839]; // quantized roots of unity +uint32_t nr_ZC_inv[839]; // multiplicative inverse for roots u +uint16_t nr_du[838]; + +/************************************* +* The following tables defined for NR +**************************************/ +// Table 6.3.3.1-5 (38.211) NCS for preamble formats with delta_f_RA = 1.25 KHz +uint16_t NCS_unrestricted_delta_f_RA_125[16] = {0,13,15,18,22,26,32,38,46,59,76,93,119,167,279,419}; +uint16_t NCS_restricted_TypeA_delta_f_RA_125[15] = {15,18,22,26,32,38,46,55,68,82,100,128,158,202,237}; // high-speed case set Type A +uint16_t NCS_restricted_TypeB_delta_f_RA_125[13] = {15,18,22,26,32,38,46,55,68,82,100,118,137}; // high-speed case set Type B + +// Table 6.3.3.1-6 (38.211) NCS for preamble formats with delta_f_RA = 5 KHz +uint16_t NCS_unrestricted_delta_f_RA_5[16] = {0,13,26,33,38,41,49,55,64,76,93,119,139,209,279,419}; +uint16_t NCS_restricted_TypeA_delta_f_RA_5[16] = {36,57,72,81,89,94,103,112,121,132,137,152,173,195,216,237}; // high-speed case set Type A +uint16_t NCS_restricted_TypeB_delta_f_RA_5[14] = {36,57,60,63,65,68,71,77,81,85,97,109,122,137}; // high-speed case set Type B + +// Table 6.3.3.1-7 (38.211) NCS for preamble formats with delta_f_RA = 15 * 2mu KHz where mu = {0,1,2,3} +uint16_t NCS_unrestricted_delta_f_RA_15[16] = {0,2,4,6,8,10,12,13,15,17,19,23,27,34,46,69}; + +//Table 6.3.3.1-3: Mapping from logical index i to sequence number u for preamble formats with L_RA = 839 +uint16_t prach_root_sequence_map_0_3[838] = { +129, 710, 140, 699, 120, 719, 210, 629, 168, 671, 84 , 755, 105, 734, 93 , 746, 70 , 769, 60 , 779, +2 , 837, 1 , 838, 56 , 783, 112, 727, 148, 691, 80 , 759, 42 , 797, 40 , 799, 35 , 804, 73 , 766, +146, 693, 31 , 808, 28 , 811, 30 , 809, 27 , 812, 29 , 810, 24 , 815, 48 , 791, 68 , 771, 74 , 765, +178, 661, 136, 703, 86 , 753, 78 , 761, 43 , 796, 39 , 800, 20 , 819, 21 , 818, 95 , 744, 202, 637, +190, 649, 181, 658, 137, 702, 125, 714, 151, 688, 217, 622, 128, 711, 142, 697, 122, 717, 203, 636, +118, 721, 110, 729, 89 , 750, 103, 736, 61 , 778, 55 , 784, 15 , 824, 14 , 825, 12 , 827, 23 , 816, +34 , 805, 37 , 802, 46 , 793, 207, 632, 179, 660, 145, 694, 130, 709, 223, 616, 228, 611, 227, 612, +132, 707, 133, 706, 143, 696, 135, 704, 161, 678, 201, 638, 173, 666, 106, 733, 83 , 756, 91 , 748, +66 , 773, 53 , 786, 10 , 829, 9 , 830, 7 , 832, 8 , 831, 16 , 823, 47 , 792, 64 , 775, 57 , 782, +104, 735, 101, 738, 108, 731, 208, 631, 184, 655, 197, 642, 191, 648, 121, 718, 141, 698, 149, 690, +216, 623, 218, 621, 152, 687, 144, 695, 134, 705, 138, 701, 199, 640, 162, 677, 176, 663, 119, 720, +158, 681, 164, 675, 174, 665, 171, 668, 170, 669, 87 , 752, 169, 670, 88 , 751, 107, 732, 81 , 758, +82 , 757, 100, 739, 98 , 741, 71 , 768, 59 , 780, 65 , 774, 50 , 789, 49 , 790, 26 , 813, 17 , 822, +13 , 826, 6 , 833, 5 , 834, 33 , 806, 51 , 788, 75 , 764, 99 , 740, 96 , 743, 97 , 742, 166, 673, +172, 667, 175, 664, 187, 652, 163, 676, 185, 654, 200, 639, 114, 725, 189, 650, 115, 724, 194, 645, +195, 644, 192, 647, 182, 657, 157, 682, 156, 683, 211, 628, 154, 685, 123, 716, 139, 700, 212, 627, +153, 686, 213, 626, 215, 624, 150, 689, 225, 614, 224, 615, 221, 618, 220, 619, 127, 712, 147, 692, +124, 715, 193, 646, 205, 634, 206, 633, 116, 723, 160, 679, 186, 653, 167, 672, 79 , 760, 85 , 754, +77 , 762, 92 , 747, 58 , 781, 62 , 777, 69 , 770, 54 , 785, 36 , 803, 32 , 807, 25 , 814, 18 , 821, +11 , 828, 4 , 835, 3 , 836, 19 , 820, 22 , 817, 41 , 798, 38 , 801, 44 , 795, 52 , 787, 45 , 794, +63 , 776, 67 , 772, 72 , 767, 76 , 763, 94 , 745, 102, 737, 90 , 749, 109, 730, 165, 674, 111, 728, +209, 630, 204, 635, 117, 722, 188, 651, 159, 680, 198, 641, 113, 726, 183, 656, 180, 659, 177, 662, +196, 643, 155, 684, 214, 625, 126, 713, 131, 708, 219, 620, 222, 617, 226, 613, 230, 609, 232, 607, +262, 577, 252, 587, 418, 421, 416, 423, 413, 426, 411, 428, 376, 463, 395, 444, 283, 556, 285, 554, +379, 460, 390, 449, 363, 476, 384, 455, 388, 451, 386, 453, 361, 478, 387, 452, 360, 479, 310, 529, +354, 485, 328, 511, 315, 524, 337, 502, 349, 490, 335, 504, 324, 515, 323, 516, 320, 519, 334, 505, +359, 480, 295, 544, 385, 454, 292, 547, 291, 548, 381, 458, 399, 440, 380, 459, 397, 442, 369, 470, +377, 462, 410, 429, 407, 432, 281, 558, 414, 425, 247, 592, 277, 562, 271, 568, 272, 567, 264, 575, +259, 580, 237, 602, 239, 600, 244, 595, 243, 596, 275, 564, 278, 561, 250, 589, 246, 593, 417, 422, +248, 591, 394, 445, 393, 446, 370, 469, 365, 474, 300, 539, 299, 540, 364, 475, 362, 477, 298, 541, +312, 527, 313, 526, 314, 525, 353, 486, 352, 487, 343, 496, 327, 512, 350, 489, 326, 513, 319, 520, +332, 507, 333, 506, 348, 491, 347, 492, 322, 517, 330, 509, 338, 501, 341, 498, 340, 499, 342, 497, +301, 538, 366, 473, 401, 438, 371, 468, 408, 431, 375, 464, 249, 590, 269, 570, 238, 601, 234, 605, +257, 582, 273, 566, 255, 584, 254, 585, 245, 594, 251, 588, 412, 427, 372, 467, 282, 557, 403, 436, +396, 443, 392, 447, 391, 448, 382, 457, 389, 450, 294, 545, 297, 542, 311, 528, 344, 495, 345, 494, +318, 521, 331, 508, 325, 514, 321, 518, 346, 493, 339, 500, 351, 488, 306, 533, 289, 550, 400, 439, +378, 461, 374, 465, 415, 424, 270, 569, 241, 598, 231, 608, 260, 579, 268, 571, 276, 563, 409, 430, +398, 441, 290, 549, 304, 535, 308, 531, 358, 481, 316, 523, 293, 546, 288, 551, 284, 555, 368, 471, +253, 586, 256, 583, 263, 576, 242, 597, 274, 565, 402, 437, 383, 456, 357, 482, 329, 510, 317, 522, +307, 532, 286, 553, 287, 552, 266, 573, 261, 578, 236, 603, 303, 536, 356, 483, 355, 484, 405, 434, +404, 435, 406, 433, 235, 604, 267, 572, 302, 537, 309, 530, 265, 574, 233, 606, 367, 472, 296, 543, +336, 503, 305, 534, 373, 466, 280, 559, 279, 560, 419, 420, 240, 599, 258, 581, 229, 610 +}; +// Table 6.3.3.1-4: Mapping from logical index i to sequence number u for preamble formats with L_RA = 139 +uint16_t prach_root_sequence_map_abc[138] = { +1 , 138, 2 , 137, 3 , 136, 4 , 135, 5 , 134, 6 , 133, 7 , 132, 8 , 131, 9 , 130, 10, 129, +11, 128, 12, 127, 13, 126, 14, 125, 15, 124, 16, 123, 17, 122, 18, 121, 19, 120, 20, 119, +21, 118, 22, 117, 23, 116, 24, 115, 25, 114, 26, 113, 27, 112, 28, 111, 29, 110, 30, 109, +31, 108, 32, 107, 33, 106, 34, 105, 35, 104, 36, 103, 37, 102, 38, 101, 39, 100, 40, 99 , +41, 98 , 42, 97 , 43, 96 , 44, 95 , 45, 94 , 46, 93 , 47, 92 , 48, 91 , 49, 90 , 50, 89 , +51, 88 , 52, 87 , 53, 86 , 54, 85 , 55, 84 , 56, 83 , 57, 82 , 58, 81 , 59, 80 , 60, 79 , +61, 78 , 62, 77 , 63, 76 , 64, 75 , 65, 74 , 66, 73 , 67, 72 , 68, 71 , 69, 70 +}; + +// Table 6.3.3.2-2: Random access configurations for FR1 and paired spectrum/supplementary uplink +// the column 5, (SFN_nbr is a bitmap where we set bit to '1' in the position of the subframe where the RACH can be sent. +// E.g. in row 4, and column 5 we have set value 512 ('1000000000') which means RACH can be sent at subframe 9. +// E.g. in row 20 and column 5 we have set value 66 ('0001000010') which means RACH can be sent at subframe 1 or 6 +int64_t table_6_3_3_2_2_prachConfig_Index [256][9] = { +//format, format, x, y, SFN_nbr, star_symb, slots_sfn, occ_slot, duration +{0, -1, 16, 1, 2, 0, -1, -1, 0}, // (subframe number) 1 +{0, -1, 16, 1, 16, 0, -1, -1, 0}, // (subframe number) 4 +{0, -1, 16, 1, 128, 0, -1, -1, 0}, // (subframe number) 7 +{0, -1, 16, 1, 512, 0, -1, -1, 0}, // (subframe number) 9 +{0, -1, 8, 1, 2, 0, -1, -1, 0}, // (subframe number) 1 +{0, -1, 8, 1, 16, 0, -1, -1, 0}, // (subframe number) 4 +{0, -1, 8, 1, 128, 0, -1, -1, 0}, // (subframe number) 7 +{0, -1, 8, 1, 512, 0, -1, -1, 0}, // (subframe number) 9 +{0, -1, 4, 1, 2, 0, -1, -1, 0}, // (subframe number) 1 +{0, -1, 4, 1, 16, 0, -1, -1, 0}, // (subframe number) 4 +{0, -1, 4, 1, 128, 0, -1, -1, 0}, // (subframe number) 7 +{0, -1, 4, 1, 512, 0, -1, -1, 0}, // (subframe number) 9 +{0, -1, 2, 1, 2, 0, -1, -1, 0}, // (subframe number) 1 +{0, -1, 2, 1, 16, 0, -1, -1, 0}, // (subframe number) 4 +{0, -1, 2, 1, 128, 0, -1, -1, 0}, // (subframe number) 7 +{0, -1, 2, 1, 512, 0, -1, -1, 0}, // (subframe number) 9 +{0, -1, 1, 0, 2, 0, -1, -1, 0}, // (subframe number) 1 +{0, -1, 1, 0, 16, 0, -1, -1, 0}, // (subframe number) 4 +{0, -1, 1, 0, 128, 0, -1, -1, 0}, // (subframe number) 7 +{0, -1, 1, 0, 66, 0, -1, -1, 0}, // (subframe number) 1,6 +{0, -1, 1, 0, 132, 0, -1, -1, 0}, // (subframe number) 2,7 +{0, -1, 1, 0, 264, 0, -1, -1, 0}, // (subframe number) 3,8 +{0, -1, 1, 0, 146, 0, -1, -1, 0}, // (subframe number) 1,4,7 +{0, -1, 1, 0, 292, 0, -1, -1, 0}, // (subframe number) 2,5,8 +{0, -1, 1, 0, 584, 0, -1, -1, 0}, // (subframe number) 3, 6, 9 +{0, -1, 1, 0, 341, 0, -1, -1, 0}, // (subframe number) 0,2,4,6,8 +{0, -1, 1, 0, 682, 0, -1, -1, 0}, // (subframe number) 1,3,5,7,9 +{0, -1, 1, 0, 1023, 0, -1, -1, 0}, // (subframe number) 0,1,2,3,4,5,6,7,8,9 +{1, -1, 16, 1, 2, 0, -1, -1, 0}, // (subframe number) 1 +{1, -1, 16, 1, 16, 0, -1, -1, 0}, // (subframe number) 4 +{1, -1, 16, 1, 128, 0, -1, -1, 0}, // (subframe number) 7 +{1, -1, 16, 1, 512, 0, -1, -1, 0}, // (subframe number) 9 +{1, -1, 8, 1, 2, 0, -1, -1, 0}, // (subframe number) 1 +{1, -1, 8, 1, 16, 0, -1, -1, 0}, // (subframe number) 4 +{1, -1, 8, 1, 128, 0, -1, -1, 0}, // (subframe number) 7 +{1, -1, 8, 1, 512, 0, -1, -1, 0}, // (subframe number) 9 +{1, -1, 4, 1, 2, 0, -1, -1, 0}, // (subframe number) 1 +{1, -1, 4, 1, 16, 0, -1, -1, 0}, // (subframe number) 4 +{1, -1, 4, 1, 128, 0, -1, -1, 0}, // (subframe number) 7 +{1, -1, 4, 1, 512, 0, -1, -1, 0}, // (subframe number) 9 +{1, -1, 2, 1, 2, 0, -1, -1, 0}, // (subframe number) 1 +{1, -1, 2, 1, 16, 0, -1, -1, 0}, // (subframe number) 4 +{1, -1, 2, 1, 128, 0, -1, -1, 0}, // (subframe number) 7 +{1, -1, 2, 1, 512, 0, -1, -1, 0}, // (subframe number) 9 +{1, -1, 1, 0, 2, 0, -1, -1, 0}, // (subframe number) 1 +{1, -1, 1, 0, 16, 0, -1, -1, 0}, // (subframe number) 4 +{1, -1, 1, 0, 128, 0, -1, -1, 0}, // (subframe number) 7 +{1, -1, 1, 0, 66, 0, -1, -1, 0}, // (subframe number) 1,6 +{1, -1, 1, 0, 132, 0, -1, -1, 0}, // (subframe number) 2,7 +{1, -1, 1, 0, 264, 0, -1, -1, 0}, // (subframe number) 3,8 +{1, -1, 1, 0, 146, 0, -1, -1, 0}, // (subframe number) 1,4,7 +{1, -1, 1, 0, 292, 0, -1, -1, 0}, // (subframe number) 2,5,8 +{1, -1, 1, 0, 584, 0, -1, -1, 0}, // (subframe number) 3,6,9 +{2, -1, 16, 1, 2, 0, -1, -1, 0}, // (subframe number) 1 +{2, -1, 8, 1, 2, 0, -1, -1, 0}, // (subframe number) 1 +{2, -1, 4, 0, 2, 0, -1, -1, 0}, // (subframe number) 1 +{2, -1, 2, 0, 2, 0, -1, -1, 0}, // (subframe number) 1 +{2, -1, 2, 0, 32, 0, -1, -1, 0}, // (subframe number) 5 +{2, -1, 1, 0, 2, 0, -1, -1, 0}, // (subframe number) 1 +{2, -1, 1, 0, 32, 0, -1, -1, 0}, // (subframe number) 5 +{3, -1, 16, 1, 2, 0, -1, -1, 0}, // (subframe number) 1 +{3, -1, 16, 1, 16, 0, -1, -1, 0}, // (subframe number) 4 +{3, -1, 16, 1, 128, 0, -1, -1, 0}, // (subframe number) 7 +{3, -1, 16, 1, 512, 0, -1, -1, 0}, // (subframe number) 9 +{3, -1, 8, 1, 2, 0, -1, -1, 0}, // (subframe number) 1 +{3, -1, 8, 1, 16, 0, -1, -1, 0}, // (subframe number) 4 +{3, -1, 8, 1, 128, 0, -1, -1, 0}, // (subframe number) 7 +{3, -1, 4, 1, 2, 0, -1, -1, 0}, // (subframe number) 1 +{3, -1, 4, 1, 16, 0, -1, -1, 0}, // (subframe number) 4 +{3, -1, 4, 1, 128, 0, -1, -1, 0}, // (subframe number) 7 +{3, -1, 4, 1, 512, 0, -1, -1, 0}, // (subframe number) 9 +{3, -1, 2, 1, 2, 0, -1, -1, 0}, // (subframe number) 1 +{3, -1, 2, 1, 16, 0, -1, -1, 0}, // (subframe number) 4 +{3, -1, 2, 1, 128, 0, -1, -1, 0}, // (subframe number) 7 +{3, -1, 2, 1, 512, 0, -1, -1, 0}, // (subframe number) 9 +{3, -1, 1, 0, 2, 0, -1, -1, 0}, // (subframe number) 1 +{3, -1, 1, 0, 16, 0, -1, -1, 0}, // (subframe number) 4 +{3, -1, 1, 0, 128, 0, -1, -1, 0}, // (subframe number) 7 +{3, -1, 1, 0, 66, 0, -1, -1, 0}, // (subframe number) 1,6 +{3, -1, 1, 0, 132, 0, -1, -1, 0}, // (subframe number) 2,7 +{3, -1, 1, 0, 264, 0, -1, -1, 0}, // (subframe number) 3,8 +{3, -1, 1, 0, 146, 0, -1, -1, 0}, // (subframe number) 1,4,7 +{3, -1, 1, 0, 292, 0, -1, -1, 0}, // (subframe number) 2,5,8 +{3, -1, 1, 0, 584, 0, -1, -1, 0}, // (subframe number) 3, 6, 9 +{3, -1, 1, 0, 341, 0, -1, -1, 0}, // (subframe number) 0,2,4,6,8 +{3, -1, 1, 0, 682, 0, -1, -1, 0}, // (subframe number) 1,3,5,7,9 +{3, -1, 1, 0, 1023, 0, -1, -1, 0}, // (subframe number) 0,1,2,3,4,5,6,7,8,9 +{0xa1, -1, 16, 0, 528, 0, 1, 6, 2}, // (subframe number) 4,9 +{0xa1, -1, 16, 1, 16, 0, 2, 6, 2}, // (subframe number) 4 +{0xa1, -1, 8, 0, 528, 0, 1, 6, 2}, // (subframe number) 4,9 +{0xa1, -1, 8, 1, 16, 0, 2, 6, 2}, // (subframe number) 4 +{0xa1, -1, 4, 0, 528, 0, 1, 6, 2}, // (subframe number) 4,9 +{0xa1, -1, 4, 1, 528, 0, 1, 6, 2}, // (subframe number) 4,9 +{0xa1, -1, 4, 0, 16, 0, 2, 6, 2}, // (subframe number) 4 +{0xa1, -1, 2, 0, 528, 0, 1, 6, 2}, // (subframe number) 4,9 +{0xa1, -1, 2, 0, 2, 0, 2, 6, 2}, // (subframe number) 1 +{0xa1, -1, 2, 0, 16, 0, 2, 6, 2}, // (subframe number) 4 +{0xa1, -1, 2, 0, 128, 0, 2, 6, 2}, // (subframe number) 7 +{0xa1, -1, 1, 0, 16, 0, 1, 6, 2}, // (subframe number) 4 +{0xa1, -1, 1, 0, 66, 0, 1, 6, 2}, // (subframe number) 1,6 +{0xa1, -1, 1, 0, 528, 0, 1, 6, 2}, // (subframe number) 4,9 +{0xa1, -1, 1, 0, 2, 0, 2, 6, 2}, // (subframe number) 1 +{0xa1, -1, 1, 0, 128, 0, 2, 6, 2}, // (subframe number) 7 +{0xa1, -1, 1, 0, 132, 0, 2, 6, 2}, // (subframe number) 2,7 +{0xa1, -1, 1, 0, 146, 0, 2, 6, 2}, // (subframe number) 1,4,7 +{0xa1, -1, 1, 0, 341, 0, 2, 6, 2}, // (subframe number) 0,2,4,6,8 +{0xa1, -1, 1, 0, 1023, 0, 2, 6, 2}, // (subframe number) 0,1,2,3,4,5,6,7,8,9 +{0xa1, -1, 1, 0, 682, 0, 2, 6, 2}, // (subframe number) 1,3,5,7,9 +{0xa1, 0xb1, 2, 0, 528, 0, 1, 7, 2}, // (subframe number) 4,9 +{0xa1, 0xb1, 2, 0, 16, 0, 2, 7, 2}, // (subframe number) 4 +{0xa1, 0xb1, 1, 0, 16, 0, 1, 7, 2}, // (subframe number) 4 +{0xa1, 0xb1, 1, 0, 66, 0, 1, 7, 2}, // (subframe number) 1,6 +{0xa1, 0xb1, 1, 0, 528, 0, 1, 7, 2}, // (subframe number) 4,9 +{0xa1, 0xb1, 1, 0, 2, 0, 2, 7, 2}, // (subframe number) 1 +{0xa1, 0xb1, 1, 0, 128, 0, 2, 7, 2}, // (subframe number) 7 +{0xa1, 0xb1, 1, 0, 146, 0, 2, 7, 2}, // (subframe number) 1,4,7 +{0xa1, 0xb1, 1, 0, 341, 0, 2, 7, 2}, // (subframe number) 0,2,4,6,8 +{0xa2, -1, 16, 1, 580, 0, 1, 3, 4}, // (subframe number) 2,6,9 +{0xa2, -1, 16, 1, 16, 0, 2, 3, 4}, // (subframe number) 4 +{0xa2, -1, 8, 1, 580, 0, 1, 3, 4}, // (subframe number) 2,6,9 +{0xa2, -1, 8, 1, 16, 0, 2, 3, 4}, // (subframe number) 4 +{0xa2, -1, 4, 0, 580, 0, 1, 3, 4}, // (subframe number) 2,6,9 +{0xa2, -1, 4, 0, 16, 0, 2, 3, 4}, // (subframe number) 4 +{0xa2, -1, 2, 1, 580, 0, 1, 3, 4}, // (subframe number) 2,6,9 +{0xa2, -1, 2, 0, 2, 0, 2, 3, 4}, // (subframe number) 1 +{0xa2, -1, 2, 0, 16, 0, 2, 3, 4}, // (subframe number) 4 +{0xa2, -1, 2, 0, 128, 0, 2, 3, 4}, // (subframe number) 7 +{0xa2, -1, 1, 0, 16, 0, 1, 3, 4}, // (subframe number) 4 +{0xa2, -1, 1, 0, 66, 0, 1, 3, 4}, // (subframe number) 1,6 +{0xa2, -1, 1, 0, 528, 0, 1, 3, 4}, // (subframe number) 4,9 +{0xa2, -1, 1, 0, 2, 0, 2, 3, 4}, // (subframe number) 1 +{0xa2, -1, 1, 0, 128, 0, 2, 3, 4}, // (subframe number) 7 +{0xa2, -1, 1, 0, 132, 0, 2, 3, 4}, // (subframe number) 2,7 +{0xa2, -1, 1, 0, 146, 0, 2, 3, 4}, // (subframe number) 1,4,7 +{0xa2, -1, 1, 0, 341, 0, 2, 3, 4}, // (subframe number) 0,2,4,6,8 +{0xa2, -1, 1, 0, 1023, 0, 2, 3, 4}, // (subframe number) 0,1,2,3,4,5,6,7,8,9 +{0xa2, -1, 1, 0, 682, 0, 2, 3, 4}, // (subframe number) 1,3,5,7,9 +{0xa2, 0xb2, 2, 1, 580, 0, 1, 3, 4}, // (subframe number) 2,6,9 +{0xa2, 0xb2, 2, 0, 16, 0, 2, 3, 4}, // (subframe number) 4 +{0xa2, 0xb2, 1, 0, 16, 0, 1, 3, 4}, // (subframe number) 4 +{0xa2, 0xb2, 1, 0, 66, 0, 1, 3, 4}, // (subframe number) 1,6 +{0xa2, 0xb2, 1, 0, 528, 0, 1, 3, 4}, // (subframe number) 4,9 +{0xa2, 0xb2, 1, 0, 2, 0, 2, 3, 4}, // (subframe number) 1 +{0xa2, 0xb2, 1, 0, 128, 0, 2, 3, 4}, // (subframe number) 7 +{0xa2, 0xb2, 1, 0, 146, 0, 2, 3, 4}, // (subframe number) 1,4,7 +{0xa2, 0xb2, 1, 0, 341, 0, 2, 3, 4}, // (subframe number) 0,2,4,6,8 +{0xa2, 0xb2, 1, 0, 1023, 0, 2, 3, 4}, // (subframe number) 0,1,2,3,4,5,6,7,8,9 +{0xa3, -1, 16, 1, 528, 0, 1, 2, 6}, // (subframe number) 4,9 +{0xa3, -1, 16, 1, 16, 0, 2, 2, 6}, // (subframe number) 4 +{0xa3, -1, 8, 1, 528, 0, 1, 2, 6}, // (subframe number) 4,9 +{0xa3, -1, 8, 1, 16, 0, 2, 2, 6}, // (subframe number) 4 +{0xa3, -1, 4, 0, 528, 0, 1, 2, 6}, // (subframe number) 4,9 +{0xa3, -1, 4, 0, 16, 0, 2, 2, 6}, // (subframe number) 4 +{0xa3, -1, 2, 1, 580, 0, 2, 2, 6}, // (subframe number) 2,6,9 +{0xa3, -1, 2, 0, 2, 0, 2, 2, 6}, // (subframe number) 1 +{0xa3, -1, 2, 0, 16, 0, 2, 2, 6}, // (subframe number) 4 +{0xa3, -1, 2, 0, 128, 0, 2, 2, 6}, // (subframe number) 7 +{0xa3, -1, 1, 0, 16, 0, 1, 2, 6}, // (subframe number) 4 +{0xa3, -1, 1, 0, 66, 0, 1, 2, 6}, // (subframe number) 1,6 +{0xa3, -1, 1, 0, 528, 0, 1, 2, 6}, // (subframe number) 4,9 +{0xa3, -1, 1, 0, 2, 0, 2, 2, 6}, // (subframe number) 1 +{0xa3, -1, 1, 0, 128, 0, 2, 2, 6}, // (subframe number) 7 +{0xa3, -1, 1, 0, 132, 0, 2, 2, 6}, // (subframe number) 2,7 +{0xa3, -1, 1, 0, 146, 0, 2, 2, 6}, // (subframe number) 1,4,7 +{0xa3, -1, 1, 0, 341, 0, 2, 2, 6}, // (subframe number) 0,2,4,6,8 +{0xa3, -1, 1, 0, 1023, 0, 2, 2, 6}, // (subframe number) 0,1,2,3,4,5,6,7,8,9 +{0xa3, -1, 1, 0, 682, 0, 2, 2, 6}, // (subframe number) 1,3,5,7,9 +{0xa3, 0xb3, 2, 1, 580, 0, 2, 2, 6}, // (subframe number) 2,6,9 +{0xa3, 0xb3, 2, 0, 16, 0, 2, 2, 6}, // (subframe number) 4 +{0xa3, 0xb3, 1, 0, 16, 0, 1, 2, 6}, // (subframe number) 4 +{0xa3, 0xb3, 1, 0, 66, 0, 1, 2, 6}, // (subframe number) 1,6 +{0xa3, 0xb3, 1, 0, 528, 0, 1, 2, 6}, // (subframe number) 4,9 +{0xa3, 0xb3, 1, 0, 2, 0, 2, 2, 6}, // (subframe number) 1 +{0xa3, 0xb3, 1, 0, 128, 0, 2, 2, 6}, // (subframe number) 7 +{0xa3, 0xb3, 1, 0, 146, 0, 2, 2, 6}, // (subframe number) 1,4,7 +{0xa3, 0xb3, 1, 0, 341, 0, 2, 2, 6}, // (subframe number) 0,2,4,6,8 +{0xa3, 0xb3, 1, 0, 1023, 0, 2, 2, 6}, // (subframe number) 0,1,2,3,4,5,6,7,8,9 +{0xb1, -1, 16, 0, 528, 0, 1, 7, 2}, // (subframe number) 4,9 +{0xb1, -1, 16, 1, 16, 0, 2, 7, 2}, // (subframe number) 4 +{0xb1, -1, 8, 0, 528, 0, 1, 7, 2}, // (subframe number) 4,9 +{0xb1, -1, 8, 1, 16, 0, 2, 7, 2}, // (subframe number) 4 +{0xb1, -1, 4, 0, 528, 0, 1, 7, 2}, // (subframe number) 4,9 +{0xb1, -1, 4, 1, 528, 0, 1, 7, 2}, // (subframe number) 4,9 +{0xb1, -1, 4, 0, 16, 0, 2, 7, 2}, // (subframe number) 4 +{0xb1, -1, 2, 0, 528, 0, 1, 7, 2}, // (subframe number) 4,9 +{0xb1, -1, 2, 0, 2, 0, 2, 7, 2}, // (subframe number) 1 +{0xb1, -1, 2, 0, 16, 0, 2, 7, 2}, // (subframe number) 4 +{0xb1, -1, 2, 0, 128, 0, 2, 7, 2}, // (subframe number) 7 +{0xb1, -1, 1, 0, 16, 0, 1, 7, 2}, // (subframe number) 4 +{0xb1, -1, 1, 0, 66, 0, 1, 7, 2}, // (subframe number) 1,6 +{0xb1, -1, 1, 0, 528, 0, 1, 7, 2}, // (subframe number) 4,9 +{0xb1, -1, 1, 0, 2, 0, 2, 7, 2}, // (subframe number) 1 +{0xb1, -1, 1, 0, 128, 0, 2, 7, 2}, // (subframe number) 7 +{0xb1, -1, 1, 0, 132, 0, 2, 7, 2}, // (subframe number) 2,7 +{0xb1, -1, 1, 0, 146, 0, 2, 7, 2}, // (subframe number) 1,4,7 +{0xb1, -1, 1, 0, 341, 0, 2, 7, 2}, // (subframe number) 0,2,4,6,8 +{0xb1, -1, 1, 0, 1023, 0, 2, 7, 2}, // (subframe number) 0,1,2,3,4,5,6,7,8,9 +{0xb1, -1, 1, 0, 682, 0, 2, 7, 2}, // (subframe number) 1,3,5,7,9 +{0xb4, -1, 16, 0, 528, 0, 2, 1, 12}, // (subframe number) 4,9 +{0xb4, -1, 16, 1, 16, 0, 2, 1, 12}, // (subframe number) 4 +{0xb4, -1, 8, 0, 528, 0, 2, 1, 12}, // (subframe number) 4,9 +{0xb4, -1, 8, 1, 16, 0, 2, 1, 12}, // (subframe number) 4 +{0xb4, -1, 4, 0, 528, 0, 2, 1, 12}, // (subframe number) 4,9 +{0xb4, -1, 4, 0, 16, 0, 2, 1, 12}, // (subframe number) 4 +{0xb4, -1, 4, 1, 528, 0, 2, 1, 12}, // (subframe number) 4,9 +{0xb4, -1, 2, 0, 528, 0, 2, 1, 12}, // (subframe number) 4,9 +{0xb4, -1, 2, 0, 2, 0, 2, 1, 12}, // (subframe number) 1 +{0xb4, -1, 2, 0, 16, 0, 2, 1, 12}, // (subframe number) 4 +{0xb4, -1, 2, 0, 128, 0, 2, 1, 12}, // (subframe number) 7 +{0xb4, -1, 1, 0, 2, 0, 2, 1, 12}, // (subframe number) 1 +{0xb4, -1, 1, 0, 16, 0, 2, 1, 12}, // (subframe number) 4 +{0xb4, -1, 1, 0, 128, 0, 2, 1, 12}, // (subframe number) 7 +{0xb4, -1, 1, 0, 66, 0, 2, 1, 12}, // (subframe number) 1,6 +{0xb4, -1, 1, 0, 132, 0, 2, 1, 12}, // (subframe number) 2,7 +{0xb4, -1, 1, 0, 528, 0, 2, 1, 12}, // (subframe number) 4,9 +{0xb4, -1, 1, 0, 146, 0, 2, 1, 12}, // (subframe number) 1,4,7 +{0xb4, -1, 1, 0, 341, 0, 2, 1, 12}, // (subframe number) 0,2,4,6,8 +{0xb4, -1, 1, 0, 1023, 0, 2, 1, 12}, // (subframe number) 0,1,2,3,4,5,6,7,8,9 +{0xb4, -1, 1, 0, 682, 0, 2, 1, 12}, // (subframe number) 1,3,5,7,9 +{0xc0, -1, 8, 1, 16, 0, 2, 7, 2}, // (subframe number) 4 +{0xc0, -1, 4, 1, 528, 0, 1, 7, 2}, // (subframe number) 4,9 +{0xc0, -1, 4, 0, 16, 0, 2, 7, 2}, // (subframe number) 4 +{0xc0, -1, 2, 0, 528, 0, 1, 7, 2}, // (subframe number) 4,9 +{0xc0, -1, 2, 0, 2, 0, 2, 7, 2}, // (subframe number) 1 +{0xc0, -1, 2, 0, 16, 0, 2, 7, 2}, // (subframe number) 4 +{0xc0, -1, 2, 0, 128, 0, 2, 7, 2}, // (subframe number) 7 +{0xc0, -1, 1, 0, 16, 0, 1, 7, 2}, // (subframe number) 4 +{0xc0, -1, 1, 0, 66, 0, 1, 7, 2}, // (subframe number) 1,6 +{0xc0, -1, 1, 0, 528, 0, 1, 7, 2}, // (subframe number) 4,9 +{0xc0, -1, 1, 0, 2, 0, 2, 7, 2}, // (subframe number) 1 +{0xc0, -1, 1, 0, 128, 0, 2, 7, 2}, // (subframe number) 7 +{0xc0, -1, 1, 0, 132, 0, 2, 7, 2}, // (subframe number) 2,7 +{0xc0, -1, 1, 0, 146, 0, 2, 7, 2}, // (subframe number) 1,4,7 +{0xc0, -1, 1, 0, 341, 0, 2, 7, 2}, // (subframe number) 0,2,4,6,8 +{0xc0, -1, 1, 0, 1023, 0, 2, 7, 2}, // (subframe number) 0,1,2,3,4,5,6,7,8,9 +{0xc0, -1, 1, 0, 682, 0, 2, 7, 2}, // (subframe number) 1,3,5,7,9 +{0xc2, -1, 16, 1, 528, 0, 1, 2, 6}, // (subframe number) 4,9 +{0xc2, -1, 16, 1, 16, 0, 2, 2, 6}, // (subframe number) 4 +{0xc2, -1, 8, 1, 528, 0, 1, 2, 6}, // (subframe number) 4,9 +{0xc2, -1, 8, 1, 16, 0, 2, 2, 6}, // (subframe number) 4 +{0xc2, -1, 4, 0, 528, 0, 1, 2, 6}, // (subframe number) 4,9 +{0xc2, -1, 4, 0, 16, 0, 2, 2, 6}, // (subframe number) 4 +{0xc2, -1, 2, 1, 580, 0, 2, 2, 6}, // (subframe number) 2,6,9 +{0xc2, -1, 2, 0, 2, 0, 2, 2, 6}, // (subframe number) 1 +{0xc2, -1, 2, 0, 16, 0, 2, 2, 6}, // (subframe number) 4 +{0xc2, -1, 2, 0, 128, 0, 2, 2, 6}, // (subframe number) 7 +{0xc2, -1, 1, 0, 16, 0, 1, 2, 6}, // (subframe number) 4 +{0xc2, -1, 1, 0, 66, 0, 1, 2, 6}, // (subframe number) 1,6 +{0xc2, -1, 1, 0, 528, 0, 1, 2, 6}, // (subframe number) 4,9 +{0xc2, -1, 1, 0, 2, 0, 2, 2, 6}, // (subframe number) 1 +{0xc2, -1, 1, 0, 128, 0, 2, 2, 6}, // (subframe number) 7 +{0xc2, -1, 1, 0, 132, 0, 2, 2, 6}, // (subframe number) 2,7 +{0xc2, -1, 1, 0, 146, 0, 2, 2, 6}, // (subframe number) 1,4,7 +{0xc2, -1, 1, 0, 341, 0, 2, 2, 6}, // (subframe number) 0,2,4,6,8 +{0xc2, -1, 1, 0, 1023, 0, 2, 2, 6}, // (subframe number) 0,1,2,3,4,5,6,7,8,9 +{0xc2, -1, 1, 0, 682, 0, 2, 2, 6} // (subframe number) 1,3,5,7,9 +}; +// Table 6.3.3.2-3: Random access configurations for FR1 and unpaired spectrum +int64_t table_6_3_3_2_3_prachConfig_Index [256][9] = { +//format, format, x, y, SFN_nbr, star_symb, slots_sfn, occ_slot, duration +{0, -1, 16, 1, 512, 0, -1, -1, 0}, // (subrame number 9) +{0, -1, 8, 1, 512, 0, -1, -1, 0}, // (subrame number 9) +{0, -1, 4, 1, 512, 0, -1, -1, 0}, // (subrame number 9) +{0, -1, 2, 0, 512, 0, -1, -1, 0}, // (subrame number 9) +{0, -1, 2, 1, 512, 0, -1, -1, 0}, // (subrame number 9) +{0, -1, 2, 0, 16, 0, -1, -1, 0}, // (subrame number 4) +{0, -1, 2, 1, 16, 0, -1, -1, 0}, // (subrame number 4) +{0, -1, 1, 0, 512, 0, -1, -1, 0}, // (subrame number 9) +{0, -1, 1, 0, 256, 0, -1, -1, 0}, // (subrame number 8) +{0, -1, 1, 0, 128, 0, -1, -1, 0}, // (subrame number 7) +{0, -1, 1, 0, 64, 0, -1, -1, 0}, // (subrame number 6) +{0, -1, 1, 0, 32, 0, -1, -1, 0}, // (subrame number 5) +{0, -1, 1, 0, 16, 0, -1, -1, 0}, // (subrame number 4) +{0, -1, 1, 0, 8, 0, -1, -1, 0}, // (subrame number 3) +{0, -1, 1, 0, 4, 0, -1, -1, 0}, // (subrame number 2) +{0, -1, 1, 0, 66, 0, -1, -1, 0}, // (subrame number 1,6) +{0, -1, 1, 0, 66, 7, -1, -1, 0}, // (subrame number 1,6) +{0, -1, 1, 0, 528, 0, -1, -1, 0}, // (subrame number 4,9) +{0, -1, 1, 0, 264, 0, -1, -1, 0}, // (subrame number 3,8) +{0, -1, 1, 0, 132, 0, -1, -1, 0}, // (subrame number 2,7) +{0, -1, 1, 0, 768, 0, -1, -1, 0}, // (subrame number 8,9) +{0, -1, 1, 0, 784, 0, -1, -1, 0}, // (subrame number 4,8,9) +{0, -1, 1, 0, 536, 0, -1, -1, 0}, // (subrame number 3,4,9) +{0, -1, 1, 0, 896, 0, -1, -1, 0}, // (subrame number 7,8,9) +{0, -1, 1, 0, 792, 0, -1, -1, 0}, // (subrame number 3,4,8,9) +{0, -1, 1, 0, 960, 0, -1, -1, 0}, // (subrame number 6,7,8,9) +{0, -1, 1, 0, 594, 0, -1, -1, 0}, // (subrame number 1,4,6,9) +{0, -1, 1, 0, 682, 0, -1, -1, 0}, // (subrame number 1,3,5,7,9) +{1, -1, 16, 1, 128, 0, -1, -1, 0}, // (subrame number 7) +{1, -1, 8, 1, 128, 0, -1, -1, 0}, // (subrame number 7) +{1, -1, 4, 1, 128, 0, -1, -1, 0}, // (subrame number 7) +{1, -1, 2, 0, 128, 0, -1, -1, 0}, // (subrame number 7) +{1, -1, 2, 1, 128, 0, -1, -1, 0}, // (subrame number 7) +{1, -1, 1, 0, 128, 0, -1, -1, 0}, // (subrame number 7) +{2, -1, 16, 1, 64, 0, -1, -1, 0}, // (subrame number 6) +{2, -1, 8, 1, 64, 0, -1, -1, 0}, // (subrame number 6) +{2, -1, 4, 1, 64, 0, -1, -1, 0}, // (subrame number 6) +{2, -1, 2, 0, 64, 7, -1, -1, 0}, // (subrame number 6) +{2, -1, 2, 1, 64, 7, -1, -1, 0}, // (subrame number 6) +{2, -1, 1, 0, 64, 7, -1, -1, 0}, // (subrame number 6) +{3, -1, 16, 1, 512, 0, -1, -1, 0}, // (subrame number 9) +{3, -1, 8, 1, 512, 0, -1, -1, 0}, // (subrame number 9) +{3, -1, 4, 1, 512, 0, -1, -1, 0}, // (subrame number 9) +{3, -1, 2, 0, 512, 0, -1, -1, 0}, // (subrame number 9) +{3, -1, 2, 1, 512, 0, -1, -1, 0}, // (subrame number 9) +{3, -1, 2, 0, 16, 0, -1, -1, 0}, // (subrame number 4) +{3, -1, 2, 1, 16, 0, -1, -1, 0}, // (subrame number 4) +{3, -1, 1, 0, 512, 0, -1, -1, 0}, // (subrame number 9) +{3, -1, 1, 0, 256, 0, -1, -1, 0}, // (subrame number 8) +{3, -1, 1, 0, 128, 0, -1, -1, 0}, // (subrame number 7) +{3, -1, 1, 0, 64, 0, -1, -1, 0}, // (subrame number 6) +{3, -1, 1, 0, 32, 0, -1, -1, 0}, // (subrame number 5) +{3, -1, 1, 0, 16, 0, -1, -1, 0}, // (subrame number 4) +{3, -1, 1, 0, 8, 0, -1, -1, 0}, // (subrame number 3) +{3, -1, 1, 0, 4, 0, -1, -1, 0}, // (subrame number 2) +{3, -1, 1, 0, 66, 0, -1, -1, 0}, // (subrame number 1,6) +{3, -1, 1, 0, 66, 7, -1, -1, 0}, // (subrame number 1,6) +{3, -1, 1, 0, 528, 0, -1, -1, 0}, // (subrame number 4,9) +{3, -1, 1, 0, 264, 0, -1, -1, 0}, // (subrame number 3,8) +{3, -1, 1, 0, 132, 0, -1, -1, 0}, // (subrame number 2,7) +{3, -1, 1, 0, 768, 0, -1, -1, 0}, // (subrame number 8,9) +{3, -1, 1, 0, 784, 0, -1, -1, 0}, // (subrame number 4,8,9) +{3, -1, 1, 0, 536, 0, -1, -1, 0}, // (subrame number 3,4,9) +{3, -1, 1, 0, 896, 0, -1, -1, 0}, // (subrame number 7,8,9) +{3, -1, 1, 0, 792, 0, -1, -1, 0}, // (subrame number 3,4,8,9) +{3, -1, 1, 0, 594, 0, -1, -1, 0}, // (subrame number 1,4,6,9) +{3, -1, 1, 0, 682, 0, -1, -1, 0}, // (subrame number 1,3,5,7,9) +{0xa1, -1, 16, 1, 512, 0, 2, 6, 2}, // (subrame number 9) +{0xa1, -1, 8, 1, 512, 0, 2, 6, 2}, // (subrame number 9) +{0xa1, -1, 4, 1, 512, 0, 1, 6, 2}, // (subrame number 9) +{0xa1, -1, 2, 1, 512, 0, 1, 6, 2}, // (subrame number 9) +{0xa1, -1, 2, 1, 528, 7, 1, 3, 2}, // (subrame number 4,9) +{0xa1, -1, 2, 1, 640, 7, 1, 3, 2}, // (subrame number 7,9) +{0xa1, -1, 2, 1, 640, 0, 1, 6, 2}, // (subrame number 7,9) +{0xa1, -1, 2, 1, 768, 0, 2, 6, 2}, // (subrame number 8,9) +{0xa1, -1, 2, 1, 528, 0, 2, 6, 2}, // (subrame number 4,9) +{0xa1, -1, 2, 1, 924, 0, 1, 6, 2}, // (subrame number 2,3,4,7,8,9) +{0xa1, -1, 1, 0, 512, 0, 2, 6, 2}, // (subrame number 9) +{0xa1, -1, 1, 0, 512, 7, 1, 3, 2}, // (subrame number 9) +{0xa1, -1, 1, 0, 512, 0, 1, 6, 2}, // (subrame number 9) +{0xa1, -1, 1, 0, 768, 0, 2, 6, 2}, // (subrame number 8,9) +{0xa1, -1, 1, 0, 528, 0, 1, 6, 2}, // (subrame number 4,9) +{0xa1, -1, 1, 0, 640, 7, 1, 3, 2}, // (subrame number 7,9) +{0xa1, -1, 1, 0, 792, 0, 1, 6, 2}, // (subrame number 3,4,8,9) +{0xa1, -1, 1, 0, 792, 0, 2, 6, 2}, // (subrame number 3,4,8,9) +{0xa1, -1, 1, 0, 682, 0, 1, 6, 2}, // (subrame number 1,3,5,7,9) +{0xa1, -1, 1, 0, 1023, 7, 1, 3, 2}, // (subrame number 0,1,2,3,4,5,6,7,8,9) +{0xa2, -1, 16, 1, 512, 0, 2, 3, 4}, // (subrame number 9) +{0xa2, -1, 8, 1, 512, 0, 2, 3, 4}, // (subrame number 9) +{0xa2, -1, 4, 1, 512, 0, 1, 3, 4}, // (subrame number 9) +{0xa2, -1, 2, 1, 640, 0, 1, 3, 4}, // (subrame number 7,9) +{0xa2, -1, 2, 1, 768, 0, 2, 3, 4}, // (subrame number 8,9) +{0xa2, -1, 2, 1, 640, 9, 1, 1, 4}, // (subrame number 7,9) +{0xa2, -1, 2, 1, 528, 9, 1, 1, 4}, // (subrame number 4,9) +{0xa2, -1, 2, 1, 528, 0, 2, 3, 4}, // (subrame number 4,9) +{0xa2, -1, 16, 1, 924, 0, 1, 3, 4}, // (subrame number 2,3,4,7,8,9) +{0xa2, -1, 1, 0, 4, 0, 1, 3, 4}, // (subrame number 2) +{0xa2, -1, 1, 0, 128, 0, 1, 3, 4}, // (subrame number 7) +{0xa2, -1, 2, 1, 512, 0, 1, 3, 4}, // (subrame number 9) +{0xa2, -1, 1, 0, 512, 0, 2, 3, 4}, // (subrame number 9) +{0xa2, -1, 1, 0, 512, 9, 1, 1, 4}, // (subrame number 9) +{0xa2, -1, 1, 0, 512, 0, 1, 3, 4}, // (subrame number 9) +{0xa2, -1, 1, 0, 132, 0, 1, 3, 4}, // (subrame number 2,7) +{0xa2, -1, 1, 0, 768, 0, 2, 3, 4}, // (subrame number 8,9) +{0xa2, -1, 1, 0, 528, 0, 1, 3, 4}, // (subrame number 4,9) +{0xa2, -1, 1, 0, 640, 9, 1, 1, 4}, // (subrame number 7,9) +{0xa2, -1, 1, 0, 792, 0, 1, 3, 4}, // (subrame number 3,4,8,9) +{0xa2, -1, 1, 0, 792, 0, 2, 3, 4}, // (subrame number 3,4,8,9) +{0xa2, -1, 1, 0, 682, 0, 1, 3, 4}, // (subrame number 1,3,5,7,9) +{0xa2, -1, 1, 0, 1023, 9, 1, 1, 4}, // (subrame number 0,1,2,3,4,5,6,7,8,9) +{0xa3, -1, 16, 1, 512, 0, 2, 2, 6}, // (subrame number 9) +{0xa3, -1, 8, 1, 512, 0, 2, 2, 6}, // (subrame number 9) +{0xa3, -1, 4, 1, 512, 0, 1, 2, 6}, // (subrame number 9) +{0xa3, -1, 2, 1, 528, 7, 1, 1, 6}, // (subrame number 4,9) +{0xa3, -1, 2, 1, 640, 7, 1, 1, 6}, // (subrame number 7,9) +{0xa3, -1, 2, 1, 640, 0, 1, 2, 6}, // (subrame number 7,9) +{0xa3, -1, 2, 1, 528, 0, 2, 2, 6}, // (subrame number 4,9) +{0xa3, -1, 2, 1, 768, 0, 2, 2, 6}, // (subrame number 8,9) +{0xa3, -1, 2, 1, 924, 0, 1, 2, 6}, // (subrame number 2,3,4,7,8,9) +{0xa3, -1, 1, 0, 4, 0, 1, 2, 6}, // (subrame number 2) +{0xa3, -1, 1, 0, 128, 0, 1, 2, 6}, // (subrame number 7) +{0xa3, -1, 2, 1, 512, 0, 1, 2, 6}, // (subrame number 9) +{0xa3, -1, 1, 0, 512, 0, 2, 2, 6}, // (subrame number 9) +{0xa3, -1, 1, 0, 512, 7, 1, 1, 6}, // (subrame number 9) +{0xa3, -1, 1, 0, 512, 0, 1, 2, 6}, // (subrame number 9) +{0xa3, -1, 1, 0, 132, 0, 1, 2, 6}, // (subrame number 2,7) +{0xa3, -1, 1, 0, 768, 0, 2, 2, 6}, // (subrame number 8,9) +{0xa3, -1, 1, 0, 528, 0, 1, 2, 6}, // (subrame number 4,9) +{0xa3, -1, 1, 0, 640, 7, 1, 1, 6}, // (subrame number 7,9) +{0xa3, -1, 1, 0, 792, 0, 1, 2, 6}, // (subrame number 3,4,8,9) +{0xa3, -1, 1, 0, 792, 0, 2, 2, 6}, // (subrame number 3,4,8,9) +{0xa3, -1, 1, 0, 682, 0, 1, 2, 6}, // (subrame number 1,3,5,7,9) +{0xa3, -1, 1, 0, 1023, 7, 1, 1, 6}, // (subrame number 0,1,2,3,4,5,6,7,8,9) +{0xb1, -1, 4, 1, 512, 2, 1, 6, 2}, // (subrame number 9) +{0xb1, -1, 2, 1, 512, 2, 1, 6, 2}, // (subrame number 9) +{0xb1, -1, 2, 1, 640, 2, 1, 6, 2}, // (subrame number 7,9) +{0xb1, -1, 2, 1, 528, 8, 1, 3, 2}, // (subrame number 4,9) +{0xb1, -1, 2, 1, 528, 2, 2, 6, 2}, // (subrame number 4,9) +{0xb1, -1, 1, 0, 512, 2, 2, 6, 2}, // (subrame number 9) +{0xb1, -1, 1, 0, 512, 8, 1, 3, 2}, // (subrame number 9) +{0xb1, -1, 1, 0, 512, 2, 1, 6, 2}, // (subrame number 9) +{0xb1, -1, 1, 0, 768, 2, 2, 6, 2}, // (subrame number 8,9) +{0xb1, -1, 1, 0, 528, 2, 1, 6, 2}, // (subrame number 4,9) +{0xb1, -1, 1, 0, 640, 8, 1, 3, 2}, // (subrame number 7,9) +{0xb1, -1, 1, 0, 682, 2, 1, 6, 2}, // (subrame number 1,3,5,7,9) +{0xb4, -1, 16, 1, 512, 0, 2, 1, 12}, // (subrame number 9) +{0xb4, -1, 8, 1, 512, 0, 2, 1, 12}, // (subrame number 9) +{0xb4, -1, 4, 1, 512, 2, 1, 1, 12}, // (subrame number 9) +{0xb4, -1, 2, 1, 512, 0, 1, 1, 12}, // (subrame number 9) +{0xb4, -1, 2, 1, 512, 2, 1, 1, 12}, // (subrame number 9) +{0xb4, -1, 2, 1, 640, 2, 1, 1, 12}, // (subrame number 7,9) +{0xb4, -1, 2, 1, 528, 2, 1, 1, 12}, // (subrame number 4,9) +{0xb4, -1, 2, 1, 528, 0, 2, 1, 12}, // (subrame number 4,9) +{0xb4, -1, 2, 1, 768, 0, 2, 1, 12}, // (subrame number 8,9) +{0xb4, -1, 2, 1, 924, 0, 1, 1, 12}, // (subrame number 2,3,4,7,8,9) +{0xb4, -1, 1, 0, 2, 0, 1, 1, 12}, // (subrame number 1) +{0xb4, -1, 1, 0, 4, 0, 1, 1, 12}, // (subrame number 2) +{0xb4, -1, 1, 0, 16, 0, 1, 1, 12}, // (subrame number 4) +{0xb4, -1, 1, 0, 128, 0, 1, 1, 12}, // (subrame number 7) +{0xb4, -1, 1, 0, 512, 0, 1, 1, 12}, // (subrame number 9) +{0xb4, -1, 1, 0, 512, 2, 1, 1, 12}, // (subrame number 9) +{0xb4, -1, 1, 0, 512, 0, 2, 1, 12}, // (subrame number 9) +{0xb4, -1, 1, 0, 528, 2, 1, 1, 12}, // (subrame number 4,9) +{0xb4, -1, 1, 0, 640, 2, 1, 1, 12}, // (subrame number 7,9) +{0xb4, -1, 1, 0, 768, 0, 2, 1, 12}, // (subrame number 8,9) +{0xb4, -1, 1, 0, 792, 2, 1, 1, 12}, // (subrame number 3,4,8,9) +{0xb4, -1, 1, 0, 682, 2, 1, 1, 12}, // (subrame number 1,3,5,7,9) +{0xb4, -1, 1, 0, 1023, 0, 2, 1, 12}, // (subrame number 0,1,2,3,4,5,6,7,8,9) +{0xb4, -1, 1, 0, 1023, 2, 1, 1, 12}, // (subrame number 0,1,2,3,4,5,6,7,8,9) +{0xc0, -1, 16, 1, 512, 2, 2, 6, 2}, // (subrame number 9) +{0xc0, -1, 8, 1, 512, 2, 2, 6, 2}, // (subrame number 9) +{0xc0, -1, 4, 1, 512, 2, 1, 6, 2}, // (subrame number 9) +{0xc0, -1, 2, 1, 512, 2, 1, 6, 2}, // (subrame number 9) +{0xc0, -1, 2, 1, 768, 2, 2, 6, 2}, // (subrame number 8,9) +{0xc0, -1, 2, 1, 640, 2, 1, 6, 2}, // (subrame number 7,9) +{0xc0, -1, 2, 1, 640, 8, 1, 3, 2}, // (subrame number 7,9) +{0xc0, -1, 2, 1, 528, 8, 1, 3, 2}, // (subrame number 4,9) +{0xc0, -1, 2, 1, 528, 2, 2, 6, 2}, // (subrame number 4,9) +{0xc0, -1, 2, 1, 924, 2, 1, 6, 2}, // (subrame number 2,3,4,7,8,9) +{0xc0, -1, 1, 0, 512, 2, 2, 6, 2}, // (subrame number 9) +{0xc0, -1, 1, 0, 512, 8, 1, 3, 2}, // (subrame number 9) +{0xc0, -1, 1, 0, 512, 2, 1, 6, 2}, // (subrame number 9) +{0xc0, -1, 1, 0, 768, 2, 2, 6, 2}, // (subrame number 8,9) +{0xc0, -1, 1, 0, 528, 2, 1, 6, 2}, // (subrame number 4,9) +{0xc0, -1, 1, 0, 640, 8, 1, 3, 2}, // (subrame number 7,9) +{0xc0, -1, 1, 0, 792, 2, 1, 6, 2}, // (subrame number 3,4,8,9) +{0xc0, -1, 1, 0, 792, 2, 2, 6, 2}, // (subrame number 3,4,8,9) +{0xc0, -1, 1, 0, 682, 2, 1, 6, 2}, // (subrame number 1,3,5,7,9) +{0xc0, -1, 1, 0, 1023, 8, 1, 3, 2}, // (subrame number 0,1,2,3,4,5,6,7,8,9) +{0xc2, -1, 16, 1, 512, 2, 2, 2, 6}, // (subrame number 9) +{0xc2, -1, 8, 1, 512, 2, 2, 2, 6}, // (subrame number 9) +{0xc2, -1, 4, 1, 512, 2, 1, 2, 6}, // (subrame number 9) +{0xc2, -1, 2, 1, 512, 2, 1, 2, 6}, // (subrame number 9) +{0xc2, -1, 2, 1, 768, 2, 2, 2, 6}, // (subrame number 8,9) +{0xc2, -1, 2, 1, 640, 2, 1, 2, 6}, // (subrame number 7,9) +{0xc2, -1, 2, 1, 640, 8, 1, 1, 6}, // (subrame number 7,9) +{0xc2, -1, 2, 1, 528, 8, 1, 1, 6}, // (subrame number 4,9) +{0xc2, -1, 2, 1, 528, 2, 2, 2, 6}, // (subrame number 4,9) +{0xc2, -1, 2, 1, 924, 2, 1, 2, 6}, // (subrame number 2,3,4,7,8,9) +{0xc2, -1, 8, 1, 512, 8, 2, 1, 6}, // (subrame number 9) +{0xc2, -1, 4, 1, 512, 8, 1, 1, 6}, // (subrame number 9) +{0xc2, -1, 1, 0, 512, 2, 2, 2, 6}, // (subrame number 9) +{0xc2, -1, 1, 0, 512, 8, 1, 1, 6}, // (subrame number 9) +{0xc2, -1, 1, 0, 512, 2, 1, 2, 6}, // (subrame number 9) +{0xc2, -1, 1, 0, 768, 2, 2, 2, 6}, // (subrame number 8,9) +{0xc2, -1, 1, 0, 528, 2, 1, 2, 6}, // (subrame number 4,9) +{0xc2, -1, 1, 0, 640, 8, 1, 1, 6}, // (subrame number 7,9) +{0xc2, -1, 1, 0, 792, 2, 1, 2, 6}, // (subrame number 3,4,8,9) +{0xc2, -1, 1, 0, 792, 2, 2, 2, 6}, // (subrame number 3,4,8,9) +{0xc2, -1, 1, 0, 682, 2, 1, 2, 6}, // (subrame number 1,3,5,7,9) +{0xc2, -1, 1, 0, 1023, 8, 1, 1, 6}, // (subrame number 0,1,2,3,4,5,6,7,8,9) +{0xa1, 0xb1, 2, 1, 512, 2, 1, 6, 2}, // (subrame number 9) +{0xa1, 0xb1, 2, 1, 528, 8, 1, 3, 2}, // (subrame number 4,9) +{0xa1, 0xb1, 2, 1, 640, 8, 1, 3, 2}, // (subrame number 7,9) +{0xa1, 0xb1, 2, 1, 640, 2, 1, 6, 2}, // (subrame number 7,9) +{0xa1, 0xb1, 2, 1, 528, 2, 2, 6, 2}, // (subrame number 4,9) +{0xa1, 0xb1, 2, 1, 768, 2, 2, 6, 2}, // (subrame number 8,9) +{0xa1, 0xb1, 1, 0, 512, 2, 2, 6, 2}, // (subrame number 9) +{0xa1, 0xb1, 1, 0, 512, 8, 1, 3, 2}, // (subrame number 9) +{0xa1, 0xb1, 1, 0, 512, 2, 1, 6, 2}, // (subrame number 9) +{0xa1, 0xb1, 1, 0, 768, 2, 2, 6, 2}, // (subrame number 8,9) +{0xa1, 0xb1, 1, 0, 528, 2, 1, 6, 2}, // (subrame number 4,9) +{0xa1, 0xb1, 1, 0, 640, 8, 1, 3, 2}, // (subrame number 7,9) +{0xa1, 0xb1, 1, 0, 792, 2, 2, 6, 2}, // (subrame number 3,4,8,9) +{0xa1, 0xb1, 1, 0, 682, 2, 1, 6, 2}, // (subrame number 1,3,5,7,9) +{0xa1, 0xb1, 1, 0, 1023, 8, 1, 3, 2}, // (subrame number 0,1,2,3,4,5,6,7,8,9) +{0xa2, 0xb2, 2, 1, 512, 0, 1, 3, 4}, // (subrame number 9) +{0xa2, 0xb2, 2, 1, 528, 6, 1, 2, 4}, // (subrame number 4,9) +{0xa2, 0xb2, 2, 1, 640, 6, 1, 2, 4}, // (subrame number 7,9) +{0xa2, 0xb2, 2, 1, 528, 0, 2, 3, 4}, // (subrame number 4,9) +{0xa2, 0xb2, 2, 1, 768, 0, 2, 3, 4}, // (subrame number 8,9) +{0xa2, 0xb2, 1, 0, 512, 0, 2, 3, 4}, // (subrame number 9) +{0xa2, 0xb2, 1, 0, 512, 6, 1, 2, 4}, // (subrame number 9) +{0xa2, 0xb2, 1, 0, 512, 0, 1, 3, 4}, // (subrame number 9) +{0xa2, 0xb2, 1, 0, 768, 0, 2, 3, 4}, // (subrame number 8,9) +{0xa2, 0xb2, 1, 0, 528, 0, 1, 3, 4}, // (subrame number 4,9) +{0xa2, 0xb2, 1, 0, 640, 6, 1, 2, 4}, // (subrame number 7,9) +{0xa2, 0xb2, 1, 0, 792, 0, 1, 3, 4}, // (subrame number 3,4,8,9) +{0xa2, 0xb2, 1, 0, 792, 0, 2, 3, 4}, // (subrame number 3,4,8,9) +{0xa2, 0xb2, 1, 0, 682, 0, 1, 3, 4}, // (subrame number 1,3,5,7,9) +{0xa2, 0xb2, 1, 0, 1023, 6, 1, 2, 4}, // (subrame number 0,1,2,3,4,5,6,7,8,9) +{0xa3, 0xb3, 2, 1, 512, 0, 1, 2, 6}, // (subrame number 9) +{0xa3, 0xb3, 2, 1, 528, 2, 1, 2, 6}, // (subrame number 4,9) +{0xa3, 0xb3, 2, 1, 640, 0, 1, 2, 6}, // (subrame number 7,9) +{0xa3, 0xb3, 2, 1, 640, 2, 1, 2, 6}, // (subrame number 7,9) +{0xa3, 0xb3, 2, 1, 528, 0, 2, 2, 6}, // (subrame number 4,9) +{0xa3, 0xb3, 2, 1, 768, 0, 2, 2, 6}, // (subrame number 8,9) +{0xa3, 0xb3, 1, 0, 512, 0, 2, 2, 6}, // (subrame number 9) +{0xa3, 0xb3, 1, 0, 512, 2, 1, 2, 6}, // (subrame number 9) +{0xa3, 0xb3, 1, 0, 512, 0, 1, 2, 6}, // (subrame number 9) +{0xa3, 0xb3, 1, 0, 768, 0, 2, 2, 6}, // (subrame number 8,9) +{0xa3, 0xb3, 1, 0, 528, 0, 1, 2, 6}, // (subrame number 4,9) +{0xa3, 0xb3, 1, 0, 640, 2, 1, 2, 6}, // (subrame number 7,9) +{0xa3, 0xb3, 1, 0, 792, 0, 2, 2, 6}, // (subrame number 3,4,8,9) +{0xa3, 0xb3, 1, 0, 682, 0, 1, 2, 6}, // (subrame number 1,3,5,7,9) +{0xa3, 0xb3, 1, 0, 1023, 2, 1, 2, 6} // (subrame number 0,1,2,3,4,5,6,7,8,9) +}; +// Table 6.3.3.2-4: Random access configurations for FR2 and unpaired spectrum +int64_t table_6_3_3_2_4_prachConfig_Index [256][10] = { +//format, format, x, y, y, SFN_nbr, star_symb, slots_sfn, occ_slot, duration +{0xa1, -1, 16, 1, -1, 567489872400, 0, 2, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa1, -1, 16, 1, -1, 586406201480, 0, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa1, -1, 8, 1, 2, 550293209600, 0, 2, 6, 2}, // (subframe number :9,19,29,39) +{0xa1, -1, 8, 1, -1, 567489872400, 0, 2, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa1, -1, 8, 1, -1, 586406201480, 0, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa1, -1, 4, 1, -1, 567489872400, 0, 1, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa1, -1, 4, 1, -1, 567489872400, 0, 2, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa1, -1, 4, 1, -1, 586406201480, 0, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa1, -1, 2, 1, -1, 551911719040, 0, 2, 6, 2}, // (subframe number :7,15,23,31,39) +{0xa1, -1, 2, 1, -1, 567489872400, 0, 1, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa1, -1, 2, 1, -1, 567489872400, 0, 2, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa1, -1, 2, 1, -1, 586406201480, 0, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa1, -1, 1, 0, -1, 549756338176, 7, 1, 3, 2}, // (subframe number :19,39) +{0xa1, -1, 1, 0, -1, 168, 0, 1, 6, 2}, // (subframe number :3,5,7) +{0xa1, -1, 1, 0, -1, 567489331200, 7, 1, 3, 2}, // (subframe number :24,29,34,39) +{0xa1, -1, 1, 0, -1, 550293209600, 7, 2, 3, 2}, // (subframe number :9,19,29,39) +{0xa1, -1, 1, 0, -1, 687195422720, 0, 1, 6, 2}, // (subframe number :17,19,37,39) +{0xa1, -1, 1, 0, -1, 550293209600, 0, 2, 6, 2}, // (subframe number :9,19,29,39) +{0xa1, -1, 1, 0, -1, 567489872400, 0, 1, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa1, -1, 1, 0, -1, 567489872400, 7, 1, 3, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa1, -1, 1, 0, -1, 10920, 7, 1, 3, 2}, // (subframe number :3,5,7,9,11,13) +{0xa1, -1, 1, 0, -1, 586405642240, 7, 1, 3, 2}, // (subframe number :23,27,31,35,39) +{0xa1, -1, 1, 0, -1, 551911719040, 0, 1, 6, 2}, // (subframe number :7,15,23,31,39) +{0xa1, -1, 1, 0, -1, 586405642240, 0, 1, 6, 2}, // (subframe number :23,27,31,35,39) +{0xa1, -1, 1, 0, -1, 965830828032, 7, 2, 3, 2}, // (subframe number :13,14,15, 29,30,31,37,38,39) +{0xa1, -1, 1, 0, -1, 586406201480, 7, 1, 3, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa1, -1, 1, 0, -1, 586406201480, 0, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa1, -1, 1, 0, -1, 733007751850, 0, 1, 6, 2}, // (subframe number :1,3,5,7,…,37,39) +{0xa1, -1, 1, 0, -1, 1099511627775, 7, 1, 3, 2}, // (subframe number :0,1,2,…,39) +{0xa2, -1, 16, 1, -1, 567489872400, 0, 2, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa2, -1, 16, 1, -1, 586406201480, 0, 1, 3, 4}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa2, -1, 8, 1, -1, 567489872400, 0, 2, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa2, -1, 8, 1, -1, 586406201480, 0, 1, 3, 4}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa2, -1, 8, 1, 2, 550293209600, 0, 2, 3, 4}, // (subframe number :9,19,29,39) +{0xa2, -1, 4, 1, -1, 567489872400, 0, 1, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa2, -1, 4, 1, -1, 567489872400, 0, 2, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa2, -1, 4, 1, -1, 586406201480, 0, 1, 3, 4}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa2, -1, 2, 1, -1, 551911719040, 0, 2, 3, 4}, // (subframe number :7,15,23,31,39) +{0xa2, -1, 2, 1, -1, 567489872400, 0, 1, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa2, -1, 2, 1, -1, 567489872400, 0, 2, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa2, -1, 2, 1, -1, 586406201480, 0, 1, 3, 4}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa2, -1, 1, 0, -1, 549756338176, 5, 1, 2, 4}, // (subframe number :19,39) +{0xa2, -1, 1, 0, -1, 168, 0, 1, 3, 4}, // (subframe number :3,5,7) +{0xa2, -1, 1, 0, -1, 567489331200, 5, 1, 2, 4}, // (subframe number :24,29,34,39) +{0xa2, -1, 1, 0, -1, 550293209600, 5, 2, 2, 4}, // (subframe number :9,19,29,39) +{0xa2, -1, 1, 0, -1, 687195422720, 0, 1, 3, 4}, // (subframe number :17,19,37,39) +{0xa2, -1, 1, 0, -1, 550293209600, 0, 2, 3, 4}, // (subframe number :9, 19, 29, 39) +{0xa2, -1, 1, 0, -1, 551911719040, 0, 1, 3, 4}, // (subframe number :7,15,23,31,39) +{0xa2, -1, 1, 0, -1, 586405642240, 5, 1, 2, 4}, // (subframe number :23,27,31,35,39) +{0xa2, -1, 1, 0, -1, 586405642240, 0, 1, 3, 4}, // (subframe number :23,27,31,35,39) +{0xa2, -1, 1, 0, -1, 10920, 5, 1, 2, 4}, // (subframe number :3,5,7,9,11,13) +{0xa2, -1, 1, 0, -1, 10920, 0, 1, 3, 4}, // (subframe number :3,5,7,9,11,13) +{0xa2, -1, 1, 0, -1, 567489872400, 5, 1, 2, 4}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa2, -1, 1, 0, -1, 567489872400, 0, 1, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa2, -1, 1, 0, -1, 965830828032, 5, 2, 2, 4}, // (subframe number :13,14,15, 29,30,31,37,38,39) +{0xa2, -1, 1, 0, -1, 586406201480, 5, 1, 2, 4}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa2, -1, 1, 0, -1, 586406201480, 0, 1, 3, 4}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa2, -1, 1, 0, -1, 733007751850, 0, 1, 3, 4}, // (subframe number :1,3,5,7,…,37,39) +{0xa2, -1, 1, 0, -1, 1099511627775, 5, 1, 2, 4}, // (subframe number :0,1,2,…,39) +{0xa3, -1, 16, 1, -1, 567489872400, 0, 2, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa3, -1, 16, 1, -1, 586406201480, 0, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa3, -1, 8, 1, -1, 567489872400, 0, 2, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa3, -1, 8, 1, -1, 586406201480, 0, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa3, -1, 8, 1, 2, 550293209600, 0, 2, 2, 6}, // (subframe number :9,19,29,39) +{0xa3, -1, 4, 1, -1, 567489872400, 0, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa3, -1, 4, 1, -1, 567489872400, 0, 2, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa3, -1, 4, 1, -1, 586406201480, 0, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa3, -1, 2, 1, -1, 567489872400, 0, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa3, -1, 2, 1, -1, 567489872400, 0, 2, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa3, -1, 2, 1, -1, 586406201480, 0, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa3, -1, 1, 0, -1, 549756338176, 7, 1, 1, 6}, // (subframe number :19,39) +{0xa3, -1, 1, 0, -1, 168, 0, 1, 2, 6}, // (subframe number :3,5,7) +{0xa3, -1, 1, 0, -1, 10752, 2, 1, 2, 6}, // (subframe number :9,11,13) +{0xa3, -1, 1, 0, -1, 567489331200, 7, 1, 1, 6}, // (subframe number :24,29,34,39) +{0xa3, -1, 1, 0, -1, 550293209600, 7, 2, 1, 6}, // (subframe number :9,19,29,39) +{0xa3, -1, 1, 0, -1, 687195422720, 0, 1, 2, 6}, // (subframe number :17,19,37,39) +{0xa3, -1, 1, 0, -1, 550293209600, 0, 2, 2, 6}, // (subframe number :9,19,29,39) +{0xa3, -1, 1, 0, -1, 551911719040, 0, 1, 2, 6}, // (subframe number :7,15,23,31,39) +{0xa3, -1, 1, 0, -1, 586405642240, 7, 1, 1, 6}, // (subframe number :23,27,31,35,39) +{0xa3, -1, 1, 0, -1, 586405642240, 0, 1, 2, 6}, // (subframe number :23,27,31,35,39) +{0xa3, -1, 1, 0, -1, 10920, 0, 1, 2, 6}, // (subframe number :3,5,7,9,11,13) +{0xa3, -1, 1, 0, -1, 10920, 7, 1, 1, 6}, // (subframe number :3,5,7,9,11,13) +{0xa3, -1, 1, 0, -1, 567489872400, 0, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa3, -1, 1, 0, -1, 567489872400, 7, 1, 1, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa3, -1, 1, 0, -1, 965830828032, 7, 2, 1, 6}, // (subframe number :13,14,15, 29,30,31,37,38,39) +{0xa3, -1, 1, 0, -1, 586406201480, 7, 1, 1, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa3, -1, 1, 0, -1, 586406201480, 0, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa3, -1, 1, 0, -1, 733007751850, 0, 1, 2, 6}, // (subframe number :1,3,5,7,…,37,39) +{0xa3, -1, 1, 0, -1, 1099511627775, 7, 1, 1, 6}, // (subframe number :0,1,2,…,39) +{0xb1, -1, 16, 1, -1, 567489872400, 2, 2, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xb1, -1, 8, 1, -1, 567489872400, 2, 2, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xb1, -1, 8, 1, 2, 550293209600, 2, 2, 6, 2}, // (subframe number :9,19,29,39) +{0xb1, -1, 4, 1, -1, 567489872400, 2, 2, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xb1, -1, 2, 1, -1, 567489872400, 2, 2, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xb1, -1, 2, 1, -1, 586406201480, 2, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xb1, -1, 1, 0, -1, 549756338176, 8, 1, 3, 2}, // (subframe number :19,39) +{0xb1, -1, 1, 0, -1, 168, 2, 1, 6, 2}, // (subframe number :3,5,7) +{0xb1, -1, 1, 0, -1, 567489331200, 8, 1, 3, 2}, // (subframe number :24,29,34,39) +{0xb1, -1, 1, 0, -1, 550293209600, 8, 2, 3, 2}, // (subframe number :9,19,29,39) +{0xb1, -1, 1, 0, -1, 687195422720, 2, 1, 6, 2}, // (subframe number :17,19,37,39) +{0xb1, -1, 1, 0, -1, 550293209600, 2, 2, 6, 2}, // (subframe number :9,19,29,39) +{0xb1, -1, 1, 0, -1, 551911719040, 2, 1, 6, 2}, // (subframe number :7,15,23,31,39) +{0xb1, -1, 1, 0, -1, 586405642240, 8, 1, 3, 2}, // (subframe number :23,27,31,35,39) +{0xb1, -1, 1, 0, -1, 586405642240, 2, 1, 6, 2}, // (subframe number :23,27,31,35,39) +{0xb1, -1, 1, 0, -1, 10920, 8, 1, 3, 2}, // (subframe number :3,5,7,9,11,13) +{0xb1, -1, 1, 0, -1, 567489872400, 8, 1, 3, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xb1, -1, 1, 0, -1, 567489872400, 2, 1, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xb1, -1, 1, 0, -1, 586406201480, 8, 1, 3, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xb1, -1, 1, 0, -1, 965830828032, 8, 2, 3, 2}, // (subframe number :13,14,15, 29,30,31,37,38,39) +{0xb1, -1, 1, 0, -1, 586406201480, 2, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xb1, -1, 1, 0, -1, 733007751850, 2, 1, 6, 2}, // (subframe number :1,3,5,7,…,37,39) +{0xb1, -1, 1, 0, -1, 1099511627775, 8, 1, 3, 2}, // (subframe number :0,1,2,…,39) +{0xb4, -1, 16, 1, 2, 567489872400, 0, 2, 1, 12}, // (subframe number :4,9,14,19,24,29,34,39) +{0xb4, -1, 16, 1, 2, 586406201480, 0, 1, 1, 12}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xb4, -1, 8, 1, 2, 567489872400, 0, 2, 1, 12}, // (subframe number :4,9,14,19,24,29,34,39) +{0xb4, -1, 8, 1, 2, 586406201480, 0, 1, 1, 12}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xb4, -1, 8, 1, 2, 550293209600, 0, 2, 1, 12}, // (subframe number :9,19,29,39) +{0xb4, -1, 4, 1, -1, 567489872400, 0, 1, 1, 12}, // (subframe number :4,9,14,19,24,29,34,39) +{0xb4, -1, 4, 1, -1, 567489872400, 0, 2, 1, 12}, // (subframe number :4,9,14,19,24,29,34,39) +{0xb4, -1, 4, 1, 2, 586406201480, 0, 1, 1, 12}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xb4, -1, 2, 1, -1, 551911719040, 2, 2, 1, 12}, // (subframe number :7,15,23,31,39) +{0xb4, -1, 2, 1, -1, 567489872400, 0, 1, 1, 12}, // (subframe number :4,9,14,19,24,29,34,39) +{0xb4, -1, 2, 1, -1, 567489872400, 0, 2, 1, 12}, // (subframe number :4,9,14,19,24,29,34,39) +{0xb4, -1, 2, 1, -1, 586406201480, 0, 1, 1, 12}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xb4, -1, 1, 0, -1, 549756338176, 2, 2, 1, 12}, // (subframe number :19, 39) +{0xb4, -1, 1, 0, -1, 687195422720, 0, 1, 1, 12}, // (subframe number :17, 19, 37, 39) +{0xb4, -1, 1, 0, -1, 567489331200, 2, 1, 1, 12}, // (subframe number :24,29,34,39) +{0xb4, -1, 1, 0, -1, 550293209600, 2, 2, 1, 12}, // (subframe number :9,19,29,39) +{0xb4, -1, 1, 0, -1, 550293209600, 0, 2, 1, 12}, // (subframe number :9,19,29,39) +{0xb4, -1, 1, 0, -1, 551911719040, 0, 1, 1, 12}, // (subframe number :7,15,23,31,39) +{0xb4, -1, 1, 0, -1, 551911719040, 0, 2, 1, 12}, // (subframe number :7,15,23,31,39) +{0xb4, -1, 1, 0, -1, 586405642240, 0, 1, 1, 12}, // (subframe number :23,27,31,35,39) +{0xb4, -1, 1, 0, -1, 586405642240, 2, 2, 1, 12}, // (subframe number :23,27,31,35,39) +{0xb4, -1, 1, 0, -1, 698880, 0, 1, 1, 12}, // (subframe number :9,11,13,15,17,19) +{0xb4, -1, 1, 0, -1, 10920, 2, 1, 1, 12}, // (subframe number :3,5,7,9,11,13) +{0xb4, -1, 1, 0, -1, 567489872400, 0, 1, 1, 12}, // (subframe number :4,9,14,19,24,29,34,39) +{0xb4, -1, 1, 0, -1, 567489872400, 2, 2, 1, 12}, // (subframe number :4,9,14,19,24,29,34,39) +{0xb4, -1, 1, 0, -1, 965830828032, 2, 2, 1, 12}, // (subframe number :13,14,15, 29,30,31,37,38,39) +{0xb4, -1, 1, 0, -1, 586406201480, 0, 1, 1, 12}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xb4, -1, 1, 0, -1, 586406201480, 2, 1, 1, 12}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xb4, -1, 1, 0, -1, 44739240, 2, 1, 1, 12}, // (subframe number :3, 5, 7, …, 23,25) +{0xb4, -1, 1, 0, -1, 44739240, 0, 2, 1, 12}, // (subframe number :3, 5, 7, …, 23,25) +{0xb4, -1, 1, 0, -1, 733007751850, 0, 1, 1, 12}, // (subframe number :1,3,5,7,…,37,39) +{0xb4, -1, 1, 0, -1, 1099511627775, 2, 1, 1, 12}, // (subframe number :0, 1, 2,…, 39) +{0xc0, -1, 16, 1, -1, 567489872400, 0, 2, 7, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xc0, -1, 16, 1, -1, 586406201480, 0, 1, 7, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xc0, -1, 8, 1, -1, 567489872400, 0, 1, 7, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xc0, -1, 8, 1, -1, 586406201480, 0, 1, 7, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xc0, -1, 8, 1, 2, 550293209600, 0, 2, 7, 2}, // (subframe number :9,19,29,39) +{0xc0, -1, 4, 1, -1, 567489872400, 0, 1, 7, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xc0, -1, 4, 1, -1, 567489872400, 0, 2, 7, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xc0, -1, 4, 1, -1, 586406201480, 0, 1, 7, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xc0, -1, 2, 1, -1, 551911719040, 0, 2, 7, 2}, // (subframe number :7,15,23,31,39) +{0xc0, -1, 2, 1, -1, 567489872400, 0, 1, 7, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xc0, -1, 2, 1, -1, 567489872400, 0, 2, 7, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xc0, -1, 2, 1, -1, 586406201480, 0, 1, 7, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xc0, -1, 1, 0, -1, 549756338176, 8, 1, 3, 2}, // (subframe number :19,39) +{0xc0, -1, 1, 0, -1, 168, 0, 1, 7, 2}, // (subframe number :3,5,7) +{0xc0, -1, 1, 0, -1, 567489331200, 8, 1, 3, 2}, // (subframe number :24,29,34,39) +{0xc0, -1, 1, 0, -1, 550293209600, 8, 2, 3, 2}, // (subframe number :9,19,29,39) +{0xc0, -1, 1, 0, -1, 687195422720, 0, 1, 7, 2}, // (subframe number :17,19,37,39) +{0xc0, -1, 1, 0, -1, 550293209600, 0, 2, 7, 2}, // (subframe number :9,19,29,39) +{0xc0, -1, 1, 0, -1, 586405642240, 8, 1, 3, 2}, // (subframe number :23,27,31,35,39) +{0xc0, -1, 1, 0, -1, 551911719040, 0, 1, 7, 2}, // (subframe number :7,15,23,31,39) +{0xc0, -1, 1, 0, -1, 586405642240, 0, 1, 7, 2}, // (subframe number :23,27,31,35,39) +{0xc0, -1, 1, 0, -1, 10920, 8, 1, 3, 2}, // (subframe number :3,5,7,9,11,13) +{0xc0, -1, 1, 0, -1, 567489872400, 8, 1, 3, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xc0, -1, 1, 0, -1, 567489872400, 0, 1, 7, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xc0, -1, 1, 0, -1, 965830828032, 8, 2, 3, 2}, // (subframe number :13,14,15, 29,30,31,37,38,39) +{0xc0, -1, 1, 0, -1, 586406201480, 8, 1, 3, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xc0, -1, 1, 0, -1, 586406201480, 0, 1, 7, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xc0, -1, 1, 0, -1, 733007751850, 0, 1, 7, 2}, // (subframe number :1,3,5,7,…,37,39) +{0xc0, -1, 1, 0, -1, 1099511627775, 8, 1, 3, 2}, // (subframe number :0,1,2,…,39) +{0xc2, -1, 16, 1, -1, 567489872400, 0, 2, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xc2, -1, 16, 1, -1, 586406201480, 0, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xc2, -1, 8, 1, -1, 567489872400, 0, 2, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xc2, -1, 8, 1, -1, 586406201480, 0, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xc2, -1, 8, 1, 2, 550293209600, 0, 2, 2, 6}, // (subframe number :9,19,29,39) +{0xc2, -1, 4, 1, -1, 567489872400, 0, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xc2, -1, 4, 1, -1, 567489872400, 0, 2, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xc2, -1, 4, 1, -1, 586406201480, 0, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xc2, -1, 2, 1, -1, 551911719040, 2, 2, 2, 6}, // (subframe number :7,15,23,31,39) +{0xc2, -1, 2, 1, -1, 567489872400, 0, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xc2, -1, 2, 1, -1, 567489872400, 0, 2, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xc2, -1, 2, 1, -1, 586406201480, 0, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xc2, -1, 1, 0, -1, 549756338176, 2, 1, 2, 6}, // (subframe number :19,39) +{0xc2, -1, 1, 0, -1, 168, 0, 1, 2, 6}, // (subframe number :3,5,7) +{0xc2, -1, 1, 0, -1, 567489331200, 7, 1, 1, 6}, // (subframe number :24,29,34,39) +{0xc2, -1, 1, 0, -1, 550293209600, 7, 2, 1, 6}, // (subframe number :9,19,29,39) +{0xc2, -1, 1, 0, -1, 687195422720, 0, 1, 2, 6}, // (subframe number :17,19,37,39) +{0xc2, -1, 1, 0, -1, 550293209600, 2, 2, 2, 6}, // (subframe number :9,19,29,39) +{0xc2, -1, 1, 0, -1, 551911719040, 2, 1, 2, 6}, // (subframe number :7,15,23,31,39) +{0xc2, -1, 1, 0, -1, 10920, 7, 1, 1, 6}, // (subframe number :3,5,7,9,11,13) +{0xc2, -1, 1, 0, -1, 586405642240, 7, 2, 1, 6}, // (subframe number :23,27,31,35,39) +{0xc2, -1, 1, 0, -1, 586405642240, 0, 1, 2, 6}, // (subframe number :23,27,31,35,39) +{0xc2, -1, 1, 0, -1, 567489872400, 7, 2, 1, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xc2, -1, 1, 0, -1, 567489872400, 2, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xc2, -1, 1, 0, -1, 965830828032, 7, 2, 1, 6}, // (subframe number :13,14,15, 29,30,31,37,38,39) +{0xc2, -1, 1, 0, -1, 586406201480, 7, 1, 1, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xc2, -1, 1, 0, -1, 586406201480, 0, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xc2, -1, 1, 0, -1, 733007751850, 0, 1, 2, 6}, // (subframe number :1,3,5,7,…,37,39) +{0xc2, -1, 1, 0, -1, 1099511627775, 7, 1, 1, 6}, // (subframe number :0,1,2,…,39) +{0xa1, 0xb1, 16, 1, -1, 567489872400, 2, 1, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa1, 0xb1, 16, 1, -1, 586406201480, 2, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa1, 0xb1, 8, 1, -1, 567489872400, 2, 1, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa1, 0xb1, 8, 1, -1, 586406201480, 2, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa1, 0xb1, 4, 1, -1, 567489872400, 2, 1, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa1, 0xb1, 4, 1, -1, 586406201480, 2, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa1, 0xb1, 2, 1, -1, 567489872400, 2, 1, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa1, 0xb1, 1, 0, -1, 549756338176, 8, 1, 3, 2}, // (subframe number :19,39) +{0xa1, 0xb1, 1, 0, -1, 550293209600, 8, 1, 3, 2}, // (subframe number :9,19,29,39) +{0xa1, 0xb1, 1, 0, -1, 687195422720, 2, 1, 6, 2}, // (subframe number :17,19,37,39) +{0xa1, 0xb1, 1, 0, -1, 550293209600, 2, 2, 6, 2}, // (subframe number :9,19,29,39) +{0xa1, 0xb1, 1, 0, -1, 586405642240, 8, 1, 3, 2}, // (subframe number :23,27,31,35,39) +{0xa1, 0xb1, 1, 0, -1, 551911719040, 2, 1, 6, 2}, // (subframe number :7,15,23,31,39) +{0xa1, 0xb1, 1, 0, -1, 586405642240, 2, 1, 6, 2}, // (subframe number :23,27,31,35,39) +{0xa1, 0xb1, 1, 0, -1, 567489872400, 8, 1, 3, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa1, 0xb1, 1, 0, -1, 567489872400, 2, 1, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa1, 0xb1, 1, 0, -1, 586406201480, 2, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa1, 0xb1, 1, 0, -1, 733007751850, 2, 1, 6, 2}, // (subframe number :1,3,5,7,…,37,39) +{0xa2, 0xb2, 16, 1, -1, 567489872400, 2, 1, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa2, 0xb2, 16, 1, -1, 586406201480, 2, 1, 3, 4}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa2, 0xb2, 8, 1, -1, 567489872400, 2, 1, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa2, 0xb2, 8, 1, -1, 586406201480, 2, 1, 3, 4}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa2, 0xb2, 4, 1, -1, 567489872400, 2, 1, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa2, 0xb2, 4, 1, -1, 586406201480, 2, 1, 3, 4}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa2, 0xb2, 2, 1, -1, 567489872400, 2, 1, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa2, 0xb2, 1, 0, -1, 549756338176, 6, 1, 2, 4}, // (subframe number :19,39) +{0xa2, 0xb2, 1, 0, -1, 550293209600, 6, 1, 2, 4}, // (subframe number :9,19,29,39) +{0xa2, 0xb2, 1, 0, -1, 687195422720, 2, 1, 3, 4}, // (subframe number :17,19,37,39) +{0xa2, 0xb2, 1, 0, -1, 550293209600, 2, 2, 3, 4}, // (subframe number :9,19,29,39) +{0xa2, 0xb2, 1, 0, -1, 586405642240, 6, 1, 2, 4}, // (subframe number :23,27,31,35,39) +{0xa2, 0xb2, 1, 0, -1, 551911719040, 2, 1, 3, 4}, // (subframe number :7,15,23,31,39) +{0xa2, 0xb2, 1, 0, -1, 586405642240, 2, 1, 3, 4}, // (subframe number :23,27,31,35,39) +{0xa2, 0xb2, 1, 0, -1, 567489872400, 6, 1, 2, 4}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa2, 0xb2, 1, 0, -1, 567489872400, 2, 1, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa2, 0xb2, 1, 0, -1, 586406201480, 2, 1, 3, 4}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa2, 0xb2, 1, 0, -1, 733007751850, 2, 1, 3, 4}, // (subframe number :1,3,5,7,…,37,39) +{0xa3, 0xb3, 16, 1, -1, 567489872400, 2, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa3, 0xb3, 16, 1, -1, 586406201480, 2, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa3, 0xb3, 8, 1, -1, 567489872400, 2, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa3, 0xb3, 8, 1, -1, 586406201480, 2, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa3, 0xb3, 4, 1, -1, 567489872400, 2, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa3, 0xb3, 4, 1, -1, 586406201480, 2, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa3, 0xb3, 2, 1, -1, 567489872400, 2, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa3, 0xb3, 1, 0, -1, 549756338176, 2, 1, 2, 6}, // (subframe number :19,39) +{0xa3, 0xb3, 1, 0, -1, 550293209600, 2, 1, 2, 6}, // (subframe number :9,19,29,39) +{0xa3, 0xb3, 1, 0, -1, 687195422720, 2, 1, 2, 6}, // (subframe number :17,19,37,39) +{0xa3, 0xb3, 1, 0, -1, 550293209600, 2, 2, 2, 6}, // (subframe number :9,19,29,39) +{0xa3, 0xb3, 1, 0, -1, 551911719040, 2, 1, 2, 6}, // (subframe number :7,15,23,31,39) +{0xa3, 0xb3, 1, 0, -1, 586405642240, 2, 1, 2, 6}, // (subframe number :23,27,31,35,39) +{0xa3, 0xb3, 1, 0, -1, 586405642240, 2, 2, 2, 6}, // (subframe number :23,27,31,35,39) +{0xa3, 0xb3, 1, 0, -1, 567489872400, 2, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa3, 0xb3, 1, 0, -1, 567489872400, 2, 2, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39) +{0xa3, 0xb3, 1, 0, -1, 586406201480, 2, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39) +{0xa3, 0xb3, 1, 0, -1, 733007751850, 2, 1, 2, 6} // (subframe number :1,3,5,7,…,37,39) +}; diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h index 7d5bdb87a3..60a23eb488 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h @@ -34,6 +34,8 @@ #include #include "PHY/impl_defs_top.h" + + //#include "PHY/defs_nr_UE.h" //#include "../LTE_TRANSPORT/dci.h" //#include "../LTE_TRANSPORT/mdci.h" diff --git a/openair1/PHY/defs_nr_common.h b/openair1/PHY/defs_nr_common.h index 46b4c4ef1f..57012a9a0a 100644 --- a/openair1/PHY/defs_nr_common.h +++ b/openair1/PHY/defs_nr_common.h @@ -93,6 +93,28 @@ typedef struct NR_BWP_PARMS { uint16_t ofdm_symbol_size; } NR_BWP_PARMS; +/// PRACH-ConfigInfo from 36.331 RRC spec +typedef struct { + /// Parameter: prach-ConfigurationIndex, see TS 36.211 (5.7.1). \vr{[0..63]} + uint8_t prach_ConfigIndex; + /// Parameter: High-speed-flag, see TS 36.211 (5.7.2). \vr{[0..1]} 1 corresponds to Restricted set and 0 to Unrestricted set. + uint8_t highSpeedFlag; + /// Parameter: \f$N_\text{CS}\f$, see TS 36.211 (5.7.2). \vr{[0..15]}\n Refer to table 5.7.2-2 for preamble format 0..3 and to table 5.7.2-3 for preamble format 4. + uint8_t zeroCorrelationZoneConfig; + /// Parameter: prach-FrequencyOffset, see TS 36.211 (5.7.1). \vr{[0..94]}\n For TDD the value range is dependent on the value of \ref prach_ConfigIndex. + uint8_t prach_FreqOffset; +} NR_PRACH_CONFIG_INFO; + +/// PRACH-ConfigSIB or PRACH-Config +typedef struct { + /// Parameter: RACH_ROOT_SEQUENCE, see TS 36.211 (5.7.1). \vr{[0..837]} + uint16_t rootSequenceIndex; + /// prach_Config_enabled=1 means enabled. \vr{[0..1]} + uint8_t prach_Config_enabled; + /// PRACH Configuration Information + NR_PRACH_CONFIG_INFO prach_ConfigInfo; +} NR_PRACH_CONFIG_COMMON; + typedef struct NR_DL_FRAME_PARMS { /// frequency range nr_frequency_range_e freq_range; @@ -162,6 +184,8 @@ typedef struct NR_DL_FRAME_PARMS { uint8_t nb_antennas_rx; /// Number of common transmit antenna ports in eNodeB (1 or 2) uint8_t nb_antenna_ports_eNB; + /// PRACH_CONFIG + NR_PRACH_CONFIG_COMMON prach_config_common; /// Cyclic Prefix for DL (0=Normal CP, 1=Extended CP) lte_prefix_type_t Ncp; /// shift of pilot position in one RB diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 0ec261e13e..c415822d0a 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -1406,7 +1406,143 @@ endif*/ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_ULSCH_COMMON,VCD_FUNCTION_OUT); } +#endif //0 +void ue_nr_prach_procedures(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t abstraction_flag,runmode_t mode) { + + int frame_tx = proc->frame_tx; + int nr_tti_tx = proc->nr_tti_tx; + int prach_power; + PRACH_RESOURCES_t prach_resources_local; + + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PRACH, VCD_FUNCTION_IN); + + ue->generate_prach=0; + + if (ue->mac_enabled==0){ + ue->prach_resources[eNB_id] = &prach_resources_local; + prach_resources_local.ra_RNTI = 0xbeef; + prach_resources_local.ra_PreambleIndex = 0; + } + + if (ue->mac_enabled==1){ + // ask L2 for RACH transport + if ((mode != rx_calib_ue) && (mode != rx_calib_ue_med) && (mode != rx_calib_ue_byp) && (mode != no_L2_connect) ) { + LOG_D(PHY,"Getting PRACH resources\n"); + //ue->prach_resources[eNB_id] = mac_xface->ue_get_rach(ue->Mod_id, + // ue->CC_id, + // frame_tx, + // eNB_id, + // nr_tti_tx); + //LOG_D(PHY,"Got prach_resources for eNB %d address %p, RRCCommon %p\n",eNB_id,ue->prach_resources[eNB_id],UE_mac_inst[ue->Mod_id].radioResourceConfigCommon); + LOG_D(PHY,"Prach resources %p\n",ue->prach_resources[eNB_id]); + } + } + + if (ue->prach_resources[eNB_id]!=NULL) { + + ue->generate_prach=1; + ue->prach_cnt=0; +#ifdef SMBV + ue->prach_resources[eNB_id]->ra_PreambleIndex = 19; +#endif +#ifdef OAI_EMU + ue->prach_PreambleIndex=ue->prach_resources[eNB_id]->ra_PreambleIndex; +#endif + + if (abstraction_flag == 0) { + + LOG_I(PHY,"mode %d\n",mode); + + if ((ue->mac_enabled==1) && (mode != calib_prach_tx)) { + ue->tx_power_dBm[nr_tti_tx] = ue->prach_resources[eNB_id]->ra_PREAMBLE_RECEIVED_TARGET_POWER+get_PL(ue->Mod_id,ue->CC_id,eNB_id); + } + else { + ue->tx_power_dBm[nr_tti_tx] = ue->tx_power_max_dBm; + ue->prach_resources[eNB_id]->ra_PreambleIndex = 19; + } + + LOG_I(PHY,"[UE %d][RAPROC] Frame %d, nr_tti_rx %d : Generating PRACH, preamble %d,PL %d, P0_PRACH %d, TARGET_RECEIVED_POWER %d dBm, PRACH TDD Resource index %d, RA-RNTI %d\n", + ue->Mod_id, + frame_tx, + nr_tti_tx, + ue->prach_resources[eNB_id]->ra_PreambleIndex, + get_PL(ue->Mod_id,ue->CC_id,eNB_id), + ue->tx_power_dBm[nr_tti_tx], + ue->prach_resources[eNB_id]->ra_PREAMBLE_RECEIVED_TARGET_POWER, + ue->prach_resources[eNB_id]->ra_TDD_map_index, + ue->prach_resources[eNB_id]->ra_RNTI); + + ue->tx_total_RE[nr_tti_tx] = 96; + +#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706) + ue->prach_vars[eNB_id]->amp = get_tx_amp(ue->tx_power_dBm[nr_tti_tx], + ue->tx_power_max_dBm, + ue->frame_parms.N_RB_UL, + 6); +#else + ue->prach_vars[eNB_id]->amp = AMP; +#endif + if ((mode == calib_prach_tx) && (((proc->frame_tx&0xfffe)%100)==0)) + LOG_D(PHY,"[UE %d][RAPROC] Frame %d, nr_tti_rx %d : PRACH TX power %d dBm, amp %d\n", + ue->Mod_id, + proc->frame_rx, + proc->nr_tti_tx, + ue->tx_power_dBm[nr_tti_tx], + ue->prach_vars[eNB_id]->amp); + + + // start_meas(&ue->tx_prach); + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GENERATE_PRACH, VCD_FUNCTION_IN); + + //prach_power = generate_prach(ue,eNB_id,nr_tti_tx,frame_tx); + prach_power = generate_nr_prach(ue,eNB_id,nr_tti_tx,frame_tx); + + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GENERATE_PRACH, VCD_FUNCTION_OUT); + // stop_meas(&ue->tx_prach); + LOG_D(PHY,"[UE %d][RAPROC] PRACH PL %d dB, power %d dBm, digital power %d dB (amp %d)\n", + ue->Mod_id, + get_PL(ue->Mod_id,ue->CC_id,eNB_id), + ue->tx_power_dBm[nr_tti_tx], + dB_fixed(prach_power), + ue->prach_vars[eNB_id]->amp); + } else { + //UE_transport_info[ue->Mod_id][ue->CC_id].cntl.prach_flag=1; + //UE_transport_info[ue->Mod_id][ue->CC_id].cntl.prach_id=ue->prach_resources[eNB_id]->ra_PreambleIndex; + } + + if (ue->mac_enabled==1){ + //mac_xface->Msg1_transmitted(ue->Mod_id, + // ue->CC_id, + // frame_tx, + // eNB_id); + } + + LOG_I(PHY,"[UE %d][RAPROC] Frame %d, nr_tti_rx %d: Generating PRACH (eNB %d) preamble index %d for UL, TX power %d dBm (PL %d dB), l3msg \n", + ue->Mod_id,frame_tx,nr_tti_tx,eNB_id, + ue->prach_resources[eNB_id]->ra_PreambleIndex, + ue->prach_resources[eNB_id]->ra_PREAMBLE_RECEIVED_TARGET_POWER+get_PL(ue->Mod_id,ue->CC_id,eNB_id), + get_PL(ue->Mod_id,ue->CC_id,eNB_id)); + + } + + + // if we're calibrating the PRACH kill the pointer to its resources so that the RA protocol doesn't continue + if (mode == calib_prach_tx) + ue->prach_resources[eNB_id]=NULL; + + LOG_D(PHY,"[UE %d] frame %d nr_tti_rx %d : generate_prach %d, prach_cnt %d\n", + ue->Mod_id,frame_tx,nr_tti_tx,ue->generate_prach,ue->prach_cnt); + + ue->prach_cnt++; + + if (ue->prach_cnt==3) + ue->generate_prach=0; + + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PRACH, VCD_FUNCTION_OUT); +} + +#if 0 void ue_prach_procedures(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t abstraction_flag,runmode_t mode) { int frame_tx = proc->frame_tx; @@ -2438,7 +2574,195 @@ void ue_pucch_procedures(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PUCCH,VCD_FUNCTION_OUT); } +#endif //0 +void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t abstraction_flag,runmode_t mode,relaying_type_t r_type) { + + + NR_DL_FRAME_PARMS *frame_parms=&ue->frame_parms; + //int32_t ulsch_start=0; + int nr_tti_tx = proc->nr_tti_tx; + int frame_tx = proc->frame_tx; + unsigned int aa; + uint8_t isSubframeSRS; + + uint8_t next1_thread_id = ue->current_thread_id[proc->nr_tti_rx]== (RX_NB_TH-1) ? 0:(ue->current_thread_id[proc->nr_tti_rx]+1); + uint8_t next2_thread_id = next1_thread_id== (RX_NB_TH-1) ? 0:(next1_thread_id+1); + + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX,VCD_FUNCTION_IN); + + LOG_D(PHY,"****** start TX-Chain for AbsSubframe %d.%d ******\n", frame_tx, nr_tti_tx); +#if T_TRACER + T(T_UE_PHY_UL_TICK, T_INT(ue->Mod_id), T_INT(frame_tx%1024), T_INT(nr_tti_tx)); +#endif + + ue->generate_ul_signal[eNB_id] = 0; +#if UE_TIMING_TRACE + start_meas(&ue->phy_proc_tx); +#endif + +#ifdef EMOS + //phy_procedures_emos_UE_TX(next_slot); +#endif + + ue->tx_power_dBm[nr_tti_tx]=-127; + + if (abstraction_flag==0) { + for (aa=0; aanb_antennas_tx; aa++) { + memset(&ue->common_vars.txdataF[aa][nr_tti_tx*frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti], + 0, + frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti*sizeof(int32_t)); + } + } + + if (ue->UE_mode[eNB_id] != PRACH) { + // check cell srs nr_tti_rx and ue srs nr_tti_rx. This has an impact on pusch encoding + //isSubframeSRS = nr_is_srs_occasion_common(&ue->frame_parms,proc->frame_tx,proc->nr_tti_tx); + + //ue_compute_srs_occasion(ue,proc,eNB_id,isSubframeSRS); + + //ue_ulsch_uespec_procedures(ue,proc,eNB_id,abstraction_flag); + + } + + if (ue->UE_mode[eNB_id] == PUSCH) { + // check if we need to use PUCCH 1a/1b + //ue_pucch_procedures(ue,proc,eNB_id,abstraction_flag); + // check if we need to use SRS + //ue_srs_procedures(ue,proc,eNB_id,abstraction_flag); + } // UE_mode==PUSCH + + +#ifdef CBA + + if ((ue->ulsch[eNB_id]->harq_processes[harq_pid]->subframe_cba_scheduling_flag >= 1) && + (ue->ulsch[eNB_id]->harq_processes[harq_pid]->status == CBA_ACTIVE)) { + ue->ulsch[eNB_id]->harq_processes[harq_pid]->subframe_scheduling_flag=0; //-=1 + // ue->ulsch[eNB_id]->harq_processes[harq_pid]->status= IDLE; + first_rb = ue->ulsch[eNB_id]->harq_processes[harq_pid]->first_rb; + nb_rb = ue->ulsch[eNB_id]->harq_processes[harq_pid]->nb_rb; + //cba_mcs=ue->ulsch[eNB_id]->harq_processes[harq_pid]->mcs; + input_buffer_length = ue->ulsch[eNB_id]->harq_processes[harq_pid]->TBS/8; + access_mode=CBA_ACCESS; + + LOG_D(PHY,"[UE %d] Frame %d, nr_tti_rx %d: CBA num dci %d\n", + Mod_id,frame_tx,nr_tti_tx, + ue->ulsch[eNB_id]->num_cba_dci[nr_tti_tx]); + + /*mac_xface->ue_get_sdu(Mod_id, + CC_id, + frame_tx, + proc->subframe_tx, + nr_tti_tx%(ue->frame_parms.ttis_per_subframe), + eNB_id, + ulsch_input_buffer, + input_buffer_length, + &access_mode);*/ + + ue->ulsch[eNB_id]->num_cba_dci[nr_tti_tx]=0; + + if (access_mode > UNKNOWN_ACCESS) { + + if (abstraction_flag==0) { + if (ulsch_encoding(ulsch_input_buffer, + ue, + harq_pid, + eNB_id, + proc->nr_tti_rx, + ue->transmission_mode[eNB_id],0, + 0)!=0) { // Nbundled, to be updated!!!! + LOG_E(PHY,"ulsch_coding.c: FATAL ERROR: returning\n"); + return; + } + } + +#ifdef PHY_ABSTRACTION + else { + ulsch_encoding_emul(ulsch_input_buffer,ue,eNB_id,proc->nr_tti_rx,harq_pid,0); + } + +#endif + } else { + ue->ulsch[eNB_id]->harq_processes[harq_pid]->status= IDLE; + //reset_cba_uci(ue->ulsch[eNB_id]->o); + LOG_N(PHY,"[UE %d] Frame %d, nr_tti_rx %d: CBA transmission cancelled or postponed\n", + Mod_id, frame_tx,nr_tti_tx); + } + } + +#endif // end CBA + + + if (abstraction_flag == 0) { + //ulsch_common_procedures(ue,proc, (ue->generate_ul_signal[eNB_id] == 0)); + } // mode != PRACH + + + if ((ue->UE_mode[eNB_id] == PRACH) && + (ue->frame_parms.prach_config_common.prach_Config_enabled==1)) { + + // check if we have PRACH opportunity + + if (is_nr_prach_subframe(&ue->frame_parms,frame_tx,nr_tti_tx)) { + + ue_nr_prach_procedures(ue,proc,eNB_id,abstraction_flag,mode); + } + } // mode is PRACH + else { + ue->generate_prach=0; + } + + // reset DL ACK/NACK status + uint8_t N_bundled = 0; + uint8_t current_pid = ue->dlsch[ue->current_thread_id[proc->nr_tti_rx]][eNB_id][0]->current_harq_pid; + if (ue->dlsch[ue->current_thread_id[proc->nr_tti_rx]][eNB_id][0] != NULL) + { +/* + nr_reset_ack(&ue->frame_parms, + ue->dlsch[ue->current_thread_id[proc->nr_tti_rx]][eNB_id][0]->harq_processes[current_pid]->harq_ack, + nr_tti_tx, + proc->nr_tti_rx, + ue->ulsch[eNB_id]->o_ACK, + &N_bundled, + 0); + nr_reset_ack(&ue->frame_parms, + ue->dlsch[next1_thread_id][eNB_id][0]->harq_processes[current_pid]->harq_ack, + nr_tti_tx, + proc->nr_tti_rx, + ue->ulsch[eNB_id]->o_ACK, + &N_bundled, + 0); + nr_reset_ack(&ue->frame_parms, + ue->dlsch[next2_thread_id][eNB_id][0]->harq_processes[current_pid]->harq_ack, + nr_tti_tx, + proc->nr_tti_rx, + ue->ulsch[eNB_id]->o_ACK, + &N_bundled, + 0); +*/ + } + + if (ue->dlsch_SI[eNB_id] != NULL) +/* + nr_reset_ack(&ue->frame_parms, + ue->dlsch_SI[eNB_id]->harq_processes[current_pid]->harq_ack, + nr_tti_tx, + proc->nr_tti_rx, + ue->ulsch[eNB_id]->o_ACK, + &N_bundled, + 0); +*/ + + LOG_D(PHY,"****** end TX-Chain for AbsSubframe %d.%d ******\n", frame_tx, nr_tti_tx); + + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX, VCD_FUNCTION_OUT); +#if UE_TIMING_TRACE + stop_meas(&ue->phy_proc_tx); +#endif +} + + +#if 0 void phy_procedures_UE_TX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t abstraction_flag,runmode_t mode,relaying_type_t r_type) { @@ -2619,7 +2943,9 @@ void phy_procedures_UE_TX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB stop_meas(&ue->phy_proc_tx); #endif } +#endif //0 +#if 0 void phy_procedures_UE_S_TX(PHY_VARS_NR_UE *ue,uint8_t eNB_id,uint8_t abstraction_flag,relaying_type_t r_type) { int aa;//i,aa; diff --git a/targets/RT/USER/nr-ue.c b/targets/RT/USER/nr-ue.c index 971e91c2ea..15a96d8f7d 100644 --- a/targets/RT/USER/nr-ue.c +++ b/targets/RT/USER/nr-ue.c @@ -740,7 +740,8 @@ static void *UE_thread_rxn_txnp4(void *arg) { (UE->frame_parms.frame_type == FDD) ) #endif if (UE->mode != loop_through_memory) - phy_procedures_UE_TX(UE,proc,0,0,UE->mode,no_relay); + phy_procedures_nrUE_TX(UE,proc,0,0,UE->mode,no_relay); + //phy_procedures_UE_TX(UE,proc,0,0,UE->mode,no_relay); #endif #if 0 if ((subframe_select( &UE->frame_parms, proc->subframe_tx) == SF_S) && From ee6239a8384edd95bb94fe9ba1b4fc833a8c242a Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Thu, 11 Oct 2018 07:45:54 -0700 Subject: [PATCH 306/379] fixing merge --- .../open-nFAPI/nfapi/public_inc/fapi_nr_ue_constants.h | 3 ++- openair1/PHY/CODING/TESTBENCH/polartest.c | 4 ++-- openair1/PHY/INIT/nr_init_ue.c | 2 +- openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 4 +++- openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c | 1 - openair1/SCHED_NR/fapi_nr_l1.c | 10 +++++----- openair1/SCHED_NR_UE/fapi_nr_ue_l1.c | 2 +- openair1/SCHED_NR_UE/harq_nr.c | 2 +- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 4 ++-- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 8 ++++---- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 2 +- targets/RT/USER/nr-ue.c | 2 +- targets/RT/USER/nr-uesoftmodem.c | 9 +++------ 13 files changed, 26 insertions(+), 27 deletions(-) diff --git a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_constants.h b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_constants.h index 4ab81c1a0c..babcc6404f 100644 --- a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_constants.h +++ b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_constants.h @@ -40,6 +40,7 @@ #define FAPI_NR_DL_CONFIG_TYPE_DCI 0x01 #define FAPI_NR_DL_CONFIG_TYPE_DLSCH 0x02 + #define CCE_REG_MAPPING_TYPE_INTERLEAVED 0x01 #define CCE_REG_MAPPING_TYPE_NON_INTERLEAVED 0x02 @@ -55,4 +56,4 @@ #define FAPI_NR_UL_CONFIG_TYPE_SRS 0x04 -#endif \ No newline at end of file +#endif diff --git a/openair1/PHY/CODING/TESTBENCH/polartest.c b/openair1/PHY/CODING/TESTBENCH/polartest.c index 56e1add850..20db3624cf 100644 --- a/openair1/PHY/CODING/TESTBENCH/polartest.c +++ b/openair1/PHY/CODING/TESTBENCH/polartest.c @@ -10,7 +10,7 @@ #include "PHY/CODING/coding_defs.h" #include "SIMULATION/TOOLS/sim.h" -#define DEBUG_DCI_POLAR_PARAMS +//#define DEBUG_DCI_POLAR_PARAMS //#define DEBUG_POLAR_TIMING //#define DEBUG_CRC @@ -68,7 +68,7 @@ int main(int argc, char *argv[]) { break; case 'h': - printf("./polartest -s SNRstart -d SNRinc -f SNRstop -m [0=DCI|1=PBCH|2=UCI] -i iterations -l decoderListSize -a pathMetricAppr\n"); + printf("./polartest -s SNRstart -d SNRinc -f SNRstop -m [0=PBCH|1=DCI|2=UCI] -i iterations -l decoderListSize -a pathMetricAppr\n"); exit(-1); default: diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c index 4574036ff3..c1d6399e46 100644 --- a/openair1/PHY/INIT/nr_init_ue.c +++ b/openair1/PHY/INIT/nr_init_ue.c @@ -357,7 +357,7 @@ void phy_config_dedicated_scell_ue(uint8_t Mod_id, } #endif -void phy_config_harq_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id, +void phy_config_harq_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id, uint16_t max_harq_tx ) { diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index 497a44b201..cb30ae7c21 100755 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -1816,9 +1816,11 @@ T(T_UE_PHY_PDCCH_ENERGY, T_INT(eNB_id), T_INT(0), T_INT(frame%1024), T_INT(nr_tt } #endif //MU_RECEIVER #if T_TRACER -T(T_UE_PHY_PDCCH_IQ, T_INT(frame_parms->N_RB_DL), T_INT(frame_parms->N_RB_DL), +/* + T(T_UE_PHY_PDCCH_IQ, T_INT(frame_parms->N_RB_DL), T_INT(frame_parms->N_RB_DL), T_INT(n_pdcch_symbols), T_BUFFER(pdcch_vars[eNB_id]->rxdataF_comp, frame_parms->N_RB_DL*12*n_pdcch_symbols* 4)); +*/ #endif #ifdef DEBUG_DCI_DECODING printf("demapping: nr_tti_rx %d, mi %d, tdd_config %d\n",nr_tti_rx,get_mi(frame_parms,nr_tti_rx),frame_parms->tdd_config); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c index d98d866271..24641a6e6a 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c @@ -33,7 +33,6 @@ #include "PHY/CODING/coding_extern.h" #include "PHY/phy_extern_nr_ue.h" #include "PHY/sse_intrin.h" -#include "SIMULATION/TOOLS/sim.h" #include "PHY/LTE_REFSIG/lte_refsig.h" //#define DEBUG_PBCH 1 diff --git a/openair1/SCHED_NR/fapi_nr_l1.c b/openair1/SCHED_NR/fapi_nr_l1.c index b6e1a95a82..e6fda71d39 100644 --- a/openair1/SCHED_NR/fapi_nr_l1.c +++ b/openair1/SCHED_NR/fapi_nr_l1.c @@ -42,8 +42,8 @@ void handle_nr_nfapi_bch_pdu(PHY_VARS_gNB *gNB, uint8_t *sdu) { - AssertFatal(dl_config_pdu->bch_pdu.bch_pdu_rel15.length == 3, "BCH PDU has length %d != 3\n", - dl_config_pdu->bch_pdu.bch_pdu_rel15.length); + AssertFatal(dl_config_pdu->bch_pdu_rel15.length == 3, "BCH PDU has length %d != 3\n", + dl_config_pdu->bch_pdu_rel15.length); LOG_I(PHY,"pbch_pdu[0]: %x,pbch_pdu[1]: %x,gNB->pbch_pdu[2]: %x\n",sdu[0],sdu[1],sdu[2]); gNB->pbch_pdu[0] = sdu[2]; @@ -108,9 +108,9 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){ //LOG_D(PHY,"NFAPI: dl_pdu %d : type %d\n",i,dl_config_pdu->pdu_type); switch (dl_config_pdu->pdu_type) { case NFAPI_NR_DL_CONFIG_BCH_PDU_TYPE: - AssertFatal(dl_config_pdu->bch_pdu.bch_pdu_rel15.pdu_index < TX_req->tx_request_body.number_of_pdus, + AssertFatal(dl_config_pdu->bch_pdu_rel15.pdu_index < TX_req->tx_request_body.number_of_pdus, "bch_pdu_rel8.pdu_index>=TX_req->number_of_pdus (%d>%d)\n", - dl_config_pdu->bch_pdu.bch_pdu_rel15.pdu_index, + dl_config_pdu->bch_pdu_rel15.pdu_index, TX_req->tx_request_body.number_of_pdus); gNB->pbch_configured=1; do_oai=1; @@ -118,7 +118,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){ handle_nr_nfapi_bch_pdu(gNB, proc, dl_config_pdu, - TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->bch_pdu.bch_pdu_rel15.pdu_index].segments[0].segment_data); + TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->bch_pdu_rel15.pdu_index].segments[0].segment_data); break; case NFAPI_NR_DL_CONFIG_DCI_DL_PDU_TYPE: diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c index ac255e85e4..fd19e71b1b 100644 --- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c +++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c @@ -130,7 +130,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ if(scheduled_response->ul_config != NULL){ fapi_nr_ul_config_request_t *ul_config = scheduled_response->ul_config; for(i=0; inumber_pdus; ++i){ - if(ul_config->ul_config_list[i].pdu_type == FAPI_NR_DL_CONFIG_TYPE_PUSCH){ + if(ul_config->ul_config_list[i].pdu_type == FAPI_NR_UL_CONFIG_TYPE_PUSCH){ // pusch config pdu fapi_nr_ul_config_pusch_pdu_rel15_t *pusch_config_pdu = &ul_config->ul_config_list[i].ulsch_config_pdu.ulsch_pdu_rel15; uint8_t current_harq_pid = pusch_config_pdu->harq_process_nbr; diff --git a/openair1/SCHED_NR_UE/harq_nr.c b/openair1/SCHED_NR_UE/harq_nr.c index 95a0d1c78e..796b87cc59 100644 --- a/openair1/SCHED_NR_UE/harq_nr.c +++ b/openair1/SCHED_NR_UE/harq_nr.c @@ -120,7 +120,7 @@ void get_dci_info_for_harq(PHY_VARS_NR_UE *ue, NR_DCI_INFO_EXTRACTED_t *nr_dci_i dlsch[0]->current_harq_pid = nr_dci_info_extracted->harq_process_number; - NR_DL_UE_HARQ_t *dl_harq = dlsch[0]->harq_processes[dlsch[0]->current_harq_pid]; + NR_DL_UE_HARQ_t *dl_harq = &dlsch[0]->harq_processes[dlsch[0]->current_harq_pid]; dl_harq->harq_ack.vDAI_DL = nr_dci_info_extracted->dai+1; dl_harq->harq_ack.pucch_resource_indicator = nr_dci_info_extracted->pucch_resource_ind; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index d9a095f5c2..7e5e00c066 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -1140,7 +1140,7 @@ printf("\n>>> nr_ue_process_dci at MAC layer with dci_format=%d\n",dci_format); * 49 PADDING_NR_DCI: (Note 2) If DCI format 0_0 is monitored in common search space * 50 SUL_IND_0_0: */ - ul_config->ul_config_list[ul_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_PUSCH; + ul_config->ul_config_list[ul_config->number_pdus].pdu_type = FAPI_NR_UL_CONFIG_TYPE_PUSCH; ul_config->ul_config_list[ul_config->number_pdus].ulsch_config_pdu.rnti = rnti; fapi_nr_ul_config_pusch_pdu_rel15_t *ulsch_config_pdu_0_0 = &ul_config->ul_config_list[ul_config->number_pdus].ulsch_config_pdu.ulsch_pdu_rel15; /* IDENTIFIER_DCI_FORMATS */ @@ -1212,7 +1212,7 @@ printf("\n>>> nr_ue_process_dci at MAC layer with dci_format=%d\n",dci_format); * 48 UL_SCH_IND * 49 PADDING_NR_DCI: (Note 2) If DCI format 0_0 is monitored in common search space */ - ul_config->ul_config_list[ul_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_PUSCH; + ul_config->ul_config_list[ul_config->number_pdus].pdu_type = FAPI_NR_UL_CONFIG_TYPE_PUSCH; ul_config->ul_config_list[ul_config->number_pdus].ulsch_config_pdu.rnti = rnti; fapi_nr_ul_config_pusch_pdu_rel15_t *ulsch_config_pdu_0_1 = &ul_config->ul_config_list[ul_config->number_pdus].ulsch_config_pdu.ulsch_pdu_rel15; /* IDENTIFIER_DCI_FORMATS */ diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index 85530e9841..95f685a536 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -97,10 +97,10 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subfram memset((void *) dl_config_pdu, 0,sizeof(nfapi_nr_dl_config_request_pdu_t)); dl_config_pdu->pdu_type = NFAPI_NR_DL_CONFIG_BCH_PDU_TYPE; dl_config_pdu->pdu_size =2 + sizeof(nfapi_nr_dl_config_bch_pdu_rel15_t); - dl_config_pdu->bch_pdu.bch_pdu_rel15.tl.tag = NFAPI_NR_DL_CONFIG_REQUEST_BCH_PDU_REL15_TAG; - dl_config_pdu->bch_pdu.bch_pdu_rel15.length = mib_sdu_length; - dl_config_pdu->bch_pdu.bch_pdu_rel15.pdu_index = gNB->pdu_index[CC_id]; - dl_config_pdu->bch_pdu.bch_pdu_rel15.transmission_power = 6000; + dl_config_pdu->bch_pdu_rel15.tl.tag = NFAPI_NR_DL_CONFIG_REQUEST_BCH_PDU_REL15_TAG; + dl_config_pdu->bch_pdu_rel15.length = mib_sdu_length; + dl_config_pdu->bch_pdu_rel15.pdu_index = gNB->pdu_index[CC_id]; + dl_config_pdu->bch_pdu_rel15.transmission_power = 6000; dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG; dl_req->number_pdu++; dl_config_request->header.message_id = NFAPI_DL_CONFIG_REQUEST; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index 2a59863977..5f88a20b8b 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -67,7 +67,7 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP, nr_configure_css_dci_from_mib(&gNB->pdcch_type0_params, kHz30, kHz30, nr_FR1, 0, 0, fp->slots_per_frame, - cfg->rf_config.dl_channel_bandwidth.value); + cfg->rf_config.dl_carrier_bandwidth.value); memcpy((void*)params_rel15, (void*)&gNB->pdcch_type0_params, sizeof(nfapi_nr_dl_config_pdcch_parameters_rel15_t)); pdu_rel15->frequency_domain_assignment = 5; diff --git a/targets/RT/USER/nr-ue.c b/targets/RT/USER/nr-ue.c index 956650e308..f694de4b16 100644 --- a/targets/RT/USER/nr-ue.c +++ b/targets/RT/USER/nr-ue.c @@ -1002,7 +1002,7 @@ void *UE_thread(void *arg) { if ( first_symbols > 0 ) AssertFatal(first_symbols == UE->rfdevice.trx_read_func(&UE->rfdevice, - ×tamp1, + ×tamp, (void**)UE->common_vars.rxdata, first_symbols, UE->frame_parms.nb_antennas_rx),""); diff --git a/targets/RT/USER/nr-uesoftmodem.c b/targets/RT/USER/nr-uesoftmodem.c index 641cf6bc2e..baa996980c 100644 --- a/targets/RT/USER/nr-uesoftmodem.c +++ b/targets/RT/USER/nr-uesoftmodem.c @@ -215,7 +215,6 @@ int16_t rrc_log_level = LOG_INFO; int16_t rrc_log_verbosity = LOG_MED; int16_t opt_log_level = LOG_INFO; int16_t opt_log_verbosity = LOG_MED; -*/ # if defined(ENABLE_USE_MME) int16_t gtpu_log_level = LOG_DEBUG; @@ -525,11 +524,9 @@ static void get_options(void) { set_glog_onlinelog(online_log_messages); } if(config_isparamset(cmdline_logparams,CMDLINE_GLOGLEVEL_IDX)) { - set_glog(glog_level, -1); - } - if(config_isparamset(cmdline_logparams,CMDLINE_GLOGVERBO_IDX)) { - set_glog(-1, glog_verbosity); + set_glog(glog_level); } + if (start_telnetsrv) { load_module_shlib("telnetsrv",NULL,0); } @@ -877,7 +874,7 @@ int main( int argc, char **argv ) { #endif // get options and fill parameters from configuration file - get_options (argc, argv); //Command-line options, enb_properties + get_options (); //Command-line options, enb_properties if (opt_type != OPT_NONE) { radio_type_t radio_type; From a8f94e7a84ace1eb4c9ddd699d70dfcf91620828 Mon Sep 17 00:00:00 2001 From: Hongzhi Date: Thu, 11 Oct 2018 17:43:41 +0200 Subject: [PATCH 307/379] Bug fixes --- oaienv | 2 +- openair1/PHY/NR_TRANSPORT/nr_dci.c | 27 ++++++++++++++----- openair1/PHY/NR_TRANSPORT/nr_dci.h | 2 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 4 +-- openair2/RRC/NR/MESSAGES/asn1_msg.c | 2 +- 5 files changed, 26 insertions(+), 11 deletions(-) diff --git a/oaienv b/oaienv index 4dfc5f8cb5..d9a540697b 100644 --- a/oaienv +++ b/oaienv @@ -18,5 +18,5 @@ alias oailte='cd $OPENAIR_TARGETS/RT/USER' alias oais='cd $OPENAIR_TARGETS/SIMU/USER' alias oaiex='cd $OPENAIR_TARGETS/SIMU/EXAMPLES' -export IIOD_REMOTE=192.168.1.2 +export IIOD_REMOTE=192.168.121.32 diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci.c b/openair1/PHY/NR_TRANSPORT/nr_dci.c index ed2cb5950d..0224d821dc 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci.c @@ -133,7 +133,7 @@ uint16_t nr_get_dci_size(nfapi_nr_dci_format_e format, } void nr_pdcch_scrambling(uint32_t *in, - uint8_t size, + uint16_t size, uint32_t Nid, uint32_t n_RNTI, uint32_t* out) { @@ -148,8 +148,12 @@ void nr_pdcch_scrambling(uint32_t *in, if ((i&0x1f)==0) { s = lte_gold_generic(&x1, &x2, reset); reset = 0; + if (i){ + in++; + out++; + } } - *out ^= (((*in)>>i)&1) ^ ((s>>i)&1); + (*out) ^= ((((*in)>>(i&0x1f))&1) ^ ((s>>(i&0x1f))&1))<<(i&0x1f); } } @@ -217,9 +221,13 @@ uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars, nr_polar_init(nrPolar_params, NR_POLAR_DCI_MESSAGE_TYPE, dci_alloc.size, dci_alloc.L); t_nrPolar_paramsPtr currentPtr = nr_polar_params(*nrPolar_params, NR_POLAR_DCI_MESSAGE_TYPE, dci_alloc.size, dci_alloc.L); #endif - polar_encoder_dci(dci_alloc.dci_pdu, encoder_output, currentPtr, pdcch_params.rnti); + +polar_encoder_dci(dci_alloc.dci_pdu, encoder_output, currentPtr, pdcch_params.rnti); #ifdef DEBUG_CHANNEL_CODING + printf("polar rnti %d\n",pdcch_params.rnti); + for (int i=0;i<54;i++) printf("Encoded Payload: [%d]->0x%08x \n", i,encoder_output[i]); + printf("DCI PDU: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n", dci_alloc.dci_pdu[0], dci_alloc.dci_pdu[1], dci_alloc.dci_pdu[2], dci_alloc.dci_pdu[3]); printf("Encoded Payload: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n", @@ -227,8 +235,14 @@ uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars, #endif /// Scrambling - uint32_t scrambled_output[NR_MAX_DCI_SIZE_DWORD]; + uint32_t scrambled_output[NR_MAX_DCI_SIZE_DWORD]={0}; nr_pdcch_scrambling(encoder_output, encoded_length, Nid, n_RNTI, scrambled_output); +#ifdef DEBUG_CHANNEL_CODING +printf("scrambled output: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\t [4]->0x%08x\t [5]->0x%08x\t \ +[6]->0x%08x \t [7]->0x%08x \t [8]->0x%08x \t [9]->0x%08x\t [10]->0x%08x\t [11]->0x%08x\n", + scrambled_output[0], scrambled_output[1], scrambled_output[2], scrambled_output[3], scrambled_output[4],scrambled_output[5], + scrambled_output[6], scrambled_output[7], scrambled_output[8], scrambled_output[9], scrambled_output[10],scrambled_output[11] ); +#endif // QPSK modulation int16_t mod_dci[NR_MAX_DCI_SIZE>>1]; @@ -237,8 +251,8 @@ uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars, mod_dci[i<<1] = nr_mod_table[(NR_MOD_TABLE_QPSK_OFFSET + idx)<<1]; mod_dci[(i<<1)+1] = nr_mod_table[((NR_MOD_TABLE_QPSK_OFFSET + idx)<<1) + 1]; #ifdef DEBUG_DCI - printf("i %d idx %d b0-b1 %d-%d mod_dci %d %d\n", i, idx, (((encoder_output[(i<<1)>>5])>>((i<<1)&0x1f))&1), - (((encoder_output[((i<<1)+1)>>5])>>(((i<<1)+1)&0x1f))&1), mod_dci[(i<<1)], mod_dci[(i<<1)+1]); + printf("i %d idx %d b0-b1 %d-%d mod_dci %d %d\n", i, idx, (((scrambled_output[(i<<1)>>5])>>((i<<1)&0x1f))&1), + (((scrambled_output[((i<<1)+1)>>5])>>(((i<<1)+1)&0x1f))&1), mod_dci[(i<<1)], mod_dci[(i<<1)+1]); #endif } @@ -307,6 +321,7 @@ printf("\n"); else { // DCI payload ((int16_t*)txdataF[aa])[(l*frame_parms.ofdm_symbol_size + k)<<1] = (a * mod_dci[dci_idx<<1]) >> 15; ((int16_t*)txdataF[aa])[((l*frame_parms.ofdm_symbol_size + k)<<1) + 1] = (a * mod_dci[(dci_idx<<1) + 1]) >> 15; + //printf("dci output %d %d\n",(a * mod_dci[dci_idx<<1]) >> 15, (a * mod_dci[(dci_idx<<1) + 1]) >> 15); dci_idx++; } k++; diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci.h b/openair1/PHY/NR_TRANSPORT/nr_dci.h index f7c885b499..62236eff32 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci.h +++ b/openair1/PHY/NR_TRANSPORT/nr_dci.h @@ -41,7 +41,7 @@ uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars, nfapi_nr_config_request_t config); void nr_pdcch_scrambling(uint32_t *in, - uint8_t size, + uint16_t size, uint32_t Nid, uint32_t n_RNTI, uint32_t* out); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index 2a59863977..1607585181 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -75,7 +75,7 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP, pdu_rel15->vrb_to_prb_mapping = 0; pdu_rel15->mcs = 12; pdu_rel15->tb_scaling = 1; - LOG_I(MAC, "[gNB scheduler phytest] DCI type 1 payload: freq_alloc %d, time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d\n", + LOG_D(MAC, "[gNB scheduler phytest] DCI type 1 payload: freq_alloc %d, time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d\n", pdu_rel15->frequency_domain_assignment, pdu_rel15->time_domain_assignment, pdu_rel15->vrb_to_prb_mapping, @@ -86,7 +86,7 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP, params_rel15->rnti_type = NFAPI_NR_RNTI_RA; params_rel15->dci_format = NFAPI_NR_DL_DCI_FORMAT_1_0; //params_rel15->aggregation_level = 1; - LOG_I(MAC, "DCI type 1 params: rmsi_pdcch_config %d, rnti %d, rnti_type %d, dci_format %d\n \ + LOG_D(MAC, "DCI type 1 params: rmsi_pdcch_config %d, rnti %d, rnti_type %d, dci_format %d\n \ coreset params: mux_pattern %d, n_rb %d, n_symb %d, rb_offset %d \n \ ss params : nb_ss_sets_per_slot %d, first symb %d, nb_slots %d, sfn_mod2 %d, first slot %d\n", 0, diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index d502e907e9..37d72e0edf 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -241,7 +241,7 @@ uint8_t do_MIB_NR(rrc_gNB_carrier_data_t *carrier, default: AssertFatal(1==0,"Unknown subCarrierSpacingCommon %d\n",subCarrierSpacingCommon); } - +mib->message.choice.mib->subCarrierSpacingCommon = 1; switch (dmrs_TypeA_Position) { case 2: mib->message.choice.mib->dmrs_TypeA_Position = NR_MIB__dmrs_TypeA_Position_pos2; From 6a2dc297c7ba402101f98823c8a7bab15f797741 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Fri, 12 Oct 2018 07:21:05 +0200 Subject: [PATCH 308/379] compilation of nr-uesoftmodem fixed (polar_decoder parameter list) --- openair1/PHY/CODING/TESTBENCH/polartest.c | 18 +--- .../CODING/nrPolar_tools/nr_polar_decoder.c | 93 ++++--------------- .../PHY/CODING/nrPolar_tools/nr_polar_defs.h | 23 +---- 3 files changed, 24 insertions(+), 110 deletions(-) diff --git a/openair1/PHY/CODING/TESTBENCH/polartest.c b/openair1/PHY/CODING/TESTBENCH/polartest.c index e23c69215a..f5390aeb70 100644 --- a/openair1/PHY/CODING/TESTBENCH/polartest.c +++ b/openair1/PHY/CODING/TESTBENCH/polartest.c @@ -191,15 +191,9 @@ int main(int argc, char *argv[]) { start_meas(&timeDecoder); if (decoder_int8==0) decoderState = polar_decoder(channelOutput, estimatedOutput, &nrPolar_params, - decoderListSize, aPrioriArray, pathMetricAppr, - &polar_decoder_init,&polar_rate_matching,&decoding, - &bit_extraction,&deinterleaving,&sorting,&path_metric,&update_LLR); + decoderListSize, aPrioriArray, pathMetricAppr); else - decoderState = polar_decoder_int8_new(channelOutput_int8, estimatedOutput, &nrPolar_params, - decoderListSize, &polar_decoder_init,&polar_rate_matching, - &decoding,&bit_extraction,&deinterleaving, - &sorting,&path_metric,&update_LLR, - generate_optim_code); + decoderState = polar_decoder_int8_new(channelOutput_int8, estimatedOutput, &nrPolar_params); stop_meas(&timeDecoder); //calculate errors @@ -237,15 +231,7 @@ int main(int argc, char *argv[]) { decoderListSize, pathMetricAppr, SNR, ((double)blockErrorCumulative/iterations), ((double)bitErrorCumulative / (iterations*testLength)), (timeEncoderCumulative/iterations),timeDecoderCumulative/iterations); - printf("decoding init %9.3fus\n",polar_decoder_init.diff/(cpu_freq_GHz*1000.0*polar_decoder_init.trials)); - printf("decoding polar_rate_matching %9.3fus\n",polar_rate_matching.diff/(cpu_freq_GHz*1000.0*polar_rate_matching.trials)); - printf("decoding decoding %9.3fus\n",decoding.diff/(cpu_freq_GHz*1000.0*decoding.trials)); - printf("decoding bit_extraction %9.3fus\n",bit_extraction.diff/(cpu_freq_GHz*1000.0*bit_extraction.trials)); - printf("decoding deinterleaving %9.3fus\n",deinterleaving.diff/(cpu_freq_GHz*1000.0*deinterleaving.trials)); - printf("decoding path_metric %9.3fus\n",path_metric.diff/(cpu_freq_GHz*1000.0*decoding.trials)); - printf("decoding sorting %9.3fus\n",sorting.diff/(cpu_freq_GHz*1000.0*decoding.trials)); - printf("decoding updateLLR %9.3fus\n",update_LLR.diff/(cpu_freq_GHz*1000.0*decoding.trials)); blockErrorCumulative = 0; bitErrorCumulative = 0; timeEncoderCumulative = 0; timeDecoderCumulative = 0; } diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c index 67fe489424..349d367ce5 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c @@ -27,7 +27,6 @@ #include "PHY/CODING/nrPolar_tools/nr_polar_defs.h" #include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h" -#include "PHY/TOOLS/time_meas.h" int8_t polar_decoder( @@ -36,19 +35,7 @@ int8_t polar_decoder( t_nrPolar_params *polarParams, uint8_t listSize, double *aPrioriPayload, - uint8_t pathMetricAppr, - time_stats_t *init, - time_stats_t *polar_rate_matching, - time_stats_t *decoding, - time_stats_t *bit_extraction, - time_stats_t *deinterleaving, - time_stats_t *sorting, - time_stats_t *path_metric, - time_stats_t *update_LLR) -{ - - start_meas(init); - + uint8_t pathMetricAppr) { uint8_t **extended_crc_generator_matrix = malloc(polarParams->K * sizeof(uint8_t *)); //G_P3 uint8_t **tempECGM = malloc(polarParams->K * sizeof(uint8_t *)); //G_P2 for (int i = 0; i < polarParams->K; i++){ @@ -102,18 +89,14 @@ int8_t polar_decoder( } - stop_meas(init); - start_meas(polar_rate_matching); double d_tilde[polarParams->N];// = malloc(sizeof(double) * polarParams->N); nr_polar_rate_matching(input, d_tilde, polarParams->rate_matching_pattern, polarParams->K, polarParams->N, polarParams->encoderLength); memcpy((void*)&dlist[0].llr[polarParams->n][0],(void*)&d_tilde[0],sizeof(double)*polarParams->N); - stop_meas(polar_rate_matching); /* * SCL polar decoder. */ - start_meas(decoding); uint32_t nonFrozenBit=0; uint8_t currentListSize=1; @@ -128,9 +111,7 @@ int8_t polar_decoder( // printf("***************** BIT %d (currentListSize %d, information_bit_pattern %d)\n", // currentBit,currentListSize,polarParams->information_bit_pattern[currentBit]); - start_meas(update_LLR); updateLLR(sorted_dlist, llrUpdated, bitUpdated, currentListSize, currentBit, 0, polarParams->N, (polarParams->n+1), pathMetricAppr); - stop_meas(update_LLR); if (polarParams->information_bit_pattern[currentBit]==0) { //Frozen bit. updatePathMetric(sorted_dlist,currentListSize, 0, currentBit, pathMetricAppr); //approximation=0 --> 11b, approximation=1 --> 12 @@ -148,11 +129,9 @@ int8_t polar_decoder( updateCrcChecksum(sorted_dlist, extended_crc_generator_matrix, currentListSize, nonFrozenBit, polarParams->crcParityBits); } else { - start_meas(path_metric); + updatePathMetric2(sorted_dlist, currentListSize, currentBit, pathMetricAppr); - stop_meas(path_metric); - - start_meas(sorting); + if (currentListSize <= listSize/2) { @@ -243,7 +222,6 @@ int8_t polar_decoder( sorted_dlist[i] = temp_dlist[listIndex[i]]; } } - stop_meas(sorting); } nonFrozenBit++; @@ -260,14 +238,10 @@ int8_t polar_decoder( if (crcState == 1) { for (int j = 0; j < polarParams->N; j++) polarParams->nr_polar_u[j]=sorted_dlist[i]->bit[0][j]; - start_meas(bit_extraction); //Extract the information bits (û to ĉ) nr_polar_info_bit_extraction(polarParams->nr_polar_u, polarParams->nr_polar_cPrime, polarParams->information_bit_pattern, polarParams->N); - stop_meas(bit_extraction); //Deinterleaving (ĉ to b) - start_meas(deinterleaving); nr_polar_deinterleaver(polarParams->nr_polar_cPrime, polarParams->nr_polar_b, polarParams->interleaving_pattern, polarParams->K); - stop_meas(deinterleaving); //Remove the CRC (â) for (int j = 0; j < polarParams->payloadBits; j++) output[j]=polarParams->nr_polar_b[j]; @@ -285,7 +259,7 @@ int8_t polar_decoder( }*/ nr_free_uint8_t_2D_array(extended_crc_generator_matrix, polarParams->K); nr_free_uint8_t_2D_array(tempECGM, polarParams->K); - stop_meas(decoding); + return(0); } @@ -296,15 +270,8 @@ int8_t polar_decoder_int8(int16_t *input, uint8_t *output, t_nrPolar_params *polarParams, uint8_t listSize, - time_stats_t *init, - time_stats_t *polar_rate_matching, - time_stats_t *decoding, - time_stats_t *bit_extraction, - time_stats_t *deinterleaving, - time_stats_t *sorting, - time_stats_t *path_metric, - time_stats_t *update_LLR, int generate_optim_code) + { @@ -318,7 +285,6 @@ int8_t polar_decoder_int8(int16_t *input, decoder_list_int8_t dlist[2*listSize]; - start_meas(init); for ( int i=0;i<2*listSize;i++) { // dlist[i].bit = nr_alloc_uint8_t_2D_array((polarParams->n+1), polarParams->N); @@ -332,7 +298,6 @@ int8_t polar_decoder_int8(int16_t *input, dlist[i].pathMetric = 0; } - stop_meas(init); if (generate_optim_code == 1 || polarParams->decoder_kernel==NULL) { for (int i=0; iN; i++) { @@ -345,7 +310,6 @@ int8_t polar_decoder_int8(int16_t *input, - start_meas(polar_rate_matching); int16_t d_tilde[polarParams->N];// = malloc(sizeof(double) * polarParams->N); nr_polar_rate_matching_int8(input, d_tilde, polarParams->rate_matching_pattern, polarParams->K, polarParams->N, polarParams->encoderLength); @@ -354,12 +318,11 @@ int8_t polar_decoder_int8(int16_t *input, else if (d_tilde[i]>127) d_tilde[i]=128; } memcpy((void*)&dlist[0].llr[polarParams->n][0],(void*)&d_tilde[0],sizeof(int16_t)*polarParams->N); - stop_meas(polar_rate_matching); /* * SCL polar decoder. */ - start_meas(decoding); + uint32_t nonFrozenBit=0; uint8_t currentListSize=1; @@ -383,18 +346,16 @@ int8_t polar_decoder_int8(int16_t *input, printf("***************** BIT %d (currentListSize %d, information_bit_pattern %d)\n", currentBit,currentListSize,polarParams->information_bit_pattern[currentBit]); - start_meas(update_LLR); + updateLLR_int8(sorted_dlist, llrUpdated, bitUpdated, currentListSize, currentBit, 0, polarParams->N, (polarParams->n+1),generate_optim_code,fd); - stop_meas(update_LLR); if (polarParams->information_bit_pattern[currentBit]==0) { //Frozen bit. updatePathMetric0_int8(sorted_dlist,currentListSize, currentBit,generate_optim_code,fd); //approximation=0 --> 11b, approximation=1 --> 12 } else { //Information or CRC bit. - start_meas(path_metric); + updatePathMetric2_int8(sorted_dlist, currentListSize, currentBit,generate_optim_code,fd); - stop_meas(path_metric); + - start_meas(sorting); if (currentListSize <= listSize/2) { // until listsize is full we need to copy bit and LLR arrays to new entries @@ -426,7 +387,6 @@ int8_t polar_decoder_int8(int16_t *input, currentListSize = listSize; } - stop_meas(sorting); nonFrozenBit++; } @@ -446,14 +406,11 @@ int8_t polar_decoder_int8(int16_t *input, if (crcState == 1) { for (int j = 0; j < polarParams->N; j++) polarParams->nr_polar_u[j]=sorted_dlist[i]->bit[0][j]; - start_meas(bit_extraction); + //Extract the information bits (û to ĉ) nr_polar_info_bit_extraction(polarParams->nr_polar_u, polarParams->nr_polar_cPrime, polarParams->information_bit_pattern, polarParams->N); - stop_meas(bit_extraction); //Deinterleaving (ĉ to b) - start_meas(deinterleaving); nr_polar_deinterleaver(polarParams->nr_polar_cPrime, polarParams->nr_polar_b, polarParams->interleaving_pattern, polarParams->K); - stop_meas(deinterleaving); //Remove the CRC (â) for (int j = 0; j < polarParams->payloadBits; j++) output[j]=polarParams->nr_polar_b[j]; @@ -469,31 +426,16 @@ int8_t polar_decoder_int8(int16_t *input, nr_free_double_2D_array(dlist[i].llr, (polarParams->n+1)); free(dlist[i].crcChecksum); }*/ - stop_meas(decoding); return(0); } int8_t polar_decoder_int8_new(int16_t *input, uint8_t *output, - t_nrPolar_params *polarParams, - uint8_t listSize, - time_stats_t *init, - time_stats_t *polar_rate_matching, - time_stats_t *decoding, - time_stats_t *bit_extraction, - time_stats_t *deinterleaving, - time_stats_t *sorting, - time_stats_t *path_metric, - time_stats_t *update_LLR, - int generate_optim_code) + t_nrPolar_params *polarParams) { - start_meas(init); - stop_meas(init); - - start_meas(polar_rate_matching); int16_t d_tilde[polarParams->N];// = malloc(sizeof(double) * polarParams->N); nr_polar_rate_matching_int8(input, d_tilde, polarParams->rate_matching_pattern, polarParams->K, polarParams->N, polarParams->encoderLength); @@ -502,23 +444,22 @@ int8_t polar_decoder_int8_new(int16_t *input, else if (d_tilde[i]>127) d_tilde[i]=128; } memcpy((void*)&polarParams->tree.root->alpha[0],(void*)&d_tilde[0],sizeof(int16_t)*polarParams->N); - stop_meas(polar_rate_matching); /* * SCL polar decoder. */ - start_meas(decoding); + generic_polar_decoder(polarParams,polarParams->tree.root); - start_meas(bit_extraction); + //Extract the information bits (û to ĉ) nr_polar_info_bit_extraction(polarParams->nr_polar_u, polarParams->nr_polar_cPrime, polarParams->information_bit_pattern, polarParams->N); - stop_meas(bit_extraction); + //Deinterleaving (ĉ to b) - start_meas(deinterleaving); + nr_polar_deinterleaver(polarParams->nr_polar_cPrime, polarParams->nr_polar_b, polarParams->interleaving_pattern, polarParams->K); - stop_meas(deinterleaving); + //Remove the CRC (â) for (int j = 0; j < polarParams->payloadBits; j++) output[j]=polarParams->nr_polar_b[j]; @@ -532,6 +473,6 @@ int8_t polar_decoder_int8_new(int16_t *input, nr_free_double_2D_array(dlist[i].llr, (polarParams->n+1)); free(dlist[i].crcChecksum); }*/ - stop_meas(decoding); + return(0); } diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h index 34c2e9a50b..23314593a5 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h @@ -30,7 +30,6 @@ #include #include -#include "PHY/TOOLS/time_meas.h" static const uint8_t nr_polar_subblock_interleaver_pattern[32] = { 0, 1, 2, 4, 3, 5, 6, 7, 8, 16, 9, 17, 10, 18, 11, 19, 12, 20, 13, 21, 14, 22, 15, 23, 24, 25, 26, 28, 27, 29, 30, 31 }; @@ -126,30 +125,18 @@ void polar_encoder(uint8_t *input, uint8_t *output, t_nrPolar_params* polarParam void nr_polar_kernal_operation(uint8_t *u, uint8_t *d, uint16_t N); int8_t polar_decoder(double *input, uint8_t *output, t_nrPolar_params *polarParams, - uint8_t listSize, double *aPrioriPayload, uint8_t pathMetricAppr, - time_stats_t *init, - time_stats_t *polar_rate_matching, - time_stats_t *decoding, - time_stats_t *bit_extraction, - time_stats_t *deinterleaving, - time_stats_t *sorting, - time_stats_t *path_metric, - time_stats_t *update_LLR); + uint8_t listSize, double *aPrioriPayload, uint8_t pathMetricAppr); int8_t polar_decoder_int8(int16_t *input, uint8_t *output, t_nrPolar_params *polarParams, uint8_t listSize, - time_stats_t *init, - time_stats_t *polar_rate_matching, - time_stats_t *decoding, - time_stats_t *bit_extraction, - time_stats_t *deinterleaving, - time_stats_t *sorting, - time_stats_t *path_metric, - time_stats_t *update_LLR, int generate_optim_code); +int8_t polar_decoder_int8_new(int16_t *input, + uint8_t *output, + t_nrPolar_params *polarParams); + void nr_polar_llrtableinit(void); From 307ac58a5acb2fa3d5e8e1edb35c2f66aecc0465 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Fri, 12 Oct 2018 11:18:52 +0200 Subject: [PATCH 309/379] CI: enhancements on the main python script: -- at the end of eNB run, eNB log file is retrieved and analyzed for SegFault / Assertions / Real Time issues if any found, added to the HTML report -- When script fails to retrieve UE IP address, try again and report in HTML report if failed -- Core is dumped during seg fault event and added to eNB run log zip artifact Signed-off-by: Raphael Defosseux --- ci-scripts/main.py | 203 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 154 insertions(+), 49 deletions(-) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 1c10e07edc..a12c2bbfcb 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -33,6 +33,23 @@ #----------------------------------------------------------- Version = '0.1' +#----------------------------------------------------------- +# Constants +#----------------------------------------------------------- +ALL_PROCESSES_OK = 0 +ENB_PROCESS_FAILED = -1 +ENB_PROCESS_OK = +1 +ENB_PROCESS_SEG_FAULT = -11 +ENB_PROCESS_ASSERTION = -12 +ENB_PROCESS_REALTIME_ISSUE = -13 +HSS_PROCESS_FAILED = -2 +HSS_PROCESS_OK = +2 +MME_PROCESS_FAILED = -3 +MME_PROCESS_OK = +3 +SPGW_PROCESS_FAILED = -4 +SPGW_PROCESS_OK = +4 +UE_IP_ADDRESS_ISSUE = -5 + #----------------------------------------------------------- # Import #----------------------------------------------------------- @@ -77,6 +94,7 @@ class SSHConnection(): self.desc = '' self.Build_eNB_args = '' self.Initialize_eNB_args = '' + self.eNBLogFile = '' self.ping_args = '' self.ping_packetloss_threshold = '' self.iperf_args = '' @@ -88,6 +106,7 @@ class SSHConnection(): self.htmlHeaderCreated = False self.htmlFooterCreated = False self.htmlUEConnected = 0 + self.htmleNBFailureMsg = '' def open(self, ipaddress, username, password): count = 0 @@ -251,7 +270,7 @@ class SSHConnection(): self.command('echo ' + self.eNBPassword + ' | sudo -S mv log/* ' + 'build_log_' + SSH.testCase_id, '\$', 5) self.command('echo ' + self.eNBPassword + ' | sudo -S mv compile_oai_enb.log ' + 'build_log_' + SSH.testCase_id, '\$', 5) self.close() - self.CreateHtmlTestRow(self.Build_eNB_args, 'OK', 0) + self.CreateHtmlTestRow(self.Build_eNB_args, 'OK', ALL_PROCESSES_OK) def InitializeHSS(self): if self.EPCIPAddress == '' or self.EPCUserName == '' or self.EPCPassword == '' or self.EPCSourceCodePath == '' or self.EPCType == '': @@ -272,7 +291,7 @@ class SSHConnection(): self.command('echo ' + self.EPCPassword + ' | sudo -S rm -f hss.log daemon.log', '\$', 5) self.command('echo ' + self.EPCPassword + ' | sudo -S echo "Starting sudo session" && sudo daemon --unsafe --name=simulated_hss --chdir=/opt/hss_sim0609 ./starthss_real ', '\$', 5) self.close() - self.CreateHtmlTestRow(self.EPCType, 'OK', 0) + self.CreateHtmlTestRow(self.EPCType, 'OK', ALL_PROCESSES_OK) def InitializeMME(self): if self.EPCIPAddress == '' or self.EPCUserName == '' or self.EPCPassword == '' or self.EPCSourceCodePath == '' or self.EPCType == '': @@ -294,7 +313,7 @@ class SSHConnection(): self.command('cd /opt/ltebox/tools', '\$', 5) self.command('echo ' + self.EPCPassword + ' | sudo -S ./start_mme', '\$', 5) self.close() - self.CreateHtmlTestRow(self.EPCType, 'OK', 0) + self.CreateHtmlTestRow(self.EPCType, 'OK', ALL_PROCESSES_OK) def InitializeSPGW(self): if self.EPCIPAddress == '' or self.EPCUserName == '' or self.EPCPassword == '' or self.EPCSourceCodePath == '' or self.EPCType == '': @@ -310,7 +329,7 @@ class SSHConnection(): self.command('cd /opt/ltebox/tools', '\$', 5) self.command('echo ' + self.EPCPassword + ' | sudo -S ./start_xGw', '\$', 5) self.close() - self.CreateHtmlTestRow(self.EPCType, 'OK', 0) + self.CreateHtmlTestRow(self.EPCType, 'OK', ALL_PROCESSES_OK) def InitializeeNB(self): if self.eNBIPAddress == '' or self.eNBUserName == '' or self.eNBPassword == '' or self.eNBSourceCodePath == '': @@ -343,10 +362,11 @@ class SSHConnection(): # Launch eNB with the modified config file self.command('source oaienv', '\$', 5) self.command('cd cmake_targets', '\$', 5) - self.command('echo "./lte_build_oai/build/lte-softmodem -O ' + self.eNBSourceCodePath + '/' + ci_full_config_file + extra_options + '" > ./my-lte-softmodem-run.sh ', '\$', 5) + self.command('echo "ulimit -c unlimited && ./lte_build_oai/build/lte-softmodem -O ' + self.eNBSourceCodePath + '/' + ci_full_config_file + extra_options + '" > ./my-lte-softmodem-run.sh ', '\$', 5) self.command('chmod 775 ./my-lte-softmodem-run.sh ', '\$', 5) self.command('echo ' + self.eNBPassword + ' | sudo -S rm -Rf enb_' + SSH.testCase_id + '.log', '\$', 5) self.command('echo ' + self.eNBPassword + ' | sudo -S -E daemon --inherit --unsafe --name=enb_daemon --chdir=' + self.eNBSourceCodePath + '/cmake_targets -o ' + self.eNBSourceCodePath + '/cmake_targets/enb_' + SSH.testCase_id + '.log ./my-lte-softmodem-run.sh', '\$', 5) + self.eNBLogFile = 'enb_' + SSH.testCase_id + '.log' time.sleep(6) doLoop = True loopCounter = 10 @@ -355,7 +375,7 @@ class SSHConnection(): if (loopCounter == 0): doLoop = False logging.error('\u001B[1;37;41m eNB logging system did not show got sync! See with attach later \u001B[0m') - self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'KO', 0) + self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'KO', ALL_PROCESSES_OK) self.CreateHtmlFooter() self.close() sys.exit(1) @@ -366,7 +386,7 @@ class SSHConnection(): time.sleep(6) else: doLoop = False - self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'OK', 0) + self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'OK', ALL_PROCESSES_OK) logging.debug('\u001B[1m Initialize eNB Completed\u001B[0m') self.close() @@ -399,7 +419,7 @@ class SSHConnection(): multi_jobs.append(p) for job in multi_jobs: job.join() - self.CreateHtmlTestRow('N/A', 'OK', 0) + self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK) def AttachUE_common(self, device_id, statusQueue, lock): try: @@ -470,7 +490,8 @@ class SSHConnection(): job.join() if (status_queue.empty()): - self.CreateHtmlTestRow('N/A', 'KO', 0) + self.CreateHtmlTestRow('N/A', 'KO', ALL_PROCESSES_OK) + self.CreateHtmlFooter() sys.exit(1) else: attach_status = True @@ -520,7 +541,7 @@ class SSHConnection(): multi_jobs.append(p) for job in multi_jobs: job.join() - self.CreateHtmlTestRow('N/A', 'OK', 0) + self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK) def RebootUE_common(self, device_id): try: @@ -579,7 +600,7 @@ class SSHConnection(): multi_jobs.append(p) for job in multi_jobs: job.join() - self.CreateHtmlTestRow('N/A', 'OK', 0) + self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK) def GetAllUEDevices(self, terminate_ue_flag): if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '': @@ -598,22 +619,32 @@ class SSHConnection(): if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '': Usage() sys.exit('Insufficient Parameter') + ue_ip_status = 0 self.UEIPAddresses = [] self.open(self.ADBIPAddress, self.ADBUserName, self.ADBPassword) for device_id in self.UEDevices: - self.command('stdbuf -o0 adb -s ' + device_id + ' shell ip addr show | grep rmnet', '\$', 15) - result = re.search('inet (?P[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\/[0-9]+[0-9a-zA-Z\.\s]+', str(self.ssh.before)) - if result is None: - logging.debug('\u001B[1;37;41m UE IP Address Not Found! \u001B[0m') - sys.exit(1) + count = 0 + while count < 4: + self.command('stdbuf -o0 adb -s ' + device_id + ' shell ip addr show | grep rmnet', '\$', 15) + result = re.search('inet (?P[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\/[0-9]+[0-9a-zA-Z\.\s]+', str(self.ssh.before)) + if result is None: + logging.debug('\u001B[1;37;41m UE IP Address Not Found! \u001B[0m') + count += 1 + else: + count = 10 + if count < 9: + ue_ip_status -= 1 + continue UE_IPAddress = result.group('ueipaddress') logging.debug('\u001B[1mUE (' + device_id + ') IP Address is ' + UE_IPAddress + '\u001B[0m') for ueipaddress in self.UEIPAddresses: if ueipaddress == UE_IPAddress: logging.debug('\u001B[1mUE (' + device_id + ') IP Address ' + UE_IPAddress + 'has been existed!' + '\u001B[0m') - sys.exit(1) + ue_ip_status -= 1 + continue self.UEIPAddresses.append(UE_IPAddress) self.close() + return ue_ip_status def Ping_common(self, lock, UE_IPAddress, device_id,statusQueue): try: @@ -697,7 +728,11 @@ class SSHConnection(): self.CreateHtmlTestRow(self.ping_args, 'KO', pStatus) self.CreateHtmlFooter() sys.exit(1) - self.GetAllUEIPAddresses() + ueIpStatus = self.GetAllUEIPAddresses() + if (ueIpStatus < 0): + self.CreateHtmlTestRow(self.ping_args, 'KO', UE_IP_ADDRESS_ISSUE) + self.CreateHtmlFooter() + sys.exit(1) multi_jobs = [] i = 0 lock = Lock() @@ -713,7 +748,7 @@ class SSHConnection(): job.join() if (status_queue.empty()): - self.CreateHtmlTestRow(self.ping_args, 'KO', 0) + self.CreateHtmlTestRow(self.ping_args, 'KO', ALL_PROCESSES_OK) self.CreateHtmlFooter() sys.exit(1) else: @@ -1174,7 +1209,11 @@ class SSHConnection(): self.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus) self.CreateHtmlFooter() sys.exit(1) - self.GetAllUEIPAddresses() + ueIpStatus = self.GetAllUEIPAddresses() + if (ueIpStatus < 0): + self.CreateHtmlTestRow(self.ping_args, 'KO', UE_IP_ADDRESS_ISSUE) + self.CreateHtmlFooter() + sys.exit(1) multi_jobs = [] i = 0 ue_num = len(self.UEIPAddresses) @@ -1191,7 +1230,7 @@ class SSHConnection(): job.join() if (status_queue.empty()): - self.CreateHtmlTestRow(self.iperf_args, 'KO', 0) + self.CreateHtmlTestRow(self.iperf_args, 'KO', ALL_PROCESSES_OK) self.CreateHtmlFooter() sys.exit(1) else: @@ -1249,6 +1288,13 @@ class SSHConnection(): status = status_queue.get() if (status < 0): result = status + if result == ENB_PROCESS_FAILED: + fileCheck = re.search('enb_', str(self.eNBLogFile)) + if fileCheck is not None: + self.copyin(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, self.eNBSourceCodePath + '/cmake_targets/' + self.eNBLogFile, '.') + logStatus = self.AnalyzeLogFile_eNB() + if logStatus < 0: + result = logStatus return result def CheckeNBProcess(self, status_queue): @@ -1258,10 +1304,9 @@ class SSHConnection(): result = re.search('lte-softmodem', str(self.ssh.before)) if result is None: logging.debug('\u001B[1;37;41m eNB Process Not Found! \u001B[0m') - #sys.exit(1) - status_queue.put(-1) + status_queue.put(ENB_PROCESS_FAILED) else: - status_queue.put(1) + status_queue.put(ENB_PROCESS_OK) self.close() except: os.kill(os.getppid(),signal.SIGUSR1) @@ -1276,10 +1321,9 @@ class SSHConnection(): result = re.search('hss_sim s6as diam_hss', str(self.ssh.before)) if result is None: logging.debug('\u001B[1;37;41m HSS Process Not Found! \u001B[0m') - status_queue.put(-2) - #sys.exit(1) + status_queue.put(HSS_PROCESS_FAILED) else: - status_queue.put(2) + status_queue.put(HSS_PROCESS_OK) self.close() except: os.kill(os.getppid(),signal.SIGUSR1) @@ -1294,10 +1338,9 @@ class SSHConnection(): result = re.search('mme', str(self.ssh.before)) if result is None: logging.debug('\u001B[1;37;41m MME Process Not Found! \u001B[0m') - status_queue.put(-3) - #sys.exit(1) + status_queue.put(MME_PROCESS_FAILED) else: - status_queue.put(3) + status_queue.put(MME_PROCESS_OK) self.close() except: os.kill(os.getppid(),signal.SIGUSR1) @@ -1313,14 +1356,53 @@ class SSHConnection(): result = re.search('xGw', str(self.ssh.before)) if result is None: logging.debug('\u001B[1;37;41m SPGW Process Not Found! \u001B[0m') - status_queue.put(-4) - #sys.exit(1) + status_queue.put(SPGW_PROCESS_FAILED) else: - status_queue.put(4) + status_queue.put(SPGW_PROCESS_OK) self.close() except: os.kill(os.getppid(),signal.SIGUSR1) + def AnalyzeLogFile_eNB(self): + if (not os.path.isfile('./' + SSH.eNBLogFile)): + return -1 + enb_log_file = open('./' + SSH.eNBLogFile, 'r') + foundAssertion = False + msgAssertion = '' + msgLine = 0 + foundSegFault = False + foundRealTimeIssue = False + for line in enb_log_file.readlines(): + result = re.search('[Ss]egmentation [Ff]ault', str(line)) + if result is not None: + foundSegFault = True + result = re.search('[Cc]ore [dD]ump', str(line)) + if result is not None: + foundSegFault = True + result = re.search('[Aa]ssertion', str(line)) + if result is not None: + foundAssertion = True + result = re.search('LLL', str(line)) + if result is not None: + foundRealTimeIssue = True + if foundAssertion and (msgLine < 3): + msgLine += 1 + msgAssertion += str(line) + enb_log_file.close() + if foundSegFault: + logging.debug('\u001B[1;37;41m eNB ended with a Segmentation Fault! \u001B[0m') + self.htmleNBFailureMsg = 'eNB ended with a Segmentation Fault!' + return ENB_PROCESS_SEG_FAULT + if foundAssertion: + logging.debug('\u001B[1;37;41m eNB ended with an assertion! \u001B[0m') + self.htmleNBFailureMsg = msgAssertion + return ENB_PROCESS_ASSERTION + if foundRealTimeIssue: + logging.debug('\u001B[1;37;41m eNB faced real time issues! \u001B[0m') + self.htmleNBFailureMsg = 'eNB faced real time issues' + return ENB_PROCESS_REALTIME_ISSUE + return 0 + def TerminateeNB(self): self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword) self.command('cd ' + self.eNBSourceCodePath + '/cmake_targets', '\$', 5) @@ -1333,7 +1415,19 @@ class SSHConnection(): if result is not None: self.command('echo ' + self.eNBPassword + ' | sudo -S killall --signal SIGKILL lte-softmodem || true', '\$', 5) self.close() - self.CreateHtmlTestRow('N/A', 'OK', 0) + result = re.search('enb_', str(self.eNBLogFile)) + if result is not None: + self.copyin(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, self.eNBSourceCodePath + '/cmake_targets/' + self.eNBLogFile, '.') + logStatus = self.AnalyzeLogFile_eNB() + if (logStatus < 0): + self.CreateHtmlTestRow('N/A', 'KO', logStatus) + self.CreateHtmlFooter() + sys.exit(1) + else: + self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK) + else: + self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK) + self.eNBLogFile = '' def TerminateHSS(self): self.open(self.EPCIPAddress, self.EPCUserName, self.EPCPassword) @@ -1355,7 +1449,7 @@ class SSHConnection(): self.command('echo ' + self.EPCPassword + ' | sudo -S ./kill_hss.sh', '\$', 5) self.command('rm ./kill_hss.sh', '\$', 5) self.close() - self.CreateHtmlTestRow('N/A', 'OK', 0) + self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK) def TerminateMME(self): self.open(self.EPCIPAddress, self.EPCUserName, self.EPCPassword) @@ -1370,7 +1464,7 @@ class SSHConnection(): self.command('cd /opt/ltebox/tools', '\$', 5) self.command('echo ' + self.EPCPassword + ' | sudo -S ./stop_mme', '\$', 5) self.close() - self.CreateHtmlTestRow('N/A', 'OK', 0) + self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK) def TerminateSPGW(self): self.open(self.EPCIPAddress, self.EPCUserName, self.EPCPassword) @@ -1385,7 +1479,7 @@ class SSHConnection(): self.command('cd /opt/ltebox/tools', '\$', 5) self.command('echo ' + self.EPCPassword + ' | sudo -S ./stop_xGw', '\$', 5) self.close() - self.CreateHtmlTestRow('N/A', 'OK', 0) + self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK) def TerminateUE_common(self, device_id): try: @@ -1413,7 +1507,7 @@ class SSHConnection(): multi_jobs.append(p) for job in multi_jobs: job.join() - self.CreateHtmlTestRow('N/A', 'OK', 0) + self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK) def LogCollectBuild(self): self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword) @@ -1428,9 +1522,9 @@ class SSHConnection(): self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword) self.command('cd ' + self.eNBSourceCodePath, '\$', 5) self.command('cd cmake_targets', '\$', 5) - self.command('rm -f enb.log.zip', '\$', 5) - self.command('zip enb.log.zip enb*.log', '\$', 60) - self.command('echo ' + self.eNBPassword + ' | sudo -S rm enb*.log', '\$', 5) + self.command('echo ' + self.eNBPassword + ' | sudo -S rm -f enb.log.zip', '\$', 5) + self.command('echo ' + self.eNBPassword + ' | sudo -S zip enb.log.zip enb*.log core*', '\$', 60) + self.command('echo ' + self.eNBPassword + ' | sudo -S rm enb*.log core*', '\$', 5) self.close() def LogCollectPing(self): @@ -1592,22 +1686,33 @@ class SSHConnection(): elif (str(status) == 'KO'): if (processesStatus == 0): self.htmlFile.write(' \n') - elif (processesStatus == -1): + elif (processesStatus == ENB_PROCESS_FAILED): self.htmlFile.write(' \n') - elif (processesStatus == -2): + elif (processesStatus == ENB_PROCESS_SEG_FAULT): + self.htmlFile.write(' \n') + elif (processesStatus == ENB_PROCESS_ASSERTION): + self.htmlFile.write(' \n') + elif (processesStatus == ENB_PROCESS_REALTIME_ISSUE): + self.htmlFile.write(' \n') - elif (processesStatus == -3): + elif (processesStatus == MME_PROCESS_FAILED): self.htmlFile.write(' \n') - elif (processesStatus == -4): + elif (processesStatus == SPGW_PROCESS_FAILED): self.htmlFile.write(' \n') + elif (processesStatus == UE_IP_ADDRESS_ISSUE): + self.htmlFile.write(' \n') else: self.htmlFile.write(' \n') else: self.htmlFile.write(' \n') - i = 0 - while (i < self.htmlUEConnected): - self.htmlFile.write(' \n') - i += 1 + if (processesStatus == ENB_PROCESS_ASSERTION): + self.htmlFile.write(' \n') + else: + i = 0 + while (i < self.htmlUEConnected): + self.htmlFile.write(' \n') + i += 1 self.htmlFile.write(' \n') def CreateHtmlTestRowQueue(self, options, status, ue_status, ue_queue): From d7441543341707d5722db5fb587e600e893b1aa6 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Fri, 12 Oct 2018 12:23:09 +0200 Subject: [PATCH 310/379] CI: fixing the basic-simulator configuration files -> having 2 PLMN IDs in the table since UE seems to pick 2nd one Signed-off-by: Raphael Defosseux --- ci-scripts/conf_files/lte-fdd-basic-sim.conf | 5 ++++- ci-scripts/conf_files/lte-tdd-basic-sim.conf | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ci-scripts/conf_files/lte-fdd-basic-sim.conf b/ci-scripts/conf_files/lte-fdd-basic-sim.conf index 0211e126a1..6761a5881e 100644 --- a/ci-scripts/conf_files/lte-fdd-basic-sim.conf +++ b/ci-scripts/conf_files/lte-fdd-basic-sim.conf @@ -14,7 +14,10 @@ eNBs = // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = 1; - plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } ); + plmn_list = ( + { mcc = 208; mnc = 92; mnc_length = 2; }, + { mcc = 208; mnc = 93; mnc_length = 2; } + ); tr_s_preference = "local_mac" diff --git a/ci-scripts/conf_files/lte-tdd-basic-sim.conf b/ci-scripts/conf_files/lte-tdd-basic-sim.conf index a7bc31eed8..a1b218e92d 100644 --- a/ci-scripts/conf_files/lte-tdd-basic-sim.conf +++ b/ci-scripts/conf_files/lte-tdd-basic-sim.conf @@ -14,7 +14,10 @@ eNBs = // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = 1; - plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } ); + plmn_list = ( + { mcc = 208; mnc = 92; mnc_length = 2; }, + { mcc = 208; mnc = 93; mnc_length = 2; } + ); ////////// Physical parameters: From 26418275e838d05c0f617b672e3ff9140a007a56 Mon Sep 17 00:00:00 2001 From: Wang Tsu-Han Date: Fri, 12 Oct 2018 14:47:04 +0200 Subject: [PATCH 311/379] adding file log in emulation mode --- targets/RT/USER/nr-ru.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/targets/RT/USER/nr-ru.c b/targets/RT/USER/nr-ru.c index b223261db2..2a0bcfb2be 100644 --- a/targets/RT/USER/nr-ru.c +++ b/targets/RT/USER/nr-ru.c @@ -852,13 +852,24 @@ void tx_rf(RU_t *ru) { VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (proc->timestamp_tx-ru->openair0_cfg.tx_sample_advance)&0xffffffff ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 ); // prepare tx buffer pointers - - txs = ru->rfdevice.trx_write_func(&ru->rfdevice, + if(emulate_rf) + { + if(proc->frame_tx < 2) + { + LOG_M("txdataF_frame.m","txdataF_frame",&ru->common.txdataF_BF[i],fp->samples_per_subframe_wCP, 1, 1); + LOG_M("txdata_frame.m","txdata_frame",&ru->common.txdata[i],fp->samples_per_subframe, 1, 1); + } + else oai_exit = 1; + } + else + { + txs = ru->rfdevice.trx_write_func(&ru->rfdevice, proc->timestamp_tx+ru->ts_offset-ru->openair0_cfg.tx_sample_advance-sf_extension, txp, siglen+sf_extension, ru->nb_tx, flags); + } LOG_D(PHY,"[TXPATH] RU %d tx_rf, writing to TS %llu, frame %d, unwrapped_frame %d, subframe %d\n",ru->idx, (long long unsigned int)proc->timestamp_tx,proc->frame_tx,proc->frame_tx_unwrap,proc->subframe_tx); @@ -1521,11 +1532,8 @@ static void* ru_thread( void* param ) { // do OFDM if needed if ((ru->fh_north_asynch_in == NULL) && (ru->feptx_ofdm)) ru->feptx_ofdm(ru); - if (!emulate_rf) - { - // do outgoing fronthaul (south) if needed - if ((ru->fh_north_asynch_in == NULL) && (ru->fh_south_out)) ru->fh_south_out(ru); - } + // do outgoing fronthaul (south) if needed + if ((ru->fh_north_asynch_in == NULL) && (ru->fh_south_out)) ru->fh_south_out(ru); if (ru->fh_north_out) ru->fh_north_out(ru); } From f34e735edd54d85fbb690ce85d48b3f13cb86d4b Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Fri, 12 Oct 2018 16:16:05 +0200 Subject: [PATCH 312/379] CI: adding a tempo in between UP IP retrieves Signed-off-by: Raphael Defosseux --- ci-scripts/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index a12c2bbfcb..be0c9b4462 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -629,6 +629,7 @@ class SSHConnection(): result = re.search('inet (?P[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\/[0-9]+[0-9a-zA-Z\.\s]+', str(self.ssh.before)) if result is None: logging.debug('\u001B[1;37;41m UE IP Address Not Found! \u001B[0m') + time.sleep(1) count += 1 else: count = 10 From c0ae3ce21f264bb6b5880bc06bd397fb69e7caf9 Mon Sep 17 00:00:00 2001 From: kvyat Date: Fri, 12 Oct 2018 16:38:18 +0200 Subject: [PATCH 313/379] X2: fixing order of calls Signed-off-by: kvyat --- openair2/ENB_APP/enb_config.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 3be7e2999e..2675e4454c 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -2390,10 +2390,6 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) { || X2AP_REGISTER_ENB_REQ(msg_p).mnc < 100, "MNC %d cannot be encoded in two digits as requested (change mnc_digit_length to 3)\n", X2AP_REGISTER_ENB_REQ(msg_p).mnc); - config_getlist( &X2ParamList,X2Params,sizeof(X2Params)/sizeof(paramdef_t),aprefix); - AssertFatal(X2ParamList.numelt <= X2AP_MAX_NB_ENB_IP_ADDRESS, - "value of X2ParamList.numelt %d must be lower than X2AP_MAX_NB_ENB_IP_ADDRESS %d value: reconsider to increase X2AP_MAX_NB_ENB_IP_ADDRESS\n", - X2ParamList.numelt,X2AP_MAX_NB_ENB_IP_ADDRESS); /* CC params */ config_getlist(&CCsParamList, NULL, 0, aprefix); @@ -2441,6 +2437,9 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) { sprintf(aprefix,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k); config_getlist( &X2ParamList,X2Params,sizeof(X2Params)/sizeof(paramdef_t),aprefix); + AssertFatal(X2ParamList.numelt <= X2AP_MAX_NB_ENB_IP_ADDRESS, + "value of X2ParamList.numelt %d must be lower than X2AP_MAX_NB_ENB_IP_ADDRESS %d value: reconsider to increase X2AP_MAX_NB_ENB_IP_ADDRESS\n", + X2ParamList.numelt,X2AP_MAX_NB_ENB_IP_ADDRESS); X2AP_REGISTER_ENB_REQ (msg_p).nb_x2 = 0; From 88d5bf42f8aa309010109b48e6d043aaf8885ca8 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Sat, 13 Oct 2018 16:05:43 +0200 Subject: [PATCH 314/379] 16-bit llr decoder integrated --- openair1/PHY/CODING/TESTBENCH/polartest.c | 39 ++++++++++++------- .../CODING/nrPolar_tools/nr_polar_decoder.c | 6 +-- .../nrPolar_tools/nr_polar_decoding_tools.c | 16 ++++++-- openair1/PHY/CODING/nr_polar_init.c | 3 ++ 4 files changed, 44 insertions(+), 20 deletions(-) diff --git a/openair1/PHY/CODING/TESTBENCH/polartest.c b/openair1/PHY/CODING/TESTBENCH/polartest.c index 9f3ddf97a8..f412be1271 100644 --- a/openair1/PHY/CODING/TESTBENCH/polartest.c +++ b/openair1/PHY/CODING/TESTBENCH/polartest.c @@ -151,7 +151,9 @@ int main(int argc, char *argv[]) { uint8_t *encoderOutputByte = malloc(sizeof(uint8_t) * coderLength); double *modulatedInput = malloc (sizeof(double) * coderLength); //channel input double *channelOutput = malloc (sizeof(double) * coderLength); //add noise - + int16_t *channelOutput_int16; + if (decoder_int16 == 1) channelOutput_int16 = (int16_t*)malloc (sizeof(int16_t) * coderLength); + t_nrPolar_paramsPtr nrPolar_params = NULL, currentPtr = NULL; nr_polar_init(&nrPolar_params, polarMessageType, testLength, aggregation_level); currentPtr = nr_polar_params(nrPolar_params, polarMessageType, testLength, aggregation_level); @@ -323,13 +325,6 @@ int main(int argc, char *argv[]) { /*printf("encoderOutput: [0]->0x%08x\n", encoderOutput[0]); printf("encoderOutput: [1]->0x%08x\n", encoderOutput[1]);*/ -/* - if (decoder_int16==1) { - if (channelOutput[i] > 15) channelOutput_int8[i] = 127; - else if (channelOutput[i] < -16) channelOutput_int8[i] = -128; - else channelOutput_int8[i] = (int16_t) (8*channelOutput[i]); - } -*/ //Bit-to-byte: nr_bit2byte_uint32_8_t(encoderOutput, coderLength, encoderOutputByte); @@ -341,6 +336,15 @@ int main(int argc, char *argv[]) { modulatedInput[i]=(-1)/sqrt(2); channelOutput[i] = modulatedInput[i] + (gaussdouble(0.0,1.0) * (1/sqrt(2*SNR_lin))); + + + if (decoder_int16==1) { + if (channelOutput[i] > 15) channelOutput_int16[i] = 127; + else if (channelOutput[i] < -16) channelOutput_int16[i] = -128; + else channelOutput_int16[i] = (int16_t) (8*channelOutput[i]); + } + + } start_meas(&timeDecoder); @@ -350,12 +354,19 @@ int main(int argc, char *argv[]) { NR_POLAR_DECODER_LISTSIZE, aPrioriArray, NR_POLAR_DECODER_PATH_METRIC_APPROXIMATION);*/ - decoderState = polar_decoder_aPriori(channelOutput, - estimatedOutput, - currentPtr, - NR_POLAR_DECODER_LISTSIZE, - NR_POLAR_DECODER_PATH_METRIC_APPROXIMATION, - aPrioriArray); + if (decoder_int16==0) + decoderState = polar_decoder_aPriori(channelOutput, + estimatedOutput, + currentPtr, + NR_POLAR_DECODER_LISTSIZE, + NR_POLAR_DECODER_PATH_METRIC_APPROXIMATION, + aPrioriArray); + else + decoderState = polar_decoder_int16(channelOutput_int16, + estimatedOutput, + currentPtr); + + stop_meas(&timeDecoder); /*printf("testInput: [0]->0x%08x\n", testInput[0]); printf("estimatedOutput: [0]->0x%08x\n", estimatedOutput[0]);*/ diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c index 8353d0f21e..f1b72ae897 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c @@ -1039,7 +1039,7 @@ int8_t polar_decoder_dci(double *input, int8_t polar_decoder_int16(int16_t *input, - uint8_t *output, + uint8_t *out, t_nrPolar_params *polarParams) { @@ -1069,9 +1069,9 @@ int8_t polar_decoder_int16(int16_t *input, nr_polar_deinterleaver(polarParams->nr_polar_CPrime, polarParams->nr_polar_B, polarParams->interleaving_pattern, polarParams->K); //Remove the CRC (â) - for (int j = 0; j < polarParams->payloadBits; j++) output[j]=polarParams->nr_polar_B[j]; - + for (int j = 0; j < polarParams->payloadBits; j++) polarParams->nr_polar_A[j]=polarParams->nr_polar_B[j]; + nr_byte2bit_uint8_32_t(polarParams->nr_polar_A, polarParams->payloadBits, out); return(0); } diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c index 5f019146f3..2891a3399b 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c @@ -34,6 +34,7 @@ #include "PHY/sse_intrin.h" #include "PHY/impl_defs_top.h" +//#define DEBUG_NEW_IMPL void updateLLR(double ***llr, uint8_t **llrU, @@ -266,7 +267,7 @@ void applyFtoleft(t_nrPolar_params *pp,decoder_node_t *node) { for (int i=0;iNv;i++) printf("i%d (frozen %d): alpha_v[i] = %d\n",i,1-pp->information_bit_pattern[node->first_leaf_index+i],alpha_v[i]); #endif - + if (node->left->all_frozen == 0) { @@ -275,7 +276,8 @@ void applyFtoleft(t_nrPolar_params *pp,decoder_node_t *node) { if (avx2mod == 0) { __m256i a256,b256,absa256,absb256,minabs256; int avx2len = node->Nv/2/16; - + + // printf("avx2len %d\n",avx2len); for (int i=0;iNv/2)]); + */ } } else if (avx2mod == 8) { @@ -315,6 +324,7 @@ void applyFtoleft(t_nrPolar_params *pp,decoder_node_t *node) { absb=(b+maskb)^maskb; minabs = absaNv == 2) { // apply hard decision on left node @@ -368,7 +378,7 @@ void applyGtoright(t_nrPolar_params *pp,decoder_node_t *node) { betar[0] = (alpha_r[0]>0) ? -1 : 1; pp->nr_polar_U[node->first_leaf_index+1] = (1+betar[0])>>1; #ifdef DEBUG_NEW_IMPL - printf("Setting bit %d to %d (LLR %d frozen_mask %d)\n",node->first_leaf_index+1,(betar[0]+1)>>1,alpha_r[0],frozen_mask); + printf("Setting bit %d to %d (LLR %d)\n",node->first_leaf_index+1,(betar[0]+1)>>1,alpha_r[0]); #endif } } diff --git a/openair1/PHY/CODING/nr_polar_init.c b/openair1/PHY/CODING/nr_polar_init.c index 87da29c48e..e238c7b84f 100644 --- a/openair1/PHY/CODING/nr_polar_init.c +++ b/openair1/PHY/CODING/nr_polar_init.c @@ -147,6 +147,9 @@ void nr_polar_init(t_nrPolar_paramsPtr *polarParams, free(J); + build_decoder_tree(newPolarInitNode); + printf("decoder tree nodes %d\n",newPolarInitNode->tree.num_nodes); + } else { AssertFatal(1 == 0, "[nr_polar_init] New t_nrPolar_paramsPtr could not be created"); } From 76ebc5adeb61364b3a2e8de75fb7707d9e9c5500 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Sun, 14 Oct 2018 10:10:56 +0200 Subject: [PATCH 315/379] addition of ARM NEON intrinsics --- .../nrPolar_tools/nr_polar_decoding_tools.c | 144 ++++++++++++++---- 1 file changed, 114 insertions(+), 30 deletions(-) diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c index 2891a3399b..b79739e98d 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c @@ -254,6 +254,18 @@ void build_decoder_tree(t_nrPolar_params *pp) { } +#if defined(__arm__) || defined(__aarch64__) +// translate 1-1 SIMD functions from SSE to NEON +#define __m128i int16x8_t +#define __m64 int8x8_t +#define _mm_abs_epi16(a) vabsq_s16(a) +#define _mm_min_epi16(a,b) vminq_s16(a,b) +#define _mm_subs_epi16(a,b) vsubq_s16(a,b) +#define _mm_abs_pi16(a) vabs_s16(a) +#define _mm_min_pi16(a,b) vmin_s16(a,b) +#define _mm_subs_pi16(a,b) vsub_s16(a,b) +#endif + void applyFtoleft(t_nrPolar_params *pp,decoder_node_t *node) { int16_t *alpha_v=node->alpha; int16_t *alpha_l=node->left->alpha; @@ -270,7 +282,6 @@ void applyFtoleft(t_nrPolar_params *pp,decoder_node_t *node) { if (node->left->all_frozen == 0) { - #if defined(__AVX2__) int avx2mod = (node->Nv/2)&15; if (avx2mod == 0) { @@ -284,14 +295,7 @@ void applyFtoleft(t_nrPolar_params *pp,decoder_node_t *node) { absa256 =_mm256_abs_epi16(a256); absb256 =_mm256_abs_epi16(b256); minabs256 =_mm256_min_epi16(absa256,absb256); - ((__m256i*)alpha_l)[i] =_mm256_sign_epi16(minabs256,_mm256_xor_si256(a256,b256)); - /* for (int j=0;j<16;j++) printf("alphal[%d] %d (%d,%d,%d)\n", - (16*i) + j, - alpha_l[(16*i)+j], - ((int16_t*)&minabs256)[j], - alpha_v[(16*i)+j], - alpha_v[(16*i)+j+(node->Nv/2)]); - */ + ((__m256i*)alpha_l)[i] =_mm256_sign_epi16(minabs256,_mm256_sign_epi16(a256,b256)); } } else if (avx2mod == 8) { @@ -301,7 +305,7 @@ void applyFtoleft(t_nrPolar_params *pp,decoder_node_t *node) { absa128 =_mm_abs_epi16(a128); absb128 =_mm_abs_epi16(b128); minabs128 =_mm_min_epi16(absa128,absb128); - *((__m128i*)alpha_l) =_mm_sign_epi16(minabs128,_mm_xor_si128(a128,b128)); + *((__m128i*)alpha_l) =_mm_sign_epi16(minabs128,_mm_sign_epi16(a128,b128)); } else if (avx2mod == 4) { __m64 a64,b64,absa64,absb64,minabs64; @@ -310,11 +314,56 @@ void applyFtoleft(t_nrPolar_params *pp,decoder_node_t *node) { absa64 =_mm_abs_pi16(a64); absb64 =_mm_abs_pi16(b64); minabs64 =_mm_min_pi16(absa64,absb64); - *((__m64*)alpha_l) =_mm_sign_pi16(minabs64,_mm_xor_si64(a64,b64)); + *((__m64*)alpha_l) =_mm_sign_pi16(minabs64,_mm_sign_pi16(a64,b64)); } else +#else + int sse4mod = (node->Nv/2)&7; + int sse4len = node->Nv/2/8; +#if defined(__arm__) || defined(__aarch64__) + int16x8_t signatimesb,comp1,comp2,negminabs128; + int16x8_t zero=vdupq_n_s16(0); #endif - { + + if (sse4mod == 0) { + for (int i=0;iNv/2/8; + + a128 =*((__m128i*)alpha_v); + b128 =((__m128i*)alpha_v)[1]; + absa128 =_mm_abs_epi16(a128); + absb128 =_mm_abs_epi16(b128); + minabs128 =_mm_min_epi16(absa128,absb128); +#if defined(__arm__) || defined(__aarch64__) + // unfortunately no direct equivalent to _mm_sign_epi16 + signatimesb=vxorrq_s16(a128,b128); + comp1=vcltq_s16(signatimesb,zero); + comp2=vcgeq_s16(signatimesb,zero); + negminabs128=vnegq_s16(minabs128); + *((__m128i*)alpha_l) =vorrq_s16(vandq_s16(minabs128,comp0),vandq_s16(negminabs128,comp1)); +#else + *((__m128i*)alpha_l) =_mm_sign_epi16(minabs128,_mm_sign_epi16(a128,b128)); +#endif + } + } + else if (sse4mod == 4) { + __m64 a64,b64,absa64,absb64,minabs64; + a64 =*((__m64*)alpha_v); + b64 =((__m64*)alpha_v)[1]; + absa64 =_mm_abs_pi16(a64); + absb64 =_mm_abs_pi16(b64); + minabs64 =_mm_min_pi16(absa64,absb64); +#if defined(__arm__) || defined(__aarch64__) + AssertFatal(1==0,"Need to do this still for ARM\n"); +#else + *((__m64*)alpha_l) =_mm_sign_pi16(minabs64,_mm_sign_epi16(a64,b64)); +#endif + } + + else +#endif + { // equvalent scalar code to above, activated only on non x86/ARM architectures for (int i=0;iNv/2;i++) { a=alpha_v[i]; b=alpha_v[i+(node->Nv/2)]; @@ -367,9 +416,34 @@ void applyGtoright(t_nrPolar_params *pp,decoder_node_t *node) { else if (avx2mod == 8) { ((__m128i *)alpha_r)[0] = _mm_subs_epi16(((__m128i *)alpha_v)[1],_mm_sign_epi16(((__m128i *)alpha_v)[0],((__m128i *)betal)[0])); } + else if (avx2mod == 4) { + ((__m64 *)alpha_r)[0] = _mm_subs_pi16(((__m64 *)alpha_v)[1],_mm_sign_pi16(((__m64 *)alpha_v)[0],((__m64 *)betal)[0])); + } + else +#else + int sse4mod = (node->Nv/2)&7; + + if (sse4mod == 0) { + int sse4len = node->Nv/2/8; + + for (int i=0;iNv/2;i++) { alpha_r[i] = alpha_v[i+(node->Nv/2)] - (betal[i]*alpha_v[i]); } @@ -385,10 +459,10 @@ void applyGtoright(t_nrPolar_params *pp,decoder_node_t *node) { } -int16_t minus1[16] = {-1,-1,-1,-1, - -1,-1,-1,-1, - -1,-1,-1,-1, - -1,-1,-1,-1}; +int16_t all1[16] = {1,1,1,1, + 1,1,1,1, + 1,1,1,1, + 1,1,1,1}; void computeBeta(t_nrPolar_params *pp,decoder_node_t *node) { @@ -401,27 +475,37 @@ void computeBeta(t_nrPolar_params *pp,decoder_node_t *node) { if (node->left->all_frozen==0) { // if left node is not aggregation of frozen bits #if defined(__AVX2__) int avx2mod = (node->Nv/2)&15; + register __m256i allones=*((__m256i*)all1); if (avx2mod == 0) { int avx2len = node->Nv/2/16; - for (int i=0;iNv/2)&15; + + if (ssr4mod == 0) { + int ssr4len = node->Nv/2/8; + register __m128i allones=*((__m128i*)all1); + for (int i=0;i Date: Mon, 15 Oct 2018 04:32:48 -0700 Subject: [PATCH 316/379] adding polartest to CI --- cmake_targets/autotests/test_case_list.xml | 16 ++++++++++++++++ openair1/PHY/CODING/TESTBENCH/polartest.c | 7 +++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index bfac98919e..a6ff59f3c8 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -1026,6 +1026,22 @@ segmentation fault|assertion|exiting|fatal 3 + + + execution + polartest test cases. + + $OPENAIR_DIR/cmake_targets/build_oai + --phy_simulators -c + $OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash + + $OPENAIR_DIR/targets/bin/polartest.Rel15 + -q -s-10 -f0 + ldpctest.test1 + BLER= 0.000000 + segmentation fault|assertion|exiting|fatal + 3 + execution diff --git a/openair1/PHY/CODING/TESTBENCH/polartest.c b/openair1/PHY/CODING/TESTBENCH/polartest.c index f412be1271..c04d469d8d 100644 --- a/openair1/PHY/CODING/TESTBENCH/polartest.c +++ b/openair1/PHY/CODING/TESTBENCH/polartest.c @@ -40,7 +40,7 @@ int main(int argc, char *argv[]) { double timeEncoderCumulative = 0, timeDecoderCumulative = 0; uint8_t aggregation_level = 8, decoderListSize = 8, pathMetricAppr = 0; - while ((arguments = getopt (argc, argv, "s:d:f:m:i:l:a:h:qg")) != -1) + while ((arguments = getopt (argc, argv, "s:d:f:m:i:l:a:hqg")) != -1) switch (arguments) { case 's': @@ -83,7 +83,7 @@ int main(int argc, char *argv[]) { decoder_int16=1; break; case 'h': - printf("./polartest -s SNRstart -d SNRinc -f SNRstop -m [0=PBCH|1=DCI|2=UCI] -i iterations -l decoderListSize -a pathMetricAppr\n"); + printf("./polartest -s SNRstart -d SNRinc -f SNRstop -m [0=PBCH|1=DCI|2=UCI] -i iterations -l decoderListSize -a pathMetricAppr -q (use fixed point decoder)\n"); exit(-1); default: @@ -411,6 +411,9 @@ int main(int argc, char *argv[]) { ((double)bitErrorCumulative / (iterations*testLength)), (timeEncoderCumulative/iterations),timeDecoderCumulative/iterations); + if (blockErrorCumulative==0 && bitErrorCumulative==0) + break; + blockErrorCumulative = 0; bitErrorCumulative = 0; timeEncoderCumulative = 0; timeDecoderCumulative = 0; } From 27395c083dd25c6f186c1e4982899249f70fa56f Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 15 Oct 2018 14:54:08 +0200 Subject: [PATCH 317/379] hotfix: hardcode PLMN selection in the UE to value 1 (was 2) Fix the assertion: Assertion ((instance_p->mnc_digit_length[ue_desc_p->selected_plmn_identity] == 3) || (instance_p->mnc_digit_length[ue_desc_p->selected_plmn_identity] == 2)) failed! In s1ap_eNB_handle_nas_first_req() /home/ubuntu/tmp/openair3/S1AP/s1ap_eNB_nas_procedures.c:243 With this hotfix the UE selects the first PLMN sent by the eNodeB. The UE has to select the correct PLMN from those received in SIB1. This will be done with a later merge request. --- openair2/RRC/LTE/MESSAGES/asn1_msg.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/openair2/RRC/LTE/MESSAGES/asn1_msg.c b/openair2/RRC/LTE/MESSAGES/asn1_msg.c index 9ab2351b44..f75d73224e 100644 --- a/openair2/RRC/LTE/MESSAGES/asn1_msg.c +++ b/openair2/RRC/LTE/MESSAGES/asn1_msg.c @@ -1677,10 +1677,7 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uin rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.nonCriticalExtension=CALLOC(1, sizeof(*rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.nonCriticalExtension)); - if(usim_test == 0) - rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.selectedPLMN_Identity= 2; - else - rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.selectedPLMN_Identity= 1; + rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.selectedPLMN_Identity= 1; rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME = NULL;//calloc(1,sizeof(*rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME)); From 9e0e8a7b867283a03f830b7da2edff0f5fd174b7 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 15 Oct 2018 14:59:42 +0200 Subject: [PATCH 318/379] Revert "CI: fixing the basic-simulator configuration files" This reverts commit d7441543341707d5722db5fb587e600e893b1aa6. --- ci-scripts/conf_files/lte-fdd-basic-sim.conf | 5 +---- ci-scripts/conf_files/lte-tdd-basic-sim.conf | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/ci-scripts/conf_files/lte-fdd-basic-sim.conf b/ci-scripts/conf_files/lte-fdd-basic-sim.conf index 6761a5881e..0211e126a1 100644 --- a/ci-scripts/conf_files/lte-fdd-basic-sim.conf +++ b/ci-scripts/conf_files/lte-fdd-basic-sim.conf @@ -14,10 +14,7 @@ eNBs = // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = 1; - plmn_list = ( - { mcc = 208; mnc = 92; mnc_length = 2; }, - { mcc = 208; mnc = 93; mnc_length = 2; } - ); + plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } ); tr_s_preference = "local_mac" diff --git a/ci-scripts/conf_files/lte-tdd-basic-sim.conf b/ci-scripts/conf_files/lte-tdd-basic-sim.conf index a1b218e92d..a7bc31eed8 100644 --- a/ci-scripts/conf_files/lte-tdd-basic-sim.conf +++ b/ci-scripts/conf_files/lte-tdd-basic-sim.conf @@ -14,10 +14,7 @@ eNBs = // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = 1; - plmn_list = ( - { mcc = 208; mnc = 92; mnc_length = 2; }, - { mcc = 208; mnc = 93; mnc_length = 2; } - ); + plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } ); ////////// Physical parameters: From 4b1c9d83c87eb7620da533afef480c9af97f97ab Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Mon, 15 Oct 2018 23:33:23 -0700 Subject: [PATCH 319/379] fixing T_TRACER dependencies in CMakelists.txt --- cmake_targets/CMakeLists.txt | 66 ++++++++++++++++++++++++++++++++---- 1 file changed, 59 insertions(+), 7 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index e40f72d91e..39e36bd586 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -2611,16 +2611,68 @@ if (${T_TRACER}) foreach(i #all "add_executable" definitions (except tests, rb_tool, updatefw) lte-softmodem lte-softmodem-nos1 lte-uesoftmodem lte-uesoftmodem-nos1 + nr-softmodem nr-softmodem-nos1 nr-uesoftmodem nr-uesoftmodem-nos1 dlsim_tm4 dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim ulsim + ldpctest polartest #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 CN_UTILS - GTPV1U SCTP_CLIENT UDP LIB_NAS_UE LFDS LFDS7 SIMU OPENAIR0_LIB PHY_MEX - coding) +ITTI +RRC_LIB +NR_RRC_LIB +S1AP_LIB +S1AP_ENB +X2AP_LIB +params_libconfig +oai_exmimodevif +oai_usrpdevif +oai_bladerfdevif +oai_lmssdrdevif +oai_eth_transpro +oai_mobipass +tcp_bridge +tcp_bridge_oai +coding +FLPT_MSG +ASYNC_IF +FLEXRAN_AGENT +HASHTABLE +MSC +UTIL +SECU_OSA +SECU_CN +SCHED_LIB +SCHED_NR_LIB +SCHED_RU_LIB +SCHED_UE_LIB +SCHED_NR_UE_LIB +NFAPI_COMMON_LIB +NFAPI_LIB +NFAPI_PNF_LIB +NFAPI_VNF_LIB +NFAPI_USER_LIB +PHY_COMMON +PHY +PHY_UE +PHY_NR +PHY_NR_UE +PHY_RU +PHY_MEX +L2 +L2_NR +L2_UE +NR_L2_UE +NR_LTE_UE_REUSE_LIB +CN_UTILS +GTPV1U +SCTP_CLIENT +UDP +LIB_NAS_UE +NB_IoT +LFDS +LFDS7 +SIMU +SIMU_ETH +OPENAIR0_LIB) if (TARGET ${i}) add_dependencies(${i} generate_T) endif() From 016185c131b2d3e0f918b52c5f8dabacc044e92e Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Tue, 16 Oct 2018 01:05:58 -0700 Subject: [PATCH 320/379] polartest will now create output files in current directory (otherwise it will not run on CI bench) --- cmake_targets/autotests/test_case_list.xml | 2 +- openair1/PHY/CODING/TESTBENCH/polartest.c | 22 ++++++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index a6ff59f3c8..72bc4df93a 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -1037,7 +1037,7 @@ $OPENAIR_DIR/targets/bin/polartest.Rel15 -q -s-10 -f0 - ldpctest.test1 + polartest.test1 BLER= 0.000000 segmentation fault|assertion|exiting|fatal 3 diff --git a/openair1/PHY/CODING/TESTBENCH/polartest.c b/openair1/PHY/CODING/TESTBENCH/polartest.c index c04d469d8d..3c725eb5f2 100644 --- a/openair1/PHY/CODING/TESTBENCH/polartest.c +++ b/openair1/PHY/CODING/TESTBENCH/polartest.c @@ -82,6 +82,7 @@ int main(int argc, char *argv[]) { SNRstop =-6.0; decoder_int16=1; break; + case 'h': printf("./polartest -s SNRstart -d SNRinc -f SNRstop -m [0=PBCH|1=DCI|2=UCI] -i iterations -l decoderListSize -a pathMetricAppr -q (use fixed point decoder)\n"); exit(-1); @@ -108,11 +109,14 @@ int main(int argc, char *argv[]) { //Logging time_t currentTime; time (¤tTime); - char *folderName, fileName[512], currentTimeInfo[25]; + char fileName[512], currentTimeInfo[25]; + char folderName[] = "."; + /* folderName=getenv("HOME"); strcat(folderName,"/Desktop/polartestResults"); - + */ + #ifdef DEBUG_POLAR_TIMING sprintf(fileName,"%s/TIMING_ListSize_%d_pmAppr_%d_Payload_%d_Itr_%d",folderName,decoderListSize,pathMetricAppr,testLength,iterations); #else @@ -122,15 +126,17 @@ int main(int argc, char *argv[]) { strcat(fileName,currentTimeInfo); //Create "~/Desktop/polartestResults" folder if it doesn't already exist. + /* struct stat folder = {0}; if (stat(folderName, &folder) == -1) mkdir(folderName, S_IRWXU | S_IRWXG | S_IRWXO); - + */ + FILE* logFile; - logFile = fopen(fileName, "w"); - if (logFile==NULL) { - fprintf(stderr,"[polartest.c] Problem creating file %s with fopen\n",fileName); - exit(-1); - } + logFile = fopen(fileName, "w"); + if (logFile==NULL) { + fprintf(stderr,"[polartest.c] Problem creating file %s with fopen\n",fileName); + exit(-1); + } #ifdef DEBUG_POLAR_TIMING fprintf(logFile,",timeEncoderCRCByte[us],timeEncoderCRCBit[us],timeEncoderInterleaver[us],timeEncoderBitInsertion[us],timeEncoder1[us],timeEncoder2[us],timeEncoderRateMatching[us],timeEncoderByte2Bit[us]\n"); From 006af69782d9a87b7573c68d4a7fa8fb4ebb2129 Mon Sep 17 00:00:00 2001 From: "Wolfgang A. Mozart" Date: Tue, 16 Oct 2018 12:26:39 +0200 Subject: [PATCH 321/379] write out for txdataF_BF and txdata and minor fix for uhd load --- targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 2 +- targets/RT/USER/nr-ru.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index 2ae124f29d..abeaf4e4c8 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -1039,7 +1039,7 @@ extern "C" { if(device_adds.size() == 0) { double usrp_master_clock = 184.32e6; - std::string args = "type=x300, addr=192.168.30.2"; + std::string args = "type=x300"; // workaround for an api problem, master clock has to be set with the constructor not via set_master_clock_rate args += boost::str(boost::format(",master_clock_rate=%f") % usrp_master_clock); diff --git a/targets/RT/USER/nr-ru.c b/targets/RT/USER/nr-ru.c index 2a0bcfb2be..d2deba23c9 100644 --- a/targets/RT/USER/nr-ru.c +++ b/targets/RT/USER/nr-ru.c @@ -854,12 +854,16 @@ void tx_rf(RU_t *ru) { // prepare tx buffer pointers if(emulate_rf) { - if(proc->frame_tx < 2) + for (i=0; inb_tx; i++) { - LOG_M("txdataF_frame.m","txdataF_frame",&ru->common.txdataF_BF[i],fp->samples_per_subframe_wCP, 1, 1); - LOG_M("txdata_frame.m","txdata_frame",&ru->common.txdata[i],fp->samples_per_subframe, 1, 1); + if(proc->frame_tx > 0 && proc->frame_tx < 2) + { + LOG_M("txdataF_frame.m","txdataF_frame",&ru->common.txdataF_BF[i][0],fp->samples_per_subframe_wCP, 1, 1); + LOG_M("txdata_frame.m","txdata_frame",&ru->common.txdata[i][(proc->subframe_tx*fp->samples_per_subframe)-sf_extension],fp->samples_per_subframe, 1, 1); + } + else if (proc->frame_tx >= 2) oai_exit = 1; } - else oai_exit = 1; + txs = siglen+sf_extension; } else { From 04873a7ed0403bf9fc2619fc2990c9aff1a0ee28 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 16 Oct 2018 13:32:56 +0200 Subject: [PATCH 322/379] CI: improvements -- basic-simulator: added TDD 5MHz DL iperf test -- main.py script * better HTML reporting when ping/iperf commands timed out * at eNB terminate, more analysis on RRC commands Signed-off-by: Raphael Defosseux --- ci-scripts/main.py | 178 ++++++++++++++++++++++++++------------ ci-scripts/runTestOnVM.sh | 9 ++ 2 files changed, 132 insertions(+), 55 deletions(-) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index be0c9b4462..1c62bf32f3 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -160,7 +160,7 @@ class SSHConnection(): self.ssh.sendline(commandline) self.sshresponse = self.ssh.expect([expectedline, pexpect.EOF, pexpect.TIMEOUT]) if self.sshresponse == 0: - pass + return 0 elif self.sshresponse == 1: logging.debug('\u001B[1;37;41m Unexpected EOF \u001B[0m') logging.debug('Expected Line : ' + expectedline) @@ -168,7 +168,11 @@ class SSHConnection(): elif self.sshresponse == 2: logging.debug('\u001B[1;37;41m Unexpected TIMEOUT \u001B[0m') logging.debug('Expected Line : ' + expectedline) - sys.exit(self.sshresponse) + result = re.search('ping |iperf ', str(commandline)) + if result is None: + sys.exit(self.sshresponse) + else: + return -1 else: logging.debug('\u001B[1;37;41m Unexpected Others \u001B[0m') logging.debug('Expected Line : ' + expectedline) @@ -450,7 +454,7 @@ class SSHConnection(): break count = count - 1 if count == 15 or count == 30: - logging.debug('\u001B[1;37;43m Retry UE (' + device_id + ') Flight Mode Off \u001B[0m') + logging.debug('\u001B[1;30;43m Retry UE (' + device_id + ') Flight Mode Off \u001B[0m') self.command('stdbuf -o0 adb -s ' + device_id + ' shell /data/local/tmp/off', '\$', 60) time.sleep(0.5) self.command('stdbuf -o0 adb -s ' + device_id + ' shell /data/local/tmp/on', '\$', 60) @@ -647,42 +651,44 @@ class SSHConnection(): self.close() return ue_ip_status - def Ping_common(self, lock, UE_IPAddress, device_id,statusQueue): + def ping_iperf_wrong_exit(self, lock, UE_IPAddress, device_id, statusQueue, message): + lock.acquire() + statusQueue.put(-1) + statusQueue.put(device_id) + statusQueue.put(UE_IPAddress) + statusQueue.put(message) + lock.release() + + def Ping_common(self, lock, UE_IPAddress, device_id, statusQueue): try: self.open(self.EPCIPAddress, self.EPCUserName, self.EPCPassword) self.command('cd ' + self.EPCSourceCodePath, '\$', 5) self.command('cd scripts', '\$', 5) ping_time = re.findall("-c (\d+)",str(self.ping_args)) - self.command('stdbuf -o0 ping ' + self.ping_args + ' ' + UE_IPAddress + ' 2>&1 | stdbuf -o0 tee -a ping_' + SSH.testCase_id + '_' + device_id + '.log', '\$', int(ping_time[0])*1.5) + ping_status = self.command('stdbuf -o0 ping ' + self.ping_args + ' ' + UE_IPAddress + ' 2>&1 | stdbuf -o0 tee -a ping_' + SSH.testCase_id + '_' + device_id + '.log', '\$', int(ping_time[0])*1.5) + # TIMEOUT CASE + if ping_status < 0: + message = 'Ping with UE (' + str(UE_IPAddress) + ') crashed due to TIMEOUT!' + logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m') + self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, message) + return result = re.search(', (?P[0-9\.]+)% packet loss, time [0-9\.]+ms', str(self.ssh.before)) if result is None: message = 'Packet Loss Not Found!' logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m') - lock.acquire() - statusQueue.put(-1) - statusQueue.put(device_id) - statusQueue.put(message) - lock.release() + self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, message) return packetloss = result.group('packetloss') if float(packetloss) == 100: message = 'Packet Loss is 100%' logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m') - lock.acquire() - statusQueue.put(-1) - statusQueue.put(device_id) - statusQueue.put(message) - lock.release() + self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, message) return result = re.search('rtt min\/avg\/max\/mdev = (?P[0-9\.]+)\/(?P[0-9\.]+)\/(?P[0-9\.]+)\/[0-9\.]+ ms', str(self.ssh.before)) if result is None: message = 'Ping RTT_Min RTT_Avg RTT_Max Not Found!' logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m') - lock.acquire() - statusQueue.put(-1) - statusQueue.put(device_id) - statusQueue.put(message) - lock.release() + self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, message) return rtt_min = result.group('rtt_min') rtt_avg = result.group('rtt_avg') @@ -706,7 +712,7 @@ class SSHConnection(): packetLossOK = False elif float(packetloss) > 0: qMsg += '\nPacket Loss is not 0%' - logging.debug('\u001B[1;37;43m Packet Loss is not 0% \u001B[0m') + logging.debug('\u001B[1;30;43m Packet Loss is not 0% \u001B[0m') if (packetLossOK): statusQueue.put(0) else: @@ -911,23 +917,13 @@ class SSHConnection(): def Iperf_analyzeV2Server(self, lock, UE_IPAddress, device_id, statusQueue, iperf_real_options): if (not os.path.isfile('iperf_server_' + SSH.testCase_id + '_' + device_id + '.log')): - lock.acquire() - statusQueue.put(-1) - statusQueue.put(device_id) - statusQueue.put(UE_IPAddress) - statusQueue.put('Could not analyze from server log') - lock.release() + self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Could not analyze from server log') return # Computing the requested bandwidth in float result = re.search('-b (?P[0-9\.]+)[KMG]', str(iperf_real_options)) if result is None: logging.debug('Iperf bandwidth Not Found!') - lock.acquire() - statusQueue.put(-1) - statusQueue.put(device_id) - statusQueue.put(UE_IPAddress) - statusQueue.put('Could not compute Iperf bandwidth!') - lock.release() + self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Could not compute Iperf bandwidth!') return else: req_bandwidth = result.group('iperf_bandwidth') @@ -1013,12 +1009,7 @@ class SSHConnection(): logging.debug('\u001B[1;35m ' + pal_msg + '\u001B[0m') lock.release() else: - lock.acquire() - statusQueue.put(-1) - statusQueue.put(device_id) - statusQueue.put(UE_IPAddress) - statusQueue.put('Could not analyze from server log') - lock.release() + self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Could not analyze from server log') server_file.close() @@ -1059,6 +1050,7 @@ class SSHConnection(): statusQueue.put(-1) statusQueue.put(device_id) statusQueue.put(UE_IPAddress) + statusQueue.put(msg) lock.release() def Iperf_UL_common(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue): @@ -1097,13 +1089,22 @@ class SSHConnection(): time.sleep(0.5) self.command('rm -f iperf_' + SSH.testCase_id + '_' + device_id + '.log', '\$', 5) - self.command('stdbuf -o0 adb -s ' + device_id + ' shell "/data/local/tmp/iperf -c ' + EPC_Iperf_UE_IPAddress + ' ' + modified_options + ' -p ' + str(port) + '" 2>&1 | stdbuf -o0 tee -a iperf_' + SSH.testCase_id + '_' + device_id + '.log', '\$', int(iperf_time)*5.0) + iperf_status = self.command('stdbuf -o0 adb -s ' + device_id + ' shell "/data/local/tmp/iperf -c ' + EPC_Iperf_UE_IPAddress + ' ' + modified_options + ' -p ' + str(port) + '" 2>&1 | stdbuf -o0 tee -a iperf_' + SSH.testCase_id + '_' + device_id + '.log', '\$', int(iperf_time)*5.0) + # TIMEOUT Case + if iperf_status < 0: + self.close() + message = 'iperf on UE (' + str(UE_IPAddress) + ') crashed due to TIMEOUT !' + logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m') + self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, message) + return clientStatus = self.Iperf_analyzeV2Output(lock, UE_IPAddress, device_id, statusQueue, modified_options) + self.close() - # Launch iperf server on EPC side + # Kill iperf server on EPC side self.open(self.EPCIPAddress, self.EPCUserName, self.EPCPassword) self.command('killall --signal SIGKILL iperf', self.EPCUserName, 5) self.close() + # in case of failure, retrieve server log if (clientStatus == -1): time.sleep(1) if (os.path.isfile('iperf_server_' + SSH.testCase_id + '_' + device_id + '.log')): @@ -1129,15 +1130,9 @@ class SSHConnection(): result = re.search('iperf', str(self.ssh.before)) if result is None: message = 'Neither iperf nor iperf3 installed on UE!' - lock.acquire() logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m') - statusQueue.put(-1) - statusQueue.put(device_id) - statusQueue.put(UE_IPAddress) - statusQueue.put(message) - lock.release() + self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, message) return - #sys.exit(1) else: useIperf3 = True # in case of iperf, UL has its own function @@ -1179,8 +1174,13 @@ class SSHConnection(): clientStatus = 0 self.Iperf_analyzeV3Output(lock, UE_IPAddress, device_id, statusQueue) else: - self.command('stdbuf -o0 iperf -c ' + UE_IPAddress + ' ' + modified_options + ' 2>&1 | stdbuf -o0 tee -a iperf_' + SSH.testCase_id + '_' + device_id + '.log', '\$', int(iperf_time)*5.0) - + iperf_status = self.command('stdbuf -o0 iperf -c ' + UE_IPAddress + ' ' + modified_options + ' 2>&1 | stdbuf -o0 tee -a iperf_' + SSH.testCase_id + '_' + device_id + '.log', '\$', int(iperf_time)*5.0) + if iperf_status < 0: + self.close() + message = 'iperf on UE (' + str(UE_IPAddress) + ') crashed due to TIMEOUT !' + logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m') + self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, message) + return clientStatus = self.Iperf_analyzeV2Output(lock, UE_IPAddress, device_id, statusQueue, modified_options) self.close() @@ -1212,7 +1212,7 @@ class SSHConnection(): sys.exit(1) ueIpStatus = self.GetAllUEIPAddresses() if (ueIpStatus < 0): - self.CreateHtmlTestRow(self.ping_args, 'KO', UE_IP_ADDRESS_ISSUE) + self.CreateHtmlTestRow(self.iperf_args, 'KO', UE_IP_ADDRESS_ISSUE) self.CreateHtmlFooter() sys.exit(1) multi_jobs = [] @@ -1373,6 +1373,15 @@ class SSHConnection(): msgLine = 0 foundSegFault = False foundRealTimeIssue = False + rrcSetupRequest = 0 + rrcSetupComplete = 0 + rrcReleaseRequest = 0 + rrcReconfigRequest = 0 + rrcReconfigComplete = 0 + rrcReestablishRequest = 0 + rrcReestablishComplete = 0 + rrcReestablishReject = 0 + uciStatMsgCount = 0 for line in enb_log_file.readlines(): result = re.search('[Ss]egmentation [Ff]ault', str(line)) if result is not None: @@ -1389,18 +1398,76 @@ class SSHConnection(): if foundAssertion and (msgLine < 3): msgLine += 1 msgAssertion += str(line) + result = re.search('Generating RRCConnectionSetup', str(line)) + if result is not None: + rrcSetupRequest += 1 + result = re.search('RRCConnectionSetupComplete from UE', str(line)) + if result is not None: + rrcSetupComplete += 1 + result = re.search('Generate RRCConnectionRelease', str(line)) + if result is not None: + rrcReleaseRequest += 1 + result = re.search('Generate RRCConnectionReconfiguration', str(line)) + if result is not None: + rrcReconfigRequest += 1 + result = re.search('RRCConnectionReconfigurationComplete from UE rnti', str(line)) + if result is not None: + rrcReconfigComplete += 1 + result = re.search('RRCConnectionReestablishmentRequest', str(line)) + if result is not None: + rrcReestablishRequest += 1 + result = re.search('RRCConnectionReestablishmentComplete', str(line)) + if result is not None: + rrcReestablishComplete += 1 + result = re.search('RRCConnectionReestablishmentReject', str(line)) + if result is not None: + rrcReestablishReject += 1 + result = re.search('uci->stat', str(line)) + if result is not None: + uciStatMsgCount += 1 enb_log_file.close() + self.htmleNBFailureMsg = '' + if uciStatMsgCount > 0: + statMsg = 'eNB showed ' + str(uciStatMsgCount) + ' uci->stat message(s)' + logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') + self.htmleNBFailureMsg += statMsg + '\n' + if rrcSetupRequest > 0 or rrcSetupComplete > 0: + rrcMsg = 'eNB requested ' + str(rrcSetupRequest) + ' RRC Connection Setup(s)' + logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m') + self.htmleNBFailureMsg += rrcMsg + '\n' + rrcMsg = ' -- ' + str(rrcSetupComplete) + ' were completed' + logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m') + self.htmleNBFailureMsg += rrcMsg + '\n' + if rrcReleaseRequest > 0: + rrcMsg = 'eNB requested ' + str(rrcReleaseRequest) + ' RRC Connection Release(s)' + logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m') + self.htmleNBFailureMsg += rrcMsg + '\n' + if rrcReconfigRequest > 0 or rrcReconfigComplete > 0: + rrcMsg = 'eNB requested ' + str(rrcReconfigRequest) + ' RRC Connection Reconfiguration(s)' + logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m') + self.htmleNBFailureMsg += rrcMsg + '\n' + rrcMsg = ' -- ' + str(rrcReconfigComplete) + ' were completed' + logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m') + self.htmleNBFailureMsg += rrcMsg + '\n' + if rrcReestablishRequest > 0 or rrcReestablishComplete > 0 or rrcReestablishReject > 0: + rrcMsg = 'eNB requested ' + str(rrcReestablishRequest) + ' RRC Connection Reestablishment(s)' + logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m') + self.htmleNBFailureMsg += rrcMsg + '\n' + rrcMsg = ' -- ' + str(rrcReestablishComplete) + ' were completed' + logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m') + self.htmleNBFailureMsg += rrcMsg + '\n' + rrcMsg = ' -- ' + str(rrcReestablishReject) + ' were rejected' + logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m') + self.htmleNBFailureMsg += rrcMsg + '\n' if foundSegFault: logging.debug('\u001B[1;37;41m eNB ended with a Segmentation Fault! \u001B[0m') - self.htmleNBFailureMsg = 'eNB ended with a Segmentation Fault!' return ENB_PROCESS_SEG_FAULT if foundAssertion: logging.debug('\u001B[1;37;41m eNB ended with an assertion! \u001B[0m') - self.htmleNBFailureMsg = msgAssertion + self.htmleNBFailureMsg += msgAssertion return ENB_PROCESS_ASSERTION if foundRealTimeIssue: logging.debug('\u001B[1;37;41m eNB faced real time issues! \u001B[0m') - self.htmleNBFailureMsg = 'eNB faced real time issues' return ENB_PROCESS_REALTIME_ISSUE return 0 @@ -1707,8 +1774,9 @@ class SSHConnection(): self.htmlFile.write(' \n') else: self.htmlFile.write(' \n') - if (processesStatus == ENB_PROCESS_ASSERTION): + if (len(str(self.htmleNBFailureMsg)) > 2): self.htmlFile.write(' \n') + self.htmleNBFailureMsg = '' else: i = 0 while (i < self.htmlUEConnected): diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index d74d6e2eab..231ebe59d0 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -887,6 +887,15 @@ then scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 + echo "############################################################" + echo "Iperf DL" + echo "############################################################" + CURR_IPERF_LOG_BASE=tdd_05MHz_iperf_dl + iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 6 $CURR_IPERF_LOG_BASE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC + check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6 + echo "############################################################" echo "Terminate enb/ue simulators" echo "############################################################" From 8bb295c09869900b4f8348e4168c958a8a07d0da Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 8 Oct 2018 10:25:42 +0200 Subject: [PATCH 323/379] CI: adding support for IF4p5 testing Signed-off-by: Raphael Defosseux --- ...rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf | 274 ++++++++++++++++++ ci-scripts/conf_files/rru.fdd.band7.conf | 45 +++ ci-scripts/main.py | 35 ++- ci-scripts/xml_files/if4p5_usrp210_band7.xml | 132 +++++++++ targets/RT/USER/lte-softmodem.c | 2 + 5 files changed, 479 insertions(+), 9 deletions(-) create mode 100644 ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf create mode 100644 ci-scripts/conf_files/rru.fdd.band7.conf create mode 100644 ci-scripts/xml_files/if4p5_usrp210_band7.xml diff --git a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf new file mode 100644 index 0000000000..f62ab75b39 --- /dev/null +++ b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf @@ -0,0 +1,274 @@ +Active_eNBs = ( "eNB-Eurecom-LTEBox"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +eNBs = +( + { + # real_time choice in {hard, rt-preempt, no} + real_time = "no"; + + ////////// Identification parameters: + eNB_ID = 0xe00; + + cell_type = "CELL_MACRO_ENB"; + + eNB_name = "eNB-Eurecom-LTEBox"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = "1"; + + mobile_country_code = "208"; + + mobile_network_code = "92"; + + tr_s_preference = "local_mac" + + ////////// 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 = 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 = 90; + rx_gain = 125; + pbch_repetition = "FALSE"; + 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 = 0; + pucch_nCS_AN = 0; + pucch_n1_AN = 0; + pdsch_referenceSignalPower = -25; + 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; + + //Parameters for SIB18 + rxPool_sc_CP_Len = "normal"; + rxPool_sc_Period = "sf40"; + rxPool_data_CP_Len = "normal"; + rxPool_ResourceConfig_prb_Num = 20; + rxPool_ResourceConfig_prb_Start = 5; + rxPool_ResourceConfig_prb_End = 44; + rxPool_ResourceConfig_offsetIndicator_present = "prSmall"; + rxPool_ResourceConfig_offsetIndicator_choice = 0; + rxPool_ResourceConfig_subframeBitmap_present = "prBs40"; + rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000"; + rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5; + rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; +/* rxPool_dataHoppingConfig_hoppingParameter = 0; + rxPool_dataHoppingConfig_numSubbands = "ns1"; + rxPool_dataHoppingConfig_rbOffset = 0; + rxPool_commTxResourceUC-ReqAllowed = "TRUE"; +*/ + // Parameters for SIB19 + discRxPool_cp_Len = "normal" + discRxPool_discPeriod = "rf32" + discRxPool_numRetx = 1; + discRxPool_numRepetition = 2; + discRxPool_ResourceConfig_prb_Num = 5; + discRxPool_ResourceConfig_prb_Start = 3; + discRxPool_ResourceConfig_prb_End = 21; + discRxPool_ResourceConfig_offsetIndicator_present = "prSmall"; + discRxPool_ResourceConfig_offsetIndicator_choice = 0; + discRxPool_ResourceConfig_subframeBitmap_present = "prBs40"; + discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff"; + discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5; + discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; + + } + ); + + + 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.111/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 + }; + } +); + +MACRLCs = ( + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + phy_test_mode = 0; + puSch10xSnr = 200; + puCch10xSnr = 200; + } +); + +L1s = ( + { + num_cc = 1; + tr_n_preference = "local_mac"; + } +); + +RUs = ( + { + local_if_name = "lo"; + remote_address = "127.0.0.2"; + local_address = "127.0.0.1"; + local_portc = 50000; + remote_portc = 50000; + local_portd = 50001; + remote_portd = 50001; + local_rf = "no" + tr_preference = "udp_if4p5" + nb_tx = 1 + nb_rx = 1 + att_tx = 0 + att_rx = 0; + eNB_instances = [0]; + } +); + +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + +NETWORK_CONTROLLER : +{ + FLEXRAN_ENABLED = "no"; + FLEXRAN_INTERFACE_NAME = "lo"; + FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; + FLEXRAN_PORT = 2210; + FLEXRAN_CACHE = "/mnt/oai_agent_cache"; + FLEXRAN_AWAIT_RECONF = "no"; +}; + + 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/ci-scripts/conf_files/rru.fdd.band7.conf b/ci-scripts/conf_files/rru.fdd.band7.conf new file mode 100644 index 0000000000..ff5e13908e --- /dev/null +++ b/ci-scripts/conf_files/rru.fdd.band7.conf @@ -0,0 +1,45 @@ +RUs = ( + { + local_if_name = "lo"; + remote_address = "127.0.0.1" + local_address = "127.0.0.2"; + local_portc = 50000; + remote_portc = 50000; + local_portd = 50001; + remote_portd = 50001; + local_rf = "yes" + tr_preference = "udp_if4p5"; + nb_tx = 1; + nb_rx = 1; + max_pdschReferenceSignalPower = -27; + max_rxgain = 115; + bands = [7]; + } +); + +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + +log_config = { + global_log_level ="error"; + global_log_verbosity ="medium"; + hw_log_level ="error"; + hw_log_verbosity ="medium"; + phy_log_level ="error"; + phy_log_verbosity ="medium"; + mac_log_level ="error"; + mac_log_verbosity ="high"; + rlc_log_level ="error"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="error"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="error"; + rrc_log_verbosity ="medium"; +}; + diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 1c62bf32f3..e845d0606d 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -95,6 +95,7 @@ class SSHConnection(): self.Build_eNB_args = '' self.Initialize_eNB_args = '' self.eNBLogFile = '' + self.eNB_instance = '' self.ping_args = '' self.ping_packetloss_threshold = '' self.iperf_args = '' @@ -357,6 +358,10 @@ class SSHConnection(): else: sys.exit('Insufficient Parameter') ci_full_config_file = config_path + '/ci-' + config_file + rruCheck = False + result = re.search('rru', str(config_file)) + if result is not None: + rruCheck = True # Make a copy and adapt to EPC / eNB IP addresses self.command('cp ' + full_config_file + ' ' + ci_full_config_file, '\$', 5) self.command('sed -i -e \'s/mme_ip_address.*$/mme_ip_address = ( { ipv4 = "' + self.EPCIPAddress + '";/\' ' + ci_full_config_file, '\$', 2); @@ -366,11 +371,12 @@ class SSHConnection(): # Launch eNB with the modified config file self.command('source oaienv', '\$', 5) self.command('cd cmake_targets', '\$', 5) - self.command('echo "ulimit -c unlimited && ./lte_build_oai/build/lte-softmodem -O ' + self.eNBSourceCodePath + '/' + ci_full_config_file + extra_options + '" > ./my-lte-softmodem-run.sh ', '\$', 5) - self.command('chmod 775 ./my-lte-softmodem-run.sh ', '\$', 5) + self.command('echo "ulimit -c unlimited && ./lte_build_oai/build/lte-softmodem -O ' + self.eNBSourceCodePath + '/' + ci_full_config_file + extra_options + '" > ./my-lte-softmodem-run' + str(SSH.eNB_instance) + '.sh ', '\$', 5) + self.command('chmod 775 ./my-lte-softmodem-run' + str(SSH.eNB_instance) + '.sh ', '\$', 5) self.command('echo ' + self.eNBPassword + ' | sudo -S rm -Rf enb_' + SSH.testCase_id + '.log', '\$', 5) - self.command('echo ' + self.eNBPassword + ' | sudo -S -E daemon --inherit --unsafe --name=enb_daemon --chdir=' + self.eNBSourceCodePath + '/cmake_targets -o ' + self.eNBSourceCodePath + '/cmake_targets/enb_' + SSH.testCase_id + '.log ./my-lte-softmodem-run.sh', '\$', 5) - self.eNBLogFile = 'enb_' + SSH.testCase_id + '.log' + self.command('echo ' + self.eNBPassword + ' | sudo -S -E daemon --inherit --unsafe --name=enb' + str(SSH.eNB_instance) + '_daemon --chdir=' + self.eNBSourceCodePath + '/cmake_targets -o ' + self.eNBSourceCodePath + '/cmake_targets/enb_' + SSH.testCase_id + '.log ./my-lte-softmodem-run' + str(SSH.eNB_instance) + '.sh', '\$', 5) + if not rruCheck: + self.eNBLogFile = 'enb_' + SSH.testCase_id + '.log' time.sleep(6) doLoop = True loopCounter = 10 @@ -384,8 +390,11 @@ class SSHConnection(): self.close() sys.exit(1) else: - self.command('stdbuf -o0 cat enb_' + SSH.testCase_id + '.log | grep --color=never -i sync', '\$', 4) - result = re.search('got sync', str(self.ssh.before)) + self.command('stdbuf -o0 cat enb_' + SSH.testCase_id + '.log | egrep --color=never -i "wait|sync"', '\$', 4) + if rruCheck: + result = re.search('wait RUs', str(self.ssh.before)) + else: + result = re.search('got sync', str(self.ssh.before)) if result is None: time.sleep(6) else: @@ -1474,8 +1483,8 @@ class SSHConnection(): def TerminateeNB(self): self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword) self.command('cd ' + self.eNBSourceCodePath + '/cmake_targets', '\$', 5) - self.command('echo ' + self.eNBPassword + ' | sudo -S daemon --name=enb_daemon --stop', '\$', 5) - self.command('rm -f my-lte-softmodem-run.sh', '\$', 5) + self.command('echo ' + self.eNBPassword + ' | sudo -S daemon --name=enb' + str(SSH.eNB_instance) + '_daemon --stop', '\$', 5) + self.command('rm -f my-lte-softmodem-run' + str(SSH.eNB_instance) + '.sh', '\$', 5) self.command('echo ' + self.eNBPassword + ' | sudo -S killall --signal SIGINT lte-softmodem || true', '\$', 5) time.sleep(5) self.command('stdbuf -o0 ps -aux | grep -v grep | grep lte-softmodem', '\$', 5) @@ -1493,9 +1502,9 @@ class SSHConnection(): sys.exit(1) else: self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK) + self.eNBLogFile = '' else: self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK) - self.eNBLogFile = '' def TerminateHSS(self): self.open(self.EPCIPAddress, self.EPCUserName, self.EPCPassword) @@ -1865,6 +1874,14 @@ def GetParametersFromXML(action): if action == 'Initialize_eNB': SSH.Initialize_eNB_args = test.findtext('Initialize_eNB_args') + SSH.eNB_instance = test.findtext('eNB_instance') + if (SSH.eNB_instance is None): + SSH.eNB_instance = '0' + + if action == 'Terminate_eNB': + SSH.eNB_instance = test.findtext('eNB_instance') + if (SSH.eNB_instance is None): + SSH.eNB_instance = '0' if action == 'Ping': SSH.ping_args = test.findtext('ping_args') diff --git a/ci-scripts/xml_files/if4p5_usrp210_band7.xml b/ci-scripts/xml_files/if4p5_usrp210_band7.xml new file mode 100644 index 0000000000..7c5338ddbb --- /dev/null +++ b/ci-scripts/xml_files/if4p5_usrp210_band7.xml @@ -0,0 +1,132 @@ + + + 010101 050101 060101 070101 040101 030101 030102 040301 040501 040604 040642 040401 040201 030201 030202 050201 060201 070201 + + + + Build_eNB + Build eNB (USRP) + -t ETHERNET -w USRP -c --eNB + + + + Initialize_eNB + Initialize RRU (FDD/Band7) + -O ci-scripts/conf_files/rru.fdd.band7.conf --codingw --fepw + 1 + + + + Initialize_eNB + Initialize RCC (FDD/Band7/5MHz) + -O ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf --codingw --fepw + 0 + + + + Terminate_eNB + Terminate eNB + 0 + + + + Terminate_eNB + Terminate eNB + 1 + + + + Initialize_UE + Initialize UE + + + + Terminate_UE + Terminate UE + + + + Attach_UE + Attach UE + + + + Detach_UE + Detach UE + + + + Ping + ping (5MHz - 20 sec) + -c 20 + 5 + + + + Iperf + iperf (5MHz - DL/15Mbps/UDP)(30 sec)(single-ue profile) + -u -b 15M -t 30 -i 1 + 50 + single-ue + + + + Iperf + iperf (5MHz - UL/9Mbps/UDP)(30 sec)(single-ue profile) + -u -b 9M -t 30 -i 1 -R + 50 + single-ue + + + + Initialize_HSS + Initialize HSS + + + + Initialize_MME + Initialize MME + + + + Initialize_SPGW + Initialize SPGW + + + + Terminate_HSS + Terminate HSS + + + + Terminate_MME + Terminate MME + + + + Terminate_SPGW + Terminate SPGW + + + diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 006f3390d2..03a461454f 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -1070,6 +1070,8 @@ int main( int argc, char **argv ) } printf("wait RUs\n"); + fflush(stdout); + fflush(stderr); wait_RUs(); printf("ALL RUs READY!\n"); printf("RC.nb_RU:%d\n", RC.nb_RU); From 0b47118b1bbae942f3b304a1e3926975780d8f56 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 8 Oct 2018 10:44:30 +0200 Subject: [PATCH 324/379] CI: Full IF4p5 scenario in FDD Signed-off-by: Raphael Defosseux --- ...cc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf | 274 ++++++++++++++++++ ...rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf | 274 ++++++++++++++++++ ci-scripts/xml_files/if4p5_usrp210_band7.xml | 84 +++++- 3 files changed, 629 insertions(+), 3 deletions(-) create mode 100644 ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf create mode 100644 ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf diff --git a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf new file mode 100644 index 0000000000..1965c34704 --- /dev/null +++ b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf @@ -0,0 +1,274 @@ +Active_eNBs = ( "eNB-Eurecom-LTEBox"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +eNBs = +( + { + # real_time choice in {hard, rt-preempt, no} + real_time = "no"; + + ////////// Identification parameters: + eNB_ID = 0xe00; + + cell_type = "CELL_MACRO_ENB"; + + eNB_name = "eNB-Eurecom-LTEBox"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = "1"; + + mobile_country_code = "208"; + + mobile_network_code = "92"; + + tr_s_preference = "local_mac" + + ////////// 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 = 2680000000L; + 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; + pbch_repetition = "FALSE"; + 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 = 0; + pucch_nCS_AN = 0; + pucch_n1_AN = 0; + 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; + + //Parameters for SIB18 + rxPool_sc_CP_Len = "normal"; + rxPool_sc_Period = "sf40"; + rxPool_data_CP_Len = "normal"; + rxPool_ResourceConfig_prb_Num = 20; + rxPool_ResourceConfig_prb_Start = 5; + rxPool_ResourceConfig_prb_End = 44; + rxPool_ResourceConfig_offsetIndicator_present = "prSmall"; + rxPool_ResourceConfig_offsetIndicator_choice = 0; + rxPool_ResourceConfig_subframeBitmap_present = "prBs40"; + rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000"; + rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5; + rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; +/* rxPool_dataHoppingConfig_hoppingParameter = 0; + rxPool_dataHoppingConfig_numSubbands = "ns1"; + rxPool_dataHoppingConfig_rbOffset = 0; + rxPool_commTxResourceUC-ReqAllowed = "TRUE"; +*/ + // Parameters for SIB19 + discRxPool_cp_Len = "normal" + discRxPool_discPeriod = "rf32" + discRxPool_numRetx = 1; + discRxPool_numRepetition = 2; + discRxPool_ResourceConfig_prb_Num = 5; + discRxPool_ResourceConfig_prb_Start = 3; + discRxPool_ResourceConfig_prb_End = 21; + discRxPool_ResourceConfig_offsetIndicator_present = "prSmall"; + discRxPool_ResourceConfig_offsetIndicator_choice = 0; + discRxPool_ResourceConfig_subframeBitmap_present = "prBs40"; + discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff"; + discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5; + discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; + + } + ); + + + 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.111/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 + }; + } +); + +MACRLCs = ( + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + phy_test_mode = 0; + puSch10xSnr = 200; + puCch10xSnr = 200; + } +); + +L1s = ( + { + num_cc = 1; + tr_n_preference = "local_mac"; + } +); + +RUs = ( + { + local_if_name = "lo"; + remote_address = "127.0.0.2"; + local_address = "127.0.0.1"; + local_portc = 50000; + remote_portc = 50000; + local_portd = 50001; + remote_portd = 50001; + local_rf = "no" + tr_preference = "udp_if4p5" + nb_tx = 1 + nb_rx = 1 + att_tx = 0 + att_rx = 0; + eNB_instances = [0]; + } +); + +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + +NETWORK_CONTROLLER : +{ + FLEXRAN_ENABLED = "no"; + FLEXRAN_INTERFACE_NAME = "lo"; + FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; + FLEXRAN_PORT = 2210; + FLEXRAN_CACHE = "/mnt/oai_agent_cache"; + FLEXRAN_AWAIT_RECONF = "no"; +}; + + 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/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf new file mode 100644 index 0000000000..f1da270bc0 --- /dev/null +++ b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf @@ -0,0 +1,274 @@ +Active_eNBs = ( "eNB-Eurecom-LTEBox"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +eNBs = +( + { + # real_time choice in {hard, rt-preempt, no} + real_time = "no"; + + ////////// Identification parameters: + eNB_ID = 0xe00; + + cell_type = "CELL_MACRO_ENB"; + + eNB_name = "eNB-Eurecom-LTEBox"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = "1"; + + mobile_country_code = "208"; + + mobile_network_code = "92"; + + tr_s_preference = "local_mac" + + ////////// 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 = 2680000000L; + 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; + pbch_repetition = "FALSE"; + 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 = 0; + pucch_nCS_AN = 0; + pucch_n1_AN = 0; + pdsch_referenceSignalPower = -27; + 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; + + //Parameters for SIB18 + rxPool_sc_CP_Len = "normal"; + rxPool_sc_Period = "sf40"; + rxPool_data_CP_Len = "normal"; + rxPool_ResourceConfig_prb_Num = 20; + rxPool_ResourceConfig_prb_Start = 5; + rxPool_ResourceConfig_prb_End = 44; + rxPool_ResourceConfig_offsetIndicator_present = "prSmall"; + rxPool_ResourceConfig_offsetIndicator_choice = 0; + rxPool_ResourceConfig_subframeBitmap_present = "prBs40"; + rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000"; + rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5; + rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; +/* rxPool_dataHoppingConfig_hoppingParameter = 0; + rxPool_dataHoppingConfig_numSubbands = "ns1"; + rxPool_dataHoppingConfig_rbOffset = 0; + rxPool_commTxResourceUC-ReqAllowed = "TRUE"; +*/ + // Parameters for SIB19 + discRxPool_cp_Len = "normal" + discRxPool_discPeriod = "rf32" + discRxPool_numRetx = 1; + discRxPool_numRepetition = 2; + discRxPool_ResourceConfig_prb_Num = 5; + discRxPool_ResourceConfig_prb_Start = 3; + discRxPool_ResourceConfig_prb_End = 21; + discRxPool_ResourceConfig_offsetIndicator_present = "prSmall"; + discRxPool_ResourceConfig_offsetIndicator_choice = 0; + discRxPool_ResourceConfig_subframeBitmap_present = "prBs40"; + discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff"; + discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5; + discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; + + } + ); + + + 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.111/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 + }; + } +); + +MACRLCs = ( + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + phy_test_mode = 0; + puSch10xSnr = 200; + puCch10xSnr = 200; + } +); + +L1s = ( + { + num_cc = 1; + tr_n_preference = "local_mac"; + } +); + +RUs = ( + { + local_if_name = "lo"; + remote_address = "127.0.0.2"; + local_address = "127.0.0.1"; + local_portc = 50000; + remote_portc = 50000; + local_portd = 50001; + remote_portd = 50001; + local_rf = "no" + tr_preference = "udp_if4p5" + nb_tx = 1 + nb_rx = 1 + att_tx = 0 + att_rx = 0; + eNB_instances = [0]; + } +); + +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + +NETWORK_CONTROLLER : +{ + FLEXRAN_ENABLED = "no"; + FLEXRAN_INTERFACE_NAME = "lo"; + FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; + FLEXRAN_PORT = 2210; + FLEXRAN_CACHE = "/mnt/oai_agent_cache"; + FLEXRAN_AWAIT_RECONF = "no"; +}; + + 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/ci-scripts/xml_files/if4p5_usrp210_band7.xml b/ci-scripts/xml_files/if4p5_usrp210_band7.xml index 7c5338ddbb..d08ff0e062 100644 --- a/ci-scripts/xml_files/if4p5_usrp210_band7.xml +++ b/ci-scripts/xml_files/if4p5_usrp210_band7.xml @@ -21,7 +21,11 @@ --> - 010101 050101 060101 070101 040101 030101 030102 040301 040501 040604 040642 040401 040201 030201 030202 050201 060201 070201 + 010101 050101 060101 070101 040101 + 030101 030102 040301 040501 040604 040642 040401 040201 030202 030201 + 030111 030112 040301 040511 040614 040652 040401 040201 030202 030201 + 030101 030102 040301 040521 040624 040662 040401 040201 030202 030201 + 050201 060201 070201 @@ -44,15 +48,43 @@ 0 + + Initialize_eNB + Initialize RRU (FDD/Band7) + -O ci-scripts/conf_files/rru.fdd.band7.conf --codingw --fepw + 1 + + + + Initialize_eNB + Initialize RCC (FDD/Band7/10MHz) + -O ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf --codingw --fepw + 0 + + + + Initialize_eNB + Initialize RRU (FDD/Band7) + -O ci-scripts/conf_files/rru.fdd.band7.conf --codingw --fepw + 1 + + + + Initialize_eNB + Initialize RCC (FDD/Band7/20MHz) + -O ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf --codingw --fepw + 0 + + Terminate_eNB - Terminate eNB + Terminate RCC 0 Terminate_eNB - Terminate eNB + Terminate RRU 1 @@ -99,6 +131,52 @@ single-ue + + Ping + ping (10MHz - 20 sec) + -c 20 + 5 + + + + Iperf + iperf (10MHz - DL/32Mbps/UDP)(30 sec)(single-ue profile) + -u -b 32M -t 30 -i 1 + 50 + single-ue + + + + Iperf + iperf (10MHz - UL/20Mbps/UDP)(30 sec)(single-ue profile) + -u -b 20M -t 30 -i 1 -R + 50 + single-ue + + + + Ping + ping (20MHz - 20 sec) + -c 20 + 5 + + + + Iperf + iperf (20MHz - DL/70Mbps/UDP)(30 sec)(single-ue profile) + -u -b 70M -t 30 -i 1 + 50 + single-ue + + + + Iperf + iperf (20MHz - UL/20Mbps/UDP)(30 sec)(single-ue profile) + -u -b 20M -t 30 -i 1 -R + 50 + single-ue + + Initialize_HSS Initialize HSS From 77db46aa349bef0a99da713cef8d92bde2154df0 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 16 Oct 2018 15:58:37 +0200 Subject: [PATCH 325/379] CI: integrating IF4p5 test to full process --> currently only FDD 5MHz Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 51 ++++++++++++++++++- ...cc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf | 7 +-- ...rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf | 7 +-- ...rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf | 7 +-- ci-scripts/xml_files/enb_usrp210_band7.xml | 9 +++- ci-scripts/xml_files/enb_usrpb210_band40.xml | 17 +++++-- ci-scripts/xml_files/if4p5_usrp210_band7.xml | 11 ++-- 7 files changed, 85 insertions(+), 24 deletions(-) diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index 6313e77f9c..abd1a07d26 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -40,7 +40,7 @@ pipeline { disableConcurrentBuilds() timestamps() gitLabConnection('OAI GitLab') - gitlabBuilds(builds: ["Build eNb-USRP", "Build basic-sim", "Build phy-sim", "Build eNb-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test basic-sim", "Test-FDD-Band7", "Test-TDD-Band40"]) + gitlabBuilds(builds: ["Build eNb-USRP", "Build basic-sim", "Build phy-sim", "Build eNb-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test basic-sim", "Test-FDD-Band7", "Test-TDD-Band40", "Test-IF4p5-FDD-Band7"]) ansiColor('xterm') } @@ -394,6 +394,55 @@ pipeline { } } } + stage ("Test IF4p5 - FDD - Band 7 - B210") { + steps { + script { + try { + if ("MERGE".equals(env.gitlabActionType)) { + gitlabCommitStatus(name: "Test-IF4p5-FDD-Band7") { + build job: 'eNB-CI-IF4p5-FDD-Band7-B210', + parameters: [ + string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), + string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)), + string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)), + booleanParam(name: 'eNB_mergeRequest', value: true) + ] + } + } else { + gitlabCommitStatus(name: "Test-IF4p5-FDD-Band7") { + build job: 'eNB-CI-IF4p5-FDD-Band7-B210', + parameters: [ + string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), + string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)), + string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)), + booleanParam(name: 'eNB_mergeRequest', value: false) + ] + } + } + } catch (Exception e) { + currentBuild.result = 'FAILURE' + } + } + } + post { + // In case of any non-success, we are retrieving the HTML report of the last completed + // slave job. + // The only drop-back is that we may retrieve the HTML report of a previous build + always { + script { + if (!fileExists('test_results-eNB-CI-IF4p5-FDD-Band7-B210.html')) { + copyArtifacts(projectName: 'eNB-CI-IF4p5-FDD-Band7-B210', + filter: 'test_results*.html', + selector: lastCompleted()) + if (fileExists('test_results-eNB-CI-IF4p5-FDD-Band7-B210.html')) { + sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-IF4p5-FDD-Band7-B210.html" + archiveArtifacts artifacts: 'test_results-eNB-CI-IF4p5-FDD-Band7-B210.html' + } + } + } + } + } + } } } } diff --git a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf index 1965c34704..28ffc43b23 100644 --- a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf +++ b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf @@ -16,11 +16,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); tr_s_preference = "local_mac" diff --git a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf index f62ab75b39..4d064ecc0e 100644 --- a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf +++ b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf @@ -16,11 +16,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); tr_s_preference = "local_mac" diff --git a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf index f1da270bc0..efb1e823ad 100644 --- a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf +++ b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf @@ -16,11 +16,8 @@ eNBs = 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"; + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); tr_s_preference = "local_mac" diff --git a/ci-scripts/xml_files/enb_usrp210_band7.xml b/ci-scripts/xml_files/enb_usrp210_band7.xml index 7dd796c09d..0785ad815d 100644 --- a/ci-scripts/xml_files/enb_usrp210_band7.xml +++ b/ci-scripts/xml_files/enb_usrp210_band7.xml @@ -21,7 +21,14 @@ --> - 010101 050101 060101 070101 040101 030101 040301 040501 040603 040604 040605 040606 040607 040641 040642 040643 040644 040401 040201 030201 030111 040301 040511 040613 040614 040615 040616 040617 040651 040652 040653 040654 040401 040201 030201 030121 040301 040521 040623 040624 040625 040626 040627 040662 040661 040663 040664 040401 040201 030201 050201 060201 070201 + + 010101 + 050101 060101 070101 040101 + 030101 040301 040501 040603 040604 040605 040606 040607 040641 040642 040643 040644 040401 040201 030201 + 030111 040301 040511 040613 040614 040615 040616 040617 040651 040652 040653 040654 040401 040201 030201 + 030121 040301 040521 040623 040624 040625 040626 040627 040662 040661 040663 040664 040401 040201 030201 + 050201 060201 070201 + diff --git a/ci-scripts/xml_files/enb_usrpb210_band40.xml b/ci-scripts/xml_files/enb_usrpb210_band40.xml index 6023046a86..62ffdab409 100644 --- a/ci-scripts/xml_files/enb_usrpb210_band40.xml +++ b/ci-scripts/xml_files/enb_usrpb210_band40.xml @@ -21,8 +21,17 @@ --> - 010101 050101 060101 070101 040101 030104 040301 040501 040602 040601 040603 040642 040641 040643 040401 040201 030201 030105 040301 040502 040612 040611 040613 040652 040651 040653 040401 040201 030201 050201 060201 070201 - + + 010101 + 050101 060101 070101 040101 + 030104 040301 040501 040602 040601 040603 040642 040641 040643 040401 040201 030201 + 030114 040301 040511 040612 040611 040613 040652 040651 040653 040401 040201 030201 + 050201 060201 070201 + + + + 030124 040301 040521 040622 040621 040623 040662 040661 040663 040401 040201 030201 + Build_eNB @@ -36,7 +45,7 @@ -O ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf --codingw --fepw - + Initialize_eNB Initialize eNB (TDD/Band40/10MHz/info) -O ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf --codingw --fepw @@ -80,7 +89,7 @@ 25 - + Ping ping (10MHz - 20 sec) -c 20 diff --git a/ci-scripts/xml_files/if4p5_usrp210_band7.xml b/ci-scripts/xml_files/if4p5_usrp210_band7.xml index d08ff0e062..4da3f0ab25 100644 --- a/ci-scripts/xml_files/if4p5_usrp210_band7.xml +++ b/ci-scripts/xml_files/if4p5_usrp210_band7.xml @@ -21,12 +21,17 @@ --> - 010101 050101 060101 070101 040101 + + + 010101 + 050101 060101 070101 040101 030101 030102 040301 040501 040604 040642 040401 040201 030202 030201 + 050201 060201 070201 + + 030111 030112 040301 040511 040614 040652 040401 040201 030202 030201 030101 030102 040301 040521 040624 040662 040401 040201 030202 030201 - 050201 060201 070201 - + Build_eNB From 029d894c5faf0e5f7993616c790add64d7e71a89 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 16 Oct 2018 17:27:37 +0200 Subject: [PATCH 326/379] CI: fixes in IF4p5 testing with COTS-UE also adding TDD IF4p5 testing removing basic-sim TDD 5MHz DL iperf test Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 51 +++- ci-scripts/Jenkinsfile-tmp-ran | 1 - ...d40.tm1.100PRB.FairScheduler.usrpb210.conf | 234 ++++++++++++++++++ ...nd40.tm1.25PRB.FairScheduler.usrpb210.conf | 234 ++++++++++++++++++ ...nd40.tm1.50PRB.FairScheduler.usrpb210.conf | 234 ++++++++++++++++++ ci-scripts/conf_files/rru.tdd.band40.conf | 45 ++++ ci-scripts/runTestOnVM.sh | 17 +- ci-scripts/xml_files/enb_usrpb210_band40.xml | 7 +- ci-scripts/xml_files/if4p5_usrp210_band40.xml | 219 ++++++++++++++++ ci-scripts/xml_files/if4p5_usrp210_band7.xml | 8 +- 10 files changed, 1034 insertions(+), 16 deletions(-) create mode 100644 ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf create mode 100644 ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf create mode 100644 ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf create mode 100644 ci-scripts/conf_files/rru.tdd.band40.conf create mode 100644 ci-scripts/xml_files/if4p5_usrp210_band40.xml diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index abd1a07d26..54ceca9603 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -40,7 +40,7 @@ pipeline { disableConcurrentBuilds() timestamps() gitLabConnection('OAI GitLab') - gitlabBuilds(builds: ["Build eNb-USRP", "Build basic-sim", "Build phy-sim", "Build eNb-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test basic-sim", "Test-FDD-Band7", "Test-TDD-Band40", "Test-IF4p5-FDD-Band7"]) + gitlabBuilds(builds: ["Build eNb-USRP", "Build basic-sim", "Build phy-sim", "Build eNb-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test basic-sim", "Test-FDD-Band7", "Test-TDD-Band40", "Test-IF4p5-FDD-Band7", "Test-IF4p5-TDD-Band40"]) ansiColor('xterm') } @@ -443,6 +443,55 @@ pipeline { } } } + stage ("Test IF4p5 - TDD - Band 40 - B210") { + steps { + script { + try { + if ("MERGE".equals(env.gitlabActionType)) { + gitlabCommitStatus(name: "Test-IF4p5-TDD-Band40") { + build job: 'eNB-CI-IF4p5-TDD-Band40-B210', + parameters: [ + string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), + string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)), + string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)), + booleanParam(name: 'eNB_mergeRequest', value: true) + ] + } + } else { + gitlabCommitStatus(name: "Test-IF4p5-TDD-Band40") { + build job: 'eNB-CI-IF4p5-TDD-Band40-B210', + parameters: [ + string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), + string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)), + string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)), + booleanParam(name: 'eNB_mergeRequest', value: false) + ] + } + } + } catch (Exception e) { + currentBuild.result = 'FAILURE' + } + } + } + post { + // In case of any non-success, we are retrieving the HTML report of the last completed + // slave job. + // The only drop-back is that we may retrieve the HTML report of a previous build + always { + script { + if (!fileExists('test_results-eNB-CI-IF4p5-TDD-Band40-B210.html')) { + copyArtifacts(projectName: 'eNB-CI-IF4p5-TDD-Band40-B210', + filter: 'test_results*.html', + selector: lastCompleted()) + if (fileExists('test_results-eNB-CI-IF4p5-TDD-Band40-B210.html')) { + sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-IF4p5-TDD-Band40-B210.html" + archiveArtifacts artifacts: 'test_results-eNB-CI-IF4p5-TDD-Band40-B210.html' + } + } + } + } + } + } } } } diff --git a/ci-scripts/Jenkinsfile-tmp-ran b/ci-scripts/Jenkinsfile-tmp-ran index 1277e0d483..045f93b5c6 100644 --- a/ci-scripts/Jenkinsfile-tmp-ran +++ b/ci-scripts/Jenkinsfile-tmp-ran @@ -60,7 +60,6 @@ pipeline { } options { disableConcurrentBuilds() - timestamps() ansiColor('xterm') } // the following parameter options are commented out so it shows the ones diff --git a/ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf new file mode 100644 index 0000000000..217991f69f --- /dev/null +++ b/ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf @@ -0,0 +1,234 @@ +Active_eNBs = ( "eNB_Eurecom_LTEBox"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +eNBs = +( + { + # real_time choice in {hard, rt-preempt, no} + real_time = "no"; + + ////////// Identification parameters: + eNB_ID = 0xe00; + + cell_type = "CELL_MACRO_ENB"; + + eNB_name = "eNB_Eurecom_LTEBox"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); + + ////////// Physical parameters: + + component_carriers = ( + { + node_function = "NGFI_RCC_IF4p5"; + node_timing = "synch_to_ext_device"; + node_synch_ref = 0; + frame_type = "TDD"; + tdd_config = 1; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 40; + downlink_frequency = 2350000000L; + 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 = 0; + 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 = -106; + msg3_delta_Preamble = 6; + pucch_deltaF_Format1 = "deltaF2"; + pucch_deltaF_Format1b = "deltaF3"; + pucch_deltaF_Format2 = "deltaF0"; + pucch_deltaF_Format2a = "deltaF0"; + pucch_deltaF_Format2b = "deltaF0"; + + rach_numberOfRA_Preambles = 64; + rach_preamblesGroupAConfig = "DISABLE"; + /* + rach_sizeOfRA_PreamblesGroupA = ; + rach_messageSizeGroupA = ; + rach_messagePowerOffsetGroupB = ; + */ + rach_powerRampingStep = 4; + rach_preambleInitialReceivedTargetPower = -108; + rach_preambleTransMax = 10; + rach_raResponseWindowSize = 10; + rach_macContentionResolutionTimer = 48; + rach_maxHARQ_Msg3Tx = 4; + + pcch_default_PagingCycle = 128; + pcch_nB = "oneT"; + bcch_modificationPeriodCoeff = 2; + ue_TimersAndConstants_t300 = 1000; + ue_TimersAndConstants_t301 = 1000; + ue_TimersAndConstants_t310 = 1000; + ue_TimersAndConstants_t311 = 10000; + ue_TimersAndConstants_n310 = 20; + ue_TimersAndConstants_n311 = 1; + + ue_TransmissionMode = 1; + } + ); + + + srb1_parameters : + { + # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] + timer_poll_retransmit = 80; + + # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] + timer_reordering = 35; + + # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] + timer_status_prohibit = 0; + + # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] + poll_pdu = 4; + + # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] + poll_byte = 99999; + + # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] + max_retx_threshold = 4; + } + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + ////////// MME parameters: + mme_ip_address = ( { ipv4 = "10.0.0.2"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.0.1/24"; + + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "10.0.0.1/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 + }; + + log_config : + { + global_log_level ="debug"; + global_log_verbosity ="medium"; + hw_log_level ="info"; + hw_log_verbosity ="medium"; + phy_log_level ="info"; + phy_log_verbosity ="medium"; + mac_log_level ="info"; + mac_log_verbosity ="high"; + rlc_log_level ="info"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="info"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="info"; + rrc_log_verbosity ="medium"; + }; + + } +); +MACRLCs = ( + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + scheduler_mode = "fairRR"; + puSch10xSnr = 200; + puCch10xSnr = 200; + } +); + +L1s = ( + { + num_cc = 1; + tr_n_preference = "local_mac"; + } +); + +RUs = ( + { + local_if_name = "lo"; + remote_address = "127.0.0.2"; + local_address = "127.0.0.1"; + local_portc = 50000; + remote_portc = 50000; + local_portd = 50001; + remote_portd = 50001; + local_rf = "no" + tr_preference = "udp_if4p5" + nb_tx = 1 + nb_rx = 1 + att_tx = 0 + att_rx = 0; + eNB_instances = [0]; + } +); + +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + +NETWORK_CONTROLLER : +{ + FLEXRAN_ENABLED = "no"; + FLEXRAN_INTERFACE_NAME = "lo"; + FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; + FLEXRAN_PORT = 2210; + FLEXRAN_CACHE = "/mnt/oai_agent_cache"; + FLEXRAN_AWAIT_RECONF = "no"; +}; diff --git a/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf new file mode 100644 index 0000000000..21f4f34ba9 --- /dev/null +++ b/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf @@ -0,0 +1,234 @@ +Active_eNBs = ( "eNB_Eurecom_LTEBox"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +eNBs = +( + { + # real_time choice in {hard, rt-preempt, no} + real_time = "no"; + + ////////// Identification parameters: + eNB_ID = 0xe00; + + cell_type = "CELL_MACRO_ENB"; + + eNB_name = "eNB_Eurecom_LTEBox"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); + + ////////// Physical parameters: + + component_carriers = ( + { + node_function = "NGFI_RCC_IF4p5"; + node_timing = "synch_to_ext_device"; + node_synch_ref = 0; + frame_type = "TDD"; + tdd_config = 1; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 40; + downlink_frequency = 2350000000L; + uplink_frequency_offset = 0; + Nid_cell = 0; + N_RB_DL = 25; + Nid_cell_mbsfn = 0; + nb_antenna_ports = 1; + nb_antennas_tx = 1; + nb_antennas_rx = 1; + tx_gain = 90; + rx_gain = 125; + prach_root = 0; + prach_config_index = 0; + prach_high_speed = "DISABLE"; + prach_zero_correlation = 1; + prach_freq_offset = 2; + pucch_delta_shift = 1; + pucch_nRB_CQI = 1; + pucch_nCS_AN = 0; + pucch_n1_AN = 0; + pdsch_referenceSignalPower =-27; + pdsch_p_b = 0; + pusch_n_SB = 1; + pusch_enable64QAM = "DISABLE"; + pusch_hoppingMode = "interSubFrame"; + pusch_hoppingOffset = 0; + pusch_groupHoppingEnabled = "ENABLE"; + pusch_groupAssignment = 0; + pusch_sequenceHoppingEnabled = "DISABLE"; + pusch_nDMRS1 = 1; + phich_duration = "NORMAL"; + phich_resource = "ONESIXTH"; + srs_enable = "DISABLE"; + /* srs_BandwidthConfig =; + srs_SubframeConfig =; + srs_ackNackST =; + srs_MaxUpPts =;*/ + + pusch_p0_Nominal = -96; + pusch_alpha = "AL1"; + pucch_p0_Nominal = -106; + msg3_delta_Preamble = 6; + pucch_deltaF_Format1 = "deltaF2"; + pucch_deltaF_Format1b = "deltaF3"; + pucch_deltaF_Format2 = "deltaF0"; + pucch_deltaF_Format2a = "deltaF0"; + pucch_deltaF_Format2b = "deltaF0"; + + rach_numberOfRA_Preambles = 64; + rach_preamblesGroupAConfig = "DISABLE"; + /* + rach_sizeOfRA_PreamblesGroupA = ; + rach_messageSizeGroupA = ; + rach_messagePowerOffsetGroupB = ; + */ + rach_powerRampingStep = 4; + rach_preambleInitialReceivedTargetPower = -108; + rach_preambleTransMax = 10; + rach_raResponseWindowSize = 10; + rach_macContentionResolutionTimer = 48; + rach_maxHARQ_Msg3Tx = 4; + + pcch_default_PagingCycle = 128; + pcch_nB = "oneT"; + bcch_modificationPeriodCoeff = 2; + ue_TimersAndConstants_t300 = 1000; + ue_TimersAndConstants_t301 = 1000; + ue_TimersAndConstants_t310 = 1000; + ue_TimersAndConstants_t311 = 10000; + ue_TimersAndConstants_n310 = 20; + ue_TimersAndConstants_n311 = 1; + + ue_TransmissionMode = 1; + } + ); + + + srb1_parameters : + { + # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] + timer_poll_retransmit = 80; + + # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] + timer_reordering = 35; + + # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] + timer_status_prohibit = 0; + + # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] + poll_pdu = 4; + + # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] + poll_byte = 99999; + + # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] + max_retx_threshold = 4; + } + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + ////////// MME parameters: + mme_ip_address = ( { ipv4 = "10.0.0.2"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.0.1/24"; + + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "10.0.0.1/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 + }; + + log_config : + { + global_log_level ="debug"; + global_log_verbosity ="medium"; + hw_log_level ="info"; + hw_log_verbosity ="medium"; + phy_log_level ="info"; + phy_log_verbosity ="medium"; + mac_log_level ="info"; + mac_log_verbosity ="high"; + rlc_log_level ="info"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="info"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="info"; + rrc_log_verbosity ="medium"; + }; + + } +); +MACRLCs = ( + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + scheduler_mode = "fairRR"; + puSch10xSnr = 200; + puCch10xSnr = 200; + } +); + +L1s = ( + { + num_cc = 1; + tr_n_preference = "local_mac"; + } +); + +RUs = ( + { + local_if_name = "lo"; + remote_address = "127.0.0.2"; + local_address = "127.0.0.1"; + local_portc = 50000; + remote_portc = 50000; + local_portd = 50001; + remote_portd = 50001; + local_rf = "no" + tr_preference = "udp_if4p5" + nb_tx = 1 + nb_rx = 1 + att_tx = 0 + att_rx = 0; + eNB_instances = [0]; + } +); + +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + +NETWORK_CONTROLLER : +{ + FLEXRAN_ENABLED = "no"; + FLEXRAN_INTERFACE_NAME = "lo"; + FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; + FLEXRAN_PORT = 2210; + FLEXRAN_CACHE = "/mnt/oai_agent_cache"; + FLEXRAN_AWAIT_RECONF = "no"; +}; diff --git a/ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf new file mode 100644 index 0000000000..2fdfa3c4e7 --- /dev/null +++ b/ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf @@ -0,0 +1,234 @@ +Active_eNBs = ( "eNB_Eurecom_LTEBox"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +eNBs = +( + { + # real_time choice in {hard, rt-preempt, no} + real_time = "no"; + + ////////// Identification parameters: + eNB_ID = 0xe00; + + cell_type = "CELL_MACRO_ENB"; + + eNB_name = "eNB_Eurecom_LTEBox"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = 1; + plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); + + ////////// Physical parameters: + + component_carriers = ( + { + node_function = "NGFI_RCC_IF4p5"; + node_timing = "synch_to_ext_device"; + node_synch_ref = 0; + frame_type = "TDD"; + tdd_config = 1; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 40; + downlink_frequency = 2350000000L; + 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 = 0; + pdsch_referenceSignalPower =-27; + pdsch_p_b = 0; + pusch_n_SB = 1; + pusch_enable64QAM = "DISABLE"; + pusch_hoppingMode = "interSubFrame"; + pusch_hoppingOffset = 0; + pusch_groupHoppingEnabled = "ENABLE"; + pusch_groupAssignment = 0; + pusch_sequenceHoppingEnabled = "DISABLE"; + pusch_nDMRS1 = 1; + phich_duration = "NORMAL"; + phich_resource = "ONESIXTH"; + srs_enable = "DISABLE"; + /* srs_BandwidthConfig =; + srs_SubframeConfig =; + srs_ackNackST =; + srs_MaxUpPts =;*/ + + pusch_p0_Nominal = -96; + pusch_alpha = "AL1"; + pucch_p0_Nominal = -106; + msg3_delta_Preamble = 6; + pucch_deltaF_Format1 = "deltaF2"; + pucch_deltaF_Format1b = "deltaF3"; + pucch_deltaF_Format2 = "deltaF0"; + pucch_deltaF_Format2a = "deltaF0"; + pucch_deltaF_Format2b = "deltaF0"; + + rach_numberOfRA_Preambles = 64; + rach_preamblesGroupAConfig = "DISABLE"; + /* + rach_sizeOfRA_PreamblesGroupA = ; + rach_messageSizeGroupA = ; + rach_messagePowerOffsetGroupB = ; + */ + rach_powerRampingStep = 4; + rach_preambleInitialReceivedTargetPower = -108; + rach_preambleTransMax = 10; + rach_raResponseWindowSize = 10; + rach_macContentionResolutionTimer = 48; + rach_maxHARQ_Msg3Tx = 4; + + pcch_default_PagingCycle = 128; + pcch_nB = "oneT"; + bcch_modificationPeriodCoeff = 2; + ue_TimersAndConstants_t300 = 1000; + ue_TimersAndConstants_t301 = 1000; + ue_TimersAndConstants_t310 = 1000; + ue_TimersAndConstants_t311 = 10000; + ue_TimersAndConstants_n310 = 20; + ue_TimersAndConstants_n311 = 1; + + ue_TransmissionMode = 1; + } + ); + + + srb1_parameters : + { + # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] + timer_poll_retransmit = 80; + + # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] + timer_reordering = 35; + + # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] + timer_status_prohibit = 0; + + # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] + poll_pdu = 4; + + # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] + poll_byte = 99999; + + # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] + max_retx_threshold = 4; + } + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + ////////// MME parameters: + mme_ip_address = ( { ipv4 = "10.0.0.2"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.0.1/24"; + + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "10.0.0.1/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + + ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24"; + ENB_PORT_FOR_X2C = 36422; # Spec 36422 + }; + + log_config : + { + global_log_level ="debug"; + global_log_verbosity ="medium"; + hw_log_level ="info"; + hw_log_verbosity ="medium"; + phy_log_level ="info"; + phy_log_verbosity ="medium"; + mac_log_level ="info"; + mac_log_verbosity ="high"; + rlc_log_level ="info"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="info"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="info"; + rrc_log_verbosity ="medium"; + }; + + } +); +MACRLCs = ( + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + scheduler_mode = "fairRR"; + puSch10xSnr = 200; + puCch10xSnr = 200; + } +); + +L1s = ( + { + num_cc = 1; + tr_n_preference = "local_mac"; + } +); + +RUs = ( + { + local_if_name = "lo"; + remote_address = "127.0.0.2"; + local_address = "127.0.0.1"; + local_portc = 50000; + remote_portc = 50000; + local_portd = 50001; + remote_portd = 50001; + local_rf = "no" + tr_preference = "udp_if4p5" + nb_tx = 1 + nb_rx = 1 + att_tx = 0 + att_rx = 0; + eNB_instances = [0]; + } +); + +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + +NETWORK_CONTROLLER : +{ + FLEXRAN_ENABLED = "no"; + FLEXRAN_INTERFACE_NAME = "lo"; + FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; + FLEXRAN_PORT = 2210; + FLEXRAN_CACHE = "/mnt/oai_agent_cache"; + FLEXRAN_AWAIT_RECONF = "no"; +}; diff --git a/ci-scripts/conf_files/rru.tdd.band40.conf b/ci-scripts/conf_files/rru.tdd.band40.conf new file mode 100644 index 0000000000..ff5e13908e --- /dev/null +++ b/ci-scripts/conf_files/rru.tdd.band40.conf @@ -0,0 +1,45 @@ +RUs = ( + { + local_if_name = "lo"; + remote_address = "127.0.0.1" + local_address = "127.0.0.2"; + local_portc = 50000; + remote_portc = 50000; + local_portd = 50001; + remote_portd = 50001; + local_rf = "yes" + tr_preference = "udp_if4p5"; + nb_tx = 1; + nb_rx = 1; + max_pdschReferenceSignalPower = -27; + max_rxgain = 115; + bands = [7]; + } +); + +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + +log_config = { + global_log_level ="error"; + global_log_verbosity ="medium"; + hw_log_level ="error"; + hw_log_verbosity ="medium"; + phy_log_level ="error"; + phy_log_verbosity ="medium"; + mac_log_level ="error"; + mac_log_verbosity ="high"; + rlc_log_level ="error"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="error"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="error"; + rrc_log_verbosity ="medium"; +}; + diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index 231ebe59d0..4aed76cf75 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -887,14 +887,15 @@ then scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 - echo "############################################################" - echo "Iperf DL" - echo "############################################################" - CURR_IPERF_LOG_BASE=tdd_05MHz_iperf_dl - iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 6 $CURR_IPERF_LOG_BASE - scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC - check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6 +# Bug in TDD 5Mhz --- not running it +# echo "############################################################" +# echo "Iperf DL" +# echo "############################################################" +# CURR_IPERF_LOG_BASE=tdd_05MHz_iperf_dl +# iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 6 $CURR_IPERF_LOG_BASE +# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC +# check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6 echo "############################################################" echo "Terminate enb/ue simulators" diff --git a/ci-scripts/xml_files/enb_usrpb210_band40.xml b/ci-scripts/xml_files/enb_usrpb210_band40.xml index 62ffdab409..1af1c319cf 100644 --- a/ci-scripts/xml_files/enb_usrpb210_band40.xml +++ b/ci-scripts/xml_files/enb_usrpb210_band40.xml @@ -29,9 +29,10 @@ 050201 060201 070201 - + + Build_eNB @@ -41,7 +42,7 @@ Initialize_eNB - Initialize eNB (FDD/Band40/5MHz) + Initialize eNB (TDD/Band40/5MHz) -O ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf --codingw --fepw diff --git a/ci-scripts/xml_files/if4p5_usrp210_band40.xml b/ci-scripts/xml_files/if4p5_usrp210_band40.xml new file mode 100644 index 0000000000..aa668f801d --- /dev/null +++ b/ci-scripts/xml_files/if4p5_usrp210_band40.xml @@ -0,0 +1,219 @@ + + + + + + 050101 060101 070101 040101 + 030104 030105 040301 040501 040602 040401 040201 030201 030202 + 050201 060201 070201 + + + + + + + Build_eNB + Build eNB (USRP) + -t ETHERNET -w USRP -c --eNB + + + + Initialize_eNB + Initialize RRU (TDD/Band40) + -O ci-scripts/conf_files/rru.tdd.band40.conf --codingw --fepw + 0 + + + + Initialize_eNB + Initialize RCC (TDD/Band40/5MHz) + -O ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf --codingw --fepw + 1 + + + + Initialize_eNB + Initialize RRU (TDD/Band40) + -O ci-scripts/conf_files/rru.tdd.band40.conf --codingw --fepw + 0 + + + + Initialize_eNB + Initialize RCC (TDD/Band40/10MHz/info) + -O ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf --codingw --fepw + 1 + + + + Initialize_eNB + Initialize RRU (TDD/Band40) + -O ci-scripts/conf_files/rru.tdd.band40.conf --codingw --fepw + 0 + + + + Initialize_eNB + Initialize RCC (TDD/Band40/20MHz/info) + -O ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf --codingw --fepw + 1 + + + + Terminate_eNB + Terminate RCC + 1 + + + + Terminate_eNB + Terminate RRU + 0 + + + + Initialize_UE + Initialize UE + + + + Terminate_UE + Terminate UE + + + + Attach_UE + Attach UE + + + + Detach_UE + Detach UE + + + + Ping + ping (5MHz - 20 sec) + -c 20 + 25 + + + + Ping + ping (10MHz - 20 sec) + -c 20 + 25 + + + + Ping + ping (20MHz - 20 sec) + -c 20 + 25 + + + + Iperf + iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(single-ue) + -u -b 6.5M -t 30 -i 1 + 50 + single-ue + + + + Iperf + iperf (10MHz - DL/13.5Mbps/UDP)(30 sec)(single-ue) + -u -b 13.5M -t 30 -i 1 + 50 + single-ue + + + + Iperf + iperf (20MHz - DL/13.5Mbps/UDP)(30 sec)(single-ue) + -u -b 13.5M -t 30 -i 1 + 50 + single-ue + + + + Iperf + iperf (5MHz - UL/2Mbps/UDP)(30 sec)(single-ue) + -u -b 2M -t 30 -i 1 -R + 50 + single-ue + + + + Iperf + iperf (10MHz - UL/2Mbps/UDP)(30 sec)(single-ue) + -u -b 2M -t 30 -i 1 -R + 50 + single-ue + + + + Iperf + iperf (20MHz - UL/2Mbps/UDP)(30 sec)(single-ue) + -u -b 2M -t 30 -i 1 -R + 50 + single-ue + + + + Initialize_HSS + Initialize HSS + + + + Initialize_MME + Initialize MME + + + + Initialize_SPGW + Initialize SPGW + + + + Terminate_HSS + Terminate HSS + + + + Terminate_MME + Terminate MME + + + + Terminate_SPGW + Terminate SPGW + + + diff --git a/ci-scripts/xml_files/if4p5_usrp210_band7.xml b/ci-scripts/xml_files/if4p5_usrp210_band7.xml index 4da3f0ab25..23ec450182 100644 --- a/ci-scripts/xml_files/if4p5_usrp210_band7.xml +++ b/ci-scripts/xml_files/if4p5_usrp210_band7.xml @@ -25,12 +25,14 @@ 010101 050101 060101 070101 040101 - 030101 030102 040301 040501 040604 040642 040401 040201 030202 030201 + 030101 030102 040301 040501 040604 040642 040401 040201 030201 030202 050201 060201 070201 + - 030111 030112 040301 040511 040614 040652 040401 040201 030202 030201 - 030101 030102 040301 040521 040624 040662 040401 040201 030202 030201 From d4eb82261534240217f8a47388e03669cc06470e Mon Sep 17 00:00:00 2001 From: "Bi-Ruei, Chiu" Date: Tue, 9 Oct 2018 09:18:27 +0800 Subject: [PATCH 327/379] Update asn1c to commit d3aed06bb2bec7df1b5c6d0333f8c7dfc5993372 1. Fix the problem of compiling NR_RangeToBestCell.c of NR-RRC 15.3.0 2. Fix the problem that default OCTET/BIT STRING value not used in APER 3. Add support of extension group inside CHOICE type used in LTE-RRC 15.3.0 4. Fix the problem that NGAP 15.0.0 ASN.1 can not generate C files --- cmake_targets/tools/build_helper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 7727ce4fa3..8c5d33975c 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -683,7 +683,7 @@ install_asn1c_from_source(){ # better to use a given commit than a branch in case the branch # is updated and requires modifications in the source of OAI #git checkout velichkov_s1ap_plus_option_group - git checkout 73d6b23dcec9ab36605b4af884143824392134c1 + git checkout d3aed06bb2bec7df1b5c6d0333f8c7dfc5993372 autoreconf -iv ./configure make -j`nproc` From 99e8dea6d4c19795c0b15b30efa775a99f992c98 Mon Sep 17 00:00:00 2001 From: "Bi-Ruei, Chiu" Date: Wed, 17 Oct 2018 18:32:08 +0800 Subject: [PATCH 328/379] Upgrade ASN.1 of LTE-RRC to 15.3.0 --- cmake_targets/CMakeLists.txt | 4 +- .../asn1c/ASN1_files/lte-rrc-15.3.0.asn1 | 17697 ++++++++++++++++ openair2/RRC/LTE/rrc_UE.c | 4 + 3 files changed, 17703 insertions(+), 2 deletions(-) create mode 100644 openair2/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.3.0.asn1 diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 39e36bd586..43ca89322d 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -315,8 +315,8 @@ elseif (${RRC_ASN1_VERSION} STREQUAL "Rel14") make_version(RRC_VERSION 14 7 0) set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-14.7.0.asn1) elseif (${RRC_ASN1_VERSION} STREQUAL "Rel15") - make_version(RRC_VERSION 15 2 2) - set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/RRC-36331-f22.asn) + make_version(RRC_VERSION 15 3 0) + set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.3.0.asn1) endif (${RRC_ASN1_VERSION} STREQUAL "Rel8") add_definitions(-DRRC_VERSION=${RRC_VERSION}) set (RRC_FULL_DIR ${asn1_generated_dir}/RRC_${RRC_ASN1_VERSION}) diff --git a/openair2/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.3.0.asn1 b/openair2/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.3.0.asn1 new file mode 100644 index 0000000000..8ed1ef81f5 --- /dev/null +++ b/openair2/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.3.0.asn1 @@ -0,0 +1,17697 @@ + +EUTRA-RRC-Definitions DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + + +BCCH-BCH-Message ::= SEQUENCE { + message BCCH-BCH-MessageType +} + +BCCH-BCH-MessageType ::= MasterInformationBlock + + +BCCH-BCH-Message-MBMS::= SEQUENCE { + message BCCH-BCH-MessageType-MBMS-r14 +} + +BCCH-BCH-MessageType-MBMS-r14 ::= MasterInformationBlock-MBMS-r14 + + +BCCH-DL-SCH-Message ::= SEQUENCE { + message BCCH-DL-SCH-MessageType +} + +BCCH-DL-SCH-MessageType ::= CHOICE { + c1 CHOICE { + systemInformation SystemInformation, + systemInformationBlockType1 SystemInformationBlockType1 + }, + messageClassExtension SEQUENCE {} +} + + +BCCH-DL-SCH-Message-BR ::= SEQUENCE { + message BCCH-DL-SCH-MessageType-BR-r13 +} + +BCCH-DL-SCH-MessageType-BR-r13 ::= CHOICE { + c1 CHOICE { + systemInformation-BR-r13 SystemInformation-BR-r13, + systemInformationBlockType1-BR-r13 SystemInformationBlockType1-BR-r13 + }, + messageClassExtension SEQUENCE {} +} + + +BCCH-DL-SCH-Message-MBMS ::= SEQUENCE { + message BCCH-DL-SCH-MessageType-MBMS-r14 +} + +BCCH-DL-SCH-MessageType-MBMS-r14 ::= CHOICE { + c1 CHOICE { + systemInformation-MBMS-r14 SystemInformation-MBMS-r14, + systemInformationBlockType1-MBMS-r14 SystemInformationBlockType1-MBMS-r14 + }, + messageClassExtension SEQUENCE {} +} + + +MCCH-Message ::= SEQUENCE { + message MCCH-MessageType +} + +MCCH-MessageType ::= CHOICE { + c1 CHOICE { + mbsfnAreaConfiguration-r9 MBSFNAreaConfiguration-r9 + }, + later CHOICE { + c2 CHOICE{ + mbmsCountingRequest-r10 MBMSCountingRequest-r10 + }, + messageClassExtension SEQUENCE {} + } +} + + +PCCH-Message ::= SEQUENCE { + message PCCH-MessageType +} + +PCCH-MessageType ::= CHOICE { + c1 CHOICE { + paging Paging + }, + messageClassExtension SEQUENCE {} +} + + +DL-CCCH-Message ::= SEQUENCE { + message DL-CCCH-MessageType +} + +DL-CCCH-MessageType ::= CHOICE { + c1 CHOICE { + rrcConnectionReestablishment RRCConnectionReestablishment, + rrcConnectionReestablishmentReject RRCConnectionReestablishmentReject, + rrcConnectionReject RRCConnectionReject, + rrcConnectionSetup RRCConnectionSetup + }, + messageClassExtension CHOICE { + c2 CHOICE { + rrcEarlyDataComplete-r15 RRCEarlyDataComplete-r15, + spare3 NULL, spare2 NULL, spare1 NULL + }, + messageClassExtensionFuture-r15 SEQUENCE {} + } +} + + +DL-DCCH-Message ::= SEQUENCE { + message DL-DCCH-MessageType +} + +DL-DCCH-MessageType ::= CHOICE { + c1 CHOICE { + csfbParametersResponseCDMA2000 CSFBParametersResponseCDMA2000, + dlInformationTransfer DLInformationTransfer, + handoverFromEUTRAPreparationRequest HandoverFromEUTRAPreparationRequest, + mobilityFromEUTRACommand MobilityFromEUTRACommand, + rrcConnectionReconfiguration RRCConnectionReconfiguration, + rrcConnectionRelease RRCConnectionRelease, + securityModeCommand SecurityModeCommand, + ueCapabilityEnquiry UECapabilityEnquiry, + counterCheck CounterCheck, + ueInformationRequest-r9 UEInformationRequest-r9, + loggedMeasurementConfiguration-r10 LoggedMeasurementConfiguration-r10, + rnReconfiguration-r10 RNReconfiguration-r10, + rrcConnectionResume-r13 RRCConnectionResume-r13, + spare3 NULL, spare2 NULL, spare1 NULL + }, + messageClassExtension SEQUENCE {} +} + + +UL-CCCH-Message ::= SEQUENCE { + message UL-CCCH-MessageType +} + +UL-CCCH-MessageType ::= CHOICE { + c1 CHOICE { + rrcConnectionReestablishmentRequest RRCConnectionReestablishmentRequest, + rrcConnectionRequest RRCConnectionRequest + }, + messageClassExtension CHOICE { + c2 CHOICE { + rrcConnectionResumeRequest-r13 RRCConnectionResumeRequest-r13 + }, + messageClassExtensionFuture-r13 CHOICE { + c3 CHOICE { + rrcEarlyDataRequest-r15 RRCEarlyDataRequest-r15, + spare3 NULL, spare2 NULL, spare1 NULL + }, + messageClassExtensionFuture-r15 SEQUENCE {} + } + } +} + + +UL-DCCH-Message ::= SEQUENCE { + message UL-DCCH-MessageType +} + +UL-DCCH-MessageType ::= CHOICE { + c1 CHOICE { + csfbParametersRequestCDMA2000 CSFBParametersRequestCDMA2000, + measurementReport MeasurementReport, + rrcConnectionReconfigurationComplete RRCConnectionReconfigurationComplete, + rrcConnectionReestablishmentComplete RRCConnectionReestablishmentComplete, + rrcConnectionSetupComplete RRCConnectionSetupComplete, + securityModeComplete SecurityModeComplete, + securityModeFailure SecurityModeFailure, + ueCapabilityInformation UECapabilityInformation, + ulHandoverPreparationTransfer ULHandoverPreparationTransfer, + ulInformationTransfer ULInformationTransfer, + counterCheckResponse CounterCheckResponse, + ueInformationResponse-r9 UEInformationResponse-r9, + proximityIndication-r9 ProximityIndication-r9, + rnReconfigurationComplete-r10 RNReconfigurationComplete-r10, + mbmsCountingResponse-r10 MBMSCountingResponse-r10, + interFreqRSTDMeasurementIndication-r10 InterFreqRSTDMeasurementIndication-r10 + }, + messageClassExtension CHOICE { + c2 CHOICE { + ueAssistanceInformation-r11 UEAssistanceInformation-r11, + inDeviceCoexIndication-r11 InDeviceCoexIndication-r11, + mbmsInterestIndication-r11 MBMSInterestIndication-r11, + scgFailureInformation-r12 SCGFailureInformation-r12, + sidelinkUEInformation-r12 SidelinkUEInformation-r12, + wlanConnectionStatusReport-r13 WLANConnectionStatusReport-r13, + rrcConnectionResumeComplete-r13 RRCConnectionResumeComplete-r13, + ulInformationTransferMRDC-r15 ULInformationTransferMRDC-r15, + scgFailureInformationNR-r15 SCGFailureInformationNR-r15, + measReportAppLayer-r15 MeasReportAppLayer-r15, + failureInformation-r15 FailureInformation-r15, + spare5 NULL, spare4 NULL, spare3 NULL, spare2 NULL, spare1 NULL + }, + messageClassExtensionFuture-r11 SEQUENCE {} + } +} + + +SC-MCCH-Message-r13 ::= SEQUENCE { + message SC-MCCH-MessageType-r13 +} + + +SC-MCCH-MessageType-r13 ::= CHOICE { + c1 CHOICE { + scptmConfiguration-r13 SCPTMConfiguration-r13 + }, + messageClassExtension CHOICE { + c2 CHOICE { + scptmConfiguration-BR-r14 SCPTMConfiguration-BR-r14, + spare NULL + }, + messageClassExtensionFuture-r14 SEQUENCE {} + } +} + + +CounterCheck ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE { + counterCheck-r8 CounterCheck-r8-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +CounterCheck-r8-IEs ::= SEQUENCE { + drb-CountMSB-InfoList DRB-CountMSB-InfoList, + nonCriticalExtension CounterCheck-v8a0-IEs OPTIONAL +} + +CounterCheck-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension CounterCheck-v1530-IEs OPTIONAL +} + +CounterCheck-v1530-IEs ::= SEQUENCE { + drb-CountMSB-InfoListExt-r15 DRB-CountMSB-InfoListExt-r15 OPTIONAL, -- Need ON + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +DRB-CountMSB-InfoList ::= SEQUENCE (SIZE (1..maxDRB)) OF DRB-CountMSB-Info + +DRB-CountMSB-InfoListExt-r15 ::= SEQUENCE (SIZE (1..maxDRBExt-r15)) OF DRB-CountMSB-Info + +DRB-CountMSB-Info ::= SEQUENCE { + drb-Identity DRB-Identity, + countMSB-Uplink INTEGER(0..33554431), + countMSB-Downlink INTEGER(0..33554431) +} + + +CounterCheckResponse ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + counterCheckResponse-r8 CounterCheckResponse-r8-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +CounterCheckResponse-r8-IEs ::= SEQUENCE { + drb-CountInfoList DRB-CountInfoList, + nonCriticalExtension CounterCheckResponse-v8a0-IEs OPTIONAL +} + +CounterCheckResponse-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension CounterCheckResponse-v1530-IEs OPTIONAL +} + +CounterCheckResponse-v1530-IEs ::= SEQUENCE { + drb-CountInfoListExt-r15 DRB-CountInfoListExt-r15 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +DRB-CountInfoList ::= SEQUENCE (SIZE (0..maxDRB)) OF DRB-CountInfo + +DRB-CountInfoListExt-r15 ::= SEQUENCE (SIZE (1..maxDRBExt-r15)) OF DRB-CountInfo + +DRB-CountInfo ::= SEQUENCE { + drb-Identity DRB-Identity, + count-Uplink INTEGER(0..4294967295), + count-Downlink INTEGER(0..4294967295) +} + + +CSFBParametersRequestCDMA2000 ::= SEQUENCE { + criticalExtensions CHOICE { + csfbParametersRequestCDMA2000-r8 CSFBParametersRequestCDMA2000-r8-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +CSFBParametersRequestCDMA2000-r8-IEs ::= SEQUENCE { + nonCriticalExtension CSFBParametersRequestCDMA2000-v8a0-IEs OPTIONAL +} + +CSFBParametersRequestCDMA2000-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +CSFBParametersResponseCDMA2000 ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + csfbParametersResponseCDMA2000-r8 CSFBParametersResponseCDMA2000-r8-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +CSFBParametersResponseCDMA2000-r8-IEs ::= SEQUENCE { + rand RAND-CDMA2000, + mobilityParameters MobilityParametersCDMA2000, + nonCriticalExtension CSFBParametersResponseCDMA2000-v8a0-IEs OPTIONAL +} + +CSFBParametersResponseCDMA2000-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +DLInformationTransfer ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE { + dlInformationTransfer-r8 DLInformationTransfer-r8-IEs, + dlInformationTransfer-r15 DLInformationTransfer-r15-IEs, + spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +DLInformationTransfer-r8-IEs ::= SEQUENCE { + dedicatedInfoType CHOICE { + dedicatedInfoNAS DedicatedInfoNAS, + dedicatedInfoCDMA2000-1XRTT DedicatedInfoCDMA2000, + dedicatedInfoCDMA2000-HRPD DedicatedInfoCDMA2000 + }, + nonCriticalExtension DLInformationTransfer-v8a0-IEs OPTIONAL +} + +DLInformationTransfer-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +DLInformationTransfer-r15-IEs ::= SEQUENCE { + dedicatedInfoType-r15 CHOICE { + dedicatedInfoNAS-r15 DedicatedInfoNAS, + dedicatedInfoCDMA2000-1XRTT-r15 DedicatedInfoCDMA2000, + dedicatedInfoCDMA2000-HRPD-r15 DedicatedInfoCDMA2000 + } OPTIONAL, -- Need ON + timeReferenceInfo-r15 TimeReferenceInfo-r15 OPTIONAL, -- Need ON + nonCriticalExtension DLInformationTransfer-v8a0-IEs OPTIONAL +} + + +FailureInformation-r15 ::= SEQUENCE { + failedLogicalChannelInfo-r15 FailedLogicalChannelInfo-r15 OPTIONAL, + nonCriticalExtension SEQUENCE {} +} + +FailedLogicalChannelInfo-r15 ::= SEQUENCE { + failedLogicalChannelIdentity-r15 SEQUENCE { + cellGroupIndication-r15 ENUMERATED {mn, sn}, + logicalChannelIdentity-r15 INTEGER (1..10) OPTIONAL, + logicalChannelIdentityExt-r15 INTEGER (32..38) OPTIONAL + }, + failureType ENUMERATED {duplication, spare3, spare2, spare1} +} + + +HandoverFromEUTRAPreparationRequest ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE { + handoverFromEUTRAPreparationRequest-r8 + HandoverFromEUTRAPreparationRequest-r8-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +HandoverFromEUTRAPreparationRequest-r8-IEs ::= SEQUENCE { + cdma2000-Type CDMA2000-Type, + rand RAND-CDMA2000 OPTIONAL, -- Cond cdma2000-Type + mobilityParameters MobilityParametersCDMA2000 OPTIONAL, -- Cond cdma2000-Type + nonCriticalExtension HandoverFromEUTRAPreparationRequest-v890-IEs OPTIONAL +} + +HandoverFromEUTRAPreparationRequest-v890-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension HandoverFromEUTRAPreparationRequest-v920-IEs OPTIONAL +} + +HandoverFromEUTRAPreparationRequest-v920-IEs ::= SEQUENCE { + concurrPrepCDMA2000-HRPD-r9 BOOLEAN OPTIONAL, -- Cond cdma2000-Type + nonCriticalExtension HandoverFromEUTRAPreparationRequest-v1020-IEs OPTIONAL +} + +HandoverFromEUTRAPreparationRequest-v1020-IEs ::= SEQUENCE { + dualRxTxRedirectIndicator-r10 ENUMERATED {true} OPTIONAL, -- Cond cdma2000-1XRTT + redirectCarrierCDMA2000-1XRTT-r10 CarrierFreqCDMA2000 OPTIONAL, -- Cond dualRxTxRedirect + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +InDeviceCoexIndication-r11 ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE { + inDeviceCoexIndication-r11 InDeviceCoexIndication-r11-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +InDeviceCoexIndication-r11-IEs ::= SEQUENCE { + affectedCarrierFreqList-r11 AffectedCarrierFreqList-r11 OPTIONAL, + tdm-AssistanceInfo-r11 TDM-AssistanceInfo-r11 OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension InDeviceCoexIndication-v11d0-IEs OPTIONAL +} + +InDeviceCoexIndication-v11d0-IEs ::= SEQUENCE { + ul-CA-AssistanceInfo-r11 SEQUENCE { + affectedCarrierFreqCombList-r11 AffectedCarrierFreqCombList-r11 OPTIONAL, + victimSystemType-r11 VictimSystemType-r11 + } OPTIONAL, + nonCriticalExtension InDeviceCoexIndication-v1310-IEs OPTIONAL +} + +InDeviceCoexIndication-v1310-IEs ::= SEQUENCE { + affectedCarrierFreqList-v1310 AffectedCarrierFreqList-v1310 OPTIONAL, + affectedCarrierFreqCombList-r13 AffectedCarrierFreqCombList-r13 OPTIONAL, + nonCriticalExtension InDeviceCoexIndication-v1360-IEs OPTIONAL +} + +InDeviceCoexIndication-v1360-IEs ::= SEQUENCE { + hardwareSharingProblem-r13 ENUMERATED {true} OPTIONAL, + nonCriticalExtension InDeviceCoexIndication-v1530-IEs OPTIONAL +} + +InDeviceCoexIndication-v1530-IEs ::= SEQUENCE { + mrdc-AssistanceInfo-r15 MRDC-AssistanceInfo-r15 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +AffectedCarrierFreqList-r11 ::= SEQUENCE (SIZE (1..maxFreqIDC-r11)) OF AffectedCarrierFreq-r11 + +AffectedCarrierFreqList-v1310 ::= SEQUENCE (SIZE (1..maxFreqIDC-r11)) OF AffectedCarrierFreq-v1310 + +AffectedCarrierFreq-r11 ::= SEQUENCE { + carrierFreq-r11 MeasObjectId, + interferenceDirection-r11 ENUMERATED {eutra, other, both, spare} +} + +AffectedCarrierFreq-v1310 ::= SEQUENCE { + carrierFreq-v1310 MeasObjectId-v1310 OPTIONAL +} + +AffectedCarrierFreqCombList-r11 ::= SEQUENCE (SIZE (1..maxCombIDC-r11)) OF AffectedCarrierFreqComb-r11 + +AffectedCarrierFreqCombList-r13 ::= SEQUENCE (SIZE (1..maxCombIDC-r11)) OF AffectedCarrierFreqComb-r13 + +AffectedCarrierFreqComb-r11 ::= SEQUENCE (SIZE (2..maxServCell-r10)) OF MeasObjectId + +AffectedCarrierFreqComb-r13 ::= SEQUENCE (SIZE (2..maxServCell-r13)) OF MeasObjectId-r13 + +TDM-AssistanceInfo-r11 ::= CHOICE { + drx-AssistanceInfo-r11 SEQUENCE { + drx-CycleLength-r11 ENUMERATED {sf40, sf64, sf80, sf128, sf160, + sf256, spare2, spare1}, + drx-Offset-r11 INTEGER (0..255) OPTIONAL, + drx-ActiveTime-r11 ENUMERATED {sf20, sf30, sf40, sf60, sf80, + sf100, spare2, spare1} + }, + idc-SubframePatternList-r11 IDC-SubframePatternList-r11, + ... +} + +IDC-SubframePatternList-r11 ::= SEQUENCE (SIZE (1..maxSubframePatternIDC-r11)) OF IDC-SubframePattern-r11 + +IDC-SubframePattern-r11 ::= CHOICE { + subframePatternFDD-r11 BIT STRING (SIZE (4)), + subframePatternTDD-r11 CHOICE { + subframeConfig0-r11 BIT STRING (SIZE (70)), + subframeConfig1-5-r11 BIT STRING (SIZE (10)), + subframeConfig6-r11 BIT STRING (SIZE (60)) + }, + ... +} + +VictimSystemType-r11 ::= SEQUENCE { + gps-r11 ENUMERATED {true} OPTIONAL, + glonass-r11 ENUMERATED {true} OPTIONAL, + bds-r11 ENUMERATED {true} OPTIONAL, + galileo-r11 ENUMERATED {true} OPTIONAL, + wlan-r11 ENUMERATED {true} OPTIONAL, + bluetooth-r11 ENUMERATED {true} OPTIONAL +} + +MRDC-AssistanceInfo-r15 ::= SEQUENCE { + affectedCarrierFreqCombInfoListMRDC-r15 SEQUENCE (SIZE (1..maxCombIDC-r11)) OF AffectedCarrierFreqCombInfoMRDC-r15, + ... +} + +AffectedCarrierFreqCombInfoMRDC-r15 ::= SEQUENCE { + victimSystemType-r15 VictimSystemType-r11, + interferenceDirectionMRDC-r15 ENUMERATED {eutra-nr, nr, other, eutra-nr-other, + nr-other, spare3, spare2, spare1}, + affectedCarrierFreqCombMRDC-r15 SEQUENCE { + affectedCarrierFreqCombEUTRA-r15 AffectedCarrierFreqComb-r15 OPTIONAL, + affectedCarrierFreqCombNR-r15 AffectedCarrierFreqCombNR-r15 + } OPTIONAL +} + +AffectedCarrierFreqComb-r15 ::= SEQUENCE (SIZE (1..maxServCell-r13)) OF MeasObjectId-r13 + +AffectedCarrierFreqCombNR-r15 ::= SEQUENCE (SIZE (1..maxServCellNR-r15)) OF ARFCN-ValueNR-r15 + + +InterFreqRSTDMeasurementIndication-r10 ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE { + interFreqRSTDMeasurementIndication-r10 InterFreqRSTDMeasurementIndication-r10-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +InterFreqRSTDMeasurementIndication-r10-IEs ::= SEQUENCE { + rstd-InterFreqIndication-r10 CHOICE { + start SEQUENCE { + rstd-InterFreqInfoList-r10 RSTD-InterFreqInfoList-r10 + }, + stop NULL + }, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +RSTD-InterFreqInfoList-r10 ::= SEQUENCE (SIZE(1..maxRSTD-Freq-r10)) OF RSTD-InterFreqInfo-r10 + +RSTD-InterFreqInfo-r10 ::= SEQUENCE { + carrierFreq-r10 ARFCN-ValueEUTRA, + measPRS-Offset-r10 INTEGER (0..39), + ..., + [[ carrierFreq-v1090 ARFCN-ValueEUTRA-v9e0 OPTIONAL + ]], + [[ measPRS-Offset-r15 CHOICE { + rstd0-r15 INTEGER (0..79), + rstd1-r15 INTEGER (0..159), + rstd2-r15 INTEGER (0..319), + rstd3-r15 INTEGER (0..639), + rstd4-r15 INTEGER (0..1279), + rstd5-r15 INTEGER (0..159), + rstd6-r15 INTEGER (0..319), + rstd7-r15 INTEGER (0..639), + rstd8-r15 INTEGER (0..1279), + rstd9-r15 INTEGER (0..319), + rstd10-r15 INTEGER (0..639), + rstd11-r15 INTEGER (0..1279), + rstd12-r15 INTEGER (0..319), + rstd13-r15 INTEGER (0..639), + rstd14-r15 INTEGER (0..1279), + rstd15-r15 INTEGER (0..639), + rstd16-r15 INTEGER (0..1279), + rstd17-r15 INTEGER (0..639), + rstd18-r15 INTEGER (0..1279), + rstd19-r15 INTEGER (0..639), + rstd20-r15 INTEGER (0..1279) + } OPTIONAL + ]] +} + + +LoggedMeasurementConfiguration-r10 ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE { + loggedMeasurementConfiguration-r10 LoggedMeasurementConfiguration-r10-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + + +LoggedMeasurementConfiguration-r10-IEs ::= SEQUENCE { + traceReference-r10 TraceReference-r10, + traceRecordingSessionRef-r10 OCTET STRING (SIZE (2)), + tce-Id-r10 OCTET STRING (SIZE (1)), + absoluteTimeInfo-r10 AbsoluteTimeInfo-r10, + areaConfiguration-r10 AreaConfiguration-r10 OPTIONAL, -- Need OR + loggingDuration-r10 LoggingDuration-r10, + loggingInterval-r10 LoggingInterval-r10, + nonCriticalExtension LoggedMeasurementConfiguration-v1080-IEs OPTIONAL +} + +LoggedMeasurementConfiguration-v1080-IEs ::= SEQUENCE { + lateNonCriticalExtension-r10 OCTET STRING OPTIONAL, + nonCriticalExtension LoggedMeasurementConfiguration-v1130-IEs OPTIONAL +} + +LoggedMeasurementConfiguration-v1130-IEs ::= SEQUENCE { + plmn-IdentityList-r11 PLMN-IdentityList3-r11 OPTIONAL, -- Need OR + areaConfiguration-v1130 AreaConfiguration-v1130 OPTIONAL, -- Need OR + nonCriticalExtension LoggedMeasurementConfiguration-v1250-IEs OPTIONAL +} + +LoggedMeasurementConfiguration-v1250-IEs ::= SEQUENCE { + targetMBSFN-AreaList-r12 TargetMBSFN-AreaList-r12 OPTIONAL, -- Need OP + nonCriticalExtension LoggedMeasurementConfiguration-v1530-IEs OPTIONAL +} + +LoggedMeasurementConfiguration-v1530-IEs ::= SEQUENCE { + bt-NameList-r15 BT-NameList-r15 OPTIONAL, --Need OR + wlan-NameList-r15 WLAN-NameList-r15 OPTIONAL, --Need OR + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +TargetMBSFN-AreaList-r12 ::= SEQUENCE (SIZE (0..maxMBSFN-Area)) OF TargetMBSFN-Area-r12 + +TargetMBSFN-Area-r12 ::= SEQUENCE { + mbsfn-AreaId-r12 MBSFN-AreaId-r12 OPTIONAL, -- Need OR + carrierFreq-r12 ARFCN-ValueEUTRA-r9, + ... +} + + +MasterInformationBlock ::= SEQUENCE { + dl-Bandwidth ENUMERATED { + n6, n15, n25, n50, n75, n100}, + phich-Config PHICH-Config, + systemFrameNumber BIT STRING (SIZE (8)), + schedulingInfoSIB1-BR-r13 INTEGER (0..31), + systemInfoUnchanged-BR-r15 BOOLEAN, + spare BIT STRING (SIZE (4)) +} + + + +MasterInformationBlock-MBMS-r14 ::= SEQUENCE { + dl-Bandwidth-MBMS-r14 ENUMERATED { + n6, n15, n25, n50, n75, n100}, + systemFrameNumber-r14 BIT STRING (SIZE (6)), + additionalNonMBSFNSubframes-r14 INTEGER (0..3), + spare BIT STRING (SIZE (13)) +} + + +MBMSCountingRequest-r10 ::= SEQUENCE { + countingRequestList-r10 CountingRequestList-r10, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +CountingRequestList-r10 ::= SEQUENCE (SIZE (1..maxServiceCount)) OF CountingRequestInfo-r10 + +CountingRequestInfo-r10 ::= SEQUENCE { + tmgi-r10 TMGI-r9, + ... +} + + +MBMSCountingResponse-r10 ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE { + countingResponse-r10 MBMSCountingResponse-r10-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +MBMSCountingResponse-r10-IEs ::= SEQUENCE { + mbsfn-AreaIndex-r10 INTEGER (0..maxMBSFN-Area-1) OPTIONAL, + countingResponseList-r10 CountingResponseList-r10 OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +CountingResponseList-r10 ::= SEQUENCE (SIZE (1..maxServiceCount)) OF CountingResponseInfo-r10 + +CountingResponseInfo-r10 ::= SEQUENCE { + countingResponseService-r10 INTEGER (0..maxServiceCount-1), + ... +} + + +MBMSInterestIndication-r11 ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE { + interestIndication-r11 MBMSInterestIndication-r11-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +MBMSInterestIndication-r11-IEs ::= SEQUENCE { + mbms-FreqList-r11 CarrierFreqListMBMS-r11 OPTIONAL, + mbms-Priority-r11 ENUMERATED {true} OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension MBMSInterestIndication-v1310-IEs OPTIONAL +} + +MBMSInterestIndication-v1310-IEs ::= SEQUENCE { + mbms-Services-r13 MBMS-ServiceList-r13 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +MBSFNAreaConfiguration-r9 ::= SEQUENCE { + commonSF-Alloc-r9 CommonSF-AllocPatternList-r9, + commonSF-AllocPeriod-r9 ENUMERATED { + rf4, rf8, rf16, rf32, rf64, rf128, rf256}, + pmch-InfoList-r9 PMCH-InfoList-r9, + nonCriticalExtension MBSFNAreaConfiguration-v930-IEs OPTIONAL +} + +MBSFNAreaConfiguration-v930-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension MBSFNAreaConfiguration-v1250-IEs OPTIONAL +} + +MBSFNAreaConfiguration-v1250-IEs ::= SEQUENCE { + pmch-InfoListExt-r12 PMCH-InfoListExt-r12 OPTIONAL, -- Need OR + nonCriticalExtension MBSFNAreaConfiguration-v1430-IEs OPTIONAL +} + +MBSFNAreaConfiguration-v1430-IEs ::= SEQUENCE { + commonSF-Alloc-r14 CommonSF-AllocPatternList-r14, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +CommonSF-AllocPatternList-r9 ::= SEQUENCE (SIZE (1..maxMBSFN-Allocations)) OF MBSFN-SubframeConfig + +CommonSF-AllocPatternList-r14 ::= SEQUENCE (SIZE (1..maxMBSFN-Allocations)) OF MBSFN-SubframeConfig-v1430 + + +MeasReportAppLayer-r15 ::= SEQUENCE { + criticalExtensions CHOICE { measReportAppLayer-r15 MeasReportAppLayer-r15-IEs, criticalExtensionsFuture SEQUENCE {} + } +} + +MeasReportAppLayer-r15-IEs ::= SEQUENCE { + measReportAppLayerContainer-r15 OCTET STRING (SIZE(1..8000)) OPTIONAL, + serviceType ENUMERATED {qoe, qoemtsi, spare6, spare5, spare4, spare3, spare2, spare1} OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +MeasurementReport ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + measurementReport-r8 MeasurementReport-r8-IEs, + spare7 NULL, + spare6 NULL, spare5 NULL, spare4 NULL, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +MeasurementReport-r8-IEs ::= SEQUENCE { + measResults MeasResults, + nonCriticalExtension MeasurementReport-v8a0-IEs OPTIONAL +} + +MeasurementReport-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +MobilityFromEUTRACommand ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE{ + mobilityFromEUTRACommand-r8 MobilityFromEUTRACommand-r8-IEs, + mobilityFromEUTRACommand-r9 MobilityFromEUTRACommand-r9-IEs, + spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +MobilityFromEUTRACommand-r8-IEs ::= SEQUENCE { + cs-FallbackIndicator BOOLEAN, + purpose CHOICE{ + handover Handover, + cellChangeOrder CellChangeOrder + }, + nonCriticalExtension MobilityFromEUTRACommand-v8a0-IEs OPTIONAL +} + +MobilityFromEUTRACommand-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension MobilityFromEUTRACommand-v8d0-IEs OPTIONAL +} + +MobilityFromEUTRACommand-v8d0-IEs ::= SEQUENCE { + bandIndicator BandIndicatorGERAN OPTIONAL, -- Cond GERAN + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +MobilityFromEUTRACommand-r9-IEs ::= SEQUENCE { + cs-FallbackIndicator BOOLEAN, + purpose CHOICE{ + handover Handover, + cellChangeOrder CellChangeOrder, + e-CSFB-r9 E-CSFB-r9, + ... + }, + nonCriticalExtension MobilityFromEUTRACommand-v930-IEs OPTIONAL +} + +MobilityFromEUTRACommand-v930-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension MobilityFromEUTRACommand-v960-IEs OPTIONAL +} + +MobilityFromEUTRACommand-v960-IEs ::= SEQUENCE { + bandIndicator BandIndicatorGERAN OPTIONAL, -- Cond GERAN + nonCriticalExtension MobilityFromEUTRACommand-v1530-IEs OPTIONAL +} + +MobilityFromEUTRACommand-v1530-IEs ::= SEQUENCE { + smtc-r15 MTC-SSB-NR-r15 OPTIONAL, -- Need OP + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +Handover ::= SEQUENCE { + targetRAT-Type ENUMERATED { + utra, geran, cdma2000-1XRTT, cdma2000-HRPD, + nr, eutra, spare2, spare1, ...}, + targetRAT-MessageContainer OCTET STRING, + nas-SecurityParamFromEUTRA OCTET STRING (SIZE (1)) OPTIONAL, -- Cond UTRAGERANEPC + systemInformation SI-OrPSI-GERAN OPTIONAL -- Cond PSHO +} + +CellChangeOrder ::= SEQUENCE { + t304 ENUMERATED { + ms100, ms200, ms500, ms1000, + ms2000, ms4000, ms8000, ms10000-v1310}, + targetRAT-Type CHOICE { + geran SEQUENCE { + physCellId PhysCellIdGERAN, + carrierFreq CarrierFreqGERAN, + networkControlOrder BIT STRING (SIZE (2)) OPTIONAL, -- Need OP + systemInformation SI-OrPSI-GERAN OPTIONAL -- Need OP + }, + ... + } +} + +SI-OrPSI-GERAN ::= CHOICE { + si SystemInfoListGERAN, + psi SystemInfoListGERAN +} + +E-CSFB-r9 ::= SEQUENCE { + messageContCDMA2000-1XRTT-r9 OCTET STRING OPTIONAL, -- Need ON + mobilityCDMA2000-HRPD-r9 ENUMERATED { + handover, redirection + } OPTIONAL, -- Need OP + messageContCDMA2000-HRPD-r9 OCTET STRING OPTIONAL, -- Cond concHO + redirectCarrierCDMA2000-HRPD-r9 CarrierFreqCDMA2000 OPTIONAL -- Cond concRedir +} + + +Paging ::= SEQUENCE { + pagingRecordList PagingRecordList OPTIONAL, -- Need ON + systemInfoModification ENUMERATED {true} OPTIONAL, -- Need ON + etws-Indication ENUMERATED {true} OPTIONAL, -- Need ON + nonCriticalExtension Paging-v890-IEs OPTIONAL +} + +Paging-v890-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension Paging-v920-IEs OPTIONAL +} + +Paging-v920-IEs ::= SEQUENCE { + cmas-Indication-r9 ENUMERATED {true} OPTIONAL, -- Need ON + nonCriticalExtension Paging-v1130-IEs OPTIONAL +} + +Paging-v1130-IEs ::= SEQUENCE { + eab-ParamModification-r11 ENUMERATED {true} OPTIONAL, -- Need ON + nonCriticalExtension Paging-v1310-IEs OPTIONAL +} + +Paging-v1310-IEs ::= SEQUENCE { + redistributionIndication-r13 ENUMERATED {true} OPTIONAL, --Need ON + systemInfoModification-eDRX-r13 ENUMERATED {true} OPTIONAL, -- Need ON + nonCriticalExtension Paging-v1530-IEs OPTIONAL +} + +Paging-v1530-IEs ::= SEQUENCE { + accessType ENUMERATED {non3GPP} OPTIONAL, -- Need ON + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +PagingRecordList ::= SEQUENCE (SIZE (1..maxPageRec)) OF PagingRecord + +PagingRecord ::= SEQUENCE { + ue-Identity PagingUE-Identity, + cn-Domain ENUMERATED {ps, cs}, + ... +} + +PagingUE-Identity ::= CHOICE { + s-TMSI S-TMSI, + imsi IMSI, + ..., + ng-5G-S-TMSI-r15 NG-5G-S-TMSI-r15, + i-RNTI-r15 I-RNTI-r15 +} + +IMSI ::= SEQUENCE (SIZE (6..21)) OF IMSI-Digit + +IMSI-Digit ::= INTEGER (0..9) + + +ProximityIndication-r9 ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE { + proximityIndication-r9 ProximityIndication-r9-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +ProximityIndication-r9-IEs ::= SEQUENCE { + type-r9 ENUMERATED {entering, leaving}, + carrierFreq-r9 CHOICE { + eutra-r9 ARFCN-ValueEUTRA, + utra-r9 ARFCN-ValueUTRA, + ..., + eutra2-v9e0 ARFCN-ValueEUTRA-v9e0 + }, + nonCriticalExtension ProximityIndication-v930-IEs OPTIONAL +} + +ProximityIndication-v930-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +RNReconfiguration-r10 ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE { + rnReconfiguration-r10 RNReconfiguration-r10-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +RNReconfiguration-r10-IEs ::= SEQUENCE { + rn-SystemInfo-r10 RN-SystemInfo-r10 OPTIONAL, -- Need ON + rn-SubframeConfig-r10 RN-SubframeConfig-r10 OPTIONAL, -- Need ON + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +RN-SystemInfo-r10 ::= SEQUENCE { + systemInformationBlockType1-r10 OCTET STRING (CONTAINING SystemInformationBlockType1) OPTIONAL, -- Need ON + systemInformationBlockType2-r10 SystemInformationBlockType2 OPTIONAL, -- Need ON + ... +} + + +RNReconfigurationComplete-r10 ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE{ + rnReconfigurationComplete-r10 RNReconfigurationComplete-r10-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +RNReconfigurationComplete-r10-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +RRCConnectionReconfiguration ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE{ + rrcConnectionReconfiguration-r8 RRCConnectionReconfiguration-r8-IEs, + spare7 NULL, + spare6 NULL, spare5 NULL, spare4 NULL, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionReconfiguration-r8-IEs ::= SEQUENCE { + measConfig MeasConfig OPTIONAL, -- Need ON + mobilityControlInfo MobilityControlInfo OPTIONAL, -- Cond HO + dedicatedInfoNASList SEQUENCE (SIZE(1..maxDRB)) OF + DedicatedInfoNAS OPTIONAL, -- Cond nonHO + radioResourceConfigDedicated RadioResourceConfigDedicated OPTIONAL, -- Cond HO-toEUTRA + securityConfigHO SecurityConfigHO OPTIONAL, -- Cond HO-toEPC + nonCriticalExtension RRCConnectionReconfiguration-v890-IEs OPTIONAL +} + +RRCConnectionReconfiguration-v890-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING (CONTAINING RRCConnectionReconfiguration-v8m0-IEs) OPTIONAL, + nonCriticalExtension RRCConnectionReconfiguration-v920-IEs OPTIONAL +} + +-- Late non-critical extensions: +RRCConnectionReconfiguration-v8m0-IEs ::= SEQUENCE { + -- Following field is only for pre REL-10 late non-critical extensions + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCConnectionReconfiguration-v10i0-IEs OPTIONAL +} + +RRCConnectionReconfiguration-v10i0-IEs ::= SEQUENCE { + antennaInfoDedicatedPCell-v10i0 AntennaInfoDedicated-v10i0 OPTIONAL, -- Need ON + nonCriticalExtension RRCConnectionReconfiguration-v10l0-IEs OPTIONAL +} + +RRCConnectionReconfiguration-v10l0-IEs ::= SEQUENCE { + mobilityControlInfo-v10l0 MobilityControlInfo-v10l0 OPTIONAL, + sCellToAddModList-v10l0 SCellToAddModList-v10l0 OPTIONAL, -- Need ON + -- Following field is only for late non-critical extensions from REL-10 to REL-11 + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCConnectionReconfiguration-v12f0-IEs OPTIONAL +} + +RRCConnectionReconfiguration-v12f0-IEs ::= SEQUENCE { + scg-Configuration-v12f0 SCG-Configuration-v12f0 OPTIONAL, -- Cond nonFullConfig + -- Following field is only for late non-critical extensions from REL-12 + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCConnectionReconfiguration-v1370-IEs OPTIONAL +} + +RRCConnectionReconfiguration-v1370-IEs ::= SEQUENCE { + radioResourceConfigDedicated-v1370 RadioResourceConfigDedicated-v1370 OPTIONAL, -- Need ON + sCellToAddModListExt-v1370 SCellToAddModListExt-v1370 OPTIONAL, -- Need ON + -- Following field is only for late non-critical extensions from REL-13 onwards + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- Regular non-critical extensions: +RRCConnectionReconfiguration-v920-IEs ::= SEQUENCE { + otherConfig-r9 OtherConfig-r9 OPTIONAL, -- Need ON + fullConfig-r9 ENUMERATED {true} OPTIONAL, -- Cond HO-Reestab + nonCriticalExtension RRCConnectionReconfiguration-v1020-IEs OPTIONAL +} + +RRCConnectionReconfiguration-v1020-IEs ::= SEQUENCE { + sCellToReleaseList-r10 SCellToReleaseList-r10 OPTIONAL, -- Need ON + sCellToAddModList-r10 SCellToAddModList-r10 OPTIONAL, -- Need ON + nonCriticalExtension RRCConnectionReconfiguration-v1130-IEs OPTIONAL +} + +RRCConnectionReconfiguration-v1130-IEs ::= SEQUENCE { + systemInformationBlockType1Dedicated-r11 OCTET STRING (CONTAINING SystemInformationBlockType1) OPTIONAL, -- Need ON + nonCriticalExtension RRCConnectionReconfiguration-v1250-IEs OPTIONAL +} + +RRCConnectionReconfiguration-v1250-IEs ::= SEQUENCE { + wlan-OffloadInfo-r12 CHOICE { + release NULL, + setup SEQUENCE { + wlan-OffloadConfigDedicated-r12 WLAN-OffloadConfig-r12, + t350-r12 ENUMERATED {min5, min10, min20, min30, min60, + min120, min180, spare1} OPTIONAL -- Need OR + } + } OPTIONAL, -- Need ON + scg-Configuration-r12 SCG-Configuration-r12 OPTIONAL, -- Cond nonFullConfig + sl-SyncTxControl-r12 SL-SyncTxControl-r12 OPTIONAL, -- Need ON + sl-DiscConfig-r12 SL-DiscConfig-r12 OPTIONAL, -- Need ON + sl-CommConfig-r12 SL-CommConfig-r12 OPTIONAL, -- Need ON + nonCriticalExtension RRCConnectionReconfiguration-v1310-IEs OPTIONAL +} + +RRCConnectionReconfiguration-v1310-IEs ::= SEQUENCE { + sCellToReleaseListExt-r13 SCellToReleaseListExt-r13 OPTIONAL, -- Need ON + sCellToAddModListExt-r13 SCellToAddModListExt-r13 OPTIONAL, -- Need ON + lwa-Configuration-r13 LWA-Configuration-r13 OPTIONAL, -- Need ON + lwip-Configuration-r13 LWIP-Configuration-r13 OPTIONAL, -- Need ON + rclwi-Configuration-r13 RCLWI-Configuration-r13 OPTIONAL, -- Need ON + nonCriticalExtension RRCConnectionReconfiguration-v1430-IEs OPTIONAL +} + +RRCConnectionReconfiguration-v1430-IEs ::= SEQUENCE { + sl-V2X-ConfigDedicated-r14 SL-V2X-ConfigDedicated-r14 OPTIONAL, -- Need ON + sCellToAddModListExt-v1430 SCellToAddModListExt-v1430 OPTIONAL, -- Need ON + perCC-GapIndicationRequest-r14 ENUMERATED{true} OPTIONAL, -- Need ON + systemInformationBlockType2Dedicated-r14 OCTET STRING (CONTAINING SystemInformationBlockType2) OPTIONAL, -- Cond nonHO + nonCriticalExtension RRCConnectionReconfiguration-v1510-IEs OPTIONAL +} + +RRCConnectionReconfiguration-v1510-IEs ::= SEQUENCE { + nr-Config-r15 CHOICE { + release NULL, + setup SEQUENCE { + endc-ReleaseAndAdd-r15 BOOLEAN, + nr-SecondaryCellGroupConfig-r15 OCTET STRING OPTIONAL, -- Need ON + p-MaxEUTRA-r15 P-Max OPTIONAL -- Need ON + } + } OPTIONAL, -- Need ON + sk-Counter-r15 INTEGER (0.. 65535) OPTIONAL, -- Need ON + nr-RadioBearerConfig1-r15 OCTET STRING OPTIONAL, -- Need ON + nr-RadioBearerConfig2-r15 OCTET STRING OPTIONAL, -- Need ON + tdm-PatternConfig-r15 CHOICE { + release NULL, + setup SEQUENCE { + subframeAssignment-r15 SubframeAssignment-r15, + harq-Offset-r15 INTEGER (0.. 9) + } + } OPTIONAL, -- Cond FDD-PCell + nonCriticalExtension RRCConnectionReconfiguration-v1530-IEs OPTIONAL +} + +RRCConnectionReconfiguration-v1530-IEs ::= SEQUENCE { + securityConfigHO-v1530 SecurityConfigHO-v1530 OPTIONAL, -- Cond HO-5GC + sCellGroupToReleaseList-r15 SCellGroupToReleaseList-r15 OPTIONAL, -- Need ON + sCellGroupToAddModList-r15 SCellGroupToAddModList-r15 OPTIONAL, -- Need ON + dedicatedInfoNASList-r15 SEQUENCE (SIZE(1..maxDRB-r15)) OF + DedicatedInfoNAS OPTIONAL, -- Cond nonHO + p-MaxUE-FR1-r15 P-Max OPTIONAL, -- Need OR + smtc-r15 MTC-SSB-NR-r15 OPTIONAL, -- Need OP + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +SL-SyncTxControl-r12 ::= SEQUENCE { + networkControlledSyncTx-r12 ENUMERATED {on, off} OPTIONAL -- Need OP +} + +PSCellToAddMod-r12 ::= SEQUENCE { + sCellIndex-r12 SCellIndex-r10, + cellIdentification-r12 SEQUENCE { + physCellId-r12 PhysCellId, + dl-CarrierFreq-r12 ARFCN-ValueEUTRA-r9 + } OPTIONAL, -- Cond SCellAdd + radioResourceConfigCommonPSCell-r12 RadioResourceConfigCommonPSCell-r12 OPTIONAL, -- Cond SCellAdd + radioResourceConfigDedicatedPSCell-r12 RadioResourceConfigDedicatedPSCell-r12 OPTIONAL, -- Cond SCellAdd2 + ..., + [[ antennaInfoDedicatedPSCell-v1280 AntennaInfoDedicated-v10i0 OPTIONAL -- Need ON + ]], + [[ sCellIndex-r13 SCellIndex-r13 OPTIONAL -- Need ON + ]], + [[ radioResourceConfigDedicatedPSCell-v1370 RadioResourceConfigDedicatedPSCell-v1370 OPTIONAL -- Need ON + ]] +} + +PSCellToAddMod-v12f0 ::= SEQUENCE { + radioResourceConfigCommonPSCell-r12 RadioResourceConfigCommonPSCell-v12f0 OPTIONAL +} + +PSCellToAddMod-v1440 ::= SEQUENCE { + radioResourceConfigCommonPSCell-r14 RadioResourceConfigCommonPSCell-v1440 OPTIONAL +} + +PowerCoordinationInfo-r12 ::= SEQUENCE { + p-MeNB-r12 INTEGER (1..16), + p-SeNB-r12 INTEGER (1..16), + powerControlMode-r12 INTEGER (1..2) +} + +SCellToAddModList-r10 ::= SEQUENCE (SIZE (1..maxSCell-r10)) OF SCellToAddMod-r10 + +SCellToAddModList-v10l0 ::= SEQUENCE (SIZE (1..maxSCell-r10)) OF SCellToAddMod-v10l0 + +SCellToAddModListExt-r13 ::= SEQUENCE (SIZE (1..maxSCell-r13)) OF SCellToAddModExt-r13 + +SCellToAddModListExt-v1370 ::= SEQUENCE (SIZE (1..maxSCell-r13)) OF SCellToAddModExt-v1370 + +SCellToAddModListExt-v1430 ::= SEQUENCE (SIZE (1..maxSCell-r13)) OF SCellToAddModExt-v1430 + +SCellGroupToAddModList-r15 ::= SEQUENCE (SIZE (1..maxSCellGroups-r15)) OF SCellGroupToAddMod-r15 + +SCellToAddMod-r10 ::= SEQUENCE { + sCellIndex-r10 SCellIndex-r10, + cellIdentification-r10 SEQUENCE { + physCellId-r10 PhysCellId, + dl-CarrierFreq-r10 ARFCN-ValueEUTRA + } OPTIONAL, -- Cond SCellAdd + radioResourceConfigCommonSCell-r10 RadioResourceConfigCommonSCell-r10 OPTIONAL, -- Cond SCellAdd + radioResourceConfigDedicatedSCell-r10 RadioResourceConfigDedicatedSCell-r10 OPTIONAL, -- Cond SCellAdd2 + ..., + [[ dl-CarrierFreq-v1090 ARFCN-ValueEUTRA-v9e0 OPTIONAL -- Cond EARFCN-max + ]], + [[ antennaInfoDedicatedSCell-v10i0 AntennaInfoDedicated-v10i0 OPTIONAL -- Need ON + ]], + [[ srs-SwitchFromServCellIndex-r14 INTEGER (0.. 31) OPTIONAL -- Need ON + ]], + [[ sCellState-r15 ENUMERATED {activated, dormant} OPTIONAL -- Need ON + ]] +} + +SCellToAddMod-v10l0 ::= SEQUENCE { + radioResourceConfigCommonSCell-v10l0 RadioResourceConfigCommonSCell-v10l0 OPTIONAL +} + +SCellToAddModExt-r13 ::= SEQUENCE { + sCellIndex-r13 SCellIndex-r13, + cellIdentification-r13 SEQUENCE { + physCellId-r13 PhysCellId, + dl-CarrierFreq-r13 ARFCN-ValueEUTRA-r9 + } OPTIONAL, -- Cond SCellAdd + radioResourceConfigCommonSCell-r13 RadioResourceConfigCommonSCell-r10 OPTIONAL, -- Cond SCellAdd + radioResourceConfigDedicatedSCell-r13 RadioResourceConfigDedicatedSCell-r10 OPTIONAL, -- Cond SCellAdd2 + antennaInfoDedicatedSCell-r13 AntennaInfoDedicated-v10i0 OPTIONAL -- Need ON +} + +SCellToAddModExt-v1370 ::= SEQUENCE { + radioResourceConfigCommonSCell-v1370 RadioResourceConfigCommonSCell-v10l0 OPTIONAL +} + +SCellToAddModExt-v1430 ::= SEQUENCE { + srs-SwitchFromServCellIndex-r14 INTEGER (0.. 31) OPTIONAL, -- Need ON + ..., + [[ sCellState-r15 ENUMERATED {activated, dormant} OPTIONAL -- Need ON + ]] +} + +SCellGroupToAddMod-r15 ::= SEQUENCE { + sCellGroupIndex-r15 SCellGroupIndex-r15, + sCellConfigCommon-r15 SCellConfigCommon-r15 OPTIONAL, -- Need ON + sCellToReleaseList-r15 SCellToReleaseListExt-r13 OPTIONAL, -- Need ON + sCellToAddModList-r15 SCellToAddModListExt-r13 OPTIONAL -- Need ON +} + +SCellToReleaseList-r10 ::= SEQUENCE (SIZE (1..maxSCell-r10)) OF SCellIndex-r10 + +SCellToReleaseListExt-r13 ::= SEQUENCE (SIZE (1..maxSCell-r13)) OF SCellIndex-r13 + +SCellGroupToReleaseList-r15 ::= SEQUENCE (SIZE (1..maxSCellGroups-r15)) OF SCellGroupIndex-r15 + +SCellGroupIndex-r15 ::= INTEGER (1..maxSCellGroups-r15) + +SCellConfigCommon-r15 ::= SEQUENCE { + radioResourceConfigCommonSCell-r15 RadioResourceConfigCommonSCell-r10 OPTIONAL, -- Need ON + radioResourceConfigDedicatedSCell-r15 RadioResourceConfigDedicatedSCell-r10 OPTIONAL,-- Need ON + antennaInfoDedicatedSCell-r15 AntennaInfoDedicated-v10i0 OPTIONAL -- Need ON +} + +SCG-Configuration-r12 ::= CHOICE { + release NULL, + setup SEQUENCE { + scg-ConfigPartMCG-r12 SEQUENCE { + scg-Counter-r12 INTEGER (0.. 65535) OPTIONAL, -- Need ON + powerCoordinationInfo-r12 PowerCoordinationInfo-r12 OPTIONAL, -- Need ON + ... + } OPTIONAL, -- Need ON + scg-ConfigPartSCG-r12 SCG-ConfigPartSCG-r12 OPTIONAL -- Need ON + } +} + +SCG-Configuration-v12f0 ::= CHOICE { + release NULL, + setup SEQUENCE { + scg-ConfigPartSCG-v12f0 SCG-ConfigPartSCG-v12f0 OPTIONAL -- Need ON + } +} + +SCG-ConfigPartSCG-r12 ::= SEQUENCE { + radioResourceConfigDedicatedSCG-r12 RadioResourceConfigDedicatedSCG-r12 OPTIONAL, -- Need ON + sCellToReleaseListSCG-r12 SCellToReleaseList-r10 OPTIONAL, -- Need ON + pSCellToAddMod-r12 PSCellToAddMod-r12 OPTIONAL, -- Need ON + sCellToAddModListSCG-r12 SCellToAddModList-r10 OPTIONAL, -- Need ON + mobilityControlInfoSCG-r12 MobilityControlInfoSCG-r12 OPTIONAL, -- Need ON + ..., + [[ + sCellToReleaseListSCG-Ext-r13 SCellToReleaseListExt-r13 OPTIONAL, -- Need ON + sCellToAddModListSCG-Ext-r13 SCellToAddModListExt-r13 OPTIONAL -- Need ON + ]], + [[ + sCellToAddModListSCG-Ext-v1370 SCellToAddModListExt-v1370 OPTIONAL -- Need ON + ]], + [[ + pSCellToAddMod-v1440 PSCellToAddMod-v1440 OPTIONAL -- Need ON + ]], + [[ sCellGroupToReleaseListSCG-r15 SCellGroupToReleaseList-r15 OPTIONAL, -- Need ON + sCellGroupToAddModListSCG-r15 SCellGroupToAddModList-r15 OPTIONAL -- Need ON + ]] +} + +SCG-ConfigPartSCG-v12f0 ::= SEQUENCE { + pSCellToAddMod-v12f0 PSCellToAddMod-v12f0 OPTIONAL, -- Need ON + sCellToAddModListSCG-v12f0 SCellToAddModList-v10l0 OPTIONAL -- Need ON +} + +SecurityConfigHO ::= SEQUENCE { + handoverType CHOICE { + intraLTE SEQUENCE { + securityAlgorithmConfig SecurityAlgorithmConfig OPTIONAL, -- Cond fullConfig + keyChangeIndicator BOOLEAN, + nextHopChainingCount NextHopChainingCount + }, + interRAT SEQUENCE { + securityAlgorithmConfig SecurityAlgorithmConfig, + nas-SecurityParamToEUTRA OCTET STRING (SIZE(6)) + } + }, + ... +} + +SecurityConfigHO-v1530 ::= SEQUENCE { + handoverType-v1530 CHOICE { + intra5GC-r15 SEQUENCE { + securityAlgorithmConfig-r15 SecurityAlgorithmConfig OPTIONAL, -- Cond fullConfig + keyChangeIndicator-r15 BOOLEAN, + nextHopChainingCount-r15 NextHopChainingCount, + nas-Container-r15 OCTET STRING OPTIONAL -- Need ON + }, + ngc-ToEPC-r15 SEQUENCE { + securityAlgorithmConfig-r15 SecurityAlgorithmConfig, + nextHopChainingCount-r15 NextHopChainingCount + }, + epc-ToNGC-r15 SEQUENCE { + securityAlgorithmConfig-r15 SecurityAlgorithmConfig, + nas-Container-r15 OCTET STRING + } + }, + ... +} + + +RRCConnectionReconfigurationComplete ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcConnectionReconfigurationComplete-r8 + RRCConnectionReconfigurationComplete-r8-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionReconfigurationComplete-r8-IEs ::= SEQUENCE { + nonCriticalExtension RRCConnectionReconfigurationComplete-v8a0-IEs OPTIONAL +} + +RRCConnectionReconfigurationComplete-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCConnectionReconfigurationComplete-v1020-IEs OPTIONAL +} + +RRCConnectionReconfigurationComplete-v1020-IEs ::= SEQUENCE { + rlf-InfoAvailable-r10 ENUMERATED {true} OPTIONAL, + logMeasAvailable-r10 ENUMERATED {true} OPTIONAL, + nonCriticalExtension RRCConnectionReconfigurationComplete-v1130-IEs OPTIONAL +} + +RRCConnectionReconfigurationComplete-v1130-IEs ::= SEQUENCE { + connEstFailInfoAvailable-r11 ENUMERATED {true} OPTIONAL, + nonCriticalExtension RRCConnectionReconfigurationComplete-v1250-IEs OPTIONAL +} + +RRCConnectionReconfigurationComplete-v1250-IEs ::= SEQUENCE { + logMeasAvailableMBSFN-r12 ENUMERATED {true} OPTIONAL, + nonCriticalExtension RRCConnectionReconfigurationComplete-v1430-IEs OPTIONAL +} + +RRCConnectionReconfigurationComplete-v1430-IEs ::= SEQUENCE { + perCC-GapIndicationList-r14 PerCC-GapIndicationList-r14 OPTIONAL, + numFreqEffective-r14 INTEGER (1..12) OPTIONAL, + numFreqEffectiveReduced-r14 INTEGER (1..12) OPTIONAL, + nonCriticalExtension RRCConnectionReconfigurationComplete-v1510-IEs OPTIONAL +} + +RRCConnectionReconfigurationComplete-v1510-IEs ::= SEQUENCE { + scg-ConfigResponseNR-r15 OCTET STRING OPTIONAL, + nonCriticalExtension RRCConnectionReconfigurationComplete-v1530-IEs OPTIONAL +} + +RRCConnectionReconfigurationComplete-v1530-IEs ::= SEQUENCE { + logMeasAvailableBT-r15 ENUMERATED {true} OPTIONAL, + logMeasAvailableWLAN-r15 ENUMERATED {true} OPTIONAL, + flightPathInfoAvailable-r15 ENUMERATED {true} OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +RRCConnectionReestablishment ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE{ + rrcConnectionReestablishment-r8 RRCConnectionReestablishment-r8-IEs, + spare7 NULL, + spare6 NULL, spare5 NULL, spare4 NULL, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionReestablishment-r8-IEs ::= SEQUENCE { + radioResourceConfigDedicated RadioResourceConfigDedicated, + nextHopChainingCount NextHopChainingCount, + nonCriticalExtension RRCConnectionReestablishment-v8a0-IEs OPTIONAL +} + +RRCConnectionReestablishment-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +RRCConnectionReestablishmentComplete ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcConnectionReestablishmentComplete-r8 + RRCConnectionReestablishmentComplete-r8-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionReestablishmentComplete-r8-IEs ::= SEQUENCE { + nonCriticalExtension RRCConnectionReestablishmentComplete-v920-IEs OPTIONAL +} + +RRCConnectionReestablishmentComplete-v920-IEs ::= SEQUENCE { + rlf-InfoAvailable-r9 ENUMERATED {true} OPTIONAL, + nonCriticalExtension RRCConnectionReestablishmentComplete-v8a0-IEs OPTIONAL +} + +RRCConnectionReestablishmentComplete-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCConnectionReestablishmentComplete-v1020-IEs OPTIONAL +} + +RRCConnectionReestablishmentComplete-v1020-IEs ::= SEQUENCE { + logMeasAvailable-r10 ENUMERATED {true} OPTIONAL, + nonCriticalExtension RRCConnectionReestablishmentComplete-v1130-IEs OPTIONAL +} + +RRCConnectionReestablishmentComplete-v1130-IEs ::= SEQUENCE { + connEstFailInfoAvailable-r11 ENUMERATED {true} OPTIONAL, + nonCriticalExtension RRCConnectionReestablishmentComplete-v1250-IEs OPTIONAL +} + +RRCConnectionReestablishmentComplete-v1250-IEs ::= SEQUENCE { + logMeasAvailableMBSFN-r12 ENUMERATED {true} OPTIONAL, + nonCriticalExtension RRCConnectionReestablishmentComplete-v1530-IEs OPTIONAL +} + +RRCConnectionReestablishmentComplete-v1530-IEs ::= SEQUENCE { + logMeasAvailableBT-r15 ENUMERATED {true} OPTIONAL, + logMeasAvailableWLAN-r15 ENUMERATED {true} OPTIONAL, + flightPathInfoAvailable-r15 ENUMERATED {true} OPTIONAL, nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +RRCConnectionReestablishmentReject ::= SEQUENCE { + criticalExtensions CHOICE { + rrcConnectionReestablishmentReject-r8 + RRCConnectionReestablishmentReject-r8-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionReestablishmentReject-r8-IEs ::= SEQUENCE { + nonCriticalExtension RRCConnectionReestablishmentReject-v8a0-IEs OPTIONAL +} + +RRCConnectionReestablishmentReject-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +RRCConnectionReestablishmentRequest ::= SEQUENCE { + criticalExtensions CHOICE { + rrcConnectionReestablishmentRequest-r8 + RRCConnectionReestablishmentRequest-r8-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionReestablishmentRequest-r8-IEs ::= SEQUENCE { + ue-Identity ReestabUE-Identity, + reestablishmentCause ReestablishmentCause, + spare BIT STRING (SIZE (2)) +} + +ReestabUE-Identity ::= SEQUENCE { + c-RNTI C-RNTI, + physCellId PhysCellId, + shortMAC-I ShortMAC-I +} + +ReestablishmentCause ::= ENUMERATED { + reconfigurationFailure, handoverFailure, + otherFailure, spare1} + + +RRCConnectionReject ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE { + rrcConnectionReject-r8 RRCConnectionReject-r8-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionReject-r8-IEs ::= SEQUENCE { + waitTime INTEGER (1..16), + nonCriticalExtension RRCConnectionReject-v8a0-IEs OPTIONAL +} + +RRCConnectionReject-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCConnectionReject-v1020-IEs OPTIONAL +} + +RRCConnectionReject-v1020-IEs ::= SEQUENCE { + extendedWaitTime-r10 INTEGER (1..1800) OPTIONAL, -- Need ON + nonCriticalExtension RRCConnectionReject-v1130-IEs OPTIONAL +} + +RRCConnectionReject-v1130-IEs ::= SEQUENCE { + deprioritisationReq-r11 SEQUENCE { + deprioritisationType-r11 ENUMERATED {frequency, e-utra}, + deprioritisationTimer-r11 ENUMERATED {min5, min10, min15, min30} + } OPTIONAL, -- Need ON + nonCriticalExtension RRCConnectionReject-v1320-IEs OPTIONAL +} + +RRCConnectionReject-v1320-IEs ::= SEQUENCE { + rrc-SuspendIndication-r13 ENUMERATED {true} OPTIONAL, -- Need ON + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +RRCConnectionRelease ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE { + rrcConnectionRelease-r8 RRCConnectionRelease-r8-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionRelease-r8-IEs ::= SEQUENCE { + releaseCause ReleaseCause, + redirectedCarrierInfo RedirectedCarrierInfo OPTIONAL, -- Need ON + idleModeMobilityControlInfo IdleModeMobilityControlInfo OPTIONAL, -- Need OP + nonCriticalExtension RRCConnectionRelease-v890-IEs OPTIONAL +} + +RRCConnectionRelease-v890-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING (CONTAINING RRCConnectionRelease-v9e0-IEs) OPTIONAL, + nonCriticalExtension RRCConnectionRelease-v920-IEs OPTIONAL +} + +-- Late non critical extensions +RRCConnectionRelease-v9e0-IEs ::= SEQUENCE { + redirectedCarrierInfo-v9e0 RedirectedCarrierInfo-v9e0 OPTIONAL, -- Cond NoRedirect-r8 + idleModeMobilityControlInfo-v9e0 IdleModeMobilityControlInfo-v9e0 OPTIONAL, -- Cond IdleInfoEUTRA + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- Regular non critical extensions +RRCConnectionRelease-v920-IEs ::= SEQUENCE { + cellInfoList-r9 CHOICE { + geran-r9 CellInfoListGERAN-r9, + utra-FDD-r9 CellInfoListUTRA-FDD-r9, + utra-TDD-r9 CellInfoListUTRA-TDD-r9, + ..., + utra-TDD-r10 CellInfoListUTRA-TDD-r10 + } OPTIONAL, -- Cond Redirection + nonCriticalExtension RRCConnectionRelease-v1020-IEs OPTIONAL +} + +RRCConnectionRelease-v1020-IEs ::= SEQUENCE { + extendedWaitTime-r10 INTEGER (1..1800) OPTIONAL, -- Need ON + nonCriticalExtension RRCConnectionRelease-v1320-IEs OPTIONAL +} + +RRCConnectionRelease-v1320-IEs::= SEQUENCE { + resumeIdentity-r13 ResumeIdentity-r13 OPTIONAL, -- Need OR + nonCriticalExtension RRCConnectionRelease-v1530-IEs OPTIONAL +} + +RRCConnectionRelease-v1530-IEs ::= SEQUENCE { + drb-ContinueROHC-r15 ENUMERATED {true} OPTIONAL, -- Cond UP-EDT + nextHopChainingCount-r15 NextHopChainingCount OPTIONAL, -- Cond UP-EDT + measIdleConfig-r15 MeasIdleConfigDedicated-r15 OPTIONAL, -- Need ON + rrc-InactiveConfig-r15 RRC-InactiveConfig-r15 OPTIONAL, -- Need OR + cn-Type-r15 ENUMERATED {epc,fivegc} OPTIONAL, -- Need OR + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +ReleaseCause ::= ENUMERATED {loadBalancingTAUrequired, + other, cs-FallbackHighPriority-v1020, rrc-Suspend-v1320} + +RedirectedCarrierInfo ::= CHOICE { + eutra ARFCN-ValueEUTRA, + geran CarrierFreqsGERAN, + utra-FDD ARFCN-ValueUTRA, + utra-TDD ARFCN-ValueUTRA, + cdma2000-HRPD CarrierFreqCDMA2000, + cdma2000-1xRTT CarrierFreqCDMA2000, + ..., + utra-TDD-r10 CarrierFreqListUTRA-TDD-r10, + nr-r15 CarrierInfoNR-r15 +} + +RedirectedCarrierInfo-v9e0 ::= SEQUENCE { + eutra-v9e0 ARFCN-ValueEUTRA-v9e0 +} + +RRC-InactiveConfig-r15::= SEQUENCE { + fullI-RNTI-r15 I-RNTI-r15, + shortI-RNTI-r15 ShortI-RNTI-r15, + ran-PagingCycle-r15 ENUMERATED { rf32, rf64, rf128, rf256} OPTIONAL, --Need OR + ran-NotificationAreaInfo-r15 RAN-NotificationAreaInfo-r15 OPTIONAL, --Need ON + periodic-RNAU-timer-r15 ENUMERATED {min5, min10, min20, min30, min60, + min120, min360, min720} OPTIONAL, --Need OR + nextHopChainingCount-r15 NextHopChainingCount OPTIONAL, --Need ON + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +RAN-NotificationAreaInfo-r15 ::= CHOICE { + cellList-r15 PLMN-RAN-AreaCellList-r15, + ran-AreaConfigList-r15 PLMN-RAN-AreaConfigList-r15 +} + +PLMN-RAN-AreaCellList-r15 ::= SEQUENCE (SIZE (1..maxPLMN-r15)) OF PLMN-RAN-AreaCell-r15 + +-- Total number of cells from all PLMNs does not exceed 32 +PLMN-RAN-AreaCell-r15 ::= SEQUENCE { + plmn-Identity-r15 PLMN-Identity OPTIONAL, + ran-AreaCells-r15 SEQUENCE (SIZE (1..32)) OF CellIdentity +} + +PLMN-RAN-AreaConfigList-r15 ::= SEQUENCE (SIZE (1..maxPLMN-r15)) OF PLMN-RAN-AreaConfig-r15 + +PLMN-RAN-AreaConfig-r15 ::= SEQUENCE { + plmn-Identity-r15 PLMN-Identity OPTIONAL, + ran-Area-r15 SEQUENCE (SIZE (1..16)) OF RAN-AreaConfig-r15 +} + +-- Total number of TACs from all PLMNs does not exceed 16 +-- Total number of RAN-AreaCodes from all PLMNs does not exceed 32 + +RAN-AreaConfig-r15 ::= SEQUENCE { + trackingAreaCode-5GC-r15 TrackingAreaCode-5GC-r15, + ran-AreaCodeList-r15 SEQUENCE (SIZE (1..32)) OF RAN-AreaCode-r15 OPTIONAL --Need OR +} + +CarrierFreqListUTRA-TDD-r10 ::= SEQUENCE (SIZE (1..maxFreqUTRA-TDD-r10)) OF ARFCN-ValueUTRA + +IdleModeMobilityControlInfo ::= SEQUENCE { + freqPriorityListEUTRA FreqPriorityListEUTRA OPTIONAL, -- Need ON + freqPriorityListGERAN FreqsPriorityListGERAN OPTIONAL, -- Need ON + freqPriorityListUTRA-FDD FreqPriorityListUTRA-FDD OPTIONAL, -- Need ON + freqPriorityListUTRA-TDD FreqPriorityListUTRA-TDD OPTIONAL, -- Need ON + bandClassPriorityListHRPD BandClassPriorityListHRPD OPTIONAL, -- Need ON + bandClassPriorityList1XRTT BandClassPriorityList1XRTT OPTIONAL, -- Need ON + t320 ENUMERATED { + min5, min10, min20, min30, min60, min120, min180, + spare1} OPTIONAL, -- Need OR + ..., + [[ freqPriorityListExtEUTRA-r12 FreqPriorityListExtEUTRA-r12 OPTIONAL -- Need ON + ]], + [[ freqPriorityListEUTRA-v1310 FreqPriorityListEUTRA-v1310 OPTIONAL, -- Need ON + freqPriorityListExtEUTRA-v1310 FreqPriorityListExtEUTRA-v1310 OPTIONAL -- Need ON + ]], + [[ freqPriorityListNR-r15 FreqPriorityListNR-r15 OPTIONAL -- Need ON + ]] +} + +IdleModeMobilityControlInfo-v9e0 ::= SEQUENCE { + freqPriorityListEUTRA-v9e0 SEQUENCE (SIZE (1..maxFreq)) OF FreqPriorityEUTRA-v9e0 +} + +FreqPriorityListEUTRA ::= SEQUENCE (SIZE (1..maxFreq)) OF FreqPriorityEUTRA + +FreqPriorityListExtEUTRA-r12 ::= SEQUENCE (SIZE (1..maxFreq)) OF FreqPriorityEUTRA-r12 + +FreqPriorityListEUTRA-v1310 ::= SEQUENCE (SIZE (1..maxFreq)) OF FreqPriorityEUTRA-v1310 + +FreqPriorityListExtEUTRA-v1310 ::= SEQUENCE (SIZE (1..maxFreq)) OF FreqPriorityEUTRA-v1310 + +FreqPriorityEUTRA ::= SEQUENCE { + carrierFreq ARFCN-ValueEUTRA, + cellReselectionPriority CellReselectionPriority +} + +FreqPriorityEUTRA-v9e0 ::= SEQUENCE { + carrierFreq-v9e0 ARFCN-ValueEUTRA-v9e0 OPTIONAL -- Cond EARFCN-max +} + +FreqPriorityEUTRA-r12 ::= SEQUENCE { + carrierFreq-r12 ARFCN-ValueEUTRA-r9, + cellReselectionPriority-r12 CellReselectionPriority +} + +FreqPriorityEUTRA-v1310 ::= SEQUENCE { + cellReselectionSubPriority-r13 CellReselectionSubPriority-r13 OPTIONAL -- Need ON +} + +FreqPriorityListNR-r15 ::= SEQUENCE (SIZE (1..maxFreq)) OF FreqPriorityNR-r15 + +FreqPriorityNR-r15 ::= SEQUENCE { + carrierFreq-r15 ARFCN-ValueNR-r15, + cellReselectionPriority-r15 CellReselectionPriority, + cellReselectionSubPriority-r15 CellReselectionSubPriority-r13 OPTIONAL -- Need OR +} + +FreqsPriorityListGERAN ::= SEQUENCE (SIZE (1..maxGNFG)) OF FreqsPriorityGERAN + +FreqsPriorityGERAN ::= SEQUENCE { + carrierFreqs CarrierFreqsGERAN, + cellReselectionPriority CellReselectionPriority +} + +FreqPriorityListUTRA-FDD ::= SEQUENCE (SIZE (1..maxUTRA-FDD-Carrier)) OF FreqPriorityUTRA-FDD + +FreqPriorityUTRA-FDD ::= SEQUENCE { + carrierFreq ARFCN-ValueUTRA, + cellReselectionPriority CellReselectionPriority +} + +FreqPriorityListUTRA-TDD ::= SEQUENCE (SIZE (1..maxUTRA-TDD-Carrier)) OF FreqPriorityUTRA-TDD + +FreqPriorityUTRA-TDD ::= SEQUENCE { + carrierFreq ARFCN-ValueUTRA, + cellReselectionPriority CellReselectionPriority +} + +BandClassPriorityListHRPD ::= SEQUENCE (SIZE (1..maxCDMA-BandClass)) OF BandClassPriorityHRPD + +BandClassPriorityHRPD ::= SEQUENCE { + bandClass BandclassCDMA2000, + cellReselectionPriority CellReselectionPriority +} + +BandClassPriorityList1XRTT ::= SEQUENCE (SIZE (1..maxCDMA-BandClass)) OF BandClassPriority1XRTT + +BandClassPriority1XRTT ::= SEQUENCE { + bandClass BandclassCDMA2000, + cellReselectionPriority CellReselectionPriority +} + +CellInfoListGERAN-r9 ::= SEQUENCE (SIZE (1..maxCellInfoGERAN-r9)) OF CellInfoGERAN-r9 + +CellInfoGERAN-r9 ::= SEQUENCE { + physCellId-r9 PhysCellIdGERAN, + carrierFreq-r9 CarrierFreqGERAN, + systemInformation-r9 SystemInfoListGERAN +} + +CarrierInfoNR-r15 ::= SEQUENCE { + carrierFreq-r15 ARFCN-ValueNR-r15, + subcarrierSpacingSSB-r15 ENUMERATED {kHz15, kHz30, kHz120, kHz240}, + smtc-r15 MTC-SSB-NR-r15 OPTIONAL -- Need OP +} + +CellInfoListUTRA-FDD-r9 ::= SEQUENCE (SIZE (1..maxCellInfoUTRA-r9)) OF CellInfoUTRA-FDD-r9 + +CellInfoUTRA-FDD-r9 ::= SEQUENCE { + physCellId-r9 PhysCellIdUTRA-FDD, + utra-BCCH-Container-r9 OCTET STRING +} + +CellInfoListUTRA-TDD-r9 ::= SEQUENCE (SIZE (1..maxCellInfoUTRA-r9)) OF CellInfoUTRA-TDD-r9 + +CellInfoUTRA-TDD-r9 ::= SEQUENCE { + physCellId-r9 PhysCellIdUTRA-TDD, + utra-BCCH-Container-r9 OCTET STRING +} + +CellInfoListUTRA-TDD-r10 ::= SEQUENCE (SIZE (1..maxCellInfoUTRA-r9)) OF CellInfoUTRA-TDD-r10 + +CellInfoUTRA-TDD-r10 ::= SEQUENCE { + physCellId-r10 PhysCellIdUTRA-TDD, + carrierFreq-r10 ARFCN-ValueUTRA, + utra-BCCH-Container-r10 OCTET STRING +} + + +RRCConnectionRequest ::= SEQUENCE { + criticalExtensions CHOICE { + rrcConnectionRequest-r8 RRCConnectionRequest-r8-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionRequest-r8-IEs ::= SEQUENCE { + ue-Identity InitialUE-Identity, + establishmentCause EstablishmentCause, + spare BIT STRING (SIZE (1)) +} + +InitialUE-Identity ::= CHOICE { + s-TMSI S-TMSI, + randomValue BIT STRING (SIZE (40)) +} + +EstablishmentCause ::= ENUMERATED { + emergency, highPriorityAccess, mt-Access, mo-Signalling, + mo-Data, delayTolerantAccess-v1020, mo-VoiceCall-v1280, spare1} + + +RRCConnectionResume-r13 ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE { + rrcConnectionResume-r13 RRCConnectionResume-r13-IEs, + spare3 NULL, + spare2 NULL, + spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionResume-r13-IEs ::= SEQUENCE { + radioResourceConfigDedicated-r13 RadioResourceConfigDedicated OPTIONAL, -- Need ON + nextHopChainingCount-r13 NextHopChainingCount, + measConfig-r13 MeasConfig OPTIONAL, -- Need ON + antennaInfoDedicatedPCell-r13 AntennaInfoDedicated-v10i0 OPTIONAL, -- Need ON + drb-ContinueROHC-r13 ENUMERATED {true} OPTIONAL, -- Need OP + lateNonCriticalExtension OCTET STRING OPTIONAL, + rrcConnectionResume-v1430-IEs RRCConnectionResume-v1430-IEs OPTIONAL +} + +RRCConnectionResume-v1430-IEs ::= SEQUENCE { + otherConfig-r14 OtherConfig-r9 OPTIONAL, -- Need ON + rrcConnectionResume-v1510-IEs RRCConnectionResume-v1510-IEs OPTIONAL +} + +RRCConnectionResume-v1510-IEs ::= SEQUENCE { + sk-Counter-r15 INTEGER (0.. 65535) OPTIONAL, -- Need ON + nr-RadioBearerConfig1-r15 OCTET STRING OPTIONAL, -- Need ON + nr-RadioBearerConfig2-r15 OCTET STRING OPTIONAL, -- Need ON + nonCriticalExtension RRCConnectionResume-v1530-IEs OPTIONAL +} + +RRCConnectionResume-v1530-IEs ::= SEQUENCE { + fullConfig-r15 ENUMERATED {true} OPTIONAL, -- Need ON + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +RRCConnectionResumeComplete-r13 ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcConnectionResumeComplete-r13 RRCConnectionResumeComplete-r13-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionResumeComplete-r13-IEs ::= SEQUENCE { + selectedPLMN-Identity-r13 INTEGER (1..maxPLMN-r11) OPTIONAL, + dedicatedInfoNAS-r13 DedicatedInfoNAS OPTIONAL, + rlf-InfoAvailable-r13 ENUMERATED {true} OPTIONAL, + logMeasAvailable-r13 ENUMERATED {true} OPTIONAL, + connEstFailInfoAvailable-r13 ENUMERATED {true} OPTIONAL, + mobilityState-r13 ENUMERATED {normal, medium, high, spare} OPTIONAL, + mobilityHistoryAvail-r13 ENUMERATED {true} OPTIONAL, + logMeasAvailableMBSFN-r13 ENUMERATED {true} OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCConnectionResumeComplete-v1530-IEs OPTIONAL +} + +RRCConnectionResumeComplete-v1530-IEs ::= SEQUENCE { + logMeasAvailableBT-r15 ENUMERATED {true} OPTIONAL, + logMeasAvailableWLAN-r15 ENUMERATED {true} OPTIONAL, + idleMeasAvailable-r15 ENUMERATED {true} OPTIONAL, flightPathInfoAvailable-r15 ENUMERATED {true} OPTIONAL, nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +RRCConnectionResumeRequest-r13 ::= SEQUENCE { + criticalExtensions CHOICE { + rrcConnectionResumeRequest-r13 RRCConnectionResumeRequest-r13-IEs, + rrcConnectionResumeRequest-r15 RRCConnectionResumeRequest-5GC-r15-IEs + } +} + +RRCConnectionResumeRequest-r13-IEs ::= SEQUENCE { + resumeIdentity-r13 CHOICE { + resumeID-r13 ResumeIdentity-r13, + truncatedResumeID-r13 BIT STRING (SIZE (24)) + }, + shortResumeMAC-I-r13 BIT STRING (SIZE (16)), + resumeCause-r13 ResumeCause, + spare BIT STRING (SIZE (1)) +} + +RRCConnectionResumeRequest-5GC-r15-IEs ::= SEQUENCE { + resumeIdentity-r15 CHOICE { + fullI-RNTI-r15 I-RNTI-r15, + shortI-RNTI-r15 ShortI-RNTI-r15 + }, + shortResumeMAC-I-r15 BIT STRING (SIZE (16)), + resumeCause-r15 ResumeCause-r15, + spare BIT STRING (SIZE (1)) +} + +ResumeCause ::= ENUMERATED { + emergency, highPriorityAccess, mt-Access, mo-Signalling, + mo-Data, delayTolerantAccess-v1020, mo-VoiceCall-v1280, spare1} + +ResumeCause-r15 ::= ENUMERATED { + emergency, highPriorityAccess, mt-Access, mo-Signalling, + mo-Data, rna-Update, mo-VoiceCall, spare1 +} + + +RRCConnectionSetup ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE { + rrcConnectionSetup-r8 RRCConnectionSetup-r8-IEs, + spare7 NULL, + spare6 NULL, spare5 NULL, spare4 NULL, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionSetup-r8-IEs ::= SEQUENCE { + radioResourceConfigDedicated RadioResourceConfigDedicated, + nonCriticalExtension RRCConnectionSetup-v8a0-IEs OPTIONAL +} + +RRCConnectionSetup-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +RRCConnectionSetupComplete ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE{ + rrcConnectionSetupComplete-r8 RRCConnectionSetupComplete-r8-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionSetupComplete-r8-IEs ::= SEQUENCE { + selectedPLMN-Identity INTEGER (1..maxPLMN-r11), + registeredMME RegisteredMME OPTIONAL, + dedicatedInfoNAS DedicatedInfoNAS, + nonCriticalExtension RRCConnectionSetupComplete-v8a0-IEs OPTIONAL +} + +RRCConnectionSetupComplete-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCConnectionSetupComplete-v1020-IEs OPTIONAL +} + +RRCConnectionSetupComplete-v1020-IEs ::= SEQUENCE { + gummei-Type-r10 ENUMERATED {native, mapped} OPTIONAL, + rlf-InfoAvailable-r10 ENUMERATED {true} OPTIONAL, + logMeasAvailable-r10 ENUMERATED {true} OPTIONAL, + rn-SubframeConfigReq-r10 ENUMERATED {required, notRequired} OPTIONAL, + nonCriticalExtension RRCConnectionSetupComplete-v1130-IEs OPTIONAL +} + +RRCConnectionSetupComplete-v1130-IEs ::= SEQUENCE { + connEstFailInfoAvailable-r11 ENUMERATED {true} OPTIONAL, + nonCriticalExtension RRCConnectionSetupComplete-v1250-IEs OPTIONAL +} + +RRCConnectionSetupComplete-v1250-IEs ::= SEQUENCE { + mobilityState-r12 ENUMERATED {normal, medium, high, spare} OPTIONAL, + mobilityHistoryAvail-r12 ENUMERATED {true} OPTIONAL, + logMeasAvailableMBSFN-r12 ENUMERATED {true} OPTIONAL, + nonCriticalExtension RRCConnectionSetupComplete-v1320-IEs OPTIONAL +} + +RRCConnectionSetupComplete-v1320-IEs ::= SEQUENCE { + ce-ModeB-r13 ENUMERATED {supported} OPTIONAL, + s-TMSI-r13 S-TMSI OPTIONAL, + attachWithoutPDN-Connectivity-r13 ENUMERATED {true} OPTIONAL, + up-CIoT-EPS-Optimisation-r13 ENUMERATED {true} OPTIONAL, + cp-CIoT-EPS-Optimisation-r13 ENUMERATED {true} OPTIONAL, + nonCriticalExtension RRCConnectionSetupComplete-v1330-IEs OPTIONAL +} + +RRCConnectionSetupComplete-v1330-IEs ::= SEQUENCE { + ue-CE-NeedULGaps-r13 ENUMERATED {true} OPTIONAL, + nonCriticalExtension RRCConnectionSetupComplete-v1430-IEs OPTIONAL +} + +RRCConnectionSetupComplete-v1430-IEs ::= SEQUENCE { + dcn-ID-r14 INTEGER (0..65535) OPTIONAL, + nonCriticalExtension RRCConnectionSetupComplete-v1530-IEs OPTIONAL +} + +RRCConnectionSetupComplete-v1530-IEs ::= SEQUENCE { + logMeasAvailableBT-r15 ENUMERATED {true} OPTIONAL, + logMeasAvailableWLAN-r15 ENUMERATED {true} OPTIONAL, + idleMeasAvailable-r15 ENUMERATED {true} OPTIONAL, + flightPathInfoAvailable-r15 ENUMERATED {true} OPTIONAL, + connectTo5GC-r15 ENUMERATED {true} OPTIONAL, + registeredAMF-r15 RegisteredAMF-r15 OPTIONAL, + s-NSSAI-list-r15 SEQUENCE(SIZE (1..maxNrofS-NSSAI-r15)) OF S-NSSAI-r15 OPTIONAL, + ng-5G-S-TMSI-Bits-r15 CHOICE { + ng-5G-S-TMSI-r15 NG-5G-S-TMSI-r15, + ng-5G-S-TMSI-Part2-r15 BIT STRING (SIZE (8)) + } OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +RegisteredMME ::= SEQUENCE { + plmn-Identity PLMN-Identity OPTIONAL, + mmegi BIT STRING (SIZE (16)), + mmec MMEC +} + +RegisteredAMF-r15 ::= SEQUENCE { + plmn-Identity-r15 PLMN-Identity OPTIONAL, + amf-Identifier-r15 AMF-Identifier-r15 +} + + +RRCEarlyDataComplete-r15 ::= SEQUENCE { + criticalExtensions CHOICE { + rrcEarlyDataComplete-r15 RRCEarlyDataComplete-r15-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCEarlyDataComplete-r15-IEs ::= SEQUENCE { + dedicatedInfoNAS-r15 DedicatedInfoNAS OPTIONAL, -- Need ON + extendedWaitTime-r15 INTEGER (1..1800) OPTIONAL, -- Need ON + idleModeMobilityControlInfo-r15 IdleModeMobilityControlInfo OPTIONAL, -- Need OP + idleModeMobilityControlInfoExt-r15 IdleModeMobilityControlInfo-v9e0 OPTIONAL, -- Cond IdleInfoEUTRA + redirectedCarrierInfo-r15 RedirectedCarrierInfo-r15-IEs OPTIONAL, -- Need ON + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +RedirectedCarrierInfo-r15-IEs ::= CHOICE { + eutra-r15 ARFCN-ValueEUTRA-r9, + geran-r15 CarrierFreqsGERAN, + utra-FDD-r15 ARFCN-ValueUTRA, + cdma2000-HRPD-r15 CarrierFreqCDMA2000, + cdma2000-1xRTT-r15 CarrierFreqCDMA2000, + utra-TDD-r15 CarrierFreqListUTRA-TDD-r10 +} + + +RRCEarlyDataRequest-r15 ::= SEQUENCE { + criticalExtensions CHOICE { + rrcEarlyDataRequest-r15 RRCEarlyDataRequest-r15-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCEarlyDataRequest-r15-IEs ::= SEQUENCE { + s-TMSI-r15 S-TMSI, + establishmentCause-r15 ENUMERATED { mo-Data-r15, delayTolerantAccess-r15}, + dedicatedInfoNAS-r15 DedicatedInfoNAS, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +SCGFailureInformation-r12 ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE { + scgFailureInformation-r12 SCGFailureInformation-r12-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +SCGFailureInformation-r12-IEs ::= SEQUENCE { + failureReportSCG-r12 FailureReportSCG-r12 OPTIONAL, + nonCriticalExtension SCGFailureInformation-v1310-IEs OPTIONAL +} + +SCGFailureInformation-v1310-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING (CONTAINING SCGFailureInformation-v12d0-IEs) OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- Late non-critical extensions: +SCGFailureInformation-v12d0-IEs ::= SEQUENCE { + failureReportSCG-v12d0 FailureReportSCG-v12d0 OPTIONAL, nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- Regular non-critical extensions: +FailureReportSCG-r12 ::= SEQUENCE { + failureType-r12 ENUMERATED {t313-Expiry, randomAccessProblem, + rlc-MaxNumRetx, scg-ChangeFailure }, + measResultServFreqList-r12 MeasResultServFreqList-r10 OPTIONAL, + measResultNeighCells-r12 MeasResultList2EUTRA-r9 OPTIONAL, + ..., + [[ failureType-v1290 ENUMERATED {maxUL-TimingDiff-v1290} OPTIONAL + ]], + [[ measResultServFreqListExt-r13 MeasResultServFreqListExt-r13 OPTIONAL + ]] +} + +FailureReportSCG-v12d0 ::= SEQUENCE { + measResultNeighCells-v12d0 MeasResultList2EUTRA-v9e0 OPTIONAL +} + + +SCGFailureInformationNR-r15 ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE { + scgFailureInformationNR-r15 SCGFailureInformationNR-r15-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +SCGFailureInformationNR-r15-IEs ::= SEQUENCE { + failureReportSCG-NR-r15 FailureReportSCG-NR-r15 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +FailureReportSCG-NR-r15 ::= SEQUENCE { + failureType-r15 ENUMERATED { + t310-Expiry, randomAccessProblem, + rlc-MaxNumRetx, + scg-ChangeFailure, scg-reconfigFailure, + srb3-IntegrityFailure}, + measResultFreqListNR-r15 MeasResultFreqListFailNR-r15 OPTIONAL, + measResultSCG-r15 OCTET STRING OPTIONAL, + ... +} + +MeasResultFreqListFailNR-r15 ::= SEQUENCE (SIZE (1..maxFreqNR-r15)) OF MeasResultFreqFailNR-r15 + +MeasResultFreqFailNR-r15 ::= SEQUENCE { + carrierFreq-r15 ARFCN-ValueNR-r15, + measResultCellList-r15 MeasResultCellListNR-r15 OPTIONAL, + ... +} + + +SCPTMConfiguration-r13 ::= SEQUENCE { + sc-mtch-InfoList-r13 SC-MTCH-InfoList-r13, + scptm-NeighbourCellList-r13 SCPTM-NeighbourCellList-r13 OPTIONAL, -- Need OP + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SCPTMConfiguration-v1340 OPTIONAL +} + +SCPTMConfiguration-v1340 ::= SEQUENCE { + p-b-r13 INTEGER (0..3) OPTIONAL, -- Need ON + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +SCPTMConfiguration-BR-r14 ::= SEQUENCE { + sc-mtch-InfoList-r14 SC-MTCH-InfoList-BR-r14, + scptm-NeighbourCellList-r14 SCPTM-NeighbourCellList-r13 OPTIONAL, -- Need OP + p-b-r14 INTEGER (0..3) OPTIONAL, -- Need OR + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +SecurityModeCommand ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE{ + securityModeCommand-r8 SecurityModeCommand-r8-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +SecurityModeCommand-r8-IEs ::= SEQUENCE { + securityConfigSMC SecurityConfigSMC, + nonCriticalExtension SecurityModeCommand-v8a0-IEs OPTIONAL +} + +SecurityModeCommand-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +SecurityConfigSMC ::= SEQUENCE { + securityAlgorithmConfig SecurityAlgorithmConfig, + ... +} + + +SecurityModeComplete ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + securityModeComplete-r8 SecurityModeComplete-r8-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +SecurityModeComplete-r8-IEs ::= SEQUENCE { + nonCriticalExtension SecurityModeComplete-v8a0-IEs OPTIONAL +} + +SecurityModeComplete-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +SecurityModeFailure ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + securityModeFailure-r8 SecurityModeFailure-r8-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +SecurityModeFailure-r8-IEs ::= SEQUENCE { + nonCriticalExtension SecurityModeFailure-v8a0-IEs OPTIONAL +} + +SecurityModeFailure-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +SidelinkUEInformation-r12 ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE { + sidelinkUEInformation-r12 SidelinkUEInformation-r12-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +SidelinkUEInformation-r12-IEs ::= SEQUENCE { + commRxInterestedFreq-r12 ARFCN-ValueEUTRA-r9 OPTIONAL, + commTxResourceReq-r12 SL-CommTxResourceReq-r12 OPTIONAL, + discRxInterest-r12 ENUMERATED {true} OPTIONAL, + discTxResourceReq-r12 INTEGER (1..63) OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SidelinkUEInformation-v1310-IEs OPTIONAL +} + +SidelinkUEInformation-v1310-IEs ::= SEQUENCE { + commTxResourceReqUC-r13 SL-CommTxResourceReq-r12 OPTIONAL, + commTxResourceInfoReqRelay-r13 SEQUENCE { + commTxResourceReqRelay-r13 SL-CommTxResourceReq-r12 OPTIONAL, + commTxResourceReqRelayUC-r13 SL-CommTxResourceReq-r12 OPTIONAL, + ue-Type-r13 ENUMERATED {relayUE, remoteUE} + } OPTIONAL, + discTxResourceReq-v1310 SEQUENCE { + carrierFreqDiscTx-r13 INTEGER (1..maxFreq) OPTIONAL, + discTxResourceReqAddFreq-r13 SL-DiscTxResourceReqPerFreqList-r13 OPTIONAL + } OPTIONAL, + discTxResourceReqPS-r13 SL-DiscTxResourceReq-r13 OPTIONAL, + discRxGapReq-r13 SL-GapRequest-r13 OPTIONAL, + discTxGapReq-r13 SL-GapRequest-r13 OPTIONAL, + discSysInfoReportFreqList-r13 SL-DiscSysInfoReportFreqList-r13 OPTIONAL, + nonCriticalExtension SidelinkUEInformation-v1430-IEs OPTIONAL +} + +SidelinkUEInformation-v1430-IEs ::= SEQUENCE { + v2x-CommRxInterestedFreqList-r14 SL-V2X-CommFreqList-r14 OPTIONAL, + p2x-CommTxType-r14 ENUMERATED {true} OPTIONAL, + v2x-CommTxResourceReq-r14 SL-V2X-CommTxFreqList-r14 OPTIONAL, + nonCriticalExtension SidelinkUEInformation-v1530-IEs OPTIONAL +} + +SidelinkUEInformation-v1530-IEs ::= SEQUENCE { + reliabilityInfoListSL-r15 SL-ReliabilityList-r15 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +SL-CommTxResourceReq-r12 ::= SEQUENCE { + carrierFreq-r12 ARFCN-ValueEUTRA-r9 OPTIONAL, + destinationInfoList-r12 SL-DestinationInfoList-r12 +} + +SL-DiscTxResourceReqPerFreqList-r13 ::= SEQUENCE (SIZE (1..maxFreq)) OF SL-DiscTxResourceReq-r13 + +SL-DiscTxResourceReq-r13 ::= SEQUENCE { + carrierFreqDiscTx-r13 INTEGER (1..maxFreq) OPTIONAL, + discTxResourceReq-r13 INTEGER (1..63) +} + +SL-DestinationInfoList-r12 ::= SEQUENCE (SIZE (1..maxSL-Dest-r12)) OF SL-DestinationIdentity-r12 + +SL-DestinationIdentity-r12 ::= BIT STRING (SIZE (24)) + +SL-DiscSysInfoReportFreqList-r13 ::= SEQUENCE (SIZE (1.. maxSL-DiscSysInfoReportFreq-r13)) OF SL-DiscSysInfoReport-r13 + +SL-V2X-CommFreqList-r14 ::= SEQUENCE (SIZE (1..maxFreqV2X-r14)) OF INTEGER (0..maxFreqV2X-1-r14) + +SL-V2X-CommTxFreqList-r14 ::= SEQUENCE (SIZE (1..maxFreqV2X-r14)) OF SL-V2X-CommTxResourceReq-r14 + +SL-V2X-CommTxResourceReq-r14 ::= SEQUENCE { + carrierFreqCommTx-r14 INTEGER (0.. maxFreqV2X-1-r14) OPTIONAL, + v2x-TypeTxSync-r14 SL-TypeTxSync-r14 OPTIONAL, + v2x-DestinationInfoList-r14 SL-DestinationInfoList-r12 OPTIONAL +} + + +SystemInformation-BR-r13 ::= SystemInformation + +SystemInformation-MBMS-r14 ::= SystemInformation + +SystemInformation ::= SEQUENCE { + criticalExtensions CHOICE { + systemInformation-r8 SystemInformation-r8-IEs, + criticalExtensionsFuture-r15 CHOICE { + posSystemInformation-r15 PosSystemInformation-r15-IEs, + criticalExtensionsFuture SEQUENCE {} + } + } +} +SystemInformation-r8-IEs ::= SEQUENCE { + sib-TypeAndInfo SEQUENCE (SIZE (1..maxSIB)) OF CHOICE { + sib2 SystemInformationBlockType2, + sib3 SystemInformationBlockType3, + sib4 SystemInformationBlockType4, + sib5 SystemInformationBlockType5, + sib6 SystemInformationBlockType6, + sib7 SystemInformationBlockType7, + sib8 SystemInformationBlockType8, + sib9 SystemInformationBlockType9, + sib10 SystemInformationBlockType10, + sib11 SystemInformationBlockType11, + ..., + sib12-v920 SystemInformationBlockType12-r9, + sib13-v920 SystemInformationBlockType13-r9, + sib14-v1130 SystemInformationBlockType14-r11, + sib15-v1130 SystemInformationBlockType15-r11, + sib16-v1130 SystemInformationBlockType16-r11, + sib17-v1250 SystemInformationBlockType17-r12, + sib18-v1250 SystemInformationBlockType18-r12, + sib19-v1250 SystemInformationBlockType19-r12, + sib20-v1310 SystemInformationBlockType20-r13, + sib21-v1430 SystemInformationBlockType21-r14, + sib24-v1530 SystemInformationBlockType24-r15, + sib25-v1530 SystemInformationBlockType25-r15, + sib26-v1530 SystemInformationBlockType26-r15 + }, + nonCriticalExtension SystemInformation-v8a0-IEs OPTIONAL +} + +SystemInformation-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +PosSystemInformation-r15-IEs ::= SEQUENCE { + posSIB-TypeAndInfo-r15 SEQUENCE (SIZE (1..maxSIB)) OF CHOICE { + posSib1-1-r15 SystemInformationBlockPos-r15, + posSib1-2-r15 SystemInformationBlockPos-r15, + posSib1-3-r15 SystemInformationBlockPos-r15, + posSib1-4-r15 SystemInformationBlockPos-r15, + posSib1-5-r15 SystemInformationBlockPos-r15, + posSib1-6-r15 SystemInformationBlockPos-r15, + posSib1-7-r15 SystemInformationBlockPos-r15, + posSib2-1-r15 SystemInformationBlockPos-r15, + posSib2-2-r15 SystemInformationBlockPos-r15, + posSib2-3-r15 SystemInformationBlockPos-r15, + posSib2-4-r15 SystemInformationBlockPos-r15, + posSib2-5-r15 SystemInformationBlockPos-r15, + posSib2-6-r15 SystemInformationBlockPos-r15, + posSib2-7-r15 SystemInformationBlockPos-r15, + posSib2-8-r15 SystemInformationBlockPos-r15, + posSib2-9-r15 SystemInformationBlockPos-r15, + posSib2-10-r15 SystemInformationBlockPos-r15, + posSib2-11-r15 SystemInformationBlockPos-r15, + posSib2-12-r15 SystemInformationBlockPos-r15, + posSib2-13-r15 SystemInformationBlockPos-r15, + posSib2-14-r15 SystemInformationBlockPos-r15, + posSib2-15-r15 SystemInformationBlockPos-r15, + posSib2-16-r15 SystemInformationBlockPos-r15, + posSib2-17-r15 SystemInformationBlockPos-r15, + posSib2-18-r15 SystemInformationBlockPos-r15, + posSib2-19-r15 SystemInformationBlockPos-r15, + posSib3-1-r15 SystemInformationBlockPos-r15, + ... + }, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +SystemInformationBlockType1-BR-r13 ::= SystemInformationBlockType1 + +SystemInformationBlockType1 ::= SEQUENCE { + cellAccessRelatedInfo SEQUENCE { + plmn-IdentityList PLMN-IdentityList, + trackingAreaCode TrackingAreaCode, + cellIdentity CellIdentity, + cellBarred ENUMERATED {barred, notBarred}, + intraFreqReselection ENUMERATED {allowed, notAllowed}, + csg-Indication BOOLEAN, + csg-Identity CSG-Identity OPTIONAL -- Need OR + }, + cellSelectionInfo SEQUENCE { + q-RxLevMin Q-RxLevMin, + q-RxLevMinOffset INTEGER (1..8) OPTIONAL -- Need OP + }, + p-Max P-Max OPTIONAL, -- Need OP + freqBandIndicator FreqBandIndicator, + schedulingInfoList SchedulingInfoList, + tdd-Config TDD-Config OPTIONAL, -- Cond TDD + si-WindowLength ENUMERATED { + ms1, ms2, ms5, ms10, ms15, ms20, + ms40}, + systemInfoValueTag INTEGER (0..31), + nonCriticalExtension SystemInformationBlockType1-v890-IEs OPTIONAL +} + +SystemInformationBlockType1-v890-IEs::= SEQUENCE { + lateNonCriticalExtension OCTET STRING (CONTAINING SystemInformationBlockType1-v8h0-IEs) OPTIONAL, + nonCriticalExtension SystemInformationBlockType1-v920-IEs OPTIONAL +} + +-- Late non critical extensions +SystemInformationBlockType1-v8h0-IEs ::= SEQUENCE { + multiBandInfoList MultiBandInfoList OPTIONAL, -- Need OR + nonCriticalExtension SystemInformationBlockType1-v9e0-IEs OPTIONAL +} + +SystemInformationBlockType1-v9e0-IEs ::= SEQUENCE { + freqBandIndicator-v9e0 FreqBandIndicator-v9e0 OPTIONAL, -- Cond FBI-max + multiBandInfoList-v9e0 MultiBandInfoList-v9e0 OPTIONAL, -- Cond mFBI-max + nonCriticalExtension SystemInformationBlockType1-v10j0-IEs OPTIONAL +} + +SystemInformationBlockType1-v10j0-IEs ::= SEQUENCE { + freqBandInfo-r10 NS-PmaxList-r10 OPTIONAL, -- Need OR + multiBandInfoList-v10j0 MultiBandInfoList-v10j0 OPTIONAL, -- Need OR + nonCriticalExtension SystemInformationBlockType1-v10l0-IEs OPTIONAL +} + +SystemInformationBlockType1-v10l0-IEs ::= SEQUENCE { + freqBandInfo-v10l0 NS-PmaxList-v10l0 OPTIONAL, -- Need OR + multiBandInfoList-v10l0 MultiBandInfoList-v10l0 OPTIONAL, -- Need OR + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- Regular non critical extensions +SystemInformationBlockType1-v920-IEs ::= SEQUENCE { + ims-EmergencySupport-r9 ENUMERATED {true} OPTIONAL, -- Need OR + cellSelectionInfo-v920 CellSelectionInfo-v920 OPTIONAL, -- Cond RSRQ + nonCriticalExtension SystemInformationBlockType1-v1130-IEs OPTIONAL +} + +SystemInformationBlockType1-v1130-IEs ::= SEQUENCE { + tdd-Config-v1130 TDD-Config-v1130 OPTIONAL, -- Cond TDD-OR + cellSelectionInfo-v1130 CellSelectionInfo-v1130 OPTIONAL, -- Cond WB-RSRQ + nonCriticalExtension SystemInformationBlockType1-v1250-IEs OPTIONAL +} + +SystemInformationBlockType1-v1250-IEs ::= SEQUENCE { + cellAccessRelatedInfo-v1250 SEQUENCE { + category0Allowed-r12 ENUMERATED {true} OPTIONAL -- Need OP + }, + cellSelectionInfo-v1250 CellSelectionInfo-v1250 OPTIONAL, -- Cond RSRQ2 + freqBandIndicatorPriority-r12 ENUMERATED {true} OPTIONAL, -- Cond mFBI + nonCriticalExtension SystemInformationBlockType1-v1310-IEs OPTIONAL +} + +SystemInformationBlockType1-v1310-IEs ::= SEQUENCE { + hyperSFN-r13 BIT STRING (SIZE (10)) OPTIONAL, -- Need OR + eDRX-Allowed-r13 ENUMERATED {true} OPTIONAL, -- Need OR + cellSelectionInfoCE-r13 CellSelectionInfoCE-r13 OPTIONAL, -- Need OP + bandwidthReducedAccessRelatedInfo-r13 SEQUENCE { + si-WindowLength-BR-r13 ENUMERATED { + ms20, ms40, ms60, ms80, ms120, + ms160, ms200, spare}, + si-RepetitionPattern-r13 ENUMERATED {everyRF, every2ndRF, every4thRF, + every8thRF}, + schedulingInfoList-BR-r13 SchedulingInfoList-BR-r13 OPTIONAL, -- Cond SI-BR + fdd-DownlinkOrTddSubframeBitmapBR-r13 CHOICE { + subframePattern10-r13 BIT STRING (SIZE (10)), + subframePattern40-r13 BIT STRING (SIZE (40)) + } OPTIONAL, -- Need OP + fdd-UplinkSubframeBitmapBR-r13 BIT STRING (SIZE (10)) OPTIONAL, -- Need OP + startSymbolBR-r13 INTEGER (1..4), + si-HoppingConfigCommon-r13 ENUMERATED {on,off}, + si-ValidityTime-r13 ENUMERATED {true} OPTIONAL, -- Need OP + systemInfoValueTagList-r13 SystemInfoValueTagList-r13 OPTIONAL -- Need OR + } OPTIONAL, -- Cond BW-reduced + nonCriticalExtension SystemInformationBlockType1-v1320-IEs OPTIONAL +} + +SystemInformationBlockType1-v1320-IEs ::= SEQUENCE { + freqHoppingParametersDL-r13 SEQUENCE { + mpdcch-pdsch-HoppingNB-r13 ENUMERATED {nb2, nb4} OPTIONAL, -- Need OR + interval-DLHoppingConfigCommonModeA-r13 CHOICE { + interval-FDD-r13 ENUMERATED {int1, int2, int4, int8}, + interval-TDD-r13 ENUMERATED {int1, int5, int10, int20} + } OPTIONAL, -- Need OR + interval-DLHoppingConfigCommonModeB-r13 CHOICE { + interval-FDD-r13 ENUMERATED {int2, int4, int8, int16}, + interval-TDD-r13 ENUMERATED { int5, int10, int20, int40} + } OPTIONAL, -- Need OR + mpdcch-pdsch-HoppingOffset-r13 INTEGER (1..maxAvailNarrowBands-r13) OPTIONAL -- Need OR + } OPTIONAL, -- Cond Hopping + nonCriticalExtension SystemInformationBlockType1-v1350-IEs OPTIONAL +} + +SystemInformationBlockType1-v1350-IEs ::= SEQUENCE { + cellSelectionInfoCE1-r13 CellSelectionInfoCE1-r13 OPTIONAL, -- Need OP + nonCriticalExtension SystemInformationBlockType1-v1360-IEs OPTIONAL +} + +SystemInformationBlockType1-v1360-IEs ::= SEQUENCE { + cellSelectionInfoCE1-v1360 CellSelectionInfoCE1-v1360 OPTIONAL, -- Cond QrxlevminCE1 + nonCriticalExtension SystemInformationBlockType1-v1430-IEs OPTIONAL +} + +SystemInformationBlockType1-v1430-IEs ::= SEQUENCE { + eCallOverIMS-Support-r14 ENUMERATED {true} OPTIONAL, -- Need OR + tdd-Config-v1430 TDD-Config-v1430 OPTIONAL, -- Cond TDD-OR + cellAccessRelatedInfoList-r14 SEQUENCE (SIZE (1..maxPLMN-1-r14)) OF + CellAccessRelatedInfo-r14 OPTIONAL, -- Need OR + nonCriticalExtension SystemInformationBlockType1-v1450-IEs OPTIONAL +} + +SystemInformationBlockType1-v1450-IEs ::= SEQUENCE { + tdd-Config-v1450 TDD-Config-v1450 OPTIONAL, -- Cond TDD-OR + nonCriticalExtension SystemInformationBlockType1-v1530-IEs OPTIONAL +} + +SystemInformationBlockType1-v1530-IEs ::= SEQUENCE { + hsdn-Cell-r15 ENUMERATED {true} OPTIONAL, -- Need OR + cellSelectionInfoCE-v1530 CellSelectionInfoCE-v1530 OPTIONAL, -- Need OP + crs-IntfMitigConfig-r15 CHOICE { + crs-IntfMitigEnabled-15 NULL, + crs-IntfMitigNumPRBs-r15 ENUMERATED {n6, n24} + } OPTIONAL, -- Need OR + cellBarred-CRS-r15 ENUMERATED {barred, notBarred}, + plmn-IdentityList-v1530 PLMN-IdentityList-v1530 OPTIONAL, -- Need OR + posSchedulingInfoList-r15 PosSchedulingInfoList-r15 OPTIONAL, -- Need OR + cellAccessRelatedInfo-5GC-r15 SEQUENCE { + cellBarred-5GC-r15 ENUMERATED {barred, notBarred}, + cellBarred-5GC-CRS-r15 ENUMERATED {barred, notBarred}, + cellAccessRelatedInfoList-5GC-r15 SEQUENCE (SIZE (1..maxPLMN-r11)) OF + CellAccessRelatedInfo-5GC-r15 + } OPTIONAL, -- Need OP + ims-EmergencySupport5GC-r15 ENUMERATED {true} OPTIONAL, -- Need OR + eCallOverIMS-Support5GC-r15 ENUMERATED {true} OPTIONAL, -- Need OR + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +PLMN-IdentityList ::= SEQUENCE (SIZE (1..maxPLMN-r11)) OF PLMN-IdentityInfo + +PLMN-IdentityInfo ::= SEQUENCE { + plmn-Identity PLMN-Identity, + cellReservedForOperatorUse ENUMERATED {reserved, notReserved} +} + +PLMN-IdentityList-v1530 ::= SEQUENCE (SIZE (1..maxPLMN-r11)) OF PLMN-IdentityInfo-v1530 + +PLMN-IdentityInfo-v1530 ::= SEQUENCE { + cellReservedForOperatorUse-CRS-r15 ENUMERATED {reserved, notReserved} +} + +PLMN-IdentityList-r15::= SEQUENCE (SIZE (1..maxPLMN-r11)) OF PLMN-IdentityInfo-r15 + +PLMN-IdentityInfo-r15 ::= SEQUENCE { + plmn-Identity-5GC-r15 CHOICE{ + plmn-Identity-r15 PLMN-Identity, + plmn-Index-r15 INTEGER (1..maxPLMN-r11) + }, + cellReservedForOperatorUse-r15 ENUMERATED {reserved, notReserved}, + cellReservedForOperatorUse-CRS-r15 ENUMERATED {reserved, notReserved} +} + +SchedulingInfoList ::= SEQUENCE (SIZE (1..maxSI-Message)) OF SchedulingInfo + +SchedulingInfo ::= SEQUENCE { + si-Periodicity ENUMERATED { + rf8, rf16, rf32, rf64, rf128, rf256, rf512}, + sib-MappingInfo SIB-MappingInfo +} + +SchedulingInfoList-BR-r13 ::= SEQUENCE (SIZE (1..maxSI-Message)) OF SchedulingInfo-BR-r13 + +SchedulingInfo-BR-r13 ::= SEQUENCE { + si-Narrowband-r13 INTEGER (1..maxAvailNarrowBands-r13), + si-TBS-r13 ENUMERATED {b152, b208, b256, b328, b408, b504, b600, b712, + b808, b936} +} + +SIB-MappingInfo ::= SEQUENCE (SIZE (0..maxSIB-1)) OF SIB-Type + +SIB-Type ::= ENUMERATED { + sibType3, sibType4, sibType5, sibType6, + sibType7, sibType8, sibType9, sibType10, + sibType11, sibType12-v920, sibType13-v920, + sibType14-v1130, sibType15-v1130, + sibType16-v1130, sibType17-v1250, sibType18-v1250, + ..., sibType19-v1250, sibType20-v1310, sibType21-v1430, + sibType24-v1530, sibType25-v1530, sibType26-v1530} + +SystemInfoValueTagList-r13 ::= SEQUENCE (SIZE (1..maxSI-Message)) OF SystemInfoValueTagSI-r13 + +SystemInfoValueTagSI-r13 ::= INTEGER (0..3) + +CellSelectionInfo-v920 ::= SEQUENCE { + q-QualMin-r9 Q-QualMin-r9, + q-QualMinOffset-r9 INTEGER (1..8) OPTIONAL -- Need OP +} + +CellSelectionInfo-v1130 ::= SEQUENCE { + q-QualMinWB-r11 Q-QualMin-r9 +} + +CellSelectionInfo-v1250 ::= SEQUENCE { + q-QualMinRSRQ-OnAllSymbols-r12 Q-QualMin-r9 +} + +CellAccessRelatedInfo-r14 ::= SEQUENCE { + plmn-IdentityList-r14 PLMN-IdentityList, + trackingAreaCode-r14 TrackingAreaCode, + cellIdentity-r14 CellIdentity +} + +CellAccessRelatedInfo-5GC-r15 ::= SEQUENCE { + plmn-IdentityList-r15 PLMN-IdentityList-r15, + ran-AreaCode-r15 RAN-AreaCode-r15 OPTIONAL, -- Need OR + trackingAreaCode-5GC-r15 TrackingAreaCode-5GC-r15, + cellIdentity-5GC-r15 CellIdentity-5GC-r15 +} + +CellIdentity-5GC-r15 ::= CHOICE{ + cellIdentity-r15 CellIdentity, + cellId-Index-r15 INTEGER (1..maxPLMN-r11) +} + +PosSchedulingInfoList-r15 ::= SEQUENCE (SIZE (1..maxSI-Message)) OF PosSchedulingInfo-r15 + +PosSchedulingInfo-r15 ::= SEQUENCE { + posSI-Periodicity-r15 ENUMERATED {rf8, rf16, rf32, rf64, rf128, rf256, rf512}, + posSIB-MappingInfo-r15 PosSIB-MappingInfo-r15 +} + +PosSIB-MappingInfo-r15 ::= SEQUENCE (SIZE (1..maxSIB)) OF PosSIB-Type-r15 + +PosSIB-Type-r15 ::= SEQUENCE { + encrypted-r15 ENUMERATED { true } OPTIONAL, -- Need OP + gnss-id-r15 GNSS-ID-r15 OPTIONAL, -- Need OP + sbas-id-r15 SBAS-ID-r15 OPTIONAL, -- Need OP + posSibType-r15 ENUMERATED { posSibType1-1, + posSibType1-2, + posSibType1-3, + posSibType1-4, + posSibType1-5, + posSibType1-6, + posSibType1-7, + posSibType2-1, + posSibType2-2, + posSibType2-3, + posSibType2-4, + posSibType2-5, + posSibType2-6, + posSibType2-7, + posSibType2-8, + posSibType2-9, + posSibType2-10, + posSibType2-11, + posSibType2-12, + posSibType2-13, + posSibType2-14, + posSibType2-15, + posSibType2-16, + posSibType2-17, + posSibType2-18, + posSibType2-19, + posSibType3-1, + ...}, + ... +} + + +SystemInformationBlockType1-MBMS-r14 ::= SEQUENCE { + cellAccessRelatedInfo-r14 SEQUENCE { + plmn-IdentityList-r14 PLMN-IdentityList-MBMS-r14, + trackingAreaCode-r14 TrackingAreaCode, + cellIdentity-r14 CellIdentity + }, + freqBandIndicator-r14 FreqBandIndicator-r11, + multiBandInfoList-r14 MultiBandInfoList-r11 OPTIONAL, -- Need OR + schedulingInfoList-MBMS-r14 SchedulingInfoList-MBMS-r14, + si-WindowLength-r14 ENUMERATED { + ms1, ms2, ms5, ms10, ms15, ms20,ms40, ms80}, + systemInfoValueTag-r14 INTEGER (0..31), + nonMBSFN-SubframeConfig-r14 NonMBSFN-SubframeConfig-r14 OPTIONAL, --Need OR + pdsch-ConfigCommon-r14 PDSCH-ConfigCommon, + systemInformationBlockType13-r14 SystemInformationBlockType13-r9 OPTIONAL, --Need OR + cellAccessRelatedInfoList-r14 SEQUENCE (SIZE (1..maxPLMN-1-r14)) OF + CellAccessRelatedInfo-r14 OPTIONAL, -- Need OR + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +PLMN-IdentityList-MBMS-r14 ::= SEQUENCE (SIZE (1..maxPLMN-r11)) OF PLMN-Identity + +SchedulingInfoList-MBMS-r14 ::= SEQUENCE (SIZE (1..maxSI-Message)) OF SchedulingInfo-MBMS-r14 + +SchedulingInfo-MBMS-r14 ::= SEQUENCE { + si-Periodicity-r14 ENUMERATED { + rf16, rf32, rf64, rf128, rf256, rf512}, + sib-MappingInfo-r14 SIB-MappingInfo-MBMS-r14 +} + +SIB-MappingInfo-MBMS-r14 ::= SEQUENCE (SIZE (0..maxSIB-1)) OF SIB-Type-MBMS-r14 + +SIB-Type-MBMS-r14 ::= ENUMERATED { + sibType10, sibType11, sibType12-v920, sibType13-v920, + sibType15-v1130, sibType16-v1130, ...} + + +NonMBSFN-SubframeConfig-r14 ::= SEQUENCE { + radioFrameAllocationPeriod-r14 ENUMERATED {rf4, rf8, rf16, rf32, rf64, rf128, rf512}, + radioFrameAllocationOffset-r14 INTEGER (0..7), + subframeAllocation-r14 BIT STRING (SIZE(9)) +} + + +UEAssistanceInformation-r11 ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE { + ueAssistanceInformation-r11 UEAssistanceInformation-r11-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +UEAssistanceInformation-r11-IEs ::= SEQUENCE { + powerPrefIndication-r11 ENUMERATED {normal, lowPowerConsumption} OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension UEAssistanceInformation-v1430-IEs OPTIONAL +} + +UEAssistanceInformation-v1430-IEs ::= SEQUENCE { + bw-Preference-r14 BW-Preference-r14 OPTIONAL, + sps-AssistanceInformation-r14 SEQUENCE { + trafficPatternInfoListSL-r14 TrafficPatternInfoList-r14 OPTIONAL, + trafficPatternInfoListUL-r14 TrafficPatternInfoList-r14 OPTIONAL + } OPTIONAL, + rlm-Report-r14 SEQUENCE { + rlm-Event-r14 ENUMERATED {earlyOutOfSync, earlyInSync}, + excessRep-MPDCCH-r14 ENUMERATED {excessRep1, excessRep2} OPTIONAL + } OPTIONAL, delayBudgetReport-r14 DelayBudgetReport-r14 OPTIONAL, + nonCriticalExtension UEAssistanceInformation-v1450-IEs OPTIONAL +} + +UEAssistanceInformation-v1450-IEs ::= SEQUENCE { + overheatingAssistance-r14 OverheatingAssistance-r14 OPTIONAL, + nonCriticalExtension UEAssistanceInformation-v1530-IEs OPTIONAL +} + +UEAssistanceInformation-v1530-IEs ::= SEQUENCE { + sps-AssistanceInformation-v1530 SEQUENCE { + trafficPatternInfoListSL-v1530 TrafficPatternInfoList-v1530 + } OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +BW-Preference-r14 ::= SEQUENCE { + dl-Preference-r14 ENUMERATED {mhz1dot4, mhz5, mhz20 } OPTIONAL, + ul-Preference-r14 ENUMERATED {mhz1dot4, mhz5} OPTIONAL +} + +TrafficPatternInfoList-r14 ::= SEQUENCE (SIZE (1..maxTrafficPattern-r14)) OF TrafficPatternInfo-r14 + +TrafficPatternInfo-r14 ::= SEQUENCE { + trafficPeriodicity-r14 ENUMERATED { + sf20, sf50, sf100, sf200, sf300, sf400, sf500, + sf600, sf700, sf800, sf900, sf1000}, + timingOffset-r14 INTEGER (0..10239), + priorityInfoSL-r14 SL-Priority-r13 OPTIONAL, + logicalChannelIdentityUL-r14 INTEGER (3..10) OPTIONAL, + messageSize-r14 BIT STRING (SIZE (6)) +} + +TrafficPatternInfoList-v1530 ::= SEQUENCE (SIZE (1..maxTrafficPattern-r14)) OF TrafficPatternInfo-v1530 + +TrafficPatternInfo-v1530 ::= SEQUENCE { + trafficDestination-r15 SL-DestinationIdentity-r12 OPTIONAL, + reliabilityInfoSL-r15 SL-Reliability-r15 OPTIONAL +} + +DelayBudgetReport-r14::= CHOICE { + type1 ENUMERATED { + msMinus1280, msMinus640, msMinus320, msMinus160, + msMinus80, msMinus60, msMinus40, msMinus20, ms0, ms20, ms40, ms60, ms80, ms160, ms320, ms640, ms1280}, + + type2 ENUMERATED { + msMinus192, msMinus168,msMinus144, msMinus120, + msMinus96, msMinus72, msMinus48, msMinus24, ms0, ms24, ms48, ms72, ms96, ms120, ms144, ms168, ms192} +} + +OverheatingAssistance-r14 ::= SEQUENCE { + reducedUE-Category SEQUENCE { + reducedUE-CategoryDL INTEGER (0..19), + reducedUE-CategoryUL INTEGER (0..21) + } OPTIONAL, + reducedMaxCCs SEQUENCE { + reducedCCsDL INTEGER (0..31), + reducedCCsUL INTEGER (0..31) + } OPTIONAL +} + + +UECapabilityEnquiry ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE { + ueCapabilityEnquiry-r8 UECapabilityEnquiry-r8-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +UECapabilityEnquiry-r8-IEs ::= SEQUENCE { + ue-CapabilityRequest UE-CapabilityRequest, + nonCriticalExtension UECapabilityEnquiry-v8a0-IEs OPTIONAL +} + +UECapabilityEnquiry-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension UECapabilityEnquiry-v1180-IEs OPTIONAL +} + +UECapabilityEnquiry-v1180-IEs ::= SEQUENCE { + requestedFrequencyBands-r11 SEQUENCE (SIZE (1..16)) OF FreqBandIndicator-r11 OPTIONAL, + nonCriticalExtension UECapabilityEnquiry-v1310-IEs OPTIONAL +} + +UECapabilityEnquiry-v1310-IEs ::= SEQUENCE { + requestReducedFormat-r13 ENUMERATED {true} OPTIONAL, -- Need ON + requestSkipFallbackComb-r13 ENUMERATED {true} OPTIONAL, -- Need ON + requestedMaxCCsDL-r13 INTEGER (2..32) OPTIONAL, -- Need ON + requestedMaxCCsUL-r13 INTEGER (2..32) OPTIONAL, -- Need ON + requestReducedIntNonContComb-r13 ENUMERATED {true} OPTIONAL, -- Need ON + nonCriticalExtension UECapabilityEnquiry-v1430-IEs OPTIONAL +} + +UECapabilityEnquiry-v1430-IEs ::= SEQUENCE { + requestDiffFallbackCombList-r14 BandCombinationList-r14 OPTIONAL, -- Need ON + nonCriticalExtension UECapabilityEnquiry-v1510-IEs OPTIONAL +} + +UECapabilityEnquiry-v1510-IEs ::= SEQUENCE { + requestedFreqBandsNR-MRDC-r15 OCTET STRING OPTIONAL, + nonCriticalExtension UECapabilityEnquiry-v1530-IEs OPTIONAL +} + +UECapabilityEnquiry-v1530-IEs ::= SEQUENCE { + requestSTTI-SPT-Capability-r15 ENUMERATED {true} OPTIONAL, + eutra-nr-only-r15 ENUMERATED {true} OPTIONAL, nonCriticalExtension SEQUENCE {} OPTIONAL +} + +UE-CapabilityRequest ::= SEQUENCE (SIZE (1..maxRAT-Capabilities)) OF RAT-Type + + +UECapabilityInformation ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE{ + ueCapabilityInformation-r8 UECapabilityInformation-r8-IEs, + spare7 NULL, + spare6 NULL, spare5 NULL, spare4 NULL, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +UECapabilityInformation-r8-IEs ::= SEQUENCE { + ue-CapabilityRAT-ContainerList UE-CapabilityRAT-ContainerList, + nonCriticalExtension UECapabilityInformation-v8a0-IEs OPTIONAL +} + +UECapabilityInformation-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension UECapabilityInformation-v1250-IEs OPTIONAL +} + +UECapabilityInformation-v1250-IEs ::= SEQUENCE { + ue-RadioPagingInfo-r12 UE-RadioPagingInfo-r12 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +UEInformationRequest-r9 ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE { + ueInformationRequest-r9 UEInformationRequest-r9-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +UEInformationRequest-r9-IEs ::= SEQUENCE { + rach-ReportReq-r9 BOOLEAN, + rlf-ReportReq-r9 BOOLEAN, + nonCriticalExtension UEInformationRequest-v930-IEs OPTIONAL +} + +UEInformationRequest-v930-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension UEInformationRequest-v1020-IEs OPTIONAL +} + +UEInformationRequest-v1020-IEs ::= SEQUENCE { + logMeasReportReq-r10 ENUMERATED {true} OPTIONAL, -- Need ON + nonCriticalExtension UEInformationRequest-v1130-IEs OPTIONAL +} + +UEInformationRequest-v1130-IEs ::= SEQUENCE { + connEstFailReportReq-r11 ENUMERATED {true} OPTIONAL, -- Need ON + nonCriticalExtension UEInformationRequest-v1250-IEs OPTIONAL +} + +UEInformationRequest-v1250-IEs ::= SEQUENCE { + mobilityHistoryReportReq-r12 ENUMERATED {true} OPTIONAL, -- Need ON + nonCriticalExtension UEInformationRequest-v1530-IEs OPTIONAL +} + +UEInformationRequest-v1530-IEs ::= SEQUENCE { + idleModeMeasurementReq-r15 ENUMERATED {true} OPTIONAL, -- Need ON + flightPathInfoReq-r15 FlightPathInfoReportConfig-r15 OPTIONAL, -- Need ON + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +UEInformationResponse-r9 ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE { + ueInformationResponse-r9 UEInformationResponse-r9-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +UEInformationResponse-r9-IEs ::= SEQUENCE { + rach-Report-r9 SEQUENCE { + numberOfPreamblesSent-r9 NumberOfPreamblesSent-r11, + contentionDetected-r9 BOOLEAN + } OPTIONAL, + rlf-Report-r9 RLF-Report-r9 OPTIONAL, + nonCriticalExtension UEInformationResponse-v930-IEs OPTIONAL +} + +-- Late non critical extensions +UEInformationResponse-v9e0-IEs ::= SEQUENCE { + rlf-Report-v9e0 RLF-Report-v9e0 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- Regular non critical extensions +UEInformationResponse-v930-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING (CONTAINING UEInformationResponse-v9e0-IEs) OPTIONAL, + nonCriticalExtension UEInformationResponse-v1020-IEs OPTIONAL +} + +UEInformationResponse-v1020-IEs ::= SEQUENCE { + logMeasReport-r10 LogMeasReport-r10 OPTIONAL, + nonCriticalExtension UEInformationResponse-v1130-IEs OPTIONAL +} + +UEInformationResponse-v1130-IEs ::= SEQUENCE { + connEstFailReport-r11 ConnEstFailReport-r11 OPTIONAL, + nonCriticalExtension UEInformationResponse-v1250-IEs OPTIONAL +} + +UEInformationResponse-v1250-IEs ::= SEQUENCE { + mobilityHistoryReport-r12 MobilityHistoryReport-r12 OPTIONAL, + nonCriticalExtension UEInformationResponse-v1530-IEs OPTIONAL +} + +UEInformationResponse-v1530-IEs ::= SEQUENCE { + measResultListIdle-r15 MeasResultListIdle-r15 OPTIONAL, + flightPathInfoReport-r15 FlightPathInfoReport-r15 OPTIONAL, nonCriticalExtension SEQUENCE {} OPTIONAL +} + +RLF-Report-r9 ::= SEQUENCE { + measResultLastServCell-r9 SEQUENCE { + rsrpResult-r9 RSRP-Range, + rsrqResult-r9 RSRQ-Range OPTIONAL + }, + measResultNeighCells-r9 SEQUENCE { + measResultListEUTRA-r9 MeasResultList2EUTRA-r9 OPTIONAL, + measResultListUTRA-r9 MeasResultList2UTRA-r9 OPTIONAL, + measResultListGERAN-r9 MeasResultListGERAN OPTIONAL, + measResultsCDMA2000-r9 MeasResultList2CDMA2000-r9 OPTIONAL + } OPTIONAL, + ..., + [[ locationInfo-r10 LocationInfo-r10 OPTIONAL, + failedPCellId-r10 CHOICE { + cellGlobalId-r10 CellGlobalIdEUTRA, + pci-arfcn-r10 SEQUENCE { + physCellId-r10 PhysCellId, + carrierFreq-r10 ARFCN-ValueEUTRA + } + } OPTIONAL, + reestablishmentCellId-r10 CellGlobalIdEUTRA OPTIONAL, + timeConnFailure-r10 INTEGER (0..1023) OPTIONAL, + connectionFailureType-r10 ENUMERATED {rlf, hof} OPTIONAL, + previousPCellId-r10 CellGlobalIdEUTRA OPTIONAL + ]], + [[ failedPCellId-v1090 SEQUENCE { + carrierFreq-v1090 ARFCN-ValueEUTRA-v9e0 + } OPTIONAL + ]], + [[ basicFields-r11 SEQUENCE { + c-RNTI-r11 C-RNTI, + rlf-Cause-r11 ENUMERATED { + t310-Expiry, randomAccessProblem, + rlc-MaxNumRetx, t312-Expiry-r12}, + timeSinceFailure-r11 TimeSinceFailure-r11 + } OPTIONAL, + previousUTRA-CellId-r11 SEQUENCE { + carrierFreq-r11 ARFCN-ValueUTRA, + physCellId-r11 CHOICE { + fdd-r11 PhysCellIdUTRA-FDD, + tdd-r11 PhysCellIdUTRA-TDD + }, + cellGlobalId-r11 CellGlobalIdUTRA OPTIONAL + } OPTIONAL, + selectedUTRA-CellId-r11 SEQUENCE { + carrierFreq-r11 ARFCN-ValueUTRA, + physCellId-r11 CHOICE { + fdd-r11 PhysCellIdUTRA-FDD, + tdd-r11 PhysCellIdUTRA-TDD + } + } OPTIONAL + ]], + [[ failedPCellId-v1250 SEQUENCE { + tac-FailedPCell-r12 TrackingAreaCode + } OPTIONAL, + measResultLastServCell-v1250 RSRQ-Range-v1250 OPTIONAL, + lastServCellRSRQ-Type-r12 RSRQ-Type-r12 OPTIONAL, + measResultListEUTRA-v1250 MeasResultList2EUTRA-v1250 OPTIONAL + ]], + [[ drb-EstablishedWithQCI-1-r13 ENUMERATED {qci1} OPTIONAL + ]], + [[ measResultLastServCell-v1360 RSRP-Range-v1360 OPTIONAL + ]], + [[ logMeasResultListBT-r15 LogMeasResultListBT-r15 OPTIONAL, + logMeasResultListWLAN-r15 LogMeasResultListWLAN-r15 OPTIONAL + ]] +} + +RLF-Report-v9e0 ::= SEQUENCE { + measResultListEUTRA-v9e0 MeasResultList2EUTRA-v9e0 +} + +MeasResultList2EUTRA-r9 ::= SEQUENCE (SIZE (1..maxFreq)) OF MeasResult2EUTRA-r9 + +MeasResultList2EUTRA-v9e0 ::= SEQUENCE (SIZE (1..maxFreq)) OF MeasResult2EUTRA-v9e0 + +MeasResultList2EUTRA-v1250 ::= SEQUENCE (SIZE (1..maxFreq)) OF MeasResult2EUTRA-v1250 + +MeasResult2EUTRA-r9 ::= SEQUENCE { + carrierFreq-r9 ARFCN-ValueEUTRA, + measResultList-r9 MeasResultListEUTRA +} + +MeasResult2EUTRA-v9e0 ::= SEQUENCE { + carrierFreq-v9e0 ARFCN-ValueEUTRA-v9e0 OPTIONAL +} + +MeasResult2EUTRA-v1250 ::= SEQUENCE { + rsrq-Type-r12 RSRQ-Type-r12 OPTIONAL +} + +MeasResultList2UTRA-r9 ::= SEQUENCE (SIZE (1..maxFreq)) OF MeasResult2UTRA-r9 + +MeasResult2UTRA-r9 ::= SEQUENCE { + carrierFreq-r9 ARFCN-ValueUTRA, + measResultList-r9 MeasResultListUTRA +} + +MeasResultList2CDMA2000-r9 ::= SEQUENCE (SIZE (1..maxFreq)) OF MeasResult2CDMA2000-r9 + +MeasResult2CDMA2000-r9 ::= SEQUENCE { + carrierFreq-r9 CarrierFreqCDMA2000, + measResultList-r9 MeasResultsCDMA2000 +} + +LogMeasReport-r10 ::= SEQUENCE { + absoluteTimeStamp-r10 AbsoluteTimeInfo-r10, + traceReference-r10 TraceReference-r10, + traceRecordingSessionRef-r10 OCTET STRING (SIZE (2)), + tce-Id-r10 OCTET STRING (SIZE (1)), + logMeasInfoList-r10 LogMeasInfoList-r10, + logMeasAvailable-r10 ENUMERATED {true} OPTIONAL, + ..., + [[ logMeasAvailableBT-r15 ENUMERATED {true} OPTIONAL, + logMeasAvailableWLAN-r15 ENUMERATED {true} OPTIONAL + ]] +} + +LogMeasInfoList-r10 ::= SEQUENCE (SIZE (1..maxLogMeasReport-r10)) OF LogMeasInfo-r10 + +LogMeasInfo-r10 ::= SEQUENCE { + locationInfo-r10 LocationInfo-r10 OPTIONAL, + relativeTimeStamp-r10 INTEGER (0..7200), + servCellIdentity-r10 CellGlobalIdEUTRA, + measResultServCell-r10 SEQUENCE { + rsrpResult-r10 RSRP-Range, + rsrqResult-r10 RSRQ-Range + }, + measResultNeighCells-r10 SEQUENCE { + measResultListEUTRA-r10 MeasResultList2EUTRA-r9 OPTIONAL, + measResultListUTRA-r10 MeasResultList2UTRA-r9 OPTIONAL, + measResultListGERAN-r10 MeasResultList2GERAN-r10 OPTIONAL, + measResultListCDMA2000-r10 MeasResultList2CDMA2000-r9 OPTIONAL + } OPTIONAL, + ..., + [[ measResultListEUTRA-v1090 MeasResultList2EUTRA-v9e0 OPTIONAL + ]], + [[ measResultListMBSFN-r12 MeasResultListMBSFN-r12 OPTIONAL, + measResultServCell-v1250 RSRQ-Range-v1250 OPTIONAL, + servCellRSRQ-Type-r12 RSRQ-Type-r12 OPTIONAL, + measResultListEUTRA-v1250 MeasResultList2EUTRA-v1250 OPTIONAL + ]], + [[ inDeviceCoexDetected-r13 ENUMERATED {true} OPTIONAL + ]], + [[ measResultServCell-v1360 RSRP-Range-v1360 OPTIONAL + ]], + [[ logMeasResultListBT-r15 LogMeasResultListBT-r15 OPTIONAL, + logMeasResultListWLAN-r15 LogMeasResultListWLAN-r15 OPTIONAL + ]] +} + +MeasResultListMBSFN-r12 ::= SEQUENCE (SIZE (1..maxMBSFN-Area)) OF MeasResultMBSFN-r12 + +MeasResultMBSFN-r12 ::= SEQUENCE { + mbsfn-Area-r12 SEQUENCE { + mbsfn-AreaId-r12 MBSFN-AreaId-r12, + carrierFreq-r12 ARFCN-ValueEUTRA-r9 + }, + rsrpResultMBSFN-r12 RSRP-Range, + rsrqResultMBSFN-r12 MBSFN-RSRQ-Range-r12, + signallingBLER-Result-r12 BLER-Result-r12 OPTIONAL, + dataBLER-MCH-ResultList-r12 DataBLER-MCH-ResultList-r12 OPTIONAL, + ... +} + +DataBLER-MCH-ResultList-r12 ::= SEQUENCE (SIZE (1.. maxPMCH-PerMBSFN)) OF DataBLER-MCH-Result-r12 + +DataBLER-MCH-Result-r12 ::= SEQUENCE { + mch-Index-r12 INTEGER (1..maxPMCH-PerMBSFN), + dataBLER-Result-r12 BLER-Result-r12 +} + +BLER-Result-r12 ::= SEQUENCE { + bler-r12 BLER-Range-r12, + blocksReceived-r12 SEQUENCE { + n-r12 BIT STRING (SIZE (3)), + m-r12 BIT STRING (SIZE (8)) + } +} + +BLER-Range-r12 ::= INTEGER(0..31) + +MeasResultList2GERAN-r10 ::= SEQUENCE (SIZE (1..maxCellListGERAN)) OF MeasResultListGERAN + +ConnEstFailReport-r11 ::= SEQUENCE { + failedCellId-r11 CellGlobalIdEUTRA, + locationInfo-r11 LocationInfo-r10 OPTIONAL, + measResultFailedCell-r11 SEQUENCE { + rsrpResult-r11 RSRP-Range, + rsrqResult-r11 RSRQ-Range OPTIONAL + }, + measResultNeighCells-r11 SEQUENCE { + measResultListEUTRA-r11 MeasResultList2EUTRA-r9 OPTIONAL, + measResultListUTRA-r11 MeasResultList2UTRA-r9 OPTIONAL, + measResultListGERAN-r11 MeasResultListGERAN OPTIONAL, + measResultsCDMA2000-r11 MeasResultList2CDMA2000-r9 OPTIONAL + } OPTIONAL, + numberOfPreamblesSent-r11 NumberOfPreamblesSent-r11, + contentionDetected-r11 BOOLEAN, + maxTxPowerReached-r11 BOOLEAN, + timeSinceFailure-r11 TimeSinceFailure-r11, + measResultListEUTRA-v1130 MeasResultList2EUTRA-v9e0 OPTIONAL, + ..., + [[ measResultFailedCell-v1250 RSRQ-Range-v1250 OPTIONAL, + failedCellRSRQ-Type-r12 RSRQ-Type-r12 OPTIONAL, + measResultListEUTRA-v1250 MeasResultList2EUTRA-v1250 OPTIONAL + ]], + [[ measResultFailedCell-v1360 RSRP-Range-v1360 OPTIONAL + ]], + [[ logMeasResultListBT-r15 LogMeasResultListBT-r15 OPTIONAL, + logMeasResultListWLAN-r15 LogMeasResultListWLAN-r15 OPTIONAL + ]] +} + +NumberOfPreamblesSent-r11::= INTEGER (1..200) + +TimeSinceFailure-r11 ::= INTEGER (0..172800) + +MobilityHistoryReport-r12 ::= VisitedCellInfoList-r12 + +FlightPathInfoReport-r15 ::= SEQUENCE { + flightPath-r15 SEQUENCE (SIZE (1..maxWayPoint-r15)) OF WayPointLocation-r15 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +WayPointLocation-r15 ::= SEQUENCE { + wayPointLocation-r15 LocationInfo-r10, + timeStamp-r15 AbsoluteTimeInfo-r10 OPTIONAL +} + + +ULHandoverPreparationTransfer ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE { + ulHandoverPreparationTransfer-r8 ULHandoverPreparationTransfer-r8-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +ULHandoverPreparationTransfer-r8-IEs ::= SEQUENCE { + cdma2000-Type CDMA2000-Type, + meid BIT STRING (SIZE (56)) OPTIONAL, + dedicatedInfo DedicatedInfoCDMA2000, + nonCriticalExtension ULHandoverPreparationTransfer-v8a0-IEs OPTIONAL +} + +ULHandoverPreparationTransfer-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +ULInformationTransfer ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE { + ulInformationTransfer-r8 ULInformationTransfer-r8-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +ULInformationTransfer-r8-IEs ::= SEQUENCE { + dedicatedInfoType CHOICE { + dedicatedInfoNAS DedicatedInfoNAS, + dedicatedInfoCDMA2000-1XRTT DedicatedInfoCDMA2000, + dedicatedInfoCDMA2000-HRPD DedicatedInfoCDMA2000 + }, + nonCriticalExtension ULInformationTransfer-v8a0-IEs OPTIONAL +} + +ULInformationTransfer-v8a0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +ULInformationTransferMRDC-r15 ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE { + ulInformationTransferMRDC-r15 ULInformationTransferMRDC-r15-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +ULInformationTransferMRDC-r15-IEs ::= SEQUENCE { + ul-DCCH-MessageNR-r15 OCTET STRING OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +WLANConnectionStatusReport-r13 ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE { + wlanConnectionStatusReport-r13 WLANConnectionStatusReport-r13-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +WLANConnectionStatusReport-r13-IEs ::= SEQUENCE { + wlan-Status-r13 WLAN-Status-r13, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension WLANConnectionStatusReport-v1430-IEs OPTIONAL +} + +WLANConnectionStatusReport-v1430-IEs ::= SEQUENCE { + wlan-Status-v1430 WLAN-Status-v1430, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +SystemInformationBlockPos-r15 ::= SEQUENCE { + assistanceDataSIB-Element-r15 OCTET STRING, + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + + +SystemInformationBlockType2 ::= SEQUENCE { + ac-BarringInfo SEQUENCE { + ac-BarringForEmergency BOOLEAN, + ac-BarringForMO-Signalling AC-BarringConfig OPTIONAL, -- Need OP + ac-BarringForMO-Data AC-BarringConfig OPTIONAL -- Need OP + } OPTIONAL, -- Need OP + radioResourceConfigCommon RadioResourceConfigCommonSIB, + ue-TimersAndConstants UE-TimersAndConstants, + freqInfo SEQUENCE { + ul-CarrierFreq ARFCN-ValueEUTRA OPTIONAL, -- Need OP + ul-Bandwidth ENUMERATED {n6, n15, n25, n50, n75, n100} + OPTIONAL, -- Need OP + additionalSpectrumEmission AdditionalSpectrumEmission + }, + mbsfn-SubframeConfigList MBSFN-SubframeConfigList OPTIONAL, -- Need OR + timeAlignmentTimerCommon TimeAlignmentTimer, + ..., + lateNonCriticalExtension OCTET STRING (CONTAINING SystemInformationBlockType2-v8h0-IEs) OPTIONAL, + [[ ssac-BarringForMMTEL-Voice-r9 AC-BarringConfig OPTIONAL, -- Need OP + ssac-BarringForMMTEL-Video-r9 AC-BarringConfig OPTIONAL -- Need OP + ]], + [[ ac-BarringForCSFB-r10 AC-BarringConfig OPTIONAL -- Need OP + ]], + [[ ac-BarringSkipForMMTELVoice-r12 ENUMERATED {true} OPTIONAL, -- Need OP + ac-BarringSkipForMMTELVideo-r12 ENUMERATED {true} OPTIONAL, -- Need OP + ac-BarringSkipForSMS-r12 ENUMERATED {true} OPTIONAL, -- Need OP + ac-BarringPerPLMN-List-r12 AC-BarringPerPLMN-List-r12 OPTIONAL -- Need OP + ]], + [[ voiceServiceCauseIndication-r12 ENUMERATED {true} OPTIONAL -- Need OP + ]], + [[ acdc-BarringForCommon-r13 ACDC-BarringForCommon-r13 OPTIONAL, -- Need OP + acdc-BarringPerPLMN-List-r13 ACDC-BarringPerPLMN-List-r13 OPTIONAL -- Need OP + ]], + [[ + udt-RestrictingForCommon-r13 UDT-Restricting-r13 OPTIONAL, -- Need OR + udt-RestrictingPerPLMN-List-r13 UDT-RestrictingPerPLMN-List-r13 OPTIONAL, -- Need OR + cIoT-EPS-OptimisationInfo-r13 CIOT-EPS-OptimisationInfo-r13 OPTIONAL, -- Need OP + useFullResumeID-r13 ENUMERATED {true} OPTIONAL -- Need OP + ]], + [[ unicastFreqHoppingInd-r13 ENUMERATED {true} OPTIONAL -- Need OP + ]], + [[ mbsfn-SubframeConfigList-v1430 MBSFN-SubframeConfigList-v1430 OPTIONAL, -- Need OP + videoServiceCauseIndication-r14 ENUMERATED {true} OPTIONAL -- Need OP + ]], + [[ plmn-InfoList-r15 PLMN-InfoList-r15 OPTIONAL -- Need OP + ]], + [[ cp-EDT-r15 ENUMERATED {true} OPTIONAL, -- Need OR + up-EDT-r15 ENUMERATED {true} OPTIONAL, -- Need OR + idleModeMeasurements-r15 ENUMERATED {true} OPTIONAL, -- Need OR + reducedCP-LatencyEnabled-r15 ENUMERATED {true} OPTIONAL -- Need OR + ]] +} + +SystemInformationBlockType2-v8h0-IEs ::= SEQUENCE { + multiBandInfoList SEQUENCE (SIZE (1..maxMultiBands)) OF AdditionalSpectrumEmission OPTIONAL, -- Need OR + nonCriticalExtension SystemInformationBlockType2-v9e0-IEs OPTIONAL +} + +SystemInformationBlockType2-v9e0-IEs ::= SEQUENCE { + ul-CarrierFreq-v9e0 ARFCN-ValueEUTRA-v9e0 OPTIONAL, -- Cond ul-FreqMax + nonCriticalExtension SystemInformationBlockType2-v9i0-IEs OPTIONAL +} + +SystemInformationBlockType2-v9i0-IEs ::= SEQUENCE { +-- Following field is for any non-critical extensions from REL-9 + nonCriticalExtension OCTET STRING (CONTAINING SystemInformationBlockType2-v10m0-IEs) OPTIONAL, + dummy SEQUENCE {} OPTIONAL +} + +SystemInformationBlockType2-v10m0-IEs ::= SEQUENCE { + freqInfo-v10l0 SEQUENCE { + additionalSpectrumEmission-v10l0 AdditionalSpectrumEmission-v10l0 + } OPTIONAL, + multiBandInfoList-v10l0 SEQUENCE (SIZE (1..maxMultiBands)) OF + AdditionalSpectrumEmission-v10l0 OPTIONAL, +-- Following field is for non-critical extensions from REL-10 + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +AC-BarringConfig ::= SEQUENCE { + ac-BarringFactor ENUMERATED { + p00, p05, p10, p15, p20, p25, p30, p40, + p50, p60, p70, p75, p80, p85, p90, p95}, + ac-BarringTime ENUMERATED {s4, s8, s16, s32, s64, s128, s256, s512}, + ac-BarringForSpecialAC BIT STRING (SIZE(5)) +} + +MBSFN-SubframeConfigList ::= SEQUENCE (SIZE (1..maxMBSFN-Allocations)) OF MBSFN-SubframeConfig + +MBSFN-SubframeConfigList-v1430 ::= SEQUENCE (SIZE (1..maxMBSFN-Allocations)) OF MBSFN-SubframeConfig-v1430 + +AC-BarringPerPLMN-List-r12 ::= SEQUENCE (SIZE (1.. maxPLMN-r11)) OF AC-BarringPerPLMN-r12 + +AC-BarringPerPLMN-r12 ::= SEQUENCE { + plmn-IdentityIndex-r12 INTEGER (1..maxPLMN-r11), + ac-BarringInfo-r12 SEQUENCE { + ac-BarringForEmergency-r12 BOOLEAN, + ac-BarringForMO-Signalling-r12 AC-BarringConfig OPTIONAL, -- Need OP + ac-BarringForMO-Data-r12 AC-BarringConfig OPTIONAL -- Need OP + } OPTIONAL, -- Need OP + ac-BarringSkipForMMTELVoice-r12 ENUMERATED {true} OPTIONAL, -- Need OP + ac-BarringSkipForMMTELVideo-r12 ENUMERATED {true} OPTIONAL, -- Need OP + ac-BarringSkipForSMS-r12 ENUMERATED {true} OPTIONAL, -- Need OP + ac-BarringForCSFB-r12 AC-BarringConfig OPTIONAL, -- Need OP + ssac-BarringForMMTEL-Voice-r12 AC-BarringConfig OPTIONAL, -- Need OP + ssac-BarringForMMTEL-Video-r12 AC-BarringConfig OPTIONAL -- Need OP +} + +ACDC-BarringForCommon-r13 ::= SEQUENCE { + acdc-HPLMNonly-r13 BOOLEAN, + barringPerACDC-CategoryList-r13 BarringPerACDC-CategoryList-r13 +} + +ACDC-BarringPerPLMN-List-r13 ::= SEQUENCE (SIZE (1.. maxPLMN-r11)) OF ACDC-BarringPerPLMN-r13 + +ACDC-BarringPerPLMN-r13 ::= SEQUENCE { + plmn-IdentityIndex-r13 INTEGER (1..maxPLMN-r11), + acdc-OnlyForHPLMN-r13 BOOLEAN, + barringPerACDC-CategoryList-r13 BarringPerACDC-CategoryList-r13 +} + +BarringPerACDC-CategoryList-r13 ::= SEQUENCE (SIZE (1..maxACDC-Cat-r13)) OF BarringPerACDC-Category-r13 + +BarringPerACDC-Category-r13 ::= SEQUENCE { + acdc-Category-r13 INTEGER (1..maxACDC-Cat-r13), + acdc-BarringConfig-r13 SEQUENCE { + ac-BarringFactor-r13 ENUMERATED { + p00, p05, p10, p15, p20, p25, p30, p40, + p50, p60, p70, p75, p80, p85, p90, p95}, + ac-BarringTime-r13 ENUMERATED {s4, s8, s16, s32, s64, s128, s256, s512} + } OPTIONAL -- Need OP +} + +UDT-Restricting-r13 ::= SEQUENCE { + udt-Restricting-r13 ENUMERATED {true} OPTIONAL, --Need OR + udt-RestrictingTime-r13 ENUMERATED {s4, s8, s16, s32, s64, s128, s256, s512} OPTIONAL --Need OR +} + +UDT-RestrictingPerPLMN-List-r13 ::= SEQUENCE (SIZE (1..maxPLMN-r11)) OF UDT-RestrictingPerPLMN-r13 + +UDT-RestrictingPerPLMN-r13 ::= SEQUENCE { + plmn-IdentityIndex-r13 INTEGER (1..maxPLMN-r11), + udt-Restricting-r13 UDT-Restricting-r13 OPTIONAL --Need OR +} + +CIOT-EPS-OptimisationInfo-r13 ::= SEQUENCE (SIZE (1.. maxPLMN-r11)) OF CIOT-OptimisationPLMN-r13 + +CIOT-OptimisationPLMN-r13::= SEQUENCE { + up-CIoT-EPS-Optimisation-r13 ENUMERATED {true} OPTIONAL, -- Need OP + cp-CIoT-EPS-Optimisation-r13 ENUMERATED {true} OPTIONAL, -- Need OP + attachWithoutPDN-Connectivity-r13 ENUMERATED {true} OPTIONAL -- Need OP +} + +PLMN-InfoList-r15 ::= SEQUENCE (SIZE (1..maxPLMN-r11)) OF PLMN-Info-r15 + +PLMN-Info-r15 ::= SEQUENCE { + upperLayerIndication-r15 ENUMERATED {true} OPTIONAL -- Need OR +} + + +SystemInformationBlockType3 ::= SEQUENCE { + cellReselectionInfoCommon SEQUENCE { + q-Hyst ENUMERATED { + dB0, dB1, dB2, dB3, dB4, dB5, dB6, dB8, dB10, + dB12, dB14, dB16, dB18, dB20, dB22, dB24}, + speedStateReselectionPars SEQUENCE { + mobilityStateParameters MobilityStateParameters, + q-HystSF SEQUENCE { + sf-Medium ENUMERATED { + dB-6, dB-4, dB-2, dB0}, + sf-High ENUMERATED { + dB-6, dB-4, dB-2, dB0} + } + } OPTIONAL -- Need OP + }, + cellReselectionServingFreqInfo SEQUENCE { + s-NonIntraSearch ReselectionThreshold OPTIONAL, -- Need OP + threshServingLow ReselectionThreshold, + cellReselectionPriority CellReselectionPriority + }, + intraFreqCellReselectionInfo SEQUENCE { + q-RxLevMin Q-RxLevMin, + p-Max P-Max OPTIONAL, -- Need OP + s-IntraSearch ReselectionThreshold OPTIONAL, -- Need OP + allowedMeasBandwidth AllowedMeasBandwidth OPTIONAL, -- Need OP + presenceAntennaPort1 PresenceAntennaPort1, + neighCellConfig NeighCellConfig, + t-ReselectionEUTRA T-Reselection, + t-ReselectionEUTRA-SF SpeedStateScaleFactors OPTIONAL -- Need OP + }, + ..., + lateNonCriticalExtension OCTET STRING (CONTAINING SystemInformationBlockType3-v10j0-IEs) OPTIONAL, + [[ s-IntraSearch-v920 SEQUENCE { + s-IntraSearchP-r9 ReselectionThreshold, + s-IntraSearchQ-r9 ReselectionThresholdQ-r9 + } OPTIONAL, -- Need OP + s-NonIntraSearch-v920 SEQUENCE { + s-NonIntraSearchP-r9 ReselectionThreshold, + s-NonIntraSearchQ-r9 ReselectionThresholdQ-r9 + } OPTIONAL, -- Need OP + q-QualMin-r9 Q-QualMin-r9 OPTIONAL, -- Need OP + threshServingLowQ-r9 ReselectionThresholdQ-r9 OPTIONAL -- Need OP + ]], + [[ q-QualMinWB-r11 Q-QualMin-r9 OPTIONAL -- Cond WB-RSRQ + ]], + [[ q-QualMinRSRQ-OnAllSymbols-r12 Q-QualMin-r9 OPTIONAL -- Cond RSRQ + ]], + [[ cellReselectionServingFreqInfo-v1310 CellReselectionServingFreqInfo-v1310 OPTIONAL, -- Need OP + redistributionServingInfo-r13 RedistributionServingInfo-r13 OPTIONAL, --Need OR + cellSelectionInfoCE-r13 CellSelectionInfoCE-r13 OPTIONAL, -- Need OP + t-ReselectionEUTRA-CE-r13 T-ReselectionEUTRA-CE-r13 OPTIONAL -- Need OP + ]], + [[ cellSelectionInfoCE1-r13 CellSelectionInfoCE1-r13 OPTIONAL -- Need OP + ]], + [[ cellSelectionInfoCE1-v1360 CellSelectionInfoCE1-v1360 OPTIONAL -- Cond QrxlevminCE1 + ]], + [[ cellReselectionInfoCommon-v1460 CellReselectionInfoCommon-v1460 OPTIONAL -- Need OR + ]], + [[ cellReselectionInfoHSDN-r15 CellReselectionInfoHSDN-r15 OPTIONAL, -- Need OR + cellSelectionInfoCE-v1530 CellSelectionInfoCE-v1530 OPTIONAL, -- Need OP + crs-IntfMitigNeighCellsCE-r15 ENUMERATED {enabled} OPTIONAL -- Need OP + ]] +} + +RedistributionServingInfo-r13 ::= SEQUENCE { + redistributionFactorServing-r13 INTEGER(0..10), + redistributionFactorCell-r13 ENUMERATED{true} OPTIONAL, --Need OP + t360-r13 ENUMERATED {min4, min8, min16, min32,infinity, + spare3,spare2,spare1}, + redistrOnPagingOnly-r13 ENUMERATED {true} OPTIONAL --Need OP +} + +CellReselectionServingFreqInfo-v1310 ::= SEQUENCE { + cellReselectionSubPriority-r13 CellReselectionSubPriority-r13 +} + +-- Late non critical extensions +SystemInformationBlockType3-v10j0-IEs ::= SEQUENCE { + freqBandInfo-r10 NS-PmaxList-r10 OPTIONAL, -- Need OR + multiBandInfoList-v10j0 MultiBandInfoList-v10j0 OPTIONAL, -- Need OR + nonCriticalExtension SystemInformationBlockType3-v10l0-IEs OPTIONAL +} + +SystemInformationBlockType3-v10l0-IEs ::= SEQUENCE { + freqBandInfo-v10l0 NS-PmaxList-v10l0 OPTIONAL, -- Need OR + multiBandInfoList-v10l0 MultiBandInfoList-v10l0 OPTIONAL, -- Need OR + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +CellReselectionInfoCommon-v1460 ::= SEQUENCE { + s-SearchDeltaP-r14 ENUMERATED {dB6, dB9, dB12, dB15} +} + +CellReselectionInfoHSDN-r15 ::= SEQUENCE { + cellEquivalentSize-r15 INTEGER(2..16) +} + + +SystemInformationBlockType4 ::= SEQUENCE { + intraFreqNeighCellList IntraFreqNeighCellList OPTIONAL, -- Need OR + intraFreqBlackCellList IntraFreqBlackCellList OPTIONAL, -- Need OR + csg-PhysCellIdRange PhysCellIdRange OPTIONAL, -- Cond CSG + ..., + lateNonCriticalExtension OCTET STRING OPTIONAL, + [[ intraFreqNeighHSDN-CellList-r15 IntraFreqNeighHSDN-CellList-r15 OPTIONAL -- Need OR + ]] +} + +IntraFreqNeighCellList ::= SEQUENCE (SIZE (1..maxCellIntra)) OF IntraFreqNeighCellInfo + +IntraFreqNeighHSDN-CellList-r15 ::= SEQUENCE (SIZE (1..maxCellIntra)) OF PhysCellIdRange + +IntraFreqNeighCellInfo ::= SEQUENCE { + physCellId PhysCellId, + q-OffsetCell Q-OffsetRange, + ... +} + +IntraFreqBlackCellList ::= SEQUENCE (SIZE (1..maxCellBlack)) OF PhysCellIdRange + + +SystemInformationBlockType5 ::= SEQUENCE { + interFreqCarrierFreqList InterFreqCarrierFreqList, + ..., + lateNonCriticalExtension OCTET STRING (CONTAINING SystemInformationBlockType5-v8h0-IEs) OPTIONAL, + [[ interFreqCarrierFreqList-v1250 InterFreqCarrierFreqList-v1250 OPTIONAL, -- Need OR + interFreqCarrierFreqListExt-r12 InterFreqCarrierFreqListExt-r12 OPTIONAL -- Need OR + ]], + [[ interFreqCarrierFreqListExt-v1280 InterFreqCarrierFreqListExt-v1280 OPTIONAL -- Need OR + ]], + [[ interFreqCarrierFreqList-v1310 InterFreqCarrierFreqList-v1310 OPTIONAL, -- Need OR + interFreqCarrierFreqListExt-v1310 InterFreqCarrierFreqListExt-v1310 OPTIONAL -- Need OR + ]], + [[ interFreqCarrierFreqList-v1350 InterFreqCarrierFreqList-v1350 OPTIONAL, -- Need OR + interFreqCarrierFreqListExt-v1350 InterFreqCarrierFreqListExt-v1350 OPTIONAL -- Need OR + ]], + [[ interFreqCarrierFreqListExt-v1360 InterFreqCarrierFreqListExt-v1360 OPTIONAL -- Need OR + ]], + [[ scptm-FreqOffset-r14 INTEGER (1..8) OPTIONAL -- Need OP + ]], + [[ interFreqCarrierFreqList-v1530 InterFreqCarrierFreqList-v1530 OPTIONAL, -- Need OR + interFreqCarrierFreqListExt-v1530 InterFreqCarrierFreqListExt-v1530 OPTIONAL, -- Need OR + measIdleConfigSIB-r15 MeasIdleConfigSIB-r15 OPTIONAL -- Need OR + ]] +} + +-- Late non critical extensions +SystemInformationBlockType5-v8h0-IEs ::= SEQUENCE { + interFreqCarrierFreqList-v8h0 SEQUENCE (SIZE (1..maxFreq)) OF InterFreqCarrierFreqInfo-v8h0 OPTIONAL, -- Need OP + nonCriticalExtension SystemInformationBlockType5-v9e0-IEs OPTIONAL +} + +SystemInformationBlockType5-v9e0-IEs ::= SEQUENCE { + interFreqCarrierFreqList-v9e0 SEQUENCE (SIZE (1..maxFreq)) OF InterFreqCarrierFreqInfo-v9e0 OPTIONAL, -- Need OR + nonCriticalExtension SystemInformationBlockType5-v10j0-IEs OPTIONAL +} + +SystemInformationBlockType5-v10j0-IEs ::= SEQUENCE { + interFreqCarrierFreqList-v10j0 SEQUENCE (SIZE (1..maxFreq)) OF InterFreqCarrierFreqInfo-v10j0 OPTIONAL, -- Need OR + nonCriticalExtension SystemInformationBlockType5-v10l0-IEs OPTIONAL +} + +SystemInformationBlockType5-v10l0-IEs ::= SEQUENCE { + interFreqCarrierFreqList-v10l0 SEQUENCE (SIZE (1..maxFreq)) OF InterFreqCarrierFreqInfo-v10l0 OPTIONAL, -- Need OR + nonCriticalExtension SystemInformationBlockType5-v13a0-IEs OPTIONAL +} + +SystemInformationBlockType5-v13a0-IEs ::= SEQUENCE { + -- Late non critical extensions from REL-10 upto REL-12 + lateNonCriticalExtension OCTET STRING OPTIONAL, -- Need OR + interFreqCarrierFreqList-v13a0 InterFreqCarrierFreqList-v13a0 OPTIONAL, -- Need OR + -- Late non critical extensions from REL-13 + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +InterFreqCarrierFreqList ::= SEQUENCE (SIZE (1..maxFreq)) OF InterFreqCarrierFreqInfo + +InterFreqCarrierFreqList-v1250 ::= SEQUENCE (SIZE (1.. maxFreq)) OF InterFreqCarrierFreqInfo-v1250 + +InterFreqCarrierFreqList-v1310 ::= SEQUENCE (SIZE (1.. maxFreq)) OF InterFreqCarrierFreqInfo-v1310 + +InterFreqCarrierFreqList-v1350 ::= SEQUENCE (SIZE (1.. maxFreq)) OF InterFreqCarrierFreqInfo-v1350 + +InterFreqCarrierFreqList-v13a0 ::= SEQUENCE (SIZE (1.. maxFreq)) OF InterFreqCarrierFreqInfo-v1360 + +InterFreqCarrierFreqList-v1530 ::= SEQUENCE (SIZE (1.. maxFreq)) OF InterFreqCarrierFreqInfo-v1530 + +InterFreqCarrierFreqListExt-r12 ::= SEQUENCE (SIZE (1.. maxFreq)) OF InterFreqCarrierFreqInfo-r12 + +InterFreqCarrierFreqListExt-v1280 ::= SEQUENCE (SIZE (1.. maxFreq)) OF InterFreqCarrierFreqInfo-v10j0 + +InterFreqCarrierFreqListExt-v1310 ::= SEQUENCE (SIZE (1.. maxFreq)) OF InterFreqCarrierFreqInfo-v1310 + +InterFreqCarrierFreqListExt-v1350 ::= SEQUENCE (SIZE (1.. maxFreq)) OF InterFreqCarrierFreqInfo-v1350 + +InterFreqCarrierFreqListExt-v1360 ::= SEQUENCE (SIZE (1..maxFreq)) OF InterFreqCarrierFreqInfo-v1360 + +InterFreqCarrierFreqListExt-v1530 ::= SEQUENCE (SIZE (1..maxFreq)) OF InterFreqCarrierFreqInfo-v1530 + +InterFreqCarrierFreqInfo ::= SEQUENCE { + dl-CarrierFreq ARFCN-ValueEUTRA, + q-RxLevMin Q-RxLevMin, + p-Max P-Max OPTIONAL, -- Need OP + t-ReselectionEUTRA T-Reselection, + t-ReselectionEUTRA-SF SpeedStateScaleFactors OPTIONAL, -- Need OP + threshX-High ReselectionThreshold, + threshX-Low ReselectionThreshold, + allowedMeasBandwidth AllowedMeasBandwidth, + presenceAntennaPort1 PresenceAntennaPort1, + cellReselectionPriority CellReselectionPriority OPTIONAL, -- Need OP + neighCellConfig NeighCellConfig, + q-OffsetFreq Q-OffsetRange DEFAULT dB0, + interFreqNeighCellList InterFreqNeighCellList OPTIONAL, -- Need OR + interFreqBlackCellList InterFreqBlackCellList OPTIONAL, -- Need OR + ..., + [[ q-QualMin-r9 Q-QualMin-r9 OPTIONAL, -- Need OP + threshX-Q-r9 SEQUENCE { + threshX-HighQ-r9 ReselectionThresholdQ-r9, + threshX-LowQ-r9 ReselectionThresholdQ-r9 + } OPTIONAL -- Cond RSRQ + ]], + [[ q-QualMinWB-r11 Q-QualMin-r9 OPTIONAL -- Cond WB-RSRQ + ]] +} + +InterFreqCarrierFreqInfo-v8h0 ::= SEQUENCE { + multiBandInfoList MultiBandInfoList OPTIONAL -- Need OR +} + +InterFreqCarrierFreqInfo-v9e0 ::= SEQUENCE { + dl-CarrierFreq-v9e0 ARFCN-ValueEUTRA-v9e0 OPTIONAL, -- Cond dl-FreqMax + multiBandInfoList-v9e0 MultiBandInfoList-v9e0 OPTIONAL -- Need OR +} + +InterFreqCarrierFreqInfo-v10j0 ::= SEQUENCE { + freqBandInfo-r10 NS-PmaxList-r10 OPTIONAL, -- Need OR + multiBandInfoList-v10j0 MultiBandInfoList-v10j0 OPTIONAL -- Need OR +} + +InterFreqCarrierFreqInfo-v10l0 ::= SEQUENCE { + freqBandInfo-v10l0 NS-PmaxList-v10l0 OPTIONAL, -- Need OR + multiBandInfoList-v10l0 MultiBandInfoList-v10l0 OPTIONAL -- Need OR +} + +InterFreqCarrierFreqInfo-v1250 ::= SEQUENCE { + reducedMeasPerformance-r12 ENUMERATED {true} OPTIONAL, -- Need OP + q-QualMinRSRQ-OnAllSymbols-r12 Q-QualMin-r9 OPTIONAL -- Cond RSRQ2 +} + +InterFreqCarrierFreqInfo-r12 ::= SEQUENCE { + dl-CarrierFreq-r12 ARFCN-ValueEUTRA-r9, + q-RxLevMin-r12 Q-RxLevMin, + p-Max-r12 P-Max OPTIONAL, -- Need OP + t-ReselectionEUTRA-r12 T-Reselection, + t-ReselectionEUTRA-SF-r12 SpeedStateScaleFactors OPTIONAL, -- Need OP + threshX-High-r12 ReselectionThreshold, + threshX-Low-r12 ReselectionThreshold, + allowedMeasBandwidth-r12 AllowedMeasBandwidth, + presenceAntennaPort1-r12 PresenceAntennaPort1, + cellReselectionPriority-r12 CellReselectionPriority OPTIONAL, -- Need OP + neighCellConfig-r12 NeighCellConfig, + q-OffsetFreq-r12 Q-OffsetRange DEFAULT dB0, + interFreqNeighCellList-r12 InterFreqNeighCellList OPTIONAL, -- Need OR + interFreqBlackCellList-r12 InterFreqBlackCellList OPTIONAL, -- Need OR + q-QualMin-r12 Q-QualMin-r9 OPTIONAL, -- Need OP + threshX-Q-r12 SEQUENCE { + threshX-HighQ-r12 ReselectionThresholdQ-r9, + threshX-LowQ-r12 ReselectionThresholdQ-r9 + } OPTIONAL, -- Cond RSRQ + q-QualMinWB-r12 Q-QualMin-r9 OPTIONAL, -- Cond WB-RSRQ + multiBandInfoList-r12 MultiBandInfoList-r11 OPTIONAL, -- Need OR + reducedMeasPerformance-r12 ENUMERATED {true} OPTIONAL, -- Need OP + q-QualMinRSRQ-OnAllSymbols-r12 Q-QualMin-r9 OPTIONAL, -- Cond RSRQ2 +... +} + +InterFreqCarrierFreqInfo-v1310 ::= SEQUENCE { + cellReselectionSubPriority-r13 CellReselectionSubPriority-r13 OPTIONAL, -- Need OP + redistributionInterFreqInfo-r13 RedistributionInterFreqInfo-r13 OPTIONAL, --Need OP + cellSelectionInfoCE-r13 CellSelectionInfoCE-r13 OPTIONAL, -- Need OP + t-ReselectionEUTRA-CE-r13 T-ReselectionEUTRA-CE-r13 OPTIONAL -- Need OP +} + +InterFreqCarrierFreqInfo-v1350 ::= SEQUENCE { + cellSelectionInfoCE1-r13 CellSelectionInfoCE1-r13 OPTIONAL -- Need OP +} + +InterFreqCarrierFreqInfo-v1360 ::= SEQUENCE { + cellSelectionInfoCE1-v1360 CellSelectionInfoCE1-v1360 OPTIONAL -- Cond QrxlevminCE1 +} + +InterFreqCarrierFreqInfo-v1530 ::= SEQUENCE { + hsdn-Indication-r15 BOOLEAN, + interFreqNeighHSDN-CellList-r15 InterFreqNeighHSDN-CellList-r15 OPTIONAL, -- Need OR + cellSelectionInfoCE-v1530 CellSelectionInfoCE-v1530 OPTIONAL -- Need OP +} + +InterFreqNeighCellList ::= SEQUENCE (SIZE (1..maxCellInter)) OF InterFreqNeighCellInfo + +InterFreqNeighHSDN-CellList-r15 ::= SEQUENCE (SIZE (1..maxCellInter)) OF PhysCellIdRange + +InterFreqNeighCellInfo ::= SEQUENCE { + physCellId PhysCellId, + q-OffsetCell Q-OffsetRange +} + +InterFreqBlackCellList ::= SEQUENCE (SIZE (1..maxCellBlack)) OF PhysCellIdRange + +RedistributionInterFreqInfo-r13 ::= SEQUENCE { + redistributionFactorFreq-r13 RedistributionFactor-r13 OPTIONAL, --Need OP + redistributionNeighCellList-r13 RedistributionNeighCellList-r13 OPTIONAL --Need OP +} + +RedistributionNeighCellList-r13 ::= SEQUENCE (SIZE (1..maxCellInter)) OF RedistributionNeighCell-r13 + +RedistributionNeighCell-r13 ::= SEQUENCE { + physCellId-r13 PhysCellId, + redistributionFactorCell-r13 RedistributionFactor-r13 +} + +RedistributionFactor-r13 ::= INTEGER(1..10) + + +SystemInformationBlockType6 ::= SEQUENCE { + carrierFreqListUTRA-FDD CarrierFreqListUTRA-FDD OPTIONAL, -- Need OR + carrierFreqListUTRA-TDD CarrierFreqListUTRA-TDD OPTIONAL, -- Need OR + t-ReselectionUTRA T-Reselection, + t-ReselectionUTRA-SF SpeedStateScaleFactors OPTIONAL, -- Need OP + ..., + lateNonCriticalExtension OCTET STRING (CONTAINING SystemInformationBlockType6-v8h0-IEs) OPTIONAL, + [[ carrierFreqListUTRA-FDD-v1250 SEQUENCE (SIZE (1..maxUTRA-FDD-Carrier)) OF + CarrierFreqInfoUTRA-v1250 OPTIONAL, -- Cond UTRA-FDD + carrierFreqListUTRA-TDD-v1250 SEQUENCE (SIZE (1..maxUTRA-TDD-Carrier)) OF + CarrierFreqInfoUTRA-v1250 OPTIONAL, -- Cond UTRA-TDD + carrierFreqListUTRA-FDD-Ext-r12 CarrierFreqListUTRA-FDD-Ext-r12 OPTIONAL, -- Cond UTRA-FDD + carrierFreqListUTRA-TDD-Ext-r12 CarrierFreqListUTRA-TDD-Ext-r12 OPTIONAL -- Cond UTRA-TDD + ]] +} + +SystemInformationBlockType6-v8h0-IEs ::= SEQUENCE { + carrierFreqListUTRA-FDD-v8h0 SEQUENCE (SIZE (1..maxUTRA-FDD-Carrier)) OF CarrierFreqInfoUTRA-FDD-v8h0 OPTIONAL, -- Cond UTRA-FDD + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +CarrierFreqInfoUTRA-v1250 ::= SEQUENCE { + reducedMeasPerformance-r12 ENUMERATED {true} OPTIONAL -- Need OP +} + +CarrierFreqListUTRA-FDD ::= SEQUENCE (SIZE (1..maxUTRA-FDD-Carrier)) OF CarrierFreqUTRA-FDD + +CarrierFreqUTRA-FDD ::= SEQUENCE { + carrierFreq ARFCN-ValueUTRA, + cellReselectionPriority CellReselectionPriority OPTIONAL, -- Need OP + threshX-High ReselectionThreshold, + threshX-Low ReselectionThreshold, + q-RxLevMin INTEGER (-60..-13), + p-MaxUTRA INTEGER (-50..33), + q-QualMin INTEGER (-24..0), + ..., + [[ threshX-Q-r9 SEQUENCE { + threshX-HighQ-r9 ReselectionThresholdQ-r9, + threshX-LowQ-r9 ReselectionThresholdQ-r9 + } OPTIONAL -- Cond RSRQ + ]] +} + +CarrierFreqInfoUTRA-FDD-v8h0 ::= SEQUENCE { + multiBandInfoList SEQUENCE (SIZE (1..maxMultiBands)) OF FreqBandIndicator-UTRA-FDD OPTIONAL -- Need OR +} + +CarrierFreqListUTRA-FDD-Ext-r12 ::= SEQUENCE (SIZE (1..maxUTRA-FDD-Carrier)) OF + CarrierFreqUTRA-FDD-Ext-r12 + +CarrierFreqUTRA-FDD-Ext-r12 ::= SEQUENCE { + carrierFreq-r12 ARFCN-ValueUTRA, + cellReselectionPriority-r12 CellReselectionPriority OPTIONAL, -- Need OP + threshX-High-r12 ReselectionThreshold, + threshX-Low-r12 ReselectionThreshold, + q-RxLevMin-r12 INTEGER (-60..-13), + p-MaxUTRA-r12 INTEGER (-50..33), + q-QualMin-r12 INTEGER (-24..0), + threshX-Q-r12 SEQUENCE { + threshX-HighQ-r12 ReselectionThresholdQ-r9, + threshX-LowQ-r12 ReselectionThresholdQ-r9 + } OPTIONAL, -- Cond RSRQ + multiBandInfoList-r12 SEQUENCE (SIZE (1..maxMultiBands)) OF FreqBandIndicator-UTRA-FDD OPTIONAL, -- Need OR + reducedMeasPerformance-r12 ENUMERATED {true} OPTIONAL, -- Need OP + ... +} + +CarrierFreqListUTRA-TDD ::= SEQUENCE (SIZE (1..maxUTRA-TDD-Carrier)) OF CarrierFreqUTRA-TDD + +CarrierFreqUTRA-TDD ::= SEQUENCE { + carrierFreq ARFCN-ValueUTRA, + cellReselectionPriority CellReselectionPriority OPTIONAL, -- Need OP + threshX-High ReselectionThreshold, + threshX-Low ReselectionThreshold, + q-RxLevMin INTEGER (-60..-13), + p-MaxUTRA INTEGER (-50..33), + ... +} + +CarrierFreqListUTRA-TDD-Ext-r12 ::= SEQUENCE (SIZE (1..maxUTRA-TDD-Carrier)) OF + CarrierFreqUTRA-TDD-r12 + +CarrierFreqUTRA-TDD-r12 ::= SEQUENCE { + carrierFreq-r12 ARFCN-ValueUTRA, + cellReselectionPriority-r12 CellReselectionPriority OPTIONAL, -- Need OP + threshX-High-r12 ReselectionThreshold, + threshX-Low-r12 ReselectionThreshold, + q-RxLevMin-r12 INTEGER (-60..-13), + p-MaxUTRA-r12 INTEGER (-50..33), + reducedMeasPerformance-r12 ENUMERATED {true} OPTIONAL, -- Need OP + ... +} + +FreqBandIndicator-UTRA-FDD ::= INTEGER (1..86) + + +SystemInformationBlockType7 ::= SEQUENCE { + t-ReselectionGERAN T-Reselection, + t-ReselectionGERAN-SF SpeedStateScaleFactors OPTIONAL, -- Need OR + carrierFreqsInfoList CarrierFreqsInfoListGERAN OPTIONAL, -- Need OR + ..., + lateNonCriticalExtension OCTET STRING OPTIONAL +} + +CarrierFreqsInfoListGERAN ::= SEQUENCE (SIZE (1..maxGNFG)) OF CarrierFreqsInfoGERAN + +CarrierFreqsInfoGERAN ::= SEQUENCE { + carrierFreqs CarrierFreqsGERAN, + commonInfo SEQUENCE { + cellReselectionPriority CellReselectionPriority OPTIONAL, -- Need OP + ncc-Permitted BIT STRING (SIZE (8)), + q-RxLevMin INTEGER (0..45), + p-MaxGERAN INTEGER (0..39) OPTIONAL, -- Need OP + threshX-High ReselectionThreshold, + threshX-Low ReselectionThreshold + }, + ... +} + + +SystemInformationBlockType8 ::= SEQUENCE { + systemTimeInfo SystemTimeInfoCDMA2000 OPTIONAL, -- Need OR + searchWindowSize INTEGER (0..15) OPTIONAL, -- Need OR + parametersHRPD SEQUENCE { + preRegistrationInfoHRPD PreRegistrationInfoHRPD, + cellReselectionParametersHRPD CellReselectionParametersCDMA2000 OPTIONAL -- Need OR + } OPTIONAL, -- Need OR + parameters1XRTT SEQUENCE { + csfb-RegistrationParam1XRTT CSFB-RegistrationParam1XRTT OPTIONAL, -- Need OP + longCodeState1XRTT BIT STRING (SIZE (42)) OPTIONAL, -- Need OR + cellReselectionParameters1XRTT CellReselectionParametersCDMA2000 OPTIONAL -- Need OR + } OPTIONAL, -- Need OR + ..., + lateNonCriticalExtension OCTET STRING OPTIONAL, + [[ csfb-SupportForDualRxUEs-r9 BOOLEAN OPTIONAL, -- Need OR + cellReselectionParametersHRPD-v920 CellReselectionParametersCDMA2000-v920 OPTIONAL, -- Cond NCL-HRPD + cellReselectionParameters1XRTT-v920 CellReselectionParametersCDMA2000-v920 OPTIONAL, -- Cond NCL-1XRTT + csfb-RegistrationParam1XRTT-v920 CSFB-RegistrationParam1XRTT-v920 OPTIONAL, -- Cond REG-1XRTT + ac-BarringConfig1XRTT-r9 AC-BarringConfig1XRTT-r9 OPTIONAL -- Cond REG-1XRTT + ]], + [[ csfb-DualRxTxSupport-r10 ENUMERATED {true} OPTIONAL -- Cond REG-1XRTT + ]], + [[ sib8-PerPLMN-List-r11 SIB8-PerPLMN-List-r11 OPTIONAL -- Need OR + ]] +} + +CellReselectionParametersCDMA2000 ::= SEQUENCE { + bandClassList BandClassListCDMA2000, + neighCellList NeighCellListCDMA2000, + t-ReselectionCDMA2000 T-Reselection, + t-ReselectionCDMA2000-SF SpeedStateScaleFactors OPTIONAL -- Need OP +} + +CellReselectionParametersCDMA2000-r11 ::= SEQUENCE { + bandClassList BandClassListCDMA2000, + neighCellList-r11 SEQUENCE (SIZE (1..16)) OF NeighCellCDMA2000-r11, + t-ReselectionCDMA2000 T-Reselection, + t-ReselectionCDMA2000-SF SpeedStateScaleFactors OPTIONAL -- Need OP +} + +CellReselectionParametersCDMA2000-v920 ::= SEQUENCE { + neighCellList-v920 NeighCellListCDMA2000-v920 +} + +NeighCellListCDMA2000 ::= SEQUENCE (SIZE (1..16)) OF NeighCellCDMA2000 + +NeighCellCDMA2000 ::= SEQUENCE { + bandClass BandclassCDMA2000, + neighCellsPerFreqList NeighCellsPerBandclassListCDMA2000 +} + +NeighCellCDMA2000-r11 ::= SEQUENCE { + bandClass BandclassCDMA2000, + neighFreqInfoList-r11 SEQUENCE (SIZE (1..16)) OF NeighCellsPerBandclassCDMA2000-r11 +} + +NeighCellsPerBandclassListCDMA2000 ::= SEQUENCE (SIZE (1..16)) OF NeighCellsPerBandclassCDMA2000 + +NeighCellsPerBandclassCDMA2000 ::= SEQUENCE { + arfcn ARFCN-ValueCDMA2000, + physCellIdList PhysCellIdListCDMA2000 +} + +NeighCellsPerBandclassCDMA2000-r11 ::= SEQUENCE { + arfcn ARFCN-ValueCDMA2000, + physCellIdList-r11 SEQUENCE (SIZE (1..40)) OF PhysCellIdCDMA2000 +} + +NeighCellListCDMA2000-v920 ::= SEQUENCE (SIZE (1..16)) OF NeighCellCDMA2000-v920 + +NeighCellCDMA2000-v920 ::= SEQUENCE { + neighCellsPerFreqList-v920 NeighCellsPerBandclassListCDMA2000-v920 +} + +NeighCellsPerBandclassListCDMA2000-v920 ::= SEQUENCE (SIZE (1..16)) OF NeighCellsPerBandclassCDMA2000-v920 + +NeighCellsPerBandclassCDMA2000-v920 ::= SEQUENCE { + physCellIdList-v920 PhysCellIdListCDMA2000-v920 +} + +PhysCellIdListCDMA2000 ::= SEQUENCE (SIZE (1..16)) OF PhysCellIdCDMA2000 + +PhysCellIdListCDMA2000-v920 ::= SEQUENCE (SIZE (0..24)) OF PhysCellIdCDMA2000 + +BandClassListCDMA2000 ::= SEQUENCE (SIZE (1..maxCDMA-BandClass)) OF BandClassInfoCDMA2000 + +BandClassInfoCDMA2000 ::= SEQUENCE { + bandClass BandclassCDMA2000, + cellReselectionPriority CellReselectionPriority OPTIONAL, -- Need OP + threshX-High INTEGER (0..63), + threshX-Low INTEGER (0..63), + ... +} + +AC-BarringConfig1XRTT-r9 ::= SEQUENCE { + ac-Barring0to9-r9 INTEGER (0..63), + ac-Barring10-r9 INTEGER (0..7), + ac-Barring11-r9 INTEGER (0..7), + ac-Barring12-r9 INTEGER (0..7), + ac-Barring13-r9 INTEGER (0..7), + ac-Barring14-r9 INTEGER (0..7), + ac-Barring15-r9 INTEGER (0..7), + ac-BarringMsg-r9 INTEGER (0..7), + ac-BarringReg-r9 INTEGER (0..7), + ac-BarringEmg-r9 INTEGER (0..7) +} + +SIB8-PerPLMN-List-r11 ::= SEQUENCE (SIZE (1..maxPLMN-r11)) OF SIB8-PerPLMN-r11 + +SIB8-PerPLMN-r11 ::= SEQUENCE { + plmn-Identity-r11 INTEGER (1..maxPLMN-r11), + parametersCDMA2000-r11 CHOICE { + explicitValue ParametersCDMA2000-r11, + defaultValue NULL + } +} + +ParametersCDMA2000-r11 ::= SEQUENCE { + systemTimeInfo-r11 CHOICE { + explicitValue SystemTimeInfoCDMA2000, + defaultValue NULL + } OPTIONAL, -- Need OR + searchWindowSize-r11 INTEGER (0..15), + parametersHRPD-r11 SEQUENCE { + preRegistrationInfoHRPD-r11 PreRegistrationInfoHRPD, + cellReselectionParametersHRPD-r11 CellReselectionParametersCDMA2000-r11 OPTIONAL -- Need OR + } OPTIONAL, -- Need OR + parameters1XRTT-r11 SEQUENCE { + csfb-RegistrationParam1XRTT-r11 CSFB-RegistrationParam1XRTT OPTIONAL, -- Need OP + csfb-RegistrationParam1XRTT-Ext-r11 CSFB-RegistrationParam1XRTT-v920 OPTIONAL, -- Cond REG-1XRTT-PerPLMN + longCodeState1XRTT-r11 BIT STRING (SIZE (42)) OPTIONAL, -- Cond PerPLMN-LC + cellReselectionParameters1XRTT-r11 CellReselectionParametersCDMA2000-r11 OPTIONAL, -- Need OR + ac-BarringConfig1XRTT-r11 AC-BarringConfig1XRTT-r9 OPTIONAL, -- Cond REG-1XRTT-PerPLMN + csfb-SupportForDualRxUEs-r11 BOOLEAN OPTIONAL, -- Need OR + csfb-DualRxTxSupport-r11 ENUMERATED {true} OPTIONAL -- Cond REG-1XRTT-PerPLMN + } OPTIONAL, -- Need OR + ... +} + + +SystemInformationBlockType9 ::= SEQUENCE { + hnb-Name OCTET STRING (SIZE(1..48)) OPTIONAL, -- Need OR + ..., + lateNonCriticalExtension OCTET STRING OPTIONAL +} + + +SystemInformationBlockType10 ::= SEQUENCE { + messageIdentifier BIT STRING (SIZE (16)), + serialNumber BIT STRING (SIZE (16)), + warningType OCTET STRING (SIZE (2)), + dummy OCTET STRING (SIZE (50)) OPTIONAL, -- Need OP + ..., + lateNonCriticalExtension OCTET STRING OPTIONAL +} + + +SystemInformationBlockType11 ::= SEQUENCE { + messageIdentifier BIT STRING (SIZE (16)), + serialNumber BIT STRING (SIZE (16)), + warningMessageSegmentType ENUMERATED {notLastSegment, lastSegment}, + warningMessageSegmentNumber INTEGER (0..63), + warningMessageSegment OCTET STRING, + dataCodingScheme OCTET STRING (SIZE (1)) OPTIONAL, -- Cond Segment1 + ..., + lateNonCriticalExtension OCTET STRING OPTIONAL +} + + +SystemInformationBlockType12-r9 ::= SEQUENCE { + messageIdentifier-r9 BIT STRING (SIZE (16)), + serialNumber-r9 BIT STRING (SIZE (16)), + warningMessageSegmentType-r9 ENUMERATED {notLastSegment, lastSegment}, + warningMessageSegmentNumber-r9 INTEGER (0..63), + warningMessageSegment-r9 OCTET STRING, + dataCodingScheme-r9 OCTET STRING (SIZE (1)) OPTIONAL, -- Cond Segment1 + lateNonCriticalExtension OCTET STRING OPTIONAL, + ..., + [[ warningAreaCoordinatesSegment-r15 OCTET STRING OPTIONAL -- Need OR + ]] +} + + +SystemInformationBlockType13-r9 ::= SEQUENCE { + mbsfn-AreaInfoList-r9 MBSFN-AreaInfoList-r9, + notificationConfig-r9 MBMS-NotificationConfig-r9, + lateNonCriticalExtension OCTET STRING OPTIONAL, + ..., + [[ + notificationConfig-v1430 MBMS-NotificationConfig-v1430 OPTIONAL + ]] +} + + +SystemInformationBlockType14-r11 ::= SEQUENCE { + eab-Param-r11 CHOICE { + eab-Common-r11 EAB-Config-r11, + eab-PerPLMN-List-r11 SEQUENCE (SIZE (1..maxPLMN-r11)) OF EAB-ConfigPLMN-r11 + } OPTIONAL, -- Need OR + lateNonCriticalExtension OCTET STRING OPTIONAL, + ..., + [[ eab-PerRSRP-r15 ENUMERATED {thresh0, thresh1, thresh2, thresh3} OPTIONAL -- Need OR + ]] +} + +EAB-ConfigPLMN-r11 ::= SEQUENCE { + eab-Config-r11 EAB-Config-r11 OPTIONAL -- Need OR +} + +EAB-Config-r11 ::= SEQUENCE { + eab-Category-r11 ENUMERATED {a, b, c}, + eab-BarringBitmap-r11 BIT STRING (SIZE (10)) +} + + +SystemInformationBlockType15-r11 ::= SEQUENCE { + mbms-SAI-IntraFreq-r11 MBMS-SAI-List-r11 OPTIONAL, -- Need OR + mbms-SAI-InterFreqList-r11 MBMS-SAI-InterFreqList-r11 OPTIONAL, -- Need OR + lateNonCriticalExtension OCTET STRING OPTIONAL, + ..., + [[ mbms-SAI-InterFreqList-v1140 MBMS-SAI-InterFreqList-v1140 OPTIONAL -- Cond InterFreq + ]], + [[ mbms-IntraFreqCarrierType-r14 MBMS-CarrierType-r14 OPTIONAL, -- Need OR + mbms-InterFreqCarrierTypeList-r14 + MBMS-InterFreqCarrierTypeList-r14 OPTIONAL -- Need OR + ]] +} + +MBMS-SAI-List-r11 ::= SEQUENCE (SIZE (1..maxSAI-MBMS-r11)) OF MBMS-SAI-r11 + +MBMS-SAI-r11 ::= INTEGER (0..65535) + +MBMS-SAI-InterFreqList-r11 ::= SEQUENCE (SIZE (1..maxFreq)) OF MBMS-SAI-InterFreq-r11 + +MBMS-SAI-InterFreqList-v1140 ::= SEQUENCE (SIZE (1..maxFreq)) OF MBMS-SAI-InterFreq-v1140 + +MBMS-SAI-InterFreq-r11 ::= SEQUENCE { + dl-CarrierFreq-r11 ARFCN-ValueEUTRA-r9, + mbms-SAI-List-r11 MBMS-SAI-List-r11 +} + +MBMS-SAI-InterFreq-v1140 ::= SEQUENCE { + multiBandInfoList-r11 MultiBandInfoList-r11 OPTIONAL -- Need OR +} + +MBMS-InterFreqCarrierTypeList-r14 ::= SEQUENCE (SIZE (1..maxFreq)) OF MBMS-CarrierType-r14 + +MBMS-CarrierType-r14 ::= SEQUENCE { + carrierType-r14 ENUMERATED {mbms, fembmsMixed, fembmsDedicated}, + frameOffset-r14 INTEGER (0..3) OPTIONAL -- Need OR +} + + +SystemInformationBlockType16-r11 ::= SEQUENCE { + timeInfo-r11 SEQUENCE { + timeInfoUTC-r11 INTEGER (0..549755813887), + dayLightSavingTime-r11 BIT STRING (SIZE (2)) OPTIONAL, -- Need OR + leapSeconds-r11 INTEGER (-127..128) OPTIONAL, -- Need OR + localTimeOffset-r11 INTEGER (-63..64) OPTIONAL -- Need OR + } OPTIONAL, -- Need OR + lateNonCriticalExtension OCTET STRING OPTIONAL, + ..., + [[ timeReferenceInfo-r15 TimeReferenceInfo-r15 OPTIONAL -- Need OR + ]] +} + + +SystemInformationBlockType17-r12 ::= SEQUENCE { + wlan-OffloadInfoPerPLMN-List-r12 SEQUENCE (SIZE (1..maxPLMN-r11)) OF + WLAN-OffloadInfoPerPLMN-r12 OPTIONAL, -- Need OR + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +WLAN-OffloadInfoPerPLMN-r12 ::= SEQUENCE { + wlan-OffloadConfigCommon-r12 WLAN-OffloadConfig-r12 OPTIONAL, -- Need OR + wlan-Id-List-r12 WLAN-Id-List-r12 OPTIONAL, -- Need OR + ... +} + +WLAN-Id-List-r12 ::= SEQUENCE (SIZE (1..maxWLAN-Id-r12)) OF WLAN-Identifiers-r12 + +WLAN-Identifiers-r12 ::= SEQUENCE { + ssid-r12 OCTET STRING (SIZE (1..32)) OPTIONAL, -- Need OR + bssid-r12 OCTET STRING (SIZE (6)) OPTIONAL, -- Need OR + hessid-r12 OCTET STRING (SIZE (6)) OPTIONAL, -- Need OR + ... +} + + +SystemInformationBlockType18-r12 ::= SEQUENCE { + commConfig-r12 SEQUENCE { + commRxPool-r12 SL-CommRxPoolList-r12, + commTxPoolNormalCommon-r12 SL-CommTxPoolList-r12 OPTIONAL, -- Need OR + commTxPoolExceptional-r12 SL-CommTxPoolList-r12 OPTIONAL, -- Need OR + commSyncConfig-r12 SL-SyncConfigList-r12 OPTIONAL -- Need OR + } OPTIONAL, -- Need OR + lateNonCriticalExtension OCTET STRING OPTIONAL, + ..., + [[ commTxPoolNormalCommonExt-r13 SL-CommTxPoolListExt-r13 OPTIONAL, -- Need OR + commTxResourceUC-ReqAllowed-r13 ENUMERATED {true} OPTIONAL, -- Need OR + commTxAllowRelayCommon-r13 ENUMERATED {true} OPTIONAL -- Need OR + ]] +} + + +SystemInformationBlockType19-r12 ::= SEQUENCE { + discConfig-r12 SEQUENCE { + discRxPool-r12 SL-DiscRxPoolList-r12, + discTxPoolCommon-r12 SL-DiscTxPoolList-r12 OPTIONAL, -- Need OR + discTxPowerInfo-r12 SL-DiscTxPowerInfoList-r12 OPTIONAL, -- Cond Tx + discSyncConfig-r12 SL-SyncConfigList-r12 OPTIONAL -- Need OR + } OPTIONAL, -- Need OR + discInterFreqList-r12 SL-CarrierFreqInfoList-r12 OPTIONAL, -- Need OR + lateNonCriticalExtension OCTET STRING OPTIONAL, + ..., + [[ discConfig-v1310 SEQUENCE { + discInterFreqList-v1310 SL-CarrierFreqInfoList-v1310 OPTIONAL, -- Need OR + gapRequestsAllowedCommon ENUMERATED {true} OPTIONAL -- Need OR + } OPTIONAL, -- Need OR + discConfigRelay-r13 SEQUENCE { + relayUE-Config-r13 SL-DiscConfigRelayUE-r13, + remoteUE-Config-r13 SL-DiscConfigRemoteUE-r13 + } OPTIONAL, -- Need OR + discConfigPS-13 SEQUENCE { + discRxPoolPS-r13 SL-DiscRxPoolList-r12, + discTxPoolPS-Common-r13 SL-DiscTxPoolList-r12 OPTIONAL -- Need OR + } OPTIONAL -- Need OR + ]] +} + +SL-CarrierFreqInfoList-r12 ::= SEQUENCE (SIZE (1..maxFreq)) OF SL-CarrierFreqInfo-r12 + +SL-CarrierFreqInfoList-v1310 ::= SEQUENCE (SIZE (1..maxFreq)) OF SL-CarrierFreqInfo-v1310 + +SL-CarrierFreqInfo-r12::= SEQUENCE { + carrierFreq-r12 ARFCN-ValueEUTRA-r9, + plmn-IdentityList-r12 PLMN-IdentityList4-r12 OPTIONAL -- Need OP +} + +SL-DiscConfigRelayUE-r13 ::= SEQUENCE { + threshHigh-r13 RSRP-RangeSL4-r13 OPTIONAL, -- Need OR + threshLow-r13 RSRP-RangeSL4-r13 OPTIONAL, -- Need OR + hystMax-r13 ENUMERATED {dB0, dB3, dB6, dB9, dB12, dBinf} OPTIONAL, -- Cond ThreshHigh + hystMin-r13 ENUMERATED {dB0, dB3, dB6, dB9, dB12} OPTIONAL -- Cond ThreshLow +} + +SL-DiscConfigRemoteUE-r13 ::= SEQUENCE { + threshHigh-r13 RSRP-RangeSL4-r13 OPTIONAL, -- Need OR + hystMax-r13 ENUMERATED {dB0, dB3, dB6, dB9, dB12} OPTIONAL, -- Cond ThreshHigh + reselectionInfoIC-r13 ReselectionInfoRelay-r13 +} + +ReselectionInfoRelay-r13 ::= SEQUENCE { + q-RxLevMin-r13 Q-RxLevMin, + -- Note that the mapping of invidual values may be different for PC5, but the granularity/ + -- number of values is same as for Uu + filterCoefficient-r13 FilterCoefficient, + minHyst-r13 ENUMERATED {dB0, dB3, + dB6, dB9, dB12, dBinf} OPTIONAL -- Need OR +} + +SL-CarrierFreqInfo-v1310::= SEQUENCE { + discResourcesNonPS-r13 SL-ResourcesInterFreq-r13 OPTIONAL, -- Need OR + discResourcesPS-r13 SL-ResourcesInterFreq-r13 OPTIONAL, -- Need OR + discConfigOther-r13 SL-DiscConfigOtherInterFreq-r13 OPTIONAL, -- Need OR + ... +} + +PLMN-IdentityList4-r12 ::= SEQUENCE (SIZE (1..maxPLMN-r11)) OF PLMN-IdentityInfo2-r12 + +PLMN-IdentityInfo2-r12 ::= CHOICE { + plmn-Index-r12 INTEGER (1..maxPLMN-r11), + plmnIdentity-r12 PLMN-Identity +} + +SL-DiscTxResourcesInterFreq-r13 ::= CHOICE { + acquireSI-FromCarrier-r13 NULL, + discTxPoolCommon-r13 SL-DiscTxPoolList-r12, + requestDedicated-r13 NULL, + noTxOnCarrier-r13 NULL +} + +SL-DiscConfigOtherInterFreq-r13::= SEQUENCE { + txPowerInfo-r13 SL-DiscTxPowerInfoList-r12 OPTIONAL, -- Cond Tx + refCarrierCommon-r13 ENUMERATED {pCell} OPTIONAL, -- Need OR + discSyncConfig-r13 SL-SyncConfigListNFreq-r13 OPTIONAL, -- Need OR + discCellSelectionInfo-r13 CellSelectionInfoNFreq-r13 OPTIONAL -- Need OR +} + +SL-ResourcesInterFreq-r13 ::= SEQUENCE { + discRxResourcesInterFreq-r13 SL-DiscRxPoolList-r12 OPTIONAL, -- Need OR + discTxResourcesInterFreq-r13 SL-DiscTxResourcesInterFreq-r13 OPTIONAL -- Need OR +} + + +SystemInformationBlockType20-r13 ::= SEQUENCE { + sc-mcch-RepetitionPeriod-r13 ENUMERATED {rf2, rf4, rf8, rf16, rf32, rf64, rf128, rf256}, + sc-mcch-Offset-r13 INTEGER (0..10), + sc-mcch-FirstSubframe-r13 INTEGER (0..9), + sc-mcch-duration-r13 INTEGER (2..9) OPTIONAL, + sc-mcch-ModificationPeriod-r13 ENUMERATED {rf2, rf4, rf8, rf16, rf32, rf64, rf128, rf256, + rf512, rf1024, r2048, rf4096, rf8192, rf16384, rf32768, rf65536}, + lateNonCriticalExtension OCTET STRING OPTIONAL, + ..., + [[ br-BCCH-Config-r14 SEQUENCE { + dummy ENUMERATED {rf1}, + dummy2 ENUMERATED {rf1}, + mpdcch-Narrowband-SC-MCCH-r14 INTEGER (1..maxAvailNarrowBands-r13), + mpdcch-NumRepetition-SC-MCCH-r14 ENUMERATED {r1, r2, r4, r8, r16, + r32, r64, r128, r256}, + mpdcch-StartSF-SC-MCCH-r14 CHOICE { + fdd-r14 ENUMERATED {v1, v1dot5, v2, v2dot5, v4, + v5, v8, v10}, + tdd-r14 ENUMERATED {v1, v2, v4, v5, v8, v10, v20} + }, + mpdcch-PDSCH-HoppingConfig-SC-MCCH-r14 ENUMERATED {off, ce-ModeA, ce-ModeB}, + sc-mcch-CarrierFreq-r14 ARFCN-ValueEUTRA-r9, + sc-mcch-Offset-BR-r14 INTEGER (0..10), + sc-mcch-RepetitionPeriod-BR-r14 ENUMERATED {rf32, rf128, rf512, rf1024, + rf2048, rf4096, rf8192, rf16384}, + sc-mcch-ModificationPeriod-BR-r14 ENUMERATED { rf32, rf128, rf256, rf512, rf1024, + rf2048, rf4096, rf8192, rf16384, rf32768, + rf65536, rf131072, rf262144, rf524288, + rf1048576} + } OPTIONAL, -- Need OR + sc-mcch-SchedulingInfo-r14 SC-MCCH-SchedulingInfo-r14 OPTIONAL, -- Need OP + pdsch-maxNumRepetitionCEmodeA-SC-MTCH-r14 + ENUMERATED { r16, r32 } OPTIONAL, -- Need OR + pdsch-maxNumRepetitionCEmodeB-SC-MTCH-r14 + ENUMERATED { + r192, r256, r384, r512, r768, r1024, + r1536, r2048} OPTIONAL -- Need OR + ]], + [[ sc-mcch-RepetitionPeriod-v1470 ENUMERATED {rf1} OPTIONAL, -- Need OR + sc-mcch-ModificationPeriod-v1470 ENUMERATED {rf1} OPTIONAL -- Need OR + ]] +} + +SC-MCCH-SchedulingInfo-r14::= SEQUENCE { + onDurationTimerSCPTM-r14 ENUMERATED {psf10, psf20, psf100, psf300, + psf500, psf1000, psf1200, psf1600}, + drx-InactivityTimerSCPTM-r14 ENUMERATED {psf0, psf1, psf2, psf4, psf8, psf16, + psf32, psf64, psf128, psf256, ps512, + psf1024, psf2048, psf4096, psf8192, psf16384}, + schedulingPeriodStartOffsetSCPTM-r14 CHOICE { + sf10 INTEGER(0..9), + sf20 INTEGER(0..19), + sf32 INTEGER(0..31), + sf40 INTEGER(0..39), + sf64 INTEGER(0..63), + sf80 INTEGER(0..79), + sf128 INTEGER(0..127), + sf160 INTEGER(0..159), + sf256 INTEGER(0..255), + sf320 INTEGER(0..319), + sf512 INTEGER(0..511), + sf640 INTEGER(0..639), + sf1024 INTEGER(0..1023), + sf2048 INTEGER(0..2047), + sf4096 INTEGER(0..4095), + sf8192 INTEGER(0..8191) + }, + ... +} + + +SystemInformationBlockType21-r14 ::= SEQUENCE { + sl-V2X-ConfigCommon-r14 SL-V2X-ConfigCommon-r14 OPTIONAL, -- Need OR + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +SL-V2X-ConfigCommon-r14 ::= SEQUENCE { + v2x-CommRxPool-r14 SL-CommRxPoolListV2X-r14 OPTIONAL, -- Need OR + v2x-CommTxPoolNormalCommon-r14 SL-CommTxPoolListV2X-r14 OPTIONAL, -- Need OR + p2x-CommTxPoolNormalCommon-r14 SL-CommTxPoolListV2X-r14 OPTIONAL, -- Need OR + v2x-CommTxPoolExceptional-r14 SL-CommResourcePoolV2X-r14 OPTIONAL, -- Need OR + v2x-SyncConfig-r14 SL-SyncConfigListV2X-r14 OPTIONAL, -- Need OR + v2x-InterFreqInfoList-r14 SL-InterFreqInfoListV2X-r14 OPTIONAL, -- Need OR + v2x-ResourceSelectionConfig-r14 SL-CommTxPoolSensingConfig-r14 OPTIONAL, -- Need OR + zoneConfig-r14 SL-ZoneConfig-r14 OPTIONAL, -- Need OR + typeTxSync-r14 SL-TypeTxSync-r14 OPTIONAL, -- Need OR + thresSL-TxPrioritization-r14 SL-Priority-r13 OPTIONAL, -- Need OR + anchorCarrierFreqList-r14 SL-AnchorCarrierFreqList-V2X-r14 OPTIONAL, -- Need OR + offsetDFN-r14 INTEGER (0..1000) OPTIONAL, -- Need OR + cbr-CommonTxConfigList-r14 SL-CBR-CommonTxConfigList-r14 OPTIONAL -- Need OR +} + + + +SystemInformationBlockType24-r15 ::= SEQUENCE { + carrierFreqListNR-r15 CarrierFreqListNR-r15 OPTIONAL, -- Need OR + t-ReselectionNR-r15 T-Reselection, + t-ReselectionNR-SF-r15 SpeedStateScaleFactors OPTIONAL, -- Need OR + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +CarrierFreqListNR-r15 ::= SEQUENCE (SIZE (1..maxFreq)) OF CarrierFreqNR-r15 + +CarrierFreqNR-r15 ::= SEQUENCE { + carrierFreq-r15 ARFCN-ValueNR-r15, + multiBandInfoList-r15 MultiFrequencyBandListNR-r15 OPTIONAL, -- Need OR + multiBandInfoListSUL-r15 MultiFrequencyBandListNR-r15 OPTIONAL, -- Need OR + measTimingConfig-r15 MTC-SSB-NR-r15 OPTIONAL, -- Need OR + subcarrierSpacingSSB-r15 ENUMERATED {kHz15, kHz30, kHz120, kHz240}, + ss-RSSI-Measurement-r15 SS-RSSI-Measurement-r15 OPTIONAL, -- Cond RSRQ2 + cellReselectionPriority-r15 CellReselectionPriority OPTIONAL, -- Need OP + cellReselectionSubPriority-r15 CellReselectionSubPriority-r13 OPTIONAL, -- Need OR + threshX-High-r15 ReselectionThreshold, + threshX-Low-r15 ReselectionThreshold, + threshX-Q-r15 SEQUENCE { + threshX-HighQ-r15 ReselectionThresholdQ-r9, + threshX-LowQ-r15 ReselectionThresholdQ-r9 + } OPTIONAL, -- Cond RSRQ + q-RxLevMin-r15 INTEGER (-70..-22), + q-RxLevMinSUL-r15 INTEGER (-70..-22) OPTIONAL, -- Need OR + p-MaxNR-r15 P-MaxNR-r15, + ns-PmaxListNR-r15 NS-PmaxListNR-r15 OPTIONAL, -- Need OR + q-QualMin-r15 Q-QualMin-r9 OPTIONAL, -- Need OP + deriveSSB-IndexFromCell-r15 BOOLEAN, + maxRS-IndexCellQual-r15 MaxRS-IndexCellQualNR-r15 OPTIONAL, -- Need OR + threshRS-Index-r15 ThresholdListNR-r15 OPTIONAL, -- Need OR + ... +} + + +SystemInformationBlockType25-r15 ::= SEQUENCE { + uac-BarringForCommon-r15 UAC-BarringPerCatList-r15 OPTIONAL, + uac-BarringPerPLMN-List-r15 UAC-BarringPerPLMN-List-r15 OPTIONAL, + uac-BarringInfoSetList-r15 UAC-BarringInfoSetList-r15, + uac-AC1-SelectAssistInfo-r15 CHOICE { + plmnCommon-r15 UAC-AC1-SelectAssistInfo-r15, + individualPLMNList-r15 SEQUENCE (SIZE (2..maxPLMN-r11)) OF UAC-AC1-SelectAssistInfo-r15 + } OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +UAC-BarringPerPLMN-List-r15::= SEQUENCE (SIZE (1.. maxPLMN-r11)) OF UAC-BarringPerPLMN-r15 + +UAC-BarringPerPLMN-r15 ::= SEQUENCE { + plmn-IdentityIndex-r15 INTEGER (1.. maxPLMN-r11), + uac-AC-BarringListType-r15 CHOICE{ + uac-ImplicitAC-BarringList-r15 SEQUENCE (SIZE(maxAccessCat-1-r15)) OF UAC-BarringInfoSetIndex-r15, + uac-ExplicitAC-BarringList-r15 UAC-BarringPerCatList-r15 + } OPTIONAL +} + +UAC-BarringPerCatList-r15 ::= SEQUENCE (SIZE (1..maxAccessCat-1-r15)) OF UAC-BarringPerCat-r15 + +UAC-BarringPerCat-r15 ::= SEQUENCE { + accessCategory-r15 INTEGER (1..maxAccessCat-1-r15), + uac-barringInfoSetIndex-r15 UAC-BarringInfoSetIndex-r15 +} + +UAC-BarringInfoSetIndex-r15 ::= INTEGER (1..maxBarringInfoSet-r15) +UAC-BarringInfoSetList-r15 ::= SEQUENCE (SIZE (1..maxBarringInfoSet-r15)) OF UAC-BarringInfoSet-r15 + + +UAC-BarringInfoSet-r15 ::= SEQUENCE { + uac-BarringFactor-r15 ENUMERATED { + p00, p05, p10, p15, p20, p25, p30, p40, + p50, p60, p70, p75, p80, p85, p90, p95}, + uac-BarringTime-r15 ENUMERATED {s4, s8, s16, s32, s64, s128, s256, s512}, + uac-BarringForAccessIdentity-r15 BIT STRING (SIZE(7)) +} + +UAC-AC1-SelectAssistInfo-r15::= ENUMERATED {a, b, c} + + +SystemInformationBlockType26-r15 ::= SEQUENCE { + v2x-InterFreqInfoList-r15 SL-InterFreqInfoListV2X-r14 OPTIONAL, -- Need OR + cbr-pssch-TxConfigList-r15 SL-CBR-PPPP-TxConfigList-r15 OPTIONAL, -- Need OR + v2x-PacketDuplicationConfig-r15 SL-V2X-PacketDuplicationConfig-r15 OPTIONAL, -- Need OR + syncFreqList-r15 SL-V2X-SyncFreqList-r15 OPTIONAL, -- Need OR + slss-TxMultiFreq-r15 ENUMERATED{true} OPTIONAL, -- Need OR + v2x-FreqSelectionConfigList-r15 SL-V2X-FreqSelectionConfigList-r15 OPTIONAL, -- Need OR + threshS-RSSI-CBR-r14 INTEGER (0..45) OPTIONAL, -- Need OR + ... +} + + +AntennaInfoCommon ::= SEQUENCE { + antennaPortsCount ENUMERATED {an1, an2, an4, spare1} +} + +AntennaInfoDedicated ::= SEQUENCE { + transmissionMode ENUMERATED { + tm1, tm2, tm3, tm4, tm5, tm6, + tm7, tm8-v920}, + codebookSubsetRestriction CHOICE { + n2TxAntenna-tm3 BIT STRING (SIZE (2)), + n4TxAntenna-tm3 BIT STRING (SIZE (4)), + n2TxAntenna-tm4 BIT STRING (SIZE (6)), + n4TxAntenna-tm4 BIT STRING (SIZE (64)), + n2TxAntenna-tm5 BIT STRING (SIZE (4)), + n4TxAntenna-tm5 BIT STRING (SIZE (16)), + n2TxAntenna-tm6 BIT STRING (SIZE (4)), + n4TxAntenna-tm6 BIT STRING (SIZE (16)) + } OPTIONAL, -- Cond TM + ue-TransmitAntennaSelection CHOICE{ + release NULL, + setup ENUMERATED {closedLoop, openLoop} + } +} + +AntennaInfoDedicated-v920 ::= SEQUENCE { + codebookSubsetRestriction-v920 CHOICE { + n2TxAntenna-tm8-r9 BIT STRING (SIZE (6)), + n4TxAntenna-tm8-r9 BIT STRING (SIZE (32)) + } OPTIONAL -- Cond TM8 +} + +AntennaInfoDedicated-r10 ::= SEQUENCE { + transmissionMode-r10 ENUMERATED { + tm1, tm2, tm3, tm4, tm5, tm6, tm7, tm8-v920, + tm9-v1020, tm10-v1130, spare6, spare5, spare4, + spare3, spare2, spare1}, + codebookSubsetRestriction-r10 BIT STRING OPTIONAL, -- Cond TMX + ue-TransmitAntennaSelection CHOICE{ + release NULL, + setup ENUMERATED {closedLoop, openLoop} + } +} + +AntennaInfoDedicated-v10i0::= SEQUENCE { + maxLayersMIMO-r10 ENUMERATED {twoLayers, fourLayers, eightLayers} OPTIONAL -- Need OR +} + +AntennaInfoDedicated-v1250 ::= SEQUENCE { + alternativeCodebookEnabledFor4TX-r12 BOOLEAN +} + +AntennaInfoDedicated-v1430 ::= SEQUENCE { + ce-UE-TxAntennaSelection-config-r14 ENUMERATED {on} OPTIONAL -- Need OR +} + +AntennaInfoDedicatedSTTI-r15 ::= CHOICE { + release NULL, + setup SEQUENCE { + transmissionModeDL-MBSFN-r15 ENUMERATED {tm9, tm10} OPTIONAL, -- Need OR + transmissionModeDL-nonMBSFN-r15 ENUMERATED {tm1, tm2, tm3, tm4, tm6, tm8, tm9, + tm10} OPTIONAL, --_Need OR + codebookSubsetRestriction CHOICE { + n2TxAntenna-tm3-r15 BIT STRING (SIZE (2)), + n4TxAntenna-tm3-r15 BIT STRING (SIZE (4)), + n2TxAntenna-tm4-r15 BIT STRING (SIZE (6)), + n4TxAntenna-tm4-r15 BIT STRING (SIZE (64)), + n2TxAntenna-tm5-r15 BIT STRING (SIZE (4)), + n4TxAntenna-tm5-r15 BIT STRING (SIZE (16)), + n2TxAntenna-tm6-r15 BIT STRING (SIZE (4)), + n4TxAntenna-tm6-r15 BIT STRING (SIZE (16)), + n2TxAntenna-tm8-r15 BIT STRING (SIZE (6)), + n4TxAntenna-tm8-r15 BIT STRING (SIZE (64)), + n2TxAntenna-tm9and10-r15 BIT STRING (SIZE (6)), + n4TxAntenna-tm9and10-r15 BIT STRING (SIZE (96)), + n8TxAntenna-tm9and10-r15 BIT STRING (SIZE (109)) + } OPTIONAL, -- Cond TM + maxLayersMIMO-STTI-r15 ENUMERATED {twoLayers, fourLayers} OPTIONAL, -- Need OR + slotSubslotPDSCH-TxDiv-2Layer-r15 BOOLEAN, + slotSubslotPDSCH-TxDiv-4Layer-r15 BOOLEAN + } +} + +AntennaInfoDedicated-v1530 ::= CHOICE { + release NULL, + setup CHOICE { + ue-TxAntennaSelection-SRS-1T4R-Config-r15 NULL, + ue-TxAntennaSelection-SRS-2T4R-NrOfPairs-r15 ENUMERATED {two, three} + } +} + + +AntennaInfoUL-r10 ::= SEQUENCE { + transmissionModeUL-r10 ENUMERATED {tm1, tm2, spare6, spare5, + spare4, spare3, spare2, spare1} OPTIONAL, -- Need OR + fourAntennaPortActivated-r10 ENUMERATED {setup} OPTIONAL -- Need OR +} + +AntennaInfoUL-STTI-r15 ::= SEQUENCE { + transmissionModeUL-STTI-r15 ENUMERATED {tm1, tm2} OPTIONAL -- Need OR +} + + +AUL-Config-r15 ::= CHOICE { + release NULL, + setup SEQUENCE { + aul-CRNTI-r15 C-RNTI, + aul-Subframes-r15 BIT STRING (SIZE (40)), + aul-HARQ-Processes-r15 INTEGER (1..16), + transmissionModeUL-AUL-r15 ENUMERATED {tm1,tm2}, + aul-StartingFullBW-InsideMCOT-r15 BIT STRING (SIZE (5)), + aul-StartingFullBW-OutsideMCOT-r15 BIT STRING (SIZE (7)), + aul-StartingPartialBW-InsideMCOT-r15 ENUMERATED {o34, o43, o52, o61, oOS1}, + aul-StartingPartialBW-OutsideMCOT-r15 ENUMERATED {o16, o25, o34, o43, o52, o61, oOS1}, + aul-RetransmissionTimer-r15 ENUMERATED {psf4, psf5, psf6, psf8, psf10, psf12, psf20, psf28, psf37, psf44, psf68, psf84, psf100, + psf116, psf132, psf164, psf324}, + endingSymbolAUL-r15 INTEGER(12..13), + subframeOffsetCOT-Sharing-r15 INTEGER(2..4), + contentionWindowSizeTimer-r15 ENUMERATED {n0, n5, n10} + } +} + + +CQI-ReportAperiodic-r10 ::= CHOICE { + release NULL, + setup SEQUENCE { + cqi-ReportModeAperiodic-r10 CQI-ReportModeAperiodic, + aperiodicCSI-Trigger-r10 SEQUENCE { + trigger1-r10 BIT STRING (SIZE (8)), + trigger2-r10 BIT STRING (SIZE (8)) + } OPTIONAL -- Need OR + } +} + +CQI-ReportAperiodic-v1250 ::= CHOICE { + release NULL, + setup SEQUENCE { + aperiodicCSI-Trigger-v1250 SEQUENCE { + trigger-SubframeSetIndicator-r12 ENUMERATED {s1, s2}, + trigger1-SubframeSetIndicator-r12 BIT STRING (SIZE (8)), + trigger2-SubframeSetIndicator-r12 BIT STRING (SIZE (8)) + } + } +} + +CQI-ReportAperiodic-v1310 ::= CHOICE { + release NULL, + setup SEQUENCE { + aperiodicCSI-Trigger-v1310 SEQUENCE { + trigger1-r13 BIT STRING (SIZE (32)), + trigger2-r13 BIT STRING (SIZE (32)), + trigger3-r13 BIT STRING (SIZE (32)), + trigger4-r13 BIT STRING (SIZE (32)), + trigger5-r13 BIT STRING (SIZE (32)), + trigger6-r13 BIT STRING (SIZE (32)) + } OPTIONAL, -- Need ON + aperiodicCSI-Trigger2-r13 CHOICE { + release NULL, + setup SEQUENCE { + trigger1-SubframeSetIndicator-r13 BIT STRING (SIZE (32)), + trigger2-SubframeSetIndicator-r13 BIT STRING (SIZE (32)), + trigger3-SubframeSetIndicator-r13 BIT STRING (SIZE (32)), + trigger4-SubframeSetIndicator-r13 BIT STRING (SIZE (32)), + trigger5-SubframeSetIndicator-r13 BIT STRING (SIZE (32)), + trigger6-SubframeSetIndicator-r13 BIT STRING (SIZE (32)) + } + } OPTIONAL -- Need ON + } +} + +CQI-ReportAperiodicProc-r11 ::= SEQUENCE { + cqi-ReportModeAperiodic-r11 CQI-ReportModeAperiodic, + trigger01-r11 BOOLEAN, + trigger10-r11 BOOLEAN, + trigger11-r11 BOOLEAN +} + +CQI-ReportAperiodicProc-v1310 ::= SEQUENCE { + trigger001-r13 BOOLEAN, + trigger010-r13 BOOLEAN, + trigger011-r13 BOOLEAN, + trigger100-r13 BOOLEAN, + trigger101-r13 BOOLEAN, + trigger110-r13 BOOLEAN, + trigger111-r13 BOOLEAN +} + +CQI-ReportAperiodicHybrid-r14 ::= SEQUENCE { + triggers-r14 CHOICE { + oneBit-r14 SEQUENCE { + trigger1-Indicator-r14 BIT STRING (SIZE (8)) + }, + twoBit-r14 SEQUENCE { + trigger01-Indicator-r14 BIT STRING (SIZE (8)), + trigger10-Indicator-r14 BIT STRING (SIZE (8)), + trigger11-Indicator-r14 BIT STRING (SIZE (8)) + }, + threeBit-r14 SEQUENCE { + trigger001-Indicator-r14 BIT STRING (SIZE (32)), + trigger010-Indicator-r14 BIT STRING (SIZE (32)), + trigger011-Indicator-r14 BIT STRING (SIZE (32)), + trigger100-Indicator-r14 BIT STRING (SIZE (32)) , + trigger101-Indicator-r14 BIT STRING (SIZE (32)), + trigger110-Indicator-r14 BIT STRING (SIZE (32)), + trigger111-Indicator-r14 BIT STRING (SIZE (32)) + } + } OPTIONAL -- Need OR +} + +CQI-ReportModeAperiodic ::= ENUMERATED { + rm12, rm20, rm22, rm30, rm31, + rm32-v1250, rm10-v1310, rm11-v1310 +} + + +CQI-ReportBoth-r11 ::= SEQUENCE { + csi-IM-ConfigToReleaseList-r11 CSI-IM-ConfigToReleaseList-r11 OPTIONAL, -- Need ON + csi-IM-ConfigToAddModList-r11 CSI-IM-ConfigToAddModList-r11 OPTIONAL, -- Need ON + csi-ProcessToReleaseList-r11 CSI-ProcessToReleaseList-r11 OPTIONAL, -- Need ON + csi-ProcessToAddModList-r11 CSI-ProcessToAddModList-r11 OPTIONAL -- Need ON +} + +CQI-ReportBoth-v1250 ::= SEQUENCE { + csi-IM-ConfigToReleaseListExt-r12 CSI-IM-ConfigId-v1250 OPTIONAL, -- Need ON + csi-IM-ConfigToAddModListExt-r12 CSI-IM-ConfigExt-r12 OPTIONAL -- Need ON +} + +CQI-ReportBoth-v1310 ::= SEQUENCE { + csi-IM-ConfigToReleaseListExt-r13 CSI-IM-ConfigToReleaseListExt-r13 OPTIONAL, -- Need ON + csi-IM-ConfigToAddModListExt-r13 CSI-IM-ConfigToAddModListExt-r13 OPTIONAL -- Need ON +} + +CSI-IM-ConfigToAddModList-r11 ::= SEQUENCE (SIZE (1..maxCSI-IM-r11)) OF CSI-IM-Config-r11 + +CSI-IM-ConfigToAddModListExt-r13 ::= SEQUENCE (SIZE (1..maxCSI-IM-v1310)) OF CSI-IM-ConfigExt-r12 + +CSI-IM-ConfigToReleaseList-r11 ::= SEQUENCE (SIZE (1..maxCSI-IM-r11)) OF CSI-IM-ConfigId-r11 + +CSI-IM-ConfigToReleaseListExt-r13 ::= SEQUENCE (SIZE (1..maxCSI-IM-v1310)) OF CSI-IM-ConfigId-v1310 + +CSI-ProcessToAddModList-r11 ::= SEQUENCE (SIZE (1..maxCSI-Proc-r11)) OF CSI-Process-r11 + +CSI-ProcessToReleaseList-r11 ::= SEQUENCE (SIZE (1..maxCSI-Proc-r11)) OF CSI-ProcessId-r11 + +CQI-ReportBothProc-r11 ::= SEQUENCE { + ri-Ref-CSI-ProcessId-r11 CSI-ProcessId-r11 OPTIONAL, -- Need OR + pmi-RI-Report-r11 ENUMERATED {setup} OPTIONAL -- Need OR +} + + +CQI-ReportConfig ::= SEQUENCE { + cqi-ReportModeAperiodic CQI-ReportModeAperiodic OPTIONAL, -- Need OR + nomPDSCH-RS-EPRE-Offset INTEGER (-1..6), + cqi-ReportPeriodic CQI-ReportPeriodic OPTIONAL -- Need ON +} + +CQI-ReportConfig-v920 ::= SEQUENCE { + cqi-Mask-r9 ENUMERATED {setup} OPTIONAL, -- Cond cqi-Setup + pmi-RI-Report-r9 ENUMERATED {setup} OPTIONAL -- Cond PMIRI +} + +CQI-ReportConfig-r10 ::= SEQUENCE { + cqi-ReportAperiodic-r10 CQI-ReportAperiodic-r10 OPTIONAL, -- Need ON + nomPDSCH-RS-EPRE-Offset INTEGER (-1..6), + cqi-ReportPeriodic-r10 CQI-ReportPeriodic-r10 OPTIONAL, -- Need ON + pmi-RI-Report-r9 ENUMERATED {setup} OPTIONAL, -- Cond PMIRIPCell + csi-SubframePatternConfig-r10 CHOICE { + release NULL, + setup SEQUENCE { + csi-MeasSubframeSet1-r10 MeasSubframePattern-r10, + csi-MeasSubframeSet2-r10 MeasSubframePattern-r10 + } + } OPTIONAL -- Need ON +} + +CQI-ReportConfig-v1130 ::= SEQUENCE { + cqi-ReportPeriodic-v1130 CQI-ReportPeriodic-v1130, + cqi-ReportBoth-r11 CQI-ReportBoth-r11 +} + +CQI-ReportConfig-v1250 ::= SEQUENCE { + csi-SubframePatternConfig-r12 CHOICE { + release NULL, + setup SEQUENCE { + csi-MeasSubframeSets-r12 BIT STRING (SIZE (10)) + } + } OPTIONAL, -- Need ON + cqi-ReportBoth-v1250 CQI-ReportBoth-v1250 OPTIONAL, -- Need ON + cqi-ReportAperiodic-v1250 CQI-ReportAperiodic-v1250 OPTIONAL, -- Need ON + altCQI-Table-r12 ENUMERATED { + allSubframes, csi-SubframeSet1, + csi-SubframeSet2, spare1} OPTIONAL -- Need OP +} + +CQI-ReportConfig-v1310 ::= SEQUENCE { + cqi-ReportBoth-v1310 CQI-ReportBoth-v1310 OPTIONAL, -- Need ON + cqi-ReportAperiodic-v1310 CQI-ReportAperiodic-v1310 OPTIONAL, -- Need ON + cqi-ReportPeriodic-v1310 CQI-ReportPeriodic-v1310 OPTIONAL -- Need ON +} + +CQI-ReportConfig-v1320 ::= SEQUENCE { + cqi-ReportPeriodic-v1320 CQI-ReportPeriodic-v1320 OPTIONAL -- Need ON +} + +CQI-ReportConfig-v1430 ::= SEQUENCE { + cqi-ReportAperiodicHybrid-r14 CQI-ReportAperiodicHybrid-r14 OPTIONAL -- Need ON +} + +CQI-ReportConfig-v1530 ::= SEQUENCE { + altCQI-Table-1024QAM-r15 ENUMERATED { + allSubframes, csi-SubframeSet1, + csi-SubframeSet2, spare1} OPTIONAL -- Need OP +} + +CQI-ReportConfig-r15 ::= CHOICE { + release NULL, + setup SEQUENCE { + cqi-ReportConfig-r10 CQI-ReportConfig-r10 OPTIONAL, -- Need ON + cqi-ReportConfig-v1130 CQI-ReportConfig-v1130 OPTIONAL, -- Need ON + cqi-ReportConfigPCell-v1250 CQI-ReportConfig-v1250 OPTIONAL, -- Need ON + cqi-ReportConfig-v1310 CQI-ReportConfig-v1310 OPTIONAL, -- Need ON + cqi-ReportConfig-v1320 CQI-ReportConfig-v1320 OPTIONAL, -- Need ON + cqi-ReportConfig-v1430 CQI-ReportConfig-v1430 OPTIONAL, -- Need ON + altCQI-Table-1024QAM-r15 ENUMERATED {allSubframes, csi-SubframeSet1, + csi-SubframeSet2, spare1} OPTIONAL -- Need OP + } +} + +CQI-ReportConfigSCell-r10 ::= SEQUENCE { + cqi-ReportModeAperiodic-r10 CQI-ReportModeAperiodic OPTIONAL, -- Need OR + nomPDSCH-RS-EPRE-Offset-r10 INTEGER (-1..6), + cqi-ReportPeriodicSCell-r10 CQI-ReportPeriodic-r10 OPTIONAL, -- Need ON + pmi-RI-Report-r10 ENUMERATED {setup} OPTIONAL -- Cond PMIRISCell +} + +CQI-ReportConfigSCell-r15 ::= SEQUENCE { + cqi-ReportPeriodicSCell-r15 CQI-ReportPeriodicSCell-r15 OPTIONAL, -- Need ON + altCQI-Table-1024QAM-r15 ENUMERATED {allSubframes, csi-SubframeSet1, + csi-SubframeSet2, spare1} OPTIONAL -- Need OP +} + + +CQI-ReportPeriodic ::= CHOICE { + release NULL, + setup SEQUENCE { + cqi-PUCCH-ResourceIndex INTEGER (0..1185), + cqi-pmi-ConfigIndex INTEGER (0..1023), + cqi-FormatIndicatorPeriodic CHOICE { + widebandCQI NULL, + subbandCQI SEQUENCE { + k INTEGER (1..4) + } + }, + ri-ConfigIndex INTEGER (0..1023) OPTIONAL, -- Need OR + simultaneousAckNackAndCQI BOOLEAN + } +} + +CQI-ReportPeriodic-r10 ::= CHOICE { + release NULL, + setup SEQUENCE { + cqi-PUCCH-ResourceIndex-r10 INTEGER (0..1184), + cqi-PUCCH-ResourceIndexP1-r10 INTEGER (0..1184) OPTIONAL, -- Need OR + cqi-pmi-ConfigIndex INTEGER (0..1023), + cqi-FormatIndicatorPeriodic-r10 CHOICE { + widebandCQI-r10 SEQUENCE { + csi-ReportMode-r10 ENUMERATED {submode1, submode2} OPTIONAL -- Need OR + }, + subbandCQI-r10 SEQUENCE { + k INTEGER (1..4), + periodicityFactor-r10 ENUMERATED {n2, n4} + } + }, + ri-ConfigIndex INTEGER (0..1023) OPTIONAL, -- Need OR + simultaneousAckNackAndCQI BOOLEAN, + cqi-Mask-r9 ENUMERATED {setup} OPTIONAL, -- Need OR + csi-ConfigIndex-r10 CHOICE { + release NULL, + setup SEQUENCE { + cqi-pmi-ConfigIndex2-r10 INTEGER (0..1023), + ri-ConfigIndex2-r10 INTEGER (0..1023) OPTIONAL -- Need OR + } + } OPTIONAL -- Need ON + } +} + + +CQI-ReportPeriodic-v1130 ::= SEQUENCE { + simultaneousAckNackAndCQI-Format3-r11 ENUMERATED {setup} OPTIONAL, -- Need OR + cqi-ReportPeriodicProcExtToReleaseList-r11 CQI-ReportPeriodicProcExtToReleaseList-r11 OPTIONAL, -- Need ON + cqi-ReportPeriodicProcExtToAddModList-r11 CQI-ReportPeriodicProcExtToAddModList-r11 OPTIONAL -- Need ON +} + +CQI-ReportPeriodic-v1310 ::= SEQUENCE { + cri-ReportConfig-r13 CRI-ReportConfig-r13 OPTIONAL, -- Need OR + simultaneousAckNackAndCQI-Format4-Format5-r13 ENUMERATED {setup} OPTIONAL-- Need OR +} + +CQI-ReportPeriodic-v1320 ::= SEQUENCE { + periodicityFactorWB-r13 ENUMERATED {n2, n4} OPTIONAL -- Need OR +} + +CQI-ReportPeriodicSCell-r15 ::= CHOICE { + release NULL, + setup SEQUENCE { + cqi-pmi-ConfigIndexDormant-r15 INTEGER (0..1023), + ri-ConfigIndexDormant-r15 INTEGER (0..1023) OPTIONAL, -- Need OR + csi-SubframePatternDormant-r15 CHOICE { + release NULL, + setup SEQUENCE { + csi-MeasSubframeSet1-r15 MeasSubframePattern-r10, + csi-MeasSubframeSet2-r15 MeasSubframePattern-r10 + } + } OPTIONAL, -- Need ON + cqi-FormatIndicatorDormant-r15 CHOICE { + widebandCQI-r15 SEQUENCE { + csi-ReportMode-r15 ENUMERATED {submode1, submode2} OPTIONAL -- Need OR + }, + subbandCQI-r15 SEQUENCE { + k-r15 INTEGER (1..4), + periodicityFactor-r15 ENUMERATED {n2, n4} + } + } OPTIONAL -- Need OR + } +} + +CQI-ReportPeriodicProcExtToAddModList-r11 ::= SEQUENCE (SIZE (1..maxCQI-ProcExt-r11)) OF CQI-ReportPeriodicProcExt-r11 + +CQI-ReportPeriodicProcExtToReleaseList-r11 ::= SEQUENCE (SIZE (1..maxCQI-ProcExt-r11)) OF CQI-ReportPeriodicProcExtId-r11 + +CQI-ReportPeriodicProcExt-r11 ::= SEQUENCE { + cqi-ReportPeriodicProcExtId-r11 CQI-ReportPeriodicProcExtId-r11, + cqi-pmi-ConfigIndex-r11 INTEGER (0..1023), + cqi-FormatIndicatorPeriodic-r11 CHOICE { + widebandCQI-r11 SEQUENCE { + csi-ReportMode-r11 ENUMERATED {submode1, submode2} OPTIONAL -- Need OR + }, + subbandCQI-r11 SEQUENCE { + k INTEGER (1..4), + periodicityFactor-r11 ENUMERATED {n2, n4} + } + }, + ri-ConfigIndex-r11 INTEGER (0..1023) OPTIONAL, -- Need OR + csi-ConfigIndex-r11 CHOICE { + release NULL, + setup SEQUENCE { + cqi-pmi-ConfigIndex2-r11 INTEGER (0..1023), + ri-ConfigIndex2-r11 INTEGER (0..1023) OPTIONAL -- Need OR + } + } OPTIONAL, -- Need ON + ..., + [[ cri-ReportConfig-r13 CRI-ReportConfig-r13 OPTIONAL -- Need ON + ]], + [[ periodicityFactorWB-r13 ENUMERATED {n2, n4} OPTIONAL -- Need ON + ]] +} + +CQI-ShortConfigSCell-r15 ::= CHOICE { + release NULL, + setup SEQUENCE { + cqi-pmi-ConfigIndexShort-r15 INTEGER (0..1023), + ri-ConfigIndexShort-r15 INTEGER (0..1023) OPTIONAL, -- Need OR + cqi-FormatIndicatorShort-r15 CHOICE { + widebandCQI-Short-r15 SEQUENCE { + csi-ReportModeShort-r15 ENUMERATED {submode1, submode2} OPTIONAL -- Need OR + }, + subbandCQI-Short-r15 SEQUENCE { + k-r15 INTEGER (1..4), + periodicityFactor-r15 ENUMERATED {n2, n4} + } + } OPTIONAL -- Need OR + } +} + +CRI-ReportConfig-r13 ::= CHOICE { + release NULL, + setup SEQUENCE { + cri-ConfigIndex-r13 CRI-ConfigIndex-r13, + cri-ConfigIndex2-r13 CRI-ConfigIndex-r13 OPTIONAL -- Need OR + } +} + +CRI-ConfigIndex-r13 ::= INTEGER (0..1023) + + +CQI-ReportPeriodicProcExtId-r11 ::= INTEGER (1..maxCQI-ProcExt-r11) + + +CrossCarrierSchedulingConfig-r10 ::= SEQUENCE { + schedulingCellInfo-r10 CHOICE { + own-r10 SEQUENCE { -- No cross carrier scheduling + cif-Presence-r10 BOOLEAN + }, + other-r10 SEQUENCE { -- Cross carrier scheduling + schedulingCellId-r10 ServCellIndex-r10, + pdsch-Start-r10 INTEGER (1..4) + } + } +} + +CrossCarrierSchedulingConfig-r13 ::= SEQUENCE { + schedulingCellInfo-r13 CHOICE { + own-r13 SEQUENCE { -- No cross carrier scheduling + cif-Presence-r13 BOOLEAN + }, + other-r13 SEQUENCE { -- Cross carrier scheduling + schedulingCellId-r13 ServCellIndex-r13, + pdsch-Start-r13 INTEGER (1..4), + cif-InSchedulingCell-r13 INTEGER (1..7) + } + } +} + +CrossCarrierSchedulingConfigLAA-UL-r14 ::= SEQUENCE { + schedulingCellId-r14 ServCellIndex-r13, + cif-InSchedulingCell-r14 INTEGER (1..7) +} + +CSI-IM-Config-r11 ::= SEQUENCE { + csi-IM-ConfigId-r11 CSI-IM-ConfigId-r11, + resourceConfig-r11 INTEGER (0..31), + subframeConfig-r11 INTEGER (0..154), + ..., + [[ interferenceMeasRestriction-r13 BOOLEAN OPTIONAL -- Need ON + ]] +} + +CSI-IM-ConfigExt-r12 ::= SEQUENCE { + csi-IM-ConfigId-v1250 CSI-IM-ConfigId-v1250, + resourceConfig-r12 INTEGER (0..31), + subframeConfig-r12 INTEGER (0..154), + ..., + [[ interferenceMeasRestriction-r13 BOOLEAN OPTIONAL, -- Need ON + csi-IM-ConfigId-v1310 CSI-IM-ConfigId-v1310 OPTIONAL -- Need ON + ]] +} + + +CSI-IM-ConfigId-r11 ::= INTEGER (1..maxCSI-IM-r11) +CSI-IM-ConfigId-r12 ::= INTEGER (1..maxCSI-IM-r12) +CSI-IM-ConfigId-v1250 ::= INTEGER (maxCSI-IM-r12) +CSI-IM-ConfigId-v1310 ::= INTEGER (minCSI-IM-r13..maxCSI-IM-r13) +CSI-IM-ConfigId-r13 ::= INTEGER (1..maxCSI-IM-r13) + + +CSI-Process-r11 ::= SEQUENCE { + csi-ProcessId-r11 CSI-ProcessId-r11, + csi-RS-ConfigNZPId-r11 CSI-RS-ConfigNZPId-r11, + csi-IM-ConfigId-r11 CSI-IM-ConfigId-r11, + p-C-AndCBSRList-r11 P-C-AndCBSR-Pair-r13a, + cqi-ReportBothProc-r11 CQI-ReportBothProc-r11 OPTIONAL, -- Need OR + cqi-ReportPeriodicProcId-r11 INTEGER (0..maxCQI-ProcExt-r11) OPTIONAL, -- Need OR + cqi-ReportAperiodicProc-r11 CQI-ReportAperiodicProc-r11 OPTIONAL, -- Need OR + ..., + [[ alternativeCodebookEnabledFor4TXProc-r12 ENUMERATED {true} OPTIONAL, -- Need ON + csi-IM-ConfigIdList-r12 CHOICE { + release NULL, + setup SEQUENCE (SIZE (1..2)) OF CSI-IM-ConfigId-r12 + } OPTIONAL, -- Need ON + cqi-ReportAperiodicProc2-r12 CHOICE { + release NULL, + setup CQI-ReportAperiodicProc-r11 + } OPTIONAL -- Need ON + ]], + [[ cqi-ReportAperiodicProc-v1310 CHOICE { + release NULL, + setup CQI-ReportAperiodicProc-v1310 + } OPTIONAL, -- Need ON + cqi-ReportAperiodicProc2-v1310 CHOICE { + release NULL, + setup CQI-ReportAperiodicProc-v1310 + } OPTIONAL, -- Need ON + eMIMO-Type-r13 CSI-RS-ConfigEMIMO-r13 OPTIONAL -- Need ON + ]], + [[ dummy CSI-RS-ConfigEMIMO-v1430 OPTIONAL, -- Need ON + eMIMO-Hybrid-r14 CSI-RS-ConfigEMIMO-Hybrid-r14 OPTIONAL, -- Need ON + advancedCodebookEnabled-r14 BOOLEAN OPTIONAL -- Need ON + ]], + [[ eMIMO-Type-v1480 CSI-RS-ConfigEMIMO-v1480 OPTIONAL -- Need ON + ]], + [[ feCOMP-CSI-Enabled-v1530 BOOLEAN OPTIONAL, -- Need ON + eMIMO-Type-v1530 CSI-RS-ConfigEMIMO-v1530 OPTIONAL -- Need ON + ]] +} + + +CSI-ProcessId-r11 ::= INTEGER (1..maxCSI-Proc-r11) + + +CSI-RS-Config-r10 ::= SEQUENCE { + csi-RS-r10 CHOICE { + release NULL, + setup SEQUENCE { + antennaPortsCount-r10 ENUMERATED {an1, an2, an4, an8}, + resourceConfig-r10 INTEGER (0..31), + subframeConfig-r10 INTEGER (0..154), + p-C-r10 INTEGER (-8..15) + } + } OPTIONAL, -- Need ON + zeroTxPowerCSI-RS-r10 ZeroTxPowerCSI-RS-Conf-r12 OPTIONAL -- Need ON +} + +CSI-RS-Config-v1250 ::= SEQUENCE { + zeroTxPowerCSI-RS2-r12 ZeroTxPowerCSI-RS-Conf-r12 OPTIONAL, -- Need ON + ds-ZeroTxPowerCSI-RS-r12 CHOICE { + release NULL, + setup SEQUENCE { + zeroTxPowerCSI-RS-List-r12 SEQUENCE (SIZE (1..maxDS-ZTP-CSI-RS-r12)) OF ZeroTxPowerCSI-RS-r12 + } + } OPTIONAL -- Need ON +} + +CSI-RS-Config-v1310 ::= SEQUENCE { + eMIMO-Type-r13 CSI-RS-ConfigEMIMO-r13 OPTIONAL -- Need ON +} + +CSI-RS-Config-v1430 ::= SEQUENCE { + dummy CSI-RS-ConfigEMIMO-v1430 OPTIONAL, -- Need ON + eMIMO-Hybrid-r14 CSI-RS-ConfigEMIMO-Hybrid-r14 OPTIONAL, -- Need ON + advancedCodebookEnabled-r14 BOOLEAN OPTIONAL -- Need ON +} + +CSI-RS-Config-v1480 ::= SEQUENCE { + eMIMO-Type-v1480 CSI-RS-ConfigEMIMO-v1480 OPTIONAL -- Need ON +} + +CSI-RS-Config-v1530 ::= SEQUENCE { + eMIMO-Type-v1530 CSI-RS-ConfigEMIMO-v1530 OPTIONAL -- Need ON +} + +CSI-RS-Config-r15 ::= CHOICE { + release NULL, + setup SEQUENCE { + csi-RS-Config-r10 CSI-RS-Config-r10 OPTIONAL, -- Need ON + csi-RS-Config-v1250 CSI-RS-Config-v1250 OPTIONAL, -- Need ON + csi-RS-Config-v1310 CSI-RS-Config-v1310 OPTIONAL, -- Need ON + csi-RS-Config-v1430 CSI-RS-Config-v1430 OPTIONAL -- Need ON + } +} + +ZeroTxPowerCSI-RS-Conf-r12 ::= CHOICE { + release NULL, + setup ZeroTxPowerCSI-RS-r12 +} + +ZeroTxPowerCSI-RS-r12 ::= SEQUENCE { + zeroTxPowerResourceConfigList-r12 BIT STRING (SIZE (16)), + zeroTxPowerSubframeConfig-r12 INTEGER (0..154) +} + + +CSI-RS-ConfigBeamformed-r13 ::= SEQUENCE { + csi-RS-ConfigNZPIdListExt-r13 SEQUENCE (SIZE (1..7)) OF CSI-RS-ConfigNZPId-r13 OPTIONAL, -- Need OR + csi-IM-ConfigIdList-r13 SEQUENCE (SIZE (1..8)) OF CSI-IM-ConfigId-r13 OPTIONAL, -- Need OR + p-C-AndCBSR-PerResourceConfigList-r13 SEQUENCE (SIZE (1..8)) OF P-C-AndCBSR-Pair-r13 OPTIONAL, -- Need OR + ace-For4Tx-PerResourceConfigList-r13 SEQUENCE (SIZE (1..7)) OF BOOLEAN OPTIONAL, -- Need OR + alternativeCodebookEnabledBeamformed-r13 ENUMERATED {true} OPTIONAL, -- Need OR + channelMeasRestriction-r13 ENUMERATED {on} OPTIONAL -- Need OR +} + +CSI-RS-ConfigBeamformed-r14 ::= SEQUENCE { + csi-RS-ConfigNZPIdListExt-r14 SEQUENCE (SIZE (1..7)) OF CSI-RS-ConfigNZPId-r13 OPTIONAL, -- Need OR + csi-IM-ConfigIdList-r14 SEQUENCE (SIZE (1..8)) OF CSI-IM-ConfigId-r13 OPTIONAL, -- Need OR + p-C-AndCBSR-PerResourceConfigList-r14 SEQUENCE (SIZE (1..8)) OF P-C-AndCBSR-Pair-r13 OPTIONAL, -- Need OR + ace-For4Tx-PerResourceConfigList-r14 SEQUENCE (SIZE (1..7)) OF BOOLEAN OPTIONAL, -- Need OR + alternativeCodebookEnabledBeamformed-r14 ENUMERATED {true} OPTIONAL, -- Need OR + channelMeasRestriction-r14 ENUMERATED {on} OPTIONAL, -- Need OR + csi-RS-ConfigNZP-ApList-r14 SEQUENCE (SIZE (1..8)) OF CSI-RS-ConfigNZP-r11 + OPTIONAL, -- Need OR + nzp-ResourceConfigOriginal-v1430 CSI-RS-Config-NZP-v1430 OPTIONAL, -- Need OR + csi-RS-NZP-Activation-r14 CSI-RS-ConfigNZP-Activation-r14 OPTIONAL -- Need OR +} + +CSI-RS-ConfigBeamformed-v1430::= SEQUENCE { + csi-RS-ConfigNZP-ApList-r14 SEQUENCE (SIZE (1..8)) OF CSI-RS-ConfigNZP-r11 + OPTIONAL, -- Need OR + nzp-ResourceConfigOriginal-v1430 CSI-RS-Config-NZP-v1430 OPTIONAL, -- Need OR + csi-RS-NZP-Activation-r14 CSI-RS-ConfigNZP-Activation-r14 OPTIONAL -- Need OR +} + +CSI-RS-Config-NZP-v1430::= SEQUENCE { + transmissionComb-r14 NZP-TransmissionComb-r14 OPTIONAL, -- Need OR + frequencyDensity-r14 NZP-FrequencyDensity-r14 OPTIONAL -- Need OR +} + +CSI-RS-ConfigNZP-Activation-r14::= SEQUENCE { + csi-RS-NZP-mode-r14 ENUMERATED {semiPersistent, aperiodic}, + activatedResources-r14 INTEGER (0..4) +} + + +CSI-RS-ConfigEMIMO-r13 ::= CHOICE { + release NULL, + setup CHOICE { + nonPrecoded-r13 CSI-RS-ConfigNonPrecoded-r13, + beamformed-r13 CSI-RS-ConfigBeamformed-r13 + } +} + +CSI-RS-ConfigEMIMO-v1430 ::= CHOICE { + release NULL, + setup CHOICE { + nonPrecoded-v1430 CSI-RS-ConfigNonPrecoded-v1430, + beamformed-v1430 CSI-RS-ConfigBeamformed-v1430 + } +} + +CSI-RS-ConfigEMIMO-v1480 ::= CHOICE { + release NULL, + setup CHOICE { + nonPrecoded-v1480 CSI-RS-ConfigNonPrecoded-v1480, + beamformed-v1480 CSI-RS-ConfigBeamformed-v1430 + } +} + +CSI-RS-ConfigEMIMO-v1530 ::= CHOICE { + release NULL, + setup CHOICE { + nonPrecoded-v1530 CSI-RS-ConfigNonPrecoded-v1530 + } +} + +CSI-RS-ConfigEMIMO2-r14 ::= CHOICE { + release NULL, + setup CSI-RS-ConfigBeamformed-r14 +} + +CSI-RS-ConfigEMIMO-Hybrid-r14 ::= CHOICE { + release NULL, + setup SEQUENCE { + periodicityOffsetIndex-r14 INTEGER (0..1023) OPTIONAL, -- Need OR + eMIMO-Type2-r14 CSI-RS-ConfigEMIMO2-r14 OPTIONAL -- Need ON + } +} + + + +CSI-RS-ConfigNonPrecoded-r13 ::= SEQUENCE { + p-C-AndCBSRList-r13 P-C-AndCBSR-Pair-r13 OPTIONAL, -- Need OR + codebookConfigN1-r13 ENUMERATED {n1, n2, n3, n4, n8}, + codebookConfigN2-r13 ENUMERATED {n1, n2, n3, n4, n8}, + codebookOverSamplingRateConfig-O1-r13 ENUMERATED {n4, n8} OPTIONAL, -- Need OR + codebookOverSamplingRateConfig-O2-r13 ENUMERATED {n4, n8} OPTIONAL, -- Need OR + codebookConfig-r13 INTEGER (1..4), + csi-IM-ConfigIdList-r13 SEQUENCE (SIZE (1..2)) OF CSI-IM-ConfigId-r13 OPTIONAL, -- Need OR + csi-RS-ConfigNZP-EMIMO-r13 CSI-RS-ConfigNZP-EMIMO-r13 OPTIONAL -- Need ON +} + +CSI-RS-ConfigNonPrecoded-v1430::= SEQUENCE { + csi-RS-ConfigNZP-EMIMO-v1430 CSI-RS-ConfigNZP-EMIMO-v1430 OPTIONAL, -- Need ON + codebookConfigN1-v1430 ENUMERATED {n5, n6, n7, n10, n12, n14, n16}, + codebookConfigN2-v1430 ENUMERATED {n5, n6, n7}, + nzp-ResourceConfigTM9-Original-v1430 CSI-RS-Config-NZP-v1430 +} + +CSI-RS-ConfigNonPrecoded-v1480::= SEQUENCE { + csi-RS-ConfigNZP-EMIMO-v1480 CSI-RS-ConfigNZP-EMIMO-v1430 OPTIONAL, -- Need ON + codebookConfigN1-v1480 ENUMERATED {n5, n6, n7, n10, n12, n14, n16} OPTIONAL, -- Need OR + codebookConfigN2-r1480 ENUMERATED {n5, n6, n7} OPTIONAL, -- Need OR + nzp-ResourceConfigTM9-Original-v1480 CSI-RS-Config-NZP-v1430 +} + +CSI-RS-ConfigNonPrecoded-v1530 ::= SEQUENCE { + p-C-AndCBSRList-r15 P-C-AndCBSR-Pair-r15 OPTIONAL -- Need OR +} + + +CSI-RS-ConfigNZP-r11 ::= SEQUENCE { + csi-RS-ConfigNZPId-r11 CSI-RS-ConfigNZPId-r11, + antennaPortsCount-r11 ENUMERATED {an1, an2, an4, an8}, + resourceConfig-r11 INTEGER (0..31), + subframeConfig-r11 INTEGER (0..154), + scramblingIdentity-r11 INTEGER (0..503), + qcl-CRS-Info-r11 SEQUENCE { + qcl-ScramblingIdentity-r11 INTEGER (0..503), + crs-PortsCount-r11 ENUMERATED {n1, n2, n4, spare1}, + mbsfn-SubframeConfigList-r11 CHOICE { + release NULL, + setup SEQUENCE { + subframeConfigList MBSFN-SubframeConfigList + } + } OPTIONAL -- Need ON + } OPTIONAL, -- Need OR + ..., + [[ csi-RS-ConfigNZPId-v1310 CSI-RS-ConfigNZPId-v1310 OPTIONAL -- Need ON + ]], + [[ transmissionComb-r14 NZP-TransmissionComb-r14 OPTIONAL, -- Need OR + frequencyDensity-r14 NZP-FrequencyDensity-r14 OPTIONAL -- Need OR + ]], + [[ mbsfn-SubframeConfigList-v1430 CHOICE { + release NULL, + setup SEQUENCE { + subframeConfigList-v1430 MBSFN-SubframeConfigList-v1430 + } + } OPTIONAL -- Need OP + ]] +} + +CSI-RS-ConfigNZP-EMIMO-r13 ::= CHOICE { + release NULL, + setup SEQUENCE { + nzp-resourceConfigList-r13 SEQUENCE (SIZE (1..2)) OF NZP-ResourceConfig-r13, + cdmType-r13 ENUMERATED {cdm2, cdm4} OPTIONAL -- Need OR + } +} + +CSI-RS-ConfigNZP-EMIMO-v1430 ::= SEQUENCE { + -- All extensions are for Non-Precoded so could be grouped by setup/ release choice + nzp-resourceConfigListExt-r14 SEQUENCE (SIZE (0..4)) OF NZP-ResourceConfig-r13, + cdmType-v1430 ENUMERATED {cdm8 } OPTIONAL -- Need OR +} + +NZP-ResourceConfig-r13 ::= SEQUENCE { + resourceConfig-r13 ResourceConfig-r13, + ..., + [[ transmissionComb-r14 NZP-TransmissionComb-r14 OPTIONAL, -- Need OR + frequencyDensity-r14 NZP-FrequencyDensity-r14 OPTIONAL -- Need OR + ]] +} + +ResourceConfig-r13 ::= INTEGER (0..31) + +NZP-TransmissionComb-r14 ::= INTEGER (0..2) +NZP-FrequencyDensity-r14 ::= ENUMERATED {d1, d2, d3} + + +CSI-RS-ConfigNZPId-r11 ::= INTEGER (1..maxCSI-RS-NZP-r11) +CSI-RS-ConfigNZPId-v1310 ::= INTEGER (minCSI-RS-NZP-r13..maxCSI-RS-NZP-r13) +CSI-RS-ConfigNZPId-r13 ::= INTEGER (1..maxCSI-RS-NZP-r13) + + +CSI-RS-ConfigZP-r11 ::= SEQUENCE { + csi-RS-ConfigZPId-r11 CSI-RS-ConfigZPId-r11, + resourceConfigList-r11 BIT STRING (SIZE (16)), + subframeConfig-r11 INTEGER (0..154), + ... +} + +CSI-RS-ConfigZP-ApList-r14 ::= CHOICE { + release NULL, + setup SEQUENCE (SIZE (1.. maxCSI-RS-ZP-r11)) OF CSI-RS-ConfigZP-r11 +} + + +CSI-RS-ConfigZPId-r11 ::= INTEGER (1..maxCSI-RS-ZP-r11) + + +DataInactivityTimer-r14 ::= ENUMERATED { + s1, s2, s3, s5, s7, s10, s15, s20, s40, s50, s60, + s80, s100, s120, s150, s180} + + +DMRS-Config-r11 ::= CHOICE { + release NULL, + setup SEQUENCE { + scramblingIdentity-r11 INTEGER (0..503), + scramblingIdentity2-r11 INTEGER (0..503) + } +} +DMRS-Config-v1310 ::= SEQUENCE { + dmrs-tableAlt-r13 ENUMERATED {true} OPTIONAL -- Need OR +} + + +DRB-Identity ::= INTEGER (1..32) + + +EPDCCH-Config-r11 ::= SEQUENCE{ + config-r11 CHOICE { + release NULL, + setup SEQUENCE { + subframePatternConfig-r11 CHOICE { + release NULL, + setup SEQUENCE { + subframePattern-r11 MeasSubframePattern-r10 + } + } OPTIONAL, -- Need ON + startSymbol-r11 INTEGER (1..4) OPTIONAL, -- Need OP + setConfigToReleaseList-r11 EPDCCH-SetConfigToReleaseList-r11 OPTIONAL, -- Need ON + setConfigToAddModList-r11 EPDCCH-SetConfigToAddModList-r11 OPTIONAL -- Need ON + } + } +} + +EPDCCH-SetConfigToAddModList-r11 ::= SEQUENCE (SIZE(1..maxEPDCCH-Set-r11)) OF EPDCCH-SetConfig-r11 + +EPDCCH-SetConfigToReleaseList-r11 ::= SEQUENCE (SIZE(1..maxEPDCCH-Set-r11)) OF EPDCCH-SetConfigId-r11 + +EPDCCH-SetConfig-r11 ::= SEQUENCE { + setConfigId-r11 EPDCCH-SetConfigId-r11, + transmissionType-r11 ENUMERATED {localised, distributed}, + resourceBlockAssignment-r11 SEQUENCE{ + numberPRB-Pairs-r11 ENUMERATED {n2, n4, n8}, + resourceBlockAssignment-r11 BIT STRING (SIZE(4..38)) + }, + dmrs-ScramblingSequenceInt-r11 INTEGER (0..503), + pucch-ResourceStartOffset-r11 INTEGER (0..2047), + re-MappingQCL-ConfigId-r11 PDSCH-RE-MappingQCL-ConfigId-r11 OPTIONAL, -- Need OR + ..., + [[ csi-RS-ConfigZPId2-r12 CHOICE { + release NULL, + setup CSI-RS-ConfigZPId-r11 + } OPTIONAL -- Need ON + ]], + [[ numberPRB-Pairs-v1310 CHOICE { + release NULL, + setup ENUMERATED {n6} + } OPTIONAL, -- Need ON + mpdcch-config-r13 CHOICE { + release NULL, + setup SEQUENCE { + csi-NumRepetitionCE-r13 ENUMERATED {sf1, sf2, sf4, sf8, sf16, sf32}, + mpdcch-pdsch-HoppingConfig-r13 ENUMERATED {on,off}, + mpdcch-StartSF-UESS-r13 CHOICE { + fdd-r13 ENUMERATED {v1, v1dot5, v2, v2dot5, v4, + v5, v8, v10}, tdd-r13 ENUMERATED {v1, v2, v4, v5, v8, v10, + v20, spare1} + }, + mpdcch-NumRepetition-r13 ENUMERATED {r1, r2, r4, r8, r16, + r32, r64, r128, r256}, + mpdcch-Narrowband-r13 INTEGER (1.. maxAvailNarrowBands-r13) + } + } OPTIONAL -- Need ON + ]] +} + +EPDCCH-SetConfigId-r11 ::= INTEGER (0..1) + + +EIMTA-MainConfig-r12 ::= CHOICE { + release NULL, + setup SEQUENCE { + eimta-RNTI-r12 C-RNTI, + eimta-CommandPeriodicity-r12 ENUMERATED {sf10, sf20, sf40, sf80}, + eimta-CommandSubframeSet-r12 BIT STRING (SIZE(10)) + } +} + +EIMTA-MainConfigServCell-r12 ::= CHOICE { + release NULL, + setup SEQUENCE { + eimta-UL-DL-ConfigIndex-r12 INTEGER (1..5), + eimta-HARQ-ReferenceConfig-r12 ENUMERATED {sa2, sa4, sa5}, + mbsfn-SubframeConfigList-v1250 CHOICE { + release NULL, + setup SEQUENCE { + subframeConfigList-r12 MBSFN-SubframeConfigList + } + } + } +} + + +LogicalChannelConfig ::= SEQUENCE { + ul-SpecificParameters SEQUENCE { + priority INTEGER (1..16), + prioritisedBitRate ENUMERATED { + kBps0, kBps8, kBps16, kBps32, kBps64, kBps128, + kBps256, infinity, kBps512-v1020, kBps1024-v1020, + kBps2048-v1020, spare5, spare4, spare3, spare2, + spare1}, + bucketSizeDuration ENUMERATED { + ms50, ms100, ms150, ms300, ms500, ms1000, spare2, + spare1}, + logicalChannelGroup INTEGER (0..3) OPTIONAL -- Need OR + } OPTIONAL, -- Cond UL + ..., + [[ logicalChannelSR-Mask-r9 ENUMERATED {setup} OPTIONAL -- Cond SRmask + ]], + [[ logicalChannelSR-Prohibit-r12 BOOLEAN OPTIONAL -- Need ON + ]], + [[ laa-UL-Allowed-r14 BOOLEAN OPTIONAL, -- Need ON + bitRateQueryProhibitTimer-r14 ENUMERATED { + s0, s0dot4, s0dot8, s1dot6, s3, s6, s12, + s30} OPTIONAL --Need OR + ]], + [[ allowedTTI-Lengths-r15 CHOICE { + release NULL, + setup SEQUENCE { + shortTTI-r15 BOOLEAN, + subframeTTI-r15 BOOLEAN + } + } OPTIONAL, -- Need ON + logicalChannelSR-Restriction-r15 CHOICE { + release NULL, + setup ENUMERATED {spucch, pucch} + } OPTIONAL, -- Need ON + channellAccessPriority-r15 CHOICE { + release NULL, + setup INTEGER (1..4) + } OPTIONAL, -- Need ON + lch-CellRestriction-r15 BIT STRING (SIZE (maxServCell-r13)) OPTIONAL -- Need ON + ]] +} + + +LWA-Configuration-r13 ::= CHOICE { + release NULL, + setup SEQUENCE { + lwa-Config-r13 LWA-Config-r13 + } +} + +LWA-Config-r13 ::= SEQUENCE { + lwa-MobilityConfig-r13 WLAN-MobilityConfig-r13 OPTIONAL, -- Need ON + lwa-WT-Counter-r13 INTEGER (0..65535) OPTIONAL, -- Need ON + ..., + [[ wt-MAC-Address-r14 OCTET STRING (SIZE (6)) OPTIONAL -- Need ON + ]] +} + + +LWIP-Configuration-r13 ::= CHOICE { + release NULL, + setup SEQUENCE { + lwip-Config-r13 LWIP-Config-r13 + } +} + +LWIP-Config-r13 ::= SEQUENCE { + lwip-MobilityConfig-r13 WLAN-MobilityConfig-r13 OPTIONAL, -- Need ON + tunnelConfigLWIP-r13 TunnelConfigLWIP-r13 OPTIONAL, -- Need ON + ... +} + + +MAC-MainConfig ::= SEQUENCE { + ul-SCH-Config SEQUENCE { + maxHARQ-Tx ENUMERATED { + n1, n2, n3, n4, n5, n6, n7, n8, + n10, n12, n16, n20, n24, n28, + spare2, spare1} OPTIONAL, -- Need ON + periodicBSR-Timer PeriodicBSR-Timer-r12 OPTIONAL, -- Need ON + retxBSR-Timer RetxBSR-Timer-r12, + ttiBundling BOOLEAN + } OPTIONAL, -- Need ON + drx-Config DRX-Config OPTIONAL, -- Need ON + timeAlignmentTimerDedicated TimeAlignmentTimer, + phr-Config CHOICE { + release NULL, + setup SEQUENCE { + periodicPHR-Timer ENUMERATED {sf10, sf20, sf50, sf100, sf200, + sf500, sf1000, infinity}, + prohibitPHR-Timer ENUMERATED {sf0, sf10, sf20, sf50, sf100, + sf200, sf500, sf1000}, + dl-PathlossChange ENUMERATED {dB1, dB3, dB6, infinity} + } + } OPTIONAL, -- Need ON + ..., + [[ sr-ProhibitTimer-r9 INTEGER (0..7) OPTIONAL -- Need ON + ]], + [[ mac-MainConfig-v1020 SEQUENCE { + sCellDeactivationTimer-r10 ENUMERATED { + rf2, rf4, rf8, rf16, rf32, rf64, rf128, + spare} OPTIONAL, -- Need OP + extendedBSR-Sizes-r10 ENUMERATED {setup} OPTIONAL, -- Need OR + extendedPHR-r10 ENUMERATED {setup} OPTIONAL -- Need OR + } OPTIONAL -- Need ON + ]], + [[ stag-ToReleaseList-r11 STAG-ToReleaseList-r11 OPTIONAL, -- Need ON + stag-ToAddModList-r11 STAG-ToAddModList-r11 OPTIONAL, -- Need ON + drx-Config-v1130 DRX-Config-v1130 OPTIONAL -- Need ON + ]], + [[ e-HARQ-Pattern-r12 BOOLEAN OPTIONAL, -- Need ON + dualConnectivityPHR CHOICE { + release NULL, + setup SEQUENCE { + phr-ModeOtherCG-r12 ENUMERATED {real, virtual} + } + } OPTIONAL, -- Need ON + logicalChannelSR-Config-r12 CHOICE { + release NULL, + setup SEQUENCE { + logicalChannelSR-ProhibitTimer-r12 ENUMERATED {sf20, sf40, sf64, sf128, sf512, sf1024, sf2560, spare1} + } + } OPTIONAL -- Need ON + ]], + [[ drx-Config-v1310 DRX-Config-v1310 OPTIONAL, -- Need ON + extendedPHR2-r13 BOOLEAN OPTIONAL, -- Need ON + eDRX-Config-CycleStartOffset-r13 CHOICE { + release NULL, + setup + CHOICE { + sf5120 INTEGER(0..1), + sf10240 INTEGER(0..3) + } + } OPTIONAL -- Need ON + ]], + [[ drx-Config-r13 CHOICE { + release NULL, + setup DRX-Config-r13 + } OPTIONAL -- Need ON + ]], + [[ skipUplinkTx-r14 CHOICE { + release NULL, + setup SEQUENCE { + skipUplinkTxSPS-r14 ENUMERATED {true} OPTIONAL, -- Need OR + skipUplinkTxDynamic-r14 ENUMERATED {true} OPTIONAL -- Need OR + } + } OPTIONAL, -- Need ON + dataInactivityTimerConfig-r14 CHOICE { + release NULL, + setup SEQUENCE { + dataInactivityTimer-r14 DataInactivityTimer-r14 + } + } OPTIONAL -- Need ON + ]], + [[ rai-Activation-r14 ENUMERATED {true} OPTIONAL -- Need OR + ]], + [[ shortTTI-AndSPT-r15 CHOICE { + release NULL, + setup SEQUENCE { + drx-Config-r15 DRX-Config-r15 OPTIONAL, -- Need ON + periodicBSR-Timer-r15 ENUMERATED { + sf1, sf5, sf10, sf16, sf20, sf32, sf40, + sf64, sf80, sf128, sf160, sf320, sf640, + sf1280, sf2560, infinity} + OPTIONAL, -- Need ON + proc-Timeline-r15 ENUMERATED {nplus4set1, nplus6set1, + nplus6set2, nplus8set2 } OPTIONAL, -- Need ON + ssr-ProhibitTimer-r15 INTEGER (0..7) OPTIONAL -- Need ON + } + } OPTIONAL, -- Need ON + mpdcch-UL-HARQ-ACK-FeedbackConfig-r15 BOOLEAN OPTIONAL, -- Need ON + dormantStateTimers-r15 CHOICE { + release NULL, + setup SEQUENCE { + sCellHibernationTimer-r15 ENUMERATED { + rf2, rf4, rf8, rf16, rf32, rf64, rf128, spare} OPTIONAL, -- Need OR + dormantSCellDeactivationTimer-r15 ENUMERATED { + rf2, rf4, rf8, rf16, rf32, rf64, + rf128, rf320, rf640, rf1280, rf2560, + rf5120, rf10240, spare3, spare2, spare1} OPTIONAL -- Need OR + } + } OPTIONAL -- Need ON + ]] +} + +MAC-MainConfigSCell-r11 ::= SEQUENCE { + stag-Id-r11 STAG-Id-r11 OPTIONAL, -- Need OP + ... +} + +DRX-Config ::= CHOICE { + release NULL, + setup SEQUENCE { + onDurationTimer ENUMERATED { + psf1, psf2, psf3, psf4, psf5, psf6, + psf8, psf10, psf20, psf30, psf40, + psf50, psf60, psf80, psf100, + psf200}, + drx-InactivityTimer ENUMERATED { + psf1, psf2, psf3, psf4, psf5, psf6, + psf8, psf10, psf20, psf30, psf40, + psf50, psf60, psf80, psf100, + psf200, psf300, psf500, psf750, + psf1280, psf1920, psf2560, psf0-v1020, + spare9, spare8, spare7, spare6, + spare5, spare4, spare3, spare2, + spare1}, + drx-RetransmissionTimer ENUMERATED { + psf1, psf2, psf4, psf6, psf8, psf16, + psf24, psf33}, + longDRX-CycleStartOffset CHOICE { + sf10 INTEGER(0..9), + sf20 INTEGER(0..19), + sf32 INTEGER(0..31), + sf40 INTEGER(0..39), + sf64 INTEGER(0..63), + sf80 INTEGER(0..79), + sf128 INTEGER(0..127), + sf160 INTEGER(0..159), + sf256 INTEGER(0..255), + sf320 INTEGER(0..319), + sf512 INTEGER(0..511), + sf640 INTEGER(0..639), + sf1024 INTEGER(0..1023), + sf1280 INTEGER(0..1279), + sf2048 INTEGER(0..2047), + sf2560 INTEGER(0..2559) + }, + shortDRX SEQUENCE { + shortDRX-Cycle ENUMERATED { + sf2, sf5, sf8, sf10, sf16, sf20, + sf32, sf40, sf64, sf80, sf128, sf160, + sf256, sf320, sf512, sf640}, + drxShortCycleTimer INTEGER (1..16) + } OPTIONAL -- Need OR + } +} + +DRX-Config-v1130 ::= SEQUENCE { + drx-RetransmissionTimer-v1130 ENUMERATED {psf0-v1130} OPTIONAL, --Need OR + longDRX-CycleStartOffset-v1130 CHOICE { + sf60-v1130 INTEGER(0..59), + sf70-v1130 INTEGER(0..69) + } OPTIONAL, --Need OR + shortDRX-Cycle-v1130 ENUMERATED {sf4-v1130} OPTIONAL --Need OR +} +DRX-Config-v1310 ::= SEQUENCE { + longDRX-CycleStartOffset-v1310 SEQUENCE { + sf60-v1310 INTEGER(0..59) + } OPTIONAL --Need OR +} + +DRX-Config-r13 ::= SEQUENCE { + onDurationTimer-v1310 ENUMERATED {psf300, psf400, psf500, psf600, + psf800, psf1000, psf1200, psf1600} OPTIONAL, --Need OR + drx-RetransmissionTimer-v1310 ENUMERATED {psf40, psf64, psf80, psf96, psf112, + psf128, psf160, psf320} + OPTIONAL, --Need OR + drx-ULRetransmissionTimer-r13 ENUMERATED {psf0, psf1, psf2, psf4, psf6, psf8, psf16, + psf24, psf33, psf40, psf64, psf80, psf96, + psf112, psf128, psf160, psf320} + OPTIONAL --Need OR +} + +DRX-Config-r15 ::= SEQUENCE { + drx-RetransmissionTimerShortTTI-r15 ENUMERATED { + tti10, tti20, tti40, tti64, tti80, tti96, + tti112,tti128, tti160, tti320} OPTIONAL, --Need OR + drx-UL-RetransmissionTimerShortTTI-r15 ENUMERATED { + tti0, tti1, tti2, tti4, tti6, tti8, tti16, + tti24, tti33, tti40, tti64, tti80, tti96, tti112, + tti128, tti160, tti320} OPTIONAL --Need OR +} + +PeriodicBSR-Timer-r12 ::= ENUMERATED { + sf5, sf10, sf16, sf20, sf32, sf40, sf64, sf80, + sf128, sf160, sf320, sf640, sf1280, sf2560, + infinity, spare1} + +RetxBSR-Timer-r12 ::= ENUMERATED { + sf320, sf640, sf1280, sf2560, sf5120, + sf10240, spare2, spare1} + +STAG-ToReleaseList-r11 ::= SEQUENCE (SIZE (1..maxSTAG-r11)) OF STAG-Id-r11 + +STAG-ToAddModList-r11 ::= SEQUENCE (SIZE (1..maxSTAG-r11)) OF STAG-ToAddMod-r11 + +STAG-ToAddMod-r11 ::= SEQUENCE { + stag-Id-r11 STAG-Id-r11, + timeAlignmentTimerSTAG-r11 TimeAlignmentTimer, + ... +} + +STAG-Id-r11::= INTEGER (1..maxSTAG-r11) + + +P-C-AndCBSR-r11 ::= SEQUENCE { + p-C-r11 INTEGER (-8..15), + codebookSubsetRestriction-r11 BIT STRING +} + +P-C-AndCBSR-r13 ::= SEQUENCE { + p-C-r13 INTEGER (-8..15), + cbsr-Selection-r13 CHOICE{ + nonPrecoded-r13 SEQUENCE { + codebookSubsetRestriction1-r13 BIT STRING, + codebookSubsetRestriction2-r13 BIT STRING + }, + beamformedK1a-r13 SEQUENCE { + codebookSubsetRestriction3-r13 BIT STRING + }, + beamformedKN-r13 SEQUENCE { + codebookSubsetRestriction-r13 BIT STRING + } + }, + ... +} + +P-C-AndCBSR-r15 ::= SEQUENCE { + p-C-r15 INTEGER (-8..15), + codebookSubsetRestriction4-r15 BIT STRING +} + +P-C-AndCBSR-Pair-r13a ::= SEQUENCE (SIZE (1..2)) OF P-C-AndCBSR-r11 + +P-C-AndCBSR-Pair-r13 ::= SEQUENCE (SIZE (1..2)) OF P-C-AndCBSR-r13 + +P-C-AndCBSR-Pair-r15 ::= SEQUENCE (SIZE (1..2)) OF P-C-AndCBSR-r15 + + +PDCCH-ConfigSCell-r13 ::= SEQUENCE { + skipMonitoringDCI-format0-1A-r13 ENUMERATED {true} OPTIONAL -- Need OR +} + +PDCCH-ConfigLAA-r14 ::= SEQUENCE { + maxNumberOfSchedSubframes-Format0B-r14 ENUMERATED {sf2, sf3, sf4} OPTIONAL, -- Need OR + maxNumberOfSchedSubframes-Format4B-r14 ENUMERATED {sf2, sf3, sf4} OPTIONAL, -- Need OR + skipMonitoringDCI-Format0A-r14 ENUMERATED {true} OPTIONAL, -- Need OR + skipMonitoringDCI-Format4A-r14 ENUMERATED {true} OPTIONAL, -- Need OR + pdcch-CandidateReductions-Format0A-r14 + PDCCH-CandidateReductions-r13 OPTIONAL, -- Need ON + pdcch-CandidateReductions-Format4A-r14 + PDCCH-CandidateReductionsLAA-UL-r14 OPTIONAL, -- Need ON + pdcch-CandidateReductions-Format0B-r14 + PDCCH-CandidateReductionsLAA-UL-r14 OPTIONAL, -- Need ON + pdcch-CandidateReductions-Format4B-r14 + PDCCH-CandidateReductionsLAA-UL-r14 OPTIONAL -- Need ON +} + +PDCCH-CandidateReductionValue-r13 ::= ENUMERATED {n0, n33, n66, n100} + +PDCCH-CandidateReductionValue-r14 ::= ENUMERATED {n0, n50, n100, n150} + +PDCCH-CandidateReductions-r13 ::= CHOICE { + release NULL, + setup SEQUENCE { + pdcch-candidateReductionAL1-r13 PDCCH-CandidateReductionValue-r13, + pdcch-candidateReductionAL2-r13 PDCCH-CandidateReductionValue-r13, + pdcch-candidateReductionAL3-r13 PDCCH-CandidateReductionValue-r13, + pdcch-candidateReductionAL4-r13 PDCCH-CandidateReductionValue-r13, + pdcch-candidateReductionAL5-r13 PDCCH-CandidateReductionValue-r13 + } +} + +PDCCH-CandidateReductionsLAA-UL-r14 ::= CHOICE { + release NULL, + setup SEQUENCE { + pdcch-candidateReductionAL1-r14 PDCCH-CandidateReductionValue-r13, + pdcch-candidateReductionAL2-r14 PDCCH-CandidateReductionValue-r13, + pdcch-candidateReductionAL3-r14 PDCCH-CandidateReductionValue-r14, + pdcch-candidateReductionAL4-r14 PDCCH-CandidateReductionValue-r14, + pdcch-candidateReductionAL5-r14 PDCCH-CandidateReductionValue-r14 + } +} + + +PDCP-Config ::= SEQUENCE { + discardTimer ENUMERATED { + ms50, ms100, ms150, ms300, ms500, + ms750, ms1500, infinity + } OPTIONAL, -- Cond Setup + rlc-AM SEQUENCE { + statusReportRequired BOOLEAN + } OPTIONAL, -- Cond Rlc-AM + rlc-UM SEQUENCE { + pdcp-SN-Size ENUMERATED {len7bits, len12bits} + } OPTIONAL, -- Cond Rlc-UM + headerCompression CHOICE { + notUsed NULL, + rohc SEQUENCE { + maxCID INTEGER (1..16383) DEFAULT 15, + profiles SEQUENCE { + profile0x0001 BOOLEAN, + profile0x0002 BOOLEAN, + profile0x0003 BOOLEAN, + profile0x0004 BOOLEAN, + profile0x0006 BOOLEAN, + profile0x0101 BOOLEAN, + profile0x0102 BOOLEAN, + profile0x0103 BOOLEAN, + profile0x0104 BOOLEAN + }, + ... + } + }, + ..., + [[ rn-IntegrityProtection-r10 ENUMERATED {enabled} OPTIONAL -- Cond RN + ]], + [[ pdcp-SN-Size-v1130 ENUMERATED {len15bits} OPTIONAL -- Cond Rlc-AM2 + ]], + [[ ul-DataSplitDRB-ViaSCG-r12 BOOLEAN OPTIONAL, -- Need ON + t-Reordering-r12 ENUMERATED { + ms0, ms20, ms40, ms60, ms80, ms100, ms120, ms140, + ms160, ms180, ms200, ms220, ms240, ms260, ms280, ms300, + ms500, ms750, spare14, spare13, spare12, spare11, spare10, + spare9, spare8, spare7, spare6, spare5, spare4, spare3, + spare2, spare1} OPTIONAL -- Cond SetupS + ]], + [[ ul-DataSplitThreshold-r13 CHOICE { + release NULL, + setup ENUMERATED { + b0, b100, b200, b400, b800, b1600, b3200, b6400, b12800, + b25600, b51200, b102400, b204800, b409600, b819200, + spare1} + } OPTIONAL, -- Need ON + pdcp-SN-Size-v1310 ENUMERATED {len18bits} OPTIONAL, -- Cond Rlc-AM3 + statusFeedback-r13 CHOICE { + release NULL, + setup SEQUENCE { + statusPDU-TypeForPolling-r13 ENUMERATED {type1, type2} OPTIONAL, -- Need ON + statusPDU-Periodicity-Type1-r13 ENUMERATED { + ms5, ms10, ms20, ms30, ms40, ms50, ms60, ms70, ms80, ms90, + ms100, ms150, ms200, ms300, ms500, ms1000, ms2000, ms5000, + ms10000, ms20000, ms50000} OPTIONAL, -- Need ON + statusPDU-Periodicity-Type2-r13 ENUMERATED { + ms5, ms10, ms20, ms30, ms40, ms50, ms60, ms70, ms80, ms90, + ms100, ms150, ms200, ms300, ms500, ms1000, ms2000, ms5000, + ms10000, ms20000, ms50000} OPTIONAL, -- Need ON + statusPDU-Periodicity-Offset-r13 ENUMERATED { + ms1, ms2, ms5, ms10, ms25, ms50, ms100, ms250, ms500, + ms2500, ms5000, ms25000} OPTIONAL -- Need ON + } + } OPTIONAL -- Need ON + ]], + [[ ul-LWA-Config-r14 CHOICE { + release NULL, + setup SEQUENCE { + ul-LWA-DRB-ViaWLAN-r14 BOOLEAN, + ul-LWA-DataSplitThreshold-r14 ENUMERATED { + b0, b100, b200, b400, b800, b1600, b3200, b6400, + b12800, b25600, b51200, b102400, b204800, b409600, + b819200 } OPTIONAL -- Need OR + } + } OPTIONAL, -- Need ON + uplinkOnlyHeaderCompression-r14 CHOICE { + notUsed-r14 NULL, + rohc-r14 SEQUENCE { + maxCID-r14 INTEGER (1..16383) DEFAULT 15, + profiles-r14 SEQUENCE { + profile0x0006-r14 BOOLEAN + }, + ... + } + } OPTIONAL -- Need ON + ]], + [[ uplinkDataCompression-r15 SEQUENCE { + bufferSize-r15 ENUMERATED {kbyte2, kbyte4, kbyte8, spare1}, + dictionary-r15 ENUMERATED {sip-SDP, operator} OPTIONAL, -- Need OR + ... + } OPTIONAL,-- Cond Rlc-AM2 + pdcp-DuplicationConfig-r15 CHOICE { + release NULL, + setup SEQUENCE { + pdcp-Duplication-r15 ENUMERATED {configured, activated} + } + } OPTIONAL -- Need ON + ]] +} + + +PDSCH-ConfigCommon ::= SEQUENCE { + referenceSignalPower INTEGER (-60..50), + p-b INTEGER (0..3) +} + +PDSCH-ConfigCommon-v1310 ::= SEQUENCE { + pdsch-maxNumRepetitionCEmodeA-r13 ENUMERATED { + r16, r32 } OPTIONAL, -- Need OR + pdsch-maxNumRepetitionCEmodeB-r13 ENUMERATED { + r192, r256, r384, r512, r768, r1024, + r1536, r2048} OPTIONAL -- Need OR +} + +PDSCH-ConfigDedicated::= SEQUENCE { + p-a ENUMERATED { + dB-6, dB-4dot77, dB-3, dB-1dot77, + dB0, dB1, dB2, dB3} +} + +PDSCH-ConfigDedicated-v1130 ::= SEQUENCE { + dmrs-ConfigPDSCH-r11 DMRS-Config-r11 OPTIONAL, -- Need ON + qcl-Operation ENUMERATED {typeA, typeB} OPTIONAL, -- Need OR + re-MappingQCLConfigToReleaseList-r11 RE-MappingQCLConfigToReleaseList-r11 OPTIONAL, -- Need ON + re-MappingQCLConfigToAddModList-r11 RE-MappingQCLConfigToAddModList-r11 OPTIONAL -- Need ON +} + +PDSCH-ConfigDedicated-v1280 ::= SEQUENCE { + tbsIndexAlt-r12 ENUMERATED {a26, a33} OPTIONAL -- Need OR +} + +PDSCH-ConfigDedicated-v1310 ::= SEQUENCE { + dmrs-ConfigPDSCH-v1310 DMRS-Config-v1310 OPTIONAL -- Need ON +} + +PDSCH-ConfigDedicated-v1430 ::= SEQUENCE { + ce-PDSCH-MaxBandwidth-r14 ENUMERATED {bw5, bw20} OPTIONAL, -- Need OP + ce-PDSCH-TenProcesses-r14 ENUMERATED {on} OPTIONAL, -- Need OR + ce-HARQ-AckBundling-r14 ENUMERATED {on} OPTIONAL, -- Need OR + ce-SchedulingEnhancement-r14 ENUMERATED {range1, range2} OPTIONAL, -- Need OR + tbsIndexAlt2-r14 ENUMERATED {b33} OPTIONAL -- Need OR +} + +PDSCH-ConfigDedicated-v1530 ::= SEQUENCE { + qcl-Operation-v1530 ENUMERATED {typeC} OPTIONAL, -- Need OR + tbs-IndexAlt3-r15 ENUMERATED {a37} OPTIONAL, -- Need OR + -- eNote (ToDo): Clarify that eMTC fields (i.e. fields starting with ce-) do not apply + -- for SCell (merging issue) + ce-CQI-AlternativeTableConfig-r15 ENUMERATED {on} OPTIONAL, -- Need OR + ce-PDSCH-64QAM-Config-r15 ENUMERATED {on} OPTIONAL, -- Need OR + ce-PDSCH-FlexibleStartPRB-AllocConfig-r15 ENUMERATED {on} OPTIONAL, -- Need OR + altMCS-TableScalingConfig-r15 ENUMERATED {oDot5, oDot625, oDot75, oDot875} OPTIONAL -- Need OR +} + +PDSCH-ConfigDedicatedSCell-v1430 ::= SEQUENCE { + tbsIndexAlt2-r14 ENUMERATED {b33} OPTIONAL -- Need OR +} + +RE-MappingQCLConfigToAddModList-r11 ::= SEQUENCE (SIZE (1..maxRE-MapQCL-r11)) OF PDSCH-RE-MappingQCL-Config-r11 + +RE-MappingQCLConfigToReleaseList-r11 ::= SEQUENCE (SIZE (1..maxRE-MapQCL-r11)) OF PDSCH-RE-MappingQCL-ConfigId-r11 + +PDSCH-RE-MappingQCL-Config-r11 ::= SEQUENCE { + pdsch-RE-MappingQCL-ConfigId-r11 PDSCH-RE-MappingQCL-ConfigId-r11, + optionalSetOfFields-r11 SEQUENCE { + crs-PortsCount-r11 ENUMERATED {n1, n2, n4, spare1}, + crs-FreqShift-r11 INTEGER (0..5), + mbsfn-SubframeConfigList-r11 CHOICE { + release NULL, + setup SEQUENCE { + subframeConfigList MBSFN-SubframeConfigList + } + } OPTIONAL, -- Need ON + pdsch-Start-r11 ENUMERATED {reserved, n1, n2, n3, n4, assigned} + } OPTIONAL, -- Need OP + csi-RS-ConfigZPId-r11 CSI-RS-ConfigZPId-r11, + qcl-CSI-RS-ConfigNZPId-r11 CSI-RS-ConfigNZPId-r11 OPTIONAL, -- Need OR + ..., + [[ mbsfn-SubframeConfigList-v1430 CHOICE { + release NULL, + setup SEQUENCE { + subframeConfigList-v1430 MBSFN-SubframeConfigList-v1430 + } + } OPTIONAL -- Need OP + ]], + [[ codewordOneConfig-v1530 CHOICE { + release NULL, + setup SEQUENCE { + crs-PortsCount-v1530 ENUMERATED {n1, n2, n4, spare1}, + crs-FreqShift-v1530 INTEGER (0..5), + mbsfn-SubframeConfigList-v1530 MBSFN-SubframeConfigList OPTIONAL, + mbsfn-SubframeConfigListExt-v1530 MBSFN-SubframeConfigList-v1430 OPTIONAL, + pdsch-Start-v1530 ENUMERATED {reserved, n1, n2, n3, n4, assigned}, + csi-RS-ConfigZPId-v1530 CSI-RS-ConfigZPId-r11, + qcl-CSI-RS-ConfigNZPId-v1530 CSI-RS-ConfigNZPId-r11 OPTIONAL + } + } OPTIONAL -- Cond TypeC + ]] +} + + +PDSCH-RE-MappingQCL-ConfigId-r11 ::= INTEGER (1..maxRE-MapQCL-r11) + +PerCC-GapIndicationList-r14 ::= SEQUENCE (SIZE (1..maxServCell-r13)) OF PerCC-GapIndication-r14 + +PerCC-GapIndication-r14 ::= SEQUENCE { + servCellId-r14 ServCellIndex-r13, + gapIndication-r14 ENUMERATED {gap, ncsg, nogap-noNcsg} +} + + +PHICH-Config ::= SEQUENCE { + phich-Duration ENUMERATED {normal, extended}, + phich-Resource ENUMERATED {oneSixth, half, one, two} +} + + +PhysicalConfigDedicated ::= SEQUENCE { + pdsch-ConfigDedicated PDSCH-ConfigDedicated OPTIONAL, -- Need ON + pucch-ConfigDedicated PUCCH-ConfigDedicated OPTIONAL, -- Need ON + pusch-ConfigDedicated PUSCH-ConfigDedicated OPTIONAL, -- Need ON + uplinkPowerControlDedicated UplinkPowerControlDedicated OPTIONAL, -- Need ON + tpc-PDCCH-ConfigPUCCH TPC-PDCCH-Config OPTIONAL, -- Need ON + tpc-PDCCH-ConfigPUSCH TPC-PDCCH-Config OPTIONAL, -- Need ON + cqi-ReportConfig CQI-ReportConfig OPTIONAL, -- Cond CQI-r8 + soundingRS-UL-ConfigDedicated SoundingRS-UL-ConfigDedicated OPTIONAL, -- Need ON + antennaInfo CHOICE { + explicitValue AntennaInfoDedicated, + defaultValue NULL + } OPTIONAL, -- Cond AI-r8 + schedulingRequestConfig SchedulingRequestConfig OPTIONAL, -- Need ON + ..., + [[ cqi-ReportConfig-v920 CQI-ReportConfig-v920 OPTIONAL, -- Cond CQI-r8 + antennaInfo-v920 AntennaInfoDedicated-v920 OPTIONAL -- Cond AI-r8 + ]], + [[ antennaInfo-r10 CHOICE { + explicitValue-r10 AntennaInfoDedicated-r10, + defaultValue NULL + } OPTIONAL, -- Cond AI-r10 + antennaInfoUL-r10 AntennaInfoUL-r10 OPTIONAL, -- Need ON + cif-Presence-r10 BOOLEAN OPTIONAL, -- Need ON + cqi-ReportConfig-r10 CQI-ReportConfig-r10 OPTIONAL, -- Cond CQI-r10 + csi-RS-Config-r10 CSI-RS-Config-r10 OPTIONAL, -- Need ON + pucch-ConfigDedicated-v1020 PUCCH-ConfigDedicated-v1020 OPTIONAL, -- Need ON + pusch-ConfigDedicated-v1020 PUSCH-ConfigDedicated-v1020 OPTIONAL, -- Need ON + schedulingRequestConfig-v1020 SchedulingRequestConfig-v1020 OPTIONAL, -- Need ON + soundingRS-UL-ConfigDedicated-v1020 + SoundingRS-UL-ConfigDedicated-v1020 OPTIONAL, -- Need ON + soundingRS-UL-ConfigDedicatedAperiodic-r10 + SoundingRS-UL-ConfigDedicatedAperiodic-r10 OPTIONAL, -- Need ON + uplinkPowerControlDedicated-v1020 + UplinkPowerControlDedicated-v1020 OPTIONAL -- Need ON + ]], + [[ additionalSpectrumEmissionCA-r10 CHOICE { + release NULL, + setup SEQUENCE { + additionalSpectrumEmissionPCell-r10 AdditionalSpectrumEmission + } + } OPTIONAL -- Need ON + ]], + [[ -- DL configuration as well as configuration applicable for DL and UL + csi-RS-ConfigNZPToReleaseList-r11 + CSI-RS-ConfigNZPToReleaseList-r11 OPTIONAL, -- Need ON + csi-RS-ConfigNZPToAddModList-r11 + CSI-RS-ConfigNZPToAddModList-r11 OPTIONAL, -- Need ON + csi-RS-ConfigZPToReleaseList-r11 + CSI-RS-ConfigZPToReleaseList-r11 OPTIONAL, -- Need ON + csi-RS-ConfigZPToAddModList-r11 CSI-RS-ConfigZPToAddModList-r11 OPTIONAL, -- Need ON + epdcch-Config-r11 EPDCCH-Config-r11 OPTIONAL, -- Need ON + pdsch-ConfigDedicated-v1130 PDSCH-ConfigDedicated-v1130 OPTIONAL, -- Need ON + -- UL configuration + cqi-ReportConfig-v1130 CQI-ReportConfig-v1130 OPTIONAL, -- Need ON + pucch-ConfigDedicated-v1130 PUCCH-ConfigDedicated-v1130 OPTIONAL, -- Need ON + pusch-ConfigDedicated-v1130 PUSCH-ConfigDedicated-v1130 OPTIONAL, -- Need ON + uplinkPowerControlDedicated-v1130 + UplinkPowerControlDedicated-v1130 OPTIONAL -- Need ON + ]], + [[ antennaInfo-v1250 AntennaInfoDedicated-v1250 OPTIONAL, -- Cond AI-r10 + eimta-MainConfig-r12 EIMTA-MainConfig-r12 OPTIONAL, -- Need ON + eimta-MainConfigPCell-r12 EIMTA-MainConfigServCell-r12 OPTIONAL, -- Need ON + pucch-ConfigDedicated-v1250 PUCCH-ConfigDedicated-v1250 OPTIONAL, -- Need ON + cqi-ReportConfigPCell-v1250 CQI-ReportConfig-v1250 OPTIONAL, -- Need ON + uplinkPowerControlDedicated-v1250 + UplinkPowerControlDedicated-v1250 OPTIONAL, -- Need ON + pusch-ConfigDedicated-v1250 PUSCH-ConfigDedicated-v1250 OPTIONAL, -- Need ON + csi-RS-Config-v1250 CSI-RS-Config-v1250 OPTIONAL -- Need ON + ]], + [[ pdsch-ConfigDedicated-v1280 PDSCH-ConfigDedicated-v1280 OPTIONAL -- Need ON + ]], + [[ pdsch-ConfigDedicated-v1310 PDSCH-ConfigDedicated-v1310 OPTIONAL, -- Need ON + pucch-ConfigDedicated-r13 PUCCH-ConfigDedicated-r13 OPTIONAL, -- Need ON + pusch-ConfigDedicated-r13 PUSCH-ConfigDedicated-r13 OPTIONAL, -- Need ON + pdcch-CandidateReductions-r13 + PDCCH-CandidateReductions-r13 OPTIONAL, -- Need ON + cqi-ReportConfig-v1310 CQI-ReportConfig-v1310 OPTIONAL, -- Need ON + soundingRS-UL-ConfigDedicated-v1310 + SoundingRS-UL-ConfigDedicated-v1310 OPTIONAL, -- Need ON + soundingRS-UL-ConfigDedicatedUpPTsExt-r13 + SoundingRS-UL-ConfigDedicatedUpPTsExt-r13 OPTIONAL, -- Need ON + soundingRS-UL-ConfigDedicatedAperiodic-v1310 + SoundingRS-UL-ConfigDedicatedAperiodic-v1310 OPTIONAL, -- Need ON + soundingRS-UL-ConfigDedicatedAperiodicUpPTsExt-r13 + SoundingRS-UL-ConfigDedicatedAperiodicUpPTsExt-r13 OPTIONAL, -- Need ON + csi-RS-Config-v1310 CSI-RS-Config-v1310 OPTIONAL, -- Need ON + ce-Mode-r13 CHOICE { + release NULL, + setup ENUMERATED {ce-ModeA,ce-ModeB} + } OPTIONAL, -- Need ON + csi-RS-ConfigNZPToAddModListExt-r13 CSI-RS-ConfigNZPToAddModListExt-r13 OPTIONAL, -- Need ON + csi-RS-ConfigNZPToReleaseListExt-r13 CSI-RS-ConfigNZPToReleaseListExt-r13 OPTIONAL -- Need ON + ]], + [[ cqi-ReportConfig-v1320 CQI-ReportConfig-v1320 OPTIONAL -- Need ON + ]], + [[ typeA-SRS-TPC-PDCCH-Group-r14 CHOICE { + release NULL, + setup SEQUENCE (SIZE (1..32)) OF SRS-TPC-PDCCH-Config-r14 + } OPTIONAL, -- Need ON + must-Config-r14 CHOICE{ + release NULL, + setup SEQUENCE { + k-max-r14 ENUMERATED {l1, l3}, + p-a-must-r14 ENUMERATED { + dB-6, dB-4dot77, dB-3, dB-1dot77, + dB0, dB1, dB2, dB3} OPTIONAL -- Need ON + } + } OPTIONAL, -- Need ON + pusch-EnhancementsConfig-r14 PUSCH-EnhancementsConfig-r14 OPTIONAL, -- Need ON + ce-pdsch-pusch-EnhancementConfig-r14 ENUMERATED {on} OPTIONAL, -- Need OR + antennaInfo-v1430 AntennaInfoDedicated-v1430 OPTIONAL, -- Need ON + pucch-ConfigDedicated-v1430 PUCCH-ConfigDedicated-v1430 OPTIONAL, -- Need ON + pdsch-ConfigDedicated-v1430 PDSCH-ConfigDedicated-v1430 OPTIONAL, -- Need ON + pusch-ConfigDedicated-v1430 PUSCH-ConfigDedicated-v1430 OPTIONAL, -- Need ON + soundingRS-UL-PeriodicConfigDedicatedList-r14 SEQUENCE (SIZE (1..2)) OF SoundingRS-UL-ConfigDedicated OPTIONAL, -- Cond PeriodicSRSPCell + soundingRS-UL-PeriodicConfigDedicatedUpPTsExtList-r14 SEQUENCE (SIZE (1..4)) OF SoundingRS-UL-ConfigDedicatedUpPTsExt-r13 OPTIONAL, -- Cond PeriodicSRSExt + soundingRS-UL-AperiodicConfigDedicatedList-r14 SEQUENCE (SIZE (1..2)) OF SoundingRS-UL-ConfigDedicatedAperiodic-r10 OPTIONAL, -- Cond AperiodicSRS + soundingRS-UL-ConfigDedicatedApUpPTsExtList-r14 SEQUENCE (SIZE (1..4)) OF SoundingRS-UL-ConfigDedicatedAperiodicUpPTsExt-r13 OPTIONAL, -- Cond AperiodicSRSExt + csi-RS-Config-v1430 CSI-RS-Config-v1430 OPTIONAL, -- Need ON + csi-RS-ConfigZP-ApList-r14 CSI-RS-ConfigZP-ApList-r14 OPTIONAL, -- Need ON + cqi-ReportConfig-v1430 CQI-ReportConfig-v1430 OPTIONAL, -- Need ON + semiOpenLoop-r14 BOOLEAN OPTIONAL -- Need ON + ]], + [[ csi-RS-Config-v1480 CSI-RS-Config-v1480 OPTIONAL -- Need ON + ]], + [[ physicalConfigDedicatedSTTI-r15 PhysicalConfigDedicatedSTTI-r15 OPTIONAL, -- Need ON + pdsch-ConfigDedicated-v1530 PDSCH-ConfigDedicated-v1530 OPTIONAL, -- Need ON + pusch-ConfigDedicated-v1530 PUSCH-ConfigDedicated-v1530 OPTIONAL, -- Need ON + cqi-ReportConfig-v1530 CQI-ReportConfig-v1530 OPTIONAL,-- Need ON + antennaInfo-v1530 AntennaInfoDedicated-v1530 OPTIONAL,-- Need ON + csi-RS-Config-v1530 CSI-RS-Config-v1530 OPTIONAL, -- Need ON + uplinkPowerControlDedicated-v1530 + UplinkPowerControlDedicated-v1530 OPTIONAL, -- Need ON + semiStaticCFI-Config-r15 CHOICE{ + release NULL, + setup CHOICE{ + cfi-Config-r15 CFI-Config-r15, + cfi-PatternConfig-r15 CFI-PatternConfig-r15 + } + } OPTIONAL, -- Need ON + blindPDSCH-Repetition-Config-r15 CHOICE{ + release NULL, + setup SEQUENCE { + blindSubframePDSCH-Repetitions-r15 BOOLEAN, + blindSlotSubslotPDSCH-Repetitions-r15 BOOLEAN, + maxNumber-SubframePDSCH-Repetitions-r15 ENUMERATED {n4,n6} OPTIONAL, -- Need ON + maxNumber-SlotSubslotPDSCH-Repetitions-r15 ENUMERATED {n4,n6} OPTIONAL, -- Need ON + rv-SubframePDSCH-Repetitions-r15 ENUMERATED {dlrvseq1, dlrvseq2} OPTIONAL, -- Need ON + rv-SlotsublotPDSCH-Repetitions-r15 ENUMERATED {dlrvseq1, dlrvseq2} OPTIONAL, -- Need ON + numberOfProcesses-SubframePDSCH-Repetitions-r15 INTEGER(1..16) OPTIONAL, -- Need ON + numberOfProcesses-SlotSubslotPDSCH-Repetitions-r15 INTEGER(1..16) OPTIONAL, -- Need ON + mcs-restrictionSubframePDSCH-Repetitions-r15 ENUMERATED {n0, n1} OPTIONAL, -- Need ON + mcs-restrictionSlotSubslotPDSCH-Repetitions-r15 ENUMERATED {n0, n1} OPTIONAL -- Need ON + } + } OPTIONAL -- Need ON + ]] +} + +PhysicalConfigDedicated-v1370 ::= SEQUENCE { + pucch-ConfigDedicated-v1370 PUCCH-ConfigDedicated-v1370 OPTIONAL -- Cond PUCCH-Format4or5 +} + +PhysicalConfigDedicatedSCell-r10 ::= SEQUENCE { + -- DL configuration as well as configuration applicable for DL and UL + nonUL-Configuration-r10 SEQUENCE { + antennaInfo-r10 + AntennaInfoDedicated-r10 OPTIONAL, -- Need ON + crossCarrierSchedulingConfig-r10 + CrossCarrierSchedulingConfig-r10 OPTIONAL, -- Need ON + csi-RS-Config-r10 CSI-RS-Config-r10 OPTIONAL, -- Need ON + pdsch-ConfigDedicated-r10 PDSCH-ConfigDedicated OPTIONAL -- Need ON + } OPTIONAL, -- Cond SCellAdd + -- UL configuration + ul-Configuration-r10 SEQUENCE { + antennaInfoUL-r10 AntennaInfoUL-r10 OPTIONAL, -- Need ON + pusch-ConfigDedicatedSCell-r10 + PUSCH-ConfigDedicatedSCell-r10 OPTIONAL, -- Cond PUSCH-SCell1 + uplinkPowerControlDedicatedSCell-r10 + UplinkPowerControlDedicatedSCell-r10 OPTIONAL, -- Need ON + cqi-ReportConfigSCell-r10 CQI-ReportConfigSCell-r10 OPTIONAL, -- Need ON + soundingRS-UL-ConfigDedicated-r10 + SoundingRS-UL-ConfigDedicated OPTIONAL, -- Need ON + soundingRS-UL-ConfigDedicated-v1020 + SoundingRS-UL-ConfigDedicated-v1020 OPTIONAL, -- Need ON + soundingRS-UL-ConfigDedicatedAperiodic-r10 + SoundingRS-UL-ConfigDedicatedAperiodic-r10 OPTIONAL -- Need ON + } OPTIONAL, -- Cond CommonUL + ..., + [[ -- DL configuration as well as configuration applicable for DL and UL + csi-RS-ConfigNZPToReleaseList-r11 + CSI-RS-ConfigNZPToReleaseList-r11 OPTIONAL, -- Need ON + csi-RS-ConfigNZPToAddModList-r11 + CSI-RS-ConfigNZPToAddModList-r11 OPTIONAL, -- Need ON + csi-RS-ConfigZPToReleaseList-r11 + CSI-RS-ConfigZPToReleaseList-r11 OPTIONAL, -- Need ON + csi-RS-ConfigZPToAddModList-r11 + CSI-RS-ConfigZPToAddModList-r11 OPTIONAL, -- Need ON + epdcch-Config-r11 EPDCCH-Config-r11 OPTIONAL, -- Need ON + pdsch-ConfigDedicated-v1130 PDSCH-ConfigDedicated-v1130 OPTIONAL, -- Need ON + -- UL configuration + cqi-ReportConfig-v1130 CQI-ReportConfig-v1130 OPTIONAL, -- Need ON + pusch-ConfigDedicated-v1130 + PUSCH-ConfigDedicated-v1130 OPTIONAL, -- Cond PUSCH-SCell1 + uplinkPowerControlDedicatedSCell-v1130 + UplinkPowerControlDedicated-v1130 OPTIONAL -- Need ON + ]], + [[ antennaInfo-v1250 AntennaInfoDedicated-v1250 OPTIONAL, -- Need ON + eimta-MainConfigSCell-r12 + EIMTA-MainConfigServCell-r12 OPTIONAL, -- Need ON + cqi-ReportConfigSCell-v1250 CQI-ReportConfig-v1250 OPTIONAL, -- Need ON + uplinkPowerControlDedicatedSCell-v1250 + UplinkPowerControlDedicated-v1250 OPTIONAL, -- Need ON + csi-RS-Config-v1250 CSI-RS-Config-v1250 OPTIONAL -- Need ON + ]], + [[ pdsch-ConfigDedicated-v1280 PDSCH-ConfigDedicated-v1280 OPTIONAL -- Need ON + ]], + [[ pucch-Cell-r13 ENUMERATED {true} OPTIONAL, -- Cond PUCCH-SCell1 + pucch-SCell CHOICE{ + release NULL, + setup SEQUENCE { + pucch-ConfigDedicated-r13 + PUCCH-ConfigDedicated-r13 OPTIONAL, -- Need ON + schedulingRequestConfig-r13 + SchedulingRequestConfigSCell-r13 OPTIONAL, -- Need ON + tpc-PDCCH-ConfigPUCCH-SCell-r13 + TPC-PDCCH-ConfigSCell-r13 OPTIONAL, -- Need ON + pusch-ConfigDedicated-r13 + PUSCH-ConfigDedicated-r13 OPTIONAL, -- Cond PUSCH-SCell + uplinkPowerControlDedicated-r13 + UplinkPowerControlDedicatedSCell-v1310 OPTIONAL -- Need ON + } + } OPTIONAL, -- Need ON + crossCarrierSchedulingConfig-r13 + CrossCarrierSchedulingConfig-r13 OPTIONAL, -- Cond Cross-Carrier-Config + pdcch-ConfigSCell-r13 PDCCH-ConfigSCell-r13 OPTIONAL, -- Need ON + cqi-ReportConfig-v1310 CQI-ReportConfig-v1310 OPTIONAL, -- Need ON + pdsch-ConfigDedicated-v1310 PDSCH-ConfigDedicated-v1310 OPTIONAL, -- Need ON + soundingRS-UL-ConfigDedicated-v1310 + SoundingRS-UL-ConfigDedicated-v1310 OPTIONAL, -- Need ON + soundingRS-UL-ConfigDedicatedUpPTsExt-r13 + SoundingRS-UL-ConfigDedicatedUpPTsExt-r13 OPTIONAL, -- Need ON + soundingRS-UL-ConfigDedicatedAperiodic-v1310 + SoundingRS-UL-ConfigDedicatedAperiodic-v1310 OPTIONAL, -- Need ON + soundingRS-UL-ConfigDedicatedAperiodicUpPTsExt-r13 + SoundingRS-UL-ConfigDedicatedAperiodicUpPTsExt-r13 OPTIONAL, -- Need ON + csi-RS-Config-v1310 CSI-RS-Config-v1310 OPTIONAL, -- Need ON + laa-SCellConfiguration-r13 LAA-SCellConfiguration-r13 OPTIONAL, -- Need ON + csi-RS-ConfigNZPToAddModListExt-r13 CSI-RS-ConfigNZPToAddModListExt-r13 OPTIONAL, -- Need ON + csi-RS-ConfigNZPToReleaseListExt-r13 CSI-RS-ConfigNZPToReleaseListExt-r13 OPTIONAL -- Need ON + ]], + [[ cqi-ReportConfig-v1320 CQI-ReportConfig-v1320 OPTIONAL -- Need ON + ]], + [[ laa-SCellConfiguration-v1430 LAA-SCellConfiguration-v1430 + OPTIONAL, -- Need ON + typeB-SRS-TPC-PDCCH-Config-r14 SRS-TPC-PDCCH-Config-r14 OPTIONAL, -- Need ON + + uplinkPUSCH-LessPowerControlDedicated-v1430 UplinkPUSCH-LessPowerControlDedicated-v1430 OPTIONAL, -- Need ON + soundingRS-UL-PeriodicConfigDedicatedList-r14 SEQUENCE (SIZE (1..2)) OF SoundingRS-UL-ConfigDedicated OPTIONAL, -- Cond PeriodicSRS + soundingRS-UL-PeriodicConfigDedicatedUpPTsExtList-r14 SEQUENCE (SIZE (1..4)) OF SoundingRS-UL-ConfigDedicatedUpPTsExt-r13 OPTIONAL, -- Cond PeriodicSRSExt + soundingRS-UL-AperiodicConfigDedicatedList-r14 SEQUENCE (SIZE (1..2)) OF SoundingRS-AperiodicSet-r14 OPTIONAL, -- Cond AperiodicSRS + soundingRS-UL-ConfigDedicatedApUpPTsExtList-r14 SEQUENCE (SIZE (1..4)) OF SoundingRS-AperiodicSetUpPTsExt-r14 OPTIONAL, -- Cond AperiodicSRSExt + must-Config-r14 CHOICE{ + release NULL, + setup SEQUENCE { + k-max-r14 ENUMERATED {l1, l3}, + p-a-must-r14 ENUMERATED { + dB-6, dB-4dot77, dB-3, dB-1dot77, + dB0, dB1, dB2, dB3} OPTIONAL -- Need ON + } + } OPTIONAL, -- Need ON + pusch-ConfigDedicated-v1430 PUSCH-ConfigDedicatedSCell-v1430 OPTIONAL, -- Need ON + csi-RS-Config-v1430 CSI-RS-Config-v1430 OPTIONAL, -- Need ON + csi-RS-ConfigZP-ApList-r14 CSI-RS-ConfigZP-ApList-r14 OPTIONAL, -- Need ON + cqi-ReportConfig-v1430 CQI-ReportConfig-v1430 OPTIONAL, -- Need ON + semiOpenLoop-r14 BOOLEAN OPTIONAL, -- Need ON + pdsch-ConfigDedicatedSCell-v1430 PDSCH-ConfigDedicatedSCell-v1430 OPTIONAL -- Need ON + ]], + [[ csi-RS-Config-v1480 CSI-RS-Config-v1480 OPTIONAL -- Need ON + ]], + [[ physicalConfigDedicatedSTTI-r15 PhysicalConfigDedicatedSTTI-r15 OPTIONAL, -- Need ON + pdsch-ConfigDedicated-v1530 PDSCH-ConfigDedicated-v1530 OPTIONAL, -- Need ON + cqi-ReportConfig-v1530 CQI-ReportConfig-v1530 OPTIONAL, -- Need ON + cqi-ReportConfigSCell-r15 CQI-ReportConfigSCell-r15 OPTIONAL, -- Need ON + cqi-ShortConfigSCell-r15 CQI-ShortConfigSCell-r15 OPTIONAL, -- Need ON + csi-RS-Config-v1530 CSI-RS-Config-v1530 OPTIONAL, -- Need ON + uplinkPowerControlDedicatedSCell-v1530 + UplinkPowerControlDedicated-v1530 OPTIONAL, -- Need ON + laa-SCellConfiguration-v1530 LAA-SCellConfiguration-v1530 OPTIONAL, -- Need ON + pusch-ConfigDedicated-v1530 PUSCH-ConfigDedicatedScell-v1530 OPTIONAL, -- Cond AUL + semiStaticCFI-Config-r15 CHOICE{ + release NULL, + setup CHOICE{ + cfi-Config-r15 CFI-Config-r15, + cfi-PatternConfig-r15 CFI-PatternConfig-r15 + } + } OPTIONAL, -- Need ON + blindPDSCH-Repetition-Config-r15 CHOICE{ + release NULL, + setup SEQUENCE { + blindSubframePDSCH-Repetitions-r15 BOOLEAN, + blindSlotSubslotPDSCH-Repetitions-r15 BOOLEAN, + maxNumber-SubframePDSCH-Repetitions-r15 ENUMERATED {n4,n6} OPTIONAL, -- Need ON + maxNumber-SlotSubslotPDSCH-Repetitions-r15 ENUMERATED {n4,n6} OPTIONAL, -- Need ON + rv-SubframePDSCH-Repetitions-r15 ENUMERATED {dlrvseq1, dlrvseq2} OPTIONAL, -- Need ON + rv-SlotsublotPDSCH-Repetitions-r15 ENUMERATED {dlrvseq1, dlrvseq2} OPTIONAL, -- Need ON + numberOfProcesses-SubframePDSCH-Repetitions-r15 INTEGER(1..16) OPTIONAL, -- Need ON + numberOfProcesses-SlotSubslotPDSCH-Repetitions-r15 INTEGER(1..16) OPTIONAL, -- Need ON + mcs-restrictionSubframePDSCH-Repetitions-r15 ENUMERATED {n0, n1} OPTIONAL, -- Need ON + mcs-restrictionSlotSubslotPDSCH-Repetitions-r15 ENUMERATED {n0, n1} OPTIONAL -- Need ON + } + } OPTIONAL -- Need ON + ]] +} + +PhysicalConfigDedicatedSCell-v1370 ::= SEQUENCE { + pucch-SCell-v1370 CHOICE{ + release NULL, + setup SEQUENCE { + pucch-ConfigDedicated-v1370 PUCCH-ConfigDedicated-v1370 OPTIONAL -- Cond PUCCH-Format4or5 + } + } +} + +CFI-Config-r15 ::= SEQUENCE { + cfi-SubframeNonMBSFN-r15 INTEGER (1..4) OPTIONAL, -- Need ON + cfi-SlotSubslotNonMBSFN-r15 INTEGER (1..3) OPTIONAL, -- Need ON + cfi-SubframeMBSFN-r15 INTEGER (1..2) OPTIONAL, -- Need ON + cfi-SlotSubslotMBSFN-r15 INTEGER (1..2) OPTIONAL -- Need ON +} + +CFI-PatternConfig-r15 ::= SEQUENCE { + cfi-PatternSubframe-r15 SEQUENCE (SIZE(10)) OF INTEGER (1..4) OPTIONAL, -- Need ON + cfi-PatternSlotSubslot-r15 SEQUENCE (SIZE(10)) OF INTEGER (1..3) OPTIONAL -- Need ON +} + +LAA-SCellConfiguration-r13 ::= SEQUENCE { + subframeStartPosition-r13 ENUMERATED {s0, s07}, + laa-SCellSubframeConfig-r13 BIT STRING (SIZE(8)) +} + +LAA-SCellConfiguration-v1430 ::= SEQUENCE { + crossCarrierSchedulingConfig-UL-r14 CHOICE { + release NULL, + setup SEQUENCE { + crossCarrierSchedulingConfigLAA-UL-r14 CrossCarrierSchedulingConfigLAA-UL-r14 + } + } OPTIONAL, -- Cond Cross-Carrier-ConfigUL + lbt-Config-r14 LBT-Config-r14 OPTIONAL, -- Need ON + pdcch-ConfigLAA-r14 PDCCH-ConfigLAA-r14 OPTIONAL, -- Need ON + absenceOfAnyOtherTechnology-r14 ENUMERATED {true} OPTIONAL, -- Need OR + soundingRS-UL-ConfigDedicatedAperiodic-v1430 + SoundingRS-UL-ConfigDedicatedAperiodic-v1430 OPTIONAL -- Need ON +} + +LAA-SCellConfiguration-v1530 ::= SEQUENCE { + aul-Config-r15 AUL-Config-r15 OPTIONAL, -- Need ON + pusch-ModeConfigLAA-r15 PUSCH-ModeConfigLAA-r15 OPTIONAL -- Need OR +} + +PUSCH-ModeConfigLAA-r15 ::= SEQUENCE { + laa-PUSCH-Mode1 BOOLEAN, + laa-PUSCH-Mode2 BOOLEAN, + laa-PUSCH-Mode3 BOOLEAN +} + +LBT-Config-r14 ::= CHOICE{ + maxEnergyDetectionThreshold-r14 INTEGER(-85..-52), + energyDetectionThresholdOffset-r14 INTEGER(-13..20) +} + + +CSI-RS-ConfigNZPToAddModList-r11 ::= SEQUENCE (SIZE (1..maxCSI-RS-NZP-r11)) OF CSI-RS-ConfigNZP-r11 + +CSI-RS-ConfigNZPToAddModListExt-r13 ::= SEQUENCE (SIZE (1..maxCSI-RS-NZP-v1310)) OF CSI-RS-ConfigNZP-r11 + +CSI-RS-ConfigNZPToAddModList-r15 ::= SEQUENCE (SIZE (1..maxCSI-RS-NZP-r13)) OF CSI-RS-ConfigNZP-r11 + +CSI-RS-ConfigNZPToReleaseList-r11 ::= SEQUENCE (SIZE (1..maxCSI-RS-NZP-r11)) OF CSI-RS-ConfigNZPId-r11 + +CSI-RS-ConfigNZPToReleaseListExt-r13 ::= SEQUENCE (SIZE (1..maxCSI-RS-NZP-v1310)) OF CSI-RS-ConfigNZPId-v1310 + +CSI-RS-ConfigNZPToReleaseList-r15 ::= SEQUENCE (SIZE (1..maxCSI-RS-NZP-r13)) OF CSI-RS-ConfigNZPId-r13 + +CSI-RS-ConfigZPToAddModList-r11 ::= SEQUENCE (SIZE (1..maxCSI-RS-ZP-r11)) OF CSI-RS-ConfigZP-r11 + +CSI-RS-ConfigZPToReleaseList-r11 ::= SEQUENCE (SIZE (1..maxCSI-RS-ZP-r11)) OF CSI-RS-ConfigZPId-r11 + +PhysicalConfigDedicatedSTTI-r15 ::= CHOICE { + release NULL, + setup SEQUENCE { + antennaInfoDedicatedSTTI-r15 AntennaInfoDedicatedSTTI-r15 OPTIONAL, -- Need ON + antennaInfoUL-STTI-r15 AntennaInfoUL-STTI-r15 OPTIONAL, -- Need ON + pucch-ConfigDedicated-v1530 PUCCH-ConfigDedicated-v1530 OPTIONAL, -- Need ON + schedulingRequestConfig-v1530 SchedulingRequestConfig-v1530 OPTIONAL, -- Need ON + uplinkPowerControlDedicatedSTTI-r15 UplinkPowerControlDedicatedSTTI-r15 OPTIONAL, --Need ON + cqi-ReportConfig-r15 CQI-ReportConfig-r15 OPTIONAL, -- Need ON + csi-RS-Config-r15 CSI-RS-Config-r15 OPTIONAL, -- Need ON + csi-RS-ConfigNZPToReleaseList-r15 CSI-RS-ConfigNZPToReleaseList-r15 OPTIONAL, -- Need ON + csi-RS-ConfigNZPToAddModList-r15 CSI-RS-ConfigNZPToAddModList-r15 OPTIONAL, -- Need ON + csi-RS-ConfigZPToReleaseList-r15 CSI-RS-ConfigZPToReleaseList-r11 OPTIONAL, -- Need ON + csi-RS-ConfigZPToAddModList-r11 CSI-RS-ConfigZPToAddModList-r11 OPTIONAL, -- Need ON + csi-RS-ConfigZP-ApList-r15 CSI-RS-ConfigZP-ApList-r14 OPTIONAL, -- Need ON + eimta-MainConfig-r12 EIMTA-MainConfig-r12 OPTIONAL, -- Need ON + eimta-MainConfigServCell-r15 EIMTA-MainConfigServCell-r12 OPTIONAL, -- Need ON + semiOpenLoopSTTI-r15 BOOLEAN, + slotOrSubslotPDSCH-Config-r15 SlotOrSubslotPDSCH-Config-r15 OPTIONAL, -- Need ON + slotOrSubslotPUSCH-Config-r15 SlotOrSubslotPUSCH-Config-r15 OPTIONAL, -- Need ON + spdcch-Config-r15 SPDCCH-Config-r15 OPTIONAL, -- Need ON + spucch-Config-r15 SPUCCH-Config-r15 OPTIONAL, -- Need ON + srs-DCI7-TriggeringConfig-r15 BOOLEAN, + shortProcessingTime-r15 BOOLEAN, + shortTTI-r15 ShortTTI-r15 OPTIONAL -- Need ON + } +} + +SoundingRS-AperiodicSet-r14 ::= SEQUENCE{ + srs-CC-SetIndexList-r14 + SEQUENCE (SIZE (1..4)) OF SRS-CC-SetIndex-r14 + OPTIONAL, -- Cond SRS-Trigger-TypeA + soundingRS-UL-ConfigDedicatedAperiodic-r14 + SoundingRS-UL-ConfigDedicatedAperiodic-r10 +} + +SoundingRS-AperiodicSetUpPTsExt-r14 ::= SEQUENCE{ + srs-CC-SetIndexList-r14 + SEQUENCE (SIZE (1..4)) OF SRS-CC-SetIndex-r14 + OPTIONAL, -- Cond SRS-Trigger-TypeA + soundingRS-UL-ConfigDedicatedAperiodicUpPTsExt-r14 + SoundingRS-UL-ConfigDedicatedAperiodicUpPTsExt-r13 +} + +ShortTTI-r15 ::= SEQUENCE { + dl-STTI-Length-r15 ShortTTI-Length-r15 OPTIONAL, -- Need OR + ul-STTI-Length-r15 ShortTTI-Length-r15 OPTIONAL -- Need OR +} + +ShortTTI-Length-r15 ::= ENUMERATED {slot, subslot} + + +P-Max ::= INTEGER (-30..33) + + +PRACH-ConfigSIB ::= SEQUENCE { + rootSequenceIndex INTEGER (0..837), + prach-ConfigInfo PRACH-ConfigInfo +} + +PRACH-ConfigSIB-v1310 ::= SEQUENCE { + rsrp-ThresholdsPrachInfoList-r13 RSRP-ThresholdsPrachInfoList-r13, + mpdcch-startSF-CSS-RA-r13 CHOICE { + fdd-r13 ENUMERATED {v1, v1dot5, v2, v2dot5, v4, v5, v8, + v10}, + tdd-r13 ENUMERATED {v1, v2, v4, v5, v8, v10, v20, spare} + } OPTIONAL, -- Cond MP + prach-HoppingOffset-r13 INTEGER (0..94) OPTIONAL, -- Need OR + prach-ParametersListCE-r13 PRACH-ParametersListCE-r13 +} + +PRACH-ConfigSIB-v1530 ::= SEQUENCE { + edt-PRACH-ParametersListCE-r15 SEQUENCE (SIZE(1..maxCE-Level-r13)) OF EDT-PRACH-ParametersCE-r15 +} + +PRACH-Config ::= SEQUENCE { + rootSequenceIndex INTEGER (0..837), + prach-ConfigInfo PRACH-ConfigInfo OPTIONAL -- Need ON +} + +PRACH-Config-v1310 ::= SEQUENCE { + rsrp-ThresholdsPrachInfoList-r13 RSRP-ThresholdsPrachInfoList-r13 OPTIONAL, -- Cond MP + mpdcch-startSF-CSS-RA-r13 CHOICE { + fdd-r13 ENUMERATED {v1, v1dot5, v2, v2dot5, v4, v5, v8, + v10}, + tdd-r13 ENUMERATED {v1, v2, v4, v5, v8, v10, v20, spare} + } OPTIONAL, -- Cond MP + prach-HoppingOffset-r13 INTEGER (0..94) OPTIONAL, -- Need OR + prach-ParametersListCE-r13 PRACH-ParametersListCE-r13 OPTIONAL, -- Cond MP + initial-CE-level-r13 INTEGER (0..3) OPTIONAL -- Need OR +} + +PRACH-Config-v1430 ::= SEQUENCE { + rootSequenceIndexHighSpeed-r14 INTEGER (0..837), + zeroCorrelationZoneConfigHighSpeed-r14 INTEGER (0..12), + prach-ConfigIndexHighSpeed-r14 INTEGER (0..63), + prach-FreqOffsetHighSpeed-r14 INTEGER (0..94) +} + +PRACH-ConfigSCell-r10 ::= SEQUENCE { + prach-ConfigIndex-r10 INTEGER (0..63) +} + +PRACH-ConfigInfo ::= SEQUENCE { + prach-ConfigIndex INTEGER (0..63), + highSpeedFlag BOOLEAN, + zeroCorrelationZoneConfig INTEGER (0..15), + prach-FreqOffset INTEGER (0..94) +} + +PRACH-ParametersListCE-r13 ::= SEQUENCE (SIZE(1..maxCE-Level-r13)) OF PRACH-ParametersCE-r13 + +PRACH-ParametersCE-r13 ::= SEQUENCE { + prach-ConfigIndex-r13 INTEGER (0..63), + prach-FreqOffset-r13 INTEGER (0..94), + prach-StartingSubframe-r13 ENUMERATED {sf2, sf4, sf8, sf16, sf32, sf64, sf128, + sf256} OPTIONAL, -- Need OP + maxNumPreambleAttemptCE-r13 + ENUMERATED {n3, n4, n5, n6, n7, n8, n10} OPTIONAL, -- Need OP + numRepetitionPerPreambleAttempt-r13 ENUMERATED {n1,n2,n4,n8,n16,n32,n64,n128}, + mpdcch-NarrowbandsToMonitor-r13 SEQUENCE (SIZE(1..2)) OF + INTEGER (1..maxAvailNarrowBands-r13), + mpdcch-NumRepetition-RA-r13 ENUMERATED {r1, r2, r4, r8, r16, + r32, r64, r128, r256}, + prach-HoppingConfig-r13 ENUMERATED {on,off} +} + +EDT-PRACH-ParametersCE-r15 ::= SEQUENCE { + edt-PRACH-ParametersCE-r15 SEQUENCE { + prach-ConfigIndex-r15 INTEGER (0..63), + prach-FreqOffset-r15 INTEGER (0..94), + prach-StartingSubframe-r15 ENUMERATED {sf2, sf4, sf8, sf16, sf32, sf64, sf128, sf256} OPTIONAL, -- Need OP + mpdcch-NarrowbandsToMonitor-r15 SEQUENCE (SIZE(1..2)) OF INTEGER (1..maxAvailNarrowBands-r13) + } OPTIONAL -- Need OR +} + +RSRP-ThresholdsPrachInfoList-r13 ::= SEQUENCE (SIZE(1..3)) OF RSRP-Range + + +PresenceAntennaPort1 ::= BOOLEAN + + +PUCCH-ConfigCommon ::= SEQUENCE { + deltaPUCCH-Shift ENUMERATED {ds1, ds2, ds3}, + nRB-CQI INTEGER (0..98), + nCS-AN INTEGER (0..7), + n1PUCCH-AN INTEGER (0..2047) +} + +PUCCH-ConfigCommon-v1310 ::= SEQUENCE { + n1PUCCH-AN-InfoList-r13 N1PUCCH-AN-InfoList-r13 OPTIONAL, -- Need OR + pucch-NumRepetitionCE-Msg4-Level0-r13 ENUMERATED {n1, n2, n4, n8} OPTIONAL, -- Need OR + pucch-NumRepetitionCE-Msg4-Level1-r13 ENUMERATED {n1, n2, n4, n8} OPTIONAL, -- Need OR + pucch-NumRepetitionCE-Msg4-Level2-r13 ENUMERATED {n4, n8, n16, n32} OPTIONAL, -- Need OR + pucch-NumRepetitionCE-Msg4-Level3-r13 ENUMERATED {n4, n8, n16, n32} OPTIONAL -- Need OR +} + +PUCCH-ConfigCommon-v1430 ::= SEQUENCE { + pucch-NumRepetitionCE-Msg4-Level3-r14 ENUMERATED {n64, n128} OPTIONAL -- Need OR +} + +PUCCH-ConfigDedicated ::= SEQUENCE { + ackNackRepetition CHOICE{ + release NULL, + setup SEQUENCE { + repetitionFactor ENUMERATED {n2, n4, n6, spare1}, + n1PUCCH-AN-Rep INTEGER (0..2047) + } + }, + tdd-AckNackFeedbackMode ENUMERATED {bundling, multiplexing} OPTIONAL -- Cond TDD +} + +PUCCH-ConfigDedicated-v1020 ::= SEQUENCE { + pucch-Format-r10 CHOICE { + format3-r10 PUCCH-Format3-Conf-r13, + channelSelection-r10 SEQUENCE { + n1PUCCH-AN-CS-r10 CHOICE { + release NULL, + setup SEQUENCE { + n1PUCCH-AN-CS-List-r10 SEQUENCE (SIZE (1..2)) OF N1PUCCH-AN-CS-r10 + } + } OPTIONAL -- Need ON + } + } OPTIONAL, -- Need OR + twoAntennaPortActivatedPUCCH-Format1a1b-r10 ENUMERATED {true} OPTIONAL, -- Need OR + simultaneousPUCCH-PUSCH-r10 ENUMERATED {true} OPTIONAL, -- Need OR + n1PUCCH-AN-RepP1-r10 INTEGER (0..2047) OPTIONAL -- Need OR +} + +PUCCH-ConfigDedicated-v1130 ::= SEQUENCE { + n1PUCCH-AN-CS-v1130 CHOICE { + release NULL, + setup SEQUENCE { + n1PUCCH-AN-CS-ListP1-r11 SEQUENCE (SIZE (2..4)) OF INTEGER (0..2047) + } + } OPTIONAL, -- Need ON + nPUCCH-Param-r11 CHOICE { + release NULL, + setup SEQUENCE { + nPUCCH-Identity-r11 INTEGER (0..503), + n1PUCCH-AN-r11 INTEGER (0..2047) + } + } OPTIONAL -- Need ON +} + +PUCCH-ConfigDedicated-v1250 ::= SEQUENCE { + nkaPUCCH-Param-r12 CHOICE { + release NULL, + setup SEQUENCE { + nkaPUCCH-AN-r12 INTEGER (0..2047) + } + } +} + +PUCCH-ConfigDedicated-r13 ::= SEQUENCE { +--Release 8 + ackNackRepetition-r13 CHOICE{ + release NULL, + setup SEQUENCE { + repetitionFactor-r13 ENUMERATED {n2, n4, n6, spare1}, + n1PUCCH-AN-Rep-r13 INTEGER (0..2047) + } + }, + tdd-AckNackFeedbackMode-r13 ENUMERATED {bundling, multiplexing} OPTIONAL, -- Cond TDD +--Release 10 + pucch-Format-r13 CHOICE { + format3-r13 SEQUENCE { + n3PUCCH-AN-List-r13 SEQUENCE (SIZE (1..4)) OF INTEGER (0..549) OPTIONAL, -- Need ON + twoAntennaPortActivatedPUCCH-Format3-r13 CHOICE { + release NULL, + setup SEQUENCE { + n3PUCCH-AN-ListP1-r13 SEQUENCE (SIZE (1..4)) OF INTEGER (0..549) + } + } OPTIONAL -- Need ON + }, + channelSelection-r13 SEQUENCE { + n1PUCCH-AN-CS-r13 CHOICE { + release NULL, + setup SEQUENCE { + n1PUCCH-AN-CS-List-r13 SEQUENCE (SIZE (1..2)) OF N1PUCCH-AN-CS-r10, + n1PUCCH-AN-CS-ListP1-r13 SEQUENCE (SIZE (2..4)) OF INTEGER (0..2047) + } + } OPTIONAL -- Need ON + }, + format4-r13 SEQUENCE { + format4-resourceConfiguration-r13 SEQUENCE (SIZE (4)) OF Format4-resource-r13, + format4-MultiCSI-resourceConfiguration-r13 SEQUENCE (SIZE (1..2)) OF Format4-resource-r13 OPTIONAL -- Need OR + }, + format5-r13 SEQUENCE { + format5-resourceConfiguration-r13 SEQUENCE (SIZE (4)) OF Format5-resource-r13, + format5-MultiCSI-resourceConfiguration-r13 Format5-resource-r13 OPTIONAL -- Need OR + } + } OPTIONAL, -- Need OR + twoAntennaPortActivatedPUCCH-Format1a1b-r13 ENUMERATED {true} OPTIONAL, -- Need OR + simultaneousPUCCH-PUSCH-r13 ENUMERATED {true} OPTIONAL, -- Need OR + n1PUCCH-AN-RepP1-r13 INTEGER (0..2047) OPTIONAL, -- Need OR +--Release 11 + nPUCCH-Param-r13 CHOICE { + release NULL, + setup SEQUENCE { + nPUCCH-Identity-r13 INTEGER (0..503), + n1PUCCH-AN-r13 INTEGER (0..2047) + } + } OPTIONAL, -- Need ON +--Release 12 + nkaPUCCH-Param-r13 CHOICE { + release NULL, + setup SEQUENCE { + nkaPUCCH-AN-r13 INTEGER (0..2047) + } + } OPTIONAL, -- Need ON +--Release 13 + spatialBundlingPUCCH-r13 BOOLEAN, + spatialBundlingPUSCH-r13 BOOLEAN, + harq-TimingTDD-r13 BOOLEAN, + codebooksizeDetermination-r13 ENUMERATED {dai,cc} OPTIONAL, -- Need OR + maximumPayloadCoderate-r13 INTEGER (0..7) OPTIONAL, -- Need OR + pucch-NumRepetitionCE-r13 CHOICE { + release NULL, + setup CHOICE { + modeA SEQUENCE { + pucch-NumRepetitionCE-format1-r13 ENUMERATED {r1, r2, r4, r8}, + pucch-NumRepetitionCE-format2-r13 ENUMERATED {r1, r2, r4, r8} + }, + modeB SEQUENCE { + pucch-NumRepetitionCE-format1-r13 ENUMERATED {r4, r8, r16, r32}, + pucch-NumRepetitionCE-format2-r13 ENUMERATED {r4, r8, r16, r32} + } + } + } OPTIONAL --Need ON +} + +PUCCH-ConfigDedicated-v1370 ::= SEQUENCE { + pucch-Format-v1370 CHOICE { + release NULL, + setup PUCCH-Format3-Conf-r13 + } +} + +PUCCH-Format3-Conf-r13 ::= SEQUENCE { + n3PUCCH-AN-List-r13 SEQUENCE (SIZE (1..4)) OF INTEGER (0..549) OPTIONAL, -- Need ON + twoAntennaPortActivatedPUCCH-Format3-r13 CHOICE { + release NULL, + setup SEQUENCE { + n3PUCCH-AN-ListP1-r13 SEQUENCE (SIZE (1..4)) OF INTEGER (0..549) + } + } OPTIONAL -- Need ON +} + +PUCCH-ConfigDedicated-v1430 ::= SEQUENCE { + pucch-NumRepetitionCE-format1-r14 ENUMERATED {r64,r128} OPTIONAL -- Need OR +} + +PUCCH-ConfigDedicated-v1530 ::= SEQUENCE { + n1PUCCH-AN-SPT-r15 INTEGER (0..2047) OPTIONAL, -- Need OR + codebooksizeDeterminationSTTI-r15 ENUMERATED {dai,cc} OPTIONAL -- Need OR +} + +Format4-resource-r13 ::= SEQUENCE { + startingPRB-format4-r13 INTEGER (0..109), + numberOfPRB-format4-r13 INTEGER (0..7) +} + +Format5-resource-r13 ::= SEQUENCE { + startingPRB-format5-r13 INTEGER (0..109), + cdm-index-format5-r13 INTEGER (0..1) +} + + + +N1PUCCH-AN-CS-r10 ::= SEQUENCE (SIZE (1..4)) OF INTEGER (0..2047) + +N1PUCCH-AN-InfoList-r13 ::= SEQUENCE (SIZE(1..maxCE-Level-r13)) OF INTEGER (0..2047) + + +PUSCH-ConfigCommon ::= SEQUENCE { + pusch-ConfigBasic SEQUENCE { + n-SB INTEGER (1..4), + hoppingMode ENUMERATED {interSubFrame, intraAndInterSubFrame}, + pusch-HoppingOffset INTEGER (0..98), + enable64QAM BOOLEAN + }, + ul-ReferenceSignalsPUSCH UL-ReferenceSignalsPUSCH +} + +PUSCH-ConfigCommon-v1270 ::= SEQUENCE { + enable64QAM-v1270 ENUMERATED {true} +} + +PUSCH-ConfigCommon-v1310 ::= SEQUENCE { + pusch-maxNumRepetitionCEmodeA-r13 ENUMERATED { + r8, r16, r32 } OPTIONAL, -- Need OR + pusch-maxNumRepetitionCEmodeB-r13 ENUMERATED { + r192, r256, r384, r512, r768, r1024, + r1536, r2048} OPTIONAL, -- Need OR + pusch-HoppingOffset-v1310 + INTEGER (1..maxAvailNarrowBands-r13) OPTIONAL -- Need OR +} + +PUSCH-ConfigDedicated ::= SEQUENCE { + betaOffset-ACK-Index INTEGER (0..15), + betaOffset-RI-Index INTEGER (0..15), + betaOffset-CQI-Index INTEGER (0..15) +} + +PUSCH-ConfigDedicated-v1020 ::= SEQUENCE { + betaOffsetMC-r10 SEQUENCE { + betaOffset-ACK-Index-MC-r10 INTEGER (0..15), + betaOffset-RI-Index-MC-r10 INTEGER (0..15), + betaOffset-CQI-Index-MC-r10 INTEGER (0..15) + } OPTIONAL, -- Need OR + groupHoppingDisabled-r10 ENUMERATED {true} OPTIONAL, -- Need OR + dmrs-WithOCC-Activated-r10 ENUMERATED {true} OPTIONAL -- Need OR +} + +PUSCH-ConfigDedicated-v1130 ::= SEQUENCE { + pusch-DMRS-r11 CHOICE { + release NULL, + setup SEQUENCE { + nPUSCH-Identity-r11 INTEGER (0..509), + nDMRS-CSH-Identity-r11 INTEGER (0..509) + } + } +} + +PUSCH-ConfigDedicated-v1250::= SEQUENCE { + uciOnPUSCH CHOICE { + release NULL, + setup SEQUENCE { + betaOffset-ACK-Index-SubframeSet2-r12 INTEGER (0..15), + betaOffset-RI-Index-SubframeSet2-r12 INTEGER (0..15), + betaOffset-CQI-Index-SubframeSet2-r12 INTEGER (0..15), + betaOffsetMC-r12 SEQUENCE { + betaOffset-ACK-Index-MC-SubframeSet2-r12 INTEGER (0..15), + betaOffset-RI-Index-MC-SubframeSet2-r12 INTEGER (0..15), + betaOffset-CQI-Index-MC-SubframeSet2-r12 INTEGER (0..15) + } OPTIONAL -- Need OR + } + } +} +PUSCH-ConfigDedicated-r13 ::= SEQUENCE { + betaOffset-ACK-Index-r13 INTEGER (0..15), + betaOffset2-ACK-Index-r13 INTEGER (0..15) OPTIONAL, -- Need OR + betaOffset-RI-Index-r13 INTEGER (0..15), + betaOffset-CQI-Index-r13 INTEGER (0..15), + betaOffsetMC-r13 SEQUENCE { + betaOffset-ACK-Index-MC-r13 INTEGER (0..15), + betaOffset2-ACK-Index-MC-r13 INTEGER (0..15) OPTIONAL, -- Need OR + betaOffset-RI-Index-MC-r13 INTEGER (0..15), + betaOffset-CQI-Index-MC-r13 INTEGER (0..15) + } OPTIONAL, -- Need OR + groupHoppingDisabled-r13 ENUMERATED {true} OPTIONAL, -- Need OR + dmrs-WithOCC-Activated-r13 ENUMERATED {true} OPTIONAL, -- Need OR + pusch-DMRS-r11 CHOICE { + release NULL, + setup SEQUENCE { + nPUSCH-Identity-r13 INTEGER (0..509), + nDMRS-CSH-Identity-r13 INTEGER (0..509) + } + } OPTIONAL, -- Need ON + uciOnPUSCH CHOICE { + release NULL, + setup SEQUENCE { + betaOffset-ACK-Index-SubframeSet2-r13 INTEGER (0..15), + betaOffset2-ACK-Index-SubframeSet2-r13 INTEGER (0..15) OPTIONAL, -- Need OR + betaOffset-RI-Index-SubframeSet2-r13 INTEGER (0..15), + betaOffset-CQI-Index-SubframeSet2-r13 INTEGER (0..15), + betaOffsetMC-r12 SEQUENCE { + betaOffset-ACK-Index-MC-SubframeSet2-r13 INTEGER (0..15), + betaOffset2-ACK-Index-MC-SubframeSet2-r13 INTEGER (0..15) OPTIONAL, -- Need OR + betaOffset-RI-Index-MC-SubframeSet2-r13 INTEGER (0..15), + betaOffset-CQI-Index-MC-SubframeSet2-r13 INTEGER (0..15) + } OPTIONAL -- Need OR + } + } OPTIONAL, -- Need ON + pusch-HoppingConfig-r13 ENUMERATED {on} OPTIONAL -- Need OR +} + +PUSCH-ConfigDedicated-v1430 ::= SEQUENCE { + ce-PUSCH-NB-MaxTBS-r14 ENUMERATED {on} OPTIONAL, -- Need OR + ce-PUSCH-MaxBandwidth-r14 ENUMERATED {bw5} OPTIONAL, -- Need OR + tdd-PUSCH-UpPTS-r14 TDD-PUSCH-UpPTS-r14 OPTIONAL, -- Need ON + ul-DMRS-IFDMA-r14 BOOLEAN, + enable256QAM-r14 Enable256QAM-r14 OPTIONAL -- Need ON +} + +PUSCH-ConfigDedicated-v1530 ::= SEQUENCE { + ce-PUSCH-FlexibleStartPRB-AllocConfig-r15 CHOICE { + release NULL, + setup SEQUENCE { + offsetCE-ModeB-r15 INTEGER (-1..3) OPTIONAL -- Cond CE-ModeB + } + }, + ce-PUSCH-SubPRB-Config-r15 CHOICE { + release NULL, + setup SEQUENCE { + locationCE-ModeB-r15 INTEGER (0..5) OPTIONAL, -- Cond CE-ModeB + sixToneCyclicShift-r15 INTEGER (0..3), + threeToneCyclicShift-r15 INTEGER (0..2) + } + } OPTIONAL -- Need ON +} + +PUSCH-ConfigDedicatedSCell-r10 ::= SEQUENCE { + groupHoppingDisabled-r10 ENUMERATED {true} OPTIONAL, -- Need OR + dmrs-WithOCC-Activated-r10 ENUMERATED {true} OPTIONAL -- Need OR +} + +PUSCH-ConfigDedicatedSCell-v1430 ::= SEQUENCE { + enable256QAM-r14 Enable256QAM-r14 OPTIONAL -- Need OR +} + +PUSCH-ConfigDedicatedScell-v1530 ::= SEQUENCE { + uci-OnPUSCH-r15 CHOICE { + release NULL, + setup SEQUENCE { + betaOffsetAUL-r15 INTEGER (0..15) + } + } +} + +TDD-PUSCH-UpPTS-r14 ::= CHOICE { + release NULL, + setup SEQUENCE { + symPUSCH-UpPTS-r14 ENUMERATED {sym1, sym2, sym3, sym4, sym5, sym6} OPTIONAL, -- Need ON + dmrs-LessUpPTS-Config-r14 ENUMERATED {true} OPTIONAL -- Need OR + } +} + +Enable256QAM-r14 ::= CHOICE { + release NULL, + setup CHOICE { + tpc-SubframeSet-Configured-r14 SEQUENCE { + subframeSet1-DCI-Format0-r14 BOOLEAN, + subframeSet1-DCI-Format4-r14 BOOLEAN, + subframeSet2-DCI-Format0-r14 BOOLEAN, + subframeSet2-DCI-Format4-r14 BOOLEAN + }, + tpc-SubframeSet-NotConfigured-r14 SEQUENCE { + dci-Format0-r14 BOOLEAN, + dci-Format4-r14 BOOLEAN + } + } +} + +PUSCH-EnhancementsConfig-r14 ::= CHOICE { + release NULL, + setup SEQUENCE { + pusch-HoppingOffsetPUSCH-Enh-r14 INTEGER (1..100) OPTIONAL, -- Need ON + interval-ULHoppingPUSCH-Enh-r14 CHOICE { + interval-FDD-PUSCH-Enh-r14 ENUMERATED {int1, int2, int4, int8}, + interval-TDD-PUSCH-Enh-r14 ENUMERATED {int1, int5, int10, int20} + } OPTIONAL -- Need ON + } +} + +UL-ReferenceSignalsPUSCH ::= SEQUENCE { + groupHoppingEnabled BOOLEAN, + groupAssignmentPUSCH INTEGER (0..29), + sequenceHoppingEnabled BOOLEAN, + cyclicShift INTEGER (0..7) +} + + +RACH-ConfigCommon ::= SEQUENCE { + preambleInfo SEQUENCE { + numberOfRA-Preambles ENUMERATED { + n4, n8, n12, n16, n20, n24, n28, + n32, n36, n40, n44, n48, n52, n56, + n60, n64}, + preamblesGroupAConfig SEQUENCE { + sizeOfRA-PreamblesGroupA ENUMERATED { + n4, n8, n12, n16, n20, n24, n28, + n32, n36, n40, n44, n48, n52, n56, + n60}, + messageSizeGroupA ENUMERATED {b56, b144, b208, b256}, + messagePowerOffsetGroupB ENUMERATED { + minusinfinity, dB0, dB5, dB8, dB10, dB12, + dB15, dB18}, + ... + } OPTIONAL -- Need OP + }, + powerRampingParameters PowerRampingParameters, + ra-SupervisionInfo SEQUENCE { + preambleTransMax PreambleTransMax, + ra-ResponseWindowSize ENUMERATED { + sf2, sf3, sf4, sf5, sf6, sf7, + sf8, sf10}, + mac-ContentionResolutionTimer ENUMERATED { + sf8, sf16, sf24, sf32, sf40, sf48, + sf56, sf64} + }, + maxHARQ-Msg3Tx INTEGER (1..8), + ..., + [[ preambleTransMax-CE-r13 PreambleTransMax OPTIONAL, -- Need OR + rach-CE-LevelInfoList-r13 RACH-CE-LevelInfoList-r13 OPTIONAL -- Need OR + ]], + [[ edt-SmallTBS-Subset-r15 ENUMERATED {true} OPTIONAL -- Cond EDT-OR + ]] +} + +RACH-ConfigCommon-v1250 ::= SEQUENCE { + txFailParams-r12 SEQUENCE { + connEstFailCount-r12 ENUMERATED {n1, n2, n3, n4}, + connEstFailOffsetValidity-r12 ENUMERATED {s30, s60, s120, s240, + s300, s420, s600, s900}, + connEstFailOffset-r12 INTEGER (0..15) OPTIONAL -- Need OP + } +} + +RACH-ConfigCommonSCell-r11 ::= SEQUENCE { + powerRampingParameters-r11 PowerRampingParameters, + ra-SupervisionInfo-r11 SEQUENCE { + preambleTransMax-r11 PreambleTransMax + }, + ... +} + +RACH-CE-LevelInfoList-r13 ::= SEQUENCE (SIZE (1..maxCE-Level-r13)) OF RACH-CE-LevelInfo-r13 + +RACH-CE-LevelInfo-r13 ::= SEQUENCE { + preambleMappingInfo-r13 SEQUENCE { + firstPreamble-r13 INTEGER(0..63), + lastPreamble-r13 INTEGER(0..63) + }, + ra-ResponseWindowSize-r13 ENUMERATED {sf20, sf50, sf80, sf120, sf180, + sf240, sf320, sf400}, + + mac-ContentionResolutionTimer-r13 ENUMERATED {sf80, sf100, sf120, + sf160, sf200, sf240, sf480, sf960}, + rar-HoppingConfig-r13 ENUMERATED {on,off}, + ..., + [[ edt-Parameters-r15 SEQUENCE { + edt-LastPreamble-r15 INTEGER(0..63), + edt-SmallTBS-Enabled-r15 BOOLEAN, + edt-TBS-r15 ENUMERATED {b328, b408, b504, b600, b712, + b808, b936, b1000or456}, + mac-ContentionResolutionTimer-r15 ENUMERATED {sf240, sf480, sf960, + sf1920, sf3840, sf5760, sf7680, sf10240} OPTIONAL -- Need OP + } OPTIONAL -- Cond EDT + ]] +} + +PowerRampingParameters ::= SEQUENCE { + powerRampingStep ENUMERATED {dB0, dB2,dB4, dB6}, + preambleInitialReceivedTargetPower ENUMERATED { + dBm-120, dBm-118, dBm-116, dBm-114, dBm-112, + dBm-110, dBm-108, dBm-106, dBm-104, dBm-102, + dBm-100, dBm-98, dBm-96, dBm-94, + dBm-92, dBm-90} +} + +PreambleTransMax ::= ENUMERATED { + n3, n4, n5, n6, n7, n8, n10, n20, n50, + n100, n200} + + +RACH-ConfigDedicated ::= SEQUENCE { + ra-PreambleIndex INTEGER (0..63), + ra-PRACH-MaskIndex INTEGER (0..15) +} + + +RadioResourceConfigCommonSIB ::= SEQUENCE { + rach-ConfigCommon RACH-ConfigCommon, + bcch-Config BCCH-Config, + pcch-Config PCCH-Config, + prach-Config PRACH-ConfigSIB, + pdsch-ConfigCommon PDSCH-ConfigCommon, + pusch-ConfigCommon PUSCH-ConfigCommon, + pucch-ConfigCommon PUCCH-ConfigCommon, + soundingRS-UL-ConfigCommon SoundingRS-UL-ConfigCommon, + uplinkPowerControlCommon UplinkPowerControlCommon, + ul-CyclicPrefixLength UL-CyclicPrefixLength, + ..., + [[ uplinkPowerControlCommon-v1020 UplinkPowerControlCommon-v1020 OPTIONAL -- Need OR + ]], + [[ rach-ConfigCommon-v1250 RACH-ConfigCommon-v1250 OPTIONAL -- Need OR + ]], + [[ pusch-ConfigCommon-v1270 PUSCH-ConfigCommon-v1270 OPTIONAL -- Need OR + ]], + [[ bcch-Config-v1310 BCCH-Config-v1310 OPTIONAL, -- Need OR + pcch-Config-v1310 PCCH-Config-v1310 OPTIONAL, -- Need OR + freqHoppingParameters-r13 FreqHoppingParameters-r13 OPTIONAL, -- Need OR + pdsch-ConfigCommon-v1310 PDSCH-ConfigCommon-v1310 OPTIONAL, -- Need OR + pusch-ConfigCommon-v1310 PUSCH-ConfigCommon-v1310 OPTIONAL, -- Need OR + prach-ConfigCommon-v1310 PRACH-ConfigSIB-v1310 OPTIONAL, -- Need OR + pucch-ConfigCommon-v1310 PUCCH-ConfigCommon-v1310 OPTIONAL -- Need OR + ]], + [[ highSpeedConfig-r14 HighSpeedConfig-r14 OPTIONAL, -- Need OR + prach-Config-v1430 PRACH-Config-v1430 OPTIONAL, -- Need OR + pucch-ConfigCommon-v1430 PUCCH-ConfigCommon-v1430 OPTIONAL -- Need OR + ]], + [[ prach-Config-v1530 PRACH-ConfigSIB-v1530 OPTIONAL, -- Cond EDT + ce-RSS-Config-r15 RSS-Config-r15 OPTIONAL, -- Need OR + wus-Config-r15 WUS-Config-r15 OPTIONAL, -- Need OR + highSpeedConfig-v1530 HighSpeedConfig-v1530 OPTIONAL -- Need OR + ]] +} + +RadioResourceConfigCommon ::= SEQUENCE { + rach-ConfigCommon RACH-ConfigCommon OPTIONAL, -- Need ON + prach-Config PRACH-Config, + pdsch-ConfigCommon PDSCH-ConfigCommon OPTIONAL, -- Need ON + pusch-ConfigCommon PUSCH-ConfigCommon, + phich-Config PHICH-Config OPTIONAL, -- Need ON + pucch-ConfigCommon PUCCH-ConfigCommon OPTIONAL, -- Need ON + soundingRS-UL-ConfigCommon SoundingRS-UL-ConfigCommon OPTIONAL, -- Need ON + uplinkPowerControlCommon UplinkPowerControlCommon OPTIONAL, -- Need ON + antennaInfoCommon AntennaInfoCommon OPTIONAL, -- Need ON + p-Max P-Max OPTIONAL, -- Need OP + tdd-Config TDD-Config OPTIONAL, -- Cond TDD + ul-CyclicPrefixLength UL-CyclicPrefixLength, + ..., + [[ uplinkPowerControlCommon-v1020 UplinkPowerControlCommon-v1020 OPTIONAL -- Need ON + ]], + [[ tdd-Config-v1130 TDD-Config-v1130 OPTIONAL -- Cond TDD3 + ]], + [[ pusch-ConfigCommon-v1270 PUSCH-ConfigCommon-v1270 OPTIONAL -- Need OR + ]], + [[ + prach-Config-v1310 PRACH-Config-v1310 OPTIONAL, -- Need ON + freqHoppingParameters-r13 FreqHoppingParameters-r13 OPTIONAL, -- Need ON + pdsch-ConfigCommon-v1310 PDSCH-ConfigCommon-v1310 OPTIONAL, -- Need ON + pucch-ConfigCommon-v1310 PUCCH-ConfigCommon-v1310 OPTIONAL, -- Need ON + pusch-ConfigCommon-v1310 PUSCH-ConfigCommon-v1310 OPTIONAL, -- Need ON + uplinkPowerControlCommon-v1310 UplinkPowerControlCommon-v1310 OPTIONAL -- Need ON + ]], + [[ highSpeedConfig-r14 HighSpeedConfig-r14 OPTIONAL, -- Need OR + prach-Config-v1430 PRACH-Config-v1430 OPTIONAL, -- Need OR + pucch-ConfigCommon-v1430 PUCCH-ConfigCommon-v1430 OPTIONAL, -- Need OR + tdd-Config-v1430 TDD-Config-v1430 OPTIONAL -- Cond TDD3 + ]], + [[ + tdd-Config-v1450 TDD-Config-v1450 OPTIONAL -- Cond TDD3 + ]], + [[ uplinkPowerControlCommon-v1530 UplinkPowerControlCommon-v1530 OPTIONAL, -- Need ON + highSpeedConfig-v1530 HighSpeedConfig-v1530 OPTIONAL -- Need OR + ]] +} + +RadioResourceConfigCommonPSCell-r12 ::= SEQUENCE { + basicFields-r12 RadioResourceConfigCommonSCell-r10, + pucch-ConfigCommon-r12 PUCCH-ConfigCommon, + rach-ConfigCommon-r12 RACH-ConfigCommon, + uplinkPowerControlCommonPSCell-r12 UplinkPowerControlCommonPSCell-r12, + ..., + [[ uplinkPowerControlCommonPSCell-v1310 + UplinkPowerControlCommon-v1310 OPTIONAL -- Need ON + ]], + [[ uplinkPowerControlCommonPSCell-v1530 + UplinkPowerControlCommon-v1530 OPTIONAL -- Need ON + ]] +} + +RadioResourceConfigCommonPSCell-v12f0 ::= SEQUENCE { + basicFields-v12f0 RadioResourceConfigCommonSCell-v10l0 +} + +RadioResourceConfigCommonPSCell-v1440 ::= SEQUENCE { + basicFields-v1440 RadioResourceConfigCommonSCell-v1440 +} + +RadioResourceConfigCommonSCell-r10 ::= SEQUENCE { + -- DL configuration as well as configuration applicable for DL and UL + nonUL-Configuration-r10 SEQUENCE { + -- 1: Cell characteristics + dl-Bandwidth-r10 ENUMERATED {n6, n15, n25, n50, n75, n100}, + -- 2: Physical configuration, general + antennaInfoCommon-r10 AntennaInfoCommon, + mbsfn-SubframeConfigList-r10 MBSFN-SubframeConfigList OPTIONAL, -- Need OR + -- 3: Physical configuration, control + phich-Config-r10 PHICH-Config, + -- 4: Physical configuration, physical channels + pdsch-ConfigCommon-r10 PDSCH-ConfigCommon, + tdd-Config-r10 TDD-Config OPTIONAL -- Cond TDDSCell + }, + -- UL configuration + ul-Configuration-r10 SEQUENCE { + ul-FreqInfo-r10 SEQUENCE { + ul-CarrierFreq-r10 ARFCN-ValueEUTRA OPTIONAL, -- Need OP + ul-Bandwidth-r10 ENUMERATED {n6, n15, + n25, n50, n75, n100} OPTIONAL, -- Need OP + additionalSpectrumEmissionSCell-r10 AdditionalSpectrumEmission + }, + p-Max-r10 P-Max OPTIONAL, -- Need OP + uplinkPowerControlCommonSCell-r10 UplinkPowerControlCommonSCell-r10, + -- A special version of IE UplinkPowerControlCommon may be introduced + -- 3: Physical configuration, control + soundingRS-UL-ConfigCommon-r10 SoundingRS-UL-ConfigCommon, + ul-CyclicPrefixLength-r10 UL-CyclicPrefixLength, + -- 4: Physical configuration, physical channels + prach-ConfigSCell-r10 PRACH-ConfigSCell-r10 OPTIONAL, -- Cond TDD-OR-NoR11 + pusch-ConfigCommon-r10 PUSCH-ConfigCommon + } OPTIONAL, -- Need OR + ..., + [[ ul-CarrierFreq-v1090 ARFCN-ValueEUTRA-v9e0 OPTIONAL -- Need OP + ]], + [[ rach-ConfigCommonSCell-r11 RACH-ConfigCommonSCell-r11 OPTIONAL, -- Cond ULSCell + prach-ConfigSCell-r11 PRACH-Config OPTIONAL, -- Cond UL + tdd-Config-v1130 TDD-Config-v1130 OPTIONAL, -- Cond TDD2 + uplinkPowerControlCommonSCell-v1130 + UplinkPowerControlCommonSCell-v1130 OPTIONAL -- Cond UL + ]], + [[ pusch-ConfigCommon-v1270 PUSCH-ConfigCommon-v1270 OPTIONAL -- Need OR + ]], + [[ pucch-ConfigCommon-r13 PUCCH-ConfigCommon OPTIONAL, -- Cond UL + uplinkPowerControlCommonSCell-v1310 + UplinkPowerControlCommonSCell-v1310 OPTIONAL -- Cond UL + ]], + [[ highSpeedConfigSCell-r14 HighSpeedConfigSCell-r14 OPTIONAL, -- Need OR + prach-Config-v1430 PRACH-Config-v1430 OPTIONAL, -- Cond UL + ul-Configuration-r14 SEQUENCE { + ul-FreqInfo-r14 SEQUENCE { + ul-CarrierFreq-r14 ARFCN-ValueEUTRA-r9 OPTIONAL, -- Need OP + ul-Bandwidth-r14 ENUMERATED {n6, n15, + n25, n50, n75, n100} OPTIONAL, -- Need OP + additionalSpectrumEmissionSCell-r14 AdditionalSpectrumEmission + }, + p-Max-r14 P-Max OPTIONAL, -- Need OP + soundingRS-UL-ConfigCommon-r14 SoundingRS-UL-ConfigCommon, + ul-CyclicPrefixLength-r14 UL-CyclicPrefixLength, + prach-ConfigSCell-r14 PRACH-ConfigSCell-r10 OPTIONAL, -- Cond TDD-OR-NoR11 + uplinkPowerControlCommonPUSCH-LessCell-v1430 UplinkPowerControlCommonPUSCH-LessCell-v1430 OPTIONAL -- Need OR +} OPTIONAL, -- Cond ULSRS + harq-ReferenceConfig-r14 ENUMERATED {sa2,sa4,sa5} OPTIONAL, -- Need OR + soundingRS-FlexibleTiming-r14 ENUMERATED {true} OPTIONAL -- Need OR + ]], + [[ mbsfn-SubframeConfigList-v1430 MBSFN-SubframeConfigList-v1430 OPTIONAL -- Need ON + ]], + [[ uplinkPowerControlCommonSCell-v1530 UplinkPowerControlCommon-v1530 OPTIONAL -- Need ON + ]] +} + +RadioResourceConfigCommonSCell-v10l0 ::= SEQUENCE { + -- UL configuration + ul-Configuration-v10l0 SEQUENCE { + additionalSpectrumEmissionSCell-v10l0 AdditionalSpectrumEmission-v10l0 + } +} + +RadioResourceConfigCommonSCell-v1440 ::= SEQUENCE { + ul-Configuration-v1440 SEQUENCE { + ul-FreqInfo-v1440 SEQUENCE { + additionalSpectrumEmissionSCell-v1440 AdditionalSpectrumEmission-v10l0 + } + } +} + +BCCH-Config ::= SEQUENCE { + modificationPeriodCoeff ENUMERATED {n2, n4, n8, n16} +} + +BCCH-Config-v1310 ::= SEQUENCE { + modificationPeriodCoeff-v1310 ENUMERATED {n64} +} + +FreqHoppingParameters-r13 ::= SEQUENCE { + dummy ENUMERATED {nb2, nb4} OPTIONAL, + dummy2 CHOICE { + interval-FDD-r13 ENUMERATED {int1, int2, int4, int8}, + interval-TDD-r13 ENUMERATED {int1, int5, int10, int20} + } OPTIONAL, + dummy3 CHOICE { + interval-FDD-r13 ENUMERATED {int2, int4, int8, int16}, + interval-TDD-r13 ENUMERATED { int5, int10, int20, int40} + } OPTIONAL, + interval-ULHoppingConfigCommonModeA-r13 CHOICE { + interval-FDD-r13 ENUMERATED {int1, int2, int4, int8}, + interval-TDD-r13 ENUMERATED {int1, int5, int10, int20} + } OPTIONAL, -- Cond MP-A + interval-ULHoppingConfigCommonModeB-r13 CHOICE { + interval-FDD-r13 ENUMERATED {int2, int4, int8, int16}, + interval-TDD-r13 ENUMERATED { int5, int10, int20, int40} + } OPTIONAL, -- Cond MP-B + dummy4 INTEGER (1..maxAvailNarrowBands-r13) OPTIONAL +} + +PCCH-Config ::= SEQUENCE { + defaultPagingCycle ENUMERATED { + rf32, rf64, rf128, rf256}, + nB ENUMERATED { + fourT, twoT, oneT, halfT, quarterT, oneEighthT, + oneSixteenthT, oneThirtySecondT} +} + +PCCH-Config-v1310 ::= SEQUENCE { + paging-narrowBands-r13 INTEGER (1..maxAvailNarrowBands-r13), + mpdcch-NumRepetition-Paging-r13 ENUMERATED {r1, r2, r4, r8, r16, r32, r64, r128, r256}, + nB-v1310 ENUMERATED {one64thT, one128thT, one256thT} + OPTIONAL -- Need OR +} + +UL-CyclicPrefixLength ::= ENUMERATED {len1, len2} + +HighSpeedConfig-r14 ::= SEQUENCE { + highSpeedEnhancedMeasFlag-r14 ENUMERATED {true} OPTIONAL, -- Need OR + highSpeedEnhancedDemodulationFlag-r14 ENUMERATED {true} OPTIONAL -- Need OR +} + +HighSpeedConfig-v1530 ::= SEQUENCE { + highSpeedMeasGapCE-ModeA-r15 ENUMERATED {true} +} + +HighSpeedConfigSCell-r14 ::= SEQUENCE { + highSpeedEnhancedDemodulationFlag-r14 ENUMERATED {true} OPTIONAL -- Need OR +} + + +RadioResourceConfigDedicated ::= SEQUENCE { + srb-ToAddModList SRB-ToAddModList OPTIONAL, -- Cond HO-Conn + drb-ToAddModList DRB-ToAddModList OPTIONAL, -- Cond HO-toEUTRA + drb-ToReleaseList DRB-ToReleaseList OPTIONAL, -- Need ON + mac-MainConfig CHOICE { + explicitValue MAC-MainConfig, + defaultValue NULL + } OPTIONAL, -- Cond HO-toEUTRA2 + sps-Config SPS-Config OPTIONAL, -- Need ON + physicalConfigDedicated PhysicalConfigDedicated OPTIONAL, -- Need ON + ..., + [[ rlf-TimersAndConstants-r9 RLF-TimersAndConstants-r9 OPTIONAL -- Need ON + ]], + [[ measSubframePatternPCell-r10 MeasSubframePatternPCell-r10 OPTIONAL -- Need ON + ]], + [[ neighCellsCRS-Info-r11 NeighCellsCRS-Info-r11 OPTIONAL -- Need ON + ]], + [[ naics-Info-r12 NAICS-AssistanceInfo-r12 OPTIONAL -- Need ON + ]], + [[ neighCellsCRS-Info-r13 NeighCellsCRS-Info-r13 OPTIONAL, -- Cond CRSIM + rlf-TimersAndConstants-r13 RLF-TimersAndConstants-r13 OPTIONAL -- Need ON + ]], + [[ sps-Config-v1430 SPS-Config-v1430 OPTIONAL -- Cond SPS + ]], + [[ srb-ToAddModExtList-r15 SRB-ToAddModExtList-r15 OPTIONAL, -- Need ON + srb-ToReleaseExtList-r15 INTEGER (4) OPTIONAL, -- Need ON + + sps-Config-v1530 SPS-Config-v1530 OPTIONAL, -- Need ON + + crs-IntfMitigConfig-r15 CHOICE { + release NULL, + setup CHOICE { crs-IntfMitigEnabled-15 NULL, + crs-IntfMitigNumPRBs-r15 ENUMERATED {n6, n24} + } + } OPTIONAL, -- Need ON + neighCellsCRS-Info-r15 NeighCellsCRS-Info-r15 OPTIONAL, -- Need ON + drb-ToAddModList-r15 DRB-ToAddModList-r15 OPTIONAL, -- Need ON + drb-ToReleaseList-r15 DRB-ToReleaseList-r15 OPTIONAL, -- Need ON + srb-ToReleaseListDupl-r15 SRB-ToReleaseListDupl-r15 OPTIONAL -- Need ON + ]] +} + +RadioResourceConfigDedicated-v1370 ::= SEQUENCE { + physicalConfigDedicated-v1370 PhysicalConfigDedicated-v1370 OPTIONAL -- Need ON +} + +RadioResourceConfigDedicatedPSCell-r12 ::= SEQUENCE { + -- UE specific configuration extensions applicable for an PSCell + physicalConfigDedicatedPSCell-r12 PhysicalConfigDedicated OPTIONAL, -- Need ON + sps-Config-r12 SPS-Config OPTIONAL, -- Need ON + naics-Info-r12 NAICS-AssistanceInfo-r12 OPTIONAL, -- Need ON + ..., + [[ neighCellsCRS-InfoPSCell-r13 NeighCellsCRS-Info-r13 OPTIONAL -- Need ON + ]], + [[ sps-Config-v1430 SPS-Config-v1430 OPTIONAL -- Cond SPS2 + ]], + [[ sps-Config-v1530 SPS-Config-v1530 OPTIONAL, -- Need ON + crs-IntfMitigEnabled-r15 BOOLEAN OPTIONAL, -- Need ON + neighCellsCRS-Info-r15 NeighCellsCRS-Info-r15 OPTIONAL -- Need ON + ]] +} + +RadioResourceConfigDedicatedPSCell-v1370 ::= SEQUENCE { + physicalConfigDedicatedPSCell-v1370 PhysicalConfigDedicated-v1370 OPTIONAL -- Need ON +} + +RadioResourceConfigDedicatedSCG-r12 ::= SEQUENCE { + drb-ToAddModListSCG-r12 DRB-ToAddModListSCG-r12 OPTIONAL, -- Need ON + mac-MainConfigSCG-r12 MAC-MainConfig OPTIONAL, -- Need ON + rlf-TimersAndConstantsSCG-r12 RLF-TimersAndConstantsSCG-r12 OPTIONAL, -- Need ON + ..., + [[ drb-ToAddModListSCG-r15 DRB-ToAddModListSCG-r15 OPTIONAL -- Need ON + ]] +} + +RadioResourceConfigDedicatedSCell-r10 ::= SEQUENCE { + -- UE specific configuration extensions applicable for an SCell + physicalConfigDedicatedSCell-r10 PhysicalConfigDedicatedSCell-r10 OPTIONAL, -- Need ON + ..., + [[ mac-MainConfigSCell-r11 MAC-MainConfigSCell-r11 OPTIONAL -- Cond SCellAdd + ]], + [[ naics-Info-r12 NAICS-AssistanceInfo-r12 OPTIONAL -- Need ON + ]], + [[ neighCellsCRS-InfoSCell-r13 NeighCellsCRS-Info-r13 OPTIONAL -- Need ON + ]], + [[ physicalConfigDedicatedSCell-v1370 PhysicalConfigDedicatedSCell-v1370 OPTIONAL -- Need ON + ]], + [[ crs-IntfMitigEnabled-r15 BOOLEAN OPTIONAL, -- Need ON + neighCellsCRS-Info-r15 NeighCellsCRS-Info-r15 OPTIONAL, -- Need ON + sps-Config-v1530 SPS-Config-v1530 OPTIONAL -- Need ON + ]] +} + +SRB-ToAddModList ::= SEQUENCE (SIZE (1..2)) OF SRB-ToAddMod + +SRB-ToAddModExtList-r15 ::= SEQUENCE (SIZE (1)) OF SRB-ToAddMod + +SRB-ToAddMod ::= SEQUENCE { + srb-Identity INTEGER (1..2), + rlc-Config CHOICE { + explicitValue RLC-Config, + defaultValue NULL + } OPTIONAL, -- Cond Setup + logicalChannelConfig CHOICE { + explicitValue LogicalChannelConfig, + defaultValue NULL + } OPTIONAL, -- Cond Setup + ..., + [[ pdcp-verChange-r15 ENUMERATED {true} OPTIONAL, -- Cond NR-PDCP + rlc-Config-v1530 RLC-Config-v1530 OPTIONAL, -- Need ON + rlc-BearerConfigDupl-r15 RLC-BearerConfig-r15 OPTIONAL, -- Need ON + srb-Identity-v1530 INTEGER (4) OPTIONAL -- Need ON + ]] +} + +SRB-ToReleaseListDupl-r15 ::= SEQUENCE (SIZE (1..2)) OF INTEGER (1..2) + +DRB-ToAddModList ::= SEQUENCE (SIZE (1..maxDRB)) OF DRB-ToAddMod +DRB-ToAddModList-r15 ::= SEQUENCE (SIZE (1..maxDRB-r15)) OF DRB-ToAddMod + +DRB-ToAddModListSCG-r12 ::= SEQUENCE (SIZE (1..maxDRB)) OF DRB-ToAddModSCG-r12 +DRB-ToAddModListSCG-r15 ::= SEQUENCE (SIZE (1..maxDRB-r15)) OF DRB-ToAddModSCG-r12 + +DRB-ToAddMod ::= SEQUENCE { + eps-BearerIdentity INTEGER (0..15) OPTIONAL, -- Cond DRB-Setup + drb-Identity DRB-Identity, + pdcp-Config PDCP-Config OPTIONAL, -- Cond PDCP + rlc-Config RLC-Config OPTIONAL, -- Cond SetupM + logicalChannelIdentity INTEGER (3..10) OPTIONAL, -- Cond DRB-SetupM + logicalChannelConfig LogicalChannelConfig OPTIONAL, -- Cond SetupM + ..., + [[ drb-TypeChange-r12 ENUMERATED {toMCG} OPTIONAL, -- Need OP + rlc-Config-v1250 RLC-Config-v1250 OPTIONAL -- Need ON + ]], + [[ rlc-Config-v1310 RLC-Config-v1310 OPTIONAL, -- Need ON + drb-TypeLWA-r13 BOOLEAN OPTIONAL, -- Need ON + drb-TypeLWIP-r13 ENUMERATED {lwip, lwip-DL-only, + lwip-UL-only, eutran} OPTIONAL -- Need ON + ]], + [[ rlc-Config-v1430 RLC-Config-v1430 OPTIONAL, -- Need ON + lwip-UL-Aggregation-r14 BOOLEAN OPTIONAL, -- Cond LWIP + lwip-DL-Aggregation-r14 BOOLEAN OPTIONAL, -- Cond LWIP + lwa-WLAN-AC-r14 ENUMERATED {ac-bk, ac-be, ac-vi, ac-vo} OPTIONAL -- Cond UL-LWA + ]], + [[ rlc-Config-v1510 RLC-Config-v1510 OPTIONAL -- Need ON + ]], + [[ rlc-Config-v1530 RLC-Config-v1530 OPTIONAL, -- Need ON + rlc-BearerConfigDupl-r15 RLC-BearerConfig-r15 OPTIONAL, -- Need ON + logicalChannelIdentity-r15 INTEGER (32..38) OPTIONAL -- Need ON + ]] +} + +DRB-ToAddModSCG-r12 ::= SEQUENCE { + drb-Identity-r12 DRB-Identity, + drb-Type-r12 CHOICE { + split-r12 NULL, + scg-r12 SEQUENCE { + eps-BearerIdentity-r12 INTEGER (0..15) OPTIONAL, -- Cond DRB-Setup + pdcp-Config-r12 PDCP-Config OPTIONAL -- Cond PDCP-S + } + } OPTIONAL, -- Cond SetupS2 + rlc-ConfigSCG-r12 RLC-Config OPTIONAL, -- Cond SetupS + rlc-Config-v1250 RLC-Config-v1250 OPTIONAL, -- Need ON + logicalChannelIdentitySCG-r12 INTEGER (3..10) OPTIONAL, -- Cond DRB-SetupS + logicalChannelConfigSCG-r12 LogicalChannelConfig OPTIONAL, -- Cond SetupS + ..., + [[ rlc-Config-v1430 RLC-Config-v1430 OPTIONAL -- Need ON + ]], + [[ logicalChannelIdentitySCG-r15 INTEGER (32..38) OPTIONAL, -- Need ON + rlc-Config-v1530 RLC-Config-v1530 OPTIONAL, -- Need ON + rlc-BearerConfigDupl-r15 RLC-BearerConfig-r15 OPTIONAL -- Need ON + ]] +} + +DRB-ToReleaseList ::= SEQUENCE (SIZE (1..maxDRB)) OF DRB-Identity +DRB-ToReleaseList-r15 ::= SEQUENCE (SIZE (1..maxDRB-r15)) OF DRB-Identity + +MeasSubframePatternPCell-r10 ::= CHOICE { + release NULL, + setup MeasSubframePattern-r10 +} + +NeighCellsCRS-Info-r11 ::= CHOICE { + release NULL, + setup CRS-AssistanceInfoList-r11 +} + +CRS-AssistanceInfoList-r11 ::= SEQUENCE (SIZE (1..maxCellReport)) OF CRS-AssistanceInfo-r11 + +CRS-AssistanceInfo-r11 ::= SEQUENCE { + physCellId-r11 PhysCellId, + antennaPortsCount-r11 ENUMERATED {an1, an2, an4, spare1}, + mbsfn-SubframeConfigList-r11 MBSFN-SubframeConfigList, + ..., + [[ mbsfn-SubframeConfigList-v1430 MBSFN-SubframeConfigList-v1430 OPTIONAL -- Need ON + ]] +} + +NeighCellsCRS-Info-r13 ::= CHOICE { + release NULL, + setup CRS-AssistanceInfoList-r13 +} + +CRS-AssistanceInfoList-r13 ::= SEQUENCE (SIZE (1..maxCellReport)) OF CRS-AssistanceInfo-r13 + +CRS-AssistanceInfo-r13 ::= SEQUENCE { + physCellId-r13 PhysCellId, + antennaPortsCount-r13 ENUMERATED {an1, an2, an4, spare1}, + mbsfn-SubframeConfigList-r13 MBSFN-SubframeConfigList OPTIONAL, -- Need ON + ..., + [[ mbsfn-SubframeConfigList-v1430 MBSFN-SubframeConfigList-v1430 OPTIONAL -- Need ON + ]] +} + +NeighCellsCRS-Info-r15 ::= CHOICE { + release NULL, + setup CRS-AssistanceInfoList-r15 +} + +CRS-AssistanceInfoList-r15 ::= SEQUENCE (SIZE (1..maxCellReport)) OF CRS-AssistanceInfo-r15 + +CRS-AssistanceInfo-r15 ::= SEQUENCE { + physCellId-r15 PhysCellId, + crs-IntfMitigEnabled-15 ENUMERATED {enabled} OPTIONAL -- Need ON +} + +NAICS-AssistanceInfo-r12 ::= CHOICE { + release NULL, + setup SEQUENCE { + neighCellsToReleaseList-r12 NeighCellsToReleaseList-r12 OPTIONAL , -- Need ON + neighCellsToAddModList-r12 NeighCellsToAddModList-r12 OPTIONAL, -- Need ON + servCellp-a-r12 P-a OPTIONAL -- Need ON + } +} + +NeighCellsToReleaseList-r12 ::= SEQUENCE (SIZE (1..maxNeighCell-r12)) OF PhysCellId + +NeighCellsToAddModList-r12 ::= SEQUENCE (SIZE (1..maxNeighCell-r12)) OF NeighCellsInfo-r12 + +NeighCellsInfo-r12 ::= SEQUENCE { + physCellId-r12 PhysCellId, + p-b-r12 INTEGER (0..3), + crs-PortsCount-r12 ENUMERATED {n1, n2, n4, spare}, + mbsfn-SubframeConfig-r12 MBSFN-SubframeConfigList OPTIONAL, -- Need ON + p-aList-r12 SEQUENCE (SIZE (1..maxP-a-PerNeighCell-r12)) OF P-a, + transmissionModeList-r12 BIT STRING (SIZE(8)), + resAllocGranularity-r12 INTEGER (1..4), + ... +} +P-a ::= ENUMERATED { dB-6, dB-4dot77, dB-3, dB-1dot77, + dB0, dB1, dB2, dB3} + +RLC-BearerConfig-r15 ::= CHOICE { + release NULL, + setup SEQUENCE { + rlc-Config-r15 RLC-Config-r15 OPTIONAL, -- Need ON + logicalChannelIdentityConfig-r15 CHOICE { + logicalChannelIdentity-r15 INTEGER (1..10), + logicalChannelIdentityExt-r15 INTEGER (32..38) + }, + logicalChannelConfig-r15 LogicalChannelConfig OPTIONAL -- Need ON + } +} + + +RCLWI-Configuration-r13 ::= CHOICE { + release NULL, + setup SEQUENCE { + rclwi-Config-r13 RCLWI-Config-r13 + } +} + +RCLWI-Config-r13 ::= SEQUENCE { + command CHOICE { + steerToWLAN-r13 SEQUENCE { + mobilityConfig-r13 WLAN-Id-List-r12 + }, + steerToLTE-r13 NULL + }, + ... +} + + +RLC-Config ::= CHOICE { + am SEQUENCE { + ul-AM-RLC UL-AM-RLC, + dl-AM-RLC DL-AM-RLC + }, + um-Bi-Directional SEQUENCE { + ul-UM-RLC UL-UM-RLC, + dl-UM-RLC DL-UM-RLC + }, + um-Uni-Directional-UL SEQUENCE { + ul-UM-RLC UL-UM-RLC + }, + um-Uni-Directional-DL SEQUENCE { + dl-UM-RLC DL-UM-RLC + }, + ... +} + +RLC-Config-v1250 ::= SEQUENCE { + ul-extended-RLC-LI-Field-r12 BOOLEAN, + dl-extended-RLC-LI-Field-r12 BOOLEAN +} + +RLC-Config-v1310 ::= SEQUENCE { + ul-extended-RLC-AM-SN-r13 BOOLEAN, + dl-extended-RLC-AM-SN-r13 BOOLEAN, + pollPDU-v1310 PollPDU-v1310 OPTIONAL -- Need OR +} + +RLC-Config-v1430 ::= CHOICE { + release NULL, + setup SEQUENCE { + pollByte-r14 PollByte-r14 + } +} + +RLC-Config-v1510 ::= SEQUENCE { + reestablishRLC-r15 ENUMERATED {true} +} + +RLC-Config-v1530 ::= CHOICE { + release NULL, + setup SEQUENCE { + rlc-OutOfOrderDelivery-r15 ENUMERATED {true} + } +} + +RLC-Config-r15 ::= SEQUENCE { + mode-r15 CHOICE { + am-r15 SEQUENCE { + ul-AM-RLC-r15 UL-AM-RLC-r15, + dl-AM-RLC-r15 DL-AM-RLC-r15 + }, + um-Bi-Directional-r15 SEQUENCE { + ul-UM-RLC-r15 UL-UM-RLC, + dl-UM-RLC-r15 DL-UM-RLC-r15 + }, + um-Uni-Directional-UL-r15 SEQUENCE { + ul-UM-RLC-r15 UL-UM-RLC + }, + um-Uni-Directional-DL-r15 SEQUENCE { + dl-UM-RLC-r15 DL-UM-RLC-r15 + } + }, + reestablishRLC-r15 ENUMERATED {true} OPTIONAL, -- Need ON + rlc-OutOfOrderDelivery-r15 ENUMERATED {true} OPTIONAL, -- Need ON + ... +} + +UL-AM-RLC ::= SEQUENCE { + t-PollRetransmit T-PollRetransmit, + pollPDU PollPDU, + pollByte PollByte, + maxRetxThreshold ENUMERATED { + t1, t2, t3, t4, t6, t8, t16, t32} +} + +UL-AM-RLC-r15 ::= SEQUENCE { + t-PollRetransmit-r15 T-PollRetransmit, + pollPDU-r15 PollPDU-r15, + pollByte-r15 PollByte-r14, + maxRetxThreshold-r15 ENUMERATED { + t1, t2, t3, t4, t6, t8, t16, t32}, + extended-RLC-LI-Field-r15 BOOLEAN +} + +DL-AM-RLC ::= SEQUENCE { + t-Reordering T-Reordering, + t-StatusProhibit T-StatusProhibit +} + +DL-AM-RLC-r15 ::= SEQUENCE { + t-Reordering-r15 T-Reordering, + t-StatusProhibit-r15 T-StatusProhibit, + extended-RLC-LI-Field-r15 BOOLEAN +} + +UL-UM-RLC ::= SEQUENCE { + sn-FieldLength SN-FieldLength +} + +DL-UM-RLC ::= SEQUENCE { + sn-FieldLength SN-FieldLength, + t-Reordering T-Reordering +} + +DL-UM-RLC-r15 ::= SEQUENCE { + sn-FieldLength-r15 SN-FieldLength-r15, + t-Reordering-r15 T-Reordering +} + +SN-FieldLength ::= ENUMERATED {size5, size10} + +SN-FieldLength-r15 ::= ENUMERATED {size5, size10, size16-r15} + +T-PollRetransmit ::= ENUMERATED { + ms5, ms10, ms15, ms20, ms25, ms30, ms35, + ms40, ms45, ms50, ms55, ms60, ms65, ms70, + ms75, ms80, ms85, ms90, ms95, ms100, ms105, + ms110, ms115, ms120, ms125, ms130, ms135, + ms140, ms145, ms150, ms155, ms160, ms165, + ms170, ms175, ms180, ms185, ms190, ms195, + ms200, ms205, ms210, ms215, ms220, ms225, + ms230, ms235, ms240, ms245, ms250, ms300, + ms350, ms400, ms450, ms500, ms800-v1310, + ms1000-v1310, ms2000-v1310, ms4000-v1310, + spare5, spare4, spare3, spare2, spare1} + +PollPDU ::= ENUMERATED { + p4, p8, p16, p32, p64, p128, p256, pInfinity} + +PollPDU-v1310 ::= ENUMERATED { + p512, p1024, p2048, p4096, p6144, p8192, p12288, p16384} + +PollPDU-r15 ::= ENUMERATED { + p4, p8, p16, p32, p64, p128, p256, p512, p1024, + p2048-r15, p4096-r15, p6144-r15, p8192-r15, + p12288-r15, p16384-r15, pInfinity} + +PollByte ::= ENUMERATED { + kB25, kB50, kB75, kB100, kB125, kB250, kB375, + kB500, kB750, kB1000, kB1250, kB1500, kB2000, + kB3000, kBinfinity, spare1} + +PollByte-r14 ::= ENUMERATED { + kB1, kB2, kB5, kB8, kB10, kB15, kB3500, + kB4000, kB4500, kB5000, kB5500, kB6000, kB6500, + kB7000, kB7500, kB8000, kB9000, kB10000, kB11000, kB12000, + kB13000, kB14000, kB15000, kB16000, kB17000, kB18000, + kB19000, kB20000, kB25000, kB30000, kB35000, kB40000} + +T-Reordering ::= ENUMERATED { + ms0, ms5, ms10, ms15, ms20, ms25, ms30, ms35, + ms40, ms45, ms50, ms55, ms60, ms65, ms70, + ms75, ms80, ms85, ms90, ms95, ms100, ms110, + ms120, ms130, ms140, ms150, ms160, ms170, + ms180, ms190, ms200, ms1600-v1310} + +T-StatusProhibit ::= ENUMERATED { + ms0, ms5, ms10, ms15, ms20, ms25, ms30, ms35, + ms40, ms45, ms50, ms55, ms60, ms65, ms70, + ms75, ms80, ms85, ms90, ms95, ms100, ms105, + ms110, ms115, ms120, ms125, ms130, ms135, + ms140, ms145, ms150, ms155, ms160, ms165, + ms170, ms175, ms180, ms185, ms190, ms195, + ms200, ms205, ms210, ms215, ms220, ms225, + ms230, ms235, ms240, ms245, ms250, ms300, + ms350, ms400, ms450, ms500, ms800-v1310, + ms1000-v1310, ms1200-v1310, ms1600-v1310, ms2000-v1310, ms2400-v1310, spare2, + spare1} + + +RLF-TimersAndConstants-r9 ::= CHOICE { + release NULL, + setup SEQUENCE { + t301-r9 ENUMERATED { + ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, + ms2000}, + t310-r9 ENUMERATED { + ms0, ms50, ms100, ms200, ms500, ms1000, ms2000}, + n310-r9 ENUMERATED { + n1, n2, n3, n4, n6, n8, n10, n20}, + t311-r9 ENUMERATED { + ms1000, ms3000, ms5000, ms10000, ms15000, + ms20000, ms30000}, + n311-r9 ENUMERATED { + n1, n2, n3, n4, n5, n6, n8, n10}, + ... + } +} + +RLF-TimersAndConstants-r13 ::= CHOICE { + release NULL, + setup SEQUENCE { + t301-v1310 ENUMERATED { + ms2500, ms3000, ms3500, ms4000, ms5000, + ms6000, ms8000, ms10000}, + ..., + [[ t310-v1330 ENUMERATED {ms4000, ms6000} OPTIONAL -- Need ON + ]] + } +} + +RLF-TimersAndConstantsSCG-r12 ::= CHOICE { + release NULL, + setup SEQUENCE { + t313-r12 ENUMERATED { + ms0, ms50, ms100, ms200, ms500, ms1000, ms2000}, + n313-r12 ENUMERATED { + n1, n2, n3, n4, n6, n8, n10, n20}, + n314-r12 ENUMERATED { + n1, n2, n3, n4, n5, n6, n8, n10}, + ... + } +} + + +RN-SubframeConfig-r10 ::= SEQUENCE { + subframeConfigPattern-r10 CHOICE { + subframeConfigPatternFDD-r10 BIT STRING (SIZE(8)), + subframeConfigPatternTDD-r10 INTEGER (0..31) + } OPTIONAL, -- Need ON + rpdcch-Config-r10 SEQUENCE { + resourceAllocationType-r10 ENUMERATED {type0, type1, type2Localized, type2Distributed, + spare4, spare3, spare2, spare1}, + resourceBlockAssignment-r10 CHOICE { + type01-r10 CHOICE { + nrb6-r10 BIT STRING (SIZE(6)), + nrb15-r10 BIT STRING (SIZE(8)), + nrb25-r10 BIT STRING (SIZE(13)), + nrb50-r10 BIT STRING (SIZE(17)), + nrb75-r10 BIT STRING (SIZE(19)), + nrb100-r10 BIT STRING (SIZE(25)) + }, + type2-r10 CHOICE { + nrb6-r10 BIT STRING (SIZE(5)), + nrb15-r10 BIT STRING (SIZE(7)), + nrb25-r10 BIT STRING (SIZE(9)), + nrb50-r10 BIT STRING (SIZE(11)), + nrb75-r10 BIT STRING (SIZE(12)), + nrb100-r10 BIT STRING (SIZE(13)) + }, + ... + }, + demodulationRS-r10 CHOICE { + interleaving-r10 ENUMERATED {crs}, + noInterleaving-r10 ENUMERATED {crs, dmrs} + }, + pdsch-Start-r10 INTEGER (1..3), + pucch-Config-r10 CHOICE { + tdd CHOICE { + channelSelectionMultiplexingBundling SEQUENCE { + n1PUCCH-AN-List-r10 SEQUENCE (SIZE (1..4)) OF INTEGER (0..2047) + }, + fallbackForFormat3 SEQUENCE { + n1PUCCH-AN-P0-r10 INTEGER (0..2047), + n1PUCCH-AN-P1-r10 INTEGER (0..2047) OPTIONAL -- Need OR + } + }, + fdd SEQUENCE { + n1PUCCH-AN-P0-r10 INTEGER (0..2047), + n1PUCCH-AN-P1-r10 INTEGER (0..2047) OPTIONAL -- Need OR + } + }, + ... + } OPTIONAL, -- Need ON + ... +} + + +RSS-Config-r15 ::= SEQUENCE { + duration-r15 ENUMERATED {sf8, sf16, sf32, sf40}, + freqLocation-r15 INTEGER (0..98), + periodicity-r15 ENUMERATED {ms160, ms320, ms640, ms1280}, + powerBoost-r15 ENUMERATED {dB0, dB3, dB4dot8, dB6}, + timeOffset-r15 INTEGER (0..31) +} + + +SchedulingRequestConfig ::= CHOICE { + release NULL, + setup SEQUENCE { + sr-PUCCH-ResourceIndex INTEGER (0..2047), + sr-ConfigIndex INTEGER (0..157), + dsr-TransMax ENUMERATED { + n4, n8, n16, n32, n64, spare3, spare2, spare1} + } +} + +SchedulingRequestConfig-v1020 ::= SEQUENCE { + sr-PUCCH-ResourceIndexP1-r10 INTEGER (0..2047) OPTIONAL -- Need OR +} + +SchedulingRequestConfigSCell-r13 ::= CHOICE { + release NULL, + setup SEQUENCE { + sr-PUCCH-ResourceIndex-r13 INTEGER (0..2047), + sr-PUCCH-ResourceIndexP1-r13 INTEGER (0..2047) OPTIONAL, -- Need OR + sr-ConfigIndex-r13 INTEGER (0..157), + dsr-TransMax-r13 ENUMERATED { + n4, n8, n16, n32, n64, spare3, spare2, spare1} + } + +} + +SchedulingRequestConfig-v1530 ::= CHOICE { + release NULL, + setup SEQUENCE { + sr-SlotSPUCCH-IndexFH-r15 INTEGER (0..1319) OPTIONAL, -- Need OR + sr-SlotSPUCCH-IndexNoFH-r15 INTEGER (0..3959) OPTIONAL, -- Need OR + sr-SubslotSPUCCH-ResourceList-r15 SR-SubslotSPUCCH-ResourceList-r15 OPTIONAL, -- Need OR + sr-ConfigIndexSlot-r15 INTEGER (0..36) OPTIONAL, -- Need OR + sr-ConfigIndexSubslot-r15 INTEGER (0..122) OPTIONAL, -- Need OR + dssr-TransMax-r15 ENUMERATED { + n4, n8, n16, n32, n64, spare3, spare2, spare1} + } +} + +SR-SubslotSPUCCH-ResourceList-r15 ::= SEQUENCE (SIZE(1..4)) OF INTEGER (0..1319) + + +SlotOrSubslotPDSCH-Config-r15 ::= CHOICE { + release NULL, + setup SEQUENCE { + altCQI-TableSTTI-r15 ENUMERATED { + allSubframes, csi-SubframeSet1, + csi-SubframeSet2, spare1} OPTIONAL, -- Need OR + altCQI-Table1024QAM-STTI-r15 ENUMERATED { + allSubframes, csi-SubframeSet1, + csi-SubframeSet2, spare1} OPTIONAL, -- Need OR + resourceAllocation-r15 ENUMERATED { + resourceAllocationType0,resourceAllocationType2} OPTIONAL, -- Need OR + tbsIndexAlt-STTI-r15 ENUMERATED {a33} OPTIONAL, -- Need OR + tbsIndexAlt2-STTI-r15 ENUMERATED {b33} OPTIONAL, -- Need OR + tbsIndexAlt3-STTI-r15 ENUMERATED {a37} OPTIONAL, -- Need OR + ... + } +} + + +SlotOrSubslotPUSCH-Config-r15 ::= CHOICE { + release NULL, + setup SEQUENCE { + betaOffsetSlot-ACK-Index-r15 INTEGER(0..15) OPTIONAL, -- Need OR + betaOffset2Slot-ACK-Index-r15 INTEGER(0..15) OPTIONAL, -- Need OR + betaOffsetSubslot-ACK-Index-r15 SEQUENCE (SIZE(1..2)) OF INTEGER(0..15) OPTIONAL, -- Need OR + betaOffset2Subslot-ACK-Index-r15 SEQUENCE (SIZE(1..2)) OF INTEGER(0..15) OPTIONAL, -- Need OR + betaOffsetSlot-RI-Index-r15 INTEGER(0..15) OPTIONAL, -- Need OR + betaOffsetSubslot-RI-Index-r15 SEQUENCE (SIZE(1..2)) OF INTEGER(0..15) OPTIONAL, -- Need OR + betaOffsetSlot-CQI-Index-r15 INTEGER(0..15) OPTIONAL, -- Need OR + betaOffsetSubslot-CQI-Index-r15 INTEGER(0..15) OPTIONAL, -- Need OR + enable256QAM-SlotOrSubslot-r15 Enable256QAM-r14 OPTIONAL, -- Need ON + resourceAllocationOffset-r15 INTEGER (1..2) OPTIONAL, -- Need OR + ul-DMRS-IFDMA-SlotOrSubslot-r15 BOOLEAN, + ... + } +} + + +SoundingRS-UL-ConfigCommon ::= CHOICE { + release NULL, + setup SEQUENCE { + srs-BandwidthConfig ENUMERATED {bw0, bw1, bw2, bw3, bw4, bw5, bw6, bw7}, + srs-SubframeConfig ENUMERATED { + sc0, sc1, sc2, sc3, sc4, sc5, sc6, sc7, + sc8, sc9, sc10, sc11, sc12, sc13, sc14, sc15}, + ackNackSRS-SimultaneousTransmission BOOLEAN, + srs-MaxUpPts ENUMERATED {true} OPTIONAL -- Cond TDD + } +} + +SoundingRS-UL-ConfigDedicated ::= CHOICE{ + release NULL, + setup SEQUENCE { + srs-Bandwidth ENUMERATED {bw0, bw1, bw2, bw3}, + srs-HoppingBandwidth ENUMERATED {hbw0, hbw1, hbw2, hbw3}, + freqDomainPosition INTEGER (0..23), + duration BOOLEAN, + srs-ConfigIndex INTEGER (0..1023), + transmissionComb INTEGER (0..1), + cyclicShift ENUMERATED {cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7} + } +} + +SoundingRS-UL-ConfigDedicated-v1020 ::= SEQUENCE { + srs-AntennaPort-r10 SRS-AntennaPort +} + +SoundingRS-UL-ConfigDedicated-v1310 ::= CHOICE{ + release NULL, + setup SEQUENCE { + transmissionComb-v1310 INTEGER (2..3) OPTIONAL, -- Need OR + cyclicShift-v1310 ENUMERATED {cs8, cs9, cs10, cs11} OPTIONAL, -- Need OR + transmissionCombNum-r13 ENUMERATED {n2, n4} OPTIONAL -- Need OR + } +} + +SoundingRS-UL-ConfigDedicatedUpPTsExt-r13 ::= CHOICE{ + release NULL, + setup SEQUENCE { + srs-UpPtsAdd-r13 ENUMERATED {sym2, sym4}, + srs-Bandwidth-r13 ENUMERATED {bw0, bw1, bw2, bw3}, + srs-HoppingBandwidth-r13 ENUMERATED {hbw0, hbw1, hbw2, hbw3}, + freqDomainPosition-r13 INTEGER (0..23), + duration-r13 BOOLEAN, + srs-ConfigIndex-r13 INTEGER (0..1023), + transmissionComb-r13 INTEGER (0..3), + cyclicShift-r13 ENUMERATED {cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7, + cs8, cs9, cs10, cs11}, + srs-AntennaPort-r13 SRS-AntennaPort, + transmissionCombNum-r13 ENUMERATED {n2, n4} + } +} + +SoundingRS-UL-ConfigDedicatedAperiodic-r10 ::= CHOICE{ + release NULL, + setup SEQUENCE { + srs-ConfigIndexAp-r10 INTEGER (0..31), + srs-ConfigApDCI-Format4-r10 SEQUENCE (SIZE (1..3)) OF SRS-ConfigAp-r10 OPTIONAL,--Need ON + srs-ActivateAp-r10 CHOICE { + release NULL, + setup SEQUENCE { + srs-ConfigApDCI-Format0-r10 SRS-ConfigAp-r10, + srs-ConfigApDCI-Format1a2b2c-r10 SRS-ConfigAp-r10, + ... + } + } OPTIONAL -- Need ON + } +} + +SoundingRS-UL-ConfigDedicatedAperiodic-v1310 ::= CHOICE{ + release NULL, + setup SEQUENCE { + srs-ConfigApDCI-Format4-v1310 SEQUENCE (SIZE (1..3)) OF SRS-ConfigAp-v1310 OPTIONAL,--Need ON + srs-ActivateAp-v1310 CHOICE { + release NULL, + setup SEQUENCE { + srs-ConfigApDCI-Format0-v1310 SRS-ConfigAp-v1310 OPTIONAL, -- Need ON + srs-ConfigApDCI-Format1a2b2c-v1310 SRS-ConfigAp-v1310 OPTIONAL -- Need ON + } + } OPTIONAL -- Need ON + } +} + +SoundingRS-UL-ConfigDedicatedAperiodicUpPTsExt-r13 ::= CHOICE{ + release NULL, + setup SEQUENCE { + srs-UpPtsAdd-r13 ENUMERATED {sym2, sym4}, + srs-ConfigIndexAp-r13 INTEGER (0..31), + srs-ConfigApDCI-Format4-r13 SEQUENCE (SIZE (1..3)) OF SRS-ConfigAp-r13 OPTIONAL,--Need ON + srs-ActivateAp-r13 CHOICE { + release NULL, + setup SEQUENCE { + srs-ConfigApDCI-Format0-r13 SRS-ConfigAp-r13, + srs-ConfigApDCI-Format1a2b2c-r13 SRS-ConfigAp-r13 + } + } OPTIONAL -- Need ON + } +} + +SoundingRS-UL-ConfigDedicatedAperiodic-v1430 ::= CHOICE{ + release NULL, + setup SEQUENCE { + srs-SubframeIndication-r14 INTEGER (1..4) OPTIONAL -- Need ON + } +} + +SRS-ConfigAp-r10 ::= SEQUENCE { + srs-AntennaPortAp-r10 SRS-AntennaPort, + srs-BandwidthAp-r10 ENUMERATED {bw0, bw1, bw2, bw3}, + freqDomainPositionAp-r10 INTEGER (0..23), + transmissionCombAp-r10 INTEGER (0..1), + cyclicShiftAp-r10 ENUMERATED {cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7} +} + +SRS-ConfigAp-v1310 ::= SEQUENCE { + transmissionCombAp-v1310 INTEGER (2..3) OPTIONAL, -- Need OR + cyclicShiftAp-v1310 ENUMERATED {cs8, cs9, cs10, cs11} OPTIONAL, -- Need OR + transmissionCombNum-r13 ENUMERATED {n2, n4} OPTIONAL -- Need OR +} + +SRS-ConfigAp-r13 ::= SEQUENCE { + srs-AntennaPortAp-r13 SRS-AntennaPort, + srs-BandwidthAp-r13 ENUMERATED {bw0, bw1, bw2, bw3}, + freqDomainPositionAp-r13 INTEGER (0..23), + transmissionCombAp-r13 INTEGER (0..3), + cyclicShiftAp-r13 ENUMERATED {cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7, + cs8, cs9, cs10, cs11}, + transmissionCombNum-r13 ENUMERATED {n2, n4} +} + +SRS-AntennaPort ::= ENUMERATED {an1, an2, an4, spare1} + + +SPDCCH-Config-r15 ::= CHOICE { + release NULL, + setup SEQUENCE { + spdcch-L1-ReuseIndication-r15 ENUMERATED {n0,n1,n2} OPTIONAL, -- Need OR + spdcch-SetConfig-r15 SPDCCH-Set-r15 OPTIONAL -- Need OR + } +} + +SPDCCH-Set-r15 ::= SEQUENCE (SIZE (1..4)) OF SPDCCH-Elements-r15 + +SPDCCH-Elements-r15 ::= CHOICE { + release NULL, + setup SEQUENCE { + spdcch-SetConfigId-r15 INTEGER (0..3) OPTIONAL, -- Need OR + spdcch-SetReferenceSig-r15 ENUMERATED {crs, dmrs} OPTIONAL, -- Need OR + transmissionType-r15 ENUMERATED {localised, distributed} OPTIONAL, -- Need OR + spdcch-NoOfSymbols-r15 INTEGER (1..2) OPTIONAL, -- Need OR + dmrs-ScramblingSequenceInt-r15 INTEGER (0..503) OPTIONAL, -- Need OR + dci7-CandidatesPerAL-PDCCH-r15 SEQUENCE (SIZE(1..4)) OF + DCI7-Candidates-r15 OPTIONAL, -- Need OR + dci7-CandidateSetsPerAL-SPDCCH-r15 SEQUENCE (SIZE(1..2)) OF + DCI7-CandidatesPerAL-SPDCCH-r15 OPTIONAL, -- Need OR + resourceBlockAssignment-r15 SEQUENCE{ + numberRB-InFreq-domain-r15 INTEGER (2..100), + resourceBlockAssignment-r15 BIT STRING (SIZE(98)) + } OPTIONAL, -- Need OR + subslotApplicability-r15 BIT STRING (SIZE(5)) OPTIONAL, -- Need OR + al-StartingPointSPDCCH-r15 SEQUENCE (SIZE(1..4)) OF + INTEGER(0..49) OPTIONAL, -- Need OR + subframeType-r15 ENUMERATED {mbsfn, nonmbsfn, all} OPTIONAL, -- Need OR + rateMatchingMode-r15 ENUMERATED {m1, m2, m3, m4} OPTIONAL, -- Need OR + ... + } +} + +DCI7-Candidates-r15 ::= INTEGER (0..6) +DCI7-CandidatesPerAL-SPDCCH-r15 ::= SEQUENCE (SIZE(1..4)) OF DCI7-Candidates-r15 + + +SPS-Config ::= SEQUENCE { + semiPersistSchedC-RNTI C-RNTI OPTIONAL, -- Need OR + sps-ConfigDL SPS-ConfigDL OPTIONAL, -- Need ON + sps-ConfigUL SPS-ConfigUL OPTIONAL -- Need ON +} + +SPS-Config-v1430 ::= SEQUENCE { + ul-SPS-V-RNTI-r14 C-RNTI OPTIONAL, -- Need OR + sl-SPS-V-RNTI-r14 C-RNTI OPTIONAL, -- Need OR + sps-ConfigUL-ToAddModList-r14 SPS-ConfigUL-ToAddModList-r14 OPTIONAL, -- Need ON + sps-ConfigUL-ToReleaseList-r14 SPS-ConfigUL-ToReleaseList-r14 OPTIONAL, -- Need ON + sps-ConfigSL-ToAddModList-r14 SPS-ConfigSL-ToAddModList-r14 OPTIONAL, -- Need ON + sps-ConfigSL-ToReleaseList-r14 SPS-ConfigSL-ToReleaseList-r14 OPTIONAL -- Need ON +} + +SPS-ConfigUL-ToAddModList-r14 ::= SEQUENCE (SIZE (1..maxConfigSPS-r14)) OF SPS-ConfigUL + +SPS-ConfigUL-ToReleaseList-r14 ::= SEQUENCE (SIZE (1..maxConfigSPS-r14)) OF SPS-ConfigIndex-r14 + +SPS-ConfigSL-ToAddModList-r14 ::= SEQUENCE (SIZE (1..maxConfigSPS-r14)) OF SPS-ConfigSL-r14 + +SPS-ConfigSL-ToReleaseList-r14 ::= SEQUENCE (SIZE (1..maxConfigSPS-r14)) OF SPS-ConfigIndex-r14 + +SPS-Config-v1530 ::= SEQUENCE { + -- eNote (ToDo): Remove if common view is that legacy semiPersistSchedC-RNTI and sps-ConfigDL + -- are used for STTI + -- eNote (ToDo): Clarify restrictions applicable for SCells i.e. only STTI fields and + -- only single entry + semiPersistSchedC-RNTI-r15 C-RNTI OPTIONAL, -- Need OR + sps-ConfigDL SPS-ConfigDL OPTIONAL, -- Need ON + sps-ConfigUL-STTI-ToAddModList-r15 SPS-ConfigUL-STTI-ToAddModList-r15 OPTIONAL, -- Need ON + sps-ConfigUL-STTI-ToReleaseList-r15 SPS-ConfigUL-STTI-ToReleaseList-r15 OPTIONAL, -- Need ON + sps-ConfigUL-ToAddModList-r15 SPS-ConfigUL-ToAddModList-r15 OPTIONAL, -- Need ON + sps-ConfigUL-ToReleaseList-r15 SPS-ConfigUL-ToReleaseList-r15 OPTIONAL -- Need ON +} + +SPS-ConfigUL-STTI-ToAddModList-r15 ::= SEQUENCE (SIZE (1..maxConfigSPS-r15)) OF SPS-ConfigUL-STTI-r15 + +SPS-ConfigUL-STTI-ToReleaseList-r15 ::= SEQUENCE (SIZE (1..maxConfigSPS-r15)) OF SPS-ConfigIndex-r15 + +SPS-ConfigUL-ToAddModList-r15 ::= SEQUENCE (SIZE (1..maxConfigSPS-r15)) OF SPS-ConfigUL + +SPS-ConfigUL-ToReleaseList-r15 ::= SEQUENCE (SIZE (1..maxConfigSPS-r15)) OF SPS-ConfigIndex-r15 + +SPS-ConfigDL ::= CHOICE{ + release NULL, + setup SEQUENCE { + semiPersistSchedIntervalDL ENUMERATED { + sf10, sf20, sf32, sf40, sf64, sf80, + sf128, sf160, sf320, sf640, spare6, + spare5, spare4, spare3, spare2, + spare1}, + numberOfConfSPS-Processes INTEGER (1..8), + n1PUCCH-AN-PersistentList N1PUCCH-AN-PersistentList, + ..., + [[ twoAntennaPortActivated-r10 CHOICE { + release NULL, + setup SEQUENCE { + n1PUCCH-AN-PersistentListP1-r10 N1PUCCH-AN-PersistentList + } + } OPTIONAL -- Need ON + ]] + } +} + +SPS-ConfigUL ::= CHOICE { + release NULL, + setup SEQUENCE { + semiPersistSchedIntervalUL ENUMERATED { + sf10, sf20, sf32, sf40, sf64, sf80, + sf128, sf160, sf320, sf640, sf1-v1430, + sf2-v1430, sf3-v1430, sf4-v1430, sf5-v1430, + spare1}, + implicitReleaseAfter ENUMERATED {e2, e3, e4, e8}, + p0-Persistent SEQUENCE { + p0-NominalPUSCH-Persistent INTEGER (-126..24), + p0-UE-PUSCH-Persistent INTEGER (-8..7) + } OPTIONAL, -- Need OP + twoIntervalsConfig ENUMERATED {true} OPTIONAL, -- Cond TDD + ..., + [[ p0-PersistentSubframeSet2-r12 CHOICE { + release NULL, + setup SEQUENCE { + p0-NominalPUSCH-PersistentSubframeSet2-r12 INTEGER (-126..24), + p0-UE-PUSCH-PersistentSubframeSet2-r12 INTEGER (-8..7) + } + } OPTIONAL -- Need ON + ]], + [[ numberOfConfUlSPS-Processes-r13 INTEGER (1..8) OPTIONAL -- Need OR + ]], + [[ fixedRV-NonAdaptive-r14 ENUMERATED {true} OPTIONAL, -- Need OR + sps-ConfigIndex-r14 SPS-ConfigIndex-r14 OPTIONAL, -- Need OR + semiPersistSchedIntervalUL-v1430 ENUMERATED { + sf50, sf100, sf200, sf300, sf400, sf500, + sf600, sf700, sf800, sf900, sf1000, spare5, + spare4, spare3, spare2, spare1} OPTIONAL -- Need OR + + ]], + [[ cyclicShiftSPS-r15 ENUMERATED {cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7} + OPTIONAL, -- Need ON + -- eNote (TBC) that no separate STTI field is required (alike in merged CR) + harq-ProcID-Offset-r15 INTEGER (0..7) OPTIONAL, -- Need ON + rv-SPS-UL-Repetitions-r15 ENUMERATED {ulrvseq1, ulrvseq2, ulrvseq3} OPTIONAL, -- Need ON + tpc-PDCCH-ConfigPUSCH-SPS-r15 TPC-PDCCH-Config OPTIONAL, -- Need ON + totalNumberPUSCH-SPS-UL-Repetitions-r15 ENUMERATED {n2,n3,n4,n6} OPTIONAL, -- Need ON + sps-ConfigIndex-r15 SPS-ConfigIndex-r15 OPTIONAL -- Cond SPS + ]] + } +} + +SPS-ConfigSL-r14 ::= SEQUENCE { + sps-ConfigIndex-r14 SPS-ConfigIndex-r14, + semiPersistSchedIntervalSL-r14 ENUMERATED { + sf20, sf50, sf100, sf200, sf300, sf400, + sf500, sf600, sf700, sf800, sf900, sf1000, + spare4, spare3, spare2, spare1} +} + +SPS-ConfigIndex-r14 ::= INTEGER (1..maxConfigSPS-r14) + +SPS-ConfigIndex-r15 ::= INTEGER (1..maxConfigSPS-r15) + +N1PUCCH-AN-PersistentList ::= SEQUENCE (SIZE (1..4)) OF INTEGER (0..2047) + +N1SPUCCH-AN-PersistentList-r15 ::= SEQUENCE (SIZE (1..4)) OF INTEGER (0..2047) + +SPS-ConfigDL-STTI-r15 ::= CHOICE{ + release NULL, + setup SEQUENCE { + semiPersistSchedIntervalDL-STTI-r15 ENUMERATED { + sTTI1, sTTI2, sTTI3, sTTI4, sTTI6, sTTI8, sTTI12, sTTI16, + sTTI20, sTTI40, sTTI60, sTTI80, sTTI120, sTTI240, + spare2, spare1}, + numberOfConfSPS-Processes-STTI-r15 INTEGER (1..12), + twoAntennaPortActivated-r15 CHOICE { + release NULL, + setup SEQUENCE { + n1SPUCCH-AN-PersistentListP1-r15 N1SPUCCH-AN-PersistentList-r15 + } + } OPTIONAL, -- Need ON + sTTI-StartTimeDL-r15 INTEGER (0..5), + tpc-PDCCH-ConfigPUCCH-SPS-r15 TPC-PDCCH-Config OPTIONAL, -- Need ON + ... + } +} + +SPS-ConfigUL-STTI-r15 ::= CHOICE { + release NULL, + setup SEQUENCE { + semiPersistSchedIntervalUL-STTI-r15 ENUMERATED { + sTTI1, sTTI2, sTTI3, sTTI4, sTTI6, sTTI8, sTTI12, sTTI16, + sTTI20, sTTI40, sTTI60, sTTI80, sTTI120, sTTI240, + spare2, spare1}, + implicitReleaseAfter ENUMERATED {e2, e3, e4, e8}, + p0-Persistent-r15 SEQUENCE { + p0-NominalSPUSCH-Persistent-r15 INTEGER (-126..24), + p0-UE-SPUSCH-Persistent-r15 INTEGER (-8..7) + } OPTIONAL, -- Need OP + twoIntervalsConfig-r15 ENUMERATED {true} OPTIONAL, -- Cond TDD + p0-PersistentSubframeSet2-r15 CHOICE { + release NULL, + setup SEQUENCE { + p0-NominalSPUSCH-PersistentSubframeSet2-r15 INTEGER (-126..24), + p0-UE-SPUSCH-PersistentSubframeSet2-r15 INTEGER (-8..7) + } + } OPTIONAL, -- Need ON + numberOfConfUL-SPS-Processes-STTI-r15 INTEGER (1..12) OPTIONAL, -- Need OR + sTTI-StartTimeUL-r15 INTEGER (0..5), + tpc-PDCCH-ConfigPUSCH-SPS-r15 TPC-PDCCH-Config OPTIONAL, -- Need ON + cyclicShiftSPS-sTTI-r15 ENUMERATED {cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7} OPTIONAL, -- Need ON + ifdma-Config-SPS-r15 BOOLEAN OPTIONAL, -- Need ON + harq-ProcID-offset-r15 INTEGER (0..15) OPTIONAL, -- Need ON + rv-SPS-STTI-UL-Repetitions-r15 ENUMERATED {ulrvseq1, ulrvseq2, ulrvseq3} OPTIONAL, -- Need ON + sps-ConfigIndex-r15 SPS-ConfigIndex-r15 OPTIONAL, -- Need OR + tbs-scalingFactorSubslotSPS-UL-Repetitions-r15 ENUMERATED {n6, n12} OPTIONAL, -- Need ON + totalNumberPUSCH-SPS-STTI-UL-Repetitions-r15 ENUMERATED {n2,n3,n4,n6} OPTIONAL, -- Need ON + ... + } +} + + + +SPUCCH-Config-r15 ::= CHOICE { + release NULL, + setup SEQUENCE { + spucch-Set-r15 SPUCCH-Set-r15 OPTIONAL, -- Need ON + twoAntennaPortActivatedSPUCCH-Format1a1b-r15 ENUMERATED {true} OPTIONAL, -- Need OR + twoAntennaPortActivatedSPUCCH-Format3-r15 SEQUENCE { + n3SPUCCH-AN-List-r15 SEQUENCE (SIZE (1..4)) OF INTEGER (0..549) + } + } +} + +SPUCCH-Set-r15 ::= SEQUENCE (SIZE (1..4)) OF SPUCCH-Elements-r15 + +SPUCCH-Elements-r15 ::= CHOICE { + release NULL, + setup SEQUENCE { + n1SubslotSPUCCH-AN-List-r15 SEQUENCE (SIZE(1..4)) OF INTEGER (0..1319) OPTIONAL, -- Need OR + n1SlotSPUCCH-FH-AN-List-r15 INTEGER (0..1319) OPTIONAL, -- Need OR + n1SlotSPUCCH-NoFH-AN-List-r15 INTEGER (0..3959) OPTIONAL, -- Need OR + n3SPUCCH-AN-List-r15 INTEGER (0..549) OPTIONAL, -- Need OR + n4SPUCCHSlot-Resource-r15 SEQUENCE (SIZE(1..2)) OF N4SPUCCH-Resource-r15 OPTIONAL, -- Need OR + n4SPUCCHSubslot-Resource-r15 SEQUENCE (SIZE(1..2)) OF N4SPUCCH-Resource-r15 OPTIONAL, -- Need OR + n4maxCoderateSlotPUCCH-r15 INTEGER (0..7) OPTIONAL, -- Need OR + n4maxCoderateSubslotPUCCH-r15 INTEGER (0..7) OPTIONAL, -- Need OR + n4maxCoderateMultiResourceSlotPUCCH-r15 INTEGER (0..7) OPTIONAL, -- Need OR + n4maxCoderateMultiResourceSubslotPUCCH-r15 INTEGER (0..7) OPTIONAL -- Need OR + } +} + +N4SPUCCH-Resource-r15 ::= SEQUENCE { + n4startingPRB-r15 INTEGER (0..109), + n4numberOfPRB-r15 INTEGER (0..7) +} + + +SRS-TPC-PDCCH-Config-r14 ::= CHOICE { + release NULL, + setup SEQUENCE { + srs-TPC-RNTI-r14 BIT STRING (SIZE (16)), + startingBitOfFormat3B-r14 INTEGER (0..31), fieldTypeFormat3B-r14 INTEGER (1..4), + srs-CC-SetIndexlist-r14 SEQUENCE (SIZE(1..4)) OF SRS-CC-SetIndex-r14 OPTIONAL -- Cond SRS-Trigger-TypeA + + } +} + +SRS-CC-SetIndex-r14 ::= SEQUENCE { + cc-SetIndex-r14 INTEGER (0..3), + cc-IndexInOneCC-Set-r14 INTEGER (0..7) +} + + +TDD-Config ::= SEQUENCE { + subframeAssignment ENUMERATED { + sa0, sa1, sa2, sa3, sa4, sa5, sa6}, + specialSubframePatterns ENUMERATED { + ssp0, ssp1, ssp2, ssp3, ssp4,ssp5, ssp6, ssp7, + ssp8} +} + +TDD-Config-v1130 ::= SEQUENCE { + specialSubframePatterns-v1130 ENUMERATED {ssp7,ssp9} +} + +TDD-Config-v1430 ::= SEQUENCE { + specialSubframePatterns-v1430 ENUMERATED {ssp10} +} + +TDD-Config-v1450 ::= SEQUENCE { + specialSubframePatterns-v1450 ENUMERATED {ssp10-CRS-LessDwPTS} +} + +TDD-ConfigSL-r12 ::= SEQUENCE { + subframeAssignmentSL-r12 ENUMERATED { + none, sa0, sa1, sa2, sa3, sa4, sa5, sa6} +} + +SubframeAssignment-r15 ::= ENUMERATED {sa0, sa1, sa2, sa3, sa4, sa5, sa6} + + +TimeAlignmentTimer ::= ENUMERATED { + sf500, sf750, sf1280, sf1920, sf2560, sf5120, + sf10240, infinity} + +TimeReferenceInfo-r15 ::= SEQUENCE { + time-r15 ReferenceTime-r15, + uncertainty-r15 INTEGER (0..12) OPTIONAL, -- Need OR + timeInfoType-r15 ENUMERATED {localClock} OPTIONAL, -- Need OR + referenceSFN-r15 INTEGER (0..1023) OPTIONAL -- Cond TimeRef +} + +ReferenceTime-r15 ::= SEQUENCE { + refDays-r15 INTEGER (0..72999), + refSeconds-r15 INTEGER (0..86399), + refMilliSeconds-r15 INTEGER (0..999), + refQuarterMicroSeconds-r15 INTEGER (0..3999) +} + + +TPC-PDCCH-Config ::= CHOICE { + release NULL, + setup SEQUENCE { + tpc-RNTI BIT STRING (SIZE (16)), + tpc-Index TPC-Index + } +} + +TPC-PDCCH-ConfigSCell-r13 ::= CHOICE { + release NULL, + setup SEQUENCE { + tpc-Index-PUCCH-SCell-r13 TPC-Index + } +} + +TPC-Index ::= CHOICE { + indexOfFormat3 INTEGER (1..15), + indexOfFormat3A INTEGER (1..31) +} + + +TunnelConfigLWIP-r13 ::= SEQUENCE { + ip-Address-r13 IP-Address-r13, + ike-Identity-r13 IKE-Identity-r13, + ..., + [[ lwip-Counter-r13 INTEGER (0..65535) OPTIONAL -- Cond LWIP-Setup + ]] +} + +IKE-Identity-r13 ::= SEQUENCE { + idI-r13 OCTET STRING +} + +IP-Address-r13 ::= CHOICE { + ipv4-r13 BIT STRING (SIZE (32)), + ipv6-r13 BIT STRING (SIZE (128)) +} + + +UplinkPowerControlCommon ::= SEQUENCE { + p0-NominalPUSCH INTEGER (-126..24), + alpha Alpha-r12, + p0-NominalPUCCH INTEGER (-127..-96), + deltaFList-PUCCH DeltaFList-PUCCH, + deltaPreambleMsg3 INTEGER (-1..6) +} + +UplinkPowerControlCommon-v1020 ::= SEQUENCE { + deltaF-PUCCH-Format3-r10 ENUMERATED {deltaF-1, deltaF0, deltaF1, deltaF2, + deltaF3, deltaF4, deltaF5, deltaF6}, + deltaF-PUCCH-Format1bCS-r10 ENUMERATED {deltaF1, deltaF2, spare2, spare1} +} + +UplinkPowerControlCommon-v1310 ::= SEQUENCE { + deltaF-PUCCH-Format4-r13 ENUMERATED {deltaF16, deltaF15, deltaF14,deltaF13, deltaF12, + deltaF11, deltaF10, spare1} OPTIONAL, -- Need OR + deltaF-PUCCH-Format5-13 ENUMERATED { deltaF13, deltaF12, deltaF11, deltaF10, deltaF9, + deltaF8, deltaF7, spare1} OPTIONAL -- Need OR +} + +UplinkPowerControlCommon-v1530 ::= SEQUENCE { + deltaFList-SPUCCH-r15 DeltaFList-SPUCCH-r15 +} + +UplinkPowerControlCommonPSCell-r12 ::= SEQUENCE { +-- For uplink power control the additional/ missing fields are signalled (compared to SCell) + deltaF-PUCCH-Format3-r12 ENUMERATED {deltaF-1, deltaF0, deltaF1, deltaF2, + deltaF3, deltaF4, deltaF5, deltaF6}, + deltaF-PUCCH-Format1bCS-r12 ENUMERATED {deltaF1, deltaF2, spare2, spare1}, + p0-NominalPUCCH-r12 INTEGER (-127..-96), + deltaFList-PUCCH-r12 DeltaFList-PUCCH +} + + +UplinkPowerControlCommonSCell-r10 ::= SEQUENCE { + p0-NominalPUSCH-r10 INTEGER (-126..24), + alpha-r10 Alpha-r12 +} + +UplinkPowerControlCommonSCell-v1130 ::= SEQUENCE { + deltaPreambleMsg3-r11 INTEGER (-1..6) +} + +UplinkPowerControlCommonSCell-v1310 ::= SEQUENCE { +-- For uplink power control the additional/ missing fields are signalled (compared to SCell) + p0-NominalPUCCH INTEGER (-127..-96), + deltaFList-PUCCH DeltaFList-PUCCH, + deltaF-PUCCH-Format3-r12 ENUMERATED {deltaF-1, deltaF0, deltaF1, + deltaF2, deltaF3, deltaF4, deltaF5, + deltaF6} OPTIONAL, -- Need OR + deltaF-PUCCH-Format1bCS-r12 ENUMERATED {deltaF1, deltaF2, + spare2, spare1} OPTIONAL, -- Need OR + deltaF-PUCCH-Format4-r13 ENUMERATED {deltaF16, deltaF15, deltaF14, + deltaF13, deltaF12, deltaF11, deltaF10, + spare1} OPTIONAL, -- Need OR + deltaF-PUCCH-Format5-13 ENUMERATED { deltaF13, deltaF12, deltaF11, + deltaF10, deltaF9, deltaF8, deltaF7, + spare1} OPTIONAL -- Need OR +} + +UplinkPowerControlCommonPUSCH-LessCell-v1430 ::= SEQUENCE { + p0-Nominal-PeriodicSRS-r14 INTEGER (-126..24) OPTIONAL, -- Need OR + p0-Nominal-AperiodicSRS-r14 INTEGER (-126..24) OPTIONAL, -- Need OR + alpha-SRS-r14 Alpha-r12 OPTIONAL -- Need OR +} + +UplinkPowerControlDedicated ::= SEQUENCE { + p0-UE-PUSCH INTEGER (-8..7), + deltaMCS-Enabled ENUMERATED {en0, en1}, + accumulationEnabled BOOLEAN, + p0-UE-PUCCH INTEGER (-8..7), + pSRS-Offset INTEGER (0..15), + filterCoefficient FilterCoefficient DEFAULT fc4 +} + +UplinkPowerControlDedicated-v1020 ::= SEQUENCE { + deltaTxD-OffsetListPUCCH-r10 DeltaTxD-OffsetListPUCCH-r10 OPTIONAL, -- Need OR + pSRS-OffsetAp-r10 INTEGER (0..15) OPTIONAL -- Need OR +} + +UplinkPowerControlDedicated-v1130 ::= SEQUENCE { + pSRS-Offset-v1130 INTEGER (16..31) OPTIONAL, -- Need OR + pSRS-OffsetAp-v1130 INTEGER (16..31) OPTIONAL, -- Need OR + deltaTxD-OffsetListPUCCH-v1130 DeltaTxD-OffsetListPUCCH-v1130 OPTIONAL -- Need OR +} + +UplinkPowerControlDedicated-v1250 ::= SEQUENCE { + set2PowerControlParameter CHOICE { + release NULL, + setup SEQUENCE { + tpc-SubframeSet-r12 BIT STRING (SIZE(10)), + p0-NominalPUSCH-SubframeSet2-r12 INTEGER (-126..24), + alpha-SubframeSet2-r12 Alpha-r12, + p0-UE-PUSCH-SubframeSet2-r12 INTEGER (-8..7) + } + } +} + +UplinkPowerControlDedicated-v1530 ::= SEQUENCE { + alpha-UE-r15 Alpha-r12 OPTIONAL, -- Need OR + p0-UE-PUSCH-r15 INTEGER (-16..15) OPTIONAL -- Need OR +} + +UplinkPowerControlDedicatedSTTI-r15 ::= SEQUENCE { + accumulationEnabledSTTI-r15 BOOLEAN, + deltaTxD-OffsetListSPUCCH-r15 DeltaTxD-OffsetListSPUCCH-r15 OPTIONAL, -- Need OR + uplinkPower-CSIPayload BOOLEAN +} + +UplinkPUSCH-LessPowerControlDedicated-v1430 ::= SEQUENCE { + p0-UE-PeriodicSRS-r14 INTEGER (-8..7) OPTIONAL, -- Need OR + p0-UE-AperiodicSRS-r14 INTEGER (-8..7) OPTIONAL, -- Need OR + accumulationEnabled-r14 BOOLEAN +} + +UplinkPowerControlDedicatedSCell-r10 ::= SEQUENCE { + p0-UE-PUSCH-r10 INTEGER (-8..7), + deltaMCS-Enabled-r10 ENUMERATED {en0, en1}, + accumulationEnabled-r10 BOOLEAN, + pSRS-Offset-r10 INTEGER (0..15), + pSRS-OffsetAp-r10 INTEGER (0..15) OPTIONAL, -- Need OR + filterCoefficient-r10 FilterCoefficient DEFAULT fc4, + pathlossReferenceLinking-r10 ENUMERATED {pCell, sCell} +} + +UplinkPowerControlDedicatedSCell-v1310 ::= SEQUENCE { +--Release 8 + p0-UE-PUCCH INTEGER (-8..7), +--Release 10 + deltaTxD-OffsetListPUCCH-r10 DeltaTxD-OffsetListPUCCH-r10 OPTIONAL -- Need OR +} + +Alpha-r12 ::= ENUMERATED {al0, al04, al05, al06, al07, al08, al09, al1} + +DeltaFList-PUCCH ::= SEQUENCE { + deltaF-PUCCH-Format1 ENUMERATED {deltaF-2, deltaF0, deltaF2}, + deltaF-PUCCH-Format1b ENUMERATED {deltaF1, deltaF3, deltaF5}, + deltaF-PUCCH-Format2 ENUMERATED {deltaF-2, deltaF0, deltaF1, deltaF2}, + deltaF-PUCCH-Format2a ENUMERATED {deltaF-2, deltaF0, deltaF2}, + deltaF-PUCCH-Format2b ENUMERATED {deltaF-2, deltaF0, deltaF2} +} + +DeltaFList-SPUCCH-r15 ::= CHOICE { + release NULL, + setup SEQUENCE { + deltaF-slotSPUCCH-Format1-r15 ENUMERATED {deltaF-1, deltaF0, deltaF1, deltaF2, + deltaF3, deltaF4, deltaF5, deltaF6} OPTIONAL, --Need OR + deltaF-slotSPUCCH-Format1a-r15 ENUMERATED {deltaF1, deltaF2, deltaF3, deltaF4, + deltaF5, deltaF6, deltaF7, deltaF8} OPTIONAL, --Need OR + deltaF-slotSPUCCH-Format1b-r15 ENUMERATED {deltaF3, deltaF4, deltaF5, deltaF6, + deltaF7, deltaF8, deltaF9, deltaF10} OPTIONAL,--Need OR + deltaF-slotSPUCCH-Format3-r15 ENUMERATED {deltaF4, deltaF5, deltaF6, deltaF7, + deltaF8, deltaF9, deltaF10, deltaF11} OPTIONAL,--Need OR + deltaF-slotSPUCCH-RM-Format4-r15 ENUMERATED {deltaF13, deltaF14, deltaF15, deltaF16, + deltaF17, deltaF18, deltaF19, deltaF20} OPTIONAL, +--Need OR + deltaF-slotSPUCCH-TBCC-Format4-r15 ENUMERATED {deltaF10, deltaF11, deltaF12, deltaF13, + deltaF14, deltaF15, deltaF16, deltaF17} OPTIONAL, +--Need OR + deltaF-subslotSPUCCH-Format1and1a-r15 ENUMERATED {deltaF5, deltaF6, deltaF7, deltaF8, + deltaF9, deltaF10, deltaF11, deltaF12} OPTIONAL, +--Need OR + deltaF-subslotSPUCCH-Format1b-r15 ENUMERATED {deltaF6, deltaF7, deltaF8, deltaF9, + deltaF10, deltaF11, deltaF12, deltaF13} OPTIONAL, +--Need OR + deltaF-subslotSPUCCH-RM-Format4-r15 ENUMERATED {deltaF15, deltaF16, deltaF17, deltaF18, + deltaF19, deltaF20, deltaF21, deltaF22} OPTIONAL, +--Need OR + deltaF-subslotSPUCCH-TBCC-Format4-r15 ENUMERATED {deltaF10, deltaF11, deltaF12, deltaF13, + deltaF14, deltaF15, deltaF16, deltaF17} OPTIONAL, +--Need OR + ... + } +} + +DeltaTxD-OffsetListPUCCH-r10 ::= SEQUENCE { + deltaTxD-OffsetPUCCH-Format1-r10 ENUMERATED {dB0, dB-2}, + deltaTxD-OffsetPUCCH-Format1a1b-r10 ENUMERATED {dB0, dB-2}, + deltaTxD-OffsetPUCCH-Format22a2b-r10 ENUMERATED {dB0, dB-2}, + deltaTxD-OffsetPUCCH-Format3-r10 ENUMERATED {dB0, dB-2}, + ... + +} + +DeltaTxD-OffsetListPUCCH-v1130 ::= SEQUENCE { + deltaTxD-OffsetPUCCH-Format1bCS-r11 ENUMERATED {dB0, dB-1} +} + +DeltaTxD-OffsetListSPUCCH-r15 ::= SEQUENCE { + deltaTxD-OffsetSPUCCH-Format1-r15 ENUMERATED {dB0, dB-2}, + deltaTxD-OffsetSPUCCH-Format1a-r15 ENUMERATED {dB0, dB-2}, + deltaTxD-OffsetSPUCCH-Format1b-r15 ENUMERATED {dB0, dB-2}, + deltaTxD-OffsetSPUCCH-Format3-r15 ENUMERATED {dB0, dB-2}, + ... +} + + +WLAN-Id-List-r13 ::= SEQUENCE (SIZE (1..maxWLAN-Id-r13)) OF WLAN-Identifiers-r12 + + +WLAN-MobilityConfig-r13 ::= SEQUENCE { + wlan-ToReleaseList-r13 WLAN-Id-List-r13 OPTIONAL, -- Need ON + wlan-ToAddList-r13 WLAN-Id-List-r13 OPTIONAL, -- Need ON + associationTimer-r13 ENUMERATED {s10, s30, + s60, s120, s240} OPTIONAL, -- Need OR + successReportRequested-r13 ENUMERATED {true} OPTIONAL, -- Need OR + ..., + [[ wlan-SuspendConfig-r14 WLAN-SuspendConfig-r14 OPTIONAL -- Need ON + ]] +} + + +WUS-Config-r15 ::= SEQUENCE { + maxDurationFactor-r15 ENUMERATED {one32th, one16th, one8th, one4th}, + numPOs-r15 ENUMERATED {n1, n2, n4, spare1} DEFAULT n1, + freqLocation-r15 ENUMERATED {n0, n2, n4, spare1}, + timeOffsetDRX-r15 ENUMERATED {ms40, ms80, ms160, ms240}, + timeOffset-eDRX-Short-r15 ENUMERATED {ms40, ms80, ms160, ms240}, + timeOffset-eDRX-Long-r15 ENUMERATED {ms1000, ms2000} OPTIONAL -- Need OP +} + + +NextHopChainingCount ::= INTEGER (0..7) + + +SecurityAlgorithmConfig ::= SEQUENCE { + cipheringAlgorithm CipheringAlgorithm-r12, + integrityProtAlgorithm ENUMERATED { + eia0-v920, eia1, eia2, eia3-v1130, spare4, spare3, + spare2, spare1, ...} +} + +CipheringAlgorithm-r12 ::= ENUMERATED { + eea0, eea1, eea2, eea3-v1130, spare4, spare3, + spare2, spare1, ...} + + +ShortMAC-I ::= BIT STRING (SIZE (16)) + + +AdditionalSpectrumEmission ::= INTEGER (1..32) + +AdditionalSpectrumEmission-v10l0 ::= INTEGER (33..288) + + +AdditionalSpectrumEmissionNR-r15 ::= INTEGER (0..7) + + +ARFCN-ValueCDMA2000 ::= INTEGER (0..2047) + + +ARFCN-ValueEUTRA ::= INTEGER (0..maxEARFCN) + +ARFCN-ValueEUTRA-v9e0 ::= INTEGER (maxEARFCN-Plus1..maxEARFCN2) + +ARFCN-ValueEUTRA-r9 ::= INTEGER (0..maxEARFCN2) + + +ARFCN-ValueGERAN ::= INTEGER (0..1023) + + +ARFCN-ValueNR-r15 ::= INTEGER (0.. 3279165) + + +ARFCN-ValueUTRA ::= INTEGER (0..16383) + + +BandclassCDMA2000 ::= ENUMERATED { + bc0, bc1, bc2, bc3, bc4, bc5, bc6, bc7, bc8, + bc9, bc10, bc11, bc12, bc13, bc14, bc15, bc16, + bc17, bc18-v9a0, bc19-v9a0, bc20-v9a0, bc21-v9a0, + spare10, spare9, spare8, spare7, spare6, spare5, spare4, + spare3, spare2, spare1, ...} + + +BandIndicatorGERAN ::= ENUMERATED {dcs1800, pcs1900} + + +CarrierFreqCDMA2000 ::= SEQUENCE { + bandClass BandclassCDMA2000, + arfcn ARFCN-ValueCDMA2000 +} + + +CarrierFreqGERAN ::= SEQUENCE { + arfcn ARFCN-ValueGERAN, + bandIndicator BandIndicatorGERAN +} + + +CarrierFreqsGERAN ::= SEQUENCE { + startingARFCN ARFCN-ValueGERAN, + bandIndicator BandIndicatorGERAN, + followingARFCNs CHOICE { + explicitListOfARFCNs ExplicitListOfARFCNs, + equallySpacedARFCNs SEQUENCE { + arfcn-Spacing INTEGER (1..8), + numberOfFollowingARFCNs INTEGER (0..31) + }, + variableBitMapOfARFCNs OCTET STRING (SIZE (1..16)) + } +} + +ExplicitListOfARFCNs ::= SEQUENCE (SIZE (0..31)) OF ARFCN-ValueGERAN + + +CarrierFreqListMBMS-r11 ::= SEQUENCE (SIZE (1..maxFreqMBMS-r11)) OF ARFCN-ValueEUTRA-r9 + + +CDMA2000-Type ::= ENUMERATED {type1XRTT, typeHRPD} + + +CellIdentity ::= BIT STRING (SIZE (28)) + + +CellIndexList ::= SEQUENCE (SIZE (1..maxCellMeas)) OF CellIndex + +CellIndex ::= INTEGER (1..maxCellMeas) + + +CellReselectionPriority ::= INTEGER (0..7) + + +CellSelectionInfoCE-r13 ::= SEQUENCE { + q-RxLevMinCE-r13 Q-RxLevMin, + q-QualMinRSRQ-CE-r13 Q-QualMin-r9 OPTIONAL -- Need OR +} + +CellSelectionInfoCE-v1530 ::= SEQUENCE { + powerClass14dBm-Offset-r15 ENUMERATED {dB-6, dB-3, dB3, dB6, dB9, dB12} +} + + +CellSelectionInfoCE1-r13 ::= SEQUENCE { + q-RxLevMinCE1-r13 Q-RxLevMin, + q-QualMinRSRQ-CE1-r13 Q-QualMin-r9 OPTIONAL -- Need OR +} + +CellSelectionInfoCE1-v1360 ::= SEQUENCE { + delta-RxLevMinCE1-v1360 INTEGER (-8..-1) +} + +CellReselectionSubPriority-r13 ::= ENUMERATED {oDot2, oDot4, oDot6, oDot8} + + +CSFB-RegistrationParam1XRTT ::= SEQUENCE { + sid BIT STRING (SIZE (15)), + nid BIT STRING (SIZE (16)), + multipleSID BOOLEAN, + multipleNID BOOLEAN, + homeReg BOOLEAN, + foreignSIDReg BOOLEAN, + foreignNIDReg BOOLEAN, + parameterReg BOOLEAN, + powerUpReg BOOLEAN, + registrationPeriod BIT STRING (SIZE (7)), + registrationZone BIT STRING (SIZE (12)), + totalZone BIT STRING (SIZE (3)), + zoneTimer BIT STRING (SIZE (3)) +} + +CSFB-RegistrationParam1XRTT-v920 ::= SEQUENCE { + powerDownReg-r9 ENUMERATED {true} +} + + +CellGlobalIdEUTRA ::= SEQUENCE { + plmn-Identity PLMN-Identity, + cellIdentity CellIdentity +} + + +CellGlobalIdUTRA ::= SEQUENCE { + plmn-Identity PLMN-Identity, + cellIdentity BIT STRING (SIZE (28)) +} + + +CellGlobalIdGERAN ::= SEQUENCE { + plmn-Identity PLMN-Identity, + locationAreaCode BIT STRING (SIZE (16)), + cellIdentity BIT STRING (SIZE (16)) +} + + +CellGlobalIdCDMA2000 ::= CHOICE { + cellGlobalId1XRTT BIT STRING (SIZE (47)), + cellGlobalIdHRPD BIT STRING (SIZE (128)) +} + + +CellSelectionInfoNFreq-r13 ::= SEQUENCE { + -- Cell selection information as in SIB1 + q-RxLevMin-r13 Q-RxLevMin, + q-RxLevMinOffset INTEGER (1..8) OPTIONAL, -- Need OP + -- Cell re-selection information as in SIB3 + q-Hyst-r13 ENUMERATED { + dB0, dB1, dB2, dB3, dB4, dB5, dB6, dB8, dB10, + dB12, dB14, dB16, dB18, dB20, dB22, dB24}, + q-RxLevMinReselection-r13 Q-RxLevMin, + t-ReselectionEUTRA-r13 T-Reselection +} + + +CSG-Identity ::= BIT STRING (SIZE (27)) + + +FreqBandIndicator ::= INTEGER (1..maxFBI) + +FreqBandIndicator-v9e0 ::= INTEGER (maxFBI-Plus1..maxFBI2) + +FreqBandIndicator-r11 ::= INTEGER (1..maxFBI2) + + +FreqBandIndicatorNR-r15 ::= INTEGER (1.. maxFBI-NR-r15) + + +MobilityControlInfo ::= SEQUENCE { + targetPhysCellId PhysCellId, + carrierFreq CarrierFreqEUTRA OPTIONAL, -- Cond HO-toEUTRA2 + carrierBandwidth CarrierBandwidthEUTRA OPTIONAL, -- Cond HO-toEUTRA + additionalSpectrumEmission AdditionalSpectrumEmission OPTIONAL, -- Cond HO-toEUTRA + t304 ENUMERATED { + ms50, ms100, ms150, ms200, ms500, ms1000, + ms2000, ms10000-v1310}, + newUE-Identity C-RNTI, + radioResourceConfigCommon RadioResourceConfigCommon, + rach-ConfigDedicated RACH-ConfigDedicated OPTIONAL, -- Need OP + ..., + [[ carrierFreq-v9e0 CarrierFreqEUTRA-v9e0 OPTIONAL -- Need ON + ]], + [[ drb-ContinueROHC-r11 ENUMERATED {true} OPTIONAL -- Cond HO + ]], + [[ mobilityControlInfoV2X-r14 MobilityControlInfoV2X-r14 OPTIONAL, -- Need ON + handoverWithoutWT-Change-r14 ENUMERATED {keepLWA-Config, sendEndMarker} OPTIONAL, -- Cond HO + makeBeforeBreak-r14 ENUMERATED {true} OPTIONAL, -- Need OR + rach-Skip-r14 RACH-Skip-r14 OPTIONAL, -- Need OR + sameSFN-Indication-r14 ENUMERATED {true} OPTIONAL -- Cond HO-SFNsynced + ]], + [[ + mib-RepetitionStatus-r14 BOOLEAN OPTIONAL, -- Need OR + schedulingInfoSIB1-BR-r14 INTEGER (0..31) OPTIONAL -- Cond HO-SFNsynced + ]] +} + +MobilityControlInfo-v10l0 ::= SEQUENCE { + additionalSpectrumEmission-v10l0 AdditionalSpectrumEmission-v10l0 OPTIONAL -- Need ON +} + +MobilityControlInfoSCG-r12 ::= SEQUENCE { + t307-r12 ENUMERATED { + ms50, ms100, ms150, ms200, ms500, ms1000, + ms2000, spare1}, + ue-IdentitySCG-r12 C-RNTI OPTIONAL, -- Cond SCGEst, + rach-ConfigDedicated-r12 RACH-ConfigDedicated OPTIONAL, -- Need OP + cipheringAlgorithmSCG-r12 CipheringAlgorithm-r12 OPTIONAL, -- Need ON + ..., + [[ makeBeforeBreakSCG-r14 ENUMERATED {true} OPTIONAL, -- Need OR + rach-SkipSCG-r14 RACH-Skip-r14 OPTIONAL -- Need OR + ]] +} + +MobilityControlInfoV2X-r14 ::= SEQUENCE { + v2x-CommTxPoolExceptional-r14 SL-CommResourcePoolV2X-r14 OPTIONAL, -- Need OR + v2x-CommRxPool-r14 SL-CommRxPoolListV2X-r14 OPTIONAL, -- Need OR + v2x-CommSyncConfig-r14 SL-SyncConfigListV2X-r14 OPTIONAL, -- Need OR + cbr-MobilityTxConfigList-r14 SL-CBR-CommonTxConfigList-r14 OPTIONAL -- Need OR +} + +CarrierBandwidthEUTRA ::= SEQUENCE { + dl-Bandwidth ENUMERATED { + n6, n15, n25, n50, n75, n100, spare10, + spare9, spare8, spare7, spare6, spare5, + spare4, spare3, spare2, spare1}, + ul-Bandwidth ENUMERATED { + n6, n15, n25, n50, n75, n100, spare10, + spare9, spare8, spare7, spare6, spare5, + spare4, spare3, spare2, spare1} OPTIONAL -- Need OP +} + +CarrierFreqEUTRA ::= SEQUENCE { + dl-CarrierFreq ARFCN-ValueEUTRA, + ul-CarrierFreq ARFCN-ValueEUTRA OPTIONAL -- Cond FDD +} + +CarrierFreqEUTRA-v9e0 ::= SEQUENCE { + dl-CarrierFreq-v9e0 ARFCN-ValueEUTRA-r9, + ul-CarrierFreq-v9e0 ARFCN-ValueEUTRA-r9 OPTIONAL -- Cond FDD +} + +RACH-Skip-r14 ::= SEQUENCE { + targetTA-r14 CHOICE { + ta0-r14 NULL, + mcg-PTAG-r14 NULL, + scg-PTAG-r14 NULL, + mcg-STAG-r14 STAG-Id-r11, + scg-STAG-r14 STAG-Id-r11 + }, + ul-ConfigInfo-r14 SEQUENCE { + numberOfConfUL-Processes-r14 INTEGER (1..8), + ul-SchedInterval-r14 ENUMERATED {sf2, sf5, sf10}, + ul-StartSubframe-r14 INTEGER (0..9), + ul-Grant-r14 BIT STRING (SIZE (16)) + } OPTIONAL -- Need OR +} + + +MobilityParametersCDMA2000 ::= OCTET STRING + + +MobilityStateParameters ::= SEQUENCE { + t-Evaluation ENUMERATED { + s30, s60, s120, s180, s240, spare3, spare2, spare1}, + t-HystNormal ENUMERATED { + s30, s60, s120, s180, s240, spare3, spare2, spare1}, + n-CellChangeMedium INTEGER (1..16), + n-CellChangeHigh INTEGER (1..16) +} + + +MultiBandInfoList ::= SEQUENCE (SIZE (1..maxMultiBands)) OF FreqBandIndicator + +MultiBandInfoList-v9e0 ::= SEQUENCE (SIZE (1..maxMultiBands)) OF MultiBandInfo-v9e0 + +MultiBandInfoList-v10j0 ::= SEQUENCE (SIZE (1..maxMultiBands)) OF NS-PmaxList-r10 + +MultiBandInfoList-v10l0 ::= SEQUENCE (SIZE (1..maxMultiBands)) OF NS-PmaxList-v10l0 + +MultiBandInfoList-r11 ::= SEQUENCE (SIZE (1..maxMultiBands)) OF FreqBandIndicator-r11 + +MultiBandInfo-v9e0 ::= SEQUENCE { + freqBandIndicator-v9e0 FreqBandIndicator-v9e0 OPTIONAL -- Need OP +} + + +MultiFrequencyBandListNR-r15 ::= SEQUENCE (SIZE (1.. maxMultiBandsNR-r15)) OF FreqBandIndicatorNR-r15 + + +NS-PmaxList-r10 ::= SEQUENCE (SIZE (1..maxNS-Pmax-r10)) OF NS-PmaxValue-r10 + +NS-PmaxList-v10l0 ::= SEQUENCE (SIZE (1..maxNS-Pmax-r10)) OF NS-PmaxValue-v10l0 + +NS-PmaxValue-r10 ::= SEQUENCE { + additionalPmax-r10 P-Max OPTIONAL, -- Need OP + additionalSpectrumEmission AdditionalSpectrumEmission +} + +NS-PmaxValue-v10l0 ::= SEQUENCE { + additionalSpectrumEmission-v10l0 AdditionalSpectrumEmission-v10l0 OPTIONAL -- Need OP +} + + +NS-PmaxListNR-r15 ::= SEQUENCE (SIZE (1..8)) OF NS-PmaxValueNR-r15 + +NS-PmaxValueNR-r15 ::= SEQUENCE { + additionalPmaxNR-r15 P-MaxNR-r15 OPTIONAL, -- Need ON + additionalSpectrumEmissionNR-r15 AdditionalSpectrumEmissionNR-r15 +} + + +PhysCellId ::= INTEGER (0..503) + + +PhysCellIdRange ::= SEQUENCE { + start PhysCellId, + range ENUMERATED { + n4, n8, n12, n16, n24, n32, n48, n64, n84, + n96, n128, n168, n252, n504, spare2, + spare1} OPTIONAL -- Need OP +} + + +PhysCellIdRangeUTRA-FDDList-r9::= SEQUENCE (SIZE (1..maxPhysCellIdRange-r9)) OF PhysCellIdRangeUTRA-FDD-r9 + +PhysCellIdRangeUTRA-FDD-r9 ::= SEQUENCE { + start-r9 PhysCellIdUTRA-FDD, + range-r9 INTEGER (2..512) OPTIONAL -- Need OP +} + + +PhysCellIdCDMA2000 ::= INTEGER (0..maxPNOffset) + + +PhysCellIdGERAN ::= SEQUENCE { + networkColourCode BIT STRING (SIZE (3)), + baseStationColourCode BIT STRING (SIZE (3)) +} + + +PhysCellIdNR-r15 ::= INTEGER (0.. 1007) + + +PhysCellIdUTRA-FDD ::= INTEGER (0..511) + + +PhysCellIdUTRA-TDD ::= INTEGER (0..127) + + +PLMN-Identity ::= SEQUENCE { + mcc MCC OPTIONAL, -- Cond MCC + mnc MNC +} + +MCC ::= SEQUENCE (SIZE (3)) OF + MCC-MNC-Digit + +MNC ::= SEQUENCE (SIZE (2..3)) OF + MCC-MNC-Digit + +MCC-MNC-Digit ::= INTEGER (0..9) + + + +PLMN-IdentityList3-r11 ::= SEQUENCE (SIZE (1..16)) OF PLMN-Identity + + +P-MaxNR-r15 ::= INTEGER (-30..33) + + +PreRegistrationInfoHRPD ::= SEQUENCE { + preRegistrationAllowed BOOLEAN, + preRegistrationZoneId PreRegistrationZoneIdHRPD OPTIONAL, -- cond PreRegAllowed + secondaryPreRegistrationZoneIdList SecondaryPreRegistrationZoneIdListHRPD OPTIONAL -- Need OR +} + +SecondaryPreRegistrationZoneIdListHRPD ::= SEQUENCE (SIZE (1..2)) OF PreRegistrationZoneIdHRPD + +PreRegistrationZoneIdHRPD ::= INTEGER (0..255) + + +Q-QualMin-r9 ::= INTEGER (-34..-3) + + +Q-RxLevMin ::= INTEGER (-70..-22) + + +Q-OffsetRange ::= ENUMERATED { + dB-24, dB-22, dB-20, dB-18, dB-16, dB-14, + dB-12, dB-10, dB-8, dB-6, dB-5, dB-4, dB-3, + dB-2, dB-1, dB0, dB1, dB2, dB3, dB4, dB5, + dB6, dB8, dB10, dB12, dB14, dB16, dB18, + dB20, dB22, dB24} + + +Q-OffsetRangeInterRAT ::= INTEGER (-15..15) + + +ReselectionThreshold ::= INTEGER (0..31) + + +ReselectionThresholdQ-r9 ::= INTEGER (0..31) + + +SCellIndex-r10 ::= INTEGER (1..7) +SCellIndex-r13 ::= INTEGER (1..31) + + +ServCellIndex-r10 ::= INTEGER (0..7) +ServCellIndex-r13 ::= INTEGER (0..31) + + +SpeedStateScaleFactors ::= SEQUENCE { + sf-Medium ENUMERATED {oDot25, oDot5, oDot75, lDot0}, + sf-High ENUMERATED {oDot25, oDot5, oDot75, lDot0} +} + +SystemInfoListGERAN ::= SEQUENCE (SIZE (1..maxGERAN-SI)) OF + OCTET STRING (SIZE (1..23)) + + +SystemTimeInfoCDMA2000 ::= SEQUENCE { + cdma-EUTRA-Synchronisation BOOLEAN, + cdma-SystemTime CHOICE { + synchronousSystemTime BIT STRING (SIZE (39)), + asynchronousSystemTime BIT STRING (SIZE (49)) + } +} + + +ThresholdNR-r15 ::= CHOICE{ + nr-RSRP-r15 RSRP-RangeNR-r15, + nr-RSRQ-r15 RSRQ-RangeNR-r15, + nr-SINR-r15 RS-SINR-RangeNR-r15 +} + +ThresholdListNR-r15 ::= SEQUENCE{ + nr-RSRP-r15 RSRP-RangeNR-r15 OPTIONAL, -- Need OR + nr-RSRQ-r15 RSRQ-RangeNR-r15 OPTIONAL, -- Need OR + nr-SINR-r15 RS-SINR-RangeNR-r15 OPTIONAL -- Need OR +} + + +TrackingAreaCode ::= BIT STRING (SIZE (16)) +TrackingAreaCode-5GC-r15 ::= BIT STRING (SIZE (24)) + + +T-Reselection ::= INTEGER (0..7) + + +T-ReselectionEUTRA-CE-r13 ::= INTEGER (0..15) + + +AllowedMeasBandwidth ::= ENUMERATED {mbw6, mbw15, mbw25, mbw50, mbw75, mbw100} + + +BT-NameListConfig-r15 ::= CHOICE{ + release NULL, + setup BT-NameList-r15 +} + +BT-NameList-r15 ::= SEQUENCE (SIZE (1..maxBT-Name-r15)) OF BT-Name-r15 + +BT-Name-r15 ::= OCTET STRING (SIZE (1..248)) + + +CSI-RSRP-Range-r12 ::= INTEGER(0..97) + + +Hysteresis ::= INTEGER (0..30) + + +LocationInfo-r10 ::= SEQUENCE { + locationCoordinates-r10 CHOICE { + ellipsoid-Point-r10 OCTET STRING, + ellipsoidPointWithAltitude-r10 OCTET STRING, + ..., + ellipsoidPointWithUncertaintyCircle-r11 OCTET STRING, + ellipsoidPointWithUncertaintyEllipse-r11 OCTET STRING, + ellipsoidPointWithAltitudeAndUncertaintyEllipsoid-r11 OCTET STRING, + ellipsoidArc-r11 OCTET STRING, + polygon-r11 OCTET STRING + }, + horizontalVelocity-r10 OCTET STRING OPTIONAL, + gnss-TOD-msec-r10 OCTET STRING OPTIONAL, + ..., + [[ verticalVelocityInfo-r15 CHOICE { + verticalVelocity-r15 OCTET STRING, + verticalVelocityAndUncertainty-r15 OCTET STRING + } OPTIONAL + ]] +} + + +LogMeasResultListBT-r15 ::= SEQUENCE (SIZE (1..maxBT-IdReport-r15)) OF LogMeasResultBT-r15 + +LogMeasResultBT-r15 ::= SEQUENCE { + bt-Addr-r15 BIT STRING (SIZE (48)), + rssi-BT-r15 INTEGER (-128..127) OPTIONAL, + ... +} + + +LogMeasResultListWLAN-r15 ::= SEQUENCE (SIZE (1..maxWLAN-Id-Report-r14)) OF LogMeasResultWLAN-r15 + +LogMeasResultWLAN-r15 ::= SEQUENCE { + wlan-Identifiers-r15 WLAN-Identifiers-r12, + rssiWLAN-r15 WLAN-RSSI-Range-r13 OPTIONAL, + rtt-WLAN-r15 WLAN-RTT-r15 OPTIONAL, + ... +} + + +MBSFN-RSRQ-Range-r12 ::= INTEGER(0..31) + +MeasConfig ::= SEQUENCE { + -- Measurement objects + measObjectToRemoveList MeasObjectToRemoveList OPTIONAL, -- Need ON + measObjectToAddModList MeasObjectToAddModList OPTIONAL, -- Need ON + -- Reporting configurations + reportConfigToRemoveList ReportConfigToRemoveList OPTIONAL, -- Need ON + reportConfigToAddModList ReportConfigToAddModList OPTIONAL, -- Need ON + -- Measurement identities + measIdToRemoveList MeasIdToRemoveList OPTIONAL, -- Need ON + measIdToAddModList MeasIdToAddModList OPTIONAL, -- Need ON + -- Other parameters + quantityConfig QuantityConfig OPTIONAL, -- Need ON + measGapConfig MeasGapConfig OPTIONAL, -- Need ON + s-Measure RSRP-Range OPTIONAL, -- Need ON + preRegistrationInfoHRPD PreRegistrationInfoHRPD OPTIONAL, -- Need OP + speedStatePars CHOICE { + release NULL, + setup SEQUENCE { + mobilityStateParameters MobilityStateParameters, + timeToTrigger-SF SpeedStateScaleFactors + } + } OPTIONAL, -- Need ON + ..., + [[ measObjectToAddModList-v9e0 MeasObjectToAddModList-v9e0 OPTIONAL -- Need ON + ]], + [[ allowInterruptions-r11 BOOLEAN OPTIONAL -- Need ON + ]], + [[ measScaleFactor-r12 CHOICE { + release NULL, + setup MeasScaleFactor-r12 + } OPTIONAL, -- Need ON + measIdToRemoveListExt-r12 MeasIdToRemoveListExt-r12 OPTIONAL, -- Need ON + measIdToAddModListExt-r12 MeasIdToAddModListExt-r12 OPTIONAL, -- Need ON + measRSRQ-OnAllSymbols-r12 BOOLEAN OPTIONAL -- Need ON + ]], + [[ + measObjectToRemoveListExt-r13 MeasObjectToRemoveListExt-r13 OPTIONAL, -- Need ON + measObjectToAddModListExt-r13 MeasObjectToAddModListExt-r13 OPTIONAL, -- Need ON + measIdToAddModList-v1310 MeasIdToAddModList-v1310 OPTIONAL, -- Need ON + measIdToAddModListExt-v1310 MeasIdToAddModListExt-v1310 OPTIONAL -- Need ON + ]], + [[ measGapConfigPerCC-List-r14 MeasGapConfigPerCC-List-r14 OPTIONAL, -- Need ON + measGapSharingConfig-r14 MeasGapSharingConfig-r14 OPTIONAL -- Need ON + ]], + [[ fr1-Gap-r15 BOOLEAN OPTIONAL, -- Need ON + mgta-r15 BOOLEAN OPTIONAL -- Need ON + ]], + [[ measGapConfigDensePRS-r15 MeasGapConfigDensePRS-r15 OPTIONAL, -- Need ON + heightThreshRef-r15 CHOICE { + release NULL, + setup INTEGER (0..31) + } OPTIONAL --Need ON + ]] +} + +MeasIdToRemoveList ::= SEQUENCE (SIZE (1..maxMeasId)) OF MeasId + +MeasIdToRemoveListExt-r12 ::= SEQUENCE (SIZE (1..maxMeasId)) OF MeasId-v1250 + +MeasObjectToRemoveList ::= SEQUENCE (SIZE (1..maxObjectId)) OF MeasObjectId + +MeasObjectToRemoveListExt-r13 ::= SEQUENCE (SIZE (1..maxObjectId)) OF MeasObjectId-v1310 + +ReportConfigToRemoveList ::= SEQUENCE (SIZE (1..maxReportConfigId)) OF ReportConfigId + + +MeasDS-Config-r12 ::= CHOICE { + release NULL, + setup SEQUENCE { + dmtc-PeriodOffset-r12 CHOICE { + ms40-r12 INTEGER(0..39), + ms80-r12 INTEGER(0..79), + ms160-r12 INTEGER(0..159), + ... + }, + ds-OccasionDuration-r12 CHOICE { + durationFDD-r12 INTEGER(1..maxDS-Duration-r12), + durationTDD-r12 INTEGER(2..maxDS-Duration-r12) + }, + measCSI-RS-ToRemoveList-r12 MeasCSI-RS-ToRemoveList-r12 OPTIONAL, -- Need ON + measCSI-RS-ToAddModList-r12 MeasCSI-RS-ToAddModList-r12 OPTIONAL, -- Need ON + ... + } +} + +MeasCSI-RS-ToRemoveList-r12 ::= SEQUENCE (SIZE (1..maxCSI-RS-Meas-r12)) OF MeasCSI-RS-Id-r12 + +MeasCSI-RS-ToAddModList-r12 ::= SEQUENCE (SIZE (1..maxCSI-RS-Meas-r12)) OF MeasCSI-RS-Config-r12 + +MeasCSI-RS-Id-r12 ::= INTEGER (1..maxCSI-RS-Meas-r12) + +MeasCSI-RS-Config-r12 ::= SEQUENCE { + measCSI-RS-Id-r12 MeasCSI-RS-Id-r12, + physCellId-r12 INTEGER (0..503), + scramblingIdentity-r12 INTEGER (0..503), + resourceConfig-r12 INTEGER (0..31), + subframeOffset-r12 INTEGER (0..4), + csi-RS-IndividualOffset-r12 Q-OffsetRange, + ... +} + + +MeasGapConfig ::= CHOICE { + release NULL, + setup SEQUENCE { + gapOffset CHOICE { + gp0 INTEGER (0..39), + gp1 INTEGER (0..79), + + ..., + gp2-r14 INTEGER (0..39), + gp3-r14 INTEGER (0..79), + gp-ncsg0-r14 INTEGER (0..39), + gp-ncsg1-r14 INTEGER (0..79), + gp-ncsg2-r14 INTEGER (0..39), + gp-ncsg3-r14 INTEGER (0..79), + gp-nonUniform1-r14 INTEGER (0..1279), + gp-nonUniform2-r14 INTEGER (0..2559), + gp-nonUniform3-r14 INTEGER (0..5119), + gp-nonUniform4-r14 INTEGER (0..10239), + gp4-r15 INTEGER (0..19), + gp5-r15 INTEGER (0..159), + gp6-r15 INTEGER (0..19), + gp7-r15 INTEGER (0..39), + gp8-r15 INTEGER (0..79), + gp9-r15 INTEGER (0..159), + gp10-r15 INTEGER (0..19), + gp11-r15 INTEGER (0..159) + } + } +} + + + +MeasGapConfigDensePRS-r15 ::= CHOICE { + release NULL, + setup SEQUENCE { + gapOffsetDensePRS-r15 CHOICE { + rstd0-r15 INTEGER (0..79), + rstd1-r15 INTEGER (0..159), + rstd2-r15 INTEGER (0..319), + rstd3-r15 INTEGER (0..639), + rstd4-r15 INTEGER (0..1279), + rstd5-r15 INTEGER (0..159), + rstd6-r15 INTEGER (0..319), + rstd7-r15 INTEGER (0..639), + rstd8-r15 INTEGER (0..1279), + rstd9-r15 INTEGER (0..319), + rstd10-r15 INTEGER (0..639), + rstd11-r15 INTEGER (0..1279), + rstd12-r15 INTEGER (0..319), + rstd13-r15 INTEGER (0..639), + rstd14-r15 INTEGER (0..1279), + rstd15-r15 INTEGER (0..639), + rstd16-r15 INTEGER (0..1279), + rstd17-r15 INTEGER (0..639), + rstd18-r15 INTEGER (0..1279), + rstd19-r15 INTEGER (0..639), + rstd20-r15 INTEGER (0..1279), + ... + } + } +} + + +MeasGapConfigPerCC-List-r14 ::= CHOICE { + release NULL, + setup SEQUENCE { + measGapConfigToRemoveList-r14 MeasGapConfigToRemoveList-r14 OPTIONAL, -- Need ON + measGapConfigToAddModList-r14 MeasGapConfigToAddModList-r14 OPTIONAL -- Need ON + } +} + +MeasGapConfigToRemoveList-r14 ::= SEQUENCE (SIZE (1..maxServCell-r13)) OF ServCellIndex-r13 + +MeasGapConfigToAddModList-r14 ::= SEQUENCE (SIZE (1..maxServCell-r13)) OF MeasGapConfigPerCC-r14 + +MeasGapConfigPerCC-r14 ::= SEQUENCE { + servCellId-r14 ServCellIndex-r13, + measGapConfigCC-r14 MeasGapConfig +} + + +MeasGapSharingConfig-r14 ::= CHOICE { + release NULL, + setup SEQUENCE { + measGapSharingScheme-r14 ENUMERATED {scheme00, scheme01, scheme10, scheme11} + } +} + + +MeasId ::= INTEGER (1..maxMeasId) + +MeasId-v1250 ::= INTEGER (maxMeasId-Plus1..maxMeasId-r12) + + +MeasIdleConfigSIB-r15 ::= SEQUENCE { + measIdleCarrierListEUTRA-r15 EUTRA-CarrierList-r15, + ... +} + +MeasIdleConfigDedicated-r15 ::= SEQUENCE { + measIdleCarrierListEUTRA-r15 EUTRA-CarrierList-r15 OPTIONAL, -- Need OR + measIdleDuration-r15 ENUMERATED {sec10, sec30, sec60, sec120, + sec180, sec240, sec300, spare}, + ... +} + +EUTRA-CarrierList-r15 ::= SEQUENCE (SIZE (1..maxFreqIdle-r15)) OF MeasIdleCarrierEUTRA-r15 + +MeasIdleCarrierEUTRA-r15::= SEQUENCE { + carrierFreq-r15 ARFCN-ValueEUTRA-r9, + allowedMeasBandwidth-r15 AllowedMeasBandwidth, + validityArea-r15 CellList-r15 OPTIONAL, -- Need OR + measCellList-r15 CellList-r15 OPTIONAL, -- Need OR + reportQuantities ENUMERATED {rsrp, rsrq, both}, + qualityThreshold-r15 SEQUENCE { + idleRSRP-Threshold-r15 RSRP-Range OPTIONAL, -- Need OR + idleRSRQ-Threshold-r15 RSRQ-Range-r13 OPTIONAL -- Need OR + } OPTIONAL, -- Need OR + ... +} + +CellList-r15 ::= SEQUENCE (SIZE (1.. maxCellMeasIdle-r15)) OF PhysCellIdRange + + +MeasIdToAddModList ::= SEQUENCE (SIZE (1..maxMeasId)) OF MeasIdToAddMod + +MeasIdToAddModList-v1310 ::= SEQUENCE (SIZE (1..maxMeasId)) OF MeasIdToAddMod-v1310 + +MeasIdToAddModListExt-r12 ::= SEQUENCE (SIZE (1..maxMeasId)) OF MeasIdToAddModExt-r12 + +MeasIdToAddModListExt-v1310 ::= SEQUENCE (SIZE (1..maxMeasId)) OF MeasIdToAddMod-v1310 + +MeasIdToAddMod ::= SEQUENCE { + measId MeasId, + measObjectId MeasObjectId, + reportConfigId ReportConfigId +} + +MeasIdToAddModExt-r12 ::= SEQUENCE { + measId-v1250 MeasId-v1250, + measObjectId-r12 MeasObjectId, + reportConfigId-r12 ReportConfigId +} + +MeasIdToAddMod-v1310 ::= SEQUENCE { + measObjectId-v1310 MeasObjectId-v1310 OPTIONAL +} + + +MeasObjectCDMA2000 ::= SEQUENCE { + cdma2000-Type CDMA2000-Type, + carrierFreq CarrierFreqCDMA2000, + searchWindowSize INTEGER (0..15) OPTIONAL, -- Need ON + offsetFreq Q-OffsetRangeInterRAT DEFAULT 0, + cellsToRemoveList CellIndexList OPTIONAL, -- Need ON + cellsToAddModList CellsToAddModListCDMA2000 OPTIONAL, -- Need ON + cellForWhichToReportCGI PhysCellIdCDMA2000 OPTIONAL, -- Need ON + ... +} + +CellsToAddModListCDMA2000 ::= SEQUENCE (SIZE (1..maxCellMeas)) OF CellsToAddModCDMA2000 + +CellsToAddModCDMA2000 ::= SEQUENCE { + cellIndex INTEGER (1..maxCellMeas), + physCellId PhysCellIdCDMA2000 +} + + +MeasObjectEUTRA ::= SEQUENCE { + carrierFreq ARFCN-ValueEUTRA, + allowedMeasBandwidth AllowedMeasBandwidth, + presenceAntennaPort1 PresenceAntennaPort1, + neighCellConfig NeighCellConfig, + offsetFreq Q-OffsetRange DEFAULT dB0, + -- Cell list + cellsToRemoveList CellIndexList OPTIONAL, -- Need ON + cellsToAddModList CellsToAddModList OPTIONAL, -- Need ON + -- Black list + blackCellsToRemoveList CellIndexList OPTIONAL, -- Need ON + blackCellsToAddModList BlackCellsToAddModList OPTIONAL, -- Need ON + cellForWhichToReportCGI PhysCellId OPTIONAL, -- Need ON + ..., + [[measCycleSCell-r10 MeasCycleSCell-r10 OPTIONAL, -- Need ON + measSubframePatternConfigNeigh-r10 MeasSubframePatternConfigNeigh-r10 OPTIONAL -- Need ON + ]], + [[widebandRSRQ-Meas-r11 BOOLEAN OPTIONAL -- Cond WB-RSRQ + ]], + [[ altTTT-CellsToRemoveList-r12 CellIndexList OPTIONAL, -- Need ON + altTTT-CellsToAddModList-r12 AltTTT-CellsToAddModList-r12 OPTIONAL, -- Need ON + t312-r12 CHOICE { + release NULL, + setup ENUMERATED {ms0, ms50, ms100, ms200, + ms300, ms400, ms500, ms1000} + } OPTIONAL, -- Need ON + reducedMeasPerformance-r12 BOOLEAN OPTIONAL, -- Need ON + measDS-Config-r12 MeasDS-Config-r12 OPTIONAL -- Need ON + ]], + [[ + whiteCellsToRemoveList-r13 CellIndexList OPTIONAL, -- Need ON + whiteCellsToAddModList-r13 WhiteCellsToAddModList-r13 OPTIONAL, -- Need ON + rmtc-Config-r13 RMTC-Config-r13 OPTIONAL, -- Need ON + carrierFreq-r13 ARFCN-ValueEUTRA-v9e0 OPTIONAL -- Need ON + ]], + [[ + tx-ResourcePoolToRemoveList-r14 Tx-ResourcePoolMeasList-r14 OPTIONAL, -- Need ON + tx-ResourcePoolToAddList-r14 Tx-ResourcePoolMeasList-r14 OPTIONAL, -- Need ON + fembms-MixedCarrier-r14 BOOLEAN OPTIONAL -- Need ON + ]], + [[ + measSensing-Config-r15 MeasSensing-Config-r15 OPTIONAL -- Need ON + ]] +} + +MeasObjectEUTRA-v9e0 ::= SEQUENCE { + carrierFreq-v9e0 ARFCN-ValueEUTRA-v9e0 +} + +CellsToAddModList ::= SEQUENCE (SIZE (1..maxCellMeas)) OF CellsToAddMod + +CellsToAddMod ::= SEQUENCE { + cellIndex INTEGER (1..maxCellMeas), + physCellId PhysCellId, + cellIndividualOffset Q-OffsetRange +} + +BlackCellsToAddModList ::= SEQUENCE (SIZE (1..maxCellMeas)) OF BlackCellsToAddMod + +BlackCellsToAddMod ::= SEQUENCE { + cellIndex INTEGER (1..maxCellMeas), + physCellIdRange PhysCellIdRange +} + +MeasCycleSCell-r10 ::= ENUMERATED {sf160, sf256, sf320, sf512, + sf640, sf1024, sf1280, spare1} + +MeasSubframePatternConfigNeigh-r10 ::= CHOICE { + release NULL, + setup SEQUENCE { + measSubframePatternNeigh-r10 MeasSubframePattern-r10, + measSubframeCellList-r10 MeasSubframeCellList-r10 OPTIONAL -- Cond always + } +} + +MeasSubframeCellList-r10 ::= SEQUENCE (SIZE (1..maxCellMeas)) OF PhysCellIdRange + +AltTTT-CellsToAddModList-r12 ::= SEQUENCE (SIZE (1..maxCellMeas)) OF AltTTT-CellsToAddMod-r12 + +AltTTT-CellsToAddMod-r12 ::= SEQUENCE { + cellIndex-r12 INTEGER (1..maxCellMeas), + physCellIdRange-r12 PhysCellIdRange +} + +WhiteCellsToAddModList-r13 ::= SEQUENCE (SIZE (1..maxCellMeas)) OF WhiteCellsToAddMod-r13 + +WhiteCellsToAddMod-r13 ::= SEQUENCE { + cellIndex-r13 INTEGER (1..maxCellMeas), + physCellIdRange-r13 PhysCellIdRange +} + +RMTC-Config-r13 ::= CHOICE { + release NULL, + setup SEQUENCE { + rmtc-Period-r13 ENUMERATED {ms40, ms80, ms160, ms320, ms640}, + rmtc-SubframeOffset-r13 INTEGER(0..639) OPTIONAL, -- Need ON + measDuration-r13 ENUMERATED {sym1, sym14, sym28, sym42, sym70}, + ... + } +} + +Tx-ResourcePoolMeasList-r14 ::= SEQUENCE (SIZE (1..maxSL-PoolToMeasure-r14)) OF SL-V2X-TxPoolReportIdentity-r14 + + +MeasObjectGERAN ::= SEQUENCE { + carrierFreqs CarrierFreqsGERAN, + offsetFreq Q-OffsetRangeInterRAT DEFAULT 0, + ncc-Permitted BIT STRING(SIZE (8)) DEFAULT '11111111'B, + cellForWhichToReportCGI PhysCellIdGERAN OPTIONAL, -- Need ON + ... +} + + +MeasObjectId ::= INTEGER (1..maxObjectId) + +MeasObjectId-v1310 ::= INTEGER (maxObjectId-Plus1-r13..maxObjectId-r13) + +MeasObjectId-r13 ::= INTEGER (1..maxObjectId-r13) + + +MeasObjectNR-r15 ::= SEQUENCE { + carrierFreq-r15 ARFCN-ValueNR-r15, + rs-ConfigSSB-r15 RS-ConfigSSB-NR-r15, + threshRS-Index-r15 ThresholdListNR-r15 OPTIONAL, -- Need OR + maxRS-IndexCellQual-r15 MaxRS-IndexCellQualNR-r15 OPTIONAL, -- Need OR + offsetFreq-r15 Q-OffsetRangeInterRAT DEFAULT 0, + blackCellsToRemoveList-r15 CellIndexList OPTIONAL, -- Need ON + blackCellsToAddModList-r15 CellsToAddModListNR-r15 OPTIONAL, -- Need ON + quantityConfigSet-r15 INTEGER (1.. maxQuantSetsNR-r15), + cellsForWhichToReportSFTD-r15 SEQUENCE (SIZE (1..maxCellSFTD)) OF PhysCellIdNR-r15 OPTIONAL, -- Need OR + ..., + [[ cellForWhichToReportCGI-r15 PhysCellIdNR-r15 OPTIONAL, -- Need ON + deriveSSB-IndexFromCell-r15 BOOLEAN OPTIONAL, -- Need ON + ss-RSSI-Measurement-r15 SS-RSSI-Measurement-r15 OPTIONAL, -- Need ON + bandNR-r15 CHOICE { + release NULL, + setup FreqBandIndicatorNR-r15 + } OPTIONAL -- Need ON + ]] +} + +RS-ConfigSSB-NR-r15 ::= SEQUENCE { + measTimingConfig-r15 MTC-SSB-NR-r15, + + subcarrierSpacingSSB-r15 ENUMERATED {kHz15, kHz30, kHz120, kHz240}, + ... +} + +CellsToAddModListNR-r15 ::= SEQUENCE (SIZE (1..maxCellMeas)) OF CellsToAddModNR-r15 + +CellsToAddModNR-r15 ::= SEQUENCE { + cellIndex-r15 INTEGER (1..maxCellMeas), + physCellId-r15 PhysCellIdNR-r15 +} + + +MeasObjectToAddModList ::= SEQUENCE (SIZE (1..maxObjectId)) OF MeasObjectToAddMod + +MeasObjectToAddModListExt-r13 ::= SEQUENCE (SIZE (1..maxObjectId)) OF MeasObjectToAddModExt-r13 + +MeasObjectToAddModList-v9e0 ::= SEQUENCE (SIZE (1..maxObjectId)) OF MeasObjectToAddMod-v9e0 + +MeasObjectToAddMod ::= SEQUENCE { + measObjectId MeasObjectId, + measObject CHOICE { + measObjectEUTRA MeasObjectEUTRA, + measObjectUTRA MeasObjectUTRA, + measObjectGERAN MeasObjectGERAN, + measObjectCDMA2000 MeasObjectCDMA2000, + ..., + measObjectWLAN-r13 MeasObjectWLAN-r13, + measObjectNR-r15 MeasObjectNR-r15 + } +} + +MeasObjectToAddModExt-r13 ::= SEQUENCE { + measObjectId-r13 MeasObjectId-v1310, + measObject-r13 CHOICE { + measObjectEUTRA-r13 MeasObjectEUTRA, + measObjectUTRA-r13 MeasObjectUTRA, + measObjectGERAN-r13 MeasObjectGERAN, + measObjectCDMA2000-r13 MeasObjectCDMA2000, + ..., + measObjectWLAN-v1320 MeasObjectWLAN-r13, + measObjectNR-r15 MeasObjectNR-r15 + } +} + +MeasObjectToAddMod-v9e0 ::= SEQUENCE { + measObjectEUTRA-v9e0 MeasObjectEUTRA-v9e0 OPTIONAL -- Cond eutra +} + + +MeasObjectUTRA ::= SEQUENCE { + carrierFreq ARFCN-ValueUTRA, + offsetFreq Q-OffsetRangeInterRAT DEFAULT 0, + cellsToRemoveList CellIndexList OPTIONAL, -- Need ON + cellsToAddModList CHOICE { + cellsToAddModListUTRA-FDD CellsToAddModListUTRA-FDD, + cellsToAddModListUTRA-TDD CellsToAddModListUTRA-TDD + } OPTIONAL, -- Need ON + cellForWhichToReportCGI CHOICE { + utra-FDD PhysCellIdUTRA-FDD, + utra-TDD PhysCellIdUTRA-TDD + } OPTIONAL, -- Need ON + ..., + [[ csg-allowedReportingCells-v930 CSG-AllowedReportingCells-r9 OPTIONAL -- Need ON + ]], + [[ reducedMeasPerformance-r12 BOOLEAN OPTIONAL -- Need ON + ]] +} + +CellsToAddModListUTRA-FDD ::= SEQUENCE (SIZE (1..maxCellMeas)) OF CellsToAddModUTRA-FDD + +CellsToAddModUTRA-FDD ::= SEQUENCE { + cellIndex INTEGER (1..maxCellMeas), + physCellId PhysCellIdUTRA-FDD +} + +CellsToAddModListUTRA-TDD ::= SEQUENCE (SIZE (1..maxCellMeas)) OF CellsToAddModUTRA-TDD + +CellsToAddModUTRA-TDD ::= SEQUENCE { + cellIndex INTEGER (1..maxCellMeas), + physCellId PhysCellIdUTRA-TDD +} + +CSG-AllowedReportingCells-r9 ::= SEQUENCE { + physCellIdRangeUTRA-FDDList-r9 PhysCellIdRangeUTRA-FDDList-r9 OPTIONAL -- Need OR +} + +MeasObjectWLAN-r13 ::= SEQUENCE { + carrierFreq-r13 CHOICE { + bandIndicatorListWLAN-r13 SEQUENCE (SIZE (1..maxWLAN-Bands-r13)) OF WLAN-BandIndicator-r13, + carrierInfoListWLAN-r13 SEQUENCE (SIZE (1..maxWLAN-CarrierInfo-r13)) OF WLAN-CarrierInfo-r13 + } OPTIONAL, -- Need ON + wlan-ToAddModList-r13 WLAN-Id-List-r13 OPTIONAL, -- Need ON + wlan-ToRemoveList-r13 WLAN-Id-List-r13 OPTIONAL, -- Need ON + ... +} + +WLAN-BandIndicator-r13 ::= ENUMERATED {band2dot4, band5, band60-v1430, spare5, spare4, spare3, spare2, spare1, ...} + + +MeasResults ::= SEQUENCE { + measId MeasId, + measResultPCell SEQUENCE { + rsrpResult RSRP-Range, + rsrqResult RSRQ-Range + }, + measResultNeighCells CHOICE { + measResultListEUTRA MeasResultListEUTRA, + measResultListUTRA MeasResultListUTRA, + measResultListGERAN MeasResultListGERAN, + measResultsCDMA2000 MeasResultsCDMA2000, + ..., + measResultNeighCellListNR-r15 MeasResultCellListNR-r15 + } OPTIONAL, + ..., + [[ measResultForECID-r9 MeasResultForECID-r9 OPTIONAL + ]], + [[ locationInfo-r10 LocationInfo-r10 OPTIONAL, + measResultServFreqList-r10 MeasResultServFreqList-r10 OPTIONAL + ]], + [[ measId-v1250 MeasId-v1250 OPTIONAL, + measResultPCell-v1250 RSRQ-Range-v1250 OPTIONAL, + measResultCSI-RS-List-r12 MeasResultCSI-RS-List-r12 OPTIONAL + ]], + [[ measResultForRSSI-r13 MeasResultForRSSI-r13 OPTIONAL, + measResultServFreqListExt-r13 MeasResultServFreqListExt-r13 OPTIONAL, + measResultSSTD-r13 MeasResultSSTD-r13 OPTIONAL, + measResultPCell-v1310 SEQUENCE { + rs-sinr-Result-r13 RS-SINR-Range-r13 + } OPTIONAL, + ul-PDCP-DelayResultList-r13 UL-PDCP-DelayResultList-r13 OPTIONAL, + measResultListWLAN-r13 MeasResultListWLAN-r13 OPTIONAL + ]], + [[ measResultPCell-v1360 RSRP-Range-v1360 OPTIONAL + ]], + [[ measResultListCBR-r14 MeasResultListCBR-r14 OPTIONAL, + measResultListWLAN-r14 MeasResultListWLAN-r14 OPTIONAL + ]], + [[ measResultServFreqListNR-r15 MeasResultServFreqListNR-r15 OPTIONAL, + measResultCellListSFTD-r15 MeasResultCellListSFTD-r15 OPTIONAL + ]], + [[ logMeasResultListBT-r15 LogMeasResultListBT-r15 OPTIONAL, + logMeasResultListWLAN-r15 LogMeasResultListWLAN-r15 OPTIONAL, + measResultSensing-r15 MeasResultSensing-r15 OPTIONAL, + heightUE-r15 INTEGER (-400..8880) OPTIONAL + ]] +} + +MeasResultListEUTRA ::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultEUTRA + +MeasResultEUTRA ::= SEQUENCE { + physCellId PhysCellId, + cgi-Info SEQUENCE { + cellGlobalId CellGlobalIdEUTRA, + trackingAreaCode TrackingAreaCode, + plmn-IdentityList PLMN-IdentityList2 OPTIONAL + } OPTIONAL, + measResult SEQUENCE { + rsrpResult RSRP-Range OPTIONAL, + rsrqResult RSRQ-Range OPTIONAL, + ..., + [[ additionalSI-Info-r9 AdditionalSI-Info-r9 OPTIONAL + ]], + [[ primaryPLMN-Suitable-r12 ENUMERATED {true} OPTIONAL, + measResult-v1250 RSRQ-Range-v1250 OPTIONAL + ]], + [[ rs-sinr-Result-r13 RS-SINR-Range-r13 OPTIONAL, + cgi-Info-v1310 SEQUENCE { + freqBandIndicator-r13 FreqBandIndicator-r11 OPTIONAL, + multiBandInfoList-r13 MultiBandInfoList-r11 OPTIONAL, + freqBandIndicatorPriority-r13 ENUMERATED {true} OPTIONAL + } OPTIONAL + ]], + [[ + measResult-v1360 RSRP-Range-v1360 OPTIONAL + ]], + [[ + cgi-Info-5GC-r15 SEQUENCE (SIZE (1..maxPLMN-r11)) OF CellAccessRelatedInfo-5GC-r15 OPTIONAL + ]] + } +} + +MeasResultListIdle-r15 ::= SEQUENCE (SIZE (1..maxIdleMeasCarriers-r15)) OF MeasResultIdle-r15 + +MeasResultIdle-r15 ::= SEQUENCE { + measResultServingCell-r15 SEQUENCE { + rsrpResult-r15 RSRP-Range, + rsrqResult-r15 RSRQ-Range-r13 + }, + measResultNeighCells-r15 CHOICE { + measResultIdleListEUTRA-r15 MeasResultIdleListEUTRA-r15, + ... + } OPTIONAL, + ... +} + +MeasResultIdleListEUTRA-r15 ::= SEQUENCE (SIZE (1..maxCellMeasIdle-r15)) OF MeasResultIdleEUTRA-r15 + +MeasResultIdleEUTRA-r15 ::= SEQUENCE { + carrierFreq-r15 ARFCN-ValueEUTRA-r9, + physCellId-r15 PhysCellId, + measResult-r15 SEQUENCE { + rsrpResult-r15 RSRP-Range, + rsrqResult-r15 RSRQ-Range-r13 + }, + ... +} + +MeasResultServFreqListNR-r15 ::= SEQUENCE (SIZE (1..maxServCell-r13)) OF MeasResultServFreqNR-r15 + +MeasResultServFreqNR-r15 ::= SEQUENCE { + carrierFreq-r15 ARFCN-ValueNR-r15, + measResultSCell-r15 MeasResultCellNR-r15 OPTIONAL, + measResultBestNeighCell-r15 MeasResultCellNR-r15 OPTIONAL, + ... +} + +MeasResultCellListNR-r15::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultCellNR-r15 + +MeasResultCellNR-r15 ::= SEQUENCE { + pci-r15 PhysCellIdNR-r15, + measResultCell-r15 MeasResultNR-r15, + measResultRS-IndexList-r15 MeasResultSSB-IndexList-r15 OPTIONAL, + ..., + [[ cgi-Info-r15 CGI-InfoNR-r15 OPTIONAL + ]] +} + +MeasResultNR-r15 ::= SEQUENCE { + rsrpResult-r15 RSRP-RangeNR-r15 OPTIONAL, + rsrqResult-r15 RSRQ-RangeNR-r15 OPTIONAL, + rs-sinr-Result-r15 RS-SINR-RangeNR-r15 OPTIONAL, + ... +} + +MeasResultSSB-IndexList-r15::= SEQUENCE (SIZE (1..maxRS-IndexReport-r15)) OF MeasResultSSB-Index-r15 + +MeasResultSSB-Index-r15 ::= SEQUENCE { + ssb-Index-r15 RS-IndexNR-r15, + measResultSSB-Index-r15 MeasResultNR-r15 OPTIONAL, + ... +} + +MeasResultServFreqList-r10 ::= SEQUENCE (SIZE (1..maxServCell-r10)) OF MeasResultServFreq-r10 + +MeasResultServFreqListExt-r13 ::= SEQUENCE (SIZE (1..maxServCell-r13)) OF MeasResultServFreq-r13 + +MeasResultServFreq-r10 ::= SEQUENCE { + servFreqId-r10 ServCellIndex-r10, + measResultSCell-r10 SEQUENCE { + rsrpResultSCell-r10 RSRP-Range, + rsrqResultSCell-r10 RSRQ-Range + } OPTIONAL, + measResultBestNeighCell-r10 SEQUENCE { + physCellId-r10 PhysCellId, + rsrpResultNCell-r10 RSRP-Range, + rsrqResultNCell-r10 RSRQ-Range + } OPTIONAL, + ..., + [[ measResultSCell-v1250 RSRQ-Range-v1250 OPTIONAL, + measResultBestNeighCell-v1250 RSRQ-Range-v1250 OPTIONAL + ]], + [[ measResultSCell-v1310 SEQUENCE { + rs-sinr-Result-r13 RS-SINR-Range-r13 + } OPTIONAL, + measResultBestNeighCell-v1310 SEQUENCE { + rs-sinr-Result-r13 RS-SINR-Range-r13 + } OPTIONAL + ]] +} + +MeasResultServFreq-r13 ::= SEQUENCE { + servFreqId-r13 ServCellIndex-r13, + measResultSCell-r13 SEQUENCE { + rsrpResultSCell-r13 RSRP-Range, + rsrqResultSCell-r13 RSRQ-Range-r13, + rs-sinr-Result-r13 RS-SINR-Range-r13 OPTIONAL + } OPTIONAL, + measResultBestNeighCell-r13 SEQUENCE { + physCellId-r13 PhysCellId, + rsrpResultNCell-r13 RSRP-Range, + rsrqResultNCell-r13 RSRQ-Range-r13, + rs-sinr-Result-r13 RS-SINR-Range-r13 OPTIONAL + } OPTIONAL, + ..., + [[ measResultBestNeighCell-v1360 SEQUENCE { + rsrpResultNCell-v1360 RSRP-Range-v1360 + } OPTIONAL + ]] +} + +MeasResultCSI-RS-List-r12 ::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultCSI-RS-r12 + +MeasResultCSI-RS-r12 ::= SEQUENCE { + measCSI-RS-Id-r12 MeasCSI-RS-Id-r12, + csi-RSRP-Result-r12 CSI-RSRP-Range-r12, + ... +} + +MeasResultListUTRA ::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultUTRA + +MeasResultUTRA ::= SEQUENCE { + physCellId CHOICE { + fdd PhysCellIdUTRA-FDD, + tdd PhysCellIdUTRA-TDD + }, + cgi-Info SEQUENCE { + cellGlobalId CellGlobalIdUTRA, + locationAreaCode BIT STRING (SIZE (16)) OPTIONAL, + routingAreaCode BIT STRING (SIZE (8)) OPTIONAL, + plmn-IdentityList PLMN-IdentityList2 OPTIONAL + } OPTIONAL, + measResult SEQUENCE { + utra-RSCP INTEGER (-5..91) OPTIONAL, + utra-EcN0 INTEGER (0..49) OPTIONAL, + ..., + [[ additionalSI-Info-r9 AdditionalSI-Info-r9 OPTIONAL + ]], + [[ primaryPLMN-Suitable-r12 ENUMERATED {true} OPTIONAL + ]] + } +} + +MeasResultListGERAN ::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultGERAN + +MeasResultGERAN ::= SEQUENCE { + carrierFreq CarrierFreqGERAN, + physCellId PhysCellIdGERAN, + cgi-Info SEQUENCE { + cellGlobalId CellGlobalIdGERAN, + routingAreaCode BIT STRING (SIZE (8)) OPTIONAL + } OPTIONAL, + measResult SEQUENCE { + rssi INTEGER (0..63), + ... + } +} + +MeasResultsCDMA2000 ::= SEQUENCE { + preRegistrationStatusHRPD BOOLEAN, + measResultListCDMA2000 MeasResultListCDMA2000 +} + +MeasResultListCDMA2000 ::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultCDMA2000 + +MeasResultCDMA2000 ::= SEQUENCE { + physCellId PhysCellIdCDMA2000, + cgi-Info CellGlobalIdCDMA2000 OPTIONAL, + measResult SEQUENCE { + pilotPnPhase INTEGER (0..32767) OPTIONAL, + pilotStrength INTEGER (0..63), + ... + } +} + +MeasResultListWLAN-r13 ::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultWLAN-r13 + +MeasResultListWLAN-r14 ::= SEQUENCE (SIZE (1..maxWLAN-Id-Report-r14)) OF MeasResultWLAN-r13 + +MeasResultWLAN-r13 ::= SEQUENCE { + wlan-Identifiers-r13 WLAN-Identifiers-r12, + carrierInfoWLAN-r13 WLAN-CarrierInfo-r13 OPTIONAL, + bandWLAN-r13 WLAN-BandIndicator-r13 OPTIONAL, + rssiWLAN-r13 WLAN-RSSI-Range-r13, + availableAdmissionCapacityWLAN-r13 INTEGER (0..31250) OPTIONAL, + backhaulDL-BandwidthWLAN-r13 WLAN-backhaulRate-r12 OPTIONAL, + backhaulUL-BandwidthWLAN-r13 WLAN-backhaulRate-r12 OPTIONAL, + channelUtilizationWLAN-r13 INTEGER (0..255) OPTIONAL, + stationCountWLAN-r13 INTEGER (0..65535) OPTIONAL, + connectedWLAN-r13 ENUMERATED {true} OPTIONAL, + ... +} + +MeasResultListCBR-r14 ::= SEQUENCE (SIZE (1..maxCBR-Report-r14)) OF MeasResultCBR-r14 + +MeasResultCBR-r14 ::= SEQUENCE { + poolIdentity-r14 SL-V2X-TxPoolReportIdentity-r14, + cbr-PSSCH-r14 SL-CBR-r14, + cbr-PSCCH-r14 SL-CBR-r14 OPTIONAL +} + +MeasResultSensing-r15 ::= SEQUENCE { + sl-SubframeRef-r15 INTEGER (0..10239), + sensingResult-r15 SEQUENCE (SIZE (0..400)) OF SensingResult-r15 +} + +SensingResult-r15 ::= SEQUENCE { + resourceIndex-r15 INTEGER (1..2000) +} + +MeasResultForECID-r9 ::= SEQUENCE { + ue-RxTxTimeDiffResult-r9 INTEGER (0..4095), + currentSFN-r9 BIT STRING (SIZE (10)) +} + +PLMN-IdentityList2 ::= SEQUENCE (SIZE (1..5)) OF PLMN-Identity + +AdditionalSI-Info-r9 ::= SEQUENCE { + csg-MemberStatus-r9 ENUMERATED {member} OPTIONAL, + csg-Identity-r9 CSG-Identity OPTIONAL +} +MeasResultForRSSI-r13 ::= SEQUENCE { + rssi-Result-r13 RSSI-Range-r13, + channelOccupancy-r13 INTEGER (0..100), + ... +} + +UL-PDCP-DelayResultList-r13 ::= SEQUENCE (SIZE (1..maxQCI-r13)) OF UL-PDCP-DelayResult-r13 + + +UL-PDCP-DelayResult-r13 ::= SEQUENCE { + qci-Id-r13 ENUMERATED {qci1, qci2, qci3, qci4, spare4, spare3, spare2, spare1}, + excessDelay-r13 INTEGER (0..31), + ... +} + +CGI-InfoNR-r15 ::= SEQUENCE { + plmn-IdentityInfoList-r15 PLMN-IdentityInfoListNR-r15 OPTIONAL, + frequencyBandList-15 MultiFrequencyBandListNR-r15 OPTIONAL, + noSIB1-r15 SEQUENCE { + ssb-SubcarrierOffset-r15 INTEGER (0..15), + pdcch-ConfigSIB1-r15 INTEGER (0..255) + } OPTIONAL, + ... +} + +CellIdentityNR-r15 ::= BIT STRING (SIZE (36)) + +PLMN-IdentityListNR-r15 ::= SEQUENCE (SIZE (1.. maxPLMN-NR-r15)) OF PLMN-Identity + +PLMN-IdentityInfoListNR-r15 ::= SEQUENCE (SIZE (1..maxPLMN-NR-r15)) OF PLMN-IdentityInfoNR-r15 + +PLMN-IdentityInfoNR-r15 ::= SEQUENCE { + plmn-IdentityList-r15 PLMN-IdentityListNR-r15, + trackingAreaCode-r15 TrackingAreaCodeNR-r15 OPTIONAL, + ran-AreaCode-r15 RAN-AreaCode-r15 OPTIONAL, + cellIdentity-r15 CellIdentityNR-r15 +} + +TrackingAreaCodeNR-r15 ::= BIT STRING (SIZE (24)) + + +MeasResultCellListSFTD-r15 ::= SEQUENCE (SIZE (1..maxCellSFTD)) OF MeasResultCellSFTD-r15 + +MeasResultCellSFTD-r15 ::= SEQUENCE { + physCellId-r15 PhysCellIdNR-r15, + sfn-OffsetResult-r15 INTEGER (0..1023), + frameBoundaryOffsetResult-r15 INTEGER (-30720..30719), + rsrpResult-r15 RSRP-RangeNR-r15 OPTIONAL +} + + +MeasResultSSTD-r13 ::= SEQUENCE { + sfn-OffsetResult-r13 INTEGER (0..1023), + frameBoundaryOffsetResult-r13 INTEGER (-5..4), + subframeBoundaryOffsetResult-r13 INTEGER (0..127) +} + + +MeasScaleFactor-r12 ::= ENUMERATED {sf-EUTRA-cf1, sf-EUTRA-cf2} + + +MeasSensing-Config-r15 ::= SEQUENCE { + sensingSubchannelNumber-r15 INTEGER (1..20), + sensingPeriodicity-r15 ENUMERATED {ms20, ms50, ms100, ms200, + ms300, ms400, ms500, ms600, + ms700, ms800, ms900, ms1000}, + sensingReselectionCounter-r15 INTEGER (5..75), + sensingPriority-r15 INTEGER (1..8) +} + + +MTC-SSB-NR-r15 ::= SEQUENCE { + periodicityAndOffset-r15 CHOICE { + sf5-r15 INTEGER (0..4), + sf10-r15 INTEGER (0..9), + sf20-r15 INTEGER (0..19), + sf40-r15 INTEGER (0..39), + sf80-r15 INTEGER (0..79), + sf160-r15 INTEGER (0..159) + }, + ssb-Duration-r15 ENUMERATED {sf1, sf2, sf3, sf4, sf5 } +} + + +QuantityConfig ::= SEQUENCE { + quantityConfigEUTRA QuantityConfigEUTRA OPTIONAL, -- Need ON + quantityConfigUTRA QuantityConfigUTRA OPTIONAL, -- Need ON + quantityConfigGERAN QuantityConfigGERAN OPTIONAL, -- Need ON + quantityConfigCDMA2000 QuantityConfigCDMA2000 OPTIONAL, -- Need ON + ..., + [[ quantityConfigUTRA-v1020 QuantityConfigUTRA-v1020 OPTIONAL -- Need ON + ]], + [[ quantityConfigEUTRA-v1250 QuantityConfigEUTRA-v1250 OPTIONAL -- Need ON + ]], + [[ quantityConfigEUTRA-v1310 QuantityConfigEUTRA-v1310 OPTIONAL, -- Need ON + quantityConfigWLAN-r13 QuantityConfigWLAN-r13 OPTIONAL -- Need ON + ]], + [[ quantityConfigNRList-r15 QuantityConfigNRList-r15 OPTIONAL -- Need ON + ]] +} + +QuantityConfigEUTRA ::= SEQUENCE { + filterCoefficientRSRP FilterCoefficient DEFAULT fc4, + filterCoefficientRSRQ FilterCoefficient DEFAULT fc4 +} + +QuantityConfigEUTRA-v1250 ::= SEQUENCE { + filterCoefficientCSI-RSRP-r12 FilterCoefficient OPTIONAL -- Need OR +} + +QuantityConfigEUTRA-v1310 ::= SEQUENCE { + filterCoefficientRS-SINR-r13 FilterCoefficient DEFAULT fc4 +} + +QuantityConfigUTRA ::= SEQUENCE { + measQuantityUTRA-FDD ENUMERATED {cpich-RSCP, cpich-EcN0}, + measQuantityUTRA-TDD ENUMERATED {pccpch-RSCP}, + filterCoefficient FilterCoefficient DEFAULT fc4 +} + +QuantityConfigUTRA-v1020 ::= SEQUENCE { + filterCoefficient2-FDD-r10 FilterCoefficient DEFAULT fc4 +} + +QuantityConfigGERAN ::= SEQUENCE { + measQuantityGERAN ENUMERATED {rssi}, + filterCoefficient FilterCoefficient DEFAULT fc2 +} + +QuantityConfigCDMA2000 ::= SEQUENCE { + measQuantityCDMA2000 ENUMERATED {pilotStrength, pilotPnPhaseAndPilotStrength} +} + +QuantityConfigNRList-r15 ::= SEQUENCE (SIZE (1..maxQuantSetsNR-r15)) OF QuantityConfigNR-r15 + +QuantityConfigNR-r15 ::= SEQUENCE { + measQuantityCellNR-r15 QuantityConfigRS-NR-r15, + measQuantityRS-IndexNR-r15 QuantityConfigRS-NR-r15 OPTIONAL +} + +QuantityConfigRS-NR-r15 ::= SEQUENCE { + filterCoeff-RSRP-r15 FilterCoefficient DEFAULT fc4, + filterCoeff-RSRQ-r15 FilterCoefficient DEFAULT fc4, + filterCoefficient-SINR-r13 FilterCoefficient DEFAULT fc4 +} + +QuantityConfigWLAN-r13 ::= SEQUENCE { + measQuantityWLAN-r13 ENUMERATED {rssiWLAN}, + filterCoefficient-r13 FilterCoefficient DEFAULT fc4 +} + + +ReportConfigEUTRA ::= SEQUENCE { + triggerType CHOICE { + event SEQUENCE { + eventId CHOICE { + eventA1 SEQUENCE { + a1-Threshold ThresholdEUTRA + }, + eventA2 SEQUENCE { + a2-Threshold ThresholdEUTRA + }, + eventA3 SEQUENCE { + a3-Offset INTEGER (-30..30), + reportOnLeave BOOLEAN + }, + eventA4 SEQUENCE { + a4-Threshold ThresholdEUTRA + }, + eventA5 SEQUENCE { + a5-Threshold1 ThresholdEUTRA, + a5-Threshold2 ThresholdEUTRA + }, + ..., + eventA6-r10 SEQUENCE { + a6-Offset-r10 INTEGER (-30..30), + a6-ReportOnLeave-r10 BOOLEAN + }, + eventC1-r12 SEQUENCE { + c1-Threshold-r12 ThresholdEUTRA-v1250, + c1-ReportOnLeave-r12 BOOLEAN + }, + eventC2-r12 SEQUENCE { + c2-RefCSI-RS-r12 MeasCSI-RS-Id-r12, + c2-Offset-r12 INTEGER (-30..30), + c2-ReportOnLeave-r12 BOOLEAN + }, + eventV1-r14 SEQUENCE { + v1-Threshold-r14 SL-CBR-r14 + }, + eventV2-r14 SEQUENCE { + v2-Threshold-r14 SL-CBR-r14 + }, + eventH1-r15 SEQUENCE { + h1-ThresholdOffset-r15 INTEGER (0..300), + h1-Hysteresis-15 INTEGER (1..16) + }, + eventH2-r15 SEQUENCE { + h2-ThresholdOffset-r15 INTEGER (0..300), + h2-Hysteresis-15 INTEGER (1..16) + } + }, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger + }, + periodical SEQUENCE { + purpose ENUMERATED { + reportStrongestCells, reportCGI} + } + }, + triggerQuantity ENUMERATED {rsrp, rsrq}, + reportQuantity ENUMERATED {sameAsTriggerQuantity, both}, + maxReportCells INTEGER (1..maxCellReport), + reportInterval ReportInterval, + reportAmount ENUMERATED {r1, r2, r4, r8, r16, r32, r64, infinity}, + ..., + [[ si-RequestForHO-r9 ENUMERATED {setup} OPTIONAL, -- Cond reportCGI + ue-RxTxTimeDiffPeriodical-r9 ENUMERATED {setup} OPTIONAL -- Need OR + ]], + [[ includeLocationInfo-r10 ENUMERATED {true} OPTIONAL, -- Need OR + reportAddNeighMeas-r10 ENUMERATED {setup} OPTIONAL -- Need OR + ]], + [[ alternativeTimeToTrigger-r12 CHOICE { + release NULL, + setup TimeToTrigger + } OPTIONAL, -- Need ON + useT312-r12 BOOLEAN OPTIONAL, -- Need ON + usePSCell-r12 BOOLEAN OPTIONAL, -- Need ON + aN-Threshold1-v1250 RSRQ-RangeConfig-r12 OPTIONAL, -- Need ON + a5-Threshold2-v1250 RSRQ-RangeConfig-r12 OPTIONAL, -- Need ON + reportStrongestCSI-RSs-r12 BOOLEAN OPTIONAL, -- Need ON + reportCRS-Meas-r12 BOOLEAN OPTIONAL, -- Need ON + triggerQuantityCSI-RS-r12 BOOLEAN OPTIONAL -- Need ON + ]], + [[ reportSSTD-Meas-r13 BOOLEAN OPTIONAL, -- Need ON + rs-sinr-Config-r13 CHOICE { + release NULL, + setup SEQUENCE { + triggerQuantity-v1310 ENUMERATED {sinr} OPTIONAL, -- Need ON + aN-Threshold1-r13 RS-SINR-Range-r13 OPTIONAL, -- Need ON + a5-Threshold2-r13 RS-SINR-Range-r13 OPTIONAL, -- Need ON + reportQuantity-v1310 ENUMERATED {rsrpANDsinr, rsrqANDsinr, all} + } + } OPTIONAL, -- Need ON + useWhiteCellList-r13 BOOLEAN OPTIONAL, -- Need ON + measRSSI-ReportConfig-r13 MeasRSSI-ReportConfig-r13 OPTIONAL, -- Need ON + includeMultiBandInfo-r13 ENUMERATED {true} OPTIONAL, -- Cond reportCGI + ul-DelayConfig-r13 UL-DelayConfig-r13 OPTIONAL -- Need ON + ]], + [[ ue-RxTxTimeDiffPeriodicalTDD-r13 BOOLEAN OPTIONAL -- Need ON + ]], + [[ + purpose-v1430 ENUMERATED {reportLocation, sidelink, spare2, spare1} + OPTIONAL -- Need ON + ]], + [[ + maxReportRS-Index-r15 INTEGER (0..maxRS-IndexReport-r15) OPTIONAL -- Need ON + ]], + [[ includeBT-Meas-r15 BT-NameListConfig-r15 OPTIONAL, -- Need ON + includeWLAN-Meas-r15 WLAN-NameListConfig-r15 OPTIONAL, -- Need ON + purpose-r15 ENUMERATED {sensing} OPTIONAL, -- Need ON + numberOfTriggeringCells-r15 INTEGER (2..maxCellReport) OPTIONAL, -- Cond a3a4a5 + a4-a5-ReportOnLeave-r15 BOOLEAN OPTIONAL -- Cond a4a5 + ]] +} + +RSRQ-RangeConfig-r12 ::= CHOICE { + release NULL, + setup RSRQ-Range-v1250 +} + +ThresholdEUTRA ::= CHOICE{ + threshold-RSRP RSRP-Range, + threshold-RSRQ RSRQ-Range +} + +ThresholdEUTRA-v1250 ::= CSI-RSRP-Range-r12 + +MeasRSSI-ReportConfig-r13 ::= SEQUENCE { + channelOccupancyThreshold-r13 RSSI-Range-r13 OPTIONAL -- Need OR +} + + +ReportConfigId ::= INTEGER (1..maxReportConfigId) + + +ReportConfigInterRAT ::= SEQUENCE { + triggerType CHOICE { + event SEQUENCE { + eventId CHOICE { + eventB1 SEQUENCE { + b1-Threshold CHOICE { + b1-ThresholdUTRA ThresholdUTRA, + b1-ThresholdGERAN ThresholdGERAN, + b1-ThresholdCDMA2000 ThresholdCDMA2000 + } + }, + eventB2 SEQUENCE { + b2-Threshold1 ThresholdEUTRA, + b2-Threshold2 CHOICE { + b2-Threshold2UTRA ThresholdUTRA, + b2-Threshold2GERAN ThresholdGERAN, + b2-Threshold2CDMA2000 ThresholdCDMA2000 + } + }, + ..., + eventW1-r13 SEQUENCE { + w1-Threshold-r13 WLAN-RSSI-Range-r13 + }, + eventW2-r13 SEQUENCE { + w2-Threshold1-r13 WLAN-RSSI-Range-r13, + w2-Threshold2-r13 WLAN-RSSI-Range-r13 + }, + eventW3-r13 SEQUENCE { + w3-Threshold-r13 WLAN-RSSI-Range-r13 + }, + eventB1-NR-r15 SEQUENCE { + b1-ThresholdNR-r15 ThresholdNR-r15, + reportOnLeave-r15 BOOLEAN + }, + eventB2-NR-r15 SEQUENCE { + b2-Threshold1-r15 ThresholdEUTRA, + b2-Threshold2NR-r15 ThresholdNR-r15, + reportOnLeave-r15 BOOLEAN + } + }, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger + }, + periodical SEQUENCE { + purpose ENUMERATED { + reportStrongestCells, + reportStrongestCellsForSON, + reportCGI} + } + }, + maxReportCells INTEGER (1..maxCellReport), + reportInterval ReportInterval, + reportAmount ENUMERATED {r1, r2, r4, r8, r16, r32, r64, infinity}, + ..., + [[ si-RequestForHO-r9 ENUMERATED {setup} OPTIONAL -- Cond reportCGI + ]], + [[ reportQuantityUTRA-FDD-r10 ENUMERATED {both} OPTIONAL -- Need OR + ]], + [[ includeLocationInfo-r11 BOOLEAN OPTIONAL -- Need ON + ]], + [[ b2-Threshold1-v1250 CHOICE { + release NULL, + setup RSRQ-Range-v1250 + } OPTIONAL -- Need ON + ]], + [[ reportQuantityWLAN-r13 ReportQuantityWLAN-r13 OPTIONAL -- Need ON + ]], + [[ reportAnyWLAN-r14 BOOLEAN OPTIONAL -- Need ON + ]], + [[ reportQuantityCellNR-r15 ReportQuantityNR-r15 OPTIONAL, -- Need ON + maxReportRS-Index-r15 INTEGER (0..maxRS-IndexReport-r15) OPTIONAL, -- Need ON + reportQuantityRS-IndexNR-r15 ReportQuantityNR-r15 OPTIONAL, -- Need ON + reportRS-IndexResultsNR BOOLEAN OPTIONAL, -- Need ON + reportSFTD-Meas-r15 ENUMERATED {pSCell, neighborCells } OPTIONAL -- Need ON + ]] +} + +ThresholdUTRA ::= CHOICE{ + utra-RSCP INTEGER (-5..91), + utra-EcN0 INTEGER (0..49) +} + +ThresholdGERAN ::= INTEGER (0..63) + +ThresholdCDMA2000 ::= INTEGER (0..63) + +ReportQuantityNR-r15::= SEQUENCE { + ss-rsrp BOOLEAN, + ss-rsrq BOOLEAN, + ss-sinr BOOLEAN +} + +ReportQuantityWLAN-r13 ::= SEQUENCE { + bandRequestWLAN-r13 ENUMERATED {true} OPTIONAL, -- Need OR + carrierInfoRequestWLAN-r13 ENUMERATED {true} OPTIONAL, -- Need OR + availableAdmissionCapacityRequestWLAN-r13 ENUMERATED {true} OPTIONAL, -- Need OR + backhaulDL-BandwidthRequestWLAN-r13 ENUMERATED {true} OPTIONAL, -- Need OR + backhaulUL-BandwidthRequestWLAN-r13 ENUMERATED {true} OPTIONAL, -- Need OR + channelUtilizationRequestWLAN-r13 ENUMERATED {true} OPTIONAL, -- Need OR + stationCountRequestWLAN-r13 ENUMERATED {true} OPTIONAL, -- Need OR + ... +} + + +ReportConfigToAddModList ::= SEQUENCE (SIZE (1..maxReportConfigId)) OF ReportConfigToAddMod + +ReportConfigToAddMod ::= SEQUENCE { + reportConfigId ReportConfigId, + reportConfig CHOICE { + reportConfigEUTRA ReportConfigEUTRA, + reportConfigInterRAT ReportConfigInterRAT + } +} + + + +ReportInterval ::= ENUMERATED { + ms120, ms240, ms480, ms640, ms1024, ms2048, ms5120, ms10240, + min1, min6, min12, min30, min60, spare3, spare2, spare1} + + +RS-IndexNR-r15 ::= INTEGER (0.. maxRS-Index-1-r15) + +MaxRS-IndexCellQualNR-r15::= INTEGER (1..maxRS-IndexCellQualNR-r15) + + +RSRP-Range ::= INTEGER(0..97) + +RSRP-Range-v1360 ::= INTEGER(-17..-1) + +RSRP-RangeSL-r12 ::= INTEGER(0..13) + +RSRP-RangeSL2-r12 ::= INTEGER(0..7) + +RSRP-RangeSL3-r12 ::= INTEGER(0..11) + +RSRP-RangeSL4-r13 ::= INTEGER(0..49) + + +RSRP-RangeNR-r15 ::= INTEGER (0..127) + + +RSRQ-Range ::= INTEGER(0..34) + +RSRQ-Range-v1250 ::= INTEGER(-30..46) + +RSRQ-Range-r13 ::= INTEGER(-30..46) + + +RSRQ-RangeNR-r15 ::= INTEGER (0..127) + + +RSRQ-Type-r12 ::= SEQUENCE { + allSymbols-r12 BOOLEAN, + wideBand-r12 BOOLEAN +} + + +RS-SINR-Range-r13 ::= INTEGER(0..127) + + +RS-SINR-RangeNR-r15 ::= INTEGER (0..127) + + +RSSI-Range-r13 ::= INTEGER(0..76) + + +SS-RSSI-Measurement-r15 ::= SEQUENCE { + measurementSlots-r15 BIT STRING (SIZE(1..80)), + endSymbol-r15 INTEGER(0..3) +} + + +TimeToTrigger ::= ENUMERATED { + ms0, ms40, ms64, ms80, ms100, ms128, ms160, ms256, + ms320, ms480, ms512, ms640, ms1024, ms1280, ms2560, + ms5120} + + +UL-DelayConfig-r13 ::= CHOICE { + release NULL, + setup SEQUENCE { + delayThreshold-r13 ENUMERATED { + ms30, ms40, ms50, ms60, ms70, ms80, + ms90,ms100, ms150, ms300, ms500, ms750, spare4, spare3, spare2, spare1} + } +} + + +WLAN-CarrierInfo-r13 ::= SEQUENCE { + operatingClass-r13 INTEGER (0..255) OPTIONAL, -- Need ON + countryCode-r13 ENUMERATED {unitedStates, europe, japan, global, ...} OPTIONAL, -- Need ON + channelNumbers-r13 WLAN-ChannelList-r13 OPTIONAL, -- Need ON + ... +} + +WLAN-ChannelList-r13 ::= SEQUENCE (SIZE (1..maxWLAN-Channels-r13)) OF WLAN-Channel-r13 + +WLAN-Channel-r13 ::= INTEGER(0..255) + + +WLAN-NameListConfig-r15 ::= CHOICE{ + release NULL, + setup WLAN-NameList-r15 +} + +WLAN-NameList-r15 ::= SEQUENCE (SIZE (1..maxWLAN-Name-r15)) OF WLAN-Name-r15 + +WLAN-Name-r15 ::= OCTET STRING (SIZE (1..32)) + + +WLAN-RSSI-Range-r13 ::= INTEGER(0..141) + + +WLAN-RTT-r15 ::= SEQUENCE { + rttValue-r15 INTEGER (0..16777215), + rttUnits-r15 ENUMERATED { microseconds, + hundredsofnanoseconds, + tensofnanoseconds, + nanoseconds, + tenthsofnanoseconds, + ... }, + rttAccuracy-r15 INTEGER (0..255) OPTIONAL, + ... +} + + +WLAN-Status-r13 ::= ENUMERATED {successfulAssociation, failureWlanRadioLink, failureWlanUnavailable, failureTimeout} + +WLAN-Status-v1430 ::= ENUMERATED {suspended, resumed} + + +WLAN-SuspendConfig-r14 ::= SEQUENCE { + wlan-SuspendResumeAllowed-r14 BOOLEAN OPTIONAL, -- Need ON + wlan-SuspendTriggersStatusReport-r14 BOOLEAN OPTIONAL -- Need ON +} + + +AbsoluteTimeInfo-r10 ::= BIT STRING (SIZE (48)) + + +AMF-Identifier-r15 ::= BIT STRING (SIZE (24)) + + +AreaConfiguration-r10 ::= CHOICE { + cellGlobalIdList-r10 CellGlobalIdList-r10, + trackingAreaCodeList-r10 TrackingAreaCodeList-r10 +} + +AreaConfiguration-v1130 ::= SEQUENCE { + trackingAreaCodeList-v1130 TrackingAreaCodeList-v1130 +} + +CellGlobalIdList-r10 ::= SEQUENCE (SIZE (1..32)) OF CellGlobalIdEUTRA + +TrackingAreaCodeList-r10 ::= SEQUENCE (SIZE (1..8)) OF TrackingAreaCode + +TrackingAreaCodeList-v1130 ::= SEQUENCE { + plmn-Identity-perTAC-List-r11 SEQUENCE (SIZE (1..8)) OF PLMN-Identity +} + + +BandCombinationList-r14 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF BandCombination-r14 + +BandCombination-r14 ::= SEQUENCE (SIZE (1..maxSimultaneousBands-r10)) OF BandIndication-r14 + +BandIndication-r14 ::= SEQUENCE { + bandEUTRA-r14 FreqBandIndicator-r11, + ca-BandwidthClassDL-r14 CA-BandwidthClass-r10, + ca-BandwidthClassUL-r14 CA-BandwidthClass-r10 OPTIONAL +} + + +C-RNTI ::= BIT STRING (SIZE (16)) + + +DedicatedInfoCDMA2000 ::= OCTET STRING + + +DedicatedInfoNAS ::= OCTET STRING + + +FilterCoefficient ::= ENUMERATED { + fc0, fc1, fc2, fc3, fc4, fc5, + fc6, fc7, fc8, fc9, fc11, fc13, + fc15, fc17, fc19, spare1, ...} + + +FlightPathInfoReportConfig-r15 ::= SEQUENCE { + maxWayPointNumber-r15 INTEGER (1..maxWayPoint-r15), + includeTimeStamp-r15 ENUMERATED {true} OPTIONAL +} + + +GNSS-ID-r15 ::= SEQUENCE { + gnss-id-r15 ENUMERATED{ gps, sbas, qzss, galileo, glonass, bds, ... }, + ... +} + + +I-RNTI-r15 ::= BIT STRING (SIZE(40)) + + +LoggingDuration-r10 ::= ENUMERATED { + min10, min20, min40, min60, min90, min120, spare2, spare1} + + +LoggingInterval-r10 ::= ENUMERATED { + ms1280, ms2560, ms5120, ms10240, ms20480, + ms30720, ms40960, ms61440} + + +MeasSubframePattern-r10 ::= CHOICE { + subframePatternFDD-r10 BIT STRING (SIZE (40)), + subframePatternTDD-r10 CHOICE { + subframeConfig1-5-r10 BIT STRING (SIZE (20)), + subframeConfig0-r10 BIT STRING (SIZE (70)), + subframeConfig6-r10 BIT STRING (SIZE (60)), + ... + }, + ... +} + + +MMEC ::= BIT STRING (SIZE (8)) + + +NeighCellConfig ::= BIT STRING (SIZE (2)) + + +NG-5G-S-TMSI-r15::= BIT STRING (SIZE (48)) + + +OtherConfig-r9 ::= SEQUENCE { + reportProximityConfig-r9 ReportProximityConfig-r9 OPTIONAL, -- Need ON + ..., + [[ idc-Config-r11 IDC-Config-r11 OPTIONAL, -- Need ON + powerPrefIndicationConfig-r11 PowerPrefIndicationConfig-r11 OPTIONAL, -- Need ON + obtainLocationConfig-r11 ObtainLocationConfig-r11 OPTIONAL -- Need ON + ]], + [[ bw-PreferenceIndicationTimer-r14 ENUMERATED {s0, s0dot5, s1, s2, s5, s10, s20, + s30, s60, s90, s120, s300, s600, spare3, + spare2, spare1} OPTIONAL, -- Need OR + sps-AssistanceInfoReport-r14 BOOLEAN OPTIONAL, -- Need ON + delayBudgetReportingConfig-r14 CHOICE{ + release NULL, + setup SEQUENCE{ + delayBudgetReportingProhibitTimer-r14 ENUMERATED { + s0, s0dot4, s0dot8, + s1dot6, s3, s6, s12, s30} + } + } OPTIONAL, -- Need ON + rlm-ReportConfig-r14 CHOICE { + release NULL, + setup SEQUENCE{ + rlmReportTimer-r14 ENUMERATED {s0, s0dot5, s1, s2, s5, s10, s20, s30, + s60, s90, s120, s300, s600, spare3, spare2, spare1}, + rlmReportRep-MPDCCH-r14 ENUMERATED {setup} OPTIONAL -- Need OR + } + } OPTIONAL -- Need ON + ]], + [[ overheatingAssistanceConfig-r14 CHOICE{ + release NULL, + setup SEQUENCE{ + overheatingIndicationProhibitTimer-r14 ENUMERATED {s0, s0dot5, s1, s2, s5, s10, + s20, s30, s60, s90, s120, s300, s600, + spare3, spare2, spare1} + } + } OPTIONAL -- Need ON + ]], + [[ measConfigAppLayer-r15 CHOICE{ + release NULL, + setup SEQUENCE{ + measConfigAppLayerContainer-r15 OCTET STRING (SIZE(1..1000)), + serviceType ENUMERATED {qoe, qoemtsi, spare6, spare5, spare4, spare3, spare2, spare1} + } + } OPTIONAL, -- Need ON + ailc-BitConfig-r15 BOOLEAN OPTIONAL, -- Need ON + bt-NameListConfig-r15 BT-NameListConfig-r15 OPTIONAL, --Need ON + wlan-NameListConfig-r15 WLAN-NameListConfig-r15 OPTIONAL --Need ON + ]] +} + +IDC-Config-r11 ::= SEQUENCE { + idc-Indication-r11 ENUMERATED {setup} OPTIONAL, -- Need OR + autonomousDenialParameters-r11 SEQUENCE { + autonomousDenialSubframes-r11 ENUMERATED {n2, n5, n10, n15, + n20, n30, spare2, spare1}, + autonomousDenialValidity-r11 ENUMERATED { + sf200, sf500, sf1000, sf2000, + spare4, spare3, spare2, spare1} + } OPTIONAL, -- Need OR + ..., + [[ idc-Indication-UL-CA-r11 ENUMERATED {setup} OPTIONAL -- Cond idc-Ind + ]], + [[ idc-HardwareSharingIndication-r13 ENUMERATED {setup} OPTIONAL -- Need OR + ]], + [[ idc-Indication-MRDC-r15 CHOICE{ + release NULL, + setup CandidateServingFreqListNR-r15 + } OPTIONAL -- Cond idc-Ind + ]] +} + +ObtainLocationConfig-r11 ::= SEQUENCE { + obtainLocation-r11 ENUMERATED {setup} OPTIONAL -- Need OR +} + +PowerPrefIndicationConfig-r11 ::= CHOICE{ + release NULL, + setup SEQUENCE{ + powerPrefIndicationTimer-r11 ENUMERATED {s0, s0dot5, s1, s2, s5, s10, s20, + s30, s60, s90, s120, s300, s600, spare3, + spare2, spare1} + } +} + +ReportProximityConfig-r9 ::= SEQUENCE { + proximityIndicationEUTRA-r9 ENUMERATED {enabled} OPTIONAL, -- Need OR + proximityIndicationUTRA-r9 ENUMERATED {enabled} OPTIONAL -- Need OR +} + +CandidateServingFreqListNR-r15 ::= SEQUENCE (SIZE (1..maxFreqIDC-r11)) OF ARFCN-ValueNR-r15 + + +RAN-AreaCode-r15 ::= INTEGER (0..255) + + +RAND-CDMA2000 ::= BIT STRING (SIZE (32)) + + +RAT-Type ::= ENUMERATED { + eutra, utra, geran-cs, geran-ps, cdma2000-1XRTT, + nr, eutra-nr, spare1, ...} + + +ResumeIdentity-r13 ::= BIT STRING (SIZE(40)) + + +RRC-TransactionIdentifier ::= INTEGER (0..3) + + +SBAS-ID-r15 ::= SEQUENCE { + sbas-id-r15 ENUMERATED { waas, egnos, msas, gagan, ...}, + ... +} + + +ShortI-RNTI-r15 ::= BIT STRING (SIZE(24)) + + +S-NSSAI-r15 ::= CHOICE{ + sst BIT STRING (SIZE (8)), + sst-SD BIT STRING (SIZE (32)) +} + + +S-TMSI ::= SEQUENCE { + mmec MMEC, + m-TMSI BIT STRING (SIZE (32)) +} + + +TraceReference-r10 ::= SEQUENCE { + plmn-Identity-r10 PLMN-Identity, + traceId-r10 OCTET STRING (SIZE (3)) +} + + +UE-CapabilityRAT-ContainerList ::=SEQUENCE (SIZE (0..maxRAT-Capabilities)) OF UE-CapabilityRAT-Container + +UE-CapabilityRAT-Container ::= SEQUENCE { + rat-Type RAT-Type, + ueCapabilityRAT-Container OCTET STRING +} + + +UE-EUTRA-Capability ::= SEQUENCE { + accessStratumRelease AccessStratumRelease, + ue-Category INTEGER (1..5), + pdcp-Parameters PDCP-Parameters, + phyLayerParameters PhyLayerParameters, + rf-Parameters RF-Parameters, + measParameters MeasParameters, + featureGroupIndicators BIT STRING (SIZE (32)) OPTIONAL, + interRAT-Parameters SEQUENCE { + utraFDD IRAT-ParametersUTRA-FDD OPTIONAL, + utraTDD128 IRAT-ParametersUTRA-TDD128 OPTIONAL, + utraTDD384 IRAT-ParametersUTRA-TDD384 OPTIONAL, + utraTDD768 IRAT-ParametersUTRA-TDD768 OPTIONAL, + geran IRAT-ParametersGERAN OPTIONAL, + cdma2000-HRPD IRAT-ParametersCDMA2000-HRPD OPTIONAL, + cdma2000-1xRTT IRAT-ParametersCDMA2000-1XRTT OPTIONAL + }, + nonCriticalExtension UE-EUTRA-Capability-v920-IEs OPTIONAL +} + +-- Late non critical extensions +UE-EUTRA-Capability-v9a0-IEs ::= SEQUENCE { + featureGroupIndRel9Add-r9 BIT STRING (SIZE (32)) OPTIONAL, + fdd-Add-UE-EUTRA-Capabilities-r9 UE-EUTRA-CapabilityAddXDD-Mode-r9 OPTIONAL, + tdd-Add-UE-EUTRA-Capabilities-r9 UE-EUTRA-CapabilityAddXDD-Mode-r9 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v9c0-IEs OPTIONAL +} + +UE-EUTRA-Capability-v9c0-IEs ::= SEQUENCE { + interRAT-ParametersUTRA-v9c0 IRAT-ParametersUTRA-v9c0 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v9d0-IEs OPTIONAL +} + +UE-EUTRA-Capability-v9d0-IEs ::= SEQUENCE { + phyLayerParameters-v9d0 PhyLayerParameters-v9d0 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v9e0-IEs OPTIONAL +} + +UE-EUTRA-Capability-v9e0-IEs ::= SEQUENCE { + rf-Parameters-v9e0 RF-Parameters-v9e0 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v9h0-IEs OPTIONAL +} + +UE-EUTRA-Capability-v9h0-IEs ::= SEQUENCE { + interRAT-ParametersUTRA-v9h0 IRAT-ParametersUTRA-v9h0 OPTIONAL, + -- Following field is only to be used for late REL-9 extensions + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v10c0-IEs OPTIONAL +} + +UE-EUTRA-Capability-v10c0-IEs ::= SEQUENCE { + otdoa-PositioningCapabilities-r10 OTDOA-PositioningCapabilities-r10 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v10f0-IEs OPTIONAL +} + +UE-EUTRA-Capability-v10f0-IEs ::= SEQUENCE { + rf-Parameters-v10f0 RF-Parameters-v10f0 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v10i0-IEs OPTIONAL +} + +UE-EUTRA-Capability-v10i0-IEs ::= SEQUENCE { + rf-Parameters-v10i0 RF-Parameters-v10i0 OPTIONAL, + -- Following field is only to be used for late REL-10 extensions + lateNonCriticalExtension OCTET STRING (CONTAINING UE-EUTRA-Capability-v10j0-IEs) OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v11d0-IEs OPTIONAL +} + +UE-EUTRA-Capability-v10j0-IEs ::= SEQUENCE { + rf-Parameters-v10j0 RF-Parameters-v10j0 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +UE-EUTRA-Capability-v11d0-IEs ::= SEQUENCE { + rf-Parameters-v11d0 RF-Parameters-v11d0 OPTIONAL, + otherParameters-v11d0 Other-Parameters-v11d0 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v11x0-IEs OPTIONAL +} + +UE-EUTRA-Capability-v11x0-IEs ::= SEQUENCE { + -- Following field is only to be used for late REL-11 extensions + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v12b0-IEs OPTIONAL +} + +UE-EUTRA-Capability-v12b0-IEs ::= SEQUENCE { + rf-Parameters-v12b0 RF-Parameters-v12b0 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v12x0-IEs OPTIONAL +} + +UE-EUTRA-Capability-v12x0-IEs ::= SEQUENCE { + -- Following field is only to be used for late REL-12 extensions + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1370-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1370-IEs ::= SEQUENCE { + ce-Parameters-v1370 CE-Parameters-v1370 OPTIONAL, + fdd-Add-UE-EUTRA-Capabilities-v1370 UE-EUTRA-CapabilityAddXDD-Mode-v1370 OPTIONAL, + tdd-Add-UE-EUTRA-Capabilities-v1370 UE-EUTRA-CapabilityAddXDD-Mode-v1370 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1380-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1380-IEs ::= SEQUENCE { + rf-Parameters-v1380 RF-Parameters-v1380 OPTIONAL, + ce-Parameters-v1380 CE-Parameters-v1380, + fdd-Add-UE-EUTRA-Capabilities-v1380 UE-EUTRA-CapabilityAddXDD-Mode-v1380, + tdd-Add-UE-EUTRA-Capabilities-v1380 UE-EUTRA-CapabilityAddXDD-Mode-v1380, + nonCriticalExtension UE-EUTRA-Capability-v1390-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1390-IEs ::= SEQUENCE { + rf-Parameters-v1390 RF-Parameters-v1390 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v13x0-IEs OPTIONAL +} + +UE-EUTRA-Capability-v13x0-IEs ::= SEQUENCE { + -- Following field is only to be used for late REL-13 extensions + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1470-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1470-IEs ::= SEQUENCE { + mbms-Parameters-v1470 MBMS-Parameters-v1470 OPTIONAL, + phyLayerParameters-v1470 PhyLayerParameters-v1470 OPTIONAL, + rf-Parameters-v1470 RF-Parameters-v1470 OPTIONAL, + -- Following field is only to be used for late REL-14 extensions + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- Regular non critical extensions +UE-EUTRA-Capability-v920-IEs ::= SEQUENCE { + phyLayerParameters-v920 PhyLayerParameters-v920, + interRAT-ParametersGERAN-v920 IRAT-ParametersGERAN-v920, + interRAT-ParametersUTRA-v920 IRAT-ParametersUTRA-v920 OPTIONAL, + interRAT-ParametersCDMA2000-v920 IRAT-ParametersCDMA2000-1XRTT-v920 OPTIONAL, + deviceType-r9 ENUMERATED {noBenFromBatConsumpOpt} OPTIONAL, + csg-ProximityIndicationParameters-r9 CSG-ProximityIndicationParameters-r9, + neighCellSI-AcquisitionParameters-r9 NeighCellSI-AcquisitionParameters-r9, + son-Parameters-r9 SON-Parameters-r9, + nonCriticalExtension UE-EUTRA-Capability-v940-IEs OPTIONAL +} + +UE-EUTRA-Capability-v940-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING (CONTAINING UE-EUTRA-Capability-v9a0-IEs) + OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1020-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1020-IEs ::= SEQUENCE { + ue-Category-v1020 INTEGER (6..8) OPTIONAL, + phyLayerParameters-v1020 PhyLayerParameters-v1020 OPTIONAL, + rf-Parameters-v1020 RF-Parameters-v1020 OPTIONAL, + measParameters-v1020 MeasParameters-v1020 OPTIONAL, + featureGroupIndRel10-r10 BIT STRING (SIZE (32)) OPTIONAL, + interRAT-ParametersCDMA2000-v1020 IRAT-ParametersCDMA2000-1XRTT-v1020 OPTIONAL, + ue-BasedNetwPerfMeasParameters-r10 UE-BasedNetwPerfMeasParameters-r10 OPTIONAL, + interRAT-ParametersUTRA-TDD-v1020 IRAT-ParametersUTRA-TDD-v1020 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1060-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1060-IEs ::= SEQUENCE { + fdd-Add-UE-EUTRA-Capabilities-v1060 UE-EUTRA-CapabilityAddXDD-Mode-v1060 OPTIONAL, + tdd-Add-UE-EUTRA-Capabilities-v1060 UE-EUTRA-CapabilityAddXDD-Mode-v1060 OPTIONAL, + rf-Parameters-v1060 RF-Parameters-v1060 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1090-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1090-IEs ::= SEQUENCE { + rf-Parameters-v1090 RF-Parameters-v1090 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1130-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1130-IEs ::= SEQUENCE { + pdcp-Parameters-v1130 PDCP-Parameters-v1130, + phyLayerParameters-v1130 PhyLayerParameters-v1130 OPTIONAL, + rf-Parameters-v1130 RF-Parameters-v1130, + measParameters-v1130 MeasParameters-v1130, + interRAT-ParametersCDMA2000-v1130 IRAT-ParametersCDMA2000-v1130, + otherParameters-r11 Other-Parameters-r11, + fdd-Add-UE-EUTRA-Capabilities-v1130 UE-EUTRA-CapabilityAddXDD-Mode-v1130 OPTIONAL, + tdd-Add-UE-EUTRA-Capabilities-v1130 UE-EUTRA-CapabilityAddXDD-Mode-v1130 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1170-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1170-IEs ::= SEQUENCE { + phyLayerParameters-v1170 PhyLayerParameters-v1170 OPTIONAL, + ue-Category-v1170 INTEGER (9..10) OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1180-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1180-IEs ::= SEQUENCE { + rf-Parameters-v1180 RF-Parameters-v1180 OPTIONAL, + mbms-Parameters-r11 MBMS-Parameters-r11 OPTIONAL, + fdd-Add-UE-EUTRA-Capabilities-v1180 UE-EUTRA-CapabilityAddXDD-Mode-v1180 OPTIONAL, + tdd-Add-UE-EUTRA-Capabilities-v1180 UE-EUTRA-CapabilityAddXDD-Mode-v1180 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v11a0-IEs OPTIONAL +} + +UE-EUTRA-Capability-v11a0-IEs ::= SEQUENCE { + ue-Category-v11a0 INTEGER (11..12) OPTIONAL, + measParameters-v11a0 MeasParameters-v11a0 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1250-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1250-IEs ::= SEQUENCE { + phyLayerParameters-v1250 PhyLayerParameters-v1250 OPTIONAL, + rf-Parameters-v1250 RF-Parameters-v1250 OPTIONAL, + rlc-Parameters-r12 RLC-Parameters-r12 OPTIONAL, + ue-BasedNetwPerfMeasParameters-v1250 UE-BasedNetwPerfMeasParameters-v1250 OPTIONAL, + ue-CategoryDL-r12 INTEGER (0..14) OPTIONAL, + ue-CategoryUL-r12 INTEGER (0..13) OPTIONAL, + wlan-IW-Parameters-r12 WLAN-IW-Parameters-r12 OPTIONAL, + measParameters-v1250 MeasParameters-v1250 OPTIONAL, + dc-Parameters-r12 DC-Parameters-r12 OPTIONAL, + mbms-Parameters-v1250 MBMS-Parameters-v1250 OPTIONAL, + mac-Parameters-r12 MAC-Parameters-r12 OPTIONAL, + fdd-Add-UE-EUTRA-Capabilities-v1250 UE-EUTRA-CapabilityAddXDD-Mode-v1250 OPTIONAL, + tdd-Add-UE-EUTRA-Capabilities-v1250 UE-EUTRA-CapabilityAddXDD-Mode-v1250 OPTIONAL, + sl-Parameters-r12 SL-Parameters-r12 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1260-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1260-IEs ::= SEQUENCE { + ue-CategoryDL-v1260 INTEGER (15..16) OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1270-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1270-IEs ::= SEQUENCE { + rf-Parameters-v1270 RF-Parameters-v1270 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1280-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1280-IEs ::= SEQUENCE { + phyLayerParameters-v1280 PhyLayerParameters-v1280 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1310-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1310-IEs ::= SEQUENCE { + ue-CategoryDL-v1310 ENUMERATED {n17, m1} OPTIONAL, + ue-CategoryUL-v1310 ENUMERATED {n14, m1} OPTIONAL, + pdcp-Parameters-v1310 PDCP-Parameters-v1310, + rlc-Parameters-v1310 RLC-Parameters-v1310, + mac-Parameters-v1310 MAC-Parameters-v1310 OPTIONAL, + phyLayerParameters-v1310 PhyLayerParameters-v1310 OPTIONAL, + rf-Parameters-v1310 RF-Parameters-v1310 OPTIONAL, + measParameters-v1310 MeasParameters-v1310 OPTIONAL, + dc-Parameters-v1310 DC-Parameters-v1310 OPTIONAL, + sl-Parameters-v1310 SL-Parameters-v1310 OPTIONAL, + scptm-Parameters-r13 SCPTM-Parameters-r13 OPTIONAL, + ce-Parameters-r13 CE-Parameters-r13 OPTIONAL, + interRAT-ParametersWLAN-r13 IRAT-ParametersWLAN-r13, + laa-Parameters-r13 LAA-Parameters-r13 OPTIONAL, + lwa-Parameters-r13 LWA-Parameters-r13 OPTIONAL, + wlan-IW-Parameters-v1310 WLAN-IW-Parameters-v1310, + lwip-Parameters-r13 LWIP-Parameters-r13, + fdd-Add-UE-EUTRA-Capabilities-v1310 UE-EUTRA-CapabilityAddXDD-Mode-v1310 OPTIONAL, + tdd-Add-UE-EUTRA-Capabilities-v1310 UE-EUTRA-CapabilityAddXDD-Mode-v1310 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1320-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1320-IEs ::= SEQUENCE { + ce-Parameters-v1320 CE-Parameters-v1320 OPTIONAL, + phyLayerParameters-v1320 PhyLayerParameters-v1320 OPTIONAL, + rf-Parameters-v1320 RF-Parameters-v1320 OPTIONAL, + fdd-Add-UE-EUTRA-Capabilities-v1320 UE-EUTRA-CapabilityAddXDD-Mode-v1320 OPTIONAL, + tdd-Add-UE-EUTRA-Capabilities-v1320 UE-EUTRA-CapabilityAddXDD-Mode-v1320 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1330-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1330-IEs ::= SEQUENCE { + ue-CategoryDL-v1330 INTEGER (18..19) OPTIONAL, + phyLayerParameters-v1330 PhyLayerParameters-v1330 OPTIONAL, + ue-CE-NeedULGaps-r13 ENUMERATED {true} OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1340-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1340-IEs ::= SEQUENCE { + ue-CategoryUL-v1340 INTEGER (15) OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1350-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1350-IEs ::= SEQUENCE { + ue-CategoryDL-v1350 ENUMERATED {oneBis} OPTIONAL, + ue-CategoryUL-v1350 ENUMERATED {oneBis} OPTIONAL, + ce-Parameters-v1350 CE-Parameters-v1350, + nonCriticalExtension UE-EUTRA-Capability-v1360-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1360-IEs ::= SEQUENCE { + other-Parameters-v1360 Other-Parameters-v1360 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1430-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1430-IEs ::= SEQUENCE { + phyLayerParameters-v1430 PhyLayerParameters-v1430, + ue-CategoryDL-v1430 ENUMERATED {m2} OPTIONAL, + ue-CategoryUL-v1430 ENUMERATED {n16, n17, n18, n19, n20, m2} OPTIONAL, + ue-CategoryUL-v1430b ENUMERATED {n21} OPTIONAL, + mac-Parameters-v1430 MAC-Parameters-v1430 OPTIONAL, + measParameters-v1430 MeasParameters-v1430 OPTIONAL, + pdcp-Parameters-v1430 PDCP-Parameters-v1430 OPTIONAL, + rlc-Parameters-v1430 RLC-Parameters-v1430, + rf-Parameters-v1430 RF-Parameters-v1430 OPTIONAL, + laa-Parameters-v1430 LAA-Parameters-v1430 OPTIONAL, + lwa-Parameters-v1430 LWA-Parameters-v1430 OPTIONAL, + lwip-Parameters-v1430 LWIP-Parameters-v1430 OPTIONAL, + otherParameters-v1430 Other-Parameters-v1430, + mmtel-Parameters-r14 MMTEL-Parameters-r14 OPTIONAL, + mobilityParameters-r14 MobilityParameters-r14 OPTIONAL, + ce-Parameters-v1430 CE-Parameters-v1430, + fdd-Add-UE-EUTRA-Capabilities-v1430 UE-EUTRA-CapabilityAddXDD-Mode-v1430 OPTIONAL, + tdd-Add-UE-EUTRA-Capabilities-v1430 UE-EUTRA-CapabilityAddXDD-Mode-v1430 OPTIONAL, + mbms-Parameters-v1430 MBMS-Parameters-v1430 OPTIONAL, + sl-Parameters-v1430 SL-Parameters-v1430 OPTIONAL, + ue-BasedNetwPerfMeasParameters-v1430 UE-BasedNetwPerfMeasParameters-v1430 OPTIONAL, + highSpeedEnhParameters-r14 HighSpeedEnhParameters-r14 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1440-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1440-IEs ::= SEQUENCE { + lwa-Parameters-v1440 LWA-Parameters-v1440, + mac-Parameters-v1440 MAC-Parameters-v1440, + nonCriticalExtension UE-EUTRA-Capability-v1450-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1450-IEs ::= SEQUENCE { + phyLayerParameters-v1450 PhyLayerParameters-v1450 OPTIONAL, + rf-Parameters-v1450 RF-Parameters-v1450 OPTIONAL, + otherParameters-v1450 OtherParameters-v1450, + ue-CategoryDL-v1450 INTEGER (20) OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1460-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1460-IEs ::= SEQUENCE { + ue-CategoryDL-v1460 INTEGER (21) OPTIONAL, + otherParameters-v1460 Other-Parameters-v1460, + nonCriticalExtension UE-EUTRA-Capability-v1510-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1510-IEs ::= SEQUENCE { + irat-ParametersNR-r15 IRAT-ParametersNR-r15 OPTIONAL, + featureSetsEUTRA-r15 FeatureSetsEUTRA-r15 OPTIONAL, + pdcp-ParametersNR-r15 PDCP-ParametersNR-r15 OPTIONAL, + fdd-Add-UE-EUTRA-Capabilities-v1510 UE-EUTRA-CapabilityAddXDD-Mode-v1510 OPTIONAL, + tdd-Add-UE-EUTRA-Capabilities-v1510 UE-EUTRA-CapabilityAddXDD-Mode-v1510 OPTIONAL, + nonCriticalExtension UE-EUTRA-Capability-v1520-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1520-IEs ::= SEQUENCE { + measParameters-v1520 MeasParameters-v1520, + nonCriticalExtension UE-EUTRA-Capability-v1530-IEs OPTIONAL +} + +UE-EUTRA-Capability-v1530-IEs ::= SEQUENCE { + measParameters-v1530 MeasParameters-v1530 OPTIONAL, + otherParameters-v1530 Other-Parameters-v1530 OPTIONAL, + neighCellSI-AcquisitionParameters-v1530 NeighCellSI-AcquisitionParameters-v1530 OPTIONAL, + mac-Parameters-v1530 MAC-Parameters-v1530 OPTIONAL, + phyLayerParameters-v1530 PhyLayerParameters-v1530 OPTIONAL, + rf-Parameters-v1530 RF-Parameters-v1530 OPTIONAL, + pdcp-Parameters-v1530 PDCP-Parameters-v1530 OPTIONAL, + ue-CategoryDL-v1530 INTEGER (22..26) OPTIONAL, + ue-BasedNetwPerfMeasParameters-v1530 UE-BasedNetwPerfMeasParameters-v1530 OPTIONAL, + rlc-Parameters-v1530 RLC-Parameters-v1530 OPTIONAL, + sl-Parameters-v1530 SL-Parameters-v1530 OPTIONAL, + extendedNumberOfDRBs-r15 ENUMERATED {supported} OPTIONAL, + reducedCP-Latency-r15 ENUMERATED {supported} OPTIONAL, + laa-Parameters-v1530 LAA-Parameters-v1530 OPTIONAL, + ue-CategoryUL-v1530 INTEGER (22..26) OPTIONAL, + fdd-Add-UE-EUTRA-Capabilities-v1530 UE-EUTRA-CapabilityAddXDD-Mode-v1530 OPTIONAL, + tdd-Add-UE-EUTRA-Capabilities-v1530 UE-EUTRA-CapabilityAddXDD-Mode-v1530 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +UE-EUTRA-CapabilityAddXDD-Mode-r9 ::= SEQUENCE { + phyLayerParameters-r9 PhyLayerParameters OPTIONAL, + featureGroupIndicators-r9 BIT STRING (SIZE (32)) OPTIONAL, + featureGroupIndRel9Add-r9 BIT STRING (SIZE (32)) OPTIONAL, + interRAT-ParametersGERAN-r9 IRAT-ParametersGERAN OPTIONAL, + interRAT-ParametersUTRA-r9 IRAT-ParametersUTRA-v920 OPTIONAL, + interRAT-ParametersCDMA2000-r9 IRAT-ParametersCDMA2000-1XRTT-v920 OPTIONAL, + neighCellSI-AcquisitionParameters-r9 NeighCellSI-AcquisitionParameters-r9 OPTIONAL, + ... +} + +UE-EUTRA-CapabilityAddXDD-Mode-v1060 ::= SEQUENCE { + phyLayerParameters-v1060 PhyLayerParameters-v1020 OPTIONAL, + featureGroupIndRel10-v1060 BIT STRING (SIZE (32)) OPTIONAL, + interRAT-ParametersCDMA2000-v1060 IRAT-ParametersCDMA2000-1XRTT-v1020 OPTIONAL, + interRAT-ParametersUTRA-TDD-v1060 IRAT-ParametersUTRA-TDD-v1020 OPTIONAL, + ..., + [[ otdoa-PositioningCapabilities-r10 OTDOA-PositioningCapabilities-r10 OPTIONAL + ]] +} + +UE-EUTRA-CapabilityAddXDD-Mode-v1130 ::= SEQUENCE { + phyLayerParameters-v1130 PhyLayerParameters-v1130 OPTIONAL, + measParameters-v1130 MeasParameters-v1130 OPTIONAL, + otherParameters-r11 Other-Parameters-r11 OPTIONAL, + ... +} + +UE-EUTRA-CapabilityAddXDD-Mode-v1180 ::= SEQUENCE { + mbms-Parameters-r11 MBMS-Parameters-r11 +} + +UE-EUTRA-CapabilityAddXDD-Mode-v1250 ::= SEQUENCE { + phyLayerParameters-v1250 PhyLayerParameters-v1250 OPTIONAL, + measParameters-v1250 MeasParameters-v1250 OPTIONAL +} + +UE-EUTRA-CapabilityAddXDD-Mode-v1310 ::= SEQUENCE { + phyLayerParameters-v1310 PhyLayerParameters-v1310 OPTIONAL +} + +UE-EUTRA-CapabilityAddXDD-Mode-v1320 ::= SEQUENCE { + phyLayerParameters-v1320 PhyLayerParameters-v1320 OPTIONAL, + scptm-Parameters-r13 SCPTM-Parameters-r13 OPTIONAL +} + +UE-EUTRA-CapabilityAddXDD-Mode-v1370 ::= SEQUENCE { + ce-Parameters-v1370 CE-Parameters-v1370 OPTIONAL +} + +UE-EUTRA-CapabilityAddXDD-Mode-v1380 ::= SEQUENCE { + ce-Parameters-v1380 CE-Parameters-v1380 +} + +UE-EUTRA-CapabilityAddXDD-Mode-v1430 ::= SEQUENCE { + phyLayerParameters-v1430 PhyLayerParameters-v1430 OPTIONAL, + mmtel-Parameters-r14 MMTEL-Parameters-r14 OPTIONAL +} + +UE-EUTRA-CapabilityAddXDD-Mode-v1510 ::= SEQUENCE { + pdcp-ParametersNR-r15 PDCP-ParametersNR-r15 OPTIONAL +} + +UE-EUTRA-CapabilityAddXDD-Mode-v1530 ::= SEQUENCE { + neighCellSI-AcquisitionParameters-v1530 NeighCellSI-AcquisitionParameters-v1530 OPTIONAL, + reducedCP-Latency-r15 ENUMERATED {supported} OPTIONAL +} + +AccessStratumRelease ::= ENUMERATED { + rel8, rel9, rel10, rel11, rel12, rel13, + rel14, rel15, ...} + +FeatureSetsEUTRA-r15 ::= SEQUENCE { + featureSetsDL-r15 SEQUENCE (SIZE (1..maxFeatureSets-r15)) OF FeatureSetDL-r15 OPTIONAL, + featureSetsDL-PerCC-r15 SEQUENCE (SIZE (1..maxPerCC-FeatureSets-r15)) OF FeatureSetDL-PerCC-r15 OPTIONAL, + featureSetsUL-r15 SEQUENCE (SIZE (1..maxFeatureSets-r15)) OF FeatureSetUL-r15 OPTIONAL, + featureSetsUL-PerCC-r15 SEQUENCE (SIZE (1..maxPerCC-FeatureSets-r15)) OF FeatureSetUL-PerCC-r15 OPTIONAL, + ... +} + +MobilityParameters-r14 ::= SEQUENCE { + makeBeforeBreak-r14 ENUMERATED {supported} OPTIONAL, + rach-Less-r14 ENUMERATED {supported} OPTIONAL +} + +DC-Parameters-r12 ::= SEQUENCE { + drb-TypeSplit-r12 ENUMERATED {supported} OPTIONAL, + drb-TypeSCG-r12 ENUMERATED {supported} OPTIONAL +} + +DC-Parameters-v1310 ::= SEQUENCE { + pdcp-TransferSplitUL-r13 ENUMERATED {supported} OPTIONAL, + ue-SSTD-Meas-r13 ENUMERATED {supported} OPTIONAL +} + +MAC-Parameters-r12 ::= SEQUENCE { + logicalChannelSR-ProhibitTimer-r12 ENUMERATED {supported} OPTIONAL, + longDRX-Command-r12 ENUMERATED {supported} OPTIONAL +} + +MAC-Parameters-v1310 ::= SEQUENCE { + extendedMAC-LengthField-r13 ENUMERATED {supported} OPTIONAL, + extendedLongDRX-r13 ENUMERATED {supported} OPTIONAL +} + +MAC-Parameters-v1430 ::= SEQUENCE { + shortSPS-IntervalFDD-r14 ENUMERATED {supported} OPTIONAL, + shortSPS-IntervalTDD-r14 ENUMERATED {supported} OPTIONAL, + skipUplinkDynamic-r14 ENUMERATED {supported} OPTIONAL, + skipUplinkSPS-r14 ENUMERATED {supported} OPTIONAL, + multipleUplinkSPS-r14 ENUMERATED {supported} OPTIONAL, + dataInactMon-r14 ENUMERATED {supported} OPTIONAL +} + +MAC-Parameters-v1440 ::= SEQUENCE { + rai-Support-r14 ENUMERATED {supported} OPTIONAL +} + +MAC-Parameters-v1530 ::= SEQUENCE { + min-Proc-TimelineSubslot-r15 SEQUENCE (SIZE(1..3)) OF ProcessingTimelineSet-r15 OPTIONAL, + skipSubframeProcessing-r15 SkipSubframeProcessing-r15 OPTIONAL, + earlyData-UP-r15 ENUMERATED {supported} OPTIONAL, + dormantSCellState-r15 ENUMERATED {supported} OPTIONAL, + directSCellActivation-r15 ENUMERATED {supported} OPTIONAL, + directSCellHibernation-r15 ENUMERATED {supported} OPTIONAL, + extendedLCID-Duplication-r15 ENUMERATED {supported} OPTIONAL, + sps-ServingCell-r15 ENUMERATED {supported} OPTIONAL +} + +ProcessingTimelineSet-r15 ::= ENUMERATED {set1, set2} + +RLC-Parameters-r12 ::= SEQUENCE { + extended-RLC-LI-Field-r12 ENUMERATED {supported} +} + +RLC-Parameters-v1310 ::= SEQUENCE { + extendedRLC-SN-SO-Field-r13 ENUMERATED {supported} OPTIONAL +} + +RLC-Parameters-v1430 ::= SEQUENCE { + extendedPollByte-r14 ENUMERATED {supported} OPTIONAL +} + +RLC-Parameters-v1530 ::= SEQUENCE { + flexibleUM-AM-Combinations-r15 ENUMERATED {supported} OPTIONAL, + rlc-AM-Ooo-Delivery-r15 ENUMERATED {supported} OPTIONAL, + rlc-UM-Ooo-Delivery-r15 ENUMERATED {supported} OPTIONAL +} + +PDCP-Parameters ::= SEQUENCE { + supportedROHC-Profiles ROHC-ProfileSupportList-r15, + maxNumberROHC-ContextSessions ENUMERATED { + cs2, cs4, cs8, cs12, cs16, cs24, cs32, + cs48, cs64, cs128, cs256, cs512, cs1024, + cs16384, spare2, spare1} DEFAULT cs16, + ... +} + +PDCP-Parameters-v1130 ::= SEQUENCE { + pdcp-SN-Extension-r11 ENUMERATED {supported} OPTIONAL, + supportRohcContextContinue-r11 ENUMERATED {supported} OPTIONAL +} + +PDCP-Parameters-v1310 ::= SEQUENCE { + pdcp-SN-Extension-18bits-r13 ENUMERATED {supported} OPTIONAL +} + +PDCP-Parameters-v1430 ::= SEQUENCE { + supportedUplinkOnlyROHC-Profiles-r14 SEQUENCE { + profile0x0006-r14 BOOLEAN + }, + maxNumberROHC-ContextSessions-r14 ENUMERATED { + cs2, cs4, cs8, cs12, cs16, cs24, cs32, + cs48, cs64, cs128, cs256, cs512, cs1024, + cs16384, spare2, spare1} DEFAULT cs16 +} + +PDCP-Parameters-v1530 ::= SEQUENCE { + supportedUDC-r15 SupportedUDC-r15 OPTIONAL, + pdcp-Duplication-r15 ENUMERATED {supported} OPTIONAL +} + +SupportedUDC-r15 ::= SEQUENCE { + supportedStandardDic-r15 ENUMERATED {supported} OPTIONAL, + supportedOperatorDic-r15 SupportedOperatorDic-r15 OPTIONAL +} + +SupportedOperatorDic-r15 ::= SEQUENCE { + versionOfDictionary-r15 INTEGER (0..15), + associatedPLMN-ID-r15 PLMN-Identity +} + +PhyLayerParameters ::= SEQUENCE { + ue-TxAntennaSelectionSupported BOOLEAN, + ue-SpecificRefSigsSupported BOOLEAN +} + +PhyLayerParameters-v920 ::= SEQUENCE { + enhancedDualLayerFDD-r9 ENUMERATED {supported} OPTIONAL, + enhancedDualLayerTDD-r9 ENUMERATED {supported} OPTIONAL +} + +PhyLayerParameters-v9d0 ::= SEQUENCE { + tm5-FDD-r9 ENUMERATED {supported} OPTIONAL, + tm5-TDD-r9 ENUMERATED {supported} OPTIONAL +} + +PhyLayerParameters-v1020 ::= SEQUENCE { + twoAntennaPortsForPUCCH-r10 ENUMERATED {supported} OPTIONAL, + tm9-With-8Tx-FDD-r10 ENUMERATED {supported} OPTIONAL, + pmi-Disabling-r10 ENUMERATED {supported} OPTIONAL, + crossCarrierScheduling-r10 ENUMERATED {supported} OPTIONAL, + simultaneousPUCCH-PUSCH-r10 ENUMERATED {supported} OPTIONAL, + multiClusterPUSCH-WithinCC-r10 ENUMERATED {supported} OPTIONAL, + nonContiguousUL-RA-WithinCC-List-r10 NonContiguousUL-RA-WithinCC-List-r10 OPTIONAL +} + +PhyLayerParameters-v1130 ::= SEQUENCE { + crs-InterfHandl-r11 ENUMERATED {supported} OPTIONAL, + ePDCCH-r11 ENUMERATED {supported} OPTIONAL, + multiACK-CSI-Reporting-r11 ENUMERATED {supported} OPTIONAL, + ss-CCH-InterfHandl-r11 ENUMERATED {supported} OPTIONAL, + tdd-SpecialSubframe-r11 ENUMERATED {supported} OPTIONAL, + txDiv-PUCCH1b-ChSelect-r11 ENUMERATED {supported} OPTIONAL, + ul-CoMP-r11 ENUMERATED {supported} OPTIONAL +} + +PhyLayerParameters-v1170 ::= SEQUENCE { + interBandTDD-CA-WithDifferentConfig-r11 BIT STRING (SIZE (2)) OPTIONAL +} + +PhyLayerParameters-v1250 ::= SEQUENCE { + e-HARQ-Pattern-FDD-r12 ENUMERATED {supported} OPTIONAL, + enhanced-4TxCodebook-r12 ENUMERATED {supported} OPTIONAL, + tdd-FDD-CA-PCellDuplex-r12 BIT STRING (SIZE (2)) OPTIONAL, + phy-TDD-ReConfig-TDD-PCell-r12 ENUMERATED {supported} OPTIONAL, + phy-TDD-ReConfig-FDD-PCell-r12 ENUMERATED {supported} OPTIONAL, + pusch-FeedbackMode-r12 ENUMERATED {supported} OPTIONAL, + pusch-SRS-PowerControl-SubframeSet-r12 ENUMERATED {supported} OPTIONAL, + csi-SubframeSet-r12 ENUMERATED {supported} OPTIONAL, + noResourceRestrictionForTTIBundling-r12 ENUMERATED {supported} OPTIONAL, + discoverySignalsInDeactSCell-r12 ENUMERATED {supported} OPTIONAL, + naics-Capability-List-r12 NAICS-Capability-List-r12 OPTIONAL +} + +PhyLayerParameters-v1280 ::= SEQUENCE { + alternativeTBS-Indices-r12 ENUMERATED {supported} OPTIONAL +} + +PhyLayerParameters-v1310 ::= SEQUENCE { + aperiodicCSI-Reporting-r13 BIT STRING (SIZE (2)) OPTIONAL, + codebook-HARQ-ACK-r13 BIT STRING (SIZE (2)) OPTIONAL, + crossCarrierScheduling-B5C-r13 ENUMERATED {supported} OPTIONAL, + fdd-HARQ-TimingTDD-r13 ENUMERATED {supported} OPTIONAL, + maxNumberUpdatedCSI-Proc-r13 INTEGER(5..32) OPTIONAL, + pucch-Format4-r13 ENUMERATED {supported} OPTIONAL, + pucch-Format5-r13 ENUMERATED {supported} OPTIONAL, + pucch-SCell-r13 ENUMERATED {supported} OPTIONAL, + spatialBundling-HARQ-ACK-r13 ENUMERATED {supported} OPTIONAL, + supportedBlindDecoding-r13 SEQUENCE { + maxNumberDecoding-r13 INTEGER(1..32) OPTIONAL, + pdcch-CandidateReductions-r13 ENUMERATED {supported} OPTIONAL, + skipMonitoringDCI-Format0-1A-r13 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + uci-PUSCH-Ext-r13 ENUMERATED {supported} OPTIONAL, + crs-InterfMitigationTM10-r13 ENUMERATED {supported} OPTIONAL, + pdsch-CollisionHandling-r13 ENUMERATED {supported} OPTIONAL +} + +PhyLayerParameters-v1320 ::= SEQUENCE { + mimo-UE-Parameters-r13 MIMO-UE-Parameters-r13 OPTIONAL +} + +PhyLayerParameters-v1330 ::= SEQUENCE { + cch-InterfMitigation-RefRecTypeA-r13 ENUMERATED {supported} OPTIONAL, + cch-InterfMitigation-RefRecTypeB-r13 ENUMERATED {supported} OPTIONAL, + cch-InterfMitigation-MaxNumCCs-r13 INTEGER (1.. maxServCell-r13) OPTIONAL, + crs-InterfMitigationTM1toTM9-r13 INTEGER (1.. maxServCell-r13) OPTIONAL +} + +PhyLayerParameters-v1430 ::= SEQUENCE { + ce-PUSCH-NB-MaxTBS-r14 ENUMERATED {supported} OPTIONAL, + ce-PDSCH-PUSCH-MaxBandwidth-r14 ENUMERATED {bw5, bw20} OPTIONAL, + ce-HARQ-AckBundling-r14 ENUMERATED {supported} OPTIONAL, + ce-PDSCH-TenProcesses-r14 ENUMERATED {supported} OPTIONAL, + ce-RetuningSymbols-r14 ENUMERATED {n0, n1} OPTIONAL, + ce-PDSCH-PUSCH-Enhancement-r14 ENUMERATED {supported} OPTIONAL, + ce-SchedulingEnhancement-r14 ENUMERATED {supported} OPTIONAL, + ce-SRS-Enhancement-r14 ENUMERATED {supported} OPTIONAL, + ce-PUCCH-Enhancement-r14 ENUMERATED {supported} OPTIONAL, + ce-ClosedLoopTxAntennaSelection-r14 ENUMERATED {supported} OPTIONAL, + tdd-SpecialSubframe-r14 ENUMERATED {supported} OPTIONAL, + tdd-TTI-Bundling-r14 ENUMERATED {supported} OPTIONAL, + dmrs-LessUpPTS-r14 ENUMERATED {supported} OPTIONAL, + mimo-UE-Parameters-v1430 MIMO-UE-Parameters-v1430 OPTIONAL, + alternativeTBS-Index-r14 ENUMERATED {supported} OPTIONAL, + feMBMS-Unicast-Parameters-r14 FeMBMS-Unicast-Parameters-r14 OPTIONAL +} + +PhyLayerParameters-v1450 ::= SEQUENCE { + ce-SRS-EnhancementWithoutComb4-r14 ENUMERATED {supported} OPTIONAL, + crs-LessDwPTS-r14 ENUMERATED {supported} OPTIONAL} + +PhyLayerParameters-v1470 ::= SEQUENCE { + mimo-UE-Parameters-v1470 MIMO-UE-Parameters-v1470 OPTIONAL, + srs-UpPTS-6sym-r14 ENUMERATED {supported} OPTIONAL +} + +PhyLayerParameters-v1530 ::= SEQUENCE { + stti-SPT-Capabilities-r15 SEQUENCE { + aperiodicCsi-ReportingSTTI-r15 ENUMERATED {supported} OPTIONAL, + dmrs-BasedSPDCCH-MBSFN-r15 ENUMERATED {supported} OPTIONAL, + dmrs-BasedSPDCCH-nonMBSFN-r15 ENUMERATED {supported} OPTIONAL, + dmrs-PositionPattern-r15 ENUMERATED {supported} OPTIONAL, + dmrs-SharingSubslotPDSCH-r15 ENUMERATED {supported} OPTIONAL, + dmrs-RepetitionSubslotPDSCH-r15 ENUMERATED {supported} OPTIONAL, + epdcch-SPT-differentCells-r15 ENUMERATED {supported} OPTIONAL, + epdcch-STTI-differentCells-r15 ENUMERATED {supported} OPTIONAL, + maxLayersSlotOrSubslotPUSCH-r15 ENUMERATED {oneLayer,twoLayers,fourLayers} + OPTIONAL, + maxNumberUpdatedCSI-Proc-SPT-r15 INTEGER(5..32) OPTIONAL, + maxNumberUpdatedCSI-Proc-STTI-Comb77-r15 INTEGER(1..32) OPTIONAL, + maxNumberUpdatedCSI-Proc-STTI-Comb27-r15 INTEGER(1..32) OPTIONAL, + maxNumberUpdatedCSI-Proc-STTI-Comb22-Set1-r15 INTEGER(1..32) OPTIONAL, + maxNumberUpdatedCSI-Proc-STTI-Comb22-Set2-r15 INTEGER(1..32) OPTIONAL, + mimo-UE-ParametersSTTI-r15 MIMO-UE-Parameters-r13 OPTIONAL, + mimo-UE-ParametersSTTI-v1530 MIMO-UE-Parameters-v1430 OPTIONAL, + numberOfBlindDecodesUSS-r15 INTEGER(4..32) OPTIONAL, + pdsch-SlotSubslotPDSCH-Decoding-r15 ENUMERATED {supported} OPTIONAL, + powerUCI-SlotPUSCH ENUMERATED {supported} OPTIONAL, + powerUCI-SubslotPUSCH ENUMERATED {supported} OPTIONAL, + slotPDSCH-TxDiv-TM9and10 ENUMERATED {supported} OPTIONAL, + subslotPDSCH-TxDiv-TM9and10 ENUMERATED {supported} OPTIONAL, + spdcch-differentRS-types-r15 ENUMERATED {supported} OPTIONAL, + srs-DCI7-TriggeringFS2-r15 ENUMERATED {supported} OPTIONAL, + sps-cyclicShift-r15 ENUMERATED {supported} OPTIONAL, + spdcch-Reuse-r15 ENUMERATED {supported} OPTIONAL, + sps-STTI-r15 ENUMERATED {slot, subslot, slotAndSubslot} + OPTIONAL, + tm8-slotPDSCH-r15 ENUMERATED {supported} OPTIONAL, + tm9-slotSubslot-r15 ENUMERATED {supported} OPTIONAL, + tm9-slotSubslotMBSFN-r15 ENUMERATED {supported} OPTIONAL, + tm10-slotSubslot-r15 ENUMERATED {supported} OPTIONAL, + tm10-slotSubslotMBSFN-r15 ENUMERATED {supported} OPTIONAL, + txDiv-SPUCCH-r15 ENUMERATED {supported} OPTIONAL, + ul-AsyncHarqSharingDiff-TTI-Lengths-r15 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + ce-Capabilities-r15 SEQUENCE { + ce-CRS-IntfMitig-r15 ENUMERATED {supported} OPTIONAL, + ce-CQI-AlternativeTable-r15 ENUMERATED {supported} OPTIONAL, + ce-PDSCH-FlexibleStartPRB-CE-ModeA-r15 ENUMERATED {supported} OPTIONAL, + ce-PDSCH-FlexibleStartPRB-CE-ModeB-r15 ENUMERATED {supported} OPTIONAL, + ce-PDSCH-64QAM-r15 ENUMERATED {supported} OPTIONAL, + ce-PUSCH-FlexibleStartPRB-CE-ModeA-r15 ENUMERATED {supported} OPTIONAL, + ce-PUSCH-FlexibleStartPRB-CE-ModeB-r15 ENUMERATED {supported} OPTIONAL, + ce-PUSCH-SubPRB-Allocation-r15 ENUMERATED {supported} OPTIONAL, + ce-UL-HARQ-ACK-Feedback-r15 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + shortCQI-ForSCellActivation-r15 ENUMERATED {supported} OPTIONAL, + mimo-CBSR-AdvancedCSI-r15 ENUMERATED {supported} OPTIONAL, + crs-IntfMitig-r15 ENUMERATED {supported} OPTIONAL, + ul-PowerControlEnhancements-r15 ENUMERATED {supported} OPTIONAL, + urllc-Capabilities-r15 SEQUENCE { + pdsch-RepSubframe-r15 ENUMERATED {supported} OPTIONAL, + pdsch-RepSlot-r15 ENUMERATED {supported} OPTIONAL, + pdsch-RepSubslot-r15 ENUMERATED {supported} OPTIONAL, + pusch-SPS-MultiConfigSubframe-r15 INTEGER (0..6) OPTIONAL, + pusch-SPS-MaxConfigSubframe-r15 INTEGER (0..31) OPTIONAL, + pusch-SPS-MultiConfigSlot-r15 INTEGER (0..6) OPTIONAL, + pusch-SPS-MaxConfigSlot-r15 INTEGER (0..31) OPTIONAL, + pusch-SPS-MultiConfigSubslot-r15 INTEGER (0..6) OPTIONAL, + pusch-SPS-MaxConfigSubslot-r15 INTEGER (0..31) OPTIONAL, + pusch-SPS-SlotRepPCell-r15 ENUMERATED {supported} OPTIONAL, + pusch-SPS-SlotRepPSCell-r15 ENUMERATED {supported} OPTIONAL, + pusch-SPS-SlotRepSCell-r15 ENUMERATED {supported} OPTIONAL, + pusch-SPS-SubframeRepPCell-r15 ENUMERATED {supported} OPTIONAL, + pusch-SPS-SubframeRepPSCell-r15 ENUMERATED {supported} OPTIONAL, + pusch-SPS-SubframeRepSCell-r15 ENUMERATED {supported} OPTIONAL, + pusch-SPS-SubslotRepPCell-r15 ENUMERATED {supported} OPTIONAL, + pusch-SPS-SubslotRepPSCell-r15 ENUMERATED {supported} OPTIONAL, + pusch-SPS-SubslotRepSCell-r15 ENUMERATED {supported} OPTIONAL, + semiStaticCFI-r15 ENUMERATED {supported} OPTIONAL, + semiStaticCFI-Pattern-r15 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + altMCS-Table-r15 ENUMERATED {supported} OPTIONAL +} + +MIMO-UE-Parameters-r13 ::= SEQUENCE { + parametersTM9-r13 MIMO-UE-ParametersPerTM-r13 OPTIONAL, + parametersTM10-r13 MIMO-UE-ParametersPerTM-r13 OPTIONAL, + srs-EnhancementsTDD-r13 ENUMERATED {supported} OPTIONAL, + srs-Enhancements-r13 ENUMERATED {supported} OPTIONAL, + interferenceMeasRestriction-r13 ENUMERATED {supported} OPTIONAL +} + +MIMO-UE-Parameters-v1430 ::= SEQUENCE { + parametersTM9-v1430 MIMO-UE-ParametersPerTM-v1430 OPTIONAL, + parametersTM10-v1430 MIMO-UE-ParametersPerTM-v1430 OPTIONAL +} + +MIMO-UE-Parameters-v1470 ::= SEQUENCE { + parametersTM9-v1470 MIMO-UE-ParametersPerTM-v1470, + parametersTM10-v1470 MIMO-UE-ParametersPerTM-v1470 +} + +MIMO-UE-ParametersPerTM-r13 ::= SEQUENCE { + nonPrecoded-r13 MIMO-NonPrecodedCapabilities-r13 OPTIONAL, + beamformed-r13 MIMO-UE-BeamformedCapabilities-r13 OPTIONAL, + channelMeasRestriction-r13 ENUMERATED {supported} OPTIONAL, + dmrs-Enhancements-r13 ENUMERATED {supported} OPTIONAL, + csi-RS-EnhancementsTDD-r13 ENUMERATED {supported} OPTIONAL +} + +MIMO-UE-ParametersPerTM-v1430 ::= SEQUENCE { + nzp-CSI-RS-AperiodicInfo-r14 SEQUENCE { + nMaxProc-r14 INTEGER(5..32), + nMaxResource-r14 ENUMERATED {ffs1, ffs2, ffs3, ffs4} + } OPTIONAL, + nzp-CSI-RS-PeriodicInfo-r14 SEQUENCE { + nMaxResource-r14 ENUMERATED {ffs1, ffs2, ffs3, ffs4} + } OPTIONAL, + zp-CSI-RS-AperiodicInfo-r14 ENUMERATED {supported} OPTIONAL, + ul-dmrs-Enhancements-r14 ENUMERATED {supported} OPTIONAL, + densityReductionNP-r14 ENUMERATED {supported} OPTIONAL, + densityReductionBF-r14 ENUMERATED {supported} OPTIONAL, + hybridCSI-r14 ENUMERATED {supported} OPTIONAL, + semiOL-r14 ENUMERATED {supported} OPTIONAL, + csi-ReportingNP-r14 ENUMERATED {supported} OPTIONAL, + csi-ReportingAdvanced-r14 ENUMERATED {supported} OPTIONAL +} + +MIMO-UE-ParametersPerTM-v1470 ::= SEQUENCE { + csi-ReportingAdvancedMaxPorts-r14 ENUMERATED {n8, n12, n16, n20, n24, n28} OPTIONAL +} + +MIMO-CA-ParametersPerBoBC-r13 ::= SEQUENCE { + parametersTM9-r13 MIMO-CA-ParametersPerBoBCPerTM-r13 OPTIONAL, + parametersTM10-r13 MIMO-CA-ParametersPerBoBCPerTM-r13 OPTIONAL +} + +MIMO-CA-ParametersPerBoBC-r15 ::= SEQUENCE { + parametersTM9-r15 MIMO-CA-ParametersPerBoBCPerTM-r15 OPTIONAL, + parametersTM10-r15 MIMO-CA-ParametersPerBoBCPerTM-r15 OPTIONAL +} + +MIMO-CA-ParametersPerBoBC-v1430 ::= SEQUENCE { + parametersTM9-v1430 MIMO-CA-ParametersPerBoBCPerTM-v1430 OPTIONAL, + parametersTM10-v1430 MIMO-CA-ParametersPerBoBCPerTM-v1430 OPTIONAL +} + +MIMO-CA-ParametersPerBoBC-v1470 ::= SEQUENCE { + parametersTM9-v1470 MIMO-CA-ParametersPerBoBCPerTM-v1470 , + parametersTM10-v1470 MIMO-CA-ParametersPerBoBCPerTM-v1470 +} + +MIMO-CA-ParametersPerBoBCPerTM-r13 ::= SEQUENCE { + nonPrecoded-r13 MIMO-NonPrecodedCapabilities-r13 OPTIONAL, + beamformed-r13 MIMO-BeamformedCapabilityList-r13 OPTIONAL, + dmrs-Enhancements-r13 ENUMERATED {different} OPTIONAL +} + +MIMO-CA-ParametersPerBoBCPerTM-v1430 ::= SEQUENCE { + csi-ReportingNP-r14 ENUMERATED {different} OPTIONAL, + csi-ReportingAdvanced-r14 ENUMERATED {different} OPTIONAL +} + +MIMO-CA-ParametersPerBoBCPerTM-v1470 ::= SEQUENCE { + csi-ReportingAdvancedMaxPorts-r14 ENUMERATED {n8, n12, n16, n20, n24, n28} OPTIONAL +} + +MIMO-CA-ParametersPerBoBCPerTM-r15 ::= SEQUENCE { + nonPrecoded-r13 MIMO-NonPrecodedCapabilities-r13 OPTIONAL, + beamformed-r13 MIMO-BeamformedCapabilityList-r13 OPTIONAL, + dmrs-Enhancements-r13 ENUMERATED {different} OPTIONAL, + csi-ReportingNP-r14 ENUMERATED {different} OPTIONAL, + csi-ReportingAdvanced-r14 ENUMERATED {different} OPTIONAL +} + +MIMO-NonPrecodedCapabilities-r13 ::= SEQUENCE { + config1-r13 ENUMERATED {supported} OPTIONAL, + config2-r13 ENUMERATED {supported} OPTIONAL, + config3-r13 ENUMERATED {supported} OPTIONAL, + config4-r13 ENUMERATED {supported} OPTIONAL +} + +MIMO-UE-BeamformedCapabilities-r13 ::= SEQUENCE { + altCodebook-r13 ENUMERATED {supported} OPTIONAL, + mimo-BeamformedCapabilities-r13 MIMO-BeamformedCapabilityList-r13 +} + +MIMO-BeamformedCapabilityList-r13 ::= SEQUENCE (SIZE (1..maxCSI-Proc-r11)) OF MIMO-BeamformedCapabilities-r13 + +MIMO-BeamformedCapabilities-r13 ::= SEQUENCE { + k-Max-r13 INTEGER (1..8), + n-MaxList-r13 BIT STRING (SIZE (1..7)) OPTIONAL + } + +NonContiguousUL-RA-WithinCC-List-r10 ::= SEQUENCE (SIZE (1..maxBands)) OF NonContiguousUL-RA-WithinCC-r10 + +NonContiguousUL-RA-WithinCC-r10 ::= SEQUENCE { + nonContiguousUL-RA-WithinCC-Info-r10 ENUMERATED {supported} OPTIONAL +} + +RF-Parameters ::= SEQUENCE { + supportedBandListEUTRA SupportedBandListEUTRA +} + +RF-Parameters-v9e0 ::= SEQUENCE { + supportedBandListEUTRA-v9e0 SupportedBandListEUTRA-v9e0 OPTIONAL +} + +RF-Parameters-v1020 ::= SEQUENCE { + supportedBandCombination-r10 SupportedBandCombination-r10 +} + +RF-Parameters-v1060 ::= SEQUENCE { + supportedBandCombinationExt-r10 SupportedBandCombinationExt-r10 +} + +RF-Parameters-v1090 ::= SEQUENCE { + supportedBandCombination-v1090 SupportedBandCombination-v1090 OPTIONAL +} + +RF-Parameters-v10f0 ::= SEQUENCE { + modifiedMPR-Behavior-r10 BIT STRING (SIZE (32)) OPTIONAL +} + +RF-Parameters-v10i0 ::= SEQUENCE { + supportedBandCombination-v10i0 SupportedBandCombination-v10i0 OPTIONAL +} + +RF-Parameters-v10j0 ::= SEQUENCE { + multiNS-Pmax-r10 ENUMERATED {supported} OPTIONAL +} + +RF-Parameters-v1130 ::= SEQUENCE { + supportedBandCombination-v1130 SupportedBandCombination-v1130 OPTIONAL +} + +RF-Parameters-v1180 ::= SEQUENCE { + freqBandRetrieval-r11 ENUMERATED {supported} OPTIONAL, + requestedBands-r11 SEQUENCE (SIZE (1.. maxBands)) OF FreqBandIndicator-r11 OPTIONAL, + supportedBandCombinationAdd-r11 SupportedBandCombinationAdd-r11 OPTIONAL +} + +RF-Parameters-v11d0 ::= SEQUENCE { + supportedBandCombinationAdd-v11d0 SupportedBandCombinationAdd-v11d0 OPTIONAL +} + +RF-Parameters-v1250 ::= SEQUENCE { + supportedBandListEUTRA-v1250 SupportedBandListEUTRA-v1250 OPTIONAL, + supportedBandCombination-v1250 SupportedBandCombination-v1250 OPTIONAL, + supportedBandCombinationAdd-v1250 SupportedBandCombinationAdd-v1250 OPTIONAL, + freqBandPriorityAdjustment-r12 ENUMERATED {supported} OPTIONAL +} + +RF-Parameters-v1270 ::= SEQUENCE { + supportedBandCombination-v1270 SupportedBandCombination-v1270 OPTIONAL, + supportedBandCombinationAdd-v1270 SupportedBandCombinationAdd-v1270 OPTIONAL +} + +RF-Parameters-v1310 ::= SEQUENCE { + eNB-RequestedParameters-r13 SEQUENCE { + reducedIntNonContCombRequested-r13 ENUMERATED {true} OPTIONAL, + requestedCCsDL-r13 INTEGER (2..32) OPTIONAL, + requestedCCsUL-r13 INTEGER (2..32) OPTIONAL, + skipFallbackCombRequested-r13 ENUMERATED {true} OPTIONAL + } OPTIONAL, + maximumCCsRetrieval-r13 ENUMERATED {supported} OPTIONAL, + skipFallbackCombinations-r13 ENUMERATED {supported} OPTIONAL, + reducedIntNonContComb-r13 ENUMERATED {supported} OPTIONAL, + supportedBandListEUTRA-v1310 SupportedBandListEUTRA-v1310 OPTIONAL, + supportedBandCombinationReduced-r13 SupportedBandCombinationReduced-r13 OPTIONAL +} + +RF-Parameters-v1320 ::= SEQUENCE { + supportedBandListEUTRA-v1320 SupportedBandListEUTRA-v1320 OPTIONAL, + supportedBandCombination-v1320 SupportedBandCombination-v1320 OPTIONAL, + supportedBandCombinationAdd-v1320 SupportedBandCombinationAdd-v1320 OPTIONAL, + supportedBandCombinationReduced-v1320 SupportedBandCombinationReduced-v1320 OPTIONAL +} + +RF-Parameters-v1380 ::= SEQUENCE { + supportedBandCombination-v1380 SupportedBandCombination-v1380 OPTIONAL, + supportedBandCombinationAdd-v1380 SupportedBandCombinationAdd-v1380 OPTIONAL, + supportedBandCombinationReduced-v1380 SupportedBandCombinationReduced-v1380 OPTIONAL +} + +RF-Parameters-v1390 ::= SEQUENCE { + supportedBandCombination-v1390 SupportedBandCombination-v1390 OPTIONAL, + supportedBandCombinationAdd-v1390 SupportedBandCombinationAdd-v1390 OPTIONAL, + supportedBandCombinationReduced-v1390 SupportedBandCombinationReduced-v1390 OPTIONAL +} + +RF-Parameters-v12b0 ::= SEQUENCE { + maxLayersMIMO-Indication-r12 ENUMERATED {supported} OPTIONAL +} + +RF-Parameters-v1430 ::= SEQUENCE { + supportedBandCombination-v1430 SupportedBandCombination-v1430 OPTIONAL, + supportedBandCombinationAdd-v1430 SupportedBandCombinationAdd-v1430 OPTIONAL, + supportedBandCombinationReduced-v1430 SupportedBandCombinationReduced-v1430 OPTIONAL, + eNB-RequestedParameters-v1430 SEQUENCE { + requestedDiffFallbackCombList-r14 BandCombinationList-r14 + } OPTIONAL, + diffFallbackCombReport-r14 ENUMERATED {supported} OPTIONAL +} + +RF-Parameters-v1450 ::= SEQUENCE { + supportedBandCombination-v1450 SupportedBandCombination-v1450 OPTIONAL, + supportedBandCombinationAdd-v1450 SupportedBandCombinationAdd-v1450 OPTIONAL, + supportedBandCombinationReduced-v1450 SupportedBandCombinationReduced-v1450 OPTIONAL +} + +RF-Parameters-v1470 ::= SEQUENCE { + supportedBandCombination-v1470 SupportedBandCombination-v1470 OPTIONAL, + supportedBandCombinationAdd-v1470 SupportedBandCombinationAdd-v1470 OPTIONAL, + supportedBandCombinationReduced-v1470 SupportedBandCombinationReduced-v1470 OPTIONAL +} + +RF-Parameters-v1530 ::= SEQUENCE { + sTTI-SPT-Supported-r15 ENUMERATED {supported} OPTIONAL, + supportedBandCombination-v1530 SupportedBandCombination-v1530 OPTIONAL, + supportedBandCombinationAdd-v1530 SupportedBandCombinationAdd-v1530 OPTIONAL, + supportedBandCombinationReduced-v1530 SupportedBandCombinationReduced-v1530 OPTIONAL, + powerClass-14dBm-r15 ENUMERATED {supported} OPTIONAL +} + +SkipSubframeProcessing-r15 ::= SEQUENCE { + skipProcessingDL-Slot-r15 INTEGER (0..3) OPTIONAL, + skipProcessingDL-SubSlot-r15 INTEGER (0..3) OPTIONAL, + skipProcessingUL-Slot-r15 INTEGER (0..3) OPTIONAL, + skipProcessingUL-SubSlot-r15 INTEGER (0..3) OPTIONAL +} + +SPT-Parameters-r15 ::= SEQUENCE { + frameStructureType-SPT-r15 BIT STRING (SIZE (3)) OPTIONAL, + maxNumberCCs-SPT-r15 INTEGER (1..32) OPTIONAL +} + +STTI-SPT-BandParameters-r15 ::= SEQUENCE { + dl-1024QAM-Slot-r15 ENUMERATED {supported} OPTIONAL, + dl-1024QAM-SubslotTA-1-r15 ENUMERATED {supported} OPTIONAL, + dl-1024QAM-SubslotTA-2-r15 ENUMERATED {supported} OPTIONAL, + simultaneousTx-differentTx-duration-r15 ENUMERATED {supported} OPTIONAL, + sTTI-CA-MIMO-ParametersDL-r15 CA-MIMO-ParametersDL-r15 OPTIONAL, + sTTI-CA-MIMO-ParametersUL-r15 CA-MIMO-ParametersUL-r15, + sTTI-FD-MIMO-Coexistence ENUMERATED {supported} OPTIONAL, + sTTI-MIMO-CA-ParametersPerBoBCs-r15 MIMO-CA-ParametersPerBoBC-r13 OPTIONAL, + sTTI-MIMO-CA-ParametersPerBoBCs-v1530 MIMO-CA-ParametersPerBoBC-v1430 OPTIONAL, + sTTI-SupportedCombinations-r15 STTI-SupportedCombinations-r15 OPTIONAL, + sTTI-SupportedCSI-Proc-r15 ENUMERATED {n1, n3, n4} OPTIONAL, + ul-256QAM-Slot-r15 ENUMERATED {supported} OPTIONAL, + ul-256QAM-Subslot-r15 ENUMERATED {supported} OPTIONAL, + ... +} + +STTI-SupportedCombinations-r15 ::= SEQUENCE { + combination-22-r15 DL-UL-CCs-r15 OPTIONAL, + combination-77-r15 DL-UL-CCs-r15 OPTIONAL, + combination-27-r15 DL-UL-CCs-r15 OPTIONAL, + combination-22-27-r15 SEQUENCE (SIZE (1..2)) OF DL-UL-CCs-r15 OPTIONAL, + combination-77-22-r15 SEQUENCE (SIZE (1..2)) OF DL-UL-CCs-r15 OPTIONAL, + combination-77-27-r15 SEQUENCE (SIZE (1..2)) OF DL-UL-CCs-r15 OPTIONAL +} + +DL-UL-CCs-r15 ::= SEQUENCE { + maxNumberDL-CCs-r15 INTEGER (1..32) OPTIONAL, + maxNumberUL-CCs-r15 INTEGER (1..32) OPTIONAL +} + +SupportedBandCombination-r10 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-r10 + +SupportedBandCombinationExt-r10 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParametersExt-r10 + +SupportedBandCombination-v1090 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1090 + +SupportedBandCombination-v10i0 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v10i0 + +SupportedBandCombination-v1130 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1130 + +SupportedBandCombination-v1250 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1250 + +SupportedBandCombination-v1270 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1270 + +SupportedBandCombination-v1320 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1320 + +SupportedBandCombination-v1380 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1380 + +SupportedBandCombination-v1390 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1390 + +SupportedBandCombination-v1430 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1430 + +SupportedBandCombination-v1450 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1450 + +SupportedBandCombination-v1470 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1470 + +SupportedBandCombination-v1530 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandCombinationParameters-v1530 + +SupportedBandCombinationAdd-r11 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-r11 + +SupportedBandCombinationAdd-v11d0 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-v10i0 + +SupportedBandCombinationAdd-v1250 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-v1250 + +SupportedBandCombinationAdd-v1270 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-v1270 + +SupportedBandCombinationAdd-v1320 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-v1320 + +SupportedBandCombinationAdd-v1380 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-v1380 + +SupportedBandCombinationAdd-v1390 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-v1390 + +SupportedBandCombinationAdd-v1430 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-v1430 + +SupportedBandCombinationAdd-v1450 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-v1450 + +SupportedBandCombinationAdd-v1470 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-v1470 + +SupportedBandCombinationAdd-v1530 ::= SEQUENCE (SIZE (1..maxBandComb-r11)) OF BandCombinationParameters-v1530 + +SupportedBandCombinationReduced-r13 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF BandCombinationParameters-r13 + +SupportedBandCombinationReduced-v1320 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF BandCombinationParameters-v1320 + +SupportedBandCombinationReduced-v1380 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF BandCombinationParameters-v1380 + +SupportedBandCombinationReduced-v1390 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF BandCombinationParameters-v1390 + +SupportedBandCombinationReduced-v1430 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF BandCombinationParameters-v1430 + +SupportedBandCombinationReduced-v1450 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF BandCombinationParameters-v1450 + +SupportedBandCombinationReduced-v1470 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF BandCombinationParameters-v1470 + +SupportedBandCombinationReduced-v1530 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF BandCombinationParameters-v1530 + +BandCombinationParameters-r10 ::= SEQUENCE (SIZE (1..maxSimultaneousBands-r10)) OF BandParameters-r10 + +BandCombinationParametersExt-r10 ::= SEQUENCE { + supportedBandwidthCombinationSet-r10 SupportedBandwidthCombinationSet-r10 OPTIONAL +} + +BandCombinationParameters-v1090 ::= SEQUENCE (SIZE (1..maxSimultaneousBands-r10)) OF BandParameters-v1090 + +BandCombinationParameters-v10i0::= SEQUENCE { + bandParameterList-v10i0 SEQUENCE (SIZE (1..maxSimultaneousBands-r10)) OF + BandParameters-v10i0 OPTIONAL +} + +BandCombinationParameters-v1130 ::= SEQUENCE { + multipleTimingAdvance-r11 ENUMERATED {supported} OPTIONAL, + simultaneousRx-Tx-r11 ENUMERATED {supported} OPTIONAL, + bandParameterList-r11 SEQUENCE (SIZE (1..maxSimultaneousBands-r10)) OF BandParameters-v1130 OPTIONAL, + ... +} + +BandCombinationParameters-r11 ::= SEQUENCE { + bandParameterList-r11 SEQUENCE (SIZE (1..maxSimultaneousBands-r10)) OF + BandParameters-r11, + supportedBandwidthCombinationSet-r11 SupportedBandwidthCombinationSet-r10 OPTIONAL, + multipleTimingAdvance-r11 ENUMERATED {supported} OPTIONAL, + simultaneousRx-Tx-r11 ENUMERATED {supported} OPTIONAL, + bandInfoEUTRA-r11 BandInfoEUTRA, + ... +} + +BandCombinationParameters-v1250::= SEQUENCE { + dc-Support-r12 SEQUENCE { + asynchronous-r12 ENUMERATED {supported} OPTIONAL, + supportedCellGrouping-r12 CHOICE { + threeEntries-r12 BIT STRING (SIZE(3)), + fourEntries-r12 BIT STRING (SIZE(7)), + fiveEntries-r12 BIT STRING (SIZE(15)) + } OPTIONAL + } OPTIONAL, + supportedNAICS-2CRS-AP-r12 BIT STRING (SIZE (1..maxNAICS-Entries-r12)) OPTIONAL, + commSupportedBandsPerBC-r12 BIT STRING (SIZE (1.. maxBands)) OPTIONAL, + ... +} + +BandCombinationParameters-v1270 ::= SEQUENCE { + bandParameterList-v1270 SEQUENCE (SIZE (1..maxSimultaneousBands-r10)) OF + BandParameters-v1270 OPTIONAL +} + +BandCombinationParameters-r13 ::= SEQUENCE { + differentFallbackSupported-r13 ENUMERATED {true} OPTIONAL, + bandParameterList-r13 SEQUENCE (SIZE (1..maxSimultaneousBands-r10)) OF BandParameters-r13, + supportedBandwidthCombinationSet-r13 SupportedBandwidthCombinationSet-r10 OPTIONAL, + multipleTimingAdvance-r13 ENUMERATED {supported} OPTIONAL, + simultaneousRx-Tx-r13 ENUMERATED {supported} OPTIONAL, + bandInfoEUTRA-r13 BandInfoEUTRA, + dc-Support-r13 SEQUENCE { + asynchronous-r13 ENUMERATED {supported} OPTIONAL, + supportedCellGrouping-r13 CHOICE { + threeEntries-r13 BIT STRING (SIZE(3)), + fourEntries-r13 BIT STRING (SIZE(7)), + fiveEntries-r13 BIT STRING (SIZE(15)) + } OPTIONAL + } OPTIONAL, + supportedNAICS-2CRS-AP-r13 BIT STRING (SIZE (1..maxNAICS-Entries-r12)) OPTIONAL, + commSupportedBandsPerBC-r13 BIT STRING (SIZE (1.. maxBands)) OPTIONAL +} + +BandCombinationParameters-v1320 ::= SEQUENCE { + bandParameterList-v1320 SEQUENCE (SIZE (1..maxSimultaneousBands-r10)) OF + BandParameters-v1320 OPTIONAL, + additionalRx-Tx-PerformanceReq-r13 ENUMERATED {supported} OPTIONAL +} + +BandCombinationParameters-v1380 ::= SEQUENCE { + bandParameterList-v1380 SEQUENCE (SIZE (1..maxSimultaneousBands-r10)) OF + BandParameters-v1380 OPTIONAL +} + +BandCombinationParameters-v1390 ::= SEQUENCE { + ue-CA-PowerClass-N-r13 ENUMERATED {class2} OPTIONAL +} + +BandCombinationParameters-v1430 ::= SEQUENCE { + bandParameterList-v1430 SEQUENCE (SIZE (1..maxSimultaneousBands-r10)) OF + BandParameters-v1430 OPTIONAL, + v2x-SupportedTxBandCombListPerBC-r14 BIT STRING (SIZE (1.. maxBandComb-r13)) OPTIONAL, + v2x-SupportedRxBandCombListPerBC-r14 BIT STRING (SIZE (1.. maxBandComb-r13)) OPTIONAL +} + +BandCombinationParameters-v1450 ::= SEQUENCE { + bandParameterList-v1450 SEQUENCE (SIZE (1..maxSimultaneousBands-r10)) OF + BandParameters-v1450 OPTIONAL +} + +BandCombinationParameters-v1470 ::= SEQUENCE { + bandParameterList-v1470 SEQUENCE (SIZE (1..maxSimultaneousBands-r10)) OF + BandParameters-v1470 OPTIONAL, + srs-MaxSimultaneousCCs-r14 INTEGER (1..31) OPTIONAL +} + +BandCombinationParameters-v1530 ::= SEQUENCE { + bandParameterList-v1530 SEQUENCE (SIZE (1..maxSimultaneousBands-r10)) OF BandParameters-v1530 OPTIONAL, + spt-Parameters-r15 SPT-Parameters-r15 OPTIONAL +} +-- If an additional band combination parameter is defined, which are supported for EN-DC, it shall be defined in the IE CA-ParametersEUTRA in TS 38.331 [82]. + +SupportedBandwidthCombinationSet-r10 ::= BIT STRING (SIZE (1..maxBandwidthCombSet-r10)) + +BandParameters-r10 ::= SEQUENCE { + bandEUTRA-r10 FreqBandIndicator, + bandParametersUL-r10 BandParametersUL-r10 OPTIONAL, + bandParametersDL-r10 BandParametersDL-r10 OPTIONAL +} + +BandParameters-v1090 ::= SEQUENCE { + bandEUTRA-v1090 FreqBandIndicator-v9e0 OPTIONAL, + ... +} + +BandParameters-v10i0::= SEQUENCE { + bandParametersDL-v10i0 SEQUENCE (SIZE (1..maxBandwidthClass-r10)) OF CA-MIMO-ParametersDL-v10i0 +} + +BandParameters-v1130 ::= SEQUENCE { + supportedCSI-Proc-r11 ENUMERATED {n1, n3, n4} +} + +BandParameters-r11 ::= SEQUENCE { + bandEUTRA-r11 FreqBandIndicator-r11, + bandParametersUL-r11 BandParametersUL-r10 OPTIONAL, + bandParametersDL-r11 BandParametersDL-r10 OPTIONAL, + supportedCSI-Proc-r11 ENUMERATED {n1, n3, n4} OPTIONAL +} + +BandParameters-v1270 ::= SEQUENCE { + bandParametersDL-v1270 SEQUENCE (SIZE (1..maxBandwidthClass-r10)) OF CA-MIMO-ParametersDL-v1270 +} + +BandParameters-r13 ::= SEQUENCE { + bandEUTRA-r13 FreqBandIndicator-r11, + bandParametersUL-r13 BandParametersUL-r13 OPTIONAL, + bandParametersDL-r13 BandParametersDL-r13 OPTIONAL, + supportedCSI-Proc-r13 ENUMERATED {n1, n3, n4} OPTIONAL +} + +BandParameters-v1320 ::= SEQUENCE { + bandParametersDL-v1320 MIMO-CA-ParametersPerBoBC-r13 +} + +BandParameters-v1380 ::= SEQUENCE { + txAntennaSwitchDL-r13 INTEGER (1..32) OPTIONAL, + txAntennaSwitchUL-r13 INTEGER (1..32) OPTIONAL +} + +BandParameters-v1430 ::= SEQUENCE { + bandParametersDL-v1430 MIMO-CA-ParametersPerBoBC-v1430 OPTIONAL, + ul-256QAM-r14 ENUMERATED {supported} OPTIONAL, + ul-256QAM-perCC-InfoList-r14 SEQUENCE (SIZE (2..maxServCell-r13)) OF UL-256QAM-perCC-Info-r14 OPTIONAL, + retuningTimeInfoBandList-r14 SEQUENCE (SIZE (1..maxSimultaneousBands-r10)) OF + RetuningTimeInfo-r14 OPTIONAL +} + +BandParameters-v1450 ::= SEQUENCE { + must-CapabilityPerBand-r14 MUST-Parameters-r14 OPTIONAL +} + +BandParameters-v1470 ::= SEQUENCE { + bandParametersDL-v1470 MIMO-CA-ParametersPerBoBC-v1470 OPTIONAL +} + +BandParameters-v1530 ::= SEQUENCE { + ue-TxAntennaSelection-SRS-1T4R-r15 ENUMERATED {supported} OPTIONAL, + ue-TxAntennaSelection-SRS-2T4R-2Pairs-r15 ENUMERATED {supported} OPTIONAL, + ue-TxAntennaSelection-SRS-2T4R-3Pairs-r15 ENUMERATED {supported} OPTIONAL, + dl-1024QAM-r15 ENUMERATED {supported} OPTIONAL, + qcl-TypeC-Operation-r15 ENUMERATED {supported} OPTIONAL, + qcl-CRI-BasedCSI-Reporting-r15 ENUMERATED {supported} OPTIONAL, + stti-SPT-BandParameters-r15 STTI-SPT-BandParameters-r15 OPTIONAL +} + +V2X-BandParameters-r14 ::= SEQUENCE { + v2x-FreqBandEUTRA-r14 FreqBandIndicator-r11, + bandParametersTxSL-r14 BandParametersTxSL-r14 OPTIONAL, + bandParametersRxSL-r14 BandParametersRxSL-r14 OPTIONAL +} + +V2X-BandParameters-v1530 ::= SEQUENCE { + v2x-EnhancedHighReception-r15 ENUMERATED {supported} OPTIONAL +} + +BandParametersTxSL-r14 ::= SEQUENCE { + v2x-BandwidthClassTxSL-r14 V2X-BandwidthClassSL-r14, + v2x-eNB-Scheduled-r14 ENUMERATED {supported} OPTIONAL, + v2x-HighPower-r14 ENUMERATED {supported} OPTIONAL +} + +BandParametersRxSL-r14 ::= SEQUENCE { + v2x-BandwidthClassRxSL-r14 V2X-BandwidthClassSL-r14, + v2x-HighReception-r14 ENUMERATED {supported} OPTIONAL +} + +V2X-BandwidthClassSL-r14 ::= SEQUENCE (SIZE (1..maxBandwidthClass-r10)) OF V2X-BandwidthClass-r14 + +UL-256QAM-perCC-Info-r14 ::= SEQUENCE { + ul-256QAM-perCC-r14 ENUMERATED {supported} OPTIONAL +} + +FeatureSetDL-r15 ::= SEQUENCE { + mimo-CA-ParametersPerBoBC-r15 MIMO-CA-ParametersPerBoBC-r15 OPTIONAL, + featureSetPerCC-ListDL-r15 SEQUENCE (SIZE (1..maxServCell-r13)) OF FeatureSetDL-PerCC-Id-r15 +} + +FeatureSetDL-PerCC-r15 ::= SEQUENCE { + fourLayerTM3-TM4-r15 ENUMERATED {supported} OPTIONAL, + supportedMIMO-CapabilityDL-r15 MIMO-CapabilityDL-r10 OPTIONAL, + supportedCSI-Proc-r15 ENUMERATED {n1, n3, n4} OPTIONAL +} + +FeatureSetUL-r15 ::= SEQUENCE { + featureSetPerCC-ListUL-r15 SEQUENCE (SIZE(1..maxServCell-r13)) OF FeatureSetUL-PerCC-Id-r15 +} + +FeatureSetUL-PerCC-r15 ::= SEQUENCE { + supportedMIMO-CapabilityUL-r15 MIMO-CapabilityUL-r10 OPTIONAL, + ul-256QAM-r15 ENUMERATED {supported} OPTIONAL +} + +FeatureSetDL-PerCC-Id-r15 ::= INTEGER (0..maxPerCC-FeatureSets-r15) + +FeatureSetUL-PerCC-Id-r15 ::= INTEGER (0..maxPerCC-FeatureSets-r15) + +BandParametersUL-r10 ::= SEQUENCE (SIZE (1..maxBandwidthClass-r10)) OF CA-MIMO-ParametersUL-r10 + +BandParametersUL-r13 ::= CA-MIMO-ParametersUL-r10 + +CA-MIMO-ParametersUL-r10 ::= SEQUENCE { + ca-BandwidthClassUL-r10 CA-BandwidthClass-r10, + supportedMIMO-CapabilityUL-r10 MIMO-CapabilityUL-r10 OPTIONAL +} + +CA-MIMO-ParametersUL-r15 ::= SEQUENCE { + supportedMIMO-CapabilityUL-r15 MIMO-CapabilityUL-r10 OPTIONAL +} + +BandParametersDL-r10 ::= SEQUENCE (SIZE (1..maxBandwidthClass-r10)) OF CA-MIMO-ParametersDL-r10 + +BandParametersDL-r13 ::= CA-MIMO-ParametersDL-r13 + +CA-MIMO-ParametersDL-r10 ::= SEQUENCE { + ca-BandwidthClassDL-r10 CA-BandwidthClass-r10, + supportedMIMO-CapabilityDL-r10 MIMO-CapabilityDL-r10 OPTIONAL +} + +CA-MIMO-ParametersDL-v10i0 ::= SEQUENCE { + fourLayerTM3-TM4-r10 ENUMERATED {supported} OPTIONAL +} + +CA-MIMO-ParametersDL-v1270 ::= SEQUENCE { + intraBandContiguousCC-InfoList-r12 SEQUENCE (SIZE (1..maxServCell-r10)) OF IntraBandContiguousCC-Info-r12 +} + +CA-MIMO-ParametersDL-r13 ::= SEQUENCE { + ca-BandwidthClassDL-r13 CA-BandwidthClass-r10, + supportedMIMO-CapabilityDL-r13 MIMO-CapabilityDL-r10 OPTIONAL, + fourLayerTM3-TM4-r13 ENUMERATED {supported} OPTIONAL, + intraBandContiguousCC-InfoList-r13 SEQUENCE (SIZE (1..maxServCell-r13)) OF IntraBandContiguousCC-Info-r12 +} + +CA-MIMO-ParametersDL-r15 ::= SEQUENCE { + supportedMIMO-CapabilityDL-r15 MIMO-CapabilityDL-r10 OPTIONAL, + fourLayerTM3-TM4-r15 ENUMERATED {supported} OPTIONAL, + intraBandContiguousCC-InfoList-r15 SEQUENCE (SIZE (1..maxServCell-r13)) OF + IntraBandContiguousCC-Info-r12 OPTIONAL +} + +IntraBandContiguousCC-Info-r12 ::= SEQUENCE { + fourLayerTM3-TM4-perCC-r12 ENUMERATED {supported} OPTIONAL, + supportedMIMO-CapabilityDL-r12 MIMO-CapabilityDL-r10 OPTIONAL, + supportedCSI-Proc-r12 ENUMERATED {n1, n3, n4} OPTIONAL +} + +CA-BandwidthClass-r10 ::= ENUMERATED {a, b, c, d, e, f, ...} + +V2X-BandwidthClass-r14 ::= ENUMERATED {a, b, c, d, e, f, ..., c1-v1530} + +MIMO-CapabilityUL-r10 ::= ENUMERATED {twoLayers, fourLayers} + +MIMO-CapabilityDL-r10 ::= ENUMERATED {twoLayers, fourLayers, eightLayers} + +MUST-Parameters-r14 ::= SEQUENCE { + must-TM234-UpTo2Tx-r14 ENUMERATED {supported} OPTIONAL, + must-TM89-UpToOneInterferingLayer-r14 ENUMERATED {supported} OPTIONAL, + must-TM10-UpToOneInterferingLayer-r14 ENUMERATED {supported} OPTIONAL, + must-TM89-UpToThreeInterferingLayers-r14 ENUMERATED {supported} OPTIONAL, + must-TM10-UpToThreeInterferingLayers-r14 ENUMERATED {supported} OPTIONAL +} + +SupportedBandListEUTRA ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandEUTRA + +SupportedBandListEUTRA-v9e0::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandEUTRA-v9e0 + +SupportedBandListEUTRA-v1250 ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandEUTRA-v1250 + +SupportedBandListEUTRA-v1310 ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandEUTRA-v1310 + +SupportedBandListEUTRA-v1320 ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandEUTRA-v1320 + +SupportedBandEUTRA ::= SEQUENCE { + bandEUTRA FreqBandIndicator, + halfDuplex BOOLEAN +} + +SupportedBandEUTRA-v9e0 ::= SEQUENCE { + bandEUTRA-v9e0 FreqBandIndicator-v9e0 OPTIONAL +} + +SupportedBandEUTRA-v1250 ::= SEQUENCE { + dl-256QAM-r12 ENUMERATED {supported} OPTIONAL, + ul-64QAM-r12 ENUMERATED {supported} OPTIONAL +} + +SupportedBandEUTRA-v1310 ::= SEQUENCE { + ue-PowerClass-5-r13 ENUMERATED {supported} OPTIONAL +} +SupportedBandEUTRA-v1320 ::= SEQUENCE { + intraFreq-CE-NeedForGaps-r13 ENUMERATED {supported} OPTIONAL, + ue-PowerClass-N-r13 ENUMERATED {class1, class2, class4} OPTIONAL +} + +MeasParameters ::= SEQUENCE { + bandListEUTRA BandListEUTRA +} + +MeasParameters-v1020 ::= SEQUENCE { + bandCombinationListEUTRA-r10 BandCombinationListEUTRA-r10 +} + +MeasParameters-v1130 ::= SEQUENCE { + rsrqMeasWideband-r11 ENUMERATED {supported} OPTIONAL +} + +MeasParameters-v11a0 ::= SEQUENCE { + benefitsFromInterruption-r11 ENUMERATED {true} OPTIONAL +} + +MeasParameters-v1250 ::= SEQUENCE { + timerT312-r12 ENUMERATED {supported} OPTIONAL, + alternativeTimeToTrigger-r12 ENUMERATED {supported} OPTIONAL, + incMonEUTRA-r12 ENUMERATED {supported} OPTIONAL, + incMonUTRA-r12 ENUMERATED {supported} OPTIONAL, + extendedMaxMeasId-r12 ENUMERATED {supported} OPTIONAL, + extendedRSRQ-LowerRange-r12 ENUMERATED {supported} OPTIONAL, + rsrq-OnAllSymbols-r12 ENUMERATED {supported} OPTIONAL, + crs-DiscoverySignalsMeas-r12 ENUMERATED {supported} OPTIONAL, + csi-RS-DiscoverySignalsMeas-r12 ENUMERATED {supported} OPTIONAL +} + +MeasParameters-v1310 ::= SEQUENCE { + rs-SINR-Meas-r13 ENUMERATED {supported} OPTIONAL, + whiteCellList-r13 ENUMERATED {supported} OPTIONAL, + extendedMaxObjectId-r13 ENUMERATED {supported} OPTIONAL, + ul-PDCP-Delay-r13 ENUMERATED {supported} OPTIONAL, + extendedFreqPriorities-r13 ENUMERATED {supported} OPTIONAL, + multiBandInfoReport-r13 ENUMERATED {supported} OPTIONAL, + rssi-AndChannelOccupancyReporting-r13 ENUMERATED {supported} OPTIONAL +} + +MeasParameters-v1430 ::= SEQUENCE { + ceMeasurements-r14 ENUMERATED {supported} OPTIONAL, + ncsg-r14 ENUMERATED {supported} OPTIONAL, + shortMeasurementGap-r14 ENUMERATED {supported} OPTIONAL, + perServingCellMeasurementGap-r14 ENUMERATED {supported} OPTIONAL, + nonUniformGap-r14 ENUMERATED {supported} OPTIONAL +} + +MeasParameters-v1520 ::= SEQUENCE { + measGapPatterns-v1520 BIT STRING (SIZE (8)) OPTIONAL +} + +MeasParameters-v1530 ::= SEQUENCE { + qoe-MeasReport-r15 ENUMERATED {supported} OPTIONAL, + qoe-MTSI-MeasReport-r15 ENUMERATED {supported} OPTIONAL, + ca-IdleModeMeasurements-r15 ENUMERATED {supported} OPTIONAL, + ca-IdleModeValidityArea-r15 ENUMERATED {supported} OPTIONAL, + heightMeas-r15 ENUMERATED {supported} OPTIONAL, + multipleCellsMeasExtension-r15 ENUMERATED {supported} OPTIONAL +} + +BandListEUTRA ::= SEQUENCE (SIZE (1..maxBands)) OF BandInfoEUTRA + +BandCombinationListEUTRA-r10 ::= SEQUENCE (SIZE (1..maxBandComb-r10)) OF BandInfoEUTRA + +BandInfoEUTRA ::= SEQUENCE { + interFreqBandList InterFreqBandList, + interRAT-BandList InterRAT-BandList OPTIONAL +} + +InterFreqBandList ::= SEQUENCE (SIZE (1..maxBands)) OF InterFreqBandInfo + +InterFreqBandInfo ::= SEQUENCE { + interFreqNeedForGaps BOOLEAN +} + +InterRAT-BandList ::= SEQUENCE (SIZE (1..maxBands)) OF InterRAT-BandInfo + +InterRAT-BandInfo ::= SEQUENCE { + interRAT-NeedForGaps BOOLEAN +} + +IRAT-ParametersNR-r15 ::= SEQUENCE { + en-DC-r15 ENUMERATED {supported} OPTIONAL, + eventB2-r15 ENUMERATED {supported} OPTIONAL, + supportedBandListNR-r15 SupportedBandListNR-r15 OPTIONAL +} + +PDCP-ParametersNR-r15 ::= SEQUENCE { + rohc-Profiles-r15 ROHC-ProfileSupportList-r15, + rohc-ContextMaxSessions-r15 ENUMERATED { + cs2, cs4, cs8, cs12, cs16, cs24, cs32, + cs48, cs64, cs128, cs256, cs512, cs1024, + cs16384, spare2, spare1} DEFAULT cs16, + rohc-ProfilesUL-Only-r15 SEQUENCE { + profile0x0006-r15 BOOLEAN + }, + rohc-ContextContinue-r15 ENUMERATED {supported} OPTIONAL, + outOfOrderDelivery-r15 ENUMERATED {supported} OPTIONAL, + sn-SizeLo-r15 ENUMERATED {supported} OPTIONAL, + ims-VoiceOverNR-PDCP-MCG-Bearer-r15 ENUMERATED {supported} OPTIONAL, + ims-VoiceOverNR-PDCP-SCG-Bearer-r15 ENUMERATED {supported} OPTIONAL +} + +ROHC-ProfileSupportList-r15 ::= SEQUENCE { + profile0x0001-r15 BOOLEAN, + profile0x0002-r15 BOOLEAN, + profile0x0003-r15 BOOLEAN, + profile0x0004-r15 BOOLEAN, + profile0x0006-r15 BOOLEAN, + profile0x0101-r15 BOOLEAN, + profile0x0102-r15 BOOLEAN, + profile0x0103-r15 BOOLEAN, + profile0x0104-r15 BOOLEAN +} + +SupportedBandListNR-r15 ::= SEQUENCE (SIZE (1..maxBandsNR-r15)) OF SupportedBandNR-r15 + +SupportedBandNR-r15 ::= SEQUENCE { + bandNR-r15 FreqBandIndicatorNR-r15 +} + +IRAT-ParametersUTRA-FDD ::= SEQUENCE { + supportedBandListUTRA-FDD SupportedBandListUTRA-FDD +} + +IRAT-ParametersUTRA-v920 ::= SEQUENCE { + e-RedirectionUTRA-r9 ENUMERATED {supported} +} + +IRAT-ParametersUTRA-v9c0 ::= SEQUENCE { + voiceOverPS-HS-UTRA-FDD-r9 ENUMERATED {supported} OPTIONAL, + voiceOverPS-HS-UTRA-TDD128-r9 ENUMERATED {supported} OPTIONAL, + srvcc-FromUTRA-FDD-ToUTRA-FDD-r9 ENUMERATED {supported} OPTIONAL, + srvcc-FromUTRA-FDD-ToGERAN-r9 ENUMERATED {supported} OPTIONAL, + srvcc-FromUTRA-TDD128-ToUTRA-TDD128-r9 ENUMERATED {supported} OPTIONAL, + srvcc-FromUTRA-TDD128-ToGERAN-r9 ENUMERATED {supported} OPTIONAL +} + +IRAT-ParametersUTRA-v9h0 ::= SEQUENCE { + mfbi-UTRA-r9 ENUMERATED {supported} +} + +SupportedBandListUTRA-FDD ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandUTRA-FDD + +SupportedBandUTRA-FDD ::= ENUMERATED { + bandI, bandII, bandIII, bandIV, bandV, bandVI, + bandVII, bandVIII, bandIX, bandX, bandXI, + bandXII, bandXIII, bandXIV, bandXV, bandXVI, ..., + bandXVII-8a0, bandXVIII-8a0, bandXIX-8a0, bandXX-8a0, + bandXXI-8a0, bandXXII-8a0, bandXXIII-8a0, bandXXIV-8a0, + bandXXV-8a0, bandXXVI-8a0, bandXXVII-8a0, bandXXVIII-8a0, + bandXXIX-8a0, bandXXX-8a0, bandXXXI-8a0, bandXXXII-8a0} + +IRAT-ParametersUTRA-TDD128 ::= SEQUENCE { + supportedBandListUTRA-TDD128 SupportedBandListUTRA-TDD128 +} + +SupportedBandListUTRA-TDD128 ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandUTRA-TDD128 + +SupportedBandUTRA-TDD128 ::= ENUMERATED { + a, b, c, d, e, f, g, h, i, j, k, l, m, n, + o, p, ...} + +IRAT-ParametersUTRA-TDD384 ::= SEQUENCE { + supportedBandListUTRA-TDD384 SupportedBandListUTRA-TDD384 +} + +SupportedBandListUTRA-TDD384 ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandUTRA-TDD384 + +SupportedBandUTRA-TDD384 ::= ENUMERATED { + a, b, c, d, e, f, g, h, i, j, k, l, m, n, + o, p, ...} + +IRAT-ParametersUTRA-TDD768 ::= SEQUENCE { + supportedBandListUTRA-TDD768 SupportedBandListUTRA-TDD768 +} + +SupportedBandListUTRA-TDD768 ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandUTRA-TDD768 + +SupportedBandUTRA-TDD768 ::= ENUMERATED { + a, b, c, d, e, f, g, h, i, j, k, l, m, n, + o, p, ...} + +IRAT-ParametersUTRA-TDD-v1020 ::= SEQUENCE { + e-RedirectionUTRA-TDD-r10 ENUMERATED {supported} +} + +IRAT-ParametersGERAN ::= SEQUENCE { + supportedBandListGERAN SupportedBandListGERAN, + interRAT-PS-HO-ToGERAN BOOLEAN +} + +IRAT-ParametersGERAN-v920 ::= SEQUENCE { + dtm-r9 ENUMERATED {supported} OPTIONAL, + e-RedirectionGERAN-r9 ENUMERATED {supported} OPTIONAL +} + +SupportedBandListGERAN ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandGERAN + +SupportedBandGERAN ::= ENUMERATED { + gsm450, gsm480, gsm710, gsm750, gsm810, gsm850, + gsm900P, gsm900E, gsm900R, gsm1800, gsm1900, + spare5, spare4, spare3, spare2, spare1, ...} + +IRAT-ParametersCDMA2000-HRPD ::= SEQUENCE { + supportedBandListHRPD SupportedBandListHRPD, + tx-ConfigHRPD ENUMERATED {single, dual}, + rx-ConfigHRPD ENUMERATED {single, dual} +} + +SupportedBandListHRPD ::= SEQUENCE (SIZE (1..maxCDMA-BandClass)) OF BandclassCDMA2000 + +IRAT-ParametersCDMA2000-1XRTT ::= SEQUENCE { + supportedBandList1XRTT SupportedBandList1XRTT, + tx-Config1XRTT ENUMERATED {single, dual}, + rx-Config1XRTT ENUMERATED {single, dual} +} + +IRAT-ParametersCDMA2000-1XRTT-v920 ::= SEQUENCE { + e-CSFB-1XRTT-r9 ENUMERATED {supported}, + e-CSFB-ConcPS-Mob1XRTT-r9 ENUMERATED {supported} OPTIONAL +} + +IRAT-ParametersCDMA2000-1XRTT-v1020 ::= SEQUENCE { + e-CSFB-dual-1XRTT-r10 ENUMERATED {supported} +} + +IRAT-ParametersCDMA2000-v1130 ::= SEQUENCE { + cdma2000-NW-Sharing-r11 ENUMERATED {supported} OPTIONAL +} + +SupportedBandList1XRTT ::= SEQUENCE (SIZE (1..maxCDMA-BandClass)) OF BandclassCDMA2000 + +IRAT-ParametersWLAN-r13 ::= SEQUENCE { + supportedBandListWLAN-r13 SEQUENCE (SIZE (1..maxWLAN-Bands-r13)) OF WLAN-BandIndicator-r13 OPTIONAL +} + +CSG-ProximityIndicationParameters-r9 ::= SEQUENCE { + intraFreqProximityIndication-r9 ENUMERATED {supported} OPTIONAL, + interFreqProximityIndication-r9 ENUMERATED {supported} OPTIONAL, + utran-ProximityIndication-r9 ENUMERATED {supported} OPTIONAL +} + +NeighCellSI-AcquisitionParameters-r9 ::= SEQUENCE { + intraFreqSI-AcquisitionForHO-r9 ENUMERATED {supported} OPTIONAL, + interFreqSI-AcquisitionForHO-r9 ENUMERATED {supported} OPTIONAL, + utran-SI-AcquisitionForHO-r9 ENUMERATED {supported} OPTIONAL +} + +NeighCellSI-AcquisitionParameters-v1530 ::= SEQUENCE { + reportCGI-NR-EN-DC-r15 ENUMERATED {supported} OPTIONAL, + reportCGI-NR-NoEN-DC-r15 ENUMERATED {supported} OPTIONAL +} + +SON-Parameters-r9 ::= SEQUENCE { + rach-Report-r9 ENUMERATED {supported} OPTIONAL +} + +UE-BasedNetwPerfMeasParameters-r10 ::= SEQUENCE { + loggedMeasurementsIdle-r10 ENUMERATED {supported} OPTIONAL, + standaloneGNSS-Location-r10 ENUMERATED {supported} OPTIONAL +} + +UE-BasedNetwPerfMeasParameters-v1250 ::= SEQUENCE { + loggedMBSFNMeasurements-r12 ENUMERATED {supported} +} + +UE-BasedNetwPerfMeasParameters-v1430 ::= SEQUENCE { + locationReport-r14 ENUMERATED {supported} OPTIONAL +} + +UE-BasedNetwPerfMeasParameters-v1530 ::= SEQUENCE { + loggedMeasBT-r15 ENUMERATED {supported} OPTIONAL, + loggedMeasWLAN-r15 ENUMERATED {supported} OPTIONAL, + immMeasBT-r15 ENUMERATED {supported} OPTIONAL, + immMeasWLAN-r15 ENUMERATED {supported} OPTIONAL +} + +OTDOA-PositioningCapabilities-r10 ::= SEQUENCE { + otdoa-UE-Assisted-r10 ENUMERATED {supported}, + interFreqRSTD-Measurement-r10 ENUMERATED {supported} OPTIONAL +} + +Other-Parameters-r11 ::= SEQUENCE { + inDeviceCoexInd-r11 ENUMERATED {supported} OPTIONAL, + powerPrefInd-r11 ENUMERATED {supported} OPTIONAL, + ue-Rx-TxTimeDiffMeasurements-r11 ENUMERATED {supported} OPTIONAL +} + +Other-Parameters-v11d0 ::= SEQUENCE { + inDeviceCoexInd-UL-CA-r11 ENUMERATED {supported} OPTIONAL +} + +Other-Parameters-v1360 ::= SEQUENCE { + inDeviceCoexInd-HardwareSharingInd-r13 ENUMERATED {supported} OPTIONAL +} + +Other-Parameters-v1430 ::= SEQUENCE { + bwPrefInd-r14 ENUMERATED {supported} OPTIONAL, + rlm-ReportSupport-r14 ENUMERATED {supported} OPTIONAL +} + +OtherParameters-v1450 ::= SEQUENCE { + overheatingInd-r14 ENUMERATED {supported} OPTIONAL +} + +Other-Parameters-v1460 ::= SEQUENCE { + nonCSG-SI-Reporting-r14 ENUMERATED {supported} OPTIONAL +} + +Other-Parameters-v1530 ::= SEQUENCE { + assistInfoBitForLC-r15 ENUMERATED {supported} OPTIONAL, + timeReferenceProvision-r15 ENUMERATED {supported} OPTIONAL, + flightPathPlan-r15 ENUMERATED {supported} OPTIONAL +} + +MBMS-Parameters-r11 ::= SEQUENCE { + mbms-SCell-r11 ENUMERATED {supported} OPTIONAL, + mbms-NonServingCell-r11 ENUMERATED {supported} OPTIONAL +} + +MBMS-Parameters-v1250 ::= SEQUENCE { + mbms-AsyncDC-r12 ENUMERATED {supported} OPTIONAL +} + +MBMS-Parameters-v1430 ::= SEQUENCE { + fembmsDedicatedCell-r14 ENUMERATED {supported} OPTIONAL, + fembmsMixedCell-r14 ENUMERATED {supported} OPTIONAL, + subcarrierSpacingMBMS-khz7dot5-r14 ENUMERATED {supported} OPTIONAL, + subcarrierSpacingMBMS-khz1dot25-r14 ENUMERATED {supported} OPTIONAL +} + +MBMS-Parameters-v1470 ::= SEQUENCE { + mbms-MaxBW-r14 CHOICE { + implicitValue NULL, + explicitValue INTEGER(2..20) + }, + mbms-ScalingFactor1dot25-r14 ENUMERATED {n3, n6, n9, n12} OPTIONAL, + mbms-ScalingFactor7dot5-r14 ENUMERATED {n1, n2, n3, n4} OPTIONAL +} + +FeMBMS-Unicast-Parameters-r14 ::= SEQUENCE { + unicast-fembmsMixedSCell-r14 ENUMERATED {supported} OPTIONAL, + emptyUnicastRegion-r14 ENUMERATED {supported} OPTIONAL +} + +SCPTM-Parameters-r13 ::= SEQUENCE { + scptm-ParallelReception-r13 ENUMERATED {supported} OPTIONAL, + scptm-SCell-r13 ENUMERATED {supported} OPTIONAL, + scptm-NonServingCell-r13 ENUMERATED {supported} OPTIONAL, + scptm-AsyncDC-r13 ENUMERATED {supported} OPTIONAL +} + +CE-Parameters-r13 ::= SEQUENCE { + ce-ModeA-r13 ENUMERATED {supported} OPTIONAL, + ce-ModeB-r13 ENUMERATED {supported} OPTIONAL +} + +CE-Parameters-v1320 ::= SEQUENCE { + intraFreqA3-CE-ModeA-r13 ENUMERATED {supported} OPTIONAL, + intraFreqA3-CE-ModeB-r13 ENUMERATED {supported} OPTIONAL, + intraFreqHO-CE-ModeA-r13 ENUMERATED {supported} OPTIONAL, + intraFreqHO-CE-ModeB-r13 ENUMERATED {supported} OPTIONAL +} + +CE-Parameters-v1350 ::= SEQUENCE { + unicastFrequencyHopping-r13 ENUMERATED {supported} OPTIONAL +} + +CE-Parameters-v1370 ::= SEQUENCE { + tm9-CE-ModeA-r13 ENUMERATED {supported} OPTIONAL, + tm9-CE-ModeB-r13 ENUMERATED {supported} OPTIONAL +} + +CE-Parameters-v1380 ::= SEQUENCE { + tm6-CE-ModeA-r13 ENUMERATED {supported} OPTIONAL +} + +CE-Parameters-v1430 ::= SEQUENCE { + ce-SwitchWithoutHO-r14 ENUMERATED {supported} OPTIONAL +} + +LAA-Parameters-r13 ::= SEQUENCE { + crossCarrierSchedulingLAA-DL-r13 ENUMERATED {supported} OPTIONAL, + csi-RS-DRS-RRM-MeasurementsLAA-r13 ENUMERATED {supported} OPTIONAL, + downlinkLAA-r13 ENUMERATED {supported} OPTIONAL, + endingDwPTS-r13 ENUMERATED {supported} OPTIONAL, + secondSlotStartingPosition-r13 ENUMERATED {supported} OPTIONAL, + tm9-LAA-r13 ENUMERATED {supported} OPTIONAL, + tm10-LAA-r13 ENUMERATED {supported} OPTIONAL +} + +LAA-Parameters-v1430 ::= SEQUENCE { + crossCarrierSchedulingLAA-UL-r14 ENUMERATED {supported} OPTIONAL, + uplinkLAA-r14 ENUMERATED {supported} OPTIONAL, + twoStepSchedulingTimingInfo-r14 ENUMERATED {nPlus1, nPlus2, nPlus3} OPTIONAL, + uss-BlindDecodingAdjustment-r14 ENUMERATED {supported} OPTIONAL, + uss-BlindDecodingReduction-r14 ENUMERATED {supported} OPTIONAL, + outOfSequenceGrantHandling-r14 ENUMERATED {supported} OPTIONAL +} + +LAA-Parameters-v1530 ::= SEQUENCE { + aul-r15 ENUMERATED {supported} OPTIONAL, + laa-PUSCH-Mode1-r15 ENUMERATED {supported} OPTIONAL, + laa-PUSCH-Mode2-r15 ENUMERATED {supported} OPTIONAL, + laa-PUSCH-Mode3-r15 ENUMERATED {supported} OPTIONAL +} + +WLAN-IW-Parameters-r12 ::= SEQUENCE { + wlan-IW-RAN-Rules-r12 ENUMERATED {supported} OPTIONAL, + wlan-IW-ANDSF-Policies-r12 ENUMERATED {supported} OPTIONAL +} + +LWA-Parameters-r13 ::= SEQUENCE { + lwa-r13 ENUMERATED {supported} OPTIONAL, + lwa-SplitBearer-r13 ENUMERATED {supported} OPTIONAL, + wlan-MAC-Address-r13 OCTET STRING (SIZE (6)) OPTIONAL, + lwa-BufferSize-r13 ENUMERATED {supported} OPTIONAL +} + +LWA-Parameters-v1430 ::= SEQUENCE { + lwa-HO-WithoutWT-Change-r14 ENUMERATED {supported} OPTIONAL, + lwa-UL-r14 ENUMERATED {supported} OPTIONAL, + wlan-PeriodicMeas-r14 ENUMERATED {supported} OPTIONAL, + wlan-ReportAnyWLAN-r14 ENUMERATED {supported} OPTIONAL, + wlan-SupportedDataRate-r14 INTEGER (1..2048) OPTIONAL +} + +LWA-Parameters-v1440 ::= SEQUENCE { + lwa-RLC-UM-r14 ENUMERATED {supported} OPTIONAL +} + +WLAN-IW-Parameters-v1310 ::= SEQUENCE { + rclwi-r13 ENUMERATED {supported} OPTIONAL +} + +LWIP-Parameters-r13 ::= SEQUENCE { + lwip-r13 ENUMERATED {supported} OPTIONAL +} + +LWIP-Parameters-v1430 ::= SEQUENCE { + lwip-Aggregation-DL-r14 ENUMERATED {supported} OPTIONAL, + lwip-Aggregation-UL-r14 ENUMERATED {supported} OPTIONAL +} + +NAICS-Capability-List-r12 ::= SEQUENCE (SIZE (1..maxNAICS-Entries-r12)) OF NAICS-Capability-Entry-r12 + + +NAICS-Capability-Entry-r12 ::= SEQUENCE { + numberOfNAICS-CapableCC-r12 INTEGER(1..5), + numberOfAggregatedPRB-r12 ENUMERATED { + n50, n75, n100, n125, n150, n175, + n200, n225, n250, n275, n300, n350, + n400, n450, n500, spare}, + ... +} + +SL-Parameters-r12 ::= SEQUENCE { + commSimultaneousTx-r12 ENUMERATED {supported} OPTIONAL, + commSupportedBands-r12 FreqBandIndicatorListEUTRA-r12 OPTIONAL, + discSupportedBands-r12 SupportedBandInfoList-r12 OPTIONAL, + discScheduledResourceAlloc-r12 ENUMERATED {supported} OPTIONAL, + disc-UE-SelectedResourceAlloc-r12 ENUMERATED {supported} OPTIONAL, + disc-SLSS-r12 ENUMERATED {supported} OPTIONAL, + discSupportedProc-r12 ENUMERATED {n50, n400} OPTIONAL +} + +SL-Parameters-v1310 ::= SEQUENCE { + discSysInfoReporting-r13 ENUMERATED {supported} OPTIONAL, + commMultipleTx-r13 ENUMERATED {supported} OPTIONAL, + discInterFreqTx-r13 ENUMERATED {supported} OPTIONAL, + discPeriodicSLSS-r13 ENUMERATED {supported} OPTIONAL +} + +SL-Parameters-v1430 ::= SEQUENCE { + zoneBasedPoolSelection-r14 ENUMERATED {supported} OPTIONAL, + ue-AutonomousWithFullSensing-r14 ENUMERATED {supported} OPTIONAL, + ue-AutonomousWithPartialSensing-r14 ENUMERATED {supported} OPTIONAL, + sl-CongestionControl-r14 ENUMERATED {supported} OPTIONAL, + v2x-TxWithShortResvInterval-r14 ENUMERATED {supported} OPTIONAL, + v2x-numberTxRxTiming-r14 INTEGER(1..16) OPTIONAL, + v2x-nonAdjacentPSCCH-PSSCH-r14 ENUMERATED {supported} OPTIONAL, + slss-TxRx-r14 ENUMERATED {supported} OPTIONAL, + v2x-SupportedBandCombinationList-r14 V2X-SupportedBandCombination-r14 OPTIONAL +} + +SL-Parameters-v1530 ::= SEQUENCE { + slss-SupportedTxFreq-r15 ENUMERATED {single, multiple} OPTIONAL, + sl-64QAM-Tx-r15 ENUMERATED {supported} OPTIONAL, + sl-TxDiversity-r15 ENUMERATED {supported} OPTIONAL, + ue-CategorySL-r15 UE-CategorySL-r15 OPTIONAL, + v2x-SupportedBandCombinationList-v1530 V2X-SupportedBandCombination-v1530 OPTIONAL +} + +UE-CategorySL-r15 ::= SEQUENCE { + ue-CategorySL-C-TX-r15 INTEGER(1..5), + ue-CategorySL-C-RX-r15 INTEGER(1..4) +} + +V2X-SupportedBandCombination-r14 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF V2X-BandCombinationParameters-r14 + +V2X-SupportedBandCombination-v1530 ::= SEQUENCE (SIZE (1..maxBandComb-r13)) OF V2X-BandCombinationParameters-v1530 + +V2X-BandCombinationParameters-r14 ::= SEQUENCE (SIZE (1.. maxSimultaneousBands-r10)) OF V2X-BandParameters-r14 + +V2X-BandCombinationParameters-v1530 ::= SEQUENCE (SIZE (1.. maxSimultaneousBands-r10)) OF V2X-BandParameters-v1530 + +SupportedBandInfoList-r12 ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBandInfo-r12 + +SupportedBandInfo-r12 ::= SEQUENCE { + support-r12 ENUMERATED {supported} OPTIONAL +} + +FreqBandIndicatorListEUTRA-r12 ::= SEQUENCE (SIZE (1..maxBands)) OF FreqBandIndicator-r11 + +MMTEL-Parameters-r14 ::= SEQUENCE { + delayBudgetReporting-r14 ENUMERATED {supported} OPTIONAL, + pusch-Enhancements-r14 ENUMERATED {supported} OPTIONAL, + recommendedBitRate-r14 ENUMERATED {supported} OPTIONAL, + recommendedBitRateQuery-r14 ENUMERATED {supported} OPTIONAL +} + +RetuningTimeInfo-r14 ::= SEQUENCE { + retuningInfo SEQUENCE { + rf-RetuningTimeDL-r14 ENUMERATED {n0, n0dot5, n1, n1dot5, n2, n2dot5, n3, + n3dot5, n4, n4dot5, n5, n5dot5, n6, n6dot5, + n7, spare1} OPTIONAL, + rf-RetuningTimeUL-r14 ENUMERATED {n0, n0dot5, n1, n1dot5, n2, n2dot5, n3, + n3dot5, n4, n4dot5, n5, n5dot5, n6, n6dot5, + n7, spare1} OPTIONAL + } +} + +HighSpeedEnhParameters-r14 ::= SEQUENCE { + measurementEnhancements-r14 ENUMERATED {supported} OPTIONAL, + demodulationEnhancements-r14 ENUMERATED {supported} OPTIONAL, + prach-Enhancements-r14 ENUMERATED {supported} OPTIONAL +} + + +UE-RadioPagingInfo-r12 ::= SEQUENCE { + ue-Category-v1250 INTEGER (0) OPTIONAL, + ..., + [[ ue-CategoryDL-v1310 ENUMERATED {m1} OPTIONAL, + ce-ModeA-r13 ENUMERATED {true} OPTIONAL, + ce-ModeB-r13 ENUMERATED {true} OPTIONAL + ]], + [[ wakeUpSignal-r15 ENUMERATED {true} OPTIONAL, + wakeUpSignal-TDD-r15 ENUMERATED {true} OPTIONAL, + wakeUpSignalMinGap-eDRX-r15 ENUMERATED {ms40, ms240, ms1000, ms2000} OPTIONAL, + wakeUpSignalMinGap-eDRX-TDD-r15 ENUMERATED {ms40, ms240, ms1000, ms2000} OPTIONAL + ]] +} + + +UE-TimersAndConstants ::= SEQUENCE { + t300 ENUMERATED { + ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, + ms2000}, + t301 ENUMERATED { + ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, + ms2000}, + t310 ENUMERATED { + ms0, ms50, ms100, ms200, ms500, ms1000, ms2000}, + n310 ENUMERATED { + n1, n2, n3, n4, n6, n8, n10, n20}, + t311 ENUMERATED { + ms1000, ms3000, ms5000, ms10000, ms15000, + ms20000, ms30000}, + n311 ENUMERATED { + n1, n2, n3, n4, n5, n6, n8, n10}, + ..., + [[ t300-v1310 ENUMERATED { + ms2500, ms3000, ms3500, ms4000, ms5000, ms6000, ms8000, + ms10000} OPTIONAL, -- Need OR + t301-v1310 ENUMERATED { + ms2500, ms3000, ms3500, ms4000, ms5000, ms6000, ms8000, + ms10000} OPTIONAL -- Need OR + ]], + [[ t310-v1330 ENUMERATED {ms4000, ms6000} + OPTIONAL -- Need OR + ]], + [[ t300-r15 ENUMERATED {ms4000, ms6000, ms8000, ms10000, ms15000, + ms25000, ms40000, ms60000} OPTIONAL -- Cond EDT + ]] +} + + +VisitedCellInfoList-r12 ::= SEQUENCE (SIZE (1..maxCellHistory-r12)) OF VisitedCellInfo-r12 + +VisitedCellInfo-r12 ::= SEQUENCE { + visitedCellId-r12 CHOICE { + cellGlobalId-r12 CellGlobalIdEUTRA, + pci-arfcn-r12 SEQUENCE { + physCellId-r12 PhysCellId, + carrierFreq-r12 ARFCN-ValueEUTRA-r9 + } + } OPTIONAL, + timeSpent-r12 INTEGER (0..4095), + ... +} + + +WLAN-OffloadConfig-r12 ::= SEQUENCE { + thresholdRSRP-r12 SEQUENCE { + thresholdRSRP-Low-r12 RSRP-Range, + thresholdRSRP-High-r12 RSRP-Range + } OPTIONAL, -- Need OR + thresholdRSRQ-r12 SEQUENCE { + thresholdRSRQ-Low-r12 RSRQ-Range, + thresholdRSRQ-High-r12 RSRQ-Range + } OPTIONAL, -- Need OR + thresholdRSRQ-OnAllSymbolsWithWB-r12 SEQUENCE { + thresholdRSRQ-OnAllSymbolsWithWB-Low-r12 RSRQ-Range, + thresholdRSRQ-OnAllSymbolsWithWB-High-r12 RSRQ-Range + } OPTIONAL, -- Need OP + thresholdRSRQ-OnAllSymbols-r12 SEQUENCE { + thresholdRSRQ-OnAllSymbolsLow-r12 RSRQ-Range, + thresholdRSRQ-OnAllSymbolsHigh-r12 RSRQ-Range + } OPTIONAL, -- Need OP + thresholdRSRQ-WB-r12 SEQUENCE { + thresholdRSRQ-WB-Low-r12 RSRQ-Range, + thresholdRSRQ-WB-High-r12 RSRQ-Range + } OPTIONAL, -- Need OP + + thresholdChannelUtilization-r12 SEQUENCE { + thresholdChannelUtilizationLow-r12 INTEGER (0..255), + thresholdChannelUtilizationHigh-r12 INTEGER (0..255) + } OPTIONAL, -- Need OR + thresholdBackhaul-Bandwidth-r12 SEQUENCE { + thresholdBackhaulDL-BandwidthLow-r12 WLAN-backhaulRate-r12, + thresholdBackhaulDL-BandwidthHigh-r12 WLAN-backhaulRate-r12, + thresholdBackhaulUL-BandwidthLow-r12 WLAN-backhaulRate-r12, + thresholdBackhaulUL-BandwidthHigh-r12 WLAN-backhaulRate-r12 + } OPTIONAL, -- Need OR + thresholdWLAN-RSSI-r12 SEQUENCE { + thresholdWLAN-RSSI-Low-r12 INTEGER (0..255), + thresholdWLAN-RSSI-High-r12 INTEGER (0..255) + } OPTIONAL, -- Need OR + offloadPreferenceIndicator-r12 BIT STRING (SIZE (16)) OPTIONAL, -- Need OR + t-SteeringWLAN-r12 T-Reselection OPTIONAL, -- Need OR + ... +} + +WLAN-backhaulRate-r12 ::= ENUMERATED + {r0, r4, r8, r16, r32, r64, r128, r256, r512, + r1024, r2048, r4096, r8192, r16384, r32768, r65536, r131072, + r262144, r524288, r1048576, r2097152, r4194304, r8388608, + r16777216, r33554432, r67108864, r134217728, r268435456, + r536870912, r1073741824, r2147483648, r4294967296} + + +MBMS-NotificationConfig-r9 ::= SEQUENCE { + notificationRepetitionCoeff-r9 ENUMERATED {n2, n4}, + notificationOffset-r9 INTEGER (0..10), + notificationSF-Index-r9 INTEGER (1..6) +} + +MBMS-NotificationConfig-v1430 ::= SEQUENCE { + notificationSF-Index-v1430 INTEGER (7..10) +} + + +MBMS-ServiceList-r13 ::= SEQUENCE (SIZE (0..maxMBMS-ServiceListPerUE-r13)) OF MBMS-ServiceInfo-r13 + +MBMS-ServiceInfo-r13 ::= SEQUENCE { + tmgi-r13 TMGI-r9 +} + + +MBSFN-AreaId-r12 ::= INTEGER (0..255) + + +MBSFN-AreaInfoList-r9 ::= SEQUENCE (SIZE(1..maxMBSFN-Area)) OF MBSFN-AreaInfo-r9 + +MBSFN-AreaInfo-r9 ::= SEQUENCE { + mbsfn-AreaId-r9 MBSFN-AreaId-r12, + non-MBSFNregionLength ENUMERATED {s1, s2}, + notificationIndicator-r9 INTEGER (0..7), + mcch-Config-r9 SEQUENCE { + mcch-RepetitionPeriod-r9 ENUMERATED {rf32, rf64, rf128, rf256}, + mcch-Offset-r9 INTEGER (0..10), + mcch-ModificationPeriod-r9 ENUMERATED {rf512, rf1024}, + sf-AllocInfo-r9 BIT STRING (SIZE(6)), + signallingMCS-r9 ENUMERATED {n2, n7, n13, n19} + }, + ..., + [[ mcch-Config-r14 SEQUENCE { + mcch-RepetitionPeriod-v1430 ENUMERATED {rf1, rf2, rf4, rf8, + rf16 } OPTIONAL, -- Need OR + mcch-ModificationPeriod-v1430 ENUMERATED {rf1, rf2, rf4, rf8, rf16, rf32, rf64, rf128, + rf256, spare7} OPTIONAL -- Need OR + } OPTIONAL, -- Need OR + subcarrierSpacingMBMS-r14 ENUMERATED {khz-7dot5, khz-1dot25} OPTIONAL -- Need OR + ]] +} + + +MBSFN-SubframeConfig ::= SEQUENCE { + radioframeAllocationPeriod ENUMERATED {n1, n2, n4, n8, n16, n32}, + radioframeAllocationOffset INTEGER (0..7), + subframeAllocation CHOICE { + oneFrame BIT STRING (SIZE(6)), + fourFrames BIT STRING (SIZE(24)) + } +} + +MBSFN-SubframeConfig-v1430 ::= SEQUENCE { + subframeAllocation-v1430 CHOICE { + oneFrame-v1430 BIT STRING (SIZE(2)), + fourFrames-v1430 BIT STRING (SIZE(8)) + } +} + + +PMCH-InfoList-r9 ::= SEQUENCE (SIZE (0..maxPMCH-PerMBSFN)) OF PMCH-Info-r9 + +PMCH-InfoListExt-r12 ::= SEQUENCE (SIZE (0..maxPMCH-PerMBSFN)) OF PMCH-InfoExt-r12 + +PMCH-Info-r9 ::= SEQUENCE { + pmch-Config-r9 PMCH-Config-r9, + mbms-SessionInfoList-r9 MBMS-SessionInfoList-r9, + ... +} + +PMCH-InfoExt-r12 ::= SEQUENCE { + pmch-Config-r12 PMCH-Config-r12, + mbms-SessionInfoList-r12 MBMS-SessionInfoList-r9, + ... +} + +MBMS-SessionInfoList-r9 ::= SEQUENCE (SIZE (0..maxSessionPerPMCH)) OF MBMS-SessionInfo-r9 + +MBMS-SessionInfo-r9 ::= SEQUENCE { + tmgi-r9 TMGI-r9, + sessionId-r9 OCTET STRING (SIZE (1)) OPTIONAL, -- Need OR + logicalChannelIdentity-r9 INTEGER (0..maxSessionPerPMCH-1), + ... +} + +PMCH-Config-r9 ::= SEQUENCE { + sf-AllocEnd-r9 INTEGER (0..1535), + dataMCS-r9 INTEGER (0..28), + mch-SchedulingPeriod-r9 ENUMERATED { + rf8, rf16, rf32, rf64, rf128, rf256, rf512, rf1024}, + ... +} + +PMCH-Config-r12 ::= SEQUENCE { + sf-AllocEnd-r12 INTEGER (0..1535), + dataMCS-r12 CHOICE { + normal-r12 INTEGER (0..28), + higerOrder-r12 INTEGER (0..27) + }, + mch-SchedulingPeriod-r12 ENUMERATED { + rf4, rf8, rf16, rf32, rf64, rf128, rf256, rf512, rf1024}, + ..., + [[ mch-SchedulingPeriod-v1430 ENUMERATED {rf1, rf2} OPTIONAL -- Need OR + ]] +} + +TMGI-r9 ::= SEQUENCE { + plmn-Id-r9 CHOICE { + plmn-Index-r9 INTEGER (1..maxPLMN-r11), + explicitValue-r9 PLMN-Identity + }, + serviceId-r9 OCTET STRING (SIZE (3)) +} + + +SC-MTCH-InfoList-r13 ::= SEQUENCE (SIZE (0..maxSC-MTCH-r13)) OF SC-MTCH-Info-r13 + +SC-MTCH-Info-r13 ::= SEQUENCE { + mbmsSessionInfo-r13 MBMSSessionInfo-r13, + g-RNTI-r13 BIT STRING(SIZE(16)), + sc-mtch-schedulingInfo-r13 SC-MTCH-SchedulingInfo-r13 OPTIONAL, -- Need OP + sc-mtch-neighbourCell-r13 BIT STRING (SIZE(maxNeighCell-SCPTM-r13)) OPTIONAL, -- Need OP + ..., + [[ p-a-r13 ENUMERATED { + dB-6, dB-4dot77, dB-3, dB-1dot77, + dB0, dB1, dB2, dB3} OPTIONAL -- Need ON + ]] +} + +MBMSSessionInfo-r13 ::= SEQUENCE { + tmgi-r13 TMGI-r9, + sessionId-r13 OCTET STRING (SIZE (1)) OPTIONAL -- Need OR +} + +SC-MTCH-SchedulingInfo-r13::= SEQUENCE { + onDurationTimerSCPTM-r13 ENUMERATED { + psf1, psf2, psf3, psf4, psf5, psf6, + psf8, psf10, psf20, psf30, psf40, + psf50, psf60, psf80, psf100, + psf200}, + drx-InactivityTimerSCPTM-r13 ENUMERATED { + psf0, psf1, psf2, psf4, psf8, + psf10, psf20, psf40, + psf80, psf160, ps320, + psf640, psf960, + psf1280, psf1920, psf2560}, + schedulingPeriodStartOffsetSCPTM-r13 CHOICE { + sf10 INTEGER(0..9), + sf20 INTEGER(0..19), + sf32 INTEGER(0..31), + sf40 INTEGER(0..39), + sf64 INTEGER(0..63), + sf80 INTEGER(0..79), + sf128 INTEGER(0..127), + sf160 INTEGER(0..159), + sf256 INTEGER(0..255), + sf320 INTEGER(0..319), + sf512 INTEGER(0..511), + sf640 INTEGER(0..639), + sf1024 INTEGER(0..1023), + sf2048 INTEGER(0..2048), + sf4096 INTEGER(0..4096), + sf8192 INTEGER(0..8192) + }, + ... +} + + +SC-MTCH-InfoList-BR-r14 ::= SEQUENCE (SIZE (0..maxSC-MTCH-BR-r14)) OF SC-MTCH-Info-BR-r14 + +SC-MTCH-Info-BR-r14 ::= SEQUENCE { + sc-mtch-CarrierFreq-r14 ARFCN-ValueEUTRA-r9, + mbmsSessionInfo-r14 MBMSSessionInfo-r13, + g-RNTI-r14 BIT STRING(SIZE(16)), + sc-mtch-schedulingInfo-r14 SC-MTCH-SchedulingInfo-BR-r14 OPTIONAL, -- Need OP + sc-mtch-neighbourCell-r14 BIT STRING (SIZE(maxNeighCell-SCPTM-r13)) OPTIONAL, -- Need OP + mpdcch-Narrowband-SC-MTCH-r14 INTEGER (1.. maxAvailNarrowBands-r13), + mpdcch-NumRepetition-SC-MTCH-r14 ENUMERATED {r1, r2, r4, r8, r16, + r32, r64, r128, r256}, + mpdcch-StartSF-SC-MTCH-r14 CHOICE { + fdd-r14 ENUMERATED {v1, v1dot5, v2, v2dot5, v4, + v5, v8, v10}, + tdd-r14 ENUMERATED {v1, v2, v4, v5, v8, v10, + v20} + }, + mpdcch-PDSCH-HoppingConfig-SC-MTCH-r14 ENUMERATED {on, off}, + mpdcch-PDSCH-CEmodeConfig-SC-MTCH-r14 ENUMERATED {ce-ModeA, ce-ModeB}, + mpdcch-PDSCH-MaxBandwidth-SC-MTCH-r14 ENUMERATED {bw1dot4, bw5}, + mpdcch-Offset-SC-MTCH-r14 ENUMERATED {zero, oneEighth, oneQuarter, + threeEighth, oneHalf, fiveEighth, + threeQuarter, sevenEighth}, + + p-a-r14 ENUMERATED { dB-6, dB-4dot77, dB-3, + dB-1dot77, dB0, dB1, dB2, + dB3} OPTIONAL,-- Need OR + ... +} + +SC-MTCH-SchedulingInfo-BR-r14::= SEQUENCE { + onDurationTimerSCPTM-r14 ENUMERATED { + psf300, psf400, psf500, psf600, + psf800, psf1000, psf1200, psf1600}, + drx-InactivityTimerSCPTM-r14 ENUMERATED { + psf0, psf1, psf2, psf4, psf8, psf16, + psf32, psf64, psf128, psf256, ps512, + psf1024, psf2048, psf4096, psf8192, psf16384}, + schedulingPeriodStartOffsetSCPTM-r14 CHOICE { + sf10 INTEGER(0..9), + sf20 INTEGER(0..19), + sf32 INTEGER(0..31), + sf40 INTEGER(0..39), + sf64 INTEGER(0..63), + sf80 INTEGER(0..79), + sf128 INTEGER(0..127), + sf160 INTEGER(0..159), + sf256 INTEGER(0..255), + sf320 INTEGER(0..319), + sf512 INTEGER(0..511), + sf640 INTEGER(0..639), + sf1024 INTEGER(0..1023), + sf2048 INTEGER(0..2047), + sf4096 INTEGER(0..4095), + sf8192 INTEGER(0..8191) + }, + ... +} + + +SCPTM-NeighbourCellList-r13 ::= SEQUENCE (SIZE (1..maxNeighCell-SCPTM-r13)) OF PCI-ARFCN-r13 + +PCI-ARFCN-r13 ::= SEQUENCE { + physCellId-r13 PhysCellId, + carrierFreq-r13 ARFCN-ValueEUTRA-r9 OPTIONAL +} + + +SL-AnchorCarrierFreqList-V2X-r14 ::= SEQUENCE (SIZE (1..maxFreqV2X-r14)) OF ARFCN-ValueEUTRA-r9 + + +SL-CBR-CommonTxConfigList-r14 ::= SEQUENCE { + cbr-RangeCommonConfigList-r14 SEQUENCE (SIZE (1..maxSL-V2X-CBRConfig-r14)) OF SL-CBR-Levels-Config-r14, + sl-CBR-PSSCH-TxConfigList-r14 SEQUENCE (SIZE (1..maxSL-V2X-TxConfig-r14)) OF SL-CBR-PSSCH-TxConfig-r14 +} + +SL-CBR-Levels-Config-r14 ::= SEQUENCE (SIZE (1..maxCBR-Level-r14)) OF SL-CBR-r14 + + +SL-CBR-PSSCH-TxConfig-r14 ::= SEQUENCE { + cr-Limit-r14 INTEGER(0..10000), + tx-Parameters-r14 SL-PSSCH-TxParameters-r14 +} + +SL-CBR-r14 ::= INTEGER(0..100) + + +SL-CBR-PPPP-TxConfigList-r14 ::= SEQUENCE (SIZE (1..8)) OF SL-PPPP-TxConfigIndex-r14 + +SL-PPPP-TxConfigIndex-r14 ::= SEQUENCE { + priorityThreshold-r14 SL-Priority-r13, + defaultTxConfigIndex-r14 INTEGER(0..maxCBR-Level-1-r14), + cbr-ConfigIndex-r14 INTEGER(0..maxSL-V2X-CBRConfig-1-r14), + tx-ConfigIndexList-r14 SEQUENCE (SIZE (1..maxCBR-Level-r14)) OF Tx-ConfigIndex-r14 +} + +Tx-ConfigIndex-r14 ::= INTEGER(0..maxSL-V2X-TxConfig-1-r14) + +SL-CBR-PPPP-TxConfigList-v1530 ::= SEQUENCE (SIZE (1..8)) OF SL-PPPP-TxConfigIndex-v1530 + +SL-PPPP-TxConfigIndex-v1530 ::= SEQUENCE { + mcs-PSSCH-RangeList-r15 SEQUENCE (SIZE (1..maxCBR-Level-r14)) OF MCS-PSSCH-Range-r15 OPTIONAL --Need OR +} + +MCS-PSSCH-Range-r15 ::= SEQUENCE{ + minMCS-PSSCH-r15 INTEGER (0..31), + maxMCS-PSSCH-r15 INTEGER (0..31) +} + +SL-CBR-PPPP-TxConfigList-r15 ::= SEQUENCE (SIZE (1..8)) OF SL-PPPP-TxConfigIndex-r15 + +SL-PPPP-TxConfigIndex-r15 ::= SEQUENCE { + priorityThreshold-r15 SL-Priority-r13, + defaultTxConfigIndex-r15 INTEGER(0..maxCBR-Level-1-r14), + cbr-ConfigIndex-r15 INTEGER(0..maxSL-V2X-CBRConfig-1-r14), + tx-ConfigIndexList-r15 SEQUENCE (SIZE (1..maxCBR-Level-r14)) OF Tx-ConfigIndex-r14, + mcs-PSSCH-RangeList-r15 SEQUENCE (SIZE (1..maxCBR-Level-r14)) OF MCS-PSSCH-Range-r15 +} + + +SL-CommConfig-r12 ::= SEQUENCE { + commTxResources-r12 CHOICE { + release NULL, + setup CHOICE { + scheduled-r12 SEQUENCE { + sl-RNTI-r12 C-RNTI, + mac-MainConfig-r12 MAC-MainConfigSL-r12, + sc-CommTxConfig-r12 SL-CommResourcePool-r12, + mcs-r12 INTEGER (0..28) OPTIONAL -- Need OP + }, + ue-Selected-r12 SEQUENCE { + -- Pool for normal usage + commTxPoolNormalDedicated-r12 SEQUENCE { + poolToReleaseList-r12 SL-TxPoolToReleaseList-r12 OPTIONAL, -- Need ON + poolToAddModList-r12 SL-CommTxPoolToAddModList-r12 OPTIONAL -- Need ON + } + } + } + } OPTIONAL, -- Need ON + ..., + [[ commTxResources-v1310 CHOICE { + release NULL, + setup CHOICE { + scheduled-v1310 SEQUENCE { + logicalChGroupInfoList-r13 LogicalChGroupInfoList-r13, + multipleTx-r13 BOOLEAN + }, + ue-Selected-v1310 SEQUENCE { + commTxPoolNormalDedicatedExt-r13 SEQUENCE { + poolToReleaseListExt-r13 SL-TxPoolToReleaseListExt-r13 OPTIONAL, -- Need ON + poolToAddModListExt-r13 SL-CommTxPoolToAddModListExt-r13 OPTIONAL -- Need ON + } + } + } + } OPTIONAL, -- Need ON + commTxAllowRelayDedicated-r13 BOOLEAN OPTIONAL -- Need ON + ]] +} + +LogicalChGroupInfoList-r13 ::= SEQUENCE (SIZE (1..maxLCG-r13)) OF SL-PriorityList-r13 + +SL-CommTxPoolToAddModList-r12 ::= SEQUENCE (SIZE (1..maxSL-TxPool-r12)) OF SL-CommTxPoolToAddMod-r12 + +SL-CommTxPoolToAddModListExt-r13 ::= SEQUENCE (SIZE (1..maxSL-TxPool-v1310)) OF SL-CommTxPoolToAddModExt-r13 + +SL-CommTxPoolToAddMod-r12 ::= SEQUENCE { + poolIdentity-r12 SL-TxPoolIdentity-r12, + pool-r12 SL-CommResourcePool-r12 +} + +SL-CommTxPoolToAddModExt-r13 ::= SEQUENCE { + poolIdentity-v1310 SL-TxPoolIdentity-v1310, + pool-r13 SL-CommResourcePool-r12 +} + +MAC-MainConfigSL-r12 ::= SEQUENCE { + periodic-BSR-TimerSL PeriodicBSR-Timer-r12 OPTIONAL, -- Need ON + retx-BSR-TimerSL RetxBSR-Timer-r12 +} + + +SL-CommTxPoolList-r12 ::= SEQUENCE (SIZE (1..maxSL-TxPool-r12)) OF SL-CommResourcePool-r12 + +SL-CommTxPoolListExt-r13 ::= SEQUENCE (SIZE (1..maxSL-TxPool-v1310)) OF SL-CommResourcePool-r12 + +SL-CommTxPoolListV2X-r14 ::= SEQUENCE (SIZE (1..maxSL-V2X-TxPool-r14)) OF SL-CommResourcePoolV2X-r14 + +SL-CommRxPoolList-r12 ::= SEQUENCE (SIZE (1..maxSL-RxPool-r12)) OF SL-CommResourcePool-r12 + +SL-CommRxPoolListV2X-r14 ::= SEQUENCE (SIZE (1..maxSL-V2X-RxPool-r14)) OF SL-CommResourcePoolV2X-r14 + +SL-CommResourcePool-r12 ::= SEQUENCE { + sc-CP-Len-r12 SL-CP-Len-r12, + sc-Period-r12 SL-PeriodComm-r12, + sc-TF-ResourceConfig-r12 SL-TF-ResourceConfig-r12, + data-CP-Len-r12 SL-CP-Len-r12, + dataHoppingConfig-r12 SL-HoppingConfigComm-r12, + ue-SelectedResourceConfig-r12 SEQUENCE { + data-TF-ResourceConfig-r12 SL-TF-ResourceConfig-r12, + trpt-Subset-r12 SL-TRPT-Subset-r12 OPTIONAL -- Need OP + } OPTIONAL, -- Need OR + rxParametersNCell-r12 SEQUENCE { + tdd-Config-r12 TDD-Config OPTIONAL, -- Need OP + syncConfigIndex-r12 INTEGER (0..15) + } OPTIONAL, -- Need OR + txParameters-r12 SEQUENCE { + sc-TxParameters-r12 SL-TxParameters-r12, + dataTxParameters-r12 SL-TxParameters-r12 + } OPTIONAL, -- Cond Tx + ..., + [[ priorityList-r13 SL-PriorityList-r13 OPTIONAL -- Cond Tx + ]] + +} + +SL-CommResourcePoolV2X-r14 ::= SEQUENCE { + sl-OffsetIndicator-r14 SL-OffsetIndicator-r12 OPTIONAL, -- Need OR + sl-Subframe-r14 SubframeBitmapSL-r14, + adjacencyPSCCH-PSSCH-r14 BOOLEAN, + sizeSubchannel-r14 ENUMERATED { + n4, n5, n6, n8, n9, n10, n12, n15, n16, n18, n20, n25, n30, + n48, n50, n72, n75, n96, n100, spare13, spare12, spare11, + spare10, spare9, spare8, spare7, spare6, spare5, spare4, + spare3, spare2, spare1}, + numSubchannel-r14 ENUMERATED {n1, n3, n5, n8, n10, n15, n20, spare1}, + startRB-Subchannel-r14 INTEGER (0..99), + startRB-PSCCH-Pool-r14 INTEGER (0..99) OPTIONAL, -- Need OR + rxParametersNCell-r14 SEQUENCE { + tdd-Config-r14 TDD-Config OPTIONAL, -- Need OP + syncConfigIndex-r14 INTEGER (0..15) + } OPTIONAL, -- Need OR + dataTxParameters-r14 SL-TxParameters-r12 OPTIONAL, -- Cond Tx + zoneID-r14 INTEGER (0..7) OPTIONAL, -- Need OR + threshS-RSSI-CBR-r14 INTEGER (0..45) OPTIONAL, -- Need OR + poolReportId-r14 SL-V2X-TxPoolReportIdentity-r14 OPTIONAL, -- Need OR + cbr-pssch-TxConfigList-r14 SL-CBR-PPPP-TxConfigList-r14 OPTIONAL, -- Need OR + resourceSelectionConfigP2X-r14 SL-P2X-ResourceSelectionConfig-r14 OPTIONAL, -- Cond P2X + syncAllowed-r14 SL-SyncAllowed-r14 OPTIONAL, -- Need OR + restrictResourceReservationPeriod-r14 SL-RestrictResourceReservationPeriodList-r14 OPTIONAL, -- Need OR + ..., + [[ sl-MinT2ValueList-r15 SL-MinT2ValueList-r15 OPTIONAL, -- Need OR + cbr-pssch-TxConfigList-v1530 SL-CBR-PPPP-TxConfigList-v1530 OPTIONAL -- Need OR + ]] +} + +SL-TRPT-Subset-r12 ::= BIT STRING (SIZE (3..5)) + +SL-V2X-TxPoolReportIdentity-r14::= INTEGER (1..maxSL-PoolToMeasure-r14) + +SL-MinT2ValueList-r15 ::= SEQUENCE (SIZE (1..maxSL-Prio-r13)) OF SL-MinT2Value-r15 + +SL-MinT2Value-r15 ::= SEQUENCE { + priorityList-r15 SL-PriorityList-r13, + minT2Value-r15 INTEGER (10..20) +} + + +SL-CommTxPoolSensingConfig-r14 ::= SEQUENCE { + pssch-TxConfigList-r14 SL-PSSCH-TxConfigList-r14, + thresPSSCH-RSRP-List-r14 SL-ThresPSSCH-RSRP-List-r14, + restrictResourceReservationPeriod-r14 SL-RestrictResourceReservationPeriodList-r14 OPTIONAL, -- Need OR + probResourceKeep-r14 ENUMERATED {v0, v0dot2, v0dot4, v0dot6, v0dot8, + spare3,spare2, spare1}, + p2x-SensingConfig-r14 SEQUENCE { + minNumCandidateSF-r14 INTEGER (1..13), + gapCandidateSensing-r14 BIT STRING (SIZE (10)) + } OPTIONAL, -- Need OR + sl-ReselectAfter-r14 ENUMERATED {n1, n2, n3, n4, n5, n6, n7, n8, n9, + spare7, spare6, spare5, spare4, spare3, spare2, + spare1} OPTIONAL -- Need OR +} + + +SL-CP-Len-r12 ::= ENUMERATED {normal, extended} + + +SL-DiscConfig-r12 ::= SEQUENCE { + discTxResources-r12 CHOICE { + release NULL, + setup CHOICE { + scheduled-r12 SEQUENCE { + discTxConfig-r12 SL-DiscResourcePool-r12 OPTIONAL, -- Need ON + discTF-IndexList-r12 SL-TF-IndexPairList-r12 OPTIONAL, -- Need ON + discHoppingConfig-r12 SL-HoppingConfigDisc-r12 + OPTIONAL -- Need ON + }, + ue-Selected-r12 SEQUENCE { + discTxPoolDedicated-r12 SEQUENCE { + poolToReleaseList-r12 SL-TxPoolToReleaseList-r12 OPTIONAL, -- Need ON + poolToAddModList-r12 SL-DiscTxPoolToAddModList-r12 OPTIONAL -- Need ON + } OPTIONAL -- Need ON + } + } + } OPTIONAL, -- Need ON + ..., + [[ discTF-IndexList-v1260 CHOICE { + release NULL, + setup SEQUENCE { + discTF-IndexList-r12b SL-TF-IndexPairList-r12b + } + } OPTIONAL -- Need ON + ]], + [[ discTxResourcesPS-r13 CHOICE { + release NULL, + setup CHOICE { + scheduled-r13 SL-DiscTxConfigScheduled-r13, + ue-Selected-r13 SEQUENCE { + discTxPoolPS-Dedicated-r13 SL-DiscTxPoolDedicated-r13 + } + } + } OPTIONAL, -- Need ON + discTxInterFreqInfo-r13 CHOICE { + release NULL, + setup SEQUENCE { + discTxCarrierFreq-r13 ARFCN-ValueEUTRA-r9 OPTIONAL, -- Need OR + discTxRefCarrierDedicated-r13 SL-DiscTxRefCarrierDedicated-r13 OPTIONAL, -- Need OR + discTxInfoInterFreqListAdd-r13 SL-DiscTxInfoInterFreqListAdd-r13 OPTIONAL -- Need ON + } + } OPTIONAL, -- Need ON + gapRequestsAllowedDedicated-r13 BOOLEAN OPTIONAL, -- Need ON + discRxGapConfig-r13 CHOICE { + release NULL, + setup SL-GapConfig-r13 + } OPTIONAL, -- Need ON + discTxGapConfig-r13 CHOICE { + release NULL, + setup SL-GapConfig-r13 + } OPTIONAL, -- Need ON + discSysInfoToReportConfig-r13 CHOICE { + release NULL, + setup SL-DiscSysInfoToReportFreqList-r13 + } OPTIONAL -- Need ON + ]] +} + +SL-DiscSysInfoToReportFreqList-r13 ::= SEQUENCE (SIZE (1..maxFreq)) OF ARFCN-ValueEUTRA-r9 + +SL-DiscTxInfoInterFreqListAdd-r13 ::= SEQUENCE { + discTxFreqToAddModList-r13 SEQUENCE (SIZE (1..maxFreq)) OF SL-DiscTxResourceInfoPerFreq-r13 OPTIONAL, -- Need ON + discTxFreqToReleaseList-r13 SEQUENCE (SIZE (1..maxFreq)) OF ARFCN-ValueEUTRA-r9 OPTIONAL, -- Need ON + ... +} + +SL-DiscTxResourceInfoPerFreq-r13 ::= SEQUENCE { + discTxCarrierFreq-r13 ARFCN-ValueEUTRA-r9, + discTxResources-r13 SL-DiscTxResource-r13 OPTIONAL, -- Need OR + discTxResourcesPS-r13 SL-DiscTxResource-r13 OPTIONAL, -- Need OR + discTxRefCarrierDedicated-r13 SL-DiscTxRefCarrierDedicated-r13 OPTIONAL, -- Need OR + discCellSelectionInfo-r13 CellSelectionInfoNFreq-r13 OPTIONAL, -- Need OR + ... +} + +SL-DiscTxResource-r13 ::= CHOICE { + release NULL, + setup CHOICE { + scheduled-r13 SL-DiscTxConfigScheduled-r13, + ue-Selected-r13 SL-DiscTxPoolDedicated-r13 + } +} + +SL-DiscTxPoolToAddModList-r12 ::= SEQUENCE (SIZE (1..maxSL-TxPool-r12)) OF SL-DiscTxPoolToAddMod-r12 + +SL-DiscTxPoolToAddMod-r12 ::= SEQUENCE { + poolIdentity-r12 SL-TxPoolIdentity-r12, + pool-r12 SL-DiscResourcePool-r12 +} + +SL-DiscTxConfigScheduled-r13 ::= SEQUENCE { + discTxConfig-r13 SL-DiscResourcePool-r12 OPTIONAL, -- Need ON + discTF-IndexList-r13 SL-TF-IndexPairList-r12b OPTIONAL, -- Need ON + discHoppingConfig-r13 SL-HoppingConfigDisc-r12 OPTIONAL,-- Need ON + ... +} + +SL-DiscTxPoolDedicated-r13 ::= SEQUENCE { + poolToReleaseList-r13 SL-TxPoolToReleaseList-r12 OPTIONAL, -- Need ON + poolToAddModList-r13 SL-DiscTxPoolToAddModList-r12 OPTIONAL -- Need ON +} + +SL-TF-IndexPairList-r12 ::= SEQUENCE (SIZE (1..maxSL-TF-IndexPair-r12)) OF SL-TF-IndexPair-r12 + +SL-TF-IndexPair-r12 ::= SEQUENCE { + discSF-Index-r12 INTEGER (1.. 200) OPTIONAL, -- Need ON + discPRB-Index-r12 INTEGER (1.. 50) OPTIONAL -- Need ON +} + +SL-TF-IndexPairList-r12b ::= SEQUENCE (SIZE (1..maxSL-TF-IndexPair-r12)) OF SL-TF-IndexPair-r12b + +SL-TF-IndexPair-r12b ::= SEQUENCE { + discSF-Index-r12b INTEGER (0..209) OPTIONAL, -- Need ON + discPRB-Index-r12b INTEGER (0..49) OPTIONAL -- Need ON +} + +SL-DiscTxRefCarrierDedicated-r13 ::= CHOICE { + pCell NULL, + sCell SCellIndex-r10 +} + + +SL-DiscTxPoolList-r12 ::= SEQUENCE (SIZE (1..maxSL-TxPool-r12)) OF SL-DiscResourcePool-r12 + +SL-DiscRxPoolList-r12 ::= SEQUENCE (SIZE (1..maxSL-RxPool-r12)) OF SL-DiscResourcePool-r12 + +SL-DiscResourcePool-r12 ::= SEQUENCE { + cp-Len-r12 SL-CP-Len-r12, + discPeriod-r12 ENUMERATED {rf32, rf64, rf128, + rf256, rf512, rf1024, rf16-v1310, spare}, + numRetx-r12 INTEGER (0..3), + numRepetition-r12 INTEGER (1..50), + tf-ResourceConfig-r12 SL-TF-ResourceConfig-r12, + txParameters-r12 SEQUENCE { + txParametersGeneral-r12 SL-TxParameters-r12, + ue-SelectedResourceConfig-r12 SEQUENCE { + poolSelection-r12 CHOICE { + rsrpBased-r12 SL-PoolSelectionConfig-r12, + random-r12 NULL + }, + txProbability-r12 ENUMERATED {p25, p50, p75, p100} + } OPTIONAL -- Need OR + } OPTIONAL, -- Cond Tx + rxParameters-r12 SEQUENCE { + tdd-Config-r12 TDD-Config OPTIONAL, -- Need OR + syncConfigIndex-r12 INTEGER (0..15) + } OPTIONAL, -- Need OR + ..., + [[ discPeriod-v1310 CHOICE { + release NULL, + setup ENUMERATED {rf4, rf6, rf7, rf8, + rf12, rf14, rf24, rf28} + } OPTIONAL, -- Need ON + rxParamsAddNeighFreq-r13 CHOICE { + release NULL, + setup SEQUENCE { + physCellId-r13 PhysCellIdList-r13 + } + } OPTIONAL, -- Need ON + txParamsAddNeighFreq-r13 CHOICE { + release NULL, + setup SEQUENCE { + physCellId-r13 PhysCellIdList-r13, + p-Max P-Max OPTIONAL, -- Need OP + tdd-Config-r13 TDD-Config OPTIONAL, -- Cond TDD-OR + tdd-Config-v1130 TDD-Config-v1130 OPTIONAL, -- Cond TDD-OR + freqInfo SEQUENCE { + ul-CarrierFreq ARFCN-ValueEUTRA OPTIONAL, -- Need OP + ul-Bandwidth ENUMERATED {n6, n15, n25, n50, n75, n100} + OPTIONAL, -- Need OP + additionalSpectrumEmission AdditionalSpectrumEmission + }, + referenceSignalPower INTEGER (-60..50), + syncConfigIndex-r13 INTEGER (0..15) OPTIONAL -- Need OR + } + } OPTIONAL -- Need ON + ]], + [[ txParamsAddNeighFreq-v1370 CHOICE { + release NULL, + setup SEQUENCE { + freqInfo-v1370 SEQUENCE { + additionalSpectrumEmission-v1370 AdditionalSpectrumEmission-v10l0 + } + } + } OPTIONAL -- Need ON + ]] +} + +PhysCellIdList-r13 ::= SEQUENCE (SIZE (1.. maxSL-DiscCells-r13)) OF PhysCellId + +SL-PoolSelectionConfig-r12 ::= SEQUENCE { + threshLow-r12 RSRP-RangeSL2-r12, + threshHigh-r12 RSRP-RangeSL2-r12 +} + + +SL-DiscSysInfoReport-r13 ::= SEQUENCE { + plmn-IdentityList-r13 PLMN-IdentityList OPTIONAL, + cellIdentity-13 CellIdentity OPTIONAL, + carrierFreqInfo-13 ARFCN-ValueEUTRA-r9 OPTIONAL, + discRxResources-r13 SL-DiscRxPoolList-r12 OPTIONAL, + discTxPoolCommon-r13 SL-DiscTxPoolList-r12 OPTIONAL, + discTxPowerInfo-r13 SL-DiscTxPowerInfoList-r12 OPTIONAL, + discSyncConfig-r13 SL-SyncConfigNFreq-r13 OPTIONAL, + discCellSelectionInfo-r13 SEQUENCE { + q-RxLevMin-r13 Q-RxLevMin, + q-RxLevMinOffset-r13 INTEGER (1..8) OPTIONAL + } OPTIONAL, + cellReselectionInfo-r13 SEQUENCE { + q-Hyst-r13 ENUMERATED { + dB0, dB1, dB2, dB3, dB4, dB5, dB6, dB8, dB10, + dB12, dB14, dB16, dB18, dB20, dB22, dB24}, + q-RxLevMin-r13 Q-RxLevMin, + t-ReselectionEUTRA-r13 T-Reselection + } OPTIONAL, + tdd-Config-r13 TDD-Config OPTIONAL, + freqInfo-r13 SEQUENCE { + ul-CarrierFreq-r13 ARFCN-ValueEUTRA OPTIONAL, + ul-Bandwidth-r13 ENUMERATED {n6, n15, n25, n50, n75, n100} + OPTIONAL, + additionalSpectrumEmission-r13 AdditionalSpectrumEmission OPTIONAL + } OPTIONAL, + p-Max-r13 P-Max OPTIONAL, + referenceSignalPower-r13 INTEGER (-60..50) OPTIONAL, + ..., + [[ + freqInfo-v1370 SEQUENCE { + additionalSpectrumEmission-v1370 AdditionalSpectrumEmission-v10l0 + } OPTIONAL + ]] +} + + +SL-DiscTxPowerInfoList-r12 ::= SEQUENCE (SIZE (maxSL-DiscPowerClass-r12)) OF SL-DiscTxPowerInfo-r12 + +SL-DiscTxPowerInfo-r12 ::= SEQUENCE { + discMaxTxPower-r12 P-Max, + ... +} + + +SL-GapConfig-r13 ::= SEQUENCE { + gapPatternList-r13 SL-GapPatternList-r13 +} + +SL-GapPatternList-r13 ::= SEQUENCE (SIZE (1..maxSL-GP-r13)) OF SL-GapPattern-r13 + +SL-GapPattern-r13 ::= SEQUENCE { + gapPeriod-r13 ENUMERATED {sf40, sf60, sf70, sf80, sf120, sf140, sf160, + sf240, sf280, sf320, sf640, sf1280, sf2560, sf5120, + sf10240}, + gapOffset-r12 SL-OffsetIndicator-r12, + gapSubframeBitmap-r13 BIT STRING (SIZE (1..10240)), + ... +} + + +SL-GapRequest-r13 ::= SEQUENCE (SIZE (1..maxFreq)) OF SL-GapFreqInfo-r13 + +SL-GapFreqInfo-r13 ::= SEQUENCE { + carrierFreq-r13 ARFCN-ValueEUTRA-r9 OPTIONAL, + gapPatternList-r13 SL-GapPatternList-r13 +} + + +SL-HoppingConfigComm-r12 ::= SEQUENCE { + hoppingParameter-r12 INTEGER (0..504), + numSubbands-r12 ENUMERATED {ns1, ns2, ns4}, + rb-Offset-r12 INTEGER (0..110) +} + +SL-HoppingConfigDisc-r12 ::= SEQUENCE { + a-r12 INTEGER (1..200), + b-r12 INTEGER (1..10), + c-r12 ENUMERATED {n1, n5} +} + + +SL-InterFreqInfoListV2X-r14 ::= SEQUENCE (SIZE (0..maxFreqV2X-1-r14)) OF SL-InterFreqInfoV2X-r14 + +SL-InterFreqInfoV2X-r14 ::= SEQUENCE { + plmn-IdentityList-r14 PLMN-IdentityList OPTIONAL, -- Need OP + v2x-CommCarrierFreq-r14 ARFCN-ValueEUTRA-r9, + sl-MaxTxPower-r14 P-Max OPTIONAL, -- Need OR + sl-Bandwidth-r14 ENUMERATED {n6, n15, n25, n50, n75, n100} OPTIONAL, -- Need OR + v2x-SchedulingPool-r14 SL-CommResourcePoolV2X-r14 OPTIONAL, -- Need OR + v2x-UE-ConfigList-r14 SL-V2X-UE-ConfigList-r14 OPTIONAL, -- Need OR + ..., + [[ additionalSpectrumEmissionV2X-r14 CHOICE { + additionalSpectrumEmission-r14 AdditionalSpectrumEmission, + additionalSpectrumEmission-v1440 AdditionalSpectrumEmission-v10l0 + } OPTIONAL -- Need ON + ]], + [[ v2x-FreqSelectionConfigList-r15 SL-V2X-FreqSelectionConfigList-r15 OPTIONAL --Need OR + ]] +} + + +SL-V2X-UE-ConfigList-r14 ::= SEQUENCE (SIZE (1.. maxCellIntra)) OF SL-V2X-InterFreqUE-Config-r14 + +SL-V2X-InterFreqUE-Config-r14 ::= SEQUENCE { + physCellIdList-r14 PhysCellIdList-r13 OPTIONAL, -- Need OR + typeTxSync-r14 SL-TypeTxSync-r14 OPTIONAL, -- Need OR + v2x-SyncConfig-r14 SL-SyncConfigListNFreqV2X-r14 OPTIONAL, -- Need OR + v2x-CommRxPool-r14 SL-CommRxPoolListV2X-r14 OPTIONAL, -- Need OR + v2x-CommTxPoolNormal-r14 SL-CommTxPoolListV2X-r14 OPTIONAL, -- Need OR + p2x-CommTxPoolNormal-r14 SL-CommTxPoolListV2X-r14 OPTIONAL, -- Need OR + v2x-CommTxPoolExceptional-r14 SL-CommResourcePoolV2X-r14 OPTIONAL, -- Need OR + v2x-ResourceSelectionConfig-r14 SL-CommTxPoolSensingConfig-r14 OPTIONAL, -- Need OR + zoneConfig-r14 SL-ZoneConfig-r14 OPTIONAL, -- Need OR + offsetDFN-r14 INTEGER (0..1000) OPTIONAL, -- Need OR + ... +} + + +SL-OffsetIndicator-r12 ::= CHOICE { + small-r12 INTEGER (0..319), + large-r12 INTEGER (0..10239) +} + +SL-OffsetIndicatorSync-r12 ::= INTEGER (0..39) + +SL-OffsetIndicatorSync-v1430 ::= INTEGER (40..159) + +SL-OffsetIndicatorSync-r14 ::= INTEGER (0..159) + + +SL-P2X-ResourceSelectionConfig-r14 ::= SEQUENCE { + partialSensing-r14 ENUMERATED {true} OPTIONAL, -- Need OR + randomSelection-r14 ENUMERATED {true} OPTIONAL -- Need OR +} + + +SL-PeriodComm-r12 ::= ENUMERATED {sf40, sf60, sf70, sf80, sf120, sf140, + sf160, sf240, sf280, sf320, spare6, spare5, + spare4, spare3, spare2, spare} + + +SL-PriorityList-r13 ::= SEQUENCE (SIZE (1..maxSL-Prio-r13)) OF SL-Priority-r13 + +SL-Priority-r13 ::= INTEGER (1..8) + + +SL-PSSCH-TxConfigList-r14 ::= SEQUENCE (SIZE (1..maxPSSCH-TxConfig-r14)) OF SL-PSSCH-TxConfig-r14 + +SL-PSSCH-TxConfig-r14 ::= SEQUENCE { + typeTxSync-r14 SL-TypeTxSync-r14 OPTIONAL, -- Need OR + thresUE-Speed-r14 ENUMERATED {kmph60, kmph80, kmph100, kmph120, + kmph140, kmph160, kmph180, kmph200}, + parametersAboveThres-r14 SL-PSSCH-TxParameters-r14, + parametersBelowThres-r14 SL-PSSCH-TxParameters-r14, + ..., + [[ parametersAboveThres-v1530 SL-PSSCH-TxParameters-v1530 OPTIONAL, -- Need OR + parametersBelowThres-v1530 SL-PSSCH-TxParameters-v1530 OPTIONAL -- Need OR + ]] +} + +SL-PSSCH-TxParameters-r14 ::= SEQUENCE { + minMCS-PSSCH-r14 INTEGER (0..31), + maxMCS-PSSCH-r14 INTEGER (0..31), + minSubChannel-NumberPSSCH-r14 INTEGER (1..20), + maxSubchannel-NumberPSSCH-r14 INTEGER (1..20), + allowedRetxNumberPSSCH-r14 ENUMERATED {n0, n1, both, spare1}, + maxTxPower-r14 SL-TxPower-r14 OPTIONAL -- Cond CBR +} + +SL-PSSCH-TxParameters-v1530 ::= SEQUENCE { + minMCS-PSSCH-r15 INTEGER (0..31), + maxMCS-PSSCH-r15 INTEGER (0..31) +} + + +SL-ReliabilityList-r15 ::= SEQUENCE (SIZE (1..maxSL-Reliability-r15)) OF SL-Reliability-r15 + +SL-Reliability-r15 ::= INTEGER (1..8) + + +SL-RestrictResourceReservationPeriodList-r14 ::= SEQUENCE (SIZE (1..maxReservationPeriod-r14)) OF SL-RestrictResourceReservationPeriod-r14 + +SL-RestrictResourceReservationPeriod-r14 ::= ENUMERATED {v0dot2, v0dot5, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, spare4,spare3, spare2, spare1} + + +SLSSID-r12 ::= INTEGER (0..167) + + +SL-SyncAllowed-r14 ::= SEQUENCE { + gnss-Sync-r14 ENUMERATED {true} OPTIONAL, -- Need OR + enb-Sync-r14 ENUMERATED {true} OPTIONAL, -- Need OR + ue-Sync-r14 ENUMERATED {true} OPTIONAL -- Need OR +} + + +SL-SyncConfigList-r12 ::= SEQUENCE (SIZE (1..maxSL-SyncConfig-r12)) OF SL-SyncConfig-r12 + +SL-SyncConfigListV2X-r14 ::= SEQUENCE (SIZE (1.. maxSL-V2X-SyncConfig-r14)) OF SL-SyncConfig-r12 + +SL-SyncConfig-r12 ::= SEQUENCE { + syncCP-Len-r12 SL-CP-Len-r12, + syncOffsetIndicator-r12 SL-OffsetIndicatorSync-r12, + slssid-r12 SLSSID-r12, + txParameters-r12 SEQUENCE { + syncTxParameters-r12 SL-TxParameters-r12, + syncTxThreshIC-r12 RSRP-RangeSL-r12, + syncInfoReserved-r12 BIT STRING (SIZE (19)) OPTIONAL -- Need OR + } OPTIONAL, -- Need OR + rxParamsNCell-r12 SEQUENCE { + physCellId-r12 PhysCellId, + discSyncWindow-r12 ENUMERATED {w1, w2} + } OPTIONAL, -- Need OR + ..., + [[ syncTxPeriodic-r13 ENUMERATED {true} OPTIONAL -- Need OR + ]], + [[ syncOffsetIndicator-v1430 SL-OffsetIndicatorSync-v1430 OPTIONAL, -- Need OR + gnss-Sync-r14 ENUMERATED {true} OPTIONAL -- Need OR + ]], + [[ syncOffsetIndicator2-r14 SL-OffsetIndicatorSync-r14 OPTIONAL, -- Need OR + syncOffsetIndicator3-r14 SL-OffsetIndicatorSync-r14 OPTIONAL -- Need OR + ]], + [[ slss-TxDisabled-r15 ENUMERATED {true} OPTIONAL -- Need OR + ]] +} + +SL-SyncConfigListNFreq-r13 ::= SEQUENCE (SIZE (1..maxSL-SyncConfig-r12)) OF SL-SyncConfigNFreq-r13 + +SL-SyncConfigListNFreqV2X-r14 ::= SEQUENCE (SIZE (1..maxSL-V2X-SyncConfig-r14)) OF SL-SyncConfigNFreq-r13 + +SL-SyncConfigNFreq-r13 ::= SEQUENCE { + asyncParameters-r13 SEQUENCE { + syncCP-Len-r13 SL-CP-Len-r12, + syncOffsetIndicator-r13 SL-OffsetIndicatorSync-r12, + slssid-r13 SLSSID-r12 + } OPTIONAL, -- Need OR + txParameters-r13 SEQUENCE { + syncTxParameters-r13 SL-TxParameters-r12, + syncTxThreshIC-r13 RSRP-RangeSL-r12, + syncInfoReserved-r13 BIT STRING (SIZE (19)) OPTIONAL, -- Need OR + syncTxPeriodic-r13 ENUMERATED {true} OPTIONAL -- Need OR + } OPTIONAL, -- Need OR + rxParameters-r13 SEQUENCE { + discSyncWindow-r13 ENUMERATED {w1, w2} + } OPTIONAL, -- Need OR + ..., + [[ syncOffsetIndicator-v1430 SL-OffsetIndicatorSync-v1430 OPTIONAL, -- Need OR + gnss-Sync-r14 ENUMERATED {true} OPTIONAL -- Need OR + ]], + [[ syncOffsetIndicator2-r14 SL-OffsetIndicatorSync-r14 OPTIONAL, -- Need OR + syncOffsetIndicator3-r14 SL-OffsetIndicatorSync-r14 OPTIONAL -- Need OR + ]], + [[ slss-TxDisabled-r15 ENUMERATED {true} OPTIONAL -- Need OR + ]] +} + + +SL-TF-ResourceConfig-r12 ::= SEQUENCE { + prb-Num-r12 INTEGER (1..100), + prb-Start-r12 INTEGER (0..99), + prb-End-r12 INTEGER (0..99), + offsetIndicator-r12 SL-OffsetIndicator-r12, + subframeBitmap-r12 SubframeBitmapSL-r12 +} + +SubframeBitmapSL-r12 ::= CHOICE { + bs4-r12 BIT STRING (SIZE (4)), + bs8-r12 BIT STRING (SIZE (8)), + bs12-r12 BIT STRING (SIZE (12)), + bs16-r12 BIT STRING (SIZE (16)), + bs30-r12 BIT STRING (SIZE (30)), + bs40-r12 BIT STRING (SIZE (40)), + bs42-r12 BIT STRING (SIZE (42)) +} + +SubframeBitmapSL-r14 ::= CHOICE { + bs10-r14 BIT STRING (SIZE (10)), + bs16-r14 BIT STRING (SIZE (16)), + bs20-r14 BIT STRING (SIZE (20)), + bs30-r14 BIT STRING (SIZE (30)), + bs40-r14 BIT STRING (SIZE (40)), + bs50-r14 BIT STRING (SIZE (50)), + bs60-r14 BIT STRING (SIZE (60)), + bs100-r14 BIT STRING (SIZE (100)) +} + + +SL-TxPower-r14 ::= CHOICE { + minusinfinity-r14 NULL, + txPower-r14 INTEGER (-41..31) +} + + +SL-TypeTxSync-r14 ::= ENUMERATED {gnss, enb, ue} + + +SL-ThresPSSCH-RSRP-List-r14 ::= SEQUENCE (SIZE (64)) OF SL-ThresPSSCH-RSRP-r14 + +SL-ThresPSSCH-RSRP-r14 ::= INTEGER (0..66) + + +SL-TxParameters-r12 ::= SEQUENCE { + alpha-r12 Alpha-r12, + p0-r12 P0-SL-r12 +} + +P0-SL-r12 ::= INTEGER (-126..31) + + +SL-TxPoolIdentity-r12 ::= INTEGER (1.. maxSL-TxPool-r12) + +SL-TxPoolIdentity-v1310 ::= INTEGER (maxSL-TxPool-r12Plus1-r13.. maxSL-TxPool-r13) + +SL-V2X-TxPoolIdentity-r14 ::= INTEGER (1.. maxSL-V2X-TxPool-r14) + + +SL-TxPoolToReleaseList-r12 ::= SEQUENCE (SIZE (1..maxSL-TxPool-r12)) OF SL-TxPoolIdentity-r12 + +SL-TxPoolToReleaseListExt-r13 ::= SEQUENCE (SIZE (1..maxSL-TxPool-v1310)) OF SL-TxPoolIdentity-v1310 + + +SL-V2X-ConfigDedicated-r14 ::= SEQUENCE { + commTxResources-r14 CHOICE { + release NULL, + setup CHOICE { + scheduled-r14 SEQUENCE { + sl-V-RNTI-r14 C-RNTI, + mac-MainConfig-r14 MAC-MainConfigSL-r12, + v2x-SchedulingPool-r14 SL-CommResourcePoolV2X-r14 OPTIONAL, -- Need ON + mcs-r14 INTEGER (0..31) OPTIONAL, -- Need OR + logicalChGroupInfoList-r14 LogicalChGroupInfoList-r13 + }, + ue-Selected-r14 SEQUENCE { + -- Pool for normal usage + v2x-CommTxPoolNormalDedicated-r14 SEQUENCE { + poolToReleaseList-r14 SL-TxPoolToReleaseListV2X-r14 OPTIONAL, -- Need ON + poolToAddModList-r14 SL-TxPoolToAddModListV2X-r14 OPTIONAL, -- Need ON + v2x-CommTxPoolSensingConfig-r14 SL-CommTxPoolSensingConfig-r14 + OPTIONAL -- Need ON + } + } + } + } OPTIONAL, -- Need ON + v2x-InterFreqInfoList-r14 SL-InterFreqInfoListV2X-r14 OPTIONAL, -- Need ON + thresSL-TxPrioritization-r14 SL-Priority-r13 OPTIONAL, -- Need OR + typeTxSync-r14 SL-TypeTxSync-r14 OPTIONAL, -- Need OR + cbr-DedicatedTxConfigList-r14 SL-CBR-CommonTxConfigList-r14 OPTIONAL, -- Need OR + ..., + [[ commTxResources-v1530 CHOICE { + release NULL, + setup CHOICE { + scheduled-v1530 SEQUENCE { + logicalChGroupInfoList-v1530 LogicalChGroupInfoList-v1530 OPTIONAL, -- Need OR + mcs-r15 INTEGER (0..31) OPTIONAL -- Need OR + }, + ue-Selected-v1530 SEQUENCE { + v2x-FreqSelectionConfigList-r15 SL-V2X-FreqSelectionConfigList-r15 OPTIONAL --Need OR + } + } + } OPTIONAL, -- Need ON + v2x-PacketDuplicationConfig-r15 SL-V2X-PacketDuplicationConfig-r15 OPTIONAL, -- Need OR + syncFreqList-r15 SL-V2X-SyncFreqList-r15 OPTIONAL, -- Need OR + slss-TxMultiFreq-r15 ENUMERATED {true} OPTIONAL -- Need OR + ]] +} + +LogicalChGroupInfoList-v1530 ::= SEQUENCE (SIZE (1..maxLCG-r13)) OF SL-ReliabilityList-r15 + +SL-TxPoolToAddModListV2X-r14 ::= SEQUENCE (SIZE (1.. maxSL-V2X-TxPool-r14)) OF SL-TxPoolToAddMod-r14 + +SL-TxPoolToAddMod-r14 ::= SEQUENCE { + poolIdentity-r14 SL-V2X-TxPoolIdentity-r14, + pool-r14 SL-CommResourcePoolV2X-r14 +} + +SL-TxPoolToReleaseListV2X-r14 ::= SEQUENCE (SIZE (1.. maxSL-V2X-TxPool-r14)) OF SL-V2X-TxPoolIdentity-r14 + + +SL-V2X-FreqSelectionConfigList-r15 ::= SEQUENCE (SIZE (1..8)) OF SL-V2X-FreqSelectionConfig-r15 + +SL-V2X-FreqSelectionConfig-r15 ::= SEQUENCE { + priorityList-r15 SL-PriorityList-r13, + threshCBR-FreqReselection-r15 SL-CBR-r14 OPTIONAL, -- Need OR + threshCBR-FreqKeeping-r15 SL-CBR-r14 OPTIONAL -- Need OR +} + + +SL-V2X-PacketDuplicationConfig-r15 ::= SEQUENCE { + threshSL-Reliability-r15 SL-Reliability-r15, + allowedCarrierFreqConfig-r15 SL-PPPR-Dest-CarrierFreqList-r15 OPTIONAL, -- Need OR + ... +} + +SL-PPPR-Dest-CarrierFreqList-r15 ::= SEQUENCE (SIZE (1..maxSL-Dest-r12)) OF SL-PPPR-Dest-CarrierFreq + +SL-PPPR-Dest-CarrierFreq ::= SEQUENCE { + destinationInfoList-r15 SL-DestinationInfoList-r12 OPTIONAL, -- Need OR + allowedCarrierFreqList-r15 SL-AllowedCarrierFreqList-r15 OPTIONAL -- Need OR +} + +SL-AllowedCarrierFreqList-r15 ::= SEQUENCE { + allowedCarrierFreqSet1 SEQUENCE (SIZE (1..maxFreqV2X-r14)) OF ARFCN-ValueEUTRA-r9, + allowedCarrierFreqSet2 SEQUENCE (SIZE (1..maxFreqV2X-r14)) OF ARFCN-ValueEUTRA-r9 +} + + +SL-V2X-SyncFreqList-r15 ::= SEQUENCE (SIZE (1..maxFreqV2X-r14)) OF ARFCN-ValueEUTRA-r9 + + +SL-ZoneConfig-r14 ::= SEQUENCE { + zoneLength-r14 ENUMERATED { m5, m10, m20, m50, m100, m200, m500, spare1}, + zoneWidth-r14 ENUMERATED { m5, m10, m20, m50, m100, m200, m500, spare1}, + zoneIdLongiMod-r14 INTEGER (1..4), + zoneIdLatiMod-r14 INTEGER (1..4) +} + + +maxAccessCat-1-r15 INTEGER ::= 63 -- Maximum number of Acccess Categories - 1 +maxACDC-Cat-r13 INTEGER ::= 16 -- Maximum number of ACDC categories (per PLMN) +maxAvailNarrowBands-r13 INTEGER ::= 16 -- Maximum number of narrowbands +maxBandComb-r10 INTEGER ::= 128 -- Maximum number of band combinations. +maxBandComb-r11 INTEGER ::= 256 -- Maximum number of additional band combinations. +maxBandComb-r13 INTEGER ::= 384 -- Maximum number of band combinations in Rel-13 +maxBands INTEGER ::= 64 -- Maximum number of bands listed in EUTRA UE caps +maxBandsNR-r15 INTEGER ::= 1024 -- Maximum number of NR bands listed in EUTRA UE caps +maxBandwidthClass-r10 INTEGER ::= 16 -- Maximum number of supported CA BW classes per band +maxBandwidthCombSet-r10 INTEGER ::= 32 -- Maximum number of bandwidth combination sets per + -- supported band combination +maxBarringInfoSet-r15 INTEGER ::= 8 -- Maximum number of UAC barring information sets +maxBT-IdReport-r15 INTEGER ::= 32 -- Maximum number of Bluetooth IDs to report +maxBT-Name-r15 INTEGER ::= 4 -- Maximum number of Bluetooth name +maxCBR-Level-r14 INTEGER ::= 16 -- Maximum number of CBR levels +maxCBR-Level-1-r14 INTEGER ::= 15 +maxCBR-Report-r14 INTEGER ::= 72 -- Maximum number of CBR results in a report +maxCDMA-BandClass INTEGER ::= 32 -- Maximum value of the CDMA band classes +maxCE-Level-r13 INTEGER ::= 4 -- Maximum number of CE levels +maxCellBlack INTEGER ::= 16 -- Maximum number of blacklisted physical cell identity + -- ranges listed in SIB type 4 and 5 +maxCellHistory-r12 INTEGER ::= 16 -- Maximum number of visited EUTRA cells reported +maxCellInfoGERAN-r9 INTEGER ::= 32 -- Maximum number of GERAN cells for which system in- + -- formation can be provided as redirection assistance +maxCellInfoUTRA-r9 INTEGER ::= 16 -- Maximum number of UTRA cells for which system + -- information can be provided as redirection + -- assistance +maxCellMeasIdle-r15 INTEGER ::= 8 -- Maximum number of neighbouring inter-frequency + -- cells per carrier measured in IDLE mode +maxCombIDC-r11 INTEGER ::= 128 -- Maximum number of reported UL CA or + -- MR-DC combinations +maxCSI-IM-r11 INTEGER ::= 3 -- Maximum number of CSI-IM configurations + -- (per carrier frequency) +maxCSI-IM-r12 INTEGER ::= 4 -- Maximum number of CSI-IM configurations + -- (per carrier frequency) +minCSI-IM-r13 INTEGER ::= 5 -- Minimum number of CSI IM configurations from which + -- REL-13 extension is used +maxCSI-IM-r13 INTEGER ::= 24 -- Maximum number of CSI-IM configurations + -- (per carrier frequency) +maxCSI-IM-v1310 INTEGER ::= 20 -- Maximum number of additional CSI-IM configurations + -- (per carrier frequency) +maxCSI-Proc-r11 INTEGER ::= 4 -- Maximum number of CSI processes (per carrier + -- frequency) +maxCSI-RS-NZP-r11 INTEGER ::= 3 -- Maximum number of CSI RS resource + -- configurations using non-zero Tx power + -- (per carrier frequency) +minCSI-RS-NZP-r13 INTEGER ::= 4 -- Minimum number of CSI RS resource from which + -- REL-13 extension is used +maxCSI-RS-NZP-r13 INTEGER ::= 24 -- Maximum number of CSI RS resource + -- configurations using non-zero Tx power + -- (per carrier frequency) +maxCSI-RS-NZP-v1310 INTEGER ::= 21 -- Maximum number of additional CSI RS resource + -- configurations using non-zero Tx power + -- (per carrier frequency) +maxCSI-RS-ZP-r11 INTEGER ::= 4 -- Maximum number of CSI RS resource + -- configurations using zero Tx power(per carrier + -- frequency) +maxCQI-ProcExt-r11 INTEGER ::= 3 -- Maximum number of additional periodic CQI + -- configurations (per carrier frequency) +maxFreqUTRA-TDD-r10 INTEGER ::= 6 -- Maximum number of UTRA TDD carrier frequencies for + -- which system information can be provided as + -- redirection assistance +maxCellInter INTEGER ::= 16 -- Maximum number of neighbouring inter-frequency + -- cells listed in SIB type 5 +maxCellIntra INTEGER ::= 16 -- Maximum number of neighbouring intra-frequency + -- cells listed in SIB type 4 +maxCellListGERAN INTEGER ::= 3 -- Maximum number of lists of GERAN cells +maxCellMeas INTEGER ::= 32 -- Maximum number of entries in each of the + -- cell lists in a measurement object +maxCellReport INTEGER ::= 8 -- Maximum number of reported cells/CSI-RS resources +maxCellSFTD INTEGER ::= 3 -- Maximum number of cells for SFTD reporting +maxConfigSPS-r14 INTEGER ::= 8 -- Maximum number of simultaneous SPS configurations +maxConfigSPS-r15 INTEGER ::= 6 -- Maximum number of simultaneous SPS configurations + -- configured with SPS C-RNTI +maxCSI-RS-Meas-r12 INTEGER ::= 96 -- Maximum number of entries in the CSI-RS list + -- in a measurement object +maxDRB INTEGER ::= 11 -- Maximum number of Data Radio Bearers +maxDRBExt-r15 INTEGER ::= 4 -- Maximum number of additional DRBs +maxDRB-r15 INTEGER ::= 15 -- Highest value of extended maximum number of DRBs +maxDS-Duration-r12 INTEGER ::= 5 -- Maximum number of subframes in a discovery signals + -- occasion +maxDS-ZTP-CSI-RS-r12 INTEGER ::= 5 -- Maximum number of zero transmission power CSI-RS for + -- a serving cell concerning discovery signals +maxEARFCN INTEGER ::= 65535 -- Maximum value of EUTRA carrier frequency +maxEARFCN-Plus1 INTEGER ::= 65536 -- Lowest value extended EARFCN range +maxEARFCN2 INTEGER ::= 262143 -- Highest value extended EARFCN range +maxEPDCCH-Set-r11 INTEGER ::= 2 -- Maximum number of EPDCCH sets +maxFBI INTEGER ::= 64 -- Maximum value of fequency band indicator +maxFBI-NR-r15 INTEGER ::= 1024 -- Highest value FBI range for NR. +maxFBI-Plus1 INTEGER ::= 65 -- Lowest value extended FBI range +maxFBI2 INTEGER ::= 256 -- Highest value extended FBI range +maxFeatureSets-r15 INTEGER ::= 256 -- Total number of feature sets (size of pool) +maxPerCC-FeatureSets-r15 INTEGER ::= 32 -- Total number of CC-specific feature sets + -- (size of the pool) +maxFreq INTEGER ::= 8 -- Maximum number of carrier frequencies +maxFreqIDC-r11 INTEGER ::= 32 -- Maximum number of carrier frequencies that are + -- affected by the IDC problems +maxFreqIdle-r15 INTEGER ::= 8 -- Maximum number of carrier frequencies for + -- IDLE mode measurements configured by eNB +maxFreqMBMS-r11 INTEGER ::= 5 -- Maximum number of carrier frequencies for which an + -- MBMS capable UE may indicate an interest +maxFreqNR-r15 INTEGER ::= 5 -- Maximum number of NR carrier frequencies for + -- which a UE may provide measurement results upon + -- NR SCG failure and for which network can provide + -- cell reselection priorities upon release +maxFreqV2X-r14 INTEGER ::= 8 -- Maximum number of carrier frequencies for which V2X + -- sidelink communication can be configured +maxFreqV2X-1-r14 INTEGER ::= 7 -- Highest index of frequencies +maxGERAN-SI INTEGER ::= 10 -- Maximum number of GERAN SI blocks that can be + -- provided as part of NACC information +maxGNFG INTEGER ::= 16 -- Maximum number of GERAN neighbour freq groups +maxIdleMeasCarriers-r15 INTEGER ::= 3 -- Maximum number of neighbouring inter- + -- frequency carriers measured in IDLE mode +maxLCG-r13 INTEGER ::= 4 -- Maximum number of logical channel groups +maxLogMeasReport-r10 INTEGER ::= 520 -- Maximum number of logged measurement entries + -- that can be reported by the UE in one message +maxMBSFN-Allocations INTEGER ::= 8 -- Maximum number of MBSFN frame allocations with + -- different offset +maxMBSFN-Area INTEGER ::= 8 +maxMBSFN-Area-1 INTEGER ::= 7 +maxMBMS-ServiceListPerUE-r13 INTEGER ::= 15 -- Maximum number of services which the UE can + -- include in the MBMS interest indication +maxMeasId INTEGER ::= 32 +maxMeasId-Plus1 INTEGER ::= 33 +maxMeasId-r12 INTEGER ::= 64 +maxMultiBands INTEGER ::= 8 -- Maximum number of additional frequency bands + -- that a cell belongs to +maxMultiBandsNR-r15 INTEGER ::= 32 -- Maximum number of additional NR frequency bands + -- that a cell belongs to +maxNS-Pmax-r10 INTEGER ::= 8 -- Maximum number of NS and P-Max values per band +maxNAICS-Entries-r12 INTEGER ::= 8 -- Maximum number of supported NAICS combination(s) +maxNeighCell-r12 INTEGER ::= 8 -- Maximum number of neighbouring cells in NAICS + -- configuration (per carrier frequency) +maxNeighCell-SCPTM-r13 INTEGER ::= 8 -- Maximum number of SCPTM neighbour cells +maxNrofS-NSSAI-r15 INTEGER ::= 8 -- Maximum number of S-NSSAI +maxObjectId INTEGER ::= 32 +maxObjectId-Plus1-r13 INTEGER ::= 33 +maxObjectId-r13 INTEGER ::= 64 +maxP-a-PerNeighCell-r12 INTEGER ::= 3 -- Maximum number of power offsets for a neighbour cell + -- in NAICS configuration +maxPageRec INTEGER ::= 16 -- +maxPhysCellIdRange-r9 INTEGER ::= 4 -- Maximum number of physical cell identity ranges +maxPLMN-r11 INTEGER ::= 6 -- Maximum number of PLMNs +maxPLMN-1-r14 INTEGER ::= 5 -- Maximum number of PLMNs minus one +maxPLMN-r15 INTEGER ::= 8 -- Maximum number of PLMNs for RNA configuration +maxPLMN-NR-r15 INTEGER ::= 12 -- Maximum number of NR PLMNs +maxPNOffset INTEGER ::= 511 -- Maximum number of CDMA2000 PNOffsets +maxPMCH-PerMBSFN INTEGER ::= 15 +maxPSSCH-TxConfig-r14 INTEGER ::= 16 -- Maximum number of PSSCH TX configurations +maxQuantSetsNR-r15 INTEGER ::= 2 -- Maximum number of NR quantity configuration sets +maxQCI-r13 INTEGER ::= 6 -- Maximum number of QCIs +maxRAT-Capabilities INTEGER ::= 8 -- Maximum number of interworking RATs (incl EUTRA) +maxRE-MapQCL-r11 INTEGER ::= 4 -- Maximum number of PDSCH RE Mapping configurations + -- (per carrier frequency) +maxReportConfigId INTEGER ::= 32 +maxReservationPeriod-r14 INTEGER ::= 16 -- Maximum number of resource reservation periodicities + -- for sidelink V2X communication +maxRS-Index-r15 INTEGER ::= 64 -- Maximum number of RS indices +maxRS-Index-1-r15 INTEGER ::= 63 -- Highest value of RS index as used to identify + -- RS index in RRM reports. +maxRS-IndexCellQualNR-r15 INTEGER ::= 16 -- Maximum number of RS indices averaged to derive + -- cell quality for RRM. +maxRS-IndexReport-r15 INTEGER ::= 32 -- Maximum number of RS indices for RRM. +maxRSTD-Freq-r10 INTEGER ::= 3 -- Maximum number of frequency layers for RSTD + -- measurement +maxSAI-MBMS-r11 INTEGER ::= 64 -- Maximum number of MBMS service area identities + -- broadcast per carrier frequency +maxSCell-r10 INTEGER ::= 4 -- Maximum number of SCells +maxSCell-r13 INTEGER ::= 31 -- Highest value of extended number range of SCells +maxSCellGroups-r15 INTEGER ::= 4 -- Maximum number of SCell common parameter groups +maxSC-MTCH-r13 INTEGER ::= 1023 -- Maximum number of SC-MTCHs in one cell +maxSC-MTCH-BR-r14 INTEGER ::= 128 -- Maximum number of SC-MTCHs in one cell for feMTC +maxSL-CommRxPoolNFreq-r13 INTEGER ::= 32 -- Maximum number of individual sidelink communication + -- Rx resource pools on neighbouring freq +maxSL-CommRxPoolPreconf-v1310 INTEGER ::= 12 -- Maximum number of additional preconfigured + -- sidelink communication Rx resource pool entries +maxSL-TxPool-r12Plus1-r13 INTEGER ::= 5 -- First additional individual sidelink + -- Tx resource pool +maxSL-TxPool-v1310 INTEGER ::= 4 -- Maximum number of additional sidelink + -- Tx resource pool entries +maxSL-TxPool-r13 INTEGER ::= 8 -- Maximum number of individual sidelink + -- Tx resource pools +maxSL-CommTxPoolPreconf-v1310 INTEGER ::= 7 -- Maximum number of additional preconfigured + -- sidelink Tx resource pool entries +maxSL-Dest-r12 INTEGER ::= 16 -- Maximum number of sidelink destinations +maxSL-DiscCells-r13 INTEGER ::= 16 -- Maximum number of cells with similar sidelink + -- configurations +maxSL-DiscPowerClass-r12 INTEGER ::= 3 -- Maximum number of sidelink power classes +maxSL-DiscRxPoolPreconf-r13 INTEGER ::= 16 -- Maximum number of preconfigured sidelink + -- discovery Rx resource pool entries +maxSL-DiscSysInfoReportFreq-r13 INTEGER ::= 8 -- Maximum number of frequencies to include in a + -- SidelinkUEInformation for SI reporting +maxSL-DiscTxPoolPreconf-r13 INTEGER ::= 4 -- Maximum number of preconfigured sidelink + -- discovery Tx resource pool entries +maxSL-GP-r13 INTEGER ::= 8 -- Maximum number of gap patterns that can be requested + -- for a frequency or assigned +maxSL-PoolToMeasure-r14 INTEGER ::= 72 -- Maximum number of TX resource pools for CBR + -- measurement and report +maxSL-Prio-r13 INTEGER ::= 8 -- Maximum number of entries in sidelink priority list +maxSL-RxPool-r12 INTEGER ::= 16 -- Maximum number of individual sidelink Rx resource pools +maxSL-Reliability-r15 INTEGER ::= 8 -- Maximum number of entries in sidelink reliability list +maxSL-SyncConfig-r12 INTEGER ::= 16 -- Maximum number of sidelink Sync configurations +maxSL-TF-IndexPair-r12 INTEGER ::= 64 -- Maximum number of sidelink Time Freq resource index + -- pairs +maxSL-TxPool-r12 INTEGER ::= 4 -- Maximum number of individual sidelink Tx resource pools +maxSL-V2X-RxPool-r14 INTEGER ::= 16 -- Maximum number of RX resource pools for + -- V2X sidelink communication +maxSL-V2X-RxPoolPreconf-r14 INTEGER ::= 16 -- Maximum number of RX resource pools for + -- V2X sidelink communication +maxSL-V2X-TxPool-r14 INTEGER ::= 8 -- Maximum number of TX resource pools for + -- V2X sidelink communication +maxSL-V2X-TxPoolPreconf-r14 INTEGER ::= 8 -- Maximum number of TX resource pools for + -- V2X sidelink communication +maxSL-V2X-SyncConfig-r14 INTEGER ::= 16 -- Maximum number of sidelink Sync configurations + -- for V2X sidelink communication +maxSL-V2X-CBRConfig-r14 INTEGER ::= 4 -- Maximum number of CBR range configurations + -- for V2X sidelink communication congestion + -- control +maxSL-V2X-CBRConfig-1-r14 INTEGER ::= 3 +maxSL-V2X-TxConfig-r14 INTEGER ::= 64 -- Maximum number of TX parameter configurations + -- for V2X sidelink communication congestion + -- control +maxSL-V2X-TxConfig-1-r14 INTEGER ::= 63 +maxSL-V2X-CBRConfig2-r14 INTEGER ::= 8 -- Maximum number of CBR range configurations in + -- pre-configuration for V2X sidelink + -- communication congestion control +maxSL-V2X-CBRConfig2-1-r14 INTEGER ::= 7 +maxSL-V2X-TxConfig2-r14 INTEGER ::= 128 -- Maximum number of TX parameter + -- configurations in pre-configuration for V2X + -- sidelink communication congestion control +maxSL-V2X-TxConfig2-1-r14 INTEGER ::= 127 +maxSTAG-r11 INTEGER ::= 3 -- Maximum number of STAGs +maxServCell-r10 INTEGER ::= 5 -- Maximum number of Serving cells +maxServCell-r13 INTEGER ::= 32 -- Highest value of extended number range of Serving cells +maxServCellNR-r15 INTEGER ::= 16 -- Maximum number of NR serving cells +maxServiceCount INTEGER ::= 16 -- Maximum number of MBMS services that can be included + -- in an MBMS counting request and response +maxServiceCount-1 INTEGER ::= 15 +maxSessionPerPMCH INTEGER ::= 29 +maxSessionPerPMCH-1 INTEGER ::= 28 +maxSIB INTEGER ::= 32 -- Maximum number of SIBs +maxSIB-1 INTEGER ::= 31 +maxSI-Message INTEGER ::= 32 -- Maximum number of SI messages +maxSimultaneousBands-r10 INTEGER ::= 64 -- Maximum number of simultaneously aggregated bands +maxSubframePatternIDC-r11 INTEGER ::= 8 -- Maximum number of subframe reservation patterns + -- that the UE can simultaneously recommend to the + -- E-UTRAN for use. +maxTrafficPattern-r14 INTEGER ::= 8 -- Maximum number of periodical traffic patterns + -- that the UE can simultaneously report to the + -- E-UTRAN. +maxUTRA-FDD-Carrier INTEGER ::= 16 -- Maximum number of UTRA FDD carrier frequencies +maxUTRA-TDD-Carrier INTEGER ::= 16 -- Maximum number of UTRA TDD carrier frequencies +maxWayPoint-r15 INTEGER ::= 20 -- Maximum number of flight path information waypoints +maxWLAN-Id-r12 INTEGER ::= 16 -- Maximum number of WLAN identifiers +maxWLAN-Bands-r13 INTEGER ::= 8 -- Maximum number of WLAN bands +maxWLAN-Id-r13 INTEGER ::= 32 -- Maximum number of WLAN identifiers +maxWLAN-Channels-r13 INTEGER ::= 16 -- maximum number of WLAN channels used in + -- WLAN-CarrierInfo +maxWLAN-CarrierInfo-r13 INTEGER ::= 8 -- Maximum number of WLAN Carrier Information +maxWLAN-Id-Report-r14 INTEGER ::= 32 -- Maximum number of WLAN IDs to report +maxWLAN-Name-r15 INTEGER ::= 4 -- Maximum number of WLAN name + + +END + + +PC5-RRC-Definitions DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + TDD-ConfigSL-r12 +FROM EUTRA-RRC-Definitions; + + +SBCCH-SL-BCH-Message ::= SEQUENCE { + message SBCCH-SL-BCH-MessageType +} + +SBCCH-SL-BCH-MessageType ::= MasterInformationBlock-SL + + +SBCCH-SL-BCH-Message-V2X-r14 ::= SEQUENCE { + message SBCCH-SL-BCH-MessageType-V2X-r14 +} + +SBCCH-SL-BCH-MessageType-V2X-r14 ::= MasterInformationBlock-SL-V2X-r14 + + +MasterInformationBlock-SL ::= SEQUENCE { + sl-Bandwidth-r12 ENUMERATED { + n6, n15, n25, n50, n75, n100}, + tdd-ConfigSL-r12 TDD-ConfigSL-r12, + directFrameNumber-r12 BIT STRING (SIZE (10)), + directSubframeNumber-r12 INTEGER (0..9), + inCoverage-r12 BOOLEAN, + reserved-r12 BIT STRING (SIZE (19)) +} + + + +MasterInformationBlock-SL-V2X-r14 ::= SEQUENCE { + sl-Bandwidth-r14 ENUMERATED { + n6, n15, n25, n50, n75, n100}, + tdd-ConfigSL-r14 TDD-ConfigSL-r12, + directFrameNumber-r14 BIT STRING (SIZE (10)), + directSubframeNumber-r14 INTEGER (0..9), + inCoverage-r14 BOOLEAN, + reserved-r14 BIT STRING (SIZE (27)) +} + + + +END + + +NBIOT-RRC-Definitions DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + RRCConnectionReestablishmentReject, + SecurityModeCommand, + SecurityModeComplete, + SecurityModeFailure, + AdditionalSpectrumEmission, + ARFCN-ValueEUTRA-r9, + CellIdentity, + C-RNTI, + DedicatedInfoNAS, + DRB-Identity, + InitialUE-Identity, + IntraFreqBlackCellList, + IntraFreqNeighCellList, + maxBands, + maxCellBlack, + maxCellInter, + maxCellIntra, + maxFBI2, + maxFreq, + maxMultiBands, + maxPageRec, + maxPLMN-r11, + maxSAI-MBMS-r11, + maxSIB, + maxSIB-1, + MBMS-SAI-r11, + MBMS-SAI-List-r11, + MBMSSessionInfo-r13, + NextHopChainingCount, + PagingUE-Identity, + PLMN-Identity, + P-Max, + PowerRampingParameters, + PreambleTransMax, + PhysCellId, + Q-OffsetRange, + Q-QualMin-r9, + Q-RxLevMin, + ReestabUE-Identity, + RegisteredMME, + ReselectionThreshold, + ResumeIdentity-r13, + RRC-TransactionIdentifier, + RSRP-Range, + ShortMAC-I, + S-TMSI, + SystemInformationBlockType16-r11, + SystemInfoValueTagSI-r13, + T-Reordering, + TimeAlignmentTimer, + TMGI-r9, + TrackingAreaCode, + DataInactivityTimer-r14 + +FROM EUTRA-RRC-Definitions; + + +BCCH-BCH-Message-NB ::= SEQUENCE { + message BCCH-BCH-MessageType-NB +} + + +BCCH-BCH-MessageType-NB::= MasterInformationBlock-NB + + + +BCCH-BCH-Message-TDD-NB ::= SEQUENCE { + message BCCH-BCH-MessageType-TDD-NB-r15 +} + + +BCCH-BCH-MessageType-TDD-NB-r15 ::= MasterInformationBlock-TDD-NB-r15 + + +BCCH-DL-SCH-Message-NB ::= SEQUENCE { + message BCCH-DL-SCH-MessageType-NB +} + +BCCH-DL-SCH-MessageType-NB ::= CHOICE { + c1 CHOICE { + systemInformation-r13 SystemInformation-NB, + systemInformationBlockType1-r13 SystemInformationBlockType1-NB + }, + messageClassExtension SEQUENCE {} +} + + +PCCH-Message-NB ::= SEQUENCE { + message PCCH-MessageType-NB +} + +PCCH-MessageType-NB ::= CHOICE { + c1 CHOICE { + paging-r13 Paging-NB + }, + messageClassExtension SEQUENCE {} +} + + +DL-CCCH-Message-NB ::= SEQUENCE { + message DL-CCCH-MessageType-NB +} + +DL-CCCH-MessageType-NB ::= CHOICE { + c1 CHOICE { + rrcConnectionReestablishment-r13 RRCConnectionReestablishment-NB, + rrcConnectionReestablishmentReject-r13 RRCConnectionReestablishmentReject, + rrcConnectionReject-r13 RRCConnectionReject-NB, + rrcConnectionSetup-r13 RRCConnectionSetup-NB, + rrcEarlyDataComplete-r15 RRCEarlyDataComplete-NB-r15, + spare3 NULL, spare2 NULL, spare1 NULL + }, + messageClassExtension SEQUENCE {} +} + + +DL-DCCH-Message-NB ::= SEQUENCE { + message DL-DCCH-MessageType-NB +} + +DL-DCCH-MessageType-NB ::= CHOICE { + c1 CHOICE { + dlInformationTransfer-r13 DLInformationTransfer-NB, + rrcConnectionReconfiguration-r13 RRCConnectionReconfiguration-NB, + rrcConnectionRelease-r13 RRCConnectionRelease-NB, + securityModeCommand-r13 SecurityModeCommand, + ueCapabilityEnquiry-r13 UECapabilityEnquiry-NB, + rrcConnectionResume-r13 RRCConnectionResume-NB, + spare2 NULL, spare1 NULL + }, + messageClassExtension SEQUENCE {} +} + + + +UL-CCCH-Message-NB ::= SEQUENCE { + message UL-CCCH-MessageType-NB +} + +UL-CCCH-MessageType-NB ::= CHOICE { + c1 CHOICE { + rrcConnectionReestablishmentRequest-r13 RRCConnectionReestablishmentRequest-NB, + rrcConnectionRequest-r13 RRCConnectionRequest-NB, + rrcConnectionResumeRequest-r13 RRCConnectionResumeRequest-NB, + rrcEarlyDataRequest-r15 RRCEarlyDataRequest-NB-r15 + }, + messageClassExtension SEQUENCE {} +} + + +SC-MCCH-Message-NB ::= SEQUENCE { + message SC-MCCH-MessageType-NB +} + + +SC-MCCH-MessageType-NB ::= CHOICE { + c1 CHOICE { + scptmConfiguration-r14 SCPTMConfiguration-NB-r14 + }, + messageClassExtension SEQUENCE {} +} + + +UL-DCCH-Message-NB ::= SEQUENCE { + message UL-DCCH-MessageType-NB +} + +UL-DCCH-MessageType-NB ::= CHOICE { + c1 CHOICE { + rrcConnectionReconfigurationComplete-r13 RRCConnectionReconfigurationComplete-NB, + rrcConnectionReestablishmentComplete-r13 RRCConnectionReestablishmentComplete-NB, + rrcConnectionSetupComplete-r13 RRCConnectionSetupComplete-NB, + securityModeComplete-r13 SecurityModeComplete, + securityModeFailure-r13 SecurityModeFailure, + ueCapabilityInformation-r13 UECapabilityInformation-NB, + ulInformationTransfer-r13 ULInformationTransfer-NB, + rrcConnectionResumeComplete-r13 RRCConnectionResumeComplete-NB, + spare8 NULL, spare7 NULL, + spare6 NULL, spare5 NULL, spare4 NULL, + spare3 NULL, spare2 NULL, spare1 NULL + }, + messageClassExtension SEQUENCE {} +} + + +DLInformationTransfer-NB ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE { + dlInformationTransfer-r13 DLInformationTransfer-NB-r13-IEs, + spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +DLInformationTransfer-NB-r13-IEs ::= SEQUENCE { + dedicatedInfoNAS-r13 DedicatedInfoNAS, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +MasterInformationBlock-NB ::= SEQUENCE { + systemFrameNumber-MSB-r13 BIT STRING (SIZE (4)), + hyperSFN-LSB-r13 BIT STRING (SIZE (2)), + schedulingInfoSIB1-r13 INTEGER (0..15), + systemInfoValueTag-r13 INTEGER (0..31), + ab-Enabled-r13 BOOLEAN, + operationModeInfo-r13 CHOICE { + inband-SamePCI-r13 Inband-SamePCI-NB-r13, + inband-DifferentPCI-r13 Inband-DifferentPCI-NB-r13, + guardband-r13 Guardband-NB-r13, + standalone-r13 Standalone-NB-r13 + }, + additionalTransmissionSIB1-r15 BOOLEAN, + spare BIT STRING (SIZE (10)) +} + +Guardband-NB-r13 ::= SEQUENCE { + rasterOffset-r13 ChannelRasterOffset-NB-r13, + spare BIT STRING (SIZE (3)) +} + +Inband-SamePCI-NB-r13 ::= SEQUENCE { + eutra-CRS-SequenceInfo-r13 INTEGER (0..31) +} + +Inband-DifferentPCI-NB-r13 ::= SEQUENCE { + eutra-NumCRS-Ports-r13 ENUMERATED {same, four}, + rasterOffset-r13 ChannelRasterOffset-NB-r13, + spare BIT STRING (SIZE (2)) +} + +Standalone-NB-r13 ::= SEQUENCE { + spare BIT STRING (SIZE (5)) +} + + +MasterInformationBlock-TDD-NB-r15 ::= SEQUENCE { + systemFrameNumber-MSB-r15 BIT STRING (SIZE (4)), + hyperSFN-LSB-r15 BIT STRING (SIZE (2)), + schedulingInfoSIB1-r15 INTEGER (0..15), + systemInfoValueTag-r15 INTEGER (0..31), + ab-Enabled-r15 BOOLEAN, + operationModeInfo-r15 CHOICE { + inband-SamePCI-r15 Inband-SamePCI-TDD-NB-r15, + inband-DifferentPCI-r15 Inband-DifferentPCI-TDD-NB-r15, + guardband-r15 GuardbandTDD-NB-r15, + standalone-r15 StandaloneTDD-NB-r15 + }, + sib1-CarrierInfo-r15 ENUMERATED {anchor, non-anchor}, + spare BIT STRING (SIZE (9)) +} + +GuardbandTDD-NB-r15 ::= SEQUENCE { + rasterOffset-r15 ChannelRasterOffset-NB-r13, + sib-GuardbandInfo-r15 CHOICE { + sib-GuardbandAnchor-r15 SIB-GuardbandAnchorTDD-NB-r15, + sib-GuardbandGuardband-r15 SIB-GuardbandGuardbandTDD-NB-r15, + sib-GuardbandInbandSamePCI-r15 SIB-GuardbandInbandSamePCI-TDD-NB-r15, + sib-GuardbandinbandDiffPCI-r15 SIB-GuardbandInbandDiffPCI-TDD-NB-r15 + }, + eutra-Bandwitdh-r15 ENUMERATED {bw5or10, bw15or20} +} + +Inband-SamePCI-TDD-NB-r15 ::= SEQUENCE { + eutra-CRS-SequenceInfo-r15 INTEGER (0..31), + sib-InbandLocation-r15 ENUMERATED {lower, higher} +} + +Inband-DifferentPCI-TDD-NB-r15 ::= SEQUENCE { + eutra-NumCRS-Ports-r15 ENUMERATED {same, four}, + rasterOffset-r15 ChannelRasterOffset-NB-r13, + sib-InbandLocation-r15 ENUMERATED {lower, higher}, + spare BIT STRING (SIZE (2)) +} + +StandaloneTDD-NB-r15 ::= SEQUENCE { + sib-StandaloneLocation-r15 ENUMERATED {lower, higher}, + spare BIT STRING (SIZE (5)) +} + +SIB-GuardbandAnchorTDD-NB-r15 ::= SEQUENCE { + spare BIT STRING (SIZE (1)) +} + +SIB-GuardbandGuardbandTDD-NB-r15 ::= SEQUENCE { + sib-GuardbandGuardbandLocation-r15 ENUMERATED {same, opposite} +} + +SIB-GuardbandInbandSamePCI-TDD-NB-r15 ::= SEQUENCE { + spare BIT STRING (SIZE (1)) +} + +SIB-GuardbandInbandDiffPCI-TDD-NB-r15 ::= SEQUENCE { + sib-EUTRA-NumCRS-Ports-r15 ENUMERATED {same, four} +} + + +Paging-NB ::= SEQUENCE { + pagingRecordList-r13 PagingRecordList-NB-r13 OPTIONAL, -- Need ON + systemInfoModification-r13 ENUMERATED {true} OPTIONAL, -- Need ON + systemInfoModification-eDRX-r13 ENUMERATED {true} OPTIONAL, -- Need ON + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +PagingRecordList-NB-r13 ::= SEQUENCE (SIZE (1..maxPageRec)) OF PagingRecord-NB-r13 + +PagingRecord-NB-r13 ::= SEQUENCE { + ue-Identity-r13 PagingUE-Identity, + ... +} + + +RRCConnectionReconfiguration-NB ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE{ + rrcConnectionReconfiguration-r13 RRCConnectionReconfiguration-NB-r13-IEs, + spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionReconfiguration-NB-r13-IEs ::= SEQUENCE { + dedicatedInfoNASList-r13 SEQUENCE (SIZE(1..maxDRB-NB-r13)) OF + DedicatedInfoNAS OPTIONAL, -- Need ON + radioResourceConfigDedicated-r13 RadioResourceConfigDedicated-NB-r13 OPTIONAL, -- Need ON + fullConfig-r13 ENUMERATED {true} OPTIONAL, -- Cond Reestab + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +RRCConnectionReconfigurationComplete-NB ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcConnectionReconfigurationComplete-r13 RRCConnectionReconfigurationComplete-NB-r13-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionReconfigurationComplete-NB-r13-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + + +RRCConnectionReestablishment-NB ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE{ + rrcConnectionReestablishment-r13 RRCConnectionReestablishment-NB-r13-IEs, + spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionReestablishment-NB-r13-IEs ::= SEQUENCE { + radioResourceConfigDedicated-r13 RadioResourceConfigDedicated-NB-r13, + nextHopChainingCount-r13 NextHopChainingCount, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCConnectionReestablishment-NB-v1430-IEs OPTIONAL +} + +RRCConnectionReestablishment-NB-v1430-IEs ::= SEQUENCE { + dl-NAS-MAC BIT STRING (SIZE (16)) OPTIONAL, -- Cond Reestablish-CP + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +RRCConnectionReestablishmentComplete-NB ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcConnectionReestablishmentComplete-r13 RRCConnectionReestablishmentComplete-NB-r13-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionReestablishmentComplete-NB-r13-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCConnectionReestablishmentComplete-NB-v1470-IEs OPTIONAL +} + +RRCConnectionReestablishmentComplete-NB-v1470-IEs ::= SEQUENCE { + measResultServCell-r14 MeasResultServCell-NB-r14 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +RRCConnectionReestablishmentRequest-NB ::= SEQUENCE { + criticalExtensions CHOICE { + rrcConnectionReestablishmentRequest-r13 + RRCConnectionReestablishmentRequest-NB-r13-IEs, + later CHOICE { + rrcConnectionReestablishmentRequest-r14 + RRCConnectionReestablishmentRequest-NB-r14-IEs, + criticalExtensionsFuture SEQUENCE {} + } + } +} + +RRCConnectionReestablishmentRequest-NB-r13-IEs ::= SEQUENCE { + ue-Identity-r13 ReestabUE-Identity, + reestablishmentCause-r13 ReestablishmentCause-NB-r13, + cqi-NPDCCH-r14 CQI-NPDCCH-NB-r14, + earlyContentionResolution-r14 BOOLEAN, + spare BIT STRING (SIZE (20)) +} + +RRCConnectionReestablishmentRequest-NB-r14-IEs ::= SEQUENCE { + ue-Identity-r14 ReestabUE-Identity-CP-NB-r14, + reestablishmentCause-r14 ReestablishmentCause-NB-r13, + cqi-NPDCCH-r14 CQI-NPDCCH-Short-NB-r14, + earlyContentionResolution-r14 BOOLEAN, + spare BIT STRING (SIZE (1)) +} + +ReestablishmentCause-NB-r13 ::= ENUMERATED { + reconfigurationFailure, otherFailure, + spare2, spare1} + +ReestabUE-Identity-CP-NB-r14 ::= SEQUENCE { + s-TMSI-r14 S-TMSI, + ul-NAS-MAC-r14 BIT STRING (SIZE (16)), + ul-NAS-Count-r14 BIT STRING (SIZE (5)) +} + + +RRCConnectionReject-NB ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE { + rrcConnectionReject-r13 RRCConnectionReject-NB-r13-IEs, + spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionReject-NB-r13-IEs ::= SEQUENCE { + extendedWaitTime-r13 INTEGER (1..1800), + rrc-SuspendIndication-r13 ENUMERATED {true} OPTIONAL, -- Need ON + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +RRCConnectionRelease-NB ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE { + rrcConnectionRelease-r13 RRCConnectionRelease-NB-r13-IEs, + spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionRelease-NB-r13-IEs ::= SEQUENCE { + releaseCause-r13 ReleaseCause-NB-r13, + resumeIdentity-r13 ResumeIdentity-r13 OPTIONAL, -- Need OR + extendedWaitTime-r13 INTEGER (1..1800) OPTIONAL, -- Need ON + redirectedCarrierInfo-r13 RedirectedCarrierInfo-NB-r13 OPTIONAL, -- Need ON + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCConnectionRelease-NB-v1430-IEs OPTIONAL +} + +RRCConnectionRelease-NB-v1430-IEs ::= SEQUENCE { + redirectedCarrierInfo-v1430 RedirectedCarrierInfo-NB-v1430 OPTIONAL, -- Cond Redirection + extendedWaitTime-CPdata-r14 INTEGER (1..1800) OPTIONAL, -- Cond NoExtendedWaitTime + nonCriticalExtension RRCConnectionRelease-NB-v1530-IEs OPTIONAL +} + +RRCConnectionRelease-NB-v1530-IEs ::= SEQUENCE { + drb-ContinueROHC-r15 ENUMERATED {true} OPTIONAL, -- Cond UP-EDT + nextHopChainingCount-r15 NextHopChainingCount OPTIONAL, -- Cond UP-EDT + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +ReleaseCause-NB-r13 ::= ENUMERATED {loadBalancingTAUrequired, other, + rrc-Suspend, spare1} +RedirectedCarrierInfo-NB-r13::= CarrierFreq-NB-r13 + +RedirectedCarrierInfo-NB-v1430 ::= SEQUENCE { + redirectedCarrierOffsetDedicated-r14 ENUMERATED{ + dB1, dB2, dB3, dB4, dB5, dB6, dB8, dB10, + dB12, dB14, dB16, dB18, dB20, dB22, dB24, dB26}, + t322-r14 ENUMERATED{ + min5, min10, min20, min30, min60, min120, min180, + spare1} +} + + +RRCConnectionRequest-NB ::= SEQUENCE { + criticalExtensions CHOICE { + rrcConnectionRequest-r13 RRCConnectionRequest-NB-r13-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionRequest-NB-r13-IEs ::= SEQUENCE { + ue-Identity-r13 InitialUE-Identity, + establishmentCause-r13 EstablishmentCause-NB-r13, + multiToneSupport-r13 ENUMERATED {true} OPTIONAL, + multiCarrierSupport-r13 ENUMERATED {true} OPTIONAL, + earlyContentionResolution-r14 BOOLEAN, + cqi-NPDCCH-r14 CQI-NPDCCH-NB-r14, + spare BIT STRING (SIZE (17)) +} + + +RRCConnectionResume-NB ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE { + rrcConnectionResume-r13 RRCConnectionResume-NB-r13-IEs, + spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionResume-NB-r13-IEs ::= SEQUENCE { + radioResourceConfigDedicated-r13 RadioResourceConfigDedicated-NB-r13 OPTIONAL, -- Need ON + nextHopChainingCount-r13 NextHopChainingCount, + drb-ContinueROHC-r13 ENUMERATED {true} OPTIONAL, -- Need OP + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +RRCConnectionResumeComplete-NB ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcConnectionResumeComplete-r13 RRCConnectionResumeComplete-NB-r13-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionResumeComplete-NB-r13-IEs ::= SEQUENCE { + selectedPLMN-Identity-r13 INTEGER (1..maxPLMN-r11) OPTIONAL, + dedicatedInfoNAS-r13 DedicatedInfoNAS OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCConnectionResumeComplete-NB-v1470-IEs OPTIONAL +} + +RRCConnectionResumeComplete-NB-v1470-IEs ::= SEQUENCE { + measResultServCell-r14 MeasResultServCell-NB-r14 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +RRCConnectionResumeRequest-NB ::= SEQUENCE { + criticalExtensions CHOICE { + rrcConnectionResumeRequest-r13 RRCConnectionResumeRequest-NB-r13-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionResumeRequest-NB-r13-IEs ::= SEQUENCE { + resumeID-r13 ResumeIdentity-r13, + shortResumeMAC-I-r13 ShortMAC-I, + resumeCause-r13 EstablishmentCause-NB-r13, + earlyContentionResolution-r14 BOOLEAN, + cqi-NPDCCH-r14 CQI-NPDCCH-NB-r14, + spare BIT STRING (SIZE (4)) +} + + +RRCConnectionSetup-NB ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE { + rrcConnectionSetup-r13 RRCConnectionSetup-NB-r13-IEs, + spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionSetup-NB-r13-IEs ::= SEQUENCE { + radioResourceConfigDedicated-r13 RadioResourceConfigDedicated-NB-r13, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +RRCConnectionSetupComplete-NB ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE{ + rrcConnectionSetupComplete-r13 RRCConnectionSetupComplete-NB-r13-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCConnectionSetupComplete-NB-r13-IEs ::= SEQUENCE { + selectedPLMN-Identity-r13 INTEGER (1..maxPLMN-r11), + s-TMSI-r13 S-TMSI OPTIONAL, + registeredMME-r13 RegisteredMME OPTIONAL, + dedicatedInfoNAS-r13 DedicatedInfoNAS, + attachWithoutPDN-Connectivity-r13 ENUMERATED {true} OPTIONAL, + up-CIoT-EPS-Optimisation-r13 ENUMERATED {true} OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCConnectionSetupComplete-NB-v1430-IEs OPTIONAL +} + +RRCConnectionSetupComplete-NB-v1430-IEs ::= SEQUENCE { + gummei-Type-r14 ENUMERATED { mapped} OPTIONAL, + dcn-ID-r14 INTEGER (0..65535) OPTIONAL, + nonCriticalExtension RRCConnectionSetupComplete-NB-v1470-IEs OPTIONAL +} + +RRCConnectionSetupComplete-NB-v1470-IEs ::= SEQUENCE { + measResultServCell-r14 MeasResultServCell-NB-r14 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +RRCEarlyDataComplete-NB-r15 ::= SEQUENCE { + criticalExtensions CHOICE { + rrcEarlyDataComplete-r15 RRCEarlyDataComplete-NB-r15-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCEarlyDataComplete-NB-r15-IEs ::= SEQUENCE { + dedicatedInfoNAS-r15 DedicatedInfoNAS OPTIONAL, -- Need ON + extendedWaitTime-r15 INTEGER (1..1800) OPTIONAL, -- Need ON + redirectedCarrierInfo-r15 RedirectedCarrierInfo-NB-r13 OPTIONAL, -- Need ON + redirectedCarrierInfoExt-r15 RedirectedCarrierInfo-NB-v1430 OPTIONAL, -- Cond Redirection + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +RRCEarlyDataRequest-NB-r15 ::= SEQUENCE { + criticalExtensions CHOICE { + rrcEarlyDataRequest-r15 RRCEarlyDataRequest-NB-r15-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCEarlyDataRequest-NB-r15-IEs ::= SEQUENCE { + s-TMSI-r15 S-TMSI, + establishmentCause-r15 ENUMERATED {mo-Data-r15, mo-ExceptionData-r15, + delayTolerantAccess-r15, spare1}, + cqi-NPDCCH-r15 CQI-NPDCCH-NB-r14 OPTIONAL, + dedicatedInfoNAS-r15 DedicatedInfoNAS, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +SCPTMConfiguration-NB-r14 ::= SEQUENCE { + sc-mtch-InfoList-r14 SC-MTCH-InfoList-NB-r14, + scptm-NeighbourCellList-r14 SCPTM-NeighbourCellList-NB-r14 OPTIONAL, -- Need OP + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +SystemInformation-NB ::= SEQUENCE { + criticalExtensions CHOICE { + systemInformation-r13 SystemInformation-NB-r13-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} +SystemInformation-NB-r13-IEs ::= SEQUENCE { + sib-TypeAndInfo-r13 SEQUENCE (SIZE (1..maxSIB)) OF CHOICE { + sib2-r13 SystemInformationBlockType2-NB-r13, + sib3-r13 SystemInformationBlockType3-NB-r13, + sib4-r13 SystemInformationBlockType4-NB-r13, + sib5-r13 SystemInformationBlockType5-NB-r13, + sib14-r13 SystemInformationBlockType14-NB-r13, + sib16-r13 SystemInformationBlockType16-NB-r13, + ..., + sib15-v1430 SystemInformationBlockType15-NB-r14, + sib20-v1430 SystemInformationBlockType20-NB-r14, + sib22-v1430 SystemInformationBlockType22-NB-r14, + sib23-v1530 SystemInformationBlockType23-NB-r15 + }, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +SystemInformationBlockType1-NB ::= SEQUENCE { + hyperSFN-MSB-r13 BIT STRING (SIZE (8)), + cellAccessRelatedInfo-r13 SEQUENCE { + plmn-IdentityList-r13 PLMN-IdentityList-NB-r13, + trackingAreaCode-r13 TrackingAreaCode, + cellIdentity-r13 CellIdentity, + cellBarred-r13 ENUMERATED {barred, notBarred}, + intraFreqReselection-r13 ENUMERATED {allowed, notAllowed} + }, + cellSelectionInfo-r13 SEQUENCE { + q-RxLevMin-r13 Q-RxLevMin, + q-QualMin-r13 Q-QualMin-r9 + }, + p-Max-r13 P-Max OPTIONAL, -- Need OP + freqBandIndicator-r13 FreqBandIndicator-NB-r13, + freqBandInfo-r13 NS-PmaxList-NB-r13 OPTIONAL, -- Need OR + multiBandInfoList-r13 MultiBandInfoList-NB-r13 OPTIONAL, -- Need OR + downlinkBitmap-r13 DL-Bitmap-NB-r13 OPTIONAL, -- Cond SIB1 + eutraControlRegionSize-r13 ENUMERATED {n1, n2, n3} OPTIONAL, -- Cond inband + nrs-CRS-PowerOffset-r13 ENUMERATED {dB-6, dB-4dot77, dB-3, + dB-1dot77, dB0, dB1, + dB1dot23, dB2, dB3, + dB4, dB4dot23, dB5, + dB6, dB7, dB8, + dB9} OPTIONAL, -- Cond inband-SamePCI + schedulingInfoList-r13 SchedulingInfoList-NB-r13, + si-WindowLength-r13 ENUMERATED {ms160, ms320, ms480, ms640, + ms960, ms1280, ms1600, spare1}, + si-RadioFrameOffset-r13 INTEGER (1..15) OPTIONAL, -- Need OP + systemInfoValueTagList-r13 SystemInfoValueTagList-NB-r13 OPTIONAL, -- Need OR + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SystemInformationBlockType1-NB-v1350 OPTIONAL +} + +SystemInformationBlockType1-NB-v1350 ::= SEQUENCE { + cellSelectionInfo-v1350 CellSelectionInfo-NB-v1350 OPTIONAL, -- Cond Qrxlevmin + nonCriticalExtension SystemInformationBlockType1-NB-v1430 OPTIONAL +} + +SystemInformationBlockType1-NB-v1430 ::= SEQUENCE { + cellSelectionInfo-v1430 CellSelectionInfo-NB-v1430 OPTIONAL, -- Need OR + nonCriticalExtension SystemInformationBlockType1-NB-v1450 OPTIONAL +} + +SystemInformationBlockType1-NB-v1450 ::= SEQUENCE { + nrs-CRS-PowerOffset-v1450 ENUMERATED {dB-6, dB-4dot77, dB-3, + dB-1dot77, dB0, dB1, + dB1dot23, dB2, dB3, + dB4, dB4dot23, dB5, + dB6, dB7, dB8, + dB9} OPTIONAL, -- Cond inband-SamePCI-ExceptAnchor + nonCriticalExtension SystemInformationBlockType1-NB-v1530 OPTIONAL +} + +SystemInformationBlockType1-NB-v1530 ::= SEQUENCE { + tdd-Parameters-r15 SEQUENCE { + tdd-Config-r15 TDD-Config-NB-r15, + tdd-SI-CarrierInfo-r15 ENUMERATED {anchor, non-anchor}, + tdd-SI-SubframesBitmap-r15 DL-Bitmap-NB-r13 OPTIONAL -- Cond TDD-SI-NonAnchor + } OPTIONAL, -- Cond TDD + schedulingInfoList-v1530 SchedulingInfoList-NB-v1530 OPTIONAL, -- Need OR + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +PLMN-IdentityList-NB-r13 ::= SEQUENCE (SIZE (1..maxPLMN-r11)) OF PLMN-IdentityInfo-NB-r13 + +PLMN-IdentityInfo-NB-r13 ::= SEQUENCE { + plmn-Identity-r13 PLMN-Identity, + cellReservedForOperatorUse-r13 ENUMERATED {reserved, notReserved}, + attachWithoutPDN-Connectivity-r13 ENUMERATED {true} OPTIONAL -- Need OP +} + +SchedulingInfoList-NB-r13 ::= SEQUENCE (SIZE (1..maxSI-Message-NB-r13)) OF SchedulingInfo-NB-r13 + +SchedulingInfoList-NB-v1530 ::= SEQUENCE (SIZE (1..maxSI-Message-NB-r13)) OF SchedulingInfo-NB-v1530 + +SchedulingInfo-NB-r13::= SEQUENCE { + si-Periodicity-r13 ENUMERATED {rf64, rf128, rf256, rf512, + rf1024, rf2048, rf4096, spare}, + si-RepetitionPattern-r13 ENUMERATED {every2ndRF, every4thRF, every8thRF, every16thRF}, + sib-MappingInfo-r13 SIB-MappingInfo-NB-r13, + si-TB-r13 ENUMERATED {b56, b120, b208, b256, b328, b440, b552, b680} +} + +SchedulingInfo-NB-v1530::= SEQUENCE { + sib-MappingInfo-v1530 SIB-MappingInfo-NB-v1530 OPTIONAL -- Need OR +} + +SystemInfoValueTagList-NB-r13 ::= SEQUENCE (SIZE (1.. maxSI-Message-NB-r13)) OF + SystemInfoValueTagSI-r13 + +SIB-MappingInfo-NB-r13 ::= SEQUENCE (SIZE (0..maxSIB-1)) OF SIB-Type-NB-r13 + +SIB-MappingInfo-NB-v1530 ::= SEQUENCE (SIZE (1..8)) OF SIB-Type-NB-v1530 + +SIB-Type-NB-r13 ::= ENUMERATED { + sibType3-NB-r13, sibType4-NB-r13, sibType5-NB-r13, + sibType14-NB-r13, sibType16-NB-r13, sibType15-NB-r14, + sibType20-NB-r14, sibType22-NB-r14} + +SIB-Type-NB-v1530 ::= ENUMERATED { + sibType23-NB-r15, spare7, spare6, spare5, + spare4, spare3, spare2, spare1} + +CellSelectionInfo-NB-v1350 ::= SEQUENCE { + delta-RxLevMin-v1350 INTEGER (-8..-1) +} + +CellSelectionInfo-NB-v1430 ::= SEQUENCE { + powerClass14dBm-Offset-r14 ENUMERATED {dB-6, dB-3, dB3, dB6, dB9, dB12} OPTIONAL, -- Need OP + ce-authorisationOffset-r14 ENUMERATED {dB5, dB10, dB15, dB20, dB25, dB30, dB35} OPTIONAL -- Need OP +} + + +UECapabilityEnquiry-NB ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + c1 CHOICE { + ueCapabilityEnquiry-r13 UECapabilityEnquiry-NB-r13-IEs, + spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +UECapabilityEnquiry-NB-r13-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +UECapabilityInformation-NB ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE{ + ueCapabilityInformation-r13 UECapabilityInformation-NB-r13-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +UECapabilityInformation-NB-r13-IEs ::= SEQUENCE { + ue-Capability-r13 UE-Capability-NB-r13, + ue-RadioPagingInfo-r13 UE-RadioPagingInfo-NB-r13, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension UECapabilityInformation-NB-Ext-r14-IEs OPTIONAL +} + +UECapabilityInformation-NB-Ext-r14-IEs ::= SEQUENCE { + ue-Capability-ContainerExt-r14 OCTET STRING (CONTAINING UE-Capability-NB-Ext-r14-IEs), + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +ULInformationTransfer-NB ::= SEQUENCE { + criticalExtensions CHOICE { + ulInformationTransfer-r13 ULInformationTransfer-NB-r13-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +ULInformationTransfer-NB-r13-IEs ::= SEQUENCE { + dedicatedInfoNAS-r13 DedicatedInfoNAS, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +SystemInformationBlockType2-NB-r13 ::= SEQUENCE { + radioResourceConfigCommon-r13 RadioResourceConfigCommonSIB-NB-r13, + ue-TimersAndConstants-r13 UE-TimersAndConstants-NB-r13, + freqInfo-r13 SEQUENCE { + ul-CarrierFreq-r13 CarrierFreq-NB-r13 OPTIONAL, -- Need OP + additionalSpectrumEmission-r13 AdditionalSpectrumEmission + }, + timeAlignmentTimerCommon-r13 TimeAlignmentTimer, + multiBandInfoList-r13 SEQUENCE (SIZE (1..maxMultiBands)) OF AdditionalSpectrumEmission OPTIONAL, -- Need OR + lateNonCriticalExtension OCTET STRING OPTIONAL, + ..., + [[ cp-Reestablishment-r14 ENUMERATED {true} OPTIONAL -- Need OP + ]], + [[ servingCellMeasInfo-r14 ENUMERATED {true} OPTIONAL, -- Need OR + cqi-Reporting-r14 ENUMERATED {true} OPTIONAL -- Need OR + ]], + [[ enhancedPHR-r15 ENUMERATED {true} OPTIONAL, -- Need OR + freqInfo-v1530 SEQUENCE { + tdd-UL-DL-AlignmentOffset-r15 TDD-UL-DL-AlignmentOffset-NB-r15 + } OPTIONAL, -- Cond TDD + cp-EDT-r15 ENUMERATED {true} OPTIONAL, -- Need OR + up-EDT-r15 ENUMERATED {true} OPTIONAL -- Need OR + ]] +} + + +SystemInformationBlockType3-NB-r13 ::= SEQUENCE { + cellReselectionInfoCommon-r13 SEQUENCE { + q-Hyst-r13 ENUMERATED { + dB0, dB1, dB2, dB3, dB4, dB5, dB6, dB8, dB10, + dB12, dB14, dB16, dB18, dB20, dB22, dB24 + } + }, + cellReselectionServingFreqInfo-r13 SEQUENCE { + s-NonIntraSearch-r13 ReselectionThreshold + }, + intraFreqCellReselectionInfo-r13 SEQUENCE { + q-RxLevMin-r13 Q-RxLevMin, + q-QualMin-r13 Q-QualMin-r9 OPTIONAL, -- Need OP + p-Max-r13 P-Max OPTIONAL, -- Need OP + s-IntraSearchP-r13 ReselectionThreshold, + t-Reselection-r13 T-Reselection-NB-r13 + }, + freqBandInfo-r13 NS-PmaxList-NB-r13 OPTIONAL, -- Need OR + multiBandInfoList-r13 SEQUENCE (SIZE (1..maxMultiBands)) OF + NS-PmaxList-NB-r13 OPTIONAL, -- Need OR + lateNonCriticalExtension OCTET STRING OPTIONAL, + ..., + [[ intraFreqCellReselectionInfo-v1350 IntraFreqCellReselectionInfo-NB-v1350 OPTIONAL -- Cond Qrxlevmin + ]], + [[ intraFreqCellReselectionInfo-v1360 IntraFreqCellReselectionInfo-NB-v1360 OPTIONAL -- Need OR + ]], + [[ intraFreqCellReselectionInfo-v1430 IntraFreqCellReselectionInfo-NB-v1430 OPTIONAL -- Need OR + ]], + [[ cellReselectionInfoCommon-v1450 CellReselectionInfoCommon-NB-v1450 OPTIONAL -- Need OR + ]], + [[ nsss-RRM-Config-r15 NSSS-RRM-Config-NB-r15 OPTIONAL, -- Need OR + npbch-RRM-Config-r15 ENUMERATED {enabled} OPTIONAL -- Need OR + ]] +} + +IntraFreqCellReselectionInfo-NB-v1350 ::= SEQUENCE { + delta-RxLevMin-v1350 INTEGER (-8..-1) +} + +IntraFreqCellReselectionInfo-NB-v1360 ::= SEQUENCE { + s-IntraSearchP-v1360 ReselectionThreshold-NB-v1360 +} + +IntraFreqCellReselectionInfo-NB-v1430 ::= SEQUENCE { + powerClass14dBm-Offset-r14 ENUMERATED {dB-6, dB-3, dB3, dB6, dB9, dB12} OPTIONAL, -- Need OP + ce-AuthorisationOffset-r14 ENUMERATED {dB5, dB10, dB15, dB20, dB25, dB30, dB35} OPTIONAL -- Need OP +} + +CellReselectionInfoCommon-NB-v1450 ::= SEQUENCE { + s-SearchDeltaP-r14 ENUMERATED {dB6, dB9, dB12, dB15} +} + + +SystemInformationBlockType4-NB-r13 ::= SEQUENCE { + intraFreqNeighCellList-r13 IntraFreqNeighCellList OPTIONAL, -- Need OR + intraFreqBlackCellList-r13 IntraFreqBlackCellList OPTIONAL, -- Need OR + lateNonCriticalExtension OCTET STRING OPTIONAL, + ..., + [[ nsss-RRM-Config-r15 NSSS-RRM-Config-NB-r15 OPTIONAL, -- Need OR + intraFreqNeighCellList-v1530 IntraFreqNeighCellList-NB-v1530 OPTIONAL -- Need OR + ]] +} + +IntraFreqNeighCellList-NB-v1530 ::= SEQUENCE (SIZE (1..maxCellIntra)) OF IntraFreqNeighCellInfo-NB-v1530 + +IntraFreqNeighCellInfo-NB-v1530 ::= SEQUENCE { + nsss-RRM-Config-r15 NSSS-RRM-Config-NB-r15 OPTIONAL -- Cond NSSS-RRM +} + + +SystemInformationBlockType5-NB-r13 ::= SEQUENCE { + interFreqCarrierFreqList-r13 InterFreqCarrierFreqList-NB-r13, + t-Reselection-r13 T-Reselection-NB-r13, + lateNonCriticalExtension OCTET STRING OPTIONAL, + ..., + [[ scptm-FreqOffset-r14 INTEGER (1..8) OPTIONAL -- Need OP + ]] +} + + +InterFreqCarrierFreqList-NB-r13 ::= SEQUENCE (SIZE (1..maxFreq)) OF InterFreqCarrierFreqInfo-NB-r13 + + +InterFreqCarrierFreqInfo-NB-r13 ::= SEQUENCE { + dl-CarrierFreq-r13 CarrierFreq-NB-r13, + q-RxLevMin-r13 Q-RxLevMin, + q-QualMin-r13 Q-QualMin-r9 OPTIONAL, -- Need OP + p-Max-r13 P-Max OPTIONAL, -- Need OP + q-OffsetFreq-r13 Q-OffsetRange DEFAULT dB0, + interFreqNeighCellList-r13 InterFreqNeighCellList-NB-r13 OPTIONAL, -- Need OR + interFreqBlackCellList-r13 InterFreqBlackCellList-NB-r13 OPTIONAL, -- Need OR + multiBandInfoList-r13 MultiBandInfoList-NB-r13 OPTIONAL, -- Need OR + ..., + [[ delta-RxLevMin-v1350 INTEGER (-8..-1) OPTIONAL -- Cond Qrxlevmin + ]], + [[ powerClass14dBm-Offset-r14 ENUMERATED {dB-6, dB-3, dB3, dB6, dB9, dB12} +OPTIONAL, -- Need OP + ce-AuthorisationOffset-r14 ENUMERATED {dB5, dB10, dB15, dB20, dB25, dB30, dB35} OPTIONAL -- Need OP + ]], + [[ nsss-RRM-Config-r15 NSSS-RRM-Config-NB-r15 OPTIONAL, -- Need OR + interFreqNeighCellList-v1530 InterFreqNeighCellList-NB-v1530 OPTIONAL -- Need OR + ]] +} + +InterFreqNeighCellList-NB-r13 ::= SEQUENCE (SIZE (1..maxCellInter)) OF PhysCellId + +InterFreqNeighCellList-NB-v1530 ::= SEQUENCE (SIZE (1..maxCellInter)) OF InterFreqNeighCellInfo-NB-v1530 + +InterFreqNeighCellInfo-NB-v1530 ::= SEQUENCE { + nsss-RRM-Config-r15 NSSS-RRM-Config-NB-r15 OPTIONAL -- Cond NSSS-RRM +} + +InterFreqBlackCellList-NB-r13 ::= SEQUENCE (SIZE (1..maxCellBlack)) OF PhysCellId + + +SystemInformationBlockType14-NB-r13 ::= SEQUENCE { + ab-Param-r13 CHOICE { + ab-Common-r13 AB-Config-NB-r13, + ab-PerPLMN-List-r13 SEQUENCE (SIZE (1..maxPLMN-r11)) OF AB-ConfigPLMN-NB-r13 + } OPTIONAL, -- Need OR + lateNonCriticalExtension OCTET STRING OPTIONAL, + ..., + [[ ab-PerNRSRP-r15 ENUMERATED {thresh1, thresh2} OPTIONAL -- Need OR + ]] +} + +AB-ConfigPLMN-NB-r13 ::= SEQUENCE { + ab-Config-r13 AB-Config-NB-r13 OPTIONAL -- Need OR +} + +AB-Config-NB-r13 ::= SEQUENCE { + ab-Category-r13 ENUMERATED {a, b, c}, + ab-BarringBitmap-r13 BIT STRING (SIZE(10)), + ab-BarringForExceptionData-r13 ENUMERATED {true} OPTIONAL, -- Need OP + ab-BarringForSpecialAC-r13 BIT STRING (SIZE(5)) +} + + +SystemInformationBlockType15-NB-r14 ::= SEQUENCE { + mbms-SAI-IntraFreq-r14 MBMS-SAI-List-r11 OPTIONAL, -- Need OR + mbms-SAI-InterFreqList-r14 MBMS-SAI-InterFreqList-NB-r14 OPTIONAL, -- Need OR + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +MBMS-SAI-InterFreqList-NB-r14 ::= SEQUENCE (SIZE (1..maxFreq)) OF MBMS-SAI-InterFreq-NB-r14 + +MBMS-SAI-InterFreq-NB-r14 ::= SEQUENCE { + dl-CarrierFreq-r14 CarrierFreq-NB-r13, + mbms-SAI-List-r14 MBMS-SAI-List-r11, + multiBandInfoList-r14 AdditionalBandInfoList-NB-r14 OPTIONAL -- Need OR +} + + +SystemInformationBlockType16-NB-r13 ::= SystemInformationBlockType16-r11 + + +SystemInformationBlockType20-NB-r14 ::= SEQUENCE { + npdcch-SC-MCCH-Config-r14 NPDCCH-SC-MCCH-Config-NB-r14, + sc-mcch-CarrierConfig-r14 CHOICE { + dl-CarrierConfig-r14 DL-CarrierConfigCommon-NB-r14, + dl-CarrierIndex-r14 INTEGER (0.. maxNonAnchorCarriers-NB-r14) + }, + sc-mcch-RepetitionPeriod-r14 ENUMERATED {rf32, rf128, rf512, rf1024, + rf2048, rf4096, rf8192, rf16384}, + sc-mcch-Offset-r14 INTEGER (0..10), + sc-mcch-ModificationPeriod-r14 ENUMERATED { rf32, rf128, rf256, rf512, rf1024, + rf2048, rf4096, rf8192, rf16384, rf32768, + rf65536, rf131072, rf262144, rf524288, + rf1048576, spare1}, + sc-mcch-SchedulingInfo-r14 SC-MCCH-SchedulingInfo-NB-r14 OPTIONAL, -- Need OP + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +NPDCCH-SC-MCCH-Config-NB-r14 ::= SEQUENCE { + npdcch-NumRepetitions-SC-MCCH-r14 ENUMERATED {r1, r2, r4, r8, r16, + r32, r64, r128, r256, + r512, r1024, r2048}, + npdcch-StartSF-SC-MCCH-r14 ENUMERATED {v1dot5, v2, v4, v8, + v16, v32, v48, v64}, + npdcch-Offset-SC-MCCH-r14 ENUMERATED {zero, oneEighth, oneQuarter, + threeEighth, oneHalf, fiveEighth, + threeQuarter, sevenEighth} +} + +SC-MCCH-SchedulingInfo-NB-r14::= SEQUENCE { + onDurationTimerSCPTM-r14 ENUMERATED { + pp1, pp2, pp3, pp4, + pp8, pp16, pp32, spare}, + drx-InactivityTimerSCPTM-r14 ENUMERATED { + pp0, pp1, pp2, pp3, + pp4, pp8, pp16, pp32}, + schedulingPeriodStartOffsetSCPTM-r14 CHOICE { + sf10 INTEGER(0..9), + sf20 INTEGER(0..19), + sf32 INTEGER(0..31), + sf40 INTEGER(0..39), + sf64 INTEGER(0..63), + sf80 INTEGER(0..79), + sf128 INTEGER(0..127), + sf160 INTEGER(0..159), + sf256 INTEGER(0..255), + sf320 INTEGER(0..319), + sf512 INTEGER(0..511), + sf640 INTEGER(0..639), + sf1024 INTEGER(0..1023), + sf2048 INTEGER(0..2047), + sf4096 INTEGER(0..4095), + sf8192 INTEGER(0..8191) + }, + ... +} + + +SystemInformationBlockType22-NB-r14 ::= SEQUENCE { + dl-ConfigList-r14 DL-ConfigCommonList-NB-r14 OPTIONAL, -- Need OR + ul-ConfigList-r14 UL-ConfigCommonList-NB-r14 OPTIONAL, -- Need OR + pagingWeightAnchor-r14 PagingWeight-NB-r14 OPTIONAL, -- Cond pcch-config + nprach-ProbabilityAnchorList-r14 NPRACH-ProbabilityAnchorList-NB-r14 OPTIONAL, -- Cond nprach-config + lateNonCriticalExtension OCTET STRING OPTIONAL, + ..., + [[ mixedOperationModeConfig-r15 SEQUENCE { + dl-ConfigListMixed-r15 DL-ConfigCommonList-NB-r14 OPTIONAL, -- Need OR + ul-ConfigListMixed-r15 UL-ConfigCommonList-NB-r14 OPTIONAL, -- Need OR + pagingDistribution-r15 ENUMERATED {true} OPTIONAL, -- Need OR + nprach-Distribution-r15 ENUMERATED {true} OPTIONAL -- Need OR + } OPTIONAL, -- Need OR + ul-ConfigList-r15 UL-ConfigCommonListTDD-NB-r15 OPTIONAL -- Cond TDD + ]] +} + +DL-ConfigCommonList-NB-r14 ::= SEQUENCE (SIZE (1.. maxNonAnchorCarriers-NB-r14)) OF + DL-ConfigCommon-NB-r14 + +UL-ConfigCommonList-NB-r14 ::= SEQUENCE (SIZE (1.. maxNonAnchorCarriers-NB-r14)) OF + UL-ConfigCommon-NB-r14 + +UL-ConfigCommonListTDD-NB-r15 ::= SEQUENCE (SIZE (1.. maxNonAnchorCarriers-NB-r14)) OF + UL-ConfigCommonTDD-NB-r15 + +DL-ConfigCommon-NB-r14 ::= SEQUENCE { + dl-CarrierConfig-r14 DL-CarrierConfigCommon-NB-r14, + pcch-Config-r14 PCCH-Config-NB-r14 OPTIONAL, -- Need OR + ..., + [[ wus-Config-r15 WUS-ConfigPerCarrier-NB-r15 OPTIONAL -- Cond WUS + ]] +} + +PCCH-Config-NB-r14 ::= SEQUENCE { + npdcch-NumRepetitionPaging-r14 ENUMERATED { + r1, r2, r4, r8, r16, r32, r64, r128, + r256, r512, r1024, r2048, + spare4, spare3, spare2, spare1} OPTIONAL, -- Need OP + pagingWeight-r14 PagingWeight-NB-r14 DEFAULT w1, + ... +} + +PagingWeight-NB-r14 ::= ENUMERATED {w1, w2, w3, w4, w5, w6, w7, w8, + w9, w10, w11, w12, w13, w14, w15, w16} + +UL-ConfigCommon-NB-r14 ::= SEQUENCE { + ul-CarrierFreq-r14 CarrierFreq-NB-r13, + nprach-ParametersList-r14 NPRACH-ParametersList-NB-r14 OPTIONAL, -- Need OR + ..., + [[ nprach-ParametersListEDT-r15 NPRACH-ParametersList-NB-r14 OPTIONAL -- Cond EDT + ]] +} + +UL-ConfigCommonTDD-NB-r15 ::= SEQUENCE { + tdd-UL-DL-AlignmentOffset-r15 TDD-UL-DL-AlignmentOffset-NB-r15, + nprach-ParametersListTDD-r15 NPRACH-ParametersListTDD-NB-r15 OPTIONAL, -- Need OR + ... +} + +NPRACH-ParametersList-NB-r14 ::= SEQUENCE (SIZE (1.. maxNPRACH-Resources-NB-r13)) OF + NPRACH-Parameters-NB-r14 + + +NPRACH-Parameters-NB-r14 ::= SEQUENCE { + nprach-Parameters-r14 SEQUENCE { + nprach-Periodicity-r14 ENUMERATED {ms40, ms80, ms160, ms240, + ms320, ms640, ms1280, ms2560} + OPTIONAL, -- NEED OP + nprach-StartTime-r14 ENUMERATED {ms8, ms16, ms32, ms64, + ms128, ms256, ms512, ms1024} + OPTIONAL, -- NEED OP + nprach-SubcarrierOffset-r14 ENUMERATED {n0, n12, n24, n36, n2, n18, n34, spare1} + OPTIONAL, -- NEED OP + nprach-NumSubcarriers-r14 ENUMERATED {n12, n24, n36, n48} + OPTIONAL, -- NEED OP + nprach-SubcarrierMSG3-RangeStart-r14 ENUMERATED {zero, oneThird, twoThird, one} + OPTIONAL, -- NEED OP + npdcch-NumRepetitions-RA-r14 ENUMERATED {r1, r2, r4, r8, r16, r32, r64, r128, + r256, r512, r1024, r2048, + spare4, spare3, spare2, spare1} + OPTIONAL, -- NEED OP + npdcch-StartSF-CSS-RA-r14 ENUMERATED {v1dot5, v2, v4, v8, v16, v32, v48, v64} + OPTIONAL, -- NEED OP + npdcch-Offset-RA-r14 ENUMERATED {zero, oneEighth, oneFourth, threeEighth} + OPTIONAL, -- NEED OP + nprach-NumCBRA-StartSubcarriers-r14 ENUMERATED {n8, n10, n11, n12, n20, n22, n23, n24, + n32, n34, n35, n36, n40, n44, n46, n48} + OPTIONAL, -- NEED OP + npdcch-CarrierIndex-r14 INTEGER (1..maxNonAnchorCarriers-NB-r14) + OPTIONAL, -- Need OP + ... + } OPTIONAL -- Need OR +} + +NPRACH-ProbabilityAnchorList-NB-r14 ::= SEQUENCE (SIZE (1.. maxNPRACH-Resources-NB-r13)) OF + NPRACH-ProbabilityAnchor-NB-r14 + +NPRACH-ProbabilityAnchor-NB-r14 ::= SEQUENCE { + nprach-ProbabilityAnchor-r14 ENUMERATED { + zero, oneSixteenth, oneFifteenth, oneFourteenth, + oneThirteenth, oneTwelfth, oneEleventh, oneTenth, + oneNinth, oneEighth, oneSeventh, oneSixth, + oneFifth, oneFourth, oneThird, oneHalf} + OPTIONAL -- Need OP +} + + +SystemInformationBlockType23-NB-r15 ::= SEQUENCE { + ul-ConfigList-v1530 UL-ConfigCommonList-NB-v1530 OPTIONAL, -- Need OR + ul-ConfigListMixed-v1530 UL-ConfigCommonList-NB-v1530 OPTIONAL, -- Need OR + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +UL-ConfigCommonList-NB-v1530 ::= SEQUENCE (SIZE (1.. maxNonAnchorCarriers-NB-r14)) OF + UL-ConfigCommon-NB-v1530 + +UL-ConfigCommon-NB-v1530 ::= SEQUENCE { + nprach-ParametersListFmt2-r15 NPRACH-ParametersListFmt2-NB-r15 OPTIONAL, -- Need OR + nprach-ParametersListFmt2EDT-r15 NPRACH-ParametersListFmt2-NB-r15 OPTIONAL, -- Cond EDT + ... +} + + +CarrierConfigDedicated-NB-r13 ::= SEQUENCE { + dl-CarrierConfig-r13 DL-CarrierConfigDedicated-NB-r13, + ul-CarrierConfig-r13 UL-CarrierConfigDedicated-NB-r13 +} + +DL-CarrierConfigDedicated-NB-r13 ::= SEQUENCE { + dl-CarrierFreq-r13 CarrierFreq-NB-r13, + downlinkBitmapNonAnchor-r13 CHOICE { + useNoBitmap-r13 NULL, + useAnchorBitmap-r13 NULL, + explicitBitmapConfiguration-r13 DL-Bitmap-NB-r13, + spare NULL + } OPTIONAL, -- Need ON + dl-GapNonAnchor-r13 CHOICE { + useNoGap-r13 NULL, + useAnchorGapConfig-r13 NULL, + explicitGapConfiguration-r13 DL-GapConfig-NB-r13, + spare NULL + } OPTIONAL, -- Need ON + inbandCarrierInfo-r13 SEQUENCE { + samePCI-Indicator-r13 CHOICE { + samePCI-r13 SEQUENCE { + indexToMidPRB-r13 INTEGER (-55..54) + }, + differentPCI-r13 SEQUENCE { + eutra-NumCRS-Ports-r13 ENUMERATED {same, four} + } + } OPTIONAL, -- Cond anchor-guardband-or-standalone + eutraControlRegionSize-r13 ENUMERATED {n1, n2, n3} + } OPTIONAL, -- Cond non-anchor-inband + ..., + [[ nrs-PowerOffsetNonAnchor-v1330 ENUMERATED {dB-12, dB-10, dB-8, dB-6, + dB-4, dB-2, dB0, dB3} + OPTIONAL -- Need ON + ]], + [[ dl-GapNonAnchor-v1530 DL-GapConfig-NB-v1530 OPTIONAL -- Cond TDD1 + ]] +} + +UL-CarrierConfigDedicated-NB-r13 ::= SEQUENCE { + ul-CarrierFreq-r13 CarrierFreq-NB-r13 OPTIONAL, -- Need OP + ..., + [[ tdd-UL-DL-AlignmentOffset-r15 TDD-UL-DL-AlignmentOffset-NB-r15 OPTIONAL -- Cond TDD + ]] +} + + +CarrierFreq-NB-r13 ::= SEQUENCE { + carrierFreq-r13 ARFCN-ValueEUTRA-r9, + carrierFreqOffset-r13 ENUMERATED { + v-10, v-9, v-8, v-7, v-6, v-5, v-4, v-3, v-2, v-1, v-0dot5, + v0, v1, v2, v3, v4, v5, v6, v7, v8, v9 + } OPTIONAL -- Need ON +} + + +ChannelRasterOffset-NB-r13 ::= ENUMERATED {khz-7dot5, khz-2dot5, khz2dot5, khz7dot5} + + +DL-Bitmap-NB-r13 ::= CHOICE { + subframePattern10-r13 BIT STRING (SIZE (10)), + subframePattern40-r13 BIT STRING (SIZE (40)) +} + + +DL-CarrierConfigCommon-NB-r14 ::= SEQUENCE { + dl-CarrierFreq-r14 CarrierFreq-NB-r13, + downlinkBitmapNonAnchor-r14 CHOICE { + useNoBitmap-r14 NULL, + useAnchorBitmap-r14 NULL, + explicitBitmapConfiguration-r14 DL-Bitmap-NB-r13 + }, + dl-GapNonAnchor-r14 CHOICE { + useNoGap-r14 NULL, + useAnchorGapConfig-r14 NULL, + explicitGapConfiguration-r14 DL-GapConfig-NB-r13 + }, + inbandCarrierInfo-r14 SEQUENCE { + samePCI-Indicator-r14 CHOICE { + samePCI-r14 SEQUENCE { + indexToMidPRB-r14 INTEGER (-55..54) + }, + differentPCI-r14 SEQUENCE { + eutra-NumCRS-Ports-r14 ENUMERATED {same, four} + } + } OPTIONAL, -- Cond anchor-guardband-or-standalone + eutraControlRegionSize-r14 ENUMERATED {n1, n2, n3} + } OPTIONAL, -- Cond non-anchor-inband + nrs-PowerOffsetNonAnchor-r14 ENUMERATED {dB-12, dB-10, dB-8, dB-6, + dB-4, dB-2, dB0, dB3} DEFAULT dB0, + ..., + [[ dl-GapNonAnchor-v1530 DL-GapConfig-NB-v1530 OPTIONAL -- Cond TDD + ]] +} + + + +DL-GapConfig-NB-r13 ::= SEQUENCE { + dl-GapThreshold-r13 ENUMERATED {n32, n64, n128, n256}, + dl-GapPeriodicity-r13 ENUMERATED {sf64, sf128, sf256, sf512}, + dl-GapDurationCoeff-r13 ENUMERATED {oneEighth, oneFourth, threeEighth, oneHalf} +} + +DL-GapConfig-NB-v1530 ::= SEQUENCE { + dl-GapPeriodicity-v1530 ENUMERATED {sf1024} +} + + +LogicalChannelConfig-NB-r13 ::= SEQUENCE { + priority-r13 INTEGER (1..16) OPTIONAL, -- Cond UL + logicalChannelSR-Prohibit-r13 BOOLEAN OPTIONAL, -- Need ON + ... +} + + +MAC-MainConfig-NB-r13 ::= SEQUENCE { + ul-SCH-Config-r13 SEQUENCE { + periodicBSR-Timer-r13 PeriodicBSR-Timer-NB-r13 OPTIONAL, -- Need ON + retxBSR-Timer-r13 RetxBSR-Timer-NB-r13 + } OPTIONAL, -- Need ON + drx-Config-r13 DRX-Config-NB-r13 OPTIONAL, -- Need ON + timeAlignmentTimerDedicated-r13 TimeAlignmentTimer, + logicalChannelSR-Config-r13 CHOICE { + release NULL, + setup SEQUENCE { + logicalChannelSR-ProhibitTimer-r13 ENUMERATED { + pp2, pp8, pp32, pp128, pp512, + pp1024, pp2048, spare} + } + } OPTIONAL, -- Need ON + ..., + [[ rai-Activation-r14 ENUMERATED {true} OPTIONAL, -- Need OR + dataInactivityTimerConfig-r14 CHOICE { + release NULL, + setup SEQUENCE { + dataInactivityTimer-r14 DataInactivityTimer-r14 + } + } OPTIONAL -- Need ON + ]], + [[ drx-Cycle-v1430 ENUMERATED { + sf1280, sf2560, sf5120, sf10240} OPTIONAL -- Need ON + ]], + [[ ra-CFRA-Config-r14 ENUMERATED {true} OPTIONAL -- Need ON + ]] +} + +PeriodicBSR-Timer-NB-r13 ::= ENUMERATED { + pp2, pp4, pp8, pp16, pp64, pp128, infinity, spare} + +RetxBSR-Timer-NB-r13 ::= ENUMERATED { + pp4, pp16, pp64, pp128, pp256, pp512, infinity, spare} + +DRX-Config-NB-r13 ::= CHOICE { + release NULL, + setup SEQUENCE { + onDurationTimer-r13 ENUMERATED { + pp1, pp2, pp3, pp4, pp8, pp16, pp32, spare}, + drx-InactivityTimer-r13 ENUMERATED { + pp0, pp1, pp2, pp3, pp4, pp8, pp16, pp32}, + drx-RetransmissionTimer-r13 ENUMERATED { + pp0, pp1, pp2, pp4, pp6, pp8, pp16, pp24, + pp33, spare7, spare6, spare5, + spare4, spare3, spare2, spare1}, + drx-Cycle-r13 ENUMERATED { + sf256, sf512, sf1024, sf1536, sf2048, sf3072, + sf4096, sf4608, sf6144, sf7680, sf8192, sf9216, + spare4, spare3, spare2, spare1}, + drx-StartOffset-r13 INTEGER (0..255), + drx-ULRetransmissionTimer-r13 ENUMERATED { + pp0, pp1, pp2, pp4, pp6, pp8, pp16, pp24, + pp33, pp40, pp64, pp80, pp96, + pp112, pp128, pp160, pp320} + } +} + + + +NPDCCH-ConfigDedicated-NB-r13 ::= SEQUENCE { + npdcch-NumRepetitions-r13 ENUMERATED {r1, r2, r4, r8, r16, r32, r64, r128, + r256, r512, r1024, r2048, + spare4, spare3, spare2, spare1}, + npdcch-StartSF-USS-r13 ENUMERATED {v1dot5, v2, v4, v8, v16, v32, v48, v64}, + npdcch-Offset-USS-r13 ENUMERATED {zero, oneEighth, oneFourth, threeEighth} +} + +NPDCCH-ConfigDedicated-NB-v1530 ::= SEQUENCE { + npdcch-StartSF-USS-v1530 ENUMERATED {v96, v128} +} + + + +NPDSCH-ConfigCommon-NB-r13 ::= SEQUENCE { + nrs-Power-r13 INTEGER (-60..50) +} + + +NPRACH-ConfigSIB-NB-r13 ::= SEQUENCE { + nprach-CP-Length-r13 ENUMERATED {us66dot7, us266dot7}, + rsrp-ThresholdsPrachInfoList-r13 RSRP-ThresholdsNPRACH-InfoList-NB-r13 OPTIONAL, -- Need OR + nprach-ParametersList-r13 NPRACH-ParametersList-NB-r13 +} + +NPRACH-ConfigSIB-NB-v1330 ::= SEQUENCE { + nprach-ParametersList-v1330 NPRACH-ParametersList-NB-v1330 +} + +NPRACH-ConfigSIB-NB-v1450 ::= SEQUENCE { + maxNumPreambleAttemptCE-r14 ENUMERATED {n3, n4, n5, n6, n7, n8, n10, spare1} +} + +NPRACH-ConfigSIB-NB-v1530 ::= SEQUENCE { + tdd-Parameters-r15 SEQUENCE { + nprach-PreambleFormat-r15 ENUMERATED { + fmt0, fmt1, fmt2, fmt0-a, fmt1-a}, + numRepetitionsPerPreambleAttempt-r15 ENUMERATED { + n1, n2, n4, n8, n16, n32, n64, n128, + n256, n512, n1024}, + nprach-ParametersListTDD-r15 NPRACH-ParametersListTDD-NB-r15 + } OPTIONAL, -- Cond TDD + fmt2-Parameters-r15 SEQUENCE { + nprach-ParametersListFmt2-r15 NPRACH-ParametersListFmt2-NB-r15 OPTIONAL, -- Need OR + nprach-ParametersListFmt2EDT-r15 NPRACH-ParametersListFmt2-NB-r15 OPTIONAL -- Cond EDT2 + } OPTIONAL, -- Need OR + edt-Parameters-r15 SEQUENCE { + edt-SmallTBS-Subset-r15 ENUMERATED {true} OPTIONAL, -- Need OR + edt-TBS-InfoList-r15 EDT-TBS-InfoList-NB-r15, + nprach-ParametersListEDT-r15 NPRACH-ParametersList-NB-r14 OPTIONAL -- Need OR + } OPTIONAL -- Cond EDT +} + +NPRACH-ParametersList-NB-r13 ::= SEQUENCE (SIZE (1.. maxNPRACH-Resources-NB-r13)) OF NPRACH-Parameters-NB-r13 + +NPRACH-ParametersList-NB-v1330 ::= SEQUENCE (SIZE (1.. maxNPRACH-Resources-NB-r13)) OF NPRACH-Parameters-NB-v1330 + +NPRACH-Parameters-NB-r13::= SEQUENCE { + nprach-Periodicity-r13 ENUMERATED {ms40, ms80, ms160, ms240, + ms320, ms640, ms1280, ms2560}, + nprach-StartTime-r13 ENUMERATED {ms8, ms16, ms32, ms64, + ms128, ms256, ms512, ms1024}, + nprach-SubcarrierOffset-r13 ENUMERATED {n0, n12, n24, n36, n2, n18, n34, spare1}, + nprach-NumSubcarriers-r13 ENUMERATED {n12, n24, n36, n48}, + nprach-SubcarrierMSG3-RangeStart-r13 ENUMERATED {zero, oneThird, twoThird, one}, + maxNumPreambleAttemptCE-r13 ENUMERATED {n3, n4, n5, n6, n7, n8, n10, spare1}, + numRepetitionsPerPreambleAttempt-r13 ENUMERATED {n1, n2, n4, n8, n16, n32, n64, n128}, + npdcch-NumRepetitions-RA-r13 ENUMERATED {r1, r2, r4, r8, r16, r32, r64, r128, + r256, r512, r1024, r2048, + spare4, spare3, spare2, spare1}, + npdcch-StartSF-CSS-RA-r13 ENUMERATED {v1dot5, v2, v4, v8, v16, v32, v48, v64}, + npdcch-Offset-RA-r13 ENUMERATED {zero, oneEighth, oneFourth, threeEighth} +} + +NPRACH-Parameters-NB-v1330 ::= SEQUENCE { + nprach-NumCBRA-StartSubcarriers-r13 ENUMERATED {n8, n10, n11, n12, n20, n22, n23, n24, + n32, n34, n35, n36, n40, n44, n46, n48} +} + +NPRACH-ParametersListTDD-NB-r15 ::= SEQUENCE (SIZE (1.. maxNPRACH-Resources-NB-r13)) OF + NPRACH-ParametersTDD-NB-r15 + +NPRACH-ParametersTDD-NB-r15 ::= SEQUENCE { + nprach-Parameters-r15 SEQUENCE { + nprach-Periodicity-r15 ENUMERATED {ms80, ms160, ms320, ms640, + ms1280, ms2560, ms5120, ms10240} + OPTIONAL, -- NEED OP + nprach-StartTime-r15 ENUMERATED {ms10, ms20, ms40, ms80, + ms160, ms320, ms640, ms1280, + ms2560, ms5120, spare6, spare5, + spare4, spare3, spare2, spare1} + OPTIONAL, -- NEED OP + nprach-SubcarrierOffset-r15 ENUMERATED {n0, n12, n24, n36, n2, n18, n34, spare1} + OPTIONAL, -- NEED OP + nprach-NumSubcarriers-r15 ENUMERATED {n12, n24, n36, n48} + OPTIONAL, -- NEED OP + nprach-SubcarrierMSG3-RangeStart-r15 ENUMERATED {zero, oneThird, twoThird, one} + OPTIONAL, -- NEED OP + npdcch-NumRepetitions-RA-r15 ENUMERATED {r1, r2, r4, r8, r16, r32, r64, r128, + r256, r512, r1024, r2048, + spare4, spare3, spare2, spare1} + OPTIONAL, -- NEED OP + npdcch-StartSF-CSS-RA-r15 ENUMERATED {v4, v8, v16, v32, v48, v64, v96, v128} + OPTIONAL, -- NEED OP + npdcch-Offset-RA-r15 ENUMERATED {zero, oneEighth, oneFourth, threeEighth} + OPTIONAL, -- NEED OP + nprach-NumCBRA-StartSubcarriers-r15 ENUMERATED {n8, n10, n11, n12, n20, n22, n23, n24, + n32, n34, n35, n36, n40, n44, n46, n48} + OPTIONAL, -- NEED OP + ... + } OPTIONAL -- Need OR +} + +NPRACH-ParametersListFmt2-NB-r15 ::= SEQUENCE (SIZE (1.. maxNPRACH-Resources-NB-r13)) OF NPRACH-ParametersFmt2-NB-r15 + +NPRACH-ParametersFmt2-NB-r15 ::= SEQUENCE { + nprach-Parameters-r15 SEQUENCE { + nprach-Periodicity-r15 ENUMERATED {ms40, ms80, ms160, ms320, + ms640, ms1280, ms2560, ms5120} + OPTIONAL, -- NEED OP + nprach-StartTime-r15 ENUMERATED {ms8, ms16, ms32, ms64, + ms128, ms256, ms512, ms1024} + OPTIONAL, -- NEED OP + nprach-SubcarrierOffset-r15 ENUMERATED {n0, n36, n72, n108, n6, n54, n102, n42, + n78, n90, n12, n24, n48, n84, n60, n18} + OPTIONAL, -- NEED OP + nprach-NumSubcarriers-r15 ENUMERATED {n36, n72, n108, n144} + OPTIONAL, -- NEED OP + nprach-SubcarrierMSG3-RangeStart-r15 ENUMERATED {zero, oneThird, twoThird, one} + OPTIONAL, -- NEED OP + npdcch-NumRepetitions-RA-r15 ENUMERATED {r1, r2, r4, r8, r16, r32, r64, r128, + r256, r512, r1024, r2048, + spare4, spare3, spare2, spare1} + OPTIONAL, -- NEED OP + npdcch-StartSF-CSS-RA-r15 ENUMERATED {v1dot5, v2, v4, v8, v16, v32, v48, v64} + OPTIONAL, -- NEED OP + npdcch-Offset-RA-r15 ENUMERATED {zero, oneEighth, oneFourth, threeEighth} + OPTIONAL, -- NEED OP + nprach-NumCBRA-StartSubcarriers-r15 ENUMERATED { + n24, n30, n33, n36, n60, n66, n69, n72, + n96, n102, n105, n108, n120, n132, n138, n144} + OPTIONAL, -- NEED OP + npdcch-CarrierIndex-r15 INTEGER (1..maxNonAnchorCarriers-NB-r14) + OPTIONAL, -- Need OP + ... + } OPTIONAL -- Need OR +} + +RSRP-ThresholdsNPRACH-InfoList-NB-r13 ::= SEQUENCE (SIZE(1..2)) OF RSRP-Range + +EDT-TBS-InfoList-NB-r15 ::= SEQUENCE (SIZE (1.. maxNPRACH-Resources-NB-r13)) OF EDT-TBS-NB-r15 + +EDT-TBS-NB-r15 ::= SEQUENCE { + edt-SmallTBS-Enabled-r15 BOOLEAN, + edt-TBS-r15 ENUMERATED {b328, b408, b504, b584, b680, b808, b936, b1000} +} + + +NPUSCH-ConfigCommon-NB-r13 ::= SEQUENCE { + ack-NACK-NumRepetitions-Msg4-r13 SEQUENCE (SIZE(1.. maxNPRACH-Resources-NB-r13)) OF + ACK-NACK-NumRepetitions-NB-r13, + srs-SubframeConfig-r13 ENUMERATED { + sc0, sc1, sc2, sc3, sc4, sc5, sc6, sc7, + sc8, sc9, sc10, sc11, sc12, sc13, sc14, sc15 + } OPTIONAL, -- Need OR + dmrs-Config-r13 SEQUENCE { + threeTone-BaseSequence-r13 INTEGER (0..12) OPTIONAL, -- Need OP + threeTone-CyclicShift-r13 INTEGER (0..2), + sixTone-BaseSequence-r13 INTEGER (0..14) OPTIONAL, -- Need OP + sixTone-CyclicShift-r13 INTEGER (0..3), + twelveTone-BaseSequence-r13 INTEGER (0..30) OPTIONAL -- Need OP + } OPTIONAL, -- Need OR + ul-ReferenceSignalsNPUSCH-r13 UL-ReferenceSignalsNPUSCH-NB-r13 +} + +UL-ReferenceSignalsNPUSCH-NB-r13 ::= SEQUENCE { + groupHoppingEnabled-r13 BOOLEAN, + groupAssignmentNPUSCH-r13 INTEGER (0..29) +} + +NPUSCH-ConfigDedicated-NB-r13 ::= SEQUENCE { + ack-NACK-NumRepetitions-r13 ACK-NACK-NumRepetitions-NB-r13 OPTIONAL, -- Need ON + npusch-AllSymbols-r13 BOOLEAN OPTIONAL, -- Cond SRS + groupHoppingDisabled-r13 ENUMERATED {true} OPTIONAL -- Need OR +} + +ACK-NACK-NumRepetitions-NB-r13 ::= ENUMERATED {r1, r2, r4, r8, r16, r32, r64, r128} + + + +PDCP-Config-NB-r13 ::= SEQUENCE { + discardTimer-r13 ENUMERATED { + ms5120, ms10240, ms20480, ms40960, + ms81920, infinity, spare2, spare1 + } OPTIONAL, -- Cond Setup + headerCompression-r13 CHOICE { + notUsed NULL, + rohc SEQUENCE { + maxCID-r13 INTEGER (1..16383) DEFAULT 15, + profiles-r13 SEQUENCE { + profile0x0002 BOOLEAN, + profile0x0003 BOOLEAN, + profile0x0004 BOOLEAN, + profile0x0006 BOOLEAN, + profile0x0102 BOOLEAN, + profile0x0103 BOOLEAN, + profile0x0104 BOOLEAN + }, + ... + } + }, + ... +} + + +PhysicalConfigDedicated-NB-r13 ::= SEQUENCE { + carrierConfigDedicated-r13 CarrierConfigDedicated-NB-r13 OPTIONAL, -- Need ON + npdcch-ConfigDedicated-r13 NPDCCH-ConfigDedicated-NB-r13 OPTIONAL, -- Need ON + npusch-ConfigDedicated-r13 NPUSCH-ConfigDedicated-NB-r13 OPTIONAL, -- Need ON + uplinkPowerControlDedicated-r13 UplinkPowerControlDedicated-NB-r13 OPTIONAL, -- Need ON + ..., + [[ twoHARQ-ProcessesConfig-r14 ENUMERATED {true} OPTIONAL -- Need OR + ]], + [[ interferenceRandomisationConfig-r14 ENUMERATED {true} OPTIONAL -- Need OR + ]], + [[ npdcch-ConfigDedicated-v1530 NPDCCH-ConfigDedicated-NB-v1530 OPTIONAL -- Cond TDD + ]] +} + + +RACH-ConfigCommon-NB-r13 ::= SEQUENCE { + preambleTransMax-CE-r13 PreambleTransMax, + powerRampingParameters-r13 PowerRampingParameters, + rach-InfoList-r13 RACH-InfoList-NB-r13, + connEstFailOffset-r13 INTEGER (0..15) OPTIONAL, -- Need OP + ..., + [[ powerRampingParameters-v1450 PowerRampingParameters-NB-v1450 OPTIONAL -- Need OR + ]], + [[ rach-InfoList-v1530 RACH-InfoList-NB-v1530 OPTIONAL -- Cond EDT + ]] +} + +RACH-InfoList-NB-r13 ::= SEQUENCE (SIZE (1.. maxNPRACH-Resources-NB-r13)) OF RACH-Info-NB-r13 + +RACH-InfoList-NB-v1530 ::= SEQUENCE (SIZE (1.. maxNPRACH-Resources-NB-r13)) OF RACH-Info-NB-v1530 + +RACH-Info-NB-r13 ::= SEQUENCE { + ra-ResponseWindowSize-r13 ENUMERATED { + pp2, pp3, pp4, pp5, pp6, pp7, pp8, pp10}, + mac-ContentionResolutionTimer-r13 ENUMERATED { + pp1, pp2, pp3, pp4, pp8, pp16, pp32, pp64} +} + +RACH-Info-NB-v1530 ::= SEQUENCE { + mac-ContentionResolutionTimer-r15 ENUMERATED { + pp1, pp2, pp3, pp4, pp8, pp16, pp32, pp64} +} + +PowerRampingParameters-NB-v1450 ::= SEQUENCE { + preambleInitialReceivedTargetPower-v1450 ENUMERATED { + dBm-130, dBm-128, dBm-126, dBm-124, dBm-122, + dBm-88, dBm-86, dBm-84,dBm-82, dBm-80} + OPTIONAL, -- Need OR + powerRampingParametersCE1-r14 SEQUENCE { + powerRampingStepCE1-r14 ENUMERATED {dB0, dB2, dB4, dB6}, + preambleInitialReceivedTargetPowerCE1-r14 ENUMERATED { + dBm-130, dBm-128, dBm-126, dBm-124, dBm-122, + dBm-120, dBm-118, dBm-116, dBm-114, dBm-112, + dBm-110, dBm-108, dBm-106, dBm-104, dBm-102, + dBm-100, dBm-98, dBm-96, dBm-94, dBm-92, + dBm-90, dBm-88, dBm-86, dBm-84, dBm-82, dBm-80} + } OPTIONAL -- Need OR +} + + +RadioResourceConfigCommonSIB-NB-r13 ::= SEQUENCE { + rach-ConfigCommon-r13 RACH-ConfigCommon-NB-r13, + bcch-Config-r13 BCCH-Config-NB-r13, + pcch-Config-r13 PCCH-Config-NB-r13, + nprach-Config-r13 NPRACH-ConfigSIB-NB-r13, + npdsch-ConfigCommon-r13 NPDSCH-ConfigCommon-NB-r13, + npusch-ConfigCommon-r13 NPUSCH-ConfigCommon-NB-r13, + dl-Gap-r13 DL-GapConfig-NB-r13 OPTIONAL, -- Need OP + uplinkPowerControlCommon-r13 UplinkPowerControlCommon-NB-r13, + ..., + [[ nprach-Config-v1330 NPRACH-ConfigSIB-NB-v1330 OPTIONAL -- Need OR + ]], + [[ nprach-Config-v1450 NPRACH-ConfigSIB-NB-v1450 OPTIONAL -- Cond EnhPowerControl + ]], + [[ nprach-Config-v1530 NPRACH-ConfigSIB-NB-v1530 OPTIONAL, -- Need OR + dl-Gap-v1530 DL-GapConfig-NB-v1530 OPTIONAL, -- Cond TDD + wus-Config-r15 WUS-Config-NB-r15 OPTIONAL -- Need OR + ]] +} + +BCCH-Config-NB-r13 ::= SEQUENCE { + modificationPeriodCoeff-r13 ENUMERATED {n16, n32, n64, n128} +} + +PCCH-Config-NB-r13 ::= SEQUENCE { + defaultPagingCycle-r13 ENUMERATED {rf128, rf256, rf512, rf1024}, + nB-r13 ENUMERATED { + fourT, twoT, oneT, halfT, quarterT, one8thT, + one16thT, one32ndT, one64thT, + one128thT, one256thT, one512thT, one1024thT, + spare3, spare2, spare1}, + npdcch-NumRepetitionPaging-r13 ENUMERATED { + r1, r2, r4, r8, r16, r32, r64, r128, + r256, r512, r1024, r2048, + spare4, spare3, spare2, spare1} +} + + +RadioResourceConfigDedicated-NB-r13 ::= SEQUENCE { + srb-ToAddModList-r13 SRB-ToAddModList-NB-r13 OPTIONAL, -- Need ON + drb-ToAddModList-r13 DRB-ToAddModList-NB-r13 OPTIONAL, -- Need ON + drb-ToReleaseList-r13 DRB-ToReleaseList-NB-r13 OPTIONAL, -- Need ON + mac-MainConfig-r13 CHOICE { + explicitValue-r13 MAC-MainConfig-NB-r13, + defaultValue-r13 NULL + } OPTIONAL, -- Need ON + physicalConfigDedicated-r13 PhysicalConfigDedicated-NB-r13 OPTIONAL, -- Need ON + rlf-TimersAndConstants-r13 RLF-TimersAndConstants-NB-r13 OPTIONAL, -- Need ON + ..., + [[ schedulingRequestConfig-r15 SchedulingRequestConfig-NB-r15 OPTIONAL -- Need ON + ]] +} + +SRB-ToAddModList-NB-r13 ::= SEQUENCE (SIZE (1)) OF SRB-ToAddMod-NB-r13 + +SRB-ToAddMod-NB-r13 ::= SEQUENCE { + rlc-Config-r13 CHOICE { + explicitValue RLC-Config-NB-r13, + defaultValue NULL + } OPTIONAL, -- Cond Setup + logicalChannelConfig-r13 CHOICE { + explicitValue LogicalChannelConfig-NB-r13, + defaultValue NULL + } OPTIONAL, -- Cond Setup + ..., + [[ rlc-Config-v1430 RLC-Config-NB-v1430 OPTIONAL -- Need ON + ]] +} + +DRB-ToAddModList-NB-r13 ::= SEQUENCE (SIZE (1..maxDRB-NB-r13)) OF DRB-ToAddMod-NB-r13 + +DRB-ToAddMod-NB-r13 ::= SEQUENCE { + eps-BearerIdentity-r13 INTEGER (0..15) OPTIONAL, -- Cond DRB-Setup + drb-Identity-r13 DRB-Identity, + pdcp-Config-r13 PDCP-Config-NB-r13 OPTIONAL, -- Cond Setup + rlc-Config-r13 RLC-Config-NB-r13 OPTIONAL, -- Cond Setup + logicalChannelIdentity-r13 INTEGER (3..10) OPTIONAL, -- Cond DRB-Setup + logicalChannelConfig-r13 LogicalChannelConfig-NB-r13 OPTIONAL, -- Cond Setup + ..., + [[ rlc-Config-v1430 RLC-Config-NB-v1430 OPTIONAL -- Need ON + ]] +} + +DRB-ToReleaseList-NB-r13 ::= SEQUENCE (SIZE (1..maxDRB-NB-r13)) OF DRB-Identity + + +RLC-Config-NB-r13 ::= CHOICE { + am SEQUENCE { + ul-AM-RLC-r13 UL-AM-RLC-NB-r13, + dl-AM-RLC-r13 DL-AM-RLC-NB-r13 + }, + ..., + [[ um-Bi-Directional-r15 NULL, + um-Uni-Directional-UL-r15 NULL, + um-Uni-Directional-DL-r15 NULL + ]] +} + +RLC-Config-NB-v1430 ::= SEQUENCE { + t-Reordering-r14 T-Reordering OPTIONAL -- Cond twoHARQ +} + +UL-AM-RLC-NB-r13 ::= SEQUENCE { + t-PollRetransmit-r13 T-PollRetransmit-NB-r13, + maxRetxThreshold-r13 ENUMERATED {t1, t2, t3, t4, t6, t8, t16, t32} +} + +DL-AM-RLC-NB-r13 ::= SEQUENCE { + enableStatusReportSN-Gap-r13 ENUMERATED {true} OPTIONAL +} + +T-PollRetransmit-NB-r13 ::= ENUMERATED { + ms250, ms500, ms1000, ms2000, ms3000, ms4000, + ms6000, ms10000, ms15000, ms25000, ms40000, ms60000, + ms90000, ms120000, ms180000, ms300000-v1530} + + + + +RLF-TimersAndConstants-NB-r13 ::= CHOICE { + release NULL, + setup SEQUENCE { + t301-r13 ENUMERATED { + ms2500, ms4000, ms6000, ms10000, + ms15000, ms25000, ms40000, ms60000}, + t310-r13 ENUMERATED { + ms0, ms200, ms500, ms1000, ms2000, ms4000, ms8000}, + n310-r13 ENUMERATED { + n1, n2, n3, n4, n6, n8, n10, n20}, + t311-r13 ENUMERATED { + ms1000, ms3000, ms5000, ms10000, ms15000, + ms20000, ms30000}, + n311-r13 ENUMERATED { + n1, n2, n3, n4, n5, n6, n8, n10}, + ..., + [[ t311-v1350 ENUMERATED { + ms40000, ms60000, ms90000, ms120000} + OPTIONAL -- Need OR + ]], + [[ t301-v1530 ENUMERATED { + ms80000, ms100000, ms120000} + OPTIONAL, -- Cond TDD + t311-v1530 ENUMERATED { + ms160000, ms200000} + OPTIONAL -- Cond TDD + ]] + } +} + + +SchedulingRequestConfig-NB-r15 ::= SEQUENCE { + sr-WithHARQ-ACK-Config-r15 ENUMERATED {true} OPTIONAL, + sr-WithoutHARQ-ACK-Config-r15 SR-WithoutHARQ-ACK-Config-NB-r15 OPTIONAL, -- Need ON + sr-SPS-BSR-Config-r15 SR-SPS-BSR-Config-NB-r15 OPTIONAL, -- Need ON + ... +} + +SR-WithoutHARQ-ACK-Config-NB-r15 ::= CHOICE { + release NULL, + setup SEQUENCE { + sr-ProhibitTimer-r15 INTEGER (0..7) OPTIONAL, -- Need ON + sr-NPRACH-Resource-r15 SR-NPRACH-Resource-NB-r15 OPTIONAL -- Need ON + } +} + +SR-NPRACH-Resource-NB-r15 ::= SEQUENCE { + nprach-CarrierIndex-r15 INTEGER (0..maxNonAnchorCarriers-NB-r14), + nprach-ResourceIndex-r15 INTEGER (1..maxNPRACH-Resources-NB-r13), + nprach-SubCarrierIndex-r15 CHOICE { + nprach-Fmt0Fmt1-r15 INTEGER (0..47), + nprach-Fmt2-r15 INTEGER (0..143) + }, + p0-SR-r15 INTEGER (-126..24), + alpha-r15 ENUMERATED {al0, al04, al05, al06, al07, al08, al09, al1}} + +SR-SPS-BSR-Config-NB-r15 ::= CHOICE { + release NULL, + setup SEQUENCE { + semiPersistSchedC-RNTI-r15 C-RNTI, + semiPersistSchedIntervalUL-r15 ENUMERATED {sf128, sf256, sf512, sf1024, + sf1280, sf2048, sf2560, sf5120} + } +} + + +TDD-Config-NB-r15 ::= SEQUENCE { + subframeAssignment-r15 ENUMERATED { + sa1, sa2, sa3, sa4, sa5}, + specialSubframePatterns-r15 ENUMERATED { + ssp0, ssp1, ssp2, ssp3, ssp4, ssp5, ssp6, ssp7, + ssp8, ssp9, ssp10, ssp10-CRS-LessDwPTS} +} + + +TDD-UL-DL-AlignmentOffset-NB-r15 ::= ENUMERATED { khz-7dot5, khz0, khz7dot5} + + + +UplinkPowerControlCommon-NB-r13 ::= SEQUENCE { + p0-NominalNPUSCH-r13 INTEGER (-126..24), + alpha-r13 ENUMERATED {al0, al04, al05, al06, al07, al08, al09, al1}, + deltaPreambleMsg3-r13 INTEGER (-1..6) +} + +UplinkPowerControlDedicated-NB-r13 ::= SEQUENCE { + p0-UE-NPUSCH-r13 INTEGER (-8..7) +} + + +WUS-Config-NB-r15 ::= SEQUENCE { + maxDurationFactor-r15 WUS-MaxDurationFactor-NB-r15, + numPOs-r15 ENUMERATED {n1, n2, n4} DEFAULT n1, + numDRX-CyclesRelaxed-r15 ENUMERATED {n1, n2, n4, n8}, + timeOffsetDRX-r15 ENUMERATED {ms40, ms80, ms160, ms240}, + timeOffset-eDRX-Short-r15 ENUMERATED {ms40, ms80, ms160, ms240}, + timeOffset-eDRX-Long-r15 ENUMERATED {ms1000, ms2000} OPTIONAL, -- Need OP + ... +} + +WUS-ConfigPerCarrier-NB-r15 ::= SEQUENCE { + maxDurationFactor-r15 WUS-MaxDurationFactor-NB-r15 +} + +WUS-MaxDurationFactor-NB-r15 ::= ENUMERATED {one128th, one64th, one32th, one16th, + oneEighth, oneQuarter, oneHalf} + +AdditionalBandInfoList-NB-r14 ::= SEQUENCE (SIZE (1..maxMultiBands)) OF FreqBandIndicator-NB-r13 + + +FreqBandIndicator-NB-r13 ::= INTEGER (1.. maxFBI2) + + +MultiBandInfoList-NB-r13 ::= SEQUENCE (SIZE (1..maxMultiBands)) OF MultiBandInfo-NB-r13 + +MultiBandInfo-NB-r13 ::= SEQUENCE { + freqBandIndicator-r13 FreqBandIndicator-NB-r13 OPTIONAL, -- Need OR + freqBandInfo-r13 NS-PmaxList-NB-r13 OPTIONAL -- Need OR +} + + +NS-PmaxList-NB-r13 ::= SEQUENCE (SIZE (1..maxNS-Pmax-NB-r13)) OF NS-PmaxValue-NB-r13 + +NS-PmaxValue-NB-r13 ::= SEQUENCE { + additionalPmax-r13 P-Max OPTIONAL, -- Need OR + additionalSpectrumEmission-r13 AdditionalSpectrumEmission +} + + +ReselectionThreshold-NB-v1360 ::= INTEGER (32..63) + + +T-Reselection-NB-r13 ::= ENUMERATED {s0, s3, s6, s9, s12, s15, s18, s21} + + +CQI-NPDCCH-NB-r14 ::= ENUMERATED { + noMeasurements, candidateRep-A, candidateRep-B, candidateRep-C, + candidateRep-D, candidateRep-E, candidateRep-F, candidateRep-G, + candidateRep-H, candidateRep-I, candidateRep-J, candidateRep-K, + candidateRep-L} + + +CQI-NPDCCH-Short-NB-r14 ::= ENUMERATED { + noMeasurements, candidateRep-1, candidateRep-2, candidateRep-3} + + +MeasResultServCell-NB-r14 ::= SEQUENCE { + nrsrpResult-r14 NRSRP-Range-NB-r14, + nrsrqResult-r14 NRSRQ-Range-NB-r14 +} + + +NRSRP-Range-NB-r14 ::= INTEGER(0..113) + + +NRSRQ-Range-NB-r14 ::= INTEGER(-30..46) + + +NSSS-RRM-Config-NB-r15 ::= SEQUENCE { + nsss-RRM-PowerOffset-r15 ENUMERATED {dB-3, db0, dB3}, + nsss-NumOccDiffPrecoders-r15 ENUMERATED {n1, n2, n4, n8} OPTIONAL -- Need OP +} + +EstablishmentCause-NB-r13 ::= ENUMERATED { + mt-Access, mo-Signalling, mo-Data, mo-ExceptionData, + delayTolerantAccess-v1330, spare3, spare2, spare1} + + +UE-Capability-NB-r13 ::= SEQUENCE { + accessStratumRelease-r13 AccessStratumRelease-NB-r13, + ue-Category-NB-r13 ENUMERATED {nb1} OPTIONAL, + multipleDRB-r13 ENUMERATED {supported} OPTIONAL, + pdcp-Parameters-r13 PDCP-Parameters-NB-r13 OPTIONAL, + phyLayerParameters-r13 PhyLayerParameters-NB-r13, + rf-Parameters-r13 RF-Parameters-NB-r13, + dummy SEQUENCE {} OPTIONAL +} + +UE-Capability-NB-Ext-r14-IEs ::= SEQUENCE { + ue-Category-NB-r14 ENUMERATED {nb2} OPTIONAL, + mac-Parameters-r14 MAC-Parameters-NB-r14 OPTIONAL, + phyLayerParameters-v1430 PhyLayerParameters-NB-v1430 OPTIONAL, + rf-Parameters-v1430 RF-Parameters-NB-v1430, + nonCriticalExtension UE-Capability-NB-v1440-IEs OPTIONAL +} + +UE-Capability-NB-v1440-IEs ::= SEQUENCE { + phyLayerParameters-v1440 PhyLayerParameters-NB-v1440 OPTIONAL, + nonCriticalExtension UE-Capability-NB-v14x0-IEs OPTIONAL +} + +UE-Capability-NB-v14x0-IEs ::= SEQUENCE { +-- Following field is only to be used for late REL-14 extensions + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension UE-Capability-NB-v1530-IEs OPTIONAL +} + +UE-Capability-NB-v1530-IEs ::= SEQUENCE { + earlyData-UP-r15 ENUMERATED {supported} OPTIONAL, + rlc-Parameters-r15 RLC-Parameters-NB-r15, + mac-Parameters-v1530 MAC-Parameters-NB-v1530, + phyLayerParameters-v1530 PhyLayerParameters-NB-v1530 OPTIONAL, + tdd-UE-Capability-r15 TDD-UE-Capability-NB-r15 OPTIONAL, nonCriticalExtension SEQUENCE {} OPTIONAL +} + +TDD-UE-Capability-NB-r15 ::= SEQUENCE { + ue-Category-NB-r15 ENUMERATED {nb2} OPTIONAL, + phyLayerParametersRel13-r15 PhyLayerParameters-NB-r13 OPTIONAL, + phyLayerParametersRel14-r15 PhyLayerParameters-NB-v1430 OPTIONAL, + phyLayerParameters-v1530 PhyLayerParameters-NB-v1530 OPTIONAL, + ... +} + +AccessStratumRelease-NB-r13 ::= ENUMERATED {rel13, rel14, rel15, spare5, spare4, spare3, spare2, spare1, ...} + +PDCP-Parameters-NB-r13 ::= SEQUENCE { + supportedROHC-Profiles-r13 SEQUENCE { + profile0x0002 BOOLEAN, + profile0x0003 BOOLEAN, + profile0x0004 BOOLEAN, + profile0x0006 BOOLEAN, + profile0x0102 BOOLEAN, + profile0x0103 BOOLEAN, + profile0x0104 BOOLEAN + }, + maxNumberROHC-ContextSessions-r13 ENUMERATED {cs2, cs4, cs8, cs12} DEFAULT cs2, + ... +} + +RLC-Parameters-NB-r15 ::= SEQUENCE { + rlc-UM-r15 ENUMERATED {supported} OPTIONAL +} + +MAC-Parameters-NB-r14 ::= SEQUENCE { + dataInactMon-r14 ENUMERATED {supported} OPTIONAL, + rai-Support-r14 ENUMERATED {supported} OPTIONAL +} + +MAC-Parameters-NB-v1530 ::= SEQUENCE { + sr-SPS-BSR-r15 ENUMERATED {supported} OPTIONAL +} + +PhyLayerParameters-NB-r13 ::= SEQUENCE { + multiTone-r13 ENUMERATED {supported} OPTIONAL, + multiCarrier-r13 ENUMERATED {supported} OPTIONAL + } + +PhyLayerParameters-NB-v1430 ::= SEQUENCE { + multiCarrier-NPRACH-r14 ENUMERATED {supported} OPTIONAL, + twoHARQ-Processes-r14 ENUMERATED {supported} OPTIONAL +} + +PhyLayerParameters-NB-v1440 ::= SEQUENCE { + interferenceRandomisation-r14 ENUMERATED {supported} OPTIONAL +} + +PhyLayerParameters-NB-v1530 ::= SEQUENCE { + mixedOperationMode-r15 ENUMERATED {supported} OPTIONAL, + sr-WithHARQ-ACK-r15 ENUMERATED {supported} OPTIONAL, + sr-WithoutHARQ-ACK-r15 ENUMERATED {supported} OPTIONAL, + nprach-Format2-r15 ENUMERATED {supported} OPTIONAL, + additionalTransmissionSIB1-r15 ENUMERATED {supported} OPTIONAL, + npusch-3dot75kHz-SCS-TDD-r15 ENUMERATED {supported} OPTIONAL +} + +RF-Parameters-NB-r13 ::= SEQUENCE { + supportedBandList-r13 SupportedBandList-NB-r13, + multiNS-Pmax-r13 ENUMERATED {supported} OPTIONAL +} + +RF-Parameters-NB-v1430 ::= SEQUENCE { + powerClassNB-14dBm-r14 ENUMERATED {supported} OPTIONAL +} + +SupportedBandList-NB-r13 ::= SEQUENCE (SIZE (1..maxBands)) OF SupportedBand-NB-r13 + +SupportedBand-NB-r13 ::= SEQUENCE { + band-r13 FreqBandIndicator-NB-r13, + powerClassNB-20dBm-r13 ENUMERATED {supported} OPTIONAL +} + + +UE-RadioPagingInfo-NB-r13 ::= SEQUENCE { + ue-Category-NB-r13 ENUMERATED {nb1} OPTIONAL, + ..., + [[ multiCarrierPaging-r14 ENUMERATED {true} OPTIONAL + ]], + [[ mixedOperationMode-r15 ENUMERATED {supported} OPTIONAL, + wakeUpSignal-r15 ENUMERATED {true} OPTIONAL, + wakeUpSignalMinGap-eDRX-r15 ENUMERATED {ms40, ms240, ms1000, ms2000} OPTIONAL, + multiCarrierPagingTDD-r15 ENUMERATED {true} OPTIONAL + ]] +} + + +UE-TimersAndConstants-NB-r13 ::= SEQUENCE { + t300-r13 ENUMERATED { + ms2500, ms4000, ms6000, ms10000, + ms15000, ms25000, ms40000, ms60000}, + t301-r13 ENUMERATED { + ms2500, ms4000, ms6000, ms10000, + ms15000, ms25000, ms40000, ms60000}, + t310-r13 ENUMERATED { + ms0, ms200, ms500, ms1000, ms2000, ms4000, ms8000}, + n310-r13 ENUMERATED { + n1, n2, n3, n4, n6, n8, n10, n20}, + t311-r13 ENUMERATED { + ms1000, ms3000, ms5000, ms10000, ms15000, + ms20000, ms30000}, + n311-r13 ENUMERATED { + n1, n2, n3, n4, n5, n6, n8, n10}, + ..., + [[ t311-v1350 ENUMERATED { + ms40000, ms60000, ms90000, ms120000} + OPTIONAL -- Need OR + ]], + [[ t300-v1530 ENUMERATED { + ms80000, ms100000, ms120000} OPTIONAL, -- Cond TDD + t301-v1530 ENUMERATED { + ms80000, ms100000, ms120000} OPTIONAL, -- Cond TDD + t311-v1530 ENUMERATED { + ms160000, ms200000} OPTIONAL, -- Cond TDD + t300-r15 ENUMERATED {ms6000, ms10000, ms15000, ms25000, ms40000, + ms60000, ms80000, ms120000} OPTIONAL -- Cond EDT + ]] +} + + +SC-MTCH-InfoList-NB-r14 ::= SEQUENCE (SIZE (0.. maxSC-MTCH-NB-r14)) OF SC-MTCH-Info-NB-r14 + +SC-MTCH-Info-NB-r14 ::= SEQUENCE { + sc-mtch-CarrierConfig-r14 CHOICE { + dl-CarrierConfig-r14 DL-CarrierConfigCommon-NB-r14, + dl-CarrierIndex-r14 INTEGER (0.. maxNonAnchorCarriers-NB-r14) + }, + mbmsSessionInfo-r14 MBMSSessionInfo-r13, + g-RNTI-r14 BIT STRING(SIZE(16)), + sc-mtch-SchedulingInfo-r14 SC-MTCH-SchedulingInfo-NB-r14 OPTIONAL, -- Need OP + sc-mtch-NeighbourCell-r14 BIT STRING (SIZE(maxNeighCell-SCPTM-NB-r14)) OPTIONAL, -- Need OP + npdcch-NPDSCH-MaxTBS-SC-MTCH-r14 ENUMERATED {n680, n2536}, + npdcch-NumRepetitions-SC-MTCH-r14 ENUMERATED {r1, r2, r4, r8, r16, + r32, r64, r128, r256, + r512, r1024, r2048, spare4, + spare3, spare2, spare1}, + npdcch-StartSF-SC-MTCH-r14 ENUMERATED {v1dot5, v2, v4, v8, + v16, v32, v48, v64}, + npdcch-Offset-SC-MTCH-r14 ENUMERATED {zero, oneEighth, oneQuarter, + threeEighth, oneHalf, fiveEighth, + threeQuarter, sevenEighth}, + ... +} + +SC-MTCH-SchedulingInfo-NB-r14 ::= SEQUENCE { + onDurationTimerSCPTM-r14 ENUMERATED { + pp1, pp2, pp3, pp4, + pp8, pp16, pp32, spare}, + drx-InactivityTimerSCPTM-r14 ENUMERATED { + pp0, pp1, pp2, pp3, + pp4, pp8, pp16, pp32}, + schedulingPeriodStartOffsetSCPTM-r14 CHOICE { + sf10 INTEGER(0..9), + sf20 INTEGER(0..19), + sf32 INTEGER(0..31), + sf40 INTEGER(0..39), + sf64 INTEGER(0..63), + sf80 INTEGER(0..79), + sf128 INTEGER(0..127), + sf160 INTEGER(0..159), + sf256 INTEGER(0..255), + sf320 INTEGER(0..319), + sf512 INTEGER(0..511), + sf640 INTEGER(0..639), + sf1024 INTEGER(0..1023), + sf2048 INTEGER(0..2047), + sf4096 INTEGER(0..4095), + sf8192 INTEGER(0..8191) + }, + ... +} + + +SCPTM-NeighbourCellList-NB-r14 ::= SEQUENCE (SIZE (1..maxNeighCell-SCPTM-NB-r14)) OF PCI-ARFCN-NB-r14 + +PCI-ARFCN-NB-r14 ::= SEQUENCE { + physCellId-r14 PhysCellId, + carrierFreq-r14 CarrierFreq-NB-r13 OPTIONAL -- Need OP +} + + +maxNPRACH-Resources-NB-r13 INTEGER ::= 3 -- Maximum number of NPRACH resources for NB-IoT +maxNonAnchorCarriers-NB-r14 INTEGER ::= 15 -- Maximum number of non-anchor carriers for NB-IoT +maxDRB-NB-r13 INTEGER ::= 2 -- Maximum number of Data Radio Bearers for NB-IoT +maxNeighCell-SCPTM-NB-r14 INTEGER ::= 8 -- Maximum number of SCPTM neighbour cells +maxNS-Pmax-NB-r13 INTEGER ::= 4 -- Maximum number of NS and P-Max values per band +maxSC-MTCH-NB-r14 INTEGER ::= 64 -- Maximum number of SC-MTCHs in one cell for NB-IoT +maxSI-Message-NB-r13 INTEGER ::= 8 -- Maximum number of SI messages for NB-IoT + + +END + + +EUTRA-UE-Variables DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + AbsoluteTimeInfo-r10, + AreaConfiguration-r10, + AreaConfiguration-v1130, + ARFCN-ValueNR-r15, + BT-NameList-r15, + CarrierFreqGERAN, + CellIdentity, + CellList-r15, + ConnEstFailReport-r11, + EUTRA-CarrierList-r15, + SpeedStateScaleFactors, + C-RNTI, + LoggingDuration-r10, + LoggingInterval-r10, + LogMeasInfo-r10, + MeasCSI-RS-Id-r12, + MeasId, + MeasId-v1250, + MeasIdToAddModList, + MeasIdToAddModListExt-r12, + MeasIdToAddModList-v1310, + MeasIdToAddModListExt-v1310, + MeasObjectToAddModList, + MeasObjectToAddModList-v9e0, + MeasObjectToAddModListExt-r13, + MeasResultListIdle-r15, + MeasScaleFactor-r12, + MobilityStateParameters, + NeighCellConfig, + PhysCellId, + PhysCellIdCDMA2000, + PhysCellIdGERAN, + PhysCellIdUTRA-FDD, + PhysCellIdUTRA-TDD, + PLMN-Identity, + PLMN-IdentityList3-r11, + QuantityConfig, + ReportConfigToAddModList, + RLF-Report-r9, + TargetMBSFN-AreaList-r12, + TraceReference-r10, + Tx-ResourcePoolMeasList-r14, + VisitedCellInfoList-r12, + maxCellMeas, + maxCSI-RS-Meas-r12, + maxMeasId, + maxMeasId-r12, + maxRS-Index-r15, + PhysCellIdNR-r15, + RS-IndexNR-r15, + UL-DelayConfig-r13, + WLAN-CarrierInfo-r13, + WLAN-Identifiers-r12, + WLAN-Id-List-r13, + WLAN-NameList-r15, + WLAN-Status-r13, + WLAN-Status-v1430, + WLAN-SuspendConfig-r14 + +FROM EUTRA-RRC-Definitions; + + +VarConnEstFailReport-r11 ::= SEQUENCE { + connEstFailReport-r11 ConnEstFailReport-r11, + plmn-Identity-r11 PLMN-Identity +} + + +VarLogMeasConfig-r10 ::= SEQUENCE { + areaConfiguration-r10 AreaConfiguration-r10 OPTIONAL, + loggingDuration-r10 LoggingDuration-r10, + loggingInterval-r10 LoggingInterval-r10 +} + +VarLogMeasConfig-r11 ::= SEQUENCE { + areaConfiguration-r10 AreaConfiguration-r10 OPTIONAL, + areaConfiguration-v1130 AreaConfiguration-v1130 OPTIONAL, + loggingDuration-r10 LoggingDuration-r10, + loggingInterval-r10 LoggingInterval-r10 +} + +VarLogMeasConfig-r12 ::= SEQUENCE { + areaConfiguration-r10 AreaConfiguration-r10 OPTIONAL, + areaConfiguration-v1130 AreaConfiguration-v1130 OPTIONAL, + loggingDuration-r10 LoggingDuration-r10, + loggingInterval-r10 LoggingInterval-r10, + targetMBSFN-AreaList-r12 TargetMBSFN-AreaList-r12 OPTIONAL +} + +VarLogMeasConfig-r15 ::= SEQUENCE { + areaConfiguration-r10 AreaConfiguration-r10 OPTIONAL, + areaConfiguration-v1130 AreaConfiguration-v1130 OPTIONAL, + loggingDuration-r10 LoggingDuration-r10, + loggingInterval-r10 LoggingInterval-r10, + targetMBSFN-AreaList-r12 TargetMBSFN-AreaList-r12 OPTIONAL, + bt-NameList-r15 BT-NameList-r15 OPTIONAL, + wlan-NameList-r15 WLAN-NameList-r15 OPTIONAL +} + + +VarLogMeasReport-r10 ::= SEQUENCE { + traceReference-r10 TraceReference-r10, + traceRecordingSessionRef-r10 OCTET STRING (SIZE (2)), + tce-Id-r10 OCTET STRING (SIZE (1)), + plmn-Identity-r10 PLMN-Identity, + absoluteTimeInfo-r10 AbsoluteTimeInfo-r10, + logMeasInfoList-r10 LogMeasInfoList2-r10 +} + +VarLogMeasReport-r11 ::= SEQUENCE { + traceReference-r10 TraceReference-r10, + traceRecordingSessionRef-r10 OCTET STRING (SIZE (2)), + tce-Id-r10 OCTET STRING (SIZE (1)), + plmn-IdentityList-r11 PLMN-IdentityList3-r11, + absoluteTimeInfo-r10 AbsoluteTimeInfo-r10, + logMeasInfoList-r10 LogMeasInfoList2-r10 +} + +LogMeasInfoList2-r10 ::= SEQUENCE (SIZE (1..maxLogMeas-r10)) OF LogMeasInfo-r10 + + +VarMeasConfig ::= SEQUENCE { + -- Measurement identities + measIdList MeasIdToAddModList OPTIONAL, + measIdListExt-r12 MeasIdToAddModListExt-r12 OPTIONAL, + measIdList-v1310 MeasIdToAddModList-v1310 OPTIONAL, + measIdListExt-v1310 MeasIdToAddModListExt-v1310 OPTIONAL, + -- Measurement objects + measObjectList MeasObjectToAddModList OPTIONAL, + measObjectListExt-r13 MeasObjectToAddModListExt-r13 OPTIONAL, + measObjectList-v9i0 MeasObjectToAddModList-v9e0 OPTIONAL, + -- Reporting configurations + reportConfigList ReportConfigToAddModList OPTIONAL, + -- Other parameters + quantityConfig QuantityConfig OPTIONAL, + measScaleFactor-r12 MeasScaleFactor-r12 OPTIONAL, + s-Measure INTEGER (-140..-44) OPTIONAL, + speedStatePars CHOICE { + release NULL, + setup SEQUENCE { + mobilityStateParameters MobilityStateParameters, + timeToTrigger-SF SpeedStateScaleFactors + } + } OPTIONAL, + allowInterruptions-r11 BOOLEAN OPTIONAL +} + + +VarMeasIdleConfig-r15 ::= SEQUENCE { + measIdleCarrierListEUTRA-r15 EUTRA-CarrierList-r15 OPTIONAL, + measIdleDuration-r15 ENUMERATED {sec10, sec30, sec60, sec120, + sec180, sec240, sec300} +} + + +VarMeasIdleReport-r15 ::= SEQUENCE { + measReportIdle-r15 MeasResultListIdle-r15 +} + + +VarMeasReportList ::= SEQUENCE (SIZE (1..maxMeasId)) OF VarMeasReport +VarMeasReportList-r12 ::= SEQUENCE (SIZE (1..maxMeasId-r12)) OF VarMeasReport + +VarMeasReport ::= SEQUENCE { + -- List of measurement that have been triggered + measId MeasId, + measId-v1250 MeasId-v1250 OPTIONAL, + cellsTriggeredList CellsTriggeredList OPTIONAL, + csi-RS-TriggeredList-r12 CSI-RS-TriggeredList-r12 OPTIONAL, + poolsTriggeredList-r14 Tx-ResourcePoolMeasList-r14 OPTIONAL, + numberOfReportsSent INTEGER +} + +CellsTriggeredList ::= SEQUENCE (SIZE (1..maxCellMeas)) OF CHOICE { + physCellIdEUTRA PhysCellId, + physCellIdUTRA CHOICE { + fdd PhysCellIdUTRA-FDD, + tdd PhysCellIdUTRA-TDD + }, + physCellIdGERAN SEQUENCE { + carrierFreq CarrierFreqGERAN, + physCellId PhysCellIdGERAN + }, + physCellIdCDMA2000 PhysCellIdCDMA2000, + wlan-Identifiers-r13 WLAN-Identifiers-r12, + physCellIdNR-r15 SEQUENCE { + carrierFreq ARFCN-ValueNR-r15, + physCellId PhysCellIdNR-r15, + rs-IndexList-r15 SSB-IndexList-r15 OPTIONAL + } +} + +CSI-RS-TriggeredList-r12 ::= SEQUENCE (SIZE (1..maxCSI-RS-Meas-r12)) OF MeasCSI-RS-Id-r12 + +SSB-IndexList-r15::= SEQUENCE (SIZE (1..maxRS-Index-r15)) OF RS-IndexNR-r15 + +VarMobilityHistoryReport-r12 ::= VisitedCellInfoList-r12 + + +VarPendingRnaProcedure-r15 ::= SEQUENCE { + pendingRnaProcedure BOOLEAN OPTIONAL +} + + +VarRLF-Report-r10 ::= SEQUENCE { + rlf-Report-r10 RLF-Report-r9, + plmn-Identity-r10 PLMN-Identity +} + +VarRLF-Report-r11 ::= SEQUENCE { + rlf-Report-r10 RLF-Report-r9, + plmn-IdentityList-r11 PLMN-IdentityList3-r11 +} + + +VarShortINACTIVE-MAC-Input-r15 ::= SEQUENCE { + cellIdentity-r15 CellIdentity, + physCellId-r15 PhysCellId, + c-RNTI-r15 C-RNTI +} + + +VarShortMAC-Input ::= SEQUENCE { + cellIdentity CellIdentity, + physCellId PhysCellId, + c-RNTI C-RNTI +} + + +VarShortResumeMAC-Input-r13 ::= SEQUENCE { + cellIdentity-r13 CellIdentity, + physCellId-r13 PhysCellId, + c-RNTI-r13 C-RNTI, + resumeDiscriminator-r13 BIT STRING(SIZE(1)) +} + + +VarWLAN-MobilityConfig ::= SEQUENCE { + wlan-MobilitySet-r13 WLAN-Id-List-r13 OPTIONAL, + successReportRequested ENUMERATED {true} OPTIONAL, + wlan-SuspendConfig-r14 WLAN-SuspendConfig-r14 OPTIONAL +} + + +VarWLAN-Status-r13 ::= SEQUENCE { + status-r13 WLAN-Status-r13, + status-r14 WLAN-Status-v1430 OPTIONAL +} + + +maxLogMeas-r10 INTEGER ::= 4060-- Maximum number of logged measurement entries + -- that can be stored by the UE + + +END + + +NBIOT-UE-Variables DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + VarShortMAC-Input, + VarShortResumeMAC-Input-r13 + +FROM EUTRA-UE-Variables; + +VarShortMAC-Input-NB-r13 ::= VarShortMAC-Input + +VarShortResumeMAC-Input-NB-r13 ::= VarShortResumeMAC-Input-r13 + + +END + + +EUTRA-Sidelink-Preconf DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + AdditionalSpectrumEmission, + AdditionalSpectrumEmission-v10l0, + ARFCN-ValueEUTRA-r9, + FilterCoefficient, + maxCBR-Level-r14, + maxCBR-Level-1-r14, + maxFreq, + maxFreqV2X-r14, + maxSL-TxPool-r12, + maxSL-CommRxPoolPreconf-v1310, + maxSL-CommTxPoolPreconf-v1310, + maxSL-DiscRxPoolPreconf-r13, + maxSL-DiscTxPoolPreconf-r13, + maxSL-V2X-CBRConfig2-r14, + maxSL-V2X-CBRConfig2-1-r14, + maxSL-V2X-RxPoolPreconf-r14, + maxSL-V2X-TxConfig2-r14, + maxSL-V2X-TxConfig2-1-r14, + maxSL-V2X-TxPoolPreconf-r14, + P-Max, + ReselectionInfoRelay-r13, + SL-AnchorCarrierFreqList-V2X-r14, + SL-CBR-Levels-Config-r14, + SL-CBR-PSSCH-TxConfig-r14, + SL-CommTxPoolSensingConfig-r14, + SL-CP-Len-r12, + SL-HoppingConfigComm-r12, + SL-OffsetIndicator-r12, + SL-OffsetIndicatorSync-r12, + SL-OffsetIndicatorSync-v1430, + SL-PeriodComm-r12, + RSRP-RangeSL3-r12, + SL-MinT2ValueList-r15, + SL-PriorityList-r13, + SL-TF-ResourceConfig-r12, + SL-TRPT-Subset-r12, + SL-TxParameters-r12, + SL-ZoneConfig-r14, + P0-SL-r12, + TDD-ConfigSL-r12, + SubframeBitmapSL-r14, + SL-P2X-ResourceSelectionConfig-r14, + SL-RestrictResourceReservationPeriodList-r14, + SL-SyncAllowed-r14, + SL-OffsetIndicatorSync-r14, + SL-Priority-r13, + SL-V2X-FreqSelectionConfigList-r15, + SL-V2X-PacketDuplicationConfig-r15, + SL-V2X-SyncFreqList-r15 +FROM EUTRA-RRC-Definitions; + + +SL-Preconfiguration-r12 ::= SEQUENCE { + preconfigGeneral-r12 SL-PreconfigGeneral-r12, + preconfigSync-r12 SL-PreconfigSync-r12, + preconfigComm-r12 SL-PreconfigCommPoolList4-r12, + ..., + [[ preconfigComm-v1310 SEQUENCE { + commRxPoolList-r13 SL-PreconfigCommRxPoolList-r13, + commTxPoolList-r13 SL-PreconfigCommTxPoolList-r13 OPTIONAL + } OPTIONAL, + preconfigDisc-r13 SEQUENCE { + discRxPoolList-r13 SL-PreconfigDiscRxPoolList-r13, + discTxPoolList-r13 SL-PreconfigDiscTxPoolList-r13 OPTIONAL + } OPTIONAL, + preconfigRelay-r13 SL-PreconfigRelay-r13 OPTIONAL + ]] + +} + +SL-PreconfigGeneral-r12 ::= SEQUENCE { + -- PDCP configuration + rohc-Profiles-r12 SEQUENCE { + profile0x0001-r12 BOOLEAN, + profile0x0002-r12 BOOLEAN, + profile0x0004-r12 BOOLEAN, + profile0x0006-r12 BOOLEAN, + profile0x0101-r12 BOOLEAN, + profile0x0102-r12 BOOLEAN, + profile0x0104-r12 BOOLEAN + }, + -- Physical configuration + carrierFreq-r12 ARFCN-ValueEUTRA-r9, + maxTxPower-r12 P-Max, + additionalSpectrumEmission-r12 AdditionalSpectrumEmission, + sl-bandwidth-r12 ENUMERATED {n6, n15, n25, n50, n75, n100}, + tdd-ConfigSL-r12 TDD-ConfigSL-r12, + reserved-r12 BIT STRING (SIZE (19)), + ..., + [[ additionalSpectrumEmission-v1440 AdditionalSpectrumEmission-v10l0 OPTIONAL + ]] +} + +SL-PreconfigSync-r12 ::= SEQUENCE { + syncCP-Len-r12 SL-CP-Len-r12, + syncOffsetIndicator1-r12 SL-OffsetIndicatorSync-r12, + syncOffsetIndicator2-r12 SL-OffsetIndicatorSync-r12, + syncTxParameters-r12 P0-SL-r12, + syncTxThreshOoC-r12 RSRP-RangeSL3-r12, + filterCoefficient-r12 FilterCoefficient, + syncRefMinHyst-r12 ENUMERATED {dB0, dB3, dB6, dB9, dB12}, + syncRefDiffHyst-r12 ENUMERATED {dB0, dB3, dB6, dB9, dB12, dBinf}, + ..., + [[ syncTxPeriodic-r13 ENUMERATED {true} OPTIONAL + ]] +} + +SL-PreconfigCommPoolList4-r12 ::= SEQUENCE (SIZE (1..maxSL-TxPool-r12)) OF SL-PreconfigCommPool-r12 + +SL-PreconfigCommRxPoolList-r13 ::= SEQUENCE (SIZE (1..maxSL-CommRxPoolPreconf-v1310)) OF SL-PreconfigCommPool-r12 + +SL-PreconfigCommTxPoolList-r13 ::= SEQUENCE (SIZE (1..maxSL-CommTxPoolPreconf-v1310)) OF SL-PreconfigCommPool-r12 + +SL-PreconfigCommPool-r12 ::= SEQUENCE { +-- This IE is same as SL-CommResourcePool with rxParametersNCell absent + sc-CP-Len-r12 SL-CP-Len-r12, + sc-Period-r12 SL-PeriodComm-r12, + sc-TF-ResourceConfig-r12 SL-TF-ResourceConfig-r12, + sc-TxParameters-r12 P0-SL-r12, + data-CP-Len-r12 SL-CP-Len-r12, + data-TF-ResourceConfig-r12 SL-TF-ResourceConfig-r12, + dataHoppingConfig-r12 SL-HoppingConfigComm-r12, + dataTxParameters-r12 P0-SL-r12, + trpt-Subset-r12 SL-TRPT-Subset-r12, + ..., + [[ priorityList-r13 SL-PriorityList-r13 OPTIONAL -- For Tx + ]] +} + +SL-PreconfigDiscRxPoolList-r13 ::= SEQUENCE (SIZE (1..maxSL-DiscRxPoolPreconf-r13)) OF SL-PreconfigDiscPool-r13 + +SL-PreconfigDiscTxPoolList-r13 ::= SEQUENCE (SIZE (1..maxSL-DiscTxPoolPreconf-r13)) OF SL-PreconfigDiscPool-r13 + +SL-PreconfigDiscPool-r13 ::= SEQUENCE { +-- This IE is same as SL-DiscResourcePool with rxParameters absent + cp-Len-r13 SL-CP-Len-r12, + discPeriod-r13 ENUMERATED {rf4, rf6, rf7, rf8, rf12, rf14, rf16, rf24, rf28, + rf32, rf64, rf128, rf256, rf512, rf1024, spare}, + numRetx-r13 INTEGER (0..3), + numRepetition-r13 INTEGER (1..50), + tf-ResourceConfig-r13 SL-TF-ResourceConfig-r12, + txParameters-r13 SEQUENCE { + txParametersGeneral-r13 P0-SL-r12, + txProbability-r13 ENUMERATED {p25, p50, p75, p100} + } OPTIONAL, + ... +} + +SL-PreconfigRelay-r13 ::= SEQUENCE { + reselectionInfoOoC-r13 ReselectionInfoRelay-r13 +} + + +SL-V2X-Preconfiguration-r14 ::= SEQUENCE { + v2x-PreconfigFreqList-r14 SL-V2X-PreconfigFreqList-r14, + anchorCarrierFreqList-r14 SL-AnchorCarrierFreqList-V2X-r14 OPTIONAL, + cbr-PreconfigList-r14 SL-CBR-PreconfigTxConfigList-r14 OPTIONAL, + ..., + [[ v2x-PacketDuplicationConfig-r15 SL-V2X-PacketDuplicationConfig-r15 OPTIONAL, + syncFreqList-r15 SL-V2X-SyncFreqList-r15 OPTIONAL, + slss-TxMultiFreq-r15 ENUMERATED {true} OPTIONAL, + v2x-TxProfileList-r15 SL-V2X-TxProfileList-r15 OPTIONAL + ]] + +} + +SL-CBR-PreconfigTxConfigList-r14 ::= SEQUENCE { + cbr-RangeCommonConfigList-r14 SEQUENCE (SIZE (1..maxSL-V2X-CBRConfig2-r14)) OF SL-CBR-Levels-Config-r14, + sl-CBR-PSSCH-TxConfigList-r14 SEQUENCE (SIZE (1..maxSL-V2X-TxConfig2-r14)) OF SL-CBR-PSSCH-TxConfig-r14 +} + +SL-V2X-PreconfigFreqList-r14 ::= SEQUENCE (SIZE (1..maxFreqV2X-r14)) OF SL-V2X-PreconfigFreqInfo-r14 + +SL-V2X-PreconfigFreqInfo-r14 ::= SEQUENCE { + v2x-CommPreconfigGeneral-r14 SL-PreconfigGeneral-r12, + v2x-CommPreconfigSync-r14 SL-PreconfigV2X-Sync-r14 OPTIONAL, + v2x-CommRxPoolList-r14 SL-PreconfigV2X-RxPoolList-r14, + v2x-CommTxPoolList-r14 SL-PreconfigV2X-TxPoolList-r14, + p2x-CommTxPoolList-r14 SL-PreconfigV2X-TxPoolList-r14, + v2x-ResourceSelectionConfig-r14 SL-CommTxPoolSensingConfig-r14 OPTIONAL, + zoneConfig-r14 SL-ZoneConfig-r14 OPTIONAL, + syncPriority-r14 ENUMERATED {gnss, enb}, + thresSL-TxPrioritization-r14 SL-Priority-r13 OPTIONAL, + offsetDFN-r14 INTEGER (0..1000) OPTIONAL, + ..., + [[ v2x-FreqSelectionConfigList-r15 SL-V2X-FreqSelectionConfigList-r15 OPTIONAL + ]] +} + +SL-PreconfigV2X-RxPoolList-r14 ::= SEQUENCE (SIZE (1..maxSL-V2X-RxPoolPreconf-r14)) OF SL-V2X-PreconfigCommPool-r14 + +SL-PreconfigV2X-TxPoolList-r14 ::= SEQUENCE (SIZE (1..maxSL-V2X-TxPoolPreconf-r14)) OF SL-V2X-PreconfigCommPool-r14 + +SL-V2X-PreconfigCommPool-r14 ::= SEQUENCE { +-- This IE is same as SL-CommResourcePoolV2X with rxParametersNCell absent + sl-OffsetIndicator-r14 SL-OffsetIndicator-r12 OPTIONAL, + sl-Subframe-r14 SubframeBitmapSL-r14, + adjacencyPSCCH-PSSCH-r14 BOOLEAN, + sizeSubchannel-r14 ENUMERATED { + n4, n5, n6, n8, n9, n10, n12, n15, n16, n18, n20, n25, n30, + n48, n50, n72, n75, n96, n100, spare13, spare12, spare11, + spare10, spare9, spare8, spare7, spare6, spare5, spare4, + spare3, spare2, spare1}, + numSubchannel-r14 ENUMERATED {n1, n3, n5, n8, n10, n15, n20, spare1}, + startRB-Subchannel-r14 INTEGER (0..99), + startRB-PSCCH-Pool-r14 INTEGER (0..99) OPTIONAL, + dataTxParameters-r14 P0-SL-r12, + zoneID-r14 INTEGER (0..7) OPTIONAL, + threshS-RSSI-CBR-r14 INTEGER (0..45) OPTIONAL, + cbr-pssch-TxConfigList-r14 SL-CBR-PPPP-TxPreconfigList-r14 OPTIONAL, + resourceSelectionConfigP2X-r14 SL-P2X-ResourceSelectionConfig-r14 OPTIONAL, + syncAllowed-r14 SL-SyncAllowed-r14 OPTIONAL, + restrictResourceReservationPeriod-r14 SL-RestrictResourceReservationPeriodList-r14 OPTIONAL, -- Need OR + ..., + [[ sl-MinT2ValueList-r15 SL-MinT2ValueList-r15 OPTIONAL, + cbr-pssch-TxConfigList-v1530 SL-CBR-PPPP-TxPreconfigList-v1530 OPTIONAL + ]] +} + +SL-PreconfigV2X-Sync-r14 ::= SEQUENCE { + syncOffsetIndicators-r14 SL-V2X-SyncOffsetIndicators-r14, + syncTxParameters-r14 P0-SL-r12, + syncTxThreshOoC-r14 RSRP-RangeSL3-r12, + filterCoefficient-r14 FilterCoefficient, + syncRefMinHyst-r14 ENUMERATED {dB0, dB3, dB6, dB9, dB12}, + syncRefDiffHyst-r14 ENUMERATED {dB0, dB3, dB6, dB9, dB12, dBinf}, + ..., + [[ slss-TxDisabled-r15 ENUMERATED {true} OPTIONAL + ]] +} + +SL-V2X-SyncOffsetIndicators-r14 ::= SEQUENCE { + syncOffsetIndicator1-r14 SL-OffsetIndicatorSync-r14, + syncOffsetIndicator2-r14 SL-OffsetIndicatorSync-r14, + syncOffsetIndicator3-r14 SL-OffsetIndicatorSync-r14 OPTIONAL +} + +SL-CBR-PPPP-TxPreconfigList-r14 ::= SEQUENCE (SIZE (1..8)) OF SL-PPPP-TxPreconfigIndex-r14 + +SL-PPPP-TxPreconfigIndex-r14 ::= SEQUENCE { + priorityThreshold-r14 SL-Priority-r13, + defaultTxConfigIndex-r14 INTEGER(0..maxCBR-Level-1-r14), + cbr-ConfigIndex-r14 INTEGER(0..maxSL-V2X-CBRConfig2-1-r14), + tx-ConfigIndexList-r14 SEQUENCE (SIZE (1..maxCBR-Level-r14)) OF Tx-PreconfigIndex-r14 +} + +Tx-PreconfigIndex-r14 ::= INTEGER(0..maxSL-V2X-TxConfig2-1-r14) + +SL-CBR-PPPP-TxPreconfigList-v1530 ::= SEQUENCE (SIZE (1..8)) OF SL-PPPP-TxPreconfigIndex-v1530 + +SL-PPPP-TxPreconfigIndex-v1530 ::= SEQUENCE { + mcs-PSSCH-Range-r15 SEQUENCE (SIZE (1..maxCBR-Level-r14)) OF MCS-PSSCH-Range-r15 OPTIONAL --Need OR +} + +MCS-PSSCH-Range-r15 ::= SEQUENCE{ + minMCS-PSSCH-r15 INTEGER (0..31), + maxMCS-PSSCH-r15 INTEGER (0..31) +} + +SL-V2X-TxProfileList-r15 ::= SEQUENCE (SIZE (1..256)) OF SL-V2X-TxProfile-r15 + +SL-V2X-TxProfile-r15 ::= ENUMERATED { + rel14, rel15, spare6, spare5, spare4, + spare3, spare2, spare1, ...} + +END + + +EUTRA-InterNodeDefinitions DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + AntennaInfoCommon, + AntennaInfoDedicated-v10i0, + ARFCN-ValueEUTRA, + ARFCN-ValueEUTRA-v9e0, + ARFCN-ValueEUTRA-r9, + CellIdentity, + C-RNTI, + DL-DCCH-Message, + DRB-Identity, + DRB-ToReleaseList, + DRB-ToReleaseList-r15, + FreqBandIndicator-r11, + InDeviceCoexIndication-r11, + LWA-Config-r13, + MasterInformationBlock, + maxBands, + maxFreq, + maxDRB, + maxDRBExt-r15, + maxDRB-r15, + maxSCell-r10, + maxSCell-r13, + maxServCell-r10, + maxServCell-r13, + MBMSInterestIndication-r11, + MeasConfig, + MeasGapConfig, + MeasGapConfigPerCC-List-r14, + MeasResultForRSSI-r13, + MeasResultListWLAN-r13, + OtherConfig-r9, + PhysCellId, + P-Max, + PowerCoordinationInfo-r12, + SidelinkUEInformation-r12, + SL-CommConfig-r12, + SL-DiscConfig-r12, + RadioResourceConfigDedicated, + RAN-NotificationAreaInfo-r15, + RCLWI-Configuration-r13, + RSRP-Range, + RSRQ-Range, + RSRQ-Range-v1250, + RS-SINR-Range-r13, + SCellToAddModList-r10, + SCellToAddModListExt-r13, + SCG-ConfigPartSCG-r12, + SecurityAlgorithmConfig, + SCellIndex-r10, + SCellIndex-r13, + SCellToReleaseList-r10, + SCellToReleaseListExt-r13, + ServCellIndex-r10, + ServCellIndex-r13, + ShortMAC-I, + MeasResultServFreqListNR-r15, + MeasResultSSTD-r13, + SL-V2X-ConfigDedicated-r14, + SystemInformationBlockType1, + SystemInformationBlockType1-v890-IEs, + SystemInformationBlockType2, + UEAssistanceInformation-r11, + UECapabilityInformation, + UE-CapabilityRAT-ContainerList, + UE-RadioPagingInfo-r12, + WLANConnectionStatusReport-r13, + WLAN-OffloadConfig-r12 +FROM EUTRA-RRC-Definitions; + + +HandoverCommand ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + handoverCommand-r8 HandoverCommand-r8-IEs, + spare7 NULL, + spare6 NULL, spare5 NULL, spare4 NULL, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +HandoverCommand-r8-IEs ::= SEQUENCE { + handoverCommandMessage OCTET STRING (CONTAINING DL-DCCH-Message), + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +HandoverPreparationInformation ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + handoverPreparationInformation-r8 HandoverPreparationInformation-r8-IEs, + spare7 NULL, + spare6 NULL, spare5 NULL, spare4 NULL, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +HandoverPreparationInformation-r8-IEs ::= SEQUENCE { + ue-RadioAccessCapabilityInfo UE-CapabilityRAT-ContainerList, + as-Config AS-Config OPTIONAL, -- Cond HO + rrm-Config RRM-Config OPTIONAL, + as-Context AS-Context OPTIONAL, -- Cond HO + nonCriticalExtension HandoverPreparationInformation-v920-IEs OPTIONAL +} + +HandoverPreparationInformation-v920-IEs ::= SEQUENCE { + ue-ConfigRelease-r9 ENUMERATED { + rel9, rel10, rel11, rel12, v10j0, v11e0, + v1280, rel13, ..., rel14, rel15} OPTIONAL, -- Cond HO2 + nonCriticalExtension HandoverPreparationInformation-v9d0-IEs OPTIONAL +} + +HandoverPreparationInformation-v9d0-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING (CONTAINING HandoverPreparationInformation-v9j0-IEs) OPTIONAL, + nonCriticalExtension HandoverPreparationInformation-v9e0-IEs OPTIONAL +} + +-- Late non-critical extensions: +HandoverPreparationInformation-v9j0-IEs ::= SEQUENCE { + -- Following field is only for pre REL-10 late non-critical extensions + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension HandoverPreparationInformation-v10j0-IEs OPTIONAL +} + +HandoverPreparationInformation-v10j0-IEs ::= SEQUENCE { + as-Config-v10j0 AS-Config-v10j0 OPTIONAL, + -- Following field is only for late non-critical extensions from REL-10 + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- Regular non-critical extensions: +HandoverPreparationInformation-v9e0-IEs ::= SEQUENCE { + as-Config-v9e0 AS-Config-v9e0 OPTIONAL, -- Cond HO2 + nonCriticalExtension HandoverPreparationInformation-v1130-IEs OPTIONAL +} + +HandoverPreparationInformation-v1130-IEs ::= SEQUENCE { + as-Context-v1130 AS-Context-v1130 OPTIONAL, -- Cond HO2 + nonCriticalExtension HandoverPreparationInformation-v1250-IEs OPTIONAL +} + +HandoverPreparationInformation-v1250-IEs ::= SEQUENCE { + ue-SupportedEARFCN-r12 ARFCN-ValueEUTRA-r9 OPTIONAL, -- Cond HO3 + as-Config-v1250 AS-Config-v1250 OPTIONAL, -- Cond HO2 + nonCriticalExtension HandoverPreparationInformation-v1320-IEs OPTIONAL +} + +HandoverPreparationInformation-v1320-IEs ::= SEQUENCE { + as-Config-v1320 AS-Config-v1320 OPTIONAL, -- Cond HO2 + as-Context-v1320 AS-Context-v1320 OPTIONAL, -- Cond HO2 + nonCriticalExtension HandoverPreparationInformation-v1430-IEs OPTIONAL +} + +HandoverPreparationInformation-v1430-IEs ::= SEQUENCE { + as-Config-v1430 AS-Config-v1430 OPTIONAL, -- Cond HO2 + makeBeforeBreakReq-r14 ENUMERATED {true} OPTIONAL, -- Cond HO2 + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +HandoverPreparationInformation-v1530-IEs ::= SEQUENCE { + ran-NotificationAreaInfo-r15 RAN-NotificationAreaInfo-r15 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +SCG-Config-r12 ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + scg-Config-r12 SCG-Config-r12-IEs, + spare7 NULL, + spare6 NULL, spare5 NULL, spare4 NULL, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +SCG-Config-r12-IEs ::= SEQUENCE { + scg-RadioConfig-r12 SCG-ConfigPartSCG-r12 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +SCG-ConfigInfo-r12 ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + scg-ConfigInfo-r12 SCG-ConfigInfo-r12-IEs, + spare7 NULL, + spare6 NULL, spare5 NULL, spare4 NULL, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +SCG-ConfigInfo-r12-IEs ::= SEQUENCE { + radioResourceConfigDedMCG-r12 RadioResourceConfigDedicated OPTIONAL, + sCellToAddModListMCG-r12 SCellToAddModList-r10 OPTIONAL, + measGapConfig-r12 MeasGapConfig OPTIONAL, + powerCoordinationInfo-r12 PowerCoordinationInfo-r12 OPTIONAL, + scg-RadioConfig-r12 SCG-ConfigPartSCG-r12 OPTIONAL, + eutra-CapabilityInfo-r12 OCTET STRING (CONTAINING UECapabilityInformation) OPTIONAL, + scg-ConfigRestrictInfo-r12 SCG-ConfigRestrictInfo-r12 OPTIONAL, + mbmsInterestIndication-r12 OCTET STRING (CONTAINING + MBMSInterestIndication-r11) OPTIONAL, + measResultServCellListSCG-r12 MeasResultServCellListSCG-r12 OPTIONAL, + drb-ToAddModListSCG-r12 DRB-InfoListSCG-r12 OPTIONAL, + drb-ToReleaseListSCG-r12 DRB-ToReleaseList OPTIONAL, + sCellToAddModListSCG-r12 SCellToAddModListSCG-r12 OPTIONAL, + sCellToReleaseListSCG-r12 SCellToReleaseList-r10 OPTIONAL, + p-Max-r12 P-Max OPTIONAL, + nonCriticalExtension SCG-ConfigInfo-v1310-IEs OPTIONAL +} + +SCG-ConfigInfo-v1310-IEs ::= SEQUENCE { + measResultSSTD-r13 MeasResultSSTD-r13 OPTIONAL, sCellToAddModListMCG-Ext-r13 SCellToAddModListExt-r13 OPTIONAL, + measResultServCellListSCG-Ext-r13 MeasResultServCellListSCG-Ext-r13 OPTIONAL, + sCellToAddModListSCG-Ext-r13 SCellToAddModListSCG-Ext-r13 OPTIONAL, + sCellToReleaseListSCG-Ext-r13 SCellToReleaseListExt-r13 OPTIONAL, + nonCriticalExtension SCG-ConfigInfo-v1330-IEs OPTIONAL +} + +SCG-ConfigInfo-v1330-IEs ::= SEQUENCE { + measResultListRSSI-SCG-r13 MeasResultListRSSI-SCG-r13 OPTIONAL, + nonCriticalExtension SCG-ConfigInfo-v1430-IEs OPTIONAL +} + +SCG-ConfigInfo-v1430-IEs ::= SEQUENCE { + makeBeforeBreakSCG-Req-r14 ENUMERATED {true} OPTIONAL, + measGapConfigPerCC-List MeasGapConfigPerCC-List-r14 OPTIONAL, + nonCriticalExtension SCG-ConfigInfo-v1530-IEs OPTIONAL +} + +SCG-ConfigInfo-v1530-IEs ::= SEQUENCE { + drb-ToAddModListSCG-r15 DRB-InfoListSCG-r15 OPTIONAL, + drb-ToReleaseListSCG-r15 DRB-ToReleaseList-r15 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +DRB-InfoListSCG-r12 ::= SEQUENCE (SIZE (1..maxDRB)) OF DRB-InfoSCG-r12 +DRB-InfoListSCG-r15 ::= SEQUENCE (SIZE (1..maxDRB-r15)) OF DRB-InfoSCG-r12 + +DRB-InfoSCG-r12 ::= SEQUENCE { + eps-BearerIdentity-r12 INTEGER (0..15) OPTIONAL, -- Cond DRB-Setup + drb-Identity-r12 DRB-Identity, + drb-Type-r12 ENUMERATED {split, scg} OPTIONAL, -- Cond DRB-Setup + ... +} + +SCellToAddModListSCG-r12 ::= SEQUENCE (SIZE (1..maxSCell-r10)) OF Cell-ToAddMod-r12 + +SCellToAddModListSCG-Ext-r13 ::= SEQUENCE (SIZE (1..maxSCell-r13)) OF Cell-ToAddMod-r12 + +Cell-ToAddMod-r12 ::= SEQUENCE { + sCellIndex-r12 SCellIndex-r10, + cellIdentification-r12 SEQUENCE { + physCellId-r12 PhysCellId, + dl-CarrierFreq-r12 ARFCN-ValueEUTRA-r9 + } OPTIONAL, -- Cond SCellAdd + measResultCellToAdd-r12 SEQUENCE { + rsrpResult-r12 RSRP-Range, + rsrqResult-r12 RSRQ-Range + } OPTIONAL, -- Cond SCellAdd2 + ..., + [[ sCellIndex-r13 SCellIndex-r13 OPTIONAL, + measResultCellToAdd-v1310 SEQUENCE { + rs-sinr-Result-r13 RS-SINR-Range-r13 + } OPTIONAL -- Cond SCellAdd2 + ]] +} + +MeasResultServCellListSCG-r12 ::= SEQUENCE (SIZE (1..maxServCell-r10)) OF MeasResultServCellSCG-r12 + +MeasResultServCellListSCG-Ext-r13 ::= SEQUENCE (SIZE (1..maxServCell-r13)) OF MeasResultServCellSCG-r12 + +MeasResultServCellSCG-r12 ::= SEQUENCE { + servCellId-r12 ServCellIndex-r10, + measResultSCell-r12 SEQUENCE { + rsrpResultSCell-r12 RSRP-Range, + rsrqResultSCell-r12 RSRQ-Range + }, + ..., + [[ servCellId-r13 ServCellIndex-r13 OPTIONAL, + measResultSCell-v1310 SEQUENCE { + rs-sinr-ResultSCell-r13 RS-SINR-Range-r13 + } OPTIONAL + ]] +} + +MeasResultListRSSI-SCG-r13 ::= SEQUENCE (SIZE (1..maxServCell-r13)) OF MeasResultRSSI-SCG-r13 + +MeasResultRSSI-SCG-r13 ::= SEQUENCE { + servCellId-r13 ServCellIndex-r13, + measResultForRSSI-r13 MeasResultForRSSI-r13 +} + +SCG-ConfigRestrictInfo-r12 ::= SEQUENCE { + maxSCH-TB-BitsDL-r12 INTEGER (1..100), + maxSCH-TB-BitsUL-r12 INTEGER (1..100) +} + + +UEPagingCoverageInformation ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + uePagingCoverageInformation-r13 UEPagingCoverageInformation-r13-IEs, + spare7 NULL, + spare6 NULL, spare5 NULL, spare4 NULL, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +UEPagingCoverageInformation-r13-IEs ::= SEQUENCE { + mpdcch-NumRepetition-r13 INTEGER (1..256) OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +UERadioAccessCapabilityInformation ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + ueRadioAccessCapabilityInformation-r8 + UERadioAccessCapabilityInformation-r8-IEs, + spare7 NULL, + spare6 NULL, spare5 NULL, spare4 NULL, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +UERadioAccessCapabilityInformation-r8-IEs ::= SEQUENCE { + ue-RadioAccessCapabilityInfo OCTET STRING (CONTAINING UECapabilityInformation), + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +UERadioPagingInformation ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + ueRadioPagingInformation-r12 UERadioPagingInformation-r12-IEs, + spare7 NULL, + spare6 NULL, spare5 NULL, spare4 NULL, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +UERadioPagingInformation-r12-IEs ::= SEQUENCE { + ue-RadioPagingInfo-r12 OCTET STRING (CONTAINING UE-RadioPagingInfo-r12), + nonCriticalExtension UERadioPagingInformation-v1310-IEs OPTIONAL +} + +UERadioPagingInformation-v1310-IEs ::= SEQUENCE { + supportedBandListEUTRAForPaging-r13 SEQUENCE (SIZE (1..maxBands)) OF FreqBandIndicator-r11 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL + +} + + +AS-Config ::= SEQUENCE { + sourceMeasConfig MeasConfig, + sourceRadioResourceConfig RadioResourceConfigDedicated, + sourceSecurityAlgorithmConfig SecurityAlgorithmConfig, + sourceUE-Identity C-RNTI, + sourceMasterInformationBlock MasterInformationBlock, + sourceSystemInformationBlockType1 SystemInformationBlockType1(WITH COMPONENTS + {..., nonCriticalExtension ABSENT}), + sourceSystemInformationBlockType2 SystemInformationBlockType2, + antennaInfoCommon AntennaInfoCommon, + sourceDl-CarrierFreq ARFCN-ValueEUTRA, + ..., + [[ sourceSystemInformationBlockType1Ext OCTET STRING (CONTAINING + SystemInformationBlockType1-v890-IEs) OPTIONAL, + sourceOtherConfig-r9 OtherConfig-r9 + -- sourceOtherConfig-r9 should have been optional. A target eNB compliant with this transfer + -- syntax should support receiving an AS-Config not including this extension addition group + -- e.g. from a legacy source eNB + ]], + [[ sourceSCellConfigList-r10 SCellToAddModList-r10 OPTIONAL + ]], + [[ sourceConfigSCG-r12 SCG-Config-r12 OPTIONAL + ]], + [[ as-ConfigNR-r15 AS-ConfigNR-r15 OPTIONAL + ]] +} + +AS-Config-v9e0 ::= SEQUENCE { + sourceDl-CarrierFreq-v9e0 ARFCN-ValueEUTRA-v9e0 +} + +AS-Config-v10j0 ::= SEQUENCE { + antennaInfoDedicatedPCell-v10i0 AntennaInfoDedicated-v10i0 OPTIONAL +} + +AS-Config-v1250 ::= SEQUENCE { + sourceWlan-OffloadConfig-r12 WLAN-OffloadConfig-r12 OPTIONAL, + sourceSL-CommConfig-r12 SL-CommConfig-r12 OPTIONAL, + sourceSL-DiscConfig-r12 SL-DiscConfig-r12 OPTIONAL +} + +AS-Config-v1320 ::= SEQUENCE { + sourceSCellConfigList-r13 SCellToAddModListExt-r13 OPTIONAL, + sourceRCLWI-Configuration-r13 RCLWI-Configuration-r13 OPTIONAL +} + +AS-Config-v1430 ::= SEQUENCE { + sourceSL-V2X-CommConfig-r14 SL-V2X-ConfigDedicated-r14 OPTIONAL, + sourceLWA-Config-r14 LWA-Config-r13 OPTIONAL, + sourceWLAN-MeasResult-r14 MeasResultListWLAN-r13 OPTIONAL +} + +AS-ConfigNR-r15 ::= SEQUENCE { + sourceRB-ConfigNR-r15 OCTET STRING OPTIONAL, + sourceRB-ConfigSN-NR-r15 OCTET STRING OPTIONAL, + sourceOtherConfigSN-NR-r15 OCTET STRING OPTIONAL +} + + +AS-Context ::= SEQUENCE { + reestablishmentInfo ReestablishmentInfo OPTIONAL -- Cond HO +} + +AS-Context-v1130 ::= SEQUENCE { + idc-Indication-r11 OCTET STRING (CONTAINING + InDeviceCoexIndication-r11) OPTIONAL, -- Cond HO2 + mbmsInterestIndication-r11 OCTET STRING (CONTAINING + MBMSInterestIndication-r11) OPTIONAL, -- Cond HO2 + powerPrefIndication-r11 OCTET STRING (CONTAINING + UEAssistanceInformation-r11) OPTIONAL, -- Cond HO2 + ..., + [[ sidelinkUEInformation-r12 OCTET STRING (CONTAINING + SidelinkUEInformation-r12) OPTIONAL -- Cond HO2 + ]], + [[ sourceContextEN-DC-r15 OCTET STRING OPTIONAL -- Cond HO2 + ]] +} + +AS-Context-v1320 ::= SEQUENCE { + wlanConnectionStatusReport-r13 OCTET STRING (CONTAINING + WLANConnectionStatusReport-r13) OPTIONAL -- Cond HO2 +} + + +ReestablishmentInfo ::= SEQUENCE { + sourcePhysCellId PhysCellId, + targetCellShortMAC-I ShortMAC-I, + additionalReestabInfoList AdditionalReestabInfoList OPTIONAL, + ... +} + +AdditionalReestabInfoList ::= SEQUENCE ( SIZE (1..maxReestabInfo) ) OF AdditionalReestabInfo + +AdditionalReestabInfo ::= SEQUENCE{ + cellIdentity CellIdentity, + key-eNodeB-Star Key-eNodeB-Star, + shortMAC-I ShortMAC-I +} + +Key-eNodeB-Star ::= BIT STRING (SIZE (256)) + + +RRM-Config ::= SEQUENCE { + ue-InactiveTime ENUMERATED { + s1, s2, s3, s5, s7, s10, s15, s20, + s25, s30, s40, s50, min1, min1s20c, min1s40, + min2, min2s30, min3, min3s30, min4, min5, min6, + min7, min8, min9, min10, min12, min14, min17, min20, + min24, min28, min33, min38, min44, min50, hr1, + hr1min30, hr2, hr2min30, hr3, hr3min30, hr4, hr5, hr6, + hr8, hr10, hr13, hr16, hr20, day1, day1hr12, day2, + day2hr12, day3, day4, day5, day7, day10, day14, day19, + day24, day30, dayMoreThan30} OPTIONAL, + ..., + [[ candidateCellInfoList-r10 CandidateCellInfoList-r10 OPTIONAL + ]], + [[ candidateCellInfoListNR-r15 MeasResultServFreqListNR-r15 OPTIONAL + ]] +} + +CandidateCellInfoList-r10 ::= SEQUENCE (SIZE (1..maxFreq)) OF CandidateCellInfo-r10 + +CandidateCellInfo-r10 ::= SEQUENCE { + -- cellIdentification + physCellId-r10 PhysCellId, + dl-CarrierFreq-r10 ARFCN-ValueEUTRA, + -- available measurement results + rsrpResult-r10 RSRP-Range OPTIONAL, + rsrqResult-r10 RSRQ-Range OPTIONAL, + ..., + [[ dl-CarrierFreq-v1090 ARFCN-ValueEUTRA-v9e0 OPTIONAL + ]], + [[ rsrqResult-v1250 RSRQ-Range-v1250 OPTIONAL + ]], + [[ rs-sinr-Result-r13 RS-SINR-Range-r13 OPTIONAL + ]] +} + + +maxReestabInfo INTEGER ::= 32 -- Maximum number of KeNB* and shortMAC-I forwarded + -- at handover for re-establishment preparation + + +END + + +NBIOT-InterNodeDefinitions DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + C-RNTI, + PhysCellId, + SecurityAlgorithmConfig, + ShortMAC-I +FROM EUTRA-RRC-Definitions + + AdditionalReestabInfoList +FROM EUTRA-InterNodeDefinitions + + CarrierFreq-NB-r13, + RadioResourceConfigDedicated-NB-r13, + UECapabilityInformation-NB, + UE-Capability-NB-r13, + UE-Capability-NB-Ext-r14-IEs, + UE-RadioPagingInfo-NB-r13 +FROM NBIOT-RRC-Definitions; + + +HandoverPreparationInformation-NB ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + handoverPreparationInformation-r13 HandoverPreparationInformation-NB-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +HandoverPreparationInformation-NB-IEs ::= SEQUENCE { + ue-RadioAccessCapabilityInfo-r13 UE-Capability-NB-r13, + as-Config-r13 AS-Config-NB, + rrm-Config-r13 RRM-Config-NB OPTIONAL, + as-Context-r13 AS-Context-NB OPTIONAL, + nonCriticalExtension HandoverPreparationInformation-NB-v1380-IEs OPTIONAL +} + +HandoverPreparationInformation-NB-v1380-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension HandoverPreparationInformation-NB-Ext-r14-IEs OPTIONAL +} + +HandoverPreparationInformation-NB-Ext-r14-IEs ::= SEQUENCE { + ue-RadioAccessCapabilityInfoExt-r14 OCTET STRING (CONTAINING UE-Capability-NB-Ext-r14-IEs) OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +UEPagingCoverageInformation-NB ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + uePagingCoverageInformation-r13 UEPagingCoverageInformation-NB-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +UEPagingCoverageInformation-NB-IEs ::= SEQUENCE { +-- the possible value(s) can differ from those sent on Uu + npdcch-NumRepetitionPaging-r13 INTEGER (1..2048) OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +UERadioAccessCapabilityInformation-NB ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + ueRadioAccessCapabilityInformation-r13 + UERadioAccessCapabilityInformation-NB-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +UERadioAccessCapabilityInformation-NB-IEs ::= SEQUENCE { + ue-RadioAccessCapabilityInfo-r13 OCTET STRING (CONTAINING UE-Capability-NB-r13), + nonCriticalExtension UERadioAccessCapabilityInformation-NB-v1380-IEs OPTIONAL +} + +UERadioAccessCapabilityInformation-NB-v1380-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension UERadioAccessCapabilityInformation-NB-r14-IEs OPTIONAL +} + +UERadioAccessCapabilityInformation-NB-r14-IEs ::= SEQUENCE { + ue-RadioAccessCapabilityInfo-r14 OCTET STRING (CONTAINING UECapabilityInformation-NB) OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +UERadioPagingInformation-NB ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + ueRadioPagingInformation-r13 UERadioPagingInformation-NB-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +UERadioPagingInformation-NB-IEs ::= SEQUENCE { + ue-RadioPagingInfo-r13 OCTET STRING (CONTAINING UE-RadioPagingInfo-NB-r13), + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +AS-Config-NB ::= SEQUENCE { + sourceRadioResourceConfig-r13 RadioResourceConfigDedicated-NB-r13, + sourceSecurityAlgorithmConfig-r13 SecurityAlgorithmConfig, + sourceUE-Identity-r13 C-RNTI, + sourceDl-CarrierFreq-r13 CarrierFreq-NB-r13, + ... +} + + +AS-Context-NB ::= SEQUENCE { + reestablishmentInfo-r13 ReestablishmentInfo-NB OPTIONAL, + ... +} + + +ReestablishmentInfo-NB ::= SEQUENCE { + sourcePhysCellId-r13 PhysCellId, + targetCellShortMAC-I-r13 ShortMAC-I, + additionalReestabInfoList-r13 AdditionalReestabInfoList OPTIONAL, + ... +} + + + + +RRM-Config-NB ::= SEQUENCE { + ue-InactiveTime ENUMERATED { + s1, s2, s3, s5, s7, s10, s15, s20, + s25, s30, s40, s50, min1, min1s20, min1s40, + min2, min2s30, min3, min3s30, min4, min5, min6, + min7, min8, min9, min10, min12, min14, min17, min20, + min24, min28, min33, min38, min44, min50, hr1, + hr1min30, hr2, hr2min30, hr3, hr3min30, hr4, hr5, hr6, + hr8, hr10, hr13, hr16, hr20, day1, day1hr12, day2, + day2hr12, day3, day4, day5, day7, day10, day14, day19, + day24, day30, dayMoreThan30} OPTIONAL, + ... +} + + +END + + diff --git a/openair2/RRC/LTE/rrc_UE.c b/openair2/RRC/LTE/rrc_UE.c index 73ce23e160..a7e7e0ea97 100644 --- a/openair2/RRC/LTE/rrc_UE.c +++ b/openair2/RRC/LTE/rrc_UE.c @@ -3869,7 +3869,11 @@ uint64_t arfcn_to_freq(long arfcn) { // Dump contents if ((*si)->criticalExtensions.present == SystemInformation__criticalExtensions_PR_systemInformation_r8 || +#if (RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + (*si)->criticalExtensions.present == SystemInformation__criticalExtensions_PR_criticalExtensionsFuture_r15) { +#else (*si)->criticalExtensions.present == SystemInformation__criticalExtensions_PR_criticalExtensionsFuture) { +#endif LOG_D( RRC, "[UE] (*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count %d\n", (*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count ); } else { From c7aa94c3fa1b01a5f06d2c7bf34dcbb59cccfbf9 Mon Sep 17 00:00:00 2001 From: "Bi-Ruei, Chiu" Date: Wed, 17 Oct 2018 19:15:22 +0800 Subject: [PATCH 329/379] Upgrade ASN.1 of NR-RRC to 15.3.0 --- cmake_targets/CMakeLists.txt | 4 +- openair2/GNB_APP/gnb_config.c | 61 + openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 9 + openair2/LAYER2/NR_MAC_gNB/config.c | 4 + openair2/RRC/NR/MESSAGES/asn1_msg.c | 64 +- .../asn1c/ASN1_files/nr-rrc-15.3.0.asn1 | 6516 +++++++++++++++++ openair2/RRC/NR_UE/rrc_UE.c | 11 + 7 files changed, 6658 insertions(+), 11 deletions(-) create mode 100644 openair2/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-15.3.0.asn1 diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 43ca89322d..38bc7812f8 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -355,8 +355,8 @@ add_custom_command ( add_list2_option(NR_RRC_ASN1_VERSION "NR_Rel15" "ASN.1 version of NR_RRC interface") if (${NR_RRC_ASN1_VERSION} STREQUAL "NR_Rel15") - make_version(NR_RRC_VERSION 15 2 1) - set (NR_RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-15.2.1.asn1) + make_version(NR_RRC_VERSION 15 3 0) + set (NR_RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-15.3.0.asn1) endif (${NR_RRC_ASN1_VERSION} STREQUAL "NR_Rel15") add_definitions(-DNR_RRC_VERSION=${NR_RRC_VERSION}) set (NR_RRC_FULL_DIR ${asn1_generated_dir}/${NR_RRC_ASN1_VERSION}) diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index 6241b9c50d..94e9484c76 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -1980,9 +1980,17 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) { } if (strcmp(RateMatchPattern_mode , "dynamic") == 0){ +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] = NR_RateMatchPattern__dummy_dynamic; +#else NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] = NR_RateMatchPattern__mode_dynamic; +#endif }else if (strcmp(RateMatchPattern_mode , "semiStatic") == 0){ +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] = NR_RateMatchPattern__dummy_semiStatic; +#else NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] = NR_RateMatchPattern__mode_semiStatic; +#endif }else { AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for RateMatchPattern_mode !\n", RC.config_file_name, i, RateMatchPattern_mode); @@ -2440,41 +2448,86 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) { switch(Common_dci_Format2_3_monitoringPeriodicity){ case 1: +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl1; +#else NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n1; +#endif break; case 2: +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl2; +#else NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n2; +#endif break; case 4: +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl4; +#else NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n4; +#endif break; case 5: +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl5; +#else NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n5; +#endif break; case 8: +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl8; +#else NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n8; +#endif break; case 10: +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl10; +#else NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n10; +#endif break; case 16: +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl16; +#else NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n16; +#endif break; case 20: +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl20; +#else NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n20; +#endif break; default: +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_3_dummy1 choice: 1,2,4,5,8,10,16,20 !\n", + RC.config_file_name, i, Common_dci_Format2_3_monitoringPeriodicity); +#else AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_3_monitoringPeriodicity choice: 1,2,4,5,8,10,16,20 !\n", RC.config_file_name, i, Common_dci_Format2_3_monitoringPeriodicity); +#endif break; } switch(Common_dci_Format2_3_nrofPDCCH_Candidates){ case 1: +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy2_n1; +#else NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__nrofPDCCH_Candidates_n1; +#endif break; case 2: +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy2_n2; +#else NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__nrofPDCCH_Candidates_n2; +#endif break; default: AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_3_nrofPDCCH_Candidates choice: 1,2 !\n", @@ -2598,9 +2651,17 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) { } if (strcmp(RateMatchPatternLTE_CRS_subframeAllocation_choice , "oneFrame") == 0){ +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] = NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation1_PR_oneFrame; +#else NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] = NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame; +#endif }else if (strcmp(RateMatchPatternLTE_CRS_subframeAllocation_choice , "fourFrames") == 0){ +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] = NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation1_PR_fourFrames; +#else NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] = NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames; +#endif }else { AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for RateMatchPatternLTE_CRS_subframeAllocation_choice !\n", RC.config_file_name, i, RateMatchPatternLTE_CRS_subframeAllocation_choice); diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 7e5e00c066..83970b7032 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -114,8 +114,13 @@ int8_t nr_ue_decode_mib( uint32_t is_condition_A = (ssb_subcarrier_offset == 0); // 38.213 ch.13 frequency_range_t frequency_range = FR1; +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + uint32_t index_4msb = (mac->mib->pdcch_ConfigSIB1.controlResourceSetZero); + uint32_t index_4lsb = (mac->mib->pdcch_ConfigSIB1.searchSpaceZero); +#else uint32_t index_4msb = (mac->mib->pdcch_ConfigSIB1 >> 4) & 0xf; uint32_t index_4lsb = (mac->mib->pdcch_ConfigSIB1 & 0xf); +#endif int32_t num_rbs = -1; int32_t num_symbols = -1; int32_t rb_offset = -1; @@ -428,7 +433,11 @@ int8_t nr_ue_decode_mib( mac->phy_config.config_req.pbch_config.subcarrier_spacing_common = mac->mib->subCarrierSpacingCommon; mac->phy_config.config_req.pbch_config.ssb_subcarrier_offset = ssb_subcarrier_offset; // after calculation mac->phy_config.config_req.pbch_config.dmrs_type_a_position = mac->mib->dmrs_TypeA_Position; +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + mac->phy_config.config_req.pbch_config.pdcch_config_sib1 = (mac->mib->pdcch_ConfigSIB1.controlResourceSetZero) * 16 + (mac->mib->pdcch_ConfigSIB1.searchSpaceZero); +#else mac->phy_config.config_req.pbch_config.pdcch_config_sib1 = mac->mib->pdcch_ConfigSIB1; +#endif mac->phy_config.config_req.pbch_config.cell_barred = mac->mib->cellBarred; mac->phy_config.config_req.pbch_config.intra_frequency_reselection = mac->mib->intraFreqReselection; mac->phy_config.config_req.pbch_config.half_frame_bit = half_frame_bit; diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index c343891cd3..98bd01e71b 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -232,7 +232,11 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, mib->message.choice.mib->subCarrierSpacingCommon, mib->message.choice.mib->ssb_SubcarrierOffset, mib->message.choice.mib->dmrs_TypeA_Position, +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + mib->message.choice.mib->pdcch_ConfigSIB1.controlResourceSetZero * 16 + mib->message.choice.mib->pdcch_ConfigSIB1.searchSpaceZero, +#else mib->message.choice.mib->pdcch_ConfigSIB1, +#endif mib->message.choice.mib->cellBarred, mib->message.choice.mib->intraFreqReselection ); diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index 22cb776a0e..a87501ced9 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -213,7 +213,7 @@ uint8_t get_adjacent_cell_mod_id_NR(uint16_t phyCellId) uint8_t do_MIB_NR(rrc_gNB_carrier_data_t *carrier, uint32_t frame, uint32_t ssb_SubcarrierOffset, - uint32_t pdcch_ConfigSIB1, + uint32_t pdcch_ConfigSIB1, uint32_t subCarrierSpacingCommon, uint32_t dmrs_TypeA_Position) { @@ -234,15 +234,19 @@ uint8_t do_MIB_NR(rrc_gNB_carrier_data_t *carrier, mib->message.choice.mib->systemFrameNumber.bits_unused=2; //38.331 spare BIT STRING (SIZE (1)) - uint16_t *spare= calloc(1, sizeof(uint16_t)); + uint16_t *spare= CALLOC(1, sizeof(uint16_t)); if (spare == NULL) abort(); mib->message.choice.mib->spare.buf = (uint8_t *)spare; mib->message.choice.mib->spare.size = 1; mib->message.choice.mib->spare.bits_unused = 7; // This makes a spare of 1 bits mib->message.choice.mib->ssb_SubcarrierOffset = ssb_SubcarrierOffset; +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + mib->message.choice.mib->pdcch_ConfigSIB1.controlResourceSetZero = (pdcch_ConfigSIB1 / 16); + mib->message.choice.mib->pdcch_ConfigSIB1.searchSpaceZero = (pdcch_ConfigSIB1 % 16); +#else mib->message.choice.mib->pdcch_ConfigSIB1 = pdcch_ConfigSIB1; - +#endif switch (subCarrierSpacingCommon) { case 15: mib->message.choice.mib->subCarrierSpacingCommon = NR_MIB__subCarrierSpacingCommon_scs15or60; @@ -353,7 +357,11 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id, (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->controlResourceSetZero = CALLOC(1,sizeof(long)); (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceZero = CALLOC(1,sizeof(long)); (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonControlResourceSet = CALLOC(1,sizeof(struct NR_ControlResourceSet)); +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList = CALLOC(1,sizeof(struct NR_PDCCH_ConfigCommon__commonSearchSpaceList)); +#else (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpace = CALLOC(1,sizeof(struct NR_PDCCH_ConfigCommon__commonSearchSpace)); +#endif (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceSIB1 = CALLOC(1,sizeof(NR_SearchSpaceId_t)); (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceOtherSystemInformation = CALLOC(1,sizeof(NR_SearchSpaceId_t)); (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->pagingSearchSpace = CALLOC(1,sizeof(NR_SearchSpaceId_t)); @@ -377,8 +385,11 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id, (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rsrp_ThresholdSSB = CALLOC(1,sizeof(NR_RSRP_Range_t)); (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rsrp_ThresholdSSB_SUL = CALLOC(1,sizeof(NR_RSRP_Range_t)); (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing = CALLOC(1,sizeof(NR_SubcarrierSpacing_t)); +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder = CALLOC(1,sizeof(long)); +#else (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoding = CALLOC(1,sizeof(long)); - +#endif (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon = CALLOC(1,sizeof(NR_SetupRelease_PUSCH_ConfigCommon_t)); (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup = CALLOC(1,sizeof(struct NR_PUSCH_ConfigCommon)); (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->groupHoppingEnabledTransformPrecoding = CALLOC(1,sizeof(long)); @@ -574,20 +585,32 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id, bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel8 = CALLOC(1,sizeof(long)); bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel16 = CALLOC(1,sizeof(long)); bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3 = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType__common__dci_Format2_3)); +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->dummy1 = CALLOC(1,sizeof(long)); +#else bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->monitoringPeriodicity = CALLOC(1,sizeof(long)); +#endif *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel1) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1[CC_id]; *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel2) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2[CC_id]; *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel4) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4[CC_id]; *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel8) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8[CC_id]; *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel16) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16[CC_id]; +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->dummy1) = configuration->Common_dci_Format2_3_monitoringPeriodicity[CC_id]; + bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->dummy2 = configuration->Common_dci_Format2_3_nrofPDCCH_Candidates[CC_id]; +#else *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->monitoringPeriodicity) = configuration->Common_dci_Format2_3_monitoringPeriodicity[CC_id]; - bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->nrofPDCCH_Candidates = configuration->Common_dci_Format2_3_nrofPDCCH_Candidates[CC_id]; - + bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->nrofPDCCH_Candidates = configuration->Common_dci_Format2_3_nrofPDCCH_Candidates[CC_id]; +#endif }else if (bwp_dl_searchspace->searchSpaceType->present == NR_SearchSpace__searchSpaceType_PR_ue_Specific){ bwp_dl_searchspace->searchSpaceType->choice.ue_Specific->dci_Formats = configuration->ue_Specific__dci_Formats[CC_id]; } +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList->list,&bwp_dl_searchspace); +#else ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpace->list,&bwp_dl_searchspace); +#endif *((*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceSIB1) = configuration->searchSpaceSIB1[CC_id]; *((*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceOtherSystemInformation) = configuration->searchSpaceOtherSystemInformation[CC_id]; @@ -675,7 +698,11 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id, (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->restrictedSetConfig = configuration->restrictedSetConfig[CC_id]; if(configuration->msg3_transformPrecoding[CC_id]){ +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder) = NR_RACH_ConfigCommon__msg3_transformPrecoder_enabled; +#else *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoding) = NR_RACH_ConfigCommon__msg3_transformPrecoding_enabled; +#endif } //Fill initialUplinkBWP -> BWP-UplinkCommon -> rach_ConfigCommon -> rach_ConfigGeneric// @@ -710,8 +737,11 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id, *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->p0_nominal) = configuration->p0_nominal[CC_id]; *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->pucch_ResourceCommon) = configuration->pucch_ResourceCommon[CC_id]; *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->hoppingId) = configuration->hoppingId[CC_id]; - +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + (*servingcellconfigcommon)->uplinkConfigCommon->dummy = configuration->UL_timeAlignmentTimerCommon[CC_id]; +#else (*servingcellconfigcommon)->uplinkConfigCommon->timeAlignmentTimerCommon = configuration->UL_timeAlignmentTimerCommon[CC_id]; +#endif (*servingcellconfigcommon)->n_TimingAdvanceOffset = CALLOC(1,sizeof(long)); *((*servingcellconfigcommon)->n_TimingAdvanceOffset)=configuration->ServingCellConfigCommon_n_TimingAdvanceOffset[CC_id]; @@ -820,7 +850,11 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id, } *(ratematchpattern->subcarrierSpacing) = configuration->RateMatchPattern_subcarrierSpacing[CC_id]; - ratematchpattern->mode = configuration->RateMatchPattern_mode[CC_id]; +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + ratematchpattern->dummy = configuration->RateMatchPattern_mode[CC_id]; +#else + ratematchpattern->mode = configuration->RateMatchPattern_mode[CC_id]; +#endif ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->rateMatchPatternToAddModList->list,&ratematchpattern); @@ -1049,7 +1083,11 @@ void do_MAC_CELLGROUP(uint8_t Mod_id, mac_CellGroupConfig->phr_Config->choice.setup->phr_ProhibitTimer = mac_cellgroup_config->phr_ProhibitTimer[CC_id]; mac_CellGroupConfig->phr_Config->choice.setup->phr_Tx_PowerFactorChange = mac_cellgroup_config->phr_Tx_PowerFactorChange[CC_id]; mac_CellGroupConfig->phr_Config->choice.setup->multiplePHR = mac_cellgroup_config->multiplePHR[CC_id]; +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + mac_CellGroupConfig->phr_Config->choice.setup->dummy = mac_cellgroup_config->phr_Type2SpCell[CC_id]; +#else mac_CellGroupConfig->phr_Config->choice.setup->phr_Type2SpCell = mac_cellgroup_config->phr_Type2SpCell[CC_id]; +#endif mac_CellGroupConfig->phr_Config->choice.setup->phr_Type2OtherCell = mac_cellgroup_config->phr_Type2OtherCell[CC_id]; mac_CellGroupConfig->phr_Config->choice.setup->phr_ModeOtherCG = mac_cellgroup_config->phr_ModeOtherCG[CC_id]; @@ -1064,7 +1102,11 @@ void do_PHYSICALCELLGROUP(uint8_t Mod_id, physicalCellGroupConfig->harq_ACK_SpatialBundlingPUCCH = CALLOC(1,sizeof(long)); physicalCellGroupConfig->harq_ACK_SpatialBundlingPUSCH = CALLOC(1,sizeof(long)); +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + physicalCellGroupConfig->p_NR_FR1 = CALLOC(1,sizeof(NR_P_Max_t)); +#else physicalCellGroupConfig->p_NR = CALLOC(1,sizeof(NR_P_Max_t)); +#endif physicalCellGroupConfig->tpc_SRS_RNTI = CALLOC(1,sizeof(NR_RNTI_Value_t)); physicalCellGroupConfig->tpc_PUCCH_RNTI = CALLOC(1,sizeof(NR_RNTI_Value_t)); physicalCellGroupConfig->tpc_PUSCH_RNTI = CALLOC(1,sizeof(NR_RNTI_Value_t)); @@ -1072,7 +1114,11 @@ void do_PHYSICALCELLGROUP(uint8_t Mod_id, *(physicalCellGroupConfig->harq_ACK_SpatialBundlingPUCCH) = physicalcellgroup_config->harq_ACK_SpatialBundlingPUCCH[CC_id]; *(physicalCellGroupConfig->harq_ACK_SpatialBundlingPUSCH) = physicalcellgroup_config->harq_ACK_SpatialBundlingPUSCH[CC_id]; +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + *(physicalCellGroupConfig->p_NR_FR1) = physicalcellgroup_config->p_NR[CC_id]; +#else *(physicalCellGroupConfig->p_NR) = physicalcellgroup_config->p_NR[CC_id]; +#endif physicalCellGroupConfig->pdsch_HARQ_ACK_Codebook = physicalcellgroup_config->pdsch_HARQ_ACK_Codebook[CC_id]; *(physicalCellGroupConfig->tpc_SRS_RNTI) = physicalcellgroup_config->tpc_SRS_RNTI[CC_id]; *(physicalCellGroupConfig->tpc_PUCCH_RNTI) = physicalcellgroup_config->tpc_PUCCH_RNTI[CC_id]; @@ -1119,4 +1165,4 @@ void do_SpCellConfig(uint8_t Mod_id, RC.nrrrc[Mod_id]->carrier[0].servingcellconfigcommon, sizeof(struct NR_ServingCellConfigCommon)); */ -} \ No newline at end of file +} diff --git a/openair2/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-15.3.0.asn1 b/openair2/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-15.3.0.asn1 new file mode 100644 index 0000000000..134dad0744 --- /dev/null +++ b/openair2/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-15.3.0.asn1 @@ -0,0 +1,6516 @@ +-- TAG-NR-RRC-DEFINITIONS-START + +NR-RRC-Definitions DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- TAG-NR-RRC-DEFINITIONS-STOP +-- TAG-BCCH-BCH-MESSAGE-START + +BCCH-BCH-Message ::= SEQUENCE { + message BCCH-BCH-MessageType +} + +BCCH-BCH-MessageType ::= CHOICE { + mib MIB, + messageClassExtension SEQUENCE {} +} + +-- TAG-BCCH-BCH-MESSAGE-STOP +-- TAG-BCCH-DL-SCH-MESSAGE-START + +BCCH-DL-SCH-Message ::= SEQUENCE { + message BCCH-DL-SCH-MessageType +} + +BCCH-DL-SCH-MessageType ::= CHOICE { + c1 CHOICE { + systemInformation SystemInformation, + systemInformationBlockType1 SIB1 + }, + messageClassExtension SEQUENCE {} +} + +-- TAG-BCCH-DL-SCH-MESSAGE-STOP +-- TAG-DL-CCCH-MESSAGE-START + + +DL-CCCH-Message ::= SEQUENCE { + message DL-CCCH-MessageType +} + +DL-CCCH-MessageType ::= CHOICE { + c1 CHOICE { + rrcReject RRCReject, + rrcSetup RRCSetup, + spare2 NULL, + spare1 NULL + }, + messageClassExtension SEQUENCE {} +} + +-- TAG-DL-CCCH-MESSAGE-STOP +-- TAG-DL-DCCH-MESSAGE-START + +DL-DCCH-Message ::= SEQUENCE { + message DL-DCCH-MessageType +} + +DL-DCCH-MessageType ::= CHOICE { + c1 CHOICE { + rrcReconfiguration RRCReconfiguration, + rrcResume RRCResume, + rrcRelease RRCRelease, + rrcReestablishment RRCReestablishment, + securityModeCommand SecurityModeCommand, + dlInformationTransfer DLInformationTransfer, + ueCapabilityEnquiry UECapabilityEnquiry, + counterCheck CounterCheck, + mobilityFromNRCommand MobilityFromNRCommand, + spare7 NULL, + spare6 NULL, spare5 NULL, spare4 NULL, + spare3 NULL, spare2 NULL, spare1 NULL + }, + messageClassExtension SEQUENCE {} +} + +-- TAG-DL-DCCH-MESSAGE-STOP +-- TAG-PCCH-PCH-MESSAGE-START + +PCCH-Message ::= SEQUENCE { + message PCCH-MessageType +} + +PCCH-MessageType ::= CHOICE { + c1 CHOICE { + paging Paging, + spare1 NULL + }, + messageClassExtension SEQUENCE {} +} + +-- TAG-PCCH-PCH-MESSAGE-STOP +-- TAG-UL-CCCH-MESSAGE-START + + +UL-CCCH-Message ::= SEQUENCE { + message UL-CCCH-MessageType +} + +UL-CCCH-MessageType ::= CHOICE { + c1 CHOICE { + rrcSetupRequest RRCSetupRequest, + rrcResumeRequest RRCResumeRequest, + rrcReestablishmentRequest RRCReestablishmentRequest, + rrcSystemInfoRequest RRCSystemInfoRequest + }, + messageClassExtension SEQUENCE {} +} + +-- TAG-UL-CCCH-MESSAGE-STOP +-- TAG-UL-CCCH1-MESSAGE-START + + +UL-CCCH1-Message ::= SEQUENCE { + message UL-CCCH1-MessageType +} + +UL-CCCH1-MessageType ::= CHOICE { + c1 CHOICE { + rrcResumeRequest1 RRCResumeRequest1, + spare3 NULL, + spare2 NULL, + spare1 NULL + + }, + messageClassExtension SEQUENCE {} +} + +-- TAG-UL-CCCH1-MESSAGE-STOP +-- TAG-UL-DCCH-MESSAGE-START + +UL-DCCH-Message ::= SEQUENCE { + message UL-DCCH-MessageType +} + +UL-DCCH-MessageType ::= CHOICE { + c1 CHOICE { + measurementReport MeasurementReport, + rrcReconfigurationComplete RRCReconfigurationComplete, + rrcSetupComplete RRCSetupComplete, + rrcReestablishmentComplete RRCReestablishmentComplete, + rrcResumeComplete RRCResumeComplete, + securityModeComplete SecurityModeComplete, + securityModeFailure SecurityModeFailure, + ulInformationTransfer ULInformationTransfer, + locationMeasurementIndication LocationMeasurementIndication, + ueCapabilityInformation UECapabilityInformation, + counterCheckResponse CounterCheckResponse, + ueAssistanceInformation UEAssistanceInformation, + spare4 NULL, spare3 NULL, + spare2 NULL, spare1 NULL + }, + messageClassExtension SEQUENCE {} +} + +-- TAG-UL-DCCH-MESSAGE-STOP +-- TAG-COUNTERCHECK-START + + +CounterCheck ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + counterCheck CounterCheck-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +CounterCheck-IEs ::= SEQUENCE { + drb-CountMSB-InfoList DRB-CountMSB-InfoList, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +DRB-CountMSB-InfoList ::= SEQUENCE (SIZE (1..maxDRB)) OF DRB-CountMSB-Info + +DRB-CountMSB-Info ::= SEQUENCE { + drb-Identity DRB-Identity, + countMSB-Uplink INTEGER(0..33554431), + countMSB-Downlink INTEGER(0..33554431) +} + +-- TAG-COUNTERCHECK-STOP +-- TAG-COUNTERCHECKRESPONSE-START + +CounterCheckResponse ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + counterCheckResponse CounterCheckResponse-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +CounterCheckResponse-IEs ::= SEQUENCE { + drb-CountInfoList DRB-CountInfoList, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL + +} + +DRB-CountInfoList ::= SEQUENCE (SIZE (0..maxDRB)) OF DRB-CountInfo + +DRB-CountInfo ::= SEQUENCE { + drb-Identity DRB-Identity, + count-Uplink INTEGER(0..4294967295), + count-Downlink INTEGER(0..4294967295) +} + +-- TAG-COUNTERCHECKRESPONSE-STOP +-- TAG-DLINFORMATIONTRANSFER-START + +DLInformationTransfer ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + dlInformationTransfer DLInformationTransfer-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +DLInformationTransfer-IEs ::= SEQUENCE { + dedicatedNAS-Message DedicatedNAS-Message OPTIONAL, -- Need N + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-DLINFORMATIONTRANSFER-STOP +-- TAG-LOCATIONMEASUREMENTINDICATION-START + +LocationMeasurementIndication ::= SEQUENCE { + criticalExtensions CHOICE { + locationMeasurementIndication LocationMeasurementIndication-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +LocationMeasurementIndication-IEs ::= SEQUENCE { + measurementIndication SetupRelease { LocationMeasurementInfo}, + + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +-- TAG-LOCATIONMEASUREMENTINDICATION-STOP +-- TAG-MIB-START + +MIB ::= SEQUENCE { + systemFrameNumber BIT STRING (SIZE (6)), + subCarrierSpacingCommon ENUMERATED {scs15or60, scs30or120}, + ssb-SubcarrierOffset INTEGER (0..15), + dmrs-TypeA-Position ENUMERATED {pos2, pos3}, + pdcch-ConfigSIB1 PDCCH-ConfigSIB1, + cellBarred ENUMERATED {barred, notBarred}, + intraFreqReselection ENUMERATED {allowed, notAllowed}, + spare BIT STRING (SIZE (1)) +} + +-- TAG-MIB-STOP +-- TAG-MEASUREMENTREPORT-START + +MeasurementReport ::= SEQUENCE { + criticalExtensions CHOICE { + measurementReport MeasurementReport-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +MeasurementReport-IEs ::= SEQUENCE { + measResults MeasResults, + + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +-- TAG-MEASUREMENTREPORT-STOP +-- TAG-MOBILITYFROMNRCOMMAND-START + +MobilityFromNRCommand ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + mobilityFromNRCommand MobilityFromNRCommand-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +MobilityFromNRCommand-IEs ::= SEQUENCE { + targetRAT-Type ENUMERATED { eutra, spare3, spare2, spare1, ...}, + targetRAT-MessageContainer OCTET STRING, + nas-SecurityParamFromNR OCTET STRING OPTIONAL, -- Cond HO-ToEPC + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-MOBILITYFROMNRCOMMAND-STOP +-- TAG-PAGING-START + +Paging ::= SEQUENCE { + pagingRecordList PagingRecordList OPTIONAL, -- Need N + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +PagingRecordList ::= SEQUENCE (SIZE(1..maxNrofPageRec)) OF PagingRecord + +PagingRecord ::= SEQUENCE { + ue-Identity PagingUE-Identity, + accessType ENUMERATED {non3GPP} OPTIONAL, -- Need N + ... +} + +PagingUE-Identity ::= CHOICE { + ng-5G-S-TMSI NG-5G-S-TMSI, + i-RNTI I-RNTI-Value, + ... +} + +-- TAG-PAGING-STOP +-- TAG-RRCREESTABLISHMENT-START + +RRCReestablishment ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcReestablishment RRCReestablishment-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCReestablishment-IEs ::= SEQUENCE { + nextHopChainingCount NextHopChainingCount, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-RRCREESTABLISHMENT-STOP +-- TAG-RRCREESTABLISHMENTCOMPLETE-START + +RRCReestablishmentComplete ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcReestablishmentComplete RRCReestablishmentComplete-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCReestablishmentComplete-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-RRCREESTABLISHMENTCOMPLETE-STOP +-- TAG-RRCREESTABLISHMENTREQUEST-START + + +RRCReestablishmentRequest ::= SEQUENCE { + rrcReestablishmentRequest RRCReestablishmentRequest-IEs +} + +RRCReestablishmentRequest-IEs ::= SEQUENCE { + ue-Identity ReestabUE-Identity, + reestablishmentCause ReestablishmentCause, + spare BIT STRING (SIZE (1)) +} + +ReestabUE-Identity ::= SEQUENCE { + c-RNTI RNTI-Value, + physCellId PhysCellId, + shortMAC-I ShortMAC-I +} + +ReestablishmentCause ::= ENUMERATED {reconfigurationFailure, handoverFailure, otherFailure, spare1} + +-- TAG-RRCREESTABLISHMENTREQUEST-STOP +-- TAG-RRCRECONFIGURATION-START + +RRCReconfiguration ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcReconfiguration RRCReconfiguration-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCReconfiguration-IEs ::= SEQUENCE { + radioBearerConfig RadioBearerConfig OPTIONAL, -- Need M + secondaryCellGroup OCTET STRING (CONTAINING CellGroupConfig) OPTIONAL, -- Need M + measConfig MeasConfig OPTIONAL, -- Need M + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCReconfiguration-v1530-IEs OPTIONAL +} + +RRCReconfiguration-v1530-IEs ::= SEQUENCE { + masterCellGroup OCTET STRING (CONTAINING CellGroupConfig) OPTIONAL, -- Need M + fullConfig ENUMERATED {true} OPTIONAL, -- Cond FullConfig + dedicatedNAS-MessageList SEQUENCE (SIZE(1..maxDRB)) OF DedicatedNAS-Message OPTIONAL, -- Cond nonHO + masterKeyUpdate MasterKeyUpdate OPTIONAL, -- Cond MasterKeyChange + dedicatedSIB1-Delivery OCTET STRING (CONTAINING SIB1) OPTIONAL, -- Need N + dedicatedSystemInformationDelivery OCTET STRING (CONTAINING SystemInformation) OPTIONAL, -- Need N + otherConfig OtherConfig OPTIONAL, -- Need N + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +MasterKeyUpdate ::= SEQUENCE { + keySetChangeIndicator BOOLEAN, + nextHopChainingCount NextHopChainingCount, + nas-Container OCTET STRING OPTIONAL, -- Cond securityNASC + ... +} + +-- TAG-RRCRECONFIGURATION-STOP +-- TAG-RRCRECONFIGURATIONCOMPLETE-START + +RRCReconfigurationComplete ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcReconfigurationComplete RRCReconfigurationComplete-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCReconfigurationComplete-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCReconfigurationComplete-v1530-IEs OPTIONAL +} + +RRCReconfigurationComplete-v1530-IEs ::= SEQUENCE { + uplinkTxDirectCurrentList UplinkTxDirectCurrentList OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-RRCRECONFIGURATIONCOMPLETE-STOP +-- TAG-RRCREJECT-START + +RRCReject ::= SEQUENCE { + criticalExtensions CHOICE { + rrcReject RRCReject-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCReject-IEs ::= SEQUENCE { + waitTime RejectWaitTime OPTIONAL, -- Need N + + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +RejectWaitTime ::= INTEGER (1..16) + +-- TAG-RRCREJECT-STOP +-- TAG-RRCRELEASE-START + +RRCRelease ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcRelease RRCRelease-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCRelease-IEs ::= SEQUENCE { + redirectedCarrierInfo RedirectedCarrierInfo OPTIONAL, -- Need N + cellReselectionPriorities CellReselectionPriorities OPTIONAL, -- Need R + suspendConfig SuspendConfig OPTIONAL, -- Need R + deprioritisationReq SEQUENCE { + deprioritisationType ENUMERATED {frequency, nr}, + deprioritisationTimer ENUMERATED {min5, min10, min15, min30} + } OPTIONAL, -- Need N + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL + +} + +RedirectedCarrierInfo ::= CHOICE { + nr CarrierInfoNR, + eutra RedirectedCarrierInfo-EUTRA, + ... +} + +RedirectedCarrierInfo-EUTRA ::= SEQUENCE { + eutraFrequency ARFCN-ValueEUTRA, + cnType-r15 ENUMERATED {epc,fiveGC} OPTIONAL +} + +CarrierInfoNR ::= SEQUENCE { + carrierFreq ARFCN-ValueNR, + ssbSubcarrierSpacing SubcarrierSpacing, + smtc SSB-MTC OPTIONAL, -- Need S + ... +} + +SuspendConfig ::= SEQUENCE { + fullI-RNTI I-RNTI-Value, + shortI-RNTI ShortI-RNTI-Value, + ran-PagingCycle PagingCycle, + ran-NotificationAreaInfo RAN-NotificationAreaInfo OPTIONAL, -- Need M + t380 PeriodicRNAU-TimerValue OPTIONAL, -- Need R + nextHopChainingCount NextHopChainingCount, + ... +} + + +PeriodicRNAU-TimerValue ::= ENUMERATED { min5, min10, min20, min30, min60, min120, min360, min720} + + +CellReselectionPriorities ::= SEQUENCE { + freqPriorityListEUTRA FreqPriorityListEUTRA OPTIONAL, -- Need M + freqPriorityListNR FreqPriorityListNR OPTIONAL, -- Need M + t320 ENUMERATED {min5, min10, min20, min30, min60, min120, min180, spare1} OPTIONAL, -- Need R + ... +} + +PagingCycle ::= ENUMERATED {rf32, rf64, rf128, rf256} + +FreqPriorityListEUTRA ::= SEQUENCE (SIZE (1..maxFreq)) OF FreqPriorityEUTRA + +FreqPriorityListNR ::= SEQUENCE (SIZE (1..maxFreq)) OF FreqPriorityNR + +FreqPriorityEUTRA ::= SEQUENCE { + carrierFreq ARFCN-ValueEUTRA, + cellReselectionPriority CellReselectionPriority, + cellReselectionSubPriority CellReselectionSubPriority OPTIONAL -- Need R +} + +FreqPriorityNR ::= SEQUENCE { + carrierFreq ARFCN-ValueNR, + cellReselectionPriority CellReselectionPriority, + cellReselectionSubPriority CellReselectionSubPriority OPTIONAL -- Need R +} + +RAN-NotificationAreaInfo ::= CHOICE { + cellList PLMN-RAN-AreaCellList, + ran-AreaConfigList PLMN-RAN-AreaConfigList, + ... +} + +PLMN-RAN-AreaCellList ::= SEQUENCE (SIZE (1.. maxPLMNIdentities)) OF PLMN-RAN-AreaCell + +PLMN-RAN-AreaCell ::= SEQUENCE { + plmn-Identity PLMN-Identity OPTIONAL, -- Need S + ran-AreaCells SEQUENCE (SIZE (1..32)) OF CellIdentity +} + +PLMN-RAN-AreaConfigList ::= SEQUENCE (SIZE (1..maxPLMNIdentities)) OF PLMN-RAN-AreaConfig + +PLMN-RAN-AreaConfig ::= SEQUENCE { + plmn-Identity PLMN-Identity OPTIONAL, -- Need S + ran-Area SEQUENCE (SIZE (1..16)) OF RAN-AreaConfig +} + +RAN-AreaConfig ::= SEQUENCE { + trackingAreaCode TrackingAreaCode, + ran-AreaCodeList SEQUENCE (SIZE (1..32)) OF RAN-AreaCode OPTIONAL -- Need R +} + +-- TAG-RRCRELEASE-STOP +-- TAG-RRCRESUME-START + +RRCResume ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcResume RRCResume-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCResume-IEs ::= SEQUENCE { + radioBearerConfig RadioBearerConfig OPTIONAL, -- Need M + masterCellGroup OCTET STRING (CONTAINING CellGroupConfig) OPTIONAL, -- Need M + measConfig MeasConfig OPTIONAL, -- Need M + fullConfig ENUMERATED {true} OPTIONAL, -- Need N + + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL + +} + +-- TAG-RRCRESUME-STOP +-- TAG-RRCRESUMECOMPLETE-START + +RRCResumeComplete ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcResumeComplete RRCResumeComplete-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCResumeComplete-IEs ::= SEQUENCE { + dedicatedNAS-Message DedicatedNAS-Message OPTIONAL, + selectedPLMN-Identity INTEGER (1..maxPLMN) OPTIONAL, + uplinkTxDirectCurrentList UplinkTxDirectCurrentList OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +-- TAG-RRCRESUMECOMPLETE-STOP +-- TAG-RRCRESUMEREQUEST-START + +RRCResumeRequest ::= SEQUENCE { + rrcResumeRequest RRCResumeRequest-IEs +} + +RRCResumeRequest-IEs ::= SEQUENCE { + resumeIdentity ShortI-RNTI-Value, + resumeMAC-I BIT STRING (SIZE (16)), + resumeCause ResumeCause, + spare BIT STRING (SIZE (1)) +} + +-- TAG-RRCRESUMEREQUEST-STOP +-- TAG-RRCRESUMEREQUEST1-START + +RRCResumeRequest1 ::= SEQUENCE { + rrcResumeRequest1 RRCResumeRequest1-IEs +} + +RRCResumeRequest1-IEs ::= SEQUENCE { + resumeIdentity I-RNTI-Value, + resumeMAC-I BIT STRING (SIZE (16)), + resumeCause ResumeCause, + spare BIT STRING (SIZE (1)) +} + +-- TAG-RRCRESUMEREQUEST1-STOP +-- TAG-RRCSETUP-START + +RRCSetup ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcSetup RRCSetup-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCSetup-IEs ::= SEQUENCE { + radioBearerConfig RadioBearerConfig, + masterCellGroup OCTET STRING (CONTAINING CellGroupConfig), + + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +-- TAG-RRCSETUP-STOP +-- TAG-RRCSETUPCOMPLETE-START + +RRCSetupComplete ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcSetupComplete RRCSetupComplete-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCSetupComplete-IEs ::= SEQUENCE { + selectedPLMN-Identity INTEGER (1..maxPLMN), + registeredAMF RegisteredAMF OPTIONAL, + guami-Type ENUMERATED {native, mapped} OPTIONAL, + s-nssai-List SEQUENCE (SIZE (1..maxNrofS-NSSAI)) OF S-NSSAI OPTIONAL, + dedicatedNAS-Message DedicatedNAS-Message, + ng-5G-S-TMSI-Value CHOICE { + ng-5G-S-TMSI NG-5G-S-TMSI, + ng-5G-S-TMSI-Part2 BIT STRING (SIZE (9)) + } OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +RegisteredAMF ::= SEQUENCE { + plmn-Identity PLMN-Identity OPTIONAL, + amf-Identifier AMF-Identifier +} + +-- TAG-RRCSETUPCOMPLETE-STOP +-- TAG-RRCSETUPREQUEST-START + +RRCSetupRequest ::= SEQUENCE { + rrcSetupRequest RRCSetupRequest-IEs +} + +RRCSetupRequest-IEs ::= SEQUENCE { + ue-Identity InitialUE-Identity, + establishmentCause EstablishmentCause, + spare BIT STRING (SIZE (1)) +} + +InitialUE-Identity ::= CHOICE { + ng-5G-S-TMSI-Part1 BIT STRING (SIZE (39)), + randomValue BIT STRING (SIZE (39)) +} + +EstablishmentCause ::= ENUMERATED { + emergency, highPriorityAccess, mt-Access, mo-Signalling, + mo-Data, mo-VoiceCall, mo-VideoCall, mo-SMS, mps-PriorityAccess, mcs-PriorityAccess, + spare6, spare5, spare4, spare3, spare2, spare1} + +-- TAG-RRCSETUPREQUEST-STOP +-- TAG-RRCSYETEMINFOREQUEST-START + +RRCSystemInfoRequest ::= SEQUENCE { + criticalExtensions CHOICE { + rrcSystemInfoRequest-r15 RRCSystemInfoRequest-r15-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCSystemInfoRequest-r15-IEs ::= SEQUENCE { + requested-SI-List BIT STRING (SIZE (maxSI-Message)), --32bits + spare BIT STRING (SIZE (12)) +} + +-- TAG-RRCSYETEMINFOREQUEST-STOP +-- TAG-SECURITYMODECOMMAND-START + +SecurityModeCommand ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + securityModeCommand SecurityModeCommand-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +SecurityModeCommand-IEs ::= SEQUENCE { + securityConfigSMC SecurityConfigSMC, + + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +SecurityConfigSMC ::= SEQUENCE { + securityAlgorithmConfig SecurityAlgorithmConfig, + ... +} + +-- TAG-SECURITYMODECOMMAND-STOP +-- TAG-SECURITYMODECOMPLETE-START + +SecurityModeComplete ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + securityModeComplete SecurityModeComplete-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +SecurityModeComplete-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +-- TAG-SECURITYMODECOMPLETE-STOP +-- TAG-SECURITYMODEFAILURE-START + +SecurityModeFailure ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + securityModeFailure SecurityModeFailure-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +SecurityModeFailure-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +-- TAG-SECURITYMODEFAILURE-STOP +-- TAG-SIB1-START + +SIB1 ::= SEQUENCE { + cellSelectionInfo SEQUENCE { + q-RxLevMin Q-RxLevMin, + q-RxLevMinOffset INTEGER (1..8) OPTIONAL, -- Need R + q-RxLevMinSUL Q-RxLevMin OPTIONAL, -- Need R + q-QualMin Q-QualMin OPTIONAL, -- Need R + q-QualMinOffset INTEGER (1..8) OPTIONAL -- Need R + } OPTIONAL, -- Need S + cellAccessRelatedInfo CellAccessRelatedInfo, + connEstFailureControl ConnEstFailureControl OPTIONAL, -- Need R + si-SchedulingInfo SI-SchedulingInfo OPTIONAL, -- Need R + servingCellConfigCommon ServingCellConfigCommonSIB OPTIONAL, -- Need R + ims-EmergencySupport ENUMERATED {true} OPTIONAL, -- Need R + eCallOverIMS-Support ENUMERATED {true} OPTIONAL, -- Cond Absent + ue-TimersAndConstants UE-TimersAndConstants OPTIONAL, -- Need R + + uac-BarringInfo SEQUENCE { + uac-BarringForCommon UAC-BarringPerCatList OPTIONAL, -- Need S + uac-BarringPerPLMN-List UAC-BarringPerPLMN-List OPTIONAL, -- Need S + uac-BarringInfoSetList UAC-BarringInfoSetList, + uac-AccessCategory1-SelectionAssistanceInfo CHOICE { + plmnCommon UAC-AccessCategory1-SelectionAssistanceInfo, + individualPLMNList SEQUENCE (SIZE (2..maxPLMN)) OF UAC-AccessCategory1-SelectionAssistanceInfo + } OPTIONAL + } OPTIONAL, -- Need R + + useFullResumeID ENUMERATED {true} OPTIONAL, -- Need N + + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +UAC-AccessCategory1-SelectionAssistanceInfo ::= ENUMERATED {a, b, c} + +-- TAG-SIB1-STOP + +SystemInformation ::= SEQUENCE { + criticalExtensions CHOICE { + systemInformation-r15 SystemInformation-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +SystemInformation-IEs ::= SEQUENCE { + sib-TypeAndInfo SEQUENCE (SIZE (1..maxSIB)) OF CHOICE { + sib2 SIB2, + sib3 SIB3, + sib4 SIB4, + sib5 SIB5, + sib6 SIB6, + sib7 SIB7, + sib8 SIB8, + sib9 SIB9, + ... + }, + + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-UEASSISTANCEINFORMATION-START + +UEAssistanceInformation ::= SEQUENCE { + criticalExtensions CHOICE { + ueAssistanceInformation UEAssistanceInformation-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +UEAssistanceInformation-IEs ::= SEQUENCE { + delayBudgetReport DelayBudgetReport OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + +DelayBudgetReport::= CHOICE { + type1 ENUMERATED { + msMinus1280, msMinus640, msMinus320, msMinus160,msMinus80, msMinus60, msMinus40, + msMinus20, ms0, ms20,ms40, ms60, ms80, ms160, ms320, ms640, ms1280}, + ... +} + +-- TAG-UEASSISTANCEINFORMATION-STOP +-- TAG-UECAPABILITYENQUIRY-START + +UECapabilityEnquiry ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + ueCapabilityEnquiry UECapabilityEnquiry-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +UECapabilityEnquiry-IEs ::= SEQUENCE { + ue-CapabilityRAT-RequestList UE-CapabilityRAT-RequestList, + + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +-- TAG-UECAPABILITYENQUIRY-STOP +-- TAG-UECAPABILITYINFORMATION-START + +UECapabilityInformation ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + ueCapabilityInformation UECapabilityInformation-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +UECapabilityInformation-IEs ::= SEQUENCE { + ue-CapabilityRAT-ContainerList UE-CapabilityRAT-ContainerList OPTIONAL, + + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +-- TAG-UECAPABILITYINFORMATION-STOP +-- TAG-ULINFORMATIONTRANSFER-START + +ULInformationTransfer ::= SEQUENCE { + criticalExtensions CHOICE { + ulInformationTransfer ULInformationTransfer-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +ULInformationTransfer-IEs ::= SEQUENCE { + dedicatedNAS-Message DedicatedNAS-Message OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-ULINFORMATIONTRANSFER-STOP +-- TAG-SETUP-RELEASE-START + +SetupRelease { ElementTypeParam } ::= CHOICE { + release NULL, + setup ElementTypeParam +} + +-- TAG-SETUP-RELEASE-STOP +-- TAG-SIB2-START + +SIB2 ::= SEQUENCE { + cellReselectionInfoCommon SEQUENCE { + nrofSS-BlocksToAverage INTEGER (2..maxNrofSS-BlocksToAverage) OPTIONAL, -- Need R + absThreshSS-BlocksConsolidation ThresholdNR OPTIONAL, -- Need R + rangeToBestCell RangeToBestCell OPTIONAL, -- Need R + q-Hyst ENUMERATED { + dB0, dB1, dB2, dB3, dB4, dB5, dB6, dB8, dB10, + dB12, dB14, dB16, dB18, dB20, dB22, dB24}, + speedStateReselectionPars SEQUENCE { + mobilityStateParameters MobilityStateParameters, + q-HystSF SEQUENCE { + sf-Medium ENUMERATED { + dB-6, dB-4, dB-2, dB0}, + sf-High ENUMERATED { + dB-6, dB-4, dB-2, dB0} + } + } OPTIONAL, -- Need R + ... + }, + cellReselectionServingFreqInfo SEQUENCE { + s-NonIntraSearchP ReselectionThreshold OPTIONAL, -- Need R + s-NonIntraSearchQ ReselectionThresholdQ OPTIONAL, -- Need R + threshServingLowP ReselectionThreshold, + threshServingLowQ ReselectionThresholdQ OPTIONAL, -- Need R + cellReselectionPriority CellReselectionPriority, + cellReselectionSubPriority CellReselectionSubPriority OPTIONAL, -- Need R + ... + }, + intraFreqCellReselectionInfo SEQUENCE { + q-RxLevMin Q-RxLevMin, + q-RxLevMinSUL Q-RxLevMin OPTIONAL, -- Need R + q-QualMin Q-QualMin OPTIONAL, -- Need S + s-IntraSearchP ReselectionThreshold, -- Need S + s-IntraSearchQ ReselectionThresholdQ OPTIONAL, -- Cond RSRQ + t-ReselectionNR T-Reselection, + frequencyBandList MultiFrequencyBandListNR-SIB OPTIONAL, -- Need R + frequencyBandListSUL MultiFrequencyBandListNR-SIB OPTIONAL, -- Need R + p-Max P-Max OPTIONAL, -- Need R + smtc SSB-MTC OPTIONAL, -- Need R + ss-RSSI-Measurement SS-RSSI-Measurement OPTIONAL, -- Need R + ssb-ToMeasure SSB-ToMeasure OPTIONAL, -- Need R + deriveSSB-IndexFromCell BOOLEAN, + ... + }, + ... +} + +RangeToBestCell ::= Q-OffsetRange + +-- TAG-SIB2-STOP +-- TAG-SIB3-START + +SIB3 ::= SEQUENCE { + intraFreqNeighCellList IntraFreqNeighCellList OPTIONAL, -- Need R + intraFreqBlackCellList IntraFreqBlackCellList OPTIONAL, -- Need R + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +IntraFreqNeighCellList ::= SEQUENCE (SIZE (1..maxCellIntra)) OF IntraFreqNeighCellInfo + +IntraFreqNeighCellInfo ::= SEQUENCE { + physCellId PhysCellId, + q-OffsetCell Q-OffsetRange, + q-RxLevMinOffsetCell INTEGER (1..8) OPTIONAL, -- Need R + q-RxLevMinOffsetCellSUL INTEGER (1..8) OPTIONAL, -- Need R + q-QualMinOffsetCell INTEGER (1..8) OPTIONAL, -- Need R + ... +} + +IntraFreqBlackCellList ::= SEQUENCE (SIZE (1..maxCellBlack)) OF PCI-Range + +-- TAG-SIB3-STOP +-- TAG-SIB4-START + +SIB4 ::= SEQUENCE { + interFreqCarrierFreqList InterFreqCarrierFreqList, + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +InterFreqCarrierFreqList ::= SEQUENCE (SIZE (1..maxFreq)) OF InterFreqCarrierFreqInfo + +InterFreqCarrierFreqInfo ::= SEQUENCE { + dl-CarrierFreq ARFCN-ValueNR, + frequencyBandList MultiFrequencyBandListNR-SIB OPTIONAL, -- Need R + frequencyBandListSUL MultiFrequencyBandListNR-SIB OPTIONAL, -- Need R + nrofSS-BlocksToAverage INTEGER (2..maxNrofSS-BlocksToAverage) OPTIONAL, + absThreshSS-BlocksConsolidation ThresholdNR OPTIONAL, + smtc SSB-MTC OPTIONAL, -- Need R + ssbSubcarrierSpacing SubcarrierSpacing, + ssb-ToMeasure SSB-ToMeasure OPTIONAL, -- Need R + deriveSSB-IndexFromCell BOOLEAN, + ss-RSSI-Measurement SS-RSSI-Measurement OPTIONAL, + q-RxLevMin Q-RxLevMin, + q-RxLevMinSUL Q-RxLevMin OPTIONAL, -- Need R + q-QualMin Q-QualMin OPTIONAL, -- Need R, + p-Max P-Max OPTIONAL, -- Need R + t-ReselectionNR T-Reselection, + t-ReselectionNR-SF SpeedStateScaleFactors OPTIONAL, -- Need N + threshX-HighP ReselectionThreshold, + threshX-LowP ReselectionThreshold, + threshX-Q SEQUENCE { + threshX-HighQ ReselectionThresholdQ, + threshX-LowQ ReselectionThresholdQ + } OPTIONAL, -- Cond RSRQ + cellReselectionPriority CellReselectionPriority OPTIONAL, -- Need R + cellReselectionSubPriority CellReselectionSubPriority OPTIONAL, -- Need R + q-OffsetFreq Q-OffsetRange DEFAULT dB0, + interFreqNeighCellList InterFreqNeighCellList OPTIONAL, -- Need R + interFreqBlackCellList InterFreqBlackCellList OPTIONAL, -- Need R + ... +} + +InterFreqNeighCellList ::= SEQUENCE (SIZE (1..maxCellInter)) OF InterFreqNeighCellInfo + +InterFreqNeighCellInfo ::= SEQUENCE { + physCellId PhysCellId, + q-OffsetCell Q-OffsetRange, + q-RxLevMinOffsetCell INTEGER (1..8) OPTIONAL, -- Need R + q-RxLevMinOffsetCellSUL INTEGER (1..8) OPTIONAL, -- Need R + q-QualMinOffsetCell INTEGER (1..8) OPTIONAL, -- Need R + ... + +} + +InterFreqBlackCellList ::= SEQUENCE (SIZE (1..maxCellBlack)) OF PCI-Range + +-- TAG-SIB4-STOP +-- TAG-SIB5-START + +SIB5 ::= SEQUENCE { + carrierFreqListEUTRA CarrierFreqListEUTRA OPTIONAL, -- Need R + t-ReselectionEUTRA T-Reselection, + t-ReselectionEUTRA-SF SpeedStateScaleFactors OPTIONAL, -- Need N + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +CarrierFreqListEUTRA ::= SEQUENCE (SIZE (1..maxEUTRA-Carrier)) OF CarrierFreqEUTRA + +CarrierFreqEUTRA ::= SEQUENCE { + carrierFreq ARFCN-ValueEUTRA, + eutra-multiBandInfoList EUTRA-MultiBandInfoList OPTIONAL, -- Need R + eutra-FreqNeighCellList EUTRA-FreqNeighCellList OPTIONAL, -- Need R + eutra-BlackCellList EUTRA-FreqBlackCellList OPTIONAL, -- Need R + allowedMeasBandwidth EUTRA-AllowedMeasBandwidth, + presenceAntennaPort1 EUTRA-PresenceAntennaPort1, + cellReselectionPriority CellReselectionPriority OPTIONAL, -- Need R + cellReselectionSubPriority CellReselectionSubPriority OPTIONAL, -- Need R + threshX-High ReselectionThreshold, + threshX-Low ReselectionThreshold, + q-RxLevMin INTEGER (-70..-22), + q-QualMin INTEGER (-34..-3), + p-MaxEUTRA INTEGER (-30..33), + threshX-Q SEQUENCE { + threshX-HighQ ReselectionThresholdQ, + threshX-LowQ ReselectionThresholdQ + } OPTIONAL -- Cond RSRQ +} + +EUTRA-FreqBlackCellList ::= SEQUENCE (SIZE (1..maxEUTRA-CellBlack)) OF EUTRA-PhysCellIdRange + +EUTRA-FreqNeighCellList ::= SEQUENCE (SIZE (1..maxCellEUTRA)) OF EUTRA-FreqNeighCellInfo + +EUTRA-FreqNeighCellInfo ::= SEQUENCE { + physCellId EUTRA-PhysCellId, + q-OffsetCell EUTRA-Q-OffsetRange, + q-RxLevMinOffsetCell INTEGER (1..8) OPTIONAL, -- Need R + q-QualMinOffsetCell INTEGER (1..8) OPTIONAL -- Need R +} + +-- TAG-SIB5-STOP +-- TAG-SIB6-START + +SIB6 ::= SEQUENCE { + messageIdentifier BIT STRING (SIZE (16)), + serialNumber BIT STRING (SIZE (16)), + warningType OCTET STRING (SIZE (2)), + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +-- TAG-SIB6-STOP +-- TAG-SIB7-START + +SIB7 ::= SEQUENCE { + messageIdentifier BIT STRING (SIZE (16)), + serialNumber BIT STRING (SIZE (16)), + warningMessageSegmentType ENUMERATED {notLastSegment, lastSegment}, + warningMessageSegmentNumber INTEGER (0..63), + warningMessageSegment OCTET STRING, + dataCodingScheme OCTET STRING (SIZE (1)) OPTIONAL, -- Cond Segment1 + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +-- TAG-SIB7-STOP +-- TAG-SIB8-START + +SIB8 ::= SEQUENCE { + messageIdentifier BIT STRING (SIZE (16)), + serialNumber BIT STRING (SIZE (16)), + warningMessageSegmentType ENUMERATED {notLastSegment, lastSegment}, + warningMessageSegmentNumber INTEGER (0..63), + warningMessageSegment OCTET STRING, + dataCodingScheme OCTET STRING (SIZE (1)) OPTIONAL, -- Cond Segment1 + warningAreaCoordinatesSegment OCTET STRING OPTIONAL, -- Need R + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +-- TAG-SIB8-STOP +-- TAG-SIB9-START + +SIB9 ::= SEQUENCE { + timeInfo SEQUENCE { + timeInfoUTC INTEGER (0..549755813887), + dayLightSavingTime BIT STRING (SIZE (2)) OPTIONAL, -- Need R + leapSeconds INTEGER (-127..128) OPTIONAL, -- Need R + localTimeOffset INTEGER (-63..64) OPTIONAL -- Need R + } OPTIONAL, -- Need R + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +-- TAG-SIB9-STOP +-- TAG-ADDITIONALSPECTRUMEMISSION-START + +AdditionalSpectrumEmission ::= INTEGER (0..7) + +-- TAG-ADDITIONALSPECTRUMEMISSION-STOP +-- TAG-ALPHA-START + +Alpha ::= ENUMERATED {alpha0, alpha04, alpha05, alpha06, alpha07, alpha08, alpha09, alpha1} + +-- TAG-ALPHA-STOP +-- TAG-AMF-IDENTIFIER-START + +AMF-Identifier ::= BIT STRING (SIZE (24)) + +-- TAG-AMF-IDENTIFIER-STOP +-- TAG-ARFCN-VALUEEUTRA-START + +ARFCN-ValueEUTRA ::= INTEGER (0..maxEARFCN) + +-- TAG-ARFCN-VALUEEUTRA-STOP +-- TAG-ARFCN-VALUE-NR-START + +ARFCN-ValueNR ::= INTEGER (0..maxNARFCN) + +-- TAG-ARFCN-VALUE-NR-STOP +-- TAG-BEAM-FAILURE-RECOVERY-CONFIG-START + +BeamFailureRecoveryConfig ::= SEQUENCE { + rootSequenceIndex-BFR INTEGER (0..137) OPTIONAL, -- Need M + rach-ConfigBFR RACH-ConfigGeneric OPTIONAL, -- Need M + rsrp-ThresholdSSB RSRP-Range OPTIONAL, -- Need M + candidateBeamRSList SEQUENCE (SIZE(1..maxNrofCandidateBeams)) OF PRACH-ResourceDedicatedBFR OPTIONAL, -- Need M + ssb-perRACH-Occasion ENUMERATED {oneEighth, oneFourth, oneHalf, one, two, four, eight, sixteen} OPTIONAL, -- Need M + ra-ssb-OccasionMaskIndex INTEGER (0..15) OPTIONAL, -- Need M + recoverySearchSpaceId SearchSpaceId OPTIONAL, -- Cond CF-BFR + ra-Prioritization RA-Prioritization OPTIONAL, -- Need R + beamFailureRecoveryTimer ENUMERATED {ms10, ms20, ms40, ms60, ms80, ms100, ms150, ms200} OPTIONAL, -- Need M + ..., + [[ + msg1-SubcarrierSpacing-v1530 SubcarrierSpacing OPTIONAL -- Need M + ]] +} + +PRACH-ResourceDedicatedBFR ::= CHOICE { + ssb BFR-SSB-Resource, + csi-RS BFR-CSIRS-Resource +} + +BFR-SSB-Resource ::= SEQUENCE { + ssb SSB-Index, + ra-PreambleIndex INTEGER (0..63), + ... +} + +BFR-CSIRS-Resource ::= SEQUENCE { + csi-RS NZP-CSI-RS-ResourceId, + ra-OccasionList SEQUENCE (SIZE(1..maxRA-OccasionsPerCSIRS)) OF INTEGER (0..maxRA-Occasions-1) OPTIONAL, -- Need R + ra-PreambleIndex INTEGER (0..63) OPTIONAL, -- Need R + ... +} + +-- TAG-BEAM-FAILURE-RECOVERY-CONFIG-STOP +-- TAG-BSR-CONFIG-START + +BSR-Config ::= SEQUENCE { + periodicBSR-Timer ENUMERATED { sf1, sf5, sf10, sf16, sf20, sf32, sf40, sf64, + sf80, sf128, sf160, sf320, sf640, sf1280, sf2560, infinity }, + retxBSR-Timer ENUMERATED { sf10, sf20, sf40, sf80, sf160, sf320, sf640, sf1280, sf2560, + sf5120, sf10240, spare5, spare4, spare3, spare2, spare1}, + logicalChannelSR-DelayTimer ENUMERATED { sf20, sf40, sf64, sf128, sf512, sf1024, sf2560, spare1} OPTIONAL, -- Need R + ... +} + +-- TAG-BSR-CONFIG-STOP +-- TAG-BANDWIDTH-PART-START + +BWP ::= SEQUENCE { + locationAndBandwidth INTEGER (0..37949), + subcarrierSpacing SubcarrierSpacing, + cyclicPrefix ENUMERATED { extended } OPTIONAL -- Need R +} + + +-- TAG-BANDWIDTH-PART-STOP +-- TAG-BWP-DOWNLINK-START + +BWP-Downlink ::= SEQUENCE { + bwp-Id BWP-Id, + bwp-Common BWP-DownlinkCommon OPTIONAL, -- Cond SetupOtherBWP + bwp-Dedicated BWP-DownlinkDedicated OPTIONAL, -- Need M + ... +} + +-- TAG-BWP-DOWNLINK-STOP +-- TAG-BWP-DOWNLINKCOMMON-START + +BWP-DownlinkCommon ::= SEQUENCE { + genericParameters BWP, + pdcch-ConfigCommon SetupRelease { PDCCH-ConfigCommon } OPTIONAL, -- Need M + pdsch-ConfigCommon SetupRelease { PDSCH-ConfigCommon } OPTIONAL, -- Need M + ... +} + +-- TAG-BWP-DOWNLINKCOMMON-STOP +-- TAG-BWP-DOWNLINKDEDICATED-START + +BWP-DownlinkDedicated ::= SEQUENCE { + pdcch-Config SetupRelease { PDCCH-Config } OPTIONAL, -- Need M + pdsch-Config SetupRelease { PDSCH-Config } OPTIONAL, -- Need M + sps-Config SetupRelease { SPS-Config } OPTIONAL, -- Need M + radioLinkMonitoringConfig SetupRelease { RadioLinkMonitoringConfig } OPTIONAL, -- Need M + ... +} + +-- TAG-BWP-DOWNLINKDEDICATED-STOP +-- TAG-BWP-ID-START + +BWP-Id ::= INTEGER (0..maxNrofBWPs) + +-- TAG-BWP-ID-STOP +-- TAG-BWP-UPLINK-START + +BWP-Uplink ::= SEQUENCE { + bwp-Id BWP-Id, + bwp-Common BWP-UplinkCommon OPTIONAL, -- Cond SetupOtherBWP + bwp-Dedicated BWP-UplinkDedicated OPTIONAL, -- Need M + ... +} + +-- TAG-BWP-UPLINK-STOP +-- TAG-BWP-UPLINKCOMMON-START + +BWP-UplinkCommon ::= SEQUENCE { + genericParameters BWP, + rach-ConfigCommon SetupRelease { RACH-ConfigCommon } OPTIONAL, -- Need M + pusch-ConfigCommon SetupRelease { PUSCH-ConfigCommon } OPTIONAL, -- Need M + pucch-ConfigCommon SetupRelease { PUCCH-ConfigCommon } OPTIONAL, -- Need M + ... +} + +-- TAG-BWP-UPLINKCOMMON-STOP +-- TAG-BWP-UPLINKDEDICATED-START + +BWP-UplinkDedicated ::= SEQUENCE { + pucch-Config SetupRelease { PUCCH-Config } OPTIONAL, -- Need M + pusch-Config SetupRelease { PUSCH-Config } OPTIONAL, -- Need M + configuredGrantConfig SetupRelease { ConfiguredGrantConfig } OPTIONAL, -- Need M + srs-Config SetupRelease { SRS-Config } OPTIONAL, -- Need M + beamFailureRecoveryConfig SetupRelease { BeamFailureRecoveryConfig } OPTIONAL, -- Cond SpCellOnly + ... +} + +-- TAG-BWP-UPLINKDEDICATED-STOP +-- TAG-CELL-ACCESS-RELATED-INFO-START + +CellAccessRelatedInfo ::= SEQUENCE { + plmn-IdentityList PLMN-IdentityInfoList, + cellReservedForOtherUse ENUMERATED {true} OPTIONAL, -- Need R + ... +} + +-- TAG- CELL-ACCESS-RELATED-INFO-STOP +-- TAG-CELL-ACCESS-RELATED-INFO-EUTRA-5GC-START + +CellAccessRelatedInfo-EUTRA-5GC ::= SEQUENCE { + plmn-IdentityList-eutra-5gc PLMN-IdentityList-EUTRA-5GC, + trackingAreaCode-eutra-5gc TrackingAreaCode, + ranac-5gc RAN-AreaCode OPTIONAL, + cellIdentity-eutra-5gc CellIdentity-EUTRA-5GC +} + +PLMN-IdentityList-EUTRA-5GC::= SEQUENCE (SIZE (1..maxPLMN)) OF PLMN-Identity-EUTRA-5GC + +PLMN-Identity-EUTRA-5GC ::= CHOICE { + plmn-Identity-EUTRA-5GC PLMN-Identity, +plmn-index INTEGER (1..maxPLMN) +} + +CellIdentity-EUTRA-5GC ::= CHOICE { + cellIdentity-EUTRA BIT STRING (SIZE (28)), +cellId-index INTEGER (1..maxPLMN) +} + +-- TAG-CELL-ACCESS-RELATED-INFO-EUTRA-5GC-STOP +-- TAG-CELL-ACCESS-RELATED-INFO-EUTRA-EPC-START + +CellAccessRelatedInfo-EUTRA-EPC ::= SEQUENCE { + plmn-IdentityList-eutra-epc PLMN-IdentityList-EUTRA-EPC, + trackingAreaCode-eutra-epc BIT STRING (SIZE (16)), + cellIdentity-eutra-epc BIT STRING (SIZE (28)) +} + +PLMN-IdentityList-EUTRA-EPC::= SEQUENCE (SIZE (1..maxPLMN)) OF PLMN-Identity + +-- TAG-CELL-ACCESS-RELATED-INFO-EUTRA-5GC-STOP +-- TAG-CELL-GROUP-CONFIG-START + +-- Configuration of one Cell-Group: +CellGroupConfig ::= SEQUENCE { + cellGroupId CellGroupId, + + rlc-BearerToAddModList SEQUENCE (SIZE(1..maxLC-ID)) OF RLC-BearerConfig OPTIONAL, -- Need N + rlc-BearerToReleaseList SEQUENCE (SIZE(1..maxLC-ID)) OF LogicalChannelIdentity OPTIONAL, -- Need N + + mac-CellGroupConfig MAC-CellGroupConfig OPTIONAL, -- Need M + + physicalCellGroupConfig PhysicalCellGroupConfig OPTIONAL, -- Need M + + spCellConfig SpCellConfig OPTIONAL, -- Need M + sCellToAddModList SEQUENCE (SIZE (1..maxNrofSCells)) OF SCellConfig OPTIONAL, -- Need N + sCellToReleaseList SEQUENCE (SIZE (1..maxNrofSCells)) OF SCellIndex OPTIONAL, -- Need N + ..., + [[ + reportUplinkTxDirectCurrent-v1530 ENUMERATED {true} OPTIONAL -- Cond BWP-Reconfig + ]] +} + + + +-- Serving cell specific MAC and PHY parameters for a SpCell: +SpCellConfig ::= SEQUENCE { + servCellIndex ServCellIndex OPTIONAL, -- Cond SCG + reconfigurationWithSync ReconfigurationWithSync OPTIONAL, -- Cond ReconfWithSync + rlf-TimersAndConstants SetupRelease { RLF-TimersAndConstants } OPTIONAL, -- Need M + rlmInSyncOutOfSyncThreshold ENUMERATED {n1} OPTIONAL, -- Need S + spCellConfigDedicated ServingCellConfig OPTIONAL, -- Need M + ... +} + +ReconfigurationWithSync ::= SEQUENCE { + spCellConfigCommon ServingCellConfigCommon OPTIONAL, -- Need M + newUE-Identity RNTI-Value, + t304 ENUMERATED {ms50, ms100, ms150, ms200, ms500, ms1000, ms2000, ms10000}, + rach-ConfigDedicated CHOICE { + uplink RACH-ConfigDedicated, + supplementaryUplink RACH-ConfigDedicated + } OPTIONAL, -- Need N + ..., + [[ + smtc SSB-MTC OPTIONAL -- Need S + ]] +} + +SCellConfig ::= SEQUENCE { + sCellIndex SCellIndex, + sCellConfigCommon ServingCellConfigCommon OPTIONAL, -- Cond SCellAdd + sCellConfigDedicated ServingCellConfig OPTIONAL, -- Cond SCellAddMod + ..., + [[ + smtc SSB-MTC OPTIONAL -- Need S + ]] +} + +-- TAG-CELL-GROUP-CONFIG-STOP +-- TAG-CELLGROUPID-START + +CellGroupId ::= INTEGER (0.. maxSecondaryCellGroups) + +-- TAG-CELLGROUPID-STOP + +CellIdentity ::= BIT STRING (SIZE (36)) + +-- TAG-CELLRESELECTIONPRIORITY-START + +CellReselectionPriority ::= INTEGER (0..7) + +-- TAG-CELLRESELECTIONPRIORITY-STOP + +CellReselectionSubPriority ::= ENUMERATED {oDot2, oDot4, oDot6, oDot8} + +-- TAG-CGI-Info-START + +CGI-Info ::= SEQUENCE { + plmn-IdentityInfoList PLMN-IdentityInfoList OPTIONAL, + frequencyBandList MultiFrequencyBandListNR OPTIONAL, + noSIB1 SEQUENCE { + ssb-SubcarrierOffset INTEGER (0..15), + pdcch-ConfigSIB1 PDCCH-ConfigSIB1 + } OPTIONAL, + ... +} + +-- TAG-CGI-Info -STOP +-- TAG-CODEBOOKCONFIG-START +CodebookConfig ::= SEQUENCE { + codebookType CHOICE { + type1 SEQUENCE { + subType CHOICE { + typeI-SinglePanel SEQUENCE { + nrOfAntennaPorts CHOICE { + two SEQUENCE { + twoTX-CodebookSubsetRestriction BIT STRING (SIZE (6)) + }, + moreThanTwo SEQUENCE { + n1-n2 CHOICE { + two-one-TypeI-SinglePanel-Restriction BIT STRING (SIZE (8)), + two-two-TypeI-SinglePanel-Restriction BIT STRING (SIZE (64)), + four-one-TypeI-SinglePanel-Restriction BIT STRING (SIZE (16)), + three-two-TypeI-SinglePanel-Restriction BIT STRING (SIZE (96)), + six-one-TypeI-SinglePanel-Restriction BIT STRING (SIZE (24)), + four-two-TypeI-SinglePanel-Restriction BIT STRING (SIZE (128)), + eight-one-TypeI-SinglePanel-Restriction BIT STRING (SIZE (32)), + four-three-TypeI-SinglePanel-Restriction BIT STRING (SIZE (192)), + six-two-TypeI-SinglePanel-Restriction BIT STRING (SIZE (192)), + twelve-one-TypeI-SinglePanel-Restriction BIT STRING (SIZE (48)), + four-four-TypeI-SinglePanel-Restriction BIT STRING (SIZE (256)), + eight-two-TypeI-SinglePanel-Restriction BIT STRING (SIZE (256)), + sixteen-one-TypeI-SinglePanel-Restriction BIT STRING (SIZE (64)) + }, + typeI-SinglePanel-codebookSubsetRestriction-i2 BIT STRING (SIZE (16)) OPTIONAL -- Need R + } + }, + typeI-SinglePanel-ri-Restriction BIT STRING (SIZE (8)) + }, + typeI-MultiPanel SEQUENCE { + ng-n1-n2 CHOICE { + two-two-one-TypeI-MultiPanel-Restriction BIT STRING (SIZE (8)), + two-four-one-TypeI-MultiPanel-Restriction BIT STRING (SIZE (16)), + four-two-one-TypeI-MultiPanel-Restriction BIT STRING (SIZE (8)), + two-two-two-TypeI-MultiPanel-Restriction BIT STRING (SIZE (64)), + two-eight-one-TypeI-MultiPanel-Restriction BIT STRING (SIZE (32)), + four-four-one-TypeI-MultiPanel-Restriction BIT STRING (SIZE (16)), + two-four-two-TypeI-MultiPanel-Restriction BIT STRING (SIZE (128)), + four-two-two-TypeI-MultiPanel-Restriction BIT STRING (SIZE (64)) + }, + ri-Restriction BIT STRING (SIZE (4)) + } + }, + codebookMode INTEGER (1..2) + + }, + type2 SEQUENCE { + subType CHOICE { + typeII SEQUENCE { + n1-n2-codebookSubsetRestriction CHOICE { + two-one BIT STRING (SIZE (16)), + two-two BIT STRING (SIZE (43)), + four-one BIT STRING (SIZE (32)), + three-two BIT STRING (SIZE (59)), + six-one BIT STRING (SIZE (48)), + four-two BIT STRING (SIZE (75)), + eight-one BIT STRING (SIZE (64)), + four-three BIT STRING (SIZE (107)), + six-two BIT STRING (SIZE (107)), + twelve-one BIT STRING (SIZE (96)), + four-four BIT STRING (SIZE (139)), + eight-two BIT STRING (SIZE (139)), + sixteen-one BIT STRING (SIZE (128)) + }, + typeII-RI-Restriction BIT STRING (SIZE (2)) + }, + typeII-PortSelection SEQUENCE { + portSelectionSamplingSize ENUMERATED {n1, n2, n3, n4} OPTIONAL, -- Need R + typeII-PortSelectionRI-Restriction BIT STRING (SIZE (2)) + } + }, + phaseAlphabetSize ENUMERATED {n4, n8}, + subbandAmplitude BOOLEAN, + numberOfBeams ENUMERATED {two, three, four} + } + } +} + +-- TAG-CODEBOOKCONFIG-STOP +-- TAG-CONFIGUREDGRANTCONFIG-START + +ConfiguredGrantConfig ::= SEQUENCE { + frequencyHopping ENUMERATED {intraSlot, interSlot} OPTIONAL, -- Need S, + cg-DMRS-Configuration DMRS-UplinkConfig, + mcs-Table ENUMERATED {qam256, qam64LowSE} OPTIONAL, -- Need S + mcs-TableTransformPrecoder ENUMERATED {qam256, qam64LowSE} OPTIONAL, -- Need S + uci-OnPUSCH SetupRelease { CG-UCI-OnPUSCH } OPTIONAL, -- Need M + resourceAllocation ENUMERATED { resourceAllocationType0, resourceAllocationType1, dynamicSwitch }, + rbg-Size ENUMERATED {config2} OPTIONAL, -- Need S + powerControlLoopToUse ENUMERATED {n0, n1}, + p0-PUSCH-Alpha P0-PUSCH-AlphaSetId, + transformPrecoder ENUMERATED {enabled, disabled} OPTIONAL, -- Need S + nrofHARQ-Processes INTEGER(1..16), + repK ENUMERATED {n1, n2, n4, n8}, + repK-RV ENUMERATED {s1-0231, s2-0303, s3-0000} OPTIONAL, -- Need R + periodicity ENUMERATED { + sym2, sym7, sym1x14, sym2x14, sym4x14, sym5x14, sym8x14, sym10x14, sym16x14, sym20x14, + sym32x14, sym40x14, sym64x14, sym80x14, sym128x14, sym160x14, sym256x14, sym320x14, sym512x14, + sym640x14, sym1024x14, sym1280x14, sym2560x14, sym5120x14, + sym6, sym1x12, sym2x12, sym4x12, sym5x12, sym8x12, sym10x12, sym16x12, sym20x12, sym32x12, + sym40x12, sym64x12, sym80x12, sym128x12, sym160x12, sym256x12, sym320x12, sym512x12, sym640x12, + sym1280x12, sym2560x12 + }, + configuredGrantTimer INTEGER (1..64) OPTIONAL, -- Need R + rrc-ConfiguredUplinkGrant SEQUENCE { + timeDomainOffset INTEGER (0..5119), + timeDomainAllocation INTEGER (0..15), + frequencyDomainAllocation BIT STRING (SIZE(18)), + antennaPort INTEGER (0..31), + dmrs-SeqInitialization INTEGER (0..1) OPTIONAL, -- Need R + precodingAndNumberOfLayers INTEGER (0..63), + srs-ResourceIndicator INTEGER (0..15) OPTIONAL, -- Need R + mcsAndTBS INTEGER (0..31), + frequencyHoppingOffset INTEGER (1.. maxNrofPhysicalResourceBlocks-1) OPTIONAL, -- Need R + pathlossReferenceIndex INTEGER (0..maxNrofPUSCH-PathlossReferenceRSs-1), + ... + } OPTIONAL, -- Need R + ... +} + +CG-UCI-OnPUSCH ::= CHOICE { + dynamic SEQUENCE (SIZE (1..4)) OF BetaOffsets, + semiStatic BetaOffsets +} + +-- TAG-CONFIGUREDGRANTCONFIG-STOP +-- TAG-CONNESTFAILURECONTROL-START + +ConnEstFailureControl ::= SEQUENCE { + connEstFailCount ENUMERATED {n1, n2, n3, n4}, + connEstFailOffsetValidity ENUMERATED {s30, s60, s120, s240, s300, s420, s600, s900}, + connEstFailOffset INTEGER (0..15) OPTIONAL -- Need S +} + +-- TAG-CONNESTFAILURECONTROL-STOP +-- TAG-CONTROLRESOURCESET-START + +ControlResourceSet ::= SEQUENCE { + controlResourceSetId ControlResourceSetId, + + frequencyDomainResources BIT STRING (SIZE (45)), + duration INTEGER (1..maxCoReSetDuration), + cce-REG-MappingType CHOICE { + interleaved SEQUENCE { + reg-BundleSize ENUMERATED {n2, n3, n6}, + interleaverSize ENUMERATED {n2, n3, n6}, + shiftIndex INTEGER(0..maxNrofPhysicalResourceBlocks-1) OPTIONAL -- Need S + }, + nonInterleaved NULL + }, + precoderGranularity ENUMERATED {sameAsREG-bundle, allContiguousRBs}, + tci-StatesPDCCH-ToAddList SEQUENCE(SIZE (1..maxNrofTCI-StatesPDCCH)) OF TCI-StateId OPTIONAL, -- Need N + tci-StatesPDCCH-ToReleaseList SEQUENCE(SIZE (1..maxNrofTCI-StatesPDCCH)) OF TCI-StateId OPTIONAL, -- Need N +tci-PresentInDCI ENUMERATED {enabled} OPTIONAL, -- Need S + pdcch-DMRS-ScramblingID INTEGER (0..65535) OPTIONAL, -- Need S + ... +} + +-- TAG-CONTROLRESOURCESET-STOP +-- TAG-CONTROL-RESOURCE-SET-ID-START + +ControlResourceSetId ::= INTEGER (0..maxNrofControlResourceSets-1) + +-- TAG-CONTROL-RESOURCE-SET-ID-STOP +-- TAG-CONTROLRESOURCESETZERO-START + +ControlResourceSetZero ::= INTEGER (0..15) + +-- TAG-CONTROLRESOURCESETZERO-STOP + +CrossCarrierSchedulingConfig ::= SEQUENCE { + schedulingCellInfo CHOICE { + own SEQUENCE { -- No cross carrier scheduling + cif-Presence BOOLEAN + }, + other SEQUENCE { -- Cross carrier scheduling + schedulingCellId ServCellIndex, + cif-InSchedulingCell INTEGER (1..7) + } + }, + ... +} + +-- TAG-CSI-APERIODICTRIGGERSTATELIST-START + +CSI-AperiodicTriggerStateList ::= SEQUENCE (SIZE (1..maxNrOfCSI-AperiodicTriggers)) OF CSI-AperiodicTriggerState + +CSI-AperiodicTriggerState ::= SEQUENCE { + associatedReportConfigInfoList SEQUENCE (SIZE(1..maxNrofReportConfigPerAperiodicTrigger)) OF CSI-AssociatedReportConfigInfo, + ... +} + +CSI-AssociatedReportConfigInfo ::= SEQUENCE { + reportConfigId CSI-ReportConfigId, + resourcesForChannel CHOICE { + nzp-CSI-RS SEQUENCE { + resourceSet INTEGER (1..maxNrofNZP-CSI-RS-ResourceSetsPerConfig), + qcl-info SEQUENCE (SIZE(1..maxNrofAP-CSI-RS-ResourcesPerSet)) OF TCI-StateId OPTIONAL -- Cond Aperiodic + }, + csi-SSB-ResourceSet INTEGER (1..maxNrofCSI-SSB-ResourceSetsPerConfig) + }, + csi-IM-ResourcesForInterference INTEGER(1..maxNrofCSI-IM-ResourceSetsPerConfig) OPTIONAL, -- Cond CSI-IM-ForInterference + nzp-CSI-RS-ResourcesForInterference INTEGER (1..maxNrofNZP-CSI-RS-ResourceSetsPerConfig) OPTIONAL, -- Cond NZP-CSI-RS-ForInterference + ... +} + +-- TAG-CSI-APERIODICTRIGGERSTATELIST-STOP +-- TAG-CSI-FREQUENCYOCCUPATION-START + +CSI-FrequencyOccupation ::= SEQUENCE { + startingRB INTEGER (0..maxNrofPhysicalResourceBlocks-1), + nrofRBs INTEGER (24..maxNrofPhysicalResourceBlocksPlus1), + ... +} + +-- TAG-CSI-FREQUENCYOCCUPATION-STOP +-- TAG-CSI-IM-RESOURCE-START + +CSI-IM-Resource ::= SEQUENCE { + csi-IM-ResourceId CSI-IM-ResourceId, + csi-IM-ResourceElementPattern CHOICE { + pattern0 SEQUENCE { + subcarrierLocation-p0 ENUMERATED { s0, s2, s4, s6, s8, s10 }, + symbolLocation-p0 INTEGER (0..12) + }, + pattern1 SEQUENCE { + subcarrierLocation-p1 ENUMERATED { s0, s4, s8 }, + symbolLocation-p1 INTEGER (0..13) + } + } OPTIONAL, -- Need M + freqBand CSI-FrequencyOccupation OPTIONAL, -- Need M + periodicityAndOffset CSI-ResourcePeriodicityAndOffset OPTIONAL, -- Cond PeriodicOrSemiPersistent + ... +} + +-- TAG-CSI-IM-RESOURCE-STOP +-- TAG-CSI-IM-RESOURCEID-START + +CSI-IM-ResourceId ::= INTEGER (0..maxNrofCSI-IM-Resources-1) + +-- TAG-CSI-IM-RESOURCEID-STOP +-- TAG-CSI-IM-RESOURCESET-START + +CSI-IM-ResourceSet ::= SEQUENCE { + csi-IM-ResourceSetId CSI-IM-ResourceSetId, + csi-IM-Resources SEQUENCE (SIZE(1..maxNrofCSI-IM-ResourcesPerSet)) OF CSI-IM-ResourceId, + ... +} +-- TAG-CSI-IM-RESOURCESET-STOP +-- TAG-CSI-IM-RESOURCESETID-START + +CSI-IM-ResourceSetId ::= INTEGER (0..maxNrofCSI-IM-ResourceSets-1) + +-- TAG-CSI-IM-RESOURCESETID-STOP +-- TAG-CSI-MEAS-CONFIG-START + +CSI-MeasConfig ::= SEQUENCE { + nzp-CSI-RS-ResourceToAddModList SEQUENCE (SIZE (1..maxNrofNZP-CSI-RS-Resources)) OF NZP-CSI-RS-Resource OPTIONAL, -- Need N + nzp-CSI-RS-ResourceToReleaseList SEQUENCE (SIZE (1..maxNrofNZP-CSI-RS-Resources)) OF NZP-CSI-RS-ResourceId OPTIONAL, -- Need N + nzp-CSI-RS-ResourceSetToAddModList SEQUENCE (SIZE (1..maxNrofNZP-CSI-RS-ResourceSets)) OF NZP-CSI-RS-ResourceSet OPTIONAL, -- Need N + nzp-CSI-RS-ResourceSetToReleaseList SEQUENCE (SIZE (1..maxNrofNZP-CSI-RS-ResourceSets)) OF NZP-CSI-RS-ResourceSetId OPTIONAL, -- Need N + csi-IM-ResourceToAddModList SEQUENCE (SIZE (1..maxNrofCSI-IM-Resources)) OF CSI-IM-Resource OPTIONAL, -- Need N + csi-IM-ResourceToReleaseList SEQUENCE (SIZE (1..maxNrofCSI-IM-Resources)) OF CSI-IM-ResourceId OPTIONAL, -- Need N + csi-IM-ResourceSetToAddModList SEQUENCE (SIZE (1..maxNrofCSI-IM-ResourceSets)) OF CSI-IM-ResourceSet OPTIONAL, -- Need N + csi-IM-ResourceSetToReleaseList SEQUENCE (SIZE (1..maxNrofCSI-IM-ResourceSets)) OF CSI-IM-ResourceSetId OPTIONAL, -- Need N + csi-SSB-ResourceSetToAddModList SEQUENCE (SIZE (1..maxNrofCSI-SSB-ResourceSets)) OF CSI-SSB-ResourceSet OPTIONAL, -- Need N + csi-SSB-ResourceSetToAddReleaseList SEQUENCE (SIZE (1..maxNrofCSI-SSB-ResourceSets)) OF CSI-SSB-ResourceSetId OPTIONAL, -- Need N + csi-ResourceConfigToAddModList SEQUENCE (SIZE (1..maxNrofCSI-ResourceConfigurations)) OF CSI-ResourceConfig OPTIONAL,-- Need N + csi-ResourceConfigToReleaseList SEQUENCE (SIZE (1..maxNrofCSI-ResourceConfigurations)) OF CSI-ResourceConfigId OPTIONAL,-- Need N + csi-ReportConfigToAddModList SEQUENCE (SIZE (1..maxNrofCSI-ReportConfigurations)) OF CSI-ReportConfig OPTIONAL,-- Need N + csi-ReportConfigToReleaseList SEQUENCE (SIZE (1..maxNrofCSI-ReportConfigurations)) OF CSI-ReportConfigId OPTIONAL,-- Need N + + reportTriggerSize INTEGER (0..6) OPTIONAL, -- Need M + aperiodicTriggerStateList SetupRelease { CSI-AperiodicTriggerStateList } OPTIONAL, -- Need M + semiPersistentOnPUSCH-TriggerStateList SetupRelease { CSI-SemiPersistentOnPUSCH-TriggerStateList } OPTIONAL, -- Need M + ... +} + +-- TAG-CSI-MEAS-CONFIG-STOP +-- TAG-CSI-REPORTCONFIG-START + +CSI-ReportConfig ::= SEQUENCE { + reportConfigId CSI-ReportConfigId, + carrier ServCellIndex OPTIONAL, -- Need S + resourcesForChannelMeasurement CSI-ResourceConfigId, + csi-IM-ResourcesForInterference CSI-ResourceConfigId OPTIONAL, -- Need R + nzp-CSI-RS-ResourcesForInterference CSI-ResourceConfigId OPTIONAL, -- Need R + reportConfigType CHOICE { + periodic SEQUENCE { + reportSlotConfig CSI-ReportPeriodicityAndOffset, + pucch-CSI-ResourceList SEQUENCE (SIZE (1..maxNrofBWPs)) OF PUCCH-CSI-Resource + }, + semiPersistentOnPUCCH SEQUENCE { + reportSlotConfig CSI-ReportPeriodicityAndOffset, + pucch-CSI-ResourceList SEQUENCE (SIZE (1..maxNrofBWPs)) OF PUCCH-CSI-Resource + }, + semiPersistentOnPUSCH SEQUENCE { + reportSlotConfig ENUMERATED {sl5, sl10, sl20, sl40, sl80, sl160, sl320}, + reportSlotOffsetList SEQUENCE (SIZE (1.. maxNrofUL-Allocations)) OF INTEGER(0..32), + p0alpha P0-PUSCH-AlphaSetId + }, + aperiodic SEQUENCE { + reportSlotOffsetList SEQUENCE (SIZE (1..maxNrofUL-Allocations)) OF INTEGER(0..32) + } + }, + reportQuantity CHOICE { + none NULL, + cri-RI-PMI-CQI NULL, + cri-RI-i1 NULL, + cri-RI-i1-CQI SEQUENCE { + pdsch-BundleSizeForCSI ENUMERATED {n2, n4} OPTIONAL -- Need S + }, + cri-RI-CQI NULL, + cri-RSRP NULL, + ssb-Index-RSRP NULL, + cri-RI-LI-PMI-CQI NULL + }, + reportFreqConfiguration SEQUENCE { + cqi-FormatIndicator ENUMERATED { widebandCQI, subbandCQI } OPTIONAL, -- Need R + pmi-FormatIndicator ENUMERATED { widebandPMI, subbandPMI } OPTIONAL, -- Need R + csi-ReportingBand CHOICE { + subbands3 BIT STRING(SIZE(3)), + subbands4 BIT STRING(SIZE(4)), + subbands5 BIT STRING(SIZE(5)), + subbands6 BIT STRING(SIZE(6)), + subbands7 BIT STRING(SIZE(7)), + subbands8 BIT STRING(SIZE(8)), + subbands9 BIT STRING(SIZE(9)), + subbands10 BIT STRING(SIZE(10)), + subbands11 BIT STRING(SIZE(11)), + subbands12 BIT STRING(SIZE(12)), + subbands13 BIT STRING(SIZE(13)), + subbands14 BIT STRING(SIZE(14)), + subbands15 BIT STRING(SIZE(15)), + subbands16 BIT STRING(SIZE(16)), + subbands17 BIT STRING(SIZE(17)), + subbands18 BIT STRING(SIZE(18)), + ..., + subbands19-v1530 BIT STRING(SIZE(19)) + } OPTIONAL -- Need S + + } OPTIONAL, -- Need R + timeRestrictionForChannelMeasurements ENUMERATED {configured, notConfigured}, + timeRestrictionForInterferenceMeasurements ENUMERATED {configured, notConfigured}, + codebookConfig CodebookConfig OPTIONAL, -- Need R + nrofCQIsPerReport ENUMERATED {n1, n2} OPTIONAL, -- Need R + groupBasedBeamReporting CHOICE { + enabled NULL, + disabled SEQUENCE { + nrofReportedRS ENUMERATED {n1, n2, n3, n4} OPTIONAL -- Need S + } + }, + cqi-Table ENUMERATED {table1, table2, table3, spare1} OPTIONAL, -- Need R + subbandSize ENUMERATED {value1, value2}, + non-PMI-PortIndication SEQUENCE (SIZE (1..maxNrofNZP-CSI-RS-ResourcesPerConfig)) OF PortIndexFor8Ranks OPTIONAL, -- Need R + ..., + [[ + semiPersistentOnPUSCH-v1530 SEQUENCE { + reportSlotConfig-v1530 ENUMERATED {sl4, sl8, sl16} + } OPTIONAL -- Need R + ]] +} + +CSI-ReportPeriodicityAndOffset ::= CHOICE { + slots4 INTEGER(0..3), + slots5 INTEGER(0..4), + slots8 INTEGER(0..7), + slots10 INTEGER(0..9), + slots16 INTEGER(0..15), + slots20 INTEGER(0..19), + slots40 INTEGER(0..39), + slots80 INTEGER(0..79), + slots160 INTEGER(0..159), + slots320 INTEGER(0..319) +} + +PUCCH-CSI-Resource ::= SEQUENCE { + uplinkBandwidthPartId BWP-Id, + pucch-Resource PUCCH-ResourceId +} + +PortIndexFor8Ranks ::= CHOICE { + portIndex8 SEQUENCE{ + rank1-8 PortIndex8 OPTIONAL, -- Need R + rank2-8 SEQUENCE(SIZE(2)) OF PortIndex8 OPTIONAL, -- Need R + rank3-8 SEQUENCE(SIZE(3)) OF PortIndex8 OPTIONAL, -- Need R + rank4-8 SEQUENCE(SIZE(4)) OF PortIndex8 OPTIONAL, -- Need R + rank5-8 SEQUENCE(SIZE(5)) OF PortIndex8 OPTIONAL, -- Need R + rank6-8 SEQUENCE(SIZE(6)) OF PortIndex8 OPTIONAL, -- Need R + rank7-8 SEQUENCE(SIZE(7)) OF PortIndex8 OPTIONAL, -- Need R + rank8-8 SEQUENCE(SIZE(8)) OF PortIndex8 OPTIONAL -- Need R + }, + portIndex4 SEQUENCE{ + rank1-4 PortIndex4 OPTIONAL, -- Need R + rank2-4 SEQUENCE(SIZE(2)) OF PortIndex4 OPTIONAL, -- Need R + rank3-4 SEQUENCE(SIZE(3)) OF PortIndex4 OPTIONAL, -- Need R + rank4-4 SEQUENCE(SIZE(4)) OF PortIndex4 OPTIONAL -- Need R + }, + portIndex2 SEQUENCE{ + rank1-2 PortIndex2 OPTIONAL, -- Need R + rank2-2 SEQUENCE(SIZE(2)) OF PortIndex2 OPTIONAL -- Need R + }, + portIndex1 NULL +} + +PortIndex8::= INTEGER (0..7) +PortIndex4::= INTEGER (0..3) +PortIndex2::= INTEGER (0..1) + +-- TAG-CSI-REPORTCONFIG-STOP +-- TAG-CSI-REPORTCONFIGID-START + +CSI-ReportConfigId ::= INTEGER (0..maxNrofCSI-ReportConfigurations-1) + +-- TAG-CSI-REPORTCONFIGID-STOP +-- TAG-CSI-RESOURCECONFIG-START + +CSI-ResourceConfig ::= SEQUENCE { + csi-ResourceConfigId CSI-ResourceConfigId, + csi-RS-ResourceSetList CHOICE { + nzp-CSI-RS-SSB SEQUENCE { + nzp-CSI-RS-ResourceSetList SEQUENCE (SIZE (1..maxNrofNZP-CSI-RS-ResourceSetsPerConfig)) OF NZP-CSI-RS-ResourceSetId OPTIONAL, -- Need R + csi-SSB-ResourceSetList SEQUENCE (SIZE (1..maxNrofCSI-SSB-ResourceSetsPerConfig)) OF CSI-SSB-ResourceSetId OPTIONAL -- Need R + }, + csi-IM-ResourceSetList SEQUENCE (SIZE (1..maxNrofCSI-IM-ResourceSetsPerConfig)) OF CSI-IM-ResourceSetId + }, + + bwp-Id BWP-Id, + resourceType ENUMERATED { aperiodic, semiPersistent, periodic }, + ... +} + +-- TAG-CSI-RESOURCECONFIGTOADDMOD-STOP +-- TAG-CSI-RESOURCECONFIGID-START + +CSI-ResourceConfigId ::= INTEGER (0..maxNrofCSI-ResourceConfigurations-1) + +-- TAG-CSI-RESOURCECONFIGID-STOP +-- TAG-CSI-RESOURCEPERIODICITYANDOFFSET-START + +CSI-ResourcePeriodicityAndOffset ::= CHOICE { + slots4 INTEGER (0..3), + slots5 INTEGER (0..4), + slots8 INTEGER (0..7), + slots10 INTEGER (0..9), + slots16 INTEGER (0..15), + slots20 INTEGER (0..19), + slots32 INTEGER (0..31), + slots40 INTEGER (0..39), + slots64 INTEGER (0..63), + slots80 INTEGER (0..79), + slots160 INTEGER (0..159), + slots320 INTEGER (0..319), + slots640 INTEGER (0..639) +} + +-- TAG-CSI-RESIYRCEPERIODICITYANDOFFSET-STOP +-- TAG-CSI-RS-RESOURCECONFIGMOBILITY-START + +CSI-RS-ResourceConfigMobility ::= SEQUENCE { + subcarrierSpacing SubcarrierSpacing, + csi-RS-CellList-Mobility SEQUENCE (SIZE (1..maxNrofCSI-RS-CellsRRM)) OF CSI-RS-CellMobility, + ... , + [[ + refServCellIndex-v1530 ServCellIndex OPTIONAL -- Need S + ]] + + +} + +CSI-RS-CellMobility ::= SEQUENCE { + cellId PhysCellId, + csi-rs-MeasurementBW SEQUENCE { + nrofPRBs ENUMERATED { size24, size48, size96, size192, size264}, + startPRB INTEGER(0..2169) + }, + density ENUMERATED {d1,d3} OPTIONAL, -- Need R + csi-rs-ResourceList-Mobility SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesRRM)) OF CSI-RS-Resource-Mobility +} + +CSI-RS-Resource-Mobility ::= SEQUENCE { + csi-RS-Index CSI-RS-Index, + slotConfig CHOICE { + ms4 INTEGER (0..31), + ms5 INTEGER (0..39), + ms10 INTEGER (0..79), + ms20 INTEGER (0..159), + ms40 INTEGER (0..319) + }, + associatedSSB SEQUENCE { + ssb-Index SSB-Index, + isQuasiColocated BOOLEAN + } OPTIONAL, -- Need R + frequencyDomainAllocation CHOICE { + row1 BIT STRING (SIZE (4)), + row2 BIT STRING (SIZE (12)) + }, + firstOFDMSymbolInTimeDomain INTEGER (0..13), + sequenceGenerationConfig INTEGER (0..1023), + ... +} + +CSI-RS-Index ::= INTEGER (0..maxNrofCSI-RS-ResourcesRRM-1) + +-- TAG-CSI-RS-RESOURCECONFIGMOBILITY-STOP +-- TAG-CSI-RS-RESOURCEMAPPING-START + +CSI-RS-ResourceMapping ::= SEQUENCE { + frequencyDomainAllocation CHOICE { + row1 BIT STRING (SIZE (4)), + row2 BIT STRING (SIZE (12)), + row4 BIT STRING (SIZE (3)), + other BIT STRING (SIZE (6)) + }, + nrofPorts ENUMERATED {p1,p2,p4,p8,p12,p16,p24,p32}, + firstOFDMSymbolInTimeDomain INTEGER (0..13), + firstOFDMSymbolInTimeDomain2 INTEGER (2..12) OPTIONAL, -- Need R + cdm-Type ENUMERATED {noCDM, fd-CDM2, cdm4-FD2-TD2, cdm8-FD2-TD4}, + density CHOICE { + dot5 ENUMERATED {evenPRBs, oddPRBs}, + one NULL, + three NULL, + spare NULL + }, + freqBand CSI-FrequencyOccupation, + ... +} + +-- TAG-CSI-RS-RESOURCEMAPPING-STOP +-- TAG-CSI-SEMIPERSISTENTONPUSCHTRIGGERSTATELIST-START + +CSI-SemiPersistentOnPUSCH-TriggerStateList ::= SEQUENCE(SIZE (1..maxNrOfSemiPersistentPUSCH-Triggers)) OF CSI-SemiPersistentOnPUSCH-TriggerState + +CSI-SemiPersistentOnPUSCH-TriggerState ::= SEQUENCE { + associatedReportConfigInfo CSI-ReportConfigId, + ... +} + + +-- TAG-CSI-SEMIPERSISTENTONPUSCHTRIGGERSTATELIST-STOP +-- TAG-CSI-SSB-RESOURCESET-START + +CSI-SSB-ResourceSet ::= SEQUENCE { + csi-SSB-ResourceSetId CSI-SSB-ResourceSetId, + csi-SSB-ResourceList SEQUENCE (SIZE(1..maxNrofCSI-SSB-ResourcePerSet)) OF SSB-Index, + ... +} + +-- TAG-CSI-SSB-RESOURCESET-STOP +-- TAG-CSI-SSB-RESOURCESETID-START + +CSI-SSB-ResourceSetId ::= INTEGER (0..maxNrofCSI-SSB-ResourceSets-1) + +-- TAG-CSI-SSB-RESOURCESETID-STOP +-- TAG-DEDICATED-NAS-MESSAGE-START + +DedicatedNAS-Message ::= OCTET STRING + +-- TAG-DEDICATED-NAS-MESSAGE-STOP +-- TAG-DMRS-DOWNLINKCONFIG-START + +DMRS-DownlinkConfig ::= SEQUENCE { + dmrs-Type ENUMERATED {type2} OPTIONAL, -- Need S + dmrs-AdditionalPosition ENUMERATED {pos0, pos1, pos3} OPTIONAL, -- Need S + maxLength ENUMERATED {len2} OPTIONAL, -- Need S + scramblingID0 INTEGER (0..65535) OPTIONAL, -- Need S + scramblingID1 INTEGER (0..65535) OPTIONAL, -- Need S + phaseTrackingRS SetupRelease { PTRS-DownlinkConfig } OPTIONAL, -- Need M + ... +} + +-- TAG-DMRS-DOWNLINKCONFIG-STOP +-- TAG-DMRS-UPLINKCONFIG-START + +DMRS-UplinkConfig ::= SEQUENCE { + dmrs-Type ENUMERATED {type2} OPTIONAL, -- Need S + dmrs-AdditionalPosition ENUMERATED {pos0, pos1, pos3} OPTIONAL, -- Need R + phaseTrackingRS SetupRelease { PTRS-UplinkConfig } OPTIONAL, -- Need M + maxLength ENUMERATED {len2} OPTIONAL, -- Need S + + transformPrecodingDisabled SEQUENCE { + scramblingID0 INTEGER (0..65535) OPTIONAL, -- Need S + scramblingID1 INTEGER (0..65535) OPTIONAL, -- Need S + ... + } OPTIONAL, -- Need R + transformPrecodingEnabled SEQUENCE { + nPUSCH-Identity INTEGER(0..1007) OPTIONAL, -- Need S + sequenceGroupHopping ENUMERATED {disabled} OPTIONAL, -- Need S + sequenceHopping ENUMERATED {enabled} OPTIONAL, -- Need S + ... + } OPTIONAL, -- Need R + ... +} + +-- TAG-DMRS-UPLINKCONFIG-STOP +-- TAG-DOWNLINK-CONFIG-COMMON-START + +DownlinkConfigCommon ::= SEQUENCE { + frequencyInfoDL FrequencyInfoDL OPTIONAL, -- Cond InterFreqHOAndServCellAdd + initialDownlinkBWP BWP-DownlinkCommon OPTIONAL, -- Cond ServCellAdd + ... +} + +-- TAG-DOWNLINK-CONFIG-COMMON-STOP +-- TAG-DOWNLINK-CONFIG-COMMON-SIB-START + +DownlinkConfigCommonSIB ::= SEQUENCE { + frequencyInfoDL FrequencyInfoDL-SIB, + initialDownlinkBWP BWP-DownlinkCommon, + bcch-Config BCCH-Config, + pcch-Config PCCH-Config, + ... +} + + +BCCH-Config ::= SEQUENCE { modificationPeriodCoeff ENUMERATED {n2, n4, n8, n16}, + ... +} + + +PCCH-Config ::= SEQUENCE { + defaultPagingCycle PagingCycle, + nAndPagingFrameOffset CHOICE { + oneT NULL, + halfT INTEGER (0..1), + quarterT INTEGER (0..3), + oneEighthT INTEGER (0..7), + oneSixteenthT INTEGER (0..15) + }, + ns ENUMERATED {four, two, one}, + firstPDCCH-MonitoringOccasionOfPO CHOICE { + sCS15KHZoneT SEQUENCE (SIZE (1..4)) OF INTEGER (0..139), + sCS30KHZoneT-SCS15KHZhalfT SEQUENCE (SIZE (1..4)) OF INTEGER (0..279), + sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT SEQUENCE (SIZE (1..4)) OF INTEGER (0..559), + sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT SEQUENCE (SIZE (1..4)) OF INTEGER (0..1119), + sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT SEQUENCE (SIZE (1..4)) OF INTEGER (0..2239), + sCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT SEQUENCE (SIZE (1..4)) OF INTEGER (0..4479), + sCS120KHZoneEighthT-SCS60KHZoneSixteenthT SEQUENCE (SIZE (1..4)) OF INTEGER (0..8959), + sCS120KHZoneSixteenthT SEQUENCE (SIZE (1..4)) OF INTEGER (0..17919) + } OPTIONAL, -- Need R + ... +} + +-- TAG-DOWNLINK-CONFIG-COMMON-SIB-STOP +-- TAG-DOWNLINKPREEMPTION-START + +DownlinkPreemption ::= SEQUENCE { + int-RNTI RNTI-Value, + timeFrequencySet ENUMERATED {set0, set1}, + dci-PayloadSize INTEGER (0..maxINT-DCI-PayloadSize), + int-ConfigurationPerServingCell SEQUENCE (SIZE (1..maxNrofServingCells)) OF INT-ConfigurationPerServingCell, + ... +} + +INT-ConfigurationPerServingCell ::= SEQUENCE { + servingCellId ServCellIndex, + positionInDCI INTEGER (0..maxINT-DCI-PayloadSize-1) +} + +-- TAG-DOWNLINKPREEMPTION-STOP +-- TAG-DRB-IDENTITY-START + +DRB-Identity ::= INTEGER (1..32) + +-- TAG-DRB-IDENTITY-STOP +-- TAG-DRX-CONFIG-START + +DRX-Config ::= SEQUENCE { + drx-onDurationTimer CHOICE { + subMilliSeconds INTEGER (1..31), + milliSeconds ENUMERATED { + ms1, ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30, ms40, ms50, ms60, + ms80, ms100, ms200, ms300, ms400, ms500, ms600, ms800, ms1000, ms1200, + ms1600, spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1 } + }, + drx-InactivityTimer ENUMERATED { + ms0, ms1, ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30, ms40, ms50, ms60, ms80, + ms100, ms200, ms300, ms500, ms750, ms1280, ms1920, ms2560, spare9, spare8, + spare7, spare6, spare5, spare4, spare3, spare2, spare1}, + drx-HARQ-RTT-TimerDL INTEGER (0..56), + drx-HARQ-RTT-TimerUL INTEGER (0..56), + drx-RetransmissionTimerDL ENUMERATED { + sl0, sl1, sl2, sl4, sl6, sl8, sl16, sl24, sl33, sl40, sl64, sl80, sl96, sl112, sl128, + sl160, sl320, spare15, spare14, spare13, spare12, spare11, spare10, spare9, + spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1}, + drx-RetransmissionTimerUL ENUMERATED { + sl0, sl1, sl2, sl4, sl6, sl8, sl16, sl24, sl33, sl40, sl64, sl80, sl96, sl112, sl128, + sl160, sl320, spare15, spare14, spare13, spare12, spare11, spare10, spare9, + spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1 }, + drx-LongCycleStartOffset CHOICE { + ms10 INTEGER(0..9), + ms20 INTEGER(0..19), + ms32 INTEGER(0..31), + ms40 INTEGER(0..39), + ms60 INTEGER(0..59), + ms64 INTEGER(0..63), + ms70 INTEGER(0..69), + ms80 INTEGER(0..79), + ms128 INTEGER(0..127), + ms160 INTEGER(0..159), + ms256 INTEGER(0..255), + ms320 INTEGER(0..319), + ms512 INTEGER(0..511), + ms640 INTEGER(0..639), + ms1024 INTEGER(0..1023), + ms1280 INTEGER(0..1279), + ms2048 INTEGER(0..2047), + ms2560 INTEGER(0..2559), + ms5120 INTEGER(0..5119), + ms10240 INTEGER(0..10239) + }, + + shortDRX SEQUENCE { + drx-ShortCycle ENUMERATED { + ms2, ms3, ms4, ms5, ms6, ms7, ms8, ms10, ms14, ms16, ms20, ms30, ms32, + ms35, ms40, ms64, ms80, ms128, ms160, ms256, ms320, ms512, ms640, spare9, + spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1 }, + drx-ShortCycleTimer INTEGER (1..16) + } OPTIONAL, -- Need R + drx-SlotOffset INTEGER (0..31) +} + +-- TAG-DRX-CONFIG-STOP +-- TAG-FILTERCOEFFICIENT-START + +FilterCoefficient ::= ENUMERATED { fc0, fc1, fc2, fc3, fc4, fc5, fc6, fc7, fc8, fc9, fc11, fc13, fc15, fc17, fc19, spare1, ...} + +-- TAG-FILTERCOEFFICIENT-STOP +-- TAG-FREQBANDINDICATORNR-START + +FreqBandIndicatorNR ::= INTEGER (1..1024) + +-- TAG-FREQBANDINDICATORNR-STOP +-- TAG-FREQUENCY-INFO-DL-START + +FrequencyInfoDL ::= SEQUENCE { + absoluteFrequencySSB ARFCN-ValueNR OPTIONAL, -- Cond SpCellAdd + frequencyBandList MultiFrequencyBandListNR, + absoluteFrequencyPointA ARFCN-ValueNR, + scs-SpecificCarrierList SEQUENCE (SIZE (1..maxSCSs)) OF SCS-SpecificCarrier, + ... +} + +-- TAG-FREQUENCY-INFO-UL-STOP +-- TAG-FREQUENCY-INFO-DL-SIB-START + +FrequencyInfoDL-SIB ::= SEQUENCE { + frequencyBandList MultiFrequencyBandListNR-SIB, + offsetToPointA INTEGER (0..2199), + scs-SpecificCarrierList SEQUENCE (SIZE (1..maxSCSs)) OF SCS-SpecificCarrier +} + +-- TAG-FREQUENCY-INFO-DL-SIB-STOP +-- TAG-FREQUENCY-INFO-UL-START + +FrequencyInfoUL ::= SEQUENCE { + frequencyBandList MultiFrequencyBandListNR OPTIONAL, -- Cond FDD-OrSUL + absoluteFrequencyPointA ARFCN-ValueNR OPTIONAL, -- Cond FDD-OrSUL + scs-SpecificCarrierList SEQUENCE (SIZE (1..maxSCSs)) OF SCS-SpecificCarrier, + additionalSpectrumEmission AdditionalSpectrumEmission OPTIONAL, -- Need S + p-Max P-Max OPTIONAL, -- Need S + frequencyShift7p5khz ENUMERATED {true} OPTIONAL, -- Cond FDD-OrSUL-Optional + ... +} + +-- TAG-FREQUENCY-INFO-UL-STOP +-- TAG-FREQUENCY-INFO-UL-SIB-START + +FrequencyInfoUL-SIB ::= SEQUENCE { + frequencyBandList MultiFrequencyBandListNR-SIB OPTIONAL, -- Cond FDD-OrSUL + absoluteFrequencyPointA ARFCN-ValueNR OPTIONAL, -- Cond FDD-OrSUL + scs-SpecificCarrierList SEQUENCE (SIZE (1..maxSCSs)) OF SCS-SpecificCarrier, + p-Max P-Max OPTIONAL, -- Need S + frequencyShift7p5khz ENUMERATED {true} OPTIONAL, -- Cond FDD-OrSUL-Optional + ... +} + +-- TAG-FREQUENCY-INFO-UL-SIB-STOP + +Hysteresis ::= INTEGER (0..30) + +-- TAG-I-RNTI-VALUE-START + +I-RNTI-Value ::= BIT STRING (SIZE(40)) + +-- TAG-I-RNTI-VALUE-STOP +-- TAG-LOCATION-MEASUREMENT-INFO-START + +LocationMeasurementInfo ::= CHOICE { + eutra-RSTD EUTRA-RSTD-InfoList, + ... +} + +EUTRA-RSTD-InfoList ::= SEQUENCE (SIZE (1..maxInterRAT-RSTD-Freq)) OF EUTRA-RSTD-Info + +EUTRA-RSTD-Info ::= SEQUENCE { + carrierFreq ARFCN-ValueEUTRA, + measPRS-Offset INTEGER (0..39), + ... +} + +-- TAG-LOCATION-MEASUREMENT-INFO-STOP +-- TAG-LOGICAL-CHANNEL-CONFIG-START + +LogicalChannelConfig ::= SEQUENCE { + ul-SpecificParameters SEQUENCE { + priority INTEGER (1..16), + prioritisedBitRate ENUMERATED {kBps0, kBps8, kBps16, kBps32, kBps64, kBps128, kBps256, kBps512, + kBps1024, kBps2048, kBps4096, kBps8192, kBps16384, kBps32768, kBps65536, infinity}, + bucketSizeDuration ENUMERATED {ms5, ms10, ms20, ms50, ms100, ms150, ms300, ms500, ms1000, + spare7, spare6, spare5, spare4, spare3,spare2, spare1}, + + allowedServingCells SEQUENCE (SIZE (1..maxNrofServingCells-1)) OF ServCellIndex OPTIONAL, -- PDCP-CADuplication + allowedSCS-List SEQUENCE (SIZE (1..maxSCSs)) OF SubcarrierSpacing OPTIONAL, -- Need R + maxPUSCH-Duration ENUMERATED { ms0p02, ms0p04, ms0p0625, ms0p125, ms0p25, ms0p5, spare2, spare1 } + OPTIONAL, -- Need R + configuredGrantType1Allowed ENUMERATED {true} OPTIONAL, -- Need R + + logicalChannelGroup INTEGER (0..maxLCG-ID) OPTIONAL, -- Need R + schedulingRequestID SchedulingRequestId OPTIONAL, -- Need R + logicalChannelSR-Mask BOOLEAN, + logicalChannelSR-DelayTimerApplied BOOLEAN, + ..., + bitRateQueryProhibitTimer ENUMERATED { s0, s0dot4, s0dot8, s1dot6, s3, s6, s12,s30} OPTIONAL -- Need R + } OPTIONAL, -- Cond UL + + ... +} + +-- TAG-LOGICAL-CHANNEL-CONFIG-STOP +-- TAG-LOGICALCHANNELIDENTITY-START + +LogicalChannelIdentity ::= INTEGER (1..maxLC-ID) + +-- TAG-LOGICALCHANNELIDENTITY-STOP +-- TAG-MAC-CELL-GROUP-CONFIG-START + +MAC-CellGroupConfig ::= SEQUENCE { + drx-Config SetupRelease { DRX-Config } OPTIONAL, -- Need M + schedulingRequestConfig SchedulingRequestConfig OPTIONAL, -- Need M + bsr-Config BSR-Config OPTIONAL, -- Need M + tag-Config TAG-Config OPTIONAL, -- Need M + phr-Config SetupRelease { PHR-Config } OPTIONAL, -- Need M + skipUplinkTxDynamic BOOLEAN, + ..., + [[ + csi-Mask-v1530 BOOLEAN OPTIONAL , -- Need M + dataInactivityTimer-v1530 SetupRelease { DataInactivityTimer } OPTIONAL -- Need PCellOnly + ]] +} + +DataInactivityTimer ::= ENUMERATED {s1, s2, s3, s5, s7, s10, s15, s20, s40, s50, s60, s80, s100, s120, s150, s180} + +-- TAG-MAC-CELL-GROUP-CONFIG-STOP +-- TAG-MEAS-CONFIG-START + +MeasConfig ::= SEQUENCE { + measObjectToRemoveList MeasObjectToRemoveList OPTIONAL, -- Need N + measObjectToAddModList MeasObjectToAddModList OPTIONAL, -- Need N + + reportConfigToRemoveList ReportConfigToRemoveList OPTIONAL, -- Need N + reportConfigToAddModList ReportConfigToAddModList OPTIONAL, -- Need N + + measIdToRemoveList MeasIdToRemoveList OPTIONAL, -- Need N + measIdToAddModList MeasIdToAddModList OPTIONAL, -- Need N + + s-MeasureConfig CHOICE { + ssb-RSRP RSRP-Range, + csi-RSRP RSRP-Range + } OPTIONAL, -- Need M + + quantityConfig QuantityConfig OPTIONAL, -- Need M + + measGapConfig MeasGapConfig OPTIONAL, -- Need M + measGapSharingConfig MeasGapSharingConfig OPTIONAL, -- Need M + ... +} + +MeasObjectToRemoveList ::= SEQUENCE (SIZE (1..maxNrofObjectId)) OF MeasObjectId + +MeasIdToRemoveList ::= SEQUENCE (SIZE (1..maxNrofMeasId)) OF MeasId + +ReportConfigToRemoveList ::= SEQUENCE (SIZE (1..maxReportConfigId)) OF ReportConfigId + +-- TAG-MEAS-CONFIG-STOP +--TAG-MEAS-GAP-CONFIG-START + +MeasGapConfig ::= SEQUENCE { + gapFR2 SetupRelease { GapConfig } OPTIONAL, -- Need M + ..., + [[ + gapFR1 SetupRelease { GapConfig } OPTIONAL, -- Need M + gapUE SetupRelease { GapConfig } OPTIONAL -- Need M + ]] + +} + +GapConfig ::= SEQUENCE { + gapOffset INTEGER (0..159), + mgl ENUMERATED {ms1dot5, ms3, ms3dot5, ms4, ms5dot5, ms6}, + mgrp ENUMERATED {ms20, ms40, ms80, ms160}, + mgta ENUMERATED {ms0, ms0dot25, ms0dot5}, + ... +} + +-- TAG-MEAS-GAP-CONFIG-STOP +--TAG-MEAS-GAP-SHARING-CONFIG-START + +MeasGapSharingConfig ::= SEQUENCE { + gapSharingFR2 SetupRelease { MeasGapSharingScheme } OPTIONAL, -- Need M + ..., + [[ + gapSharingFR1 SetupRelease { MeasGapSharingScheme } OPTIONAL, --Need M + gapSharingUE SetupRelease { MeasGapSharingScheme } OPTIONAL --Need M + ]] + +} + +MeasGapSharingScheme::= ENUMERATED {scheme00, scheme01, scheme10, scheme11} + +--TAG-MEAS-GAP-SHARING-CONFIG-STOP +-- TAG-MEAS-ID-START + +MeasId ::= INTEGER (1..maxNrofMeasId) + +-- TAG-MEAS-ID-STOP +-- TAG-MEAS-ID-TO-ADD-MOD-LIST-START + +MeasIdToAddModList ::= SEQUENCE (SIZE (1..maxNrofMeasId)) OF MeasIdToAddMod + +MeasIdToAddMod ::= SEQUENCE { + measId MeasId, + measObjectId MeasObjectId, + reportConfigId ReportConfigId +} + +-- TAG-MEAS-ID-TO-ADD-MOD-LIST-STOP +-- TAG-MEAS-OBJECT-EUTRA-NR-START + +MeasObjectEUTRA::= SEQUENCE { + carrierFreq ARFCN-ValueEUTRA, + allowedMeasBandwidth EUTRA-AllowedMeasBandwidth, + cellsToRemoveListEUTRAN EUTRA-CellIndexList OPTIONAL, -- Need N + cellsToAddModListEUTRAN SEQUENCE (SIZE (1..maxCellMeasEUTRA)) OF EUTRA-Cell OPTIONAL, -- Need N + blackCellsToRemoveListEUTRAN EUTRA-CellIndexList OPTIONAL, -- Need N + blackCellsToAddModListEUTRAN SEQUENCE (SIZE (1..maxCellMeasEUTRA)) OF EUTRA-BlackCell OPTIONAL, -- Need N + eutra-PresenceAntennaPort1 EUTRA-PresenceAntennaPort1 , + eutra-Q-OffsetRange EUTRA-Q-OffsetRange OPTIONAL, -- Need R + widebandRSRQ-Meas BOOLEAN, + ... +} + +EUTRA-CellIndexList ::= SEQUENCE (SIZE (1..maxCellMeasEUTRA)) OF EUTRA-CellIndex + +EUTRA-CellIndex ::= INTEGER (1..maxCellMeasEUTRA) + + +EUTRA-Cell ::= SEQUENCE { + cellIndexEUTRA EUTRA-CellIndex, + physCellId EUTRA-PhysCellId, + cellIndividualOffset EUTRA-Q-OffsetRange +} + + +EUTRA-BlackCell ::= SEQUENCE { + cellIndexEUTRA EUTRA-CellIndex, + physCellIdRange EUTRA-PhysCellIdRange +} + +-- TAG-MEAS-OBJECT-EUTRA-NR-STOP +-- TAG-MEAS-OBJECT-ID-START + +MeasObjectId ::= INTEGER (1..maxNrofObjectId) + +-- TAG-MEAS-OBJECT-ID-STOP +-- TAG-MEAS-OBJECT-NR-START + +MeasObjectNR ::= SEQUENCE { + ssbFrequency ARFCN-ValueNR OPTIONAL, -- Cond SSBorAssociatedSSB + ssbSubcarrierSpacing SubcarrierSpacing OPTIONAL, -- Cond SSBorAssociatedSSB + smtc1 SSB-MTC OPTIONAL, -- Cond SSBorAssociatedSSB + smtc2 SSB-MTC2 OPTIONAL, -- Cond IntraFreqConnected + + refFreqCSI-RS ARFCN-ValueNR OPTIONAL, + referenceSignalConfig ReferenceSignalConfig, + absThreshSS-BlocksConsolidation ThresholdNR OPTIONAL, -- Need R + absThreshCSI-RS-Consolidation ThresholdNR OPTIONAL, -- Need R + nrofSS-BlocksToAverage INTEGER (2..maxNrofSS-BlocksToAverage) OPTIONAL, -- Need R + nrofCSI-RS-ResourcesToAverage INTEGER (2..maxNrofCSI-RS-ResourcesToAverage) OPTIONAL, -- Need R + quantityConfigIndex INTEGER (1..maxNrofQuantityConfig), + + offsetMO Q-OffsetRangeList, + + cellsToRemoveList PCI-List OPTIONAL, -- Need N + cellsToAddModList CellsToAddModList OPTIONAL, -- Need N + + blackCellsToRemoveList PCI-RangeIndexList OPTIONAL, -- Need N + blackCellsToAddModList SEQUENCE (SIZE (1..maxNrofPCI-Ranges)) OF PCI-RangeElement OPTIONAL, -- Need N + + whiteCellsToRemoveList PCI-RangeIndexList OPTIONAL, -- Need N + whiteCellsToAddModList SEQUENCE (SIZE (1..maxNrofPCI-Ranges)) OF PCI-RangeElement OPTIONAL, -- Need N + ... , + [[ + freqBandIndicatorNR-v1530 FreqBandIndicatorNR OPTIONAL, -- Need R + measCycleSCell-v1530 ENUMERATED {sf160, sf256, sf320, sf512,sf640, sf1024, sf1280} OPTIONAL -- Need R + ]] +} + +ReferenceSignalConfig::= SEQUENCE { + ssb-ConfigMobility SSB-ConfigMobility OPTIONAL, -- Need M + csi-rs-ResourceConfigMobility SetupRelease { CSI-RS-ResourceConfigMobility } OPTIONAL -- Need M +} + +SSB-ConfigMobility::= SEQUENCE { + + ssb-ToMeasure SetupRelease { SSB-ToMeasure } OPTIONAL, -- Need M + deriveSSB-IndexFromCell BOOLEAN, + ss-RSSI-Measurement SS-RSSI-Measurement OPTIONAL, -- Need M + ... +} + + +Q-OffsetRangeList ::= SEQUENCE { + rsrpOffsetSSB Q-OffsetRange DEFAULT dB0, + rsrqOffsetSSB Q-OffsetRange DEFAULT dB0, + sinrOffsetSSB Q-OffsetRange DEFAULT dB0, + rsrpOffsetCSI-RS Q-OffsetRange DEFAULT dB0, + rsrqOffsetCSI-RS Q-OffsetRange DEFAULT dB0, + sinrOffsetCSI-RS Q-OffsetRange DEFAULT dB0 +} + + +ThresholdNR ::= SEQUENCE{ + thresholdRSRP RSRP-Range OPTIONAL, -- Need R + thresholdRSRQ RSRQ-Range OPTIONAL, -- Need R + thresholdSINR SINR-Range OPTIONAL -- Need R +} + +CellsToAddModList ::= SEQUENCE (SIZE (1..maxNrofCellMeas)) OF CellsToAddMod + +CellsToAddMod ::= SEQUENCE { + physCellId PhysCellId, + cellIndividualOffset Q-OffsetRangeList +} + + + + +-- TAG-MEAS-OBJECT-NR-STOP +-- TAG-MEAS-OBJECT-TO-ADD-MOD-LIST-START + +MeasObjectToAddModList ::= SEQUENCE (SIZE (1..maxNrofObjectId)) OF MeasObjectToAddMod + +MeasObjectToAddMod ::= SEQUENCE { + measObjectId MeasObjectId, + measObject CHOICE { + measObjectNR MeasObjectNR, + ... , + measObjectEUTRA MeasObjectEUTRA + } +} + +-- TAG-MEAS-OBJECT-TO-ADD-MOD-LIST-STOP +-- TAG-MEASRESULT-CELL-LIST-SFTD-START + +MeasResultCellListSFTD ::= SEQUENCE (SIZE (1..maxCellSFTD)) OF MeasResultCellSFTD + +MeasResultCellSFTD ::= SEQUENCE { + physCellId PhysCellId, + sfn-OffsetResult INTEGER (0..1023), + frameBoundaryOffsetResult INTEGER (-30720..30719), + rsrp-Result RSRP-Range OPTIONAL +} + +-- TAG-MEASRESULT-CELL-LIST-SFTD-STOP +-- TAG-MEAS-RESULTS-START + +MeasResults ::= SEQUENCE { + measId MeasId, + measResultServingMOList MeasResultServMOList, + measResultNeighCells CHOICE { + measResultListNR MeasResultListNR, + ..., + measResultListEUTRA MeasResultListEUTRA + } OPTIONAL, + ... +} + +MeasResultServMOList ::= SEQUENCE (SIZE (1..maxNrofServingCells)) OF MeasResultServMO + +MeasResultServMO ::= SEQUENCE { + servCellId ServCellIndex, + measResultServingCell MeasResultNR, + measResultBestNeighCell MeasResultNR OPTIONAL, + ... +} + +MeasResultListNR ::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultNR + +MeasResultNR ::= SEQUENCE { + physCellId PhysCellId OPTIONAL, + measResult SEQUENCE { + cellResults SEQUENCE{ + resultsSSB-Cell MeasQuantityResults OPTIONAL, + resultsCSI-RS-Cell MeasQuantityResults OPTIONAL + }, + rsIndexResults SEQUENCE{ + resultsSSB-Indexes ResultsPerSSB-IndexList OPTIONAL, + resultsCSI-RS-Indexes ResultsPerCSI-RS-IndexList OPTIONAL + } OPTIONAL + }, + ..., + [[ + cgi-Info CGI-Info OPTIONAL + ]] +} + +MeasResultListEUTRA ::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultEUTRA + +MeasResultEUTRA ::= SEQUENCE { + physCellId PhysCellId, + measResult MeasQuantityResultsEUTRA, + + cgi-Info SEQUENCE { + cgi-info-EPC SEQUENCE { + cgi-info-EPC-legacy CellAccessRelatedInfo-EUTRA-EPC, + cgi-info-EPC-list SEQUENCE (SIZE (1..maxPLMN)) OF CellAccessRelatedInfo-EUTRA-EPC OPTIONAL + } OPTIONAL, + + cgi-info-5GC SEQUENCE (SIZE (1..maxPLMN)) OF CellAccessRelatedInfo-EUTRA-5GC OPTIONAL, + freqBandIndicator FreqBandIndicatorEUTRA, + multiBandInfoList MultiBandInfoListEUTRA OPTIONAL, + freqBandIndicatorPriority ENUMERATED {true} OPTIONAL + } OPTIONAL, + ... +} + +MultiBandInfoListEUTRA ::= SEQUENCE (SIZE (1..maxMultiBands)) OF FreqBandIndicatorEUTRA + +MeasQuantityResults ::= SEQUENCE { + rsrp RSRP-Range OPTIONAL, + rsrq RSRQ-Range OPTIONAL, + sinr SINR-Range OPTIONAL +} + + +MeasQuantityResultsEUTRA ::= SEQUENCE { + rsrp RSRP-RangeEUTRA OPTIONAL, + rsrq RSRQ-RangeEUTRA OPTIONAL, + sinr SINR-RangeEUTRA OPTIONAL +} + + +ResultsPerSSB-IndexList::= SEQUENCE (SIZE (1..maxNrofIndexesToReport2)) OF ResultsPerSSB-Index + +ResultsPerSSB-Index ::= SEQUENCE { + ssb-Index SSB-Index, + ssb-Results MeasQuantityResults OPTIONAL +} + +ResultsPerCSI-RS-IndexList::= SEQUENCE (SIZE (1..maxNrofIndexesToReport2)) OF ResultsPerCSI-RS-Index + +ResultsPerCSI-RS-Index ::= SEQUENCE { + csi-RS-Index CSI-RS-Index, + csi-RS-Results MeasQuantityResults OPTIONAL +} + +-- TAG-MEAS-RESULTS-STOP +-- TAG-MEAS-RESULT-SCG-FAILURE-START + +MeasResultSCG-Failure ::= SEQUENCE { + measResultPerMOList MeasResultList2NR, + ... +} + +MeasResultList2NR ::= SEQUENCE (SIZE (1..maxFreq)) OF MeasResult2NR + +MeasResult2NR ::= SEQUENCE { + ssbFrequency ARFCN-ValueNR OPTIONAL, + refFreqCSI-RS ARFCN-ValueNR OPTIONAL, + measResultServingCell MeasResultNR OPTIONAL, + measResultNeighCellListNR MeasResultListNR OPTIONAL, + ... +} + +-- TAG-MEAS-RESULT-SCG-FAILURE-STOP +-- TAG-MOBILITY-STATE-PARAMETERS-START + +MobilityStateParameters ::= SEQUENCE{ + t-Evaluation ENUMERATED { + s30, s60, s120, s180, s240, spare3, spare2, spare1}, + t-HystNormal ENUMERATED { + s30, s60, s120, s180, s240, spare3, spare2, spare1}, + n-CellChangeMedium INTEGER (1..16), + n-CellChangeHigh INTEGER (1..16) +} + +-- TAG-MOBILITY-STATE-PARAMETERS-STOP +-- TAG-MULTIFREQUENCYBANDLISTNR-START + +MultiFrequencyBandListNR ::= SEQUENCE (SIZE (1..maxNrofMultiBands)) OF FreqBandIndicatorNR + +-- TAG-MULTIFREQUENCYBANDLISTNR-STOP +-- TAG-NEXTHOPCHAININGCOUNT-START + +NextHopChainingCount ::= INTEGER (0..7) + +-- TAG-NEXTHOPCHAININGCOUNT-STOP +-- TAG-NG-5G-S-TMSI-START + +NG-5G-S-TMSI::= BIT STRING (SIZE (48)) + +-- TAG-NG-5G-S-TMSI-STOP +-- TAG-NZP-CSI-RS-RESOURCE-START + +NZP-CSI-RS-Resource ::= SEQUENCE { + nzp-CSI-RS-ResourceId NZP-CSI-RS-ResourceId, + resourceMapping CSI-RS-ResourceMapping, + powerControlOffset INTEGER (-8..15), + powerControlOffsetSS ENUMERATED{db-3, db0, db3, db6} OPTIONAL, -- Need R + scramblingID ScramblingId, + periodicityAndOffset CSI-ResourcePeriodicityAndOffset OPTIONAL, -- Cond PeriodicOrSemiPersistent + qcl-InfoPeriodicCSI-RS TCI-StateId OPTIONAL, -- Cond Periodic + ... +} + +-- TAG-NZP-CSI-RS-RESOURCE-STOP +-- TAG-NZP-CSI-RS-RESOURCEID-START + +NZP-CSI-RS-ResourceId ::= INTEGER (0..maxNrofNZP-CSI-RS-Resources-1) + +-- TAG-NZP-CSI-RS-RESOURCEID-STOP +-- TAG-NZP-CSI-RS-RESOURCESET-START +NZP-CSI-RS-ResourceSet ::= SEQUENCE { + nzp-CSI-ResourceSetId NZP-CSI-RS-ResourceSetId, + nzp-CSI-RS-Resources SEQUENCE (SIZE (1..maxNrofNZP-CSI-RS-ResourcesPerSet)) OF NZP-CSI-RS-ResourceId, + repetition ENUMERATED { on, off } OPTIONAL, -- Need S + aperiodicTriggeringOffset INTEGER(0..4) OPTIONAL, -- Need S + trs-Info ENUMERATED {true} OPTIONAL, -- Need R + ... +} + +-- TAG-NZP-CSI-RS-RESOURCESET-STOP +-- TAG-NZP-CSI-RS-RESOURCESETID-START + +NZP-CSI-RS-ResourceSetId ::= INTEGER (0..maxNrofNZP-CSI-RS-ResourceSets-1) + +-- TAG-NZP-CSI-RS-RESOURCESETID-STOP +-- TAG-P-MAX-START + +P-Max ::= INTEGER (-30..33) + +-- TAG-P-MAX-STOP +-- TAG-PCI-LIST-START + +PCI-List ::= SEQUENCE (SIZE (1..maxNrofCellMeas)) OF PhysCellId + +-- TAG-PCI-LIST-STOP +-- TAG-PCI-RANGE-START + +PCI-Range ::= SEQUENCE { + start PhysCellId, + range ENUMERATED {n4, n8, n12, n16, n24, n32, n48, n64, n84, + n96, n128, n168, n252, n504, n1008,spare1} OPTIONAL -- Need S +} + +-- TAG-PCI-RANGE-STOP +-- TAG-PCI-RANGEELEMENT-START + +PCI-RangeElement ::= SEQUENCE { + pci-RangeIndex PCI-RangeIndex, + pci-Range PCI-Range +} + +-- TAG-PCI-RANGEELEMENT-STOP +-- TAG-PCI-RANGE-INDEX-START + +PCI-RangeIndex ::= INTEGER (1..maxNrofPCI-Ranges) + +-- TAG-PCI-RANGE-INDEX-STOP +-- TAG-PCI-RANGE-INDEX-LIST-START + +PCI-RangeIndexList ::= SEQUENCE (SIZE (1..maxNrofPCI-Ranges)) OF PCI-RangeIndex + +-- TAG-PCI-Range-INDEX-LIST-STOP +-- TAG-PDCCH-CONFIG-START + +PDCCH-Config ::= SEQUENCE { + controlResourceSetToAddModList SEQUENCE(SIZE (1..3)) OF ControlResourceSet OPTIONAL, -- Need N + controlResourceSetToReleaseList SEQUENCE(SIZE (1..3)) OF ControlResourceSetId OPTIONAL, -- Need N + searchSpacesToAddModList SEQUENCE(SIZE (1..10)) OF SearchSpace OPTIONAL, -- Need N + searchSpacesToReleaseList SEQUENCE(SIZE (1..10)) OF SearchSpaceId OPTIONAL, -- Need N + downlinkPreemption SetupRelease { DownlinkPreemption } OPTIONAL, -- Need M + tpc-PUSCH SetupRelease { PUSCH-TPC-CommandConfig } OPTIONAL, -- Need M + tpc-PUCCH SetupRelease { PUCCH-TPC-CommandConfig } OPTIONAL, -- Cond PUCCH-CellOnly + tpc-SRS SetupRelease { SRS-TPC-CommandConfig} OPTIONAL, -- Need M + ... +} + +-- TAG-PDCCH-CONFIG-STOP +-- TAG-PDCCH-CONFIGCOMMON-START + +PDCCH-ConfigCommon ::= SEQUENCE { + controlResourceSetZero ControlResourceSetZero OPTIONAL, -- Cond InitialBWP-Only + commonControlResourceSet ControlResourceSet OPTIONAL, -- Need R + searchSpaceZero SearchSpaceZero OPTIONAL, -- Cond InitialBWP-Only + commonSearchSpaceList SEQUENCE (SIZE(1..4)) OF SearchSpace OPTIONAL, -- Need R + searchSpaceSIB1 SearchSpaceId OPTIONAL, -- Need S + searchSpaceOtherSystemInformation SearchSpaceId OPTIONAL, -- Need S + pagingSearchSpace SearchSpaceId OPTIONAL, -- Need S + ra-SearchSpace SearchSpaceId OPTIONAL, -- Need S + ... +} + +-- TAG-PDCCH-CONFIGCOMMON-STOP +-- TAG-PDCCH-CONFIGSIB1-START + +PDCCH-ConfigSIB1 ::= SEQUENCE { + controlResourceSetZero ControlResourceSetZero, + searchSpaceZero SearchSpaceZero +} + +-- TAG-PDCCH-CONFIGSIB1-STOP +-- TAG-PDCCH-SERVINGCELLCONFIG-START + +PDCCH-ServingCellConfig ::= SEQUENCE { + slotFormatIndicator SetupRelease { SlotFormatIndicator } OPTIONAL, -- Need M + ... +} + +-- TAG-PDCCH-SERVINGCELLCONFIG-STOP +-- TAG-PDCP-CONFIG-START + +PDCP-Config ::= SEQUENCE { + drb SEQUENCE { + discardTimer ENUMERATED {ms10, ms20, ms30, ms40, ms50, ms60, ms75, ms100, ms150, ms200, + ms250, ms300, ms500, ms750, ms1500, infinity} OPTIONAL, -- Cond Setup + pdcp-SN-SizeUL ENUMERATED {len12bits, len18bits} OPTIONAL, -- Cond Setup2 + pdcp-SN-SizeDL ENUMERATED {len12bits, len18bits} OPTIONAL, -- Cond Setup2 + headerCompression CHOICE { + notUsed NULL, + rohc SEQUENCE { + maxCID INTEGER (1..16383) DEFAULT 15, + profiles SEQUENCE { + profile0x0001 BOOLEAN, + profile0x0002 BOOLEAN, + profile0x0003 BOOLEAN, + profile0x0004 BOOLEAN, + profile0x0006 BOOLEAN, + profile0x0101 BOOLEAN, + profile0x0102 BOOLEAN, + profile0x0103 BOOLEAN, + profile0x0104 BOOLEAN + }, + drb-ContinueROHC ENUMERATED { true } OPTIONAL -- Need N + }, + uplinkOnlyROHC SEQUENCE { + maxCID INTEGER (1..16383) DEFAULT 15, + profiles SEQUENCE { + profile0x0006 BOOLEAN + }, + drb-ContinueROHC ENUMERATED { true } OPTIONAL -- Need N + }, + ... + }, + integrityProtection ENUMERATED { enabled } OPTIONAL, -- Cond ConnectedTo5GC + statusReportRequired ENUMERATED { true } OPTIONAL, -- Cond Rlc-AM + outOfOrderDelivery ENUMERATED { true } OPTIONAL -- Need R + } OPTIONAL, -- Cond DRB + moreThanOneRLC SEQUENCE { + primaryPath SEQUENCE { + cellGroup CellGroupId OPTIONAL, -- Need R + logicalChannel LogicalChannelIdentity OPTIONAL -- Need R + }, + ul-DataSplitThreshold UL-DataSplitThreshold OPTIONAL, -- Cond SplitBearer + pdcp-Duplication BOOLEAN OPTIONAL -- Need R + } OPTIONAL, -- Cond MoreThanOneRLC + + t-Reordering ENUMERATED { + ms0, ms1, ms2, ms4, ms5, ms8, ms10, ms15, ms20, ms30, ms40, + ms50, ms60, ms80, ms100, ms120, ms140, ms160, ms180, ms200, ms220, + ms240, ms260, ms280, ms300, ms500, ms750, ms1000, ms1250, + ms1500, ms1750, ms2000, ms2250, ms2500, ms2750, + ms3000, spare28, spare27, spare26, spare25, spare24, + spare23, spare22, spare21, spare20, + spare19, spare18, spare17, spare16, spare15, spare14, + spare13, spare12, spare11, spare10, spare09, + spare08, spare07, spare06, spare05, spare04, spare03, + spare02, spare01 } OPTIONAL, -- Need S + ..., + [[ + cipheringDisabled ENUMERATED {true} OPTIONAL -- Cond ConnectedTo5GC + ]] + +} + +UL-DataSplitThreshold ::= ENUMERATED { + b0, b100, b200, b400, b800, b1600, b3200, b6400, b12800, b25600, b51200, b102400, b204800, + b409600, b819200, b1228800, b1638400, b2457600, b3276800, b4096000, b4915200, b5734400, + b6553600, infinity, spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1} + +-- TAG-PDCP-CONFIG-STOP +-- TAG-PDSCH-CONFIG-START + +PDSCH-Config ::= SEQUENCE { + dataScramblingIdentityPDSCH INTEGER (0..1023) OPTIONAL, -- Need S + dmrs-DownlinkForPDSCH-MappingTypeA SetupRelease { DMRS-DownlinkConfig } OPTIONAL, -- Need M + dmrs-DownlinkForPDSCH-MappingTypeB SetupRelease { DMRS-DownlinkConfig } OPTIONAL, -- Need M + + tci-StatesToAddModList SEQUENCE (SIZE(1..maxNrofTCI-States)) OF TCI-State OPTIONAL, -- Need N + tci-StatesToReleaseList SEQUENCE (SIZE(1..maxNrofTCI-States)) OF TCI-StateId OPTIONAL, -- Need N + vrb-ToPRB-Interleaver ENUMERATED {n2, n4} OPTIONAL, -- Need S + resourceAllocation ENUMERATED { resourceAllocationType0, resourceAllocationType1, dynamicSwitch}, + pdsch-TimeDomainAllocationList SetupRelease { PDSCH-TimeDomainResourceAllocationList } OPTIONAL, -- Need M + pdsch-AggregationFactor ENUMERATED { n2, n4, n8 } OPTIONAL, -- Need S + rateMatchPatternToAddModList SEQUENCE (SIZE (1..maxNrofRateMatchPatterns)) OF RateMatchPattern OPTIONAL, -- Need N + rateMatchPatternToReleaseList SEQUENCE (SIZE (1..maxNrofRateMatchPatterns)) OF RateMatchPatternId OPTIONAL, -- Need N + rateMatchPatternGroup1 RateMatchPatternGroup OPTIONAL, -- Need R + rateMatchPatternGroup2 RateMatchPatternGroup OPTIONAL, -- Need R + + rbg-Size ENUMERATED {config1, config2}, + mcs-Table ENUMERATED {qam256, qam64LowSE} OPTIONAL, -- Need S + maxNrofCodeWordsScheduledByDCI ENUMERATED {n1, n2} OPTIONAL, -- Need R + + prb-BundlingType CHOICE { + staticBundling SEQUENCE { + bundleSize ENUMERATED { n4, wideband } OPTIONAL -- Need S + }, + dynamicBundling SEQUENCE { + bundleSizeSet1 ENUMERATED { n4, wideband, n2-wideband, n4-wideband } OPTIONAL, -- Need S + bundleSizeSet2 ENUMERATED { n4, wideband } OPTIONAL -- Need S + } + }, + zp-CSI-RS-ResourceToAddModList SEQUENCE (SIZE (1..maxNrofZP-CSI-RS-Resources)) OF ZP-CSI-RS-Resource OPTIONAL, -- Need N + zp-CSI-RS-ResourceToReleaseList SEQUENCE (SIZE (1..maxNrofZP-CSI-RS-Resources)) OF ZP-CSI-RS-ResourceId OPTIONAL, -- Need N + aperiodic-ZP-CSI-RS-ResourceSetsToAddModList SEQUENCE (SIZE (1..maxNrofZP-CSI-RS-ResourceSets)) OF ZP-CSI-RS-ResourceSet OPTIONAL, -- Need N + aperiodic-ZP-CSI-RS-ResourceSetsToReleaseList SEQUENCE (SIZE (1..maxNrofZP-CSI-RS-ResourceSets)) OF ZP-CSI-RS-ResourceSetId OPTIONAL, + -- NeedN + sp-ZP-CSI-RS-ResourceSetsToAddModList SEQUENCE (SIZE (1..maxNrofZP-CSI-RS-ResourceSets)) OF ZP-CSI-RS-ResourceSet OPTIONAL, -- Need N + sp-ZP-CSI-RS-ResourceSetsToReleaseList SEQUENCE (SIZE (1..maxNrofZP-CSI-RS-ResourceSets)) OF ZP-CSI-RS-ResourceSetId OPTIONAL, -- Need N + p-ZP-CSI-RS-ResourceSet SetupRelease { ZP-CSI-RS-ResourceSet } OPTIONAL, -- Need M + ... +} +RateMatchPatternGroup ::= SEQUENCE (SIZE (1..maxNrofRateMatchPatternsPerGroup)) OF CHOICE { + cellLevel RateMatchPatternId, + bwpLevel RateMatchPatternId +} + +-- TAG-PDSCH-CONFIG-STOP +-- TAG-PDSCH-CONFIGCOMMON-START + +PDSCH-ConfigCommon ::= SEQUENCE { + pdsch-TimeDomainAllocationList PDSCH-TimeDomainResourceAllocationList OPTIONAL, -- Need R + ... +} + +-- TAG-PDSCH-CONFIGCOMMON-STOP +-- TAG-PDSCH-SERVINGCELLCONFIG-START + +PDSCH-ServingCellConfig ::= SEQUENCE { + codeBlockGroupTransmission SetupRelease { PDSCH-CodeBlockGroupTransmission } OPTIONAL, -- Need M + xOverhead ENUMERATED { xOh6, xOh12, xOh18 } OPTIONAL, -- Need S + nrofHARQ-ProcessesForPDSCH ENUMERATED {n2, n4, n6, n10, n12, n16} OPTIONAL, -- Need S + pucch-Cell ServCellIndex OPTIONAL , -- Cond SCellAddOnly + ... +} + +PDSCH-CodeBlockGroupTransmission ::= SEQUENCE { + maxCodeBlockGroupsPerTransportBlock ENUMERATED {n2, n4, n6, n8}, + codeBlockGroupFlushIndicator BOOLEAN, + ... +} + +-- TAG-PDSCH-SERVINGCELLCONFIG-STOP +-- TAG-PDSCH-TIMEDOMAINRESOURCEALLOCATIONLIST-START + + +PDSCH-TimeDomainResourceAllocationList ::= SEQUENCE (SIZE(1..maxNrofDL-Allocations)) OF PDSCH-TimeDomainResourceAllocation + +PDSCH-TimeDomainResourceAllocation ::= SEQUENCE { + k0 INTEGER(0..32) OPTIONAL, -- Need S + mappingType ENUMERATED {typeA, typeB}, + startSymbolAndLength INTEGER (0..127) +} + +-- TAG-PDSCH-TIMEDOMAINRESOURCEALLOCATIONLIST-STOP +-- TAG-PHR-CONFIG-START + +PHR-Config ::= SEQUENCE { + phr-PeriodicTimer ENUMERATED {sf10, sf20, sf50, sf100, sf200,sf500, sf1000, infinity}, + phr-ProhibitTimer ENUMERATED {sf0, sf10, sf20, sf50, sf100,sf200, sf500, sf1000}, + phr-Tx-PowerFactorChange ENUMERATED {dB1, dB3, dB6, infinity}, + multiplePHR BOOLEAN, + dummy BOOLEAN, + phr-Type2OtherCell BOOLEAN, + phr-ModeOtherCG ENUMERATED {real, virtual}, + ... +} + +-- TAG-PHR-CONFIG-STOP +-- TAG-PHYS-CELL-ID-START + +PhysCellId ::= INTEGER (0..1007) + +-- TAG-PHYS-CELL-ID-STOP +-- TAG-PHYSICALCELLGROUPCONFIG-START + +PhysicalCellGroupConfig ::= SEQUENCE { + harq-ACK-SpatialBundlingPUCCH ENUMERATED {true} OPTIONAL, -- Need S + harq-ACK-SpatialBundlingPUSCH ENUMERATED {true} OPTIONAL, -- Need S + p-NR-FR1 P-Max OPTIONAL, -- Need R + pdsch-HARQ-ACK-Codebook ENUMERATED {semiStatic, dynamic}, + tpc-SRS-RNTI RNTI-Value OPTIONAL, -- Need R + tpc-PUCCH-RNTI RNTI-Value OPTIONAL, -- Need R + tpc-PUSCH-RNTI RNTI-Value OPTIONAL, -- Need R + sp-CSI-RNTI RNTI-Value OPTIONAL, -- Cond SP-CSI-Report + cs-RNTI SetupRelease { RNTI-Value } OPTIONAL, -- Need M + ..., + [[ + mcs-C-RNTI RNTI-Value OPTIONAL, -- Need R + p-UE-FR1 P-Max OPTIONAL -- Cond MCG-Only + ]] +} + +-- TAG-PHYSICALCELLGROUPCONFIG-STOP +-- TAG-PLMN-IDENTITY-INFORMATION-START + +PLMN-Identity ::= SEQUENCE { + mcc MCC OPTIONAL, -- Cond MCC + mnc MNC +} + +MCC ::= SEQUENCE (SIZE (3)) OF MCC-MNC-Digit + +MNC ::= SEQUENCE (SIZE (2..3)) OF MCC-MNC-Digit + +MCC-MNC-Digit ::= INTEGER (0..9) + + +-- TAG-PLMN-IDENTITY-INFORMATION-STOP +-- TAG-PLMN-IDENTITY-LIST-START + +PLMN-IdentityInfoList ::= SEQUENCE (SIZE (1..maxPLMN)) OF PLMN-IdentityInfo + +PLMN-IdentityInfo ::= SEQUENCE { + plmn-IdentityList SEQUENCE (SIZE (1..maxPLMN)) OF PLMN-Identity, + trackingAreaCode TrackingAreaCode OPTIONAL, -- Need R + ranac RAN-AreaCode OPTIONAL, -- Need R + cellIdentity CellIdentity, + cellReservedForOperatorUse ENUMERATED {reserved, notReserved}, + ... +} +-- TAG-PLMN-IDENTITY-LIST-STOP +-- TAG-PRB-ID-START + +PRB-Id ::= INTEGER (0..maxNrofPhysicalResourceBlocks-1) + +-- TAG-PRB-ID-STOP +-- TAG-PTRS-DOWNLINKCONFIG-START + +PTRS-DownlinkConfig ::= SEQUENCE { + frequencyDensity SEQUENCE (SIZE (2)) OF INTEGER (1..276) OPTIONAL, -- Need S + timeDensity SEQUENCE (SIZE (3)) OF INTEGER (0..29) OPTIONAL, -- Need S + epre-Ratio INTEGER (0..3) OPTIONAL, -- Need S + resourceElementOffset ENUMERATED { offset01, offset10, offset11 } OPTIONAL, -- Need S + ... +} + +-- TAG-PTRS-DOWNLINKCONFIG-STOP +-- TAG-PTRS-UPLINKCONFIG-START + +PTRS-UplinkConfig ::= SEQUENCE { + transformPrecoderDisabled SEQUENCE { + frequencyDensity + SEQUENCE (SIZE (2)) OF INTEGER (1..276) OPTIONAL, -- Need S + timeDensity SEQUENCE (SIZE (3)) OF INTEGER (0..29) OPTIONAL, -- Need S + maxNrofPorts ENUMERATED {n1, n2}, + resourceElementOffset ENUMERATED {offset01, offset10, offset11 } OPTIONAL, -- Need S + ptrs-Power ENUMERATED {p00, p01, p10, p11} + } OPTIONAL, -- Need R + transformPrecoderEnabled SEQUENCE { + sampleDensity SEQUENCE (SIZE (5)) OF INTEGER (1..276), + timeDensityTransformPrecoding ENUMERATED {d2} OPTIONAL -- Need S + } OPTIONAL, -- Need R + ... +} + +-- TAG-PTRS-UPLINKCONFIG-STOP +-- TAG-PUCCH-CONFIG-START + +PUCCH-Config ::= SEQUENCE { + resourceSetToAddModList SEQUENCE (SIZE (1..maxNrofPUCCH-ResourceSets)) OF PUCCH-ResourceSet OPTIONAL, -- Need N + resourceSetToReleaseList SEQUENCE (SIZE (1..maxNrofPUCCH-ResourceSets)) OF PUCCH-ResourceSetId OPTIONAL, -- Need N + + resourceToAddModList SEQUENCE (SIZE (1..maxNrofPUCCH-Resources)) OF PUCCH-Resource OPTIONAL, -- Need N + resourceToReleaseList SEQUENCE (SIZE (1..maxNrofPUCCH-Resources)) OF PUCCH-ResourceId OPTIONAL, -- Need N + + format1 SetupRelease { PUCCH-FormatConfig } OPTIONAL, -- Need M + format2 SetupRelease { PUCCH-FormatConfig } OPTIONAL, -- Need M + format3 SetupRelease { PUCCH-FormatConfig } OPTIONAL, -- Need M + format4 SetupRelease { PUCCH-FormatConfig } OPTIONAL, -- Need M + + schedulingRequestResourceToAddModList SEQUENCE (SIZE (1..maxNrofSR-Resources)) OF SchedulingRequestResourceConfig OPTIONAL, -- Need N + schedulingRequestResourceToReleaseList SEQUENCE (SIZE (1..maxNrofSR-Resources)) OF SchedulingRequestResourceId OPTIONAL, -- Need N + + multi-CSI-PUCCH-ResourceList SEQUENCE (SIZE (1..2)) OF PUCCH-ResourceId OPTIONAL,-- Need M + dl-DataToUL-ACK SEQUENCE (SIZE (1..8)) OF INTEGER (0..15) OPTIONAL, -- Need M + + spatialRelationInfoToAddModList SEQUENCE (SIZE (1..maxNrofSpatialRelationInfos)) OF PUCCH-SpatialRelationInfo OPTIONAL, -- Need N + spatialRelationInfoToReleaseList SEQUENCE (SIZE (1..maxNrofSpatialRelationInfos)) OF PUCCH-SpatialRelationInfoId OPTIONAL, -- Need N + + pucch-PowerControl PUCCH-PowerControl OPTIONAL, -- Need M + ... +} + +PUCCH-FormatConfig ::= SEQUENCE { + interslotFrequencyHopping ENUMERATED {enabled} OPTIONAL, -- Need R + additionalDMRS ENUMERATED {true} OPTIONAL, -- Need R + maxCodeRate PUCCH-MaxCodeRate OPTIONAL, -- Need R + nrofSlots ENUMERATED {n2,n4,n8} OPTIONAL, -- Need S + pi2BPSK ENUMERATED {enabled} OPTIONAL, -- Need R + simultaneousHARQ-ACK-CSI ENUMERATED {true} OPTIONAL -- Need R +} + +PUCCH-MaxCodeRate ::= ENUMERATED {zeroDot08, zeroDot15, zeroDot25, zeroDot35, zeroDot45, zeroDot60, zeroDot80} + +-- A set with one or more PUCCH resources +PUCCH-ResourceSet ::= SEQUENCE { + pucch-ResourceSetId PUCCH-ResourceSetId, + resourceList SEQUENCE (SIZE (1..maxNrofPUCCH-ResourcesPerSet)) OF PUCCH-ResourceId, + maxPayloadMinus1 INTEGER (4..256) OPTIONAL -- Need R +} + +PUCCH-ResourceSetId ::= INTEGER (0..maxNrofPUCCH-ResourceSets-1) + +PUCCH-Resource ::= SEQUENCE { + pucch-ResourceId PUCCH-ResourceId, + startingPRB PRB-Id, + intraSlotFrequencyHopping ENUMERATED { enabled } OPTIONAL, -- Need R + secondHopPRB PRB-Id OPTIONAL, -- Need R + format CHOICE { + format0 PUCCH-format0, + format1 PUCCH-format1, + format2 PUCCH-format2, + format3 PUCCH-format3, + format4 PUCCH-format4 + } +} + +PUCCH-ResourceId ::= INTEGER (0..maxNrofPUCCH-Resources-1) + + +PUCCH-format0 ::= SEQUENCE { + initialCyclicShift INTEGER(0..11), + nrofSymbols INTEGER (1..2), + startingSymbolIndex INTEGER(0..13) +} + +PUCCH-format1 ::= SEQUENCE { + initialCyclicShift INTEGER(0..11), + nrofSymbols INTEGER (4..14), + startingSymbolIndex INTEGER(0..10), + timeDomainOCC INTEGER(0..6) +} + +PUCCH-format2 ::= SEQUENCE { + nrofPRBs INTEGER (1..16), + nrofSymbols INTEGER (1..2), + startingSymbolIndex INTEGER(0..13) +} + +PUCCH-format3 ::= SEQUENCE { + nrofPRBs INTEGER (1..16), + nrofSymbols INTEGER (4..14), + startingSymbolIndex INTEGER(0..10) +} + +PUCCH-format4 ::= SEQUENCE { + nrofSymbols INTEGER (4..14), + occ-Length ENUMERATED {n2,n4}, + occ-Index ENUMERATED {n0,n1,n2,n3}, + startingSymbolIndex INTEGER(0..10) +} + +-- TAG-PUCCH-CONFIG-STOP +-- TAG-PUCCH-CONFIGCOMMON-START + +PUCCH-ConfigCommon ::= SEQUENCE { + pucch-ResourceCommon INTEGER (0..15) OPTIONAL, -- Need R + pucch-GroupHopping ENUMERATED { neither, enable, disable }, + hoppingId INTEGER (0..1023) OPTIONAL, -- Need R + p0-nominal INTEGER (-202..24) OPTIONAL, -- Need R + ... +} + +-- TAG-PUCCH-CONFIGCOMMON-STOP +-- TAG-PUCCH-PATHLOSSREFERENCERS-ID-START + +PUCCH-PathlossReferenceRS-Id ::= INTEGER (0..maxNrofPUCCH-PathlossReferenceRSs-1) + +-- TAG-PUCCH-PATHLOSSREFERENCERS-ID-STOP +-- TAG-PUCCH-POWERCONTROL-START +PUCCH-PowerControl ::= SEQUENCE { + deltaF-PUCCH-f0 INTEGER (-16..15) OPTIONAL, -- Need R + deltaF-PUCCH-f1 INTEGER (-16..15) OPTIONAL, -- Need R + deltaF-PUCCH-f2 INTEGER (-16..15) OPTIONAL, -- Need R + deltaF-PUCCH-f3 INTEGER (-16..15) OPTIONAL, -- Need R + deltaF-PUCCH-f4 INTEGER (-16..15) OPTIONAL, -- Need R + p0-Set SEQUENCE (SIZE (1..maxNrofPUCCH-P0-PerSet)) OF P0-PUCCH OPTIONAL, -- Need M + pathlossReferenceRSs SEQUENCE (SIZE (1..maxNrofPUCCH-PathlossReferenceRSs)) OF PUCCH-PathlossReferenceRS OPTIONAL, -- Need M + twoPUCCH-PC-AdjustmentStates ENUMERATED {twoStates} OPTIONAL, -- Need S + ... +} + +P0-PUCCH ::= SEQUENCE { + p0-PUCCH-Id P0-PUCCH-Id, + p0-PUCCH-Value INTEGER (-16..15) +} + +P0-PUCCH-Id ::= INTEGER (1..8) + +PUCCH-PathlossReferenceRS ::= SEQUENCE { + pucch-PathlossReferenceRS-Id PUCCH-PathlossReferenceRS-Id, + referenceSignal CHOICE { + ssb-Index SSB-Index, + csi-RS-Index NZP-CSI-RS-ResourceId + } +} + +-- TAG-PUCCH-POWERCONTROL-STOP +-- TAG-PUCCH-SPATIALRELATIONINFO-START + +PUCCH-SpatialRelationInfo ::= SEQUENCE { + pucch-SpatialRelationInfoId PUCCH-SpatialRelationInfoId, + servingCellId ServCellIndex OPTIONAL, -- Need S + referenceSignal CHOICE { + ssb-Index SSB-Index, + csi-RS-Index NZP-CSI-RS-ResourceId, + srs SEQUENCE { + resource SRS-ResourceId, + uplinkBWP BWP-Id + } + }, + pucch-PathlossReferenceRS-Id PUCCH-PathlossReferenceRS-Id, + p0-PUCCH-Id P0-PUCCH-Id, + closedLoopIndex ENUMERATED { i0, i1 } +} + +PUCCH-SpatialRelationInfoId ::= INTEGER (1..maxNrofSpatialRelationInfos) + + +-- TAG-PUCCH-SPATIALRELATIONINFO-STOP +-- TAG-PUCCH-TPC-COMMANDCONFIG-START + +PUCCH-TPC-CommandConfig ::= SEQUENCE { + tpc-IndexPCell INTEGER (1..15) OPTIONAL, -- Cond PDCCH-OfSpcell + tpc-IndexPUCCH-SCell INTEGER (1..15) OPTIONAL, -- Cond PDCCH-ofSpCellOrPUCCH-Scell + ... +} + +-- TAG-PUCCH-TPC-COMMANDCONFIG-STOP +-- TAG-PUSCH-CONFIG-START + +PUSCH-Config ::= SEQUENCE { + dataScramblingIdentityPUSCH INTEGER (0..1023) OPTIONAL, -- Need S + txConfig ENUMERATED {codebook, nonCodebook} OPTIONAL, -- Need S + dmrs-UplinkForPUSCH-MappingTypeA SetupRelease { DMRS-UplinkConfig } OPTIONAL, -- Need M + dmrs-UplinkForPUSCH-MappingTypeB SetupRelease { DMRS-UplinkConfig } OPTIONAL, -- Need M + + pusch-PowerControl PUSCH-PowerControl OPTIONAL, -- Need M + frequencyHopping ENUMERATED {intraSlot, interSlot} OPTIONAL, -- Need S + frequencyHoppingOffsetLists SEQUENCE (SIZE (1..4)) OF INTEGER (1.. maxNrofPhysicalResourceBlocks-1) OPTIONAL, -- Need M + resourceAllocation ENUMERATED { resourceAllocationType0, resourceAllocationType1, dynamicSwitch}, + pusch-TimeDomainAllocationList SetupRelease { PUSCH-TimeDomainResourceAllocationList } OPTIONAL, -- Need M + pusch-AggregationFactor ENUMERATED { n2, n4, n8 } OPTIONAL, -- Need S + mcs-Table ENUMERATED {qam256, qam64LowSE} OPTIONAL, -- Need S + mcs-TableTransformPrecoder ENUMERATED {qam256, qam64LowSE} OPTIONAL, -- Need S + transformPrecoder ENUMERATED {enabled, disabled} OPTIONAL, -- Need S + codebookSubset ENUMERATED {fullyAndPartialAndNonCoherent, partialAndNonCoherent, + nonCoherent} OPTIONAL, -- Cond codebookBased + maxRank INTEGER (1..4) OPTIONAL, -- Cond codebookBased + rbg-Size ENUMERATED { config2} OPTIONAL, -- Need S + uci-OnPUSCH SetupRelease { UCI-OnPUSCH} OPTIONAL, -- Need M + tp-pi2BPSK ENUMERATED {enabled} OPTIONAL, -- Need S + ... +} + +UCI-OnPUSCH ::= SEQUENCE { + betaOffsets CHOICE { + dynamic SEQUENCE (SIZE (4)) OF BetaOffsets, + semiStatic BetaOffsets + } OPTIONAL, -- Need M + scaling ENUMERATED { f0p5, f0p65, f0p8, f1 } +} + +-- TAG-PUSCH-CONFIG-STOP +-- TAG-PUSCH-CONFIGCOMMON-START + +PUSCH-ConfigCommon ::= SEQUENCE { + groupHoppingEnabledTransformPrecoding ENUMERATED {enabled} OPTIONAL, -- Need R + pusch-TimeDomainAllocationList PUSCH-TimeDomainResourceAllocationList OPTIONAL, -- Need R + msg3-DeltaPreamble INTEGER (-1..6) OPTIONAL, -- Need R + p0-NominalWithGrant INTEGER (-202..24) OPTIONAL, -- Need R + ... +} + +-- TAG-PUSCH-CONFIGCOMMON-STOP +-- TAG-PUSCH-POWERCONTROL-START + +PUSCH-PowerControl ::= SEQUENCE { + tpc-Accumulation ENUMERATED { disabled } OPTIONAL, -- Need S + msg3-Alpha Alpha OPTIONAL, -- Need S + p0-NominalWithoutGrant INTEGER (-202..24) OPTIONAL, -- Need M, + p0-AlphaSets SEQUENCE (SIZE (1..maxNrofP0-PUSCH-AlphaSets)) OF P0-PUSCH-AlphaSet OPTIONAL, -- Need M, + pathlossReferenceRSToAddModList SEQUENCE (SIZE (1..maxNrofPUSCH-PathlossReferenceRSs)) OF PUSCH-PathlossReferenceRS + OPTIONAL, -- Need N + pathlossReferenceRSToReleaseList SEQUENCE (SIZE (1..maxNrofPUSCH-PathlossReferenceRSs)) OF PUSCH-PathlossReferenceRS-Id + OPTIONAL, -- Need N + twoPUSCH-PC-AdjustmentStates ENUMERATED {twoStates} OPTIONAL, -- Need S + deltaMCS ENUMERATED {enabled} OPTIONAL, -- Need S + sri-PUSCH-MappingToAddModList SEQUENCE (SIZE (1..maxNrofSRI-PUSCH-Mappings)) OF SRI-PUSCH-PowerControl OPTIONAL, -- Need N + sri-PUSCH-MappingToReleaseList SEQUENCE (SIZE (1..maxNrofSRI-PUSCH-Mappings)) OF SRI-PUSCH-PowerControlId OPTIONAL -- Need N +} + +-- A set of p0-pusch and alpha used for PUSCH with grant. 'PUSCH beam indication' (if present) gives the index of the set to +-- be used for a particular PUSCH transmission. (see 38.213, section 7.1.1) +P0-PUSCH-AlphaSet ::= SEQUENCE { + p0-PUSCH-AlphaSetId P0-PUSCH-AlphaSetId, + p0 INTEGER (-16..15) OPTIONAL, -- Need S + alpha Alpha OPTIONAL -- Need S +} + +-- ID for a P0-PUSCH-AlphaSet. Corresponds to L1 parameter 'p0alphasetindex' (see 38.213, section 7.1) +P0-PUSCH-AlphaSetId ::= INTEGER (0..maxNrofP0-PUSCH-AlphaSets-1) + +-- A reference signal (RS) configured as pathloss reference signal for PUSCH power control +-- Corresponds to L1 parameter 'pusch-pathlossReference-rs' (see 38.213, section 7.1) +PUSCH-PathlossReferenceRS ::= SEQUENCE { + pusch-PathlossReferenceRS-Id PUSCH-PathlossReferenceRS-Id, + referenceSignal CHOICE { + ssb-Index SSB-Index, + csi-RS-Index NZP-CSI-RS-ResourceId + } +} + +-- ID for a referemce signal (RS) configured as PUSCH pathloss reference +-- Corresponds to L1 parameter 'pathlossreference-index' (see 38.213, section 7.1) +PUSCH-PathlossReferenceRS-Id ::= INTEGER (0..maxNrofPUSCH-PathlossReferenceRSs-1) + + +-- A set of PUSCH power control parameters associated with one SRS-ResourceIndex (SRI) +SRI-PUSCH-PowerControl ::= SEQUENCE { + sri-PUSCH-PowerControlId SRI-PUSCH-PowerControlId, + sri-PUSCH-PathlossReferenceRS-Id PUSCH-PathlossReferenceRS-Id, + sri-P0-PUSCH-AlphaSetId P0-PUSCH-AlphaSetId, + sri-PUSCH-ClosedLoopIndex ENUMERATED { i0, i1 } +} + +SRI-PUSCH-PowerControlId ::= INTEGER (0..maxNrofSRI-PUSCH-Mappings-1) + +-- A set of beta-offset values +BetaOffsets ::= SEQUENCE { + betaOffsetACK-Index1 INTEGER(0..31) OPTIONAL, -- Need S + betaOffsetACK-Index2 INTEGER(0..31) OPTIONAL, -- Need S + betaOffsetACK-Index3 INTEGER(0..31) OPTIONAL, -- Need S + betaOffsetCSI-Part1-Index1 INTEGER(0..31) OPTIONAL, -- Need S + betaOffsetCSI-Part1-Index2 INTEGER(0..31) OPTIONAL, -- Need S + betaOffsetCSI-Part2-Index1 INTEGER(0..31) OPTIONAL, -- Need S + betaOffsetCSI-Part2-Index2 INTEGER(0..31) OPTIONAL -- Need S +} + +-- TAG-PUSCH-POWERCONTROL-STOP +-- TAG-PUSCH-SERVINGCELLCONFIG-START + +PUSCH-ServingCellConfig ::= SEQUENCE { + codeBlockGroupTransmission SetupRelease { PUSCH-CodeBlockGroupTransmission } OPTIONAL, -- Need M + rateMatching ENUMERATED {limitedBufferRM} OPTIONAL, -- Need S + xOverhead ENUMERATED {xoh6, xoh12, xoh18} OPTIONAL, -- Need S + ... +} + +PUSCH-CodeBlockGroupTransmission ::= SEQUENCE { + maxCodeBlockGroupsPerTransportBlock ENUMERATED {n2, n4, n6, n8}, + ... +} + +-- TAG-PUSCH-SERVINGCELLCONFIG-STOP +-- TAG-PUSCH-TIMEDOMAINRESOURCEALLOCATIONLIST-START + +PUSCH-TimeDomainResourceAllocationList ::= SEQUENCE (SIZE(1..maxNrofUL-Allocations)) OF PUSCH-TimeDomainResourceAllocation + +PUSCH-TimeDomainResourceAllocation ::= SEQUENCE { + k2 INTEGER(0..32) OPTIONAL, -- Need S + mappingType ENUMERATED {typeA, typeB}, + startSymbolAndLength INTEGER (0..127) +} + +-- TAG-PUSCH-TIMEDOMAINRESOURCEALLOCATIONLIST-STOP +-- TAG-PUSCH-TPC-COMMANDCONFIG-START + +PUSCH-TPC-CommandConfig ::= SEQUENCE { + tpc-Index INTEGER (1..15) OPTIONAL, -- Cond SUL + tpc-IndexSUL INTEGER (1..15) OPTIONAL, -- Cond SUL-Only + targetCell ServCellIndex OPTIONAL, -- Need S + ... +} + +-- TAG-PUSCH-TPC-COMMANDCONFIG-STOP +-- TAG-Q-OFFSET-START + +Q-OffsetRange ::= ENUMERATED { + dB-24, dB-22, dB-20, dB-18, dB-16, dB-14, + dB-12, dB-10, dB-8, dB-6, dB-5, dB-4, dB-3, + dB-2, dB-1, dB0, dB1, dB2, dB3, dB4, dB5, + dB6, dB8, dB10, dB12, dB14, dB16, dB18, + dB20, dB22, dB24} + +-- TAG-Q-OFFSET-STOP +-- TAG-Q-QUALMIN-START + +Q-QualMin ::= INTEGER (-34..-3) -- FFS range + +-- TAG-Q-QUALMIN-STOP +-- TAG-Q-RXLEVMIN-START + +Q-RxLevMin ::= INTEGER (-70..-22) -- FFS range + +-- TAG-Q-RXLEVMIN-STOP +-- TAG-QUANTITY-CONFIG-START + + +QuantityConfig ::= SEQUENCE { + quantityConfigNR-List SEQUENCE (SIZE (1..maxNrofQuantityConfig)) OF QuantityConfigNR OPTIONAL, -- Need M + ..., + [[ + quantityConfigEUTRA FilterConfig OPTIONAL -- Need M + ]] +} + +QuantityConfigNR::= SEQUENCE { + quantityConfigCell QuantityConfigRS, + quantityConfigRS-Index QuantityConfigRS OPTIONAL -- Need M +} + +QuantityConfigRS ::= SEQUENCE { + ssb-FilterConfig FilterConfig, + cs-RS-FilterConfig FilterConfig +} + +FilterConfig ::= SEQUENCE { + filterCoefficientRSRP FilterCoefficient DEFAULT fc4, + filterCoefficientRSRQ FilterCoefficient DEFAULT fc4, + filterCoefficientRS-SINR FilterCoefficient DEFAULT fc4 +} + +-- TAG-QUANTITY-CONFIG-STOP +-- TAG-RACH-CONFIG-COMMON-START + +RACH-ConfigCommon ::= SEQUENCE { + rach-ConfigGeneric RACH-ConfigGeneric, + totalNumberOfRA-Preambles INTEGER (1..63) OPTIONAL, -- Need S + ssb-perRACH-OccasionAndCB-PreamblesPerSSB CHOICE { + oneEighth ENUMERATED {n4,n8,n12,n16,n20,n24,n28,n32,n36,n40,n44,n48,n52,n56,n60,n64}, + oneFourth ENUMERATED {n4,n8,n12,n16,n20,n24,n28,n32,n36,n40,n44,n48,n52,n56,n60,n64}, + oneHalf ENUMERATED {n4,n8,n12,n16,n20,n24,n28,n32,n36,n40,n44,n48,n52,n56,n60,n64}, + one ENUMERATED {n4,n8,n12,n16,n20,n24,n28,n32,n36,n40,n44,n48,n52,n56,n60,n64}, + two ENUMERATED {n4,n8,n12,n16,n20,n24,n28,n32}, + four INTEGER (1..16), + eight INTEGER (1..8), + sixteen INTEGER (1..4) + } OPTIONAL, -- Need M + + groupBconfigured SEQUENCE { + ra-Msg3SizeGroupA ENUMERATED {b56, b144, b208, b256, b282, b480, b640, + b800, b1000, b72, spare6, spare5,spare4, spare3, spare2, spare1}, + messagePowerOffsetGroupB ENUMERATED { minusinfinity, dB0, dB5, dB8, dB10, dB12, dB15, dB18}, + numberOfRA-PreamblesGroupA INTEGER (1..64) + } OPTIONAL, -- Need R + ra-ContentionResolutionTimer ENUMERATED { sf8, sf16, sf24, sf32, sf40, sf48, sf56, sf64}, + rsrp-ThresholdSSB RSRP-Range OPTIONAL, -- Need R + rsrp-ThresholdSSB-SUL RSRP-Range OPTIONAL, -- Cond SUL + prach-RootSequenceIndex CHOICE { + l839 INTEGER (0..837), + l139 INTEGER (0..137) + }, + msg1-SubcarrierSpacing SubcarrierSpacing OPTIONAL, -- Cond L139Need S + restrictedSetConfig ENUMERATED {unrestrictedSet, restrictedSetTypeA, restrictedSetTypeB}, + msg3-transformPrecoder ENUMERATED {enabled} OPTIONAL, -- Need R + ... +} + +-- TAG-RACH-CONFIG-COMMON-STOP +-- TAG-RACH-CONFIG-DEDICATED-START + + +RACH-ConfigDedicated ::= SEQUENCE { + cfra CFRA OPTIONAL, -- Need S + ra-Prioritization RA-Prioritization OPTIONAL, --Need N + ... +} + +CFRA ::= SEQUENCE { + occasions SEQUENCE { + rach-ConfigGeneric RACH-ConfigGeneric, + ssb-perRACH-Occasion ENUMERATED {oneEighth, oneFourth, oneHalf, one, two, four, eight, sixteen} OPTIONAL -- Cond SSB-CFRA + } OPTIONAL, -- Need S + resources CHOICE { + ssb SEQUENCE { + ssb-ResourceList SEQUENCE (SIZE(1..maxRA-SSB-Resources)) OF CFRA-SSB-Resource, + ra-ssb-OccasionMaskIndex INTEGER (0..15) + }, + csirs SEQUENCE { + csirs-ResourceList SEQUENCE (SIZE(1..maxRA-CSIRS-Resources)) OF CFRA-CSIRS-Resource, + rsrp-ThresholdCSI-RS RSRP-Range + } + }, + ..., + [[ + totalNumberOfRA-Preambles-v1530 INTEGER (1..63) OPTIONAL -- Cond Occasions + ]] +} + +CFRA-SSB-Resource ::= SEQUENCE { + ssb SSB-Index, + ra-PreambleIndex INTEGER (0..63), + ... +} + +CFRA-CSIRS-Resource ::= SEQUENCE { + csi-RS CSI-RS-Index, + ra-OccasionList SEQUENCE (SIZE(1..maxRA-OccasionsPerCSIRS)) OF INTEGER (0..maxRA-Occasions-1), + ra-PreambleIndex INTEGER (0..63), + ... +} + +-- TAG-RACH-CONFIG-DEDICATED-STOP +-- TAG-RACH-CONFIG-GENERIC-START + +RACH-ConfigGeneric ::= SEQUENCE { + prach-ConfigurationIndex INTEGER (0..255), + msg1-FDM ENUMERATED {one, two, four, eight}, + msg1-FrequencyStart INTEGER (0..maxNrofPhysicalResourceBlocks-1), + zeroCorrelationZoneConfig INTEGER(0..15), + preambleReceivedTargetPower INTEGER (-202..-60), + preambleTransMax ENUMERATED {n3, n4, n5, n6, n7, n8, n10, n20, n50, n100, n200}, + powerRampingStep ENUMERATED {dB0, dB2, dB4, dB6}, + ra-ResponseWindow ENUMERATED {sl1, sl2, sl4, sl8, sl10, sl20, sl40, sl80}, + ... +} + +-- TAG-RACH-CONFIG-GENERIC-STOP +-- TAG-RA-PRIORITIZATION-START + +RA-Prioritization ::= SEQUENCE { + powerRampingStepHighPriority ENUMERATED {dB0, dB2, dB4, dB6}, + scalingFactorBI ENUMERATED {zero, dot25, dot5, dot75} OPTIONAL, -- Need R + ... +} + +-- TAG-RA-PRIORITIZATION-STOP +-- TAG-RADIO-BEARER-CONFIG-START + +RadioBearerConfig ::= SEQUENCE { + srb-ToAddModList SRB-ToAddModList OPTIONAL, -- Cond HO-Conn + srb3-ToRelease ENUMERATED{true} OPTIONAL, -- Need N + drb-ToAddModList DRB-ToAddModList OPTIONAL, -- Cond HO-toNR + drb-ToReleaseList DRB-ToReleaseList OPTIONAL, -- Need N + securityConfig SecurityConfig OPTIONAL, -- Need M + ... +} + +SRB-ToAddModList ::= SEQUENCE (SIZE (1..2)) OF SRB-ToAddMod +SRB-ToAddMod ::= SEQUENCE { + srb-Identity SRB-Identity, + reestablishPDCP ENUMERATED{true} OPTIONAL, -- Need N + discardOnPDCP ENUMERATED{true} OPTIONAL, -- Need N + pdcp-Config PDCP-Config OPTIONAL, -- Cond PDCP + ... +} + +DRB-ToAddModList ::= SEQUENCE (SIZE (1..maxDRB)) OF DRB-ToAddMod +DRB-ToAddMod ::= SEQUENCE { + cnAssociation CHOICE { + eps-BearerIdentity INTEGER (0..15), -- EPS-DRB-Setup + sdap-Config SDAP-Config -- 5GC + } OPTIONAL, -- Cond DRBSetup + drb-Identity DRB-Identity, + reestablishPDCP ENUMERATED{true} OPTIONAL, -- Need N + recoverPDCP ENUMERATED{true} OPTIONAL, -- Need N + pdcp-Config PDCP-Config OPTIONAL, -- Cond PDCP + ... +} +DRB-ToReleaseList ::= SEQUENCE (SIZE (1..maxDRB)) OF DRB-Identity + +SecurityConfig ::= SEQUENCE { + securityAlgorithmConfig SecurityAlgorithmConfig OPTIONAL, -- Cond RBTermChange + keyToUse ENUMERATED{master, secondary} OPTIONAL, -- Cond RBTermChange + ... +} + + + +-- TAG-RADIO-BEARER-CONFIG-STOP +-- TAG-RADIOLINKMONITORINGCONFIG-START + +RadioLinkMonitoringConfig ::= SEQUENCE { + failureDetectionResourcesToAddModList SEQUENCE (SIZE(1..maxNrofFailureDetectionResources)) OF RadioLinkMonitoringRS OPTIONAL, -- Need N + failureDetectionResourcesToReleaseList SEQUENCE (SIZE(1..maxNrofFailureDetectionResources)) OF RadioLinkMonitoringRS-Id OPTIONAL,-- Need N + beamFailureInstanceMaxCount ENUMERATED {n1, n2, n3, n4, n5, n6, n8, n10} OPTIONAL, -- Need R + beamFailureDetectionTimer ENUMERATED {pbfd1, pbfd2, pbfd3, pbfd4, pbfd5, pbfd6, pbfd8, pbfd10} OPTIONAL, -- Need R + ... +} + +RadioLinkMonitoringRS ::= SEQUENCE { + radioLinkMonitoringRS-Id RadioLinkMonitoringRS-Id, + purpose ENUMERATED {beamFailure, rlf, both}, + detectionResource CHOICE { + ssb-Index SSB-Index, + csi-RS-Index NZP-CSI-RS-ResourceId + }, + ... +} + +-- TAG-RADIOLINKMONITORINGCONFIG-STOP +-- TAG-RADIOLINKMONITORINGRSID-START + +RadioLinkMonitoringRS-Id ::= INTEGER (0..maxNrofFailureDetectionResources-1) + +-- TAG-RADIOLINKMONITORINGRSID-STOP +-- TAG-RAN-AREACODE-START + +RAN-AreaCode ::= INTEGER (0..255) + +-- TAG-RAN-AREACODE-STOP +-- TAG-RATEMATCHPATTERN-START + +RateMatchPattern ::= SEQUENCE { + rateMatchPatternId RateMatchPatternId, + + patternType CHOICE { + bitmaps SEQUENCE { + resourceBlocks BIT STRING (SIZE (275)), + symbolsInResourceBlock CHOICE { + oneSlot BIT STRING (SIZE (14)), + twoSlots BIT STRING (SIZE (28)) + }, + periodicityAndPattern CHOICE { + n2 BIT STRING (SIZE (2)), + n4 BIT STRING (SIZE (4)), + n5 BIT STRING (SIZE (5)), + n8 BIT STRING (SIZE (8)), + n10 BIT STRING (SIZE (10)), + n20 BIT STRING (SIZE (20)), + n40 BIT STRING (SIZE (40)) + } OPTIONAL, -- Need S + ... + }, + controlResourceSet ControlResourceSetId + }, + subcarrierSpacing SubcarrierSpacing OPTIONAL, -- Cond CellLevel + dummy ENUMERATED { dynamic, semiStatic }, + ... +} + +-- TAG-RATEMATCHPATTERN-STOP +-- TAG-RATEMATCHPATTERNID-START + +RateMatchPatternId ::= INTEGER (0..maxNrofRateMatchPatterns-1) + +-- TAG-RATEMATCHPATTERNID-STOP +-- TAG-RATEMATCHPATTERNLTE-CRS-START + +RateMatchPatternLTE-CRS ::= SEQUENCE { + carrierFreqDL INTEGER (0..16383), + carrierBandwidthDL ENUMERATED {n6, n15, n25, n50, n75, n100, spare2, spare1}, + mbsfn-SubframeConfigList EUTRA-MBSFN-SubframeConfigList OPTIONAL, -- Need M + nrofCRS-Ports ENUMERATED {n1, n2, n4}, + v-Shift ENUMERATED {n0, n1, n2, n3, n4, n5} +} + +-- TAG-RATEMATCHPATTERNLTE-CRS-STOP +-- TAG-REPORT-CONFIG-ID-START + +ReportConfigId ::= INTEGER (1..maxReportConfigId) + +-- TAG-REPORT-CONFIG-ID-STOP +-- TAG-REPORT-CONFIG-INTER-RAT-START + +ReportConfigInterRAT ::= SEQUENCE { + reportType CHOICE { + periodical PeriodicalReportConfigInterRAT, + eventTriggered EventTriggerConfigInterRAT, + reportCGI ReportCGI-EUTRA, + ... + } +} + +ReportCGI-EUTRA ::= SEQUENCE { + cellForWhichToReportCGI EUTRA-PhysCellId, + ... +} + +EventTriggerConfigInterRAT ::= SEQUENCE { + eventId CHOICE { + eventB1 SEQUENCE { + b1-ThresholdEUTRA MeasTriggerQuantityEUTRA, + reportOnLeave BOOLEAN, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger, + ... + }, + eventB2 SEQUENCE { + b2-Threshold1 MeasTriggerQuantity, + b2-Threshold2EUTRA MeasTriggerQuantityEUTRA, + reportOnLeave BOOLEAN, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger, + ... + }, + ... + }, + rsType NR-RS-Type, + + reportInterval ReportInterval, + reportAmount ENUMERATED {r1, r2, r4, r8, r16, r32, r64, infinity}, + reportQuantity MeasReportQuantity, + maxReportCells INTEGER (1..maxCellReport), + ... + +} + +PeriodicalReportConfigInterRAT ::= SEQUENCE { + reportInterval ReportInterval, + reportAmount ENUMERATED {r1, r2, r4, r8, r16, r32, r64, infinity}, + reportQuantity MeasReportQuantity, + maxReportCells INTEGER (1..maxCellReport), + ... +} + +MeasTriggerQuantityEUTRA::= CHOICE { + rsrp RSRP-RangeEUTRA, + rsrq RSRQ-RangeEUTRA, + sinr SINR-RangeEUTRA +} + +RSRP-RangeEUTRA ::= INTEGER (0..97) +RSRQ-RangeEUTRA ::= INTEGER (0..34) +SINR-RangeEUTRA ::= INTEGER (0..127) + +-- TAG-REPORT-CONFIG-INTER-RAT-STOP +-- TAG-REPORT-CONFIG-START + +ReportConfigNR ::= SEQUENCE { + reportType CHOICE { + periodical PeriodicalReportConfig, + eventTriggered EventTriggerConfig, + ..., + reportCGI ReportCGI + } +} + +ReportCGI ::= SEQUENCE { + cellForWhichToReportCGI PhysCellId, + ... +} + +EventTriggerConfig::= SEQUENCE { + eventId CHOICE { + eventA1 SEQUENCE { + a1-Threshold MeasTriggerQuantity, + reportOnLeave BOOLEAN, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger + }, + eventA2 SEQUENCE { + a2-Threshold MeasTriggerQuantity, + reportOnLeave BOOLEAN, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger + }, + eventA3 SEQUENCE { + a3-Offset MeasTriggerQuantityOffset, + reportOnLeave BOOLEAN, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger, + useWhiteCellList BOOLEAN + }, + eventA4 SEQUENCE { + a4-Threshold MeasTriggerQuantity, + reportOnLeave BOOLEAN, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger, + useWhiteCellList BOOLEAN + }, + eventA5 SEQUENCE { + a5-Threshold1 MeasTriggerQuantity, + a5-Threshold2 MeasTriggerQuantity, + reportOnLeave BOOLEAN, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger, + useWhiteCellList BOOLEAN + }, + eventA6 SEQUENCE { + a6-Offset MeasTriggerQuantityOffset, + reportOnLeave BOOLEAN, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger, + useWhiteCellList BOOLEAN + }, + ... + }, + + rsType NR-RS-Type, + + reportInterval ReportInterval, + reportAmount ENUMERATED {r1, r2, r4, r8, r16, r32, r64, infinity}, + + reportQuantityCell MeasReportQuantity, + maxReportCells INTEGER (1..maxCellReport), + + reportQuantityRsIndexes MeasReportQuantity OPTIONAL, -- Need R + maxNrofRSIndexesToReport INTEGER (1..maxNrofIndexesToReport) OPTIONAL, -- Need R + includeBeamMeasurements BOOLEAN, + reportAddNeighMeas ENUMERATED {setup} OPTIONAL, -- Need R + ... +} + +PeriodicalReportConfig ::= SEQUENCE { + rsType NR-RS-Type, + + reportInterval ReportInterval, + reportAmount ENUMERATED {r1, r2, r4, r8, r16, r32, r64, infinity}, + + reportQuantityCell MeasReportQuantity, + maxReportCells INTEGER (1..maxCellReport), + + reportQuantityRsIndexes MeasReportQuantity OPTIONAL, -- Need R + maxNrofRsIndexesToReport INTEGER (1..maxNrofIndexesToReport) OPTIONAL, -- Need R + includeBeamMeasurements BOOLEAN, + useWhiteCellList BOOLEAN, + ... +} + +NR-RS-Type ::= ENUMERATED {ssb, csi-rs} + +MeasTriggerQuantity ::= CHOICE { + rsrp RSRP-Range, + rsrq RSRQ-Range, + sinr SINR-Range +} + +MeasTriggerQuantityOffset ::= CHOICE { + rsrp INTEGER (-30..30), + rsrq INTEGER (-30..30), + sinr INTEGER (-30..30) +} + + +MeasReportQuantity ::= SEQUENCE { + rsrp BOOLEAN, + rsrq BOOLEAN, + sinr BOOLEAN +} + + +-- TAG-REPORT-CONFIG-START +-- TAG-REPORT-CONFIG-TO-ADD-MOD-LIST-START + +ReportConfigToAddModList ::= SEQUENCE (SIZE (1..maxReportConfigId)) OF ReportConfigToAddMod + +ReportConfigToAddMod ::= SEQUENCE { + reportConfigId ReportConfigId, + reportConfig CHOICE { + reportConfigNR ReportConfigNR, + ..., + reportConfigInterRAT ReportConfigInterRAT + } +} + +-- TAG- REPORT-CONFIG-TO-ADD-MOD-LIST-STOP + +ReportInterval ::= ENUMERATED {ms120, ms240, ms480, ms640, ms1024, ms2048, ms5120, ms10240, ms20480, ms40960, + min1,min6, min12, min30 } + +-- TAG-RESELECTION-THRESHOLD-START + +ReselectionThreshold ::= INTEGER (0..31) + +-- TAG-RESELECTION-THRESHOLD-STOP +-- TAG-RESELECTION-THRESHOLDQ-START + +ReselectionThresholdQ ::= INTEGER (0..31) + +-- TAG-RESELECTION-THRESHOLDQ-STOP +-- TAG-RESUME-CAUSE-START + +ResumeCause ::= ENUMERATED {emergency, highPriorityAccess, mt-Access, mo-Signalling, + mo-Data, mo-VoiceCall, mo-VideoCall, mo-SMS, rna-Update, mps-PriorityAccess, mcs-PriorityAccess, spare1, spare2, spare3, spare4, spare5 } + +-- TAG-RESUME-CAUSE-STOP +-- TAG-RLC-BEARERCONFIG-START + +RLC-BearerConfig ::= SEQUENCE { + logicalChannelIdentity LogicalChannelIdentity, + servedRadioBearer CHOICE { + srb-Identity SRB-Identity, + drb-Identity DRB-Identity + } OPTIONAL, -- Cond LCH-SetupOnly + + reestablishRLC ENUMERATED {true} OPTIONAL, -- Need N + rlc-Config RLC-Config OPTIONAL, -- Cond LCH-Setup + + mac-LogicalChannelConfig LogicalChannelConfig OPTIONAL, -- Cond LCH-Setup + ... +} + +-- TAG-RLC-BEARERCONFIG-STOP +-- TAG-RLC-CONFIG-START + +RLC-Config ::= CHOICE { + am SEQUENCE { + ul-AM-RLC UL-AM-RLC, + dl-AM-RLC DL-AM-RLC + }, + um-Bi-Directional SEQUENCE { + ul-UM-RLC UL-UM-RLC, + dl-UM-RLC DL-UM-RLC + }, + um-Uni-Directional-UL SEQUENCE { + ul-UM-RLC UL-UM-RLC + }, + um-Uni-Directional-DL SEQUENCE { + dl-UM-RLC DL-UM-RLC + }, + ... +} + +UL-AM-RLC ::= SEQUENCE { + sn-FieldLength SN-FieldLengthAM OPTIONAL, -- Cond Reestab + t-PollRetransmit T-PollRetransmit, + pollPDU PollPDU, + pollByte PollByte, + maxRetxThreshold ENUMERATED { t1, t2, t3, t4, t6, t8, t16, t32 } +} + +DL-AM-RLC ::= SEQUENCE { + sn-FieldLength SN-FieldLengthAM OPTIONAL, -- Cond Reestab + t-Reassembly T-Reassembly, + t-StatusProhibit T-StatusProhibit +} + +UL-UM-RLC ::= SEQUENCE { + sn-FieldLength SN-FieldLengthUM OPTIONAL -- Cond Reestab +} + +DL-UM-RLC ::= SEQUENCE { + sn-FieldLength SN-FieldLengthUM OPTIONAL, -- Cond Reestab + t-Reassembly T-Reassembly +} + +T-PollRetransmit ::= ENUMERATED { + ms5, ms10, ms15, ms20, ms25, ms30, ms35, + ms40, ms45, ms50, ms55, ms60, ms65, ms70, + ms75, ms80, ms85, ms90, ms95, ms100, ms105, + ms110, ms115, ms120, ms125, ms130, ms135, + ms140, ms145, ms150, ms155, ms160, ms165, + ms170, ms175, ms180, ms185, ms190, ms195, + ms200, ms205, ms210, ms215, ms220, ms225, + ms230, ms235, ms240, ms245, ms250, ms300, + ms350, ms400, ms450, ms500, ms800, ms1000, + ms2000, ms4000, spare5, spare4, spare3, + spare2, spare1} + + +PollPDU ::= ENUMERATED { + p4, p8, p16, p32, p64, p128, p256, p512, p1024, p2048, p4096, p6144, p8192, p12288, p16384, p20480, + p24576, p28672, p32768, p40960, p49152, p57344, p65536, infinity, spare8, spare7, spare6, spare5, spare4, + spare3, spare2, spare1} + +PollByte ::= ENUMERATED { + kB1, kB2, kB5, kB8, kB10, kB15, kB25, kB50, kB75, + kB100, kB125, kB250, kB375, kB500, kB750, kB1000, + kB1250, kB1500, kB2000, kB3000, kB4000, kB4500, + kB5000, kB5500, kB6000, kB6500, kB7000, kB7500, + mB8, mB9, mB10, mB11, mB12, mB13, mB14, mB15, + mB16, mB17, mB18, mB20, mB25, mB30, mB40, infinity, + spare20, spare19, spare18, spare17, spare16, + spare15, spare14, spare13, spare12, spare11, + spare10, spare9, spare8, spare7, spare6, spare5, + spare4, spare3, spare2, spare1} + +T-Reassembly ::= ENUMERATED { + ms0, ms5, ms10, ms15, ms20, ms25, ms30, ms35, + ms40, ms45, ms50, ms55, ms60, ms65, ms70, + ms75, ms80, ms85, ms90, ms95, ms100, ms110, + ms120, ms130, ms140, ms150, ms160, ms170, + ms180, ms190, ms200, spare1} + +T-StatusProhibit ::= ENUMERATED { + ms0, ms5, ms10, ms15, ms20, ms25, ms30, ms35, + ms40, ms45, ms50, ms55, ms60, ms65, ms70, + ms75, ms80, ms85, ms90, ms95, ms100, ms105, + ms110, ms115, ms120, ms125, ms130, ms135, + ms140, ms145, ms150, ms155, ms160, ms165, + ms170, ms175, ms180, ms185, ms190, ms195, + ms200, ms205, ms210, ms215, ms220, ms225, + ms230, ms235, ms240, ms245, ms250, ms300, + ms350, ms400, ms450, ms500, ms800, ms1000, + ms1200, ms1600, ms2000, ms2400, spare2, spare1} + +SN-FieldLengthUM ::= ENUMERATED {size6, size12} +SN-FieldLengthAM ::= ENUMERATED {size12, size18} + +-- TAG-RLC-CONFIG-STOP +-- TAG-RLF-TIMERS-AND-CONSTANTS-START + +RLF-TimersAndConstants ::= SEQUENCE { + t310 ENUMERATED {ms0, ms50, ms100, ms200, ms500, ms1000, ms2000, ms4000, ms6000}, + n310 ENUMERATED {n1, n2, n3, n4, n6, n8, n10, n20}, + n311 ENUMERATED {n1, n2, n3, n4, n5, n6, n8, n10}, + ..., + [[ + t311-v1530 ENUMERATED {ms1000, ms3000, ms5000, ms10000, ms15000, ms20000, ms30000} + ]] +} + +-- TAG-RLF-TIMERS-AND-CONSTANTS-STOP +-- TAG-RNTI-VALUE-START + +RNTI-Value ::= INTEGER (0..65535) + +-- TAG-RNTI-VALUE-STOP +-- TAG-RSRP-RANGE-START + +RSRP-Range ::= INTEGER(0..127) + +-- TAG-RSRP-RANGE-STOP +-- TAG-RSRQ-RANGE-START + +RSRQ-Range ::= INTEGER(0..127) + +-- TAG-RSRQ-RANGE-STOP +-- TAG-SCELL-INDEX-START + +SCellIndex ::= INTEGER (1..31) + +-- TAG-SCELL-INDEX-STOP +-- TAG-SCHEDULING-REQUEST-CONFIG-START + +SchedulingRequestConfig ::= SEQUENCE { + schedulingRequestToAddModList SEQUENCE (SIZE (1..maxNrofSR-ConfigPerCellGroup)) OF SchedulingRequestToAddMod OPTIONAL, -- Need N + schedulingRequestToReleaseList SEQUENCE (SIZE (1..maxNrofSR-ConfigPerCellGroup)) OF SchedulingRequestId OPTIONAL-- Need N +} + +SchedulingRequestToAddMod ::= SEQUENCE { + schedulingRequestId SchedulingRequestId, + + sr-ProhibitTimer ENUMERATED {ms1, ms2, ms4, ms8, ms16, ms32, ms64, ms128} OPTIONAL, -- Need S + sr-TransMax ENUMERATED { n4, n8, n16, n32, n64, spare3, spare2, spare1} +} + + + +-- TAG-SCHEDULING-REQUEST-CONFIG-STOP +-- TAG-SCHEDULINGREQUESTID-START + +SchedulingRequestId ::= INTEGER (0..7) + +-- TAG-SCHEDULINGREQUESTID-STOP +-- TAG-SCHEDULING-REQUEST-RESOURCE-CONFIG-START + +SchedulingRequestResourceConfig ::= SEQUENCE { + schedulingRequestResourceId SchedulingRequestResourceId, + schedulingRequestID SchedulingRequestId, + periodicityAndOffset CHOICE { + sym2 NULL, + sym6or7 NULL, + sl1 NULL, -- Recurs in every slot + sl2 INTEGER (0..1), + sl4 INTEGER (0..3), + sl5 INTEGER (0..4), + sl8 INTEGER (0..7), + sl10 INTEGER (0..9), + sl16 INTEGER (0..15), + sl20 INTEGER (0..19), + sl40 INTEGER (0..39), + sl80 INTEGER (0..79), + sl160 INTEGER (0..159), + sl320 INTEGER (0..319), + sl640 INTEGER (0..639) + } OPTIONAL, -- Need M + resource PUCCH-ResourceId OPTIONAL -- Need M +} + +-- TAG-SCHEDULING-REQUEST-RESOURCE-CONFIG-STOP +-- TAG-SCHEDULINGREQUESTRESOURCEID-START + +SchedulingRequestResourceId ::= INTEGER (1..maxNrofSR-Resources) + +-- TAG-SCHEDULINGREQUESTRESOURCEID-STOP +-- TAG-SCRAMBLING-ID-START + +ScramblingId ::= INTEGER(0..1023) + +-- TAG-SCRAMBLING-ID-STOP +-- TAG-SCS-SPECIFIC-CARRIER-START + +SCS-SpecificCarrier ::= SEQUENCE { + offsetToCarrier INTEGER (0..2199), + subcarrierSpacing SubcarrierSpacing, + carrierBandwidth INTEGER (1..maxNrofPhysicalResourceBlocks), + ..., + [[ + txDirectCurrentLocation-v1530 INTEGER (0..4095) OPTIONAL -- Need S + ]] +} + +-- TAG-SCS-SPECIFIC-CARRIER-STOP +-- TAG-SDAP-CONFIG-START + +SDAP-Config ::= SEQUENCE { + pdu-Session PDU-SessionID, + sdap-HeaderDL ENUMERATED {present, absent}, + sdap-HeaderUL ENUMERATED {present, absent}, + defaultDRB BOOLEAN, + mappedQoS-FlowsToAdd SEQUENCE (SIZE (1..maxNrofQFIs)) OF QFI OPTIONAL, -- Need N + mappedQoS-FlowsToRelease SEQUENCE (SIZE (1..maxNrofQFIs)) OF QFI OPTIONAL, -- Need N + ... +} + +QFI ::= INTEGER (0..maxQFI) + +PDU-SessionID ::= INTEGER (0..255) + +-- TAG-SDAP-CONFIG-STOP +-- TAG-SEARCHSPACE-START + +SearchSpace ::= SEQUENCE { + searchSpaceId SearchSpaceId, + controlResourceSetId ControlResourceSetId OPTIONAL, -- Cond SetupOnly + monitoringSlotPeriodicityAndOffset CHOICE { + sl1 NULL, + sl2 INTEGER (0..1), + sl4 INTEGER (0..3), + sl5 INTEGER (0..4), + sl8 INTEGER (0..7), + sl10 INTEGER (0..9), + sl16 INTEGER (0..15), + sl20 INTEGER (0..19), + sl40 INTEGER (0..39), + sl80 INTEGER (0..79), + sl160 INTEGER (0..159), + sl320 INTEGER (0..319), + sl640 INTEGER (0..639), + sl1280 INTEGER (0..1279), + sl2560 INTEGER (0..2559) + } OPTIONAL, -- Cond Setup + duration INTEGER (2..2559) OPTIONAL, -- Need R + monitoringSymbolsWithinSlot BIT STRING (SIZE (14)) OPTIONAL, -- Cond Setup + nrofCandidates SEQUENCE { + aggregationLevel1 ENUMERATED {n0, n1, n2, n3, n4, n5, n6, n8}, + aggregationLevel2 ENUMERATED {n0, n1, n2, n3, n4, n5, n6, n8}, + aggregationLevel4 ENUMERATED {n0, n1, n2, n3, n4, n5, n6, n8}, + aggregationLevel8 ENUMERATED {n0, n1, n2, n3, n4, n5, n6, n8}, + aggregationLevel16 ENUMERATED {n0, n1, n2, n3, n4, n5, n6, n8} + } OPTIONAL, -- Cond Setup + searchSpaceType CHOICE { + common SEQUENCE { + dci-Format0-0-AndFormat1-0 SEQUENCE { + ... + } OPTIONAL, -- Need R + dci-Format2-0 SEQUENCE { + nrofCandidates-SFI SEQUENCE { + aggregationLevel1 ENUMERATED {n1, n2} OPTIONAL, -- Need R + aggregationLevel2 ENUMERATED {n1, n2} OPTIONAL, -- Need R + aggregationLevel4 ENUMERATED {n1, n2} OPTIONAL, -- Need R + aggregationLevel8 ENUMERATED {n1, n2} OPTIONAL, -- Need R + aggregationLevel16 ENUMERATED {n1, n2} OPTIONAL -- Need R + }, + ... + } OPTIONAL, -- Need R + dci-Format2-1 SEQUENCE { + ... + } OPTIONAL, -- Need R + dci-Format2-2 SEQUENCE { + ... + } OPTIONAL, -- Need R + dci-Format2-3 SEQUENCE { + dummy1 ENUMERATED {sl1, sl2, sl4, sl5, sl8, sl10, sl16, sl20} OPTIONAL, -- Cond Setup + dummy2 ENUMERATED {n1, n2}, + ... + } OPTIONAL -- Need R + }, + ue-Specific SEQUENCE { + dci-Formats ENUMERATED {formats0-0-And-1-0, formats0-1-And-1-1}, + ... + } + } OPTIONAL -- Cond Setup +} + +-- TAG-SEARCHSPACE-STOP +-- TAG-SEARCHSPACEID-START + +SearchSpaceId ::= INTEGER (0..maxNrofSearchSpaces-1) + +-- TAG-SEARCHSPACEID-STOP +-- TAG-SEARCHSPACEZERO-START + +SearchSpaceZero ::= INTEGER (0..15) + +-- TAG-SEARCHSPACEZERO-STOP +-- TAG-SECURITY-ALGORITHM-CONFIG-START + +SecurityAlgorithmConfig ::= SEQUENCE { + cipheringAlgorithm CipheringAlgorithm, + integrityProtAlgorithm IntegrityProtAlgorithm OPTIONAL, -- Need R + ... +} + +IntegrityProtAlgorithm ::= ENUMERATED { + nia0, nia1, nia2, nia3, spare4, spare3, + spare2, spare1, ...} + +CipheringAlgorithm ::= ENUMERATED { + nea0, nea1, nea2, nea3, spare4, spare3, + spare2, spare1, ...} + +-- TAG-SECURITY-ALGORITHM-CONFIG-STOP +-- TAG-SERV-CELL-INDEX-START + +ServCellIndex ::= INTEGER (0..maxNrofServingCells-1) + +-- TAG-SERV-CELL-INDEX-STOP +-- TAG-SERVING-CELL-CONFIG-START + +ServingCellConfig ::= SEQUENCE { + tdd-UL-DL-ConfigurationDedicated TDD-UL-DL-ConfigDedicated OPTIONAL, -- Cond TDD + + initialDownlinkBWP BWP-DownlinkDedicated OPTIONAL, -- Need M + downlinkBWP-ToReleaseList SEQUENCE (SIZE (1..maxNrofBWPs)) OF BWP-Id OPTIONAL, -- Need N + downlinkBWP-ToAddModList SEQUENCE (SIZE (1..maxNrofBWPs)) OF BWP-Downlink OPTIONAL, -- Need N + firstActiveDownlinkBWP-Id BWP-Id OPTIONAL, -- Cond SyncAndCellAdd + bwp-InactivityTimer ENUMERATED {ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30, + ms40,ms50, ms60, ms80,ms100, ms200,ms300, ms500, + ms750, ms1280, ms1920, ms2560, spare10, spare9, spare8, + spare7, spare6, spare5, spare4, spare3, spare2, spare1 } OPTIONAL, --Need R + defaultDownlinkBWP-Id BWP-Id OPTIONAL, -- Need S + + uplinkConfig UplinkConfig OPTIONAL, -- Need M + supplementaryUplink UplinkConfig OPTIONAL, -- Need M + + pdcch-ServingCellConfig SetupRelease { PDCCH-ServingCellConfig } OPTIONAL, -- Need M + pdsch-ServingCellConfig SetupRelease { PDSCH-ServingCellConfig } OPTIONAL, -- Need M + csi-MeasConfig SetupRelease { CSI-MeasConfig } OPTIONAL, -- Need M + sCellDeactivationTimer ENUMERATED {ms20, ms40, ms80, ms160, ms200, ms240, + ms320, ms400, ms480, ms520, ms640, ms720, + ms840, ms1280, spare2,spare1} OPTIONAL, -- Cond ServingCellWithoutPUCCH + crossCarrierSchedulingConfig CrossCarrierSchedulingConfig OPTIONAL, -- Need M + tag-Id TAG-Id, + ue-BeamLockFunction ENUMERATED {enabled} OPTIONAL, -- Need R + pathlossReferenceLinking ENUMERATED {pCell, sCell} OPTIONAL, -- Cond SCellOnly + servingCellMO MeasObjectId OPTIONAL, -- Cond MeasObject + ... +} + +UplinkConfig ::= SEQUENCE { + initialUplinkBWP BWP-UplinkDedicated OPTIONAL, -- Need M + uplinkBWP-ToReleaseList SEQUENCE (SIZE (1..maxNrofBWPs)) OF BWP-Id OPTIONAL, -- Need N + uplinkBWP-ToAddModList SEQUENCE (SIZE (1..maxNrofBWPs)) OF BWP-Uplink OPTIONAL, -- Need N + firstActiveUplinkBWP-Id BWP-Id OPTIONAL, -- Cond SyncAndCellAdd + + pusch-ServingCellConfig SetupRelease { PUSCH-ServingCellConfig } OPTIONAL, -- Need M + carrierSwitching SetupRelease { SRS-CarrierSwitching } OPTIONAL, -- Need M + ... +} + +-- TAG-SERVING-CELL-CONFIG-STOP +-- TAG-SERVING-CELL-CONFIG-COMMON-START + +ServingCellConfigCommon ::= SEQUENCE { + physCellId PhysCellId OPTIONAL, -- Cond HOAndServCellAdd, + downlinkConfigCommon DownlinkConfigCommon OPTIONAL, -- Cond HOAndServCellAdd + + uplinkConfigCommon UplinkConfigCommon OPTIONAL, -- Need M + supplementaryUplinkConfig UplinkConfigCommon OPTIONAL, -- Need S + n-TimingAdvanceOffset ENUMERATED { n0, n25600, n39936 } OPTIONAL, -- Need S + ssb-PositionsInBurst CHOICE { + shortBitmap BIT STRING (SIZE (4)), + mediumBitmap BIT STRING (SIZE (8)), + longBitmap BIT STRING (SIZE (64)) + } OPTIONAL, -- Cond AbsFreqSSB + ssb-periodicityServingCell ENUMERATED { ms5, ms10, ms20, ms40, ms80, ms160, spare2, spare1 } OPTIONAL, -- Need S + dmrs-TypeA-Position ENUMERATED {pos2, pos3}, + lte-CRS-ToMatchAround SetupRelease { RateMatchPatternLTE-CRS } OPTIONAL, -- Need M + rateMatchPatternToAddModList SEQUENCE (SIZE (1..maxNrofRateMatchPatterns)) OF RateMatchPattern OPTIONAL, -- Need N + rateMatchPatternToReleaseList SEQUENCE (SIZE (1..maxNrofRateMatchPatterns)) OF RateMatchPatternId OPTIONAL, -- Need N + subcarrierSpacing SubcarrierSpacing OPTIONAL, -- Cond HOAndServCellAdd + tdd-UL-DL-ConfigurationCommon TDD-UL-DL-ConfigCommon OPTIONAL, -- Cond TDD + ss-PBCH-BlockPower INTEGER (-60..50), + ... +} + + +-- TAG-SERVING-CELL-CONFIG-COMMON-STOP +-- TAG-SERVINGCELLCONFIGCOMMONSIB-START + +ServingCellConfigCommonSIB ::= SEQUENCE { + downlinkConfigCommon DownlinkConfigCommonSIB, + uplinkConfigCommon UplinkConfigCommonSIB OPTIONAL, -- Need R + supplementaryUplink UplinkConfigCommonSIB OPTIONAL, -- Need R + n-TimingAdvanceOffset ENUMERATED { n0, n25560, n39936 } OPTIONAL, -- Need S + ssb-PositionsInBurst SEQUENCE { + inOneGroup BIT STRING (SIZE (8)), + groupPresence BIT STRING (SIZE (8)) OPTIONAL -- Cond Above6GHzOnly + }, + ssb-PeriodicityServingCell ENUMERATED {ms5, ms10, ms20, ms40, ms80, ms160}, + + tdd-UL-DL-ConfigurationCommon TDD-UL-DL-ConfigCommon OPTIONAL, -- Cond TDD + ss-PBCH-BlockPower INTEGER (-60..50), + ... +} + +-- TAG-SERVINGCELLCONFIGCOMMONSIB-STOP +-- TAG-ShortI-RNTI-VALUE-START + +ShortI-RNTI-Value ::= BIT STRING (SIZE(24)) + +-- TAG-ShortI-RNTI-VALUE-STOP +-- TAG-SHORTMAC-I-START + +ShortMAC-I ::= BIT STRING (SIZE (16)) + +-- TAG-SHORTMAC-I-STOP +-- TAG-SINR-RANGE-START + +SINR-Range ::= INTEGER(0..127) + +-- TAG-SINR-RANGE-STOP +-- TAG-OTHER-SI-INFO-START + +SI-SchedulingInfo ::= SEQUENCE { + schedulingInfoList SEQUENCE (SIZE (1..maxSI-Message)) OF SchedulingInfo, + si-WindowLength ENUMERATED {s5, s10, s20, s40, s80, s160, s320, s640, s1280}, + si-RequestConfig SI-RequestConfig OPTIONAL, -- Cond MSG-1 + si-RequestConfigSUL SI-RequestConfig OPTIONAL, -- Cond SUL-MSG-1 + systemInformationAreaID BIT STRING (SIZE (24)) OPTIONAL, -- Need R + ... +} + +SchedulingInfo ::= SEQUENCE { + si-BroadcastStatus ENUMERATED {broadcasting, notBroadcasting}, + si-Periodicity ENUMERATED {rf8, rf16, rf32, rf64, rf128, rf256, rf512}, + sib-MappingInfo SIB-Mapping +} + +SIB-Mapping ::= SEQUENCE (SIZE (1..maxSIB)) OF SIB-TypeInfo + +SIB-TypeInfo ::= SEQUENCE { + type ENUMERATED {sibType2, sibType3, sibType4, sibType5, sibType6, sibType7, sibType8, sibType9, + spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1,... }, + valueTag INTEGER (0..31) OPTIONAL, -- Cond SIB-TYPE + areaScope ENUMERATED {true} OPTIONAL -- Cond AREA-ID +} + +-- Configuration for Msg1 based SI Request +SI-RequestConfig::= SEQUENCE { + rach-OccasionsSI SEQUENCE { + rach-ConfigSI RACH-ConfigGeneric, + ssb-perRACH-Occasion ENUMERATED {oneEighth, oneFourth, oneHalf, one, two, four, eight, sixteen} + } OPTIONAL, -- Need R + si-RequestPeriod ENUMERATED {one, two, four, six, eight, ten, twelve, sixteen} OPTIONAL, -- Need R + si-RequestResources SEQUENCE (SIZE (1..maxSI-Message)) OF SI-RequestResources +} + +SI-RequestResources ::= SEQUENCE { + ra-PreambleStartIndex INTEGER (0..63), + ra-AssociationPeriodIndex INTEGER (0..15) OPTIONAL, -- Need R + ra-ssb-OccasionMaskIndex INTEGER (0..15) OPTIONAL -- Need R +} + +-- TAG-OTHER-SI-INFO-STOP +-- TAG-SLOTFORMATCOMBINATIONSPERCELL-START + +SlotFormatCombinationsPerCell ::= SEQUENCE { + servingCellId ServCellIndex, + subcarrierSpacing SubcarrierSpacing, + subcarrierSpacing2 SubcarrierSpacing OPTIONAL, -- Need R + slotFormatCombinations SEQUENCE (SIZE (1..maxNrofSlotFormatCombinationsPerSet)) OF SlotFormatCombination OPTIONAL, -- Need M + positionInDCI INTEGER(0..maxSFI-DCI-PayloadSize-1) OPTIONAL, -- Need M + ... +} + +SlotFormatCombination ::= SEQUENCE { + slotFormatCombinationId SlotFormatCombinationId, + slotFormats SEQUENCE (SIZE (1..maxNrofSlotFormatsPerCombination)) OF INTEGER (0..255) +} + +SlotFormatCombinationId ::= INTEGER (0..maxNrofSlotFormatCombinationsPerSet-1) + +-- TAG-SLOTFORMATCOMBINATIONSPERCELL-STOP +-- TAG-SLOTFORMATINDICATOR-START + +SlotFormatIndicator ::= SEQUENCE { + sfi-RNTI RNTI-Value, + dci-PayloadSize INTEGER (1..maxSFI-DCI-PayloadSize), + slotFormatCombToAddModList SEQUENCE (SIZE(1..maxNrofAggregatedCellsPerCellGroup)) OF SlotFormatCombinationsPerCell OPTIONAL, -- Need N + slotFormatCombToReleaseList SEQUENCE (SIZE(1..maxNrofAggregatedCellsPerCellGroup)) OF ServCellIndex OPTIONAL, -- Need N + ... +} + +-- TAG-SLOTFORMATINDICATOR-STOP +-- TAG-S-NSSAI-START + +S-NSSAI ::= CHOICE{ + sst BIT STRING (SIZE (8)), + sst-SD BIT STRING (SIZE (32)) +} + +-- TAG-S-NSSAI-STOP +-- TAG-SPEEDSTATESCALEFACTORS-START + +SpeedStateScaleFactors ::= SEQUENCE { + sf-Medium ENUMERATED {oDot25, oDot5, oDot75, lDot0}, + sf-High ENUMERATED {oDot25, oDot5, oDot75, lDot0} +} +-- TAG-SPEEDSTATESCALEFACTORS-STOP +-- TAG-SS-RSSI-MEASUREMENT-START + +SS-RSSI-Measurement ::= SEQUENCE { + measurementSlots BIT STRING (SIZE (1..80)), + endSymbol INTEGER(0..3) +} + +-- TAG-SS-RSSI-MEASUREMENT-STOP +-- TAG-SPS-CONFIG-START + +SPS-Config ::= SEQUENCE { + periodicity ENUMERATED {ms10, ms20, ms32, ms40, ms64, ms80, ms128, ms160, ms320, ms640, + spare6, spare5, spare4, spare3, spare2, spare1}, + nrofHARQ-Processes INTEGER (1..8), + n1PUCCH-AN PUCCH-ResourceId OPTIONAL, -- Need M + mcs-Table ENUMERATED {qam64LowSE} OPTIONAL, -- Need S + ... +} + +-- TAG-SPS-CONFIG-STOP +-- TAG-SRB-IDENTITY-START + +SRB-Identity ::= INTEGER (1..3) + +-- TAG-SRB-IDENTITY-STOP +-- TAG-SRS-CARRIERSWITCHING-START + +SRS-CarrierSwitching ::= SEQUENCE { + srs-SwitchFromServCellIndex INTEGER (0..31) OPTIONAL, -- Need M + srs-SwitchFromCarrier ENUMERATED {sUL, nUL}, + srs-TPC-PDCCH-Group CHOICE { + typeA SEQUENCE (SIZE (1..32)) OF SRS-TPC-PDCCH-Config, + typeB SRS-TPC-PDCCH-Config + } OPTIONAL, -- Need M + monitoringCells SEQUENCE (SIZE (1..maxNrofServingCells)) OF ServCellIndex OPTIONAL, -- Need M + ... +} + +-- One trigger configuration for SRS-Carrier Switching. (see 38.212, 38.213, section 7.3.1, 11.3) +SRS-TPC-PDCCH-Config ::= SEQUENCE { + srs-CC-SetIndexlist SEQUENCE (SIZE(1..4)) OF SRS-CC-SetIndex OPTIONAL -- Need M +} + +SRS-CC-SetIndex ::= SEQUENCE { + cc-SetIndex INTEGER (0..3) OPTIONAL, -- Need M + cc-IndexInOneCC-Set INTEGER (0..7) OPTIONAL -- Need M +} + +-- TAG-SRS-CARRIERSWITCHING-STOP +-- TAG-SRS-CONFIG-START + +SRS-Config ::= SEQUENCE { + srs-ResourceSetToReleaseList SEQUENCE (SIZE(1..maxNrofSRS-ResourceSets)) OF SRS-ResourceSetId OPTIONAL, -- Need N + srs-ResourceSetToAddModList SEQUENCE (SIZE(1..maxNrofSRS-ResourceSets)) OF SRS-ResourceSet OPTIONAL, -- Need N + + srs-ResourceToReleaseList SEQUENCE (SIZE(1..maxNrofSRS-Resources)) OF SRS-ResourceId OPTIONAL, -- Need N + srs-ResourceToAddModList SEQUENCE (SIZE(1..maxNrofSRS-Resources)) OF SRS-Resource OPTIONAL, -- Need N + + tpc-Accumulation ENUMERATED {disabled} OPTIONAL, -- Need S + ... +} + +SRS-ResourceSet ::= SEQUENCE { + srs-ResourceSetId SRS-ResourceSetId, + srs-ResourceIdList SEQUENCE (SIZE(1..maxNrofSRS-ResourcesPerSet)) OF SRS-ResourceId OPTIONAL, -- Cond Setup + + resourceType CHOICE { + aperiodic SEQUENCE { + aperiodicSRS-ResourceTrigger INTEGER (1..maxNrofSRS-TriggerStates-1), + csi-RS NZP-CSI-RS-ResourceId OPTIONAL, -- Cond NonCodebook + slotOffset INTEGER (1..32) OPTIONAL, -- Need S + ..., + [[ + aperiodicSRS-ResourceTriggerList-v1530 SEQUENCE (SIZE(1..maxNrofSRS-TriggerStates-2)) + OF INTEGER (1..maxNrofSRS-TriggerStates-1) OPTIONAL -- Need M + ]] + }, + semi-persistent SEQUENCE { + associatedCSI-RS NZP-CSI-RS-ResourceId OPTIONAL, -- Cond NonCodebook + ... + }, + periodic SEQUENCE { + associatedCSI-RS NZP-CSI-RS-ResourceId OPTIONAL, -- Cond NonCodebook + ... + } + }, + usage ENUMERATED {beamManagement, codebook, nonCodebook, antennaSwitching}, + alpha Alpha OPTIONAL, -- Need S + p0 INTEGER (-202..24) OPTIONAL, -- Cond Setup + pathlossReferenceRS CHOICE { + ssb-Index SSB-Index, + csi-RS-Index NZP-CSI-RS-ResourceId + } OPTIONAL, -- Need M + srs-PowerControlAdjustmentStates ENUMERATED { sameAsFci2, separateClosedLoop} OPTIONAL, -- Need S + ... +} + +SRS-ResourceSetId ::= INTEGER (0..maxNrofSRS-ResourceSets-1) + +SRS-Resource ::= SEQUENCE { + srs-ResourceId SRS-ResourceId, + nrofSRS-Ports ENUMERATED {port1, ports2, ports4}, + ptrs-PortIndex ENUMERATED {n0, n1 } OPTIONAL, -- Need R + transmissionComb CHOICE { + n2 SEQUENCE { + combOffset-n2 INTEGER (0..1), + cyclicShift-n2 INTEGER (0..7) + }, + n4 SEQUENCE { + combOffset-n4 INTEGER (0..3), + cyclicShift-n4 INTEGER (0..11) + } + }, + resourceMapping SEQUENCE { + startPosition INTEGER (0..5), + nrofSymbols ENUMERATED {n1, n2, n4}, + repetitionFactor ENUMERATED {n1, n2, n4} + }, + freqDomainPosition INTEGER (0..67), + freqDomainShift INTEGER (0..268), + freqHopping SEQUENCE { + c-SRS INTEGER (0..63), + b-SRS INTEGER (0..3), + b-hop INTEGER (0..3) + }, + groupOrSequenceHopping ENUMERATED { neither, groupHopping, sequenceHopping }, + resourceType CHOICE { + aperiodic SEQUENCE { + ... + }, + semi-persistent SEQUENCE { + periodicityAndOffset-sp SRS-PeriodicityAndOffset, + ... + }, + periodic SEQUENCE { + periodicityAndOffset-p SRS-PeriodicityAndOffset, + ... + } + }, + sequenceId INTEGER (0..1023), + spatialRelationInfo SRS-SpatialRelationInfo OPTIONAL, -- Need R + ... +} + +SRS-SpatialRelationInfo ::= SEQUENCE { + servingCellId ServCellIndex OPTIONAL, -- Need S + referenceSignal CHOICE { + ssb-Index SSB-Index, + csi-RS-Index NZP-CSI-RS-ResourceId, + srs SEQUENCE { + resourceId SRS-ResourceId, + uplinkBWP BWP-Id + } + } +} + + +SRS-ResourceId ::= INTEGER (0..maxNrofSRS-Resources-1) + +SRS-PeriodicityAndOffset ::= CHOICE { + sl1 NULL, + sl2 INTEGER(0..1), + sl4 INTEGER(0..3), + sl5 INTEGER(0..4), + sl8 INTEGER(0..7), + sl10 INTEGER(0..9), + sl16 INTEGER(0..15), + sl20 INTEGER(0..19), + sl32 INTEGER(0..31), + sl40 INTEGER(0..39), + sl64 INTEGER(0..63), + sl80 INTEGER(0..79), + sl160 INTEGER(0..159), + sl320 INTEGER(0..319), + sl640 INTEGER(0..639), + sl1280 INTEGER(0..1279), + sl2560 INTEGER(0..2559) +} + +-- TAG-SRS-CONFIG-STOP +-- TAG-SRS-TPC-COMMANDCONFIG-START + +SRS-TPC-CommandConfig ::= SEQUENCE { + startingBitOfFormat2-3 INTEGER (1..31) OPTIONAL, -- Cond Setup + fieldTypeFormat2-3 INTEGER (0..1) OPTIONAL, -- Cond Setup + ..., + [[ + startingBitOfFormat2-3SUL-v1530 INTEGER (1..31) OPTIONAL -- Cond Setup + ]] +} + +-- TAG-SRS-TPC-COMMANDCONFIG-STOP +-- TAG-SSB-INDEX-START + +SSB-Index ::= INTEGER (0..maxNrofSSBs-1) + +-- TAG-SSB-INDEX-STOP +-- TAG-SSB-MTC-START + +SSB-MTC ::= SEQUENCE { + periodicityAndOffset CHOICE { + sf5 INTEGER (0..4), + sf10 INTEGER (0..9), + sf20 INTEGER (0..19), + sf40 INTEGER (0..39), + sf80 INTEGER (0..79), + sf160 INTEGER (0..159) + }, + duration ENUMERATED { sf1, sf2, sf3, sf4, sf5 } +} + +SSB-MTC2 ::= SEQUENCE { + pci-List SEQUENCE (SIZE (1..maxNrofPCIsPerSMTC)) OF PhysCellId OPTIONAL, -- Need M + periodicity ENUMERATED {sf5, sf10, sf20, sf40, sf80, spare3, spare2, spare1} +} + +-- TAG-SSB-MTC-STOP +-- TAG-SSB-TOMEASURE-START + +SSB-ToMeasure ::= CHOICE { + shortBitmap BIT STRING (SIZE (4)), + mediumBitmap BIT STRING (SIZE (8)), + longBitmap BIT STRING (SIZE (64)) +} + +-- TAG-SSB-TOMEASURE-STOP +-- TAG-SUBCARRIER-SPACING-START + +SubcarrierSpacing ::= ENUMERATED {kHz15, kHz30, kHz60, kHz120, kHz240, spare3, spare2, spare1} + +-- TAG-SUBCARRIER-SPACING-STOP +-- TAG-TAG-CONFIG-START + +TAG-Config ::= SEQUENCE { + tag-ToReleaseList SEQUENCE (SIZE (1..maxNrofTAGs)) OF TAG-Id OPTIONAL, -- Need N + tag-ToAddModList SEQUENCE (SIZE (1..maxNrofTAGs)) OF TAG OPTIONAL -- Need N +} + +TAG ::= SEQUENCE { + tag-Id TAG-Id, + timeAlignmentTimer TimeAlignmentTimer, + ... +} + +TAG-Id ::= INTEGER (0..maxNrofTAGs-1) + +TimeAlignmentTimer ::= ENUMERATED {ms500, ms750, ms1280, ms1920, ms2560, ms5120, ms10240, infinity} + +-- TAG-TAG-CONFIG-STOP +-- TAG-TCI-STATE-START + +TCI-State ::= SEQUENCE { + tci-StateId TCI-StateId, + qcl-Type1 QCL-Info, + qcl-Type2 QCL-Info OPTIONAL, -- Need R + ... +} + +QCL-Info ::= SEQUENCE { + cell ServCellIndex OPTIONAL, -- Need R + bwp-Id BWP-Id OPTIONAL, -- Cond CSI-RS-Indicated + referenceSignal CHOICE { + csi-rs NZP-CSI-RS-ResourceId, + ssb SSB-Index + }, + qcl-Type ENUMERATED {typeA, typeB, typeC, typeD}, + ... +} + +-- TAG-TCI-STATE-STOP +-- TAG-TCI-STATEID-START + +TCI-StateId ::= INTEGER (0..maxNrofTCI-States-1) + +-- TAG-TCI-STATEID-STOP +-- TAG-TDD-UL-DL-CONFIG-START + +TDD-UL-DL-ConfigCommon ::= SEQUENCE { + referenceSubcarrierSpacing SubcarrierSpacing, + pattern1 TDD-UL-DL-Pattern, + pattern2 TDD-UL-DL-Pattern OPTIONAL, -- Need R + ... +} + +TDD-UL-DL-Pattern ::= SEQUENCE { + dl-UL-TransmissionPeriodicity ENUMERATED {ms0p5, ms0p625, ms1, ms1p25, ms2, ms2p5, ms5, ms10}, + nrofDownlinkSlots INTEGER (0..maxNrofSlots), + nrofDownlinkSymbols INTEGER (0..maxNrofSymbols-1), + nrofUplinkSlots INTEGER (0..maxNrofSlots), + nrofUplinkSymbols INTEGER (0..maxNrofSymbols-1), + ..., + [[ + dl-UL-TransmissionPeriodicity-v1530 ENUMERATED {ms3, ms4} OPTIONAL -- Need R + ]] +} + +TDD-UL-DL-ConfigDedicated ::= SEQUENCE { + slotSpecificConfigurationsToAddModList SEQUENCE (SIZE (1..maxNrofSlots)) OF TDD-UL-DL-SlotConfig OPTIONAL, -- Need N + slotSpecificConfigurationsToreleaseList SEQUENCE (SIZE (1..maxNrofSlots)) OF TDD-UL-DL-SlotIndex OPTIONAL,-- Need N + ... +} + +TDD-UL-DL-SlotConfig ::= SEQUENCE { + slotIndex TDD-UL-DL-SlotIndex, + symbols CHOICE { + allDownlink NULL, + allUplink NULL, + explicit SEQUENCE { + nrofDownlinkSymbols INTEGER (1..maxNrofSymbols-1) OPTIONAL, -- Need S + nrofUplinkSymbols INTEGER (1..maxNrofSymbols-1) OPTIONAL -- Need S + } + } +} + +TDD-UL-DL-SlotIndex ::= INTEGER (0..maxNrofSlots-1) + +-- TAG-TDD-UL-DL-CONFIG-STOP +-- TAG-TRACKINGAREACODE-START + +TrackingAreaCode ::= BIT STRING (SIZE (24)) + +-- TAG-TRACKINGAREACODE-STOP +-- TAG-TRESELECTION-START + +T-Reselection ::= INTEGER (0..7) + +-- TAG-TRESELECTION-STOP +-- TAG-TIMETOTRIGGER-START + +TimeToTrigger ::= ENUMERATED { + ms0, ms40, ms64, ms80, ms100, ms128, ms160, ms256, + ms320, ms480, ms512, ms640, ms1024, ms1280, ms2560, + ms5120} + +-- TAG-TIMETOTRIGGER-STOP +-- TAG-UAC-BARRING-INFO-SET-INDEX-START + +UAC-BarringInfoSetIndex ::= INTEGER (1..maxBarringInfoSet) + +-- TAG-UAC-BARRING-INFO-SET-INDEX-STOP +-- TAG-UAC-BARRING-INFO-SET-LIST-START + +UAC-BarringInfoSetList ::= SEQUENCE (SIZE(1..maxBarringInfoSet)) OF UAC-BarringInfoSet + +UAC-BarringInfoSet ::= SEQUENCE { + uac-BarringFactor ENUMERATED {p00, p05, p10, p15, p20, p25, p30, p40, + p50, p60, p70, p75, p80, p85, p90, p95}, + uac-BarringTime ENUMERATED {s4, s8, s16, s32, s64, s128, s256, s512}, + uac-BarringForAccessIdentity BIT STRING (SIZE(7)) +} + +-- TAG-UAC-BARRING-INFO-SET-LIST-STOP +-- TAG-UAC-BARRING-PER-CAT-LIST-START + +UAC-BarringPerCatList ::= SEQUENCE (SIZE (1..maxAccessCat-1)) OF UAC-BarringPerCat + +UAC-BarringPerCat ::= SEQUENCE { + accessCategory INTEGER (1..maxAccessCat-1), + uac-barringInfoSetIndex UAC-BarringInfoSetIndex +} + +-- TAG-UAC-BARRING-PER-CAT-LIST-STOP +-- TAG-UAC-BARRING-PER-PLMN-LIST-START + +UAC-BarringPerPLMN-List ::= SEQUENCE (SIZE (1.. maxPLMN)) OF UAC-BarringPerPLMN + +UAC-BarringPerPLMN ::= SEQUENCE { + plmn-IdentityIndex INTEGER (1..maxPLMN), + uac-ACBarringListType CHOICE{ + uac-ImplicitACBarringList SEQUENCE (SIZE(maxAccessCat-1)) OF UAC-BarringInfoSetIndex, + uac-ExplicitACBarringList UAC-BarringPerCatList + } OPTIONAL +} + +-- TAG-UAC-BARRING-PER-PLMN-LIST-STOP +-- TAG-UE-TIMERS-AND-CONSTANTS-START + +UE-TimersAndConstants ::= SEQUENCE { + t300 ENUMERATED {ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000}, + t301 ENUMERATED {ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000}, + t310 ENUMERATED {ms0, ms50, ms100, ms200, ms500, ms1000, ms2000}, + n310 ENUMERATED {n1, n2, n3, n4, n6, n8, n10, n20}, + t311 ENUMERATED {ms1000, ms3000, ms5000, ms10000, ms15000, ms20000, ms30000}, + n311 ENUMERATED {n1, n2, n3, n4, n5, n6, n8, n10}, + t319 ENUMERATED {ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000}, + ... +} + +-- TAG-UE-TIMERS-AND-CONSTANTS-STOP +-- TAG-UPLINK-CONFIG-COMMON-START + +UplinkConfigCommon ::= SEQUENCE { + frequencyInfoUL FrequencyInfoUL OPTIONAL, -- Cond InterFreqHOAndServCellAddAndSIB1 + initialUplinkBWP BWP-UplinkCommon OPTIONAL, -- Cond ServCellAddAndSIB1 + dummy TimeAlignmentTimer +} + +-- TAG-UPLINK-CONFIG-COMMON-STOP +-- TAG-UPLINK-CONFIG-COMMON-START + +UplinkConfigCommonSIB ::= SEQUENCE { + frequencyInfoUL FrequencyInfoUL-SIB, + initialUplinkBWP BWP-UplinkCommon, + timeAlignmentTimerCommon TimeAlignmentTimer +} + +-- TAG-UPLINK-CONFIG-COMMON-STOP +-- TAG-UPLINKTXDIRECTCURRENTLIST-START + +UplinkTxDirectCurrentList ::= SEQUENCE (SIZE (1..maxNrofServingCells)) OF UplinkTxDirectCurrentCell + +UplinkTxDirectCurrentCell ::= SEQUENCE { + servCellIndex ServCellIndex, + uplinkDirectCurrentBWP SEQUENCE (SIZE (1..maxNrofBWPs)) OF UplinkTxDirectCurrentBWP, + ... +} + +UplinkTxDirectCurrentBWP ::= SEQUENCE { + bwp-Id BWP-Id, + shift7dot5kHz BOOLEAN, + txDirectCurrentLocation INTEGER (0..3301) +} + +-- TAG-UPLINKTXDIRECTCURRENTLIST-STOP +-- TAG-ZP-CSI-RS-RESOURCE-START + +ZP-CSI-RS-Resource ::= SEQUENCE { + zp-CSI-RS-ResourceId ZP-CSI-RS-ResourceId, + resourceMapping CSI-RS-ResourceMapping, + periodicityAndOffset CSI-ResourcePeriodicityAndOffset OPTIONAL, --Cond PeriodicOrSemiPersistent + ... +} + +ZP-CSI-RS-ResourceId ::= INTEGER (0..maxNrofZP-CSI-RS-Resources-1) + +-- TAG-ZP-CSI-RS-RESOURCE-STOP +-- TAG-ZP-CSI-RS-RESOURCESET-START + +ZP-CSI-RS-ResourceSet ::= SEQUENCE { + zp-CSI-RS-ResourceSetId ZP-CSI-RS-ResourceSetId, + zp-CSI-RS-ResourceIdList SEQUENCE (SIZE(1..maxNrofZP-CSI-RS-ResourcesPerSet)) OF ZP-CSI-RS-ResourceId, + ... +} + +-- TAG-ZP-CSI-RS-RESOURCESET-STOP +-- TAG-ZP-CSI-RS-RESOURCESETID-START + +ZP-CSI-RS-ResourceSetId ::= INTEGER (0..maxNrofZP-CSI-RS-ResourceSets-1) + +-- TAG-ZP-CSI-RS-RESOURCESETID-STOP +-- TAG-ACCESSSTRATUMRELEASE-START + +AccessStratumRelease ::= ENUMERATED { + rel15, spare7, spare6, spare5, spare4, spare3, spare2, spare1, ... } + +-- TAG-ACCESSSTRATUMRELEASE-STOP +-- TAG-BANDCOMBINATIONLIST-START + +BandCombinationList ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination + +BandCombination ::= SEQUENCE { + bandList SEQUENCE (SIZE (1..maxSimultaneousBands)) OF BandParameters, + featureSetCombination FeatureSetCombinationId, + + ca-ParametersEUTRA CA-ParametersEUTRA OPTIONAL, + ca-ParametersNR CA-ParametersNR OPTIONAL, + mrdc-Parameters MRDC-Parameters OPTIONAL, + supportedBandwidthCombinationSet BIT STRING (SIZE (1..32)) OPTIONAL, + powerClass-v1530 ENUMERATED {pc2} OPTIONAL +} + +BandParameters ::= CHOICE { + eutra SEQUENCE { + bandEUTRA FreqBandIndicatorEUTRA, + ca-BandwidthClassDL-EUTRA CA-BandwidthClassEUTRA OPTIONAL, + ca-BandwidthClassUL-EUTRA CA-BandwidthClassEUTRA OPTIONAL + }, + nr SEQUENCE { + bandNR FreqBandIndicatorNR, + ca-BandwidthClassDL-NR CA-BandwidthClassNR OPTIONAL, + ca-BandwidthClassUL-NR CA-BandwidthClassNR OPTIONAL + } +} + +-- TAG-BANDCOMBINATIONLIST-STOP +-- TAG-CA-BANDWIDTHCLASSEUTRA-START + +CA-BandwidthClassEUTRA ::= ENUMERATED {a, b, c, d, e, f, ...} + +-- TAG-CA-BANDWIDTHCLASSEUTRA-STOP +-- TAG-CA-BANDWIDTHCLASSNR-START + +CA-BandwidthClassNR ::= ENUMERATED {a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, ...} + +-- TAG-CA-BANDWIDTHCLASSNR-STOP +-- TAG-CA-PARAMETERSEUTRA-START + +CA-ParametersEUTRA ::= SEQUENCE { + multipleTimingAdvance ENUMERATED {supported} OPTIONAL, + simultaneousRx-Tx ENUMERATED {supported} OPTIONAL, + supportedNAICS-2CRS-AP BIT STRING (SIZE (1..8)) OPTIONAL, + additionalRx-Tx-PerformanceReq ENUMERATED {supported} OPTIONAL, + ue-CA-PowerClass-N ENUMERATED {class2} OPTIONAL, + supportedBandwidthCombinationSetEUTRA-v1530 BIT STRING (SIZE (1..32)) OPTIONAL, + ... +} + +-- TAG-CA-PARAMETERSEUTRA-STOP +-- TAG-CA-PARAMETERSNR-START + +CA-ParametersNR ::= SEQUENCE { + multipleTimingAdvances ENUMERATED {supported} OPTIONAL, + parallelTxSRS-PUCCH-PUSCH ENUMERATED {supported} OPTIONAL, + parallelTxPRACH-SRS-PUCCH-PUSCH ENUMERATED {supported} OPTIONAL, + simultaneousRxTxInterBandCA ENUMERATED {supported} OPTIONAL, + simultaneousRxTxSUL ENUMERATED {supported} OPTIONAL, + diffNumerologyAcrossPUCCH-Group ENUMERATED {supported} OPTIONAL, + diffNumerologyWithinPUCCH-Group ENUMERATED {supported} OPTIONAL, + supportedNumberTAG ENUMERATED {n2, n3, n4} OPTIONAL, + ... +} + +-- TAG-CA-PARAMETERSNR-STOP +-- TAG-FEATURESETCOMBINATION-START + +FeatureSetCombination ::= SEQUENCE (SIZE (1..maxSimultaneousBands)) OF FeatureSetsPerBand + +FeatureSetsPerBand ::= SEQUENCE (SIZE (1..maxFeatureSetsPerBand)) OF FeatureSet + +FeatureSet ::= CHOICE { + eutra SEQUENCE { + downlinkSetEUTRA FeatureSetEUTRA-DownlinkId, + uplinkSetEUTRA FeatureSetEUTRA-UplinkId + }, + nr SEQUENCE { + downlinkSetNR FeatureSetDownlinkId, + uplinkSetNR FeatureSetUplinkId + } +} + +-- TAG-FEATURESET-COMBINATION-ID-START + +FeatureSetCombinationId ::= INTEGER (0.. maxFeatureSetCombinations) + +-- TAG-FEATURESET-COMBINATION-ID-STOP +-- TAG-FEATURESETDOWNLINK-START + +FeatureSetDownlink ::= SEQUENCE { + featureSetListPerDownlinkCC SEQUENCE (SIZE (1..maxNrofServingCells)) OF FeatureSetDownlinkPerCC-Id, + + intraBandFreqSeparationDL FreqSeparationClass OPTIONAL, + scalingFactor ENUMERATED {f0p4, f0p75, f0p8} OPTIONAL, + crossCarrierScheduling-OtherSCS ENUMERATED {supported} OPTIONAL, + scellWithoutSSB ENUMERATED {supported} OPTIONAL, + csi-RS-MeasSCellWithoutSSB ENUMERATED {supported} OPTIONAL, + srs-AssocCSI-RS ENUMERATED {supported} OPTIONAL, + type1-3-CSS ENUMERATED {supported} OPTIONAL, + pdcch-MonitoringAnyOccasions ENUMERATED {withoutDCI-Gap, withDCI-Gap} OPTIONAL, + pdcch-MonitoringAnyOccasionsWithSpanGap ENUMERATED {supported} OPTIONAL, + ue-SpecificUL-DL-Assignment ENUMERATED {supported} OPTIONAL, + searchSpaceSharingCA-DL ENUMERATED {supported} OPTIONAL, + timeDurationForQCL SEQUENCE { + scs-60kHz ENUMERATED {s7, s14, s28} OPTIONAL, + sch-120kHz ENUMERATED {s14, s28} OPTIONAL + } OPTIONAL, + pdsch-DifferentTB-PerSlot SEQUENCE { + scs-15kHz ENUMERATED {upto2, upto4, upto7} OPTIONAL, + scs-30kHz ENUMERATED {upto2, upto4, upto7} OPTIONAL, + scs-60kHz ENUMERATED {upto2, upto4, upto7} OPTIONAL, + scs-120kHz ENUMERATED {upto2, upto4, upto7} OPTIONAL + } OPTIONAL, + csi-RS-IM-ReceptionForFeedback CSI-RS-IM-ReceptionForFeedback OPTIONAL, + typeI-SinglePanelCodebookList SEQUENCE (SIZE (1.. maxNrofCodebooks)) OF TypeI-SinglePanelCodebook OPTIONAL, + typeI-MultiPanelCodebookList SEQUENCE (SIZE (1.. maxNrofCodebooks)) OF TypeI-MultiPanelCodebook OPTIONAL, + typeII-CodebookList SEQUENCE (SIZE (1.. maxNrofCodebooks)) OF TypeII-Codebook OPTIONAL, + typeII-CodebookPortSelectionList SEQUENCE (SIZE (1.. maxNrofCodebooks)) OF TypeII-CodebookPortSelection OPTIONAL + +} + +CSI-RS-IM-ReceptionForFeedback ::= SEQUENCE { + maxNumberNZP-CSI-RS-PerCC INTEGER (1..32), + maxNumberPortsAcrossNZP-CSI-RS-PerCC ENUMERATED {p2, p4, p8, p12, p16, p24, p32, p40, p48, p56, p64, p72, p80, + p88, p96, p104, p112, p120, p128, p136, p144, p152, p160, p168, + p176, p184, p192, p200, p208, p216, p224, p232, p240, p248, p256}, + maxNumberCS-IM-PerCC ENUMERATED {n1, n2, n4, n8, n16, n32}, + maxNumberSimultaneousCSI-RS-ActBWP-AllCC ENUMERATED {n5, n6, n7, n8, n9, n10, n12, n14, n16, n18, n20, n22, n24, n26, + n28, n30, n32, n34, n36, n38, n40, n42, n44, n46, n48, n50, n52, + n54, n56, n58, n60, n62, n64}, + totalNumberPortsSimultaneousCSI-RS-ActBWP-AllCC ENUMERATED {p8, p12, p16, p24, p32, p40, p48, p56, p64, p72, p80, + p88, p96, p104, p112, p120, p128, p136, p144, p152, p160, p168, + p176, p184, p192, p200, p208, p216, p224, p232, p240, p248, p256} +} + +TypeI-SinglePanelCodebook ::= SEQUENCE { + maxNumberTxPortsPerResource ENUMERATED {p2, p4, p8, p12, p16, p24, p32}, + maxNumberResources INTEGER (1..64), + totalNumberTxPorts INTEGER (2..256), + supportedCodebookMode ENUMERATED {mode1, mode1AndMode2}, + maxNumberCSI-RS-PerResourceSet INTEGER (1..8) +} + +TypeI-MultiPanelCodebook ::= SEQUENCE { + maxNumberTxPortsPerResource ENUMERATED {p8, p16, p32}, + maxNumberResources INTEGER (1..64), + totalNumberTxPorts INTEGER (2..256), + supportedCodebookMode ENUMERATED {mode1, mode2, both}, + supportedNumberPanels ENUMERATED {n2, n4}, + maxNumberCSI-RS-PerResourceSet INTEGER (1..8) +} + +TypeII-Codebook ::= SEQUENCE { + maxNumberTxPortsPerResource ENUMERATED {p4, p8, p12, p16, p24, p32}, + maxNumberResources INTEGER (1..64), + totalNumberTxPorts INTEGER (2..256), + parameterLx INTEGER (2..4), + amplitudeScalingType ENUMERATED {wideband, widebandAndSubband}, + amplitudeSubsetRestriction ENUMERATED {supported} OPTIONAL, + maxNumberCSI-RS-PerResourceSet INTEGER (1..8) +} + +TypeII-CodebookPortSelection ::= SEQUENCE { + maxNumberTxPortsPerResource ENUMERATED {p4, p8, p12, p16, p24, p32}, + maxNumberResources INTEGER (1..64), + totalNumberTxPorts INTEGER (2..256), + parameterLx INTEGER (2..4), + amplitudeScalingType ENUMERATED {wideband, widebandAndSubband}, + maxNumberCSI-RS-PerResourceSet INTEGER (1..8) +} + +-- TAG-FEATURESETDOWNLINK-STOP +-- TAG-FEATURESET-DOWNLINK-ID-START + +FeatureSetDownlinkId ::= INTEGER (0..maxDownlinkFeatureSets) + +-- TAG-FEATURESET-DOWNLINK-ID-STOP +-- TAG-FEATURESETDOWNLINKPERCC-START + +FeatureSetDownlinkPerCC ::= SEQUENCE { + supportedSubcarrierSpacingDL SubcarrierSpacing, + supportedBandwidthDL SupportedBandwidth, + channelBW-90mhz ENUMERATED {supported} OPTIONAL, + maxNumberMIMO-LayersPDSCH MIMO-LayersDL OPTIONAL, + supportedModulationOrderDL ModulationOrder OPTIONAL +} + +-- TAG-FEATURESETDOWNLINKPERCC-STOP +-- TAG-FEATURESET-DOWNLINK-PER-CC-ID-START + +FeatureSetDownlinkPerCC-Id ::= INTEGER (1..maxPerCC-FeatureSets) + +-- TAG-FEATURESET-DOWNLINK-PER-CC-ID-STOP +-- TAG-FEATURESET-EUTRA-DOWNLINK-ID-START + +FeatureSetEUTRA-DownlinkId ::= INTEGER (0..maxEUTRA-DL-FeatureSets) + +-- TAG-FEATURESET-EUTRA-DOWNLINK-ID-STOP +-- TAG-FEATURESET-EUTRA-UPLINK-ID-START + +FeatureSetEUTRA-UplinkId ::= INTEGER (0..maxEUTRA-UL-FeatureSets) + +-- TAG-FEATURESET-EUTRA-UPLINK-ID-STOP +-- TAG-FEATURESETS-START + +FeatureSets ::= SEQUENCE { + featureSetsDownlink SEQUENCE (SIZE (1..maxDownlinkFeatureSets)) OF FeatureSetDownlink OPTIONAL, + featureSetsDownlinkPerCC SEQUENCE (SIZE (1..maxPerCC-FeatureSets)) OF FeatureSetDownlinkPerCC OPTIONAL, + featureSetsUplink SEQUENCE (SIZE (1..maxUplinkFeatureSets)) OF FeatureSetUplink OPTIONAL, + featureSetsUplinkPerCC SEQUENCE (SIZE (1..maxPerCC-FeatureSets)) OF FeatureSetUplinkPerCC OPTIONAL, + ... +} + +-- TAG-FEATURESETUPLINK-START + +FeatureSetUplink ::= SEQUENCE { + featureSetListPerUplinkCC SEQUENCE (SIZE (1.. maxNrofServingCells)) OF FeatureSetUplinkPerCC-Id, + scalingFactor ENUMERATED {f0p4, f0p75, f0p8} OPTIONAL, + crossCarrierScheduling-OtherSCS ENUMERATED {supported} OPTIONAL, + intraBandFreqSeparationUL FreqSeparationClass OPTIONAL, + searchSpaceSharingCA-UL ENUMERATED {supported} OPTIONAL, + srs-TxSwitch SRS-TxSwitch OPTIONAL, + supportedSRS-Resources SRS-Resources OPTIONAL, + twoPUCCH-Group ENUMERATED {supported} OPTIONAL, + dynamicSwitchSUL ENUMERATED {supported} OPTIONAL, + simultaneousTxSUL-NonSUL-v1530 ENUMERATED {supported} OPTIONAL, + pusch-DifferentTB-PerSlot SEQUENCE { + scs-15kHz ENUMERATED {upto2, upto4, upto7} OPTIONAL, + scs-30kHz ENUMERATED {upto2, upto4, upto7} OPTIONAL, + scs-60kHz ENUMERATED {upto2, upto4, upto7} OPTIONAL, + scs-120kHz ENUMERATED {upto2, upto4, upto7} OPTIONAL + } OPTIONAL, + csi-ReportFramework CSI-ReportFramework OPTIONAL +} + +CSI-ReportFramework ::= SEQUENCE { + maxNumberPeriodicCSI-ReportPerBWP INTEGER (1..4), + maxNumberAperiodicCSI-ReportPerBWP INTEGER (1..4), + maxNumberSemiPersistentCSI-ReportPerBWP INTEGER (0..4), + simultaneousCSI-ReportsAllCC INTEGER (5..32) +} + +-- TAG- FEATURESETUPLINK-STOP +-- TAG-FEATURESET-UPLINK-ID-START + +FeatureSetUplinkId ::= INTEGER (0..maxUplinkFeatureSets) + +-- TAG-FEATURESET-UPLINK-ID-STOP +-- TAG-FEATURESETUPLINKPERCC-START + +FeatureSetUplinkPerCC ::= SEQUENCE { + supportedSubcarrierSpacingUL SubcarrierSpacing, + supportedBandwidthUL SupportedBandwidth, + channelBW-90mhz ENUMERATED {supported} OPTIONAL, + mimo-CB-PUSCH SEQUENCE { + maxNumberMIMO-LayersCB-PUSCH MIMO-LayersUL OPTIONAL, + maxNumberSRS-ResourcePerSet INTEGER (1..2) + } OPTIONAL, + maxNumberMIMO-LayersNonCB-PUSCH MIMO-LayersUL OPTIONAL, + supportedModulationOrderUL ModulationOrder OPTIONAL + +} + +-- TAG-FEATURESETUPLINKPERCC-STOP +-- TAG-FEATURESET-UPLINK-PER-CC-ID-START + +FeatureSetUplinkPerCC-Id ::= INTEGER (1..maxPerCC-FeatureSets) + +-- TAG-FEATURESET-UPLINK-PER-CC-ID-STOP +-- TAG-FREQ-BAND-INDICATOR-EUTRA-START + +FreqBandIndicatorEUTRA ::= INTEGER (1..maxBandsEUTRA) + +-- TAG-FREQ-BAND-INDICATOR-EUTRA-STOP +-- TAG-FREQBANDLIST-START + +FreqBandList ::= SEQUENCE (SIZE (1..maxBandsMRDC)) OF FreqBandInformation + +FreqBandInformation ::= CHOICE { + bandInformationEUTRA FreqBandInformationEUTRA, + bandInformationNR FreqBandInformationNR +} + +FreqBandInformationEUTRA ::= SEQUENCE { + bandEUTRA FreqBandIndicatorEUTRA, + ca-BandwidthClassDL-EUTRA CA-BandwidthClassEUTRA OPTIONAL, -- Need N + ca-BandwidthClassUL-EUTRA CA-BandwidthClassEUTRA OPTIONAL -- Need N +} + +FreqBandInformationNR ::= SEQUENCE { + bandNR FreqBandIndicatorNR, + maxBandwidthRequestedDL AggregatedBandwidth OPTIONAL, -- Need N + maxBandwidthRequestedUL AggregatedBandwidth OPTIONAL, -- Need N + maxCarriersRequestedDL INTEGER (1..maxNrofServingCells) OPTIONAL, -- Need N + maxCarriersRequestedUL INTEGER (1..maxNrofServingCells) OPTIONAL -- Need N +} + +AggregatedBandwidth ::= ENUMERATED {mhz50, mhz100, mhz150, mhz200, mhz250, mhz300, mhz350, + mhz400, mhz450, mhz500, mhz550, mhz600, mhz650, mhz700, mhz750, mhz800} + +-- TAG-FREQBANDLIST-STOP +-- TAG-FREQSEPARATIONCLASS-START + +FreqSeparationClass ::= ENUMERATED {c1, c2, c3, ...} + +-- TAG-FREQSEPARATIONCLASS-STOP +-- TAG-INTERRAT-PARAMETERS-START + +InterRAT-Parameters ::= SEQUENCE { + eutra EUTRA-Parameters OPTIONAL, + ... +} + +EUTRA-Parameters ::= SEQUENCE { + supportedBandListEUTRA SEQUENCE (SIZE (1..maxBandsEUTRA)) OF FreqBandIndicatorEUTRA, + eutra-ParametersCommon EUTRA-ParametersCommon OPTIONAL, + eutra-ParametersXDD-Diff EUTRA-ParametersXDD-Diff OPTIONAL, + ... +} + +EUTRA-ParametersCommon ::= SEQUENCE { + mfbi-EUTRA ENUMERATED {supported} OPTIONAL, + modifiedMRP-BehaviorEUTRA BIT STRING (SIZE (32)) OPTIONAL, + multiNS-Pmax-EUTRA ENUMERATED {supported} OPTIONAL, + rs-SINR-MeasEUTRA ENUMERATED {supported} OPTIONAL, + ... +} + +EUTRA-ParametersXDD-Diff ::= SEQUENCE { + rsrqMeasWidebandEUTRA ENUMERATED {supported} OPTIONAL, + ... +} + +-- TAG-INTERRAT-PARAMETERS-STOP +-- TAG-MAC-PARAMETERS-START + +MAC-Parameters ::= SEQUENCE { + mac-ParametersCommon MAC-ParametersCommon OPTIONAL, + mac-ParametersXDD-Diff MAC-ParametersXDD-Diff OPTIONAL +} + +MAC-ParametersCommon ::= SEQUENCE { + lcp-Restriction ENUMERATED {supported} OPTIONAL, + pucch-SpatialRelInfoMAC-CE ENUMERATED {supported} OPTIONAL, + lch-ToSCellRestriction ENUMERATED {supported} OPTIONAL, + ..., + [[ + recommendedBitRate ENUMERATED {supported} OPTIONAL, + recommendedBitRateQuery ENUMERATED {supported} OPTIONAL + ]] +} + +MAC-ParametersXDD-Diff ::= SEQUENCE { + skipUplinkTxDynamic ENUMERATED {supported} OPTIONAL, + logicalChannelSR-DelayTimer ENUMERATED {supported} OPTIONAL, + longDRX-Cycle ENUMERATED {supported} OPTIONAL, + shortDRX-Cycle ENUMERATED {supported} OPTIONAL, + multipleSR-Configurations ENUMERATED {supported} OPTIONAL, + multipleConfiguredGrants ENUMERATED {supported} OPTIONAL, + ... +} + +-- TAG-MAC-PARAMETERS-STOP +-- TAG-MEASANDMOBPARAMETERS-START + +MeasAndMobParameters ::= SEQUENCE { + measAndMobParametersCommon MeasAndMobParametersCommon OPTIONAL, + measAndMobParametersXDD-Diff MeasAndMobParametersXDD-Diff OPTIONAL, + measAndMobParametersFRX-Diff MeasAndMobParametersFRX-Diff OPTIONAL +} + +MeasAndMobParametersCommon ::= SEQUENCE { + supportedGapPattern BIT STRING (SIZE (22)) OPTIONAL, + ssb-RLM ENUMERATED {supported} OPTIONAL, + ssb-AndCSI-RS-RLM ENUMERATED {supported} OPTIONAL, + ..., + [[ + eventB-MeasAndReport ENUMERATED {supported} OPTIONAL, + handoverFDD-TDD ENUMERATED {supported} OPTIONAL, + eutra-CGI-Reporting ENUMERATED {supported} OPTIONAL, + nr-CGI-Reporting ENUMERATED {supported} OPTIONAL + ]] +} + +MeasAndMobParametersXDD-Diff ::= SEQUENCE { + intraAndInterF-MeasAndReport ENUMERATED {supported} OPTIONAL, + eventA-MeasAndReport ENUMERATED {supported} OPTIONAL, + ..., + [[ + handoverInterF ENUMERATED {supported} OPTIONAL, + handoverLTE ENUMERATED {supported} OPTIONAL, + handover-eLTE ENUMERATED {supported} OPTIONAL + ]] +} + +MeasAndMobParametersFRX-Diff ::= SEQUENCE { + ss-SINR-Meas ENUMERATED {supported} OPTIONAL, + csi-RSRP-AndRSRQ-MeasWithSSB ENUMERATED {supported} OPTIONAL, + csi-RSRP-AndRSRQ-MeasWithoutSSB ENUMERATED {supported} OPTIONAL, + csi-SINR-Meas ENUMERATED {supported} OPTIONAL, + csi-RS-RLM ENUMERATED {supported} OPTIONAL, + ..., + [[ + handoverInterF ENUMERATED {supported} OPTIONAL, + handoverLTE ENUMERATED {supported} OPTIONAL, + handover-eLTE ENUMERATED {supported} OPTIONAL + ]] +} + +-- TAG-MEASANDMOBPARAMETERS-STOP +-- TAG-MEASANDMOBPARAMETERSMRDC-START + +MeasAndMobParametersMRDC ::= SEQUENCE { + measAndMobParametersMRDC-Common MeasAndMobParametersMRDC-Common OPTIONAL, + measAndMobParametersMRDC-XDD-Diff MeasAndMobParametersMRDC-XDD-Diff OPTIONAL, + measAndMobParametersMRDC-FRX-Diff MeasAndMobParametersMRDC-FRX-Diff OPTIONAL +} + +MeasAndMobParametersMRDC-Common ::= SEQUENCE { + independentGapConfig ENUMERATED {supported} OPTIONAL +} + +MeasAndMobParametersMRDC-XDD-Diff ::= SEQUENCE { + sftd-MeasPSCell ENUMERATED {supported} OPTIONAL, + sftd-MeasNR-Cell ENUMERATED {supported} OPTIONAL +} + +MeasAndMobParametersMRDC-FRX-Diff ::= SEQUENCE { + simultaneousRxDataSSB-DiffNumerology ENUMERATED {supported} OPTIONAL +} + +-- TAG-MEASANDMOBPARAMETERSMRDC-STOP +-- TAG-MIMO-LAYERS-START + +MIMO-LayersDL ::= ENUMERATED {twoLayers, fourLayers, eightLayers} + +MIMO-LayersUL ::= ENUMERATED {oneLayer, twoLayers, fourLayers} + +-- TAG-MIMO-LAYERS-STOP +-- TAG-MIMO-PARAMETERSPERBAND-START + +MIMO-ParametersPerBand ::= SEQUENCE { + tci-StatePDSCH SEQUENCE { + maxNumberConfiguredTCIstatesPerCC ENUMERATED {n4, n8, n16, n32, n64, n128} OPTIONAL, + maxNumberActiveTCI-PerBWP ENUMERATED {n1, n2, n4, n8} OPTIONAL + } OPTIONAL, + additionalActiveTCI-StatePDCCH ENUMERATED {supported} OPTIONAL, + pusch-TransCoherence ENUMERATED {nonCoherent, partialNonCoherent, fullCoherent} OPTIONAL, + beamCorrespondence ENUMERATED {supported} OPTIONAL, + periodicBeamReport ENUMERATED {supported} OPTIONAL, + aperiodicBeamReport ENUMERATED {supported} OPTIONAL, + sp-BeamReportPUCCH ENUMERATED {supported} OPTIONAL, + sp-BeamReportPUSCH ENUMERATED {supported} OPTIONAL, + beamManagementSSB-CSI-RS BeamManagementSSB-CSI-RS OPTIONAL, + maxNumberRxBeam INTEGER (2..8) OPTIONAL, + maxNumberRxTxBeamSwitchDL SEQUENCE { + scs-15kHz ENUMERATED {n4, n7, n14} OPTIONAL, + scs-30kHz ENUMERATED {n4, n7, n14} OPTIONAL, + scs-60kHz ENUMERATED {n4, n7, n14} OPTIONAL, + scs-120kHz ENUMERATED {n4, n7, n14} OPTIONAL, + scs-240kHz ENUMERATED {n4, n7, n14} OPTIONAL + } OPTIONAL, + maxNumberNonGroupBeamReporting ENUMERATED {n1, n2, n4} OPTIONAL, + groupBeamReporting ENUMERATED {supported} OPTIONAL, + uplinkBeamManagement SEQUENCE { + maxNumberSRS-ResourcePerSet-BM ENUMERATED {n2, n4, n8, n16}, + maxNumberSRS-ResourceSet INTEGER (1..8) + } OPTIONAL, + maxNumberCSI-RS-BFR INTEGER (1..64) OPTIONAL, + maxNumberSSB-BFR INTEGER (1..64) OPTIONAL, + maxNumberCSI-RS-SSB-BFR INTEGER (1..256) OPTIONAL, + twoPortsPTRS-DL ENUMERATED {supported} OPTIONAL, + twoPortsPTRS-UL ENUMERATED {supported} OPTIONAL, + supportedSRS-Resources SRS-Resources OPTIONAL, + maxNumberSimultaneousSRS-PerCC INTEGER (1..4) OPTIONAL, + beamReportTiming SEQUENCE { + scs-15kHz ENUMERATED {sym2, sym4, sym8} OPTIONAL, + scs-30kHz ENUMERATED {sym4, sym8, sym14} OPTIONAL, + scs-60kHz ENUMERATED {sym8, sym14, sym28} OPTIONAL, + scs-120kHz ENUMERATED {sym14, sym28, sym56} OPTIONAL + } OPTIONAL, + ptrs-DensityRecommendationSetDL SEQUENCE { + scs-15kHz PTRS-DensityRecommendationDL OPTIONAL, + scs-30kHz PTRS-DensityRecommendationDL OPTIONAL, + scs-60kHz PTRS-DensityRecommendationDL OPTIONAL, + scs-120kHz PTRS-DensityRecommendationDL OPTIONAL + } OPTIONAL, + ptrs-DensityRecommendationSetUL SEQUENCE { + scs-15kHz PTRS-DensityRecommendationUL OPTIONAL, + scs-30kHz PTRS-DensityRecommendationUL OPTIONAL, + scs-60kHz PTRS-DensityRecommendationUL OPTIONAL, + scs-120kHz PTRS-DensityRecommendationUL OPTIONAL + } OPTIONAL, + csi-RS-ForTracking CSI-RS-ForTracking OPTIONAL, + aperiodicTRS ENUMERATED {supported} OPTIONAL, + ... +} + +BeamManagementSSB-CSI-RS ::= SEQUENCE { + maxNumberSSB-CSI-RS-ResourceOneTx ENUMERATED {n8, n16, n32, n64}, + maxNumberSSB-CSI-RS-ResourceTwoTx ENUMERATED {n0, n4, n8, n16, n32, n64}, + supportedCSI-RS-Density ENUMERATED {one, three, oneAndThree} +} + +CSI-RS-ForTracking ::= SEQUENCE { + burstLength INTEGER (1..2), + maxSimultaneousResourceSetsPerCC INTEGER (1..8), + maxConfiguredResourceSetsPerCC INTEGER (1..64), + maxConfiguredResourceSetsAllCC INTEGER (1..128) +} + +PTRS-DensityRecommendationDL ::= SEQUENCE { + frequencyDensity1 INTEGER (1..276), + frequencyDensity2 INTEGER (1..276), + timeDensity1 INTEGER (0..29), + timeDensity2 INTEGER (0..29), + timeDensity3 INTEGER (0..29) +} + +PTRS-DensityRecommendationUL ::= SEQUENCE { + frequencyDensity1 INTEGER (1..276), + frequencyDensity2 INTEGER (1..276), + timeDensity1 INTEGER (0..29), + timeDensity2 INTEGER (0..29), + timeDensity3 INTEGER (0..29), + sampleDensity1 INTEGER (1..276), + sampleDensity2 INTEGER (1..276), + sampleDensity3 INTEGER (1..276), + sampleDensity4 INTEGER (1..276), + sampleDensity5 INTEGER (1..276) +} + +SRS-Resources ::= SEQUENCE { + maxNumberAperiodicSRS-PerBWP ENUMERATED {n1, n2, n4, n8, n16}, + maxNumberAperiodicSRS-PerBWP-PerSlot INTEGER (1..6), + maxNumberPeriodicSRS-PerBWP ENUMERATED {n1, n2, n4, n8, n16}, + maxNumberPeriodicSRS-PerBWP-PerSlot INTEGER (1..6), + maxNumberSemiPersitentSRS-PerBWP ENUMERATED {n1, n2, n4, n8, n16}, + maxNumberSP-SRS-PerBWP-PerSlot INTEGER (1..6), + maxNumberSRS-Ports-PerResource ENUMERATED {n1, n2, n4} +} + +SRS-TxSwitch ::= SEQUENCE { + supportedSRS-TxPortSwitch ENUMERATED {t1r2, t1r4, t2r4, t1r4-t2r4, tr-equal}, + txSwitchImpactToRx ENUMERATED {true} OPTIONAL +} + +-- TAG-MODULATION-ORDER-START + +ModulationOrder ::= ENUMERATED {bpsk-halfpi, bpsk, qpsk, qam16, qam64, qam256} + +-- TAG-MODULATION-ORDER-STOP +-- TAG-MRDC-PARAMETERS-START + +MRDC-Parameters ::= SEQUENCE { + singleUL-Transmission ENUMERATED {supported} OPTIONAL, + dynamicPowerSharing ENUMERATED {supported} OPTIONAL, + tdm-Pattern ENUMERATED {supported} OPTIONAL, + ul-SharingEUTRA-NR ENUMERATED {tdm, fdm, both} OPTIONAL, + ul-SwitchingTimeEUTRA-NR ENUMERATED {type1, type2} OPTIONAL, + simultaneousRxTxInterBandENDC ENUMERATED {supported} OPTIONAL, + asyncIntraBandENDC ENUMERATED {supported} OPTIONAL, + ... +} + +-- TAG-MRDC-PARAMETERS-STOP +-- TAG-PDCP-PARAMETERS-START + +PDCP-Parameters ::= SEQUENCE { + supportedROHC-Profiles SEQUENCE { + profile0x0000 BOOLEAN, + profile0x0001 BOOLEAN, + profile0x0002 BOOLEAN, + profile0x0003 BOOLEAN, + profile0x0004 BOOLEAN, + profile0x0006 BOOLEAN, + profile0x0101 BOOLEAN, + profile0x0102 BOOLEAN, + profile0x0103 BOOLEAN, + profile0x0104 BOOLEAN + }, + maxNumberROHC-ContextSessions ENUMERATED {cs2, cs4, cs8, cs12, cs16, cs24, cs32, cs48, cs64, + cs128, cs256, cs512, cs1024, cs16384, spare2, spare1}, + uplinkOnlyROHC-Profiles ENUMERATED {supported} OPTIONAL, + continueROHC-Context ENUMERATED {supported} OPTIONAL, + outOfOrderDelivery ENUMERATED {supported} OPTIONAL, + shortSN ENUMERATED {supported} OPTIONAL, + pdcp-DuplicationSRB3 ENUMERATED {supported} OPTIONAL, + pdcp-DuplicationMCG-OrSCG ENUMERATED {supported} OPTIONAL, + ... +} + +-- TAG-PDCP-PARAMETERS-STOP +-- TAG-PDCP-PARAMETERSMRDC-START + +PDCP-ParametersMRDC ::= SEQUENCE { + pdcp-DuplicationSplitSRB ENUMERATED {supported} OPTIONAL, + pdcp-DuplicationSplitDRB ENUMERATED {supported} OPTIONAL +} + +-- TAG-PDCP-PARAMETERSMRDC-STOP +-- TAG-PHY-PARAMETERS-START + +Phy-Parameters ::= SEQUENCE { + phy-ParametersCommon Phy-ParametersCommon OPTIONAL, + phy-ParametersXDD-Diff Phy-ParametersXDD-Diff OPTIONAL, + phy-ParametersFRX-Diff Phy-ParametersFRX-Diff OPTIONAL, + phy-ParametersFR1 Phy-ParametersFR1 OPTIONAL, + phy-ParametersFR2 Phy-ParametersFR2 OPTIONAL +} + +Phy-ParametersCommon ::= SEQUENCE { + csi-RS-CFRA-ForHO ENUMERATED {supported} OPTIONAL, + dynamicPRB-BundlingDL ENUMERATED {supported} OPTIONAL, + sp-CSI-ReportPUCCH ENUMERATED {supported} OPTIONAL, + sp-CSI-ReportPUSCH ENUMERATED {supported} OPTIONAL, + nzp-CSI-RS-IntefMgmt ENUMERATED {supported} OPTIONAL, + type2-SP-CSI-Feedback-LongPUCCH ENUMERATED {supported} OPTIONAL, + precoderGranularityCORESET ENUMERATED {supported} OPTIONAL, + dynamicHARQ-ACK-Codebook ENUMERATED {supported} OPTIONAL, + semiStaticHARQ-ACK-Codebook ENUMERATED {supported} OPTIONAL, + spatialBundlingHARQ-ACK ENUMERATED {supported} OPTIONAL, + dynamicBetaOffsetInd-HARQ-ACK-CSI ENUMERATED {supported} OPTIONAL, + pucch-Repetition-F1-3-4 ENUMERATED {supported} OPTIONAL, + ra-Type0-PUSCH ENUMERATED {supported} OPTIONAL, + dynamicSwitchRA-Type0-1-PDSCH ENUMERATED {supported} OPTIONAL, + dynamicSwitchRA-Type0-1-PUSCH ENUMERATED {supported} OPTIONAL, + pdsch-MappingTypeA ENUMERATED {supported} OPTIONAL, + pdsch-MappingTypeB ENUMERATED {supported} OPTIONAL, + interleavingVRB-ToPRB-PDSCH ENUMERATED {supported} OPTIONAL, + interSlotFreqHopping-PUSCH ENUMERATED {supported} OPTIONAL, + type1-PUSCH-RepetitionMultiSlots ENUMERATED {supported} OPTIONAL, + type2-PUSCH-RepetitionMultiSlots ENUMERATED {supported} OPTIONAL, + pusch-RepetitionMultiSlots ENUMERATED {supported} OPTIONAL, + pdsch-RepetitionMultiSlots ENUMERATED {supported} OPTIONAL, + downlinkSPS ENUMERATED {supported} OPTIONAL, + configuredUL-GrantType1 ENUMERATED {supported} OPTIONAL, + configuredUL-GrantType2 ENUMERATED {supported} OPTIONAL, + pre-EmptIndication-DL ENUMERATED {supported} OPTIONAL, + cbg-TransIndication-DL ENUMERATED {supported} OPTIONAL, + cbg-TransIndication-UL ENUMERATED {supported} OPTIONAL, + cbg-FlushIndication-DL ENUMERATED {supported} OPTIONAL, + dynamicHARQ-ACK-CodeB-CBG-Retx-DL ENUMERATED {supported} OPTIONAL, + rateMatchingResrcSetSemi-Static ENUMERATED {supported} OPTIONAL, + rateMatchingResrcSetDynamic ENUMERATED {supported} OPTIONAL, + bwp-SwitchingDelay ENUMERATED {type1, type2} OPTIONAL, + ... , + [[ + eutra-RS-SINR-measurement ENUMERATED {supported} OPTIONAL + ]] +} + +Phy-ParametersXDD-Diff ::= SEQUENCE { + dynamicSFI ENUMERATED {supported} OPTIONAL, + twoPUCCH-F0-2-ConsecSymbols ENUMERATED {supported} OPTIONAL, + twoDifferentTPC-Loop-PUSCH ENUMERATED {supported} OPTIONAL, + twoDifferentTPC-Loop-PUCCH ENUMERATED {supported} OPTIONAL, + ... +} + +Phy-ParametersFRX-Diff ::= SEQUENCE { + dynamicSFI ENUMERATED {supported} OPTIONAL, + oneFL-DMRS-TwoAdditionalDMRS BIT STRING (SIZE (2)) OPTIONAL, + twoFL-DMRS BIT STRING (SIZE (2)) OPTIONAL, + twoFL-DMRS-TwoAdditionalDMRS BIT STRING (SIZE (2)) OPTIONAL, + oneFL-DMRS-ThreeAdditionalDMRS BIT STRING (SIZE (2)) OPTIONAL, + supportedDMRS-TypeDL ENUMERATED {type1, type1And2} OPTIONAL, + supportedDMRS-TypeUL ENUMERATED {type1, type1And2} OPTIONAL, + semiOpenLoopCSI ENUMERATED {supported} OPTIONAL, + csi-ReportWithoutPMI ENUMERATED {supported} OPTIONAL, + csi-ReportWithoutCQI ENUMERATED {supported} OPTIONAL, + onePortsPTRS BIT STRING (SIZE (2)) OPTIONAL, + twoPUCCH-F0-2-ConsecSymbols ENUMERATED {supported} OPTIONAL, + pucch-F2-WithFH ENUMERATED {supported} OPTIONAL, + pucch-F3-WithFH ENUMERATED {supported} OPTIONAL, + pucch-F4-WithFH ENUMERATED {supported} OPTIONAL, + freqHoppingPUCCH-F0-2 ENUMERATED {notSupported} OPTIONAL, + freqHoppingPUCCH-F1-3-4 ENUMERATED {notSupported} OPTIONAL, + mux-SR-HARQ-ACK-CSI-PUCCH ENUMERATED {supported} OPTIONAL, + uci-CodeBlockSegmentation ENUMERATED {supported} OPTIONAL, + onePUCCH-LongAndShortFormat ENUMERATED {supported} OPTIONAL, + twoPUCCH-AnyOthersInSlot ENUMERATED {supported} OPTIONAL, + intraSlotFreqHopping-PUSCH ENUMERATED {supported} OPTIONAL, + pusch-LBRM ENUMERATED {supported} OPTIONAL, + pdcch-BlindDetectionCA INTEGER (4..16) OPTIONAL, + tpc-PUSCH-RNTI ENUMERATED {supported} OPTIONAL, + tpc-PUCCH-RNTI ENUMERATED {supported} OPTIONAL, + tpc-SRS-RNTI ENUMERATED {supported} OPTIONAL, + absoluteTPC-Command ENUMERATED {supported} OPTIONAL, + twoDifferentTPC-Loop-PUSCH ENUMERATED {supported} OPTIONAL, + twoDifferentTPC-Loop-PUCCH ENUMERATED {supported} OPTIONAL, + pusch-HalfPi-BPSK ENUMERATED {supported} OPTIONAL, + pucch-F3-4-HalfPi-BPSK ENUMERATED {supported} OPTIONAL, + almostContiguousCP-OFDM-UL ENUMERATED {supported} OPTIONAL, + sp-CSI-RS ENUMERATED {supported} OPTIONAL, + sp-CSI-IM ENUMERATED {supported} OPTIONAL, + tdd-MultiDL-UL-SwitchPerSlot ENUMERATED {supported} OPTIONAL, + multipleCORESET ENUMERATED {supported} OPTIONAL, + ... +} + +Phy-ParametersFR1 ::= SEQUENCE { + pdcchMonitoringSingleOccasion ENUMERATED {supported} OPTIONAL, + scs-60kHz ENUMERATED {supported} OPTIONAL, + pdsch-256QAM-FR1 ENUMERATED {supported} OPTIONAL, + pdsch-RE-MappingFR1 ENUMERATED {n10, n20} OPTIONAL, + ... +} + +Phy-ParametersFR2 ::= SEQUENCE { + calibrationGapPA ENUMERATED {supported} OPTIONAL, + pdsch-RE-MappingFR2 ENUMERATED {n6, n20} OPTIONAL, + ... +} + +-- TAG-PHY-PARAMETERS-STOP +-- TAG-PHY-PARAMETERSMRDC-START + +Phy-ParametersMRDC ::= SEQUENCE { + naics-Capability-List SEQUENCE (SIZE (1..maxNrofNAICS-Entries)) OF NAICS-Capability-Entry OPTIONAL, + ... +} + +NAICS-Capability-Entry ::= SEQUENCE { + numberOfNAICS-CapableCC INTEGER(1..5), + numberOfAggregatedPRB ENUMERATED {n50, n75, n100, n125, n150, n175, n200, n225, + n250, n275, n300, n350, n400, n450, n500, spare}, + ... +} + +-- TAG-PHY-PARAMETERSMRDC-STOP +-- TAG-RAT-TYPE-START + +RAT-Type ::= ENUMERATED {nr, eutra-nr, eutra, spare1, ...} + +-- TAG-RAT-TYPE-STOP +-- TAG-RF-PARAMETERS-START + +RF-Parameters ::= SEQUENCE { + supportedBandListNR SEQUENCE (SIZE (1..maxBands)) OF BandNR, + supportedBandCombinationList BandCombinationList OPTIONAL, + appliedFreqBandListFilter FreqBandList OPTIONAL, + ... +} + +BandNR ::= SEQUENCE { + bandNR FreqBandIndicatorNR, + modifiedMPR-Behaviour BIT STRING (SIZE (8)) OPTIONAL, + mimo-ParametersPerBand MIMO-ParametersPerBand OPTIONAL, + extendedCP ENUMERATED {supported} OPTIONAL, + multipleTCI ENUMERATED {supported} OPTIONAL, + bwp-WithoutRestriction ENUMERATED {supported} OPTIONAL, + bwp-SameNumerology ENUMERATED {upto2, upto4} OPTIONAL, + bwp-DiffNumerology ENUMERATED {upto4} OPTIONAL, + crossCarrierScheduling-SameSCS ENUMERATED {supported} OPTIONAL, + pdsch-256QAM-FR2 ENUMERATED {supported} OPTIONAL, + pusch-256QAM ENUMERATED {supported} OPTIONAL, + ue-PowerClass ENUMERATED {pc1, pc2, pc3, pc4} OPTIONAL, + rateMatchingLTE-CRS ENUMERATED {supported} OPTIONAL, + channelBWs-DL-v1530 CHOICE { + fr1 SEQUENCE { + scs-15kHz BIT STRING (SIZE (10)) OPTIONAL, + scs-30kHz BIT STRING (SIZE (10)) OPTIONAL, + scs-60kHz BIT STRING (SIZE (10)) OPTIONAL + }, + fr2 SEQUENCE { + scs-60kHz BIT STRING (SIZE (3)) OPTIONAL, + scs-120kHz BIT STRING (SIZE (3)) OPTIONAL + } + } OPTIONAL, + channelBWs-UL-v1530 CHOICE { + fr1 SEQUENCE { + scs-15kHz BIT STRING (SIZE (10)) OPTIONAL, + scs-30kHz BIT STRING (SIZE (10)) OPTIONAL, + scs-60kHz BIT STRING (SIZE (10)) OPTIONAL + }, + fr2 SEQUENCE { + scs-60kHz BIT STRING (SIZE (3)) OPTIONAL, + scs-120kHz BIT STRING (SIZE (3)) OPTIONAL + } + } OPTIONAL, + ..., + [[ + maxUplinkDutyCycle ENUMERATED {n60, n70, n80, n90, n100} OPTIONAL + ]] + +} + +-- TAG-RF-PARAMETERS-STOP +-- TAG-RF-PARAMETERSMRDC-START + +RF-ParametersMRDC ::= SEQUENCE { + supportedBandCombinationList BandCombinationList OPTIONAL, + appliedFreqBandListFilter FreqBandList OPTIONAL, + ... +} + +-- TAG-RF-PARAMETERSMRDC-STOP +-- TAG-RLC-PARAMETERS-START + +RLC-Parameters ::= SEQUENCE { + am-WithShortSN ENUMERATED {supported} OPTIONAL, + um-WithShortSN ENUMERATED {supported} OPTIONAL, + um-WithLongSN ENUMERATED {supported} OPTIONAL, + ... +} + +-- TAG-RLC-PARAMETERS-STOP +-- TAG-SUPPORTEDBANDWIDTH-START + +SupportedBandwidth ::= CHOICE { + fr1 ENUMERATED {mhz5, mhz10, mhz15, mhz20, mhz25, mhz30, mhz40, mhz50, mhz60, mhz80, mhz100}, + fr2 ENUMERATED {mhz50, mhz100, mhz200, mhz400} +} + +-- TAG-SUPPORTEDBANDWIDTH-STOP +-- TAG-UE-CAPABILITY-RAT-CONTAINER-LIST-START + +UE-CapabilityRAT-ContainerList ::=SEQUENCE (SIZE (0..maxRAT-CapabilityContainers)) OF UE-CapabilityRAT-Container + +UE-CapabilityRAT-Container ::= SEQUENCE { + rat-Type RAT-Type, + ue-CapabilityRAT-Container OCTET STRING +} + +-- TAG-UE-CAPABILITY-RAT-CONTAINER-LIST-STOP +-- TAG-UE-CAPABILITYRAT-REQUESTLIST-START + +UE-CapabilityRAT-RequestList ::= SEQUENCE (SIZE (1..maxRAT-CapabilityContainers)) OF UE-CapabilityRAT-Request + +UE-CapabilityRAT-Request ::= SEQUENCE { + rat-Type RAT-Type, + capabilityRequestFilter OCTET STRING OPTIONAL, -- Need N + ... +} + +-- TAG-UE-CAPABILITYRAT-REQUESTLIST-STOP +-- TAG-UE-CAPABILITYREQUESTFILTERNR-START + +UE-CapabilityRequestFilterNR ::= SEQUENCE { + frequencyBandList FreqBandList OPTIONAL, -- Need N + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-UE-CAPABILITYREQUESTFILTERNR-STOP +-- TAG-UE-MRDC-CAPABILITY-START + +UE-MRDC-Capability ::= SEQUENCE { + measAndMobParametersMRDC MeasAndMobParametersMRDC OPTIONAL, + phy-ParametersMRDC-v1530 Phy-ParametersMRDC OPTIONAL, + rf-ParametersMRDC RF-ParametersMRDC, + generalParametersMRDC GeneralParametersMRDC-XDD-Diff OPTIONAL, + fdd-Add-UE-MRDC-Capabilities UE-MRDC-CapabilityAddXDD-Mode OPTIONAL, + tdd-Add-UE-MRDC-Capabilities UE-MRDC-CapabilityAddXDD-Mode OPTIONAL, + fr1-Add-UE-MRDC-Capabilities UE-MRDC-CapabilityAddFRX-Mode OPTIONAL, + fr2-Add-UE-MRDC-Capabilities UE-MRDC-CapabilityAddFRX-Mode OPTIONAL, + featureSetCombinations SEQUENCE (SIZE (1..maxFeatureSetCombinations)) OF FeatureSetCombination OPTIONAL, + pdcp-ParametersMRDC-v1530 PDCP-ParametersMRDC OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +UE-MRDC-CapabilityAddXDD-Mode ::= SEQUENCE { + measAndMobParametersMRDC-XDD-Diff MeasAndMobParametersMRDC-XDD-Diff OPTIONAL, + generalParametersMRDC-XDD-Diff GeneralParametersMRDC-XDD-Diff OPTIONAL +} + +UE-MRDC-CapabilityAddFRX-Mode ::= SEQUENCE { + measAndMobParametersMRDC-FRX-Diff MeasAndMobParametersMRDC-FRX-Diff +} + + +GeneralParametersMRDC-XDD-Diff ::= SEQUENCE { + splitSRB-WithOneUL-Path ENUMERATED {supported} OPTIONAL, + splitDRB-withUL-Both-MCG-SCG ENUMERATED {supported} OPTIONAL, + srb3 ENUMERATED {supported} OPTIONAL, + v2x-EUTRA-v1530 ENUMERATED {supported} OPTIONAL, + ... +} + +-- TAG-UE-MRDC-CAPABILITY-STOP +-- TAG-UE-NR-CAPABILITY-START + +UE-NR-Capability ::= SEQUENCE { + accessStratumRelease AccessStratumRelease, + pdcp-Parameters PDCP-Parameters, + rlc-Parameters RLC-Parameters OPTIONAL, + mac-Parameters MAC-Parameters OPTIONAL, + phy-Parameters Phy-Parameters, + rf-Parameters RF-Parameters, + measAndMobParameters MeasAndMobParameters OPTIONAL, + fdd-Add-UE-NR-Capabilities UE-NR-CapabilityAddXDD-Mode OPTIONAL, + tdd-Add-UE-NR-Capabilities UE-NR-CapabilityAddXDD-Mode OPTIONAL, + fr1-Add-UE-NR-Capabilities UE-NR-CapabilityAddFRX-Mode OPTIONAL, + fr2-Add-UE-NR-Capabilities UE-NR-CapabilityAddFRX-Mode OPTIONAL, + featureSets FeatureSets OPTIONAL, + featureSetCombinations SEQUENCE (SIZE (1..maxFeatureSetCombinations)) OF FeatureSetCombination OPTIONAL, + + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension UE-NR-Capability-1530 OPTIONAL +} + +UE-NR-Capability-1530 ::= SEQUENCE { + fdd-Add-UE-NR-Capabilities-1530 UE-NR-CapabilityAddXDD-Mode-1530 OPTIONAL, + tdd-Add-UE-NR-Capabilities-1530 UE-NR-CapabilityAddXDD-Mode-1530 OPTIONAL, + voiceOverMCG-Bearer ENUMERATED {supported} OPTIONAL, + interRAT-Parameters InterRAT-Parameters OPTIONAL, + inactiveState ENUMERATED {supported} OPTIONAL, + delayBudgetReporting ENUMERATED {supported} OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +UE-NR-CapabilityAddXDD-Mode ::= SEQUENCE { + phy-ParametersXDD-Diff Phy-ParametersXDD-Diff OPTIONAL, + mac-ParametersXDD-Diff MAC-ParametersXDD-Diff OPTIONAL, + measAndMobParametersXDD-Diff MeasAndMobParametersXDD-Diff OPTIONAL +} + +UE-NR-CapabilityAddXDD-Mode-1530 ::= SEQUENCE { + eutra-ParametersXDD-Diff EUTRA-ParametersXDD-Diff +} + +UE-NR-CapabilityAddFRX-Mode ::= SEQUENCE { + phy-ParametersFRX-Diff Phy-ParametersFRX-Diff OPTIONAL, + measAndMobParametersFRX-Diff MeasAndMobParametersFRX-Diff OPTIONAL +} + +-- TAG-UE-NR-CAPABILITY-STOP +-- TAG-EUTRA-ALLOWED-MEAS-BANDWIDTH-START + +EUTRA-AllowedMeasBandwidth ::= ENUMERATED {mbw6, mbw15, mbw25, mbw50, mbw75, mbw100} + +-- TAG-EUTRA-ALLOWED-MEAS-BANDWIDTH-STOP +-- TAG-EUTRA-MBSFN-SUBFRAMECONFIGLIST-START + +EUTRA-MBSFN-SubframeConfigList ::= SEQUENCE (SIZE (1..maxMBSFN-Allocations)) OF EUTRA-MBSFN-SubframeConfig + +EUTRA-MBSFN-SubframeConfig ::= SEQUENCE { + radioframeAllocationPeriod ENUMERATED {n1, n2, n4, n8, n16, n32}, + radioframeAllocationOffset INTEGER (0..7), + subframeAllocation1 CHOICE { + oneFrame BIT STRING (SIZE(6)), + fourFrames BIT STRING (SIZE(24)) + }, + subframeAllocation2 CHOICE { + oneFrame BIT STRING (SIZE(2)), + fourFrames BIT STRING (SIZE(8)) + } OPTIONAL, -- Need R + ... +} + +-- TAG-EUTRA-MBSFN-SUBFRAMECONFIGLIST-STOP +-- TAG-EUTRA-MULTI-BAND-INFO-LIST-START + +EUTRA-MultiBandInfoList ::= SEQUENCE (SIZE (1..maxMultiBands)) OF EUTRA-MultiBandInfo + +EUTRA-MultiBandInfo ::= SEQUENCE { + eutra-FreqBandIndicator FreqBandIndicatorEUTRA, + eutra-NS-PmaxList EUTRA-NS-PmaxList OPTIONAL -- Need R +} + +-- TAG-EUTRA-MULTI-BAND-INFO-LIST-STOP +-- TAG-EUTRA-NS-PMAX-LIST-START + +EUTRA-NS-PmaxList ::= SEQUENCE (SIZE (1..maxEUTRA-NS-Pmax)) OF EUTRA-NS-PmaxValue + +EUTRA-NS-PmaxValue ::= SEQUENCE { + additionalPmax INTEGER (-30..33) OPTIONAL, -- Need R + additionalSpectrumEmission INTEGER (1..288) OPTIONAL -- Need R +} + +-- TAG-EUTRA-NS-PMAX-LIST-STOP +-- TAG-EUTRA-PHYS-CELL-ID-START + +EUTRA-PhysCellId ::= INTEGER (0..503) + +-- TAG-EUTRA-PHYS-CELL-ID-STOP +-- TAG-EUTRA-PHYS-CELL-ID-RANGE-START + +EUTRA-PhysCellIdRange ::= SEQUENCE { + start EUTRA-PhysCellId, + range ENUMERATED {n4, n8, n12, n16, n24, n32, n48, n64, n84, n96, + n128, n168, n252, n504, spare2, spare1} OPTIONAL -- Need N +} + +-- TAG-EUTRA-PHYS-CELL-ID-RANGE-STOP +-- TAG-EUTRA-PRESENCE-ANTENNA-PORT1-START + +EUTRA-PresenceAntennaPort1 ::= BOOLEAN + +-- TAG-EUTRA-PRESENCE-ANTENNA-PORT1-STOP + +EUTRA-Q-OffsetRange ::= ENUMERATED { + dB-24, dB-22, dB-20, dB-18, dB-16, dB-14, + dB-12, dB-10, dB-8, dB-6, dB-5, dB-4, dB-3, + dB-2, dB-1, dB0, dB1, dB2, dB3, dB4, dB5, + dB6, dB8, dB10, dB12, dB14, dB16, dB18, + dB20, dB22, dB24} + +-- TAG-MULTIFREQUENCYBANDLISTNR-SIB-START + +MultiFrequencyBandListNR-SIB ::= SEQUENCE (SIZE (1.. maxNrofMultiBands)) OF NR-MultiBandInfo + +NR-MultiBandInfo ::= SEQUENCE { + freqBandIndicatorNR FreqBandIndicatorNR OPTIONAL, -- Cond OptULNotSIB2 + nr-NS-PmaxList NR-NS-PmaxList OPTIONAL -- Need S +} + +-- TAG-MULTIFREQUENCYBANDLISTNR-SIB-STOP +-- TAG-NR-NS-PMAXLIST-START + +NR-NS-PmaxList ::= SEQUENCE (SIZE (1..maxNR-NS-Pmax)) OF NR-NS-PmaxValue + +NR-NS-PmaxValue ::= SEQUENCE { + additionalPmax P-Max OPTIONAL, -- Need N + additionalSpectrumEmission AdditionalSpectrumEmission +} + +-- TAG-NR-NS-PMAXLIST-STOP +-- TAG-OTHERCONFIG-START + +OtherConfig ::= SEQUENCE { + delayBudgetReportingConfig CHOICE{ + release NULL, + setup SEQUENCE{ + delayBudgetReportingProhibitTimer ENUMERATED {s0, s0dot4, s0dot8, s1dot6, s3, s6, s12, s30} + } + } OPTIONAL -- Need N +} + +-- TAG-OTHERCONFIG-STOP +-- TAG-RRC-TRANSACTIONIDENTIFIER-START + +RRC-TransactionIdentifier ::= INTEGER (0..3) + +-- TAG-RRC-TRANSACTIONIDENTIFIER-STOP +-- TAG-MULTIPLICITY-AND-TYPE-CONSTRAINT-DEFINITIONS-START + +maxBandComb INTEGER ::= 65536 -- Maximum number of DL band combinations +maxCellBlack INTEGER ::= 16 -- Maximum number of NR blacklisted cell ranges in SIB3, SIB4 +maxCellInter INTEGER ::= 16 -- Maximum number of inter-Freq cells listed in SIB4 +maxCellIntra INTEGER ::= 16 -- Maximum number of intra-Freq cells listed in SIB3 +maxCellMeasEUTRA INTEGER ::= 32 -- Maximum number of cells in EUTRAN +maxEARFCN INTEGER ::= 262143 -- Maximum value of EUTRA carrier frequency +maxEUTRA-CellBlack INTEGER ::= 16 -- Maximum number of EUTRA-blacklisted physical cell identity ranges in SIB5 +maxEUTRA-NS-Pmax INTEGER ::= 8 -- Maximum number of NS and P-Max values per band +maxMultiBands INTEGER ::= 8 -- Maximum number of additional frequency bands that a cell belongs to +maxNARFCN INTEGER ::= 3279165 -- Maximum value of NR carrier frequency +maxNR-NS-Pmax INTEGER ::= 8 -- Maximum number of NS and P-Max values per band +maxNrofServingCells INTEGER ::= 32 -- Max number of serving cells (SpCell + SCells) per cell group +maxNrofServingCells-1 INTEGER ::= 31 -- Max number of serving cells (SpCell + SCells) per cell group minus 1 +maxNrofAggregatedCellsPerCellGroup INTEGER ::= 16 +maxNrofSCells INTEGER ::= 31 -- Max number of secondary serving cells per cell group +maxNrofCellMeas INTEGER ::= 32 -- Maximum number of entries in each of the cell lists in a measurement object +maxNrofSS-BlocksToAverage INTEGER ::= 16 -- Max number for the (max) number of SS blocks to average to determine cell + -- measurement +maxNrofCSI-RS-ResourcesToAverage INTEGER ::= 16 -- Max number for the (max) number of CSI-RS to average to determine cell + -- measurement +maxNrofDL-Allocations INTEGER ::= 16 -- Maximum number of PDSCH time domain resource allocations + +maxNrofSR-ConfigPerCellGroup INTEGER ::= 8 -- Maximum number of SR configurations per cell group + +maxLCG-ID INTEGER ::= 7 -- Maximum value of LCG ID +maxLC-ID INTEGER ::= 32 -- Maximum value of Logical Channel ID +maxNrofTAGs INTEGER ::= 4 -- Maximum number of Timing Advance Groups +maxNrofTAGs-1 INTEGER ::= 3 -- Maximum number of Timing Advance Groups minus 1 + +maxNrofBWPs INTEGER ::= 4 -- Maximum number of BWPs per serving cell +maxNrofCombIDC INTEGER ::= 128 -- Maximum number of reported MR-DC combinations for IDC +maxNrofSymbols-1 INTEGER ::= 13 -- Maximum index identifying a symbol within a slot (14 symbols, indexed from 0..13) +maxNrofSlots INTEGER ::= 320 -- Maximum number of slots in a 10 ms period +maxNrofSlots-1 INTEGER ::= 319 -- Maximum number of slots in a 10 ms period minus 1 + +maxNrofPhysicalResourceBlocks INTEGER ::= 275 -- Maximum number of PRBs +maxNrofPhysicalResourceBlocks-1 INTEGER ::= 274 -- Maximum number of PRBs minus 1 +maxNrofPhysicalResourceBlocksPlus1 INTEGER ::= 276 -- Maximum number of PRBs plus 1 +maxNrofControlResourceSets-1 INTEGER ::= 11 -- Max number of CoReSets configurable on a serving cell minus 1 +maxCoReSetDuration INTEGER ::= 3 -- Max number of OFDM symbols in a control resource set +maxNrofSearchSpaces-1 INTEGER ::= 39 -- Max number of Search Spaces minus 1 +maxSFI-DCI-PayloadSize INTEGER ::= 128 -- Max number payload of a DCI scrambled with SFI-RNTI +maxSFI-DCI-PayloadSize-1 INTEGER ::= 127 -- Max number payload of a DCI scrambled with SFI-RNTI minus 1 +maxINT-DCI-PayloadSize INTEGER ::= 126 -- Max number payload of a DCI scrambled with INT-RNTI +maxINT-DCI-PayloadSize-1 INTEGER ::= 125 -- Max number payload of a DCI scrambled with INT-RNTI minus 1 +maxNrofRateMatchPatterns INTEGER ::= 4 -- Max number of rate matching patterns that may be configured +maxNrofRateMatchPatterns-1 INTEGER ::= 3 -- Max number of rate matching patterns that may be configured minus 1 +maxNrofRateMatchPatternsPerGroup INTEGER ::= 8 -- Max number of rate matching patterns that may be configured in one group + +maxNrofCSI-ReportConfigurations INTEGER ::= 48 -- Maximum number of report configurations +maxNrofCSI-ReportConfigurations-1 INTEGER ::= 47 -- Maximum number of report configurations minus 1 + +maxNrofCSI-ResourceConfigurations INTEGER ::= 112 -- Maximum number of resource configurations +maxNrofCSI-ResourceConfigurations-1 INTEGER ::= 111 -- Maximum number of resource configurations minus 1 + +maxNrofAP-CSI-RS-ResourcesPerSet INTEGER ::= 16 +maxNrOfCSI-AperiodicTriggers INTEGER ::= 128 -- Maximum number of triggers for aperiodic CSI reporting +maxNrofReportConfigPerAperiodicTrigger INTEGER ::= 16 -- Maximum number of report configurations per trigger state for aperiodic reporting + +maxNrofNZP-CSI-RS-Resources INTEGER ::= 192 -- Maximum number of Non-Zero-Power (NZP) CSI-RS resources +maxNrofNZP-CSI-RS-Resources-1 INTEGER ::= 191 -- Maximum number of Non-Zero-Power (NZP) CSI-RS resources minus 1 +maxNrofNZP-CSI-RS-ResourcesPerSet INTEGER ::= 64 -- Maximum number of NZP CSI-RS resources per resource set +maxNrofNZP-CSI-RS-ResourceSets INTEGER ::= 64 -- Maximum number of NZP CSI-RS resources per cell +maxNrofNZP-CSI-RS-ResourceSets-1 INTEGER ::= 63 -- Maximum number of NZP CSI-RS resources per cell minus 1 +maxNrofNZP-CSI-RS-ResourceSetsPerConfig INTEGER ::= 16 -- Maximum number of resource sets per resource configuration +maxNrofNZP-CSI-RS-ResourcesPerConfig INTEGER ::= 128 -- Maximum number of resources per resource configuration + +maxNrofZP-CSI-RS-Resources INTEGER ::= 32 -- Maximum number of Zero-Power (NZP) CSI-RS resources +maxNrofZP-CSI-RS-Resources-1 INTEGER ::= 31 -- Maximum number of Zero-Power (NZP) CSI-RS resources minus 1 +maxNrofZP-CSI-RS-ResourceSets-1 INTEGER ::= 15 +maxNrofZP-CSI-RS-ResourcesPerSet INTEGER ::= 16 +maxNrofZP-CSI-RS-ResourceSets INTEGER ::= 16 + +maxNrofCSI-IM-Resources INTEGER ::= 32 -- Maximum number of CSI-IM resources. See CSI-IM-ResourceMax in 38.214. +maxNrofCSI-IM-Resources-1 INTEGER ::= 31 -- Maximum number of CSI-IM resources minus 1. See CSI-IM-ResourceMax in 38.214. +maxNrofCSI-IM-ResourcesPerSet INTEGER ::= 8 -- Maximum number of CSI-IM resources per set. See CSI-IM-ResourcePerSetMax in 38.214 +maxNrofCSI-IM-ResourceSets INTEGER ::= 64 -- Maximum number of NZP CSI-IM resources per cell +maxNrofCSI-IM-ResourceSets-1 INTEGER ::= 63 -- Maximum number of NZP CSI-IM resources per cell minus 1 +maxNrofCSI-IM-ResourceSetsPerConfig INTEGER ::= 16 -- Maximum number of CSI IM resource sets per resource configuration + +maxNrofCSI-SSB-ResourcePerSet INTEGER ::= 64 -- Maximum number of SSB resources in a resource set +maxNrofCSI-SSB-ResourceSets INTEGER ::= 64 -- Maximum number of CSI SSB resource sets per cell +maxNrofCSI-SSB-ResourceSets-1 INTEGER ::= 63 -- Maximum number of CSI SSB resource sets per cell minus 1 +maxNrofCSI-SSB-ResourceSetsPerConfig INTEGER ::= 1 -- Maximum number of CSI SSB resource sets per resource configuration + +maxNrofFailureDetectionResources INTEGER ::= 10 -- Maximum number of failure detection resources +maxNrofFailureDetectionResources-1 INTEGER ::= 9 -- Maximum number of failure detection resources minus 1 + +maxNrofObjectId INTEGER ::= 64 -- Maximum number of measurement objects +maxNrofPageRec INTEGER ::= 32 -- Maximum number of page records +maxNrofPCI-Ranges INTEGER ::= 8 -- Maximum number of PCI ranges +maxPLMN INTEGER ::= 12 -- Maximum number of PLMNs broadcast and reported by UE at establisghment +maxNrofCSI-RS-ResourcesRRM INTEGER ::= 96 -- Maximum number of CSI-RS resources for an RRM measurement object +maxNrofCSI-RS-ResourcesRRM-1 INTEGER ::= 95 -- Maximum number of CSI-RS resources for an RRM measurement object minus 1 +maxNrofMeasId INTEGER ::= 64 -- Maximum number of configured measurements +maxNrofQuantityConfig INTEGER ::= 2 -- Maximum number of quantity configurations +maxNrofCSI-RS-CellsRRM INTEGER ::= 96 -- Maximum number of FFS + +maxNrofSRS-ResourceSets INTEGER ::= 16 -- Maximum number of SRS resource sets in a BWP. +maxNrofSRS-ResourceSets-1 INTEGER ::= 15 -- Maximum number of SRS resource sets in a BWP minus 1. +maxNrofSRS-Resources INTEGER ::= 64 -- Maximum number of SRS resources. +maxNrofSRS-Resources-1 INTEGER ::= 63 -- Maximum number of SRS resources in an SRS resource set minus 1. +maxNrofSRS-ResourcesPerSet INTEGER ::= 16 -- Maximum number of SRS resources in an SRS resource set +maxNrofSRS-TriggerStates-1 INTEGER ::= 3 -- Maximum number of SRS trigger states minus 1, i.e., the largest code point. +maxNrofSRS-TriggerStates-2 INTEGER ::= 2 -- Maximum number of SRS trigger states minus 2. +maxRAT-CapabilityContainers INTEGER ::= 8 -- Maximum number of interworking RAT containers (incl NR and MRDC) +maxSimultaneousBands INTEGER ::= 32 -- Maximum number of simultaneously aggregated bands + + +maxNrofSlotFormatCombinationsPerSet INTEGER ::= 512 -- Maximum number of Slot Format Combinations in a SF-Set. +maxNrofSlotFormatCombinationsPerSet-1 INTEGER ::= 511 -- Maximum number of Slot Format Combinations in a SF-Set minus 1. +maxNrofPUCCH-Resources INTEGER ::= 128 +maxNrofPUCCH-Resources-1 INTEGER ::= 127 +maxNrofPUCCH-ResourceSets INTEGER ::= 4 -- Maximum number of PUCCH Resource Sets +maxNrofPUCCH-ResourceSets-1 INTEGER ::= 3 -- Maximum number of PUCCH Resource Sets minus 1. +maxNrofPUCCH-ResourcesPerSet INTEGER ::= 32 -- Maximum number of PUCCH Resources per PUCCH-ResourceSet +maxNrofPUCCH-P0-PerSet INTEGER ::= 8 -- Maximum number of P0-pucch present in a p0-pucch set +maxNrofPUCCH-PathlossReferenceRSs INTEGER ::= 4 -- Maximum number of RSs used as pathloss reference for PUCCH power control. +maxNrofPUCCH-PathlossReferenceRSs-1 INTEGER ::= 3 -- Maximum number of RSs used as pathloss reference for PUCCH power control minus 1. + +maxNrofP0-PUSCH-AlphaSets INTEGER ::= 30 -- Maximum number of P0-pusch-alpha-sets (see 38,213, section 7.1) +maxNrofP0-PUSCH-AlphaSets-1 INTEGER ::= 29 -- Maximum number of P0-pusch-alpha-sets minus 1 (see 38,213, section 7.1) +maxNrofPUSCH-PathlossReferenceRSs INTEGER ::= 4 -- Maximum number of RSs used as pathloss reference for PUSCH power control. +maxNrofPUSCH-PathlossReferenceRSs-1 INTEGER ::= 3 -- Maximum number of RSs used as pathloss reference for PUSCH power control minus 1. +maxNrofNAICS-Entries INTEGER ::= 8 -- Maximum number of supported NAICS capability set +maxBands INTEGER ::= 1024 -- Maximum number of supported bands in UE capability. +maxBandsMRDC INTEGER ::= 1280 +maxBandsEUTRA INTEGER ::= 256 +maxCellReport INTEGER ::= 8 +maxDRB INTEGER ::= 29 -- Maximum number of DRBs (that can be added in DRB-ToAddModLIst). +maxFreq INTEGER ::= 8 -- Max number of frequencies. +maxFreqIDC-MRDC INTEGER ::= 32 -- Maximum number of candidate NR frequencies for MR-DC IDC indication +maxNrofCSI-RS INTEGER ::= 64 +maxNrofCandidateBeams INTEGER ::= 16 -- Max number of PRACH-ResourceDedicatedBFR that in BFR config. +maxNrofPCIsPerSMTC INTEGER ::= 64 -- Maximun number of PCIs per SMTC. +maxNrofQFIs INTEGER ::= 64 +maxNrOfSemiPersistentPUSCH-Triggers INTEGER ::= 64 -- Maximum number of triggers for semi persistent reporting on PUSCH +maxNrofSR-Resources INTEGER ::= 8 -- Maximum number of SR resources per BWP in a cell. +maxNrofSlotFormatsPerCombination INTEGER ::= 256 +maxNrofSpatialRelationInfos INTEGER ::= 8 +maxNrofIndexesToReport INTEGER ::= 32 +maxNrofIndexesToReport2 INTEGER ::= 64 +maxNrofSSBs INTEGER ::= 64 -- Maximum number of SSB resources in a resource set. +maxNrofSSBs-1 INTEGER ::= 63 -- Maximum number of SSB resources in a resource set minus 1. +maxNrofS-NSSAI INTEGER ::= 8 -- Maximum number of S-NSSAI. +maxNrofTCI-StatesPDCCH INTEGER ::= 64 +maxNrofTCI-States INTEGER ::= 128 -- Maximum number of TCI states. +maxNrofTCI-States-1 INTEGER ::= 127 -- Maximum number of TCI states minus 1. +maxNrofUL-Allocations INTEGER ::= 16 -- Maximum number of PUSCH time domain resource allocations. +maxQFI INTEGER ::= 63 +maxRA-CSIRS-Resources INTEGER ::= 96 +maxRA-OccasionsPerCSIRS INTEGER ::= 64 -- Maximum number of RA occasions for one CSI-RS +maxRA-Occasions-1 INTEGER ::= 511 -- Maximum number of RA occasions in the system +maxRA-SSB-Resources INTEGER ::= 64 +maxSCSs INTEGER ::= 5 +maxSecondaryCellGroups INTEGER ::= 3 +maxNrofServingCellsEUTRA INTEGER ::= 32 +maxMBSFN-Allocations INTEGER ::= 8 +maxNrofMultiBands INTEGER ::= 8 +maxCellSFTD INTEGER ::= 3 -- Maximum number of cells for SFTD reporting +maxReportConfigId INTEGER ::= 64 +maxNrofCodebooks INTEGER ::= 16 -- Maximum number of codebooks suppoted by the UE + +maxNrofSRI-PUSCH-Mappings INTEGER ::= 16 +maxNrofSRI-PUSCH-Mappings-1 INTEGER ::= 15 +maxSIB INTEGER::= 32 -- Maximum number of SIBs +maxSIB-1 INTEGER::= 31 +maxSI-Message INTEGER::= 32 -- Maximum number of SI messages + +maxAccessCat-1 INTEGER ::= 63 -- Maximum number of Acccess Categories minus 1 +maxBarringInfoSet INTEGER ::= 8 -- Maximum number of Acccess Categories +maxCellEUTRA INTEGER ::= 8 -- Maximum number of EUTRA cells in SIB list +maxEUTRA-Carrier INTEGER ::= 8 -- Maximum number of EUTRA carriers in SIB list +maxPLMNIdentities INTEGER ::= 8 -- Maximum number of PLMN identites in RAN area configurations + +maxDownlinkFeatureSets INTEGER ::= 1024 -- (for NR DL) Total number of FeatureSets (size of the pool) +maxUplinkFeatureSets INTEGER ::= 1024 -- (for NR UL) Total number of FeatureSets (size of the pool) +maxEUTRA-DL-FeatureSets INTEGER ::= 256 -- (for EUTRA) Total number of FeatureSets (size of the pool) +maxEUTRA-UL-FeatureSets INTEGER ::= 256 -- (for EUTRA) Total number of FeatureSets (size of the pool) +maxFeatureSetsPerBand INTEGER ::= 128 -- (for NR) The number of feature sets associated with one band. +maxPerCC-FeatureSets INTEGER ::= 1024 -- (for NR) Total number of CC-specific FeatureSets (size of the pool) +maxFeatureSetCombinations INTEGER ::= 1024 -- (for MR-DC/NR)Total number of Feature set combinations (size of the pool) + +maxInterRAT-RSTD-Freq INTEGER ::= 3 + + +-- TAG-MULTIPLICITY-AND-TYPE-CONSTRAINT-DEFINITIONS-STOP + +END + + +NR-UE-Variables DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + CellIdentity, + MeasId, + MeasIdToAddModList, + MeasObjectToAddModList, + PhysCellId, + RNTI-Value, + ReportConfigToAddModList, + RSRP-Range, + QuantityConfig, + maxNrofCellMeas, + maxNrofMeasId +FROM NR-RRC-Definitions; + +-- TAG-VAR-PENDING-RNA-UPDATE-START + +VarPendingRNA-Update ::= SEQUENCE { + pendingRNA-Update BOOLEAN OPTIONAL +} + +-- TAG-VAR-PENDING-RNA-UPDATE-STOP +-- TAG-VAR-MEAS-CONFIG-START + +VarMeasConfig ::= SEQUENCE { + -- Measurement identities + measIdList MeasIdToAddModList OPTIONAL, + -- Measurement objects + measObjectList MeasObjectToAddModList OPTIONAL, + -- Reporting configurations + reportConfigList ReportConfigToAddModList OPTIONAL, + -- Other parameters + quantityConfig QuantityConfig OPTIONAL, + + s-MeasureConfig CHOICE { + ssb-RSRP RSRP-Range, + csi-RSRP RSRP-Range + } OPTIONAL + +} + +-- TAG-VAR-MEAS-CONFIG-STOP +-- TAG-VAR-MEAS-REPORT-START + +VarMeasReportList ::= SEQUENCE (SIZE (1..maxNrofMeasId)) OF VarMeasReport + +VarMeasReport ::= SEQUENCE { + -- List of measurement that have been triggered + measId MeasId, + cellsTriggeredList CellsTriggeredList OPTIONAL, + numberOfReportsSent INTEGER +} + +CellsTriggeredList ::= SEQUENCE (SIZE (1..maxNrofCellMeas)) OF CHOICE { + physCellId PhysCellId, +-- Not needed for EN-DC. + physCellIdEUTRA ENUMERATED {ffsTypeAndValue} + } + + +-- TAG-VAR-MEAS-REPORT-STOP +-- TAG-VAR-RESUMEMACINPUT-START + +VarResumeMAC-Input ::= SEQUENCE { + sourcePhysCellId PhysCellId, + targetCellIdentity CellIdentity, + source-c-RNTI RNTI-Value + +} + +-- TAG-VAR-RESUMEMACINPUT-STOP +-- TAG-VAR-SHORTMACINPUT-START + +VarShortMAC-Input ::= SEQUENCE { + sourcePhysCellId PhysCellId, + targetCellIdentity CellIdentity, + source-c-RNTI RNTI-Value +} + +-- TAG-VAR- SHORTMACINPUT-STOP + +END + +-- TAG_NR-INTER-NODE-DEFINITIONS-START + +NR-InterNodeDefinitions DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + ARFCN-ValueNR, + ARFCN-ValueEUTRA, + CellIdentity, + CSI-RS-Index, + FreqBandIndicatorNR, + GapConfig, + maxBandComb, + maxBands, + maxFeatureSetsPerBand, + maxFreqIDC-MRDC, + maxNrofCombIDC, + maxNrofSCells, + maxNrofServingCells, + maxNrofServingCells-1, + maxNrofServingCellsEUTRA, + maxNrofIndexesToReport, + MeasQuantityResults, + MeasResultSCG-Failure, + MeasResultCellListSFTD, + MeasResultList2NR, + P-Max, + PhysCellId, + RadioBearerConfig, + RAN-NotificationAreaInfo, + RRCReconfiguration, + ServCellIndex, + SetupRelease, + SSB-Index, + SSB-MTC, + SS-RSSI-Measurement, + ShortMAC-I, + SubcarrierSpacing, + UE-CapabilityRAT-ContainerList +FROM NR-RRC-Definitions; + +-- TAG_NR-INTER-NODE-DEFINITIONS-STOP +-- TAG-HANDOVER-COMMAND-START + +HandoverCommand ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + handoverCommand HandoverCommand-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +HandoverCommand-IEs ::= SEQUENCE { + handoverCommandMessage OCTET STRING (CONTAINING RRCReconfiguration), + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-HANDOVER-COMMAND-STOP +-- TAG-HANDOVER-PREPARATION-INFORMATION-START + +HandoverPreparationInformation ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + handoverPreparationInformation HandoverPreparationInformation-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +HandoverPreparationInformation-IEs ::= SEQUENCE { + ue-CapabilityRAT-List UE-CapabilityRAT-ContainerList, + sourceConfig AS-Config OPTIONAL, -- Cond HO + rrm-Config RRM-Config OPTIONAL, + as-Context AS-Context OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +AS-Config ::= SEQUENCE { + rrcReconfiguration OCTET STRING (CONTAINING RRCReconfiguration), + ... +} + +AS-Context ::= SEQUENCE { + reestablishmentInfo ReestablishmentInfo OPTIONAL, + configRestrictInfo ConfigRestrictInfoSCG OPTIONAL, + ..., + [[ ran-NotificationAreaInfo RAN-NotificationAreaInfo OPTIONAL + ]] +} + +ReestablishmentInfo ::= SEQUENCE { + sourcePhysCellId PhysCellId, + targetCellShortMAC-I ShortMAC-I, + additionalReestabInfoList ReestabNCellInfoList OPTIONAL +} + +ReestabNCellInfoList ::= SEQUENCE ( SIZE (1..maxCellPrep) ) OF ReestabNCellInfo + +ReestabNCellInfo::= SEQUENCE{ + cellIdentity CellIdentity, + key-gNodeB-Star BIT STRING (SIZE (256)), + shortMAC-I ShortMAC-I +} + +RRM-Config ::= SEQUENCE { + ue-InactiveTime ENUMERATED { + s1, s2, s3, s5, s7, s10, s15, s20, + s25, s30, s40, s50, min1, min1s20c, min1s40, + min2, min2s30, min3, min3s30, min4, min5, min6, + min7, min8, min9, min10, min12, min14, min17, min20, + min24, min28, min33, min38, min44, min50, hr1, + hr1min30, hr2, hr2min30, hr3, hr3min30, hr4, hr5, hr6, + hr8, hr10, hr13, hr16, hr20, day1, day1hr12, day2, + day2hr12, day3, day4, day5, day7, day10, day14, day19, + day24, day30, dayMoreThan30} OPTIONAL, + candidateCellInfoList MeasResultList2NR OPTIONAL, + ... +} + +-- TAG-HANDOVER-PREPARATION-INFORMATION-STOP +-- TAG-CG-CONFIG-START + +CG-Config ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + cg-Config CG-Config-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +CG-Config-IEs ::= SEQUENCE { + scg-CellGroupConfig OCTET STRING (CONTAINING RRCReconfiguration) OPTIONAL, + scg-RB-Config OCTET STRING (CONTAINING RadioBearerConfig) OPTIONAL, + configRestrictModReq ConfigRestrictModReqSCG OPTIONAL, + drx-InfoSCG DRX-Info OPTIONAL, + candidateCellInfoListSN OCTET STRING (CONTAINING MeasResultList2NR) OPTIONAL, + measConfigSN MeasConfigSN OPTIONAL, + selectedBandCombinationNR BandCombinationInfoSN OPTIONAL, + fr-InfoListSCG FR-InfoList OPTIONAL, + candidateServingFreqListNR CandidateServingFreqListNR OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +MeasConfigSN ::= SEQUENCE { + measuredFrequenciesSN SEQUENCE (SIZE (1..maxMeasFreqsSN)) OF NR-FreqInfo OPTIONAL, + ... +} + +NR-FreqInfo ::= SEQUENCE { + measuredFrequency ARFCN-ValueNR OPTIONAL, + ... +} + +ConfigRestrictModReqSCG ::= SEQUENCE { + requestedBC-MRDC BandCombinationInfoSN OPTIONAL, + requestedP-MaxFR1 P-Max OPTIONAL, + ... +} + +BandCombinationIndex ::= INTEGER (1..maxBandComb) + +BandCombinationInfoSN ::= SEQUENCE { + bandCombinationIndex BandCombinationIndex, + requestedFeatureSets FeatureSetEntryIndex +} + +FR-InfoList ::= SEQUENCE (SIZE (1..maxNrofServingCells-1)) OF FR-Info + +FR-Info ::= SEQUENCE { + servCellIndex ServCellIndex, + fr-Type ENUMERATED {fr1, fr2} +} + +CandidateServingFreqListNR ::= SEQUENCE (SIZE (1.. maxFreqIDC-MRDC)) OF ARFCN-ValueNR + + +-- TAG-CG-CONFIG-STOP +-- TAG-CG-CONFIG-INFO-START + +CG-ConfigInfo ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + cg-ConfigInfo CG-ConfigInfo-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +CG-ConfigInfo-IEs ::= SEQUENCE { + ue-CapabilityInfo OCTET STRING (CONTAINING UE-CapabilityRAT-ContainerList) OPTIONAL,-- Cond SN-Addition + candidateCellInfoListMN MeasResultList2NR OPTIONAL, + candidateCellInfoListSN OCTET STRING (CONTAINING MeasResultList2NR) OPTIONAL, + measResultCellListSFTD MeasResultCellListSFTD OPTIONAL, + scgFailureInfo SEQUENCE { + failureType ENUMERATED { t310-Expiry, randomAccessProblem, + rlc-MaxNumRetx, scg-ChangeFailure, + scg-reconfigFailure, + srb3-IntegrityFailure}, + measResultSCG OCTET STRING (CONTAINING MeasResultSCG-Failure) + } OPTIONAL, + configRestrictInfo ConfigRestrictInfoSCG OPTIONAL, + drx-InfoMCG DRX-Info OPTIONAL, + measConfigMN MeasConfigMN OPTIONAL, + sourceConfigSCG OCTET STRING (CONTAINING RRCReconfiguration) OPTIONAL, + scg-RB-Config OCTET STRING (CONTAINING RadioBearerConfig) OPTIONAL, + mcg-RB-Config OCTET STRING (CONTAINING RadioBearerConfig) OPTIONAL, + mrdc-AssistanceInfo MRDC-AssistanceInfo OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +ConfigRestrictInfoSCG ::= SEQUENCE { + allowedBC-ListMRDC BandCombinationInfoList OPTIONAL, + powerCoordination-FR1 SEQUENCE { + p-maxNR-FR1 P-Max OPTIONAL, + p-maxEUTRA P-Max OPTIONAL, + p-maxUE-FR1 P-Max OPTIONAL + } OPTIONAL, + servCellIndexRangeSCG SEQUENCE { + lowBound ServCellIndex, + upBound ServCellIndex + } OPTIONAL, -- Cond SN-Addition + maxMeasFreqsSCG-NR INTEGER(1..maxMeasFreqsMN) OPTIONAL, + maxMeasIdentitiesSCG-NR INTEGER(1..maxMeasIdentitiesMN) OPTIONAL, + ... +} + +BandCombinationInfoList ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombinationInfo + +BandCombinationInfo ::= SEQUENCE { + bandCombinationIndex BandCombinationIndex, + allowedFeatureSetsList SEQUENCE (SIZE (1..maxFeatureSetsPerBand)) OF FeatureSetEntryIndex +} + +FeatureSetEntryIndex ::= INTEGER (1.. maxFeatureSetsPerBand) + +DRX-Info ::= SEQUENCE { + drx-LongCycleStartOffset CHOICE { + ms10 INTEGER(0..9), + ms20 INTEGER(0..19), + ms32 INTEGER(0..31), + ms40 INTEGER(0..39), + ms60 INTEGER(0..59), + ms64 INTEGER(0..63), + ms70 INTEGER(0..69), + ms80 INTEGER(0..79), + ms128 INTEGER(0..127), + ms160 INTEGER(0..159), + ms256 INTEGER(0..255), + ms320 INTEGER(0..319), + ms512 INTEGER(0..511), + ms640 INTEGER(0..639), + ms1024 INTEGER(0..1023), + ms1280 INTEGER(0..1279), + ms2048 INTEGER(0..2047), + ms2560 INTEGER(0..2559), + ms5120 INTEGER(0..5119), + ms10240 INTEGER(0..10239) + }, + shortDRX SEQUENCE { + drx-ShortCycle ENUMERATED { + ms2, ms3, ms4, ms5, ms6, ms7, ms8, ms10, ms14, ms16, ms20, ms30, ms32, + ms35, ms40, ms64, ms80, ms128, ms160, ms256, ms320, ms512, ms640, spare9, + spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1 }, + drx-ShortCycleTimer INTEGER (1..16) + } OPTIONAL +} + +MeasConfigMN ::= SEQUENCE { + measuredFrequenciesMN SEQUENCE (SIZE (1..maxMeasFreqsMN)) OF NR-FreqInfo OPTIONAL, + measGapConfig SetupRelease { GapConfig } OPTIONAL, + gapPurpose ENUMERATED {perUE, perFR1} OPTIONAL, + ... +} + +MRDC-AssistanceInfo ::= SEQUENCE { + affectedCarrierFreqCombInfoListMRDC SEQUENCE (SIZE (1..maxNrofCombIDC)) OF AffectedCarrierFreqCombInfoMRDC, + ... +} + +AffectedCarrierFreqCombInfoMRDC ::= SEQUENCE { + victimSystemType VictimSystemType, + interferenceDirectionMRDC ENUMERATED {eutra-nr, nr, other, utra-nr-other, nr-other, spare3, spare2, spare1}, + affectedCarrierFreqCombMRDC SEQUENCE { + affectedCarrierFreqCombEUTRA AffectedCarrierFreqCombEUTRA OPTIONAL, + affectedCarrierFreqCombNR AffectedCarrierFreqCombNR + } OPTIONAL +} + +VictimSystemType ::= SEQUENCE { + gps ENUMERATED {true} OPTIONAL, + glonass ENUMERATED {true} OPTIONAL, + bds ENUMERATED {true} OPTIONAL, + galileo ENUMERATED {true} OPTIONAL, + wlan ENUMERATED {true} OPTIONAL, + bluetooth ENUMERATED {true} OPTIONAL +} + +AffectedCarrierFreqCombEUTRA ::= SEQUENCE (SIZE (1..maxNrofServingCellsEUTRA)) OF ARFCN-ValueEUTRA + +AffectedCarrierFreqCombNR ::= SEQUENCE (SIZE (1..maxNrofServingCells)) OF ARFCN-ValueNR + +-- TAG-CG-CONFIG-INFO-STOP +-- TAG-MEASUREMENT-TIMING-CONFIGURATION-START + +MeasurementTimingConfiguration ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + measTimingConf MeasurementTimingConfiguration-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +MeasurementTimingConfiguration-IEs ::= SEQUENCE { + measTiming MeasTimingList OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +MeasTimingList ::= SEQUENCE (SIZE (1..maxMeasFreqsMN)) OF MeasTiming + +MeasTiming ::= SEQUENCE { + frequencyAndTiming SEQUENCE { + carrierFreq ARFCN-ValueNR, + ssbSubcarrierSpacing SubcarrierSpacing, + ssb-MeasurementTimingConfiguration SSB-MTC, + ss-RSSI-Measurement SS-RSSI-Measurement OPTIONAL + } OPTIONAL, + ... +} + +-- TAG-MEASUREMENT-TIMING-CONFIGURATION-STOP + +UERadioPagingInformation ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + ueRadioPagingInformation UERadioPagingInformation-IEs, + spare7 NULL, + spare6 NULL, spare5 NULL, spare4 NULL, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +UERadioPagingInformation-IEs ::= SEQUENCE { + supportedBandListNRForPaging SEQUENCE (SIZE (1..maxBands)) OF FreqBandIndicatorNR OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + + + +UERadioAccessCapabilityInformation ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + ueRadioAccessCapabilityInformation + UERadioAccessCapabilityInformation-IEs, + spare7 NULL, + spare6 NULL, spare5 NULL, spare4 NULL, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +UERadioAccessCapabilityInformation-IEs ::= SEQUENCE { + ue-RadioAccessCapabilityInfo OCTET STRING (CONTAINING UE-CapabilityRAT-ContainerList), + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG_NR-MULTIPLICITY-AND-CONSTRAINTS-START + +maxMeasFreqsMN INTEGER ::= 32 -- Maximum number of MN-configured measurement frequencies +maxMeasFreqsSN INTEGER ::= 32 -- Maximum number of SN-configured measurement frequencies +maxMeasIdentitiesMN INTEGER ::= 62 -- Maximum number of measurement identities that a UE can be configured with +maxCellPrep INTEGER ::= 32 -- Maximum number of cells prepared for handover + +-- TAG_NR-MULTIPLICITY-AND-CONSTRAINTS-STOP +-- TAG_NR-INTER-NODE-DEFINITIONS-END-START + +END + +-- TAG_NR-INTER-NODE-DEFINITIONS-END-STOP +-- TAG-NAME-START + +-- TAG-NAME-STOP diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index d2ab1f50e4..8b4279dc31 100755 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -385,6 +385,16 @@ int8_t nr_rrc_ue_decode_NR_DL_DCCH_Message( break; case NR_DL_DCCH_MessageType__c1_PR_NOTHING: +#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) + case NR_DL_DCCH_MessageType__c1_PR_rrcResume: + case NR_DL_DCCH_MessageType__c1_PR_rrcRelease: + case NR_DL_DCCH_MessageType__c1_PR_rrcReestablishment: + case NR_DL_DCCH_MessageType__c1_PR_securityModeCommand: + case NR_DL_DCCH_MessageType__c1_PR_dlInformationTransfer: + case NR_DL_DCCH_MessageType__c1_PR_ueCapabilityEnquiry: + case NR_DL_DCCH_MessageType__c1_PR_counterCheck: + case NR_DL_DCCH_MessageType__c1_PR_mobilityFromNRCommand: +#else case NR_DL_DCCH_MessageType__c1_PR_spare15: case NR_DL_DCCH_MessageType__c1_PR_spare14: case NR_DL_DCCH_MessageType__c1_PR_spare13: @@ -393,6 +403,7 @@ int8_t nr_rrc_ue_decode_NR_DL_DCCH_Message( case NR_DL_DCCH_MessageType__c1_PR_spare10: case NR_DL_DCCH_MessageType__c1_PR_spare9: case NR_DL_DCCH_MessageType__c1_PR_spare8: +#endif case NR_DL_DCCH_MessageType__c1_PR_spare7: case NR_DL_DCCH_MessageType__c1_PR_spare6: case NR_DL_DCCH_MessageType__c1_PR_spare5: From c35867e910b9b65923f3d37bdda3773eaf267d5b Mon Sep 17 00:00:00 2001 From: "Bi-Ruei, Chiu" Date: Wed, 17 Oct 2018 19:43:35 +0800 Subject: [PATCH 330/379] Upgrade ASN.1 of S1AP and X2AP to 15.3.0 --- cmake_targets/CMakeLists.txt | 16 +- .../X2AP/MESSAGES/ASN1/R15/x2ap-15.3.0.asn1 | 8097 +++++++++++++++++ .../S1AP/MESSAGES/ASN1/R14/s1ap-14.7.0.asn1 | 6998 ++++++++++++++ .../S1AP/MESSAGES/ASN1/R15/s1ap-15.3.0.asn1 | 7530 +++++++++++++++ 4 files changed, 22633 insertions(+), 8 deletions(-) create mode 100644 openair2/X2AP/MESSAGES/ASN1/R15/x2ap-15.3.0.asn1 create mode 100644 openair3/S1AP/MESSAGES/ASN1/R14/s1ap-14.7.0.asn1 create mode 100644 openair3/S1AP/MESSAGES/ASN1/R15/s1ap-15.3.0.asn1 diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 38bc7812f8..599c561067 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -394,7 +394,7 @@ add_custom_command (OUTPUT ${NR_RRC_FULL_DIR}/NR_asn_constant.h # Same limitation as described in RRC: unknown generated file list # so we generate it at cmake time ############## -add_list1_option(S1AP_RELEASE R14 "S1AP ASN.1 grammar version" R8 R9 R10 R14 R15) +add_list1_option(S1AP_RELEASE R15 "S1AP ASN.1 grammar version" R8 R9 R10 R14 R15) set(S1AP_DIR ${OPENAIR3_DIR}/S1AP) if (${S1AP_RELEASE} STREQUAL "R8") @@ -416,11 +416,11 @@ elseif (${S1AP_RELEASE} STREQUAL "R13") make_version(S1AP_VERSION 13 6 0) set(S1AP_ASN_FILES "s1ap-13.6.0.asn1") elseif (${S1AP_RELEASE} STREQUAL "R14") - make_version(S1AP_VERSION 14 5 0) - set(S1AP_ASN_FILES "s1ap-14.5.0.asn1") + make_version(S1AP_VERSION 14 7 0) + set(S1AP_ASN_FILES "s1ap-14.7.0.asn1") else (${S1AP_RELEASE} STREQUAL "R15") - make_version(S1AP_VERSION 15 1 0) - set(S1AP_ASN_FILES "s1ap-15.1.0.asn1") + make_version(S1AP_VERSION 15 3 0) + set(S1AP_ASN_FILES "s1ap-15.3.0.asn1") endif(${S1AP_RELEASE} STREQUAL "R8") add_definitions(-DS1AP_VERSION=${S1AP_VERSION}) set(S1AP_ASN_DIR ${S1AP_DIR}/MESSAGES/ASN1/${S1AP_RELEASE}) @@ -472,7 +472,7 @@ add_library(S1AP_ENB # Same limitation as described in RRC/S1AP: unknown generated file list # so we generate it at cmake time ############## -add_list1_option(X2AP_RELEASE R14 "X2AP ASN.1 grammar version" R8 R11 R12 R14 R15) +add_list1_option(X2AP_RELEASE R15 "X2AP ASN.1 grammar version" R8 R11 R12 R14 R15) set(X2AP_DIR ${OPENAIR2_DIR}/X2AP) if (${X2AP_RELEASE} STREQUAL "R8") @@ -488,8 +488,8 @@ elseif (${X2AP_RELEASE} STREQUAL "R14") make_version(X2AP_VERSION 14 6 0) set(X2AP_ASN_FILES x2ap-14.6.0.asn1) elseif (${X2AP_RELEASE} STREQUAL "R15") - make_version(X2AP_VERSION 15 1 0) - set(X2AP_ASN_FILES x2ap-15.1.0.asn1) + make_version(X2AP_VERSION 15 3 0) + set(X2AP_ASN_FILES x2ap-15.3.0.asn1) endif(${X2AP_RELEASE} STREQUAL "R8") add_definitions(-DX2AP_VERSION=${X2AP_VERSION}) set(X2AP_ASN_DIR ${X2AP_DIR}/MESSAGES/ASN1/${X2AP_RELEASE}) diff --git a/openair2/X2AP/MESSAGES/ASN1/R15/x2ap-15.3.0.asn1 b/openair2/X2AP/MESSAGES/ASN1/R15/x2ap-15.3.0.asn1 new file mode 100644 index 0000000000..9a2eb33e59 --- /dev/null +++ b/openair2/X2AP/MESSAGES/ASN1/R15/x2ap-15.3.0.asn1 @@ -0,0 +1,8097 @@ +-- ************************************************************** +-- +-- Elementary Procedure definitions +-- +-- ************************************************************** + +X2AP-PDU-Descriptions { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +eps-Access (21) modules (3) x2ap (2) version1 (1) x2ap-PDU-Descriptions (0) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + Criticality, + ProcedureCode + +FROM X2AP-CommonDataTypes + + CellActivationRequest, + CellActivationResponse, + CellActivationFailure, + ENBConfigurationUpdate, + ENBConfigurationUpdateAcknowledge, + ENBConfigurationUpdateFailure, + ErrorIndication, + HandoverCancel, + HandoverReport, + HandoverPreparationFailure, + HandoverRequest, + HandoverRequestAcknowledge, + LoadInformation, + PrivateMessage, + ResetRequest, + ResetResponse, + ResourceStatusFailure, + ResourceStatusRequest, + ResourceStatusResponse, + ResourceStatusUpdate, + RLFIndication, + SNStatusTransfer, + UEContextRelease, + X2SetupFailure, + X2SetupRequest, + X2SetupResponse, + MobilityChangeRequest, + MobilityChangeAcknowledge, + MobilityChangeFailure, + X2Release, + X2APMessageTransfer, + SeNBAdditionRequest, + SeNBAdditionRequestAcknowledge, + SeNBAdditionRequestReject, + SeNBReconfigurationComplete, + SeNBModificationRequest, + SeNBModificationRequestAcknowledge, + SeNBModificationRequestReject, + SeNBModificationRequired, + SeNBModificationConfirm, + SeNBModificationRefuse, + SeNBReleaseRequest, + SeNBReleaseRequired, + SeNBReleaseConfirm, + SeNBCounterCheckRequest, + X2RemovalFailure, + X2RemovalRequest, + X2RemovalResponse, + RetrieveUEContextRequest, + RetrieveUEContextResponse, + RetrieveUEContextFailure, + SgNBAdditionRequest, + SgNBAdditionRequestAcknowledge, + SgNBAdditionRequestReject, + SgNBReconfigurationComplete, + SgNBModificationRequest, + SgNBModificationRequestAcknowledge, + SgNBModificationRequestReject, + SgNBModificationRequired, + SgNBModificationConfirm, + SgNBModificationRefuse, + SgNBReleaseRequest, + SgNBReleaseRequestAcknowledge, + SgNBReleaseRequestReject, + SgNBReleaseRequired, + SgNBReleaseConfirm, + SgNBCounterCheckRequest, + SgNBChangeRequired, + SgNBChangeConfirm, + SgNBChangeRefuse, + RRCTransfer, + ENDCX2SetupRequest, + ENDCX2SetupResponse, + ENDCX2SetupFailure, + ENDCConfigurationUpdate, + ENDCConfigurationUpdateAcknowledge, + ENDCConfigurationUpdateFailure, + SecondaryRATDataUsageReport, + ENDCCellActivationRequest, + ENDCCellActivationResponse, + ENDCCellActivationFailure, + ENDCPartialResetRequired, + ENDCPartialResetConfirm, + EUTRANRCellResourceCoordinationRequest, + EUTRANRCellResourceCoordinationResponse, + SgNBActivityNotification, + ENDCX2RemovalRequest, + ENDCX2RemovalResponse, + ENDCX2RemovalFailure, + DataForwardingAddressIndication + + +FROM X2AP-PDU-Contents + + id-cellActivation, + id-eNBConfigurationUpdate, + id-errorIndication, + id-handoverCancel, + id-handoverReport, + id-handoverPreparation, + + id-loadIndication, + id-privateMessage, + id-reset, + + id-resourceStatusReporting, + id-resourceStatusReportingInitiation, + id-rLFIndication, + id-snStatusTransfer, + id-uEContextRelease, + id-x2Setup, + id-mobilitySettingsChange, + id-x2Release, + id-x2APMessageTransfer, + id-seNBAdditionPreparation, + id-seNBReconfigurationCompletion, + id-meNBinitiatedSeNBModificationPreparation, + id-seNBinitiatedSeNBModification, + id-meNBinitiatedSeNBRelease, + id-seNBinitiatedSeNBRelease, + id-seNBCounterCheck, + id-x2Removal, + id-retrieveUEContext, + id-sgNBAdditionPreparation, + id-sgNBReconfigurationCompletion, + id-meNBinitiatedSgNBModificationPreparation, + id-sgNBinitiatedSgNBModification, + id-meNBinitiatedSgNBRelease, + id-sgNBinitiatedSgNBRelease, + id-sgNBChange, + id-sgNBCounterCheck, + id-rRCTransfer, + id-endcX2Setup, + id-endcConfigurationUpdate, + id-secondaryRATDataUsageReport, + id-endcCellActivation, + id-endcPartialReset, + id-eUTRANRCellResourceCoordination, + id-SgNBActivityNotification, + id-endcX2Removal, + id-dataForwardingAddressIndication + + +FROM X2AP-Constants; + +-- ************************************************************** +-- +-- Interface Elementary Procedure Class +-- +-- ************************************************************** + +X2AP-ELEMENTARY-PROCEDURE ::= CLASS { + &InitiatingMessage , + &SuccessfulOutcome OPTIONAL, + &UnsuccessfulOutcome OPTIONAL, + &procedureCode ProcedureCode UNIQUE, + &criticality Criticality DEFAULT ignore +} +WITH SYNTAX { + INITIATING MESSAGE &InitiatingMessage + [SUCCESSFUL OUTCOME &SuccessfulOutcome] + [UNSUCCESSFUL OUTCOME &UnsuccessfulOutcome] + PROCEDURE CODE &procedureCode + [CRITICALITY &criticality] +} + +-- ************************************************************** +-- +-- Interface PDU Definition +-- +-- ************************************************************** + +X2AP-PDU ::= CHOICE { + initiatingMessage InitiatingMessage, + successfulOutcome SuccessfulOutcome, + unsuccessfulOutcome UnsuccessfulOutcome, + ... +} + +InitiatingMessage ::= SEQUENCE { + procedureCode X2AP-ELEMENTARY-PROCEDURE.&procedureCode ({X2AP-ELEMENTARY-PROCEDURES}), + criticality X2AP-ELEMENTARY-PROCEDURE.&criticality ({X2AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value X2AP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({X2AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +SuccessfulOutcome ::= SEQUENCE { + procedureCode X2AP-ELEMENTARY-PROCEDURE.&procedureCode ({X2AP-ELEMENTARY-PROCEDURES}), + criticality X2AP-ELEMENTARY-PROCEDURE.&criticality ({X2AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value X2AP-ELEMENTARY-PROCEDURE.&SuccessfulOutcome ({X2AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +UnsuccessfulOutcome ::= SEQUENCE { + procedureCode X2AP-ELEMENTARY-PROCEDURE.&procedureCode ({X2AP-ELEMENTARY-PROCEDURES}), + criticality X2AP-ELEMENTARY-PROCEDURE.&criticality ({X2AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value X2AP-ELEMENTARY-PROCEDURE.&UnsuccessfulOutcome ({X2AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +-- ************************************************************** +-- +-- Interface Elementary Procedure List +-- +-- ************************************************************** + +X2AP-ELEMENTARY-PROCEDURES X2AP-ELEMENTARY-PROCEDURE ::= { + X2AP-ELEMENTARY-PROCEDURES-CLASS-1 | + X2AP-ELEMENTARY-PROCEDURES-CLASS-2 , + ... +} + +X2AP-ELEMENTARY-PROCEDURES-CLASS-1 X2AP-ELEMENTARY-PROCEDURE ::= { + handoverPreparation | + reset | + x2Setup | + resourceStatusReportingInitiation | + eNBConfigurationUpdate | + mobilitySettingsChange | + cellActivation | + seNBAdditionPreparation | + meNBinitiatedSeNBModificationPreparation | + seNBinitiatedSeNBModification | + seNBinitiatedSeNBRelease | + x2Removal | + retrieveUEContext | + sgNBAdditionPreparation | + meNBinitiatedSgNBModificationPreparation | + sgNBinitiatedSgNBModification | + meNBinitiatedSgNBRelease | + sgNBinitiatedSgNBRelease | + sgNBChange | + endcX2Setup | + endcConfigurationUpdate | + endcCellActivation | + endcPartialReset | + eUTRANRCellResourceCoordination | + endcX2Removal , + ... +} + +X2AP-ELEMENTARY-PROCEDURES-CLASS-2 X2AP-ELEMENTARY-PROCEDURE ::= { + snStatusTransfer | + uEContextRelease | + handoverCancel | + errorIndication | + resourceStatusReporting | + loadIndication | + privateMessage | + rLFIndication | + handoverReport | + x2Release | + x2APMessageTransfer | + seNBReconfigurationCompletion | + meNBinitiatedSeNBRelease | + seNBCounterCheck | + sgNBReconfigurationCompletion | + sgNBCounterCheck | + rRCTransfer | + secondaryRATDataUsageReport | + sgNBActivityNotification | + dataForwardingAddressIndication, + ... + +} + +-- ************************************************************** +-- +-- Interface Elementary Procedures +-- +-- ************************************************************** + +handoverPreparation X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE HandoverRequest + SUCCESSFUL OUTCOME HandoverRequestAcknowledge + UNSUCCESSFUL OUTCOME HandoverPreparationFailure + PROCEDURE CODE id-handoverPreparation + CRITICALITY reject +} + +snStatusTransfer X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SNStatusTransfer + PROCEDURE CODE id-snStatusTransfer + CRITICALITY ignore +} + +uEContextRelease X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextRelease + PROCEDURE CODE id-uEContextRelease + CRITICALITY ignore +} + + +handoverCancel X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE HandoverCancel + PROCEDURE CODE id-handoverCancel + CRITICALITY ignore +} + +handoverReport X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE HandoverReport + PROCEDURE CODE id-handoverReport + CRITICALITY ignore +} + +errorIndication X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ErrorIndication + PROCEDURE CODE id-errorIndication + CRITICALITY ignore +} + +reset X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ResetRequest + SUCCESSFUL OUTCOME ResetResponse + PROCEDURE CODE id-reset + CRITICALITY reject +} + +x2Setup X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE X2SetupRequest + SUCCESSFUL OUTCOME X2SetupResponse + UNSUCCESSFUL OUTCOME X2SetupFailure + PROCEDURE CODE id-x2Setup + CRITICALITY reject +} + + +loadIndication X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE LoadInformation + PROCEDURE CODE id-loadIndication + CRITICALITY ignore +} + +eNBConfigurationUpdate X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ENBConfigurationUpdate + SUCCESSFUL OUTCOME ENBConfigurationUpdateAcknowledge + UNSUCCESSFUL OUTCOME ENBConfigurationUpdateFailure + PROCEDURE CODE id-eNBConfigurationUpdate + CRITICALITY reject +} + +resourceStatusReportingInitiation X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ResourceStatusRequest + SUCCESSFUL OUTCOME ResourceStatusResponse + UNSUCCESSFUL OUTCOME ResourceStatusFailure + PROCEDURE CODE id-resourceStatusReportingInitiation + CRITICALITY reject +} + +resourceStatusReporting X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ResourceStatusUpdate + PROCEDURE CODE id-resourceStatusReporting + CRITICALITY ignore +} + +rLFIndication X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE RLFIndication + PROCEDURE CODE id-rLFIndication + CRITICALITY ignore +} + +privateMessage X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PrivateMessage + PROCEDURE CODE id-privateMessage + CRITICALITY ignore +} + +mobilitySettingsChange X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE MobilityChangeRequest + SUCCESSFUL OUTCOME MobilityChangeAcknowledge + UNSUCCESSFUL OUTCOME MobilityChangeFailure + PROCEDURE CODE id-mobilitySettingsChange + CRITICALITY reject +} + +cellActivation X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE CellActivationRequest + SUCCESSFUL OUTCOME CellActivationResponse + UNSUCCESSFUL OUTCOME CellActivationFailure + PROCEDURE CODE id-cellActivation + CRITICALITY reject +} + +x2Release X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE X2Release + PROCEDURE CODE id-x2Release + CRITICALITY reject +} + +x2APMessageTransfer X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE X2APMessageTransfer + PROCEDURE CODE id-x2APMessageTransfer + CRITICALITY reject +} + +seNBAdditionPreparation X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SeNBAdditionRequest + SUCCESSFUL OUTCOME SeNBAdditionRequestAcknowledge + UNSUCCESSFUL OUTCOME SeNBAdditionRequestReject + PROCEDURE CODE id-seNBAdditionPreparation + CRITICALITY reject +} + +seNBReconfigurationCompletion X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SeNBReconfigurationComplete + PROCEDURE CODE id-seNBReconfigurationCompletion + CRITICALITY ignore +} + +meNBinitiatedSeNBModificationPreparation X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SeNBModificationRequest + SUCCESSFUL OUTCOME SeNBModificationRequestAcknowledge + UNSUCCESSFUL OUTCOME SeNBModificationRequestReject + PROCEDURE CODE id-meNBinitiatedSeNBModificationPreparation + CRITICALITY reject +} + +seNBinitiatedSeNBModification X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SeNBModificationRequired + SUCCESSFUL OUTCOME SeNBModificationConfirm + UNSUCCESSFUL OUTCOME SeNBModificationRefuse + PROCEDURE CODE id-seNBinitiatedSeNBModification + CRITICALITY reject +} + +meNBinitiatedSeNBRelease X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SeNBReleaseRequest + PROCEDURE CODE id-meNBinitiatedSeNBRelease + CRITICALITY ignore +} + +seNBinitiatedSeNBRelease X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SeNBReleaseRequired + SUCCESSFUL OUTCOME SeNBReleaseConfirm + PROCEDURE CODE id-seNBinitiatedSeNBRelease + CRITICALITY reject +} + +seNBCounterCheck X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SeNBCounterCheckRequest + PROCEDURE CODE id-seNBCounterCheck + CRITICALITY reject +} + +x2Removal X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE X2RemovalRequest + SUCCESSFUL OUTCOME X2RemovalResponse + UNSUCCESSFUL OUTCOME X2RemovalFailure + PROCEDURE CODE id-x2Removal + CRITICALITY reject +} + +retrieveUEContext X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE RetrieveUEContextRequest + SUCCESSFUL OUTCOME RetrieveUEContextResponse + UNSUCCESSFUL OUTCOME RetrieveUEContextFailure + PROCEDURE CODE id-retrieveUEContext + CRITICALITY reject +} + +sgNBAdditionPreparation X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SgNBAdditionRequest + SUCCESSFUL OUTCOME SgNBAdditionRequestAcknowledge + UNSUCCESSFUL OUTCOME SgNBAdditionRequestReject + PROCEDURE CODE id-sgNBAdditionPreparation + CRITICALITY reject +} + +sgNBReconfigurationCompletion X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SgNBReconfigurationComplete + PROCEDURE CODE id-sgNBReconfigurationCompletion + CRITICALITY ignore +} + +meNBinitiatedSgNBModificationPreparation X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SgNBModificationRequest + SUCCESSFUL OUTCOME SgNBModificationRequestAcknowledge + UNSUCCESSFUL OUTCOME SgNBModificationRequestReject + PROCEDURE CODE id-meNBinitiatedSgNBModificationPreparation + CRITICALITY reject +} + +sgNBinitiatedSgNBModification X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SgNBModificationRequired + SUCCESSFUL OUTCOME SgNBModificationConfirm + UNSUCCESSFUL OUTCOME SgNBModificationRefuse + PROCEDURE CODE id-sgNBinitiatedSgNBModification + CRITICALITY reject +} + +meNBinitiatedSgNBRelease X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SgNBReleaseRequest + SUCCESSFUL OUTCOME SgNBReleaseRequestAcknowledge + UNSUCCESSFUL OUTCOME SgNBReleaseRequestReject + PROCEDURE CODE id-meNBinitiatedSgNBRelease + CRITICALITY ignore +} + +sgNBinitiatedSgNBRelease X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SgNBReleaseRequired + SUCCESSFUL OUTCOME SgNBReleaseConfirm + PROCEDURE CODE id-sgNBinitiatedSgNBRelease + CRITICALITY reject +} + +sgNBCounterCheck X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SgNBCounterCheckRequest + PROCEDURE CODE id-sgNBCounterCheck + CRITICALITY reject +} + +sgNBChange X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SgNBChangeRequired + SUCCESSFUL OUTCOME SgNBChangeConfirm + UNSUCCESSFUL OUTCOME SgNBChangeRefuse + PROCEDURE CODE id-sgNBChange + CRITICALITY reject +} + +rRCTransfer X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE RRCTransfer + PROCEDURE CODE id-rRCTransfer + CRITICALITY reject +} + +endcX2Setup X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ENDCX2SetupRequest + SUCCESSFUL OUTCOME ENDCX2SetupResponse + UNSUCCESSFUL OUTCOME ENDCX2SetupFailure + PROCEDURE CODE id-endcX2Setup + CRITICALITY reject +} + + +endcConfigurationUpdate X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ENDCConfigurationUpdate + SUCCESSFUL OUTCOME ENDCConfigurationUpdateAcknowledge + UNSUCCESSFUL OUTCOME ENDCConfigurationUpdateFailure + PROCEDURE CODE id-endcConfigurationUpdate + CRITICALITY reject +} + +secondaryRATDataUsageReport X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SecondaryRATDataUsageReport + PROCEDURE CODE id-secondaryRATDataUsageReport + CRITICALITY reject +} + +endcCellActivation X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ENDCCellActivationRequest + SUCCESSFUL OUTCOME ENDCCellActivationResponse + UNSUCCESSFUL OUTCOME ENDCCellActivationFailure + PROCEDURE CODE id-endcCellActivation + CRITICALITY reject +} + +endcPartialReset X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ENDCPartialResetRequired + SUCCESSFUL OUTCOME ENDCPartialResetConfirm + PROCEDURE CODE id-endcPartialReset + CRITICALITY reject +} + +eUTRANRCellResourceCoordination X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE EUTRANRCellResourceCoordinationRequest + SUCCESSFUL OUTCOME EUTRANRCellResourceCoordinationResponse + PROCEDURE CODE id-eUTRANRCellResourceCoordination + CRITICALITY reject +} + +sgNBActivityNotification X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SgNBActivityNotification + PROCEDURE CODE id-SgNBActivityNotification + CRITICALITY reject +} + + +endcX2Removal X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ENDCX2RemovalRequest + SUCCESSFUL OUTCOME ENDCX2RemovalResponse + UNSUCCESSFUL OUTCOME ENDCX2RemovalFailure + PROCEDURE CODE id-endcX2Removal + CRITICALITY reject +} + +dataForwardingAddressIndication X2AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE DataForwardingAddressIndication + PROCEDURE CODE id-dataForwardingAddressIndication + CRITICALITY ignore +} + +END + + +-- ************************************************************** +-- +-- PDU definitions for X2AP. +-- +-- ************************************************************** + +X2AP-PDU-Contents { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +eps-Access (21) modules (3) x2ap (2) version1 (1) x2ap-PDU-Contents (1) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + ABSInformation, + ABS-Status, + AS-SecurityInformation, + BearerType, + Cause, + CompositeAvailableCapacityGroup, + Correlation-ID, + COUNTvalue, + CellReportingIndicator, + AerialUEsubscriptionInformation, + CriticalityDiagnostics, + CRNTI, + CSGMembershipStatus, + CSG-Id, + DeactivationIndication, + DL-Forwarding, + DynamicDLTransmissionInformation, + ECGI, + E-RAB-ID, + E-RAB-Level-QoS-Parameters, + E-RAB-List, + EUTRANTraceID, + GlobalENB-ID, + GTPtunnelEndpoint, + GUGroupIDList, + GUMMEI, + HandoverReportType, + HandoverRestrictionList, + Masked-IMEISV, + InvokeIndication, + LocationReportingInformation, + MDT-Configuration, + ManagementBasedMDTallowed, + MDTPLMNList, + Neighbour-Information, + PCI, + PDCP-SN, + PLMN-Identity, + ReceiveStatusofULPDCPSDUs, + Registration-Request, + RelativeNarrowbandTxPower, + RadioResourceStatus, + RLC-Status, + RRCConnReestabIndicator, + RRCConnSetupIndicator, + UE-RLF-Report-Container, + UEAppLayerMeasConfig, + RRC-Context, + ServedCell-Information, + ServedCells, + ShortMAC-I, + SRVCCOperationPossible, + SubscriberProfileIDforRFP, + TargetCellInUTRAN, + TargeteNBtoSource-eNBTransparentContainer, + TimeToWait, + TraceActivation, + TraceDepth, + TransportLayerAddress, + UEAggregateMaximumBitRate, + UE-HistoryInformation, + UE-HistoryInformationFromTheUE, + UE-S1AP-ID, + UESecurityCapabilities, + UEsToBeResetList, + UE-X2AP-ID, + UL-HighInterferenceIndicationInfo, + UL-InterferenceOverloadIndication, + HWLoadIndicator, + S1TNLLoadIndicator, + Measurement-ID, + ReportCharacteristics, + MobilityParametersInformation, + MobilityParametersModificationRange, + ReceiveStatusOfULPDCPSDUsExtended, + COUNTValueExtended, + SubframeAssignment, + ExtendedULInterferenceOverloadInfo, + ExpectedUEBehaviour, + SeNBSecurityKey, + MeNBtoSeNBContainer, + SeNBtoMeNBContainer, + SCGChangeIndication, + CoMPInformation, + ReportingPeriodicityRSRPMR, + RSRPMRList, + UE-RLF-Report-Container-for-extended-bands, + ProSeAuthorized, + CoverageModificationList, + ReportingPeriodicityCSIR, + CSIReportList, + ReceiveStatusOfULPDCPSDUsPDCP-SNlength18, + COUNTvaluePDCP-SNlength18, + LHN-ID, + UE-ContextKeptIndicator, + UE-X2AP-ID-Extension, + SIPTOBearerDeactivationIndication, + TunnelInformation, + V2XServicesAuthorized, + X2BenefitValue, + ResumeID, + EUTRANCellIdentifier, + MakeBeforeBreakIndicator, + WTID, + WT-UE-XwAP-ID, + UESidelinkAggregateMaximumBitRate, + SgNBSecurityKey, + MeNBtoSgNBContainer, + SgNBtoMeNBContainer, + SplitSRBs, + RRCContainer, + SRBType, + GlobalGNB-ID, + GNB-ID, + SCGConfigurationQuery, + SplitSRB, + UENRMeasurement, + EN-DC-ResourceConfiguration, + TAC, + NRFreqInfo, + NRCGI, + NRPCI, + NRUESecurityCapabilities, + PDCPChangeIndication, + ULConfiguration, + SgNB-UE-X2AP-ID, + SecondaryRATUsageReportList, + ActivationID, + MeNBResourceCoordinationInformation, + SgNBResourceCoordinationInformation, + NR-TxBW, + BroadcastPLMNs-Item, + RLCMode, + GBR-QosInformation, + DRB-ID, + FiveGS-TAC, + SULInformation, + Packet-LossRate, + ResourceType, + DataTrafficResourceIndication, + SpectrumSharingGroupID, + RRC-Config-Ind, + SGNB-Addition-Trigger-Ind, + UserPlaneTrafficActivityReport, + ERABActivityNotifyItemList, + PDCPSnLength, + Subscription-Based-UE-DifferentiationInfo + + +FROM X2AP-IEs + + PrivateIE-Container{}, + ProtocolExtensionContainer{}, + ProtocolIE-Container{}, + ProtocolIE-ContainerList{}, + ProtocolIE-ContainerPair{}, + ProtocolIE-ContainerPairList{}, + ProtocolIE-Single-Container{}, + X2AP-PRIVATE-IES, + X2AP-PROTOCOL-EXTENSION, + X2AP-PROTOCOL-IES, + X2AP-PROTOCOL-IES-PAIR +FROM X2AP-Containers + + id-ABSInformation, + id-ActivatedCellList, + id-BearerType, + id-Cause, + id-CellInformation, + id-CellInformation-Item, + id-CellMeasurementResult, + id-CellMeasurementResult-Item, + id-CellToReport, + id-CellToReport-Item, + id-CompositeAvailableCapacityGroup, + id-AerialUEsubscriptionInformation, + id-CriticalityDiagnostics, + id-DeactivationIndication, + id-DynamicDLTransmissionInformation, + id-E-RABs-Admitted-Item, + id-E-RABs-Admitted-List, + id-E-RABs-NotAdmitted-List, + id-E-RABs-SubjectToStatusTransfer-List, + id-E-RABs-SubjectToStatusTransfer-Item, + id-E-RABs-ToBeSetup-Item, + id-GlobalENB-ID, + id-GUGroupIDList, + id-GUGroupIDToAddList, + id-GUGroupIDToDeleteList, + id-GUMMEI-ID, + id-Masked-IMEISV, + id-InvokeIndication, + id-New-eNB-UE-X2AP-ID, + id-Old-eNB-UE-X2AP-ID, + id-Registration-Request, + id-ReportingPeriodicity, + id-RLC-Status, + id-ServedCells, + id-ServedCellsToActivate, + id-ServedCellsToAdd, + id-ServedCellsToModify, + id-ServedCellsToDelete, + id-SRVCCOperationPossible, + id-TargetCell-ID, + id-TargeteNBtoSource-eNBTransparentContainer, + id-TimeToWait, + id-TraceActivation, + id-UE-ContextInformation, + id-UE-HistoryInformation, + id-UE-X2AP-ID, + id-Measurement-ID, + id-ReportCharacteristics, + id-ENB1-Measurement-ID, + id-ENB2-Measurement-ID, + id-ENB1-Cell-ID, + id-ENB2-Cell-ID, + id-ENB2-Proposed-Mobility-Parameters, + id-ENB1-Mobility-Parameters, + id-ENB2-Mobility-Parameters-Modification-Range, + id-FailureCellPCI, + id-Re-establishmentCellECGI, + id-FailureCellCRNTI, + id-ShortMAC-I, + id-SourceCellECGI, + id-FailureCellECGI, + id-HandoverReportType, + id-UE-RLF-Report-Container, + id-PartialSuccessIndicator, + id-MeasurementInitiationResult-List, + id-MeasurementInitiationResult-Item, + id-MeasurementFailureCause-Item, + id-CompleteFailureCauseInformation-List, + id-CompleteFailureCauseInformation-Item, + id-CSGMembershipStatus, + id-CSG-Id, + id-MDTConfiguration, + id-ManagementBasedMDTallowed, + id-ABS-Status, + id-RRCConnSetupIndicator, + id-RRCConnReestabIndicator, + id-TargetCellInUTRAN, + id-MobilityInformation, + id-SourceCellCRNTI, + id-ManagementBasedMDTPLMNList, + id-ReceiveStatusOfULPDCPSDUsExtended, + id-ULCOUNTValueExtended, + id-DLCOUNTValueExtended, + id-IntendedULDLConfiguration, + id-ExtendedULInterferenceOverloadInfo, + id-RNL-Header, + id-x2APMessage, + id-UE-HistoryInformationFromTheUE, + id-ExpectedUEBehaviour, + id-MeNB-UE-X2AP-ID, + id-SeNB-UE-X2AP-ID, + id-UE-SecurityCapabilities, + id-SeNBSecurityKey, + id-SeNBUEAggregateMaximumBitRate, + id-ServingPLMN, + id-E-RABs-ToBeAdded-List, + id-E-RABs-ToBeAdded-Item, + id-MeNBtoSeNBContainer, + id-E-RABs-Admitted-ToBeAdded-List, + id-E-RABs-Admitted-ToBeAdded-Item, + id-SeNBtoMeNBContainer, + id-ResponseInformationSeNBReconfComp, + id-UE-ContextInformationSeNBModReq, + id-E-RABs-ToBeAdded-ModReqItem, + id-E-RABs-ToBeModified-ModReqItem, + id-E-RABs-ToBeReleased-ModReqItem, + id-E-RABs-Admitted-ToBeAdded-ModAckList, + id-E-RABs-Admitted-ToBeModified-ModAckList, + id-E-RABs-Admitted-ToBeReleased-ModAckList, + id-E-RABs-Admitted-ToBeAdded-ModAckItem, + id-E-RABs-Admitted-ToBeModified-ModAckItem, + id-E-RABs-Admitted-ToBeReleased-ModAckItem, + id-SCGChangeIndication, + id-E-RABs-ToBeReleased-ModReqd, + id-E-RABs-ToBeReleased-ModReqdItem, + id-E-RABs-ToBeReleased-List-RelReq, + id-E-RABs-ToBeReleased-RelReqItem, + id-E-RABs-ToBeReleased-List-RelConf, + id-E-RABs-ToBeReleased-RelConfItem, + id-E-RABs-SubjectToCounterCheck-List, + id-E-RABs-SubjectToCounterCheckItem, + id-CoMPInformation, + id-ReportingPeriodicityRSRPMR, + id-RSRPMRList, + id-UE-RLF-Report-Container-for-extended-bands, + id-ProSeAuthorized, + id-CoverageModificationList, + id-ReportingPeriodicityCSIR, + id-CSIReportList, + id-ReceiveStatusOfULPDCPSDUsPDCP-SNlength18, + id-ULCOUNTValuePDCP-SNlength18, + id-DLCOUNTValuePDCP-SNlength18, + id-LHN-ID, + id-Correlation-ID, + id-SIPTO-Correlation-ID, + id-UE-ContextReferenceAtSeNB, + id-UE-ContextReferenceAtWT, + id-UE-ContextKeptIndicator, + id-UEs-ToBeReset, + id-UEs-Admitted-ToBeReset, + id-WT-UE-ContextKeptIndicator, + id-New-eNB-UE-X2AP-ID-Extension, + id-Old-eNB-UE-X2AP-ID-Extension, + id-MeNB-UE-X2AP-ID-Extension, + id-SeNB-UE-X2AP-ID-Extension, + id-SIPTO-BearerDeactivationIndication, + id-Tunnel-Information-for-BBF, + id-SIPTO-L-GW-TransportLayerAddress, + id-GW-TransportLayerAddress, + id-X2RemovalThreshold, + id-CellReportingIndicator, + id-V2XServicesAuthorized, + id-resumeID, + id-UE-ContextInformationRetrieve, + id-E-RABs-ToBeSetupRetrieve-Item, + id-NewEUTRANCellIdentifier, + id-MakeBeforeBreakIndicator, + id-UESidelinkAggregateMaximumBitRate, + id-uL-GTPtunnelEndpoint, + id-SgNBSecurityKey, + id-SgNBUEAggregateMaximumBitRate, + id-E-RABs-ToBeAdded-SgNBAddReqList, + id-MeNBtoSgNBContainer, + id-SgNB-UE-X2AP-ID, + id-RequestedSplitSRBs, + id-E-RABs-ToBeAdded-SgNBAddReq-Item, + id-E-RABs-Admitted-ToBeAdded-SgNBAddReqAckList, + id-SgNBtoMeNBContainer, + id-AdmittedSplitSRBs , + id-E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item, + id-ResponseInformationSgNBReconfComp, + id-UE-ContextInformation-SgNBModReq, + id-E-RABs-ToBeAdded-SgNBModReq-Item, + id-E-RABs-ToBeModified-SgNBModReq-Item, + id-E-RABs-ToBeReleased-SgNBModReq-Item, + id-E-RABs-Admitted-ToBeAdded-SgNBModAckList, + id-E-RABs-Admitted-ToBeModified-SgNBModAckList, + id-E-RABs-Admitted-ToBeReleased-SgNBModAckList, + id-E-RABs-Admitted-ToBeAdded-SgNBModAck-Item, + id-E-RABs-Admitted-ToBeModified-SgNBModAck-Item, + id-E-RABs-Admitted-ToBeReleased-SgNBModAck-Item, + id-E-RABs-ToBeReleased-SgNBModReqdList, + id-E-RABs-ToBeModified-SgNBModReqdList, + id-E-RABs-ToBeReleased-SgNBModReqd-Item, + id-E-RABs-ToBeModified-SgNBModReqd-Item, + id-E-RABs-ToBeReleased-SgNBChaConfList, + id-E-RABs-ToBeReleased-SgNBChaConf-Item, + id-E-RABs-ToBeReleased-SgNBRelReqList, + id-E-RABs-ToBeReleased-SgNBRelReq-Item, + id-E-RABs-ToBeReleased-SgNBRelConfList, + id-E-RABs-ToBeReleased-SgNBRelConf-Item, + id-E-RABs-SubjectToSgNBCounterCheck-List, + id-E-RABs-SubjectToSgNBCounterCheck-Item, + id-Target-SgNB-ID, + id-RRCContainer, + id-SRBType, + id-HandoverRestrictionList, + id-SCGConfigurationQuery, + id-SplitSRB, + id-UENRMeasurement, + id-InitiatingNodeType-EndcX2Setup, + id-InitiatingNodeType-EndcConfigUpdate, + id-RespondingNodeType-EndcX2Setup, + id-RespondingNodeType-EndcConfigUpdate, + id-NRUESecurityCapabilities, + id-PDCPChangeIndication, + id-ServedEUTRAcellsENDCX2ManagementList, + id-ServedEUTRAcellsToModifyListENDCConfUpd, + id-ServedEUTRAcellsToDeleteListENDCConfUpd, + id-ServedNRcellsToModifyListENDCConfUpd, + id-ServedNRcellsToDeleteListENDCConfUpd, + id-CellAssistanceInformation, + id-Globalen-gNB-ID, + id-ServedNRcellsENDCX2ManagementList, + id-Old-SgNB-UE-X2AP-ID, + id-UE-ContextReferenceAtSgNB, + id-SecondaryRATUsageReportList, + id-ActivationID, + id-ServedNRCellsToActivate, + id-ActivatedNRCellList, + id-MeNBResourceCoordinationInformation, + id-SgNBResourceCoordinationInformation, + id-UEAppLayerMeasConfig, + id-SelectedPLMN, + id-SubscriberProfileIDforRFP, + id-InitiatingNodeType-EutranrCellResourceCoordination, + id-RespondingNodeType-EutranrCellResourceCoordination, + id-DataTrafficResourceIndication, + id-SpectrumSharingGroupID, + id-ListofEUTRACellsinEUTRACoordinationReq, + id-ListofEUTRACellsinEUTRACoordinationResp, + id-ListofEUTRACellsinNRCoordinationReq, + id-ListofNRCellsinNRCoordinationReq, + id-ListofNRCellsinNRCoordinationResp, + id-RRCConfigIndication, + id-SGNB-Addition-Trigger-Ind, + id-RequestedSplitSRBsrelease, + id-AdmittedSplitSRBsrelease, + id-E-RABs-AdmittedToBeModified-SgNBModConfList, + id-E-RABs-AdmittedToBeModified-SgNBModConf-Item, + id-UEContextLevelUserPlaneActivity, + id-ERABActivityNotifyItemList, + id-MeNBCell-ID, + id-InitiatingNodeType-EndcX2Removal, + id-RespondingNodeType-EndcX2Removal, + id-pDCPSnLength, + id-dL-Forwarding, + id-E-RABs-DataForwardingAddress-List, + id-E-RABs-DataForwardingAddress-Item, + id-Subscription-Based-UE-DifferentiationInfo, + + + maxCellineNB, + maxnoofBearers, + maxnoofPDCP-SN, + maxFailedMeasObjects, + maxnoofCellIDforMDT, + maxnoofTAforMDT, + maxofNRNeighbours, + maxCellinengNB, + maxnoofCellIDforQMC, + maxnoofTAforQMC, + maxnoofPLMNforQMC, + maxnoofProtectedResourcePatterns, + maxnoNRcellsSpectrumSharingWithE-UTRA, + maxnoofNrCellBands + +FROM X2AP-Constants; + +-- ************************************************************** +-- +-- HANDOVER REQUEST +-- +-- ************************************************************** + +HandoverRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{HandoverRequest-IEs}}, + ... +} + +HandoverRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Old-eNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-TargetCell-ID CRITICALITY reject TYPE ECGI PRESENCE mandatory}| + { ID id-GUMMEI-ID CRITICALITY reject TYPE GUMMEI PRESENCE mandatory}| + { ID id-UE-ContextInformation CRITICALITY reject TYPE UE-ContextInformation PRESENCE mandatory}| + { ID id-UE-HistoryInformation CRITICALITY ignore TYPE UE-HistoryInformation PRESENCE mandatory}| + { ID id-TraceActivation CRITICALITY ignore TYPE TraceActivation PRESENCE optional}| + { ID id-SRVCCOperationPossible CRITICALITY ignore TYPE SRVCCOperationPossible PRESENCE optional}| + { ID id-CSGMembershipStatus CRITICALITY reject TYPE CSGMembershipStatus PRESENCE optional}| + { ID id-MobilityInformation CRITICALITY ignore TYPE MobilityInformation PRESENCE optional}| + { ID id-Masked-IMEISV CRITICALITY ignore TYPE Masked-IMEISV PRESENCE optional}| + { ID id-UE-HistoryInformationFromTheUE CRITICALITY ignore TYPE UE-HistoryInformationFromTheUE PRESENCE optional}| + { ID id-ExpectedUEBehaviour CRITICALITY ignore TYPE ExpectedUEBehaviour PRESENCE optional}| + { ID id-ProSeAuthorized CRITICALITY ignore TYPE ProSeAuthorized PRESENCE optional}| + { ID id-UE-ContextReferenceAtSeNB CRITICALITY ignore TYPE UE-ContextReferenceAtSeNB PRESENCE optional}| + { ID id-Old-eNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-V2XServicesAuthorized CRITICALITY ignore TYPE V2XServicesAuthorized PRESENCE optional}| + { ID id-UE-ContextReferenceAtWT CRITICALITY ignore TYPE UE-ContextReferenceAtWT PRESENCE optional}| + { ID id-NRUESecurityCapabilities CRITICALITY ignore TYPE NRUESecurityCapabilities PRESENCE optional}| + { ID id-UE-ContextReferenceAtSgNB CRITICALITY ignore TYPE UE-ContextReferenceAtSgNB PRESENCE optional}| + { ID id-AerialUEsubscriptionInformation CRITICALITY ignore TYPE AerialUEsubscriptionInformation PRESENCE optional}| + { ID id-Subscription-Based-UE-DifferentiationInfo CRITICALITY ignore TYPE Subscription-Based-UE-DifferentiationInfo PRESENCE optional}, + ... +} + +UE-ContextInformation ::= SEQUENCE { + mME-UE-S1AP-ID UE-S1AP-ID, + uESecurityCapabilities UESecurityCapabilities, + aS-SecurityInformation AS-SecurityInformation, + uEaggregateMaximumBitRate UEAggregateMaximumBitRate, + subscriberProfileIDforRFP SubscriberProfileIDforRFP OPTIONAL, + e-RABs-ToBeSetup-List E-RABs-ToBeSetup-List, + rRC-Context RRC-Context, + handoverRestrictionList HandoverRestrictionList OPTIONAL, + locationReportingInformation LocationReportingInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {UE-ContextInformation-ExtIEs} } OPTIONAL, + ... +} + +UE-ContextInformation-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { +{ ID id-ManagementBasedMDTallowed CRITICALITY ignore EXTENSION ManagementBasedMDTallowed PRESENCE optional }| +{ ID id-ManagementBasedMDTPLMNList CRITICALITY ignore EXTENSION MDTPLMNList PRESENCE optional }| +{ ID id-UESidelinkAggregateMaximumBitRate CRITICALITY ignore EXTENSION UESidelinkAggregateMaximumBitRate PRESENCE optional}, + ... +} + +E-RABs-ToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeSetup-ItemIEs} } + +E-RABs-ToBeSetup-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeSetup-Item CRITICALITY ignore TYPE E-RABs-ToBeSetup-Item PRESENCE mandatory }, + ... +} + +E-RABs-ToBeSetup-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters, + dL-Forwarding DL-Forwarding OPTIONAL, + uL-GTPtunnelEndpoint GTPtunnelEndpoint, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeSetup-ItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeSetup-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-BearerType CRITICALITY reject EXTENSION BearerType PRESENCE optional}, + ... +} + +MobilityInformation ::= BIT STRING (SIZE(32)) + +UE-ContextReferenceAtSeNB ::= SEQUENCE { + source-GlobalSeNB-ID GlobalENB-ID, + seNB-UE-X2AP-ID UE-X2AP-ID, + seNB-UE-X2AP-ID-Extension UE-X2AP-ID-Extension, + iE-Extensions ProtocolExtensionContainer { {UE-ContextReferenceAtSeNB-ItemExtIEs} } OPTIONAL, + ... +} + +UE-ContextReferenceAtSeNB-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +UE-ContextReferenceAtWT ::= SEQUENCE { + wTID WTID, + wT-UE-XwAP-ID WT-UE-XwAP-ID, + iE-Extensions ProtocolExtensionContainer { {UE-ContextReferenceAtWT-ItemExtIEs} } OPTIONAL, + ... +} + +UE-ContextReferenceAtWT-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +UE-ContextReferenceAtSgNB ::= SEQUENCE { + source-GlobalSgNB-ID GlobalGNB-ID, + sgNB-UE-X2AP-ID SgNB-UE-X2AP-ID, + iE-Extensions ProtocolExtensionContainer { {UE-ContextReferenceAtSgNB-ItemExtIEs} } OPTIONAL, + ... +} + +UE-ContextReferenceAtSgNB-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- HANDOVER REQUEST ACKNOWLEDGE +-- +-- ************************************************************** + +HandoverRequestAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{HandoverRequestAcknowledge-IEs}}, + ... +} + +HandoverRequestAcknowledge-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Old-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-New-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-Admitted-List CRITICALITY ignore TYPE E-RABs-Admitted-List PRESENCE mandatory}| + { ID id-E-RABs-NotAdmitted-List CRITICALITY ignore TYPE E-RAB-List PRESENCE optional}| + { ID id-TargeteNBtoSource-eNBTransparentContainer CRITICALITY ignore TYPE TargeteNBtoSource-eNBTransparentContainer PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-UE-ContextKeptIndicator CRITICALITY ignore TYPE UE-ContextKeptIndicator PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-Old-eNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-New-eNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-WT-UE-ContextKeptIndicator CRITICALITY ignore TYPE UE-ContextKeptIndicator PRESENCE optional}, + ... +} + +E-RABs-Admitted-List ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-Admitted-ItemIEs} } + +E-RABs-Admitted-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-Admitted-Item CRITICALITY ignore TYPE E-RABs-Admitted-Item PRESENCE mandatory } +} + +E-RABs-Admitted-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + uL-GTP-TunnelEndpoint GTPtunnelEndpoint OPTIONAL, + dL-GTP-TunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-Item-ExtIEs} } OPTIONAL, + ... +} + +E-RABs-Admitted-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- HANDOVER PREPARATION FAILURE +-- +-- ************************************************************** + +HandoverPreparationFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{HandoverPreparationFailure-IEs}}, + ... +} + +HandoverPreparationFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Old-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-Old-eNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + + ... +} + +-- ************************************************************** +-- +-- Handover Report +-- +-- ************************************************************** + +HandoverReport ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{HandoverReport-IEs}}, + ... +} + +HandoverReport-IEs X2AP-PROTOCOL-IES ::= { + { ID id-HandoverReportType CRITICALITY ignore TYPE HandoverReportType PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-SourceCellECGI CRITICALITY ignore TYPE ECGI PRESENCE mandatory}| + { ID id-FailureCellECGI CRITICALITY ignore TYPE ECGI PRESENCE mandatory}| + { ID id-Re-establishmentCellECGI CRITICALITY ignore TYPE ECGI PRESENCE conditional} -- The IE shall be present if the Handover Report Type IE is set to “HO to Wrong Cell” -- | + { ID id-TargetCellInUTRAN CRITICALITY ignore TYPE TargetCellInUTRAN PRESENCE conditional} -- The IE shall be present if the Handover Report Type IE is set to "InterRAT ping-pong" --| + { ID id-SourceCellCRNTI CRITICALITY ignore TYPE CRNTI PRESENCE optional}| + { ID id-MobilityInformation CRITICALITY ignore TYPE MobilityInformation PRESENCE optional}| + { ID id-UE-RLF-Report-Container CRITICALITY ignore TYPE UE-RLF-Report-Container PRESENCE optional}| + { ID id-UE-RLF-Report-Container-for-extended-bands CRITICALITY ignore TYPE UE-RLF-Report-Container-for-extended-bands PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- SN Status Transfer +-- +-- ************************************************************** + +SNStatusTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SNStatusTransfer-IEs}}, + ... +} + +SNStatusTransfer-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Old-eNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-New-eNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-SubjectToStatusTransfer-List CRITICALITY ignore TYPE E-RABs-SubjectToStatusTransfer-List PRESENCE mandatory}| + { ID id-Old-eNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-New-eNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE optional}, + ... +} + +E-RABs-SubjectToStatusTransfer-List ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-SubjectToStatusTransfer-ItemIEs} } + +E-RABs-SubjectToStatusTransfer-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-SubjectToStatusTransfer-Item CRITICALITY ignore TYPE E-RABs-SubjectToStatusTransfer-Item PRESENCE mandatory } +} + +E-RABs-SubjectToStatusTransfer-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + + receiveStatusofULPDCPSDUs ReceiveStatusofULPDCPSDUs OPTIONAL, + uL-COUNTvalue COUNTvalue, + dL-COUNTvalue COUNTvalue, + iE-Extensions ProtocolExtensionContainer { {E-RABs-SubjectToStatusTransfer-ItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-SubjectToStatusTransfer-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-ReceiveStatusOfULPDCPSDUsExtended CRITICALITY ignore EXTENSION ReceiveStatusOfULPDCPSDUsExtended PRESENCE optional}| + { ID id-ULCOUNTValueExtended CRITICALITY ignore EXTENSION COUNTValueExtended PRESENCE optional}| + { ID id-DLCOUNTValueExtended CRITICALITY ignore EXTENSION COUNTValueExtended PRESENCE optional}| + { ID id-ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 CRITICALITY ignore EXTENSION ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 PRESENCE optional}| + { ID id-ULCOUNTValuePDCP-SNlength18 CRITICALITY ignore EXTENSION COUNTvaluePDCP-SNlength18 PRESENCE optional}| + { ID id-DLCOUNTValuePDCP-SNlength18 CRITICALITY ignore EXTENSION COUNTvaluePDCP-SNlength18 PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- UE Context Release +-- +-- ************************************************************** + +UEContextRelease ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{UEContextRelease-IEs}}, + ... +} + +UEContextRelease-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Old-eNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-New-eNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Old-eNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-New-eNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SIPTO-BearerDeactivationIndication CRITICALITY ignore TYPE SIPTOBearerDeactivationIndication PRESENCE optional}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- HANDOVER CANCEL +-- +-- ************************************************************** + +HandoverCancel ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{HandoverCancel-IEs}}, + ... +} + +HandoverCancel-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Old-eNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-New-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE optional}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-Old-eNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-New-eNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- ERROR INDICATION +-- +-- ************************************************************** + +ErrorIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ErrorIndication-IEs}}, + ... +} + +ErrorIndication-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Old-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE optional}| + { ID id-New-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE optional}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-Old-eNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-New-eNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-Old-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- Reset Request +-- +-- ************************************************************** + +ResetRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ResetRequest-IEs}}, + ... +} + +ResetRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- Reset Response +-- +-- ************************************************************** + +ResetResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ResetResponse-IEs}}, + ... +} + +ResetResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- X2 SETUP REQUEST +-- +-- ************************************************************** + +X2SetupRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{X2SetupRequest-IEs}}, + ... +} + +X2SetupRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-GlobalENB-ID CRITICALITY reject TYPE GlobalENB-ID PRESENCE mandatory}| + { ID id-ServedCells CRITICALITY reject TYPE ServedCells PRESENCE mandatory}| + { ID id-GUGroupIDList CRITICALITY reject TYPE GUGroupIDList PRESENCE optional}| + { ID id-LHN-ID CRITICALITY ignore TYPE LHN-ID PRESENCE optional}, +... +} + + + +-- ************************************************************** +-- +-- X2 SETUP RESPONSE +-- +-- ************************************************************** + +X2SetupResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{X2SetupResponse-IEs}}, + ... +} + +X2SetupResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-GlobalENB-ID CRITICALITY reject TYPE GlobalENB-ID PRESENCE mandatory}| + { ID id-ServedCells CRITICALITY reject TYPE ServedCells PRESENCE mandatory}| + { ID id-GUGroupIDList CRITICALITY reject TYPE GUGroupIDList PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-LHN-ID CRITICALITY ignore TYPE LHN-ID PRESENCE optional}, + ... +} + + + +-- ************************************************************** +-- +-- X2 SETUP FAILURE +-- +-- ************************************************************** + +X2SetupFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{X2SetupFailure-IEs}}, + ... +} + +X2SetupFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory} | + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional} | + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + + ... +} + + + +-- ************************************************************** +-- +-- LOAD INFORMATION +-- +-- ************************************************************** + +LoadInformation ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{LoadInformation-IEs}}, + ... +} + +LoadInformation-IEs X2AP-PROTOCOL-IES ::= { + { ID id-CellInformation CRITICALITY ignore TYPE CellInformation-List PRESENCE mandatory} , + ... +} + +CellInformation-List ::= SEQUENCE (SIZE (1..maxCellineNB)) OF ProtocolIE-Single-Container { {CellInformation-ItemIEs} } + +CellInformation-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-CellInformation-Item CRITICALITY ignore TYPE CellInformation-Item PRESENCE mandatory } +} + +CellInformation-Item ::= SEQUENCE { + cell-ID ECGI, + ul-InterferenceOverloadIndication UL-InterferenceOverloadIndication OPTIONAL, + ul-HighInterferenceIndicationInfo UL-HighInterferenceIndicationInfo OPTIONAL, + relativeNarrowbandTxPower RelativeNarrowbandTxPower OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {CellInformation-Item-ExtIEs} } OPTIONAL, + ... +} + +CellInformation-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { +{ ID id-ABSInformation CRITICALITY ignore EXTENSION ABSInformation PRESENCE optional }| +{ ID id-InvokeIndication CRITICALITY ignore EXTENSION InvokeIndication PRESENCE optional }| +{ ID id-IntendedULDLConfiguration CRITICALITY ignore EXTENSION SubframeAssignment PRESENCE optional }| +{ ID id-ExtendedULInterferenceOverloadInfo CRITICALITY ignore EXTENSION ExtendedULInterferenceOverloadInfo PRESENCE optional }| +{ ID id-CoMPInformation CRITICALITY ignore EXTENSION CoMPInformation PRESENCE optional }| +{ ID id-DynamicDLTransmissionInformation CRITICALITY ignore EXTENSION DynamicDLTransmissionInformation PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- ENB CONFIGURATION UPDATE +-- +-- ************************************************************** + +ENBConfigurationUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENBConfigurationUpdate-IEs}}, + ... +} + +ENBConfigurationUpdate-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ServedCellsToAdd CRITICALITY reject TYPE ServedCells PRESENCE optional}| + { ID id-ServedCellsToModify CRITICALITY reject TYPE ServedCellsToModify PRESENCE optional}| + { ID id-ServedCellsToDelete CRITICALITY reject TYPE Old-ECGIs PRESENCE optional}| + { ID id-GUGroupIDToAddList CRITICALITY reject TYPE GUGroupIDList PRESENCE optional}| + { ID id-GUGroupIDToDeleteList CRITICALITY reject TYPE GUGroupIDList PRESENCE optional}| + { ID id-CoverageModificationList CRITICALITY reject TYPE CoverageModificationList PRESENCE optional}, + ... +} + +ServedCellsToModify::= SEQUENCE (SIZE (1..maxCellineNB)) OF ServedCellsToModify-Item + +ServedCellsToModify-Item::= SEQUENCE { + old-ecgi ECGI, + servedCellInfo ServedCell-Information, + neighbour-Info Neighbour-Information OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ServedCellsToModify-Item-ExtIEs} } OPTIONAL, + ... +} + +ServedCellsToModify-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { +{ ID id-DeactivationIndication CRITICALITY ignore EXTENSION DeactivationIndication PRESENCE optional }, + ... +} + + +Old-ECGIs::= SEQUENCE (SIZE (1..maxCellineNB)) OF ECGI + +-- ************************************************************** +-- +-- ENB CONFIGURATION UPDATE ACKNOWLEDGE +-- +-- ************************************************************** + +ENBConfigurationUpdateAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENBConfigurationUpdateAcknowledge-IEs}}, + ... +} + +ENBConfigurationUpdateAcknowledge-IEs X2AP-PROTOCOL-IES ::= { + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, +... +} + +-- ************************************************************** +-- +-- ENB CONFIGURATION UPDATE FAIURE +-- +-- ************************************************************** + +ENBConfigurationUpdateFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENBConfigurationUpdateFailure-IEs}}, + ... +} + +ENBConfigurationUpdateFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + + + +-- ************************************************************** +-- +-- Resource Status Request +-- +-- ************************************************************** + +ResourceStatusRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ResourceStatusRequest-IEs}}, + ... +} + +ResourceStatusRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ENB1-Measurement-ID CRITICALITY reject TYPE Measurement-ID PRESENCE mandatory}| + { ID id-ENB2-Measurement-ID CRITICALITY ignore TYPE Measurement-ID PRESENCE conditional}|-- The IE shall be present if the Registration Request IE is set to “Stop”, “Partial stop” or to “Add”-- + { ID id-Registration-Request CRITICALITY reject TYPE Registration-Request PRESENCE mandatory}| + { ID id-ReportCharacteristics CRITICALITY reject TYPE ReportCharacteristics PRESENCE optional}| + { ID id-CellToReport CRITICALITY ignore TYPE CellToReport-List PRESENCE mandatory}| + { ID id-ReportingPeriodicity CRITICALITY ignore TYPE ReportingPeriodicity PRESENCE optional}| + { ID id-PartialSuccessIndicator CRITICALITY ignore TYPE PartialSuccessIndicator PRESENCE optional}| + { ID id-ReportingPeriodicityRSRPMR CRITICALITY ignore TYPE ReportingPeriodicityRSRPMR PRESENCE optional}| + { ID id-ReportingPeriodicityCSIR CRITICALITY ignore TYPE ReportingPeriodicityCSIR PRESENCE optional}, + ... +} + + +CellToReport-List ::= SEQUENCE (SIZE (1..maxCellineNB)) OF ProtocolIE-Single-Container { {CellToReport-ItemIEs} } + +CellToReport-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-CellToReport-Item CRITICALITY ignore TYPE CellToReport-Item PRESENCE mandatory} +} + +CellToReport-Item ::= SEQUENCE { + cell-ID ECGI, + iE-Extensions ProtocolExtensionContainer { {CellToReport-Item-ExtIEs} } OPTIONAL, + ... +} + +CellToReport-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + + +ReportingPeriodicity ::= ENUMERATED { + one-thousand-ms, + two-thousand-ms, + five-thousand-ms, + ten-thousand-ms, +... +} + +PartialSuccessIndicator ::= ENUMERATED { + partial-success-allowed, +... +} + +-- ************************************************************** +-- +-- Resource Status Response +-- +-- ************************************************************** + +ResourceStatusResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ResourceStatusResponse-IEs}}, + ... +} + +ResourceStatusResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ENB1-Measurement-ID CRITICALITY reject TYPE Measurement-ID PRESENCE mandatory}| + { ID id-ENB2-Measurement-ID CRITICALITY reject TYPE Measurement-ID PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeasurementInitiationResult-List CRITICALITY ignore TYPE MeasurementInitiationResult-List PRESENCE optional}, + ... +} + + +MeasurementInitiationResult-List ::= SEQUENCE (SIZE (1..maxCellineNB)) OF ProtocolIE-Single-Container { {MeasurementInitiationResult-ItemIEs} } + +MeasurementInitiationResult-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-MeasurementInitiationResult-Item CRITICALITY ignore TYPE MeasurementInitiationResult-Item PRESENCE mandatory} +} + +MeasurementInitiationResult-Item ::= SEQUENCE { + cell-ID ECGI, + measurementFailureCause-List MeasurementFailureCause-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {MeasurementInitiationResult-Item-ExtIEs} } OPTIONAL, + ... +} + +MeasurementInitiationResult-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +MeasurementFailureCause-List ::= SEQUENCE (SIZE (1..maxFailedMeasObjects)) OF ProtocolIE-Single-Container { {MeasurementFailureCause-ItemIEs} } + +MeasurementFailureCause-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-MeasurementFailureCause-Item CRITICALITY ignore TYPE MeasurementFailureCause-Item PRESENCE mandatory} +} + +MeasurementFailureCause-Item ::= SEQUENCE { + measurementFailedReportCharacteristics ReportCharacteristics, + cause Cause, + iE-Extensions ProtocolExtensionContainer { {MeasurementFailureCause-Item-ExtIEs} } OPTIONAL, + ... +} + +MeasurementFailureCause-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- Resource Status Failure +-- +-- ************************************************************** + +ResourceStatusFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ResourceStatusFailure-IEs}}, + ... +} + +ResourceStatusFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ENB1-Measurement-ID CRITICALITY reject TYPE Measurement-ID PRESENCE mandatory}| + { ID id-ENB2-Measurement-ID CRITICALITY reject TYPE Measurement-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-CompleteFailureCauseInformation-List CRITICALITY ignore TYPE CompleteFailureCauseInformation-List PRESENCE optional}, + ... +} + +CompleteFailureCauseInformation-List ::= SEQUENCE (SIZE (1..maxCellineNB)) OF ProtocolIE-Single-Container { {CompleteFailureCauseInformation-ItemIEs} } + +CompleteFailureCauseInformation-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-CompleteFailureCauseInformation-Item CRITICALITY ignore TYPE CompleteFailureCauseInformation-Item PRESENCE mandatory} +} + +CompleteFailureCauseInformation-Item ::= SEQUENCE { + cell-ID ECGI, + measurementFailureCause-List MeasurementFailureCause-List, + iE-Extensions ProtocolExtensionContainer { {CompleteFailureCauseInformation-Item-ExtIEs} } OPTIONAL, + ... +} + +CompleteFailureCauseInformation-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- Resource Status Update +-- +-- ************************************************************** + +ResourceStatusUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ResourceStatusUpdate-IEs}}, + ... +} + +ResourceStatusUpdate-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ENB1-Measurement-ID CRITICALITY reject TYPE Measurement-ID PRESENCE mandatory}| + { ID id-ENB2-Measurement-ID CRITICALITY reject TYPE Measurement-ID PRESENCE mandatory}| + { ID id-CellMeasurementResult CRITICALITY ignore TYPE CellMeasurementResult-List PRESENCE mandatory}, + ... +} + +CellMeasurementResult-List ::= SEQUENCE (SIZE (1..maxCellineNB)) OF ProtocolIE-Single-Container { {CellMeasurementResult-ItemIEs} } + +CellMeasurementResult-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-CellMeasurementResult-Item CRITICALITY ignore TYPE CellMeasurementResult-Item PRESENCE mandatory} +} + +CellMeasurementResult-Item ::= SEQUENCE { + cell-ID ECGI, + hWLoadIndicator HWLoadIndicator OPTIONAL, + s1TNLLoadIndicator S1TNLLoadIndicator OPTIONAL, + radioResourceStatus RadioResourceStatus OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {CellMeasurementResult-Item-ExtIEs} } OPTIONAL, + ... +} + +CellMeasurementResult-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-CompositeAvailableCapacityGroup CRITICALITY ignore EXTENSION CompositeAvailableCapacityGroup PRESENCE optional}| + { ID id-ABS-Status CRITICALITY ignore EXTENSION ABS-Status PRESENCE optional}| + { ID id-RSRPMRList CRITICALITY ignore EXTENSION RSRPMRList PRESENCE optional}| + { ID id-CSIReportList CRITICALITY ignore EXTENSION CSIReportList PRESENCE optional}| + { ID id-CellReportingIndicator CRITICALITY ignore EXTENSION CellReportingIndicator PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- PRIVATE MESSAGE +-- +-- ************************************************************** + +PrivateMessage ::= SEQUENCE { + privateIEs PrivateIE-Container {{PrivateMessage-IEs}}, + ... +} + +PrivateMessage-IEs X2AP-PRIVATE-IES ::= { + ... +} + +-- ************************************************************** +-- +-- MOBILITY CHANGE REQUEST +-- +-- ************************************************************** + +MobilityChangeRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{MobilityChangeRequest-IEs}}, + ... +} + +MobilityChangeRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ENB1-Cell-ID CRITICALITY reject TYPE ECGI PRESENCE mandatory}| + { ID id-ENB2-Cell-ID CRITICALITY reject TYPE ECGI PRESENCE mandatory}| + { ID id-ENB1-Mobility-Parameters CRITICALITY ignore TYPE MobilityParametersInformation PRESENCE optional}| + { ID id-ENB2-Proposed-Mobility-Parameters CRITICALITY reject TYPE MobilityParametersInformation PRESENCE mandatory}| + { ID id-Cause CRITICALITY reject TYPE Cause PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- MOBILITY CHANGE ACKNOWLEDGE +-- +-- ************************************************************** + +MobilityChangeAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{MobilityChangeAcknowledge-IEs}}, + ... +} + +MobilityChangeAcknowledge-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ENB1-Cell-ID CRITICALITY reject TYPE ECGI PRESENCE mandatory}| + { ID id-ENB2-Cell-ID CRITICALITY reject TYPE ECGI PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- MOBILITY CHANGE FAILURE +-- +-- ************************************************************** + +MobilityChangeFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{MobilityChangeFailure-IEs}}, + ... +} + +MobilityChangeFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ENB1-Cell-ID CRITICALITY ignore TYPE ECGI PRESENCE mandatory}| + { ID id-ENB2-Cell-ID CRITICALITY ignore TYPE ECGI PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-ENB2-Mobility-Parameters-Modification-Range CRITICALITY ignore TYPE MobilityParametersModificationRange PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- Radio Link Failure Indication +-- +-- ************************************************************** + +RLFIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RLFIndication-IEs}}, + ... +} + +RLFIndication-IEs X2AP-PROTOCOL-IES ::= { + { ID id-FailureCellPCI CRITICALITY ignore TYPE PCI PRESENCE mandatory}| + { ID id-Re-establishmentCellECGI CRITICALITY ignore TYPE ECGI PRESENCE mandatory}| + { ID id-FailureCellCRNTI CRITICALITY ignore TYPE CRNTI PRESENCE mandatory}| + { ID id-ShortMAC-I CRITICALITY ignore TYPE ShortMAC-I PRESENCE optional}| + { ID id-UE-RLF-Report-Container CRITICALITY ignore TYPE UE-RLF-Report-Container PRESENCE optional}| + { ID id-RRCConnSetupIndicator CRITICALITY reject TYPE RRCConnSetupIndicator PRESENCE optional}| + { ID id-RRCConnReestabIndicator CRITICALITY ignore TYPE RRCConnReestabIndicator PRESENCE optional}| + { ID id-UE-RLF-Report-Container-for-extended-bands CRITICALITY ignore TYPE UE-RLF-Report-Container-for-extended-bands PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- Cell Activation Request +-- +-- ************************************************************** + +CellActivationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{CellActivationRequest-IEs}}, + ... +} + +CellActivationRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ServedCellsToActivate CRITICALITY reject TYPE ServedCellsToActivate PRESENCE mandatory}, + ... +} + +ServedCellsToActivate::= SEQUENCE (SIZE (1..maxCellineNB)) OF ServedCellsToActivate-Item + +ServedCellsToActivate-Item::= SEQUENCE { + ecgi ECGI, + iE-Extensions ProtocolExtensionContainer { {ServedCellsToActivate-Item-ExtIEs} } OPTIONAL, + ... +} + +ServedCellsToActivate-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- Cell Activation Response +-- +-- ************************************************************** + +CellActivationResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{CellActivationResponse-IEs}}, + ... +} + +CellActivationResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ActivatedCellList CRITICALITY ignore TYPE ActivatedCellList PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + +ActivatedCellList ::= SEQUENCE (SIZE (1..maxCellineNB)) OF ActivatedCellList-Item + +ActivatedCellList-Item::= SEQUENCE { + ecgi ECGI, + iE-Extensions ProtocolExtensionContainer { {ActivatedCellList-Item-ExtIEs} } OPTIONAL, + ... +} + +ActivatedCellList-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +--************************************************************** +-- +-- CELL ACTIVATION FAILURE +-- +-- ************************************************************** + +CellActivationFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{CellActivationFailure-IEs}}, + ... +} + +CellActivationFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- X2 RELEASE +-- +-- ************************************************************** + +X2Release ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{X2Release-IEs}}, + ... +} + +X2Release-IEs X2AP-PROTOCOL-IES ::= { + { ID id-GlobalENB-ID CRITICALITY reject TYPE GlobalENB-ID PRESENCE mandatory}, +... +} + +-- ************************************************************** +-- +-- X2AP Message Transfer +-- +-- ************************************************************** + +X2APMessageTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{X2APMessageTransfer-IEs}}, + ... +} + +X2APMessageTransfer-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RNL-Header CRITICALITY reject TYPE RNL-Header PRESENCE mandatory}| + { ID id-x2APMessage CRITICALITY reject TYPE X2AP-Message PRESENCE optional}, + ... +} + +RNL-Header ::= SEQUENCE { + source-GlobalENB-ID GlobalENB-ID, + target-GlobalENB-ID GlobalENB-ID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {RNL-Header-Item-ExtIEs} } OPTIONAL, + ... +} + +RNL-Header-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +X2AP-Message ::= OCTET STRING + +-- ************************************************************** +-- +-- SENB ADDITION REQUEST +-- +-- ************************************************************** + +SeNBAdditionRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBAdditionRequest-IEs}}, + ... +} + +SeNBAdditionRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-UE-SecurityCapabilities CRITICALITY reject TYPE UESecurityCapabilities PRESENCE conditional}| + -- This IE shall be present if the Bearer Option IE is set to the value “SCG bearer” -- + { ID id-SeNBSecurityKey CRITICALITY reject TYPE SeNBSecurityKey PRESENCE conditional}| + -- This IE shall be present if the Bearer Option IE is set to the value “SCG bearer” -- + { ID id-SeNBUEAggregateMaximumBitRate CRITICALITY reject TYPE UEAggregateMaximumBitRate PRESENCE mandatory}| + { ID id-ServingPLMN CRITICALITY ignore TYPE PLMN-Identity PRESENCE optional}| + { ID id-E-RABs-ToBeAdded-List CRITICALITY reject TYPE E-RABs-ToBeAdded-List PRESENCE mandatory}| + { ID id-MeNBtoSeNBContainer CRITICALITY reject TYPE MeNBtoSeNBContainer PRESENCE mandatory}| + { ID id-CSGMembershipStatus CRITICALITY reject TYPE CSGMembershipStatus PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-ExpectedUEBehaviour CRITICALITY ignore TYPE ExpectedUEBehaviour PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +E-RABs-ToBeAdded-List ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeAdded-ItemIEs} } + +E-RABs-ToBeAdded-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeAdded-Item CRITICALITY reject TYPE E-RABs-ToBeAdded-Item PRESENCE mandatory}, + ... +} + +E-RABs-ToBeAdded-Item ::= CHOICE { + sCG-Bearer E-RABs-ToBeAdded-Item-SCG-Bearer, + split-Bearer E-RABs-ToBeAdded-Item-Split-Bearer, + ... +} + +E-RABs-ToBeAdded-Item-SCG-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters, + dL-Forwarding DL-Forwarding OPTIONAL, + s1-UL-GTPtunnelEndpoint GTPtunnelEndpoint, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-Item-SCG-BearerExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeAdded-Item-SCG-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}| + { ID id-SIPTO-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}, + ... +} + +E-RABs-ToBeAdded-Item-Split-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters, + meNB-GTPtunnelEndpoint GTPtunnelEndpoint, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-Item-Split-BearerExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeAdded-Item-Split-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- SENB ADDITION REQUEST ACKNOWLEDGE +-- +-- ************************************************************** + +SeNBAdditionRequestAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBAdditionRequestAcknowledge-IEs}}, + ... +} + +SeNBAdditionRequestAcknowledge-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-Admitted-ToBeAdded-List CRITICALITY ignore TYPE E-RABs-Admitted-ToBeAdded-List PRESENCE mandatory}| + { ID id-E-RABs-NotAdmitted-List CRITICALITY ignore TYPE E-RAB-List PRESENCE optional}| + { ID id-SeNBtoMeNBContainer CRITICALITY reject TYPE SeNBtoMeNBContainer PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-GW-TransportLayerAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE optional}| + { ID id-SIPTO-L-GW-TransportLayerAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-Tunnel-Information-for-BBF CRITICALITY ignore TYPE TunnelInformation PRESENCE optional}, + ... +} + +E-RABs-Admitted-ToBeAdded-List ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-Admitted-ToBeAdded-ItemIEs} } + +E-RABs-Admitted-ToBeAdded-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-Admitted-ToBeAdded-Item CRITICALITY ignore TYPE E-RABs-Admitted-ToBeAdded-Item PRESENCE mandatory} +} + +E-RABs-Admitted-ToBeAdded-Item ::= CHOICE { + sCG-Bearer E-RABs-Admitted-ToBeAdded-Item-SCG-Bearer, + split-Bearer E-RABs-Admitted-ToBeAdded-Item-Split-Bearer, + ... +} + +E-RABs-Admitted-ToBeAdded-Item-SCG-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + s1-DL-GTPtunnelEndpoint GTPtunnelEndpoint, + dL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + uL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeAdded-Item-SCG-BearerExtIEs} } OPTIONAL, + ... +} + +E-RABs-Admitted-ToBeAdded-Item-SCG-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-Admitted-ToBeAdded-Item-Split-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + seNB-GTPtunnelEndpoint GTPtunnelEndpoint, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeAdded-Item-Split-BearerExtIEs} } OPTIONAL, + ... +} + +E-RABs-Admitted-ToBeAdded-Item-Split-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- SENB ADDITION REQUEST REJECT +-- +-- ************************************************************** + +SeNBAdditionRequestReject ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBAdditionRequestReject-IEs}}, + ... +} + +SeNBAdditionRequestReject-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- SENB RECONFIGURATION COMPLETE +-- +-- ************************************************************** + +SeNBReconfigurationComplete ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBReconfigurationComplete-IEs}}, + ... +} + +SeNBReconfigurationComplete-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-ResponseInformationSeNBReconfComp CRITICALITY ignore TYPE ResponseInformationSeNBReconfComp PRESENCE mandatory}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +ResponseInformationSeNBReconfComp ::= CHOICE { + success ResponseInformationSeNBReconfComp-SuccessItem, + reject-by-MeNB ResponseInformationSeNBReconfComp-RejectByMeNBItem, + ... +} + +ResponseInformationSeNBReconfComp-SuccessItem ::= SEQUENCE { + meNBtoSeNBContainer MeNBtoSeNBContainer OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ResponseInformationSeNBReconfComp-SuccessItemExtIEs} } OPTIONAL, + ... +} + +ResponseInformationSeNBReconfComp-SuccessItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResponseInformationSeNBReconfComp-RejectByMeNBItem ::= SEQUENCE { + cause Cause, + meNBtoSeNBContainer MeNBtoSeNBContainer OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ResponseInformationSeNBReconfComp-RejectByMeNBItemExtIEs} } OPTIONAL, + ... +} + +ResponseInformationSeNBReconfComp-RejectByMeNBItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- SENB MODIFICATION REQUEST +-- +-- ************************************************************** + +SeNBModificationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ SeNBModificationRequest-IEs}}, + ... +} + +SeNBModificationRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-SCGChangeIndication CRITICALITY ignore TYPE SCGChangeIndication PRESENCE optional}| + { ID id-ServingPLMN CRITICALITY ignore TYPE PLMN-Identity PRESENCE optional}| + { ID id-UE-ContextInformationSeNBModReq CRITICALITY reject TYPE UE-ContextInformationSeNBModReq PRESENCE optional}| + { ID id-MeNBtoSeNBContainer CRITICALITY ignore TYPE MeNBtoSeNBContainer PRESENCE optional}| + { ID id-CSGMembershipStatus CRITICALITY reject TYPE CSGMembershipStatus PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +UE-ContextInformationSeNBModReq ::= SEQUENCE { + uE-SecurityCapabilities UESecurityCapabilities OPTIONAL, + seNB-SecurityKey SeNBSecurityKey OPTIONAL, + seNBUEAggregateMaximumBitRate UEAggregateMaximumBitRate OPTIONAL, + e-RABs-ToBeAdded E-RABs-ToBeAdded-List-ModReq OPTIONAL, + e-RABs-ToBeModified E-RABs-ToBeModified-List-ModReq OPTIONAL, + e-RABs-ToBeReleased E-RABs-ToBeReleased-List-ModReq OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {UE-ContextInformationSeNBModReqExtIEs} } OPTIONAL, + ... +} + +UE-ContextInformationSeNBModReqExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeAdded-List-ModReq ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeAdded-ModReqItemIEs} } + +E-RABs-ToBeAdded-ModReqItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeAdded-ModReqItem CRITICALITY ignore TYPE E-RABs-ToBeAdded-ModReqItem PRESENCE mandatory}, + ... +} + +E-RABs-ToBeAdded-ModReqItem ::= CHOICE { + sCG-Bearer E-RABs-ToBeAdded-ModReqItem-SCG-Bearer, + split-Bearer E-RABs-ToBeAdded-ModReqItem-Split-Bearer, + ... +} + +E-RABs-ToBeAdded-ModReqItem-SCG-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters, + dL-Forwarding DL-Forwarding OPTIONAL, + s1-UL-GTPtunnelEndpoint GTPtunnelEndpoint, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-ModReqItem-SCG-BearerExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeAdded-ModReqItem-SCG-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}| + { ID id-SIPTO-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}, + ... +} + +E-RABs-ToBeAdded-ModReqItem-Split-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters, + meNB-GTPtunnelEndpoint GTPtunnelEndpoint, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-ModReqItem-Split-BearerExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeAdded-ModReqItem-Split-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeModified-List-ModReq ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeModified-ModReqItemIEs} } + +E-RABs-ToBeModified-ModReqItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeModified-ModReqItem CRITICALITY ignore TYPE E-RABs-ToBeModified-ModReqItem PRESENCE mandatory}, + ... +} + + +E-RABs-ToBeModified-ModReqItem ::= CHOICE { + sCG-Bearer E-RABs-ToBeModified-ModReqItem-SCG-Bearer, + split-Bearer E-RABs-ToBeModified-ModReqItem-Split-Bearer, + ... +} + +E-RABs-ToBeModified-ModReqItem-SCG-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters OPTIONAL, + s1-UL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeModified-ModReqItem-SCG-BearerExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeModified-ModReqItem-SCG-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeModified-ModReqItem-Split-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters OPTIONAL, + meNB-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeModified-ModReqItem-Split-BearerExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeModified-ModReqItem-Split-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeReleased-List-ModReq ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeReleased-ModReqItemIEs} } + +E-RABs-ToBeReleased-ModReqItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeReleased-ModReqItem CRITICALITY ignore TYPE E-RABs-ToBeReleased-ModReqItem PRESENCE mandatory}, + ... +} + +E-RABs-ToBeReleased-ModReqItem ::= CHOICE { + sCG-Bearer E-RABs-ToBeReleased-ModReqItem-SCG-Bearer, + split-Bearer E-RABs-ToBeReleased-ModReqItem-Split-Bearer, + ... +} + +E-RABs-ToBeReleased-ModReqItem-SCG-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + dL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + uL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-ModReqItem-SCG-BearerExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-ModReqItem-SCG-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeReleased-ModReqItem-Split-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + dL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-ModReqItem-Split-BearerExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-ModReqItem-Split-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- SENB MODIFICATION REQUEST ACKNOWLEDGE +-- +-- ************************************************************** + +SeNBModificationRequestAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBModificationRequestAcknowledge-IEs}}, + ... +} + +SeNBModificationRequestAcknowledge-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-Admitted-ToBeAdded-ModAckList CRITICALITY ignore TYPE E-RABs-Admitted-ToBeAdded-ModAckList PRESENCE optional}| + { ID id-E-RABs-Admitted-ToBeModified-ModAckList CRITICALITY ignore TYPE E-RABs-Admitted-ToBeModified-ModAckList PRESENCE optional}| + { ID id-E-RABs-Admitted-ToBeReleased-ModAckList CRITICALITY ignore TYPE E-RABs-Admitted-ToBeReleased-ModAckList PRESENCE optional}| + { ID id-E-RABs-NotAdmitted-List CRITICALITY ignore TYPE E-RAB-List PRESENCE optional}| + { ID id-SeNBtoMeNBContainer CRITICALITY ignore TYPE SeNBtoMeNBContainer PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +E-RABs-Admitted-ToBeAdded-ModAckList ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-Admitted-ToBeAdded-ModAckItemIEs} } + +E-RABs-Admitted-ToBeAdded-ModAckItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-Admitted-ToBeAdded-ModAckItem CRITICALITY ignore TYPE E-RABs-Admitted-ToBeAdded-ModAckItem PRESENCE mandatory} +} + +E-RABs-Admitted-ToBeAdded-ModAckItem ::= CHOICE { + sCG-Bearer E-RABs-Admitted-ToBeAdded-ModAckItem-SCG-Bearer, + split-Bearer E-RABs-Admitted-ToBeAdded-ModAckItem-Split-Bearer, + ... +} + +E-RABs-Admitted-ToBeAdded-ModAckItem-SCG-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + s1-DL-GTPtunnelEndpoint GTPtunnelEndpoint, + dL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + uL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeAdded-ModAckItem-SCG-BearerExtIEs} } OPTIONAL, + ... +} + +E-RABs-Admitted-ToBeAdded-ModAckItem-SCG-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-Admitted-ToBeAdded-ModAckItem-Split-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + seNB-GTPtunnelEndpoint GTPtunnelEndpoint, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeAdded-ModAckItem-Split-BearerExtIEs} } OPTIONAL, + ... +} + +E-RABs-Admitted-ToBeAdded-ModAckItem-Split-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +E-RABs-Admitted-ToBeModified-ModAckList ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-Admitted-ToBeModified-ModAckItemIEs} } + +E-RABs-Admitted-ToBeModified-ModAckItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-Admitted-ToBeModified-ModAckItem CRITICALITY ignore TYPE E-RABs-Admitted-ToBeModified-ModAckItem PRESENCE mandatory} +} + +E-RABs-Admitted-ToBeModified-ModAckItem ::= CHOICE { + sCG-Bearer E-RABs-Admitted-ToBeModified-ModAckItem-SCG-Bearer, + split-Bearer E-RABs-Admitted-ToBeModified-ModAckItem-Split-Bearer, + ... +} + +E-RABs-Admitted-ToBeModified-ModAckItem-SCG-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + s1-DL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeModified-ModAckItem-SCG-BearerExtIEs} } OPTIONAL, + ... +} + +E-RABs-Admitted-ToBeModified-ModAckItem-SCG-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-Admitted-ToBeModified-ModAckItem-Split-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + seNB-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeModified-ModAckItem-Split-BearerExtIEs} } OPTIONAL, + ... +} + +E-RABs-Admitted-ToBeModified-ModAckItem-Split-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-Admitted-ToBeReleased-ModAckList ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-Admitted-ToBeReleased-ModAckItemIEs} } + +E-RABs-Admitted-ToBeReleased-ModAckItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-Admitted-ToBeReleased-ModAckItem CRITICALITY ignore TYPE E-RABs-Admitted-ToReleased-ModAckItem PRESENCE mandatory} +} + +E-RABs-Admitted-ToReleased-ModAckItem ::= CHOICE { + sCG-Bearer E-RABs-Admitted-ToBeReleased-ModAckItem-SCG-Bearer, + split-Bearer E-RABs-Admitted-ToBeReleased-ModAckItem-Split-Bearer, + ... +} + +E-RABs-Admitted-ToBeReleased-ModAckItem-SCG-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeReleased-ModAckItem-SCG-BearerExtIEs} } OPTIONAL, + ... +} + +E-RABs-Admitted-ToBeReleased-ModAckItem-SCG-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-Admitted-ToBeReleased-ModAckItem-Split-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeReleased-ModAckItem-Split-BearerExtIEs} } OPTIONAL, + ... +} + +E-RABs-Admitted-ToBeReleased-ModAckItem-Split-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- SENB MODIFICATION REQUEST REJECT +-- +-- ************************************************************** + +SeNBModificationRequestReject ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBModificationRequestReject-IEs}}, + ... +} + +SeNBModificationRequestReject-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- SENB MODIFICATION REQUIRED +-- +-- ************************************************************** + +SeNBModificationRequired ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBModificationRequired-IEs}}, + ... +} + +SeNBModificationRequired-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-SCGChangeIndication CRITICALITY ignore TYPE SCGChangeIndication PRESENCE optional}| + { ID id-E-RABs-ToBeReleased-ModReqd CRITICALITY ignore TYPE E-RABs-ToBeReleased-ModReqd PRESENCE optional}| + { ID id-SeNBtoMeNBContainer CRITICALITY ignore TYPE SeNBtoMeNBContainer PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + + +E-RABs-ToBeReleased-ModReqd ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeReleased-ModReqdItemIEs} } + +E-RABs-ToBeReleased-ModReqdItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeReleased-ModReqdItem CRITICALITY ignore TYPE E-RABs-ToBeReleased-ModReqdItem PRESENCE mandatory }, + ... +} + +E-RABs-ToBeReleased-ModReqdItem ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + cause Cause, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-ModReqdItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-ModReqdItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- SENB MODIFICATION CONFIRM +-- +-- ************************************************************** + +SeNBModificationConfirm ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBModificationConfirm-IEs}}, + ... +} + +SeNBModificationConfirm-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-MeNBtoSeNBContainer CRITICALITY ignore TYPE MeNBtoSeNBContainer PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- SENB MODIFICATION REFUSE +-- +-- ************************************************************** + +SeNBModificationRefuse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBModificationRefuse-IEs}}, + ... +} + +SeNBModificationRefuse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-MeNBtoSeNBContainer CRITICALITY ignore TYPE MeNBtoSeNBContainer PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- SENB RELEASE REQUEST +-- +-- ************************************************************** + +SeNBReleaseRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBReleaseRequest-IEs}}, + ... +} + +SeNBReleaseRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE optional}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE optional}| + { ID id-E-RABs-ToBeReleased-List-RelReq CRITICALITY ignore TYPE E-RABs-ToBeReleased-List-RelReq PRESENCE optional}| + { ID id-UE-ContextKeptIndicator CRITICALITY ignore TYPE UE-ContextKeptIndicator PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-MakeBeforeBreakIndicator CRITICALITY ignore TYPE MakeBeforeBreakIndicator PRESENCE optional}, + ... +} +E-RABs-ToBeReleased-List-RelReq ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeReleased-RelReqItemIEs} } + +E-RABs-ToBeReleased-RelReqItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeReleased-RelReqItem CRITICALITY ignore TYPE E-RABs-ToBeReleased-RelReqItem PRESENCE mandatory}, + ... +} + +E-RABs-ToBeReleased-RelReqItem ::= CHOICE { + sCG-Bearer E-RABs-ToBeReleased-RelReqItem-SCG-Bearer, + split-Bearer E-RABs-ToBeReleased-RelReqItem-Split-Bearer, + ... +} + +E-RABs-ToBeReleased-RelReqItem-SCG-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + uL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + dL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-RelReqItem-SCG-BearerExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-RelReqItem-SCG-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeReleased-RelReqItem-Split-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + dL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-RelReqItem-Split-BearerExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-RelReqItem-Split-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- SENB RELEASE REQUIRED +-- +-- ************************************************************** + +SeNBReleaseRequired ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBReleaseRequired-IEs}}, + ... +} + +SeNBReleaseRequired-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- SENB RELEASE CONFIRM +-- +-- ************************************************************** + +SeNBReleaseConfirm ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBReleaseConfirm-IEs}}, + ... +} + +SeNBReleaseConfirm-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-ToBeReleased-List-RelConf CRITICALITY ignore TYPE E-RABs-ToBeReleased-List-RelConf PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +E-RABs-ToBeReleased-List-RelConf ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeReleased-RelConfItemIEs} } + +E-RABs-ToBeReleased-RelConfItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeReleased-RelConfItem CRITICALITY ignore TYPE E-RABs-ToBeReleased-RelConfItem PRESENCE mandatory}, + ... +} + +E-RABs-ToBeReleased-RelConfItem ::= CHOICE { + sCG-Bearer E-RABs-ToBeReleased-RelConfItem-SCG-Bearer, + split-Bearer E-RABs-ToBeReleased-RelConfItem-Split-Bearer, + ... +} + +E-RABs-ToBeReleased-RelConfItem-SCG-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + uL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + dL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-RelConfItem-SCG-BearerExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-RelConfItem-SCG-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeReleased-RelConfItem-Split-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + dL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-RelConfItem-Split-BearerExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-RelConfItem-Split-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- SENB COUNTER CHECK REQUEST +-- +-- ************************************************************** + +SeNBCounterCheckRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBCounterCheckRequest-IEs}}, + ... +} + +SeNBCounterCheckRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-SubjectToCounterCheck-List CRITICALITY ignore TYPE E-RABs-SubjectToCounterCheck-List PRESENCE mandatory}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +E-RABs-SubjectToCounterCheck-List ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-SubjectToCounterCheckItemIEs} } + +E-RABs-SubjectToCounterCheckItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-SubjectToCounterCheckItem CRITICALITY ignore TYPE E-RABs-SubjectToCounterCheckItem PRESENCE mandatory}, + ... +} + +E-RABs-SubjectToCounterCheckItem ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + uL-Count INTEGER (0..4294967295), + dL-Count INTEGER (0..4294967295), + iE-Extensions ProtocolExtensionContainer { {E-RABs-SubjectToCounterCheckItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-SubjectToCounterCheckItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- X2 REMOVAL REQUEST +-- +-- ************************************************************** + +X2RemovalRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{X2RemovalRequest-IEs}}, + ... +} + +X2RemovalRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-GlobalENB-ID CRITICALITY reject TYPE GlobalENB-ID PRESENCE mandatory}| + { ID id-X2RemovalThreshold CRITICALITY reject TYPE X2BenefitValue PRESENCE optional}, +... +} + + + +-- ************************************************************** +-- +-- X2 REMOVAL RESPONSE +-- +-- ************************************************************** + +X2RemovalResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{X2RemovalResponse-IEs}}, + ... +} + +X2RemovalResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-GlobalENB-ID CRITICALITY reject TYPE GlobalENB-ID PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + + + +-- ************************************************************** +-- +-- X2 REMOVAL FAILURE +-- +-- ************************************************************** + +X2RemovalFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{X2RemovalFailure-IEs}}, + ... +} + +X2RemovalFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- RETRIEVE UE CONTEXT REQUEST +-- +-- ************************************************************** + +RetrieveUEContextRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ RetrieveUEContextRequest-IEs}}, + ... +} + +RetrieveUEContextRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-New-eNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-resumeID CRITICALITY reject TYPE ResumeID PRESENCE mandatory}| + { ID id-ShortMAC-I CRITICALITY reject TYPE ShortMAC-I PRESENCE mandatory}| + { ID id-NewEUTRANCellIdentifier CRITICALITY reject TYPE EUTRANCellIdentifier PRESENCE mandatory}| + {ID id-FailureCellCRNTI CRITICALITY reject TYPE CRNTI PRESENCE optional}| + {ID id-FailureCellPCI CRITICALITY reject TYPE PCI PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- RETRIEVE UE CONTEXT RESPONSE +-- +-- ************************************************************** + +RetrieveUEContextResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ RetrieveUEContextResponse-IEs}}, + ... +} + +RetrieveUEContextResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-New-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-New-eNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-Old-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Old-eNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-GUMMEI-ID CRITICALITY reject TYPE GUMMEI PRESENCE mandatory}| + { ID id-UE-ContextInformationRetrieve CRITICALITY reject TYPE UE-ContextInformationRetrieve PRESENCE mandatory}| + { ID id-TraceActivation CRITICALITY ignore TYPE TraceActivation PRESENCE optional}| + { ID id-SRVCCOperationPossible CRITICALITY ignore TYPE SRVCCOperationPossible PRESENCE optional}| + { ID id-Masked-IMEISV CRITICALITY ignore TYPE Masked-IMEISV PRESENCE optional}| + { ID id-ExpectedUEBehaviour CRITICALITY ignore TYPE ExpectedUEBehaviour PRESENCE optional}| + { ID id-ProSeAuthorized CRITICALITY ignore TYPE ProSeAuthorized PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-V2XServicesAuthorized CRITICALITY ignore TYPE V2XServicesAuthorized PRESENCE optional}| + { ID id-AerialUEsubscriptionInformation CRITICALITY ignore TYPE AerialUEsubscriptionInformation PRESENCE optional}| + { ID id-Subscription-Based-UE-DifferentiationInfo CRITICALITY ignore TYPE Subscription-Based-UE-DifferentiationInfo PRESENCE optional}, + ... +} + +UE-ContextInformationRetrieve ::= SEQUENCE { + mME-UE-S1AP-ID UE-S1AP-ID, + uESecurityCapabilities UESecurityCapabilities, + aS-SecurityInformation AS-SecurityInformation, + uEaggregateMaximumBitRate UEAggregateMaximumBitRate, + subscriberProfileIDforRFP SubscriberProfileIDforRFP OPTIONAL, + e-RABs-ToBeSetup-ListRetrieve E-RABs-ToBeSetup-ListRetrieve, + rRC-Context RRC-Context, + handoverRestrictionList HandoverRestrictionList OPTIONAL, + locationReportingInformation LocationReportingInformation OPTIONAL, + managBasedMDTallowed ManagementBasedMDTallowed OPTIONAL, + managBasedMDTPLMNList MDTPLMNList OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {UE-ContextInformationRetrieve-ExtIEs} } OPTIONAL, + ... +} + +UE-ContextInformationRetrieve-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { +{ ID id-UESidelinkAggregateMaximumBitRate CRITICALITY ignore EXTENSION UESidelinkAggregateMaximumBitRate PRESENCE optional}, + ... +} + +E-RABs-ToBeSetup-ListRetrieve ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeSetupRetrieve-ItemIEs} } + +E-RABs-ToBeSetupRetrieve-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeSetupRetrieve-Item CRITICALITY ignore TYPE E-RABs-ToBeSetupRetrieve-Item PRESENCE mandatory}, + ... +} + +E-RABs-ToBeSetupRetrieve-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters, + bearerType BearerType OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeSetupRetrieve-ItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeSetupRetrieve-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-uL-GTPtunnelEndpoint CRITICALITY reject EXTENSION GTPtunnelEndpoint PRESENCE mandatory}| + { ID id-dL-Forwarding CRITICALITY ignore EXTENSION DL-Forwarding PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- RETRIEVE UE CONTEXT FAILURE +-- +-- ************************************************************** + +RetrieveUEContextFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ RetrieveUEContextFailure-IEs}}, + ... +} + +RetrieveUEContextFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-New-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-New-eNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- SGNB ADDITION REQUEST +-- +-- ************************************************************** + +SgNBAdditionRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBAdditionRequest-IEs}}, + ... +} + +SgNBAdditionRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-NRUESecurityCapabilities CRITICALITY reject TYPE NRUESecurityCapabilities PRESENCE mandatory}| + { ID id-SgNBSecurityKey CRITICALITY reject TYPE SgNBSecurityKey PRESENCE mandatory}| + { ID id-SgNBUEAggregateMaximumBitRate CRITICALITY reject TYPE UEAggregateMaximumBitRate PRESENCE mandatory}| + { ID id-SelectedPLMN CRITICALITY ignore TYPE PLMN-Identity PRESENCE optional}| + { ID id-HandoverRestrictionList CRITICALITY ignore TYPE HandoverRestrictionList PRESENCE optional}| + { ID id-E-RABs-ToBeAdded-SgNBAddReqList CRITICALITY reject TYPE E-RABs-ToBeAdded-SgNBAddReqList PRESENCE mandatory}| + { ID id-MeNBtoSgNBContainer CRITICALITY reject TYPE MeNBtoSgNBContainer PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE optional}| + { ID id-ExpectedUEBehaviour CRITICALITY ignore TYPE ExpectedUEBehaviour PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-RequestedSplitSRBs CRITICALITY reject TYPE SplitSRBs PRESENCE optional}| + { ID id-MeNBResourceCoordinationInformation CRITICALITY ignore TYPE MeNBResourceCoordinationInformation PRESENCE optional}| + { ID id-SGNB-Addition-Trigger-Ind CRITICALITY reject TYPE SGNB-Addition-Trigger-Ind PRESENCE optional}| + { ID id-SubscriberProfileIDforRFP CRITICALITY ignore TYPE SubscriberProfileIDforRFP PRESENCE optional}| + { ID id-MeNBCell-ID CRITICALITY reject TYPE ECGI PRESENCE mandatory}, + ... +} + +E-RABs-ToBeAdded-SgNBAddReqList ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeAdded-SgNBAddReq-ItemIEs} } + +E-RABs-ToBeAdded-SgNBAddReq-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeAdded-SgNBAddReq-Item CRITICALITY reject TYPE E-RABs-ToBeAdded-SgNBAddReq-Item PRESENCE mandatory}, + ... +} + +E-RABs-ToBeAdded-SgNBAddReq-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + drb-ID DRB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-ToBeAdded-SgNBAddReq-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-ToBeAdded-SgNBAddReq-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-SgNBAddReq-ItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeAdded-SgNBAddReq-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeAdded-SgNBAddReq-Item-SgNBPDCPpresent ::= SEQUENCE { + full-E-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters, + max-MCG-admit-E-RAB-Level-QoS-Parameters GBR-QosInformation OPTIONAL, +-- This IE shall be present if MCG resource and SCG resources IEs in the the EN-DC Resource Configuration IE are set to “present” and GBR QoS Information IE is present in Full E-RAB Level QoS Parameters IE -- + dL-Forwarding DL-Forwarding OPTIONAL, + meNB-DL-GTP-TEIDatMCG GTPtunnelEndpoint OPTIONAL, +-- This IE shall be present if MCG resource IE in the the EN-DC Resource Configuration IE is set to “present” -- + s1-UL-GTPtunnelEndpoint GTPtunnelEndpoint, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-SgNBAddReq-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeAdded-SgNBAddReq-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeAdded-SgNBAddReq-Item-SgNBPDCPnotpresent ::= SEQUENCE { + requested-SCG-E-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters, + meNB-UL-GTP-TEIDatPDCP GTPtunnelEndpoint, + secondary-meNB-UL-GTP-TEIDatPDCP GTPtunnelEndpoint OPTIONAL, + rlc-Mode RLCMode, + uL-Configuration ULConfiguration OPTIONAL, +-- This IE shall be present if MCG resource and SCG resources IEs in the the EN-DC Resource Configuration IE are set to “present” -- + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-SgNBAddReq-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeAdded-SgNBAddReq-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-pDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- SGNB ADDITION REQUEST ACKNOWLEDGE +-- +-- ************************************************************** + +SgNBAdditionRequestAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBAdditionRequestAcknowledge-IEs}}, + ... +} + +SgNBAdditionRequestAcknowledge-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-Admitted-ToBeAdded-SgNBAddReqAckList CRITICALITY ignore TYPE E-RABs-Admitted-ToBeAdded-SgNBAddReqAckList PRESENCE mandatory}| + { ID id-E-RABs-NotAdmitted-List CRITICALITY ignore TYPE E-RAB-List PRESENCE optional}| + { ID id-SgNBtoMeNBContainer CRITICALITY reject TYPE SgNBtoMeNBContainer PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-AdmittedSplitSRBs CRITICALITY reject TYPE SplitSRBs PRESENCE optional}| + { ID id-SgNBResourceCoordinationInformation CRITICALITY ignore TYPE SgNBResourceCoordinationInformation PRESENCE optional}| + { ID id-RRCConfigIndication CRITICALITY reject TYPE RRC-Config-Ind PRESENCE optional}, + ... +} + +E-RABs-Admitted-ToBeAdded-SgNBAddReqAckList ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-ItemIEs} } + +E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item CRITICALITY ignore TYPE E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item PRESENCE mandatory} +} + +E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-SgNBAddReqAck-ItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeAdded-SgNBAddReqAck-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item-SgNBPDCPpresent ::= SEQUENCE { + s1-DL-GTPtunnelEndpoint GTPtunnelEndpoint, + sgNB-UL-GTP-TEIDatPDCP GTPtunnelEndpoint OPTIONAL, +-- This IE shall be present if MCG resource IE in the the EN-DC Resource Configuration IE is set to “present” -- + rlc-Mode RLCMode OPTIONAL, +-- This IE shall be present if MCG resource IE in the the EN-DC Resource Configuration IE is set to “present” -- + dL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + uL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + mCG-E-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters OPTIONAL, +-- This IE shall be present if MCG resource and SCG resource IEs in the the EN-DC Resource Configuration IE are set to “present” and the GBR QoS Information IE is present in the Requested MCG E-RAB Level QoS Parameters IE -- + uL-Configuration ULConfiguration OPTIONAL, +-- This IE shall be present if MCG resource and SCG resources IEs in the the EN-DC Resource Configuration IE are set to “present” -- + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-pDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}, + ... +} + +E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item-SgNBPDCPnotpresent ::= SEQUENCE { + sgNB-DL-GTP-TEIDatSCG GTPtunnelEndpoint, + secondary-sgNB-DL-GTP-TEIDatSCG GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + + + +-- ************************************************************** +-- +-- SGNB ADDITION REQUEST REJECT +-- +-- ************************************************************** + +SgNBAdditionRequestReject ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBAdditionRequestReject-IEs}}, + ... +} + +SgNBAdditionRequestReject-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE optional}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- SGNB RECONFIGURATION COMPLETE +-- +-- ************************************************************** + +SgNBReconfigurationComplete ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBReconfigurationComplete-IEs}}, + ... +} + +SgNBReconfigurationComplete-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-ResponseInformationSgNBReconfComp CRITICALITY ignore TYPE ResponseInformationSgNBReconfComp PRESENCE mandatory}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +ResponseInformationSgNBReconfComp ::= CHOICE { + success-SgNBReconfComp ResponseInformationSgNBReconfComp-SuccessItem, + reject-by-MeNB-SgNBReconfComp ResponseInformationSgNBReconfComp-RejectByMeNBItem, + ... +} + +ResponseInformationSgNBReconfComp-SuccessItem ::= SEQUENCE { + meNBtoSgNBContainer MeNBtoSgNBContainer OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ResponseInformationSgNBReconfComp-SuccessItemExtIEs} } OPTIONAL, + ... +} + +ResponseInformationSgNBReconfComp-SuccessItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResponseInformationSgNBReconfComp-RejectByMeNBItem ::= SEQUENCE { + cause Cause, + iE-Extensions ProtocolExtensionContainer { {ResponseInformationSgNBReconfComp-RejectByMeNBItemExtIEs} } OPTIONAL, + ... +} + +ResponseInformationSgNBReconfComp-RejectByMeNBItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + + +-- ************************************************************** +-- +-- SGNB MODIFICATION REQUEST +-- +-- ************************************************************** + +SgNBModificationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ SgNBModificationRequest-IEs}}, + ... +} + +SgNBModificationRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-SelectedPLMN CRITICALITY ignore TYPE PLMN-Identity PRESENCE optional}| + { ID id-HandoverRestrictionList CRITICALITY ignore TYPE HandoverRestrictionList PRESENCE optional}| + { ID id-SCGConfigurationQuery CRITICALITY ignore TYPE SCGConfigurationQuery PRESENCE optional}| + { ID id-UE-ContextInformation-SgNBModReq CRITICALITY reject TYPE UE-ContextInformation-SgNBModReq PRESENCE optional}| + { ID id-MeNBtoSgNBContainer CRITICALITY ignore TYPE MeNBtoSgNBContainer PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-MeNBResourceCoordinationInformation CRITICALITY ignore TYPE MeNBResourceCoordinationInformation PRESENCE optional}| + { ID id-RequestedSplitSRBs CRITICALITY ignore TYPE SplitSRBs PRESENCE optional}| + { ID id-RequestedSplitSRBsrelease CRITICALITY ignore TYPE SplitSRBs PRESENCE optional}, + ... +} + +UE-ContextInformation-SgNBModReq ::= SEQUENCE { + nRUE-SecurityCapabilities NRUESecurityCapabilities OPTIONAL, + sgNB-SecurityKey SgNBSecurityKey OPTIONAL, + sgNBUEAggregateMaximumBitRate UEAggregateMaximumBitRate OPTIONAL, + e-RABs-ToBeAdded E-RABs-ToBeAdded-SgNBModReq-List OPTIONAL, + e-RABs-ToBeModified E-RABs-ToBeModified-SgNBModReq-List OPTIONAL, + e-RABs-ToBeReleased E-RABs-ToBeReleased-SgNBModReq-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {UE-ContextInformationSgNBModReqExtIEs} } OPTIONAL, + ... +} + +UE-ContextInformationSgNBModReqExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-SubscriberProfileIDforRFP CRITICALITY ignore EXTENSION SubscriberProfileIDforRFP PRESENCE optional}, + ... +} + +E-RABs-ToBeAdded-SgNBModReq-List ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeAdded-SgNBModReq-ItemIEs} } + +E-RABs-ToBeAdded-SgNBModReq-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeAdded-SgNBModReq-Item CRITICALITY ignore TYPE E-RABs-ToBeAdded-SgNBModReq-Item PRESENCE mandatory}, + ... +} + +E-RABs-ToBeAdded-SgNBModReq-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + drb-ID DRB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-ToBeAdded-SgNBModReq-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-ToBeAdded-SgNBModReq-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-SgNBModReq-ItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeAdded-SgNBModReq-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeAdded-SgNBModReq-Item-SgNBPDCPpresent ::= SEQUENCE { + full-E-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters, + max-MN-admit-E-RAB-Level-QoS-Parameters GBR-QosInformation OPTIONAL, +-- This IE shall be present if MCG resource and SCG resources IEs in the the EN-DC Resource Configuration IE are set to “present” and GBR QoS Information IE is present in Full E-RAB Level QoS Parameters IE -- + dL-Forwarding DL-Forwarding OPTIONAL, + meNB-DL-GTP-TEIDatMCG GTPtunnelEndpoint OPTIONAL, +-- This IE shall be present if MCG resource IE in the the EN-DC Resource Configuration IE is set to “present” -- + s1-UL-GTPtunnelEndpoint GTPtunnelEndpoint, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-SgNBModReq-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeAdded-SgNBModReq-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeAdded-SgNBModReq-Item-SgNBPDCPnotpresent ::= SEQUENCE { + requested-SCG-E-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters, + meNB-UL-GTP-TEIDatPDCP GTPtunnelEndpoint, + secondary-meNB-UL-GTP-TEIDatPDCP GTPtunnelEndpoint OPTIONAL, + rlc-Mode RLCMode, + uL-Configuration ULConfiguration OPTIONAL, +-- This IE shall be present if MCG resource and SCG resources IEs in the the EN-DC Resource Configuration IE are set to “present” -- + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-SgNBModReq-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeAdded-SgNBModReq-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-pDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}, + ... +} + + +E-RABs-ToBeModified-SgNBModReq-List ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeModified-SgNBModReq-ItemIEs} } + +E-RABs-ToBeModified-SgNBModReq-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeModified-SgNBModReq-Item CRITICALITY ignore TYPE E-RABs-ToBeModified-SgNBModReq-Item PRESENCE mandatory}, + ... +} + + +E-RABs-ToBeModified-SgNBModReq-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-ToBeModified-SgNBModReq-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-ToBeModified-SgNBModReq-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeModified-SgNBModReq-ItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeModified-SgNBModReq-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeModified-SgNBModReq-Item-SgNBPDCPpresent ::= SEQUENCE { + full-E-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters OPTIONAL, + max-MN-admit-E-RAB-Level-QoS-Parameters GBR-QosInformation OPTIONAL, + meNB-DL-GTP-TEIDatMCG GTPtunnelEndpoint OPTIONAL, + s1-UL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeModified-SgNBModReq-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeModified-SgNBModReq-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-RLC-Status CRITICALITY ignore EXTENSION RLC-Status PRESENCE optional }, + ... +} + +E-RABs-ToBeModified-SgNBModReq-Item-SgNBPDCPnotpresent ::= SEQUENCE { + requested-SCG-E-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters OPTIONAL, + meNB-UL-GTP-TEIDatPDCP GTPtunnelEndpoint OPTIONAL, + uL-Configuration ULConfiguration OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeModified-SgNBModReq-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeModified-SgNBModReq-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-pDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}, + ... +} + +E-RABs-ToBeReleased-SgNBModReq-List ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeReleased-SgNBModReq-ItemIEs} } + +E-RABs-ToBeReleased-SgNBModReq-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeReleased-SgNBModReq-Item CRITICALITY ignore TYPE E-RABs-ToBeReleased-SgNBModReq-Item PRESENCE mandatory}, + ... +} + +E-RABs-ToBeReleased-SgNBModReq-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-ToBeReleased-SgNBModReq-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-ToBeReleased-SgNBModReq-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBModReq-ItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-SgNBModReq-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeReleased-SgNBModReq-Item-SgNBPDCPpresent ::= SEQUENCE { + dL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + uL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBModReq-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-SgNBModReq-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeReleased-SgNBModReq-Item-SgNBPDCPnotpresent ::= SEQUENCE { + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBModReq-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-SgNBModReq-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + + + +-- ************************************************************** +-- +-- SGNB MODIFICATION REQUEST ACKNOWLEDGE +-- +-- ************************************************************** + +SgNBModificationRequestAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBModificationRequestAcknowledge-IEs}}, + ... +} + +SgNBModificationRequestAcknowledge-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-Admitted-ToBeAdded-SgNBModAckList CRITICALITY ignore TYPE E-RABs-Admitted-ToBeAdded-SgNBModAckList PRESENCE optional}| + { ID id-E-RABs-Admitted-ToBeModified-SgNBModAckList CRITICALITY ignore TYPE E-RABs-Admitted-ToBeModified-SgNBModAckList PRESENCE optional}| + { ID id-E-RABs-Admitted-ToBeReleased-SgNBModAckList CRITICALITY ignore TYPE E-RABs-Admitted-ToBeReleased-SgNBModAckList PRESENCE optional}| + { ID id-E-RABs-NotAdmitted-List CRITICALITY ignore TYPE E-RAB-List PRESENCE optional}| + { ID id-SgNBtoMeNBContainer CRITICALITY ignore TYPE SgNBtoMeNBContainer PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SgNBResourceCoordinationInformation CRITICALITY ignore TYPE SgNBResourceCoordinationInformation PRESENCE optional}| + { ID id-AdmittedSplitSRBs CRITICALITY ignore TYPE SplitSRBs PRESENCE optional}| + { ID id-AdmittedSplitSRBsrelease CRITICALITY ignore TYPE SplitSRBs PRESENCE optional}| + { ID id-RRCConfigIndication CRITICALITY reject TYPE RRC-Config-Ind PRESENCE optional}, + ... +} + +E-RABs-Admitted-ToBeAdded-SgNBModAckList ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-Admitted-ToBeAdded-SgNBModAck-ItemIEs} } + +E-RABs-Admitted-ToBeAdded-SgNBModAck-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-Admitted-ToBeAdded-SgNBModAck-Item CRITICALITY ignore TYPE E-RABs-Admitted-ToBeAdded-SgNBModAck-Item PRESENCE mandatory} +} + +E-RABs-Admitted-ToBeAdded-SgNBModAck-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-Admitted-ToBeAdded-SgNBModAck-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-Admitted-ToBeAdded-SgNBModAck-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeAdded-SgNBModAck-ItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-Admitted-ToBeAdded-SgNBModAck-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-Admitted-ToBeAdded-SgNBModAck-Item-SgNBPDCPpresent ::= SEQUENCE { + s1-DL-GTPtunnelEndpoint GTPtunnelEndpoint, + sgNB-UL-GTP-TEIDatPDCP GTPtunnelEndpoint OPTIONAL, +-- This IE shall be present if MCG resource IE in the the EN-DC Resource Configuration IE are set to “present” -- + rlc-Mode RLCMode OPTIONAL, +-- This IE shall be present if MCG resource IE in the the EN-DC Resource Configuration IE are set to “present” -- + dL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + uL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + mCG-E-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters OPTIONAL, +-- This IE shall be present if MCG resource and SCG resource IEs in the the EN-DC Resource Configuration IE are set to “present” and the GBR QoS Information IE is present in the Requested MCG E-RAB Level QoS Parameters IE -- + uL-Configuration ULConfiguration OPTIONAL, +-- This IE shall be present if MCG resource and SCG resources IEs in the the EN-DC Resource Configuration IE are set to “present” -- + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeAdded-SgNBModAck-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-Admitted-ToBeAdded-SgNBModAck-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-pDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}, + ... +} + +E-RABs-Admitted-ToBeAdded-SgNBModAck-Item-SgNBPDCPnotpresent ::= SEQUENCE { + sgNB-DL-GTP-TEIDatSCG GTPtunnelEndpoint, + secondary-sgNB-DL-GTP-TEIDatSCG GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeAdded-SgNBModAck-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-Admitted-ToBeAdded-SgNBModAck-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-Admitted-ToBeModified-SgNBModAckList ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-Admitted-ToBeModified-SgNBModAck-ItemIEs} } + +E-RABs-Admitted-ToBeModified-SgNBModAck-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-Admitted-ToBeModified-SgNBModAck-Item CRITICALITY ignore TYPE E-RABs-Admitted-ToBeModified-SgNBModAck-Item PRESENCE mandatory} +} + +E-RABs-Admitted-ToBeModified-SgNBModAck-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-Admitted-ToBeModified-SgNBModAck-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-Admitted-ToBeModified-SgNBModAck-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-SgNBModAck-ItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeAdded-SgNBModAck-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-Admitted-ToBeModified-SgNBModAck-Item-SgNBPDCPpresent ::= SEQUENCE { + s1-DL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + sgNB-UL-GTP-TEIDatPDCP GTPtunnelEndpoint OPTIONAL, + mCG-E-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters OPTIONAL, + uL-Configuration ULConfiguration OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeModified-SgNBModAck-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-Admitted-ToBeModified-SgNBModAck-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-pDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}, + ... +} + +E-RABs-Admitted-ToBeModified-SgNBModAck-Item-SgNBPDCPnotpresent ::= SEQUENCE { + sgNB-DL-GTP-TEIDatSCG GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeModified-SgNBModAck-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-Admitted-ToBeModified-SgNBModAck-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-Admitted-ToBeReleased-SgNBModAckList ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-Admitted-ToBeReleased-SgNBModAck-ItemIEs} } + +E-RABs-Admitted-ToBeReleased-SgNBModAck-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-Admitted-ToBeReleased-SgNBModAck-Item CRITICALITY ignore TYPE E-RABs-Admitted-ToReleased-SgNBModAck-Item PRESENCE mandatory} +} + +E-RABs-Admitted-ToReleased-SgNBModAck-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-Admitted-ToBeReleased-SgNBModAck-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-Admitted-ToBeReleased-SgNBModAck-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBModAck-ItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-SgNBModAck-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-Admitted-ToBeReleased-SgNBModAck-Item-SgNBPDCPpresent ::= SEQUENCE { + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeReleased-SgNBModAck-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-Admitted-ToBeReleased-SgNBModAck-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-Admitted-ToBeReleased-SgNBModAck-Item-SgNBPDCPnotpresent ::= SEQUENCE { + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeReleased-SgNBModAck-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-Admitted-ToBeReleased-SgNBModAck-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + + +-- ************************************************************** +-- +-- SGNB MODIFICATION REQUEST REJECT +-- +-- ************************************************************** + +SgNBModificationRequestReject ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBModificationRequestReject-IEs}}, + ... +} + +SgNBModificationRequestReject-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- SGNB MODIFICATION REQUIRED +-- +-- ************************************************************** + +SgNBModificationRequired ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBModificationRequired-IEs}}, + ... +} + +SgNBModificationRequired-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-PDCPChangeIndication CRITICALITY ignore TYPE PDCPChangeIndication PRESENCE optional}| + { ID id-E-RABs-ToBeReleased-SgNBModReqdList CRITICALITY ignore TYPE E-RABs-ToBeReleased-SgNBModReqdList PRESENCE optional}| + { ID id-SgNBtoMeNBContainer CRITICALITY ignore TYPE SgNBtoMeNBContainer PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-E-RABs-ToBeModified-SgNBModReqdList CRITICALITY ignore TYPE E-RABs-ToBeModified-SgNBModReqdList PRESENCE optional}| + { ID id-SgNBResourceCoordinationInformation CRITICALITY ignore TYPE SgNBResourceCoordinationInformation PRESENCE optional}| + { ID id-RRCConfigIndication CRITICALITY reject TYPE RRC-Config-Ind PRESENCE optional}, + ... +} + + +E-RABs-ToBeReleased-SgNBModReqdList ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeReleased-SgNBModReqd-ItemIEs} } + +E-RABs-ToBeReleased-SgNBModReqd-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeReleased-SgNBModReqd-Item CRITICALITY ignore TYPE E-RABs-ToBeReleased-SgNBModReqd-Item PRESENCE mandatory }, + ... +} + +E-RABs-ToBeReleased-SgNBModReqd-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + cause Cause, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBModReqd-ItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-SgNBModReqd-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeModified-SgNBModReqdList ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeModified-SgNBModReqd-ItemIEs} } + +E-RABs-ToBeModified-SgNBModReqd-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeModified-SgNBModReqd-Item CRITICALITY ignore TYPE E-RABs-ToBeModified-SgNBModReqd-Item PRESENCE mandatory }, + ... +} + +E-RABs-ToBeModified-SgNBModReqd-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-ToBeModified-SgNBModReqd-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-ToBeModified-SgNBModReqd-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeModified-SgNBModReqd-ItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeModified-SgNBModReqd-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeModified-SgNBModReqd-Item-SgNBPDCPpresent ::= SEQUENCE { + requested-MCG-E-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters OPTIONAL, + uL-Configuration ULConfiguration OPTIONAL, + sgNB-UL-GTP-TEIDatPDCP GTPtunnelEndpoint OPTIONAL, + s1-DL-GTP-TEIDatSgNB GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeModified-SgNBModReqd-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeModified-SgNBModReqd-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-pDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}, + ... +} + +E-RABs-ToBeModified-SgNBModReqd-Item-SgNBPDCPnotpresent ::= SEQUENCE { + sgNB-DL-GTP-TEIDatSCG GTPtunnelEndpoint OPTIONAL, + secondary-sgNB-DL-GTP-TEIDatSCG GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeModified-SgNBModReqd-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeModified-SgNBModReqd-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-RLC-Status CRITICALITY ignore EXTENSION RLC-Status PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- SGNB MODIFICATION CONFIRM +-- +-- ************************************************************** + +SgNBModificationConfirm ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBModificationConfirm-IEs}}, + ... +} + +SgNBModificationConfirm-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-AdmittedToBeModified-SgNBModConfList CRITICALITY ignore TYPE E-RABs-AdmittedToBeModified-SgNBModConfList PRESENCE optional}| + { ID id-MeNBtoSgNBContainer CRITICALITY ignore TYPE MeNBtoSgNBContainer PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-MeNBResourceCoordinationInformation CRITICALITY ignore TYPE MeNBResourceCoordinationInformation PRESENCE optional}, + ... +} + +E-RABs-AdmittedToBeModified-SgNBModConfList ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container + { {E-RABs-AdmittedToBeModified-SgNBModConf-ItemIEs} } + +E-RABs-AdmittedToBeModified-SgNBModConf-ItemIEs X2AP-PROTOCOL-IES ::= { +{ ID id-E-RABs-AdmittedToBeModified-SgNBModConf-Item CRITICALITY ignore TYPE E-RABs-AdmittedToBeModified-SgNBModConf-Item PRESENCE mandatory }, + ... +} + +E-RABs-AdmittedToBeModified-SgNBModConf-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-AdmittedToBeModified-SgNBModConf-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-AdmittedToBeModified-SgNBModConf-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-AdmittedToBeModified-SgNBModConf-ItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-AdmittedToBeModified-SgNBModConf-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-AdmittedToBeModified-SgNBModConf-Item-SgNBPDCPpresent ::= SEQUENCE { + iE-Extensions ProtocolExtensionContainer { {E-RABs-AdmittedToBeModified-SgNBModConf-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-AdmittedToBeModified-SgNBModConf-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-AdmittedToBeModified-SgNBModConf-Item-SgNBPDCPnotpresent ::= SEQUENCE { + secondary-meNB-UL-GTP-TEIDatPDCP GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-AdmittedToBeModified-SgNBModConf-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-AdmittedToBeModified-SgNBModConf-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-pDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- SGNB MODIFICATION REFUSE +-- +-- ************************************************************** + +SgNBModificationRefuse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBModificationRefuse-IEs}}, + ... +} + +SgNBModificationRefuse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-MeNBtoSgNBContainer CRITICALITY ignore TYPE MeNBtoSgNBContainer PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- SGNB RELEASE REQUEST +-- +-- ************************************************************** + +SgNBReleaseRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBReleaseRequest-IEs}}, + ... +} + +SgNBReleaseRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE optional}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-E-RABs-ToBeReleased-SgNBRelReqList CRITICALITY ignore TYPE E-RABs-ToBeReleased-SgNBRelReqList PRESENCE optional}| + { ID id-UE-ContextKeptIndicator CRITICALITY ignore TYPE UE-ContextKeptIndicator PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-MeNBtoSgNBContainer CRITICALITY reject TYPE MeNBtoSgNBContainer PRESENCE optional}, + ... +} + +E-RABs-ToBeReleased-SgNBRelReqList ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeReleased-SgNBRelReq-ItemIEs} } + +E-RABs-ToBeReleased-SgNBRelReq-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeReleased-SgNBRelReq-Item CRITICALITY ignore TYPE E-RABs-ToBeReleased-SgNBRelReq-Item PRESENCE mandatory}, + ... +} + +E-RABs-ToBeReleased-SgNBRelReq-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBRelReq-ItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-SgNBRelReq-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + + +E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPpresent ::= SEQUENCE { + uL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + dL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPnotpresent ::= SEQUENCE { + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- SGNB RELEASE REQUEST ACKNOWLEDGE +-- +-- ************************************************************** + +SgNBReleaseRequestAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBReleaseRequestAcknowledge-IEs}}, + ... +} + +SgNBReleaseRequestAcknowledge-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- SGNB RELEASE REQUEST REJECT +-- +-- ************************************************************** + +SgNBReleaseRequestReject ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBReleaseRequestReject-IEs}}, + ... +} + +SgNBReleaseRequestReject-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- SGNB RELEASE REQUIRED +-- +-- ************************************************************** + +SgNBReleaseRequired ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBReleaseRequired-IEs}}, + ... +} + +SgNBReleaseRequired-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- SGNB RELEASE CONFIRM +-- +-- ************************************************************** + +SgNBReleaseConfirm ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBReleaseConfirm-IEs}}, + ... +} + +SgNBReleaseConfirm-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-ToBeReleased-SgNBRelConfList CRITICALITY ignore TYPE E-RABs-ToBeReleased-SgNBRelConfList PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +E-RABs-ToBeReleased-SgNBRelConfList ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeReleased-SgNBRelConf-ItemIEs} } + +E-RABs-ToBeReleased-SgNBRelConf-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeReleased-SgNBRelConf-Item CRITICALITY ignore TYPE E-RABs-ToBeReleased-SgNBRelConf-Item PRESENCE mandatory}, + ... +} + +E-RABs-ToBeReleased-SgNBRelConf-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-ToBeReleased-SgNBRelConf-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-ToBeReleased-SgNBRelConf-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBRelConf-ItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-SgNBRelConf-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeReleased-SgNBRelConf-Item-SgNBPDCPpresent ::= SEQUENCE { + uL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + dL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBRelConf-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-SgNBRelConf-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeReleased-SgNBRelConf-Item-SgNBPDCPnotpresent ::= SEQUENCE { + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBRelConf-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-SgNBRelConf-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + + +-- ************************************************************** +-- +-- SGNB COUNTER CHECK REQUEST +-- +-- ************************************************************** + +SgNBCounterCheckRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBCounterCheckRequest-IEs}}, + ... +} + +SgNBCounterCheckRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-SubjectToSgNBCounterCheck-List CRITICALITY ignore TYPE E-RABs-SubjectToSgNBCounterCheck-List PRESENCE mandatory}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +E-RABs-SubjectToSgNBCounterCheck-List ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-SubjectToSgNBCounterCheck-ItemIEs} } + +E-RABs-SubjectToSgNBCounterCheck-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-SubjectToSgNBCounterCheck-Item CRITICALITY ignore TYPE E-RABs-SubjectToSgNBCounterCheck-Item PRESENCE mandatory}, + ... +} + +E-RABs-SubjectToSgNBCounterCheck-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + uL-Count INTEGER (0..4294967295), + dL-Count INTEGER (0..4294967295), + iE-Extensions ProtocolExtensionContainer { {E-RABs-SubjectToSgNBCounterCheck-ItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-SubjectToSgNBCounterCheck-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- SGNB CHANGE REQUIRED +-- +-- ************************************************************** + +SgNBChangeRequired ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBChangeRequired-IEs}}, + ... +} + +SgNBChangeRequired-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-Target-SgNB-ID CRITICALITY reject TYPE GlobalGNB-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-SgNBtoMeNBContainer CRITICALITY reject TYPE SgNBtoMeNBContainer PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- SGNB CHANGE CONFIRM +-- +-- ************************************************************** + +SgNBChangeConfirm ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBChangeConfirm-IEs}}, + ... +} + +SgNBChangeConfirm-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-ToBeReleased-SgNBChaConfList CRITICALITY ignore TYPE E-RABs-ToBeReleased-SgNBChaConfList PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +E-RABs-ToBeReleased-SgNBChaConfList ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeReleased-SgNBChaConf-ItemIEs} } + +E-RABs-ToBeReleased-SgNBChaConf-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeReleased-SgNBChaConf-Item CRITICALITY ignore TYPE E-RABs-ToBeReleased-SgNBChaConf-Item PRESENCE mandatory}, + ... +} + +E-RABs-ToBeReleased-SgNBChaConf-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-ToBeReleased-SgNBChaConf-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-ToBeReleased-SgNBChaConf-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBChaConf-ItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-SgNBChaConf-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeReleased-SgNBChaConf-Item-SgNBPDCPpresent ::= SEQUENCE { + uL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + dL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBChaConf-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-SgNBChaConf-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABs-ToBeReleased-SgNBChaConf-Item-SgNBPDCPnotpresent ::= SEQUENCE { + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBChaConf-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} + +E-RABs-ToBeReleased-SgNBChaConf-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- RRC Transfer +-- +-- ************************************************************** + +RRCTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RRCTransfer-IEs}}, + ... +} + +RRCTransfer-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-SplitSRB CRITICALITY reject TYPE SplitSRB PRESENCE optional}| + { ID id-UENRMeasurement CRITICALITY reject TYPE UENRMeasurement PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- SGNB CHANGE REFUSE +-- +-- ************************************************************** + +SgNBChangeRefuse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBChangeRefuse-IEs}}, + ... +} + +SgNBChangeRefuse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- EN-DC X2 SETUP REQUEST +-- +-- ************************************************************** + +ENDCX2SetupRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCX2SetupRequest-IEs}}, + ... +} + +ENDCX2SetupRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-InitiatingNodeType-EndcX2Setup CRITICALITY reject TYPE InitiatingNodeType-EndcX2Setup PRESENCE mandatory}, + ... +} + +InitiatingNodeType-EndcX2Setup ::= CHOICE { + init-eNB ProtocolIE-Container {{ENB-ENDCX2SetupReqIEs}}, + init-en-gNB ProtocolIE-Container {{En-gNB-ENDCX2SetupReqIEs}}, + ... +} + +ENB-ENDCX2SetupReqIEs X2AP-PROTOCOL-IES ::= { + { ID id-GlobalENB-ID CRITICALITY reject TYPE GlobalENB-ID PRESENCE mandatory}| + { ID id-ServedEUTRAcellsENDCX2ManagementList CRITICALITY reject TYPE ServedEUTRAcellsENDCX2ManagementList PRESENCE mandatory}, + ... +} + +ServedEUTRAcellsENDCX2ManagementList ::= SEQUENCE (SIZE (1.. maxCellineNB)) OF SEQUENCE { + servedEUTRACellInfo ServedCell-Information, + nrNeighbourInfo NRNeighbour-Information OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ServedEUTRAcellsENDCX2Management-ExtIEs} } OPTIONAL, + ... +} + +ServedEUTRAcellsENDCX2Management-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +En-gNB-ENDCX2SetupReqIEs X2AP-PROTOCOL-IES ::= { + { ID id-Globalen-gNB-ID CRITICALITY reject TYPE GlobalGNB-ID PRESENCE mandatory}| + { ID id-ServedNRcellsENDCX2ManagementList CRITICALITY reject TYPE ServedNRcellsENDCX2ManagementList PRESENCE mandatory}, + ... +} + +ServedNRcellsENDCX2ManagementList ::= SEQUENCE (SIZE (1.. maxCellinengNB)) OF SEQUENCE { + servedNRCellInfo ServedNRCell-Information, + nRNeighbourInfo NRNeighbour-Information OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {En-gNBServedCells-ExtIEs} } OPTIONAL, + ... +} + +En-gNBServedCells-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ServedNRCell-Information ::= SEQUENCE { + nrpCI NRPCI, + nrCellID NRCGI, + fiveGS-TAC FiveGS-TAC OPTIONAL, + configured-TAC TAC OPTIONAL, + broadcastPLMNs BroadcastPLMNs-Item, + nrModeInfo CHOICE { + fdd FDD-InfoServedNRCell-Information, + tdd TDD-InfoServedNRCell-Information, + ... + }, + measurementTimingConfiguration OCTET STRING, + iE-Extensions ProtocolExtensionContainer { {ServedNRCell-Information-ExtIEs} } OPTIONAL, + ... +} + +ServedNRCell-Information-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +FDD-InfoServedNRCell-Information ::= SEQUENCE { + ul-NRFreqInfo NRFreqInfo, + dl-NRFreqInfo NRFreqInfo, + ul-NR-TxBW NR-TxBW, + dl-NR-TxBW NR-TxBW, + iE-Extensions ProtocolExtensionContainer { {FDD-InfoServedNRCell-Information-ExtIEs} } OPTIONAL, + ... +} + +FDD-InfoServedNRCell-Information-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +FDD-InfoNeighbourServedNRCell-Information ::= SEQUENCE { + ul-NRFreqInfo NRFreqInfo, + dl-NRFreqInfo NRFreqInfo, + iE-Extensions ProtocolExtensionContainer { {FDD-InfoNeighbourServedNRCell-Information-ExtIEs} } OPTIONAL, + ... +} + +FDD-InfoNeighbourServedNRCell-Information-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +TDD-InfoServedNRCell-Information ::= SEQUENCE { + nRFreqInfo NRFreqInfo, + nR-TxBW NR-TxBW, + iE-Extensions ProtocolExtensionContainer { {TDD-InfoServedNRCell-Information-ExtIEs} } OPTIONAL, + ... +} + +TDD-InfoServedNRCell-Information-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +TDD-InfoNeighbourServedNRCell-Information ::= SEQUENCE { + nRFreqInfo NRFreqInfo, + iE-Extensions ProtocolExtensionContainer { {TDD-InfoNeighbourServedNRCell-Information-ExtIEs} } OPTIONAL, + ... +} + +TDD-InfoNeighbourServedNRCell-Information-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +NRNeighbour-Information ::= SEQUENCE (SIZE (1.. maxofNRNeighbours))OF SEQUENCE { + nrpCI NRPCI, + nrCellID NRCGI, + nrFreqInfo NRFreqInfo, + fiveGS-TAC FiveGS-TAC OPTIONAL, + configured-TAC TAC OPTIONAL, + measurementTimingConfiguration OCTET STRING, + nRNeighbourModeInfo CHOICE { + fdd FDD-InfoNeighbourServedNRCell-Information, + tdd TDD-InfoNeighbourServedNRCell-Information, + ... + }, + iE-Extensions ProtocolExtensionContainer { {NRNeighbour-Information-ExtIEs} } OPTIONAL, + ... +} + +NRNeighbour-Information-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +CellAssistanceInformation ::= CHOICE { + limited-list Limited-list, + full-list ENUMERATED {allServedNRcells, ...}, + ... +} + + +Limited-list ::= SEQUENCE (SIZE (1..maxCellinengNB)) OF SEQUENCE { + nrCellID NRCGI, + iE-Extensions ProtocolExtensionContainer { {Limited-list-ExtIEs} } OPTIONAL, + ... +} + +Limited-list-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- EN-DC X2 SETUP RESPONSE +-- +-- ************************************************************** + +ENDCX2SetupResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCX2SetupResponse-IEs}}, + ... +} + +ENDCX2SetupResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RespondingNodeType-EndcX2Setup CRITICALITY reject TYPE RespondingNodeType-EndcX2Setup PRESENCE mandatory}, + ... +} + +RespondingNodeType-EndcX2Setup ::= CHOICE { + respond-eNB ProtocolIE-Container {{ENB-ENDCX2SetupReqAckIEs}}, + respond-en-gNB ProtocolIE-Container {{En-gNB-ENDCX2SetupReqAckIEs}}, + ... +} + +ENB-ENDCX2SetupReqAckIEs X2AP-PROTOCOL-IES ::= { + { ID id-GlobalENB-ID CRITICALITY reject TYPE GlobalENB-ID PRESENCE mandatory}| + { ID id-ServedEUTRAcellsENDCX2ManagementList CRITICALITY reject TYPE ServedEUTRAcellsENDCX2ManagementList PRESENCE mandatory}, + ... +} + + +En-gNB-ENDCX2SetupReqAckIEs X2AP-PROTOCOL-IES ::= { + { ID id-Globalen-gNB-ID CRITICALITY reject TYPE GlobalGNB-ID PRESENCE mandatory}| + { ID id-ServedNRcellsENDCX2ManagementList CRITICALITY reject TYPE ServedNRcellsENDCX2ManagementList PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- EN-DC X2 SETUP FAILURE +-- +-- ************************************************************** + +ENDCX2SetupFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCX2SetupFailure-IEs}}, + ... +} + +ENDCX2SetupFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory} | + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional } | + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- EN-DC CONFIGURATION UPDATE +-- +-- ************************************************************** + +ENDCConfigurationUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCConfigurationUpdate-IEs}}, + ... +} + +ENDCConfigurationUpdate-IEs X2AP-PROTOCOL-IES ::= { + { ID id-InitiatingNodeType-EndcConfigUpdate CRITICALITY reject TYPE InitiatingNodeType-EndcConfigUpdate PRESENCE mandatory}, + ... +} + +InitiatingNodeType-EndcConfigUpdate::= CHOICE { + init-eNB ProtocolIE-Container {{ENB-ENDCConfigUpdateIEs}}, + init-en-gNB ProtocolIE-Container {{En-gNB-ENDCConfigUpdateIEs}}, + ... +} + +ENB-ENDCConfigUpdateIEs X2AP-PROTOCOL-IES ::= { + { ID id-CellAssistanceInformation CRITICALITY reject TYPE CellAssistanceInformation PRESENCE optional }| + { ID id-ServedEUTRAcellsENDCX2ManagementList CRITICALITY reject TYPE ServedEUTRAcellsENDCX2ManagementList PRESENCE optional }| + { ID id-ServedEUTRAcellsToModifyListENDCConfUpd CRITICALITY reject TYPE ServedEUTRAcellsToModifyListENDCConfUpd PRESENCE optional }| + { ID id-ServedEUTRAcellsToDeleteListENDCConfUpd CRITICALITY reject TYPE ServedEUTRAcellsToDeleteListENDCConfUpd PRESENCE optional }, + ... +} + +ServedEUTRAcellsToModifyListENDCConfUpd ::= SEQUENCE (SIZE (1.. maxCellineNB)) OF SEQUENCE { + old-ECGI ECGI, + servedEUTRACellInfo ServedCell-Information, + nrNeighbourInfo NRNeighbour-Information OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ServedEUTRAcellsToModifyListENDCConfUpd-ExtIEs} } OPTIONAL, + ... +} + +ServedEUTRAcellsToModifyListENDCConfUpd-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ServedEUTRAcellsToDeleteListENDCConfUpd ::= SEQUENCE (SIZE (1..maxCellineNB)) OF ECGI + + +En-gNB-ENDCConfigUpdateIEs X2AP-PROTOCOL-IES ::= { + { ID id-ServedNRcellsENDCX2ManagementList CRITICALITY reject TYPE ServedNRcellsENDCX2ManagementList PRESENCE optional }| + { ID id-ServedNRcellsToModifyListENDCConfUpd CRITICALITY reject TYPE ServedNRcellsToModifyENDCConfUpdList PRESENCE optional }| + { ID id-ServedNRcellsToDeleteListENDCConfUpd CRITICALITY reject TYPE ServedNRcellsToDeleteENDCConfUpdList PRESENCE optional }, + ... +} + +ServedNRcellsToModifyENDCConfUpdList ::= SEQUENCE (SIZE (1..maxCellinengNB)) OF ServedNRCellsToModify-Item + +ServedNRCellsToModify-Item::= SEQUENCE { + old-nrcgi NRCGI, + servedNRCellInformation ServedNRCell-Information, + nrNeighbourInformation NRNeighbour-Information OPTIONAL, + nrDeactivationIndication DeactivationIndication OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ServedNRCellsToModify-Item-ExtIEs} } OPTIONAL, + ... +} + +ServedNRCellsToModify-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ServedNRcellsToDeleteENDCConfUpdList ::= SEQUENCE (SIZE (1..maxCellinengNB)) OF NRCGI + +-- ************************************************************** +-- +-- EN-DC CONFIGURATION UPDATE ACKNOWLEDGE +-- +-- ************************************************************** + +ENDCConfigurationUpdateAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCConfigurationUpdateAcknowledge-IEs}}, + ... +} + +ENDCConfigurationUpdateAcknowledge-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RespondingNodeType-EndcConfigUpdate CRITICALITY reject TYPE RespondingNodeType-EndcConfigUpdate PRESENCE mandatory}, + ... +} + + +RespondingNodeType-EndcConfigUpdate::= CHOICE { + respond-eNB ProtocolIE-Container {{ENB-ENDCConfigUpdateAckIEs}}, + respond-en-gNB ProtocolIE-Container {{En-gNB-ENDCConfigUpdateAckIEs}}, + ... +} + + +ENB-ENDCConfigUpdateAckIEs X2AP-PROTOCOL-IES ::= { + ... +} + +En-gNB-ENDCConfigUpdateAckIEs X2AP-PROTOCOL-IES ::= { + { ID id-ServedNRcellsENDCX2ManagementList CRITICALITY reject TYPE ServedNRcellsENDCX2ManagementList PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- EN-DC CONFIGURATION UPDATE FAILURE +-- +-- ************************************************************** + +ENDCConfigurationUpdateFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCConfigurationUpdateFailure-IEs}}, + ... +} + +ENDCConfigurationUpdateFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- EN-DC CELL ACTIVATION REQUEST +-- +-- ************************************************************** + +ENDCCellActivationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCCellActivationRequest-IEs}}, + ... +} + +ENDCCellActivationRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ServedNRCellsToActivate CRITICALITY reject TYPE ServedNRCellsToActivate PRESENCE mandatory}| + { ID id-ActivationID CRITICALITY reject TYPE ActivationID PRESENCE mandatory}, + ... +} + +ServedNRCellsToActivate::= SEQUENCE (SIZE (1.. maxCellinengNB)) OF ServedNRCellsToActivate-Item + +ServedNRCellsToActivate-Item::= SEQUENCE { + nrCellID NRCGI, + iE-Extensions ProtocolExtensionContainer { {ServedNRCellsToActivate-Item-ExtIEs} } OPTIONAL, + ... +} + +ServedNRCellsToActivate-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- EN-DC CELL ACTIVATION RESPONSE +-- +-- ************************************************************** + +ENDCCellActivationResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCCellActivationResponse-IEs}}, + ... +} + +ENDCCellActivationResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ActivatedNRCellList CRITICALITY ignore TYPE ActivatedNRCellList PRESENCE mandatory}| + { ID id-ActivationID CRITICALITY reject TYPE ActivationID PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + +ActivatedNRCellList ::= SEQUENCE (SIZE (1.. maxCellinengNB)) OF ActivatedNRCellList-Item + +ActivatedNRCellList-Item::= SEQUENCE { + nrCellID NRCGI, + iE-Extensions ProtocolExtensionContainer { {ActivatedNRCellList-Item-ExtIEs} } OPTIONAL, + ... +} + +ActivatedNRCellList-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +--************************************************************** +-- +-- EN-DC CELL ACTIVATION FAILURE +-- +-- ************************************************************** + +ENDCCellActivationFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCCellActivationFailure-IEs}}, + ... +} + +ENDCCellActivationFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ActivationID CRITICALITY reject TYPE ActivationID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- SECONDARY RAT DATA USAGE REPORT +-- +-- ************************************************************** + +SecondaryRATDataUsageReport ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SecondaryRATDataUsageReport-IEs}}, + ... +} + +SecondaryRATDataUsageReport-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-SecondaryRATUsageReportList CRITICALITY reject TYPE SecondaryRATUsageReportList PRESENCE mandatory}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +SgNBActivityNotification ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBActivityNotification-IEs}}, + ... +} + +SgNBActivityNotification-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-UEContextLevelUserPlaneActivity CRITICALITY reject TYPE UserPlaneTrafficActivityReport PRESENCE mandatory}| + { ID id-ERABActivityNotifyItemList CRITICALITY reject TYPE ERABActivityNotifyItemList PRESENCE mandatory}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- EN-DC PARTIAL RESET REQUIRED +-- +-- ************************************************************** + +ENDCPartialResetRequired ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCPartialResetRequired-IEs}}, + ... +} + +ENDCPartialResetRequired-IEs X2AP-PROTOCOL-IES ::= { + { ID id-UEs-ToBeReset CRITICALITY reject TYPE UEsToBeResetList PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- EN-DC PARTIAL RESET CONFIRM +-- +-- ************************************************************** + +ENDCPartialResetConfirm ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCPartialResetConfirm-IEs}}, + ... +} + +ENDCPartialResetConfirm-IEs X2AP-PROTOCOL-IES ::= { + { ID id-UEs-Admitted-ToBeReset CRITICALITY reject TYPE UEsToBeResetList PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- E-UTRA - NR CELL RESOURCE COORDINATION REQUEST +-- +-- ************************************************************** + +EUTRANRCellResourceCoordinationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{EUTRANRCellResourceCoordinationRequest-IEs}}, + ... +} + +EUTRANRCellResourceCoordinationRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-InitiatingNodeType-EutranrCellResourceCoordination CRITICALITY reject TYPE InitiatingNodeType-EutranrCellResourceCoordination PRESENCE mandatory}, + ... +} + +InitiatingNodeType-EutranrCellResourceCoordination ::= CHOICE { + initiate-eNB ProtocolIE-Container {{ENB-EUTRA-NRCellResourceCoordinationReqIEs}}, + initiate-en-gNB ProtocolIE-Container {{En-gNB-EUTRA-NRCellResourceCoordinationReqIEs}}, + ... +} + + +ENB-EUTRA-NRCellResourceCoordinationReqIEs X2AP-PROTOCOL-IES ::= { + { ID id-DataTrafficResourceIndication CRITICALITY reject TYPE DataTrafficResourceIndication PRESENCE mandatory}| + { ID id-SpectrumSharingGroupID CRITICALITY reject TYPE SpectrumSharingGroupID PRESENCE mandatory}| + { ID id-ListofEUTRACellsinEUTRACoordinationReq CRITICALITY reject TYPE ListofEUTRACellsinEUTRACoordinationReq PRESENCE mandatory}, + ... +} + + +En-gNB-EUTRA-NRCellResourceCoordinationReqIEs X2AP-PROTOCOL-IES ::= { + { ID id-DataTrafficResourceIndication CRITICALITY reject TYPE DataTrafficResourceIndication PRESENCE mandatory}| + { ID id-ListofEUTRACellsinNRCoordinationReq CRITICALITY reject TYPE ListofEUTRACellsinNRCoordinationReq PRESENCE mandatory }| + { ID id-SpectrumSharingGroupID CRITICALITY reject TYPE SpectrumSharingGroupID PRESENCE mandatory}| + { ID id-ListofNRCellsinNRCoordinationReq CRITICALITY reject TYPE ListofNRCellsinNRCoordinationReq PRESENCE mandatory}, + ... +} + + +ListofEUTRACellsinEUTRACoordinationReq ::= SEQUENCE (SIZE (0..maxCellineNB)) OF ECGI +ListofEUTRACellsinNRCoordinationReq ::= SEQUENCE (SIZE (1..maxCellineNB)) OF ECGI +ListofNRCellsinNRCoordinationReq ::= SEQUENCE (SIZE (0..maxnoNRcellsSpectrumSharingWithE-UTRA)) OF NRCGI + +-- ************************************************************** +-- +-- E-UTRA - NR CELL RESOURCE COORDINATION RESPONSE +-- +-- ************************************************************** + +EUTRANRCellResourceCoordinationResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{EUTRANRCellResourceCoordinationResponse-IEs}}, + ... +} + +EUTRANRCellResourceCoordinationResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RespondingNodeType-EutranrCellResourceCoordination CRITICALITY reject TYPE RespondingNodeType-EutranrCellResourceCoordination PRESENCE mandatory}, + ... +} + +RespondingNodeType-EutranrCellResourceCoordination ::= CHOICE { + respond-eNB ProtocolIE-Container {{ENB-EUTRA-NRCellResourceCoordinationReqAckIEs}}, + respond-en-gNB ProtocolIE-Container {{En-gNB-EUTRA-NRCellResourceCoordinationReqAckIEs}}, + ... +} + + +ENB-EUTRA-NRCellResourceCoordinationReqAckIEs X2AP-PROTOCOL-IES ::= { + { ID id-DataTrafficResourceIndication CRITICALITY reject TYPE DataTrafficResourceIndication PRESENCE mandatory}| + { ID id-SpectrumSharingGroupID CRITICALITY reject TYPE SpectrumSharingGroupID PRESENCE mandatory}| + { ID id-ListofEUTRACellsinEUTRACoordinationResp CRITICALITY reject TYPE ListofEUTRACellsinEUTRACoordinationResp PRESENCE mandatory}, + ... +} + + +En-gNB-EUTRA-NRCellResourceCoordinationReqAckIEs X2AP-PROTOCOL-IES ::= { + { ID id-DataTrafficResourceIndication CRITICALITY reject TYPE DataTrafficResourceIndication PRESENCE mandatory}| + { ID id-SpectrumSharingGroupID CRITICALITY reject TYPE SpectrumSharingGroupID PRESENCE mandatory}| + { ID id-ListofNRCellsinNRCoordinationResp CRITICALITY reject TYPE ListofNRCellsinNRCoordinationResp PRESENCE mandatory}, + + + ... +} + +ListofEUTRACellsinEUTRACoordinationResp ::= SEQUENCE (SIZE (0..maxCellineNB)) OF ECGI +ListofNRCellsinNRCoordinationResp ::= SEQUENCE (SIZE (0..maxnoNRcellsSpectrumSharingWithE-UTRA)) OF NRCGI + +-- ************************************************************** +-- +-- EN-DC X2 REMOVAL REQUEST +-- +-- ************************************************************** + +ENDCX2RemovalRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCX2RemovalRequest-IEs}}, + ... +} + +ENDCX2RemovalRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-InitiatingNodeType-EndcX2Removal CRITICALITY reject TYPE InitiatingNodeType-EndcX2Removal PRESENCE mandatory}, + ... +} + +InitiatingNodeType-EndcX2Removal ::= CHOICE { + init-eNB ProtocolIE-Container {{ENB-ENDCX2RemovalReqIEs}}, + init-en-gNB ProtocolIE-Container {{En-gNB-ENDCX2RemovalReqIEs}}, + ... +} + +ENB-ENDCX2RemovalReqIEs X2AP-PROTOCOL-IES ::= { + { ID id-GlobalENB-ID CRITICALITY reject TYPE GlobalENB-ID PRESENCE mandatory}, + ... +} + +En-gNB-ENDCX2RemovalReqIEs X2AP-PROTOCOL-IES ::= { + { ID id-Globalen-gNB-ID CRITICALITY reject TYPE GlobalGNB-ID PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- EN-DC X2 REMOVAL RESPONSE +-- +-- ************************************************************** + +ENDCX2RemovalResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCX2RemovalResponse-IEs}}, + ... +} + +ENDCX2RemovalResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RespondingNodeType-EndcX2Removal CRITICALITY reject TYPE RespondingNodeType-EndcX2Removal PRESENCE mandatory}, + ... +} + +RespondingNodeType-EndcX2Removal ::= CHOICE { + respond-eNB ProtocolIE-Container {{ENB-ENDCX2RemovalReqAckIEs}}, + respond-en-gNB ProtocolIE-Container {{En-gNB-ENDCX2RemovalReqAckIEs}}, + ... +} + +ENB-ENDCX2RemovalReqAckIEs X2AP-PROTOCOL-IES ::= { + { ID id-GlobalENB-ID CRITICALITY reject TYPE GlobalENB-ID PRESENCE mandatory}, + ... +} + +En-gNB-ENDCX2RemovalReqAckIEs X2AP-PROTOCOL-IES ::= { + { ID id-Globalen-gNB-ID CRITICALITY reject TYPE GlobalGNB-ID PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- EN-DC X2 REMOVAL FAILURE +-- +-- ************************************************************** + +ENDCX2RemovalFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCX2RemovalFailure-IEs}}, + ... +} + +ENDCX2RemovalFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory} | + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- DATA FORWARDING ADDRESS INDICATION +-- +-- ************************************************************** + +DataForwardingAddressIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{DataForwardingAddressIndication-IEs}}, + ... +} + +DataForwardingAddressIndication-IEs X2AP-PROTOCOL-IES ::= { + { ID id-New-eNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional }| + { ID id-Old-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Old-eNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional }| + { ID id-E-RABs-DataForwardingAddress-List CRITICALITY ignore TYPE E-RABs-DataForwardingAddress-List PRESENCE mandatory}, + ... +} + +E-RABs-DataForwardingAddress-List ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-DataForwardingAddress-ItemIEs} } + +E-RABs-DataForwardingAddress-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-DataForwardingAddress-Item CRITICALITY ignore TYPE E-RABs-DataForwardingAddress-Item PRESENCE mandatory}, + ... +} + +E-RABs-DataForwardingAddress-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + dl-GTPtunnelEndpoint GTPtunnelEndpoint, + iE-Extensions ProtocolExtensionContainer { {E-RABs-DataForwardingAddress-ItemExtIEs} } OPTIONAL, + ... +} + +E-RABs-DataForwardingAddress-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + + +END + + +-- ************************************************************** +-- +-- Information Element Definitions +-- +-- ************************************************************** + +X2AP-IEs { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +eps-Access (21) modules (3) x2ap (2) version1 (1) x2ap-IEs (2) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + + id-E-RAB-Item, + id-Number-of-Antennaports, + id-MBSFN-Subframe-Info, + id-PRACH-Configuration, + id-CSG-Id, + id-MDTConfiguration, + id-SignallingBasedMDTPLMNList, + id-MultibandInfoList, + id-FreqBandIndicatorPriority, + id-NeighbourTAC, + id-Time-UE-StayedInCell-EnhancedGranularity, + id-MBMS-Service-Area-List, + id-HO-cause, + id-eARFCNExtension, + id-DL-EARFCNExtension, + id-UL-EARFCNExtension, + id-M3Configuration, + id-M4Configuration, + id-M5Configuration, + id-MDT-Location-Info, + id-NRrestrictioninEPSasSecondaryRAT, + id-NRrestrictionin5GS, + id-AdditionalSpecialSubframe-Info, + id-UEID, + id-enhancedRNTP, + id-ProSeUEtoNetworkRelaying, + id-M6Configuration, + id-M7Configuration, + id-OffsetOfNbiotChannelNumberToDL-EARFCN, + id-OffsetOfNbiotChannelNumberToUL-EARFCN, + id-AdditionalSpecialSubframeExtension-Info, + id-BandwidthReducedSI, + id-extended-e-RAB-MaximumBitrateDL, + id-extended-e-RAB-MaximumBitrateUL, + id-extended-e-RAB-GuaranteedBitrateDL, + id-extended-e-RAB-GuaranteedBitrateUL, + id-extended-uEaggregateMaximumBitRateDownlink, + id-extended-uEaggregateMaximumBitRateUplink, + id-E-RABUsageReport-Item, + id-SecondaryRATUsageReport-Item, + id-UEAppLayerMeasConfig, + id-DL-scheduling-PDCCH-CCE-usage, + id-UL-scheduling-PDCCH-CCE-usage, + id-DownlinkPacketLossRate, + id-UplinkPacketLossRate, + id-serviceType, + id-ProtectedEUTRAResourceIndication, + id-NRS-NSSS-PowerOffset, + id-NSSS-NumOccasionDifferentPrecoder, + id-CNTypeRestrictions, + id-BluetoothMeasurementConfiguration, + id-WLANMeasurementConfiguration, + + + maxnoofBearers, + maxCellineNB, + maxEARFCN, + maxEARFCNPlusOne, + newmaxEARFCN, + maxInterfaces, + + maxnoofBands, + maxnoofBPLMNs, + maxnoofCells, + maxnoofEPLMNs, + maxnoofEPLMNsPlusOne, + maxnoofForbLACs, + maxnoofForbTACs, + maxnoofNeighbours, + maxnoofPRBs, + maxNrOfErrors, + maxPools, + maxnoofMBSFN, + maxnoofTAforMDT, + maxnoofCellIDforMDT, + maxnoofMBMSServiceAreaIdentities, + maxnoofMDTPLMNs, + maxnoofCoMPHypothesisSet, + maxnoofCoMPCells, + maxUEReport, + maxCellReport, + maxnoofPA, + maxCSIProcess, + maxCSIReport, + maxSubband, + maxnooftimeperiods, + maxnoofCellIDforQMC, + maxnoofTAforQMC, + maxnoofPLMNforQMC, + maxUEsinengNBDU, + maxnoofProtectedResourcePatterns, + maxnoNRcellsSpectrumSharingWithE-UTRA, + maxnoofNrCellBands, + maxnoofBluetoothName, + maxnoofWLANName + +FROM X2AP-Constants + + Criticality, + ProcedureCode, + ProtocolIE-ID, + TriggeringMessage +FROM X2AP-CommonDataTypes + + ProtocolExtensionContainer{}, + ProtocolIE-Single-Container{}, + + X2AP-PROTOCOL-EXTENSION, + X2AP-PROTOCOL-IES +FROM X2AP-Containers; + +-- A + +ABSInformation ::= CHOICE { + fdd ABSInformationFDD, + tdd ABSInformationTDD, + abs-inactive NULL, + ... +} + +ABSInformationFDD ::= SEQUENCE { + abs-pattern-info BIT STRING (SIZE(40)), + numberOfCellSpecificAntennaPorts ENUMERATED {one, two, four, ...}, + measurement-subset BIT STRING (SIZE(40)), + iE-Extensions ProtocolExtensionContainer { {ABSInformationFDD-ExtIEs} } OPTIONAL, + ... +} + +ABSInformationFDD-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ABSInformationTDD ::= SEQUENCE { + abs-pattern-info BIT STRING (SIZE(1..70, ...)), + numberOfCellSpecificAntennaPorts ENUMERATED {one, two, four, ...}, + measurement-subset BIT STRING (SIZE(1..70, ...)), + iE-Extensions ProtocolExtensionContainer { {ABSInformationTDD-ExtIEs} } OPTIONAL, + ... +} + +ABSInformationTDD-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ABS-Status ::= SEQUENCE { + dL-ABS-status DL-ABS-status, + usableABSInformation UsableABSInformation, + iE-Extensions ProtocolExtensionContainer { {ABS-Status-ExtIEs} } OPTIONAL, + ... +} + +ABS-Status-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ActivationID ::= INTEGER (0..255) + +AdditionalSpecialSubframe-Info ::= SEQUENCE { + additionalspecialSubframePatterns AdditionalSpecialSubframePatterns, + cyclicPrefixDL CyclicPrefixDL, + cyclicPrefixUL CyclicPrefixUL, + iE-Extensions ProtocolExtensionContainer { {AdditionalSpecialSubframe-Info-ExtIEs} } OPTIONAL, + ... +} + +AdditionalSpecialSubframe-Info-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +AdditionalSpecialSubframePatterns ::= ENUMERATED { + ssp0, + ssp1, + ssp2, + ssp3, + ssp4, + ssp5, + ssp6, + ssp7, + ssp8, + ssp9, + ... +} + +AdditionalSpecialSubframeExtension-Info ::= SEQUENCE { + additionalspecialSubframePatternsExtension AdditionalSpecialSubframePatternsExtension, + cyclicPrefixDL CyclicPrefixDL, + cyclicPrefixUL CyclicPrefixUL, + iE-Extensions ProtocolExtensionContainer { {AdditionalSpecialSubframeExtension-Info-ExtIEs} } OPTIONAL, + ... +} + +AdditionalSpecialSubframeExtension-Info-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +AdditionalSpecialSubframePatternsExtension ::= ENUMERATED { + ssp10, + ... +} + +AerialUEsubscriptionInformation ::= ENUMERATED { + allowed, + not-allowed, + ... +} + +AllocationAndRetentionPriority ::= SEQUENCE { + priorityLevel PriorityLevel, + pre-emptionCapability Pre-emptionCapability, + pre-emptionVulnerability Pre-emptionVulnerability, + iE-Extensions ProtocolExtensionContainer { {AllocationAndRetentionPriority-ExtIEs} } OPTIONAL, + ... +} + +AllocationAndRetentionPriority-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +AreaScopeOfMDT ::= CHOICE { + cellBased CellBasedMDT, + tABased TABasedMDT, + pLMNWide NULL, + ..., + tAIBased TAIBasedMDT +} + +AreaScopeOfQMC ::= CHOICE { + cellBased CellBasedQMC, + tABased TABasedQMC, + tAIBased TAIBasedQMC, + pLMNAreaBased PLMNAreaBasedQMC, + ... +} + +AS-SecurityInformation ::= SEQUENCE { + key-eNodeB-star Key-eNodeB-Star, + nextHopChainingCount NextHopChainingCount, + iE-Extensions ProtocolExtensionContainer { {AS-SecurityInformation-ExtIEs} } OPTIONAL, + ... +} + +AS-SecurityInformation-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + + +-- B + +BandwidthReducedSI::= ENUMERATED { + scheduled, + ... +} + +BearerType ::= ENUMERATED { + non-IP, + ... +} + +BenefitMetric ::= INTEGER (-101..100, ...) + +BitRate ::= INTEGER (0..10000000000) +BroadcastPLMNs-Item ::= SEQUENCE (SIZE(1..maxnoofBPLMNs)) OF PLMN-Identity + +BluetoothMeasurementConfiguration ::= SEQUENCE { + bluetoothMeasConfig BluetoothMeasConfig, + bluetoothMeasConfigNameList BluetoothMeasConfigNameList OPTIONAL, + bt-rssi ENUMERATED {true, ...} OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {BluetoothMeasurementConfiguration-ExtIEs} } OPTIONAL, + ... +} + +BluetoothMeasurementConfiguration-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +BluetoothMeasConfigNameList ::= SEQUENCE (SIZE(1..maxnoofBluetoothName)) OF BluetoothName + +BluetoothMeasConfig::= ENUMERATED {setup,...} + +BluetoothName ::= OCTET STRING (SIZE (1..248)) + +-- C + +CapacityValue ::= INTEGER (0..100) + +Cause ::= CHOICE { + radioNetwork CauseRadioNetwork, + transport CauseTransport, + protocol CauseProtocol, + misc CauseMisc, + ... +} + +CauseMisc ::= ENUMERATED { + control-processing-overload, + hardware-failure, + om-intervention, + not-enough-user-plane-processing-resources, + unspecified, + ... +} + +CauseProtocol ::= ENUMERATED { + transfer-syntax-error, + abstract-syntax-error-reject, + abstract-syntax-error-ignore-and-notify, + message-not-compatible-with-receiver-state, + semantic-error, + unspecified, + abstract-syntax-error-falsely-constructed-message, + ... +} + +CauseRadioNetwork ::= ENUMERATED { + handover-desirable-for-radio-reasons, + time-critical-handover, + resource-optimisation-handover, + reduce-load-in-serving-cell, + partial-handover, + unknown-new-eNB-UE-X2AP-ID, + unknown-old-eNB-UE-X2AP-ID, + unknown-pair-of-UE-X2AP-ID, + ho-target-not-allowed, + tx2relocoverall-expiry, + trelocprep-expiry, + cell-not-available, + no-radio-resources-available-in-target-cell, + invalid-MME-GroupID, + unknown-MME-Code, + encryption-and-or-integrity-protection-algorithms-not-supported, + reportCharacteristicsEmpty, + noReportPeriodicity, + existingMeasurementID, + unknown-eNB-Measurement-ID, + measurement-temporarily-not-available, + unspecified, + ..., + load-balancing, + handover-optimisation, + value-out-of-allowed-range, + multiple-E-RAB-ID-instances, + switch-off-ongoing, + not-supported-QCI-value, + measurement-not-supported-for-the-object, + tDCoverall-expiry, + tDCprep-expiry, + action-desirable-for-radio-reasons, + reduce-load, + resource-optimisation, + time-critical-action, + target-not-allowed, + no-radio-resources-available, + invalid-QoS-combination, + encryption-algorithms-not-aupported, + procedure-cancelled, + rRM-purpose, + improve-user-bit-rate, + user-inactivity, + radio-connection-with-UE-lost, + failure-in-the-radio-interface-procedure, + bearer-option-not-supported, + mCG-Mobility, + sCG-Mobility, + count-reaches-max-value, + unknown-old-en-gNB-UE-X2AP-ID, + pDCP-Overload + +} + +CauseTransport ::= ENUMERATED { + transport-resource-unavailable, + unspecified, + ... +} + +CellBasedMDT::= SEQUENCE { + cellIdListforMDT CellIdListforMDT, + iE-Extensions ProtocolExtensionContainer { {CellBasedMDT-ExtIEs} } OPTIONAL, + ... +} + +CellBasedMDT-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +CellBasedQMC::= SEQUENCE { + cellIdListforQMC CellIdListforQMC, + iE-Extensions ProtocolExtensionContainer { {CellBasedQMC-ExtIEs} } OPTIONAL, + ... +} + +CellBasedQMC-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +CellCapacityClassValue ::= INTEGER (1..100, ...) + +CellDeploymentStatusIndicator ::= ENUMERATED {pre-change-notification, ...} + +CellIdListforMDT ::= SEQUENCE (SIZE(1..maxnoofCellIDforMDT)) OF ECGI + +CellIdListforQMC ::= SEQUENCE (SIZE(1..maxnoofCellIDforQMC)) OF ECGI + +CellReplacingInfo ::= SEQUENCE { + replacingCellsList ReplacingCellsList, + iE-Extensions ProtocolExtensionContainer { {CellReplacingInfo-ExtIEs}} OPTIONAL, + ... +} + +CellReplacingInfo-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +CellReportingIndicator ::= ENUMERATED {stop-request, ... } + +Cell-Size ::= ENUMERATED {verysmall, small, medium, large, ... } + + +CellType ::= SEQUENCE { + cell-Size Cell-Size, + iE-Extensions ProtocolExtensionContainer { {CellType-ExtIEs}} OPTIONAL, + ... +} + +CellType-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +CNTypeRestrictions ::= SEQUENCE (SIZE(1.. maxnoofEPLMNsPlusOne)) OF CNTypeRestrictionsItem + +CNTypeRestrictionsItem ::= SEQUENCE { + plmn-Id PLMN-Identity, + cn-type ENUMERATED {fiveGC-forbidden, ...}, + iE-Extensions ProtocolExtensionContainer { {CNTypeRestrictionsItem-ExtIEs} } OPTIONAL, + ... +} + +CNTypeRestrictionsItem-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +CoMPHypothesisSet ::= SEQUENCE (SIZE(1..maxnoofCoMPCells)) OF CoMPHypothesisSetItem + +CoMPHypothesisSetItem ::= SEQUENCE { + coMPCellID ECGI, + coMPHypothesis BIT STRING (SIZE(6..4400, ...)), + iE-Extensions ProtocolExtensionContainer { {CoMPHypothesisSetItem-ExtIEs} } OPTIONAL, + ... +} + +CoMPHypothesisSetItem-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +CoMPInformation ::= SEQUENCE { + coMPInformationItem CoMPInformationItem, + coMPInformationStartTime CoMPInformationStartTime, + iE-Extensions ProtocolExtensionContainer { {CoMPInformation-ExtIEs} } OPTIONAL, + ... +} + +CoMPInformation-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +CoMPInformationItem ::= SEQUENCE (SIZE(1..maxnoofCoMPHypothesisSet)) OF + SEQUENCE { + coMPHypothesisSet CoMPHypothesisSet, + benefitMetric BenefitMetric, + iE-Extensions ProtocolExtensionContainer { {CoMPInformationItem-ExtIEs} } OPTIONAL, + ... + } + +CoMPInformationItem-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +CoMPInformationStartTime ::= SEQUENCE (SIZE(0..1)) OF + SEQUENCE { + startSFN INTEGER (0..1023, ...), + startSubframeNumber INTEGER (0..9, ...), + iE-Extensions ProtocolExtensionContainer { {CoMPInformationStartTime-ExtIEs} } OPTIONAL, + ... + } + +CoMPInformationStartTime-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +CompositeAvailableCapacity ::= SEQUENCE { + cellCapacityClassValue CellCapacityClassValue OPTIONAL, + capacityValue CapacityValue, + iE-Extensions ProtocolExtensionContainer { {CompositeAvailableCapacity-ExtIEs} } OPTIONAL, + ... +} + +CompositeAvailableCapacity-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +CompositeAvailableCapacityGroup ::= SEQUENCE { + dL-CompositeAvailableCapacity CompositeAvailableCapacity, + uL-CompositeAvailableCapacity CompositeAvailableCapacity, + iE-Extensions ProtocolExtensionContainer { {CompositeAvailableCapacityGroup-ExtIEs} } OPTIONAL, + ... +} + +CompositeAvailableCapacityGroup-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +Correlation-ID ::= OCTET STRING (SIZE (4)) + +COUNTvalue ::= SEQUENCE { + pDCP-SN PDCP-SN, + hFN HFN, + iE-Extensions ProtocolExtensionContainer { {COUNTvalue-ExtIEs} } OPTIONAL, + ... +} + +COUNTvalue-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +COUNTValueExtended ::= SEQUENCE { + pDCP-SNExtended PDCP-SNExtended, + hFNModified HFNModified, + iE-Extensions ProtocolExtensionContainer { {COUNTValueExtended-ExtIEs} } OPTIONAL, + ... +} + +COUNTValueExtended-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +COUNTvaluePDCP-SNlength18 ::= SEQUENCE { + pDCP-SNlength18 PDCP-SNlength18, + hFNforPDCP-SNlength18 HFNforPDCP-SNlength18, + iE-Extensions ProtocolExtensionContainer { {COUNTvaluePDCP-SNlength18-ExtIEs} } OPTIONAL, + ... +} + +COUNTvaluePDCP-SNlength18-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +CoverageModificationList ::= SEQUENCE (SIZE (1..maxCellineNB)) OF CoverageModification-Item + +CoverageModification-Item ::= SEQUENCE { + eCGI ECGI, + coverageState INTEGER (0..15, ...), + cellDeploymentStatusIndicator CellDeploymentStatusIndicator OPTIONAL, + cellReplacingInfo CellReplacingInfo OPTIONAL, +-- Included in case the Cell Deployment Status Indicator IE is present + ... +} + +CriticalityDiagnostics ::= SEQUENCE { + procedureCode ProcedureCode OPTIONAL, + triggeringMessage TriggeringMessage OPTIONAL, + procedureCriticality Criticality OPTIONAL, + iEsCriticalityDiagnostics CriticalityDiagnostics-IE-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {CriticalityDiagnostics-ExtIEs} } OPTIONAL, + ... +} + + +CriticalityDiagnostics-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +CriticalityDiagnostics-IE-List ::= SEQUENCE (SIZE (1..maxNrOfErrors)) OF + SEQUENCE { + iECriticality Criticality, + iE-ID ProtocolIE-ID, + typeOfError TypeOfError, + iE-Extensions ProtocolExtensionContainer { {CriticalityDiagnostics-IE-List-ExtIEs} } OPTIONAL, + ... +} + +CriticalityDiagnostics-IE-List-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +CRNTI ::= BIT STRING (SIZE (16)) + +CSGMembershipStatus ::= ENUMERATED { + member, + not-member +} + +CSG-Id ::= BIT STRING (SIZE (27)) + +CSIReportList ::= SEQUENCE (SIZE(1..maxUEReport)) OF + SEQUENCE { + uEID UEID, + cSIReportPerCSIProcess CSIReportPerCSIProcess, + iE-Extensions ProtocolExtensionContainer { {CSIReportList-ExtIEs} } OPTIONAL, + ... + } + +CSIReportList-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +CSIReportPerCSIProcess ::= SEQUENCE (SIZE(1.. maxCSIProcess)) OF + SEQUENCE { + cSIProcessConfigurationIndex INTEGER (1..7, ...), + cSIReportPerCSIProcessItem CSIReportPerCSIProcessItem, + iE-Extensions ProtocolExtensionContainer { {CSIReportPerCSIProcess-ExtIEs} } OPTIONAL, + ... + } + +CSIReportPerCSIProcess-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +CSIReportPerCSIProcessItem ::= SEQUENCE (SIZE(1.. maxCSIReport)) OF + SEQUENCE { + rI INTEGER (1..8, ...), + widebandCQI WidebandCQI, + subbandSize SubbandSize, + subbandCQIList SubbandCQIList OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {CSIReportPerCSIProcessItem-ExtIEs} } OPTIONAL, + ... + } + +CSIReportPerCSIProcessItem-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +CyclicPrefixDL ::= ENUMERATED { + normal, + extended, + ... +} + +CyclicPrefixUL ::= ENUMERATED { + normal, + extended, + ... +} + + +-- D + + +DataTrafficResources ::= BIT STRING (SIZE(6..17600)) + +DataTrafficResourceIndication ::= SEQUENCE { + activationSFN INTEGER (0..1023), + sharedResourceType SharedResourceType, + reservedSubframePattern ReservedSubframePattern OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {DataTrafficResourceIndication-ExtIEs} } OPTIONAL, +... +} + +DataTrafficResourceIndication-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +DeactivationIndication::= ENUMERATED { + deactivated, + ... +} + +DeliveryStatus ::= SEQUENCE { + highestSuccessDeliveredPDCPSN INTEGER (0..4095), + iE-Extensions ProtocolExtensionContainer { {DeliveryStatus-ExtIEs} } OPTIONAL, + ... +} + +DeliveryStatus-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + + +DL-ABS-status::= INTEGER (0..100) + +DL-Forwarding ::= ENUMERATED { + dL-forwardingProposed, + ... +} + +DL-GBR-PRB-usage::= INTEGER (0..100) + +DL-non-GBR-PRB-usage::= INTEGER (0..100) + +DLResourceBitmapULandDLSharing ::= DataTrafficResources + +DLResourcesULandDLSharing ::= CHOICE { +unchanged NULL, + changed DLResourceBitmapULandDLSharing, + ... +} + +DL-scheduling-PDCCH-CCE-usage::= INTEGER (0..100) + +DL-Total-PRB-usage::= INTEGER (0..100) + +DRB-ID ::= INTEGER (1..32) + +DynamicDLTransmissionInformation ::= CHOICE { + naics-active DynamicNAICSInformation, + naics-inactive NULL, + ... +} + +DynamicNAICSInformation ::= SEQUENCE { + transmissionModes BIT STRING (SIZE(8)) OPTIONAL, + pB-information INTEGER(0..3) OPTIONAL, + pA-list SEQUENCE (SIZE(0..maxnoofPA)) OF PA-Values, + iE-Extensions ProtocolExtensionContainer { {DynamicNAICSInformation-ExtIEs} } OPTIONAL, + ... +} + +DynamicNAICSInformation-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- E + +EARFCN ::= INTEGER (0..maxEARFCN) + +EARFCNExtension ::= INTEGER(maxEARFCNPlusOne..newmaxEARFCN, ...) + +ECGI ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + eUTRANcellIdentifier EUTRANCellIdentifier, + iE-Extensions ProtocolExtensionContainer { {ECGI-ExtIEs} } OPTIONAL, + ... +} + +ECGI-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +EnhancedRNTP ::= SEQUENCE { + enhancedRNTPBitmap BIT STRING (SIZE(12..8800, ...)), + rNTP-High-Power-Threshold RNTP-Threshold, + enhancedRNTPStartTime EnhancedRNTPStartTime OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {EnhancedRNTP-ExtIEs} } OPTIONAL, + ... +} + +EnhancedRNTP-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +EnhancedRNTPStartTime ::= SEQUENCE { + startSFN INTEGER (0..1023, ...), + startSubframeNumber INTEGER (0..9, ...), + iE-Extensions ProtocolExtensionContainer { {EnhancedRNTPStartTime-ExtIEs} } OPTIONAL, + ... + } + +EnhancedRNTPStartTime-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ENB-ID ::= CHOICE { + macro-eNB-ID BIT STRING (SIZE (20)), + home-eNB-ID BIT STRING (SIZE (28)), + ... , + short-Macro-eNB-ID BIT STRING (SIZE(18)), + long-Macro-eNB-ID BIT STRING (SIZE(21)) +} + +EncryptionAlgorithms ::= BIT STRING (SIZE (16, ...)) + +EN-DC-ResourceConfiguration ::= SEQUENCE { + pDCPatSgNB ENUMERATED {present, not-present, ...}, + mCGresources ENUMERATED {present, not-present, ...}, + sCGresources ENUMERATED {present, not-present, ...}, + iE-Extensions ProtocolExtensionContainer { {EN-DC-ResourceConfigurationExtIEs} } OPTIONAL, + ... +} + +EN-DC-ResourceConfigurationExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + + +EPLMNs ::= SEQUENCE (SIZE(1..maxnoofEPLMNs)) OF PLMN-Identity + +ERABActivityNotifyItemList ::= SEQUENCE (SIZE (0..maxnoofBearers)) OF ERABActivityNotifyItem + +ERABActivityNotifyItem ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + activityReport UserPlaneTrafficActivityReport, + iE-Extensions ProtocolExtensionContainer { {ERABActivityNotifyItem-ExtIEs} } OPTIONAL, + ... +} + +ERABActivityNotifyItem-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RAB-ID ::= INTEGER (0..15, ...) + +E-RAB-Level-QoS-Parameters ::= SEQUENCE { + qCI QCI, + allocationAndRetentionPriority AllocationAndRetentionPriority, + gbrQosInformation GBR-QosInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RAB-Level-QoS-Parameters-ExtIEs} } OPTIONAL, + ... +} + +E-RAB-Level-QoS-Parameters-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { +-- Extended for introduction of downlink and uplink packet loss rate for enhanced Voice performance – + { ID id-DownlinkPacketLossRate CRITICALITY ignore EXTENSION Packet-LossRate PRESENCE optional}| + { ID id-UplinkPacketLossRate CRITICALITY ignore EXTENSION Packet-LossRate PRESENCE optional}, + ... +} + +E-RAB-List ::= SEQUENCE (SIZE(1.. maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RAB-ItemIEs} } + +E-RAB-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RAB-Item CRITICALITY ignore TYPE E-RAB-Item PRESENCE mandatory }, + ... +} + +E-RAB-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + cause Cause, + iE-Extensions ProtocolExtensionContainer { {E-RAB-Item-ExtIEs} } OPTIONAL, + ... +} + +E-RAB-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABUsageReportList ::= SEQUENCE (SIZE(1..maxnooftimeperiods)) OF ProtocolIE-Single-Container { {E-RABUsageReport-ItemIEs} } + +E-RABUsageReport-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABUsageReport-Item CRITICALITY ignore TYPE E-RABUsageReport-Item PRESENCE mandatory }, + ... +} + +E-RABUsageReport-Item ::= SEQUENCE { + startTimeStamp OCTET STRING (SIZE(4)), + endTimeStamp OCTET STRING (SIZE(4)), + usageCountUL INTEGER (0..18446744073709551615), + usageCountDL INTEGER (0..18446744073709551615), + iE-Extensions ProtocolExtensionContainer { {E-RABUsageReport-Item-ExtIEs} } OPTIONAL, +... +} + +E-RABUsageReport-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +EUTRA-Mode-Info ::= CHOICE { + fDD FDD-Info, + tDD TDD-Info, + ... +} + +EUTRANCellIdentifier ::= BIT STRING (SIZE (28)) + +EUTRANTraceID ::= OCTET STRING (SIZE (8)) + +EventType ::= ENUMERATED{ + change-of-serving-cell, + ... +} + +ExpectedUEBehaviour ::= SEQUENCE { + expectedActivity ExpectedUEActivityBehaviour OPTIONAL, + expectedHOInterval ExpectedHOInterval OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ExpectedUEBehaviour-ExtIEs} } OPTIONAL, + ... +} + +ExpectedUEBehaviour-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ExpectedUEActivityBehaviour ::= SEQUENCE { + expectedActivityPeriod ExpectedActivityPeriod OPTIONAL, + expectedIdlePeriod ExpectedIdlePeriod OPTIONAL, + sourceofUEActivityBehaviourInformation SourceOfUEActivityBehaviourInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ExpectedUEActivityBehaviour-ExtIEs} } OPTIONAL, + ... +} + +ExpectedUEActivityBehaviour-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ExpectedActivityPeriod ::= INTEGER (1..30|40|50|60|80|100|120|150|180|181,...) + +ExpectedIdlePeriod ::= INTEGER (1..30|40|50|60|80|100|120|150|180|181,...) + +ExpectedHOInterval ::= ENUMERATED { + sec15, sec30, sec60, sec90, sec120, sec180, long-time, + ... +} + +ExtendedULInterferenceOverloadInfo ::= SEQUENCE { + associatedSubframes BIT STRING (SIZE (5)), + extended-ul-InterferenceOverloadIndication UL-InterferenceOverloadIndication, + iE-Extensions ProtocolExtensionContainer { {ExtendedULInterferenceOverloadInfo-ExtIEs} } OPTIONAL, + ... +} + +ExtendedULInterferenceOverloadInfo-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ExtendedBitRate ::= INTEGER (10000000001..4000000000000,...) + +-- F + +FDD-Info ::= SEQUENCE { + uL-EARFCN EARFCN, + dL-EARFCN EARFCN, + uL-Transmission-Bandwidth Transmission-Bandwidth, + dL-Transmission-Bandwidth Transmission-Bandwidth, + iE-Extensions ProtocolExtensionContainer { {FDD-Info-ExtIEs} } OPTIONAL, + ... +} + +FDD-Info-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-UL-EARFCNExtension CRITICALITY reject EXTENSION EARFCNExtension PRESENCE optional}| + { ID id-DL-EARFCNExtension CRITICALITY reject EXTENSION EARFCNExtension PRESENCE optional}| + { ID id-OffsetOfNbiotChannelNumberToDL-EARFCN CRITICALITY reject EXTENSION OffsetOfNbiotChannelNumberToEARFCN PRESENCE optional}| + { ID id-OffsetOfNbiotChannelNumberToUL-EARFCN CRITICALITY reject EXTENSION OffsetOfNbiotChannelNumberToEARFCN PRESENCE optional}| + { ID id-NRS-NSSS-PowerOffset CRITICALITY ignore EXTENSION NRS-NSSS-PowerOffset PRESENCE optional}| + { ID id-NSSS-NumOccasionDifferentPrecoder CRITICALITY ignore EXTENSION NSSS-NumOccasionDifferentPrecoder PRESENCE optional}, + ... +} + +ForbiddenInterRATs ::= ENUMERATED { + all, + geran, + utran, + cdma2000, + ..., + geranandutran, + cdma2000andutran + +} + +ForbiddenTAs ::= SEQUENCE (SIZE(1.. maxnoofEPLMNsPlusOne)) OF ForbiddenTAs-Item + +ForbiddenTAs-Item ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + forbiddenTACs ForbiddenTACs, + iE-Extensions ProtocolExtensionContainer { {ForbiddenTAs-Item-ExtIEs} } OPTIONAL, + ... +} + +ForbiddenTAs-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ForbiddenTACs ::= SEQUENCE (SIZE(1..maxnoofForbTACs)) OF TAC + +ForbiddenLAs ::= SEQUENCE (SIZE(1..maxnoofEPLMNsPlusOne)) OF ForbiddenLAs-Item + +ForbiddenLAs-Item ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + forbiddenLACs ForbiddenLACs, + iE-Extensions ProtocolExtensionContainer { {ForbiddenLAs-Item-ExtIEs} } OPTIONAL, + ... +} + +ForbiddenLAs-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ForbiddenLACs ::= SEQUENCE (SIZE(1..maxnoofForbLACs)) OF LAC + +Fourframes ::= BIT STRING (SIZE (24)) + +FreqBandIndicator ::= INTEGER (1..256, ...) + +FreqBandIndicatorPriority ::= ENUMERATED { + not-broadcasted, + broadcasted, + ... +} + + +FreqBandNrItem ::= SEQUENCE { + freqBandIndicatorNr INTEGER (1..1024,...), + supportedSULBandList SEQUENCE (SIZE(0..maxnoofNrCellBands)) OF SupportedSULFreqBandItem, + iE-Extensions ProtocolExtensionContainer { {FreqBandNrItem-ExtIEs} } OPTIONAL, + ... +} + +FreqBandNrItem-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- G + +GBR-QosInformation ::= SEQUENCE { + e-RAB-MaximumBitrateDL BitRate, + e-RAB-MaximumBitrateUL BitRate, + e-RAB-GuaranteedBitrateDL BitRate, + e-RAB-GuaranteedBitrateUL BitRate, + iE-Extensions ProtocolExtensionContainer { {GBR-QosInformation-ExtIEs} } OPTIONAL, + ... +} + +GBR-QosInformation-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { +-- Extension for maximum bitrate > 10Gbps -- + { ID id-extended-e-RAB-MaximumBitrateDL CRITICALITY ignore EXTENSION ExtendedBitRate PRESENCE optional}| + { ID id-extended-e-RAB-MaximumBitrateUL CRITICALITY ignore EXTENSION ExtendedBitRate PRESENCE optional}| + { ID id-extended-e-RAB-GuaranteedBitrateDL CRITICALITY ignore EXTENSION ExtendedBitRate PRESENCE optional}| + { ID id-extended-e-RAB-GuaranteedBitrateUL CRITICALITY ignore EXTENSION ExtendedBitRate PRESENCE optional}, + ... +} + +GlobalENB-ID ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + eNB-ID ENB-ID, + iE-Extensions ProtocolExtensionContainer { {GlobalENB-ID-ExtIEs} } OPTIONAL, + ... +} + +GlobalENB-ID-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +GlobalGNB-ID ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + gNB-ID GNB-ID, + iE-Extensions ProtocolExtensionContainer { {GlobalGNB-ID-ExtIEs} } OPTIONAL, + ... +} + +GlobalGNB-ID-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +GTPtunnelEndpoint ::= SEQUENCE { + transportLayerAddress TransportLayerAddress, + gTP-TEID GTP-TEI, + iE-Extensions ProtocolExtensionContainer { {GTPtunnelEndpoint-ExtIEs} } OPTIONAL, + ... +} + +GTPtunnelEndpoint-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +GTP-TEI ::= OCTET STRING (SIZE (4)) + +GUGroupIDList ::= SEQUENCE (SIZE (1..maxPools)) OF GU-Group-ID + + +GU-Group-ID ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + mME-Group-ID MME-Group-ID, + iE-Extensions ProtocolExtensionContainer { {GU-Group-ID-ExtIEs} } OPTIONAL, + ... +} + +GU-Group-ID-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + + +GUMMEI ::= SEQUENCE { + + gU-Group-ID GU-Group-ID, + mME-Code MME-Code, + iE-Extensions ProtocolExtensionContainer { {GUMMEI-ExtIEs} } OPTIONAL, + ... +} + +GUMMEI-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNB-ID ::= CHOICE { + gNB-ID BIT STRING (SIZE (22..32)), + ... +} + +-- H + +HandoverReportType ::= ENUMERATED { + hoTooEarly, + hoToWrongCell, + ..., + interRATpingpong +} + +HandoverRestrictionList ::= SEQUENCE { + servingPLMN PLMN-Identity, + equivalentPLMNs EPLMNs OPTIONAL, + forbiddenTAs ForbiddenTAs OPTIONAL, + forbiddenLAs ForbiddenLAs OPTIONAL, + forbiddenInterRATs ForbiddenInterRATs OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {HandoverRestrictionList-ExtIEs} } OPTIONAL, + ... +} + +HandoverRestrictionList-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-NRrestrictioninEPSasSecondaryRAT CRITICALITY ignore EXTENSION NRrestrictioninEPSasSecondaryRAT PRESENCE optional}| + { ID id-CNTypeRestrictions CRITICALITY ignore EXTENSION CNTypeRestrictions PRESENCE optional}| + { ID id-NRrestrictionin5GS CRITICALITY ignore EXTENSION NRrestrictionin5GS PRESENCE optional}, + ... +} + +HFN ::= INTEGER (0..1048575) + +HFNModified ::= INTEGER (0..131071) + +HFNforPDCP-SNlength18 ::= INTEGER (0..16383) + +HWLoadIndicator ::= SEQUENCE { + dLHWLoadIndicator LoadIndicator, + uLHWLoadIndicator LoadIndicator, + iE-Extensions ProtocolExtensionContainer { {HWLoadIndicator-ExtIEs} } OPTIONAL, + ... +} + +HWLoadIndicator-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + + +-- I + +IntegrityProtectionAlgorithms ::= BIT STRING (SIZE (16, ...)) + +InterfacesToTrace ::= BIT STRING (SIZE (8)) + +InvokeIndication ::= ENUMERATED{ + abs-information, + ..., + naics-information-start, + naics-information-stop +} + +-- J +-- K + +Key-eNodeB-Star ::= BIT STRING (SIZE(256)) + +-- L + +LAC ::= OCTET STRING (SIZE (2)) --(EXCEPT ('0000'H|'FFFE'H)) + +LastVisitedCell-Item ::= CHOICE { + e-UTRAN-Cell LastVisitedEUTRANCellInformation, + uTRAN-Cell LastVisitedUTRANCellInformation, + gERAN-Cell LastVisitedGERANCellInformation, + ..., + nG-RAN-Cell LastVisitedNGRANCellInformation +} + +LastVisitedEUTRANCellInformation ::= SEQUENCE { + global-Cell-ID ECGI, + cellType CellType, + time-UE-StayedInCell Time-UE-StayedInCell, + iE-Extensions ProtocolExtensionContainer { {LastVisitedEUTRANCellInformation-ExtIEs} } OPTIONAL, + ... +} + +LastVisitedEUTRANCellInformation-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { +-- Extension for Rel-11 to support enhanced granularity for time UE stayed in cell -- + { ID id-Time-UE-StayedInCell-EnhancedGranularity CRITICALITY ignore EXTENSION Time-UE-StayedInCell-EnhancedGranularity PRESENCE optional}| + { ID id-HO-cause CRITICALITY ignore EXTENSION Cause PRESENCE optional}, + ... +} + +LastVisitedGERANCellInformation ::= CHOICE { + undefined NULL, + ... +} + +LastVisitedNGRANCellInformation ::= OCTET STRING + +LastVisitedUTRANCellInformation ::= OCTET STRING + +LHN-ID ::= OCTET STRING(SIZE (32..256)) + +Links-to-log ::= ENUMERATED {uplink, downlink, both-uplink-and-downlink, ...} + +LoadIndicator ::= ENUMERATED { + lowLoad, + mediumLoad, + highLoad, + overLoad, + ... +} + +LocationReportingInformation ::= SEQUENCE { + eventType EventType, + reportArea ReportArea, + iE-Extensions ProtocolExtensionContainer { {LocationReportingInformation-ExtIEs} } OPTIONAL, + ... +} + +LocationReportingInformation-ExtIEs X2AP-PROTOCOL-EXTENSION ::={ + ... +} + +-- M + +M1PeriodicReporting ::= SEQUENCE { + reportInterval ReportIntervalMDT, + reportAmount ReportAmountMDT, + iE-Extensions ProtocolExtensionContainer { {M1PeriodicReporting-ExtIEs} } OPTIONAL, + ... +} + +M1PeriodicReporting-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +M1ReportingTrigger::= ENUMERATED{ + periodic, + a2eventtriggered, + ..., + a2eventtriggered-periodic +} + +M1ThresholdEventA2 ::= SEQUENCE { + measurementThreshold MeasurementThresholdA2, + iE-Extensions ProtocolExtensionContainer { {M1ThresholdEventA2-ExtIEs} } OPTIONAL, + ... +} + +M1ThresholdEventA2-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +M3Configuration ::= SEQUENCE { + m3period M3period, + iE-Extensions ProtocolExtensionContainer { {M3Configuration-ExtIEs} } OPTIONAL, + ... +} + +M3Configuration-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +M3period ::= ENUMERATED {ms100, ms1000, ms10000, ... } + +M4Configuration ::= SEQUENCE { + m4period M4period, + m4-links-to-log Links-to-log, + iE-Extensions ProtocolExtensionContainer { {M4Configuration-ExtIEs} } OPTIONAL, + ... +} + +M4Configuration-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +M4period ::= ENUMERATED {ms1024, ms2048, ms5120, ms10240, min1, ... } + + +M5Configuration ::= SEQUENCE { + m5period M5period, + m5-links-to-log Links-to-log, + iE-Extensions ProtocolExtensionContainer { {M5Configuration-ExtIEs} } OPTIONAL, + ... +} + +M5Configuration-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +M5period ::= ENUMERATED {ms1024, ms2048, ms5120, ms10240, min1, ... } + +M6Configuration ::= SEQUENCE { + m6report-interval M6report-interval, + m6delay-threshold M6delay-threshold OPTIONAL, +-- This IE shall be present if the M6 Links to log IE is set to “uplink” or to “both-uplink-and-downlink” -- + m6-links-to-log Links-to-log, + iE-Extensions ProtocolExtensionContainer { {M6Configuration-ExtIEs} } OPTIONAL, + ... +} + +M6Configuration-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +M6report-interval ::= ENUMERATED { ms1024, ms2048, ms5120, ms10240, ... } + +M6delay-threshold ::= ENUMERATED { ms30, ms40, ms50, ms60, ms70, ms80, ms90, ms100, ms150, ms300, ms500, ms750, ... } + +M7Configuration ::= SEQUENCE { + m7period M7period, + m7-links-to-log Links-to-log, + iE-Extensions ProtocolExtensionContainer { {M7Configuration-ExtIEs} } OPTIONAL, + ... +} + +M7Configuration-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +M7period ::= INTEGER(1..60, ...) + +MakeBeforeBreakIndicator::= ENUMERATED {true, ...} + +ManagementBasedMDTallowed ::= ENUMERATED {allowed, ...} + +Masked-IMEISV ::= BIT STRING (SIZE (64)) + +MDT-Activation ::= ENUMERATED { + immediate-MDT-only, + immediate-MDT-and-Trace, + ... +} + +MDT-Configuration ::= SEQUENCE { + mdt-Activation MDT-Activation, + areaScopeOfMDT AreaScopeOfMDT, + measurementsToActivate MeasurementsToActivate, + m1reportingTrigger M1ReportingTrigger, + m1thresholdeventA2 M1ThresholdEventA2 OPTIONAL, +-- Included in case of event-triggered, or event-triggered periodic reporting for measurement M1 + m1periodicReporting M1PeriodicReporting OPTIONAL, +-- Included in case of periodic, or event-triggered periodic reporting for measurement M1 + iE-Extensions ProtocolExtensionContainer { {MDT-Configuration-ExtIEs} } OPTIONAL, + ... +} + +MDT-Configuration-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + {ID id-M3Configuration CRITICALITY ignore EXTENSION M3Configuration PRESENCE conditional}| + {ID id-M4Configuration CRITICALITY ignore EXTENSION M4Configuration PRESENCE conditional}| + {ID id-M5Configuration CRITICALITY ignore EXTENSION M5Configuration PRESENCE conditional}| + {ID id-MDT-Location-Info CRITICALITY ignore EXTENSION MDT-Location-Info PRESENCE optional}| + {ID id-SignallingBasedMDTPLMNList CRITICALITY ignore EXTENSION MDTPLMNList PRESENCE optional}| + {ID id-M6Configuration CRITICALITY ignore EXTENSION M6Configuration PRESENCE conditional}| + {ID id-M7Configuration CRITICALITY ignore EXTENSION M7Configuration PRESENCE conditional}| + { ID id-BluetoothMeasurementConfiguration CRITICALITY ignore EXTENSION BluetoothMeasurementConfiguration PRESENCE optional}| + { ID id-WLANMeasurementConfiguration CRITICALITY ignore EXTENSION WLANMeasurementConfiguration PRESENCE optional}, + ... +} + +MDTPLMNList ::= SEQUENCE (SIZE(1..maxnoofMDTPLMNs)) OF PLMN-Identity + +MDT-Location-Info ::= BIT STRING (SIZE (8)) + +Measurement-ID ::= INTEGER (1..4095, ...) + +MeasurementsToActivate::= BIT STRING (SIZE (8)) + +MeasurementThresholdA2 ::= CHOICE { + threshold-RSRP Threshold-RSRP, + threshold-RSRQ Threshold-RSRQ, + ... +} + +MeNBResourceCoordinationInformation ::= SEQUENCE { + eUTRA-Cell-ID ECGI, + uLCoordinationInformation BIT STRING (SIZE(6..4400, ...)), + dLCoordinationInformation BIT STRING (SIZE(6..4400, ...)) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {MeNBResourceCoordinationInformationExtIEs} } OPTIONAL, + ... +} + +MeNBResourceCoordinationInformationExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +MeNBtoSeNBContainer ::= OCTET STRING + +MME-Group-ID ::= OCTET STRING (SIZE (2)) + +MME-Code ::= OCTET STRING (SIZE (1)) + +MBMS-Service-Area-Identity-List ::= SEQUENCE (SIZE(1.. maxnoofMBMSServiceAreaIdentities)) OF MBMS-Service-Area-Identity + +MBMS-Service-Area-Identity ::= OCTET STRING (SIZE (2)) + +MBSFN-Subframe-Infolist::= SEQUENCE (SIZE(1.. maxnoofMBSFN)) OF MBSFN-Subframe-Info + +MBSFN-Subframe-Info ::= SEQUENCE { + radioframeAllocationPeriod RadioframeAllocationPeriod, + radioframeAllocationOffset RadioframeAllocationOffset, + subframeAllocation SubframeAllocation, + iE-Extensions ProtocolExtensionContainer { {MBSFN-Subframe-Info-ExtIEs} } OPTIONAL, + ... +} + +MBSFN-Subframe-Info-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +MobilityParametersModificationRange ::= SEQUENCE { + handoverTriggerChangeLowerLimit INTEGER (-20..20), + handoverTriggerChangeUpperLimit INTEGER (-20..20), + ... +} + +MobilityParametersInformation ::= SEQUENCE { + handoverTriggerChange INTEGER (-20..20), + ... +} + +MultibandInfoList ::= SEQUENCE (SIZE(1..maxnoofBands)) OF BandInfo + + +BandInfo ::= SEQUENCE { + freqBandIndicator FreqBandIndicator, + iE-Extensions ProtocolExtensionContainer { {BandInfo-ExtIEs} } OPTIONAL, + ... +} + +BandInfo-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +MeNBtoSgNBContainer ::= OCTET STRING + +SplitSRBs ::= ENUMERATED {srb1, srb2, srb1and2, ...} + +SplitSRB ::= SEQUENCE { + rrcContainer RRCContainer OPTIONAL, + srbType SRBType, + deliveryStatus DeliveryStatus OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {SplitSRB-ExtIEs} } OPTIONAL, + ... +} + +SplitSRB-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +UENRMeasurement ::= SEQUENCE { + uENRMeasurements RRCContainer, + iE-Extensions ProtocolExtensionContainer { {UENRMeasurement-ExtIEs} } OPTIONAL, + ... +} + +UENRMeasurement-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- N + +Neighbour-Information ::= SEQUENCE (SIZE (0..maxnoofNeighbours)) OF SEQUENCE { + eCGI ECGI, + pCI PCI, + eARFCN EARFCN, + iE-Extensions ProtocolExtensionContainer { {Neighbour-Information-ExtIEs} } OPTIONAL, + ... +} + +Neighbour-Information-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-NeighbourTAC CRITICALITY ignore EXTENSION TAC PRESENCE optional}| + { ID id-eARFCNExtension CRITICALITY reject EXTENSION EARFCNExtension PRESENCE optional}, + ... +} + +NextHopChainingCount ::= INTEGER (0..7) + +Number-of-Antennaports ::= ENUMERATED { + an1, + an2, + an4, + ... +} + +NRFreqInfo ::= SEQUENCE{ + nRARFCN INTEGER (0.. 3279165), + nRARFCN-SUL INTEGER (0.. 3279165) OPTIONAL, + freqBandListNr SEQUENCE (SIZE(1..maxnoofNrCellBands)) OF FreqBandNrItem, + sULInformation SULInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {NRFreqInfo-ExtIEs} } OPTIONAL, + + ... +} + +NRFreqInfo-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +NRCellIdentifier ::= BIT STRING (SIZE (36)) + +NRCGI ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + nRcellIdentifier NRCellIdentifier, + iE-Extensions ProtocolExtensionContainer { {NRCGI-ExtIEs} } OPTIONAL, + ... +} + +NRCGI-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +NRPCI ::= INTEGER (0..1007) + +NRrestrictioninEPSasSecondaryRAT ::= ENUMERATED { + nRrestrictedinEPSasSecondaryRAT, + ... +} + +NRrestrictionin5GS ::= ENUMERATED { + nRrestrictedin5GS, + ... +} + +NRencryptionAlgorithms ::= BIT STRING (SIZE (16,...)) +NRintegrityProtectionAlgorithms ::= BIT STRING (SIZE (16,...)) + +NR-TxBW ::= SEQUENCE { + nRSCS NRSCS, + nRNRB NRNRB, + iE-Extensions ProtocolExtensionContainer { {NR-TxBW-ExtIEs} } OPTIONAL, + ... +} + +NR-TxBW-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +NRNRB ::= ENUMERATED { nrb11, nrb18, nrb24, nrb25, nrb31, nrb32, nrb38, nrb51, nrb52, nrb65, nrb66, nrb78, nrb79, nrb93, nrb106, nrb107, nrb121, nrb132, nrb133, nrb135, nrb160, nrb162, nrb189, nrb216, nrb217, nrb245, nrb264, nrb270, nrb273, ...} + +NRSCS ::= ENUMERATED { scs15, scs30, scs60, scs120, ...} + +NRS-NSSS-PowerOffset ::= ENUMERATED { minusThree, zero, three, ...} + +FiveGS-TAC ::= OCTET STRING (SIZE (3)) + +NRUESecurityCapabilities ::= SEQUENCE { + nRencryptionAlgorithms NRencryptionAlgorithms, + nRintegrityProtectionAlgorithms NRintegrityProtectionAlgorithms, + iE-Extensions ProtocolExtensionContainer { {NRUESecurityCapabilities-ExtIEs} } OPTIONAL, +... +} + +NRUESecurityCapabilities-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +NSSS-NumOccasionDifferentPrecoder ::= ENUMERATED { two, four, eight, ...} + +-- O + +OffsetOfNbiotChannelNumberToEARFCN ::= ENUMERATED { + minusTen, + minusNine, + minusEight, + minusSeven, + minusSix, + minusFive, + minusFour, + minusThree, + minusTwo, + minusOne, + minusZeroDotFive, + zero, + one, + two, + three, + four, + five, + six, + seven, + eight, + nine, + ... +} + +Oneframe ::= BIT STRING (SIZE (6)) + +-- P + +Packet-LossRate ::= INTEGER(0..1000) + +PA-Values ::= ENUMERATED { + dB-6, + dB-4dot77, + dB-3, + dB-1dot77, + dB0, + dB1, + dB2, + dB3, + ... +} + +PDCPChangeIndication ::= ENUMERATED {s-KgNB-update-required, pDCP-data-recovery-required,...} + +PDCP-SN ::= INTEGER (0..4095) + +PDCP-SNExtended ::= INTEGER (0..32767) + +PDCP-SNlength18 ::= INTEGER (0..262143) + +PDCPSnLength ::= ENUMERATED {twelve-bits,eighteen-bits,...} + +PCI ::= INTEGER (0..503, ...) + +PLMN-Identity ::= OCTET STRING (SIZE(3)) + +Port-Number ::= OCTET STRING (SIZE (2)) + +PRACH-Configuration ::= SEQUENCE { + rootSequenceIndex INTEGER (0..837), + zeroCorrelationIndex INTEGER (0..15), + highSpeedFlag BOOLEAN, + prach-FreqOffset INTEGER (0..94), + prach-ConfigIndex INTEGER (0..63) OPTIONAL, -- present for TDD -- + iE-Extensions ProtocolExtensionContainer { {PRACH-Configuration-ExtIEs} } OPTIONAL, + ... +} + +PLMNAreaBasedQMC ::= SEQUENCE { + plmnListforQMC PLMNListforQMC, + iE-Extensions ProtocolExtensionContainer { {PLMNAreaBasedQMC-ExtIEs} } OPTIONAL, + ... +} + +PLMNAreaBasedQMC-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +PLMNListforQMC ::= SEQUENCE (SIZE(1..maxnoofPLMNforQMC)) OF PLMN-Identity + + +PRACH-Configuration-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +Pre-emptionCapability ::= ENUMERATED { + shall-not-trigger-pre-emption, + may-trigger-pre-emption +} + +Pre-emptionVulnerability ::= ENUMERATED { + not-pre-emptable, + pre-emptable +} + +PriorityLevel ::= INTEGER { spare (0), highest (1), lowest (14), no-priority (15) } (0..15) + +ProSeAuthorized ::= SEQUENCE { + proSeDirectDiscovery ProSeDirectDiscovery OPTIONAL, + proSeDirectCommunication ProSeDirectCommunication OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ProSeAuthorized-ExtIEs} } OPTIONAL, + ... +} + +ProSeAuthorized-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-ProSeUEtoNetworkRelaying CRITICALITY ignore EXTENSION ProSeUEtoNetworkRelaying PRESENCE optional}, + ... +} + +ProSeDirectDiscovery ::= ENUMERATED { + authorized, + not-authorized, + ... +} + +ProSeDirectCommunication ::= ENUMERATED { + authorized, + not-authorized, + ... +} + +ProSeUEtoNetworkRelaying ::= ENUMERATED { + authorized, + not-authorized, + ... +} + +ProtectedEUTRAResourceIndication::= SEQUENCE { + activationSFN INTEGER (0..1023), + protectedResourceList ProtectedResourceList, + mBSFNControlRegionLength INTEGER (0..3) OPTIONAL, + pDCCHRegionLength INTEGER (1..3) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ProtectedEUTRAResourceIndication-ExtIEs} } OPTIONAL, + ... +} + +ProtectedEUTRAResourceIndication-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} -- Rapporteur: missing extension -- + + +ProtectedFootprintTimePattern ::= SEQUENCE { + protectedFootprintTimePeriodicity INTEGER (1..320, ...), + protectedFootprintStartTime INTEGER (1..20, ...), + iE-Extensions ProtocolExtensionContainer { {ProtectedFootprintTimePattern-ExtIEs} } OPTIONAL, + ... +} + +ProtectedFootprintTimePattern-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ProtectedResourceList ::= SEQUENCE (SIZE(1.. maxnoofProtectedResourcePatterns)) OF ProtectedResourceList-Item + +ProtectedResourceList-Item ::= SEQUENCE { + resourceType ResourceType, + intraPRBProtectedResourceFootprint BIT STRING (SIZE(84, ...)), + protectedFootprintFrequencyPattern BIT STRING (SIZE(6..110, ...)), + protectedFootprintTimePattern ProtectedFootprintTimePattern, + iE-Extensions ProtocolExtensionContainer { {ProtectedResourceList-Item-ExtIEs} } OPTIONAL, + ... +} + +ProtectedResourceList-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- Q + +QCI ::= INTEGER (0..255) + +-- R + +RadioframeAllocationOffset ::= INTEGER (0..7, ...) + +RadioframeAllocationPeriod ::= ENUMERATED{ + n1, + n2, + n4, + n8, + n16, + n32, + ... +} + + +RadioResourceStatus ::= SEQUENCE { + dL-GBR-PRB-usage DL-GBR-PRB-usage, + uL-GBR-PRB-usage UL-GBR-PRB-usage, + dL-non-GBR-PRB-usage DL-non-GBR-PRB-usage, + uL-non-GBR-PRB-usage UL-non-GBR-PRB-usage, + dL-Total-PRB-usage DL-Total-PRB-usage, + uL-Total-PRB-usage UL-Total-PRB-usage, + iE-Extensions ProtocolExtensionContainer { {RadioResourceStatus-ExtIEs} } OPTIONAL, + ... +} + +RadioResourceStatus-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + {ID id-DL-scheduling-PDCCH-CCE-usage CRITICALITY ignore EXTENSION DL-scheduling-PDCCH-CCE-usage PRESENCE optional}| + + {ID id-UL-scheduling-PDCCH-CCE-usage CRITICALITY ignore EXTENSION UL-scheduling-PDCCH-CCE-usage PRESENCE optional}, + ... +} + +ReceiveStatusofULPDCPSDUs ::= BIT STRING (SIZE(4096)) + +ReceiveStatusOfULPDCPSDUsExtended ::= BIT STRING (SIZE(1..16384)) + +ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 ::= BIT STRING (SIZE(1..131072)) + +Reestablishment-Indication ::= ENUMERATED { + reestablished, + ... +} + +Registration-Request ::= ENUMERATED { + start, + stop, + ..., + partial-stop, + add +} + +RelativeNarrowbandTxPower ::= SEQUENCE { + + rNTP-PerPRB BIT STRING (SIZE(6..110, ...)), + rNTP-Threshold RNTP-Threshold, + numberOfCellSpecificAntennaPorts ENUMERATED {one, two, four, ...}, + p-B INTEGER (0..3,...), + pDCCH-InterferenceImpact INTEGER (0..4,...), + iE-Extensions ProtocolExtensionContainer { {RelativeNarrowbandTxPower-ExtIEs} } OPTIONAL, + ... +} + +RelativeNarrowbandTxPower-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-enhancedRNTP CRITICALITY ignore EXTENSION EnhancedRNTP PRESENCE optional }, + ... +} + +ReplacingCellsList ::= SEQUENCE (SIZE(0.. maxCellineNB)) OF ReplacingCellsList-Item + +ReplacingCellsList-Item ::= SEQUENCE { + eCGI ECGI, + ... +} + +ReportAmountMDT ::= ENUMERATED{r1, r2, r4, r8, r16, r32, r64, rinfinity} + +ReportArea ::= ENUMERATED{ + ecgi, + ... +} + +ReportCharacteristics ::= BIT STRING (SIZE (32)) + +ReportingPeriodicityCSIR ::= ENUMERATED { + ms5, + ms10, + ms20, + ms40, + ms80, +... +} + +ReportingPeriodicityRSRPMR ::= ENUMERATED { + one-hundred-20-ms, + two-hundred-40-ms, + four-hundred-80-ms, + six-hundred-40-ms, +... +} + +ReportIntervalMDT ::= ENUMERATED {ms120, ms240, ms480, ms640, ms1024, ms2048, ms5120, ms10240, min1, min6, min12, min30, min60} + +ReservedSubframePattern ::= SEQUENCE{ + subframeType SubframeType, + reservedSubframePattern BIT STRING (SIZE(10..160)), + mBSFNControlRegionLength INTEGER (0..3), + iE-Extensions ProtocolExtensionContainer { {ReservedSubframePattern-ExtIEs} } OPTIONAL, + ... +} + +ReservedSubframePattern-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResourceType ::= ENUMERATED { + downlinknonCRS, + cRS, + uplink, + ... +} + +ResumeID ::= CHOICE { + non-truncated BIT STRING(SIZE(40)), + truncated BIT STRING(SIZE(24)), + ... +} + +RLCMode ::= ENUMERATED { + rlc-am, + rlc-um-bidirectional, + rlc-um-unidirectional-ul, + rlc-um-unidirectional-dl, + ... +} + +RLC-Status ::= SEQUENCE { + reestablishment-Indication Reestablishment-Indication, + iE-Extensions ProtocolExtensionContainer { {RLC-Status-ExtIEs} } OPTIONAL, + ... +} + +RLC-Status-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +RNTP-Threshold ::= ENUMERATED { + minusInfinity, + minusEleven, + minusTen, + minusNine, + minusEight, + minusSeven, + minusSix, + minusFive, + minusFour, + minusThree, + minusTwo, + minusOne, + zero, + one, + two, + three, + ... +} + +RRC-Config-Ind ::= ENUMERATED { + full-config, + delta-config, + ... +} + +RRC-Context ::= OCTET STRING + +RRCConnReestabIndicator ::= ENUMERATED { + reconfigurationFailure, handoverFailure, otherFailure, ... +} +-- The values correspond to the values of ReestablishmentCause reported from the UE in the RRCConnectionReestablishmentRequest, as defined in TS 36.331 [9] + +RRCConnSetupIndicator::= ENUMERATED { + rrcConnSetup, + ... +} + +RSRPMeasurementResult ::= SEQUENCE (SIZE(1..maxCellReport)) OF + SEQUENCE { + rSRPCellID ECGI, + rSRPMeasured INTEGER (0..97, ...), + iE-Extensions ProtocolExtensionContainer { {RSRPMeasurementResult-ExtIEs} } OPTIONAL, + ... + } + +RSRPMeasurementResult-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +RSRPMRList ::= SEQUENCE (SIZE(1..maxUEReport)) OF + SEQUENCE { + rSRPMeasurementResult RSRPMeasurementResult, + iE-Extensions ProtocolExtensionContainer { {RSRPMRList-ExtIEs} } OPTIONAL, + ... + } + +RSRPMRList-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-UEID CRITICALITY ignore EXTENSION UEID PRESENCE optional}, + ... +} + +RRCContainer ::= OCTET STRING + +-- S + +S1TNLLoadIndicator ::= SEQUENCE { + dLS1TNLLoadIndicator LoadIndicator, + uLS1TNLLoadIndicator LoadIndicator, + iE-Extensions ProtocolExtensionContainer { {S1TNLLoadIndicator-ExtIEs} } OPTIONAL, + ... +} + +S1TNLLoadIndicator-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +SCGChangeIndication ::= ENUMERATED {pDCPCountWrapAround, pSCellChange, other, ...} + +SecondaryRATUsageReportList ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container {{SecondaryRATUsageReport-ItemIEs}} + +SecondaryRATUsageReport-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-SecondaryRATUsageReport-Item CRITICALITY reject TYPE SecondaryRATUsageReport-Item PRESENCE mandatory}, + ... +} + +SecondaryRATUsageReport-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + secondaryRATType ENUMERATED {nr, ...}, + e-RABUsageReportList E-RABUsageReportList, + iE-Extensions ProtocolExtensionContainer { {SecondaryRATUsageReport-Item-ExtIEs} } OPTIONAL, +... +} + +SecondaryRATUsageReport-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +SeNBSecurityKey ::= BIT STRING (SIZE(256)) + +SeNBtoMeNBContainer ::= OCTET STRING + + +ServedCells ::= SEQUENCE (SIZE (1.. maxCellineNB)) OF SEQUENCE { + servedCellInfo ServedCell-Information, + neighbour-Info Neighbour-Information OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ServedCell-ExtIEs} } OPTIONAL, + ... +} + +ServedCell-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ServedCell-Information ::= SEQUENCE { + pCI PCI, + cellId ECGI, + tAC TAC, + broadcastPLMNs BroadcastPLMNs-Item, + eUTRA-Mode-Info EUTRA-Mode-Info, + iE-Extensions ProtocolExtensionContainer { {ServedCell-Information-ExtIEs} } OPTIONAL, + ... +} + +ServedCell-Information-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-Number-of-Antennaports CRITICALITY ignore EXTENSION Number-of-Antennaports PRESENCE optional}| + { ID id-PRACH-Configuration CRITICALITY ignore EXTENSION PRACH-Configuration PRESENCE optional}| + { ID id-MBSFN-Subframe-Info CRITICALITY ignore EXTENSION MBSFN-Subframe-Infolist PRESENCE optional}| + { ID id-CSG-Id CRITICALITY ignore EXTENSION CSG-Id PRESENCE optional}| + { ID id-MBMS-Service-Area-List CRITICALITY ignore EXTENSION MBMS-Service-Area-Identity-List PRESENCE optional}| + { ID id-MultibandInfoList CRITICALITY ignore EXTENSION MultibandInfoList PRESENCE optional}| + { ID id-FreqBandIndicatorPriority CRITICALITY ignore EXTENSION FreqBandIndicatorPriority PRESENCE optional}| + { ID id-BandwidthReducedSI CRITICALITY ignore EXTENSION BandwidthReducedSI PRESENCE optional}| + { ID id-ProtectedEUTRAResourceIndication CRITICALITY ignore EXTENSION ProtectedEUTRAResourceIndication PRESENCE optional}, + ... +} + +ServiceType ::= ENUMERATED{ + qMC-for-streaming-service, + qMC-for-MTSI-service, + ... +} + +SgNBResourceCoordinationInformation ::= SEQUENCE { + nR-CGI NRCGI, + uLCoordinationInformation BIT STRING (SIZE(6..4400, ...)), + dLCoordinationInformation BIT STRING (SIZE(6..4400, ...)) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {SgNBResourceCoordinationInformationExtIEs} } OPTIONAL, + ... +} + +SgNBResourceCoordinationInformationExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +SgNB-UE-X2AP-ID ::= INTEGER (0..4294967295) + +SIPTOBearerDeactivationIndication ::= ENUMERATED { + true, + ... +} + +SharedResourceType ::= CHOICE{ + uLOnlySharing ULOnlySharing, + uLandDLSharing ULandDLSharing, + ... +} + +ShortMAC-I ::= BIT STRING (SIZE(16)) + + +SGNB-Addition-Trigger-Ind ::= ENUMERATED { + sn-change, + inter-eNB-HO, + intra-eNB-HO, + ... +} + +SourceOfUEActivityBehaviourInformation ::= ENUMERATED { + subscription-information, + statistics, + ... +} + +SpecialSubframe-Info ::= SEQUENCE { + specialSubframePatterns SpecialSubframePatterns, + cyclicPrefixDL CyclicPrefixDL, + cyclicPrefixUL CyclicPrefixUL, + iE-Extensions ProtocolExtensionContainer { {SpecialSubframe-Info-ExtIEs} } OPTIONAL, + ... +} + +SpecialSubframe-Info-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +SpecialSubframePatterns ::= ENUMERATED { + ssp0, + ssp1, + ssp2, + ssp3, + ssp4, + ssp5, + ssp6, + ssp7, + ssp8, + ... +} + +SpectrumSharingGroupID ::= INTEGER (1..maxCellineNB) + +SubbandCQI ::= SEQUENCE { + subbandCQICodeword0 SubbandCQICodeword0, + subbandCQICodeword1 SubbandCQICodeword1 OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {SubbandCQI-ExtIEs} } OPTIONAL, + ... +} + +Subscription-Based-UE-DifferentiationInfo ::= SEQUENCE { + periodicCommunicationIndicator ENUMERATED {periodically, ondemand, ...} OPTIONAL, + periodicTime INTEGER (1..3600, ...) OPTIONAL, + scheduledCommunicationTime ScheduledCommunicationTime OPTIONAL, + stationaryIndication ENUMERATED {stationary, mobile, ...} OPTIONAL, + trafficProfile ENUMERATED {single-packet, dual-packets, multiple-packets, ...} OPTIONAL, + batteryIndication ENUMERATED {battery-powered, battery-powered-not-rechargeable-or-replaceable, not-battery-powered, ...} OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Subscription-Based-UE-DifferentiationInfo-ExtIEs} } OPTIONAL, + ... +} + +Subscription-Based-UE-DifferentiationInfo-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ScheduledCommunicationTime ::= SEQUENCE { + dayofWeek BIT STRING (SIZE(7)) OPTIONAL, + timeofDayStart INTEGER (0..86399, ...) OPTIONAL, + timeofDayEnd INTEGER (0..86399, ...) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { ScheduledCommunicationTime-ExtIEs}} OPTIONAL, + ... +} + +ScheduledCommunicationTime-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRVCCOperationPossible ::= ENUMERATED { + possible, + ... +} + +SubbandCQI-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +SubbandCQICodeword0 ::= CHOICE { + four-bitCQI INTEGER (0..15, ...), + two-bitSubbandDifferentialCQI INTEGER (0..3, ...), + two-bitDifferentialCQI INTEGER (0..3, ...), + ... +} +SubbandCQICodeword1 ::= CHOICE { + four-bitCQI INTEGER (0..15, ...), + three-bitSpatialDifferentialCQI INTEGER (0..7, ...), + two-bitSubbandDifferentialCQI INTEGER (0..3, ...), + two-bitDifferentialCQI INTEGER (0..3, ...), + ... +} + +SubbandCQIList ::= SEQUENCE (SIZE(1.. maxSubband)) OF SubbandCQIItem + +SubbandCQIItem ::= SEQUENCE { + subbandCQI SubbandCQI, + subbandIndex INTEGER (0..27,...), + iE-Extensions ProtocolExtensionContainer { {SubbandCQIItem-ExtIEs} } OPTIONAL, + ... +} + +SubbandCQIItem-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +SubbandSize ::= ENUMERATED { + size2, + size3, + size4, + size6, + size8, + ... +} + +SubscriberProfileIDforRFP ::= INTEGER (1..256) + +SubframeAllocation ::= CHOICE { + oneframe Oneframe, + fourframes Fourframes, + ... +} + +SubframeAssignment ::= ENUMERATED { + sa0, + sa1, + sa2, + sa3, + sa4, + sa5, + sa6, + ... +} + +SubframeType ::= ENUMERATED{mbsfn,nonmbsfn,...} + +SgNBSecurityKey ::= BIT STRING (SIZE(256)) + +SgNBtoMeNBContainer ::= OCTET STRING + +SRBType ::= ENUMERATED {srb1, srb2, ...} +SCGConfigurationQuery ::= ENUMERATED {true,...} + +SULInformation ::= SEQUENCE { + sUL-ARFCN INTEGER (0.. 3279165), + sUL-TxBW NR-TxBW, + iE-Extensions ProtocolExtensionContainer { {SULInformation-ExtIEs} } OPTIONAL, + ... +} + + +SupportedSULFreqBandItem ::= SEQUENCE { + freqBandIndicatorNr INTEGER (1..1024,...), + iE-Extensions ProtocolExtensionContainer { {SupportedSULFreqBandItem-ExtIEs} } OPTIONAL, + ... +} + +SupportedSULFreqBandItem-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +SULInformation-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- T + +TABasedMDT::= SEQUENCE { + tAListforMDT TAListforMDT, + iE-Extensions ProtocolExtensionContainer { {TABasedMDT-ExtIEs} } OPTIONAL, + ... +} + +TABasedMDT-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +TAC ::= OCTET STRING (SIZE (2)) + +TAIBasedMDT ::= SEQUENCE { + tAIListforMDT TAIListforMDT, + iE-Extensions ProtocolExtensionContainer { {TAIBasedMDT-ExtIEs} } OPTIONAL, + ... +} + +TAIBasedMDT-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +TAIListforMDT ::= SEQUENCE (SIZE(1..maxnoofTAforMDT)) OF TAI-Item + +TAI-Item ::= SEQUENCE { + tAC TAC, + pLMN-Identity PLMN-Identity, + iE-Extensions ProtocolExtensionContainer { {TAI-Item-ExtIEs} } OPTIONAL, + ... +} + +TAI-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +TAListforMDT ::= SEQUENCE (SIZE(1..maxnoofTAforMDT)) OF TAC + +TABasedQMC ::= SEQUENCE { + tAListforQMC TAListforQMC, + iE-Extensions ProtocolExtensionContainer { {TABasedQMC-ExtIEs} } OPTIONAL, + ... +} + +TABasedQMC-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +TAListforQMC ::= SEQUENCE (SIZE(1..maxnoofTAforQMC)) OF TAC + +TAIBasedQMC ::= SEQUENCE { + tAIListforQMC TAIListforQMC, + iE-Extensions ProtocolExtensionContainer { {TAIBasedQMC-ExtIEs} } OPTIONAL, + ... +} + +TAIBasedQMC-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +TAIListforQMC ::= SEQUENCE (SIZE(1..maxnoofTAforQMC)) OF TAI-Item + +TargetCellInUTRAN ::= OCTET STRING -- This IE is to be encoded according to the UTRAN Cell ID in the Last Visited UTRAN Cell Information IE in TS 25.413 [24] + +TargeteNBtoSource-eNBTransparentContainer ::= OCTET STRING + +TDD-Info ::= SEQUENCE { + eARFCN EARFCN, + transmission-Bandwidth Transmission-Bandwidth, + subframeAssignment SubframeAssignment, + specialSubframe-Info SpecialSubframe-Info, + iE-Extensions ProtocolExtensionContainer { {TDD-Info-ExtIEs} } OPTIONAL, + ... +} +TDD-Info-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-AdditionalSpecialSubframe-Info CRITICALITY ignore EXTENSION AdditionalSpecialSubframe-Info PRESENCE optional}| + { ID id-eARFCNExtension CRITICALITY reject EXTENSION EARFCNExtension PRESENCE optional}| + { ID id-AdditionalSpecialSubframeExtension-Info CRITICALITY ignore EXTENSION AdditionalSpecialSubframeExtension-Info PRESENCE optional}, + ... +} + +Threshold-RSRP ::= INTEGER(0..97) + +Threshold-RSRQ ::= INTEGER(0..34) + +TimeToWait ::= ENUMERATED { + v1s, + v2s, + v5s, + v10s, + v20s, + v60s, + ... +} + +Time-UE-StayedInCell ::= INTEGER (0..4095) + +Time-UE-StayedInCell-EnhancedGranularity ::= INTEGER (0..40950) + +TraceActivation ::= SEQUENCE { + eUTRANTraceID EUTRANTraceID, + interfacesToTrace InterfacesToTrace, +traceDepth TraceDepth, +traceCollectionEntityIPAddress TraceCollectionEntityIPAddress, + iE-Extensions ProtocolExtensionContainer { {TraceActivation-ExtIEs} } OPTIONAL, + ... +} + +TraceActivation-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-MDTConfiguration CRITICALITY ignore EXTENSION MDT-Configuration PRESENCE optional}| + { ID id-UEAppLayerMeasConfig CRITICALITY ignore EXTENSION UEAppLayerMeasConfig PRESENCE optional}, + ... +} + +TraceCollectionEntityIPAddress ::= BIT STRING (SIZE(1..160, ...)) + +TraceDepth ::= ENUMERATED { + minimum, + medium, + maximum, + minimumWithoutVendorSpecificExtension, + mediumWithoutVendorSpecificExtension, + maximumWithoutVendorSpecificExtension, + ... +} + +Transmission-Bandwidth ::= ENUMERATED { + bw6, + bw15, + bw25, + bw50, + bw75, + bw100, + ..., + bw1 +} + +TransportLayerAddress ::= BIT STRING (SIZE(1..160, ...)) + +TunnelInformation ::= SEQUENCE { + transportLayerAddress TransportLayerAddress, + uDP-Port-Number Port-Number OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {Tunnel-Information-ExtIEs} } OPTIONAL, + ... +} + +Tunnel-Information-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +TypeOfError ::= ENUMERATED { + not-understood, + missing, + ... +} + + +-- U + +UEAggregateMaximumBitRate ::= SEQUENCE { + uEaggregateMaximumBitRateDownlink BitRate, + uEaggregateMaximumBitRateUplink BitRate, + iE-Extensions ProtocolExtensionContainer { {UEAggregate-MaximumBitrate-ExtIEs} } OPTIONAL, + ... +} + +UEAggregate-MaximumBitrate-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-extended-uEaggregateMaximumBitRateDownlink CRITICALITY ignore EXTENSION ExtendedBitRate PRESENCE optional}| + { ID id-extended-uEaggregateMaximumBitRateUplink CRITICALITY ignore EXTENSION ExtendedBitRate PRESENCE optional}, + ... +} + +UEAppLayerMeasConfig ::= SEQUENCE { + containerForAppLayerMeasConfig OCTET STRING (SIZE(1..1000)), + areaScopeOfQMC AreaScopeOfQMC, + iE-Extensions ProtocolExtensionContainer { {UEAppLayerMeasConfig-ExtIEs} } OPTIONAL, + ... +} + +UEAppLayerMeasConfig-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + {ID id-serviceType CRITICALITY ignore EXTENSION ServiceType PRESENCE optional}, + ... +} + +UE-ContextKeptIndicator ::= ENUMERATED { + true, + ... +} + +UEID ::= BIT STRING (SIZE (16)) + +UE-HistoryInformation ::= SEQUENCE (SIZE(1..maxnoofCells)) OF LastVisitedCell-Item + +UE-HistoryInformationFromTheUE ::= OCTET STRING +-- This IE is a transparent container and shall be encoded as the VisitedCellInfoList field contained in the UEInformationResponse message as defined in TS 36.331 [9] + +UE-S1AP-ID ::= INTEGER (0.. 4294967295) + +UE-X2AP-ID ::= INTEGER (0..4095) + +UE-X2AP-ID-Extension ::= INTEGER (0..4095, ...) + +UE-RLF-Report-Container::= OCTET STRING +-- This IE is a transparent container and shall be encoded as the RLF-Report-r9 field contained in the UEInformationResponse message as defined in TS 36.331 [9] + +UE-RLF-Report-Container-for-extended-bands ::= OCTET STRING +-- This IE is a transparent container and shall be encoded as the RLF-Report-v9e0 field contained in the UEInformationResponse message as defined in TS 36.331 [9] + +UESecurityCapabilities ::= SEQUENCE { + encryptionAlgorithms EncryptionAlgorithms, + integrityProtectionAlgorithms IntegrityProtectionAlgorithms, + iE-Extensions ProtocolExtensionContainer { {UESecurityCapabilities-ExtIEs} } OPTIONAL, +... +} + +UESecurityCapabilities-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +UESidelinkAggregateMaximumBitRate ::= SEQUENCE { + uESidelinkAggregateMaximumBitRate BitRate, + iE-Extensions ProtocolExtensionContainer { {UE-Sidelink-Aggregate-MaximumBitRate-ExtIEs} } OPTIONAL, + ... +} + +UE-Sidelink-Aggregate-MaximumBitRate-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +UEsToBeResetList ::= SEQUENCE (SIZE (1.. maxUEsinengNBDU)) OF UEsToBeResetList-Item + +UEsToBeResetList-Item::= SEQUENCE { + meNB-ID UE-X2AP-ID, + meNB-ID-ext UE-X2AP-ID-Extension OPTIONAL, + sgNB-ID SgNB-UE-X2AP-ID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {UEsToBeResetList-Item-ExtIEs} } OPTIONAL, + ... +} + +UEsToBeResetList-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ULandDLSharing ::= SEQUENCE{ + uLResourcesULandDLSharing ULResourcesULandDLSharing, + dLResourcesULandDLSharing DLResourcesULandDLSharing, + iE-Extensions ProtocolExtensionContainer { {ULandDLSharing-ExtIEs} } OPTIONAL, + ... +} + +ULandDLSharing-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ULConfiguration::= SEQUENCE { + uL-PDCP UL-UE-Configuration, + iE-Extensions ProtocolExtensionContainer { {ULConfiguration-ExtIEs} } OPTIONAL, + ... +} + +ULConfiguration-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +UL-UE-Configuration::= ENUMERATED { no-data, shared, only, ... } + +UL-GBR-PRB-usage::= INTEGER (0..100) + +UL-HighInterferenceIndicationInfo ::= SEQUENCE (SIZE(1..maxCellineNB)) OF UL-HighInterferenceIndicationInfo-Item + +UL-HighInterferenceIndicationInfo-Item ::= SEQUENCE { + target-Cell-ID ECGI, + ul-interferenceindication UL-HighInterferenceIndication, + iE-Extensions ProtocolExtensionContainer { {UL-HighInterferenceIndicationInfo-Item-ExtIEs} } OPTIONAL, + ... +} + +UL-HighInterferenceIndicationInfo-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +UL-HighInterferenceIndication ::= BIT STRING (SIZE(1..110, ...)) + +UL-InterferenceOverloadIndication ::= SEQUENCE (SIZE(1..maxnoofPRBs)) OF UL-InterferenceOverloadIndication-Item + +UL-InterferenceOverloadIndication-Item ::= ENUMERATED { + high-interference, + medium-interference, + low-interference, + ... +} + +UL-non-GBR-PRB-usage::= INTEGER (0..100) + +ULOnlySharing ::= SEQUENCE{ + uLResourceBitmapULOnlySharing DataTrafficResources, + iE-Extensions ProtocolExtensionContainer { {ULOnlySharing-ExtIEs} } OPTIONAL, + ... +} + +ULOnlySharing-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +ULResourceBitmapULandDLSharing ::= DataTrafficResources + + +ULResourcesULandDLSharing ::= CHOICE { + unchanged NULL, + changed ULResourceBitmapULandDLSharing, + ... +} + +UL-scheduling-PDCCH-CCE-usage::= INTEGER (0..100) + +UL-Total-PRB-usage::= INTEGER (0..100) + +UsableABSInformation ::= CHOICE { + fdd UsableABSInformationFDD, + tdd UsableABSInformationTDD, + ... +} + +UsableABSInformationFDD ::= SEQUENCE { + usable-abs-pattern-info BIT STRING (SIZE(40)), + iE-Extensions ProtocolExtensionContainer { {UsableABSInformationFDD-ExtIEs} } OPTIONAL, + ... +} + +UsableABSInformationFDD-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +UsableABSInformationTDD ::= SEQUENCE { + usaable-abs-pattern-info BIT STRING (SIZE(1..70, ...)), + iE-Extensions ProtocolExtensionContainer { {UsableABSInformationTDD-ExtIEs} } OPTIONAL, + ... +} + +UsableABSInformationTDD-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + + +UserPlaneTrafficActivityReport ::= ENUMERATED {inactive, re-activated, ...} + +-- V + +V2XServicesAuthorized ::= SEQUENCE { + vehicleUE VehicleUE OPTIONAL, +pedestrianUE PedestrianUE OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {V2XServicesAuthorized-ExtIEs} } OPTIONAL, + ... +} + +V2XServicesAuthorized-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +VehicleUE ::= ENUMERATED { + authorized, + not-authorized, + ... +} + +PedestrianUE ::= ENUMERATED { + authorized, + not-authorized, + ... +} + +-- W + +WidebandCQI ::= SEQUENCE { + widebandCQICodeword0 INTEGER (0..15, ...), + widebandCQICodeword1 WidebandCQICodeword1 OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {WidebandCQI-ExtIEs} } OPTIONAL, + ... +} + +WidebandCQI-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +WidebandCQICodeword1::= CHOICE { + four-bitCQI INTEGER (0..15, ...), + three-bitSpatialDifferentialCQI INTEGER (0..7, ...), + ... +} + +WLANMeasurementConfiguration ::= SEQUENCE { + wlanMeasConfig WLANMeasConfig, + wlanMeasConfigNameList WLANMeasConfigNameList OPTIONAL, + wlan-rssi ENUMERATED {true, ...} OPTIONAL, + wlan-rtt ENUMERATED {true, ...} OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {WLANMeasurementConfiguration-ExtIEs} } OPTIONAL, + ... +} + +WLANMeasurementConfiguration-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} + +WLANMeasConfigNameList ::= SEQUENCE (SIZE(1..maxnoofWLANName)) OF WLANName + +WLANMeasConfig::= ENUMERATED {setup,...} + +WLANName ::= OCTET STRING (SIZE (1..32)) + +WTID ::= CHOICE { + wTID-Type1 WTID-Type1, + wTID-Type2 WTID-Long-Type2, + ... +} + +WTID-Type1 ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + shortWTID BIT STRING (SIZE(24)), + ... +} + +WTID-Long-Type2 ::= BIT STRING (SIZE(48)) + +WT-UE-XwAP-ID ::= OCTET STRING (SIZE (3)) + +-- X + +X2BenefitValue ::= INTEGER (1..8, ...) + +-- Y +-- Z + +END + + +-- ************************************************************** +-- +-- Common definitions +-- +-- ************************************************************** + +X2AP-CommonDataTypes { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +eps-Access (21) modules (3) x2ap (2) version1 (1) x2ap-CommonDataTypes (3) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- Extension constants +-- +-- ************************************************************** + +maxPrivateIEs INTEGER ::= 65535 +maxProtocolExtensions INTEGER ::= 65535 +maxProtocolIEs INTEGER ::= 65535 + +-- ************************************************************** +-- +-- Common Data Types +-- +-- ************************************************************** + +Criticality ::= ENUMERATED { reject, ignore, notify } + +Presence ::= ENUMERATED { optional, conditional, mandatory } + +PrivateIE-ID ::= CHOICE { + local INTEGER (0.. maxPrivateIEs), + global OBJECT IDENTIFIER +} + +ProcedureCode ::= INTEGER (0..255) + + +ProtocolIE-ID ::= INTEGER (0..maxProtocolIEs) + + +TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessful-outcome} + +END + + +-- ************************************************************** +-- +-- Constant definitions +-- +-- ************************************************************** + +X2AP-Constants { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +eps-Access (21) modules (3) x2ap (2) version1 (1) x2ap-Constants (4) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + ProcedureCode, + ProtocolIE-ID +FROM X2AP-CommonDataTypes; + +-- ************************************************************** +-- +-- Elementary Procedures +-- +-- ************************************************************** + +id-handoverPreparation ProcedureCode ::= 0 +id-handoverCancel ProcedureCode ::= 1 +id-loadIndication ProcedureCode ::= 2 +id-errorIndication ProcedureCode ::= 3 +id-snStatusTransfer ProcedureCode ::= 4 +id-uEContextRelease ProcedureCode ::= 5 +id-x2Setup ProcedureCode ::= 6 +id-reset ProcedureCode ::= 7 +id-eNBConfigurationUpdate ProcedureCode ::= 8 +id-resourceStatusReportingInitiation ProcedureCode ::= 9 +id-resourceStatusReporting ProcedureCode ::= 10 +id-privateMessage ProcedureCode ::= 11 +id-mobilitySettingsChange ProcedureCode ::= 12 +id-rLFIndication ProcedureCode ::= 13 +id-handoverReport ProcedureCode ::= 14 +id-cellActivation ProcedureCode ::= 15 +id-x2Release ProcedureCode ::= 16 +id-x2APMessageTransfer ProcedureCode ::= 17 +id-x2Removal ProcedureCode ::= 18 +id-seNBAdditionPreparation ProcedureCode ::= 19 +id-seNBReconfigurationCompletion ProcedureCode ::= 20 +id-meNBinitiatedSeNBModificationPreparation ProcedureCode ::= 21 +id-seNBinitiatedSeNBModification ProcedureCode ::= 22 +id-meNBinitiatedSeNBRelease ProcedureCode ::= 23 +id-seNBinitiatedSeNBRelease ProcedureCode ::= 24 +id-seNBCounterCheck ProcedureCode ::= 25 +id-retrieveUEContext ProcedureCode ::= 26 +id-sgNBAdditionPreparation ProcedureCode ::= 27 +id-sgNBReconfigurationCompletion ProcedureCode ::= 28 +id-meNBinitiatedSgNBModificationPreparation ProcedureCode ::= 29 +id-sgNBinitiatedSgNBModification ProcedureCode ::= 30 +id-meNBinitiatedSgNBRelease ProcedureCode ::= 31 +id-sgNBinitiatedSgNBRelease ProcedureCode ::= 32 +id-sgNBCounterCheck ProcedureCode ::= 33 +id-sgNBChange ProcedureCode ::= 34 +id-rRCTransfer ProcedureCode ::= 35 +id-endcX2Setup ProcedureCode ::= 36 +id-endcConfigurationUpdate ProcedureCode ::= 37 +id-secondaryRATDataUsageReport ProcedureCode ::= 38 +id-endcCellActivation ProcedureCode ::= 39 +id-endcPartialReset ProcedureCode ::= 40 +id-eUTRANRCellResourceCoordination ProcedureCode ::= 41 +id-SgNBActivityNotification ProcedureCode ::= 42 +id-endcX2Removal ProcedureCode ::= 43 +id-dataForwardingAddressIndication ProcedureCode ::= 44 + +-- ************************************************************** +-- +-- Lists +-- +-- ************************************************************** + +maxEARFCN INTEGER ::= 65535 +maxEARFCNPlusOne INTEGER ::= 65536 +newmaxEARFCN INTEGER ::= 262143 +maxInterfaces INTEGER ::= 16 +maxCellineNB INTEGER ::= 256 +maxnoofBands INTEGER ::= 16 +maxnoofBearers INTEGER ::= 256 +maxNrOfErrors INTEGER ::= 256 +maxnoofPDCP-SN INTEGER ::= 16 +maxnoofEPLMNs INTEGER ::= 15 +maxnoofEPLMNsPlusOne INTEGER ::= 16 +maxnoofForbLACs INTEGER ::= 4096 +maxnoofForbTACs INTEGER ::= 4096 +maxnoofBPLMNs INTEGER ::= 6 +maxnoofNeighbours INTEGER ::= 512 +maxnoofPRBs INTEGER ::= 110 +maxPools INTEGER ::= 16 +maxnoofCells INTEGER ::= 16 +maxnoofMBSFN INTEGER ::= 8 +maxFailedMeasObjects INTEGER ::= 32 +maxnoofCellIDforMDT INTEGER ::= 32 +maxnoofTAforMDT INTEGER ::= 8 +maxnoofMBMSServiceAreaIdentities INTEGER ::= 256 +maxnoofMDTPLMNs INTEGER ::= 16 +maxnoofCoMPHypothesisSet INTEGER ::= 256 +maxnoofCoMPCells INTEGER ::= 32 +maxUEReport INTEGER ::= 128 +maxCellReport INTEGER ::= 9 +maxnoofPA INTEGER ::= 3 +maxCSIProcess INTEGER ::= 4 +maxCSIReport INTEGER ::= 2 +maxSubband INTEGER ::= 14 +maxofNRNeighbours INTEGER ::= 1024 +maxCellinengNB INTEGER ::= 16384 +-- maxnoofNRCarriers INTEGER ::= 32 +maxnooftimeperiods INTEGER ::= 2 +maxnoofCellIDforQMC INTEGER ::= 32 +maxnoofTAforQMC INTEGER ::= 8 +maxnoofPLMNforQMC INTEGER ::= 16 +maxUEsinengNBDU INTEGER ::= 8192 +maxnoofProtectedResourcePatterns INTEGER ::= 16 +maxnoNRcellsSpectrumSharingWithE-UTRA INTEGER ::= 64 +maxnoofNrCellBands INTEGER ::= 32 +maxnoofBluetoothName INTEGER ::= 4 +maxnoofWLANName INTEGER ::= 4 + +-- ************************************************************** +-- +-- IEs +-- +-- ************************************************************** + +id-E-RABs-Admitted-Item ProtocolIE-ID ::= 0 +id-E-RABs-Admitted-List ProtocolIE-ID ::= 1 +id-E-RAB-Item ProtocolIE-ID ::= 2 +id-E-RABs-NotAdmitted-List ProtocolIE-ID ::= 3 +id-E-RABs-ToBeSetup-Item ProtocolIE-ID ::= 4 +id-Cause ProtocolIE-ID ::= 5 +id-CellInformation ProtocolIE-ID ::= 6 +id-CellInformation-Item ProtocolIE-ID ::= 7 +id-New-eNB-UE-X2AP-ID ProtocolIE-ID ::= 9 +id-Old-eNB-UE-X2AP-ID ProtocolIE-ID ::= 10 +id-TargetCell-ID ProtocolIE-ID ::= 11 +id-TargeteNBtoSource-eNBTransparentContainer ProtocolIE-ID ::= 12 +id-TraceActivation ProtocolIE-ID ::= 13 +id-UE-ContextInformation ProtocolIE-ID ::= 14 +id-UE-HistoryInformation ProtocolIE-ID ::= 15 +id-UE-X2AP-ID ProtocolIE-ID ::= 16 +id-CriticalityDiagnostics ProtocolIE-ID ::= 17 +id-E-RABs-SubjectToStatusTransfer-List ProtocolIE-ID ::= 18 +id-E-RABs-SubjectToStatusTransfer-Item ProtocolIE-ID ::= 19 +id-ServedCells ProtocolIE-ID ::= 20 +id-GlobalENB-ID ProtocolIE-ID ::= 21 +id-TimeToWait ProtocolIE-ID ::= 22 +id-GUMMEI-ID ProtocolIE-ID ::= 23 +id-GUGroupIDList ProtocolIE-ID ::= 24 +id-ServedCellsToAdd ProtocolIE-ID ::= 25 +id-ServedCellsToModify ProtocolIE-ID ::= 26 +id-ServedCellsToDelete ProtocolIE-ID ::= 27 +id-Registration-Request ProtocolIE-ID ::= 28 +id-CellToReport ProtocolIE-ID ::= 29 +id-ReportingPeriodicity ProtocolIE-ID ::= 30 +id-CellToReport-Item ProtocolIE-ID ::= 31 +id-CellMeasurementResult ProtocolIE-ID ::= 32 +id-CellMeasurementResult-Item ProtocolIE-ID ::= 33 +id-GUGroupIDToAddList ProtocolIE-ID ::= 34 +id-GUGroupIDToDeleteList ProtocolIE-ID ::= 35 +id-SRVCCOperationPossible ProtocolIE-ID ::= 36 +id-Measurement-ID ProtocolIE-ID ::= 37 +id-ReportCharacteristics ProtocolIE-ID ::= 38 +id-ENB1-Measurement-ID ProtocolIE-ID ::= 39 +id-ENB2-Measurement-ID ProtocolIE-ID ::= 40 +id-Number-of-Antennaports ProtocolIE-ID ::= 41 +id-CompositeAvailableCapacityGroup ProtocolIE-ID ::= 42 +id-ENB1-Cell-ID ProtocolIE-ID ::= 43 +id-ENB2-Cell-ID ProtocolIE-ID ::= 44 +id-ENB2-Proposed-Mobility-Parameters ProtocolIE-ID ::= 45 +id-ENB1-Mobility-Parameters ProtocolIE-ID ::= 46 +id-ENB2-Mobility-Parameters-Modification-Range ProtocolIE-ID ::= 47 +id-FailureCellPCI ProtocolIE-ID ::= 48 +id-Re-establishmentCellECGI ProtocolIE-ID ::= 49 +id-FailureCellCRNTI ProtocolIE-ID ::= 50 +id-ShortMAC-I ProtocolIE-ID ::= 51 +id-SourceCellECGI ProtocolIE-ID ::= 52 +id-FailureCellECGI ProtocolIE-ID ::= 53 +id-HandoverReportType ProtocolIE-ID ::= 54 +id-PRACH-Configuration ProtocolIE-ID ::= 55 +id-MBSFN-Subframe-Info ProtocolIE-ID ::= 56 +id-ServedCellsToActivate ProtocolIE-ID ::= 57 +id-ActivatedCellList ProtocolIE-ID ::= 58 +id-DeactivationIndication ProtocolIE-ID ::= 59 +id-UE-RLF-Report-Container ProtocolIE-ID ::= 60 +id-ABSInformation ProtocolIE-ID ::= 61 +id-InvokeIndication ProtocolIE-ID ::= 62 +id-ABS-Status ProtocolIE-ID ::= 63 +id-PartialSuccessIndicator ProtocolIE-ID ::= 64 +id-MeasurementInitiationResult-List ProtocolIE-ID ::= 65 +id-MeasurementInitiationResult-Item ProtocolIE-ID ::= 66 +id-MeasurementFailureCause-Item ProtocolIE-ID ::= 67 +id-CompleteFailureCauseInformation-List ProtocolIE-ID ::= 68 +id-CompleteFailureCauseInformation-Item ProtocolIE-ID ::= 69 +id-CSG-Id ProtocolIE-ID ::= 70 +id-CSGMembershipStatus ProtocolIE-ID ::= 71 +id-MDTConfiguration ProtocolIE-ID ::= 72 +id-ManagementBasedMDTallowed ProtocolIE-ID ::= 74 +id-RRCConnSetupIndicator ProtocolIE-ID ::= 75 +id-NeighbourTAC ProtocolIE-ID ::= 76 +id-Time-UE-StayedInCell-EnhancedGranularity ProtocolIE-ID ::= 77 +id-RRCConnReestabIndicator ProtocolIE-ID ::= 78 +id-MBMS-Service-Area-List ProtocolIE-ID ::= 79 +id-HO-cause ProtocolIE-ID ::= 80 +id-TargetCellInUTRAN ProtocolIE-ID ::= 81 +id-MobilityInformation ProtocolIE-ID ::= 82 +id-SourceCellCRNTI ProtocolIE-ID ::= 83 +id-MultibandInfoList ProtocolIE-ID ::= 84 +id-M3Configuration ProtocolIE-ID ::= 85 +id-M4Configuration ProtocolIE-ID ::= 86 +id-M5Configuration ProtocolIE-ID ::= 87 +id-MDT-Location-Info ProtocolIE-ID ::= 88 +id-ManagementBasedMDTPLMNList ProtocolIE-ID ::= 89 +id-SignallingBasedMDTPLMNList ProtocolIE-ID ::= 90 +id-ReceiveStatusOfULPDCPSDUsExtended ProtocolIE-ID ::= 91 +id-ULCOUNTValueExtended ProtocolIE-ID ::= 92 +id-DLCOUNTValueExtended ProtocolIE-ID ::= 93 +id-eARFCNExtension ProtocolIE-ID ::= 94 +id-UL-EARFCNExtension ProtocolIE-ID ::= 95 +id-DL-EARFCNExtension ProtocolIE-ID ::= 96 +id-AdditionalSpecialSubframe-Info ProtocolIE-ID ::= 97 +id-Masked-IMEISV ProtocolIE-ID ::= 98 +id-IntendedULDLConfiguration ProtocolIE-ID ::= 99 +id-ExtendedULInterferenceOverloadInfo ProtocolIE-ID ::= 100 +id-RNL-Header ProtocolIE-ID ::= 101 +id-x2APMessage ProtocolIE-ID ::= 102 +id-ProSeAuthorized ProtocolIE-ID ::= 103 +id-ExpectedUEBehaviour ProtocolIE-ID ::= 104 +id-UE-HistoryInformationFromTheUE ProtocolIE-ID ::= 105 +id-DynamicDLTransmissionInformation ProtocolIE-ID ::= 106 +id-UE-RLF-Report-Container-for-extended-bands ProtocolIE-ID ::= 107 +id-CoMPInformation ProtocolIE-ID ::= 108 +id-ReportingPeriodicityRSRPMR ProtocolIE-ID ::= 109 +id-RSRPMRList ProtocolIE-ID ::= 110 +id-MeNB-UE-X2AP-ID ProtocolIE-ID ::= 111 +id-SeNB-UE-X2AP-ID ProtocolIE-ID ::= 112 +id-UE-SecurityCapabilities ProtocolIE-ID ::= 113 +id-SeNBSecurityKey ProtocolIE-ID ::= 114 +id-SeNBUEAggregateMaximumBitRate ProtocolIE-ID ::= 115 +id-ServingPLMN ProtocolIE-ID ::= 116 +id-E-RABs-ToBeAdded-List ProtocolIE-ID ::= 117 +id-E-RABs-ToBeAdded-Item ProtocolIE-ID ::= 118 +id-MeNBtoSeNBContainer ProtocolIE-ID ::= 119 +id-E-RABs-Admitted-ToBeAdded-List ProtocolIE-ID ::= 120 +id-E-RABs-Admitted-ToBeAdded-Item ProtocolIE-ID ::= 121 +id-SeNBtoMeNBContainer ProtocolIE-ID ::= 122 +id-ResponseInformationSeNBReconfComp ProtocolIE-ID ::= 123 +id-UE-ContextInformationSeNBModReq ProtocolIE-ID ::= 124 +id-E-RABs-ToBeAdded-ModReqItem ProtocolIE-ID ::= 125 +id-E-RABs-ToBeModified-ModReqItem ProtocolIE-ID ::= 126 +id-E-RABs-ToBeReleased-ModReqItem ProtocolIE-ID ::= 127 +id-E-RABs-Admitted-ToBeAdded-ModAckList ProtocolIE-ID ::= 128 +id-E-RABs-Admitted-ToBeModified-ModAckList ProtocolIE-ID ::= 129 +id-E-RABs-Admitted-ToBeReleased-ModAckList ProtocolIE-ID ::= 130 +id-E-RABs-Admitted-ToBeAdded-ModAckItem ProtocolIE-ID ::= 131 +id-E-RABs-Admitted-ToBeModified-ModAckItem ProtocolIE-ID ::= 132 +id-E-RABs-Admitted-ToBeReleased-ModAckItem ProtocolIE-ID ::= 133 +id-E-RABs-ToBeReleased-ModReqd ProtocolIE-ID ::= 134 +id-E-RABs-ToBeReleased-ModReqdItem ProtocolIE-ID ::= 135 +id-SCGChangeIndication ProtocolIE-ID ::= 136 +id-E-RABs-ToBeReleased-List-RelReq ProtocolIE-ID ::= 137 +id-E-RABs-ToBeReleased-RelReqItem ProtocolIE-ID ::= 138 +id-E-RABs-ToBeReleased-List-RelConf ProtocolIE-ID ::= 139 +id-E-RABs-ToBeReleased-RelConfItem ProtocolIE-ID ::= 140 +id-E-RABs-SubjectToCounterCheck-List ProtocolIE-ID ::= 141 +id-E-RABs-SubjectToCounterCheckItem ProtocolIE-ID ::= 142 +id-CoverageModificationList ProtocolIE-ID ::= 143 +id-ReportingPeriodicityCSIR ProtocolIE-ID ::= 145 +id-CSIReportList ProtocolIE-ID ::= 146 +id-UEID ProtocolIE-ID ::= 147 +id-enhancedRNTP ProtocolIE-ID ::= 148 +id-ProSeUEtoNetworkRelaying ProtocolIE-ID ::= 149 +id-ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 ProtocolIE-ID ::= 150 +id-ULCOUNTValuePDCP-SNlength18 ProtocolIE-ID ::= 151 +id-DLCOUNTValuePDCP-SNlength18 ProtocolIE-ID ::= 152 +id-UE-ContextReferenceAtSeNB ProtocolIE-ID ::= 153 +id-UE-ContextKeptIndicator ProtocolIE-ID ::= 154 +id-New-eNB-UE-X2AP-ID-Extension ProtocolIE-ID ::= 155 +id-Old-eNB-UE-X2AP-ID-Extension ProtocolIE-ID ::= 156 +id-MeNB-UE-X2AP-ID-Extension ProtocolIE-ID ::= 157 +id-SeNB-UE-X2AP-ID-Extension ProtocolIE-ID ::= 158 +id-LHN-ID ProtocolIE-ID ::= 159 +id-FreqBandIndicatorPriority ProtocolIE-ID ::= 160 +id-M6Configuration ProtocolIE-ID ::= 161 +id-M7Configuration ProtocolIE-ID ::= 162 +id-Tunnel-Information-for-BBF ProtocolIE-ID ::= 163 +id-SIPTO-BearerDeactivationIndication ProtocolIE-ID ::= 164 +id-GW-TransportLayerAddress ProtocolIE-ID ::= 165 +id-Correlation-ID ProtocolIE-ID ::= 166 +id-SIPTO-Correlation-ID ProtocolIE-ID ::= 167 +id-SIPTO-L-GW-TransportLayerAddress ProtocolIE-ID ::= 168 +id-X2RemovalThreshold ProtocolIE-ID ::= 169 +id-CellReportingIndicator ProtocolIE-ID ::= 170 +id-BearerType ProtocolIE-ID ::= 171 +id-resumeID ProtocolIE-ID ::= 172 +id-UE-ContextInformationRetrieve ProtocolIE-ID ::= 173 +id-E-RABs-ToBeSetupRetrieve-Item ProtocolIE-ID ::= 174 +id-NewEUTRANCellIdentifier ProtocolIE-ID ::= 175 +id-V2XServicesAuthorized ProtocolIE-ID ::= 176 +id-OffsetOfNbiotChannelNumberToDL-EARFCN ProtocolIE-ID ::= 177 +id-OffsetOfNbiotChannelNumberToUL-EARFCN ProtocolIE-ID ::= 178 +id-AdditionalSpecialSubframeExtension-Info ProtocolIE-ID ::= 179 +id-BandwidthReducedSI ProtocolIE-ID ::= 180 +id-MakeBeforeBreakIndicator ProtocolIE-ID ::= 181 +id-UE-ContextReferenceAtWT ProtocolIE-ID ::= 182 +id-WT-UE-ContextKeptIndicator ProtocolIE-ID ::= 183 +id-UESidelinkAggregateMaximumBitRate ProtocolIE-ID ::= 184 +id-uL-GTPtunnelEndpoint ProtocolIE-ID ::= 185 +id-DL-scheduling-PDCCH-CCE-usage ProtocolIE-ID ::= 193 +id-UL-scheduling-PDCCH-CCE-usage ProtocolIE-ID ::= 194 +id-UEAppLayerMeasConfig ProtocolIE-ID ::= 195 +id-extended-e-RAB-MaximumBitrateDL ProtocolIE-ID ::= 196 +id-extended-e-RAB-MaximumBitrateUL ProtocolIE-ID ::= 197 +id-extended-e-RAB-GuaranteedBitrateDL ProtocolIE-ID ::= 198 +id-extended-e-RAB-GuaranteedBitrateUL ProtocolIE-ID ::= 199 +id-extended-uEaggregateMaximumBitRateDownlink ProtocolIE-ID ::= 200 +id-extended-uEaggregateMaximumBitRateUplink ProtocolIE-ID ::= 201 +id-NRrestrictioninEPSasSecondaryRAT ProtocolIE-ID ::= 202 +id-SgNBSecurityKey ProtocolIE-ID ::= 203 +id-SgNBUEAggregateMaximumBitRate ProtocolIE-ID ::= 204 +id-E-RABs-ToBeAdded-SgNBAddReqList ProtocolIE-ID ::= 205 +id-MeNBtoSgNBContainer ProtocolIE-ID ::= 206 +id-SgNB-UE-X2AP-ID ProtocolIE-ID ::= 207 +id-RequestedSplitSRBs ProtocolIE-ID ::= 208 +id-E-RABs-ToBeAdded-SgNBAddReq-Item ProtocolIE-ID ::= 209 +id-E-RABs-Admitted-ToBeAdded-SgNBAddReqAckList ProtocolIE-ID ::= 210 +id-SgNBtoMeNBContainer ProtocolIE-ID ::= 211 +id-AdmittedSplitSRBs ProtocolIE-ID ::= 212 +id-E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item ProtocolIE-ID ::= 213 +id-ResponseInformationSgNBReconfComp ProtocolIE-ID ::= 214 +id-UE-ContextInformation-SgNBModReq ProtocolIE-ID ::= 215 +id-E-RABs-ToBeAdded-SgNBModReq-Item ProtocolIE-ID ::= 216 +id-E-RABs-ToBeModified-SgNBModReq-Item ProtocolIE-ID ::= 217 +id-E-RABs-ToBeReleased-SgNBModReq-Item ProtocolIE-ID ::= 218 +id-E-RABs-Admitted-ToBeAdded-SgNBModAckList ProtocolIE-ID ::= 219 +id-E-RABs-Admitted-ToBeModified-SgNBModAckList ProtocolIE-ID ::= 220 +id-E-RABs-Admitted-ToBeReleased-SgNBModAckList ProtocolIE-ID ::= 221 +id-E-RABs-Admitted-ToBeAdded-SgNBModAck-Item ProtocolIE-ID ::= 222 +id-E-RABs-Admitted-ToBeModified-SgNBModAck-Item ProtocolIE-ID ::= 223 +id-E-RABs-Admitted-ToBeReleased-SgNBModAck-Item ProtocolIE-ID ::= 224 +id-E-RABs-ToBeReleased-SgNBModReqdList ProtocolIE-ID ::= 225 +id-E-RABs-ToBeModified-SgNBModReqdList ProtocolIE-ID ::= 226 +id-E-RABs-ToBeReleased-SgNBModReqd-Item ProtocolIE-ID ::= 227 +id-E-RABs-ToBeModified-SgNBModReqd-Item ProtocolIE-ID ::= 228 +id-E-RABs-ToBeReleased-SgNBChaConfList ProtocolIE-ID ::= 229 +id-E-RABs-ToBeReleased-SgNBChaConf-Item ProtocolIE-ID ::= 230 +id-E-RABs-ToBeReleased-SgNBRelReqList ProtocolIE-ID ::= 231 +id-E-RABs-ToBeReleased-SgNBRelReq-Item ProtocolIE-ID ::= 232 +id-E-RABs-ToBeReleased-SgNBRelConfList ProtocolIE-ID ::= 233 +id-E-RABs-ToBeReleased-SgNBRelConf-Item ProtocolIE-ID ::= 234 +id-E-RABs-SubjectToSgNBCounterCheck-List ProtocolIE-ID ::= 235 +id-E-RABs-SubjectToSgNBCounterCheck-Item ProtocolIE-ID ::= 236 +id-RRCContainer ProtocolIE-ID ::= 237 +id-SRBType ProtocolIE-ID ::= 238 +id-Target-SgNB-ID ProtocolIE-ID ::= 239 +id-HandoverRestrictionList ProtocolIE-ID ::= 240 +id-SCGConfigurationQuery ProtocolIE-ID ::= 241 +id-SplitSRB ProtocolIE-ID ::= 242 +id-UENRMeasurement ProtocolIE-ID ::= 243 +id-InitiatingNodeType-EndcX2Setup ProtocolIE-ID ::= 244 +id-InitiatingNodeType-EndcConfigUpdate ProtocolIE-ID ::= 245 +id-RespondingNodeType-EndcX2Setup ProtocolIE-ID ::= 246 +id-RespondingNodeType-EndcConfigUpdate ProtocolIE-ID ::= 247 +id-NRUESecurityCapabilities ProtocolIE-ID ::= 248 +id-PDCPChangeIndication ProtocolIE-ID ::= 249 +id-ServedEUTRAcellsENDCX2ManagementList ProtocolIE-ID ::= 250 +id-CellAssistanceInformation ProtocolIE-ID ::= 251 +id-Globalen-gNB-ID ProtocolIE-ID ::= 252 +id-ServedNRcellsENDCX2ManagementList ProtocolIE-ID ::= 253 +id-UE-ContextReferenceAtSgNB ProtocolIE-ID ::= 254 +id-SecondaryRATUsageReport ProtocolIE-ID ::= 255 +id-ActivationID ProtocolIE-ID ::= 256 +id-MeNBResourceCoordinationInformation ProtocolIE-ID ::= 257 +id-SgNBResourceCoordinationInformation ProtocolIE-ID ::= 258 +id-ServedEUTRAcellsToModifyListENDCConfUpd ProtocolIE-ID ::= 259 +id-ServedEUTRAcellsToDeleteListENDCConfUpd ProtocolIE-ID ::= 260 +id-ServedNRcellsToModifyListENDCConfUpd ProtocolIE-ID ::= 261 +id-ServedNRcellsToDeleteListENDCConfUpd ProtocolIE-ID ::= 262 +id-E-RABUsageReport-Item ProtocolIE-ID ::= 263 +id-Old-SgNB-UE-X2AP-ID ProtocolIE-ID ::= 264 +id-SecondaryRATUsageReportList ProtocolIE-ID ::= 265 +id-SecondaryRATUsageReport-Item ProtocolIE-ID ::= 266 +id-ServedNRCellsToActivate ProtocolIE-ID ::= 267 +id-ActivatedNRCellList ProtocolIE-ID ::= 268 +id-SelectedPLMN ProtocolIE-ID ::= 269 +id-UEs-ToBeReset ProtocolIE-ID ::= 270 +id-UEs-Admitted-ToBeReset ProtocolIE-ID ::= 271 +id-RRCConfigIndication ProtocolIE-ID ::= 272 +id-DownlinkPacketLossRate ProtocolIE-ID ::= 273 +id-UplinkPacketLossRate ProtocolIE-ID ::= 274 +id-SubscriberProfileIDforRFP ProtocolIE-ID ::= 275 +id-serviceType ProtocolIE-ID ::= 276 +id-AerialUEsubscriptionInformation ProtocolIE-ID ::= 277 +id-SGNB-Addition-Trigger-Ind ProtocolIE-ID ::= 278 +id-MeNBCell-ID ProtocolIE-ID ::= 279 +id-RequestedSplitSRBsrelease ProtocolIE-ID ::= 280 +id-AdmittedSplitSRBsrelease ProtocolIE-ID ::= 281 +id-NRS-NSSS-PowerOffset ProtocolIE-ID ::= 282 +id-NSSS-NumOccasionDifferentPrecoder ProtocolIE-ID ::= 283 +id-ProtectedEUTRAResourceIndication ProtocolIE-ID ::= 284 +id-InitiatingNodeType-EutranrCellResourceCoordination ProtocolIE-ID ::= 285 +id-RespondingNodeType-EutranrCellResourceCoordination ProtocolIE-ID ::= 286 +id-DataTrafficResourceIndication ProtocolIE-ID ::= 287 +id-SpectrumSharingGroupID ProtocolIE-ID ::= 288 +id-ListofEUTRACellsinEUTRACoordinationReq ProtocolIE-ID ::= 289 +id-ListofEUTRACellsinEUTRACoordinationResp ProtocolIE-ID ::= 290 +id-ListofEUTRACellsinNRCoordinationReq ProtocolIE-ID ::= 291 +id-ListofNRCellsinNRCoordinationReq ProtocolIE-ID ::= 292 +id-ListofNRCellsinNRCoordinationResp ProtocolIE-ID ::= 293 +id-E-RABs-AdmittedToBeModified-SgNBModConfList ProtocolIE-ID ::= 294 +id-E-RABs-AdmittedToBeModified-SgNBModConf-Item ProtocolIE-ID ::= 295 +id-UEContextLevelUserPlaneActivity ProtocolIE-ID ::= 296 +id-ERABActivityNotifyItemList ProtocolIE-ID ::= 297 +id-InitiatingNodeType-EndcX2Removal ProtocolIE-ID ::= 298 +id-RespondingNodeType-EndcX2Removal ProtocolIE-ID ::= 299 +id-RLC-Status ProtocolIE-ID ::= 300 +id-CNTypeRestrictions ProtocolIE-ID ::= 301 +id-pDCPSnLength ProtocolIE-ID ::= 302 +id-BluetoothMeasurementConfiguration ProtocolIE-ID ::= 303 +id-WLANMeasurementConfiguration ProtocolIE-ID ::= 304 +id-NRrestrictionin5GS ProtocolIE-ID ::= 305 +id-dL-Forwarding ProtocolIE-ID ::= 306 +id-E-RABs-DataForwardingAddress-List ProtocolIE-ID ::= 307 +id-E-RABs-DataForwardingAddress-Item ProtocolIE-ID ::= 308 +id-Subscription-Based-UE-DifferentiationInfo ProtocolIE-ID ::= 309 + +END + + +-- ************************************************************** +-- +-- Container definitions +-- +-- ************************************************************** + +X2AP-Containers { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +eps-Access (21) modules (3) x2ap (2) version1 (1) x2ap-Containers (5) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + maxPrivateIEs, + maxProtocolExtensions, + maxProtocolIEs, + Criticality, + Presence, + PrivateIE-ID, + ProtocolIE-ID +FROM X2AP-CommonDataTypes; + +-- ************************************************************** +-- +-- Class Definition for Protocol IEs +-- +-- ************************************************************** + +X2AP-PROTOCOL-IES ::= CLASS { + &id ProtocolIE-ID UNIQUE, + &criticality Criticality, + &Value, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + TYPE &Value + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Class Definition for Protocol IEs +-- +-- ************************************************************** + +X2AP-PROTOCOL-IES-PAIR ::= CLASS { + &id ProtocolIE-ID UNIQUE, + &firstCriticality Criticality, + &FirstValue, + &secondCriticality Criticality, + &SecondValue, + &presence Presence +} +WITH SYNTAX { + ID &id + FIRST CRITICALITY &firstCriticality + FIRST TYPE &FirstValue + SECOND CRITICALITY &secondCriticality + SECOND TYPE &SecondValue + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Class Definition for Protocol Extensions +-- +-- ************************************************************** + +X2AP-PROTOCOL-EXTENSION ::= CLASS { + &id ProtocolIE-ID UNIQUE, + &criticality Criticality, + &Extension, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + EXTENSION &Extension + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Class Definition for Private IEs +-- +-- ************************************************************** + +X2AP-PRIVATE-IES ::= CLASS { + &id PrivateIE-ID, + &criticality Criticality, + &Value, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + TYPE &Value + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Container for Protocol IEs +-- +-- ************************************************************** + +ProtocolIE-Container {X2AP-PROTOCOL-IES : IEsSetParam} ::= + SEQUENCE (SIZE (0..maxProtocolIEs)) OF + ProtocolIE-Field {{IEsSetParam}} + +ProtocolIE-Single-Container {X2AP-PROTOCOL-IES : IEsSetParam} ::= + ProtocolIE-Field {{IEsSetParam}} + +ProtocolIE-Field {X2AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE { + id X2AP-PROTOCOL-IES.&id ({IEsSetParam}), + criticality X2AP-PROTOCOL-IES.&criticality ({IEsSetParam}{@id}), + value X2AP-PROTOCOL-IES.&Value ({IEsSetParam}{@id}) +} + +-- ************************************************************** +-- +-- Container for Protocol IE Pairs +-- +-- ************************************************************** + +ProtocolIE-ContainerPair {X2AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= + SEQUENCE (SIZE (0..maxProtocolIEs)) OF + ProtocolIE-FieldPair {{IEsSetParam}} + +ProtocolIE-FieldPair {X2AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= SEQUENCE { + id X2AP-PROTOCOL-IES-PAIR.&id ({IEsSetParam}), + firstCriticality X2AP-PROTOCOL-IES-PAIR.&firstCriticality ({IEsSetParam}{@id}), + firstValue X2AP-PROTOCOL-IES-PAIR.&FirstValue ({IEsSetParam}{@id}), + secondCriticality X2AP-PROTOCOL-IES-PAIR.&secondCriticality ({IEsSetParam}{@id}), + secondValue X2AP-PROTOCOL-IES-PAIR.&SecondValue ({IEsSetParam}{@id}) +} + +-- ************************************************************** +-- +-- Container Lists for Protocol IE Containers +-- +-- ************************************************************** + +ProtocolIE-ContainerList {INTEGER : lowerBound, INTEGER : upperBound, X2AP-PROTOCOL-IES : IEsSetParam} ::= + SEQUENCE (SIZE (lowerBound..upperBound)) OF + ProtocolIE-Container {{IEsSetParam}} + +ProtocolIE-ContainerPairList {INTEGER : lowerBound, INTEGER : upperBound, X2AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= + SEQUENCE (SIZE (lowerBound..upperBound)) OF + ProtocolIE-ContainerPair {{IEsSetParam}} + +-- ************************************************************** +-- +-- Container for Protocol Extensions +-- +-- ************************************************************** + +ProtocolExtensionContainer {X2AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= + SEQUENCE (SIZE (1..maxProtocolExtensions)) OF + ProtocolExtensionField {{ExtensionSetParam}} + +ProtocolExtensionField {X2AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= SEQUENCE { + id X2AP-PROTOCOL-EXTENSION.&id ({ExtensionSetParam}), + criticality X2AP-PROTOCOL-EXTENSION.&criticality ({ExtensionSetParam}{@id}), + extensionValue X2AP-PROTOCOL-EXTENSION.&Extension ({ExtensionSetParam}{@id}) +} + +-- ************************************************************** +-- +-- Container for Private IEs +-- +-- ************************************************************** + +PrivateIE-Container {X2AP-PRIVATE-IES : IEsSetParam} ::= + SEQUENCE (SIZE (1..maxPrivateIEs)) OF + PrivateIE-Field {{IEsSetParam}} + +PrivateIE-Field {X2AP-PRIVATE-IES : IEsSetParam} ::= SEQUENCE { + id X2AP-PRIVATE-IES.&id ({IEsSetParam}), + criticality X2AP-PRIVATE-IES.&criticality ({IEsSetParam}{@id}), + value X2AP-PRIVATE-IES.&Value ({IEsSetParam}{@id}) +} + +END diff --git a/openair3/S1AP/MESSAGES/ASN1/R14/s1ap-14.7.0.asn1 b/openair3/S1AP/MESSAGES/ASN1/R14/s1ap-14.7.0.asn1 new file mode 100644 index 0000000000..b8adf58c61 --- /dev/null +++ b/openair3/S1AP/MESSAGES/ASN1/R14/s1ap-14.7.0.asn1 @@ -0,0 +1,6998 @@ +-- ************************************************************** +-- +-- Elementary Procedure definitions +-- +-- ************************************************************** + +S1AP-PDU-Descriptions { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-PDU-Descriptions (0)} + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + Criticality, + ProcedureCode +FROM S1AP-CommonDataTypes + + CellTrafficTrace, + DeactivateTrace, + DownlinkUEAssociatedLPPaTransport, + DownlinkNASTransport, + DownlinkNonUEAssociatedLPPaTransport, + DownlinkS1cdma2000tunnelling, + ENBDirectInformationTransfer, + ENBStatusTransfer, + ENBConfigurationUpdate, + ENBConfigurationUpdateAcknowledge, + ENBConfigurationUpdateFailure, + ErrorIndication, + HandoverCancel, + HandoverCancelAcknowledge, + HandoverCommand, + HandoverFailure, + HandoverNotify, + HandoverPreparationFailure, + HandoverRequest, + HandoverRequestAcknowledge, + HandoverRequired, + InitialContextSetupFailure, + InitialContextSetupRequest, + InitialContextSetupResponse, + InitialUEMessage, + KillRequest, + KillResponse, + LocationReportingControl, + LocationReportingFailureIndication, + LocationReport, + MMEConfigurationUpdate, + MMEConfigurationUpdateAcknowledge, + MMEConfigurationUpdateFailure, + MMEDirectInformationTransfer, + MMEStatusTransfer, + NASNonDeliveryIndication, + OverloadStart, + OverloadStop, + Paging, + PathSwitchRequest, + PathSwitchRequestAcknowledge, + PathSwitchRequestFailure, + PrivateMessage, + Reset, + ResetAcknowledge, + S1SetupFailure, + S1SetupRequest, + S1SetupResponse, + E-RABModifyRequest, + E-RABModifyResponse, + E-RABModificationIndication, + E-RABModificationConfirm, + E-RABReleaseCommand, + E-RABReleaseResponse, + E-RABReleaseIndication, + E-RABSetupRequest, + E-RABSetupResponse, + TraceFailureIndication, + TraceStart, + UECapabilityInfoIndication, + UEContextModificationFailure, + UEContextModificationRequest, + UEContextModificationResponse, + UEContextReleaseCommand, + UEContextReleaseComplete, + UEContextReleaseRequest, + UERadioCapabilityMatchRequest, + UERadioCapabilityMatchResponse, + UplinkUEAssociatedLPPaTransport, + UplinkNASTransport, + UplinkNonUEAssociatedLPPaTransport, + UplinkS1cdma2000tunnelling, + WriteReplaceWarningRequest, + WriteReplaceWarningResponse, + ENBConfigurationTransfer, + MMEConfigurationTransfer, + PWSRestartIndication, + UEContextModificationIndication, + UEContextModificationConfirm, + RerouteNASRequest, + PWSFailureIndication, + UEContextSuspendRequest, + UEContextSuspendResponse, + UEContextResumeRequest, + UEContextResumeResponse, + UEContextResumeFailure, + ConnectionEstablishmentIndication, + NASDeliveryIndication, + RetrieveUEInformation, + UEInformationTransfer, + ENBCPRelocationIndication, + MMECPRelocationIndication + + +FROM S1AP-PDU-Contents + + id-CellTrafficTrace, + id-DeactivateTrace, + id-downlinkUEAssociatedLPPaTransport, + id-downlinkNASTransport, + id-downlinkNonUEAssociatedLPPaTransport, + id-DownlinkS1cdma2000tunnelling, + id-eNBStatusTransfer, + id-ErrorIndication, + id-HandoverCancel, + id-HandoverNotification, + id-HandoverPreparation, + id-HandoverResourceAllocation, + id-InitialContextSetup, + id-initialUEMessage, + id-ENBConfigurationUpdate, + id-Kill, + id-LocationReportingControl, + id-LocationReportingFailureIndication, + id-LocationReport, + id-eNBDirectInformationTransfer, + id-MMEConfigurationUpdate, + id-MMEDirectInformationTransfer, + id-MMEStatusTransfer, + id-NASNonDeliveryIndication, + id-OverloadStart, + id-OverloadStop, + id-Paging, + id-PathSwitchRequest, + id-PrivateMessage, + id-Reset, + id-S1Setup, + id-E-RABModify, + id-E-RABModificationIndication, + id-E-RABRelease, + id-E-RABReleaseIndication, + id-E-RABSetup, + id-TraceFailureIndication, + id-TraceStart, + id-UECapabilityInfoIndication, + id-UEContextModification, + id-UEContextRelease, + id-UEContextReleaseRequest, + id-UERadioCapabilityMatch, + id-uplinkUEAssociatedLPPaTransport, + id-uplinkNASTransport, + id-uplinkNonUEAssociatedLPPaTransport, + id-UplinkS1cdma2000tunnelling, + id-WriteReplaceWarning, + id-eNBConfigurationTransfer, + id-MMEConfigurationTransfer, + id-PWSRestartIndication, + id-UEContextModificationIndication, + id-RerouteNASRequest, + id-PWSFailureIndication, + id-UEContextSuspend, + id-UEContextResume, + id-ConnectionEstablishmentIndication, + id-NASDeliveryIndication, + id-RetrieveUEInformation, + id-UEInformationTransfer, + id-eNBCPRelocationIndication, + id-MMECPRelocationIndication + + +FROM S1AP-Constants; + + +-- ************************************************************** +-- +-- Interface Elementary Procedure Class +-- +-- ************************************************************** + +S1AP-ELEMENTARY-PROCEDURE ::= CLASS { + &InitiatingMessage , + &SuccessfulOutcome OPTIONAL, + &UnsuccessfulOutcome OPTIONAL, + &procedureCode ProcedureCode UNIQUE, + &criticality Criticality DEFAULT ignore +} +WITH SYNTAX { + INITIATING MESSAGE &InitiatingMessage + [SUCCESSFUL OUTCOME &SuccessfulOutcome] + [UNSUCCESSFUL OUTCOME &UnsuccessfulOutcome] + PROCEDURE CODE &procedureCode + [CRITICALITY &criticality] +} + +-- ************************************************************** +-- +-- Interface PDU Definition +-- +-- ************************************************************** + +S1AP-PDU ::= CHOICE { + initiatingMessage InitiatingMessage, + successfulOutcome SuccessfulOutcome, + unsuccessfulOutcome UnsuccessfulOutcome, + ... +} + +InitiatingMessage ::= SEQUENCE { + procedureCode S1AP-ELEMENTARY-PROCEDURE.&procedureCode ({S1AP-ELEMENTARY-PROCEDURES}), + criticality S1AP-ELEMENTARY-PROCEDURE.&criticality ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value S1AP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +SuccessfulOutcome ::= SEQUENCE { + procedureCode S1AP-ELEMENTARY-PROCEDURE.&procedureCode ({S1AP-ELEMENTARY-PROCEDURES}), + criticality S1AP-ELEMENTARY-PROCEDURE.&criticality ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value S1AP-ELEMENTARY-PROCEDURE.&SuccessfulOutcome ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +UnsuccessfulOutcome ::= SEQUENCE { + procedureCode S1AP-ELEMENTARY-PROCEDURE.&procedureCode ({S1AP-ELEMENTARY-PROCEDURES}), + criticality S1AP-ELEMENTARY-PROCEDURE.&criticality ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value S1AP-ELEMENTARY-PROCEDURE.&UnsuccessfulOutcome ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +-- ************************************************************** +-- +-- Interface Elementary Procedure List +-- +-- ************************************************************** + +S1AP-ELEMENTARY-PROCEDURES S1AP-ELEMENTARY-PROCEDURE ::= { + S1AP-ELEMENTARY-PROCEDURES-CLASS-1 | + S1AP-ELEMENTARY-PROCEDURES-CLASS-2, + ... +} + + +S1AP-ELEMENTARY-PROCEDURES-CLASS-1 S1AP-ELEMENTARY-PROCEDURE ::= { + handoverPreparation | + handoverResourceAllocation | + pathSwitchRequest | + e-RABSetup | + e-RABModify | + e-RABRelease | + initialContextSetup | + handoverCancel | + kill | + reset | + s1Setup | + uEContextModification | + uEContextRelease | + eNBConfigurationUpdate | + mMEConfigurationUpdate | + writeReplaceWarning , + ..., + uERadioCapabilityMatch | + e-RABModificationIndication | + uEContextModificationIndication | + uEContextSuspend | + uEContextResume +} + +S1AP-ELEMENTARY-PROCEDURES-CLASS-2 S1AP-ELEMENTARY-PROCEDURE ::= { + handoverNotification | + e-RABReleaseIndication | + paging | + downlinkNASTransport | + initialUEMessage | + uplinkNASTransport | + errorIndication | + nASNonDeliveryIndication | + uEContextReleaseRequest | + downlinkS1cdma2000tunnelling | + uplinkS1cdma2000tunnelling | + uECapabilityInfoIndication | + eNBStatusTransfer | + mMEStatusTransfer | + deactivateTrace | + traceStart | + traceFailureIndication | + cellTrafficTrace | + locationReportingControl | + locationReportingFailureIndication | + locationReport | + overloadStart | + overloadStop | + eNBDirectInformationTransfer | + mMEDirectInformationTransfer | + eNBConfigurationTransfer | + mMEConfigurationTransfer | + privateMessage , + ..., + downlinkUEAssociatedLPPaTransport | + uplinkUEAssociatedLPPaTransport | + downlinkNonUEAssociatedLPPaTransport | + uplinkNonUEAssociatedLPPaTransport | + pWSRestartIndication | + rerouteNASRequest | + pWSFailureIndication | + connectionEstablishmentIndication | + nASDeliveryIndication | + retrieveUEInformation | + uEInformationTransfer | + eNBCPRelocationIndication | + mMECPRelocationIndication +} + +-- ************************************************************** +-- +-- Interface Elementary Procedures +-- +-- ************************************************************** + +handoverPreparation S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE HandoverRequired + SUCCESSFUL OUTCOME HandoverCommand + UNSUCCESSFUL OUTCOME HandoverPreparationFailure + PROCEDURE CODE id-HandoverPreparation + CRITICALITY reject +} + +handoverResourceAllocation S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE HandoverRequest + SUCCESSFUL OUTCOME HandoverRequestAcknowledge + UNSUCCESSFUL OUTCOME HandoverFailure + PROCEDURE CODE id-HandoverResourceAllocation + CRITICALITY reject +} + +handoverNotification S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE HandoverNotify + PROCEDURE CODE id-HandoverNotification + CRITICALITY ignore +} + +pathSwitchRequest S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PathSwitchRequest + SUCCESSFUL OUTCOME PathSwitchRequestAcknowledge + UNSUCCESSFUL OUTCOME PathSwitchRequestFailure + PROCEDURE CODE id-PathSwitchRequest + CRITICALITY reject +} + +e-RABSetup S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E-RABSetupRequest + SUCCESSFUL OUTCOME E-RABSetupResponse + PROCEDURE CODE id-E-RABSetup + CRITICALITY reject +} + +e-RABModify S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E-RABModifyRequest + SUCCESSFUL OUTCOME E-RABModifyResponse + PROCEDURE CODE id-E-RABModify + CRITICALITY reject +} + +e-RABRelease S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E-RABReleaseCommand + SUCCESSFUL OUTCOME E-RABReleaseResponse + PROCEDURE CODE id-E-RABRelease + CRITICALITY reject +} + +e-RABReleaseIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E-RABReleaseIndication + PROCEDURE CODE id-E-RABReleaseIndication + CRITICALITY ignore +} + +initialContextSetup S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE InitialContextSetupRequest + SUCCESSFUL OUTCOME InitialContextSetupResponse + UNSUCCESSFUL OUTCOME InitialContextSetupFailure + PROCEDURE CODE id-InitialContextSetup + CRITICALITY reject +} + +uEContextReleaseRequest S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextReleaseRequest + PROCEDURE CODE id-UEContextReleaseRequest + CRITICALITY ignore +} + +paging S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE Paging + PROCEDURE CODE id-Paging + CRITICALITY ignore +} + +downlinkNASTransport S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE DownlinkNASTransport + PROCEDURE CODE id-downlinkNASTransport + CRITICALITY ignore +} + +initialUEMessage S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE InitialUEMessage + PROCEDURE CODE id-initialUEMessage + CRITICALITY ignore +} + +uplinkNASTransport S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UplinkNASTransport + PROCEDURE CODE id-uplinkNASTransport + CRITICALITY ignore +} +nASNonDeliveryIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE NASNonDeliveryIndication + PROCEDURE CODE id-NASNonDeliveryIndication + CRITICALITY ignore +} + +handoverCancel S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE HandoverCancel + SUCCESSFUL OUTCOME HandoverCancelAcknowledge + PROCEDURE CODE id-HandoverCancel + CRITICALITY reject +} + +reset S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE Reset + SUCCESSFUL OUTCOME ResetAcknowledge + PROCEDURE CODE id-Reset + CRITICALITY reject +} + +errorIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ErrorIndication + PROCEDURE CODE id-ErrorIndication + CRITICALITY ignore +} + +s1Setup S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE S1SetupRequest + SUCCESSFUL OUTCOME S1SetupResponse + UNSUCCESSFUL OUTCOME S1SetupFailure + PROCEDURE CODE id-S1Setup + CRITICALITY reject +} + +eNBConfigurationUpdate S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ENBConfigurationUpdate + SUCCESSFUL OUTCOME ENBConfigurationUpdateAcknowledge + UNSUCCESSFUL OUTCOME ENBConfigurationUpdateFailure + PROCEDURE CODE id-ENBConfigurationUpdate + CRITICALITY reject +} + +mMEConfigurationUpdate S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE MMEConfigurationUpdate + SUCCESSFUL OUTCOME MMEConfigurationUpdateAcknowledge + UNSUCCESSFUL OUTCOME MMEConfigurationUpdateFailure + PROCEDURE CODE id-MMEConfigurationUpdate + CRITICALITY reject +} + +downlinkS1cdma2000tunnelling S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE DownlinkS1cdma2000tunnelling + PROCEDURE CODE id-DownlinkS1cdma2000tunnelling + CRITICALITY ignore +} + +uplinkS1cdma2000tunnelling S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UplinkS1cdma2000tunnelling + PROCEDURE CODE id-UplinkS1cdma2000tunnelling + CRITICALITY ignore +} + +uEContextModification S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextModificationRequest + SUCCESSFUL OUTCOME UEContextModificationResponse + UNSUCCESSFUL OUTCOME UEContextModificationFailure + PROCEDURE CODE id-UEContextModification + CRITICALITY reject +} + +uECapabilityInfoIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UECapabilityInfoIndication + PROCEDURE CODE id-UECapabilityInfoIndication + CRITICALITY ignore +} + +uEContextRelease S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextReleaseCommand + SUCCESSFUL OUTCOME UEContextReleaseComplete + PROCEDURE CODE id-UEContextRelease + CRITICALITY reject +} + +eNBStatusTransfer S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ENBStatusTransfer + PROCEDURE CODE id-eNBStatusTransfer + CRITICALITY ignore +} + +mMEStatusTransfer S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE MMEStatusTransfer + PROCEDURE CODE id-MMEStatusTransfer + CRITICALITY ignore +} + +deactivateTrace S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE DeactivateTrace + PROCEDURE CODE id-DeactivateTrace + CRITICALITY ignore +} + +traceStart S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE TraceStart + PROCEDURE CODE id-TraceStart + CRITICALITY ignore +} + +traceFailureIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE TraceFailureIndication + PROCEDURE CODE id-TraceFailureIndication + CRITICALITY ignore +} +cellTrafficTrace S1AP-ELEMENTARY-PROCEDURE ::={ + INITIATING MESSAGE CellTrafficTrace + PROCEDURE CODE id-CellTrafficTrace + CRITICALITY ignore +} + +locationReportingControl S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE LocationReportingControl + PROCEDURE CODE id-LocationReportingControl + CRITICALITY ignore +} + +locationReportingFailureIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE LocationReportingFailureIndication + PROCEDURE CODE id-LocationReportingFailureIndication + CRITICALITY ignore +} + +locationReport S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE LocationReport + PROCEDURE CODE id-LocationReport + CRITICALITY ignore +} + +overloadStart S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE OverloadStart + PROCEDURE CODE id-OverloadStart + CRITICALITY ignore +} + +overloadStop S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE OverloadStop + PROCEDURE CODE id-OverloadStop + CRITICALITY reject +} + +writeReplaceWarning S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE WriteReplaceWarningRequest + SUCCESSFUL OUTCOME WriteReplaceWarningResponse + PROCEDURE CODE id-WriteReplaceWarning + CRITICALITY reject +} + +eNBDirectInformationTransfer S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ENBDirectInformationTransfer + PROCEDURE CODE id-eNBDirectInformationTransfer + CRITICALITY ignore +} + +mMEDirectInformationTransfer S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE MMEDirectInformationTransfer + PROCEDURE CODE id-MMEDirectInformationTransfer + CRITICALITY ignore +} + +eNBConfigurationTransfer S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ENBConfigurationTransfer + PROCEDURE CODE id-eNBConfigurationTransfer + CRITICALITY ignore +} + +mMEConfigurationTransfer S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE MMEConfigurationTransfer + PROCEDURE CODE id-MMEConfigurationTransfer + CRITICALITY ignore +} + + +privateMessage S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PrivateMessage + PROCEDURE CODE id-PrivateMessage + CRITICALITY ignore +} + +pWSRestartIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PWSRestartIndication + PROCEDURE CODE id-PWSRestartIndication + CRITICALITY ignore +} + +kill S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE KillRequest + SUCCESSFUL OUTCOME KillResponse + PROCEDURE CODE id-Kill + CRITICALITY reject +} + +downlinkUEAssociatedLPPaTransport S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE DownlinkUEAssociatedLPPaTransport + PROCEDURE CODE id-downlinkUEAssociatedLPPaTransport + CRITICALITY ignore +} + +uplinkUEAssociatedLPPaTransport S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UplinkUEAssociatedLPPaTransport + PROCEDURE CODE id-uplinkUEAssociatedLPPaTransport + CRITICALITY ignore +} +downlinkNonUEAssociatedLPPaTransport S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE DownlinkNonUEAssociatedLPPaTransport + PROCEDURE CODE id-downlinkNonUEAssociatedLPPaTransport + CRITICALITY ignore +} + +uplinkNonUEAssociatedLPPaTransport S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UplinkNonUEAssociatedLPPaTransport + PROCEDURE CODE id-uplinkNonUEAssociatedLPPaTransport + CRITICALITY ignore +} + +uERadioCapabilityMatch S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UERadioCapabilityMatchRequest + SUCCESSFUL OUTCOME UERadioCapabilityMatchResponse + PROCEDURE CODE id-UERadioCapabilityMatch + CRITICALITY reject +} + +e-RABModificationIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E-RABModificationIndication + SUCCESSFUL OUTCOME E-RABModificationConfirm + PROCEDURE CODE id-E-RABModificationIndication + CRITICALITY reject +} + +uEContextModificationIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextModificationIndication + SUCCESSFUL OUTCOME UEContextModificationConfirm + PROCEDURE CODE id-UEContextModificationIndication + CRITICALITY reject +} + +rerouteNASRequest S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE RerouteNASRequest + PROCEDURE CODE id-RerouteNASRequest + CRITICALITY reject +} + +pWSFailureIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PWSFailureIndication + PROCEDURE CODE id-PWSFailureIndication + CRITICALITY ignore +} + +uEContextSuspend S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextSuspendRequest + SUCCESSFUL OUTCOME UEContextSuspendResponse + PROCEDURE CODE id-UEContextSuspend + CRITICALITY reject +} + +uEContextResume S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextResumeRequest + SUCCESSFUL OUTCOME UEContextResumeResponse + UNSUCCESSFUL OUTCOME UEContextResumeFailure + PROCEDURE CODE id-UEContextResume + CRITICALITY reject +} + +connectionEstablishmentIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ConnectionEstablishmentIndication + PROCEDURE CODE id-ConnectionEstablishmentIndication + CRITICALITY reject +} + +nASDeliveryIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE NASDeliveryIndication + PROCEDURE CODE id-NASDeliveryIndication + CRITICALITY ignore +} + +retrieveUEInformation S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE RetrieveUEInformation + PROCEDURE CODE id-RetrieveUEInformation + CRITICALITY reject +} + +uEInformationTransfer S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEInformationTransfer + PROCEDURE CODE id-UEInformationTransfer + CRITICALITY reject +} + +eNBCPRelocationIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ENBCPRelocationIndication + PROCEDURE CODE id-eNBCPRelocationIndication + CRITICALITY reject +} + +mMECPRelocationIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE MMECPRelocationIndication + PROCEDURE CODE id-MMECPRelocationIndication + CRITICALITY reject +} + + +END + + + +-- ************************************************************** +-- +-- PDU definitions for S1AP. +-- +-- ************************************************************** + +S1AP-PDU-Contents { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-PDU-Contents (1) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + + UEAggregateMaximumBitrate, + BearerType, + Cause, + CellAccessMode, + Cdma2000HORequiredIndication, + Cdma2000HOStatus, + Cdma2000OneXSRVCCInfo, + Cdma2000OneXRAND, + Cdma2000PDU, + Cdma2000RATType, + Cdma2000SectorID, + EUTRANRoundTripDelayEstimationInfo, + CNDomain, + ConcurrentWarningMessageIndicator, + CriticalityDiagnostics, + CSFallbackIndicator, + CSG-Id, + CSG-IdList, + CSGMembershipStatus, + Data-Forwarding-Not-Possible, + Direct-Forwarding-Path-Availability, + Global-ENB-ID, + EUTRAN-CGI, + ENBname, + ENB-StatusTransfer-TransparentContainer, + ENB-UE-S1AP-ID, + ExtendedRepetitionPeriod, + GTP-TEID, + GUMMEI, + GUMMEIType, + HandoverRestrictionList, + HandoverType, + Masked-IMEISV, + LAI, + LPPa-PDU, + ManagementBasedMDTAllowed, + MDTPLMNList, + MMEname, + MMERelaySupportIndicator, + MME-UE-S1AP-ID, + MSClassmark2, + MSClassmark3, + NAS-PDU, + NASSecurityParametersfromE-UTRAN, + NASSecurityParameterstoE-UTRAN, + OverloadResponse, + PagingDRX, + PagingPriority, + PLMNidentity, + ProSeAuthorized, + RIMTransfer, + RelativeMMECapacity, + RequestType, + E-RAB-ID, + E-RABLevelQoSParameters, + E-RABList, + RelayNode-Indicator, + Routing-ID, + SecurityKey, + SecurityContext, + ServedGUMMEIs, + SONConfigurationTransfer, + Source-ToTarget-TransparentContainer, + SourceBSS-ToTargetBSS-TransparentContainer, + SourceeNB-ToTargeteNB-TransparentContainer, + SourceRNC-ToTargetRNC-TransparentContainer, + SubscriberProfileIDforRFP, + SRVCCOperationNotPossible, + SRVCCOperationPossible, + SRVCCHOIndication, + SupportedTAs, + TAI, + Target-ToSource-TransparentContainer, + TargetBSS-ToSourceBSS-TransparentContainer, + TargeteNB-ToSourceeNB-TransparentContainer, + TargetID, + TargetRNC-ToSourceRNC-TransparentContainer, + TimeToWait, + TraceActivation, + TrafficLoadReductionIndication, + E-UTRAN-Trace-ID, + TransportLayerAddress, + UEIdentityIndexValue, + UEPagingID, + UERadioCapability, + UERadioCapabilityForPaging, + UE-RetentionInformation, + UE-S1AP-IDs, + UE-associatedLogicalS1-ConnectionItem, + UESecurityCapabilities, + S-TMSI, + MessageIdentifier, + SerialNumber, + WarningAreaList, + RepetitionPeriod, + NumberofBroadcastRequest, + WarningType, + WarningSecurityInfo, + DataCodingScheme, + WarningMessageContents, + BroadcastCompletedAreaList, + RRC-Establishment-Cause, + BroadcastCancelledAreaList, + PS-ServiceNotAvailable, + GUMMEIList, + Correlation-ID, + GWContextReleaseIndication, + PrivacyIndicator, + VoiceSupportMatchIndicator, + TunnelInformation, + KillAllWarningMessages, + TransportInformation, + LHN-ID, + UserLocationInformation, + AdditionalCSFallbackIndicator, + ECGIListForRestart, + TAIListForRestart, + EmergencyAreaIDListForRestart, + ExpectedUEBehaviour, + Paging-eDRXInformation, + Extended-UEIdentityIndexValue, + MME-Group-ID, + Additional-GUTI, + PWSfailedECGIList, + CellIdentifierAndCELevelForCECapableUEs, + AssistanceDataForPaging, + InformationOnRecommendedCellsAndENBsForPaging, + UE-Usage-Type, + UEUserPlaneCIoTSupportIndicator, + NB-IoT-DefaultPagingDRX, + NB-IoT-Paging-eDRXInformation, + CE-mode-B-SupportIndicator, + NB-IoT-UEIdentityIndexValue, + V2XServicesAuthorized, + DCN-ID, + ServedDCNs, + UESidelinkAggregateMaximumBitrate, + DLNASPDUDeliveryAckRequest, + Coverage-Level, + EnhancedCoverageRestricted, + DL-CP-SecurityInformation, + UL-CP-SecurityInformation, + CE-ModeBRestricted, + PendingDataIndication + + + +FROM S1AP-IEs + + PrivateIE-Container{}, + ProtocolExtensionContainer{}, + ProtocolIE-Container{}, + ProtocolIE-ContainerList{}, + ProtocolIE-ContainerPair{}, + ProtocolIE-ContainerPairList{}, + ProtocolIE-SingleContainer{}, + S1AP-PRIVATE-IES, + S1AP-PROTOCOL-EXTENSION, + S1AP-PROTOCOL-IES, + S1AP-PROTOCOL-IES-PAIR +FROM S1AP-Containers + + + id-AssistanceDataForPaging, + id-uEaggregateMaximumBitrate, + id-BearerType, + id-Cause, + id-CellAccessMode, + id-CellIdentifierAndCELevelForCECapableUEs, + id-cdma2000HORequiredIndication, + id-cdma2000HOStatus, + id-cdma2000OneXSRVCCInfo, + id-cdma2000OneXRAND, + id-cdma2000PDU, + id-cdma2000RATType, + id-cdma2000SectorID, + id-EUTRANRoundTripDelayEstimationInfo, + id-CNDomain, + id-ConcurrentWarningMessageIndicator, + id-CriticalityDiagnostics, + id-CSFallbackIndicator, + id-CSG-Id, + id-CSG-IdList, + id-CSGMembershipStatus, + id-Data-Forwarding-Not-Possible, + id-DefaultPagingDRX, + id-Direct-Forwarding-Path-Availability, + id-Global-ENB-ID, + id-EUTRAN-CGI, + id-eNBname, + id-eNB-StatusTransfer-TransparentContainer, + id-eNB-UE-S1AP-ID, + id-GERANtoLTEHOInformationRes, + id-GUMMEI-ID, + id-GUMMEIType, + id-HandoverRestrictionList, + id-HandoverType, + id-Masked-IMEISV, + id-InformationOnRecommendedCellsAndENBsForPaging, + id-InitialContextSetup, + id-Inter-SystemInformationTransferTypeEDT, + id-Inter-SystemInformationTransferTypeMDT, + id-LPPa-PDU, + id-NAS-DownlinkCount, + id-ManagementBasedMDTAllowed, + id-ManagementBasedMDTPLMNList, + id-MMEname, + id-MME-UE-S1AP-ID, + id-MSClassmark2, + id-MSClassmark3, + id-NAS-PDU, + id-NASSecurityParametersfromE-UTRAN, + id-NASSecurityParameterstoE-UTRAN, + id-OverloadResponse, + id-pagingDRX, + id-PagingPriority, + id-RelativeMMECapacity, + id-RequestType, + id-Routing-ID, + id-E-RABAdmittedItem, + id-E-RABAdmittedList, + id-E-RABDataForwardingItem, + id-E-RABFailedToModifyList, + id-E-RABFailedToReleaseList, + id-E-RABFailedtoSetupItemHOReqAck, + id-E-RABFailedToSetupListBearerSURes, + id-E-RABFailedToSetupListCtxtSURes, + id-E-RABFailedToSetupListHOReqAck, + id-E-RABFailedToBeReleasedList, + id-E-RABFailedToResumeListResumeReq, + id-E-RABFailedToResumeItemResumeReq, + id-E-RABFailedToResumeListResumeRes, + id-E-RABFailedToResumeItemResumeRes, + id-E-RABModify, + id-E-RABModifyItemBearerModRes, + id-E-RABModifyListBearerModRes, + id-E-RABRelease, + id-E-RABReleaseItemBearerRelComp, + id-E-RABReleaseItemHOCmd, + id-E-RABReleaseListBearerRelComp, + id-E-RABReleaseIndication, + id-E-RABSetup, + id-E-RABSetupItemBearerSURes, + id-E-RABSetupItemCtxtSURes, + id-E-RABSetupListBearerSURes, + id-E-RABSetupListCtxtSURes, + id-E-RABSubjecttoDataForwardingList, + id-E-RABToBeModifiedItemBearerModReq, + id-E-RABToBeModifiedListBearerModReq, + id-E-RABToBeModifiedListBearerModInd, + id-E-RABToBeModifiedItemBearerModInd, + id-E-RABNotToBeModifiedListBearerModInd, + id-E-RABNotToBeModifiedItemBearerModInd, + id-E-RABModifyListBearerModConf, + id-E-RABModifyItemBearerModConf, + id-E-RABFailedToModifyListBearerModConf, + id-E-RABToBeReleasedListBearerModConf, + id-E-RABToBeReleasedList, + id-E-RABReleasedList, + id-E-RABToBeSetupItemBearerSUReq, + id-E-RABToBeSetupItemCtxtSUReq, + id-E-RABToBeSetupItemHOReq, + id-E-RABToBeSetupListBearerSUReq, + id-E-RABToBeSetupListCtxtSUReq, + id-E-RABToBeSetupListHOReq, + id-E-RABToBeSwitchedDLItem, + id-E-RABToBeSwitchedDLList, + id-E-RABToBeSwitchedULList, + id-E-RABToBeSwitchedULItem, + id-E-RABtoReleaseListHOCmd, + id-ProSeAuthorized, + id-SecurityKey, + id-SecurityContext, + id-ServedGUMMEIs, + id-SONConfigurationTransferECT, + id-SONConfigurationTransferMCT, + id-Source-ToTarget-TransparentContainer, + id-Source-ToTarget-TransparentContainer-Secondary, + id-SourceMME-UE-S1AP-ID, + id-SRVCCOperationNotPossible, + id-SRVCCOperationPossible, + id-SRVCCHOIndication, + id-SubscriberProfileIDforRFP, + id-SupportedTAs, + id-S-TMSI, + id-TAI, + id-TAIItem, + id-TAIList, + id-Target-ToSource-TransparentContainer, + id-Target-ToSource-TransparentContainer-Secondary, + id-TargetID, + id-TimeToWait, + id-TraceActivation, + id-TrafficLoadReductionIndication, + id-E-UTRAN-Trace-ID, + id-UEIdentityIndexValue, + id-UEPagingID, + id-UERadioCapability, + id-UERadioCapabilityForPaging, + id-UTRANtoLTEHOInformationRes, + id-UE-associatedLogicalS1-ConnectionListResAck, + id-UE-associatedLogicalS1-ConnectionItem, + id-UE-RetentionInformation, + id-UESecurityCapabilities, + id-UE-S1AP-IDs, + id-V2XServicesAuthorized, + id-ResetType, + id-MessageIdentifier, + id-SerialNumber, + id-WarningAreaList, + id-RepetitionPeriod, + id-NumberofBroadcastRequest, + id-WarningType, + id-WarningSecurityInfo, + id-DataCodingScheme, + id-WarningMessageContents, + id-BroadcastCompletedAreaList, + id-BroadcastCancelledAreaList, + id-RRC-Establishment-Cause, + id-TraceCollectionEntityIPAddress, + maxnoofTAIs, + maxnoofErrors, + maxnoofE-RABs, + maxnoofIndividualS1ConnectionsToReset, + maxnoofEmergencyAreaID, + maxnoofCellID, + maxnoofTAIforWarning, + maxnoofCellinTAI, + maxnoofCellinEAI, + id-ExtendedRepetitionPeriod, + id-PS-ServiceNotAvailable, + id-RegisteredLAI, + id-GUMMEIList, + id-SourceMME-GUMMEI, + id-MME-UE-S1AP-ID-2, + id-GW-TransportLayerAddress, + id-RelayNode-Indicator, + id-Correlation-ID, + id-MMERelaySupportIndicator, + id-GWContextReleaseIndication, + id-PrivacyIndicator, + id-VoiceSupportMatchIndicator, + id-Tunnel-Information-for-BBF, + id-SIPTO-Correlation-ID, + id-SIPTO-L-GW-TransportLayerAddress, + id-KillAllWarningMessages, + id-TransportInformation, + id-LHN-ID, + id-UserLocationInformation, + id-AdditionalCSFallbackIndicator, + id-ECGIListForRestart, + id-TAIListForRestart, + id-EmergencyAreaIDListForRestart, + id-ExpectedUEBehaviour, + id-Paging-eDRXInformation, + id-extended-UEIdentityIndexValue, + id-CSGMembershipInfo, + id-MME-Group-ID, + id-Additional-GUTI, + id-S1-Message, + id-PWSfailedECGIList, + id-PWSFailureIndication, + id-UE-Usage-Type, + id-UEUserPlaneCIoTSupportIndicator, + id-NB-IoT-DefaultPagingDRX, + id-NB-IoT-Paging-eDRXInformation, + id-CE-mode-B-SupportIndicator, + id-NB-IoT-UEIdentityIndexValue, + id-RRC-Resume-Cause, + id-DCN-ID, + id-ServedDCNs, + id-UESidelinkAggregateMaximumBitrate, + id-DLNASPDUDeliveryAckRequest, + id-Coverage-Level, + id-EnhancedCoverageRestricted, + id-UE-Level-QoS-Parameters, + id-DL-CP-SecurityInformation, + id-UL-CP-SecurityInformation, + id-CE-ModeBRestricted, + id-PendingDataIndication + + +FROM S1AP-Constants; + +-- ************************************************************** +-- +-- Common Container Lists +-- +-- ************************************************************** + +E-RAB-IE-ContainerList { S1AP-PROTOCOL-IES : IEsSetParam } ::= ProtocolIE-ContainerList { 1, maxnoofE-RABs, {IEsSetParam} } +E-RAB-IE-ContainerPairList { S1AP-PROTOCOL-IES-PAIR : IEsSetParam } ::= ProtocolIE-ContainerPairList { 1, maxnoofE-RABs, {IEsSetParam} } +ProtocolError-IE-ContainerList { S1AP-PROTOCOL-IES : IEsSetParam } ::= ProtocolIE-ContainerList { 1, maxnoofE-RABs, {IEsSetParam} } + +-- ************************************************************** +-- +-- HANDOVER PREPARATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Handover Required +-- +-- ************************************************************** + +HandoverRequired ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { HandoverRequiredIEs} }, + ... +} + +HandoverRequiredIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-HandoverType CRITICALITY reject TYPE HandoverType PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-TargetID CRITICALITY reject TYPE TargetID PRESENCE mandatory}| + { ID id-Direct-Forwarding-Path-Availability CRITICALITY ignore TYPE Direct-Forwarding-Path-Availability PRESENCE optional}| + { ID id-SRVCCHOIndication CRITICALITY reject TYPE SRVCCHOIndication PRESENCE optional}| + { ID id-Source-ToTarget-TransparentContainer CRITICALITY reject TYPE Source-ToTarget-TransparentContainer PRESENCE mandatory}| + { ID id-Source-ToTarget-TransparentContainer-Secondary CRITICALITY reject TYPE Source-ToTarget-TransparentContainer PRESENCE optional}| + { ID id-MSClassmark2 CRITICALITY reject TYPE MSClassmark2 PRESENCE conditional}| + { ID id-MSClassmark3 CRITICALITY ignore TYPE MSClassmark3 PRESENCE conditional}| + { ID id-CSG-Id CRITICALITY reject TYPE CSG-Id PRESENCE optional}| + { ID id-CellAccessMode CRITICALITY reject TYPE CellAccessMode PRESENCE optional}| + { ID id-PS-ServiceNotAvailable CRITICALITY ignore TYPE PS-ServiceNotAvailable PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- Handover Command +-- +-- ************************************************************** + +HandoverCommand ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { HandoverCommandIEs} }, + ... +} + +HandoverCommandIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-HandoverType CRITICALITY reject TYPE HandoverType PRESENCE mandatory}| + { ID id-NASSecurityParametersfromE-UTRAN CRITICALITY reject TYPE NASSecurityParametersfromE-UTRAN PRESENCE conditional + -- This IE shall be present if HandoverType IE is set to value "LTEtoUTRAN" or "LTEtoGERAN" --}| + { ID id-E-RABSubjecttoDataForwardingList CRITICALITY ignore TYPE E-RABSubjecttoDataForwardingList PRESENCE optional}| + { ID id-E-RABtoReleaseListHOCmd CRITICALITY ignore TYPE E-RABList PRESENCE optional}| + { ID id-Target-ToSource-TransparentContainer CRITICALITY reject TYPE Target-ToSource-TransparentContainer PRESENCE mandatory}| + { ID id-Target-ToSource-TransparentContainer-Secondary CRITICALITY reject TYPE Target-ToSource-TransparentContainer PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + +E-RABSubjecttoDataForwardingList ::= E-RAB-IE-ContainerList { {E-RABDataForwardingItemIEs} } + +E-RABDataForwardingItemIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABDataForwardingItem CRITICALITY ignore TYPE E-RABDataForwardingItem PRESENCE mandatory }, + ... +} + +E-RABDataForwardingItem ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + dL-transportLayerAddress TransportLayerAddress OPTIONAL, + dL-gTP-TEID GTP-TEID OPTIONAL, + uL-TransportLayerAddress TransportLayerAddress OPTIONAL, + uL-GTP-TEID GTP-TEID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { E-RABDataForwardingItem-ExtIEs} } OPTIONAL, + ... +} + +E-RABDataForwardingItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + + +-- ************************************************************** +-- +-- Handover Preparation Failure +-- +-- ************************************************************** + +HandoverPreparationFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { HandoverPreparationFailureIEs} }, + ... +} + +HandoverPreparationFailureIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- HANDOVER RESOURCE ALLOCATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Handover Request +-- +-- ************************************************************** + +HandoverRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {HandoverRequestIEs} }, + ... +} + +HandoverRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-HandoverType CRITICALITY reject TYPE HandoverType PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE mandatory}| + { ID id-E-RABToBeSetupListHOReq CRITICALITY reject TYPE E-RABToBeSetupListHOReq PRESENCE mandatory}| + { ID id-Source-ToTarget-TransparentContainer CRITICALITY reject TYPE Source-ToTarget-TransparentContainer PRESENCE mandatory}| + { ID id-UESecurityCapabilities CRITICALITY reject TYPE UESecurityCapabilities PRESENCE mandatory}| + { ID id-HandoverRestrictionList CRITICALITY ignore TYPE HandoverRestrictionList PRESENCE optional}| + { ID id-TraceActivation CRITICALITY ignore TYPE TraceActivation PRESENCE optional}| + { ID id-RequestType CRITICALITY ignore TYPE RequestType PRESENCE optional}| + { ID id-SRVCCOperationPossible CRITICALITY ignore TYPE SRVCCOperationPossible PRESENCE optional}| + { ID id-SecurityContext CRITICALITY reject TYPE SecurityContext PRESENCE mandatory}| + { ID id-NASSecurityParameterstoE-UTRAN CRITICALITY reject TYPE NASSecurityParameterstoE-UTRAN PRESENCE conditional + -- This IE shall be present if the Handover Type IE is set to the value "UTRANtoLTE" or "GERANtoLTE" -- }| + { ID id-CSG-Id CRITICALITY reject TYPE CSG-Id PRESENCE optional}| + { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| + { ID id-GUMMEI-ID CRITICALITY ignore TYPE GUMMEI PRESENCE optional}| + { ID id-MME-UE-S1AP-ID-2 CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE optional}| + { ID id-ManagementBasedMDTAllowed CRITICALITY ignore TYPE ManagementBasedMDTAllowed PRESENCE optional}| + { ID id-ManagementBasedMDTPLMNList CRITICALITY ignore TYPE MDTPLMNList PRESENCE optional}| + { ID id-Masked-IMEISV CRITICALITY ignore TYPE Masked-IMEISV PRESENCE optional}| + { ID id-ExpectedUEBehaviour CRITICALITY ignore TYPE ExpectedUEBehaviour PRESENCE optional}| + { ID id-ProSeAuthorized CRITICALITY ignore TYPE ProSeAuthorized PRESENCE optional}| + { ID id-UEUserPlaneCIoTSupportIndicator CRITICALITY ignore TYPE UEUserPlaneCIoTSupportIndicator PRESENCE optional}| + { ID id-V2XServicesAuthorized CRITICALITY ignore TYPE V2XServicesAuthorized PRESENCE optional}| + { ID id-UESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE UESidelinkAggregateMaximumBitrate PRESENCE optional}| + { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional}| + { ID id-CE-ModeBRestricted CRITICALITY ignore TYPE CE-ModeBRestricted PRESENCE optional}| + { ID id-PendingDataIndication CRITICALITY ignore TYPE PendingDataIndication PRESENCE optional}, + ... +} + +E-RABToBeSetupListHOReq ::= E-RAB-IE-ContainerList { {E-RABToBeSetupItemHOReqIEs} } + +E-RABToBeSetupItemHOReqIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABToBeSetupItemHOReq CRITICALITY reject TYPE E-RABToBeSetupItemHOReq PRESENCE mandatory }, + ... +} + +E-RABToBeSetupItemHOReq ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + transportLayerAddress TransportLayerAddress, + gTP-TEID GTP-TEID, + e-RABlevelQosParameters E-RABLevelQoSParameters, + iE-Extensions ProtocolExtensionContainer { {E-RABToBeSetupItemHOReq-ExtIEs} } OPTIONAL, + ... +} + +E-RABToBeSetupItemHOReq-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + { ID id-Data-Forwarding-Not-Possible CRITICALITY ignore EXTENSION Data-Forwarding-Not-Possible PRESENCE optional}| + { ID id-BearerType CRITICALITY reject EXTENSION BearerType PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- Handover Request Acknowledge +-- +-- ************************************************************** + +HandoverRequestAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {HandoverRequestAcknowledgeIEs} }, + ... +} + +HandoverRequestAcknowledgeIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-E-RABAdmittedList CRITICALITY ignore TYPE E-RABAdmittedList PRESENCE mandatory}| + { ID id-E-RABFailedToSetupListHOReqAck CRITICALITY ignore TYPE E-RABFailedtoSetupListHOReqAck PRESENCE optional}| + { ID id-Target-ToSource-TransparentContainer CRITICALITY reject TYPE Target-ToSource-TransparentContainer PRESENCE mandatory}| + { ID id-CSG-Id CRITICALITY ignore TYPE CSG-Id PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-CellAccessMode CRITICALITY ignore TYPE CellAccessMode PRESENCE optional}| + { ID id-CE-mode-B-SupportIndicator CRITICALITY ignore TYPE CE-mode-B-SupportIndicator PRESENCE optional}, + ... +} + +E-RABAdmittedList ::= E-RAB-IE-ContainerList { {E-RABAdmittedItemIEs} } + +E-RABAdmittedItemIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABAdmittedItem CRITICALITY ignore TYPE E-RABAdmittedItem PRESENCE mandatory }, + ... +} + +E-RABAdmittedItem ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + transportLayerAddress TransportLayerAddress, + gTP-TEID GTP-TEID, + dL-transportLayerAddress TransportLayerAddress OPTIONAL, + dL-gTP-TEID GTP-TEID OPTIONAL, + uL-TransportLayerAddress TransportLayerAddress OPTIONAL, + uL-GTP-TEID GTP-TEID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABAdmittedItem-ExtIEs} } OPTIONAL, + ... +} + +E-RABAdmittedItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABFailedtoSetupListHOReqAck ::= E-RAB-IE-ContainerList { {E-RABFailedtoSetupItemHOReqAckIEs} } + +E-RABFailedtoSetupItemHOReqAckIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABFailedtoSetupItemHOReqAck CRITICALITY ignore TYPE E-RABFailedToSetupItemHOReqAck PRESENCE mandatory }, + ... +} + +E-RABFailedToSetupItemHOReqAck ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + cause Cause, + iE-Extensions ProtocolExtensionContainer { { E-RABFailedToSetupItemHOReqAckExtIEs} } OPTIONAL, + ... +} + +E-RABFailedToSetupItemHOReqAckExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +-- ************************************************************** +-- +-- Handover Failure +-- +-- ************************************************************** + +HandoverFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { HandoverFailureIEs} }, + ... +} + +HandoverFailureIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- HANDOVER NOTIFICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Handover Notify +-- +-- ************************************************************** + +HandoverNotify ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { HandoverNotifyIEs} }, + ... +} + +HandoverNotifyIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory}| + { ID id-TAI CRITICALITY ignore TYPE TAI PRESENCE mandatory}| +-- Extension for Release 11 to support BBAI -- + { ID id-Tunnel-Information-for-BBF CRITICALITY ignore TYPE TunnelInformation PRESENCE optional}| + { ID id-LHN-ID CRITICALITY ignore TYPE LHN-ID PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- PATH SWITCH REQUEST ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Path Switch Request +-- +-- ************************************************************** + +PathSwitchRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PathSwitchRequestIEs} }, + ... +} + +PathSwitchRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-E-RABToBeSwitchedDLList CRITICALITY reject TYPE E-RABToBeSwitchedDLList PRESENCE mandatory}| + { ID id-SourceMME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory}| + { ID id-TAI CRITICALITY ignore TYPE TAI PRESENCE mandatory}| + { ID id-UESecurityCapabilities CRITICALITY ignore TYPE UESecurityCapabilities PRESENCE mandatory}| + { ID id-CSG-Id CRITICALITY ignore TYPE CSG-Id PRESENCE optional}| + { ID id-CellAccessMode CRITICALITY ignore TYPE CellAccessMode PRESENCE optional}| + { ID id-SourceMME-GUMMEI CRITICALITY ignore TYPE GUMMEI PRESENCE optional}| + { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| +-- Extension for Release 11 to support BBAI -- + { ID id-Tunnel-Information-for-BBF CRITICALITY ignore TYPE TunnelInformation PRESENCE optional}| + { ID id-LHN-ID CRITICALITY ignore TYPE LHN-ID PRESENCE optional}| + { ID id-RRC-Resume-Cause CRITICALITY ignore TYPE RRC-Establishment-Cause PRESENCE optional }, + ... +} + +E-RABToBeSwitchedDLList ::= E-RAB-IE-ContainerList { {E-RABToBeSwitchedDLItemIEs} } + +E-RABToBeSwitchedDLItemIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABToBeSwitchedDLItem CRITICALITY reject TYPE E-RABToBeSwitchedDLItem PRESENCE mandatory }, + ... +} + +E-RABToBeSwitchedDLItem ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + transportLayerAddress TransportLayerAddress, + gTP-TEID GTP-TEID, + iE-Extensions ProtocolExtensionContainer { { E-RABToBeSwitchedDLItem-ExtIEs} } OPTIONAL, + ... +} + +E-RABToBeSwitchedDLItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- Path Switch Request Acknowledge +-- +-- ************************************************************** + +PathSwitchRequestAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PathSwitchRequestAcknowledgeIEs} }, + ... +} + +PathSwitchRequestAcknowledgeIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-uEaggregateMaximumBitrate CRITICALITY ignore TYPE UEAggregateMaximumBitrate PRESENCE optional}| + { ID id-E-RABToBeSwitchedULList CRITICALITY ignore TYPE E-RABToBeSwitchedULList PRESENCE optional}| + { ID id-E-RABToBeReleasedList CRITICALITY ignore TYPE E-RABList PRESENCE optional}| + { ID id-SecurityContext CRITICALITY reject TYPE SecurityContext PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MME-UE-S1AP-ID-2 CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE optional}| + { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| + { ID id-ProSeAuthorized CRITICALITY ignore TYPE ProSeAuthorized PRESENCE optional}| + { ID id-UEUserPlaneCIoTSupportIndicator CRITICALITY ignore TYPE UEUserPlaneCIoTSupportIndicator PRESENCE optional}| + { ID id-V2XServicesAuthorized CRITICALITY ignore TYPE V2XServicesAuthorized PRESENCE optional}| + { ID id-UESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE UESidelinkAggregateMaximumBitrate PRESENCE optional}| + { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional}| + { ID id-CE-ModeBRestricted CRITICALITY ignore TYPE CE-ModeBRestricted PRESENCE optional}| + { ID id-PendingDataIndication CRITICALITY ignore TYPE PendingDataIndication PRESENCE optional}, + ... +} + +E-RABToBeSwitchedULList ::= E-RAB-IE-ContainerList { {E-RABToBeSwitchedULItemIEs} } + +E-RABToBeSwitchedULItemIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABToBeSwitchedULItem CRITICALITY ignore TYPE E-RABToBeSwitchedULItem PRESENCE mandatory }, + ... +} + +E-RABToBeSwitchedULItem ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + transportLayerAddress TransportLayerAddress, + gTP-TEID GTP-TEID, + iE-Extensions ProtocolExtensionContainer { { E-RABToBeSwitchedULItem-ExtIEs} } OPTIONAL, + ... +} + +E-RABToBeSwitchedULItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +-- ************************************************************** +-- +-- Path Switch Request Failure +-- +-- ************************************************************** + +PathSwitchRequestFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PathSwitchRequestFailureIEs} }, + ... +} + +PathSwitchRequestFailureIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- HANDOVER CANCEL ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Handover Cancel +-- +-- ************************************************************** + +HandoverCancel ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { HandoverCancelIEs} }, + ... +} + +HandoverCancelIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- Handover Cancel Request Acknowledge +-- +-- ************************************************************** + +HandoverCancelAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { HandoverCancelAcknowledgeIEs} }, + ... +} + +HandoverCancelAcknowledgeIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- E-RAB SETUP ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- E-RAB Setup Request +-- +-- ************************************************************** + +E-RABSetupRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {E-RABSetupRequestIEs} }, + ... +} + +E-RABSetupRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE optional }| + { ID id-E-RABToBeSetupListBearerSUReq CRITICALITY reject TYPE E-RABToBeSetupListBearerSUReq PRESENCE mandatory }, + ... +} + +E-RABToBeSetupListBearerSUReq ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABToBeSetupItemBearerSUReqIEs} } + +E-RABToBeSetupItemBearerSUReqIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABToBeSetupItemBearerSUReq CRITICALITY reject TYPE E-RABToBeSetupItemBearerSUReq PRESENCE mandatory }, + ... +} + +E-RABToBeSetupItemBearerSUReq ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RABlevelQoSParameters E-RABLevelQoSParameters, + transportLayerAddress TransportLayerAddress, + gTP-TEID GTP-TEID, + nAS-PDU NAS-PDU, + iE-Extensions ProtocolExtensionContainer { {E-RABToBeSetupItemBearerSUReqExtIEs} } OPTIONAL, + ... +} + + +E-RABToBeSetupItemBearerSUReqExtIEs S1AP-PROTOCOL-EXTENSION ::= { + { ID id-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}| + { ID id-SIPTO-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}| + { ID id-BearerType CRITICALITY reject EXTENSION BearerType PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- E-RAB Setup Response +-- +-- ************************************************************** + +E-RABSetupResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {E-RABSetupResponseIEs} }, + ... +} + +E-RABSetupResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-E-RABSetupListBearerSURes CRITICALITY ignore TYPE E-RABSetupListBearerSURes PRESENCE optional }| + { ID id-E-RABFailedToSetupListBearerSURes CRITICALITY ignore TYPE E-RABList PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +E-RABSetupListBearerSURes ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABSetupItemBearerSUResIEs} } + +E-RABSetupItemBearerSUResIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABSetupItemBearerSURes CRITICALITY ignore TYPE E-RABSetupItemBearerSURes PRESENCE mandatory }, + ... +} + +E-RABSetupItemBearerSURes ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + transportLayerAddress TransportLayerAddress, + gTP-TEID GTP-TEID, + iE-Extensions ProtocolExtensionContainer { {E-RABSetupItemBearerSUResExtIEs} } OPTIONAL, + ... +} + + +E-RABSetupItemBearerSUResExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + + +-- ************************************************************** +-- +-- E-RAB MODIFY ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- E-RAB Modify Request +-- +-- ************************************************************** + +E-RABModifyRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {E-RABModifyRequestIEs} }, + ... +} + +E-RABModifyRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE optional }| + { ID id-E-RABToBeModifiedListBearerModReq CRITICALITY reject TYPE E-RABToBeModifiedListBearerModReq PRESENCE mandatory }, + ... +} + +E-RABToBeModifiedListBearerModReq ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABToBeModifiedItemBearerModReqIEs} } + +E-RABToBeModifiedItemBearerModReqIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABToBeModifiedItemBearerModReq CRITICALITY reject TYPE E-RABToBeModifiedItemBearerModReq PRESENCE mandatory }, + ... +} + +E-RABToBeModifiedItemBearerModReq ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RABLevelQoSParameters E-RABLevelQoSParameters, + nAS-PDU NAS-PDU, + iE-Extensions ProtocolExtensionContainer { {E-RABToBeModifyItemBearerModReqExtIEs} } OPTIONAL, + ... +} + + +E-RABToBeModifyItemBearerModReqExtIEs S1AP-PROTOCOL-EXTENSION ::= { + { ID id-TransportInformation CRITICALITY reject EXTENSION TransportInformation PRESENCE optional}, + ... +} + + + +-- ************************************************************** +-- +-- E-RAB Modify Response +-- +-- ************************************************************** + +E-RABModifyResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {E-RABModifyResponseIEs} }, + ... +} + +E-RABModifyResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-E-RABModifyListBearerModRes CRITICALITY ignore TYPE E-RABModifyListBearerModRes PRESENCE optional }| + { ID id-E-RABFailedToModifyList CRITICALITY ignore TYPE E-RABList PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +E-RABModifyListBearerModRes ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABModifyItemBearerModResIEs} } + +E-RABModifyItemBearerModResIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABModifyItemBearerModRes CRITICALITY ignore TYPE E-RABModifyItemBearerModRes PRESENCE mandatory}, + ... +} + +E-RABModifyItemBearerModRes ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + iE-Extensions ProtocolExtensionContainer { {E-RABModifyItemBearerModResExtIEs} } OPTIONAL, + ... +} + + +E-RABModifyItemBearerModResExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + + + +-- ************************************************************** +-- +-- E-RAB RELEASE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- E-RAB Release Command +-- +-- ************************************************************** + +E-RABReleaseCommand ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {E-RABReleaseCommandIEs} }, + ... +} + +E-RABReleaseCommandIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE optional }| + { ID id-E-RABToBeReleasedList CRITICALITY ignore TYPE E-RABList PRESENCE mandatory }| + { ID id-NAS-PDU CRITICALITY ignore TYPE NAS-PDU PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- E-RAB Release Response +-- +-- ************************************************************** + +E-RABReleaseResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { E-RABReleaseResponseIEs } }, + ... +} + +E-RABReleaseResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-E-RABReleaseListBearerRelComp CRITICALITY ignore TYPE E-RABReleaseListBearerRelComp PRESENCE optional }| + { ID id-E-RABFailedToReleaseList CRITICALITY ignore TYPE E-RABList PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| +-- Extension for Release 12 to support User Location Information -- + { ID id-UserLocationInformation CRITICALITY ignore TYPE UserLocationInformation PRESENCE optional }, + ... +} + + +E-RABReleaseListBearerRelComp ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABReleaseItemBearerRelCompIEs} } + +E-RABReleaseItemBearerRelCompIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABReleaseItemBearerRelComp CRITICALITY ignore TYPE E-RABReleaseItemBearerRelComp PRESENCE mandatory }, + ... +} + +E-RABReleaseItemBearerRelComp ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + iE-Extensions ProtocolExtensionContainer { {E-RABReleaseItemBearerRelCompExtIEs} } OPTIONAL, + ... +} + + +E-RABReleaseItemBearerRelCompExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + + +-- ************************************************************** +-- +-- E-RAB RELEASE INDICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- E-RAB Release Indication +-- +-- ************************************************************** + +E-RABReleaseIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {E-RABReleaseIndicationIEs} }, + ... +} + +E-RABReleaseIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-E-RABReleasedList CRITICALITY ignore TYPE E-RABList PRESENCE mandatory }| +-- Extension for Release 12 to support User Location Information -- + { ID id-UserLocationInformation CRITICALITY ignore TYPE UserLocationInformation PRESENCE optional }, + ... +} +-- ************************************************************** +-- +-- INITIAL CONTEXT SETUP ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Initial Context Setup Request +-- +-- ************************************************************** + +InitialContextSetupRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {InitialContextSetupRequestIEs} }, + ... +} + +InitialContextSetupRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE mandatory}| + { ID id-E-RABToBeSetupListCtxtSUReq CRITICALITY reject TYPE E-RABToBeSetupListCtxtSUReq PRESENCE mandatory}| + { ID id-UESecurityCapabilities CRITICALITY reject TYPE UESecurityCapabilities PRESENCE mandatory}| + { ID id-SecurityKey CRITICALITY reject TYPE SecurityKey PRESENCE mandatory}| + { ID id-TraceActivation CRITICALITY ignore TYPE TraceActivation PRESENCE optional}| + { ID id-HandoverRestrictionList CRITICALITY ignore TYPE HandoverRestrictionList PRESENCE optional}| + { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE optional}| + { ID id-SubscriberProfileIDforRFP CRITICALITY ignore TYPE SubscriberProfileIDforRFP PRESENCE optional}| + { ID id-CSFallbackIndicator CRITICALITY reject TYPE CSFallbackIndicator PRESENCE optional}| + { ID id-SRVCCOperationPossible CRITICALITY ignore TYPE SRVCCOperationPossible PRESENCE optional}| + { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| + { ID id-RegisteredLAI CRITICALITY ignore TYPE LAI PRESENCE optional}| + { ID id-GUMMEI-ID CRITICALITY ignore TYPE GUMMEI PRESENCE optional}| + { ID id-MME-UE-S1AP-ID-2 CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE optional}| + { ID id-ManagementBasedMDTAllowed CRITICALITY ignore TYPE ManagementBasedMDTAllowed PRESENCE optional}| + { ID id-ManagementBasedMDTPLMNList CRITICALITY ignore TYPE MDTPLMNList PRESENCE optional}| + { ID id-AdditionalCSFallbackIndicator CRITICALITY ignore TYPE AdditionalCSFallbackIndicator PRESENCE conditional}| + { ID id-Masked-IMEISV CRITICALITY ignore TYPE Masked-IMEISV PRESENCE optional}| + { ID id-ExpectedUEBehaviour CRITICALITY ignore TYPE ExpectedUEBehaviour PRESENCE optional}| + { ID id-ProSeAuthorized CRITICALITY ignore TYPE ProSeAuthorized PRESENCE optional}| + { ID id-UEUserPlaneCIoTSupportIndicator CRITICALITY ignore TYPE UEUserPlaneCIoTSupportIndicator PRESENCE optional}| + { ID id-V2XServicesAuthorized CRITICALITY ignore TYPE V2XServicesAuthorized PRESENCE optional}| + { ID id-UESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE UESidelinkAggregateMaximumBitrate PRESENCE optional}| + { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional}| + { ID id-CE-ModeBRestricted CRITICALITY ignore TYPE CE-ModeBRestricted PRESENCE optional}| + { ID id-PendingDataIndication CRITICALITY ignore TYPE PendingDataIndication PRESENCE optional}, + ... +} + + + + +E-RABToBeSetupListCtxtSUReq ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABToBeSetupItemCtxtSUReqIEs} } + +E-RABToBeSetupItemCtxtSUReqIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABToBeSetupItemCtxtSUReq CRITICALITY reject TYPE E-RABToBeSetupItemCtxtSUReq PRESENCE mandatory }, + ... +} + +E-RABToBeSetupItemCtxtSUReq ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RABlevelQoSParameters E-RABLevelQoSParameters, + transportLayerAddress TransportLayerAddress, + gTP-TEID GTP-TEID, + nAS-PDU NAS-PDU OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABToBeSetupItemCtxtSUReqExtIEs} } OPTIONAL, + ... +} + + +E-RABToBeSetupItemCtxtSUReqExtIEs S1AP-PROTOCOL-EXTENSION ::= { + { ID id-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}| + { ID id-SIPTO-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}| + { ID id-BearerType CRITICALITY reject EXTENSION BearerType PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- Initial Context Setup Response +-- +-- ************************************************************** + +InitialContextSetupResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {InitialContextSetupResponseIEs} }, + ... +} + +InitialContextSetupResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-E-RABSetupListCtxtSURes CRITICALITY ignore TYPE E-RABSetupListCtxtSURes PRESENCE mandatory }| + { ID id-E-RABFailedToSetupListCtxtSURes CRITICALITY ignore TYPE E-RABList PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +E-RABSetupListCtxtSURes ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABSetupItemCtxtSUResIEs} } + +E-RABSetupItemCtxtSUResIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABSetupItemCtxtSURes CRITICALITY ignore TYPE E-RABSetupItemCtxtSURes PRESENCE mandatory }, + ... +} + +E-RABSetupItemCtxtSURes ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + transportLayerAddress TransportLayerAddress, + gTP-TEID GTP-TEID, + iE-Extensions ProtocolExtensionContainer { {E-RABSetupItemCtxtSUResExtIEs} } OPTIONAL, + ... +} + + +E-RABSetupItemCtxtSUResExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +-- ************************************************************** +-- +-- Initial Context Setup Failure +-- +-- ************************************************************** + +InitialContextSetupFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {InitialContextSetupFailureIEs} }, + ... +} + +InitialContextSetupFailureIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- PAGING ELEMENTARY PROCEDURE +-- +-- ************************************************************** + + +-- ************************************************************** +-- +-- Paging +-- +-- ************************************************************** + +Paging ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{PagingIEs}}, + ... +} + +PagingIEs S1AP-PROTOCOL-IES ::= { + { ID id-UEIdentityIndexValue CRITICALITY ignore TYPE UEIdentityIndexValue PRESENCE mandatory}| + { ID id-UEPagingID CRITICALITY ignore TYPE UEPagingID PRESENCE mandatory}| + { ID id-pagingDRX CRITICALITY ignore TYPE PagingDRX PRESENCE optional}| + { ID id-CNDomain CRITICALITY ignore TYPE CNDomain PRESENCE mandatory}| + { ID id-TAIList CRITICALITY ignore TYPE TAIList PRESENCE mandatory}| + { ID id-CSG-IdList CRITICALITY ignore TYPE CSG-IdList PRESENCE optional}| + { ID id-PagingPriority CRITICALITY ignore TYPE PagingPriority PRESENCE optional}| + { ID id-UERadioCapabilityForPaging CRITICALITY ignore TYPE UERadioCapabilityForPaging PRESENCE optional}| +-- Extension for Release 13 to support Paging Optimisation and Coverage Enhancement paging –- + { ID id-AssistanceDataForPaging CRITICALITY ignore TYPE AssistanceDataForPaging PRESENCE optional}| + { ID id-Paging-eDRXInformation CRITICALITY ignore TYPE Paging-eDRXInformation PRESENCE optional}| + { ID id-extended-UEIdentityIndexValue CRITICALITY ignore TYPE Extended-UEIdentityIndexValue PRESENCE optional}| + { ID id-NB-IoT-Paging-eDRXInformation CRITICALITY ignore TYPE NB-IoT-Paging-eDRXInformation PRESENCE optional}| + { ID id-NB-IoT-UEIdentityIndexValue CRITICALITY ignore TYPE NB-IoT-UEIdentityIndexValue PRESENCE optional}| + { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional}| + { ID id-CE-ModeBRestricted CRITICALITY ignore TYPE CE-ModeBRestricted PRESENCE optional}, + ... +} + +TAIList::= SEQUENCE (SIZE(1.. maxnoofTAIs)) OF ProtocolIE-SingleContainer {{TAIItemIEs}} + +TAIItemIEs S1AP-PROTOCOL-IES ::= { + { ID id-TAIItem CRITICALITY ignore TYPE TAIItem PRESENCE mandatory }, + ... +} + +TAIItem ::= SEQUENCE { + tAI TAI, + iE-Extensions ProtocolExtensionContainer { {TAIItemExtIEs} } OPTIONAL, + ... +} + + +TAIItemExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- UE CONTEXT RELEASE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE Context Release Request +-- +-- ************************************************************** + +UEContextReleaseRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{UEContextReleaseRequest-IEs}}, + ... +} + +UEContextReleaseRequest-IEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-GWContextReleaseIndication CRITICALITY reject TYPE GWContextReleaseIndication PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- UE Context Release Command +-- +-- ************************************************************** + +UEContextReleaseCommand ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{UEContextReleaseCommand-IEs}}, + ... +} + +UEContextReleaseCommand-IEs S1AP-PROTOCOL-IES ::= { + { ID id-UE-S1AP-IDs CRITICALITY reject TYPE UE-S1AP-IDs PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- UE Context Release Complete +-- +-- ************************************************************** + +UEContextReleaseComplete ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{UEContextReleaseComplete-IEs}}, + ... +} + +UEContextReleaseComplete-IEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| +-- Extension for Release 12 to support User Location Information -- + { ID id-UserLocationInformation CRITICALITY ignore TYPE UserLocationInformation PRESENCE optional}| +-- Extension for Release 13 to support Paging Optimisation + { ID id-InformationOnRecommendedCellsAndENBsForPaging CRITICALITY ignore TYPE InformationOnRecommendedCellsAndENBsForPaging PRESENCE optional}| +-- Extension for Release 13 to support coverage enhancement paging – + { ID id-CellIdentifierAndCELevelForCECapableUEs CRITICALITY ignore TYPE CellIdentifierAndCELevelForCECapableUEs PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- UE CONTEXT MODIFICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE Context Modification Request +-- +-- ************************************************************** + +UEContextModificationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextModificationRequestIEs} }, + ... +} + +UEContextModificationRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-SecurityKey CRITICALITY reject TYPE SecurityKey PRESENCE optional}| + { ID id-SubscriberProfileIDforRFP CRITICALITY ignore TYPE SubscriberProfileIDforRFP PRESENCE optional}| + { ID id-uEaggregateMaximumBitrate CRITICALITY ignore TYPE UEAggregateMaximumBitrate PRESENCE optional}| + { ID id-CSFallbackIndicator CRITICALITY reject TYPE CSFallbackIndicator PRESENCE optional}| + { ID id-UESecurityCapabilities CRITICALITY reject TYPE UESecurityCapabilities PRESENCE optional}| + { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| + { ID id-RegisteredLAI CRITICALITY ignore TYPE LAI PRESENCE optional}| + { ID id-AdditionalCSFallbackIndicator CRITICALITY ignore TYPE AdditionalCSFallbackIndicator PRESENCE conditional}| + { ID id-ProSeAuthorized CRITICALITY ignore TYPE ProSeAuthorized PRESENCE optional}| + { ID id-SRVCCOperationPossible CRITICALITY ignore TYPE SRVCCOperationPossible PRESENCE optional}| + { ID id-SRVCCOperationNotPossible CRITICALITY ignore TYPE SRVCCOperationNotPossible PRESENCE optional}| + { ID id-V2XServicesAuthorized CRITICALITY ignore TYPE V2XServicesAuthorized PRESENCE optional}| + { ID id-UESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE UESidelinkAggregateMaximumBitrate PRESENCE optional}, + ... +} +-- ************************************************************** +-- +-- UE Context Modification Response +-- +-- ************************************************************** + +UEContextModificationResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextModificationResponseIEs} }, + ... +} + +UEContextModificationResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} +-- ************************************************************** +-- +-- UE Context Modification Failure +-- +-- ************************************************************** + +UEContextModificationFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextModificationFailureIEs} }, + ... +} + +UEContextModificationFailureIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- UE RADIO CAPABILITY MATCH ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE Radio Capability Match Request +-- +-- ************************************************************** + +UERadioCapabilityMatchRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UERadioCapabilityMatchRequestIEs} }, + ... +} + +UERadioCapabilityMatchRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- UE Radio Capability Match Response +-- +-- ************************************************************** + +UERadioCapabilityMatchResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UERadioCapabilityMatchResponseIEs} }, + ... +} + +UERadioCapabilityMatchResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-VoiceSupportMatchIndicator CRITICALITY reject TYPE VoiceSupportMatchIndicator PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- NAS TRANSPORT ELEMENTARY PROCEDURES +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- DOWNLINK NAS TRANSPORT +-- +-- ************************************************************** + +DownlinkNASTransport ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{DownlinkNASTransport-IEs}}, + ... +} + +DownlinkNASTransport-IEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-NAS-PDU CRITICALITY reject TYPE NAS-PDU PRESENCE mandatory}| + { ID id-HandoverRestrictionList CRITICALITY ignore TYPE HandoverRestrictionList PRESENCE optional}| + { ID id-SubscriberProfileIDforRFP CRITICALITY ignore TYPE SubscriberProfileIDforRFP PRESENCE optional}| + { ID id-SRVCCOperationPossible CRITICALITY ignore TYPE SRVCCOperationPossible PRESENCE optional}| + { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE optional}| + { ID id-DLNASPDUDeliveryAckRequest CRITICALITY ignore TYPE DLNASPDUDeliveryAckRequest PRESENCE optional}| + { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional}| + { ID id-CE-ModeBRestricted CRITICALITY ignore TYPE CE-ModeBRestricted PRESENCE optional}| + { ID id-PendingDataIndication CRITICALITY ignore TYPE PendingDataIndication PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- INITIAL UE MESSAGE +-- +-- ************************************************************** + +InitialUEMessage ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{InitialUEMessage-IEs}}, + ... +} + +InitialUEMessage-IEs S1AP-PROTOCOL-IES ::= { + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-NAS-PDU CRITICALITY reject TYPE NAS-PDU PRESENCE mandatory}| + { ID id-TAI CRITICALITY reject TYPE TAI PRESENCE mandatory}| + { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory}| + { ID id-RRC-Establishment-Cause CRITICALITY ignore TYPE RRC-Establishment-Cause PRESENCE mandatory}| + { ID id-S-TMSI CRITICALITY reject TYPE S-TMSI PRESENCE optional}| + { ID id-CSG-Id CRITICALITY reject TYPE CSG-Id PRESENCE optional}| + { ID id-GUMMEI-ID CRITICALITY reject TYPE GUMMEI PRESENCE optional}| + { ID id-CellAccessMode CRITICALITY reject TYPE CellAccessMode PRESENCE optional}| + { ID id-GW-TransportLayerAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE optional}| + { ID id-RelayNode-Indicator CRITICALITY reject TYPE RelayNode-Indicator PRESENCE optional}| + { ID id-GUMMEIType CRITICALITY ignore TYPE GUMMEIType PRESENCE optional}| +-- Extension for Release 11 to support BBAI -- + { ID id-Tunnel-Information-for-BBF CRITICALITY ignore TYPE TunnelInformation PRESENCE optional}| + { ID id-SIPTO-L-GW-TransportLayerAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE optional}| + { ID id-LHN-ID CRITICALITY ignore TYPE LHN-ID PRESENCE optional}| + { ID id-MME-Group-ID CRITICALITY ignore TYPE MME-Group-ID PRESENCE optional}| + { ID id-UE-Usage-Type CRITICALITY ignore TYPE UE-Usage-Type PRESENCE optional}| + { ID id-CE-mode-B-SupportIndicator CRITICALITY ignore TYPE CE-mode-B-SupportIndicator PRESENCE optional}| + { ID id-DCN-ID CRITICALITY ignore TYPE DCN-ID PRESENCE optional}| + { ID id-Coverage-Level CRITICALITY ignore TYPE Coverage-Level PRESENCE optional}, + + ... +} + + +-- ************************************************************** +-- +-- UPLINK NAS TRANSPORT +-- +-- ************************************************************** + +UplinkNASTransport ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{UplinkNASTransport-IEs}}, + ... +} + +UplinkNASTransport-IEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-NAS-PDU CRITICALITY reject TYPE NAS-PDU PRESENCE mandatory}| + { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory}| + { ID id-TAI CRITICALITY ignore TYPE TAI PRESENCE mandatory}| + { ID id-GW-TransportLayerAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE optional}| + { ID id-SIPTO-L-GW-TransportLayerAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE optional}| + { ID id-LHN-ID CRITICALITY ignore TYPE LHN-ID PRESENCE optional}, + ... +} +-- ************************************************************** +-- +-- NAS NON DELIVERY INDICATION +-- +-- ************************************************************** + +NASNonDeliveryIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{NASNonDeliveryIndication-IEs}}, + ... +} + +NASNonDeliveryIndication-IEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-NAS-PDU CRITICALITY ignore TYPE NAS-PDU PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- REROUTE NAS REQUEST +-- +-- ************************************************************** + +RerouteNASRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RerouteNASRequest-IEs}}, + ... +} + +RerouteNASRequest-IEs S1AP-PROTOCOL-IES ::= { + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE optional}| + { ID id-S1-Message CRITICALITY reject TYPE OCTET STRING PRESENCE mandatory}| + { ID id-MME-Group-ID CRITICALITY reject TYPE MME-Group-ID PRESENCE mandatory}| + { ID id-Additional-GUTI CRITICALITY ignore TYPE Additional-GUTI PRESENCE optional}| + { ID id-UE-Usage-Type CRITICALITY ignore TYPE UE-Usage-Type PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- NAS DELIVERY INDICATION +-- +-- ************************************************************** + +NASDeliveryIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { NASDeliveryIndicationIEs} }, + ... +} + +NASDeliveryIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- RESET ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Reset +-- +-- ************************************************************** + +Reset ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ResetIEs} }, + ... +} + +ResetIEs S1AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-ResetType CRITICALITY reject TYPE ResetType PRESENCE mandatory }, + ... +} + +ResetType ::= CHOICE { + s1-Interface ResetAll, + partOfS1-Interface UE-associatedLogicalS1-ConnectionListRes, + ... +} + + + +ResetAll ::= ENUMERATED { + reset-all, + ... +} + +UE-associatedLogicalS1-ConnectionListRes ::= SEQUENCE (SIZE(1.. maxnoofIndividualS1ConnectionsToReset)) OF ProtocolIE-SingleContainer { { UE-associatedLogicalS1-ConnectionItemRes } } + +UE-associatedLogicalS1-ConnectionItemRes S1AP-PROTOCOL-IES ::= { + { ID id-UE-associatedLogicalS1-ConnectionItem CRITICALITY reject TYPE UE-associatedLogicalS1-ConnectionItem PRESENCE mandatory}, + ... +} + + +-- ************************************************************** +-- +-- Reset Acknowledge +-- +-- ************************************************************** + +ResetAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ResetAcknowledgeIEs} }, + ... +} + +ResetAcknowledgeIEs S1AP-PROTOCOL-IES ::= { + { ID id-UE-associatedLogicalS1-ConnectionListResAck CRITICALITY ignore TYPE UE-associatedLogicalS1-ConnectionListResAck PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +UE-associatedLogicalS1-ConnectionListResAck ::= SEQUENCE (SIZE(1.. maxnoofIndividualS1ConnectionsToReset)) OF ProtocolIE-SingleContainer { { UE-associatedLogicalS1-ConnectionItemResAck } } + +UE-associatedLogicalS1-ConnectionItemResAck S1AP-PROTOCOL-IES ::= { + { ID id-UE-associatedLogicalS1-ConnectionItem CRITICALITY ignore TYPE UE-associatedLogicalS1-ConnectionItem PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- ERROR INDICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Error Indication +-- +-- ************************************************************** + +ErrorIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ErrorIndicationIEs}}, + ... +} + +ErrorIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE optional }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE optional }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- S1 SETUP ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- S1 Setup Request +-- +-- ************************************************************** + +S1SetupRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {S1SetupRequestIEs} }, + ... +} + +S1SetupRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-Global-ENB-ID CRITICALITY reject TYPE Global-ENB-ID PRESENCE mandatory}| + { ID id-eNBname CRITICALITY ignore TYPE ENBname PRESENCE optional}| + { ID id-SupportedTAs CRITICALITY reject TYPE SupportedTAs PRESENCE mandatory}| + { ID id-DefaultPagingDRX CRITICALITY ignore TYPE PagingDRX PRESENCE mandatory}| + { ID id-CSG-IdList CRITICALITY reject TYPE CSG-IdList PRESENCE optional}| + { ID id-UE-RetentionInformation CRITICALITY ignore TYPE UE-RetentionInformation PRESENCE optional}| + { ID id-NB-IoT-DefaultPagingDRX CRITICALITY ignore TYPE NB-IoT-DefaultPagingDRX PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- S1 Setup Response +-- +-- ************************************************************** + +S1SetupResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {S1SetupResponseIEs} }, + ... +} + + +S1SetupResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MMEname CRITICALITY ignore TYPE MMEname PRESENCE optional}| + { ID id-ServedGUMMEIs CRITICALITY reject TYPE ServedGUMMEIs PRESENCE mandatory}| + { ID id-RelativeMMECapacity CRITICALITY ignore TYPE RelativeMMECapacity PRESENCE mandatory}| + { ID id-MMERelaySupportIndicator CRITICALITY ignore TYPE MMERelaySupportIndicator PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-UE-RetentionInformation CRITICALITY ignore TYPE UE-RetentionInformation PRESENCE optional}| + { ID id-ServedDCNs CRITICALITY ignore TYPE ServedDCNs PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- S1 Setup Failure +-- +-- ************************************************************** + +S1SetupFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {S1SetupFailureIEs} }, + ... +} + +S1SetupFailureIEs S1AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- ENB CONFIGURATION UPDATE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- eNB Configuration Update +-- +-- ************************************************************** + +ENBConfigurationUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ENBConfigurationUpdateIEs} }, + ... +} + +ENBConfigurationUpdateIEs S1AP-PROTOCOL-IES ::= { + { ID id-eNBname CRITICALITY ignore TYPE ENBname PRESENCE optional}| + { ID id-SupportedTAs CRITICALITY reject TYPE SupportedTAs PRESENCE optional}| + { ID id-CSG-IdList CRITICALITY reject TYPE CSG-IdList PRESENCE optional}| + { ID id-DefaultPagingDRX CRITICALITY ignore TYPE PagingDRX PRESENCE optional}| + { ID id-NB-IoT-DefaultPagingDRX CRITICALITY ignore TYPE NB-IoT-DefaultPagingDRX PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- eNB Configuration Update Acknowledge +-- +-- ************************************************************** + +ENBConfigurationUpdateAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ENBConfigurationUpdateAcknowledgeIEs} }, + ... +} + + +ENBConfigurationUpdateAcknowledgeIEs S1AP-PROTOCOL-IES ::= { + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- eNB Configuration Update Failure +-- +-- ************************************************************** + +ENBConfigurationUpdateFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ENBConfigurationUpdateFailureIEs} }, + ... +} + +ENBConfigurationUpdateFailureIEs S1AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, +... +} + + +-- ************************************************************** +-- +-- MME CONFIGURATION UPDATE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- MME Configuration Update +-- +-- ************************************************************** + +MMEConfigurationUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {MMEConfigurationUpdateIEs} }, + ... +} + +MMEConfigurationUpdateIEs S1AP-PROTOCOL-IES ::= { + { ID id-MMEname CRITICALITY ignore TYPE MMEname PRESENCE optional }| + { ID id-ServedGUMMEIs CRITICALITY reject TYPE ServedGUMMEIs PRESENCE optional }| + { ID id-RelativeMMECapacity CRITICALITY reject TYPE RelativeMMECapacity PRESENCE optional }| + { ID id-ServedDCNs CRITICALITY ignore TYPE ServedDCNs PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- MME Configuration Update Acknowledge +-- +-- ************************************************************** + +MMEConfigurationUpdateAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {MMEConfigurationUpdateAcknowledgeIEs} }, + ... +} + + +MMEConfigurationUpdateAcknowledgeIEs S1AP-PROTOCOL-IES ::= { + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- MME Configuration Update Failure +-- +-- ************************************************************** + +MMEConfigurationUpdateFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {MMEConfigurationUpdateFailureIEs} }, + ... +} + +MMEConfigurationUpdateFailureIEs S1AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- DOWNLINK S1 CDMA2000 TUNNELLING ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Downlink S1 CDMA2000 Tunnelling +-- +-- ************************************************************** + +DownlinkS1cdma2000tunnelling ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {DownlinkS1cdma2000tunnellingIEs} }, + ... +} + +DownlinkS1cdma2000tunnellingIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-E-RABSubjecttoDataForwardingList CRITICALITY ignore TYPE E-RABSubjecttoDataForwardingList PRESENCE optional }| + { ID id-cdma2000HOStatus CRITICALITY ignore TYPE Cdma2000HOStatus PRESENCE optional }| + { ID id-cdma2000RATType CRITICALITY reject TYPE Cdma2000RATType PRESENCE mandatory }| + { ID id-cdma2000PDU CRITICALITY reject TYPE Cdma2000PDU PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- UPLINK S1 CDMA2000 TUNNELLING ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Uplink S1 CDMA2000 Tunnelling +-- +-- ************************************************************** + +UplinkS1cdma2000tunnelling ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {UplinkS1cdma2000tunnellingIEs} }, + ... +} + +UplinkS1cdma2000tunnellingIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-cdma2000RATType CRITICALITY reject TYPE Cdma2000RATType PRESENCE mandatory }| + { ID id-cdma2000SectorID CRITICALITY reject TYPE Cdma2000SectorID PRESENCE mandatory }| + { ID id-cdma2000HORequiredIndication CRITICALITY ignore TYPE Cdma2000HORequiredIndication PRESENCE optional }| + { ID id-cdma2000OneXSRVCCInfo CRITICALITY reject TYPE Cdma2000OneXSRVCCInfo PRESENCE optional }| + { ID id-cdma2000OneXRAND CRITICALITY reject TYPE Cdma2000OneXRAND PRESENCE optional }| + { ID id-cdma2000PDU CRITICALITY reject TYPE Cdma2000PDU PRESENCE mandatory }| + { ID id-EUTRANRoundTripDelayEstimationInfo CRITICALITY ignore TYPE EUTRANRoundTripDelayEstimationInfo PRESENCE optional }, + -- Extension for Release 9 to assist target HRPD access with the acquisition of the UE -- + ... +} + + +-- ************************************************************** +-- +-- UE CAPABILITY INFO INDICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE Capability Info Indication +-- +-- ************************************************************** + +UECapabilityInfoIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UECapabilityInfoIndicationIEs} }, + ... +} + +UECapabilityInfoIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE mandatory}| + { ID id-UERadioCapabilityForPaging CRITICALITY ignore TYPE UERadioCapabilityForPaging PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- eNB STATUS TRANSFER ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- eNB Status Transfer +-- +-- ************************************************************** + +ENBStatusTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ENBStatusTransferIEs} }, + ... +} + +ENBStatusTransferIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-StatusTransfer-TransparentContainer CRITICALITY reject TYPE ENB-StatusTransfer-TransparentContainer PRESENCE mandatory}, + ... +} + + +-- ************************************************************** +-- +-- MME STATUS TRANSFER ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- MME Status Transfer +-- +-- ************************************************************** + +MMEStatusTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {MMEStatusTransferIEs} }, + ... +} + +MMEStatusTransferIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-StatusTransfer-TransparentContainer CRITICALITY reject TYPE ENB-StatusTransfer-TransparentContainer PRESENCE mandatory}, + ... +} + + +-- ************************************************************** +-- +-- TRACE ELEMENTARY PROCEDURES +-- +-- ************************************************************** +-- ************************************************************** +-- +-- Trace Start +-- +-- ************************************************************** + +TraceStart ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {TraceStartIEs} }, + ... +} + +TraceStartIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-TraceActivation CRITICALITY ignore TYPE TraceActivation PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- Trace Failure Indication +-- +-- ************************************************************** + +TraceFailureIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {TraceFailureIndicationIEs} }, + ... +} + +TraceFailureIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-E-UTRAN-Trace-ID CRITICALITY ignore TYPE E-UTRAN-Trace-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- DEACTIVATE TRACE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Deactivate Trace +-- +-- ************************************************************** + +DeactivateTrace ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { DeactivateTraceIEs} }, + ... +} + +DeactivateTraceIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-E-UTRAN-Trace-ID CRITICALITY ignore TYPE E-UTRAN-Trace-ID PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- CELL TRAFFIC TRACE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Cell Traffic Trace +-- +-- ************************************************************** + +CellTrafficTrace ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { CellTrafficTraceIEs } }, + ... +} + +CellTrafficTraceIEs S1AP-PROTOCOL-IES ::= { + {ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + {ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + {ID id-E-UTRAN-Trace-ID CRITICALITY ignore TYPE E-UTRAN-Trace-ID PRESENCE mandatory }| + {ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory }| + {ID id-TraceCollectionEntityIPAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE mandatory }| + {ID id-PrivacyIndicator CRITICALITY ignore TYPE PrivacyIndicator PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- LOCATION ELEMENTARY PROCEDURES +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Location Reporting Control +-- +-- ************************************************************** + +LocationReportingControl ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { LocationReportingControlIEs} }, + ... +} + +LocationReportingControlIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-RequestType CRITICALITY ignore TYPE RequestType PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- Location Report Failure Indication +-- +-- ************************************************************** + +LocationReportingFailureIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { LocationReportingFailureIndicationIEs} }, + ... +} + +LocationReportingFailureIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- Location Report +-- +-- ************************************************************** + +LocationReport ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { LocationReportIEs} }, + ... +} + +LocationReportIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory }| + { ID id-TAI CRITICALITY ignore TYPE TAI PRESENCE mandatory }| + { ID id-RequestType CRITICALITY ignore TYPE RequestType PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- OVERLOAD ELEMENTARY PROCEDURES +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Overload Start +-- +-- ************************************************************** + +OverloadStart ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {OverloadStartIEs} }, + ... +} + +OverloadStartIEs S1AP-PROTOCOL-IES ::= { + { ID id-OverloadResponse CRITICALITY reject TYPE OverloadResponse PRESENCE mandatory }| + { ID id-GUMMEIList CRITICALITY ignore TYPE GUMMEIList PRESENCE optional }| + { ID id-TrafficLoadReductionIndication CRITICALITY ignore TYPE TrafficLoadReductionIndication PRESENCE optional }, + ... +} +-- ************************************************************** +-- +-- Overload Stop +-- +-- ************************************************************** + +OverloadStop ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {OverloadStopIEs} }, + ... +} + +OverloadStopIEs S1AP-PROTOCOL-IES ::= { +{ ID id-GUMMEIList CRITICALITY ignore TYPE GUMMEIList PRESENCE optional }, + ... +} +-- ************************************************************** +-- +-- WRITE-REPLACE WARNING ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Write-Replace Warning Request +-- +-- ************************************************************** + + +WriteReplaceWarningRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {WriteReplaceWarningRequestIEs} }, + ... +} + +WriteReplaceWarningRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-MessageIdentifier CRITICALITY reject TYPE MessageIdentifier PRESENCE mandatory }| + { ID id-SerialNumber CRITICALITY reject TYPE SerialNumber PRESENCE mandatory }| + { ID id-WarningAreaList CRITICALITY ignore TYPE WarningAreaList PRESENCE optional }| + { ID id-RepetitionPeriod CRITICALITY reject TYPE RepetitionPeriod PRESENCE mandatory }| + { ID id-ExtendedRepetitionPeriod CRITICALITY reject TYPE ExtendedRepetitionPeriod PRESENCE optional }| + { ID id-NumberofBroadcastRequest CRITICALITY reject TYPE NumberofBroadcastRequest PRESENCE mandatory }| + { ID id-WarningType CRITICALITY ignore TYPE WarningType PRESENCE optional }| + { ID id-WarningSecurityInfo CRITICALITY ignore TYPE WarningSecurityInfo PRESENCE optional }| + { ID id-DataCodingScheme CRITICALITY ignore TYPE DataCodingScheme PRESENCE optional }| + { ID id-WarningMessageContents CRITICALITY ignore TYPE WarningMessageContents PRESENCE optional }| + { ID id-ConcurrentWarningMessageIndicator CRITICALITY reject TYPE ConcurrentWarningMessageIndicator PRESENCE optional }, + ... +} +-- ************************************************************** +-- +-- Write-Replace Warning Response +-- +-- ************************************************************** + +WriteReplaceWarningResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {WriteReplaceWarningResponseIEs} }, + ... +} + +WriteReplaceWarningResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MessageIdentifier CRITICALITY reject TYPE MessageIdentifier PRESENCE mandatory }| + { ID id-SerialNumber CRITICALITY reject TYPE SerialNumber PRESENCE mandatory }| + { ID id-BroadcastCompletedAreaList CRITICALITY ignore TYPE BroadcastCompletedAreaList PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- eNB DIRECT INFORMATION TRANSFER ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- eNB Direct Information Transfer +-- +-- ************************************************************** + +ENBDirectInformationTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ ENBDirectInformationTransferIEs}}, + ... +} + +ENBDirectInformationTransferIEs S1AP-PROTOCOL-IES ::= { + { ID id-Inter-SystemInformationTransferTypeEDT CRITICALITY reject TYPE Inter-SystemInformationTransferType PRESENCE mandatory }, + ... +} + +Inter-SystemInformationTransferType ::= CHOICE { + rIMTransfer RIMTransfer, + ... +} + +-- ************************************************************** +-- +-- MME DIRECT INFORMATION TRANSFER ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- MME Direct Information Transfer +-- +-- ************************************************************** + +MMEDirectInformationTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ MMEDirectInformationTransferIEs}}, + ... +} + +MMEDirectInformationTransferIEs S1AP-PROTOCOL-IES ::= { + { ID id-Inter-SystemInformationTransferTypeMDT CRITICALITY reject TYPE Inter-SystemInformationTransferType PRESENCE mandatory }, + ... +} +-- ************************************************************** +-- +-- eNB CONFIGURATION TRANSFER ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- eNB Configuration Transfer +-- +-- ************************************************************** + +ENBConfigurationTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ ENBConfigurationTransferIEs}}, + ... +} + +ENBConfigurationTransferIEs S1AP-PROTOCOL-IES ::= { + { ID id-SONConfigurationTransferECT CRITICALITY ignore TYPE SONConfigurationTransfer PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- MME CONFIGURATION TRANSFER ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- MME Configuration Transfer +-- +-- ************************************************************** + +MMEConfigurationTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ MMEConfigurationTransferIEs}}, + ... +} + +MMEConfigurationTransferIEs S1AP-PROTOCOL-IES ::= { + { ID id-SONConfigurationTransferMCT CRITICALITY ignore TYPE SONConfigurationTransfer PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- PRIVATE MESSAGE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Private Message +-- +-- ************************************************************** + +PrivateMessage ::= SEQUENCE { + privateIEs PrivateIE-Container {{PrivateMessageIEs}}, + ... +} + +PrivateMessageIEs S1AP-PRIVATE-IES ::= { + ... +} + +-- ************************************************************** +-- +-- KILL PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Kill Request +-- +-- ************************************************************** + + +KillRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {KillRequestIEs} }, + ... +} + +KillRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-MessageIdentifier CRITICALITY reject TYPE MessageIdentifier PRESENCE mandatory}| + { ID id-SerialNumber CRITICALITY reject TYPE SerialNumber PRESENCE mandatory}| + { ID id-WarningAreaList CRITICALITY ignore TYPE WarningAreaList PRESENCE optional}| + { ID id-KillAllWarningMessages CRITICALITY reject TYPE KillAllWarningMessages PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- Kill Response +-- +-- ************************************************************** + +KillResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {KillResponseIEs} }, + ... +} + +KillResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MessageIdentifier CRITICALITY reject TYPE MessageIdentifier PRESENCE mandatory }| + { ID id-SerialNumber CRITICALITY reject TYPE SerialNumber PRESENCE mandatory }| + { ID id-BroadcastCancelledAreaList CRITICALITY ignore TYPE BroadcastCancelledAreaList PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- PWS RESTART INDICATION PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- PWS Restart Indication +-- +-- ************************************************************** + +PWSRestartIndication::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ PWSRestartIndicationIEs}}, + ... +} + +PWSRestartIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-ECGIListForRestart CRITICALITY reject TYPE ECGIListForRestart PRESENCE mandatory}| + { ID id-Global-ENB-ID CRITICALITY reject TYPE Global-ENB-ID PRESENCE mandatory}| + { ID id-TAIListForRestart CRITICALITY reject TYPE TAIListForRestart PRESENCE mandatory}| + { ID id-EmergencyAreaIDListForRestart CRITICALITY reject TYPE EmergencyAreaIDListForRestart PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- PWS Failure Indication +-- +-- ************************************************************** + +PWSFailureIndication::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ PWSFailureIndicationIEs}}, + ... +} + +PWSFailureIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-PWSfailedECGIList CRITICALITY reject TYPE PWSfailedECGIList PRESENCE mandatory}| + { ID id-Global-ENB-ID CRITICALITY reject TYPE Global-ENB-ID PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- LPPA TRANSPORT ELEMENTARY PROCEDURES +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- DOWNLINK UE ASSOCIATED LPPA TRANSPORT +-- +-- ************************************************************** + +DownlinkUEAssociatedLPPaTransport ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{DownlinkUEAssociatedLPPaTransport-IEs}}, + ... +} + +DownlinkUEAssociatedLPPaTransport-IEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-Routing-ID CRITICALITY reject TYPE Routing-ID PRESENCE mandatory }| + { ID id-LPPa-PDU CRITICALITY reject TYPE LPPa-PDU PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- UPLINK UE ASSOCIATED LPPA TRANSPORT +-- +-- ************************************************************** + +UplinkUEAssociatedLPPaTransport ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{UplinkUEAssociatedLPPaTransport-IEs}}, + ... +} + +UplinkUEAssociatedLPPaTransport-IEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-Routing-ID CRITICALITY reject TYPE Routing-ID PRESENCE mandatory }| + { ID id-LPPa-PDU CRITICALITY reject TYPE LPPa-PDU PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- DOWNLINK NON UE ASSOCIATED LPPA TRANSPORT +-- +-- ************************************************************** + +DownlinkNonUEAssociatedLPPaTransport ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{DownlinkNonUEAssociatedLPPaTransport-IEs}}, + ... +} + +DownlinkNonUEAssociatedLPPaTransport-IEs S1AP-PROTOCOL-IES ::= { + { ID id-Routing-ID CRITICALITY reject TYPE Routing-ID PRESENCE mandatory }| + { ID id-LPPa-PDU CRITICALITY reject TYPE LPPa-PDU PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- UPLINK NON UE ASSOCIATED LPPA TRANSPORT +-- +-- ************************************************************** + +UplinkNonUEAssociatedLPPaTransport ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{UplinkNonUEAssociatedLPPaTransport-IEs}}, + ... +} + +UplinkNonUEAssociatedLPPaTransport-IEs S1AP-PROTOCOL-IES ::= { + { ID id-Routing-ID CRITICALITY reject TYPE Routing-ID PRESENCE mandatory }| + { ID id-LPPa-PDU CRITICALITY reject TYPE LPPa-PDU PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- E-RAB MODIFICATION INDICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- E-RAB Modification Indication +-- +-- ************************************************************** + +E-RABModificationIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { E-RABModificationIndicationIEs} }, + ... +} + +E-RABModificationIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-E-RABToBeModifiedListBearerModInd CRITICALITY reject TYPE E-RABToBeModifiedListBearerModInd PRESENCE mandatory}| + { ID id-E-RABNotToBeModifiedListBearerModInd CRITICALITY reject TYPE E-RABNotToBeModifiedListBearerModInd PRESENCE optional}| + { ID id-CSGMembershipInfo CRITICALITY reject TYPE CSGMembershipInfo PRESENCE optional}| +-- Extension for Release 11 to support BBAI -- + { ID id-Tunnel-Information-for-BBF CRITICALITY ignore TYPE TunnelInformation PRESENCE optional}, + ... +} + +E-RABToBeModifiedListBearerModInd ::= E-RAB-IE-ContainerList { {E-RABToBeModifiedItemBearerModIndIEs} } + +E-RABToBeModifiedItemBearerModIndIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABToBeModifiedItemBearerModInd CRITICALITY reject TYPE E-RABToBeModifiedItemBearerModInd PRESENCE mandatory}, + ... +} + +E-RABToBeModifiedItemBearerModInd ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + transportLayerAddress TransportLayerAddress, + dL-GTP-TEID GTP-TEID, + iE-Extensions ProtocolExtensionContainer { { E-RABToBeModifiedItemBearerModInd-ExtIEs} } OPTIONAL, + ... +} + +E-RABToBeModifiedItemBearerModInd-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABNotToBeModifiedListBearerModInd ::= E-RAB-IE-ContainerList { {E-RABNotToBeModifiedItemBearerModIndIEs} } + +E-RABNotToBeModifiedItemBearerModIndIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABNotToBeModifiedItemBearerModInd CRITICALITY reject TYPE E-RABNotToBeModifiedItemBearerModInd PRESENCE mandatory}, + ... +} + +E-RABNotToBeModifiedItemBearerModInd ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + transportLayerAddress TransportLayerAddress, + dL-GTP-TEID GTP-TEID, + iE-Extensions ProtocolExtensionContainer { { E-RABNotToBeModifiedItemBearerModInd-ExtIEs} } OPTIONAL, + ... +} + +E-RABNotToBeModifiedItemBearerModInd-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CSGMembershipInfo ::= SEQUENCE { + cSGMembershipStatus CSGMembershipStatus, + cSG-Id CSG-Id, + cellAccessMode CellAccessMode OPTIONAL, + pLMNidentity PLMNidentity OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { CSGMembershipInfo-ExtIEs} } OPTIONAL, + ... +} + +CSGMembershipInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- E-RAB Modification Confirm +-- +-- ************************************************************** + +E-RABModificationConfirm ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {E-RABModificationConfirmIEs} }, + ... +} + +E-RABModificationConfirmIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-E-RABModifyListBearerModConf CRITICALITY ignore TYPE E-RABModifyListBearerModConf PRESENCE optional}| + { ID id-E-RABFailedToModifyListBearerModConf CRITICALITY ignore TYPE E-RABList PRESENCE optional}| + { ID id-E-RABToBeReleasedListBearerModConf CRITICALITY ignore TYPE E-RABList PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}, + ... +} + +E-RABModifyListBearerModConf ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABModifyItemBearerModConfIEs} } + +E-RABModifyItemBearerModConfIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABModifyItemBearerModConf CRITICALITY ignore TYPE E-RABModifyItemBearerModConf PRESENCE mandatory}, + ... +} + +E-RABModifyItemBearerModConf ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + iE-Extensions ProtocolExtensionContainer { {E-RABModifyItemBearerModConfExtIEs} } OPTIONAL, + ... +} + + +E-RABModifyItemBearerModConfExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +-- ************************************************************** +-- +-- UE CONTEXT MODIFICATION INDICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE Context Modification Indication +-- +-- ************************************************************** + +UEContextModificationIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextModificationIndicationIEs} }, + ... +} + +UEContextModificationIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-CSGMembershipInfo CRITICALITY reject TYPE CSGMembershipInfo PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- UE Context Modification Confirm +-- +-- ************************************************************** + +UEContextModificationConfirm ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {UEContextModificationConfirmIEs} }, + ... +} + +UEContextModificationConfirmIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- UE CONTEXT SUSPEND ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE Context Suspend Request +-- +-- ************************************************************** + +UEContextSuspendRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextSuspendRequestIEs} }, + ... +} + +UEContextSuspendRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-InformationOnRecommendedCellsAndENBsForPaging CRITICALITY ignore TYPE InformationOnRecommendedCellsAndENBsForPaging PRESENCE optional}| + { ID id-CellIdentifierAndCELevelForCECapableUEs CRITICALITY ignore TYPE CellIdentifierAndCELevelForCECapableUEs PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- UE Context Suspend Response +-- +-- ************************************************************** + +UEContextSuspendResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {UEContextSuspendResponseIEs} }, + ... +} + +UEContextSuspendResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-SecurityContext CRITICALITY reject TYPE SecurityContext PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- UE CONTEXT RESUME ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE Context Resume Request +-- +-- ************************************************************** + +UEContextResumeRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextResumeRequestIEs} }, + ... +} + +UEContextResumeRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-E-RABFailedToResumeListResumeReq CRITICALITY reject TYPE E-RABFailedToResumeListResumeReq PRESENCE optional}| + { ID id-RRC-Resume-Cause CRITICALITY ignore TYPE RRC-Establishment-Cause PRESENCE optional}, + ... +} + +E-RABFailedToResumeListResumeReq ::= E-RAB-IE-ContainerList { {E-RABFailedToResumeItemResumeReqIEs} } + +E-RABFailedToResumeItemResumeReqIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABFailedToResumeItemResumeReq CRITICALITY reject TYPE E-RABFailedToResumeItemResumeReq PRESENCE mandatory}, + ... +} + +E-RABFailedToResumeItemResumeReq ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + cause Cause, + iE-Extensions ProtocolExtensionContainer { { E-RABFailedToResumeItemResumeReq-ExtIEs} } OPTIONAL, + ... +} + +E-RABFailedToResumeItemResumeReq-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- UE Context Resume Response +-- +-- ************************************************************** + +UEContextResumeResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextResumeResponseIEs} }, + ... +} + +UEContextResumeResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-E-RABFailedToResumeListResumeRes CRITICALITY reject TYPE E-RABFailedToResumeListResumeRes PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-SecurityContext CRITICALITY reject TYPE SecurityContext PRESENCE optional}| + { ID id-PendingDataIndication CRITICALITY ignore TYPE PendingDataIndication PRESENCE optional}, + ... +} + +E-RABFailedToResumeListResumeRes ::= E-RAB-IE-ContainerList { {E-RABFailedToResumeItemResumeResIEs} } + +E-RABFailedToResumeItemResumeResIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABFailedToResumeItemResumeRes CRITICALITY reject TYPE E-RABFailedToResumeItemResumeRes PRESENCE mandatory}, + ... +} + +E-RABFailedToResumeItemResumeRes ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + cause Cause, + iE-Extensions ProtocolExtensionContainer { { E-RABFailedToResumeItemResumeRes-ExtIEs} } OPTIONAL, + ... +} + +E-RABFailedToResumeItemResumeRes-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- UE Context Resume Failure +-- +-- ************************************************************** + +UEContextResumeFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextResumeFailureIEs} }, + ... +} + +UEContextResumeFailureIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- Connection Establishment Indication +-- +-- ************************************************************** + +ConnectionEstablishmentIndication::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ConnectionEstablishmentIndicationIEs} }, + ... +} + +ConnectionEstablishmentIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE optional }| + { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional }| + { ID id-DL-CP-SecurityInformation CRITICALITY ignore TYPE DL-CP-SecurityInformation PRESENCE optional }| + { ID id-CE-ModeBRestricted CRITICALITY ignore TYPE CE-ModeBRestricted PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- Retrieve UE Information +-- +-- ************************************************************** + +RetrieveUEInformation ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { RetrieveUEInformationIEs} }, + ... +} + +RetrieveUEInformationIEs S1AP-PROTOCOL-IES ::= { + { ID id-S-TMSI CRITICALITY reject TYPE S-TMSI PRESENCE mandatory}, +... + +} + + +-- ************************************************************** + +-- UE Information Transfer +-- +-- ************************************************************** +UEInformationTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEInformationTransferIEs} }, + ... +} + +UEInformationTransferIEs S1AP-PROTOCOL-IES ::= { + { ID id-S-TMSI CRITICALITY reject TYPE S-TMSI PRESENCE mandatory}| + { ID id-UE-Level-QoS-Parameters CRITICALITY ignore TYPE E-RABLevelQoSParameters PRESENCE optional}| + { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- eNB CP Relocation Indication +-- +-- ************************************************************** + +ENBCPRelocationIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { ENBCPRelocationIndicationIEs} }, + ... +} + +ENBCPRelocationIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-S-TMSI CRITICALITY reject TYPE S-TMSI PRESENCE mandatory}| + { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory}| + { ID id-TAI CRITICALITY ignore TYPE TAI PRESENCE mandatory}| + { ID id-UL-CP-SecurityInformation CRITICALITY reject TYPE UL-CP-SecurityInformation PRESENCE mandatory}, + ... +} + + +-- ************************************************************** +-- +-- MME CP Relocation Indication +-- +-- ************************************************************** + +MMECPRelocationIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { MMECPRelocationIndicationIEs} }, + ... +} + +MMECPRelocationIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}, + ... +} + +END + + + +-- ************************************************************** +-- +-- Information Element Definitions +-- +-- ************************************************************** + +S1AP-IEs { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-IEs (2) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + id-E-RABInformationListItem, + id-E-RABItem, + id-Bearers-SubjectToStatusTransfer-Item, + id-Time-Synchronisation-Info, + id-x2TNLConfigurationInfo, + id-eNBX2ExtendedTransportLayerAddresses, + id-MDTConfiguration, + id-Time-UE-StayedInCell-EnhancedGranularity, + id-HO-Cause, + id-M3Configuration, + id-M4Configuration, + id-M5Configuration, + id-MDT-Location-Info, + id-SignallingBasedMDTPLMNList, + id-MobilityInformation, + id-ULCOUNTValueExtended, + id-DLCOUNTValueExtended, + id-ReceiveStatusOfULPDCPSDUsExtended, + id-eNBIndirectX2TransportLayerAddresses, + id-Muting-Availability-Indication, + id-Muting-Pattern-Information, + id-Synchronisation-Information, + id-uE-HistoryInformationFromTheUE, + id-LoggedMBSFNMDT, + id-SON-Information-Report, + id-RecommendedCellItem, + id-RecommendedENBItem, + id-ProSeUEtoNetworkRelaying, + id-ULCOUNTValuePDCP-SNlength18, + id-DLCOUNTValuePDCP-SNlength18, + id-ReceiveStatusOfULPDCPSDUsPDCP-SNlength18, + id-M6Configuration, + id-M7Configuration, + id-RAT-Type, + maxnoofCSGs, + maxnoofE-RABs, + maxnoofErrors, + maxnoofBPLMNs, + maxnoofPLMNsPerMME, + maxnoofTACs, + maxnoofEPLMNs, + maxnoofEPLMNsPlusOne, + maxnoofForbLACs, + maxnoofForbTACs, + maxnoofCells, + maxnoofCellID, + maxnoofDCNs, + maxnoofEmergencyAreaID, + maxnoofTAIforWarning, + maxnoofCellinTAI, + maxnoofCellinEAI, + maxnoofeNBX2TLAs, + maxnoofeNBX2ExtTLAs, + maxnoofeNBX2GTPTLAs, + maxnoofRATs, + maxnoofGroupIDs, + maxnoofMMECs, + maxnoofTAforMDT, + maxnoofCellIDforMDT, + maxnoofMDTPLMNs, + maxnoofCellsforRestart, + maxnoofRestartTAIs, + maxnoofRestartEmergencyAreaIDs, + maxnoofMBSFNAreaMDT, + maxEARFCN, + maxnoofCellsineNB, + maxnoofRecommendedCells, + maxnoofRecommendedENBs + + + +FROM S1AP-Constants + + Criticality, + ProcedureCode, + ProtocolIE-ID, + TriggeringMessage +FROM S1AP-CommonDataTypes + + ProtocolExtensionContainer{}, + S1AP-PROTOCOL-EXTENSION, + ProtocolIE-SingleContainer{}, + S1AP-PROTOCOL-IES + +FROM S1AP-Containers; + +-- A + +Additional-GUTI::= SEQUENCE { + gUMMEI GUMMEI, + m-TMSI M-TMSI, + iE-Extensions ProtocolExtensionContainer { {Additional-GUTI-ExtIEs} } OPTIONAL, + ... +} + +Additional-GUTI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AreaScopeOfMDT ::= CHOICE { + cellBased CellBasedMDT, + tABased TABasedMDT, + pLMNWide NULL, + ..., + tAIBased TAIBasedMDT +} + +AllocationAndRetentionPriority ::= SEQUENCE { + priorityLevel PriorityLevel, + pre-emptionCapability Pre-emptionCapability, + pre-emptionVulnerability Pre-emptionVulnerability, + iE-Extensions ProtocolExtensionContainer { {AllocationAndRetentionPriority-ExtIEs} } OPTIONAL, + ... +} + +AllocationAndRetentionPriority-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AssistanceDataForCECapableUEs ::= SEQUENCE { + cellIdentifierAndCELevelForCECapableUEs CellIdentifierAndCELevelForCECapableUEs, + iE-Extensions ProtocolExtensionContainer { { InformationForCECapableUEs-ExtIEs} } OPTIONAL, + ... +} + +InformationForCECapableUEs-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AssistanceDataForPaging ::= SEQUENCE { + assistanceDataForRecommendedCells AssistanceDataForRecommendedCells OPTIONAL, + assistanceDataForCECapableUEs AssistanceDataForCECapableUEs OPTIONAL, + pagingAttemptInformation PagingAttemptInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { AssistanceDataForPaging-ExtIEs} } OPTIONAL, + ... +} + +AssistanceDataForPaging-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AssistanceDataForRecommendedCells ::= SEQUENCE { + recommendedCellsForPaging RecommendedCellsForPaging, + iE-Extensions ProtocolExtensionContainer { { AssistanceDataForRecommendedCells-ExtIEs} } OPTIONAL, + ... +} + +AssistanceDataForRecommendedCells-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- B + +Bearers-SubjectToStatusTransferList ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { { Bearers-SubjectToStatusTransfer-ItemIEs } } + +Bearers-SubjectToStatusTransfer-ItemIEs S1AP-PROTOCOL-IES ::= { + { ID id-Bearers-SubjectToStatusTransfer-Item CRITICALITY ignore TYPE Bearers-SubjectToStatusTransfer-Item PRESENCE mandatory }, + ... +} + +Bearers-SubjectToStatusTransfer-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + uL-COUNTvalue COUNTvalue, + dL-COUNTvalue COUNTvalue, + receiveStatusofULPDCPSDUs ReceiveStatusofULPDCPSDUs OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {Bearers-SubjectToStatusTransfer-ItemExtIEs} } OPTIONAL, + ... +} + +Bearers-SubjectToStatusTransfer-ItemExtIEs S1AP-PROTOCOL-EXTENSION ::= { + { ID id-ULCOUNTValueExtended CRITICALITY ignore EXTENSION COUNTValueExtended PRESENCE optional}| + { ID id-DLCOUNTValueExtended CRITICALITY ignore EXTENSION COUNTValueExtended PRESENCE optional}| + { ID id-ReceiveStatusOfULPDCPSDUsExtended CRITICALITY ignore EXTENSION ReceiveStatusOfULPDCPSDUsExtended PRESENCE optional}| + { ID id-ULCOUNTValuePDCP-SNlength18 CRITICALITY ignore EXTENSION COUNTvaluePDCP-SNlength18 PRESENCE optional}| + { ID id-DLCOUNTValuePDCP-SNlength18 CRITICALITY ignore EXTENSION COUNTvaluePDCP-SNlength18 PRESENCE optional}| + { ID id-ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 CRITICALITY ignore EXTENSION ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 PRESENCE optional}, + ... +} + +BearerType ::= ENUMERATED { + non-IP, + ... +} + +BitRate ::= INTEGER (0..10000000000) + +BPLMNs ::= SEQUENCE (SIZE(1.. maxnoofBPLMNs)) OF PLMNidentity + +BroadcastCancelledAreaList ::= CHOICE { + cellID-Cancelled CellID-Cancelled, + tAI-Cancelled TAI-Cancelled, + emergencyAreaID-Cancelled EmergencyAreaID-Cancelled, + ... +} + +BroadcastCompletedAreaList ::= CHOICE { + cellID-Broadcast CellID-Broadcast, + tAI-Broadcast TAI-Broadcast, + emergencyAreaID-Broadcast EmergencyAreaID-Broadcast, + ... +} + + +-- C + +CancelledCellinEAI ::= SEQUENCE (SIZE(1..maxnoofCellinEAI)) OF CancelledCellinEAI-Item + +CancelledCellinEAI-Item ::= SEQUENCE { + eCGI EUTRAN-CGI, + numberOfBroadcasts NumberOfBroadcasts, + iE-Extensions ProtocolExtensionContainer { {CancelledCellinEAI-Item-ExtIEs} } OPTIONAL, + ... +} + +CancelledCellinEAI-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CancelledCellinTAI ::= SEQUENCE (SIZE(1..maxnoofCellinTAI)) OF CancelledCellinTAI-Item + +CancelledCellinTAI-Item ::= SEQUENCE{ + eCGI EUTRAN-CGI, + numberOfBroadcasts NumberOfBroadcasts, + iE-Extensions ProtocolExtensionContainer { {CancelledCellinTAI-Item-ExtIEs} } OPTIONAL, + ... +} + +CancelledCellinTAI-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Cause ::= CHOICE { + radioNetwork CauseRadioNetwork, + transport CauseTransport, + nas CauseNas, + protocol CauseProtocol, + misc CauseMisc, + ... +} + +CauseMisc ::= ENUMERATED { + control-processing-overload, + not-enough-user-plane-processing-resources, + hardware-failure, + om-intervention, + unspecified, + unknown-PLMN, +... +} + +CauseProtocol ::= ENUMERATED { + transfer-syntax-error, + abstract-syntax-error-reject, + abstract-syntax-error-ignore-and-notify, + message-not-compatible-with-receiver-state, + semantic-error, + abstract-syntax-error-falsely-constructed-message, + unspecified, + ... +} + +CauseRadioNetwork ::= ENUMERATED { + unspecified, + tx2relocoverall-expiry, + successful-handover, + release-due-to-eutran-generated-reason, + handover-cancelled, + partial-handover, + ho-failure-in-target-EPC-eNB-or-target-system, + ho-target-not-allowed, + tS1relocoverall-expiry, + tS1relocprep-expiry, + cell-not-available, + unknown-targetID, + no-radio-resources-available-in-target-cell, + unknown-mme-ue-s1ap-id, + unknown-enb-ue-s1ap-id, + unknown-pair-ue-s1ap-id, + handover-desirable-for-radio-reason, + time-critical-handover, + resource-optimisation-handover, + reduce-load-in-serving-cell, + user-inactivity, + radio-connection-with-ue-lost, + load-balancing-tau-required, + cs-fallback-triggered, + ue-not-available-for-ps-service, + radio-resources-not-available, + failure-in-radio-interface-procedure, + invalid-qos-combination, + interrat-redirection, + interaction-with-other-procedure, + unknown-E-RAB-ID, + multiple-E-RAB-ID-instances, + encryption-and-or-integrity-protection-algorithms-not-supported, + s1-intra-system-handover-triggered, + s1-inter-system-handover-triggered, + x2-handover-triggered, + ..., + redirection-towards-1xRTT, + not-supported-QCI-value, + invalid-CSG-Id, + release-due-to-pre-emption + +} + +CauseTransport ::= ENUMERATED { + transport-resource-unavailable, + unspecified, + ... +} + +CauseNas ::= ENUMERATED { + normal-release, + authentication-failure, + detach, + unspecified, + ..., + csg-subscription-expiry +} + +CellAccessMode ::= ENUMERATED { + hybrid, + ... +} + +CellIdentifierAndCELevelForCECapableUEs ::= SEQUENCE { + global-Cell-ID EUTRAN-CGI, + cELevel CELevel, + iE-Extensions ProtocolExtensionContainer { { CellIdentifierAndCELevelForCECapableUEs-ExtIEs} } OPTIONAL, + ... +} + +CellIdentifierAndCELevelForCECapableUEs-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- Coverage Enhancement level encoded according to TS 36.331 [16] -- +CELevel ::= OCTET STRING + +CE-mode-B-SupportIndicator ::= ENUMERATED { + supported, + ... +} + +CellIdentity ::= BIT STRING (SIZE (28)) + +CellID-Broadcast ::= SEQUENCE (SIZE(1..maxnoofCellID)) OF CellID-Broadcast-Item + +CellID-Broadcast-Item ::= SEQUENCE { + eCGI EUTRAN-CGI, + iE-Extensions ProtocolExtensionContainer { {CellID-Broadcast-Item-ExtIEs} } OPTIONAL, + ... +} + +CellID-Broadcast-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CellID-Cancelled::= SEQUENCE (SIZE(1..maxnoofCellID)) OF CellID-Cancelled-Item + +CellID-Cancelled-Item ::= SEQUENCE { + eCGI EUTRAN-CGI, + numberOfBroadcasts NumberOfBroadcasts, + iE-Extensions ProtocolExtensionContainer { {CellID-Cancelled-Item-ExtIEs} } OPTIONAL, + ... +} + +CellID-Cancelled-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CellBasedMDT::= SEQUENCE { + cellIdListforMDT CellIdListforMDT, + iE-Extensions ProtocolExtensionContainer { {CellBasedMDT-ExtIEs} } OPTIONAL, + ... +} + +CellBasedMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CellIdListforMDT ::= SEQUENCE (SIZE(1..maxnoofCellIDforMDT)) OF EUTRAN-CGI + +Cdma2000PDU ::= OCTET STRING + +Cdma2000RATType ::= ENUMERATED { + hRPD, + onexRTT, + ... +} + +Cdma2000SectorID ::= OCTET STRING + +Cdma2000HOStatus ::= ENUMERATED { + hOSuccess, + hOFailure, + ... +} + +Cdma2000HORequiredIndication ::= ENUMERATED { + true, + ... +} + +Cdma2000OneXSRVCCInfo ::= SEQUENCE { + cdma2000OneXMEID Cdma2000OneXMEID, + cdma2000OneXMSI Cdma2000OneXMSI, + cdma2000OneXPilot Cdma2000OneXPilot, + iE-Extensions ProtocolExtensionContainer { {Cdma2000OneXSRVCCInfo-ExtIEs} } OPTIONAL, + ... +} + +Cdma2000OneXSRVCCInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Cdma2000OneXMEID ::= OCTET STRING + +Cdma2000OneXMSI ::= OCTET STRING + +Cdma2000OneXPilot ::= OCTET STRING + +Cdma2000OneXRAND ::= OCTET STRING + + +Cell-Size ::= ENUMERATED {verysmall, small, medium, large, ...} + +CellType ::= SEQUENCE { + cell-Size Cell-Size, + iE-Extensions ProtocolExtensionContainer { { CellType-ExtIEs}} OPTIONAL, + ... +} + +CellType-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CGI ::= SEQUENCE { + pLMNidentity PLMNidentity, + lAC LAC, + cI CI, + rAC RAC OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {CGI-ExtIEs} } OPTIONAL, + ... + } + +CGI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CI ::= OCTET STRING (SIZE (2)) + +CNDomain ::= ENUMERATED { + ps, + cs +} + +ConcurrentWarningMessageIndicator ::= ENUMERATED { + true +} + +Correlation-ID ::= OCTET STRING (SIZE (4)) + +CSFallbackIndicator ::= ENUMERATED { + cs-fallback-required, + ..., + cs-fallback-high-priority +} + +AdditionalCSFallbackIndicator ::= ENUMERATED { + no-restriction, + restriction, + ... +} + +CSG-Id ::= BIT STRING (SIZE (27)) + + +CSG-IdList ::= SEQUENCE (SIZE (1.. maxnoofCSGs)) OF CSG-IdList-Item + +CSG-IdList-Item ::= SEQUENCE { + cSG-Id CSG-Id, + iE-Extensions ProtocolExtensionContainer { {CSG-IdList-Item-ExtIEs} } OPTIONAL, + ... +} + +CSG-IdList-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CSGMembershipStatus ::= ENUMERATED { + member, + not-member +} + + +COUNTvalue ::= SEQUENCE { + pDCP-SN PDCP-SN, + hFN HFN, + iE-Extensions ProtocolExtensionContainer { {COUNTvalue-ExtIEs} } OPTIONAL, + ... +} +COUNTvalue-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +COUNTValueExtended ::= SEQUENCE { + pDCP-SNExtended PDCP-SNExtended, + hFNModified HFNModified, + iE-Extensions ProtocolExtensionContainer { {COUNTValueExtended-ExtIEs} } OPTIONAL, + ... +} + +COUNTValueExtended-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +COUNTvaluePDCP-SNlength18 ::= SEQUENCE { + pDCP-SNlength18 PDCP-SNlength18, + hFNforPDCP-SNlength18 HFNforPDCP-SNlength18, + iE-Extensions ProtocolExtensionContainer { {COUNTvaluePDCP-SNlength18-ExtIEs} } OPTIONAL, + ... +} + +COUNTvaluePDCP-SNlength18-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Coverage-Level ::= ENUMERATED { + extendedcoverage, + ... +} + +CriticalityDiagnostics ::= SEQUENCE { + procedureCode ProcedureCode OPTIONAL, + triggeringMessage TriggeringMessage OPTIONAL, + procedureCriticality Criticality OPTIONAL, + iEsCriticalityDiagnostics CriticalityDiagnostics-IE-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer {{CriticalityDiagnostics-ExtIEs}} OPTIONAL, + ... +} + +CriticalityDiagnostics-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CriticalityDiagnostics-IE-List ::= SEQUENCE (SIZE (1.. maxnoofErrors)) OF CriticalityDiagnostics-IE-Item + +CriticalityDiagnostics-IE-Item ::= SEQUENCE { + iECriticality Criticality, + iE-ID ProtocolIE-ID, + typeOfError TypeOfError, + iE-Extensions ProtocolExtensionContainer {{CriticalityDiagnostics-IE-Item-ExtIEs}} OPTIONAL, + ... +} + +CriticalityDiagnostics-IE-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +-- D + +DataCodingScheme ::= BIT STRING (SIZE (8)) + +DCN-ID ::= INTEGER (0..65535) + +ServedDCNs ::= SEQUENCE (SIZE(0..maxnoofDCNs)) OF ServedDCNsItem + +ServedDCNsItem ::= SEQUENCE { + dCN-ID DCN-ID, + relativeDCNCapacity RelativeMMECapacity, + iE-Extensions ProtocolExtensionContainer { {ServedDCNsItem-ExtIEs} } OPTIONAL, + ... +} + +ServedDCNsItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DL-CP-SecurityInformation ::= SEQUENCE { + dl-NAS-MAC DL-NAS-MAC, + iE-Extensions ProtocolExtensionContainer { { DL-CP-SecurityInformation-ExtIEs} } OPTIONAL, + ... +} + +DL-CP-SecurityInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DL-Forwarding ::= ENUMERATED { + dL-Forwarding-proposed, + ... +} + +DL-NAS-MAC ::= BIT STRING (SIZE (16)) + +Direct-Forwarding-Path-Availability ::= ENUMERATED { + directPathAvailable, + ... +} + +Data-Forwarding-Not-Possible ::= ENUMERATED { + data-Forwarding-not-Possible, + ... +} + +DLNASPDUDeliveryAckRequest ::= ENUMERATED { + requested, + ... +} + +-- E + +EARFCN ::= INTEGER(0..maxEARFCN, ...) + +ECGIList ::= SEQUENCE (SIZE(1..maxnoofCellID)) OF EUTRAN-CGI + +PWSfailedECGIList ::= SEQUENCE (SIZE(1..maxnoofCellsineNB)) OF EUTRAN-CGI + +EmergencyAreaIDList ::= SEQUENCE (SIZE(1..maxnoofEmergencyAreaID)) OF EmergencyAreaID + +EmergencyAreaID ::= OCTET STRING (SIZE (3)) + +EmergencyAreaID-Broadcast ::= SEQUENCE (SIZE(1..maxnoofEmergencyAreaID)) OF EmergencyAreaID-Broadcast-Item + +EmergencyAreaID-Broadcast-Item ::= SEQUENCE { + emergencyAreaID EmergencyAreaID, + completedCellinEAI CompletedCellinEAI, + iE-Extensions ProtocolExtensionContainer { {EmergencyAreaID-Broadcast-Item-ExtIEs} } OPTIONAL, + ... +} + +EmergencyAreaID-Broadcast-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +EmergencyAreaID-Cancelled ::= SEQUENCE (SIZE(1..maxnoofEmergencyAreaID)) OF EmergencyAreaID-Cancelled-Item + +EmergencyAreaID-Cancelled-Item ::= SEQUENCE { + emergencyAreaID EmergencyAreaID, + cancelledCellinEAI CancelledCellinEAI, + iE-Extensions ProtocolExtensionContainer { {EmergencyAreaID-Cancelled-Item-ExtIEs} } OPTIONAL, + ... +} + +EmergencyAreaID-Cancelled-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CompletedCellinEAI ::= SEQUENCE (SIZE(1..maxnoofCellinEAI)) OF CompletedCellinEAI-Item + +CompletedCellinEAI-Item ::= SEQUENCE { + eCGI EUTRAN-CGI, + iE-Extensions ProtocolExtensionContainer { {CompletedCellinEAI-Item-ExtIEs} } OPTIONAL, + ... +} + +CompletedCellinEAI-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ECGI-List ::= SEQUENCE (SIZE(1..maxnoofCellsineNB)) OF EUTRAN-CGI + +EmergencyAreaIDListForRestart ::= SEQUENCE (SIZE(1..maxnoofRestartEmergencyAreaIDs)) OF EmergencyAreaID + +ENB-ID ::= CHOICE { + macroENB-ID BIT STRING (SIZE(20)), + homeENB-ID BIT STRING (SIZE(28)), + ... , + short-macroENB-ID BIT STRING (SIZE(18)), + long-macroENB-ID BIT STRING (SIZE(21)) +} + +GERAN-Cell-ID ::= SEQUENCE { + lAI LAI, + rAC RAC, + cI CI, + iE-Extensions ProtocolExtensionContainer { { GERAN-Cell-ID-ExtIEs} } OPTIONAL, + ... +} + +GERAN-Cell-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Global-ENB-ID ::= SEQUENCE { + pLMNidentity PLMNidentity, + eNB-ID ENB-ID, + iE-Extensions ProtocolExtensionContainer { {GlobalENB-ID-ExtIEs} } OPTIONAL, + ... +} + +GlobalENB-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GUMMEIList::= SEQUENCE (SIZE (1.. maxnoofMMECs)) OF GUMMEI + +ENB-StatusTransfer-TransparentContainer ::= SEQUENCE { + bearers-SubjectToStatusTransferList Bearers-SubjectToStatusTransferList, + iE-Extensions ProtocolExtensionContainer { {ENB-StatusTransfer-TransparentContainer-ExtIEs} } OPTIONAL, + ... +} + +ENB-StatusTransfer-TransparentContainer-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ENB-UE-S1AP-ID ::= INTEGER (0..16777215) + +ENBname ::= PrintableString (SIZE (1..150,...)) + +ENBX2TLAs ::= SEQUENCE (SIZE(1.. maxnoofeNBX2TLAs)) OF TransportLayerAddress + +EncryptionAlgorithms ::= BIT STRING (SIZE (16,...)) + +EnhancedCoverageRestricted ::= ENUMERATED { + restricted, + ... +} + +CE-ModeBRestricted ::= ENUMERATED { + restricted, + not-restricted, + ... +} + +EPLMNs ::= SEQUENCE (SIZE(1..maxnoofEPLMNs)) OF PLMNidentity +EventType ::= ENUMERATED { + direct, + change-of-serve-cell, + stop-change-of-serve-cell, + ... +} + +E-RAB-ID ::= INTEGER (0..15, ...) + +E-RABInformationList ::= SEQUENCE (SIZE (1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { { E-RABInformationListIEs } } + +E-RABInformationListIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABInformationListItem CRITICALITY ignore TYPE E-RABInformationListItem PRESENCE mandatory }, + ... +} + +E-RABInformationListItem ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + dL-Forwarding DL-Forwarding OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABInformationListItem-ExtIEs} } OPTIONAL, + ... +} + +E-RABInformationListItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABList ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABItemIEs} } + +E-RABItemIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABItem CRITICALITY ignore TYPE E-RABItem PRESENCE mandatory }, + ... +} + +E-RABItem ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + cause Cause, + iE-Extensions ProtocolExtensionContainer { {E-RABItem-ExtIEs} } OPTIONAL, + ... +} + +E-RABItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +E-RABLevelQoSParameters ::= SEQUENCE { + qCI QCI, + allocationRetentionPriority AllocationAndRetentionPriority, + gbrQosInformation GBR-QosInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABQoSParameters-ExtIEs} } OPTIONAL, + ... +} + +E-RABQoSParameters-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +EUTRAN-CGI ::= SEQUENCE { + pLMNidentity PLMNidentity, + cell-ID CellIdentity, + iE-Extensions ProtocolExtensionContainer { {EUTRAN-CGI-ExtIEs} } OPTIONAL, + ... +} + +EUTRAN-CGI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +EUTRANRoundTripDelayEstimationInfo ::= INTEGER (0..2047) + +ExpectedUEBehaviour ::= SEQUENCE { + expectedActivity ExpectedUEActivityBehaviour OPTIONAL, + expectedHOInterval ExpectedHOInterval OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { ExpectedUEBehaviour-ExtIEs} } OPTIONAL, + ... +} + +ExpectedUEBehaviour-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ExpectedUEActivityBehaviour ::= SEQUENCE { + expectedActivityPeriod ExpectedActivityPeriod OPTIONAL, + expectedIdlePeriod ExpectedIdlePeriod OPTIONAL, + sourceofUEActivityBehaviourInformation SourceOfUEActivityBehaviourInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { ExpectedUEActivityBehaviour-ExtIEs} } OPTIONAL, + ... +} + +ExpectedUEActivityBehaviour-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ExpectedActivityPeriod ::= INTEGER (1..30|40|50|60|80|100|120|150|180|181,...) + +ExpectedIdlePeriod ::= INTEGER (1..30|40|50|60|80|100|120|150|180|181,...) + +SourceOfUEActivityBehaviourInformation ::= ENUMERATED { + subscription-information, + statistics, + ... +} + +ExpectedHOInterval ::= ENUMERATED { + sec15, sec30, sec60, sec90, sec120, sec180, long-time, + ... +} + +ExtendedRNC-ID ::= INTEGER (4096..65535) + +ExtendedRepetitionPeriod ::= INTEGER (4096..131071) + +Extended-UEIdentityIndexValue ::= BIT STRING (SIZE (14)) + +-- F + +ForbiddenInterRATs ::= ENUMERATED { + all, + geran, + utran, + cdma2000, + ..., + geranandutran, + cdma2000andutran + +} + +ForbiddenTAs ::= SEQUENCE (SIZE(1.. maxnoofEPLMNsPlusOne)) OF ForbiddenTAs-Item + +ForbiddenTAs-Item ::= SEQUENCE { + pLMN-Identity PLMNidentity, + forbiddenTACs ForbiddenTACs, + iE-Extensions ProtocolExtensionContainer { {ForbiddenTAs-Item-ExtIEs} } OPTIONAL, + ... +} + +ForbiddenTAs-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ForbiddenTACs ::= SEQUENCE (SIZE(1..maxnoofForbTACs)) OF TAC + +ForbiddenLAs ::= SEQUENCE (SIZE(1..maxnoofEPLMNsPlusOne)) OF ForbiddenLAs-Item + +ForbiddenLAs-Item ::= SEQUENCE { + pLMN-Identity PLMNidentity, + forbiddenLACs ForbiddenLACs, + iE-Extensions ProtocolExtensionContainer { {ForbiddenLAs-Item-ExtIEs} } OPTIONAL, + ... +} + +ForbiddenLAs-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ForbiddenLACs ::= SEQUENCE (SIZE(1..maxnoofForbLACs)) OF LAC + +-- G + +GBR-QosInformation ::= SEQUENCE { + e-RAB-MaximumBitrateDL BitRate, + e-RAB-MaximumBitrateUL BitRate, + e-RAB-GuaranteedBitrateDL BitRate, + e-RAB-GuaranteedBitrateUL BitRate, + iE-Extensions ProtocolExtensionContainer { { GBR-QosInformation-ExtIEs} } OPTIONAL, + ... +} + +GBR-QosInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +GTP-TEID ::= OCTET STRING (SIZE (4)) + +GUMMEI ::= SEQUENCE { + pLMN-Identity PLMNidentity, + mME-Group-ID MME-Group-ID, + mME-Code MME-Code, + iE-Extensions ProtocolExtensionContainer { {GUMMEI-ExtIEs} } OPTIONAL, + ... +} + +GUMMEI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GUMMEIType ::= ENUMERATED { + native, + mapped, + ... +} + +GWContextReleaseIndication ::= ENUMERATED { + true, + ... +} + +-- H + +HandoverRestrictionList ::= SEQUENCE { + servingPLMN PLMNidentity, + equivalentPLMNs EPLMNs OPTIONAL, + forbiddenTAs ForbiddenTAs OPTIONAL, + forbiddenLAs ForbiddenLAs OPTIONAL, + forbiddenInterRATs ForbiddenInterRATs OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {HandoverRestrictionList-ExtIEs} } OPTIONAL, + ... +} + +HandoverRestrictionList-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +HandoverType ::= ENUMERATED { + intralte, + ltetoutran, + ltetogeran, + utrantolte, + gerantolte, + ... +} + +HFN ::= INTEGER (0..1048575) + +HFNModified ::= INTEGER (0..131071) + +HFNforPDCP-SNlength18 ::= INTEGER (0..16383) + +-- I + +Masked-IMEISV ::= BIT STRING (SIZE (64)) + +ImmediateMDT ::= SEQUENCE { + measurementsToActivate MeasurementsToActivate, + m1reportingTrigger M1ReportingTrigger, + m1thresholdeventA2 M1ThresholdEventA2 OPTIONAL, +-- Included in case of event-triggered, or event-triggered periodic reporting for measurement M1 + m1periodicReporting M1PeriodicReporting OPTIONAL, +-- Included in case of periodic or event-triggered periodic reporting + iE-Extensions ProtocolExtensionContainer { { ImmediateMDT-ExtIEs} } OPTIONAL, + ... +} + +ImmediateMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + { ID id-M3Configuration CRITICALITY ignore EXTENSION M3Configuration PRESENCE conditional}| + { ID id-M4Configuration CRITICALITY ignore EXTENSION M4Configuration PRESENCE conditional}| + { ID id-M5Configuration CRITICALITY ignore EXTENSION M5Configuration PRESENCE conditional}| + { ID id-MDT-Location-Info CRITICALITY ignore EXTENSION MDT-Location-Info PRESENCE optional}| + { ID id-M6Configuration CRITICALITY ignore EXTENSION M6Configuration PRESENCE conditional}| + { ID id-M7Configuration CRITICALITY ignore EXTENSION M7Configuration PRESENCE conditional}, + ... +} + +IMSI ::= OCTET STRING (SIZE (3..8)) + +InformationOnRecommendedCellsAndENBsForPaging ::= SEQUENCE { + recommendedCellsForPaging RecommendedCellsForPaging, + recommendENBsForPaging RecommendedENBsForPaging, + iE-Extensions ProtocolExtensionContainer { { InformationOnRecommendedCellsAndENBsForPaging-ExtIEs} } OPTIONAL, + ... +} + +InformationOnRecommendedCellsAndENBsForPaging-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IntegrityProtectionAlgorithms ::= BIT STRING (SIZE (16,...)) + +IntendedNumberOfPagingAttempts ::= INTEGER (1..16, ...) + +InterfacesToTrace ::= BIT STRING (SIZE (8)) + + + +-- J +-- K + +KillAllWarningMessages ::= ENUMERATED {true} + +-- L + + +LAC ::= OCTET STRING (SIZE (2)) + +LAI ::= SEQUENCE { + pLMNidentity PLMNidentity, + lAC LAC, + iE-Extensions ProtocolExtensionContainer { {LAI-ExtIEs} } OPTIONAL, + ... +} + +LAI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +LastVisitedCell-Item ::= CHOICE { + e-UTRAN-Cell LastVisitedEUTRANCellInformation, + uTRAN-Cell LastVisitedUTRANCellInformation, + gERAN-Cell LastVisitedGERANCellInformation, + ... +} +LastVisitedEUTRANCellInformation ::= SEQUENCE { + global-Cell-ID EUTRAN-CGI, + cellType CellType, + time-UE-StayedInCell Time-UE-StayedInCell, + iE-Extensions ProtocolExtensionContainer { { LastVisitedEUTRANCellInformation-ExtIEs} } OPTIONAL, + ... +} +LastVisitedEUTRANCellInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { +-- Extension for Rel-11 to support enhanced granularity for time UE stayed in cell -- + { ID id-Time-UE-StayedInCell-EnhancedGranularity CRITICALITY ignore EXTENSION Time-UE-StayedInCell-EnhancedGranularity PRESENCE optional}| + { ID id-HO-Cause CRITICALITY ignore EXTENSION Cause PRESENCE optional}, + ... +} +LastVisitedUTRANCellInformation ::= OCTET STRING + +LastVisitedGERANCellInformation ::= CHOICE { + undefined NULL, + ... +} + +L3-Information ::= OCTET STRING +-- This is a dummy IE used only as a reference to the actual definition in relevant specification. + +LPPa-PDU ::= OCTET STRING + +LHN-ID ::= OCTET STRING(SIZE (32..256)) + +Links-to-log ::= ENUMERATED {uplink, downlink, both-uplink-and-downlink, ...} + +ListeningSubframePattern ::= SEQUENCE { + pattern-period ENUMERATED {ms1280, ms2560, ms5120, ms10240, ...}, + pattern-offset INTEGER (0..10239, ...), + iE-Extensions ProtocolExtensionContainer { { ListeningSubframePattern-ExtIEs} } OPTIONAL, + ... +} + +ListeningSubframePattern-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { +... +} + +LoggedMDT ::= SEQUENCE { + loggingInterval LoggingInterval, + loggingDuration LoggingDuration, + iE-Extensions ProtocolExtensionContainer { {LoggedMDT-ExtIEs} } OPTIONAL, + ... +} + +LoggedMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { +... +} + +LoggingInterval ::= ENUMERATED {ms128, ms256, ms512, ms1024, ms2048, ms3072, ms4096, ms6144} + +LoggingDuration ::= ENUMERATED {m10, m20, m40, m60, m90, m120} + +LoggedMBSFNMDT ::= SEQUENCE { + loggingInterval LoggingInterval, + loggingDuration LoggingDuration, + mBSFN-ResultToLog MBSFN-ResultToLog OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { LoggedMBSFNMDT-ExtIEs } } OPTIONAL, + ... +} + +LoggedMBSFNMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- M + +M3Configuration ::= SEQUENCE { + m3period M3period, + iE-Extensions ProtocolExtensionContainer { { M3Configuration-ExtIEs} } OPTIONAL, + ... +} + +M3Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +M3period ::= ENUMERATED {ms100, ms1000, ms10000, ... } + +M4Configuration ::= SEQUENCE { + m4period M4period, + m4-links-to-log Links-to-log, + iE-Extensions ProtocolExtensionContainer { { M4Configuration-ExtIEs} } OPTIONAL, + ... +} + +M4Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +M4period ::= ENUMERATED {ms1024, ms2048, ms5120, ms10240, min1, ... } + +M5Configuration ::= SEQUENCE { + m5period M5period, + m5-links-to-log Links-to-log, + iE-Extensions ProtocolExtensionContainer { { M5Configuration-ExtIEs} } OPTIONAL, + ... +} + +M5Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +M5period ::= ENUMERATED {ms1024, ms2048, ms5120, ms10240, min1, ... } + +M6Configuration ::= SEQUENCE { + m6report-Interval M6report-Interval, + m6delay-threshold M6delay-threshold OPTIONAL, +-- This IE shall be present if the M6 Links to log IE is set to “uplink” or to “both-uplink-and-downlink” -- + m6-links-to-log Links-to-log, + iE-Extensions ProtocolExtensionContainer { { M6Configuration-ExtIEs} } OPTIONAL, + ... +} + +M6Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +M6report-Interval ::= ENUMERATED { ms1024, ms2048, ms5120, ms10240, ... } + +M6delay-threshold ::= ENUMERATED { ms30, ms40, ms50, ms60, ms70, ms80, ms90, ms100, ms150, ms300, ms500, ms750, ... } + +M7Configuration ::= SEQUENCE { + m7period M7period, + m7-links-to-log Links-to-log, + iE-Extensions ProtocolExtensionContainer { { M7Configuration-ExtIEs} } OPTIONAL, + ... +} + +M7Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +M7period ::= INTEGER(1..60, ...) + +MDT-Activation ::= ENUMERATED { + immediate-MDT-only, + immediate-MDT-and-Trace, + logged-MDT-only, + ..., + logged-MBSFN-MDT +} + +MDT-Location-Info ::= BIT STRING (SIZE (8)) + +MDT-Configuration ::= SEQUENCE { + mdt-Activation MDT-Activation, + areaScopeOfMDT AreaScopeOfMDT, + mDTMode MDTMode, + iE-Extensions ProtocolExtensionContainer { { MDT-Configuration-ExtIEs} } OPTIONAL, + ... +} +MDT-Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + { ID id-SignallingBasedMDTPLMNList CRITICALITY ignore EXTENSION MDTPLMNList PRESENCE optional }, + ... +} + +ManagementBasedMDTAllowed ::= ENUMERATED {allowed, ...} + +MBSFN-ResultToLog ::= SEQUENCE (SIZE(1..maxnoofMBSFNAreaMDT)) OF MBSFN-ResultToLogInfo + +MBSFN-ResultToLogInfo ::= SEQUENCE { + mBSFN-AreaId INTEGER (0..255) OPTIONAL, + carrierFreq EARFCN, + iE-Extensions ProtocolExtensionContainer { { MBSFN-ResultToLogInfo-ExtIEs} } OPTIONAL, + ... +} + +MBSFN-ResultToLogInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +MDTPLMNList ::= SEQUENCE (SIZE(1..maxnoofMDTPLMNs)) OF PLMNidentity + +PrivacyIndicator ::= ENUMERATED { + immediate-MDT, + logged-MDT, + ... +} + +MDTMode ::= CHOICE { + immediateMDT ImmediateMDT, + loggedMDT LoggedMDT, + ..., + mDTMode-Extension MDTMode-Extension +} + +MDTMode-Extension ::= ProtocolIE-SingleContainer {{ MDTMode-ExtensionIE }} + +MDTMode-ExtensionIE S1AP-PROTOCOL-IES ::= { + { ID id-LoggedMBSFNMDT CRITICALITY ignore TYPE LoggedMBSFNMDT PRESENCE mandatory} +} + +MeasurementsToActivate ::= BIT STRING (SIZE (8)) + +MeasurementThresholdA2 ::= CHOICE { + threshold-RSRP Threshold-RSRP, + threshold-RSRQ Threshold-RSRQ, + ... +} + +MessageIdentifier ::= BIT STRING (SIZE (16)) + +MobilityInformation ::= BIT STRING (SIZE(32)) + +MMEname ::= PrintableString (SIZE (1..150,...)) + +MMEPagingTarget ::= CHOICE { + global-ENB-ID Global-ENB-ID, + tAI TAI, + ... +} + +MMERelaySupportIndicator ::= ENUMERATED {true, ...} + +MME-Group-ID ::= OCTET STRING (SIZE (2)) + +MME-Code ::= OCTET STRING (SIZE (1)) + +MME-UE-S1AP-ID ::= INTEGER (0..4294967295) +M-TMSI ::= OCTET STRING (SIZE (4)) + +MSClassmark2 ::= OCTET STRING +MSClassmark3 ::= OCTET STRING + +MutingAvailabilityIndication ::= ENUMERATED { + available, + unavailable, + ... +} + + +MutingPatternInformation ::= SEQUENCE { + muting-pattern-period ENUMERATED {ms0, ms1280, ms2560, ms5120, ms10240, ...}, + muting-pattern-offset INTEGER (0..10239, ...) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {MutingPatternInformation-ExtIEs} } OPTIONAL, + ... +} + +MutingPatternInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- N + +NAS-PDU ::= OCTET STRING + +NASSecurityParametersfromE-UTRAN ::= OCTET STRING + +NASSecurityParameterstoE-UTRAN ::= OCTET STRING + +NB-IoT-DefaultPagingDRX ::= ENUMERATED { + v128, + v256, + v512, + v1024, + ... + } + +NB-IoT-Paging-eDRXInformation ::= SEQUENCE { + nB-IoT-paging-eDRX-Cycle NB-IoT-Paging-eDRX-Cycle, + nB-IoT-pagingTimeWindow NB-IoT-PagingTimeWindow OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { NB-IoT-Paging-eDRXInformation-ExtIEs} } OPTIONAL, + ... +} + +NB-IoT-Paging-eDRXInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NB-IoT-Paging-eDRX-Cycle ::= ENUMERATED{hf2, hf4, hf6, hf8, hf10, hf12, hf14, hf16, hf32, hf64, hf128, hf256, hf512, hf1024, ...} + +NB-IoT-PagingTimeWindow ::= ENUMERATED{s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, ...} + +NB-IoT-UEIdentityIndexValue ::= BIT STRING (SIZE (12)) + +NextPagingAreaScope ::= ENUMERATED { + same, + changed, + ... +} + +NumberofBroadcastRequest ::= INTEGER (0..65535) + +NumberOfBroadcasts ::= INTEGER (0..65535) + +-- O +OldBSS-ToNewBSS-Information ::= OCTET STRING +-- This is a dummy IE used only as a reference to the actual definition in relevant specification. + +OverloadAction ::= ENUMERATED { + reject-non-emergency-mo-dt, + reject-rrc-cr-signalling, + permit-emergency-sessions-and-mobile-terminated-services-only, + ..., + permit-high-priority-sessions-and-mobile-terminated-services-only, + reject-delay-tolerant-access, + permit-high-priority-sessions-and-exception-reporting-and-mobile-terminated-services-only, + not-accept-mo-data-or-delay-tolerant-access-from-CP-CIoT + +} + +OverloadResponse ::= CHOICE { + overloadAction OverloadAction, + ... +} + + +-- P + +PagingAttemptInformation ::= SEQUENCE { + pagingAttemptCount PagingAttemptCount, + intendedNumberOfPagingAttempts IntendedNumberOfPagingAttempts, + nextPagingAreaScope NextPagingAreaScope OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { PagingAttemptInformation-ExtIEs} } OPTIONAL, + ... +} + +PagingAttemptInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PagingAttemptCount ::= INTEGER (1..16, ...) + +Paging-eDRXInformation ::= SEQUENCE { + paging-eDRX-Cycle Paging-eDRX-Cycle, + pagingTimeWindow PagingTimeWindow OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Paging-eDRXInformation-ExtIEs} } OPTIONAL, + ... +} + +Paging-eDRXInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Paging-eDRX-Cycle ::= ENUMERATED{hfhalf, hf1, hf2, hf4, hf6, hf8, hf10, hf12, hf14, hf16, hf32, hf64, hf128, hf256, ...} + +PagingTimeWindow ::= ENUMERATED{s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, ...} + +PagingDRX ::= ENUMERATED { + v32, + v64, + v128, + v256, + ... + } + +PagingPriority ::= ENUMERATED { + priolevel1, + priolevel2, + priolevel3, + priolevel4, + priolevel5, + priolevel6, + priolevel7, + priolevel8, + ... +} + +PDCP-SN ::= INTEGER (0..4095) + +PDCP-SNExtended ::= INTEGER (0..32767) + +PDCP-SNlength18 ::= INTEGER (0..262143) + +PendingDataIndication ::= ENUMERATED { + true, + ... +} + +M1PeriodicReporting ::= SEQUENCE { + reportInterval ReportIntervalMDT, + reportAmount ReportAmountMDT, + iE-Extensions ProtocolExtensionContainer { { M1PeriodicReporting-ExtIEs} } OPTIONAL, + ... +} + +M1PeriodicReporting-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PLMNidentity ::= TBCD-STRING + +Port-Number ::= OCTET STRING (SIZE (2)) + +Pre-emptionCapability ::= ENUMERATED { + shall-not-trigger-pre-emption, + may-trigger-pre-emption +} + +Pre-emptionVulnerability ::= ENUMERATED { + not-pre-emptable, + pre-emptable +} + +PriorityLevel ::= INTEGER { spare (0), highest (1), lowest (14), no-priority (15) } (0..15) + +ProSeAuthorized ::= SEQUENCE { + proSeDirectDiscovery ProSeDirectDiscovery OPTIONAL, + proSeDirectCommunication ProSeDirectCommunication OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ProSeAuthorized-ExtIEs} } OPTIONAL, + ... +} + +ProSeAuthorized-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + { ID id-ProSeUEtoNetworkRelaying CRITICALITY ignore EXTENSION ProSeUEtoNetworkRelaying PRESENCE optional}, + ... +} + +ProSeDirectDiscovery ::= ENUMERATED { + authorized, + not-authorized, + ... +} + +ProSeUEtoNetworkRelaying ::= ENUMERATED { + authorized, + not-authorized, + ... +} + +ProSeDirectCommunication ::= ENUMERATED { + authorized, + not-authorized, + ... +} + +PS-ServiceNotAvailable ::= ENUMERATED { + ps-service-not-available, + ... +} + +-- Q + +QCI ::= INTEGER (0..255) + +-- R + +ReceiveStatusofULPDCPSDUs ::= BIT STRING (SIZE(4096)) + +ReceiveStatusOfULPDCPSDUsExtended ::= BIT STRING (SIZE(1..16384)) + +ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 ::= BIT STRING (SIZE(1..131072)) + +RecommendedCellsForPaging ::= SEQUENCE { + recommendedCellList RecommendedCellList, + iE-Extensions ProtocolExtensionContainer { { RecommendedCellsForPaging-ExtIEs} } OPTIONAL, + ... +} + +RecommendedCellsForPaging-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RecommendedCellList ::= SEQUENCE (SIZE(1.. maxnoofRecommendedCells)) OF ProtocolIE-SingleContainer { { RecommendedCellItemIEs } } + +RecommendedCellItemIEs S1AP-PROTOCOL-IES ::= { + { ID id-RecommendedCellItem CRITICALITY ignore TYPE RecommendedCellItem PRESENCE mandatory }, + ... +} + +RecommendedCellItem::= SEQUENCE { + eUTRAN-CGI EUTRAN-CGI, + timeStayedInCell INTEGER (0..4095) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { RecommendedCellsForPagingItem-ExtIEs} } OPTIONAL, + ... +} + +RecommendedCellsForPagingItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RecommendedENBsForPaging ::= SEQUENCE { + recommendedENBList RecommendedENBList, + iE-Extensions ProtocolExtensionContainer { { RecommendedENBsForPaging-ExtIEs} } OPTIONAL, + ... +} + +RecommendedENBsForPaging-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RecommendedENBList::= SEQUENCE (SIZE(1.. maxnoofRecommendedENBs)) OF ProtocolIE-SingleContainer { { RecommendedENBItemIEs } } + +RecommendedENBItemIEs S1AP-PROTOCOL-IES ::= { + { ID id-RecommendedENBItem CRITICALITY ignore TYPE RecommendedENBItem PRESENCE mandatory }, + ... +} + +RecommendedENBItem ::= SEQUENCE { + mMEPagingTarget MMEPagingTarget, + iE-Extensions ProtocolExtensionContainer { { RecommendedENBItem-ExtIEs} } OPTIONAL, + ... +} + +RecommendedENBItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RelativeMMECapacity ::= INTEGER (0..255) + +RelayNode-Indicator ::= ENUMERATED { + true, + ... +} + +RAC ::= OCTET STRING (SIZE (1)) + +RAT-Type ::= ENUMERATED { + nbiot, + ... +} + +ReportAmountMDT ::= ENUMERATED{r1, r2, r4, r8, r16, r32, r64, rinfinity} + +ReportIntervalMDT ::= ENUMERATED {ms120, ms240, ms480, ms640, ms1024, ms2048, ms5120, ms10240, min1, min6, min12, min30, min60} + +M1ReportingTrigger ::= ENUMERATED{ + periodic, + a2eventtriggered, + ..., + a2eventtriggered-periodic +} + +RequestType ::= SEQUENCE { + eventType EventType, + reportArea ReportArea, + iE-Extensions ProtocolExtensionContainer { { RequestType-ExtIEs} } OPTIONAL, + ... +} + + +RequestType-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RIMTransfer ::= SEQUENCE { + rIMInformation RIMInformation, + rIMRoutingAddress RIMRoutingAddress OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { RIMTransfer-ExtIEs} } OPTIONAL, + ... +} + +RIMTransfer-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RIMInformation ::= OCTET STRING + +RIMRoutingAddress ::= CHOICE { + gERAN-Cell-ID GERAN-Cell-ID, + ..., + targetRNC-ID TargetRNC-ID, + eHRPD-Sector-ID OCTET STRING (SIZE(16)) +} + +ReportArea ::= ENUMERATED { + ecgi, + ... +} + +RepetitionPeriod ::= INTEGER (0..4095) + +RLFReportInformation ::= SEQUENCE { + uE-RLF-Report-Container UE-RLF-Report-Container, + uE-RLF-Report-Container-for-extended-bands UE-RLF-Report-Container-for-extended-bands OPTIONAL, + iE-Extensions ProtocolExtensionContainer {{ RLFReportInformation-ExtIEs}} OPTIONAL, + ... +} + +RLFReportInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RNC-ID ::= INTEGER (0..4095) + +RRC-Container ::= OCTET STRING + +RRC-Establishment-Cause ::= ENUMERATED { + emergency, + highPriorityAccess, + mt-Access, + mo-Signalling, + mo-Data, + ..., + delay-TolerantAccess, + mo-VoiceCall, + mo-ExceptionData +} + +ECGIListForRestart ::= SEQUENCE (SIZE(1..maxnoofCellsforRestart)) OF EUTRAN-CGI + +Routing-ID ::= INTEGER (0..255) + +-- S + + +SecurityKey ::= BIT STRING (SIZE(256)) + + + +SecurityContext ::= SEQUENCE { + nextHopChainingCount INTEGER (0..7), + nextHopParameter SecurityKey, + iE-Extensions ProtocolExtensionContainer { { SecurityContext-ExtIEs} } OPTIONAL, + ... +} + + +SecurityContext-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SerialNumber ::= BIT STRING (SIZE (16)) + +SONInformation ::= CHOICE{ + sONInformationRequest SONInformationRequest, + sONInformationReply SONInformationReply, + ... +-- ..., +-- sONInformation-Extension SONInformation-Extension +} + +SONInformation-Extension ::= ProtocolIE-SingleContainer {{ SONInformation-ExtensionIE }} + +SONInformation-ExtensionIE S1AP-PROTOCOL-IES ::= { + { ID id-SON-Information-Report CRITICALITY ignore TYPE SONInformationReport PRESENCE mandatory} +} + +SONInformationRequest ::= ENUMERATED { + x2TNL-Configuration-Info, + ..., + time-Synchronisation-Info, + activate-Muting, + deactivate-Muting} + +SONInformationReply ::= SEQUENCE { + x2TNLConfigurationInfo X2TNLConfigurationInfo OPTIONAL, + iE-Extensions ProtocolExtensionContainer {{SONInformationReply-ExtIEs}} OPTIONAL, + ... +} + +SONInformationReply-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { +-- Extension for Release 9 to transfer Time synchronisation information -- + {ID id-Time-Synchronisation-Info CRITICALITY ignore EXTENSION TimeSynchronisationInfo PRESENCE optional}, + ..., + {ID id-Muting-Pattern-Information CRITICALITY ignore EXTENSION MutingPatternInformation PRESENCE optional} +} + +SONInformationReport ::= CHOICE{ + rLFReportInformation RLFReportInformation, + ... +} + +SONConfigurationTransfer ::= SEQUENCE { + targeteNB-ID TargeteNB-ID, + sourceeNB-ID SourceeNB-ID, + sONInformation SONInformation, + iE-Extensions ProtocolExtensionContainer { { SONConfigurationTransfer-ExtIEs} } OPTIONAL, +... +} + +SONConfigurationTransfer-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { +-- Extension for Release 10 to transfer the IP addresses of the eNB initiating the ANR action -- + {ID id-x2TNLConfigurationInfo CRITICALITY ignore EXTENSION X2TNLConfigurationInfo PRESENCE conditional + -- This IE shall be present if the SON Information IE contains the SON Information Request IE and the SON Information Request IE is set to “X2TNL Configuration Info” --}| +-- Extension for Release 12 to transfer information concerning the source cell of synchronisation and the aggressor cell -- + {ID id-Synchronisation-Information CRITICALITY ignore EXTENSION SynchronisationInformation PRESENCE conditional + -- This IE shall be present if the SON Information IE contains the SON Information Request IE set to “ Activate Muting ” --}, + ... +} + + +SynchronisationInformation ::= SEQUENCE { + sourceStratumLevel StratumLevel OPTIONAL, + listeningSubframePattern ListeningSubframePattern OPTIONAL, + aggressoreCGI-List ECGI-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {SynchronisationInformation-ExtIEs} } OPTIONAL, + ... +} + +SynchronisationInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +Source-ToTarget-TransparentContainer ::= OCTET STRING +-- This IE includes a transparent container from the source RAN node to the target RAN node. +-- The octets of the OCTET STRING are encoded according to the specifications of the target system. + +SourceBSS-ToTargetBSS-TransparentContainer ::= OCTET STRING +-- This is a dummy IE used only as a reference to the actual definition in relevant specification. + +SourceeNB-ID ::= SEQUENCE { + global-ENB-ID Global-ENB-ID, + selected-TAI TAI, + iE-Extensions ProtocolExtensionContainer { {SourceeNB-ID-ExtIEs} } OPTIONAL +} + +SourceeNB-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRVCCOperationNotPossible ::= ENUMERATED { + notPossible, + ... +} + +SRVCCOperationPossible ::= ENUMERATED { + possible, + ... +} + +SRVCCHOIndication ::= ENUMERATED { + pSandCS, + cSonly, + ... +} + +SourceeNB-ToTargeteNB-TransparentContainer ::= SEQUENCE { + rRC-Container RRC-Container, + e-RABInformationList E-RABInformationList OPTIONAL, + targetCell-ID EUTRAN-CGI, + subscriberProfileIDforRFP SubscriberProfileIDforRFP OPTIONAL, + uE-HistoryInformation UE-HistoryInformation, + iE-Extensions ProtocolExtensionContainer { {SourceeNB-ToTargeteNB-TransparentContainer-ExtIEs} } OPTIONAL, + ... +} + +SourceeNB-ToTargeteNB-TransparentContainer-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + {ID id-MobilityInformation CRITICALITY ignore EXTENSION MobilityInformation PRESENCE optional}| + {ID id-uE-HistoryInformationFromTheUE CRITICALITY ignore EXTENSION UE-HistoryInformationFromTheUE PRESENCE optional}, + ... +} + + +SourceRNC-ToTargetRNC-TransparentContainer ::= OCTET STRING +-- This is a dummy IE used only as a reference to the actual definition in relevant specification. + + +ServedGUMMEIs ::= SEQUENCE (SIZE (1.. maxnoofRATs)) OF ServedGUMMEIsItem + +ServedGUMMEIsItem ::= SEQUENCE { + servedPLMNs ServedPLMNs, + servedGroupIDs ServedGroupIDs, + servedMMECs ServedMMECs, + iE-Extensions ProtocolExtensionContainer { {ServedGUMMEIsItem-ExtIEs} } OPTIONAL, + ... +} + +ServedGUMMEIsItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ServedGroupIDs ::= SEQUENCE (SIZE(1.. maxnoofGroupIDs)) OF MME-Group-ID +ServedMMECs ::= SEQUENCE (SIZE(1.. maxnoofMMECs)) OF MME-Code + +ServedPLMNs ::= SEQUENCE (SIZE(1.. maxnoofPLMNsPerMME)) OF PLMNidentity + +SubscriberProfileIDforRFP ::= INTEGER (1..256) + +SupportedTAs ::= SEQUENCE (SIZE(1.. maxnoofTACs)) OF SupportedTAs-Item + +SupportedTAs-Item ::= SEQUENCE { + tAC TAC, + broadcastPLMNs BPLMNs, + iE-Extensions ProtocolExtensionContainer { {SupportedTAs-Item-ExtIEs} } OPTIONAL, + ... +} + +SupportedTAs-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + -- Extension for Release 13 to transfer RAT-Type per TAC -- + {ID id-RAT-Type CRITICALITY reject EXTENSION RAT-Type PRESENCE optional}, + ... +} + +StratumLevel ::= INTEGER (0..3, ...) + +SynchronisationStatus ::= ENUMERATED { synchronous, asynchronous, ... } + +TimeSynchronisationInfo ::= SEQUENCE { + stratumLevel StratumLevel, + synchronisationStatus SynchronisationStatus, + iE-Extensions ProtocolExtensionContainer { { TimeSynchronisationInfo-ExtIEs} } OPTIONAL, + ... +} + +TimeSynchronisationInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + -- Extension for Release 12 to transfer Muting Availability Indication -- + {ID id-Muting-Availability-Indication CRITICALITY ignore EXTENSION MutingAvailabilityIndication PRESENCE optional}, + ... +} + +S-TMSI ::= SEQUENCE { + mMEC MME-Code, + m-TMSI M-TMSI, + iE-Extensions ProtocolExtensionContainer { {S-TMSI-ExtIEs} } OPTIONAL, + ... +} + +S-TMSI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- T + +TAC ::= OCTET STRING (SIZE (2)) + +TAIBasedMDT ::= SEQUENCE { + tAIListforMDT TAIListforMDT, + iE-Extensions ProtocolExtensionContainer { {TAIBasedMDT-ExtIEs} } OPTIONAL, + ... +} + +TAIBasedMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TAIListforMDT ::= SEQUENCE (SIZE(1..maxnoofTAforMDT)) OF TAI + +TAIListforWarning ::= SEQUENCE (SIZE(1..maxnoofTAIforWarning)) OF TAI + +TAI ::= SEQUENCE { + pLMNidentity PLMNidentity, + tAC TAC, + iE-Extensions ProtocolExtensionContainer { {TAI-ExtIEs} } OPTIONAL, + ... +} + +TAI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TAI-Broadcast ::= SEQUENCE (SIZE(1..maxnoofTAIforWarning)) OF TAI-Broadcast-Item + +TAI-Broadcast-Item ::= SEQUENCE { + tAI TAI, + completedCellinTAI CompletedCellinTAI, + iE-Extensions ProtocolExtensionContainer { {TAI-Broadcast-Item-ExtIEs} } OPTIONAL, + ... +} + +TAI-Broadcast-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TAI-Cancelled ::= SEQUENCE (SIZE(1..maxnoofTAIforWarning)) OF TAI-Cancelled-Item + +TAI-Cancelled-Item ::= SEQUENCE { + tAI TAI, + cancelledCellinTAI CancelledCellinTAI, + iE-Extensions ProtocolExtensionContainer { {TAI-Cancelled-Item-ExtIEs} } OPTIONAL, + ... +} + +TAI-Cancelled-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TABasedMDT ::= SEQUENCE { + tAListforMDT TAListforMDT, + iE-Extensions ProtocolExtensionContainer { {TABasedMDT-ExtIEs} } OPTIONAL, + ... +} + +TABasedMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TAListforMDT ::= SEQUENCE (SIZE(1..maxnoofTAforMDT)) OF TAC + +CompletedCellinTAI ::= SEQUENCE (SIZE(1..maxnoofCellinTAI)) OF CompletedCellinTAI-Item + +CompletedCellinTAI-Item ::= SEQUENCE{ + eCGI EUTRAN-CGI, + iE-Extensions ProtocolExtensionContainer { {CompletedCellinTAI-Item-ExtIEs} } OPTIONAL, + ... +} + +CompletedCellinTAI-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TBCD-STRING ::= OCTET STRING (SIZE (3)) + +TargetID ::= CHOICE { + targeteNB-ID TargeteNB-ID, + targetRNC-ID TargetRNC-ID, + cGI CGI, + ... +} + +TargeteNB-ID ::= SEQUENCE { + global-ENB-ID Global-ENB-ID, + selected-TAI TAI, + iE-Extensions ProtocolExtensionContainer { {TargeteNB-ID-ExtIEs} } OPTIONAL, + ... +} + +TargeteNB-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TargetRNC-ID ::= SEQUENCE { + lAI LAI, + rAC RAC OPTIONAL, + rNC-ID RNC-ID, + extendedRNC-ID ExtendedRNC-ID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {TargetRNC-ID-ExtIEs} } OPTIONAL, + ... + } + + +TargetRNC-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +TargeteNB-ToSourceeNB-TransparentContainer ::= SEQUENCE { + rRC-Container RRC-Container, + iE-Extensions ProtocolExtensionContainer { {TargeteNB-ToSourceeNB-TransparentContainer-ExtIEs} } OPTIONAL, + ... +} + +TargeteNB-ToSourceeNB-TransparentContainer-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Target-ToSource-TransparentContainer ::= OCTET STRING +-- This IE includes a transparent container from the target RAN node to the source RAN node. +-- The octets of the OCTET STRING are coded according to the specifications of the target system. + +TargetRNC-ToSourceRNC-TransparentContainer ::= OCTET STRING +-- This is a dummy IE used only as a reference to the actual definition in relevant specification. + +TargetBSS-ToSourceBSS-TransparentContainer ::= OCTET STRING +-- This is a dummy IE used only as a reference to the actual definition in relevant specification. + +M1ThresholdEventA2 ::= SEQUENCE { + measurementThreshold MeasurementThresholdA2, + iE-Extensions ProtocolExtensionContainer { { M1ThresholdEventA2-ExtIEs} } OPTIONAL, + ... +} + +M1ThresholdEventA2-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Threshold-RSRP ::= INTEGER(0..97) + +Threshold-RSRQ ::= INTEGER(0..34) + +TimeToWait ::= ENUMERATED {v1s, v2s, v5s, v10s, v20s, v60s, ...} + +Time-UE-StayedInCell ::= INTEGER (0..4095) + +Time-UE-StayedInCell-EnhancedGranularity ::= INTEGER (0..40950) + +TransportInformation ::= SEQUENCE { + transportLayerAddress TransportLayerAddress, + uL-GTP-TEID GTP-TEID, + ... +} + +TransportLayerAddress ::= BIT STRING (SIZE(1..160, ...)) + +TraceActivation ::= SEQUENCE { + e-UTRAN-Trace-ID E-UTRAN-Trace-ID, + interfacesToTrace InterfacesToTrace, + traceDepth TraceDepth, + traceCollectionEntityIPAddress TransportLayerAddress, + iE-Extensions ProtocolExtensionContainer { { TraceActivation-ExtIEs} } OPTIONAL, + ... +} + +TraceActivation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { +-- Extension for Rel-10 to support MDT -- + { ID id-MDTConfiguration CRITICALITY ignore EXTENSION MDT-Configuration PRESENCE optional }, + ... +} + +TraceDepth ::= ENUMERATED { + minimum, + medium, + maximum, + minimumWithoutVendorSpecificExtension, + mediumWithoutVendorSpecificExtension, + maximumWithoutVendorSpecificExtension, + ... +} + +E-UTRAN-Trace-ID ::= OCTET STRING (SIZE (8)) + +TrafficLoadReductionIndication ::= INTEGER (1..99) + +TunnelInformation ::= SEQUENCE { + transportLayerAddress TransportLayerAddress, + uDP-Port-Number Port-Number OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {Tunnel-Information-ExtIEs} } OPTIONAL, + ... +} + +Tunnel-Information-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TypeOfError ::= ENUMERATED { + not-understood, + missing, + ... +} + +TAIListForRestart ::= SEQUENCE (SIZE(1..maxnoofRestartTAIs)) OF TAI + +-- U + +UEAggregateMaximumBitrate ::= SEQUENCE { + uEaggregateMaximumBitRateDL BitRate, + uEaggregateMaximumBitRateUL BitRate, + iE-Extensions ProtocolExtensionContainer { {UEAggregate-MaximumBitrates-ExtIEs} } OPTIONAL, + ... +} + +UEAggregate-MaximumBitrates-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UE-RetentionInformation ::= ENUMERATED { + ues-retained, + ...} + +UE-S1AP-IDs ::= CHOICE{ + uE-S1AP-ID-pair UE-S1AP-ID-pair, + mME-UE-S1AP-ID MME-UE-S1AP-ID, + ... +} + +UE-S1AP-ID-pair ::= SEQUENCE{ + mME-UE-S1AP-ID MME-UE-S1AP-ID, + eNB-UE-S1AP-ID ENB-UE-S1AP-ID, + iE-Extensions ProtocolExtensionContainer { {UE-S1AP-ID-pair-ExtIEs} } OPTIONAL, + ... +} +UE-S1AP-ID-pair-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +UE-associatedLogicalS1-ConnectionItem ::= SEQUENCE { + mME-UE-S1AP-ID MME-UE-S1AP-ID OPTIONAL, + eNB-UE-S1AP-ID ENB-UE-S1AP-ID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { UE-associatedLogicalS1-ConnectionItemExtIEs} } OPTIONAL, + ... +} + + +UE-associatedLogicalS1-ConnectionItemExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UEIdentityIndexValue ::= BIT STRING (SIZE (10)) + +UE-HistoryInformation ::= SEQUENCE (SIZE(1..maxnoofCells)) OF LastVisitedCell-Item + +UE-HistoryInformationFromTheUE ::= OCTET STRING +-- This IE is a transparent container and shall be encoded as the VisitedCellInfoList field contained in the UEInformationResponse message as defined in TS 36.331 [16] + +UEPagingID ::= CHOICE { + s-TMSI S-TMSI, + iMSI IMSI, + ... + } + +UERadioCapability ::= OCTET STRING + +UERadioCapabilityForPaging ::= OCTET STRING + +UE-RLF-Report-Container ::= OCTET STRING +-- This IE is a transparent container and shall be encoded as the rlf-Report-r9 field contained in the UEInformationResponse message as defined in TS 36.331 [16] + +UE-RLF-Report-Container-for-extended-bands ::= OCTET STRING +-- This IE is a transparent container and shall be encoded as the rlf-Report-v9e0 contained in the UEInformationResponse message as defined in TS 36.331 [16] + +UESecurityCapabilities ::= SEQUENCE { + encryptionAlgorithms EncryptionAlgorithms, + integrityProtectionAlgorithms IntegrityProtectionAlgorithms, + iE-Extensions ProtocolExtensionContainer { { UESecurityCapabilities-ExtIEs} } OPTIONAL, +... +} + +UESecurityCapabilities-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UESidelinkAggregateMaximumBitrate ::= SEQUENCE { + uESidelinkAggregateMaximumBitRate BitRate, + iE-Extensions ProtocolExtensionContainer { {UE-Sidelink-Aggregate-MaximumBitrates-ExtIEs} } OPTIONAL, + ... +} + +UE-Sidelink-Aggregate-MaximumBitrates-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UE-Usage-Type ::= INTEGER (0..255) + +UL-CP-SecurityInformation ::= SEQUENCE { + ul-NAS-MAC UL-NAS-MAC, + ul-NAS-Count UL-NAS-Count, + iE-Extensions ProtocolExtensionContainer { { UL-CP-SecurityInformation-ExtIEs} } OPTIONAL, + ... +} + +UL-CP-SecurityInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UL-NAS-MAC ::= BIT STRING (SIZE (16)) + +UL-NAS-Count ::= BIT STRING (SIZE (5)) + + +UserLocationInformation ::= SEQUENCE { + eutran-cgi EUTRAN-CGI, + tai TAI, + iE-Extensions ProtocolExtensionContainer { { UserLocationInformation-ExtIEs} } OPTIONAL, + ... +} + +UserLocationInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UEUserPlaneCIoTSupportIndicator ::= ENUMERATED { + supported, + ... +} + +-- V + +VoiceSupportMatchIndicator ::= ENUMERATED { + supported, + not-supported, + ... +} + +V2XServicesAuthorized ::= SEQUENCE { + vehicleUE VehicleUE OPTIONAL, + pedestrianUE PedestrianUE OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {V2XServicesAuthorized-ExtIEs} } OPTIONAL, + ... +} + +V2XServicesAuthorized-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +VehicleUE ::= ENUMERATED { + authorized, + not-authorized, + ... +} + +PedestrianUE ::= ENUMERATED { + authorized, + not-authorized, + ... +} + +-- W + +WarningAreaList ::= CHOICE { + cellIDList ECGIList, + trackingAreaListforWarning TAIListforWarning, + emergencyAreaIDList EmergencyAreaIDList, + ... +} + + +WarningType ::= OCTET STRING (SIZE (2)) + +WarningSecurityInfo ::= OCTET STRING (SIZE (50)) + + +WarningMessageContents ::= OCTET STRING (SIZE(1..9600)) + + +-- X + + +X2TNLConfigurationInfo ::= SEQUENCE { + eNBX2TransportLayerAddresses ENBX2TLAs, + iE-Extensions ProtocolExtensionContainer { { X2TNLConfigurationInfo-ExtIEs} } OPTIONAL, + ... +} + +X2TNLConfigurationInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { +-- Extension for Release 10 to transfer the IPsec and U-plane addresses during ANR action -- + {ID id-eNBX2ExtendedTransportLayerAddresses CRITICALITY ignore EXTENSION ENBX2ExtTLAs PRESENCE optional}| +-- Extension for Release 12 to transfer the IP addresses of the X2 GW -- + {ID id-eNBIndirectX2TransportLayerAddresses CRITICALITY ignore EXTENSION ENBIndirectX2TransportLayerAddresses PRESENCE optional}, + ... +} + +ENBX2ExtTLAs ::= SEQUENCE (SIZE(1.. maxnoofeNBX2ExtTLAs)) OF ENBX2ExtTLA + +ENBX2ExtTLA ::= SEQUENCE { + iPsecTLA TransportLayerAddress OPTIONAL, + gTPTLAa ENBX2GTPTLAs OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { ENBX2ExtTLA-ExtIEs} } OPTIONAL, + ... +} + +ENBX2ExtTLA-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ENBX2GTPTLAs ::= SEQUENCE (SIZE(1.. maxnoofeNBX2GTPTLAs)) OF TransportLayerAddress + +ENBIndirectX2TransportLayerAddresses ::= SEQUENCE (SIZE(1..maxnoofeNBX2TLAs)) OF TransportLayerAddress + +-- Y +-- Z + +END + + + +-- ************************************************************** +-- +-- Common definitions +-- +-- ************************************************************** + +S1AP-CommonDataTypes { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-CommonDataTypes (3) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +Criticality ::= ENUMERATED { reject, ignore, notify } + +Presence ::= ENUMERATED { optional, conditional, mandatory } + +PrivateIE-ID ::= CHOICE { + local INTEGER (0..65535), + global OBJECT IDENTIFIER +} + +ProcedureCode ::= INTEGER (0..255) + +ProtocolExtensionID ::= INTEGER (0..65535) + +ProtocolIE-ID ::= INTEGER (0..65535) + +TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessfull-outcome } + +END + + +-- ************************************************************** +-- +-- Constant definitions +-- +-- ************************************************************** + +S1AP-Constants { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-Constants (4) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + ProcedureCode, + ProtocolIE-ID + +FROM S1AP-CommonDataTypes; + + +-- ************************************************************** +-- +-- Elementary Procedures +-- +-- ************************************************************** + +id-HandoverPreparation ProcedureCode ::= 0 +id-HandoverResourceAllocation ProcedureCode ::= 1 +id-HandoverNotification ProcedureCode ::= 2 +id-PathSwitchRequest ProcedureCode ::= 3 +id-HandoverCancel ProcedureCode ::= 4 +id-E-RABSetup ProcedureCode ::= 5 +id-E-RABModify ProcedureCode ::= 6 +id-E-RABRelease ProcedureCode ::= 7 +id-E-RABReleaseIndication ProcedureCode ::= 8 +id-InitialContextSetup ProcedureCode ::= 9 +id-Paging ProcedureCode ::= 10 +id-downlinkNASTransport ProcedureCode ::= 11 +id-initialUEMessage ProcedureCode ::= 12 +id-uplinkNASTransport ProcedureCode ::= 13 +id-Reset ProcedureCode ::= 14 +id-ErrorIndication ProcedureCode ::= 15 +id-NASNonDeliveryIndication ProcedureCode ::= 16 +id-S1Setup ProcedureCode ::= 17 +id-UEContextReleaseRequest ProcedureCode ::= 18 +id-DownlinkS1cdma2000tunnelling ProcedureCode ::= 19 +id-UplinkS1cdma2000tunnelling ProcedureCode ::= 20 +id-UEContextModification ProcedureCode ::= 21 +id-UECapabilityInfoIndication ProcedureCode ::= 22 +id-UEContextRelease ProcedureCode ::= 23 +id-eNBStatusTransfer ProcedureCode ::= 24 +id-MMEStatusTransfer ProcedureCode ::= 25 +id-DeactivateTrace ProcedureCode ::= 26 +id-TraceStart ProcedureCode ::= 27 +id-TraceFailureIndication ProcedureCode ::= 28 +id-ENBConfigurationUpdate ProcedureCode ::= 29 +id-MMEConfigurationUpdate ProcedureCode ::= 30 +id-LocationReportingControl ProcedureCode ::= 31 +id-LocationReportingFailureIndication ProcedureCode ::= 32 +id-LocationReport ProcedureCode ::= 33 +id-OverloadStart ProcedureCode ::= 34 +id-OverloadStop ProcedureCode ::= 35 +id-WriteReplaceWarning ProcedureCode ::= 36 +id-eNBDirectInformationTransfer ProcedureCode ::= 37 +id-MMEDirectInformationTransfer ProcedureCode ::= 38 +id-PrivateMessage ProcedureCode ::= 39 +id-eNBConfigurationTransfer ProcedureCode ::= 40 +id-MMEConfigurationTransfer ProcedureCode ::= 41 +id-CellTrafficTrace ProcedureCode ::= 42 +id-Kill ProcedureCode ::= 43 +id-downlinkUEAssociatedLPPaTransport ProcedureCode ::= 44 +id-uplinkUEAssociatedLPPaTransport ProcedureCode ::= 45 +id-downlinkNonUEAssociatedLPPaTransport ProcedureCode ::= 46 +id-uplinkNonUEAssociatedLPPaTransport ProcedureCode ::= 47 +id-UERadioCapabilityMatch ProcedureCode ::= 48 +id-PWSRestartIndication ProcedureCode ::= 49 +id-E-RABModificationIndication ProcedureCode ::= 50 +id-PWSFailureIndication ProcedureCode ::= 51 +id-RerouteNASRequest ProcedureCode ::= 52 +id-UEContextModificationIndication ProcedureCode ::= 53 +id-ConnectionEstablishmentIndication ProcedureCode ::= 54 +id-UEContextSuspend ProcedureCode ::= 55 +id-UEContextResume ProcedureCode ::= 56 +id-NASDeliveryIndication ProcedureCode ::= 57 +id-RetrieveUEInformation ProcedureCode ::= 58 +id-UEInformationTransfer ProcedureCode ::= 59 +id-eNBCPRelocationIndication ProcedureCode ::= 60 +id-MMECPRelocationIndication ProcedureCode ::= 61 + +-- ************************************************************** +-- +-- Extension constants +-- +-- ************************************************************** + +maxPrivateIEs INTEGER ::= 65535 +maxProtocolExtensions INTEGER ::= 65535 +maxProtocolIEs INTEGER ::= 65535 +-- ************************************************************** +-- +-- Lists +-- +-- ************************************************************** + +maxnoofCSGs INTEGER ::= 256 +maxnoofE-RABs INTEGER ::= 256 +maxnoofTAIs INTEGER ::= 256 +maxnoofTACs INTEGER ::= 256 +maxnoofErrors INTEGER ::= 256 +maxnoofBPLMNs INTEGER ::= 6 +maxnoofPLMNsPerMME INTEGER ::= 32 +maxnoofEPLMNs INTEGER ::= 15 +maxnoofEPLMNsPlusOne INTEGER ::= 16 +maxnoofForbLACs INTEGER ::= 4096 +maxnoofForbTACs INTEGER ::= 4096 +maxnoofIndividualS1ConnectionsToReset INTEGER ::= 256 +maxnoofCells INTEGER ::= 16 +maxnoofCellsineNB INTEGER ::= 256 +maxnoofTAIforWarning INTEGER ::= 65535 +maxnoofCellID INTEGER ::= 65535 +maxnoofDCNs INTEGER ::= 32 +maxnoofEmergencyAreaID INTEGER ::= 65535 +maxnoofCellinTAI INTEGER ::= 65535 +maxnoofCellinEAI INTEGER ::= 65535 +maxnoofeNBX2TLAs INTEGER ::= 2 +maxnoofeNBX2ExtTLAs INTEGER ::= 16 +maxnoofeNBX2GTPTLAs INTEGER ::= 16 +maxnoofRATs INTEGER ::= 8 +maxnoofGroupIDs INTEGER ::= 65535 +maxnoofMMECs INTEGER ::= 256 +maxnoofCellIDforMDT INTEGER ::= 32 +maxnoofTAforMDT INTEGER ::= 8 +maxnoofMDTPLMNs INTEGER ::= 16 +maxnoofCellsforRestart INTEGER ::= 256 +maxnoofRestartTAIs INTEGER ::= 2048 +maxnoofRestartEmergencyAreaIDs INTEGER ::= 256 +maxEARFCN INTEGER ::= 262143 +maxnoofMBSFNAreaMDT INTEGER ::= 8 +maxnoofRecommendedCells INTEGER ::= 16 +maxnoofRecommendedENBs INTEGER ::= 16 + +-- ************************************************************** +-- +-- IEs +-- +-- ************************************************************** + +id-MME-UE-S1AP-ID ProtocolIE-ID ::= 0 +id-HandoverType ProtocolIE-ID ::= 1 +id-Cause ProtocolIE-ID ::= 2 +id-SourceID ProtocolIE-ID ::= 3 +id-TargetID ProtocolIE-ID ::= 4 +id-eNB-UE-S1AP-ID ProtocolIE-ID ::= 8 +id-E-RABSubjecttoDataForwardingList ProtocolIE-ID ::= 12 +id-E-RABtoReleaseListHOCmd ProtocolIE-ID ::= 13 +id-E-RABDataForwardingItem ProtocolIE-ID ::= 14 +id-E-RABReleaseItemBearerRelComp ProtocolIE-ID ::= 15 +id-E-RABToBeSetupListBearerSUReq ProtocolIE-ID ::= 16 +id-E-RABToBeSetupItemBearerSUReq ProtocolIE-ID ::= 17 +id-E-RABAdmittedList ProtocolIE-ID ::= 18 +id-E-RABFailedToSetupListHOReqAck ProtocolIE-ID ::= 19 +id-E-RABAdmittedItem ProtocolIE-ID ::= 20 +id-E-RABFailedtoSetupItemHOReqAck ProtocolIE-ID ::= 21 +id-E-RABToBeSwitchedDLList ProtocolIE-ID ::= 22 +id-E-RABToBeSwitchedDLItem ProtocolIE-ID ::= 23 +id-E-RABToBeSetupListCtxtSUReq ProtocolIE-ID ::= 24 +id-TraceActivation ProtocolIE-ID ::= 25 +id-NAS-PDU ProtocolIE-ID ::= 26 +id-E-RABToBeSetupItemHOReq ProtocolIE-ID ::= 27 +id-E-RABSetupListBearerSURes ProtocolIE-ID ::= 28 +id-E-RABFailedToSetupListBearerSURes ProtocolIE-ID ::= 29 +id-E-RABToBeModifiedListBearerModReq ProtocolIE-ID ::= 30 +id-E-RABModifyListBearerModRes ProtocolIE-ID ::= 31 +id-E-RABFailedToModifyList ProtocolIE-ID ::= 32 +id-E-RABToBeReleasedList ProtocolIE-ID ::= 33 +id-E-RABFailedToReleaseList ProtocolIE-ID ::= 34 +id-E-RABItem ProtocolIE-ID ::= 35 +id-E-RABToBeModifiedItemBearerModReq ProtocolIE-ID ::= 36 +id-E-RABModifyItemBearerModRes ProtocolIE-ID ::= 37 +id-E-RABReleaseItem ProtocolIE-ID ::= 38 +id-E-RABSetupItemBearerSURes ProtocolIE-ID ::= 39 +id-SecurityContext ProtocolIE-ID ::= 40 +id-HandoverRestrictionList ProtocolIE-ID ::= 41 +id-UEPagingID ProtocolIE-ID ::= 43 +id-pagingDRX ProtocolIE-ID ::= 44 +id-TAIList ProtocolIE-ID ::= 46 +id-TAIItem ProtocolIE-ID ::= 47 +id-E-RABFailedToSetupListCtxtSURes ProtocolIE-ID ::= 48 +id-E-RABReleaseItemHOCmd ProtocolIE-ID ::= 49 +id-E-RABSetupItemCtxtSURes ProtocolIE-ID ::= 50 +id-E-RABSetupListCtxtSURes ProtocolIE-ID ::= 51 +id-E-RABToBeSetupItemCtxtSUReq ProtocolIE-ID ::= 52 +id-E-RABToBeSetupListHOReq ProtocolIE-ID ::= 53 +id-GERANtoLTEHOInformationRes ProtocolIE-ID ::= 55 +id-UTRANtoLTEHOInformationRes ProtocolIE-ID ::= 57 +id-CriticalityDiagnostics ProtocolIE-ID ::= 58 +id-Global-ENB-ID ProtocolIE-ID ::= 59 +id-eNBname ProtocolIE-ID ::= 60 +id-MMEname ProtocolIE-ID ::= 61 +id-ServedPLMNs ProtocolIE-ID ::= 63 +id-SupportedTAs ProtocolIE-ID ::= 64 +id-TimeToWait ProtocolIE-ID ::= 65 +id-uEaggregateMaximumBitrate ProtocolIE-ID ::= 66 +id-TAI ProtocolIE-ID ::= 67 +id-E-RABReleaseListBearerRelComp ProtocolIE-ID ::= 69 +id-cdma2000PDU ProtocolIE-ID ::= 70 +id-cdma2000RATType ProtocolIE-ID ::= 71 +id-cdma2000SectorID ProtocolIE-ID ::= 72 +id-SecurityKey ProtocolIE-ID ::= 73 +id-UERadioCapability ProtocolIE-ID ::= 74 +id-GUMMEI-ID ProtocolIE-ID ::= 75 +id-E-RABInformationListItem ProtocolIE-ID ::= 78 +id-Direct-Forwarding-Path-Availability ProtocolIE-ID ::= 79 +id-UEIdentityIndexValue ProtocolIE-ID ::= 80 +id-cdma2000HOStatus ProtocolIE-ID ::= 83 +id-cdma2000HORequiredIndication ProtocolIE-ID ::= 84 +id-E-UTRAN-Trace-ID ProtocolIE-ID ::= 86 +id-RelativeMMECapacity ProtocolIE-ID ::= 87 +id-SourceMME-UE-S1AP-ID ProtocolIE-ID ::= 88 +id-Bearers-SubjectToStatusTransfer-Item ProtocolIE-ID ::= 89 +id-eNB-StatusTransfer-TransparentContainer ProtocolIE-ID ::= 90 +id-UE-associatedLogicalS1-ConnectionItem ProtocolIE-ID ::= 91 +id-ResetType ProtocolIE-ID ::= 92 +id-UE-associatedLogicalS1-ConnectionListResAck ProtocolIE-ID ::= 93 +id-E-RABToBeSwitchedULItem ProtocolIE-ID ::= 94 +id-E-RABToBeSwitchedULList ProtocolIE-ID ::= 95 +id-S-TMSI ProtocolIE-ID ::= 96 +id-cdma2000OneXRAND ProtocolIE-ID ::= 97 +id-RequestType ProtocolIE-ID ::= 98 +id-UE-S1AP-IDs ProtocolIE-ID ::= 99 +id-EUTRAN-CGI ProtocolIE-ID ::= 100 +id-OverloadResponse ProtocolIE-ID ::= 101 +id-cdma2000OneXSRVCCInfo ProtocolIE-ID ::= 102 +id-E-RABFailedToBeReleasedList ProtocolIE-ID ::= 103 +id-Source-ToTarget-TransparentContainer ProtocolIE-ID ::= 104 +id-ServedGUMMEIs ProtocolIE-ID ::= 105 +id-SubscriberProfileIDforRFP ProtocolIE-ID ::= 106 +id-UESecurityCapabilities ProtocolIE-ID ::= 107 +id-CSFallbackIndicator ProtocolIE-ID ::= 108 +id-CNDomain ProtocolIE-ID ::= 109 +id-E-RABReleasedList ProtocolIE-ID ::= 110 +id-MessageIdentifier ProtocolIE-ID ::= 111 +id-SerialNumber ProtocolIE-ID ::= 112 +id-WarningAreaList ProtocolIE-ID ::= 113 +id-RepetitionPeriod ProtocolIE-ID ::= 114 +id-NumberofBroadcastRequest ProtocolIE-ID ::= 115 +id-WarningType ProtocolIE-ID ::= 116 +id-WarningSecurityInfo ProtocolIE-ID ::= 117 +id-DataCodingScheme ProtocolIE-ID ::= 118 +id-WarningMessageContents ProtocolIE-ID ::= 119 +id-BroadcastCompletedAreaList ProtocolIE-ID ::= 120 +id-Inter-SystemInformationTransferTypeEDT ProtocolIE-ID ::= 121 +id-Inter-SystemInformationTransferTypeMDT ProtocolIE-ID ::= 122 +id-Target-ToSource-TransparentContainer ProtocolIE-ID ::= 123 +id-SRVCCOperationPossible ProtocolIE-ID ::= 124 +id-SRVCCHOIndication ProtocolIE-ID ::= 125 +id-NAS-DownlinkCount ProtocolIE-ID ::= 126 +id-CSG-Id ProtocolIE-ID ::= 127 +id-CSG-IdList ProtocolIE-ID ::= 128 +id-SONConfigurationTransferECT ProtocolIE-ID ::= 129 +id-SONConfigurationTransferMCT ProtocolIE-ID ::= 130 +id-TraceCollectionEntityIPAddress ProtocolIE-ID ::= 131 +id-MSClassmark2 ProtocolIE-ID ::= 132 +id-MSClassmark3 ProtocolIE-ID ::= 133 +id-RRC-Establishment-Cause ProtocolIE-ID ::= 134 +id-NASSecurityParametersfromE-UTRAN ProtocolIE-ID ::= 135 +id-NASSecurityParameterstoE-UTRAN ProtocolIE-ID ::= 136 +id-DefaultPagingDRX ProtocolIE-ID ::= 137 +id-Source-ToTarget-TransparentContainer-Secondary ProtocolIE-ID ::= 138 +id-Target-ToSource-TransparentContainer-Secondary ProtocolIE-ID ::= 139 +id-EUTRANRoundTripDelayEstimationInfo ProtocolIE-ID ::= 140 +id-BroadcastCancelledAreaList ProtocolIE-ID ::= 141 +id-ConcurrentWarningMessageIndicator ProtocolIE-ID ::= 142 +id-Data-Forwarding-Not-Possible ProtocolIE-ID ::= 143 +id-ExtendedRepetitionPeriod ProtocolIE-ID ::= 144 +id-CellAccessMode ProtocolIE-ID ::= 145 +id-CSGMembershipStatus ProtocolIE-ID ::= 146 +id-LPPa-PDU ProtocolIE-ID ::= 147 +id-Routing-ID ProtocolIE-ID ::= 148 +id-Time-Synchronisation-Info ProtocolIE-ID ::= 149 +id-PS-ServiceNotAvailable ProtocolIE-ID ::= 150 +id-PagingPriority ProtocolIE-ID ::= 151 +id-x2TNLConfigurationInfo ProtocolIE-ID ::= 152 +id-eNBX2ExtendedTransportLayerAddresses ProtocolIE-ID ::= 153 +id-GUMMEIList ProtocolIE-ID ::= 154 +id-GW-TransportLayerAddress ProtocolIE-ID ::= 155 +id-Correlation-ID ProtocolIE-ID ::= 156 +id-SourceMME-GUMMEI ProtocolIE-ID ::= 157 +id-MME-UE-S1AP-ID-2 ProtocolIE-ID ::= 158 +id-RegisteredLAI ProtocolIE-ID ::= 159 +id-RelayNode-Indicator ProtocolIE-ID ::= 160 +id-TrafficLoadReductionIndication ProtocolIE-ID ::= 161 +id-MDTConfiguration ProtocolIE-ID ::= 162 +id-MMERelaySupportIndicator ProtocolIE-ID ::= 163 +id-GWContextReleaseIndication ProtocolIE-ID ::= 164 +id-ManagementBasedMDTAllowed ProtocolIE-ID ::= 165 +id-PrivacyIndicator ProtocolIE-ID ::= 166 +id-Time-UE-StayedInCell-EnhancedGranularity ProtocolIE-ID ::= 167 +id-HO-Cause ProtocolIE-ID ::= 168 +id-VoiceSupportMatchIndicator ProtocolIE-ID ::= 169 +id-GUMMEIType ProtocolIE-ID ::= 170 +id-M3Configuration ProtocolIE-ID ::= 171 +id-M4Configuration ProtocolIE-ID ::= 172 +id-M5Configuration ProtocolIE-ID ::= 173 +id-MDT-Location-Info ProtocolIE-ID ::= 174 +id-MobilityInformation ProtocolIE-ID ::= 175 +id-Tunnel-Information-for-BBF ProtocolIE-ID ::= 176 +id-ManagementBasedMDTPLMNList ProtocolIE-ID ::= 177 +id-SignallingBasedMDTPLMNList ProtocolIE-ID ::= 178 +id-ULCOUNTValueExtended ProtocolIE-ID ::= 179 +id-DLCOUNTValueExtended ProtocolIE-ID ::= 180 +id-ReceiveStatusOfULPDCPSDUsExtended ProtocolIE-ID ::= 181 +id-ECGIListForRestart ProtocolIE-ID ::= 182 +id-SIPTO-Correlation-ID ProtocolIE-ID ::= 183 +id-SIPTO-L-GW-TransportLayerAddress ProtocolIE-ID ::= 184 +id-TransportInformation ProtocolIE-ID ::= 185 +id-LHN-ID ProtocolIE-ID ::= 186 +id-AdditionalCSFallbackIndicator ProtocolIE-ID ::= 187 +id-TAIListForRestart ProtocolIE-ID ::= 188 +id-UserLocationInformation ProtocolIE-ID ::= 189 +id-EmergencyAreaIDListForRestart ProtocolIE-ID ::= 190 +id-KillAllWarningMessages ProtocolIE-ID ::= 191 +id-Masked-IMEISV ProtocolIE-ID ::= 192 +id-eNBIndirectX2TransportLayerAddresses ProtocolIE-ID ::= 193 +id-uE-HistoryInformationFromTheUE ProtocolIE-ID ::= 194 +id-ProSeAuthorized ProtocolIE-ID ::= 195 +id-ExpectedUEBehaviour ProtocolIE-ID ::= 196 +id-LoggedMBSFNMDT ProtocolIE-ID ::= 197 +id-UERadioCapabilityForPaging ProtocolIE-ID ::= 198 +id-E-RABToBeModifiedListBearerModInd ProtocolIE-ID ::= 199 +id-E-RABToBeModifiedItemBearerModInd ProtocolIE-ID ::= 200 +id-E-RABNotToBeModifiedListBearerModInd ProtocolIE-ID ::= 201 +id-E-RABNotToBeModifiedItemBearerModInd ProtocolIE-ID ::= 202 +id-E-RABModifyListBearerModConf ProtocolIE-ID ::= 203 +id-E-RABModifyItemBearerModConf ProtocolIE-ID ::= 204 +id-E-RABFailedToModifyListBearerModConf ProtocolIE-ID ::= 205 +id-SON-Information-Report ProtocolIE-ID ::= 206 +id-Muting-Availability-Indication ProtocolIE-ID ::= 207 +id-Muting-Pattern-Information ProtocolIE-ID ::= 208 +id-Synchronisation-Information ProtocolIE-ID ::= 209 +id-E-RABToBeReleasedListBearerModConf ProtocolIE-ID ::= 210 +id-AssistanceDataForPaging ProtocolIE-ID ::= 211 +id-CellIdentifierAndCELevelForCECapableUEs ProtocolIE-ID ::= 212 +id-InformationOnRecommendedCellsAndENBsForPaging ProtocolIE-ID ::= 213 +id-RecommendedCellItem ProtocolIE-ID ::= 214 +id-RecommendedENBItem ProtocolIE-ID ::= 215 +id-ProSeUEtoNetworkRelaying ProtocolIE-ID ::= 216 +id-ULCOUNTValuePDCP-SNlength18 ProtocolIE-ID ::= 217 +id-DLCOUNTValuePDCP-SNlength18 ProtocolIE-ID ::= 218 +id-ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 ProtocolIE-ID ::= 219 +id-M6Configuration ProtocolIE-ID ::= 220 +id-M7Configuration ProtocolIE-ID ::= 221 +id-PWSfailedECGIList ProtocolIE-ID ::= 222 +id-MME-Group-ID ProtocolIE-ID ::= 223 +id-Additional-GUTI ProtocolIE-ID ::= 224 +id-S1-Message ProtocolIE-ID ::= 225 +id-CSGMembershipInfo ProtocolIE-ID ::= 226 +id-Paging-eDRXInformation ProtocolIE-ID ::= 227 +id-UE-RetentionInformation ProtocolIE-ID ::= 228 +id-UE-Usage-Type ProtocolIE-ID ::= 230 +id-extended-UEIdentityIndexValue ProtocolIE-ID ::= 231 +id-RAT-Type ProtocolIE-ID ::= 232 +id-BearerType ProtocolIE-ID ::= 233 +id-NB-IoT-DefaultPagingDRX ProtocolIE-ID ::= 234 +id-E-RABFailedToResumeListResumeReq ProtocolIE-ID ::= 235 +id-E-RABFailedToResumeItemResumeReq ProtocolIE-ID ::= 236 +id-E-RABFailedToResumeListResumeRes ProtocolIE-ID ::= 237 +id-E-RABFailedToResumeItemResumeRes ProtocolIE-ID ::= 238 +id-NB-IoT-Paging-eDRXInformation ProtocolIE-ID ::= 239 +id-V2XServicesAuthorized ProtocolIE-ID ::= 240 +id-UEUserPlaneCIoTSupportIndicator ProtocolIE-ID ::= 241 +id-CE-mode-B-SupportIndicator ProtocolIE-ID ::= 242 +id-SRVCCOperationNotPossible ProtocolIE-ID ::= 243 +id-NB-IoT-UEIdentityIndexValue ProtocolIE-ID ::= 244 +id-RRC-Resume-Cause ProtocolIE-ID ::= 245 +id-DCN-ID ProtocolIE-ID ::= 246 +id-ServedDCNs ProtocolIE-ID ::= 247 +id-UESidelinkAggregateMaximumBitrate ProtocolIE-ID ::= 248 +id-DLNASPDUDeliveryAckRequest ProtocolIE-ID ::= 249 +id-Coverage-Level ProtocolIE-ID ::= 250 +id-EnhancedCoverageRestricted ProtocolIE-ID ::= 251 +id-UE-Level-QoS-Parameters ProtocolIE-ID ::= 252 +id-DL-CP-SecurityInformation ProtocolIE-ID ::= 253 +id-UL-CP-SecurityInformation ProtocolIE-ID ::= 254 +id-CE-ModeBRestricted ProtocolIE-ID ::= 271 +id-PendingDataIndication ProtocolIE-ID ::= 283 + +END + + +-- ************************************************************** +-- +-- Container definitions +-- +-- ************************************************************** + +S1AP-Containers { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-Containers (5) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + Criticality, + Presence, + PrivateIE-ID, + ProtocolExtensionID, + ProtocolIE-ID +FROM S1AP-CommonDataTypes + + maxPrivateIEs, + maxProtocolExtensions, + maxProtocolIEs +FROM S1AP-Constants; + +-- ************************************************************** +-- +-- Class Definition for Protocol IEs +-- +-- ************************************************************** + +S1AP-PROTOCOL-IES ::= CLASS { + &id ProtocolIE-ID UNIQUE, + &criticality Criticality, + &Value, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + TYPE &Value + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Class Definition for Protocol IEs +-- +-- ************************************************************** + +S1AP-PROTOCOL-IES-PAIR ::= CLASS { + &id ProtocolIE-ID UNIQUE, + &firstCriticality Criticality, + &FirstValue, + &secondCriticality Criticality, + &SecondValue, + &presence Presence +} +WITH SYNTAX { + ID &id + FIRST CRITICALITY &firstCriticality + FIRST TYPE &FirstValue + SECOND CRITICALITY &secondCriticality + SECOND TYPE &SecondValue + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Class Definition for Protocol Extensions +-- +-- ************************************************************** + +S1AP-PROTOCOL-EXTENSION ::= CLASS { + &id ProtocolExtensionID UNIQUE, + &criticality Criticality, + &Extension, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + EXTENSION &Extension + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Class Definition for Private IEs +-- +-- ************************************************************** + +S1AP-PRIVATE-IES ::= CLASS { + &id PrivateIE-ID, + &criticality Criticality, + &Value, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + TYPE &Value + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Container for Protocol IEs +-- +-- ************************************************************** + +ProtocolIE-Container {S1AP-PROTOCOL-IES : IEsSetParam} ::= + SEQUENCE (SIZE (0..maxProtocolIEs)) OF + ProtocolIE-Field {{IEsSetParam}} + +ProtocolIE-SingleContainer {S1AP-PROTOCOL-IES : IEsSetParam} ::= + ProtocolIE-Field {{IEsSetParam}} + +ProtocolIE-Field {S1AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE { + id S1AP-PROTOCOL-IES.&id ({IEsSetParam}), + criticality S1AP-PROTOCOL-IES.&criticality ({IEsSetParam}{@id}), + value S1AP-PROTOCOL-IES.&Value ({IEsSetParam}{@id}) +} + +-- ************************************************************** +-- +-- Container for Protocol IE Pairs +-- +-- ************************************************************** + +ProtocolIE-ContainerPair {S1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= + SEQUENCE (SIZE (0..maxProtocolIEs)) OF + ProtocolIE-FieldPair {{IEsSetParam}} + +ProtocolIE-FieldPair {S1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= SEQUENCE { + id S1AP-PROTOCOL-IES-PAIR.&id ({IEsSetParam}), + firstCriticality S1AP-PROTOCOL-IES-PAIR.&firstCriticality ({IEsSetParam}{@id}), + firstValue S1AP-PROTOCOL-IES-PAIR.&FirstValue ({IEsSetParam}{@id}), + secondCriticality S1AP-PROTOCOL-IES-PAIR.&secondCriticality ({IEsSetParam}{@id}), + secondValue S1AP-PROTOCOL-IES-PAIR.&SecondValue ({IEsSetParam}{@id}) +} + +-- ************************************************************** +-- +-- Container Lists for Protocol IE Containers +-- +-- ************************************************************** + +ProtocolIE-ContainerList {INTEGER : lowerBound, INTEGER : upperBound, S1AP-PROTOCOL-IES : IEsSetParam} ::= + SEQUENCE (SIZE (lowerBound..upperBound)) OF + ProtocolIE-SingleContainer {{IEsSetParam}} + +ProtocolIE-ContainerPairList {INTEGER : lowerBound, INTEGER : upperBound, S1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= + SEQUENCE (SIZE (lowerBound..upperBound)) OF + ProtocolIE-ContainerPair {{IEsSetParam}} + +-- ************************************************************** +-- +-- Container for Protocol Extensions +-- +-- ************************************************************** + +ProtocolExtensionContainer {S1AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= + SEQUENCE (SIZE (1..maxProtocolExtensions)) OF + ProtocolExtensionField {{ExtensionSetParam}} + +ProtocolExtensionField {S1AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= SEQUENCE { + id S1AP-PROTOCOL-EXTENSION.&id ({ExtensionSetParam}), + criticality S1AP-PROTOCOL-EXTENSION.&criticality ({ExtensionSetParam}{@id}), + extensionValue S1AP-PROTOCOL-EXTENSION.&Extension ({ExtensionSetParam}{@id}) +} + +-- ************************************************************** +-- +-- Container for Private IEs +-- +-- ************************************************************** + +PrivateIE-Container {S1AP-PRIVATE-IES : IEsSetParam } ::= + SEQUENCE (SIZE (1.. maxPrivateIEs)) OF + PrivateIE-Field {{IEsSetParam}} + +PrivateIE-Field {S1AP-PRIVATE-IES : IEsSetParam} ::= SEQUENCE { + id S1AP-PRIVATE-IES.&id ({IEsSetParam}), + criticality S1AP-PRIVATE-IES.&criticality ({IEsSetParam}{@id}), + value S1AP-PRIVATE-IES.&Value ({IEsSetParam}{@id}) +} + +END + +-- ************************************************************** +-- +-- IE definitions for the SON Transfer application +-- The IEs in this ASN.1 module shall be defined and encoded +-- using the same rules as applicable for the S1AP-IEs module. +-- +-- ************************************************************** +SonTransfer-IEs + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- +-- Generic IEs for the SON Transfer application +-- + +SONtransferApplicationIdentity ::= ENUMERATED { + cell-load-reporting, + ..., + multi-cell-load-reporting, + event-triggered-cell-load-reporting, + ho-reporting, + eutran-cell-activation, + energy-savings-indication, + failure-event-reporting +} + +SONtransferRequestContainer ::= CHOICE{ + cellLoadReporting NULL, + ..., + multiCellLoadReporting MultiCellLoadReportingRequest, + eventTriggeredCellLoadReporting EventTriggeredCellLoadReportingRequest, + hOReporting HOReport, + eutranCellActivation CellActivationRequest, + energySavingsIndication CellStateIndication, + failureEventReporting FailureEventReport +} + +SONtransferResponseContainer ::= CHOICE{ + cellLoadReporting CellLoadReportingResponse, + ..., + multiCellLoadReporting MultiCellLoadReportingResponse, + eventTriggeredCellLoadReporting EventTriggeredCellLoadReportingResponse, + hOReporting NULL, + eutranCellActivation CellActivationResponse, + energySavingsIndication NULL, + failureEventReporting NULL +} + +SONtransferCause ::= CHOICE { + cellLoadReporting CellLoadReportingCause, + ..., + multiCellLoadReporting CellLoadReportingCause, + eventTriggeredCellLoadReporting CellLoadReportingCause, + hOReporting HOReportingCause, + eutranCellActivation CellActivationCause, + energySavingsIndication CellStateIndicationCause, + failureEventReporting FailureEventReportingCause +} + + +CellLoadReportingCause ::= ENUMERATED { + application-container-syntax-error, + inconsistent-reporting-cell-identifier, + unspecified, + ... +} + +HOReportingCause ::= ENUMERATED { + application-container-syntax-error, + inconsistent-reporting-cell-identifier, + unspecified, + ... +} + +CellActivationCause ::= ENUMERATED { + application-container-syntax-error, + inconsistent-reporting-cell-identifier, + unspecified, + ... +} + +CellStateIndicationCause ::= ENUMERATED { + application-container-syntax-error, + inconsistent-reporting-cell-identifier, + unspecified, + ... +} + +FailureEventReportingCause ::= ENUMERATED { + application-container-syntax-error, + inconsistent-reporting-cell-identifier, + unspecified, + ... +} + +-- +-- IEs for Cell Load Reporting application +-- + +CellLoadReportingResponse::= CHOICE{ + eUTRAN EUTRANcellLoadReportingResponse, + uTRAN OCTET STRING, + gERAN OCTET STRING, + ..., + eHRPD EHRPDSectorLoadReportingResponse +} + +CompositeAvailableCapacityGroup ::= OCTET STRING + +EUTRANcellLoadReportingResponse ::= SEQUENCE { + compositeAvailableCapacityGroup CompositeAvailableCapacityGroup, + ... +} + +-- +-- IEs for Multi-Cell Load Reporting application +-- + +EUTRANResponse::= SEQUENCE { + cell-ID OCTET STRING, + eUTRANcellLoadReportingResponse EUTRANcellLoadReportingResponse, + ... +} + +EHRPD-Sector-ID ::= OCTET STRING (SIZE (16)) + +IRAT-Cell-ID ::= CHOICE{ + eUTRAN OCTET STRING, + uTRAN OCTET STRING, + gERAN OCTET STRING, + ..., + eHRPD EHRPD-Sector-ID +} + +RequestedCellList ::= SEQUENCE (SIZE(1.. maxnoofIRATReportingCells)) OF IRAT-Cell-ID + +MultiCellLoadReportingRequest::= SEQUENCE { + requestedCellList RequestedCellList, + ... +} + +ReportingCellList-Item ::= SEQUENCE { + cell-ID IRAT-Cell-ID, + ... +} + +ReportingCellList ::= SEQUENCE (SIZE(1.. maxnoofIRATReportingCells)) OF ReportingCellList-Item + +MultiCellLoadReportingResponse ::= SEQUENCE (SIZE(1.. maxnoofIRATReportingCells)) OF MultiCellLoadReportingResponse-Item + +MultiCellLoadReportingResponse-Item ::= CHOICE{ + eUTRANResponse EUTRANResponse, + uTRANResponse OCTET STRING, + gERANResponse OCTET STRING, + ..., + eHRPD EHRPDMultiSectorLoadReportingResponseItem +} + + +-- +-- IEs for Event-triggered Cell Load Reporting application +-- + +NumberOfMeasurementReportingLevels ::= ENUMERATED { + rl2, + rl3, + rl4, + rl5, + rl10, + ... +} + +EventTriggeredCellLoadReportingRequest ::= SEQUENCE { + numberOfMeasurementReportingLevels NumberOfMeasurementReportingLevels, + ... +} + +OverloadFlag ::= ENUMERATED { + overload, + ... +} + +EventTriggeredCellLoadReportingResponse ::= SEQUENCE { + cellLoadReportingResponse CellLoadReportingResponse, + overloadFlag OverloadFlag OPTIONAL, + ... +} + +-- +-- IEs for HO Reporting application +-- + + + +HOReport::= SEQUENCE { + hoType HoType, + hoReportType HoReportType, + hosourceID IRAT-Cell-ID, + hoTargetID IRAT-Cell-ID, + candidateCellList CandidateCellList, + ..., + candidatePCIList CandidatePCIList OPTIONAL +} + +HoType ::= ENUMERATED { + ltetoutran, + ltetogeran, + ... +} + +HoReportType ::= ENUMERATED { + unnecessaryhotoanotherrat, + ..., + earlyirathandover +} + +CandidateCellList ::= SEQUENCE (SIZE(1..maxnoofcandidateCells)) OF IRAT-Cell-ID + +CandidatePCIList ::= SEQUENCE (SIZE(1..maxnoofcandidateCells)) OF CandidatePCI + +CandidatePCI ::= SEQUENCE { + pCI INTEGER (0..503), + eARFCN OCTET STRING, + ... +} + +-- +-- IEs for E-UTRAN Cell Activation application +-- + +CellActivationRequest ::= SEQUENCE { + cellsToActivateList CellsToActivateList, + minimumActivationTime INTEGER (1..60) OPTIONAL, +... +} + +CellsToActivateList ::= SEQUENCE (SIZE(1.. maxnoofCellineNB)) OF CellsToActivateList-Item + +CellsToActivateList-Item ::= SEQUENCE { + cell-ID OCTET STRING, + ... +} + +CellActivationResponse ::= SEQUENCE { + activatedCellsList ActivatedCellsList, + ... +} + +ActivatedCellsList ::= SEQUENCE (SIZE(0.. maxnoofCellineNB)) OF ActivatedCellsList-Item + +ActivatedCellsList-Item ::= SEQUENCE { + cell-ID OCTET STRING, + ... +} + +-- +-- IEs for Energy Savings Indication application +-- + +CellStateIndication ::= SEQUENCE { + notificationCellList NotificationCellList, + ... +} + +NotificationCellList ::= SEQUENCE (SIZE(1.. maxnoofCellineNB)) OF NotificationCellList-Item + +NotificationCellList-Item ::= SEQUENCE { + cell-ID OCTET STRING, + notifyFlag NotifyFlag, + ... +} + +NotifyFlag ::= ENUMERATED { + activated, + deactivated, + ... +} + +FailureEventReport::= CHOICE { + tooEarlyInterRATHOReportFromEUTRAN TooEarlyInterRATHOReportReportFromEUTRAN, + ... +} + +TooEarlyInterRATHOReportReportFromEUTRAN ::= SEQUENCE { + uERLFReportContainer OCTET STRING, -- as defined in TS 36.331 [16] -- + mobilityInformation MobilityInformation OPTIONAL, + ... +} + +MobilityInformation ::= BIT STRING (SIZE(32)) + + +-- +-- IEs for reporting of eHRPD load +-- + +EHRPDCapacityValue ::= INTEGER (0..100) + +EHRPDSectorCapacityClassValue ::= INTEGER (1..100, ...) + +EHRPDSectorLoadReportingResponse ::= SEQUENCE { + dL-EHRPD-CompositeAvailableCapacity EHRPDCompositeAvailableCapacity, + uL-EHRPD-CompositeAvailableCapacity EHRPDCompositeAvailableCapacity, + ... +} + +EHRPDCompositeAvailableCapacity ::= SEQUENCE { + eHRPDSectorCapacityClassValue EHRPDSectorCapacityClassValue, + eHRPDCapacityValue EHRPDCapacityValue, + ... +} + +EHRPDMultiSectorLoadReportingResponseItem ::= SEQUENCE { + eHRPD-Sector-ID EHRPD-Sector-ID, + eHRPDSectorLoadReportingResponse EHRPDSectorLoadReportingResponse, + ... +} + + +-- ************************************************************** +-- +-- Constants +-- +-- ************************************************************** + +maxnoofIRATReportingCells INTEGER ::= 128 +maxnoofcandidateCells INTEGER ::= 16 +maxnoofCellineNB INTEGER ::= 256 + +END diff --git a/openair3/S1AP/MESSAGES/ASN1/R15/s1ap-15.3.0.asn1 b/openair3/S1AP/MESSAGES/ASN1/R15/s1ap-15.3.0.asn1 new file mode 100644 index 0000000000..102b006962 --- /dev/null +++ b/openair3/S1AP/MESSAGES/ASN1/R15/s1ap-15.3.0.asn1 @@ -0,0 +1,7530 @@ +-- ************************************************************** +-- +-- Elementary Procedure definitions +-- +-- ************************************************************** + +S1AP-PDU-Descriptions { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-PDU-Descriptions (0)} + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + Criticality, + ProcedureCode +FROM S1AP-CommonDataTypes + + CellTrafficTrace, + DeactivateTrace, + DownlinkUEAssociatedLPPaTransport, + DownlinkNASTransport, + DownlinkNonUEAssociatedLPPaTransport, + DownlinkS1cdma2000tunnelling, + ENBDirectInformationTransfer, + ENBStatusTransfer, + ENBConfigurationUpdate, + ENBConfigurationUpdateAcknowledge, + ENBConfigurationUpdateFailure, + ErrorIndication, + HandoverCancel, + HandoverCancelAcknowledge, + HandoverCommand, + HandoverFailure, + HandoverNotify, + HandoverPreparationFailure, + HandoverRequest, + HandoverRequestAcknowledge, + HandoverRequired, + InitialContextSetupFailure, + InitialContextSetupRequest, + InitialContextSetupResponse, + InitialUEMessage, + KillRequest, + KillResponse, + LocationReportingControl, + LocationReportingFailureIndication, + LocationReport, + MMEConfigurationUpdate, + MMEConfigurationUpdateAcknowledge, + MMEConfigurationUpdateFailure, + MMEDirectInformationTransfer, + MMEStatusTransfer, + NASNonDeliveryIndication, + OverloadStart, + OverloadStop, + Paging, + PathSwitchRequest, + PathSwitchRequestAcknowledge, + PathSwitchRequestFailure, + PrivateMessage, + Reset, + ResetAcknowledge, + S1SetupFailure, + S1SetupRequest, + S1SetupResponse, + E-RABModifyRequest, + E-RABModifyResponse, + E-RABModificationIndication, + E-RABModificationConfirm, + E-RABReleaseCommand, + E-RABReleaseResponse, + E-RABReleaseIndication, + E-RABSetupRequest, + E-RABSetupResponse, + TraceFailureIndication, + TraceStart, + UECapabilityInfoIndication, + UEContextModificationFailure, + UEContextModificationRequest, + UEContextModificationResponse, + UEContextReleaseCommand, + UEContextReleaseComplete, + UEContextReleaseRequest, + UERadioCapabilityMatchRequest, + UERadioCapabilityMatchResponse, + UplinkUEAssociatedLPPaTransport, + UplinkNASTransport, + UplinkNonUEAssociatedLPPaTransport, + UplinkS1cdma2000tunnelling, + WriteReplaceWarningRequest, + WriteReplaceWarningResponse, + ENBConfigurationTransfer, + MMEConfigurationTransfer, + PWSRestartIndication, + UEContextModificationIndication, + UEContextModificationConfirm, + RerouteNASRequest, + PWSFailureIndication, + UEContextSuspendRequest, + UEContextSuspendResponse, + UEContextResumeRequest, + UEContextResumeResponse, + UEContextResumeFailure, + ConnectionEstablishmentIndication, + NASDeliveryIndication, + RetrieveUEInformation, + UEInformationTransfer, + ENBCPRelocationIndication, + MMECPRelocationIndication, + SecondaryRATDataUsageReport + + +FROM S1AP-PDU-Contents + + id-CellTrafficTrace, + id-DeactivateTrace, + id-downlinkUEAssociatedLPPaTransport, + id-downlinkNASTransport, + id-downlinkNonUEAssociatedLPPaTransport, + id-DownlinkS1cdma2000tunnelling, + id-eNBStatusTransfer, + id-ErrorIndication, + id-HandoverCancel, + id-HandoverNotification, + id-HandoverPreparation, + id-HandoverResourceAllocation, + id-InitialContextSetup, + id-initialUEMessage, + id-ENBConfigurationUpdate, + id-Kill, + id-LocationReportingControl, + id-LocationReportingFailureIndication, + id-LocationReport, + id-eNBDirectInformationTransfer, + id-MMEConfigurationUpdate, + id-MMEDirectInformationTransfer, + id-MMEStatusTransfer, + id-NASNonDeliveryIndication, + id-OverloadStart, + id-OverloadStop, + id-Paging, + id-PathSwitchRequest, + id-PrivateMessage, + id-Reset, + id-S1Setup, + id-E-RABModify, + id-E-RABModificationIndication, + id-E-RABRelease, + id-E-RABReleaseIndication, + id-E-RABSetup, + id-TraceFailureIndication, + id-TraceStart, + id-UECapabilityInfoIndication, + id-UEContextModification, + id-UEContextRelease, + id-UEContextReleaseRequest, + id-UERadioCapabilityMatch, + id-uplinkUEAssociatedLPPaTransport, + id-uplinkNASTransport, + id-uplinkNonUEAssociatedLPPaTransport, + id-UplinkS1cdma2000tunnelling, + id-WriteReplaceWarning, + id-eNBConfigurationTransfer, + id-MMEConfigurationTransfer, + id-PWSRestartIndication, + id-UEContextModificationIndication, + id-RerouteNASRequest, + id-PWSFailureIndication, + id-UEContextSuspend, + id-UEContextResume, + id-ConnectionEstablishmentIndication, + id-NASDeliveryIndication, + id-RetrieveUEInformation, + id-UEInformationTransfer, + id-eNBCPRelocationIndication, + id-MMECPRelocationIndication, + id-SecondaryRATDataUsageReport + + +FROM S1AP-Constants; + + +-- ************************************************************** +-- +-- Interface Elementary Procedure Class +-- +-- ************************************************************** + +S1AP-ELEMENTARY-PROCEDURE ::= CLASS { + &InitiatingMessage , + &SuccessfulOutcome OPTIONAL, + &UnsuccessfulOutcome OPTIONAL, + &procedureCode ProcedureCode UNIQUE, + &criticality Criticality DEFAULT ignore +} +WITH SYNTAX { + INITIATING MESSAGE &InitiatingMessage + [SUCCESSFUL OUTCOME &SuccessfulOutcome] + [UNSUCCESSFUL OUTCOME &UnsuccessfulOutcome] + PROCEDURE CODE &procedureCode + [CRITICALITY &criticality] +} + +-- ************************************************************** +-- +-- Interface PDU Definition +-- +-- ************************************************************** + +S1AP-PDU ::= CHOICE { + initiatingMessage InitiatingMessage, + successfulOutcome SuccessfulOutcome, + unsuccessfulOutcome UnsuccessfulOutcome, + ... +} + +InitiatingMessage ::= SEQUENCE { + procedureCode S1AP-ELEMENTARY-PROCEDURE.&procedureCode ({S1AP-ELEMENTARY-PROCEDURES}), + criticality S1AP-ELEMENTARY-PROCEDURE.&criticality ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value S1AP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +SuccessfulOutcome ::= SEQUENCE { + procedureCode S1AP-ELEMENTARY-PROCEDURE.&procedureCode ({S1AP-ELEMENTARY-PROCEDURES}), + criticality S1AP-ELEMENTARY-PROCEDURE.&criticality ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value S1AP-ELEMENTARY-PROCEDURE.&SuccessfulOutcome ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +UnsuccessfulOutcome ::= SEQUENCE { + procedureCode S1AP-ELEMENTARY-PROCEDURE.&procedureCode ({S1AP-ELEMENTARY-PROCEDURES}), + criticality S1AP-ELEMENTARY-PROCEDURE.&criticality ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value S1AP-ELEMENTARY-PROCEDURE.&UnsuccessfulOutcome ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +-- ************************************************************** +-- +-- Interface Elementary Procedure List +-- +-- ************************************************************** + +S1AP-ELEMENTARY-PROCEDURES S1AP-ELEMENTARY-PROCEDURE ::= { + S1AP-ELEMENTARY-PROCEDURES-CLASS-1 | + S1AP-ELEMENTARY-PROCEDURES-CLASS-2, + ... +} + + +S1AP-ELEMENTARY-PROCEDURES-CLASS-1 S1AP-ELEMENTARY-PROCEDURE ::= { + handoverPreparation | + handoverResourceAllocation | + pathSwitchRequest | + e-RABSetup | + e-RABModify | + e-RABRelease | + initialContextSetup | + handoverCancel | + kill | + reset | + s1Setup | + uEContextModification | + uEContextRelease | + eNBConfigurationUpdate | + mMEConfigurationUpdate | + writeReplaceWarning , + ..., + uERadioCapabilityMatch | + e-RABModificationIndication | + uEContextModificationIndication | + uEContextSuspend | + uEContextResume +} + +S1AP-ELEMENTARY-PROCEDURES-CLASS-2 S1AP-ELEMENTARY-PROCEDURE ::= { + handoverNotification | + e-RABReleaseIndication | + paging | + downlinkNASTransport | + initialUEMessage | + uplinkNASTransport | + errorIndication | + nASNonDeliveryIndication | + uEContextReleaseRequest | + downlinkS1cdma2000tunnelling | + uplinkS1cdma2000tunnelling | + uECapabilityInfoIndication | + eNBStatusTransfer | + mMEStatusTransfer | + deactivateTrace | + traceStart | + traceFailureIndication | + cellTrafficTrace | + locationReportingControl | + locationReportingFailureIndication | + locationReport | + overloadStart | + overloadStop | + eNBDirectInformationTransfer | + mMEDirectInformationTransfer | + eNBConfigurationTransfer | + mMEConfigurationTransfer | + privateMessage , + ..., + downlinkUEAssociatedLPPaTransport | + uplinkUEAssociatedLPPaTransport | + downlinkNonUEAssociatedLPPaTransport | + uplinkNonUEAssociatedLPPaTransport | + pWSRestartIndication | + rerouteNASRequest | + pWSFailureIndication | + connectionEstablishmentIndication | + nASDeliveryIndication | + retrieveUEInformation | + uEInformationTransfer | + eNBCPRelocationIndication | + mMECPRelocationIndication | + secondaryRATDataUsageReport +} + +-- ************************************************************** +-- +-- Interface Elementary Procedures +-- +-- ************************************************************** + +handoverPreparation S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE HandoverRequired + SUCCESSFUL OUTCOME HandoverCommand + UNSUCCESSFUL OUTCOME HandoverPreparationFailure + PROCEDURE CODE id-HandoverPreparation + CRITICALITY reject +} + +handoverResourceAllocation S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE HandoverRequest + SUCCESSFUL OUTCOME HandoverRequestAcknowledge + UNSUCCESSFUL OUTCOME HandoverFailure + PROCEDURE CODE id-HandoverResourceAllocation + CRITICALITY reject +} + +handoverNotification S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE HandoverNotify + PROCEDURE CODE id-HandoverNotification + CRITICALITY ignore +} + +pathSwitchRequest S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PathSwitchRequest + SUCCESSFUL OUTCOME PathSwitchRequestAcknowledge + UNSUCCESSFUL OUTCOME PathSwitchRequestFailure + PROCEDURE CODE id-PathSwitchRequest + CRITICALITY reject +} + +e-RABSetup S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E-RABSetupRequest + SUCCESSFUL OUTCOME E-RABSetupResponse + PROCEDURE CODE id-E-RABSetup + CRITICALITY reject +} + +e-RABModify S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E-RABModifyRequest + SUCCESSFUL OUTCOME E-RABModifyResponse + PROCEDURE CODE id-E-RABModify + CRITICALITY reject +} + +e-RABRelease S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E-RABReleaseCommand + SUCCESSFUL OUTCOME E-RABReleaseResponse + PROCEDURE CODE id-E-RABRelease + CRITICALITY reject +} + +e-RABReleaseIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E-RABReleaseIndication + PROCEDURE CODE id-E-RABReleaseIndication + CRITICALITY ignore +} + +initialContextSetup S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE InitialContextSetupRequest + SUCCESSFUL OUTCOME InitialContextSetupResponse + UNSUCCESSFUL OUTCOME InitialContextSetupFailure + PROCEDURE CODE id-InitialContextSetup + CRITICALITY reject +} + +uEContextReleaseRequest S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextReleaseRequest + PROCEDURE CODE id-UEContextReleaseRequest + CRITICALITY ignore +} + +paging S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE Paging + PROCEDURE CODE id-Paging + CRITICALITY ignore +} + +downlinkNASTransport S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE DownlinkNASTransport + PROCEDURE CODE id-downlinkNASTransport + CRITICALITY ignore +} + +initialUEMessage S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE InitialUEMessage + PROCEDURE CODE id-initialUEMessage + CRITICALITY ignore +} + +uplinkNASTransport S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UplinkNASTransport + PROCEDURE CODE id-uplinkNASTransport + CRITICALITY ignore +} +nASNonDeliveryIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE NASNonDeliveryIndication + PROCEDURE CODE id-NASNonDeliveryIndication + CRITICALITY ignore +} + +handoverCancel S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE HandoverCancel + SUCCESSFUL OUTCOME HandoverCancelAcknowledge + PROCEDURE CODE id-HandoverCancel + CRITICALITY reject +} + +reset S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE Reset + SUCCESSFUL OUTCOME ResetAcknowledge + PROCEDURE CODE id-Reset + CRITICALITY reject +} + +errorIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ErrorIndication + PROCEDURE CODE id-ErrorIndication + CRITICALITY ignore +} + +s1Setup S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE S1SetupRequest + SUCCESSFUL OUTCOME S1SetupResponse + UNSUCCESSFUL OUTCOME S1SetupFailure + PROCEDURE CODE id-S1Setup + CRITICALITY reject +} + +eNBConfigurationUpdate S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ENBConfigurationUpdate + SUCCESSFUL OUTCOME ENBConfigurationUpdateAcknowledge + UNSUCCESSFUL OUTCOME ENBConfigurationUpdateFailure + PROCEDURE CODE id-ENBConfigurationUpdate + CRITICALITY reject +} + +mMEConfigurationUpdate S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE MMEConfigurationUpdate + SUCCESSFUL OUTCOME MMEConfigurationUpdateAcknowledge + UNSUCCESSFUL OUTCOME MMEConfigurationUpdateFailure + PROCEDURE CODE id-MMEConfigurationUpdate + CRITICALITY reject +} + +downlinkS1cdma2000tunnelling S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE DownlinkS1cdma2000tunnelling + PROCEDURE CODE id-DownlinkS1cdma2000tunnelling + CRITICALITY ignore +} + +uplinkS1cdma2000tunnelling S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UplinkS1cdma2000tunnelling + PROCEDURE CODE id-UplinkS1cdma2000tunnelling + CRITICALITY ignore +} + +uEContextModification S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextModificationRequest + SUCCESSFUL OUTCOME UEContextModificationResponse + UNSUCCESSFUL OUTCOME UEContextModificationFailure + PROCEDURE CODE id-UEContextModification + CRITICALITY reject +} + +uECapabilityInfoIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UECapabilityInfoIndication + PROCEDURE CODE id-UECapabilityInfoIndication + CRITICALITY ignore +} + +uEContextRelease S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextReleaseCommand + SUCCESSFUL OUTCOME UEContextReleaseComplete + PROCEDURE CODE id-UEContextRelease + CRITICALITY reject +} + +eNBStatusTransfer S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ENBStatusTransfer + PROCEDURE CODE id-eNBStatusTransfer + CRITICALITY ignore +} + +mMEStatusTransfer S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE MMEStatusTransfer + PROCEDURE CODE id-MMEStatusTransfer + CRITICALITY ignore +} + +deactivateTrace S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE DeactivateTrace + PROCEDURE CODE id-DeactivateTrace + CRITICALITY ignore +} + +traceStart S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE TraceStart + PROCEDURE CODE id-TraceStart + CRITICALITY ignore +} + +traceFailureIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE TraceFailureIndication + PROCEDURE CODE id-TraceFailureIndication + CRITICALITY ignore +} +cellTrafficTrace S1AP-ELEMENTARY-PROCEDURE ::={ + INITIATING MESSAGE CellTrafficTrace + PROCEDURE CODE id-CellTrafficTrace + CRITICALITY ignore +} + +locationReportingControl S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE LocationReportingControl + PROCEDURE CODE id-LocationReportingControl + CRITICALITY ignore +} + +locationReportingFailureIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE LocationReportingFailureIndication + PROCEDURE CODE id-LocationReportingFailureIndication + CRITICALITY ignore +} + +locationReport S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE LocationReport + PROCEDURE CODE id-LocationReport + CRITICALITY ignore +} + +overloadStart S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE OverloadStart + PROCEDURE CODE id-OverloadStart + CRITICALITY ignore +} + +overloadStop S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE OverloadStop + PROCEDURE CODE id-OverloadStop + CRITICALITY reject +} + +writeReplaceWarning S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE WriteReplaceWarningRequest + SUCCESSFUL OUTCOME WriteReplaceWarningResponse + PROCEDURE CODE id-WriteReplaceWarning + CRITICALITY reject +} + +eNBDirectInformationTransfer S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ENBDirectInformationTransfer + PROCEDURE CODE id-eNBDirectInformationTransfer + CRITICALITY ignore +} + +mMEDirectInformationTransfer S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE MMEDirectInformationTransfer + PROCEDURE CODE id-MMEDirectInformationTransfer + CRITICALITY ignore +} + +eNBConfigurationTransfer S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ENBConfigurationTransfer + PROCEDURE CODE id-eNBConfigurationTransfer + CRITICALITY ignore +} + +mMEConfigurationTransfer S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE MMEConfigurationTransfer + PROCEDURE CODE id-MMEConfigurationTransfer + CRITICALITY ignore +} + + +privateMessage S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PrivateMessage + PROCEDURE CODE id-PrivateMessage + CRITICALITY ignore +} + +pWSRestartIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PWSRestartIndication + PROCEDURE CODE id-PWSRestartIndication + CRITICALITY ignore +} + +kill S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE KillRequest + SUCCESSFUL OUTCOME KillResponse + PROCEDURE CODE id-Kill + CRITICALITY reject +} + +downlinkUEAssociatedLPPaTransport S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE DownlinkUEAssociatedLPPaTransport + PROCEDURE CODE id-downlinkUEAssociatedLPPaTransport + CRITICALITY ignore +} + +uplinkUEAssociatedLPPaTransport S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UplinkUEAssociatedLPPaTransport + PROCEDURE CODE id-uplinkUEAssociatedLPPaTransport + CRITICALITY ignore +} +downlinkNonUEAssociatedLPPaTransport S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE DownlinkNonUEAssociatedLPPaTransport + PROCEDURE CODE id-downlinkNonUEAssociatedLPPaTransport + CRITICALITY ignore +} + +uplinkNonUEAssociatedLPPaTransport S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UplinkNonUEAssociatedLPPaTransport + PROCEDURE CODE id-uplinkNonUEAssociatedLPPaTransport + CRITICALITY ignore +} + +uERadioCapabilityMatch S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UERadioCapabilityMatchRequest + SUCCESSFUL OUTCOME UERadioCapabilityMatchResponse + PROCEDURE CODE id-UERadioCapabilityMatch + CRITICALITY reject +} + +e-RABModificationIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E-RABModificationIndication + SUCCESSFUL OUTCOME E-RABModificationConfirm + PROCEDURE CODE id-E-RABModificationIndication + CRITICALITY reject +} + +uEContextModificationIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextModificationIndication + SUCCESSFUL OUTCOME UEContextModificationConfirm + PROCEDURE CODE id-UEContextModificationIndication + CRITICALITY reject +} + +rerouteNASRequest S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE RerouteNASRequest + PROCEDURE CODE id-RerouteNASRequest + CRITICALITY reject +} + +pWSFailureIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PWSFailureIndication + PROCEDURE CODE id-PWSFailureIndication + CRITICALITY ignore +} + +uEContextSuspend S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextSuspendRequest + SUCCESSFUL OUTCOME UEContextSuspendResponse + PROCEDURE CODE id-UEContextSuspend + CRITICALITY reject +} + +uEContextResume S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextResumeRequest + SUCCESSFUL OUTCOME UEContextResumeResponse + UNSUCCESSFUL OUTCOME UEContextResumeFailure + PROCEDURE CODE id-UEContextResume + CRITICALITY reject +} + +connectionEstablishmentIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ConnectionEstablishmentIndication + PROCEDURE CODE id-ConnectionEstablishmentIndication + CRITICALITY reject +} + +nASDeliveryIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE NASDeliveryIndication + PROCEDURE CODE id-NASDeliveryIndication + CRITICALITY ignore +} + +retrieveUEInformation S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE RetrieveUEInformation + PROCEDURE CODE id-RetrieveUEInformation + CRITICALITY reject +} + +uEInformationTransfer S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEInformationTransfer + PROCEDURE CODE id-UEInformationTransfer + CRITICALITY reject +} + +eNBCPRelocationIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ENBCPRelocationIndication + PROCEDURE CODE id-eNBCPRelocationIndication + CRITICALITY reject +} + +mMECPRelocationIndication S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE MMECPRelocationIndication + PROCEDURE CODE id-MMECPRelocationIndication + CRITICALITY reject +} + +secondaryRATDataUsageReport S1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SecondaryRATDataUsageReport + PROCEDURE CODE id-SecondaryRATDataUsageReport + CRITICALITY ignore +} + + +END + + + +-- ************************************************************** +-- +-- PDU definitions for S1AP. +-- +-- ************************************************************** + +S1AP-PDU-Contents { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-PDU-Contents (1) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + + UEAggregateMaximumBitrate, + BearerType, + Cause, + CellAccessMode, + Cdma2000HORequiredIndication, + Cdma2000HOStatus, + Cdma2000OneXSRVCCInfo, + Cdma2000OneXRAND, + Cdma2000PDU, + Cdma2000RATType, + Cdma2000SectorID, + EUTRANRoundTripDelayEstimationInfo, + CNDomain, + ConcurrentWarningMessageIndicator, + CriticalityDiagnostics, + CSFallbackIndicator, + CSG-Id, + CSG-IdList, + CSGMembershipStatus, + Data-Forwarding-Not-Possible, + Direct-Forwarding-Path-Availability, + Global-ENB-ID, + EUTRAN-CGI, + ENBname, + ENB-StatusTransfer-TransparentContainer, + ENB-UE-S1AP-ID, + ExtendedRepetitionPeriod, + GTP-TEID, + GUMMEI, + GUMMEIType, + HandoverRestrictionList, + HandoverType, + Masked-IMEISV, + LAI, + LPPa-PDU, + ManagementBasedMDTAllowed, + MDTPLMNList, + MMEname, + MMERelaySupportIndicator, + MME-UE-S1AP-ID, + MSClassmark2, + MSClassmark3, + NAS-PDU, + NASSecurityParametersfromE-UTRAN, + NASSecurityParameterstoE-UTRAN, + OverloadResponse, + PagingDRX, + PagingPriority, + PLMNidentity, + ProSeAuthorized, + RIMTransfer, + RelativeMMECapacity, + RequestType, + E-RAB-ID, + E-RABLevelQoSParameters, + E-RABList, + RelayNode-Indicator, + Routing-ID, + SecurityKey, + SecurityContext, + ServedGUMMEIs, + SONConfigurationTransfer, + Source-ToTarget-TransparentContainer, + SourceBSS-ToTargetBSS-TransparentContainer, + SourceeNB-ToTargeteNB-TransparentContainer, + SourceRNC-ToTargetRNC-TransparentContainer, + SubscriberProfileIDforRFP, + SRVCCOperationNotPossible, + SRVCCOperationPossible, + SRVCCHOIndication, + SupportedTAs, + TAI, + Target-ToSource-TransparentContainer, + TargetBSS-ToSourceBSS-TransparentContainer, + TargeteNB-ToSourceeNB-TransparentContainer, + TargetID, + TargetRNC-ToSourceRNC-TransparentContainer, + TimeToWait, + TraceActivation, + TrafficLoadReductionIndication, + E-UTRAN-Trace-ID, + TransportLayerAddress, + UEIdentityIndexValue, + UEPagingID, + UERadioCapability, + UERadioCapabilityForPaging, + UE-RetentionInformation, + UE-S1AP-IDs, + UE-associatedLogicalS1-ConnectionItem, + UESecurityCapabilities, + S-TMSI, + MessageIdentifier, + SerialNumber, + WarningAreaList, + RepetitionPeriod, + NumberofBroadcastRequest, + WarningType, + WarningSecurityInfo, + DataCodingScheme, + WarningMessageContents, + BroadcastCompletedAreaList, + RRC-Establishment-Cause, + BroadcastCancelledAreaList, + PS-ServiceNotAvailable, + GUMMEIList, + Correlation-ID, + GWContextReleaseIndication, + PrivacyIndicator, + VoiceSupportMatchIndicator, + TunnelInformation, + KillAllWarningMessages, + TransportInformation, + LHN-ID, + UserLocationInformation, + AdditionalCSFallbackIndicator, + ECGIListForRestart, + TAIListForRestart, + EmergencyAreaIDListForRestart, + ExpectedUEBehaviour, + Paging-eDRXInformation, + Extended-UEIdentityIndexValue, + MME-Group-ID, + Additional-GUTI, + PWSfailedECGIList, + CellIdentifierAndCELevelForCECapableUEs, + AssistanceDataForPaging, + InformationOnRecommendedCellsAndENBsForPaging, + UE-Usage-Type, + UEUserPlaneCIoTSupportIndicator, + NB-IoT-DefaultPagingDRX, + NB-IoT-Paging-eDRXInformation, + CE-mode-B-SupportIndicator, + NB-IoT-UEIdentityIndexValue, + V2XServicesAuthorized, + DCN-ID, + ServedDCNs, + UESidelinkAggregateMaximumBitrate, + DLNASPDUDeliveryAckRequest, + Coverage-Level, + EnhancedCoverageRestricted, + DL-CP-SecurityInformation, + UL-CP-SecurityInformation, + SecondaryRATDataUsageRequest, + SecondaryRATDataUsageReportList, + HandoverFlag, + NRUESecurityCapabilities, + UE-Application-Layer-Measurement-Capability, + CE-ModeBRestricted, + Packet-LossRate, + UECapabilityInfoRequest, + SourceNgRanNode-ToTargetNgRanNode-TransparentContainer, + TargetNgRanNode-ToSourceNgRanNode-TransparentContainer, + EndIndication, + EDT-Session, + LTE-M-Indication, + AerialUEsubscriptionInformation, + PendingDataIndication, + WarningAreaCoordinates, + Subscription-Based-UE-DifferentiationInfo + + + + +FROM S1AP-IEs + + PrivateIE-Container{}, + ProtocolExtensionContainer{}, + ProtocolIE-Container{}, + ProtocolIE-ContainerList{}, + ProtocolIE-ContainerPair{}, + ProtocolIE-ContainerPairList{}, + ProtocolIE-SingleContainer{}, + S1AP-PRIVATE-IES, + S1AP-PROTOCOL-EXTENSION, + S1AP-PROTOCOL-IES, + S1AP-PROTOCOL-IES-PAIR +FROM S1AP-Containers + + + id-AssistanceDataForPaging, + id-AerialUEsubscriptionInformation, + id-uEaggregateMaximumBitrate, + id-BearerType, + id-Cause, + id-CellAccessMode, + id-CellIdentifierAndCELevelForCECapableUEs, + id-cdma2000HORequiredIndication, + id-cdma2000HOStatus, + id-cdma2000OneXSRVCCInfo, + id-cdma2000OneXRAND, + id-cdma2000PDU, + id-cdma2000RATType, + id-cdma2000SectorID, + id-EUTRANRoundTripDelayEstimationInfo, + id-CNDomain, + id-ConcurrentWarningMessageIndicator, + id-CriticalityDiagnostics, + id-CSFallbackIndicator, + id-CSG-Id, + id-CSG-IdList, + id-CSGMembershipStatus, + id-Data-Forwarding-Not-Possible, + id-DefaultPagingDRX, + id-Direct-Forwarding-Path-Availability, + id-Global-ENB-ID, + id-EUTRAN-CGI, + id-eNBname, + id-eNB-StatusTransfer-TransparentContainer, + id-eNB-UE-S1AP-ID, + id-GERANtoLTEHOInformationRes, + id-GUMMEI-ID, + id-GUMMEIType, + id-HandoverRestrictionList, + id-HandoverType, + id-Masked-IMEISV, + id-InformationOnRecommendedCellsAndENBsForPaging, + id-InitialContextSetup, + id-Inter-SystemInformationTransferTypeEDT, + id-Inter-SystemInformationTransferTypeMDT, + id-LPPa-PDU, + id-NAS-DownlinkCount, + id-ManagementBasedMDTAllowed, + id-ManagementBasedMDTPLMNList, + id-MMEname, + id-MME-UE-S1AP-ID, + id-MSClassmark2, + id-MSClassmark3, + id-NAS-PDU, + id-NASSecurityParametersfromE-UTRAN, + id-NASSecurityParameterstoE-UTRAN, + id-OverloadResponse, + id-pagingDRX, + id-PagingPriority, + id-RelativeMMECapacity, + id-RequestType, + id-Routing-ID, + id-E-RABAdmittedItem, + id-E-RABAdmittedList, + id-E-RABDataForwardingItem, + id-E-RABFailedToModifyList, + id-E-RABFailedToReleaseList, + id-E-RABFailedtoSetupItemHOReqAck, + id-E-RABFailedToSetupListBearerSURes, + id-E-RABFailedToSetupListCtxtSURes, + id-E-RABFailedToSetupListHOReqAck, + id-E-RABFailedToBeReleasedList, + id-E-RABFailedToResumeListResumeReq, + id-E-RABFailedToResumeItemResumeReq, + id-E-RABFailedToResumeListResumeRes, + id-E-RABFailedToResumeItemResumeRes, + id-E-RABModify, + id-E-RABModifyItemBearerModRes, + id-E-RABModifyListBearerModRes, + id-E-RABRelease, + id-E-RABReleaseItemBearerRelComp, + id-E-RABReleaseItemHOCmd, + id-E-RABReleaseListBearerRelComp, + id-E-RABReleaseIndication, + id-E-RABSetup, + id-E-RABSetupItemBearerSURes, + id-E-RABSetupItemCtxtSURes, + id-E-RABSetupListBearerSURes, + id-E-RABSetupListCtxtSURes, + id-E-RABSubjecttoDataForwardingList, + id-E-RABToBeModifiedItemBearerModReq, + id-E-RABToBeModifiedListBearerModReq, + id-E-RABToBeModifiedListBearerModInd, + id-E-RABToBeModifiedItemBearerModInd, + id-E-RABNotToBeModifiedListBearerModInd, + id-E-RABNotToBeModifiedItemBearerModInd, + id-E-RABModifyListBearerModConf, + id-E-RABModifyItemBearerModConf, + id-E-RABFailedToModifyListBearerModConf, + id-E-RABToBeReleasedListBearerModConf, + id-E-RABToBeReleasedList, + id-E-RABReleasedList, + id-E-RABToBeSetupItemBearerSUReq, + id-E-RABToBeSetupItemCtxtSUReq, + id-E-RABToBeSetupItemHOReq, + id-E-RABToBeSetupListBearerSUReq, + id-E-RABToBeSetupListCtxtSUReq, + id-E-RABToBeSetupListHOReq, + id-E-RABToBeSwitchedDLItem, + id-E-RABToBeSwitchedDLList, + id-E-RABToBeSwitchedULList, + id-E-RABToBeSwitchedULItem, + id-E-RABtoReleaseListHOCmd, + id-ProSeAuthorized, + id-SecurityKey, + id-SecurityContext, + id-ServedGUMMEIs, + id-SONConfigurationTransferECT, + id-SONConfigurationTransferMCT, + id-Source-ToTarget-TransparentContainer, + id-Source-ToTarget-TransparentContainer-Secondary, + id-SourceMME-UE-S1AP-ID, + id-SRVCCOperationNotPossible, + id-SRVCCOperationPossible, + id-SRVCCHOIndication, + id-SubscriberProfileIDforRFP, + id-SupportedTAs, + id-S-TMSI, + id-TAI, + id-TAIItem, + id-TAIList, + id-Target-ToSource-TransparentContainer, + id-Target-ToSource-TransparentContainer-Secondary, + id-TargetID, + id-TimeToWait, + id-TraceActivation, + id-TrafficLoadReductionIndication, + id-E-UTRAN-Trace-ID, + id-UEIdentityIndexValue, + id-UEPagingID, + id-UERadioCapability, + id-UERadioCapabilityForPaging, + id-UTRANtoLTEHOInformationRes, + id-UE-associatedLogicalS1-ConnectionListResAck, + id-UE-associatedLogicalS1-ConnectionItem, + id-UE-RetentionInformation, + id-UESecurityCapabilities, + id-UE-S1AP-IDs, + id-V2XServicesAuthorized, + id-ResetType, + id-MessageIdentifier, + id-SerialNumber, + id-WarningAreaList, + id-RepetitionPeriod, + id-NumberofBroadcastRequest, + id-WarningType, + id-WarningSecurityInfo, + id-DataCodingScheme, + id-WarningMessageContents, + id-BroadcastCompletedAreaList, + id-BroadcastCancelledAreaList, + id-RRC-Establishment-Cause, + id-TraceCollectionEntityIPAddress, + maxnoofTAIs, + maxnoofErrors, + maxnoofE-RABs, + maxnoofIndividualS1ConnectionsToReset, + maxnoofEmergencyAreaID, + maxnoofCellID, + maxnoofTAIforWarning, + maxnoofCellinTAI, + maxnoofCellinEAI, + id-ExtendedRepetitionPeriod, + id-PS-ServiceNotAvailable, + id-RegisteredLAI, + id-GUMMEIList, + id-SourceMME-GUMMEI, + id-MME-UE-S1AP-ID-2, + id-GW-TransportLayerAddress, + id-RelayNode-Indicator, + id-Correlation-ID, + id-MMERelaySupportIndicator, + id-GWContextReleaseIndication, + id-PrivacyIndicator, + id-VoiceSupportMatchIndicator, + id-Tunnel-Information-for-BBF, + id-SIPTO-Correlation-ID, + id-SIPTO-L-GW-TransportLayerAddress, + id-KillAllWarningMessages, + id-TransportInformation, + id-LHN-ID, + id-UserLocationInformation, + id-AdditionalCSFallbackIndicator, + id-ECGIListForRestart, + id-TAIListForRestart, + id-EmergencyAreaIDListForRestart, + id-ExpectedUEBehaviour, + id-Paging-eDRXInformation, + id-extended-UEIdentityIndexValue, + id-CSGMembershipInfo, + id-MME-Group-ID, + id-Additional-GUTI, + id-S1-Message, + id-PWSfailedECGIList, + id-PWSFailureIndication, + id-UE-Usage-Type, + id-UEUserPlaneCIoTSupportIndicator, + id-NB-IoT-DefaultPagingDRX, + id-NB-IoT-Paging-eDRXInformation, + id-CE-mode-B-SupportIndicator, + id-NB-IoT-UEIdentityIndexValue, + id-RRC-Resume-Cause, + id-DCN-ID, + id-ServedDCNs, + id-UESidelinkAggregateMaximumBitrate, + id-DLNASPDUDeliveryAckRequest, + id-Coverage-Level, + id-EnhancedCoverageRestricted, + id-UE-Level-QoS-Parameters, + id-DL-CP-SecurityInformation, + id-UL-CP-SecurityInformation, + id-SecondaryRATDataUsageRequest, + id-SecondaryRATDataUsageReportList, + id-HandoverFlag, + id-NRUESecurityCapabilities, + id-UE-Application-Layer-Measurement-Capability, + id-CE-ModeBRestricted, + id-DownlinkPacketLossRate, + id-UplinkPacketLossRate, + id-UECapabilityInfoRequest, + id-EndIndication, + id-EDT-Session, + id-LTE-M-Indication, + id-PendingDataIndication, + id-WarningAreaCoordinates, + id-Subscription-Based-UE-DifferentiationInfo + + + +FROM S1AP-Constants; + +-- ************************************************************** +-- +-- Common Container Lists +-- +-- ************************************************************** + +E-RAB-IE-ContainerList { S1AP-PROTOCOL-IES : IEsSetParam } ::= ProtocolIE-ContainerList { 1, maxnoofE-RABs, {IEsSetParam} } +E-RAB-IE-ContainerPairList { S1AP-PROTOCOL-IES-PAIR : IEsSetParam } ::= ProtocolIE-ContainerPairList { 1, maxnoofE-RABs, {IEsSetParam} } +ProtocolError-IE-ContainerList { S1AP-PROTOCOL-IES : IEsSetParam } ::= ProtocolIE-ContainerList { 1, maxnoofE-RABs, {IEsSetParam} } + +-- ************************************************************** +-- +-- HANDOVER PREPARATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Handover Required +-- +-- ************************************************************** + +HandoverRequired ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { HandoverRequiredIEs} }, + ... +} + +HandoverRequiredIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-HandoverType CRITICALITY reject TYPE HandoverType PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-TargetID CRITICALITY reject TYPE TargetID PRESENCE mandatory}| + { ID id-Direct-Forwarding-Path-Availability CRITICALITY ignore TYPE Direct-Forwarding-Path-Availability PRESENCE optional}| + { ID id-SRVCCHOIndication CRITICALITY reject TYPE SRVCCHOIndication PRESENCE optional}| + { ID id-Source-ToTarget-TransparentContainer CRITICALITY reject TYPE Source-ToTarget-TransparentContainer PRESENCE mandatory}| + { ID id-Source-ToTarget-TransparentContainer-Secondary CRITICALITY reject TYPE Source-ToTarget-TransparentContainer PRESENCE optional}| + { ID id-MSClassmark2 CRITICALITY reject TYPE MSClassmark2 PRESENCE conditional}| + { ID id-MSClassmark3 CRITICALITY ignore TYPE MSClassmark3 PRESENCE conditional}| + { ID id-CSG-Id CRITICALITY reject TYPE CSG-Id PRESENCE optional}| + { ID id-CellAccessMode CRITICALITY reject TYPE CellAccessMode PRESENCE optional}| + { ID id-PS-ServiceNotAvailable CRITICALITY ignore TYPE PS-ServiceNotAvailable PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- Handover Command +-- +-- ************************************************************** + +HandoverCommand ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { HandoverCommandIEs} }, + ... +} + +HandoverCommandIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-HandoverType CRITICALITY reject TYPE HandoverType PRESENCE mandatory}| + { ID id-NASSecurityParametersfromE-UTRAN CRITICALITY reject TYPE NASSecurityParametersfromE-UTRAN PRESENCE conditional + -- This IE shall be present if HandoverType IE is set to value "LTEtoUTRAN" or "LTEtoGERAN" --}| + { ID id-E-RABSubjecttoDataForwardingList CRITICALITY ignore TYPE E-RABSubjecttoDataForwardingList PRESENCE optional}| + { ID id-E-RABtoReleaseListHOCmd CRITICALITY ignore TYPE E-RABList PRESENCE optional}| + { ID id-Target-ToSource-TransparentContainer CRITICALITY reject TYPE Target-ToSource-TransparentContainer PRESENCE mandatory}| + { ID id-Target-ToSource-TransparentContainer-Secondary CRITICALITY reject TYPE Target-ToSource-TransparentContainer PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + +E-RABSubjecttoDataForwardingList ::= E-RAB-IE-ContainerList { {E-RABDataForwardingItemIEs} } + +E-RABDataForwardingItemIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABDataForwardingItem CRITICALITY ignore TYPE E-RABDataForwardingItem PRESENCE mandatory }, + ... +} + +E-RABDataForwardingItem ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + dL-transportLayerAddress TransportLayerAddress OPTIONAL, + dL-gTP-TEID GTP-TEID OPTIONAL, + uL-TransportLayerAddress TransportLayerAddress OPTIONAL, + uL-GTP-TEID GTP-TEID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { E-RABDataForwardingItem-ExtIEs} } OPTIONAL, + ... +} + +E-RABDataForwardingItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + + +-- ************************************************************** +-- +-- Handover Preparation Failure +-- +-- ************************************************************** + +HandoverPreparationFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { HandoverPreparationFailureIEs} }, + ... +} + +HandoverPreparationFailureIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- HANDOVER RESOURCE ALLOCATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Handover Request +-- +-- ************************************************************** + +HandoverRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {HandoverRequestIEs} }, + ... +} + +HandoverRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-HandoverType CRITICALITY reject TYPE HandoverType PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE mandatory}| + { ID id-E-RABToBeSetupListHOReq CRITICALITY reject TYPE E-RABToBeSetupListHOReq PRESENCE mandatory}| + { ID id-Source-ToTarget-TransparentContainer CRITICALITY reject TYPE Source-ToTarget-TransparentContainer PRESENCE mandatory}| + { ID id-UESecurityCapabilities CRITICALITY reject TYPE UESecurityCapabilities PRESENCE mandatory}| + { ID id-HandoverRestrictionList CRITICALITY ignore TYPE HandoverRestrictionList PRESENCE optional}| + { ID id-TraceActivation CRITICALITY ignore TYPE TraceActivation PRESENCE optional}| + { ID id-RequestType CRITICALITY ignore TYPE RequestType PRESENCE optional}| + { ID id-SRVCCOperationPossible CRITICALITY ignore TYPE SRVCCOperationPossible PRESENCE optional}| + { ID id-SecurityContext CRITICALITY reject TYPE SecurityContext PRESENCE mandatory}| + { ID id-NASSecurityParameterstoE-UTRAN CRITICALITY reject TYPE NASSecurityParameterstoE-UTRAN PRESENCE conditional + -- This IE shall be present if the Handover Type IE is set to the value "UTRANtoLTE" or "GERANtoLTE" -- }| + { ID id-CSG-Id CRITICALITY reject TYPE CSG-Id PRESENCE optional}| + { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| + { ID id-GUMMEI-ID CRITICALITY ignore TYPE GUMMEI PRESENCE optional}| + { ID id-MME-UE-S1AP-ID-2 CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE optional}| + { ID id-ManagementBasedMDTAllowed CRITICALITY ignore TYPE ManagementBasedMDTAllowed PRESENCE optional}| + { ID id-ManagementBasedMDTPLMNList CRITICALITY ignore TYPE MDTPLMNList PRESENCE optional}| + { ID id-Masked-IMEISV CRITICALITY ignore TYPE Masked-IMEISV PRESENCE optional}| + { ID id-ExpectedUEBehaviour CRITICALITY ignore TYPE ExpectedUEBehaviour PRESENCE optional}| + { ID id-ProSeAuthorized CRITICALITY ignore TYPE ProSeAuthorized PRESENCE optional}| + { ID id-UEUserPlaneCIoTSupportIndicator CRITICALITY ignore TYPE UEUserPlaneCIoTSupportIndicator PRESENCE optional}| + { ID id-V2XServicesAuthorized CRITICALITY ignore TYPE V2XServicesAuthorized PRESENCE optional}| + { ID id-UESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE UESidelinkAggregateMaximumBitrate PRESENCE optional}| + { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional}| + { ID id-NRUESecurityCapabilities CRITICALITY ignore TYPE NRUESecurityCapabilities PRESENCE optional}| + { ID id-CE-ModeBRestricted CRITICALITY ignore TYPE CE-ModeBRestricted PRESENCE optional}| + { ID id-AerialUEsubscriptionInformation CRITICALITY ignore TYPE AerialUEsubscriptionInformation PRESENCE optional}| + { ID id-PendingDataIndication CRITICALITY ignore TYPE PendingDataIndication PRESENCE optional}| + { ID id-Subscription-Based-UE-DifferentiationInfo CRITICALITY ignore TYPE Subscription-Based-UE-DifferentiationInfo PRESENCE optional}, + ... +} + +E-RABToBeSetupListHOReq ::= E-RAB-IE-ContainerList { {E-RABToBeSetupItemHOReqIEs} } + +E-RABToBeSetupItemHOReqIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABToBeSetupItemHOReq CRITICALITY reject TYPE E-RABToBeSetupItemHOReq PRESENCE mandatory }, + ... +} + +E-RABToBeSetupItemHOReq ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + transportLayerAddress TransportLayerAddress, + gTP-TEID GTP-TEID, + e-RABlevelQosParameters E-RABLevelQoSParameters, + iE-Extensions ProtocolExtensionContainer { {E-RABToBeSetupItemHOReq-ExtIEs} } OPTIONAL, + ... +} + +E-RABToBeSetupItemHOReq-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + { ID id-Data-Forwarding-Not-Possible CRITICALITY ignore EXTENSION Data-Forwarding-Not-Possible PRESENCE optional}| + { ID id-BearerType CRITICALITY reject EXTENSION BearerType PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- Handover Request Acknowledge +-- +-- ************************************************************** + +HandoverRequestAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {HandoverRequestAcknowledgeIEs} }, + ... +} + +HandoverRequestAcknowledgeIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-E-RABAdmittedList CRITICALITY ignore TYPE E-RABAdmittedList PRESENCE mandatory}| + { ID id-E-RABFailedToSetupListHOReqAck CRITICALITY ignore TYPE E-RABFailedtoSetupListHOReqAck PRESENCE optional}| + { ID id-Target-ToSource-TransparentContainer CRITICALITY reject TYPE Target-ToSource-TransparentContainer PRESENCE mandatory}| + { ID id-CSG-Id CRITICALITY ignore TYPE CSG-Id PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-CellAccessMode CRITICALITY ignore TYPE CellAccessMode PRESENCE optional}| + { ID id-CE-mode-B-SupportIndicator CRITICALITY ignore TYPE CE-mode-B-SupportIndicator PRESENCE optional}, + ... +} + +E-RABAdmittedList ::= E-RAB-IE-ContainerList { {E-RABAdmittedItemIEs} } + +E-RABAdmittedItemIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABAdmittedItem CRITICALITY ignore TYPE E-RABAdmittedItem PRESENCE mandatory }, + ... +} + +E-RABAdmittedItem ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + transportLayerAddress TransportLayerAddress, + gTP-TEID GTP-TEID, + dL-transportLayerAddress TransportLayerAddress OPTIONAL, + dL-gTP-TEID GTP-TEID OPTIONAL, + uL-TransportLayerAddress TransportLayerAddress OPTIONAL, + uL-GTP-TEID GTP-TEID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABAdmittedItem-ExtIEs} } OPTIONAL, + ... +} + +E-RABAdmittedItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABFailedtoSetupListHOReqAck ::= E-RAB-IE-ContainerList { {E-RABFailedtoSetupItemHOReqAckIEs} } + +E-RABFailedtoSetupItemHOReqAckIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABFailedtoSetupItemHOReqAck CRITICALITY ignore TYPE E-RABFailedToSetupItemHOReqAck PRESENCE mandatory }, + ... +} + +E-RABFailedToSetupItemHOReqAck ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + cause Cause, + iE-Extensions ProtocolExtensionContainer { { E-RABFailedToSetupItemHOReqAckExtIEs} } OPTIONAL, + ... +} + +E-RABFailedToSetupItemHOReqAckExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +-- ************************************************************** +-- +-- Handover Failure +-- +-- ************************************************************** + +HandoverFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { HandoverFailureIEs} }, + ... +} + +HandoverFailureIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- HANDOVER NOTIFICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Handover Notify +-- +-- ************************************************************** + +HandoverNotify ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { HandoverNotifyIEs} }, + ... +} + +HandoverNotifyIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory}| + { ID id-TAI CRITICALITY ignore TYPE TAI PRESENCE mandatory}| +-- Extension for Release 11 to support BBAI -- + { ID id-Tunnel-Information-for-BBF CRITICALITY ignore TYPE TunnelInformation PRESENCE optional}| + { ID id-LHN-ID CRITICALITY ignore TYPE LHN-ID PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- PATH SWITCH REQUEST ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Path Switch Request +-- +-- ************************************************************** + +PathSwitchRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PathSwitchRequestIEs} }, + ... +} + +PathSwitchRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-E-RABToBeSwitchedDLList CRITICALITY reject TYPE E-RABToBeSwitchedDLList PRESENCE mandatory}| + { ID id-SourceMME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory}| + { ID id-TAI CRITICALITY ignore TYPE TAI PRESENCE mandatory}| + { ID id-UESecurityCapabilities CRITICALITY ignore TYPE UESecurityCapabilities PRESENCE mandatory}| + { ID id-CSG-Id CRITICALITY ignore TYPE CSG-Id PRESENCE optional}| + { ID id-CellAccessMode CRITICALITY ignore TYPE CellAccessMode PRESENCE optional}| + { ID id-SourceMME-GUMMEI CRITICALITY ignore TYPE GUMMEI PRESENCE optional}| + { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| +-- Extension for Release 11 to support BBAI -- + { ID id-Tunnel-Information-for-BBF CRITICALITY ignore TYPE TunnelInformation PRESENCE optional}| + { ID id-LHN-ID CRITICALITY ignore TYPE LHN-ID PRESENCE optional}| + { ID id-RRC-Resume-Cause CRITICALITY ignore TYPE RRC-Establishment-Cause PRESENCE optional }| + { ID id-NRUESecurityCapabilities CRITICALITY ignore TYPE NRUESecurityCapabilities PRESENCE optional}, + ... +} + +E-RABToBeSwitchedDLList ::= E-RAB-IE-ContainerList { {E-RABToBeSwitchedDLItemIEs} } + +E-RABToBeSwitchedDLItemIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABToBeSwitchedDLItem CRITICALITY reject TYPE E-RABToBeSwitchedDLItem PRESENCE mandatory }, + ... +} + +E-RABToBeSwitchedDLItem ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + transportLayerAddress TransportLayerAddress, + gTP-TEID GTP-TEID, + iE-Extensions ProtocolExtensionContainer { { E-RABToBeSwitchedDLItem-ExtIEs} } OPTIONAL, + ... +} + +E-RABToBeSwitchedDLItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- Path Switch Request Acknowledge +-- +-- ************************************************************** + +PathSwitchRequestAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PathSwitchRequestAcknowledgeIEs} }, + ... +} + +PathSwitchRequestAcknowledgeIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-uEaggregateMaximumBitrate CRITICALITY ignore TYPE UEAggregateMaximumBitrate PRESENCE optional}| + { ID id-E-RABToBeSwitchedULList CRITICALITY ignore TYPE E-RABToBeSwitchedULList PRESENCE optional}| + { ID id-E-RABToBeReleasedList CRITICALITY ignore TYPE E-RABList PRESENCE optional}| + { ID id-SecurityContext CRITICALITY reject TYPE SecurityContext PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MME-UE-S1AP-ID-2 CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE optional}| + { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| + { ID id-ProSeAuthorized CRITICALITY ignore TYPE ProSeAuthorized PRESENCE optional}| + { ID id-UEUserPlaneCIoTSupportIndicator CRITICALITY ignore TYPE UEUserPlaneCIoTSupportIndicator PRESENCE optional}| + { ID id-V2XServicesAuthorized CRITICALITY ignore TYPE V2XServicesAuthorized PRESENCE optional}| + { ID id-UESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE UESidelinkAggregateMaximumBitrate PRESENCE optional}| + { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional}| + { ID id-NRUESecurityCapabilities CRITICALITY ignore TYPE NRUESecurityCapabilities PRESENCE optional}| + { ID id-CE-ModeBRestricted CRITICALITY ignore TYPE CE-ModeBRestricted PRESENCE optional}| + { ID id-AerialUEsubscriptionInformation CRITICALITY ignore TYPE AerialUEsubscriptionInformation PRESENCE optional}| + { ID id-PendingDataIndication CRITICALITY ignore TYPE PendingDataIndication PRESENCE optional}| + { ID id-Subscription-Based-UE-DifferentiationInfo CRITICALITY ignore TYPE Subscription-Based-UE-DifferentiationInfo PRESENCE optional}, + ... +} + +E-RABToBeSwitchedULList ::= E-RAB-IE-ContainerList { {E-RABToBeSwitchedULItemIEs} } + +E-RABToBeSwitchedULItemIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABToBeSwitchedULItem CRITICALITY ignore TYPE E-RABToBeSwitchedULItem PRESENCE mandatory }, + ... +} + +E-RABToBeSwitchedULItem ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + transportLayerAddress TransportLayerAddress, + gTP-TEID GTP-TEID, + iE-Extensions ProtocolExtensionContainer { { E-RABToBeSwitchedULItem-ExtIEs} } OPTIONAL, + ... +} + +E-RABToBeSwitchedULItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +-- ************************************************************** +-- +-- Path Switch Request Failure +-- +-- ************************************************************** + +PathSwitchRequestFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PathSwitchRequestFailureIEs} }, + ... +} + +PathSwitchRequestFailureIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- HANDOVER CANCEL ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Handover Cancel +-- +-- ************************************************************** + +HandoverCancel ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { HandoverCancelIEs} }, + ... +} + +HandoverCancelIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- Handover Cancel Request Acknowledge +-- +-- ************************************************************** + +HandoverCancelAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { HandoverCancelAcknowledgeIEs} }, + ... +} + +HandoverCancelAcknowledgeIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- E-RAB SETUP ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- E-RAB Setup Request +-- +-- ************************************************************** + +E-RABSetupRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {E-RABSetupRequestIEs} }, + ... +} + +E-RABSetupRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE optional }| + { ID id-E-RABToBeSetupListBearerSUReq CRITICALITY reject TYPE E-RABToBeSetupListBearerSUReq PRESENCE mandatory }, + ... +} + +E-RABToBeSetupListBearerSUReq ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABToBeSetupItemBearerSUReqIEs} } + +E-RABToBeSetupItemBearerSUReqIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABToBeSetupItemBearerSUReq CRITICALITY reject TYPE E-RABToBeSetupItemBearerSUReq PRESENCE mandatory }, + ... +} + +E-RABToBeSetupItemBearerSUReq ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RABlevelQoSParameters E-RABLevelQoSParameters, + transportLayerAddress TransportLayerAddress, + gTP-TEID GTP-TEID, + nAS-PDU NAS-PDU, + iE-Extensions ProtocolExtensionContainer { {E-RABToBeSetupItemBearerSUReqExtIEs} } OPTIONAL, + ... +} + + +E-RABToBeSetupItemBearerSUReqExtIEs S1AP-PROTOCOL-EXTENSION ::= { + { ID id-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}| + { ID id-SIPTO-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}| + { ID id-BearerType CRITICALITY reject EXTENSION BearerType PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- E-RAB Setup Response +-- +-- ************************************************************** + +E-RABSetupResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {E-RABSetupResponseIEs} }, + ... +} + +E-RABSetupResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-E-RABSetupListBearerSURes CRITICALITY ignore TYPE E-RABSetupListBearerSURes PRESENCE optional }| + { ID id-E-RABFailedToSetupListBearerSURes CRITICALITY ignore TYPE E-RABList PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +E-RABSetupListBearerSURes ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABSetupItemBearerSUResIEs} } + +E-RABSetupItemBearerSUResIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABSetupItemBearerSURes CRITICALITY ignore TYPE E-RABSetupItemBearerSURes PRESENCE mandatory }, + ... +} + +E-RABSetupItemBearerSURes ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + transportLayerAddress TransportLayerAddress, + gTP-TEID GTP-TEID, + iE-Extensions ProtocolExtensionContainer { {E-RABSetupItemBearerSUResExtIEs} } OPTIONAL, + ... +} + + +E-RABSetupItemBearerSUResExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + + +-- ************************************************************** +-- +-- E-RAB MODIFY ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- E-RAB Modify Request +-- +-- ************************************************************** + +E-RABModifyRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {E-RABModifyRequestIEs} }, + ... +} + +E-RABModifyRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE optional }| + { ID id-E-RABToBeModifiedListBearerModReq CRITICALITY reject TYPE E-RABToBeModifiedListBearerModReq PRESENCE mandatory }| + { ID id-SecondaryRATDataUsageRequest CRITICALITY ignore TYPE SecondaryRATDataUsageRequest PRESENCE optional }, + ... +} + +E-RABToBeModifiedListBearerModReq ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABToBeModifiedItemBearerModReqIEs} } + +E-RABToBeModifiedItemBearerModReqIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABToBeModifiedItemBearerModReq CRITICALITY reject TYPE E-RABToBeModifiedItemBearerModReq PRESENCE mandatory }, + ... +} + +E-RABToBeModifiedItemBearerModReq ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RABLevelQoSParameters E-RABLevelQoSParameters, + nAS-PDU NAS-PDU, + iE-Extensions ProtocolExtensionContainer { {E-RABToBeModifyItemBearerModReqExtIEs} } OPTIONAL, + ... +} + + +E-RABToBeModifyItemBearerModReqExtIEs S1AP-PROTOCOL-EXTENSION ::= { + { ID id-TransportInformation CRITICALITY reject EXTENSION TransportInformation PRESENCE optional}, + ... +} + + + +-- ************************************************************** +-- +-- E-RAB Modify Response +-- +-- ************************************************************** + +E-RABModifyResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {E-RABModifyResponseIEs} }, + ... +} + +E-RABModifyResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-E-RABModifyListBearerModRes CRITICALITY ignore TYPE E-RABModifyListBearerModRes PRESENCE optional }| + { ID id-E-RABFailedToModifyList CRITICALITY ignore TYPE E-RABList PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-SecondaryRATDataUsageReportList CRITICALITY ignore TYPE SecondaryRATDataUsageReportList PRESENCE optional }, + ... +} + + +E-RABModifyListBearerModRes ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABModifyItemBearerModResIEs} } + +E-RABModifyItemBearerModResIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABModifyItemBearerModRes CRITICALITY ignore TYPE E-RABModifyItemBearerModRes PRESENCE mandatory}, + ... +} + +E-RABModifyItemBearerModRes ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + iE-Extensions ProtocolExtensionContainer { {E-RABModifyItemBearerModResExtIEs} } OPTIONAL, + ... +} + + +E-RABModifyItemBearerModResExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + + + +-- ************************************************************** +-- +-- E-RAB RELEASE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- E-RAB Release Command +-- +-- ************************************************************** + +E-RABReleaseCommand ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {E-RABReleaseCommandIEs} }, + ... +} + +E-RABReleaseCommandIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE optional }| + { ID id-E-RABToBeReleasedList CRITICALITY ignore TYPE E-RABList PRESENCE mandatory }| + { ID id-NAS-PDU CRITICALITY ignore TYPE NAS-PDU PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- E-RAB Release Response +-- +-- ************************************************************** + +E-RABReleaseResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { E-RABReleaseResponseIEs } }, + ... +} + +E-RABReleaseResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-E-RABReleaseListBearerRelComp CRITICALITY ignore TYPE E-RABReleaseListBearerRelComp PRESENCE optional }| + { ID id-E-RABFailedToReleaseList CRITICALITY ignore TYPE E-RABList PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| +-- Extension for Release 12 to support User Location Information -- + { ID id-UserLocationInformation CRITICALITY ignore TYPE UserLocationInformation PRESENCE optional }| + { ID id-SecondaryRATDataUsageReportList CRITICALITY ignore TYPE SecondaryRATDataUsageReportList PRESENCE optional }, + ... +} + + +E-RABReleaseListBearerRelComp ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABReleaseItemBearerRelCompIEs} } + +E-RABReleaseItemBearerRelCompIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABReleaseItemBearerRelComp CRITICALITY ignore TYPE E-RABReleaseItemBearerRelComp PRESENCE mandatory }, + ... +} + +E-RABReleaseItemBearerRelComp ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + iE-Extensions ProtocolExtensionContainer { {E-RABReleaseItemBearerRelCompExtIEs} } OPTIONAL, + ... +} + + +E-RABReleaseItemBearerRelCompExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + + +-- ************************************************************** +-- +-- E-RAB RELEASE INDICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- E-RAB Release Indication +-- +-- ************************************************************** + +E-RABReleaseIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {E-RABReleaseIndicationIEs} }, + ... +} + +E-RABReleaseIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-E-RABReleasedList CRITICALITY ignore TYPE E-RABList PRESENCE mandatory }| +-- Extension for Release 12 to support User Location Information -- + { ID id-UserLocationInformation CRITICALITY ignore TYPE UserLocationInformation PRESENCE optional }| + { ID id-SecondaryRATDataUsageReportList CRITICALITY ignore TYPE SecondaryRATDataUsageReportList PRESENCE optional }, + ... +} +-- ************************************************************** +-- +-- INITIAL CONTEXT SETUP ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Initial Context Setup Request +-- +-- ************************************************************** + +InitialContextSetupRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {InitialContextSetupRequestIEs} }, + ... +} + +InitialContextSetupRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE mandatory}| + { ID id-E-RABToBeSetupListCtxtSUReq CRITICALITY reject TYPE E-RABToBeSetupListCtxtSUReq PRESENCE mandatory}| + { ID id-UESecurityCapabilities CRITICALITY reject TYPE UESecurityCapabilities PRESENCE mandatory}| + { ID id-SecurityKey CRITICALITY reject TYPE SecurityKey PRESENCE mandatory}| + { ID id-TraceActivation CRITICALITY ignore TYPE TraceActivation PRESENCE optional}| + { ID id-HandoverRestrictionList CRITICALITY ignore TYPE HandoverRestrictionList PRESENCE optional}| + { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE optional}| + { ID id-SubscriberProfileIDforRFP CRITICALITY ignore TYPE SubscriberProfileIDforRFP PRESENCE optional}| + { ID id-CSFallbackIndicator CRITICALITY reject TYPE CSFallbackIndicator PRESENCE optional}| + { ID id-SRVCCOperationPossible CRITICALITY ignore TYPE SRVCCOperationPossible PRESENCE optional}| + { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| + { ID id-RegisteredLAI CRITICALITY ignore TYPE LAI PRESENCE optional}| + { ID id-GUMMEI-ID CRITICALITY ignore TYPE GUMMEI PRESENCE optional}| + { ID id-MME-UE-S1AP-ID-2 CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE optional}| + { ID id-ManagementBasedMDTAllowed CRITICALITY ignore TYPE ManagementBasedMDTAllowed PRESENCE optional}| + { ID id-ManagementBasedMDTPLMNList CRITICALITY ignore TYPE MDTPLMNList PRESENCE optional}| + { ID id-AdditionalCSFallbackIndicator CRITICALITY ignore TYPE AdditionalCSFallbackIndicator PRESENCE conditional}| + { ID id-Masked-IMEISV CRITICALITY ignore TYPE Masked-IMEISV PRESENCE optional}| + { ID id-ExpectedUEBehaviour CRITICALITY ignore TYPE ExpectedUEBehaviour PRESENCE optional}| + { ID id-ProSeAuthorized CRITICALITY ignore TYPE ProSeAuthorized PRESENCE optional}| + { ID id-UEUserPlaneCIoTSupportIndicator CRITICALITY ignore TYPE UEUserPlaneCIoTSupportIndicator PRESENCE optional}| + { ID id-V2XServicesAuthorized CRITICALITY ignore TYPE V2XServicesAuthorized PRESENCE optional}| + { ID id-UESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE UESidelinkAggregateMaximumBitrate PRESENCE optional}| + { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional}| + { ID id-NRUESecurityCapabilities CRITICALITY ignore TYPE NRUESecurityCapabilities PRESENCE optional}| + { ID id-CE-ModeBRestricted CRITICALITY ignore TYPE CE-ModeBRestricted PRESENCE optional}| + { ID id-AerialUEsubscriptionInformation CRITICALITY ignore TYPE AerialUEsubscriptionInformation PRESENCE optional}| + { ID id-PendingDataIndication CRITICALITY ignore TYPE PendingDataIndication PRESENCE optional}| + { ID id-Subscription-Based-UE-DifferentiationInfo CRITICALITY ignore TYPE Subscription-Based-UE-DifferentiationInfo PRESENCE optional}, + ... +} + + + + +E-RABToBeSetupListCtxtSUReq ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABToBeSetupItemCtxtSUReqIEs} } + +E-RABToBeSetupItemCtxtSUReqIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABToBeSetupItemCtxtSUReq CRITICALITY reject TYPE E-RABToBeSetupItemCtxtSUReq PRESENCE mandatory }, + ... +} + +E-RABToBeSetupItemCtxtSUReq ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RABlevelQoSParameters E-RABLevelQoSParameters, + transportLayerAddress TransportLayerAddress, + gTP-TEID GTP-TEID, + nAS-PDU NAS-PDU OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABToBeSetupItemCtxtSUReqExtIEs} } OPTIONAL, + ... +} + + +E-RABToBeSetupItemCtxtSUReqExtIEs S1AP-PROTOCOL-EXTENSION ::= { + { ID id-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}| + { ID id-SIPTO-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}| + { ID id-BearerType CRITICALITY reject EXTENSION BearerType PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- Initial Context Setup Response +-- +-- ************************************************************** + +InitialContextSetupResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {InitialContextSetupResponseIEs} }, + ... +} + +InitialContextSetupResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-E-RABSetupListCtxtSURes CRITICALITY ignore TYPE E-RABSetupListCtxtSURes PRESENCE mandatory }| + { ID id-E-RABFailedToSetupListCtxtSURes CRITICALITY ignore TYPE E-RABList PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +E-RABSetupListCtxtSURes ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABSetupItemCtxtSUResIEs} } + +E-RABSetupItemCtxtSUResIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABSetupItemCtxtSURes CRITICALITY ignore TYPE E-RABSetupItemCtxtSURes PRESENCE mandatory }, + ... +} + +E-RABSetupItemCtxtSURes ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + transportLayerAddress TransportLayerAddress, + gTP-TEID GTP-TEID, + iE-Extensions ProtocolExtensionContainer { {E-RABSetupItemCtxtSUResExtIEs} } OPTIONAL, + ... +} + + +E-RABSetupItemCtxtSUResExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +-- ************************************************************** +-- +-- Initial Context Setup Failure +-- +-- ************************************************************** + +InitialContextSetupFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {InitialContextSetupFailureIEs} }, + ... +} + +InitialContextSetupFailureIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- PAGING ELEMENTARY PROCEDURE +-- +-- ************************************************************** + + +-- ************************************************************** +-- +-- Paging +-- +-- ************************************************************** + +Paging ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{PagingIEs}}, + ... +} + +PagingIEs S1AP-PROTOCOL-IES ::= { + { ID id-UEIdentityIndexValue CRITICALITY ignore TYPE UEIdentityIndexValue PRESENCE mandatory}| + { ID id-UEPagingID CRITICALITY ignore TYPE UEPagingID PRESENCE mandatory}| + { ID id-pagingDRX CRITICALITY ignore TYPE PagingDRX PRESENCE optional}| + { ID id-CNDomain CRITICALITY ignore TYPE CNDomain PRESENCE mandatory}| + { ID id-TAIList CRITICALITY ignore TYPE TAIList PRESENCE mandatory}| + { ID id-CSG-IdList CRITICALITY ignore TYPE CSG-IdList PRESENCE optional}| + { ID id-PagingPriority CRITICALITY ignore TYPE PagingPriority PRESENCE optional}| + { ID id-UERadioCapabilityForPaging CRITICALITY ignore TYPE UERadioCapabilityForPaging PRESENCE optional}| +-- Extension for Release 13 to support Paging Optimisation and Coverage Enhancement paging –- + { ID id-AssistanceDataForPaging CRITICALITY ignore TYPE AssistanceDataForPaging PRESENCE optional}| + { ID id-Paging-eDRXInformation CRITICALITY ignore TYPE Paging-eDRXInformation PRESENCE optional}| + { ID id-extended-UEIdentityIndexValue CRITICALITY ignore TYPE Extended-UEIdentityIndexValue PRESENCE optional}| + { ID id-NB-IoT-Paging-eDRXInformation CRITICALITY ignore TYPE NB-IoT-Paging-eDRXInformation PRESENCE optional}| + { ID id-NB-IoT-UEIdentityIndexValue CRITICALITY ignore TYPE NB-IoT-UEIdentityIndexValue PRESENCE optional}| + { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional}| + { ID id-CE-ModeBRestricted CRITICALITY ignore TYPE CE-ModeBRestricted PRESENCE optional}, + ... +} + +TAIList::= SEQUENCE (SIZE(1.. maxnoofTAIs)) OF ProtocolIE-SingleContainer {{TAIItemIEs}} + +TAIItemIEs S1AP-PROTOCOL-IES ::= { + { ID id-TAIItem CRITICALITY ignore TYPE TAIItem PRESENCE mandatory }, + ... +} + +TAIItem ::= SEQUENCE { + tAI TAI, + iE-Extensions ProtocolExtensionContainer { {TAIItemExtIEs} } OPTIONAL, + ... +} + + +TAIItemExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- UE CONTEXT RELEASE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE Context Release Request +-- +-- ************************************************************** + +UEContextReleaseRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{UEContextReleaseRequest-IEs}}, + ... +} + +UEContextReleaseRequest-IEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-GWContextReleaseIndication CRITICALITY reject TYPE GWContextReleaseIndication PRESENCE optional }| + { ID id-SecondaryRATDataUsageReportList CRITICALITY ignore TYPE SecondaryRATDataUsageReportList PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- UE Context Release Command +-- +-- ************************************************************** + +UEContextReleaseCommand ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{UEContextReleaseCommand-IEs}}, + ... +} + +UEContextReleaseCommand-IEs S1AP-PROTOCOL-IES ::= { + { ID id-UE-S1AP-IDs CRITICALITY reject TYPE UE-S1AP-IDs PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- UE Context Release Complete +-- +-- ************************************************************** + +UEContextReleaseComplete ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{UEContextReleaseComplete-IEs}}, + ... +} + +UEContextReleaseComplete-IEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| +-- Extension for Release 12 to support User Location Information -- + { ID id-UserLocationInformation CRITICALITY ignore TYPE UserLocationInformation PRESENCE optional}| +-- Extension for Release 13 to support Paging Optimisation + { ID id-InformationOnRecommendedCellsAndENBsForPaging CRITICALITY ignore TYPE InformationOnRecommendedCellsAndENBsForPaging PRESENCE optional}| +-- Extension for Release 13 to support coverage enhancement paging – + { ID id-CellIdentifierAndCELevelForCECapableUEs CRITICALITY ignore TYPE CellIdentifierAndCELevelForCECapableUEs PRESENCE optional}| + { ID id-SecondaryRATDataUsageReportList CRITICALITY ignore TYPE SecondaryRATDataUsageReportList PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- UE CONTEXT MODIFICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE Context Modification Request +-- +-- ************************************************************** + +UEContextModificationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextModificationRequestIEs} }, + ... +} + +UEContextModificationRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-SecurityKey CRITICALITY reject TYPE SecurityKey PRESENCE optional}| + { ID id-SubscriberProfileIDforRFP CRITICALITY ignore TYPE SubscriberProfileIDforRFP PRESENCE optional}| + { ID id-uEaggregateMaximumBitrate CRITICALITY ignore TYPE UEAggregateMaximumBitrate PRESENCE optional}| + { ID id-CSFallbackIndicator CRITICALITY reject TYPE CSFallbackIndicator PRESENCE optional}| + { ID id-UESecurityCapabilities CRITICALITY reject TYPE UESecurityCapabilities PRESENCE optional}| + { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| + { ID id-RegisteredLAI CRITICALITY ignore TYPE LAI PRESENCE optional}| + { ID id-AdditionalCSFallbackIndicator CRITICALITY ignore TYPE AdditionalCSFallbackIndicator PRESENCE conditional}| + { ID id-ProSeAuthorized CRITICALITY ignore TYPE ProSeAuthorized PRESENCE optional}| + { ID id-SRVCCOperationPossible CRITICALITY ignore TYPE SRVCCOperationPossible PRESENCE optional}| + { ID id-SRVCCOperationNotPossible CRITICALITY ignore TYPE SRVCCOperationNotPossible PRESENCE optional}| + { ID id-V2XServicesAuthorized CRITICALITY ignore TYPE V2XServicesAuthorized PRESENCE optional}| + { ID id-UESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE UESidelinkAggregateMaximumBitrate PRESENCE optional}| + { ID id-NRUESecurityCapabilities CRITICALITY ignore TYPE NRUESecurityCapabilities PRESENCE optional}| + { ID id-AerialUEsubscriptionInformation CRITICALITY ignore TYPE AerialUEsubscriptionInformation PRESENCE optional}, + ... +} +-- ************************************************************** +-- +-- UE Context Modification Response +-- +-- ************************************************************** + +UEContextModificationResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextModificationResponseIEs} }, + ... +} + +UEContextModificationResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} +-- ************************************************************** +-- +-- UE Context Modification Failure +-- +-- ************************************************************** + +UEContextModificationFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextModificationFailureIEs} }, + ... +} + +UEContextModificationFailureIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- UE RADIO CAPABILITY MATCH ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE Radio Capability Match Request +-- +-- ************************************************************** + +UERadioCapabilityMatchRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UERadioCapabilityMatchRequestIEs} }, + ... +} + +UERadioCapabilityMatchRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- UE Radio Capability Match Response +-- +-- ************************************************************** + +UERadioCapabilityMatchResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UERadioCapabilityMatchResponseIEs} }, + ... +} + +UERadioCapabilityMatchResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-VoiceSupportMatchIndicator CRITICALITY reject TYPE VoiceSupportMatchIndicator PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- NAS TRANSPORT ELEMENTARY PROCEDURES +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- DOWNLINK NAS TRANSPORT +-- +-- ************************************************************** + +DownlinkNASTransport ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{DownlinkNASTransport-IEs}}, + ... +} + +DownlinkNASTransport-IEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-NAS-PDU CRITICALITY reject TYPE NAS-PDU PRESENCE mandatory}| + { ID id-HandoverRestrictionList CRITICALITY ignore TYPE HandoverRestrictionList PRESENCE optional}| + { ID id-SubscriberProfileIDforRFP CRITICALITY ignore TYPE SubscriberProfileIDforRFP PRESENCE optional}| + { ID id-SRVCCOperationPossible CRITICALITY ignore TYPE SRVCCOperationPossible PRESENCE optional}| + { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE optional}| + { ID id-DLNASPDUDeliveryAckRequest CRITICALITY ignore TYPE DLNASPDUDeliveryAckRequest PRESENCE optional}| + { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional}| + { ID id-NRUESecurityCapabilities CRITICALITY ignore TYPE NRUESecurityCapabilities PRESENCE optional}| + { ID id-CE-ModeBRestricted CRITICALITY ignore TYPE CE-ModeBRestricted PRESENCE optional}| + { ID id-UECapabilityInfoRequest CRITICALITY ignore TYPE UECapabilityInfoRequest PRESENCE optional}| + { ID id-EndIndication CRITICALITY ignore TYPE EndIndication PRESENCE optional}| + { ID id-PendingDataIndication CRITICALITY ignore TYPE PendingDataIndication PRESENCE optional}| + { ID id-Subscription-Based-UE-DifferentiationInfo CRITICALITY ignore TYPE Subscription-Based-UE-DifferentiationInfo PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- INITIAL UE MESSAGE +-- +-- ************************************************************** + +InitialUEMessage ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{InitialUEMessage-IEs}}, + ... +} + +InitialUEMessage-IEs S1AP-PROTOCOL-IES ::= { + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-NAS-PDU CRITICALITY reject TYPE NAS-PDU PRESENCE mandatory}| + { ID id-TAI CRITICALITY reject TYPE TAI PRESENCE mandatory}| + { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory}| + { ID id-RRC-Establishment-Cause CRITICALITY ignore TYPE RRC-Establishment-Cause PRESENCE mandatory}| + { ID id-S-TMSI CRITICALITY reject TYPE S-TMSI PRESENCE optional}| + { ID id-CSG-Id CRITICALITY reject TYPE CSG-Id PRESENCE optional}| + { ID id-GUMMEI-ID CRITICALITY reject TYPE GUMMEI PRESENCE optional}| + { ID id-CellAccessMode CRITICALITY reject TYPE CellAccessMode PRESENCE optional}| + { ID id-GW-TransportLayerAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE optional}| + { ID id-RelayNode-Indicator CRITICALITY reject TYPE RelayNode-Indicator PRESENCE optional}| + { ID id-GUMMEIType CRITICALITY ignore TYPE GUMMEIType PRESENCE optional}| +-- Extension for Release 11 to support BBAI -- + { ID id-Tunnel-Information-for-BBF CRITICALITY ignore TYPE TunnelInformation PRESENCE optional}| + { ID id-SIPTO-L-GW-TransportLayerAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE optional}| + { ID id-LHN-ID CRITICALITY ignore TYPE LHN-ID PRESENCE optional}| + { ID id-MME-Group-ID CRITICALITY ignore TYPE MME-Group-ID PRESENCE optional}| + { ID id-UE-Usage-Type CRITICALITY ignore TYPE UE-Usage-Type PRESENCE optional}| + { ID id-CE-mode-B-SupportIndicator CRITICALITY ignore TYPE CE-mode-B-SupportIndicator PRESENCE optional}| + { ID id-DCN-ID CRITICALITY ignore TYPE DCN-ID PRESENCE optional}| + { ID id-Coverage-Level CRITICALITY ignore TYPE Coverage-Level PRESENCE optional}| + { ID id-UE-Application-Layer-Measurement-Capability CRITICALITY ignore TYPE UE-Application-Layer-Measurement-Capability PRESENCE optional}| + { ID id-EDT-Session CRITICALITY ignore TYPE EDT-Session PRESENCE optional}, + + ... +} + + +-- ************************************************************** +-- +-- UPLINK NAS TRANSPORT +-- +-- ************************************************************** + +UplinkNASTransport ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{UplinkNASTransport-IEs}}, + ... +} + +UplinkNASTransport-IEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-NAS-PDU CRITICALITY reject TYPE NAS-PDU PRESENCE mandatory}| + { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory}| + { ID id-TAI CRITICALITY ignore TYPE TAI PRESENCE mandatory}| + { ID id-GW-TransportLayerAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE optional}| + { ID id-SIPTO-L-GW-TransportLayerAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE optional}| + { ID id-LHN-ID CRITICALITY ignore TYPE LHN-ID PRESENCE optional}, + ... +} +-- ************************************************************** +-- +-- NAS NON DELIVERY INDICATION +-- +-- ************************************************************** + +NASNonDeliveryIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{NASNonDeliveryIndication-IEs}}, + ... +} + +NASNonDeliveryIndication-IEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-NAS-PDU CRITICALITY ignore TYPE NAS-PDU PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- REROUTE NAS REQUEST +-- +-- ************************************************************** + +RerouteNASRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RerouteNASRequest-IEs}}, + ... +} + +RerouteNASRequest-IEs S1AP-PROTOCOL-IES ::= { + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE optional}| + { ID id-S1-Message CRITICALITY reject TYPE OCTET STRING PRESENCE mandatory}| + { ID id-MME-Group-ID CRITICALITY reject TYPE MME-Group-ID PRESENCE mandatory}| + { ID id-Additional-GUTI CRITICALITY ignore TYPE Additional-GUTI PRESENCE optional}| + { ID id-UE-Usage-Type CRITICALITY ignore TYPE UE-Usage-Type PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- NAS DELIVERY INDICATION +-- +-- ************************************************************** + +NASDeliveryIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { NASDeliveryIndicationIEs} }, + ... +} + +NASDeliveryIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- RESET ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Reset +-- +-- ************************************************************** + +Reset ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ResetIEs} }, + ... +} + +ResetIEs S1AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-ResetType CRITICALITY reject TYPE ResetType PRESENCE mandatory }, + ... +} + +ResetType ::= CHOICE { + s1-Interface ResetAll, + partOfS1-Interface UE-associatedLogicalS1-ConnectionListRes, + ... +} + + + +ResetAll ::= ENUMERATED { + reset-all, + ... +} + +UE-associatedLogicalS1-ConnectionListRes ::= SEQUENCE (SIZE(1.. maxnoofIndividualS1ConnectionsToReset)) OF ProtocolIE-SingleContainer { { UE-associatedLogicalS1-ConnectionItemRes } } + +UE-associatedLogicalS1-ConnectionItemRes S1AP-PROTOCOL-IES ::= { + { ID id-UE-associatedLogicalS1-ConnectionItem CRITICALITY reject TYPE UE-associatedLogicalS1-ConnectionItem PRESENCE mandatory}, + ... +} + + +-- ************************************************************** +-- +-- Reset Acknowledge +-- +-- ************************************************************** + +ResetAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ResetAcknowledgeIEs} }, + ... +} + +ResetAcknowledgeIEs S1AP-PROTOCOL-IES ::= { + { ID id-UE-associatedLogicalS1-ConnectionListResAck CRITICALITY ignore TYPE UE-associatedLogicalS1-ConnectionListResAck PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +UE-associatedLogicalS1-ConnectionListResAck ::= SEQUENCE (SIZE(1.. maxnoofIndividualS1ConnectionsToReset)) OF ProtocolIE-SingleContainer { { UE-associatedLogicalS1-ConnectionItemResAck } } + +UE-associatedLogicalS1-ConnectionItemResAck S1AP-PROTOCOL-IES ::= { + { ID id-UE-associatedLogicalS1-ConnectionItem CRITICALITY ignore TYPE UE-associatedLogicalS1-ConnectionItem PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- ERROR INDICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Error Indication +-- +-- ************************************************************** + +ErrorIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ErrorIndicationIEs}}, + ... +} + +ErrorIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE optional }| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE optional }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- S1 SETUP ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- S1 Setup Request +-- +-- ************************************************************** + +S1SetupRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {S1SetupRequestIEs} }, + ... +} + +S1SetupRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-Global-ENB-ID CRITICALITY reject TYPE Global-ENB-ID PRESENCE mandatory}| + { ID id-eNBname CRITICALITY ignore TYPE ENBname PRESENCE optional}| + { ID id-SupportedTAs CRITICALITY reject TYPE SupportedTAs PRESENCE mandatory}| + { ID id-DefaultPagingDRX CRITICALITY ignore TYPE PagingDRX PRESENCE mandatory}| + { ID id-CSG-IdList CRITICALITY reject TYPE CSG-IdList PRESENCE optional}| + { ID id-UE-RetentionInformation CRITICALITY ignore TYPE UE-RetentionInformation PRESENCE optional}| + { ID id-NB-IoT-DefaultPagingDRX CRITICALITY ignore TYPE NB-IoT-DefaultPagingDRX PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- S1 Setup Response +-- +-- ************************************************************** + +S1SetupResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {S1SetupResponseIEs} }, + ... +} + + +S1SetupResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MMEname CRITICALITY ignore TYPE MMEname PRESENCE optional}| + { ID id-ServedGUMMEIs CRITICALITY reject TYPE ServedGUMMEIs PRESENCE mandatory}| + { ID id-RelativeMMECapacity CRITICALITY ignore TYPE RelativeMMECapacity PRESENCE mandatory}| + { ID id-MMERelaySupportIndicator CRITICALITY ignore TYPE MMERelaySupportIndicator PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-UE-RetentionInformation CRITICALITY ignore TYPE UE-RetentionInformation PRESENCE optional}| + { ID id-ServedDCNs CRITICALITY ignore TYPE ServedDCNs PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- S1 Setup Failure +-- +-- ************************************************************** + +S1SetupFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {S1SetupFailureIEs} }, + ... +} + +S1SetupFailureIEs S1AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- ENB CONFIGURATION UPDATE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- eNB Configuration Update +-- +-- ************************************************************** + +ENBConfigurationUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ENBConfigurationUpdateIEs} }, + ... +} + +ENBConfigurationUpdateIEs S1AP-PROTOCOL-IES ::= { + { ID id-eNBname CRITICALITY ignore TYPE ENBname PRESENCE optional}| + { ID id-SupportedTAs CRITICALITY reject TYPE SupportedTAs PRESENCE optional}| + { ID id-CSG-IdList CRITICALITY reject TYPE CSG-IdList PRESENCE optional}| + { ID id-DefaultPagingDRX CRITICALITY ignore TYPE PagingDRX PRESENCE optional}| + { ID id-NB-IoT-DefaultPagingDRX CRITICALITY ignore TYPE NB-IoT-DefaultPagingDRX PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- eNB Configuration Update Acknowledge +-- +-- ************************************************************** + +ENBConfigurationUpdateAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ENBConfigurationUpdateAcknowledgeIEs} }, + ... +} + + +ENBConfigurationUpdateAcknowledgeIEs S1AP-PROTOCOL-IES ::= { + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- eNB Configuration Update Failure +-- +-- ************************************************************** + +ENBConfigurationUpdateFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ENBConfigurationUpdateFailureIEs} }, + ... +} + +ENBConfigurationUpdateFailureIEs S1AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, +... +} + + +-- ************************************************************** +-- +-- MME CONFIGURATION UPDATE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- MME Configuration Update +-- +-- ************************************************************** + +MMEConfigurationUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {MMEConfigurationUpdateIEs} }, + ... +} + +MMEConfigurationUpdateIEs S1AP-PROTOCOL-IES ::= { + { ID id-MMEname CRITICALITY ignore TYPE MMEname PRESENCE optional }| + { ID id-ServedGUMMEIs CRITICALITY reject TYPE ServedGUMMEIs PRESENCE optional }| + { ID id-RelativeMMECapacity CRITICALITY reject TYPE RelativeMMECapacity PRESENCE optional }| + { ID id-ServedDCNs CRITICALITY ignore TYPE ServedDCNs PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- MME Configuration Update Acknowledge +-- +-- ************************************************************** + +MMEConfigurationUpdateAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {MMEConfigurationUpdateAcknowledgeIEs} }, + ... +} + + +MMEConfigurationUpdateAcknowledgeIEs S1AP-PROTOCOL-IES ::= { + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- MME Configuration Update Failure +-- +-- ************************************************************** + +MMEConfigurationUpdateFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {MMEConfigurationUpdateFailureIEs} }, + ... +} + +MMEConfigurationUpdateFailureIEs S1AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- DOWNLINK S1 CDMA2000 TUNNELLING ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Downlink S1 CDMA2000 Tunnelling +-- +-- ************************************************************** + +DownlinkS1cdma2000tunnelling ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {DownlinkS1cdma2000tunnellingIEs} }, + ... +} + +DownlinkS1cdma2000tunnellingIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-E-RABSubjecttoDataForwardingList CRITICALITY ignore TYPE E-RABSubjecttoDataForwardingList PRESENCE optional }| + { ID id-cdma2000HOStatus CRITICALITY ignore TYPE Cdma2000HOStatus PRESENCE optional }| + { ID id-cdma2000RATType CRITICALITY reject TYPE Cdma2000RATType PRESENCE mandatory }| + { ID id-cdma2000PDU CRITICALITY reject TYPE Cdma2000PDU PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- UPLINK S1 CDMA2000 TUNNELLING ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Uplink S1 CDMA2000 Tunnelling +-- +-- ************************************************************** + +UplinkS1cdma2000tunnelling ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {UplinkS1cdma2000tunnellingIEs} }, + ... +} + +UplinkS1cdma2000tunnellingIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-cdma2000RATType CRITICALITY reject TYPE Cdma2000RATType PRESENCE mandatory }| + { ID id-cdma2000SectorID CRITICALITY reject TYPE Cdma2000SectorID PRESENCE mandatory }| + { ID id-cdma2000HORequiredIndication CRITICALITY ignore TYPE Cdma2000HORequiredIndication PRESENCE optional }| + { ID id-cdma2000OneXSRVCCInfo CRITICALITY reject TYPE Cdma2000OneXSRVCCInfo PRESENCE optional }| + { ID id-cdma2000OneXRAND CRITICALITY reject TYPE Cdma2000OneXRAND PRESENCE optional }| + { ID id-cdma2000PDU CRITICALITY reject TYPE Cdma2000PDU PRESENCE mandatory }| + { ID id-EUTRANRoundTripDelayEstimationInfo CRITICALITY ignore TYPE EUTRANRoundTripDelayEstimationInfo PRESENCE optional }, + -- Extension for Release 9 to assist target HRPD access with the acquisition of the UE -- + ... +} + + +-- ************************************************************** +-- +-- UE CAPABILITY INFO INDICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE Capability Info Indication +-- +-- ************************************************************** + +UECapabilityInfoIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UECapabilityInfoIndicationIEs} }, + ... +} + +UECapabilityInfoIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE mandatory}| + { ID id-UERadioCapabilityForPaging CRITICALITY ignore TYPE UERadioCapabilityForPaging PRESENCE optional}| + { ID id-UE-Application-Layer-Measurement-Capability CRITICALITY ignore TYPE UE-Application-Layer-Measurement-Capability PRESENCE optional}| + { ID id-LTE-M-Indication CRITICALITY ignore TYPE LTE-M-Indication PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- eNB STATUS TRANSFER ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- eNB Status Transfer +-- +-- ************************************************************** + +ENBStatusTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ENBStatusTransferIEs} }, + ... +} + +ENBStatusTransferIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-StatusTransfer-TransparentContainer CRITICALITY reject TYPE ENB-StatusTransfer-TransparentContainer PRESENCE mandatory}, + ... +} + + +-- ************************************************************** +-- +-- MME STATUS TRANSFER ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- MME Status Transfer +-- +-- ************************************************************** + +MMEStatusTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {MMEStatusTransferIEs} }, + ... +} + +MMEStatusTransferIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-StatusTransfer-TransparentContainer CRITICALITY reject TYPE ENB-StatusTransfer-TransparentContainer PRESENCE mandatory}, + ... +} + + +-- ************************************************************** +-- +-- TRACE ELEMENTARY PROCEDURES +-- +-- ************************************************************** +-- ************************************************************** +-- +-- Trace Start +-- +-- ************************************************************** + +TraceStart ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {TraceStartIEs} }, + ... +} + +TraceStartIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-TraceActivation CRITICALITY ignore TYPE TraceActivation PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- Trace Failure Indication +-- +-- ************************************************************** + +TraceFailureIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {TraceFailureIndicationIEs} }, + ... +} + +TraceFailureIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-E-UTRAN-Trace-ID CRITICALITY ignore TYPE E-UTRAN-Trace-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- DEACTIVATE TRACE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Deactivate Trace +-- +-- ************************************************************** + +DeactivateTrace ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { DeactivateTraceIEs} }, + ... +} + +DeactivateTraceIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-E-UTRAN-Trace-ID CRITICALITY ignore TYPE E-UTRAN-Trace-ID PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- CELL TRAFFIC TRACE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Cell Traffic Trace +-- +-- ************************************************************** + +CellTrafficTrace ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { CellTrafficTraceIEs } }, + ... +} + +CellTrafficTraceIEs S1AP-PROTOCOL-IES ::= { + {ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + {ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + {ID id-E-UTRAN-Trace-ID CRITICALITY ignore TYPE E-UTRAN-Trace-ID PRESENCE mandatory }| + {ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory }| + {ID id-TraceCollectionEntityIPAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE mandatory }| + {ID id-PrivacyIndicator CRITICALITY ignore TYPE PrivacyIndicator PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- LOCATION ELEMENTARY PROCEDURES +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Location Reporting Control +-- +-- ************************************************************** + +LocationReportingControl ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { LocationReportingControlIEs} }, + ... +} + +LocationReportingControlIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-RequestType CRITICALITY ignore TYPE RequestType PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- Location Report Failure Indication +-- +-- ************************************************************** + +LocationReportingFailureIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { LocationReportingFailureIndicationIEs} }, + ... +} + +LocationReportingFailureIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- Location Report +-- +-- ************************************************************** + +LocationReport ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { LocationReportIEs} }, + ... +} + +LocationReportIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory }| + { ID id-TAI CRITICALITY ignore TYPE TAI PRESENCE mandatory }| + { ID id-RequestType CRITICALITY ignore TYPE RequestType PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- OVERLOAD ELEMENTARY PROCEDURES +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Overload Start +-- +-- ************************************************************** + +OverloadStart ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {OverloadStartIEs} }, + ... +} + +OverloadStartIEs S1AP-PROTOCOL-IES ::= { + { ID id-OverloadResponse CRITICALITY reject TYPE OverloadResponse PRESENCE mandatory }| + { ID id-GUMMEIList CRITICALITY ignore TYPE GUMMEIList PRESENCE optional }| + { ID id-TrafficLoadReductionIndication CRITICALITY ignore TYPE TrafficLoadReductionIndication PRESENCE optional }, + ... +} +-- ************************************************************** +-- +-- Overload Stop +-- +-- ************************************************************** + +OverloadStop ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {OverloadStopIEs} }, + ... +} + +OverloadStopIEs S1AP-PROTOCOL-IES ::= { +{ ID id-GUMMEIList CRITICALITY ignore TYPE GUMMEIList PRESENCE optional }, + ... +} +-- ************************************************************** +-- +-- WRITE-REPLACE WARNING ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Write-Replace Warning Request +-- +-- ************************************************************** + + +WriteReplaceWarningRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {WriteReplaceWarningRequestIEs} }, + ... +} + +WriteReplaceWarningRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-MessageIdentifier CRITICALITY reject TYPE MessageIdentifier PRESENCE mandatory }| + { ID id-SerialNumber CRITICALITY reject TYPE SerialNumber PRESENCE mandatory }| + { ID id-WarningAreaList CRITICALITY ignore TYPE WarningAreaList PRESENCE optional }| + { ID id-RepetitionPeriod CRITICALITY reject TYPE RepetitionPeriod PRESENCE mandatory }| + { ID id-ExtendedRepetitionPeriod CRITICALITY reject TYPE ExtendedRepetitionPeriod PRESENCE optional }| + { ID id-NumberofBroadcastRequest CRITICALITY reject TYPE NumberofBroadcastRequest PRESENCE mandatory }| + { ID id-WarningType CRITICALITY ignore TYPE WarningType PRESENCE optional }| + { ID id-WarningSecurityInfo CRITICALITY ignore TYPE WarningSecurityInfo PRESENCE optional }| + { ID id-DataCodingScheme CRITICALITY ignore TYPE DataCodingScheme PRESENCE optional }| + { ID id-WarningMessageContents CRITICALITY ignore TYPE WarningMessageContents PRESENCE optional }| + { ID id-ConcurrentWarningMessageIndicator CRITICALITY reject TYPE ConcurrentWarningMessageIndicator PRESENCE optional }| + { ID id-WarningAreaCoordinates CRITICALITY ignore TYPE WarningAreaCoordinates PRESENCE optional }, + ... +} +-- ************************************************************** +-- +-- Write-Replace Warning Response +-- +-- ************************************************************** + +WriteReplaceWarningResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {WriteReplaceWarningResponseIEs} }, + ... +} + +WriteReplaceWarningResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MessageIdentifier CRITICALITY reject TYPE MessageIdentifier PRESENCE mandatory }| + { ID id-SerialNumber CRITICALITY reject TYPE SerialNumber PRESENCE mandatory }| + { ID id-BroadcastCompletedAreaList CRITICALITY ignore TYPE BroadcastCompletedAreaList PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- eNB DIRECT INFORMATION TRANSFER ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- eNB Direct Information Transfer +-- +-- ************************************************************** + +ENBDirectInformationTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ ENBDirectInformationTransferIEs}}, + ... +} + +ENBDirectInformationTransferIEs S1AP-PROTOCOL-IES ::= { + { ID id-Inter-SystemInformationTransferTypeEDT CRITICALITY reject TYPE Inter-SystemInformationTransferType PRESENCE mandatory }, + ... +} + +Inter-SystemInformationTransferType ::= CHOICE { + rIMTransfer RIMTransfer, + ... +} + +-- ************************************************************** +-- +-- MME DIRECT INFORMATION TRANSFER ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- MME Direct Information Transfer +-- +-- ************************************************************** + +MMEDirectInformationTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ MMEDirectInformationTransferIEs}}, + ... +} + +MMEDirectInformationTransferIEs S1AP-PROTOCOL-IES ::= { + { ID id-Inter-SystemInformationTransferTypeMDT CRITICALITY reject TYPE Inter-SystemInformationTransferType PRESENCE mandatory }, + ... +} +-- ************************************************************** +-- +-- eNB CONFIGURATION TRANSFER ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- eNB Configuration Transfer +-- +-- ************************************************************** + +ENBConfigurationTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ ENBConfigurationTransferIEs}}, + ... +} + +ENBConfigurationTransferIEs S1AP-PROTOCOL-IES ::= { + { ID id-SONConfigurationTransferECT CRITICALITY ignore TYPE SONConfigurationTransfer PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- MME CONFIGURATION TRANSFER ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- MME Configuration Transfer +-- +-- ************************************************************** + +MMEConfigurationTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ MMEConfigurationTransferIEs}}, + ... +} + +MMEConfigurationTransferIEs S1AP-PROTOCOL-IES ::= { + { ID id-SONConfigurationTransferMCT CRITICALITY ignore TYPE SONConfigurationTransfer PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- PRIVATE MESSAGE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Private Message +-- +-- ************************************************************** + +PrivateMessage ::= SEQUENCE { + privateIEs PrivateIE-Container {{PrivateMessageIEs}}, + ... +} + +PrivateMessageIEs S1AP-PRIVATE-IES ::= { + ... +} + +-- ************************************************************** +-- +-- KILL PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Kill Request +-- +-- ************************************************************** + + +KillRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {KillRequestIEs} }, + ... +} + +KillRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-MessageIdentifier CRITICALITY reject TYPE MessageIdentifier PRESENCE mandatory}| + { ID id-SerialNumber CRITICALITY reject TYPE SerialNumber PRESENCE mandatory}| + { ID id-WarningAreaList CRITICALITY ignore TYPE WarningAreaList PRESENCE optional}| + { ID id-KillAllWarningMessages CRITICALITY reject TYPE KillAllWarningMessages PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- Kill Response +-- +-- ************************************************************** + +KillResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {KillResponseIEs} }, + ... +} + +KillResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MessageIdentifier CRITICALITY reject TYPE MessageIdentifier PRESENCE mandatory }| + { ID id-SerialNumber CRITICALITY reject TYPE SerialNumber PRESENCE mandatory }| + { ID id-BroadcastCancelledAreaList CRITICALITY ignore TYPE BroadcastCancelledAreaList PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- PWS RESTART INDICATION PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- PWS Restart Indication +-- +-- ************************************************************** + +PWSRestartIndication::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ PWSRestartIndicationIEs}}, + ... +} + +PWSRestartIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-ECGIListForRestart CRITICALITY reject TYPE ECGIListForRestart PRESENCE mandatory}| + { ID id-Global-ENB-ID CRITICALITY reject TYPE Global-ENB-ID PRESENCE mandatory}| + { ID id-TAIListForRestart CRITICALITY reject TYPE TAIListForRestart PRESENCE mandatory}| + { ID id-EmergencyAreaIDListForRestart CRITICALITY reject TYPE EmergencyAreaIDListForRestart PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- PWS Failure Indication +-- +-- ************************************************************** + +PWSFailureIndication::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ PWSFailureIndicationIEs}}, + ... +} + +PWSFailureIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-PWSfailedECGIList CRITICALITY reject TYPE PWSfailedECGIList PRESENCE mandatory}| + { ID id-Global-ENB-ID CRITICALITY reject TYPE Global-ENB-ID PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- LPPA TRANSPORT ELEMENTARY PROCEDURES +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- DOWNLINK UE ASSOCIATED LPPA TRANSPORT +-- +-- ************************************************************** + +DownlinkUEAssociatedLPPaTransport ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{DownlinkUEAssociatedLPPaTransport-IEs}}, + ... +} + +DownlinkUEAssociatedLPPaTransport-IEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-Routing-ID CRITICALITY reject TYPE Routing-ID PRESENCE mandatory }| + { ID id-LPPa-PDU CRITICALITY reject TYPE LPPa-PDU PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- UPLINK UE ASSOCIATED LPPA TRANSPORT +-- +-- ************************************************************** + +UplinkUEAssociatedLPPaTransport ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{UplinkUEAssociatedLPPaTransport-IEs}}, + ... +} + +UplinkUEAssociatedLPPaTransport-IEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| + { ID id-Routing-ID CRITICALITY reject TYPE Routing-ID PRESENCE mandatory }| + { ID id-LPPa-PDU CRITICALITY reject TYPE LPPa-PDU PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- DOWNLINK NON UE ASSOCIATED LPPA TRANSPORT +-- +-- ************************************************************** + +DownlinkNonUEAssociatedLPPaTransport ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{DownlinkNonUEAssociatedLPPaTransport-IEs}}, + ... +} + +DownlinkNonUEAssociatedLPPaTransport-IEs S1AP-PROTOCOL-IES ::= { + { ID id-Routing-ID CRITICALITY reject TYPE Routing-ID PRESENCE mandatory }| + { ID id-LPPa-PDU CRITICALITY reject TYPE LPPa-PDU PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- UPLINK NON UE ASSOCIATED LPPA TRANSPORT +-- +-- ************************************************************** + +UplinkNonUEAssociatedLPPaTransport ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{UplinkNonUEAssociatedLPPaTransport-IEs}}, + ... +} + +UplinkNonUEAssociatedLPPaTransport-IEs S1AP-PROTOCOL-IES ::= { + { ID id-Routing-ID CRITICALITY reject TYPE Routing-ID PRESENCE mandatory }| + { ID id-LPPa-PDU CRITICALITY reject TYPE LPPa-PDU PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- E-RAB MODIFICATION INDICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- E-RAB Modification Indication +-- +-- ************************************************************** + +E-RABModificationIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { E-RABModificationIndicationIEs} }, + ... +} + +E-RABModificationIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-E-RABToBeModifiedListBearerModInd CRITICALITY reject TYPE E-RABToBeModifiedListBearerModInd PRESENCE mandatory}| + { ID id-E-RABNotToBeModifiedListBearerModInd CRITICALITY reject TYPE E-RABNotToBeModifiedListBearerModInd PRESENCE optional}| + { ID id-CSGMembershipInfo CRITICALITY reject TYPE CSGMembershipInfo PRESENCE optional}| +-- Extension for Release 11 to support BBAI -- + { ID id-Tunnel-Information-for-BBF CRITICALITY ignore TYPE TunnelInformation PRESENCE optional}| + { ID id-SecondaryRATDataUsageReportList CRITICALITY ignore TYPE SecondaryRATDataUsageReportList PRESENCE optional }, + ... +} + +E-RABToBeModifiedListBearerModInd ::= E-RAB-IE-ContainerList { {E-RABToBeModifiedItemBearerModIndIEs} } + +E-RABToBeModifiedItemBearerModIndIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABToBeModifiedItemBearerModInd CRITICALITY reject TYPE E-RABToBeModifiedItemBearerModInd PRESENCE mandatory}, + ... +} + +E-RABToBeModifiedItemBearerModInd ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + transportLayerAddress TransportLayerAddress, + dL-GTP-TEID GTP-TEID, + iE-Extensions ProtocolExtensionContainer { { E-RABToBeModifiedItemBearerModInd-ExtIEs} } OPTIONAL, + ... +} + +E-RABToBeModifiedItemBearerModInd-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABNotToBeModifiedListBearerModInd ::= E-RAB-IE-ContainerList { {E-RABNotToBeModifiedItemBearerModIndIEs} } + +E-RABNotToBeModifiedItemBearerModIndIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABNotToBeModifiedItemBearerModInd CRITICALITY reject TYPE E-RABNotToBeModifiedItemBearerModInd PRESENCE mandatory}, + ... +} + +E-RABNotToBeModifiedItemBearerModInd ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + transportLayerAddress TransportLayerAddress, + dL-GTP-TEID GTP-TEID, + iE-Extensions ProtocolExtensionContainer { { E-RABNotToBeModifiedItemBearerModInd-ExtIEs} } OPTIONAL, + ... +} + +E-RABNotToBeModifiedItemBearerModInd-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CSGMembershipInfo ::= SEQUENCE { + cSGMembershipStatus CSGMembershipStatus, + cSG-Id CSG-Id, + cellAccessMode CellAccessMode OPTIONAL, + pLMNidentity PLMNidentity OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { CSGMembershipInfo-ExtIEs} } OPTIONAL, + ... +} + +CSGMembershipInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- E-RAB Modification Confirm +-- +-- ************************************************************** + +E-RABModificationConfirm ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {E-RABModificationConfirmIEs} }, + ... +} + +E-RABModificationConfirmIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-E-RABModifyListBearerModConf CRITICALITY ignore TYPE E-RABModifyListBearerModConf PRESENCE optional}| + { ID id-E-RABFailedToModifyListBearerModConf CRITICALITY ignore TYPE E-RABList PRESENCE optional}| + { ID id-E-RABToBeReleasedListBearerModConf CRITICALITY ignore TYPE E-RABList PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}, + ... +} + +E-RABModifyListBearerModConf ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABModifyItemBearerModConfIEs} } + +E-RABModifyItemBearerModConfIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABModifyItemBearerModConf CRITICALITY ignore TYPE E-RABModifyItemBearerModConf PRESENCE mandatory}, + ... +} + +E-RABModifyItemBearerModConf ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + iE-Extensions ProtocolExtensionContainer { {E-RABModifyItemBearerModConfExtIEs} } OPTIONAL, + ... +} + + +E-RABModifyItemBearerModConfExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +-- ************************************************************** +-- +-- UE CONTEXT MODIFICATION INDICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE Context Modification Indication +-- +-- ************************************************************** + +UEContextModificationIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextModificationIndicationIEs} }, + ... +} + +UEContextModificationIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-CSGMembershipInfo CRITICALITY reject TYPE CSGMembershipInfo PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- UE Context Modification Confirm +-- +-- ************************************************************** + +UEContextModificationConfirm ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {UEContextModificationConfirmIEs} }, + ... +} + +UEContextModificationConfirmIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- UE CONTEXT SUSPEND ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE Context Suspend Request +-- +-- ************************************************************** + +UEContextSuspendRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextSuspendRequestIEs} }, + ... +} + +UEContextSuspendRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-InformationOnRecommendedCellsAndENBsForPaging CRITICALITY ignore TYPE InformationOnRecommendedCellsAndENBsForPaging PRESENCE optional}| + { ID id-CellIdentifierAndCELevelForCECapableUEs CRITICALITY ignore TYPE CellIdentifierAndCELevelForCECapableUEs PRESENCE optional}| + { ID id-SecondaryRATDataUsageReportList CRITICALITY ignore TYPE SecondaryRATDataUsageReportList PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- UE Context Suspend Response +-- +-- ************************************************************** + +UEContextSuspendResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {UEContextSuspendResponseIEs} }, + ... +} + +UEContextSuspendResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-SecurityContext CRITICALITY reject TYPE SecurityContext PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- UE CONTEXT RESUME ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE Context Resume Request +-- +-- ************************************************************** + +UEContextResumeRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextResumeRequestIEs} }, + ... +} + +UEContextResumeRequestIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-E-RABFailedToResumeListResumeReq CRITICALITY reject TYPE E-RABFailedToResumeListResumeReq PRESENCE optional}| + { ID id-RRC-Resume-Cause CRITICALITY ignore TYPE RRC-Establishment-Cause PRESENCE optional}, + ... +} + +E-RABFailedToResumeListResumeReq ::= E-RAB-IE-ContainerList { {E-RABFailedToResumeItemResumeReqIEs} } + +E-RABFailedToResumeItemResumeReqIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABFailedToResumeItemResumeReq CRITICALITY reject TYPE E-RABFailedToResumeItemResumeReq PRESENCE mandatory}, + ... +} + +E-RABFailedToResumeItemResumeReq ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + cause Cause, + iE-Extensions ProtocolExtensionContainer { { E-RABFailedToResumeItemResumeReq-ExtIEs} } OPTIONAL, + ... +} + +E-RABFailedToResumeItemResumeReq-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- UE Context Resume Response +-- +-- ************************************************************** + +UEContextResumeResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextResumeResponseIEs} }, + ... +} + +UEContextResumeResponseIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-E-RABFailedToResumeListResumeRes CRITICALITY reject TYPE E-RABFailedToResumeListResumeRes PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-SecurityContext CRITICALITY reject TYPE SecurityContext PRESENCE optional}| + { ID id-PendingDataIndication CRITICALITY ignore TYPE PendingDataIndication PRESENCE optional}, + ... +} + +E-RABFailedToResumeListResumeRes ::= E-RAB-IE-ContainerList { {E-RABFailedToResumeItemResumeResIEs} } + +E-RABFailedToResumeItemResumeResIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABFailedToResumeItemResumeRes CRITICALITY reject TYPE E-RABFailedToResumeItemResumeRes PRESENCE mandatory}, + ... +} + +E-RABFailedToResumeItemResumeRes ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + cause Cause, + iE-Extensions ProtocolExtensionContainer { { E-RABFailedToResumeItemResumeRes-ExtIEs} } OPTIONAL, + ... +} + +E-RABFailedToResumeItemResumeRes-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- UE Context Resume Failure +-- +-- ************************************************************** + +UEContextResumeFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextResumeFailureIEs} }, + ... +} + +UEContextResumeFailureIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- Connection Establishment Indication +-- +-- ************************************************************** + +ConnectionEstablishmentIndication::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ConnectionEstablishmentIndicationIEs} }, + ... +} + +ConnectionEstablishmentIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE optional }| + { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional }| + { ID id-DL-CP-SecurityInformation CRITICALITY ignore TYPE DL-CP-SecurityInformation PRESENCE optional }| + { ID id-CE-ModeBRestricted CRITICALITY ignore TYPE CE-ModeBRestricted PRESENCE optional}| + { ID id-EndIndication CRITICALITY ignore TYPE EndIndication PRESENCE optional}| + { ID id-Subscription-Based-UE-DifferentiationInfo CRITICALITY ignore TYPE Subscription-Based-UE-DifferentiationInfo PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- Retrieve UE Information +-- +-- ************************************************************** + +RetrieveUEInformation ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { RetrieveUEInformationIEs} }, + ... +} + +RetrieveUEInformationIEs S1AP-PROTOCOL-IES ::= { + { ID id-S-TMSI CRITICALITY reject TYPE S-TMSI PRESENCE mandatory}, +... + +} + + +-- ************************************************************** + +-- UE Information Transfer +-- +-- ************************************************************** +UEInformationTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEInformationTransferIEs} }, + ... +} + +UEInformationTransferIEs S1AP-PROTOCOL-IES ::= { + { ID id-S-TMSI CRITICALITY reject TYPE S-TMSI PRESENCE mandatory}| + { ID id-UE-Level-QoS-Parameters CRITICALITY ignore TYPE E-RABLevelQoSParameters PRESENCE optional}| + { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE optional}| + { ID id-Subscription-Based-UE-DifferentiationInfo CRITICALITY ignore TYPE Subscription-Based-UE-DifferentiationInfo PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- eNB CP Relocation Indication +-- +-- ************************************************************** + +ENBCPRelocationIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { ENBCPRelocationIndicationIEs} }, + ... +} + +ENBCPRelocationIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-S-TMSI CRITICALITY reject TYPE S-TMSI PRESENCE mandatory}| + { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory}| + { ID id-TAI CRITICALITY ignore TYPE TAI PRESENCE mandatory}| + { ID id-UL-CP-SecurityInformation CRITICALITY reject TYPE UL-CP-SecurityInformation PRESENCE mandatory}, + ... +} + + +-- ************************************************************** +-- +-- MME CP Relocation Indication +-- +-- ************************************************************** + +MMECPRelocationIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { MMECPRelocationIndicationIEs} }, + ... +} + +MMECPRelocationIndicationIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}, + ... +} + + +-- ************************************************************** +-- +-- Secondary RAT Data Usage Report +-- +-- ************************************************************** + +SecondaryRATDataUsageReport ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { SecondaryRATDataUsageReportIEs} }, + ... +} + +SecondaryRATDataUsageReportIEs S1AP-PROTOCOL-IES ::= { + { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| + { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| + { ID id-SecondaryRATDataUsageReportList CRITICALITY ignore TYPE SecondaryRATDataUsageReportList PRESENCE mandatory}| + { ID id-HandoverFlag CRITICALITY ignore TYPE HandoverFlag PRESENCE optional}, + ... +} + +END + + + +-- ************************************************************** +-- +-- Information Element Definitions +-- +-- ************************************************************** + +S1AP-IEs { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-IEs (2) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + id-E-RABInformationListItem, + id-E-RABItem, + id-Bearers-SubjectToStatusTransfer-Item, + id-Time-Synchronisation-Info, + id-x2TNLConfigurationInfo, + id-eNBX2ExtendedTransportLayerAddresses, + id-MDTConfiguration, + id-Time-UE-StayedInCell-EnhancedGranularity, + id-HO-Cause, + id-M3Configuration, + id-M4Configuration, + id-M5Configuration, + id-MDT-Location-Info, + id-SignallingBasedMDTPLMNList, + id-MobilityInformation, + id-ULCOUNTValueExtended, + id-DLCOUNTValueExtended, + id-ReceiveStatusOfULPDCPSDUsExtended, + id-eNBIndirectX2TransportLayerAddresses, + id-Muting-Availability-Indication, + id-Muting-Pattern-Information, + id-NRrestrictioninEPSasSecondaryRAT, + id-NRrestrictionin5GS, + id-Synchronisation-Information, + id-uE-HistoryInformationFromTheUE, + id-LoggedMBSFNMDT, + id-SON-Information-Report, + id-RecommendedCellItem, + id-RecommendedENBItem, + id-ProSeUEtoNetworkRelaying, + id-ULCOUNTValuePDCP-SNlength18, + id-DLCOUNTValuePDCP-SNlength18, + id-ReceiveStatusOfULPDCPSDUsPDCP-SNlength18, + id-M6Configuration, + id-M7Configuration, + id-RAT-Type, + id-extended-e-RAB-MaximumBitrateDL, + id-extended-e-RAB-MaximumBitrateUL, + id-extended-e-RAB-GuaranteedBitrateDL, + id-extended-e-RAB-GuaranteedBitrateUL, + id-extended-uEaggregateMaximumBitRateDL, + id-extended-uEaggregateMaximumBitRateUL, + id-SecondaryRATDataUsageReportItem, + id-E-RABUsageReportItem, + id-UEAppLayerMeasConfig, + id-serviceType, + id-UnlicensedSpectrumRestriction, + id-CNTypeRestrictions, id-DownlinkPacketLossRate, + id-UplinkPacketLossRate, + id-BluetoothMeasurementConfiguration, + id-WLANMeasurementConfiguration, + maxnoofCSGs, + maxnoofE-RABs, + maxnoofErrors, + maxnoofBPLMNs, + maxnoofPLMNsPerMME, + maxnoofTACs, + maxnoofEPLMNs, + maxnoofEPLMNsPlusOne, + maxnoofForbLACs, + maxnoofForbTACs, + maxnoofCellsinUEHistoryInfo, + maxnoofCellID, + maxnoofDCNs, + maxnoofEmergencyAreaID, + maxnoofTAIforWarning, + maxnoofCellinTAI, + maxnoofCellinEAI, + maxnoofeNBX2TLAs, + maxnoofeNBX2ExtTLAs, + maxnoofeNBX2GTPTLAs, + maxnoofRATs, + maxnoofGroupIDs, + maxnoofMMECs, + maxnoofTAforMDT, + maxnoofCellIDforMDT, + maxnoofMDTPLMNs, + maxnoofCellsforRestart, + maxnoofRestartTAIs, + maxnoofRestartEmergencyAreaIDs, + maxnoofMBSFNAreaMDT, + maxEARFCN, + maxnoofCellsineNB, + maxnoofRecommendedCells, + maxnoofRecommendedENBs, + maxnooftimeperiods, + maxnoofCellIDforQMC, + maxnoofTAforQMC, + maxnoofPLMNforQMC, + maxnoofBluetoothName, + maxnoofWLANName + + + + +FROM S1AP-Constants + + Criticality, + ProcedureCode, + ProtocolIE-ID, + TriggeringMessage +FROM S1AP-CommonDataTypes + + ProtocolExtensionContainer{}, + S1AP-PROTOCOL-EXTENSION, + ProtocolIE-SingleContainer{}, + S1AP-PROTOCOL-IES + +FROM S1AP-Containers; + +-- A + +Additional-GUTI::= SEQUENCE { + gUMMEI GUMMEI, + m-TMSI M-TMSI, + iE-Extensions ProtocolExtensionContainer { {Additional-GUTI-ExtIEs} } OPTIONAL, + ... +} + +Additional-GUTI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AerialUEsubscriptionInformation ::= ENUMERATED { + allowed, + not-allowed, + ... +} + +AreaScopeOfMDT ::= CHOICE { + cellBased CellBasedMDT, + tABased TABasedMDT, + pLMNWide NULL, + ..., + tAIBased TAIBasedMDT +} + + +AreaScopeOfQMC ::= CHOICE { + cellBased CellBasedQMC, + tABased TABasedQMC, + tAIBased TAIBasedQMC, + pLMNAreaBased PLMNAreaBasedQMC, + ... +} + +AllocationAndRetentionPriority ::= SEQUENCE { + priorityLevel PriorityLevel, + pre-emptionCapability Pre-emptionCapability, + pre-emptionVulnerability Pre-emptionVulnerability, + iE-Extensions ProtocolExtensionContainer { {AllocationAndRetentionPriority-ExtIEs} } OPTIONAL, + ... +} + +AllocationAndRetentionPriority-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AssistanceDataForCECapableUEs ::= SEQUENCE { + cellIdentifierAndCELevelForCECapableUEs CellIdentifierAndCELevelForCECapableUEs, + iE-Extensions ProtocolExtensionContainer { { InformationForCECapableUEs-ExtIEs} } OPTIONAL, + ... +} + +InformationForCECapableUEs-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AssistanceDataForPaging ::= SEQUENCE { + assistanceDataForRecommendedCells AssistanceDataForRecommendedCells OPTIONAL, + assistanceDataForCECapableUEs AssistanceDataForCECapableUEs OPTIONAL, + pagingAttemptInformation PagingAttemptInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { AssistanceDataForPaging-ExtIEs} } OPTIONAL, + ... +} + +AssistanceDataForPaging-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AssistanceDataForRecommendedCells ::= SEQUENCE { + recommendedCellsForPaging RecommendedCellsForPaging, + iE-Extensions ProtocolExtensionContainer { { AssistanceDataForRecommendedCells-ExtIEs} } OPTIONAL, + ... +} + +AssistanceDataForRecommendedCells-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- B + +Bearers-SubjectToStatusTransferList ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { { Bearers-SubjectToStatusTransfer-ItemIEs } } + +Bearers-SubjectToStatusTransfer-ItemIEs S1AP-PROTOCOL-IES ::= { + { ID id-Bearers-SubjectToStatusTransfer-Item CRITICALITY ignore TYPE Bearers-SubjectToStatusTransfer-Item PRESENCE mandatory }, + ... +} + +Bearers-SubjectToStatusTransfer-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + uL-COUNTvalue COUNTvalue, + dL-COUNTvalue COUNTvalue, + receiveStatusofULPDCPSDUs ReceiveStatusofULPDCPSDUs OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {Bearers-SubjectToStatusTransfer-ItemExtIEs} } OPTIONAL, + ... +} + +Bearers-SubjectToStatusTransfer-ItemExtIEs S1AP-PROTOCOL-EXTENSION ::= { + { ID id-ULCOUNTValueExtended CRITICALITY ignore EXTENSION COUNTValueExtended PRESENCE optional}| + { ID id-DLCOUNTValueExtended CRITICALITY ignore EXTENSION COUNTValueExtended PRESENCE optional}| + { ID id-ReceiveStatusOfULPDCPSDUsExtended CRITICALITY ignore EXTENSION ReceiveStatusOfULPDCPSDUsExtended PRESENCE optional}| + { ID id-ULCOUNTValuePDCP-SNlength18 CRITICALITY ignore EXTENSION COUNTvaluePDCP-SNlength18 PRESENCE optional}| + { ID id-DLCOUNTValuePDCP-SNlength18 CRITICALITY ignore EXTENSION COUNTvaluePDCP-SNlength18 PRESENCE optional}| + { ID id-ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 CRITICALITY ignore EXTENSION ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 PRESENCE optional}, + ... +} + +BearerType ::= ENUMERATED { + non-IP, + ... +} + +BitRate ::= INTEGER (0..10000000000) + +BluetoothMeasurementConfiguration ::= SEQUENCE { + bluetoothMeasConfig BluetoothMeasConfig, + bluetoothMeasConfigNameList BluetoothMeasConfigNameList OPTIONAL, + bt-rssi ENUMERATED {true, ...} OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { BluetoothMeasurementConfiguration-ExtIEs } } OPTIONAL, + ... +} + +BluetoothMeasurementConfiguration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BluetoothMeasConfigNameList ::= SEQUENCE (SIZE(1..maxnoofBluetoothName)) OF BluetoothName + +BluetoothMeasConfig::= ENUMERATED {setup,...} + +BluetoothName ::= OCTET STRING (SIZE (1..248)) + +BPLMNs ::= SEQUENCE (SIZE(1.. maxnoofBPLMNs)) OF PLMNidentity + +BroadcastCancelledAreaList ::= CHOICE { + cellID-Cancelled CellID-Cancelled, + tAI-Cancelled TAI-Cancelled, + emergencyAreaID-Cancelled EmergencyAreaID-Cancelled, + ... +} + +BroadcastCompletedAreaList ::= CHOICE { + cellID-Broadcast CellID-Broadcast, + tAI-Broadcast TAI-Broadcast, + emergencyAreaID-Broadcast EmergencyAreaID-Broadcast, + ... +} + + +-- C + +CancelledCellinEAI ::= SEQUENCE (SIZE(1..maxnoofCellinEAI)) OF CancelledCellinEAI-Item + +CancelledCellinEAI-Item ::= SEQUENCE { + eCGI EUTRAN-CGI, + numberOfBroadcasts NumberOfBroadcasts, + iE-Extensions ProtocolExtensionContainer { {CancelledCellinEAI-Item-ExtIEs} } OPTIONAL, + ... +} + +CancelledCellinEAI-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CancelledCellinTAI ::= SEQUENCE (SIZE(1..maxnoofCellinTAI)) OF CancelledCellinTAI-Item + +CancelledCellinTAI-Item ::= SEQUENCE{ + eCGI EUTRAN-CGI, + numberOfBroadcasts NumberOfBroadcasts, + iE-Extensions ProtocolExtensionContainer { {CancelledCellinTAI-Item-ExtIEs} } OPTIONAL, + ... +} + +CancelledCellinTAI-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Cause ::= CHOICE { + radioNetwork CauseRadioNetwork, + transport CauseTransport, + nas CauseNas, + protocol CauseProtocol, + misc CauseMisc, + ... +} + +CauseMisc ::= ENUMERATED { + control-processing-overload, + not-enough-user-plane-processing-resources, + hardware-failure, + om-intervention, + unspecified, + unknown-PLMN, +... +} + +CauseProtocol ::= ENUMERATED { + transfer-syntax-error, + abstract-syntax-error-reject, + abstract-syntax-error-ignore-and-notify, + message-not-compatible-with-receiver-state, + semantic-error, + abstract-syntax-error-falsely-constructed-message, + unspecified, + ... +} + +CauseRadioNetwork ::= ENUMERATED { + unspecified, + tx2relocoverall-expiry, + successful-handover, + release-due-to-eutran-generated-reason, + handover-cancelled, + partial-handover, + ho-failure-in-target-EPC-eNB-or-target-system, + ho-target-not-allowed, + tS1relocoverall-expiry, + tS1relocprep-expiry, + cell-not-available, + unknown-targetID, + no-radio-resources-available-in-target-cell, + unknown-mme-ue-s1ap-id, + unknown-enb-ue-s1ap-id, + unknown-pair-ue-s1ap-id, + handover-desirable-for-radio-reason, + time-critical-handover, + resource-optimisation-handover, + reduce-load-in-serving-cell, + user-inactivity, + radio-connection-with-ue-lost, + load-balancing-tau-required, + cs-fallback-triggered, + ue-not-available-for-ps-service, + radio-resources-not-available, + failure-in-radio-interface-procedure, + invalid-qos-combination, + interrat-redirection, + interaction-with-other-procedure, + unknown-E-RAB-ID, + multiple-E-RAB-ID-instances, + encryption-and-or-integrity-protection-algorithms-not-supported, + s1-intra-system-handover-triggered, + s1-inter-system-handover-triggered, + x2-handover-triggered, + ..., + redirection-towards-1xRTT, + not-supported-QCI-value, + invalid-CSG-Id, + release-due-to-pre-emption + +} + +CauseTransport ::= ENUMERATED { + transport-resource-unavailable, + unspecified, + ... +} + +CauseNas ::= ENUMERATED { + normal-release, + authentication-failure, + detach, + unspecified, + ..., + csg-subscription-expiry +} + +CellAccessMode ::= ENUMERATED { + hybrid, + ... +} + +CellIdentifierAndCELevelForCECapableUEs ::= SEQUENCE { + global-Cell-ID EUTRAN-CGI, + cELevel CELevel, + iE-Extensions ProtocolExtensionContainer { { CellIdentifierAndCELevelForCECapableUEs-ExtIEs} } OPTIONAL, + ... +} + +CellIdentifierAndCELevelForCECapableUEs-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- Coverage Enhancement level encoded according to TS 36.331 [16] -- +CELevel ::= OCTET STRING + +CE-mode-B-SupportIndicator ::= ENUMERATED { + supported, + ... +} + +CellIdentity ::= BIT STRING (SIZE (28)) + +CellID-Broadcast ::= SEQUENCE (SIZE(1..maxnoofCellID)) OF CellID-Broadcast-Item + +CellID-Broadcast-Item ::= SEQUENCE { + eCGI EUTRAN-CGI, + iE-Extensions ProtocolExtensionContainer { {CellID-Broadcast-Item-ExtIEs} } OPTIONAL, + ... +} + +CellID-Broadcast-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CellID-Cancelled::= SEQUENCE (SIZE(1..maxnoofCellID)) OF CellID-Cancelled-Item + +CellID-Cancelled-Item ::= SEQUENCE { + eCGI EUTRAN-CGI, + numberOfBroadcasts NumberOfBroadcasts, + iE-Extensions ProtocolExtensionContainer { {CellID-Cancelled-Item-ExtIEs} } OPTIONAL, + ... +} + +CellID-Cancelled-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CellBasedMDT::= SEQUENCE { + cellIdListforMDT CellIdListforMDT, + iE-Extensions ProtocolExtensionContainer { {CellBasedMDT-ExtIEs} } OPTIONAL, + ... +} + +CellBasedMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CellIdListforMDT ::= SEQUENCE (SIZE(1..maxnoofCellIDforMDT)) OF EUTRAN-CGI + +CellBasedQMC::= SEQUENCE { + cellIdListforQMC CellIdListforQMC, + iE-Extensions ProtocolExtensionContainer { {CellBasedQMC-ExtIEs} } OPTIONAL, + ... +} + +CellBasedQMC-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CellIdListforQMC ::= SEQUENCE (SIZE(1..maxnoofCellIDforQMC)) OF EUTRAN-CGI + +Cdma2000PDU ::= OCTET STRING + +Cdma2000RATType ::= ENUMERATED { + hRPD, + onexRTT, + ... +} + +Cdma2000SectorID ::= OCTET STRING + +Cdma2000HOStatus ::= ENUMERATED { + hOSuccess, + hOFailure, + ... +} + +Cdma2000HORequiredIndication ::= ENUMERATED { + true, + ... +} + +Cdma2000OneXSRVCCInfo ::= SEQUENCE { + cdma2000OneXMEID Cdma2000OneXMEID, + cdma2000OneXMSI Cdma2000OneXMSI, + cdma2000OneXPilot Cdma2000OneXPilot, + iE-Extensions ProtocolExtensionContainer { {Cdma2000OneXSRVCCInfo-ExtIEs} } OPTIONAL, + ... +} + +Cdma2000OneXSRVCCInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Cdma2000OneXMEID ::= OCTET STRING + +Cdma2000OneXMSI ::= OCTET STRING + +Cdma2000OneXPilot ::= OCTET STRING + +Cdma2000OneXRAND ::= OCTET STRING + + +Cell-Size ::= ENUMERATED {verysmall, small, medium, large, ...} + +CellType ::= SEQUENCE { + cell-Size Cell-Size, + iE-Extensions ProtocolExtensionContainer { { CellType-ExtIEs}} OPTIONAL, + ... +} + +CellType-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CGI ::= SEQUENCE { + pLMNidentity PLMNidentity, + lAC LAC, + cI CI, + rAC RAC OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {CGI-ExtIEs} } OPTIONAL, + ... + } + +CGI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CI ::= OCTET STRING (SIZE (2)) + +CNDomain ::= ENUMERATED { + ps, + cs +} + +CNTypeRestrictions::= SEQUENCE (SIZE(1.. maxnoofEPLMNsPlusOne)) OF CNTypeRestrictions-Item + +CNTypeRestrictions-Item ::= SEQUENCE { + pLMN-Identity PLMNidentity, + cNType CNType, + iE-Extensions ProtocolExtensionContainer { { CNTypeRestrictions-Item-ExtIEs} } OPTIONAL, + ... +} + +CNTypeRestrictions-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CNType ::= ENUMERATED { + fiveGCForbiddden, + ... +} + +ConcurrentWarningMessageIndicator ::= ENUMERATED { + true +} + +Correlation-ID ::= OCTET STRING (SIZE (4)) + +CSFallbackIndicator ::= ENUMERATED { + cs-fallback-required, + ..., + cs-fallback-high-priority +} + +AdditionalCSFallbackIndicator ::= ENUMERATED { + no-restriction, + restriction, + ... +} + +CSG-Id ::= BIT STRING (SIZE (27)) + + +CSG-IdList ::= SEQUENCE (SIZE (1.. maxnoofCSGs)) OF CSG-IdList-Item + +CSG-IdList-Item ::= SEQUENCE { + cSG-Id CSG-Id, + iE-Extensions ProtocolExtensionContainer { {CSG-IdList-Item-ExtIEs} } OPTIONAL, + ... +} + +CSG-IdList-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CSGMembershipStatus ::= ENUMERATED { + member, + not-member +} + + +COUNTvalue ::= SEQUENCE { + pDCP-SN PDCP-SN, + hFN HFN, + iE-Extensions ProtocolExtensionContainer { {COUNTvalue-ExtIEs} } OPTIONAL, + ... +} +COUNTvalue-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +COUNTValueExtended ::= SEQUENCE { + pDCP-SNExtended PDCP-SNExtended, + hFNModified HFNModified, + iE-Extensions ProtocolExtensionContainer { {COUNTValueExtended-ExtIEs} } OPTIONAL, + ... +} + +COUNTValueExtended-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +COUNTvaluePDCP-SNlength18 ::= SEQUENCE { + pDCP-SNlength18 PDCP-SNlength18, + hFNforPDCP-SNlength18 HFNforPDCP-SNlength18, + iE-Extensions ProtocolExtensionContainer { {COUNTvaluePDCP-SNlength18-ExtIEs} } OPTIONAL, + ... +} + +COUNTvaluePDCP-SNlength18-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Coverage-Level ::= ENUMERATED { + extendedcoverage, + ... +} + +CriticalityDiagnostics ::= SEQUENCE { + procedureCode ProcedureCode OPTIONAL, + triggeringMessage TriggeringMessage OPTIONAL, + procedureCriticality Criticality OPTIONAL, + iEsCriticalityDiagnostics CriticalityDiagnostics-IE-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer {{CriticalityDiagnostics-ExtIEs}} OPTIONAL, + ... +} + +CriticalityDiagnostics-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CriticalityDiagnostics-IE-List ::= SEQUENCE (SIZE (1.. maxnoofErrors)) OF CriticalityDiagnostics-IE-Item + +CriticalityDiagnostics-IE-Item ::= SEQUENCE { + iECriticality Criticality, + iE-ID ProtocolIE-ID, + typeOfError TypeOfError, + iE-Extensions ProtocolExtensionContainer {{CriticalityDiagnostics-IE-Item-ExtIEs}} OPTIONAL, + ... +} + +CriticalityDiagnostics-IE-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +-- D + +DataCodingScheme ::= BIT STRING (SIZE (8)) + +DCN-ID ::= INTEGER (0..65535) + +ServedDCNs ::= SEQUENCE (SIZE(0..maxnoofDCNs)) OF ServedDCNsItem + +ServedDCNsItem ::= SEQUENCE { + dCN-ID DCN-ID, + relativeDCNCapacity RelativeMMECapacity, + iE-Extensions ProtocolExtensionContainer { {ServedDCNsItem-ExtIEs} } OPTIONAL, + ... +} + +ServedDCNsItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DL-CP-SecurityInformation ::= SEQUENCE { + dl-NAS-MAC DL-NAS-MAC, + iE-Extensions ProtocolExtensionContainer { { DL-CP-SecurityInformation-ExtIEs} } OPTIONAL, + ... +} + +DL-CP-SecurityInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DL-Forwarding ::= ENUMERATED { + dL-Forwarding-proposed, + ... +} + +DL-NAS-MAC ::= BIT STRING (SIZE (16)) + +Direct-Forwarding-Path-Availability ::= ENUMERATED { + directPathAvailable, + ... +} + +Data-Forwarding-Not-Possible ::= ENUMERATED { + data-Forwarding-not-Possible, + ... +} + +DLNASPDUDeliveryAckRequest ::= ENUMERATED { + requested, + ... +} + +-- E + +EARFCN ::= INTEGER(0..maxEARFCN, ...) + +ECGIList ::= SEQUENCE (SIZE(1..maxnoofCellID)) OF EUTRAN-CGI + +PWSfailedECGIList ::= SEQUENCE (SIZE(1..maxnoofCellsineNB)) OF EUTRAN-CGI + +EDT-Session ::= ENUMERATED { + true, + ... +} + +EmergencyAreaIDList ::= SEQUENCE (SIZE(1..maxnoofEmergencyAreaID)) OF EmergencyAreaID + +EmergencyAreaID ::= OCTET STRING (SIZE (3)) + +EmergencyAreaID-Broadcast ::= SEQUENCE (SIZE(1..maxnoofEmergencyAreaID)) OF EmergencyAreaID-Broadcast-Item + +EmergencyAreaID-Broadcast-Item ::= SEQUENCE { + emergencyAreaID EmergencyAreaID, + completedCellinEAI CompletedCellinEAI, + iE-Extensions ProtocolExtensionContainer { {EmergencyAreaID-Broadcast-Item-ExtIEs} } OPTIONAL, + ... +} + +EmergencyAreaID-Broadcast-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +EmergencyAreaID-Cancelled ::= SEQUENCE (SIZE(1..maxnoofEmergencyAreaID)) OF EmergencyAreaID-Cancelled-Item + +EmergencyAreaID-Cancelled-Item ::= SEQUENCE { + emergencyAreaID EmergencyAreaID, + cancelledCellinEAI CancelledCellinEAI, + iE-Extensions ProtocolExtensionContainer { {EmergencyAreaID-Cancelled-Item-ExtIEs} } OPTIONAL, + ... +} + +EmergencyAreaID-Cancelled-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CompletedCellinEAI ::= SEQUENCE (SIZE(1..maxnoofCellinEAI)) OF CompletedCellinEAI-Item + +CompletedCellinEAI-Item ::= SEQUENCE { + eCGI EUTRAN-CGI, + iE-Extensions ProtocolExtensionContainer { {CompletedCellinEAI-Item-ExtIEs} } OPTIONAL, + ... +} + +CompletedCellinEAI-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ECGI-List ::= SEQUENCE (SIZE(1..maxnoofCellsineNB)) OF EUTRAN-CGI + +EmergencyAreaIDListForRestart ::= SEQUENCE (SIZE(1..maxnoofRestartEmergencyAreaIDs)) OF EmergencyAreaID + +ENB-ID ::= CHOICE { + macroENB-ID BIT STRING (SIZE(20)), + homeENB-ID BIT STRING (SIZE(28)), + ... , + short-macroENB-ID BIT STRING (SIZE(18)), + long-macroENB-ID BIT STRING (SIZE(21)) +} + +GERAN-Cell-ID ::= SEQUENCE { + lAI LAI, + rAC RAC, + cI CI, + iE-Extensions ProtocolExtensionContainer { { GERAN-Cell-ID-ExtIEs} } OPTIONAL, + ... +} + +GERAN-Cell-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Global-ENB-ID ::= SEQUENCE { + pLMNidentity PLMNidentity, + eNB-ID ENB-ID, + iE-Extensions ProtocolExtensionContainer { {GlobalENB-ID-ExtIEs} } OPTIONAL, + ... +} + +GlobalENB-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GUMMEIList::= SEQUENCE (SIZE (1.. maxnoofMMECs)) OF GUMMEI + +ENB-StatusTransfer-TransparentContainer ::= SEQUENCE { + bearers-SubjectToStatusTransferList Bearers-SubjectToStatusTransferList, + iE-Extensions ProtocolExtensionContainer { {ENB-StatusTransfer-TransparentContainer-ExtIEs} } OPTIONAL, + ... +} + +ENB-StatusTransfer-TransparentContainer-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ENB-UE-S1AP-ID ::= INTEGER (0..16777215) + +ENBname ::= PrintableString (SIZE (1..150,...)) + +ENBX2TLAs ::= SEQUENCE (SIZE(1.. maxnoofeNBX2TLAs)) OF TransportLayerAddress + +EncryptionAlgorithms ::= BIT STRING (SIZE (16,...)) + +EndIndication ::= ENUMERATED { + no-further-data, + further-data-exists, + ... +} + +EnhancedCoverageRestricted ::= ENUMERATED { + restricted, + ... +} + +CE-ModeBRestricted ::= ENUMERATED { + restricted, + not-restricted, + ... +} + +EPLMNs ::= SEQUENCE (SIZE(1..maxnoofEPLMNs)) OF PLMNidentity +EventType ::= ENUMERATED { + direct, + change-of-serve-cell, + stop-change-of-serve-cell, + ... +} + +E-RAB-ID ::= INTEGER (0..15, ...) + +E-RABInformationList ::= SEQUENCE (SIZE (1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { { E-RABInformationListIEs } } + +E-RABInformationListIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABInformationListItem CRITICALITY ignore TYPE E-RABInformationListItem PRESENCE mandatory }, + ... +} + +E-RABInformationListItem ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + dL-Forwarding DL-Forwarding OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABInformationListItem-ExtIEs} } OPTIONAL, + ... +} + +E-RABInformationListItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABList ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABItemIEs} } + +E-RABItemIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABItem CRITICALITY ignore TYPE E-RABItem PRESENCE mandatory }, + ... +} + +E-RABItem ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + cause Cause, + iE-Extensions ProtocolExtensionContainer { {E-RABItem-ExtIEs} } OPTIONAL, + ... +} + +E-RABItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +E-RABLevelQoSParameters ::= SEQUENCE { + qCI QCI, + allocationRetentionPriority AllocationAndRetentionPriority, + gbrQosInformation GBR-QosInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABQoSParameters-ExtIEs} } OPTIONAL, + ... +} + +E-RABUsageReportList ::= SEQUENCE (SIZE(1..maxnooftimeperiods)) OF ProtocolIE-SingleContainer { {E-RABUsageReportItemIEs} } + +E-RABUsageReportItemIEs S1AP-PROTOCOL-IES ::= { + { ID id-E-RABUsageReportItem CRITICALITY ignore TYPE E-RABUsageReportItem PRESENCE mandatory }, + ... +} + +E-RABUsageReportItem ::= SEQUENCE { + startTimestamp OCTET STRING (SIZE(4)), + endTimestamp OCTET STRING (SIZE(4)), + usageCountUL INTEGER (0..18446744073709551615), + usageCountDL INTEGER (0..18446744073709551615), + iE-Extensions ProtocolExtensionContainer { { E-RABUsageReportItem-ExtIEs} } OPTIONAL, + ... +} + +E-RABUsageReportItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-RABQoSParameters-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { +-- Extended for introduction of downlink and uplink packet loss rate for enhanced Voice performance –- + { ID id-DownlinkPacketLossRate CRITICALITY ignore EXTENSION Packet-LossRate PRESENCE optional}| + { ID id-UplinkPacketLossRate CRITICALITY ignore EXTENSION Packet-LossRate PRESENCE optional}, + ... +} + + +EUTRAN-CGI ::= SEQUENCE { + pLMNidentity PLMNidentity, + cell-ID CellIdentity, + iE-Extensions ProtocolExtensionContainer { {EUTRAN-CGI-ExtIEs} } OPTIONAL, + ... +} + +EUTRAN-CGI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +EUTRANRoundTripDelayEstimationInfo ::= INTEGER (0..2047) + +ExpectedUEBehaviour ::= SEQUENCE { + expectedActivity ExpectedUEActivityBehaviour OPTIONAL, + expectedHOInterval ExpectedHOInterval OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { ExpectedUEBehaviour-ExtIEs} } OPTIONAL, + ... +} + +ExpectedUEBehaviour-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ExpectedUEActivityBehaviour ::= SEQUENCE { + expectedActivityPeriod ExpectedActivityPeriod OPTIONAL, + expectedIdlePeriod ExpectedIdlePeriod OPTIONAL, + sourceofUEActivityBehaviourInformation SourceOfUEActivityBehaviourInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { ExpectedUEActivityBehaviour-ExtIEs} } OPTIONAL, + ... +} + +ExpectedUEActivityBehaviour-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ExpectedActivityPeriod ::= INTEGER (1..30|40|50|60|80|100|120|150|180|181,...) + +ExpectedIdlePeriod ::= INTEGER (1..30|40|50|60|80|100|120|150|180|181,...) + +SourceOfUEActivityBehaviourInformation ::= ENUMERATED { + subscription-information, + statistics, + ... +} + +ExpectedHOInterval ::= ENUMERATED { + sec15, sec30, sec60, sec90, sec120, sec180, long-time, + ... +} + +ExtendedBitRate ::= INTEGER (10000000001..4000000000000, ...) + +ExtendedRNC-ID ::= INTEGER (4096..65535) + +ExtendedRepetitionPeriod ::= INTEGER (4096..131071) + +Extended-UEIdentityIndexValue ::= BIT STRING (SIZE (14)) + +-- F + +FiveGSTAC ::= OCTET STRING (SIZE (3)) + +FiveGSTAI ::= SEQUENCE { + pLMNidentity PLMNidentity, + fiveGSTAC FiveGSTAC, + iE-Extensions ProtocolExtensionContainer { {FiveGSTAI-ExtIEs} } OPTIONAL, + ... +} + +FiveGSTAI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ForbiddenInterRATs ::= ENUMERATED { + all, + geran, + utran, + cdma2000, + ..., + geranandutran, + cdma2000andutran + +} + +ForbiddenTAs ::= SEQUENCE (SIZE(1.. maxnoofEPLMNsPlusOne)) OF ForbiddenTAs-Item + +ForbiddenTAs-Item ::= SEQUENCE { + pLMN-Identity PLMNidentity, + forbiddenTACs ForbiddenTACs, + iE-Extensions ProtocolExtensionContainer { {ForbiddenTAs-Item-ExtIEs} } OPTIONAL, + ... +} + +ForbiddenTAs-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ForbiddenTACs ::= SEQUENCE (SIZE(1..maxnoofForbTACs)) OF TAC + +ForbiddenLAs ::= SEQUENCE (SIZE(1..maxnoofEPLMNsPlusOne)) OF ForbiddenLAs-Item + +ForbiddenLAs-Item ::= SEQUENCE { + pLMN-Identity PLMNidentity, + forbiddenLACs ForbiddenLACs, + iE-Extensions ProtocolExtensionContainer { {ForbiddenLAs-Item-ExtIEs} } OPTIONAL, + ... +} + +ForbiddenLAs-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ForbiddenLACs ::= SEQUENCE (SIZE(1..maxnoofForbLACs)) OF LAC + +-- G + +GBR-QosInformation ::= SEQUENCE { + e-RAB-MaximumBitrateDL BitRate, + e-RAB-MaximumBitrateUL BitRate, + e-RAB-GuaranteedBitrateDL BitRate, + e-RAB-GuaranteedBitrateUL BitRate, + iE-Extensions ProtocolExtensionContainer { { GBR-QosInformation-ExtIEs} } OPTIONAL, + ... +} + +GBR-QosInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { +-- Extension for maximum bitrate > 10G bps -- + { ID id-extended-e-RAB-MaximumBitrateDL CRITICALITY ignore EXTENSION ExtendedBitRate PRESENCE optional}| + { ID id-extended-e-RAB-MaximumBitrateUL CRITICALITY ignore EXTENSION ExtendedBitRate PRESENCE optional}| + { ID id-extended-e-RAB-GuaranteedBitrateDL CRITICALITY ignore EXTENSION ExtendedBitRate PRESENCE optional}| + { ID id-extended-e-RAB-GuaranteedBitrateUL CRITICALITY ignore EXTENSION ExtendedBitRate PRESENCE optional}, + ...} + + +GTP-TEID ::= OCTET STRING (SIZE (4)) + +GUMMEI ::= SEQUENCE { + pLMN-Identity PLMNidentity, + mME-Group-ID MME-Group-ID, + mME-Code MME-Code, + iE-Extensions ProtocolExtensionContainer { {GUMMEI-ExtIEs} } OPTIONAL, + ... +} + +GUMMEI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GUMMEIType ::= ENUMERATED { + native, + mapped, + ... +} + +GWContextReleaseIndication ::= ENUMERATED { + true, + ... +} + +-- H + +HandoverFlag ::= ENUMERATED { + handoverPreparation, + ... +} + + +HandoverRestrictionList ::= SEQUENCE { + servingPLMN PLMNidentity, + equivalentPLMNs EPLMNs OPTIONAL, + forbiddenTAs ForbiddenTAs OPTIONAL, + forbiddenLAs ForbiddenLAs OPTIONAL, + forbiddenInterRATs ForbiddenInterRATs OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {HandoverRestrictionList-ExtIEs} } OPTIONAL, + ... +} + +HandoverRestrictionList-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + { ID id-NRrestrictioninEPSasSecondaryRAT CRITICALITY ignore EXTENSION NRrestrictioninEPSasSecondaryRAT PRESENCE optional}| + { ID id-UnlicensedSpectrumRestriction CRITICALITY ignore EXTENSION UnlicensedSpectrumRestriction PRESENCE optional}| + { ID id-CNTypeRestrictions CRITICALITY ignore EXTENSION CNTypeRestrictions PRESENCE optional}| + { ID id-NRrestrictionin5GS CRITICALITY ignore EXTENSION NRrestrictionin5GS PRESENCE optional}, + ... +} + +HandoverType ::= ENUMERATED { + intralte, + ltetoutran, + ltetogeran, + utrantolte, + gerantolte, ..., + ltetonr, + nrtolte +} + +HFN ::= INTEGER (0..1048575) + +HFNModified ::= INTEGER (0..131071) + +HFNforPDCP-SNlength18 ::= INTEGER (0..16383) + +-- I + +Masked-IMEISV ::= BIT STRING (SIZE (64)) + +ImmediateMDT ::= SEQUENCE { + measurementsToActivate MeasurementsToActivate, + m1reportingTrigger M1ReportingTrigger, + m1thresholdeventA2 M1ThresholdEventA2 OPTIONAL, +-- Included in case of event-triggered, or event-triggered periodic reporting for measurement M1 + m1periodicReporting M1PeriodicReporting OPTIONAL, +-- Included in case of periodic or event-triggered periodic reporting + iE-Extensions ProtocolExtensionContainer { { ImmediateMDT-ExtIEs} } OPTIONAL, + ... +} + +ImmediateMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + { ID id-M3Configuration CRITICALITY ignore EXTENSION M3Configuration PRESENCE conditional}| + { ID id-M4Configuration CRITICALITY ignore EXTENSION M4Configuration PRESENCE conditional}| + { ID id-M5Configuration CRITICALITY ignore EXTENSION M5Configuration PRESENCE conditional}| + { ID id-MDT-Location-Info CRITICALITY ignore EXTENSION MDT-Location-Info PRESENCE optional}| + { ID id-M6Configuration CRITICALITY ignore EXTENSION M6Configuration PRESENCE conditional}| + { ID id-M7Configuration CRITICALITY ignore EXTENSION M7Configuration PRESENCE conditional}| + { ID id-BluetoothMeasurementConfiguration CRITICALITY ignore EXTENSION BluetoothMeasurementConfiguration PRESENCE optional}| + { ID id-WLANMeasurementConfiguration CRITICALITY ignore EXTENSION WLANMeasurementConfiguration PRESENCE optional}, + ... +} + +IMSI ::= OCTET STRING (SIZE (3..8)) + +InformationOnRecommendedCellsAndENBsForPaging ::= SEQUENCE { + recommendedCellsForPaging RecommendedCellsForPaging, + recommendENBsForPaging RecommendedENBsForPaging, + iE-Extensions ProtocolExtensionContainer { { InformationOnRecommendedCellsAndENBsForPaging-ExtIEs} } OPTIONAL, + ... +} + +InformationOnRecommendedCellsAndENBsForPaging-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IntegrityProtectionAlgorithms ::= BIT STRING (SIZE (16,...)) + +IntendedNumberOfPagingAttempts ::= INTEGER (1..16, ...) + +InterfacesToTrace ::= BIT STRING (SIZE (8)) + + + +-- J +-- K + +KillAllWarningMessages ::= ENUMERATED {true} + +-- L + + +LAC ::= OCTET STRING (SIZE (2)) + +LAI ::= SEQUENCE { + pLMNidentity PLMNidentity, + lAC LAC, + iE-Extensions ProtocolExtensionContainer { {LAI-ExtIEs} } OPTIONAL, + ... +} + +LAI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +LastVisitedCell-Item ::= CHOICE { + e-UTRAN-Cell LastVisitedEUTRANCellInformation, + uTRAN-Cell LastVisitedUTRANCellInformation, + gERAN-Cell LastVisitedGERANCellInformation, + ..., + nG-RAN-Cell LastVisitedNGRANCellInformation +} +LastVisitedEUTRANCellInformation ::= SEQUENCE { + global-Cell-ID EUTRAN-CGI, + cellType CellType, + time-UE-StayedInCell Time-UE-StayedInCell, + iE-Extensions ProtocolExtensionContainer { { LastVisitedEUTRANCellInformation-ExtIEs} } OPTIONAL, + ... +} +LastVisitedEUTRANCellInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { +-- Extension for Rel-11 to support enhanced granularity for time UE stayed in cell -- + { ID id-Time-UE-StayedInCell-EnhancedGranularity CRITICALITY ignore EXTENSION Time-UE-StayedInCell-EnhancedGranularity PRESENCE optional}| + { ID id-HO-Cause CRITICALITY ignore EXTENSION Cause PRESENCE optional}, + ... +} + +LastVisitedNGRANCellInformation ::= OCTET STRING + +LastVisitedUTRANCellInformation ::= OCTET STRING + +LastVisitedGERANCellInformation ::= CHOICE { + undefined NULL, + ... +} + +L3-Information ::= OCTET STRING +-- This is a dummy IE used only as a reference to the actual definition in relevant specification. + +LPPa-PDU ::= OCTET STRING + +LHN-ID ::= OCTET STRING(SIZE (32..256)) + +Links-to-log ::= ENUMERATED {uplink, downlink, both-uplink-and-downlink, ...} + +ListeningSubframePattern ::= SEQUENCE { + pattern-period ENUMERATED {ms1280, ms2560, ms5120, ms10240, ...}, + pattern-offset INTEGER (0..10239, ...), + iE-Extensions ProtocolExtensionContainer { { ListeningSubframePattern-ExtIEs} } OPTIONAL, + ... +} + +ListeningSubframePattern-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { +... +} + +LoggedMDT ::= SEQUENCE { + loggingInterval LoggingInterval, + loggingDuration LoggingDuration, + iE-Extensions ProtocolExtensionContainer { {LoggedMDT-ExtIEs} } OPTIONAL, + ... +} + +LoggedMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + { ID id-BluetoothMeasurementConfiguration CRITICALITY ignore EXTENSION BluetoothMeasurementConfiguration PRESENCE optional}| + { ID id-WLANMeasurementConfiguration CRITICALITY ignore EXTENSION WLANMeasurementConfiguration PRESENCE optional}, +... +} + +LoggingInterval ::= ENUMERATED {ms128, ms256, ms512, ms1024, ms2048, ms3072, ms4096, ms6144} + +LoggingDuration ::= ENUMERATED {m10, m20, m40, m60, m90, m120} + +LoggedMBSFNMDT ::= SEQUENCE { + loggingInterval LoggingInterval, + loggingDuration LoggingDuration, + mBSFN-ResultToLog MBSFN-ResultToLog OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { LoggedMBSFNMDT-ExtIEs } } OPTIONAL, + ... +} + +LoggedMBSFNMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +LTE-M-Indication ::= ENUMERATED {lte-m, ... } + +-- M + +M3Configuration ::= SEQUENCE { + m3period M3period, + iE-Extensions ProtocolExtensionContainer { { M3Configuration-ExtIEs} } OPTIONAL, + ... +} + +M3Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +M3period ::= ENUMERATED {ms100, ms1000, ms10000, ...,ms1024, ms1280, ms2048, ms2560, ms5120, ms10240, min1 } + +M4Configuration ::= SEQUENCE { + m4period M4period, + m4-links-to-log Links-to-log, + iE-Extensions ProtocolExtensionContainer { { M4Configuration-ExtIEs} } OPTIONAL, + ... +} + +M4Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +M4period ::= ENUMERATED {ms1024, ms2048, ms5120, ms10240, min1, ... } + +M5Configuration ::= SEQUENCE { + m5period M5period, + m5-links-to-log Links-to-log, + iE-Extensions ProtocolExtensionContainer { { M5Configuration-ExtIEs} } OPTIONAL, + ... +} + +M5Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +M5period ::= ENUMERATED {ms1024, ms2048, ms5120, ms10240, min1, ... } + +M6Configuration ::= SEQUENCE { + m6report-Interval M6report-Interval, + m6delay-threshold M6delay-threshold OPTIONAL, +-- This IE shall be present if the M6 Links to log IE is set to “uplink” or to “both-uplink-and-downlink” -- + m6-links-to-log Links-to-log, + iE-Extensions ProtocolExtensionContainer { { M6Configuration-ExtIEs} } OPTIONAL, + ... +} + +M6Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +M6report-Interval ::= ENUMERATED { ms1024, ms2048, ms5120, ms10240, ... } + +M6delay-threshold ::= ENUMERATED { ms30, ms40, ms50, ms60, ms70, ms80, ms90, ms100, ms150, ms300, ms500, ms750, ... } + +M7Configuration ::= SEQUENCE { + m7period M7period, + m7-links-to-log Links-to-log, + iE-Extensions ProtocolExtensionContainer { { M7Configuration-ExtIEs} } OPTIONAL, + ... +} + +M7Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +M7period ::= INTEGER(1..60, ...) + +MDT-Activation ::= ENUMERATED { + immediate-MDT-only, + immediate-MDT-and-Trace, + logged-MDT-only, + ..., + logged-MBSFN-MDT +} + +MDT-Location-Info ::= BIT STRING (SIZE (8)) + +MDT-Configuration ::= SEQUENCE { + mdt-Activation MDT-Activation, + areaScopeOfMDT AreaScopeOfMDT, + mDTMode MDTMode, + iE-Extensions ProtocolExtensionContainer { { MDT-Configuration-ExtIEs} } OPTIONAL, + ... +} +MDT-Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + { ID id-SignallingBasedMDTPLMNList CRITICALITY ignore EXTENSION MDTPLMNList PRESENCE optional }, + ... +} + +ManagementBasedMDTAllowed ::= ENUMERATED {allowed, ...} + +MBSFN-ResultToLog ::= SEQUENCE (SIZE(1..maxnoofMBSFNAreaMDT)) OF MBSFN-ResultToLogInfo + +MBSFN-ResultToLogInfo ::= SEQUENCE { + mBSFN-AreaId INTEGER (0..255) OPTIONAL, + carrierFreq EARFCN, + iE-Extensions ProtocolExtensionContainer { { MBSFN-ResultToLogInfo-ExtIEs} } OPTIONAL, + ... +} + +MBSFN-ResultToLogInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +MDTPLMNList ::= SEQUENCE (SIZE(1..maxnoofMDTPLMNs)) OF PLMNidentity + +PrivacyIndicator ::= ENUMERATED { + immediate-MDT, + logged-MDT, + ... +} + +MDTMode ::= CHOICE { + immediateMDT ImmediateMDT, + loggedMDT LoggedMDT, + ..., + mDTMode-Extension MDTMode-Extension +} + +MDTMode-Extension ::= ProtocolIE-SingleContainer {{ MDTMode-ExtensionIE }} + +MDTMode-ExtensionIE S1AP-PROTOCOL-IES ::= { + { ID id-LoggedMBSFNMDT CRITICALITY ignore TYPE LoggedMBSFNMDT PRESENCE mandatory} +} + +MeasurementsToActivate ::= BIT STRING (SIZE (8)) + +MeasurementThresholdA2 ::= CHOICE { + threshold-RSRP Threshold-RSRP, + threshold-RSRQ Threshold-RSRQ, + ... +} + +MessageIdentifier ::= BIT STRING (SIZE (16)) + +MobilityInformation ::= BIT STRING (SIZE(32)) + +MMEname ::= PrintableString (SIZE (1..150,...)) + +MMEPagingTarget ::= CHOICE { + global-ENB-ID Global-ENB-ID, + tAI TAI, + ... +} + +MMERelaySupportIndicator ::= ENUMERATED {true, ...} + +MME-Group-ID ::= OCTET STRING (SIZE (2)) + +MME-Code ::= OCTET STRING (SIZE (1)) + +MME-UE-S1AP-ID ::= INTEGER (0..4294967295) +M-TMSI ::= OCTET STRING (SIZE (4)) + +MSClassmark2 ::= OCTET STRING +MSClassmark3 ::= OCTET STRING + +MutingAvailabilityIndication ::= ENUMERATED { + available, + unavailable, + ... +} + + +MutingPatternInformation ::= SEQUENCE { + muting-pattern-period ENUMERATED {ms0, ms1280, ms2560, ms5120, ms10240, ...}, + muting-pattern-offset INTEGER (0..10239, ...) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {MutingPatternInformation-ExtIEs} } OPTIONAL, + ... +} + +MutingPatternInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- N + +NAS-PDU ::= OCTET STRING + +NASSecurityParametersfromE-UTRAN ::= OCTET STRING + +NASSecurityParameterstoE-UTRAN ::= OCTET STRING + +NB-IoT-DefaultPagingDRX ::= ENUMERATED { + v128, + v256, + v512, + v1024, + ... + } + +NB-IoT-Paging-eDRXInformation ::= SEQUENCE { + nB-IoT-paging-eDRX-Cycle NB-IoT-Paging-eDRX-Cycle, + nB-IoT-pagingTimeWindow NB-IoT-PagingTimeWindow OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { NB-IoT-Paging-eDRXInformation-ExtIEs} } OPTIONAL, + ... +} + +NB-IoT-Paging-eDRXInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NB-IoT-Paging-eDRX-Cycle ::= ENUMERATED{hf2, hf4, hf6, hf8, hf10, hf12, hf14, hf16, hf32, hf64, hf128, hf256, hf512, hf1024, ...} + +NB-IoT-PagingTimeWindow ::= ENUMERATED{s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, ...} + +NB-IoT-UEIdentityIndexValue ::= BIT STRING (SIZE (12)) + +NextPagingAreaScope ::= ENUMERATED { + same, + changed, + ... +} + +NRencryptionAlgorithms ::= BIT STRING (SIZE (16,...)) +NRintegrityProtectionAlgorithms ::= BIT STRING (SIZE (16,...)) + +NRrestrictioninEPSasSecondaryRAT ::= ENUMERATED { + nRrestrictedinEPSasSecondaryRAT, + ... +} + +NRrestrictionin5GS ::= ENUMERATED { + nRrestrictedin5GS, + ... +} + +NRUESecurityCapabilities ::= SEQUENCE { + nRencryptionAlgorithms NRencryptionAlgorithms, + nRintegrityProtectionAlgorithms NRintegrityProtectionAlgorithms, + iE-Extensions ProtocolExtensionContainer { { NRUESecurityCapabilities-ExtIEs} } OPTIONAL, +... +} + +NRUESecurityCapabilities-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NumberofBroadcastRequest ::= INTEGER (0..65535) + +NumberOfBroadcasts ::= INTEGER (0..65535) + +-- O +OldBSS-ToNewBSS-Information ::= OCTET STRING +-- This is a dummy IE used only as a reference to the actual definition in relevant specification. + +OverloadAction ::= ENUMERATED { + reject-non-emergency-mo-dt, + reject-rrc-cr-signalling, + permit-emergency-sessions-and-mobile-terminated-services-only, + ..., + permit-high-priority-sessions-and-mobile-terminated-services-only, + reject-delay-tolerant-access, + permit-high-priority-sessions-and-exception-reporting-and-mobile-terminated-services-only, + not-accept-mo-data-or-delay-tolerant-access-from-CP-CIoT + +} + +OverloadResponse ::= CHOICE { + overloadAction OverloadAction, + ... +} + + +-- P + +Packet-LossRate ::= INTEGER(0..1000) + +PagingAttemptInformation ::= SEQUENCE { + pagingAttemptCount PagingAttemptCount, + intendedNumberOfPagingAttempts IntendedNumberOfPagingAttempts, + nextPagingAreaScope NextPagingAreaScope OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { PagingAttemptInformation-ExtIEs} } OPTIONAL, + ... +} + +PagingAttemptInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PagingAttemptCount ::= INTEGER (1..16, ...) + +Paging-eDRXInformation ::= SEQUENCE { + paging-eDRX-Cycle Paging-eDRX-Cycle, + pagingTimeWindow PagingTimeWindow OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Paging-eDRXInformation-ExtIEs} } OPTIONAL, + ... +} + +Paging-eDRXInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Paging-eDRX-Cycle ::= ENUMERATED{hfhalf, hf1, hf2, hf4, hf6, hf8, hf10, hf12, hf14, hf16, hf32, hf64, hf128, hf256, ...} + +PagingTimeWindow ::= ENUMERATED{s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, ...} + +PagingDRX ::= ENUMERATED { + v32, + v64, + v128, + v256, + ... + } + +PagingPriority ::= ENUMERATED { + priolevel1, + priolevel2, + priolevel3, + priolevel4, + priolevel5, + priolevel6, + priolevel7, + priolevel8, + ... +} + +PDCP-SN ::= INTEGER (0..4095) + +PDCP-SNExtended ::= INTEGER (0..32767) + +PDCP-SNlength18 ::= INTEGER (0..262143) + +PendingDataIndication ::= ENUMERATED { + true, + ... +} + +M1PeriodicReporting ::= SEQUENCE { + reportInterval ReportIntervalMDT, + reportAmount ReportAmountMDT, + iE-Extensions ProtocolExtensionContainer { { M1PeriodicReporting-ExtIEs} } OPTIONAL, + ... +} + +M1PeriodicReporting-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PLMNidentity ::= TBCD-STRING + +PLMNAreaBasedQMC ::= SEQUENCE { + plmnListforQMC PLMNListforQMC, + iE-Extensions ProtocolExtensionContainer { {PLMNAreaBasedQMC-ExtIEs} } OPTIONAL, + ... +} + +PLMNAreaBasedQMC-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PLMNListforQMC ::= SEQUENCE (SIZE(1..maxnoofPLMNforQMC)) OF PLMNidentity + +Port-Number ::= OCTET STRING (SIZE (2)) + +Pre-emptionCapability ::= ENUMERATED { + shall-not-trigger-pre-emption, + may-trigger-pre-emption +} + +Pre-emptionVulnerability ::= ENUMERATED { + not-pre-emptable, + pre-emptable +} + +PriorityLevel ::= INTEGER { spare (0), highest (1), lowest (14), no-priority (15) } (0..15) + +ProSeAuthorized ::= SEQUENCE { + proSeDirectDiscovery ProSeDirectDiscovery OPTIONAL, + proSeDirectCommunication ProSeDirectCommunication OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ProSeAuthorized-ExtIEs} } OPTIONAL, + ... +} + +ProSeAuthorized-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + { ID id-ProSeUEtoNetworkRelaying CRITICALITY ignore EXTENSION ProSeUEtoNetworkRelaying PRESENCE optional}, + ... +} + +ProSeDirectDiscovery ::= ENUMERATED { + authorized, + not-authorized, + ... +} + +ProSeUEtoNetworkRelaying ::= ENUMERATED { + authorized, + not-authorized, + ... +} + +ProSeDirectCommunication ::= ENUMERATED { + authorized, + not-authorized, + ... +} + +PS-ServiceNotAvailable ::= ENUMERATED { + ps-service-not-available, + ... +} + +-- Q + +QCI ::= INTEGER (0..255) + +-- R + +ReceiveStatusofULPDCPSDUs ::= BIT STRING (SIZE(4096)) + +ReceiveStatusOfULPDCPSDUsExtended ::= BIT STRING (SIZE(1..16384)) + +ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 ::= BIT STRING (SIZE(1..131072)) + +RecommendedCellsForPaging ::= SEQUENCE { + recommendedCellList RecommendedCellList, + iE-Extensions ProtocolExtensionContainer { { RecommendedCellsForPaging-ExtIEs} } OPTIONAL, + ... +} + +RecommendedCellsForPaging-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RecommendedCellList ::= SEQUENCE (SIZE(1.. maxnoofRecommendedCells)) OF ProtocolIE-SingleContainer { { RecommendedCellItemIEs } } + +RecommendedCellItemIEs S1AP-PROTOCOL-IES ::= { + { ID id-RecommendedCellItem CRITICALITY ignore TYPE RecommendedCellItem PRESENCE mandatory }, + ... +} + +RecommendedCellItem::= SEQUENCE { + eUTRAN-CGI EUTRAN-CGI, + timeStayedInCell INTEGER (0..4095) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { RecommendedCellsForPagingItem-ExtIEs} } OPTIONAL, + ... +} + +RecommendedCellsForPagingItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RecommendedENBsForPaging ::= SEQUENCE { + recommendedENBList RecommendedENBList, + iE-Extensions ProtocolExtensionContainer { { RecommendedENBsForPaging-ExtIEs} } OPTIONAL, + ... +} + +RecommendedENBsForPaging-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RecommendedENBList::= SEQUENCE (SIZE(1.. maxnoofRecommendedENBs)) OF ProtocolIE-SingleContainer { { RecommendedENBItemIEs } } + +RecommendedENBItemIEs S1AP-PROTOCOL-IES ::= { + { ID id-RecommendedENBItem CRITICALITY ignore TYPE RecommendedENBItem PRESENCE mandatory }, + ... +} + +RecommendedENBItem ::= SEQUENCE { + mMEPagingTarget MMEPagingTarget, + iE-Extensions ProtocolExtensionContainer { { RecommendedENBItem-ExtIEs} } OPTIONAL, + ... +} + +RecommendedENBItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RelativeMMECapacity ::= INTEGER (0..255) + +RelayNode-Indicator ::= ENUMERATED { + true, + ... +} + +RAC ::= OCTET STRING (SIZE (1)) + +RAT-Type ::= ENUMERATED { + nbiot, + ... +} + +ReportAmountMDT ::= ENUMERATED{r1, r2, r4, r8, r16, r32, r64, rinfinity} + +ReportIntervalMDT ::= ENUMERATED {ms120, ms240, ms480, ms640, ms1024, ms2048, ms5120, ms10240, min1, min6, min12, min30, min60} + +M1ReportingTrigger ::= ENUMERATED{ + periodic, + a2eventtriggered, + ..., + a2eventtriggered-periodic +} + +RequestType ::= SEQUENCE { + eventType EventType, + reportArea ReportArea, + iE-Extensions ProtocolExtensionContainer { { RequestType-ExtIEs} } OPTIONAL, + ... +} + + +RequestType-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RIMTransfer ::= SEQUENCE { + rIMInformation RIMInformation, + rIMRoutingAddress RIMRoutingAddress OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { RIMTransfer-ExtIEs} } OPTIONAL, + ... +} + +RIMTransfer-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RIMInformation ::= OCTET STRING + +RIMRoutingAddress ::= CHOICE { + gERAN-Cell-ID GERAN-Cell-ID, + ..., + targetRNC-ID TargetRNC-ID, + eHRPD-Sector-ID OCTET STRING (SIZE(16)) +} + +ReportArea ::= ENUMERATED { + ecgi, + ... +} + +RepetitionPeriod ::= INTEGER (0..4095) + +RLFReportInformation ::= SEQUENCE { + uE-RLF-Report-Container UE-RLF-Report-Container, + uE-RLF-Report-Container-for-extended-bands UE-RLF-Report-Container-for-extended-bands OPTIONAL, + iE-Extensions ProtocolExtensionContainer {{ RLFReportInformation-ExtIEs}} OPTIONAL, + ... +} + +RLFReportInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RNC-ID ::= INTEGER (0..4095) + +RRC-Container ::= OCTET STRING + +RRC-Establishment-Cause ::= ENUMERATED { + emergency, + highPriorityAccess, + mt-Access, + mo-Signalling, + mo-Data, + ..., + delay-TolerantAccess, + mo-VoiceCall, + mo-ExceptionData +} + +ECGIListForRestart ::= SEQUENCE (SIZE(1..maxnoofCellsforRestart)) OF EUTRAN-CGI + +Routing-ID ::= INTEGER (0..255) + +-- S + + +SecurityKey ::= BIT STRING (SIZE(256)) + + + +SecurityContext ::= SEQUENCE { + nextHopChainingCount INTEGER (0..7), + nextHopParameter SecurityKey, + iE-Extensions ProtocolExtensionContainer { { SecurityContext-ExtIEs} } OPTIONAL, + ... +} + + +SecurityContext-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SecondaryRATType ::= ENUMERATED { + nR, + ..., + unlicensed +} + + +SecondaryRATDataUsageRequest ::= ENUMERATED { + requested, + ... +} + +SecondaryRATDataUsageReportList ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {SecondaryRATDataUsageReportItemIEs} } + +SecondaryRATDataUsageReportItemIEs S1AP-PROTOCOL-IES ::= { + { ID id-SecondaryRATDataUsageReportItem CRITICALITY ignore TYPE SecondaryRATDataUsageReportItem PRESENCE mandatory }, + ... +} + +SecondaryRATDataUsageReportItem ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + secondaryRATType SecondaryRATType, + e-RABUsageReportList E-RABUsageReportList, + iE-Extensions ProtocolExtensionContainer { { SecondaryRATDataUsageReportItem-ExtIEs} } OPTIONAL, + ... +} + +SecondaryRATDataUsageReportItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SerialNumber ::= BIT STRING (SIZE (16)) + +ServiceType ::= ENUMERATED{ + qMC-for-streaming-service, + qMC-for-MTSI-service, + ... +} + +SONInformation ::= CHOICE{ + sONInformationRequest SONInformationRequest, + sONInformationReply SONInformationReply, + ... +-- ..., +-- sONInformation-Extension SONInformation-Extension +} + +SONInformation-Extension ::= ProtocolIE-SingleContainer {{ SONInformation-ExtensionIE }} + +SONInformation-ExtensionIE S1AP-PROTOCOL-IES ::= { + { ID id-SON-Information-Report CRITICALITY ignore TYPE SONInformationReport PRESENCE mandatory} +} + +SONInformationRequest ::= ENUMERATED { + x2TNL-Configuration-Info, + ..., + time-Synchronisation-Info, + activate-Muting, + deactivate-Muting} + +SONInformationReply ::= SEQUENCE { + x2TNLConfigurationInfo X2TNLConfigurationInfo OPTIONAL, + iE-Extensions ProtocolExtensionContainer {{SONInformationReply-ExtIEs}} OPTIONAL, + ... +} + +SONInformationReply-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { +-- Extension for Release 9 to transfer Time synchronisation information -- + {ID id-Time-Synchronisation-Info CRITICALITY ignore EXTENSION TimeSynchronisationInfo PRESENCE optional}, + ..., + {ID id-Muting-Pattern-Information CRITICALITY ignore EXTENSION MutingPatternInformation PRESENCE optional} +} + +SONInformationReport ::= CHOICE{ + rLFReportInformation RLFReportInformation, + ... +} + +SONConfigurationTransfer ::= SEQUENCE { + targeteNB-ID TargeteNB-ID, + sourceeNB-ID SourceeNB-ID, + sONInformation SONInformation, + iE-Extensions ProtocolExtensionContainer { { SONConfigurationTransfer-ExtIEs} } OPTIONAL, +... +} + +SONConfigurationTransfer-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { +-- Extension for Release 10 to transfer the IP addresses of the eNB initiating the ANR action -- + {ID id-x2TNLConfigurationInfo CRITICALITY ignore EXTENSION X2TNLConfigurationInfo PRESENCE conditional + -- This IE shall be present if the SON Information IE contains the SON Information Request IE and the SON Information Request IE is set to “X2TNL Configuration Info” --}| +-- Extension for Release 12 to transfer information concerning the source cell of synchronisation and the aggressor cell -- + {ID id-Synchronisation-Information CRITICALITY ignore EXTENSION SynchronisationInformation PRESENCE conditional + -- This IE shall be present if the SON Information IE contains the SON Information Request IE set to “ Activate Muting ” --}, + ... +} + + +SynchronisationInformation ::= SEQUENCE { + sourceStratumLevel StratumLevel OPTIONAL, + listeningSubframePattern ListeningSubframePattern OPTIONAL, + aggressoreCGI-List ECGI-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {SynchronisationInformation-ExtIEs} } OPTIONAL, + ... +} + +SynchronisationInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +Source-ToTarget-TransparentContainer ::= OCTET STRING +-- This IE includes a transparent container from the source RAN node to the target RAN node. +-- The octets of the OCTET STRING are encoded according to the specifications of the target system. + +SourceBSS-ToTargetBSS-TransparentContainer ::= OCTET STRING +-- This is a dummy IE used only as a reference to the actual definition in relevant specification. + +SourceeNB-ID ::= SEQUENCE { + global-ENB-ID Global-ENB-ID, + selected-TAI TAI, + iE-Extensions ProtocolExtensionContainer { {SourceeNB-ID-ExtIEs} } OPTIONAL +} + +SourceeNB-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRVCCOperationNotPossible ::= ENUMERATED { + notPossible, + ... +} + +SRVCCOperationPossible ::= ENUMERATED { + possible, + ... +} + +SRVCCHOIndication ::= ENUMERATED { + pSandCS, + cSonly, + ... +} + +SourceeNB-ToTargeteNB-TransparentContainer ::= SEQUENCE { + rRC-Container RRC-Container, + e-RABInformationList E-RABInformationList OPTIONAL, + targetCell-ID EUTRAN-CGI, + subscriberProfileIDforRFP SubscriberProfileIDforRFP OPTIONAL, + uE-HistoryInformation UE-HistoryInformation, + iE-Extensions ProtocolExtensionContainer { {SourceeNB-ToTargeteNB-TransparentContainer-ExtIEs} } OPTIONAL, + ... +} + +SourceeNB-ToTargeteNB-TransparentContainer-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + {ID id-MobilityInformation CRITICALITY ignore EXTENSION MobilityInformation PRESENCE optional}| + {ID id-uE-HistoryInformationFromTheUE CRITICALITY ignore EXTENSION UE-HistoryInformationFromTheUE PRESENCE optional}, + ... +} + + +SourceRNC-ToTargetRNC-TransparentContainer ::= OCTET STRING +-- This is a dummy IE used only as a reference to the actual definition in relevant specification. + +SourceNgRanNode-ToTargetNgRanNode-TransparentContainer ::= OCTET STRING +-- This is a dummy IE used only as a reference to the actual definition in relevant specification. + +ServedGUMMEIs ::= SEQUENCE (SIZE (1.. maxnoofRATs)) OF ServedGUMMEIsItem + +ServedGUMMEIsItem ::= SEQUENCE { + servedPLMNs ServedPLMNs, + servedGroupIDs ServedGroupIDs, + servedMMECs ServedMMECs, + iE-Extensions ProtocolExtensionContainer { {ServedGUMMEIsItem-ExtIEs} } OPTIONAL, + ... +} + +ServedGUMMEIsItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ServedGroupIDs ::= SEQUENCE (SIZE(1.. maxnoofGroupIDs)) OF MME-Group-ID +ServedMMECs ::= SEQUENCE (SIZE(1.. maxnoofMMECs)) OF MME-Code + +ServedPLMNs ::= SEQUENCE (SIZE(1.. maxnoofPLMNsPerMME)) OF PLMNidentity + +SubscriberProfileIDforRFP ::= INTEGER (1..256) + +Subscription-Based-UE-DifferentiationInfo ::= SEQUENCE { + periodicCommunicationIndicator ENUMERATED {periodically, ondemand, ...} OPTIONAL, + periodicTime INTEGER (1..3600, ...) OPTIONAL, + scheduledCommunicationTime ScheduledCommunicationTime OPTIONAL, + stationaryIndication ENUMERATED {stationary, mobile, ...} OPTIONAL, + trafficProfile ENUMERATED {single-packet, dual-packets, multiple-packets, ...} OPTIONAL, + batteryIndication ENUMERATED {battery-powered, battery-powered-not-rechargeable-or-replaceable, not-battery-powered, ...} OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Subscription-Based-UE-DifferentiationInfo-ExtIEs} } OPTIONAL, + ... +} + +Subscription-Based-UE-DifferentiationInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ScheduledCommunicationTime ::= SEQUENCE { + dayofWeek BIT STRING (SIZE(7)) OPTIONAL, + timeofDayStart INTEGER (0..86399, ...) OPTIONAL, + timeofDayEnd INTEGER (0..86399, ...) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { ScheduledCommunicationTime-ExtIEs}} OPTIONAL, + ... +} + +ScheduledCommunicationTime-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SupportedTAs ::= SEQUENCE (SIZE(1.. maxnoofTACs)) OF SupportedTAs-Item + +SupportedTAs-Item ::= SEQUENCE { + tAC TAC, + broadcastPLMNs BPLMNs, + iE-Extensions ProtocolExtensionContainer { {SupportedTAs-Item-ExtIEs} } OPTIONAL, + ... +} + +SupportedTAs-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + -- Extension for Release 13 to transfer RAT-Type per TAC -- + {ID id-RAT-Type CRITICALITY reject EXTENSION RAT-Type PRESENCE optional}, + ... +} + +StratumLevel ::= INTEGER (0..3, ...) + +SynchronisationStatus ::= ENUMERATED { synchronous, asynchronous, ... } + +TimeSynchronisationInfo ::= SEQUENCE { + stratumLevel StratumLevel, + synchronisationStatus SynchronisationStatus, + iE-Extensions ProtocolExtensionContainer { { TimeSynchronisationInfo-ExtIEs} } OPTIONAL, + ... +} + +TimeSynchronisationInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + -- Extension for Release 12 to transfer Muting Availability Indication -- + {ID id-Muting-Availability-Indication CRITICALITY ignore EXTENSION MutingAvailabilityIndication PRESENCE optional}, + ... +} + +S-TMSI ::= SEQUENCE { + mMEC MME-Code, + m-TMSI M-TMSI, + iE-Extensions ProtocolExtensionContainer { {S-TMSI-ExtIEs} } OPTIONAL, + ... +} + +S-TMSI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- T + +TAC ::= OCTET STRING (SIZE (2)) + +TAIBasedMDT ::= SEQUENCE { + tAIListforMDT TAIListforMDT, + iE-Extensions ProtocolExtensionContainer { {TAIBasedMDT-ExtIEs} } OPTIONAL, + ... +} + +TAIBasedMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TAIListforMDT ::= SEQUENCE (SIZE(1..maxnoofTAforMDT)) OF TAI + +TAIListforWarning ::= SEQUENCE (SIZE(1..maxnoofTAIforWarning)) OF TAI + +TAI ::= SEQUENCE { + pLMNidentity PLMNidentity, + tAC TAC, + iE-Extensions ProtocolExtensionContainer { {TAI-ExtIEs} } OPTIONAL, + ... +} + +TAI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TAI-Broadcast ::= SEQUENCE (SIZE(1..maxnoofTAIforWarning)) OF TAI-Broadcast-Item + +TAI-Broadcast-Item ::= SEQUENCE { + tAI TAI, + completedCellinTAI CompletedCellinTAI, + iE-Extensions ProtocolExtensionContainer { {TAI-Broadcast-Item-ExtIEs} } OPTIONAL, + ... +} + +TAI-Broadcast-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TAI-Cancelled ::= SEQUENCE (SIZE(1..maxnoofTAIforWarning)) OF TAI-Cancelled-Item + +TAI-Cancelled-Item ::= SEQUENCE { + tAI TAI, + cancelledCellinTAI CancelledCellinTAI, + iE-Extensions ProtocolExtensionContainer { {TAI-Cancelled-Item-ExtIEs} } OPTIONAL, + ... +} + +TAI-Cancelled-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TABasedMDT ::= SEQUENCE { + tAListforMDT TAListforMDT, + iE-Extensions ProtocolExtensionContainer { {TABasedMDT-ExtIEs} } OPTIONAL, + ... +} + +TABasedMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TAListforMDT ::= SEQUENCE (SIZE(1..maxnoofTAforMDT)) OF TAC + +TABasedQMC ::= SEQUENCE { + tAListforQMC TAListforQMC, + iE-Extensions ProtocolExtensionContainer { {TABasedQMC-ExtIEs} } OPTIONAL, + ... +} + +TABasedQMC-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TAListforQMC ::= SEQUENCE (SIZE(1..maxnoofTAforQMC)) OF TAC + +TAIBasedQMC ::= SEQUENCE { + tAIListforQMC TAIListforQMC, + iE-Extensions ProtocolExtensionContainer { {TAIBasedQMC-ExtIEs} } OPTIONAL, + ... +} + +TAIBasedQMC-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TAIListforQMC ::= SEQUENCE (SIZE(1..maxnoofTAforQMC)) OF TAI + +CompletedCellinTAI ::= SEQUENCE (SIZE(1..maxnoofCellinTAI)) OF CompletedCellinTAI-Item + +CompletedCellinTAI-Item ::= SEQUENCE{ + eCGI EUTRAN-CGI, + iE-Extensions ProtocolExtensionContainer { {CompletedCellinTAI-Item-ExtIEs} } OPTIONAL, + ... +} + +CompletedCellinTAI-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TBCD-STRING ::= OCTET STRING (SIZE (3)) + +TargetID ::= CHOICE { + targeteNB-ID TargeteNB-ID, + targetRNC-ID TargetRNC-ID, + cGI CGI, + ..., + targetgNgRanNode-ID TargetNgRanNode-ID +} + +TargeteNB-ID ::= SEQUENCE { + global-ENB-ID Global-ENB-ID, + selected-TAI TAI, + iE-Extensions ProtocolExtensionContainer { {TargeteNB-ID-ExtIEs} } OPTIONAL, + ... +} + +TargeteNB-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TargetRNC-ID ::= SEQUENCE { + lAI LAI, + rAC RAC OPTIONAL, + rNC-ID RNC-ID, + extendedRNC-ID ExtendedRNC-ID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {TargetRNC-ID-ExtIEs} } OPTIONAL, + ... + } + + +TargetRNC-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TargetNgRanNode-ID ::= SEQUENCE { + global-RAN-NODE-ID Global-RAN-NODE-ID, + selected-TAI FiveGSTAI, + iE-Extensions ProtocolExtensionContainer { { TargetNgRanNode-ID-ExtIEs} } OPTIONAL, + ... +} + +TargetNgRanNode-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Global-RAN-NODE-ID::= CHOICE { + gNB GNB, + ng-eNB NG-eNB, + ... +} + +GNB ::= SEQUENCE { + global-gNB-ID Global-GNB-ID, + iE-Extensions ProtocolExtensionContainer { {GNB-ExtIEs} } OPTIONAL, + ... +} + +GNB-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Global-GNB-ID ::= SEQUENCE { + pLMN-Identity PLMNidentity, + gNB-ID GNB-Identity, + iE-Extensions ProtocolExtensionContainer { { Global-GNB-ID-ExtIEs} } OPTIONAL, + ... +} + +Global-GNB-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNB-Identity ::= CHOICE { + gNB-ID GNB-ID, + ... +} + +NG-eNB ::= SEQUENCE { + global-ng-eNB-ID Global-ENB-ID, + iE-Extensions ProtocolExtensionContainer { { NG-eNB-ExtIEs} } OPTIONAL, + ... +} + +NG-eNB-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNB-ID ::= BIT STRING (SIZE(22..32)) + +TargeteNB-ToSourceeNB-TransparentContainer ::= SEQUENCE { + rRC-Container RRC-Container, + iE-Extensions ProtocolExtensionContainer { {TargeteNB-ToSourceeNB-TransparentContainer-ExtIEs} } OPTIONAL, + ... +} + +TargeteNB-ToSourceeNB-TransparentContainer-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Target-ToSource-TransparentContainer ::= OCTET STRING +-- This IE includes a transparent container from the target RAN node to the source RAN node. +-- The octets of the OCTET STRING are coded according to the specifications of the target system. + +TargetRNC-ToSourceRNC-TransparentContainer ::= OCTET STRING +-- This is a dummy IE used only as a reference to the actual definition in relevant specification. + +TargetBSS-ToSourceBSS-TransparentContainer ::= OCTET STRING +-- This is a dummy IE used only as a reference to the actual definition in relevant specification. + +TargetNgRanNode-ToSourceNgRanNode-TransparentContainer ::= OCTET STRING +-- This is a dummy IE used only as a reference to the actual definition in relevant specification. + +M1ThresholdEventA2 ::= SEQUENCE { + measurementThreshold MeasurementThresholdA2, + iE-Extensions ProtocolExtensionContainer { { M1ThresholdEventA2-ExtIEs} } OPTIONAL, + ... +} + +M1ThresholdEventA2-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Threshold-RSRP ::= INTEGER(0..97) + +Threshold-RSRQ ::= INTEGER(0..34) + +TimeToWait ::= ENUMERATED {v1s, v2s, v5s, v10s, v20s, v60s, ...} + +Time-UE-StayedInCell ::= INTEGER (0..4095) + +Time-UE-StayedInCell-EnhancedGranularity ::= INTEGER (0..40950) + +TransportInformation ::= SEQUENCE { + transportLayerAddress TransportLayerAddress, + uL-GTP-TEID GTP-TEID, + ... +} + +TransportLayerAddress ::= BIT STRING (SIZE(1..160, ...)) + +TraceActivation ::= SEQUENCE { + e-UTRAN-Trace-ID E-UTRAN-Trace-ID, + interfacesToTrace InterfacesToTrace, + traceDepth TraceDepth, + traceCollectionEntityIPAddress TransportLayerAddress, + iE-Extensions ProtocolExtensionContainer { { TraceActivation-ExtIEs} } OPTIONAL, + ... +} + +TraceActivation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { +-- Extension for Rel-10 to support MDT -- + { ID id-MDTConfiguration CRITICALITY ignore EXTENSION MDT-Configuration PRESENCE optional }| +-- Extension for Rel-15 to support QMC – + { ID id-UEAppLayerMeasConfig CRITICALITY ignore EXTENSION UEAppLayerMeasConfig PRESENCE optional }, + ... +} + +TraceDepth ::= ENUMERATED { + minimum, + medium, + maximum, + minimumWithoutVendorSpecificExtension, + mediumWithoutVendorSpecificExtension, + maximumWithoutVendorSpecificExtension, + ... +} + +E-UTRAN-Trace-ID ::= OCTET STRING (SIZE (8)) + +TrafficLoadReductionIndication ::= INTEGER (1..99) + +TunnelInformation ::= SEQUENCE { + transportLayerAddress TransportLayerAddress, + uDP-Port-Number Port-Number OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {Tunnel-Information-ExtIEs} } OPTIONAL, + ... +} + +Tunnel-Information-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TypeOfError ::= ENUMERATED { + not-understood, + missing, + ... +} + +TAIListForRestart ::= SEQUENCE (SIZE(1..maxnoofRestartTAIs)) OF TAI + +-- U + +UEAggregateMaximumBitrate ::= SEQUENCE { + uEaggregateMaximumBitRateDL BitRate, + uEaggregateMaximumBitRateUL BitRate, + iE-Extensions ProtocolExtensionContainer { {UEAggregate-MaximumBitrates-ExtIEs} } OPTIONAL, + ... +} + +UEAggregate-MaximumBitrates-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { +-- Extension for maximum bitrate > 10G bps -- + { ID id-extended-uEaggregateMaximumBitRateDL CRITICALITY ignore EXTENSION ExtendedBitRate PRESENCE optional}| + { ID id-extended-uEaggregateMaximumBitRateUL CRITICALITY ignore EXTENSION ExtendedBitRate PRESENCE optional}, + ... +} + +UEAppLayerMeasConfig ::= SEQUENCE { + containerForAppLayerMeasConfig OCTET STRING (SIZE(1..1000)), + areaScopeOfQMC AreaScopeOfQMC, + iE-Extensions ProtocolExtensionContainer { {UEAppLayerMeasConfig-ExtIEs} } OPTIONAL, + ... +} + +UEAppLayerMeasConfig-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + {ID id-serviceType CRITICALITY ignore EXTENSION ServiceType PRESENCE optional}, + ... +} + +UECapabilityInfoRequest ::= ENUMERATED { + requested, + ... +} + +UE-RetentionInformation ::= ENUMERATED { + ues-retained, + ...} + +UE-S1AP-IDs ::= CHOICE{ + uE-S1AP-ID-pair UE-S1AP-ID-pair, + mME-UE-S1AP-ID MME-UE-S1AP-ID, + ... +} + +UE-S1AP-ID-pair ::= SEQUENCE{ + mME-UE-S1AP-ID MME-UE-S1AP-ID, + eNB-UE-S1AP-ID ENB-UE-S1AP-ID, + iE-Extensions ProtocolExtensionContainer { {UE-S1AP-ID-pair-ExtIEs} } OPTIONAL, + ... +} +UE-S1AP-ID-pair-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +UE-associatedLogicalS1-ConnectionItem ::= SEQUENCE { + mME-UE-S1AP-ID MME-UE-S1AP-ID OPTIONAL, + eNB-UE-S1AP-ID ENB-UE-S1AP-ID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { UE-associatedLogicalS1-ConnectionItemExtIEs} } OPTIONAL, + ... +} + + +UE-associatedLogicalS1-ConnectionItemExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UEIdentityIndexValue ::= BIT STRING (SIZE (10)) + +UE-HistoryInformation ::= SEQUENCE (SIZE(1..maxnoofCellsinUEHistoryInfo)) OF LastVisitedCell-Item + +UE-HistoryInformationFromTheUE ::= OCTET STRING +-- This IE is a transparent container and shall be encoded as the VisitedCellInfoList field contained in the UEInformationResponse message as defined in TS 36.331 [16] + +UEPagingID ::= CHOICE { + s-TMSI S-TMSI, + iMSI IMSI, + ... + } + +UERadioCapability ::= OCTET STRING + +UERadioCapabilityForPaging ::= OCTET STRING + +UE-RLF-Report-Container ::= OCTET STRING +-- This IE is a transparent container and shall be encoded as the rlf-Report-r9 field contained in the UEInformationResponse message as defined in TS 36.331 [16] + +UE-RLF-Report-Container-for-extended-bands ::= OCTET STRING +-- This IE is a transparent container and shall be encoded as the rlf-Report-v9e0 contained in the UEInformationResponse message as defined in TS 36.331 [16] + +UESecurityCapabilities ::= SEQUENCE { + encryptionAlgorithms EncryptionAlgorithms, + integrityProtectionAlgorithms IntegrityProtectionAlgorithms, + iE-Extensions ProtocolExtensionContainer { { UESecurityCapabilities-ExtIEs} } OPTIONAL, +... +} + +UESecurityCapabilities-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UESidelinkAggregateMaximumBitrate ::= SEQUENCE { + uESidelinkAggregateMaximumBitRate BitRate, + iE-Extensions ProtocolExtensionContainer { {UE-Sidelink-Aggregate-MaximumBitrates-ExtIEs} } OPTIONAL, + ... +} + +UE-Sidelink-Aggregate-MaximumBitrates-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UE-Usage-Type ::= INTEGER (0..255) + +UL-CP-SecurityInformation ::= SEQUENCE { + ul-NAS-MAC UL-NAS-MAC, + ul-NAS-Count UL-NAS-Count, + iE-Extensions ProtocolExtensionContainer { { UL-CP-SecurityInformation-ExtIEs} } OPTIONAL, + ... +} + +UL-CP-SecurityInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UL-NAS-MAC ::= BIT STRING (SIZE (16)) + +UL-NAS-Count ::= BIT STRING (SIZE (5)) + +UnlicensedSpectrumRestriction ::= ENUMERATED { + unlicensed-restricted, + ... +} + + +UserLocationInformation ::= SEQUENCE { + eutran-cgi EUTRAN-CGI, + tai TAI, + iE-Extensions ProtocolExtensionContainer { { UserLocationInformation-ExtIEs} } OPTIONAL, + ... +} + +UserLocationInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UEUserPlaneCIoTSupportIndicator ::= ENUMERATED { + supported, + ... +} + +UE-Application-Layer-Measurement-Capability ::= BIT STRING (SIZE (8)) + +-- First bit: QoE Measurement for streaming service +-- Second bit: QoE Measurement for MTSI service + +-- Note that undefined bits are considered as a spare bit and spare bits shall be set to 0 by the transmitter and shall be ignored by the receiver. + +-- V + +VoiceSupportMatchIndicator ::= ENUMERATED { + supported, + not-supported, + ... +} + +V2XServicesAuthorized ::= SEQUENCE { + vehicleUE VehicleUE OPTIONAL, + pedestrianUE PedestrianUE OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {V2XServicesAuthorized-ExtIEs} } OPTIONAL, + ... +} + +V2XServicesAuthorized-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +VehicleUE ::= ENUMERATED { + authorized, + not-authorized, + ... +} + +PedestrianUE ::= ENUMERATED { + authorized, + not-authorized, + ... +} + +-- W + +WarningAreaCoordinates ::= OCTET STRING (SIZE(1..1024)) + +WarningAreaList ::= CHOICE { + cellIDList ECGIList, + trackingAreaListforWarning TAIListforWarning, + emergencyAreaIDList EmergencyAreaIDList, + ... +} + + +WarningType ::= OCTET STRING (SIZE (2)) + +WarningSecurityInfo ::= OCTET STRING (SIZE (50)) + + +WarningMessageContents ::= OCTET STRING (SIZE(1..9600)) + +WLANMeasurementConfiguration ::= SEQUENCE { + wlanMeasConfig WLANMeasConfig, + wlanMeasConfigNameList WLANMeasConfigNameList OPTIONAL, + wlan-rssi ENUMERATED {true, ...} OPTIONAL, + wlan-rtt ENUMERATED {true, ...} OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { WLANMeasurementConfiguration-ExtIEs } } OPTIONAL, + ... +} + +WLANMeasurementConfiguration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +WLANMeasConfigNameList ::= SEQUENCE (SIZE(1..maxnoofWLANName)) OF WLANName + +WLANMeasConfig::= ENUMERATED {setup,...} + +WLANName ::= OCTET STRING (SIZE (1..32)) + +-- X + + +X2TNLConfigurationInfo ::= SEQUENCE { + eNBX2TransportLayerAddresses ENBX2TLAs, + iE-Extensions ProtocolExtensionContainer { { X2TNLConfigurationInfo-ExtIEs} } OPTIONAL, + ... +} + +X2TNLConfigurationInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { +-- Extension for Release 10 to transfer the IPsec and U-plane addresses during ANR action -- + {ID id-eNBX2ExtendedTransportLayerAddresses CRITICALITY ignore EXTENSION ENBX2ExtTLAs PRESENCE optional}| +-- Extension for Release 12 to transfer the IP addresses of the X2 GW -- + {ID id-eNBIndirectX2TransportLayerAddresses CRITICALITY ignore EXTENSION ENBIndirectX2TransportLayerAddresses PRESENCE optional}, + ... +} + +ENBX2ExtTLAs ::= SEQUENCE (SIZE(1.. maxnoofeNBX2ExtTLAs)) OF ENBX2ExtTLA + +ENBX2ExtTLA ::= SEQUENCE { + iPsecTLA TransportLayerAddress OPTIONAL, + gTPTLAa ENBX2GTPTLAs OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { ENBX2ExtTLA-ExtIEs} } OPTIONAL, + ... +} + +ENBX2ExtTLA-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ENBX2GTPTLAs ::= SEQUENCE (SIZE(1.. maxnoofeNBX2GTPTLAs)) OF TransportLayerAddress + +ENBIndirectX2TransportLayerAddresses ::= SEQUENCE (SIZE(1..maxnoofeNBX2TLAs)) OF TransportLayerAddress + +-- Y +-- Z + +END + + + +-- ************************************************************** +-- +-- Common definitions +-- +-- ************************************************************** + +S1AP-CommonDataTypes { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-CommonDataTypes (3) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +Criticality ::= ENUMERATED { reject, ignore, notify } + +Presence ::= ENUMERATED { optional, conditional, mandatory } + +PrivateIE-ID ::= CHOICE { + local INTEGER (0..65535), + global OBJECT IDENTIFIER +} + +ProcedureCode ::= INTEGER (0..255) + +ProtocolExtensionID ::= INTEGER (0..65535) + +ProtocolIE-ID ::= INTEGER (0..65535) + +TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessfull-outcome } + +END + + +-- ************************************************************** +-- +-- Constant definitions +-- +-- ************************************************************** + +S1AP-Constants { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-Constants (4) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + ProcedureCode, + ProtocolIE-ID + +FROM S1AP-CommonDataTypes; + + +-- ************************************************************** +-- +-- Elementary Procedures +-- +-- ************************************************************** + +id-HandoverPreparation ProcedureCode ::= 0 +id-HandoverResourceAllocation ProcedureCode ::= 1 +id-HandoverNotification ProcedureCode ::= 2 +id-PathSwitchRequest ProcedureCode ::= 3 +id-HandoverCancel ProcedureCode ::= 4 +id-E-RABSetup ProcedureCode ::= 5 +id-E-RABModify ProcedureCode ::= 6 +id-E-RABRelease ProcedureCode ::= 7 +id-E-RABReleaseIndication ProcedureCode ::= 8 +id-InitialContextSetup ProcedureCode ::= 9 +id-Paging ProcedureCode ::= 10 +id-downlinkNASTransport ProcedureCode ::= 11 +id-initialUEMessage ProcedureCode ::= 12 +id-uplinkNASTransport ProcedureCode ::= 13 +id-Reset ProcedureCode ::= 14 +id-ErrorIndication ProcedureCode ::= 15 +id-NASNonDeliveryIndication ProcedureCode ::= 16 +id-S1Setup ProcedureCode ::= 17 +id-UEContextReleaseRequest ProcedureCode ::= 18 +id-DownlinkS1cdma2000tunnelling ProcedureCode ::= 19 +id-UplinkS1cdma2000tunnelling ProcedureCode ::= 20 +id-UEContextModification ProcedureCode ::= 21 +id-UECapabilityInfoIndication ProcedureCode ::= 22 +id-UEContextRelease ProcedureCode ::= 23 +id-eNBStatusTransfer ProcedureCode ::= 24 +id-MMEStatusTransfer ProcedureCode ::= 25 +id-DeactivateTrace ProcedureCode ::= 26 +id-TraceStart ProcedureCode ::= 27 +id-TraceFailureIndication ProcedureCode ::= 28 +id-ENBConfigurationUpdate ProcedureCode ::= 29 +id-MMEConfigurationUpdate ProcedureCode ::= 30 +id-LocationReportingControl ProcedureCode ::= 31 +id-LocationReportingFailureIndication ProcedureCode ::= 32 +id-LocationReport ProcedureCode ::= 33 +id-OverloadStart ProcedureCode ::= 34 +id-OverloadStop ProcedureCode ::= 35 +id-WriteReplaceWarning ProcedureCode ::= 36 +id-eNBDirectInformationTransfer ProcedureCode ::= 37 +id-MMEDirectInformationTransfer ProcedureCode ::= 38 +id-PrivateMessage ProcedureCode ::= 39 +id-eNBConfigurationTransfer ProcedureCode ::= 40 +id-MMEConfigurationTransfer ProcedureCode ::= 41 +id-CellTrafficTrace ProcedureCode ::= 42 +id-Kill ProcedureCode ::= 43 +id-downlinkUEAssociatedLPPaTransport ProcedureCode ::= 44 +id-uplinkUEAssociatedLPPaTransport ProcedureCode ::= 45 +id-downlinkNonUEAssociatedLPPaTransport ProcedureCode ::= 46 +id-uplinkNonUEAssociatedLPPaTransport ProcedureCode ::= 47 +id-UERadioCapabilityMatch ProcedureCode ::= 48 +id-PWSRestartIndication ProcedureCode ::= 49 +id-E-RABModificationIndication ProcedureCode ::= 50 +id-PWSFailureIndication ProcedureCode ::= 51 +id-RerouteNASRequest ProcedureCode ::= 52 +id-UEContextModificationIndication ProcedureCode ::= 53 +id-ConnectionEstablishmentIndication ProcedureCode ::= 54 +id-UEContextSuspend ProcedureCode ::= 55 +id-UEContextResume ProcedureCode ::= 56 +id-NASDeliveryIndication ProcedureCode ::= 57 +id-RetrieveUEInformation ProcedureCode ::= 58 +id-UEInformationTransfer ProcedureCode ::= 59 +id-eNBCPRelocationIndication ProcedureCode ::= 60 +id-MMECPRelocationIndication ProcedureCode ::= 61 +id-SecondaryRATDataUsageReport ProcedureCode ::= 62 + +-- ************************************************************** +-- +-- Extension constants +-- +-- ************************************************************** + +maxPrivateIEs INTEGER ::= 65535 +maxProtocolExtensions INTEGER ::= 65535 +maxProtocolIEs INTEGER ::= 65535 +-- ************************************************************** +-- +-- Lists +-- +-- ************************************************************** + +maxnoofCSGs INTEGER ::= 256 +maxnoofE-RABs INTEGER ::= 256 +maxnoofTAIs INTEGER ::= 256 +maxnoofTACs INTEGER ::= 256 +maxnoofErrors INTEGER ::= 256 +maxnoofBPLMNs INTEGER ::= 6 +maxnoofPLMNsPerMME INTEGER ::= 32 +maxnoofEPLMNs INTEGER ::= 15 +maxnoofEPLMNsPlusOne INTEGER ::= 16 +maxnoofForbLACs INTEGER ::= 4096 +maxnoofForbTACs INTEGER ::= 4096 +maxnoofIndividualS1ConnectionsToReset INTEGER ::= 256 +maxnoofCellsinUEHistoryInfo INTEGER ::= 16 +maxnoofCellsineNB INTEGER ::= 256 +maxnoofTAIforWarning INTEGER ::= 65535 +maxnoofCellID INTEGER ::= 65535 +maxnoofDCNs INTEGER ::= 32 +maxnoofEmergencyAreaID INTEGER ::= 65535 +maxnoofCellinTAI INTEGER ::= 65535 +maxnoofCellinEAI INTEGER ::= 65535 +maxnoofeNBX2TLAs INTEGER ::= 2 +maxnoofeNBX2ExtTLAs INTEGER ::= 16 +maxnoofeNBX2GTPTLAs INTEGER ::= 16 +maxnoofRATs INTEGER ::= 8 +maxnoofGroupIDs INTEGER ::= 65535 +maxnoofMMECs INTEGER ::= 256 +maxnoofCellIDforMDT INTEGER ::= 32 +maxnoofTAforMDT INTEGER ::= 8 +maxnoofMDTPLMNs INTEGER ::= 16 +maxnoofCellsforRestart INTEGER ::= 256 +maxnoofRestartTAIs INTEGER ::= 2048 +maxnoofRestartEmergencyAreaIDs INTEGER ::= 256 +maxEARFCN INTEGER ::= 262143 +maxnoofMBSFNAreaMDT INTEGER ::= 8 +maxnoofRecommendedCells INTEGER ::= 16 +maxnoofRecommendedENBs INTEGER ::= 16 +maxnooftimeperiods INTEGER ::= 2 +maxnoofCellIDforQMC INTEGER ::= 32 +maxnoofTAforQMC INTEGER ::= 8 +maxnoofPLMNforQMC INTEGER ::= 16 +maxnoofBluetoothName INTEGER ::= 4 +maxnoofWLANName INTEGER ::= 4 + + + +-- ************************************************************** +-- +-- IEs +-- +-- ************************************************************** + +id-MME-UE-S1AP-ID ProtocolIE-ID ::= 0 +id-HandoverType ProtocolIE-ID ::= 1 +id-Cause ProtocolIE-ID ::= 2 +id-SourceID ProtocolIE-ID ::= 3 +id-TargetID ProtocolIE-ID ::= 4 +id-eNB-UE-S1AP-ID ProtocolIE-ID ::= 8 +id-E-RABSubjecttoDataForwardingList ProtocolIE-ID ::= 12 +id-E-RABtoReleaseListHOCmd ProtocolIE-ID ::= 13 +id-E-RABDataForwardingItem ProtocolIE-ID ::= 14 +id-E-RABReleaseItemBearerRelComp ProtocolIE-ID ::= 15 +id-E-RABToBeSetupListBearerSUReq ProtocolIE-ID ::= 16 +id-E-RABToBeSetupItemBearerSUReq ProtocolIE-ID ::= 17 +id-E-RABAdmittedList ProtocolIE-ID ::= 18 +id-E-RABFailedToSetupListHOReqAck ProtocolIE-ID ::= 19 +id-E-RABAdmittedItem ProtocolIE-ID ::= 20 +id-E-RABFailedtoSetupItemHOReqAck ProtocolIE-ID ::= 21 +id-E-RABToBeSwitchedDLList ProtocolIE-ID ::= 22 +id-E-RABToBeSwitchedDLItem ProtocolIE-ID ::= 23 +id-E-RABToBeSetupListCtxtSUReq ProtocolIE-ID ::= 24 +id-TraceActivation ProtocolIE-ID ::= 25 +id-NAS-PDU ProtocolIE-ID ::= 26 +id-E-RABToBeSetupItemHOReq ProtocolIE-ID ::= 27 +id-E-RABSetupListBearerSURes ProtocolIE-ID ::= 28 +id-E-RABFailedToSetupListBearerSURes ProtocolIE-ID ::= 29 +id-E-RABToBeModifiedListBearerModReq ProtocolIE-ID ::= 30 +id-E-RABModifyListBearerModRes ProtocolIE-ID ::= 31 +id-E-RABFailedToModifyList ProtocolIE-ID ::= 32 +id-E-RABToBeReleasedList ProtocolIE-ID ::= 33 +id-E-RABFailedToReleaseList ProtocolIE-ID ::= 34 +id-E-RABItem ProtocolIE-ID ::= 35 +id-E-RABToBeModifiedItemBearerModReq ProtocolIE-ID ::= 36 +id-E-RABModifyItemBearerModRes ProtocolIE-ID ::= 37 +id-E-RABReleaseItem ProtocolIE-ID ::= 38 +id-E-RABSetupItemBearerSURes ProtocolIE-ID ::= 39 +id-SecurityContext ProtocolIE-ID ::= 40 +id-HandoverRestrictionList ProtocolIE-ID ::= 41 +id-UEPagingID ProtocolIE-ID ::= 43 +id-pagingDRX ProtocolIE-ID ::= 44 +id-TAIList ProtocolIE-ID ::= 46 +id-TAIItem ProtocolIE-ID ::= 47 +id-E-RABFailedToSetupListCtxtSURes ProtocolIE-ID ::= 48 +id-E-RABReleaseItemHOCmd ProtocolIE-ID ::= 49 +id-E-RABSetupItemCtxtSURes ProtocolIE-ID ::= 50 +id-E-RABSetupListCtxtSURes ProtocolIE-ID ::= 51 +id-E-RABToBeSetupItemCtxtSUReq ProtocolIE-ID ::= 52 +id-E-RABToBeSetupListHOReq ProtocolIE-ID ::= 53 +id-GERANtoLTEHOInformationRes ProtocolIE-ID ::= 55 +id-UTRANtoLTEHOInformationRes ProtocolIE-ID ::= 57 +id-CriticalityDiagnostics ProtocolIE-ID ::= 58 +id-Global-ENB-ID ProtocolIE-ID ::= 59 +id-eNBname ProtocolIE-ID ::= 60 +id-MMEname ProtocolIE-ID ::= 61 +id-ServedPLMNs ProtocolIE-ID ::= 63 +id-SupportedTAs ProtocolIE-ID ::= 64 +id-TimeToWait ProtocolIE-ID ::= 65 +id-uEaggregateMaximumBitrate ProtocolIE-ID ::= 66 +id-TAI ProtocolIE-ID ::= 67 +id-E-RABReleaseListBearerRelComp ProtocolIE-ID ::= 69 +id-cdma2000PDU ProtocolIE-ID ::= 70 +id-cdma2000RATType ProtocolIE-ID ::= 71 +id-cdma2000SectorID ProtocolIE-ID ::= 72 +id-SecurityKey ProtocolIE-ID ::= 73 +id-UERadioCapability ProtocolIE-ID ::= 74 +id-GUMMEI-ID ProtocolIE-ID ::= 75 +id-E-RABInformationListItem ProtocolIE-ID ::= 78 +id-Direct-Forwarding-Path-Availability ProtocolIE-ID ::= 79 +id-UEIdentityIndexValue ProtocolIE-ID ::= 80 +id-cdma2000HOStatus ProtocolIE-ID ::= 83 +id-cdma2000HORequiredIndication ProtocolIE-ID ::= 84 +id-E-UTRAN-Trace-ID ProtocolIE-ID ::= 86 +id-RelativeMMECapacity ProtocolIE-ID ::= 87 +id-SourceMME-UE-S1AP-ID ProtocolIE-ID ::= 88 +id-Bearers-SubjectToStatusTransfer-Item ProtocolIE-ID ::= 89 +id-eNB-StatusTransfer-TransparentContainer ProtocolIE-ID ::= 90 +id-UE-associatedLogicalS1-ConnectionItem ProtocolIE-ID ::= 91 +id-ResetType ProtocolIE-ID ::= 92 +id-UE-associatedLogicalS1-ConnectionListResAck ProtocolIE-ID ::= 93 +id-E-RABToBeSwitchedULItem ProtocolIE-ID ::= 94 +id-E-RABToBeSwitchedULList ProtocolIE-ID ::= 95 +id-S-TMSI ProtocolIE-ID ::= 96 +id-cdma2000OneXRAND ProtocolIE-ID ::= 97 +id-RequestType ProtocolIE-ID ::= 98 +id-UE-S1AP-IDs ProtocolIE-ID ::= 99 +id-EUTRAN-CGI ProtocolIE-ID ::= 100 +id-OverloadResponse ProtocolIE-ID ::= 101 +id-cdma2000OneXSRVCCInfo ProtocolIE-ID ::= 102 +id-E-RABFailedToBeReleasedList ProtocolIE-ID ::= 103 +id-Source-ToTarget-TransparentContainer ProtocolIE-ID ::= 104 +id-ServedGUMMEIs ProtocolIE-ID ::= 105 +id-SubscriberProfileIDforRFP ProtocolIE-ID ::= 106 +id-UESecurityCapabilities ProtocolIE-ID ::= 107 +id-CSFallbackIndicator ProtocolIE-ID ::= 108 +id-CNDomain ProtocolIE-ID ::= 109 +id-E-RABReleasedList ProtocolIE-ID ::= 110 +id-MessageIdentifier ProtocolIE-ID ::= 111 +id-SerialNumber ProtocolIE-ID ::= 112 +id-WarningAreaList ProtocolIE-ID ::= 113 +id-RepetitionPeriod ProtocolIE-ID ::= 114 +id-NumberofBroadcastRequest ProtocolIE-ID ::= 115 +id-WarningType ProtocolIE-ID ::= 116 +id-WarningSecurityInfo ProtocolIE-ID ::= 117 +id-DataCodingScheme ProtocolIE-ID ::= 118 +id-WarningMessageContents ProtocolIE-ID ::= 119 +id-BroadcastCompletedAreaList ProtocolIE-ID ::= 120 +id-Inter-SystemInformationTransferTypeEDT ProtocolIE-ID ::= 121 +id-Inter-SystemInformationTransferTypeMDT ProtocolIE-ID ::= 122 +id-Target-ToSource-TransparentContainer ProtocolIE-ID ::= 123 +id-SRVCCOperationPossible ProtocolIE-ID ::= 124 +id-SRVCCHOIndication ProtocolIE-ID ::= 125 +id-NAS-DownlinkCount ProtocolIE-ID ::= 126 +id-CSG-Id ProtocolIE-ID ::= 127 +id-CSG-IdList ProtocolIE-ID ::= 128 +id-SONConfigurationTransferECT ProtocolIE-ID ::= 129 +id-SONConfigurationTransferMCT ProtocolIE-ID ::= 130 +id-TraceCollectionEntityIPAddress ProtocolIE-ID ::= 131 +id-MSClassmark2 ProtocolIE-ID ::= 132 +id-MSClassmark3 ProtocolIE-ID ::= 133 +id-RRC-Establishment-Cause ProtocolIE-ID ::= 134 +id-NASSecurityParametersfromE-UTRAN ProtocolIE-ID ::= 135 +id-NASSecurityParameterstoE-UTRAN ProtocolIE-ID ::= 136 +id-DefaultPagingDRX ProtocolIE-ID ::= 137 +id-Source-ToTarget-TransparentContainer-Secondary ProtocolIE-ID ::= 138 +id-Target-ToSource-TransparentContainer-Secondary ProtocolIE-ID ::= 139 +id-EUTRANRoundTripDelayEstimationInfo ProtocolIE-ID ::= 140 +id-BroadcastCancelledAreaList ProtocolIE-ID ::= 141 +id-ConcurrentWarningMessageIndicator ProtocolIE-ID ::= 142 +id-Data-Forwarding-Not-Possible ProtocolIE-ID ::= 143 +id-ExtendedRepetitionPeriod ProtocolIE-ID ::= 144 +id-CellAccessMode ProtocolIE-ID ::= 145 +id-CSGMembershipStatus ProtocolIE-ID ::= 146 +id-LPPa-PDU ProtocolIE-ID ::= 147 +id-Routing-ID ProtocolIE-ID ::= 148 +id-Time-Synchronisation-Info ProtocolIE-ID ::= 149 +id-PS-ServiceNotAvailable ProtocolIE-ID ::= 150 +id-PagingPriority ProtocolIE-ID ::= 151 +id-x2TNLConfigurationInfo ProtocolIE-ID ::= 152 +id-eNBX2ExtendedTransportLayerAddresses ProtocolIE-ID ::= 153 +id-GUMMEIList ProtocolIE-ID ::= 154 +id-GW-TransportLayerAddress ProtocolIE-ID ::= 155 +id-Correlation-ID ProtocolIE-ID ::= 156 +id-SourceMME-GUMMEI ProtocolIE-ID ::= 157 +id-MME-UE-S1AP-ID-2 ProtocolIE-ID ::= 158 +id-RegisteredLAI ProtocolIE-ID ::= 159 +id-RelayNode-Indicator ProtocolIE-ID ::= 160 +id-TrafficLoadReductionIndication ProtocolIE-ID ::= 161 +id-MDTConfiguration ProtocolIE-ID ::= 162 +id-MMERelaySupportIndicator ProtocolIE-ID ::= 163 +id-GWContextReleaseIndication ProtocolIE-ID ::= 164 +id-ManagementBasedMDTAllowed ProtocolIE-ID ::= 165 +id-PrivacyIndicator ProtocolIE-ID ::= 166 +id-Time-UE-StayedInCell-EnhancedGranularity ProtocolIE-ID ::= 167 +id-HO-Cause ProtocolIE-ID ::= 168 +id-VoiceSupportMatchIndicator ProtocolIE-ID ::= 169 +id-GUMMEIType ProtocolIE-ID ::= 170 +id-M3Configuration ProtocolIE-ID ::= 171 +id-M4Configuration ProtocolIE-ID ::= 172 +id-M5Configuration ProtocolIE-ID ::= 173 +id-MDT-Location-Info ProtocolIE-ID ::= 174 +id-MobilityInformation ProtocolIE-ID ::= 175 +id-Tunnel-Information-for-BBF ProtocolIE-ID ::= 176 +id-ManagementBasedMDTPLMNList ProtocolIE-ID ::= 177 +id-SignallingBasedMDTPLMNList ProtocolIE-ID ::= 178 +id-ULCOUNTValueExtended ProtocolIE-ID ::= 179 +id-DLCOUNTValueExtended ProtocolIE-ID ::= 180 +id-ReceiveStatusOfULPDCPSDUsExtended ProtocolIE-ID ::= 181 +id-ECGIListForRestart ProtocolIE-ID ::= 182 +id-SIPTO-Correlation-ID ProtocolIE-ID ::= 183 +id-SIPTO-L-GW-TransportLayerAddress ProtocolIE-ID ::= 184 +id-TransportInformation ProtocolIE-ID ::= 185 +id-LHN-ID ProtocolIE-ID ::= 186 +id-AdditionalCSFallbackIndicator ProtocolIE-ID ::= 187 +id-TAIListForRestart ProtocolIE-ID ::= 188 +id-UserLocationInformation ProtocolIE-ID ::= 189 +id-EmergencyAreaIDListForRestart ProtocolIE-ID ::= 190 +id-KillAllWarningMessages ProtocolIE-ID ::= 191 +id-Masked-IMEISV ProtocolIE-ID ::= 192 +id-eNBIndirectX2TransportLayerAddresses ProtocolIE-ID ::= 193 +id-uE-HistoryInformationFromTheUE ProtocolIE-ID ::= 194 +id-ProSeAuthorized ProtocolIE-ID ::= 195 +id-ExpectedUEBehaviour ProtocolIE-ID ::= 196 +id-LoggedMBSFNMDT ProtocolIE-ID ::= 197 +id-UERadioCapabilityForPaging ProtocolIE-ID ::= 198 +id-E-RABToBeModifiedListBearerModInd ProtocolIE-ID ::= 199 +id-E-RABToBeModifiedItemBearerModInd ProtocolIE-ID ::= 200 +id-E-RABNotToBeModifiedListBearerModInd ProtocolIE-ID ::= 201 +id-E-RABNotToBeModifiedItemBearerModInd ProtocolIE-ID ::= 202 +id-E-RABModifyListBearerModConf ProtocolIE-ID ::= 203 +id-E-RABModifyItemBearerModConf ProtocolIE-ID ::= 204 +id-E-RABFailedToModifyListBearerModConf ProtocolIE-ID ::= 205 +id-SON-Information-Report ProtocolIE-ID ::= 206 +id-Muting-Availability-Indication ProtocolIE-ID ::= 207 +id-Muting-Pattern-Information ProtocolIE-ID ::= 208 +id-Synchronisation-Information ProtocolIE-ID ::= 209 +id-E-RABToBeReleasedListBearerModConf ProtocolIE-ID ::= 210 +id-AssistanceDataForPaging ProtocolIE-ID ::= 211 +id-CellIdentifierAndCELevelForCECapableUEs ProtocolIE-ID ::= 212 +id-InformationOnRecommendedCellsAndENBsForPaging ProtocolIE-ID ::= 213 +id-RecommendedCellItem ProtocolIE-ID ::= 214 +id-RecommendedENBItem ProtocolIE-ID ::= 215 +id-ProSeUEtoNetworkRelaying ProtocolIE-ID ::= 216 +id-ULCOUNTValuePDCP-SNlength18 ProtocolIE-ID ::= 217 +id-DLCOUNTValuePDCP-SNlength18 ProtocolIE-ID ::= 218 +id-ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 ProtocolIE-ID ::= 219 +id-M6Configuration ProtocolIE-ID ::= 220 +id-M7Configuration ProtocolIE-ID ::= 221 +id-PWSfailedECGIList ProtocolIE-ID ::= 222 +id-MME-Group-ID ProtocolIE-ID ::= 223 +id-Additional-GUTI ProtocolIE-ID ::= 224 +id-S1-Message ProtocolIE-ID ::= 225 +id-CSGMembershipInfo ProtocolIE-ID ::= 226 +id-Paging-eDRXInformation ProtocolIE-ID ::= 227 +id-UE-RetentionInformation ProtocolIE-ID ::= 228 +id-UE-Usage-Type ProtocolIE-ID ::= 230 +id-extended-UEIdentityIndexValue ProtocolIE-ID ::= 231 +id-RAT-Type ProtocolIE-ID ::= 232 +id-BearerType ProtocolIE-ID ::= 233 +id-NB-IoT-DefaultPagingDRX ProtocolIE-ID ::= 234 +id-E-RABFailedToResumeListResumeReq ProtocolIE-ID ::= 235 +id-E-RABFailedToResumeItemResumeReq ProtocolIE-ID ::= 236 +id-E-RABFailedToResumeListResumeRes ProtocolIE-ID ::= 237 +id-E-RABFailedToResumeItemResumeRes ProtocolIE-ID ::= 238 +id-NB-IoT-Paging-eDRXInformation ProtocolIE-ID ::= 239 +id-V2XServicesAuthorized ProtocolIE-ID ::= 240 +id-UEUserPlaneCIoTSupportIndicator ProtocolIE-ID ::= 241 +id-CE-mode-B-SupportIndicator ProtocolIE-ID ::= 242 +id-SRVCCOperationNotPossible ProtocolIE-ID ::= 243 +id-NB-IoT-UEIdentityIndexValue ProtocolIE-ID ::= 244 +id-RRC-Resume-Cause ProtocolIE-ID ::= 245 +id-DCN-ID ProtocolIE-ID ::= 246 +id-ServedDCNs ProtocolIE-ID ::= 247 +id-UESidelinkAggregateMaximumBitrate ProtocolIE-ID ::= 248 +id-DLNASPDUDeliveryAckRequest ProtocolIE-ID ::= 249 +id-Coverage-Level ProtocolIE-ID ::= 250 +id-EnhancedCoverageRestricted ProtocolIE-ID ::= 251 +id-UE-Level-QoS-Parameters ProtocolIE-ID ::= 252 +id-DL-CP-SecurityInformation ProtocolIE-ID ::= 253 +id-UL-CP-SecurityInformation ProtocolIE-ID ::= 254 +id-extended-e-RAB-MaximumBitrateDL ProtocolIE-ID ::= 255 +id-extended-e-RAB-MaximumBitrateUL ProtocolIE-ID ::= 256 +id-extended-e-RAB-GuaranteedBitrateDL ProtocolIE-ID ::= 257 +id-extended-e-RAB-GuaranteedBitrateUL ProtocolIE-ID ::= 258 +id-extended-uEaggregateMaximumBitRateDL ProtocolIE-ID ::= 259 +id-extended-uEaggregateMaximumBitRateUL ProtocolIE-ID ::= 260 +id-NRrestrictioninEPSasSecondaryRAT ProtocolIE-ID ::= 261 +id-UEAppLayerMeasConfig ProtocolIE-ID ::= 262 +id-UE-Application-Layer-Measurement-Capability ProtocolIE-ID ::= 263 +id-SecondaryRATDataUsageReportList ProtocolIE-ID ::= 264 +id-SecondaryRATDataUsageReportItem ProtocolIE-ID ::= 265 +id-HandoverFlag ProtocolIE-ID ::= 266 +id-E-RABUsageReportItem ProtocolIE-ID ::= 267 +id-SecondaryRATDataUsageRequest ProtocolIE-ID ::= 268 +id-NRUESecurityCapabilities ProtocolIE-ID ::= 269 +id-UnlicensedSpectrumRestriction ProtocolIE-ID ::= 270 +id-CE-ModeBRestricted ProtocolIE-ID ::= 271 +id-LTE-M-Indication ProtocolIE-ID ::= 272 +id-DownlinkPacketLossRate ProtocolIE-ID ::= 273 +id-UplinkPacketLossRate ProtocolIE-ID ::= 274 +id-UECapabilityInfoRequest ProtocolIE-ID ::= 275 +id-serviceType ProtocolIE-ID ::= 276 +id-AerialUEsubscriptionInformation ProtocolIE-ID ::= 277 +id-Subscription-Based-UE-DifferentiationInfo ProtocolIE-ID ::= 278 +id-EndIndication ProtocolIE-ID ::= 280 +id-EDT-Session ProtocolIE-ID ::= 281 +id-CNTypeRestrictions ProtocolIE-ID ::= 282 +id-PendingDataIndication ProtocolIE-ID ::= 283 +id-BluetoothMeasurementConfiguration ProtocolIE-ID ::= 284 +id-WLANMeasurementConfiguration ProtocolIE-ID ::= 285 +id-WarningAreaCoordinates ProtocolIE-ID ::= 286 +id-NRrestrictionin5GS ProtocolIE-ID ::= 287 + +END + + +-- ************************************************************** +-- +-- Container definitions +-- +-- ************************************************************** + +S1AP-Containers { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-Containers (5) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + Criticality, + Presence, + PrivateIE-ID, + ProtocolExtensionID, + ProtocolIE-ID +FROM S1AP-CommonDataTypes + + maxPrivateIEs, + maxProtocolExtensions, + maxProtocolIEs +FROM S1AP-Constants; + +-- ************************************************************** +-- +-- Class Definition for Protocol IEs +-- +-- ************************************************************** + +S1AP-PROTOCOL-IES ::= CLASS { + &id ProtocolIE-ID UNIQUE, + &criticality Criticality, + &Value, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + TYPE &Value + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Class Definition for Protocol IEs +-- +-- ************************************************************** + +S1AP-PROTOCOL-IES-PAIR ::= CLASS { + &id ProtocolIE-ID UNIQUE, + &firstCriticality Criticality, + &FirstValue, + &secondCriticality Criticality, + &SecondValue, + &presence Presence +} +WITH SYNTAX { + ID &id + FIRST CRITICALITY &firstCriticality + FIRST TYPE &FirstValue + SECOND CRITICALITY &secondCriticality + SECOND TYPE &SecondValue + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Class Definition for Protocol Extensions +-- +-- ************************************************************** + +S1AP-PROTOCOL-EXTENSION ::= CLASS { + &id ProtocolExtensionID UNIQUE, + &criticality Criticality, + &Extension, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + EXTENSION &Extension + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Class Definition for Private IEs +-- +-- ************************************************************** + +S1AP-PRIVATE-IES ::= CLASS { + &id PrivateIE-ID, + &criticality Criticality, + &Value, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + TYPE &Value + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Container for Protocol IEs +-- +-- ************************************************************** + +ProtocolIE-Container {S1AP-PROTOCOL-IES : IEsSetParam} ::= + SEQUENCE (SIZE (0..maxProtocolIEs)) OF + ProtocolIE-Field {{IEsSetParam}} + +ProtocolIE-SingleContainer {S1AP-PROTOCOL-IES : IEsSetParam} ::= + ProtocolIE-Field {{IEsSetParam}} + +ProtocolIE-Field {S1AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE { + id S1AP-PROTOCOL-IES.&id ({IEsSetParam}), + criticality S1AP-PROTOCOL-IES.&criticality ({IEsSetParam}{@id}), + value S1AP-PROTOCOL-IES.&Value ({IEsSetParam}{@id}) +} + +-- ************************************************************** +-- +-- Container for Protocol IE Pairs +-- +-- ************************************************************** + +ProtocolIE-ContainerPair {S1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= + SEQUENCE (SIZE (0..maxProtocolIEs)) OF + ProtocolIE-FieldPair {{IEsSetParam}} + +ProtocolIE-FieldPair {S1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= SEQUENCE { + id S1AP-PROTOCOL-IES-PAIR.&id ({IEsSetParam}), + firstCriticality S1AP-PROTOCOL-IES-PAIR.&firstCriticality ({IEsSetParam}{@id}), + firstValue S1AP-PROTOCOL-IES-PAIR.&FirstValue ({IEsSetParam}{@id}), + secondCriticality S1AP-PROTOCOL-IES-PAIR.&secondCriticality ({IEsSetParam}{@id}), + secondValue S1AP-PROTOCOL-IES-PAIR.&SecondValue ({IEsSetParam}{@id}) +} + +-- ************************************************************** +-- +-- Container Lists for Protocol IE Containers +-- +-- ************************************************************** + +ProtocolIE-ContainerList {INTEGER : lowerBound, INTEGER : upperBound, S1AP-PROTOCOL-IES : IEsSetParam} ::= + SEQUENCE (SIZE (lowerBound..upperBound)) OF + ProtocolIE-SingleContainer {{IEsSetParam}} + +ProtocolIE-ContainerPairList {INTEGER : lowerBound, INTEGER : upperBound, S1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= + SEQUENCE (SIZE (lowerBound..upperBound)) OF + ProtocolIE-ContainerPair {{IEsSetParam}} + +-- ************************************************************** +-- +-- Container for Protocol Extensions +-- +-- ************************************************************** + +ProtocolExtensionContainer {S1AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= + SEQUENCE (SIZE (1..maxProtocolExtensions)) OF + ProtocolExtensionField {{ExtensionSetParam}} + +ProtocolExtensionField {S1AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= SEQUENCE { + id S1AP-PROTOCOL-EXTENSION.&id ({ExtensionSetParam}), + criticality S1AP-PROTOCOL-EXTENSION.&criticality ({ExtensionSetParam}{@id}), + extensionValue S1AP-PROTOCOL-EXTENSION.&Extension ({ExtensionSetParam}{@id}) +} + +-- ************************************************************** +-- +-- Container for Private IEs +-- +-- ************************************************************** + +PrivateIE-Container {S1AP-PRIVATE-IES : IEsSetParam } ::= + SEQUENCE (SIZE (1.. maxPrivateIEs)) OF + PrivateIE-Field {{IEsSetParam}} + +PrivateIE-Field {S1AP-PRIVATE-IES : IEsSetParam} ::= SEQUENCE { + id S1AP-PRIVATE-IES.&id ({IEsSetParam}), + criticality S1AP-PRIVATE-IES.&criticality ({IEsSetParam}{@id}), + value S1AP-PRIVATE-IES.&Value ({IEsSetParam}{@id}) +} + +END + +-- ************************************************************** +-- +-- IE definitions for the SON Transfer application +-- The IEs in this ASN.1 module shall be defined and encoded +-- using the same rules as applicable for the S1AP-IEs module. +-- +-- ************************************************************** +SonTransfer-IEs + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- +-- Generic IEs for the SON Transfer application +-- + +SONtransferApplicationIdentity ::= ENUMERATED { + cell-load-reporting, + ..., + multi-cell-load-reporting, + event-triggered-cell-load-reporting, + ho-reporting, + eutran-cell-activation, + energy-savings-indication, + failure-event-reporting +} + +SONtransferRequestContainer ::= CHOICE{ + cellLoadReporting NULL, + ..., + multiCellLoadReporting MultiCellLoadReportingRequest, + eventTriggeredCellLoadReporting EventTriggeredCellLoadReportingRequest, + hOReporting HOReport, + eutranCellActivation CellActivationRequest, + energySavingsIndication CellStateIndication, + failureEventReporting FailureEventReport +} + +SONtransferResponseContainer ::= CHOICE{ + cellLoadReporting CellLoadReportingResponse, + ..., + multiCellLoadReporting MultiCellLoadReportingResponse, + eventTriggeredCellLoadReporting EventTriggeredCellLoadReportingResponse, + hOReporting NULL, + eutranCellActivation CellActivationResponse, + energySavingsIndication NULL, + failureEventReporting NULL +} + +SONtransferCause ::= CHOICE { + cellLoadReporting CellLoadReportingCause, + ..., + multiCellLoadReporting CellLoadReportingCause, + eventTriggeredCellLoadReporting CellLoadReportingCause, + hOReporting HOReportingCause, + eutranCellActivation CellActivationCause, + energySavingsIndication CellStateIndicationCause, + failureEventReporting FailureEventReportingCause +} + + +CellLoadReportingCause ::= ENUMERATED { + application-container-syntax-error, + inconsistent-reporting-cell-identifier, + unspecified, + ... +} + +HOReportingCause ::= ENUMERATED { + application-container-syntax-error, + inconsistent-reporting-cell-identifier, + unspecified, + ... +} + +CellActivationCause ::= ENUMERATED { + application-container-syntax-error, + inconsistent-reporting-cell-identifier, + unspecified, + ... +} + +CellStateIndicationCause ::= ENUMERATED { + application-container-syntax-error, + inconsistent-reporting-cell-identifier, + unspecified, + ... +} + +FailureEventReportingCause ::= ENUMERATED { + application-container-syntax-error, + inconsistent-reporting-cell-identifier, + unspecified, + ... +} + +-- +-- IEs for Cell Load Reporting application +-- + +CellLoadReportingResponse::= CHOICE{ + eUTRAN EUTRANcellLoadReportingResponse, + uTRAN OCTET STRING, + gERAN OCTET STRING, + ..., + eHRPD EHRPDSectorLoadReportingResponse +} + +CompositeAvailableCapacityGroup ::= OCTET STRING + +EUTRANcellLoadReportingResponse ::= SEQUENCE { + compositeAvailableCapacityGroup CompositeAvailableCapacityGroup, + ... +} + +-- +-- IEs for Multi-Cell Load Reporting application +-- + +EUTRANResponse::= SEQUENCE { + cell-ID OCTET STRING, + eUTRANcellLoadReportingResponse EUTRANcellLoadReportingResponse, + ... +} + +EHRPD-Sector-ID ::= OCTET STRING (SIZE (16)) + +IRAT-Cell-ID ::= CHOICE{ + eUTRAN OCTET STRING, + uTRAN OCTET STRING, + gERAN OCTET STRING, + ..., + eHRPD EHRPD-Sector-ID +} + +RequestedCellList ::= SEQUENCE (SIZE(1.. maxnoofIRATReportingCells)) OF IRAT-Cell-ID + +MultiCellLoadReportingRequest::= SEQUENCE { + requestedCellList RequestedCellList, + ... +} + +ReportingCellList-Item ::= SEQUENCE { + cell-ID IRAT-Cell-ID, + ... +} + +ReportingCellList ::= SEQUENCE (SIZE(1.. maxnoofIRATReportingCells)) OF ReportingCellList-Item + +MultiCellLoadReportingResponse ::= SEQUENCE (SIZE(1.. maxnoofIRATReportingCells)) OF MultiCellLoadReportingResponse-Item + +MultiCellLoadReportingResponse-Item ::= CHOICE{ + eUTRANResponse EUTRANResponse, + uTRANResponse OCTET STRING, + gERANResponse OCTET STRING, + ..., + eHRPD EHRPDMultiSectorLoadReportingResponseItem +} + + +-- +-- IEs for Event-triggered Cell Load Reporting application +-- + +NumberOfMeasurementReportingLevels ::= ENUMERATED { + rl2, + rl3, + rl4, + rl5, + rl10, + ... +} + +EventTriggeredCellLoadReportingRequest ::= SEQUENCE { + numberOfMeasurementReportingLevels NumberOfMeasurementReportingLevels, + ... +} + +OverloadFlag ::= ENUMERATED { + overload, + ... +} + +EventTriggeredCellLoadReportingResponse ::= SEQUENCE { + cellLoadReportingResponse CellLoadReportingResponse, + overloadFlag OverloadFlag OPTIONAL, + ... +} + +-- +-- IEs for HO Reporting application +-- + + + +HOReport::= SEQUENCE { + hoType HoType, + hoReportType HoReportType, + hosourceID IRAT-Cell-ID, + hoTargetID IRAT-Cell-ID, + candidateCellList CandidateCellList, + ..., + candidatePCIList CandidatePCIList OPTIONAL +} + +HoType ::= ENUMERATED { + ltetoutran, + ltetogeran, + ... +} + +HoReportType ::= ENUMERATED { + unnecessaryhotoanotherrat, + ..., + earlyirathandover +} + +CandidateCellList ::= SEQUENCE (SIZE(1..maxnoofcandidateCells)) OF IRAT-Cell-ID + +CandidatePCIList ::= SEQUENCE (SIZE(1..maxnoofcandidateCells)) OF CandidatePCI + +CandidatePCI ::= SEQUENCE { + pCI INTEGER (0..503), + eARFCN OCTET STRING, + ... +} + +-- +-- IEs for E-UTRAN Cell Activation application +-- + +CellActivationRequest ::= SEQUENCE { + cellsToActivateList CellsToActivateList, + minimumActivationTime INTEGER (1..60) OPTIONAL, +... +} + +CellsToActivateList ::= SEQUENCE (SIZE(1.. maxnoofCellineNB)) OF CellsToActivateList-Item + +CellsToActivateList-Item ::= SEQUENCE { + cell-ID OCTET STRING, + ... +} + +CellActivationResponse ::= SEQUENCE { + activatedCellsList ActivatedCellsList, + ... +} + +ActivatedCellsList ::= SEQUENCE (SIZE(0.. maxnoofCellineNB)) OF ActivatedCellsList-Item + +ActivatedCellsList-Item ::= SEQUENCE { + cell-ID OCTET STRING, + ... +} + +-- +-- IEs for Energy Savings Indication application +-- + +CellStateIndication ::= SEQUENCE { + notificationCellList NotificationCellList, + ... +} + +NotificationCellList ::= SEQUENCE (SIZE(1.. maxnoofCellineNB)) OF NotificationCellList-Item + +NotificationCellList-Item ::= SEQUENCE { + cell-ID OCTET STRING, + notifyFlag NotifyFlag, + ... +} + +NotifyFlag ::= ENUMERATED { + activated, + deactivated, + ... +} + +FailureEventReport::= CHOICE { + tooEarlyInterRATHOReportFromEUTRAN TooEarlyInterRATHOReportReportFromEUTRAN, + ... +} + +TooEarlyInterRATHOReportReportFromEUTRAN ::= SEQUENCE { + uERLFReportContainer OCTET STRING, -- as defined in TS 36.331 [16] -- + mobilityInformation MobilityInformation OPTIONAL, + ... +} + +MobilityInformation ::= BIT STRING (SIZE(32)) + + +-- +-- IEs for reporting of eHRPD load +-- + +EHRPDCapacityValue ::= INTEGER (0..100) + +EHRPDSectorCapacityClassValue ::= INTEGER (1..100, ...) + +EHRPDSectorLoadReportingResponse ::= SEQUENCE { + dL-EHRPD-CompositeAvailableCapacity EHRPDCompositeAvailableCapacity, + uL-EHRPD-CompositeAvailableCapacity EHRPDCompositeAvailableCapacity, + ... +} + +EHRPDCompositeAvailableCapacity ::= SEQUENCE { + eHRPDSectorCapacityClassValue EHRPDSectorCapacityClassValue, + eHRPDCapacityValue EHRPDCapacityValue, + ... +} + +EHRPDMultiSectorLoadReportingResponseItem ::= SEQUENCE { + eHRPD-Sector-ID EHRPD-Sector-ID, + eHRPDSectorLoadReportingResponse EHRPDSectorLoadReportingResponse, + ... +} + + +-- ************************************************************** +-- +-- Constants +-- +-- ************************************************************** + +maxnoofIRATReportingCells INTEGER ::= 128 +maxnoofcandidateCells INTEGER ::= 16 +maxnoofCellineNB INTEGER ::= 256 + +END From d5cd9a31f9e00912feae461f7889c7e479b4f492 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 17 Oct 2018 16:19:31 +0200 Subject: [PATCH 331/379] CI: fixes and enhancements -- fix for IF4p5 TDD scenario (missing build test-case) -- added automatic UE/eNB termination in main.py when iperf/ping fails It allows to have a eNB log analysis for HTML reporting -- added statistics on PDCP out-of-resource messages -- added statistics on ULSCH error messages Signed-off-by: Raphael Defosseux --- ci-scripts/conf_files/rru.tdd.band40.conf | 2 +- ci-scripts/main.py | 60 +++++++++++++++---- ci-scripts/xml_files/if4p5_usrp210_band40.xml | 6 +- ci-scripts/xml_files/if4p5_usrp210_band7.xml | 2 +- 4 files changed, 53 insertions(+), 17 deletions(-) diff --git a/ci-scripts/conf_files/rru.tdd.band40.conf b/ci-scripts/conf_files/rru.tdd.band40.conf index ff5e13908e..775a2fbc67 100644 --- a/ci-scripts/conf_files/rru.tdd.band40.conf +++ b/ci-scripts/conf_files/rru.tdd.band40.conf @@ -13,7 +13,7 @@ RUs = ( nb_rx = 1; max_pdschReferenceSignalPower = -27; max_rxgain = 115; - bands = [7]; + bands = [40]; } ); diff --git a/ci-scripts/main.py b/ci-scripts/main.py index e845d0606d..dd7b871bec 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -384,7 +384,7 @@ class SSHConnection(): loopCounter = loopCounter - 1 if (loopCounter == 0): doLoop = False - logging.error('\u001B[1;37;41m eNB logging system did not show got sync! See with attach later \u001B[0m') + logging.error('\u001B[1;37;41m eNB logging system did not show got sync! \u001B[0m') self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'KO', ALL_PROCESSES_OK) self.CreateHtmlFooter() self.close() @@ -489,6 +489,7 @@ class SSHConnection(): pStatus = self.CheckProcessExist(initialize_eNB_flag) if (pStatus < 0): self.CreateHtmlTestRow('N/A', 'KO', pStatus) + self.AutoTerminateUEandeNB() self.CreateHtmlFooter() sys.exit(1) multi_jobs = [] @@ -505,6 +506,7 @@ class SSHConnection(): if (status_queue.empty()): self.CreateHtmlTestRow('N/A', 'KO', ALL_PROCESSES_OK) self.CreateHtmlFooter() + self.AutoTerminateUEandeNB() sys.exit(1) else: attach_status = True @@ -524,6 +526,7 @@ class SSHConnection(): self.CreateHtmlTestRowQueue('N/A', 'OK', len(self.UEDevices), html_queue) else: self.CreateHtmlTestRowQueue('N/A', 'KO', len(self.UEDevices), html_queue) + self.AutoTerminateUEandeNB() self.CreateHtmlFooter() sys.exit(1) @@ -544,6 +547,7 @@ class SSHConnection(): pStatus = self.CheckProcessExist(initialize_eNB_flag) if (pStatus < 0): self.CreateHtmlTestRow('N/A', 'KO', pStatus) + self.AutoTerminateUEandeNB() self.CreateHtmlFooter() sys.exit(1) multi_jobs = [] @@ -765,6 +769,7 @@ class SSHConnection(): if (status_queue.empty()): self.CreateHtmlTestRow(self.ping_args, 'KO', ALL_PROCESSES_OK) + self.AutoTerminateUEandeNB() self.CreateHtmlFooter() sys.exit(1) else: @@ -783,6 +788,7 @@ class SSHConnection(): self.CreateHtmlTestRowQueue(self.ping_args, 'OK', len(self.UEDevices), html_queue) else: self.CreateHtmlTestRowQueue(self.ping_args, 'KO', len(self.UEDevices), html_queue) + self.AutoTerminateUEandeNB() self.CreateHtmlFooter() sys.exit(1) @@ -1217,11 +1223,13 @@ class SSHConnection(): pStatus = self.CheckProcessExist(initialize_eNB_flag) if (pStatus < 0): self.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus) + self.AutoTerminateUEandeNB() self.CreateHtmlFooter() sys.exit(1) ueIpStatus = self.GetAllUEIPAddresses() if (ueIpStatus < 0): self.CreateHtmlTestRow(self.iperf_args, 'KO', UE_IP_ADDRESS_ISSUE) + self.AutoTerminateUEandeNB() self.CreateHtmlFooter() sys.exit(1) multi_jobs = [] @@ -1241,6 +1249,7 @@ class SSHConnection(): if (status_queue.empty()): self.CreateHtmlTestRow(self.iperf_args, 'KO', ALL_PROCESSES_OK) + self.AutoTerminateUEandeNB() self.CreateHtmlFooter() sys.exit(1) else: @@ -1264,6 +1273,7 @@ class SSHConnection(): self.CreateHtmlTestRowQueue(self.iperf_args, 'OK', len(self.UEDevices), html_queue) else: self.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue) + self.AutoTerminateUEandeNB() self.CreateHtmlFooter() sys.exit(1) @@ -1391,6 +1401,8 @@ class SSHConnection(): rrcReestablishComplete = 0 rrcReestablishReject = 0 uciStatMsgCount = 0 + pdcpFailure = 0 + ulschFailure = 0 for line in enb_log_file.readlines(): result = re.search('[Ss]egmentation [Ff]ault', str(line)) if result is not None: @@ -1434,12 +1446,25 @@ class SSHConnection(): result = re.search('uci->stat', str(line)) if result is not None: uciStatMsgCount += 1 + result = re.search('PDCP.*Out of Resources.*reason', str(line)) + if result is not None: + pdcpFailure += 1 + result = re.search('ULSCH in error in round', str(line)) + if result is not None: + ulschFailure += 1 enb_log_file.close() self.htmleNBFailureMsg = '' if uciStatMsgCount > 0: - statMsg = 'eNB showed ' + str(uciStatMsgCount) + ' uci->stat message(s)' + statMsg = 'eNB showed ' + str(uciStatMsgCount) + ' "uci->stat" message(s)' logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') self.htmleNBFailureMsg += statMsg + '\n' + if pdcpFailure > 0: + statMsg = 'eNB showed ' + str(pdcpFailure) + ' "PDCP Out of Resources" message(s)' + logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') + self.htmleNBFailureMsg += statMsg + '\n' + if ulschFailure > 0: + statMsg = 'eNB showed ' + str(ulschFailure) + ' "ULSCH in error in round" message(s)' + logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') if rrcSetupRequest > 0 or rrcSetupComplete > 0: rrcMsg = 'eNB requested ' + str(rrcSetupRequest) + ' RRC Connection Setup(s)' logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m') @@ -1586,6 +1611,17 @@ class SSHConnection(): job.join() self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK) + def AutoTerminateUEandeNB(self): + self.testCase_id = 'AUTO-KILL-UE' + self.desc = 'Automatic Termination of UE' + self.ShowTestID() + self.TerminateUE() + self.testCase_id = 'AUTO-KILL-eNB' + self.desc = 'Automatic Termination of eNB' + self.ShowTestID() + self.eNB_instance = '0' + self.TerminateeNB() + def LogCollectBuild(self): self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword) self.command('cd ' + self.eNBSourceCodePath, '\$', 5) @@ -1822,6 +1858,15 @@ class SSHConnection(): i += 1 self.htmlFile.write(' \n') +#----------------------------------------------------------- +# ShowTestID() +#----------------------------------------------------------- + def ShowTestID(self): + logging.debug('\u001B[1m----------------------------------------\u001B[0m') + logging.debug('\u001B[1mTest ID:' + self.testCase_id + '\u001B[0m') + logging.debug('\u001B[1m' + self.desc + '\u001B[0m') + logging.debug('\u001B[1m----------------------------------------\u001B[0m') + #----------------------------------------------------------- # Usage() #----------------------------------------------------------- @@ -1853,15 +1898,6 @@ def Usage(): print(' --XMLTestFile=[XML Test File to be run]') print('------------------------------------------------------------') -#----------------------------------------------------------- -# ShowTestID() -#----------------------------------------------------------- -def ShowTestID(): - logging.debug('\u001B[1m----------------------------------------\u001B[0m') - logging.debug('\u001B[1mTest ID:' + SSH.testCase_id + '\u001B[0m') - logging.debug('\u001B[1m' + SSH.desc + '\u001B[0m') - logging.debug('\u001B[1m----------------------------------------\u001B[0m') - def CheckClassValidity(action,id): if action != 'Build_eNB' and action != 'Initialize_eNB' and action != 'Terminate_eNB' and action != 'Initialize_UE' and action != 'Terminate_UE' and action != 'Attach_UE' and action != 'Detach_UE' and action != 'Ping' and action != 'Iperf' and action != 'Reboot_UE' and action != 'Initialize_HSS' and action != 'Terminate_HSS' and action != 'Initialize_MME' and action != 'Terminate_MME' and action != 'Initialize_SPGW' and action != 'Terminate_SPGW': logging.debug('ERROR: test-case ' + id + ' has wrong class ' + action) @@ -2118,7 +2154,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE): action = test.findtext('class') if (CheckClassValidity(action, id) == False): continue - ShowTestID() + SSH.ShowTestID() GetParametersFromXML(action) if action == 'Initialize_UE' or action == 'Attach_UE' or action == 'Detach_UE' or action == 'Ping' or action == 'Iperf' or action == 'Reboot_UE': terminate_ue_flag = False diff --git a/ci-scripts/xml_files/if4p5_usrp210_band40.xml b/ci-scripts/xml_files/if4p5_usrp210_band40.xml index aa668f801d..9c1b721bef 100644 --- a/ci-scripts/xml_files/if4p5_usrp210_band40.xml +++ b/ci-scripts/xml_files/if4p5_usrp210_band40.xml @@ -22,14 +22,14 @@ --> - + + 010101 050101 060101 070101 040101 030104 030105 040301 040501 040602 040401 040201 030201 030202 050201 060201 070201 pdcch_vars[eNB_id]->rxdataF_comp Nothing to do here. TO BE REMOVED!!!\n"); - #endif - //pdcch_siso(frame_parms, pdcch_vars[eNB_id]->rxdataF_comp,s); - } else pdcch_alamouti(frame_parms, pdcch_vars[eNB_id]->rxdataF_comp,s); #ifdef MU_RECEIVER diff --git a/targets/RT/USER/nr-ue.c b/targets/RT/USER/nr-ue.c index ee1b7c20b6..3453fb7164 100644 --- a/targets/RT/USER/nr-ue.c +++ b/targets/RT/USER/nr-ue.c @@ -492,7 +492,7 @@ static void *UE_thread_synch(void *arg) { //UE->rfdevice.trx_set_gains_func(&openair0,&openair0_cfg[0]); //UE->rfdevice.trx_stop_func(&UE->rfdevice); // sleep(1); - nr_init_frame_parms_ue(&UE->frame_parms); + //nr_init_frame_parms_ue(&UE->frame_parms); /*if (UE->rfdevice.trx_start_func(&UE->rfdevice) != 0 ) { LOG_E(HW,"Could not start the device\n"); oai_exit=1; diff --git a/targets/RT/USER/nr-uesoftmodem.c b/targets/RT/USER/nr-uesoftmodem.c index baa996980c..806eed44d5 100644 --- a/targets/RT/USER/nr-uesoftmodem.c +++ b/targets/RT/USER/nr-uesoftmodem.c @@ -491,7 +491,7 @@ void *l2l1_task(void *arg) { } #endif -extern int16_t dlsch_demod_shift; +int16_t dlsch_demod_shift; static void get_options(void) { int CC_id; From 5b939f68f3b10438fa6ae109c6b6d42ea2f64f36 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Fri, 26 Oct 2018 11:34:37 -0700 Subject: [PATCH 353/379] fixing autotests for nr_pbchsim --- cmake_targets/autotests/test_case_list.xml | 2 +- cmake_targets/build_oai | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index 4b40b3a6eb..3b7fb1ed15 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -1055,7 +1055,7 @@ -s-11 -S-10 -n1000 -s-11 -S-10 -n10 -I nr_pbchsim.test1 - n_errors (negative CRC) = 0 + n_errors \(negative CRC\) = 0 segmentation fault|assertion|exiting|fatal 3 diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 9c90166e52..47ea66b773 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -684,7 +684,7 @@ function main() { echo_info "Compiling unitary tests simulators" # TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim #simlist="dlsim_tm4 dlsim ulsim pucchsim prachsim pdcchsim pbchsim mbmssim" - simlist="dlsim ulsim polartest ldpctest" + simlist="dlsim ulsim polartest ldpctest nr_pbchsim" for f in $simlist ; do compilations \ phy_simulators $f \ From 20c1746666b84acedb07c6434e2982d1818f3ad5 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Fri, 26 Oct 2018 12:55:17 -0700 Subject: [PATCH 354/379] fixing linking order of nr_pbchsim --- cmake_targets/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 6d6d9ffbbf..2e30fe672a 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -2536,7 +2536,7 @@ add_executable(ldpctest ${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/ldpctest.c) target_link_libraries(ldpctest SIMU PHY PHY_NR m ${ATLAS_LIBRARIES}) add_executable(nr_pbchsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c ) -target_link_libraries(nr_pbchsim -Wl,--start-group UTIL SIMU PHY PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB ${CONFIG_LIBRARIES} -Wl,--end-group m pthread dl ${ATLAS_LIBRARIES}) +target_link_libraries(nr_pbchsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} dl) foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim) From 6d1aae61a85d3f19c3cfc20d58caec1e9c9dae7a Mon Sep 17 00:00:00 2001 From: "Wolfgang A. Mozart" Date: Sat, 27 Oct 2018 15:26:36 +0200 Subject: [PATCH 355/379] adding support for USRP to nr-uesoftmodem --- targets/RT/USER/nr-uesoftmodem.c | 112 ++++++++++++++++++------------- targets/RT/USER/nr-uesoftmodem.h | 5 ++ 2 files changed, 72 insertions(+), 45 deletions(-) diff --git a/targets/RT/USER/nr-uesoftmodem.c b/targets/RT/USER/nr-uesoftmodem.c index e4ffe4a748..f6b47d29c4 100644 --- a/targets/RT/USER/nr-uesoftmodem.c +++ b/targets/RT/USER/nr-uesoftmodem.c @@ -247,6 +247,9 @@ int emulate_rf = 0; threads_t threads= {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1}; +char* usrp_args=NULL; +char* usrp_clksrc=NULL; + /* forward declarations */ void set_default_frame_parms(NR_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]); @@ -742,51 +745,70 @@ void init_openair0() { openair0_cfg[card].rx_bw = 1.5e6; } - if (frame_parms[0]->frame_type==TDD) - openair0_cfg[card].duplex_mode = duplex_mode_TDD; - else //FDD - openair0_cfg[card].duplex_mode = duplex_mode_FDD; + if (frame_parms[0]->frame_type==TDD) + openair0_cfg[card].duplex_mode = duplex_mode_TDD; + else //FDD + openair0_cfg[card].duplex_mode = duplex_mode_FDD; + + printf("HW: Configuring card %d, nb_antennas_tx/rx %d/%d\n",card, + PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_tx, + PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx); + openair0_cfg[card].Mod_id = 0; + + openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL; + + openair0_cfg[card].clock_source = clock_source; + + + openair0_cfg[card].tx_num_channels=min(2,PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_tx); + openair0_cfg[card].rx_num_channels=min(2,PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx); - printf("HW: Configuring card %d, nb_antennas_tx/rx %d/%d\n",card, - PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_tx, - PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx); - openair0_cfg[card].Mod_id = 0; - - openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL; - - openair0_cfg[card].clock_source = clock_source; - - - openair0_cfg[card].tx_num_channels=min(2,PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_tx); - openair0_cfg[card].rx_num_channels=min(2,PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx); - - for (i=0; i<4; i++) { - - if (irx_total_gain_dB - rx_gain_off; - - - openair0_cfg[card].configFilename = rf_config_file; - printf("Card %d, channel %d, Setting tx_gain %f, rx_gain %f, tx_freq %f, rx_freq %f\n", - card,i, openair0_cfg[card].tx_gain[i], - openair0_cfg[card].rx_gain[i], - openair0_cfg[card].tx_freq[i], - openair0_cfg[card].rx_freq[i]); - } - - - } + for (i=0; i<4; i++) { + + if (irx_total_gain_dB - rx_gain_off; + + + openair0_cfg[card].configFilename = rf_config_file; + printf("Card %d, channel %d, Setting tx_gain %f, rx_gain %f, tx_freq %f, rx_freq %f\n", + card,i, openair0_cfg[card].tx_gain[i], + openair0_cfg[card].rx_gain[i], + openair0_cfg[card].tx_freq[i], + openair0_cfg[card].rx_freq[i]); + } + + if (usrp_args) openair0_cfg[card].sdr_addrs = usrp_args; + if (usrp_clksrc) { + if (strcmp(usrp_clksrc, "internal") == 0) { + openair0_cfg[card].clock_source = internal; + LOG_D(PHY, "USRP clock source set as internal\n"); + } else if (strcmp(usrp_clksrc, "external") == 0) { + openair0_cfg[card].clock_source = external; + LOG_D(PHY, "USRP clock source set as external\n"); + } else if (strcmp(usrp_clksrc, "gpsdo") == 0) { + openair0_cfg[card].clock_source = gpsdo; + LOG_D(PHY, "USRP clock source set as gpsdo\n"); + } else { + openair0_cfg[card].clock_source = internal; + LOG_I(PHY, "USRP clock source unknown ('%s'). defaulting to internal\n", usrp_clksrc); + } + } else { + openair0_cfg[card].clock_source = internal; + LOG_I(PHY, "USRP clock source not specified. defaulting to internal\n"); + } + + } } int main( int argc, char **argv ) { @@ -837,7 +859,7 @@ int main( int argc, char **argv ) { #endif // initialize the log (see log.h for details) - set_glog(LOG_DEBUG); + set_glog(OAILOG_DEBUG); set_log(HW, OAILOG_DEBUG); set_log(PHY, OAILOG_DEBUG); diff --git a/targets/RT/USER/nr-uesoftmodem.h b/targets/RT/USER/nr-uesoftmodem.h index 2abdae22ea..90887fe128 100644 --- a/targets/RT/USER/nr-uesoftmodem.h +++ b/targets/RT/USER/nr-uesoftmodem.h @@ -91,6 +91,9 @@ #define CONFIG_HLP_DISABLNBIOT "disable nb-iot, even if defined in config\n" +#define CONFIG_HLP_USRP_ARGS "set the arguments to identify USRP (same syntax as in UHD)\n" +#define CONFIG_HLP_USRP_CLK_SRC "USRP clock source: 'internal' or 'external'\n" + /***************************************************************************************************************************************/ /* command line options definitions, CMDLINE_XXXX_DESC macros are used to initialize paramdef_t arrays which are then used as argument when calling config_get or config_getlist functions */ @@ -135,6 +138,8 @@ {"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, TYPE_INT, 0}, \ {"r" , CONFIG_HLP_PRB, 0, u8ptr:&(frame_parms[0]->N_RB_DL), defintval:25, TYPE_UINT8, 0}, \ {"dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \ +{"usrp-args", CONFIG_HLP_USRP_ARGS, 0, strptr:(char **)&usrp_args, defstrval:"type=b200", TYPE_STRING, 0}, \ +{"usrp-clksrc", CONFIG_HLP_USRP_CLK_SRC,0, strptr:(char **)&usrp_clksrc, defstrval:"internal", TYPE_STRING, 0} \ } #define DEFAULT_DLF 2680000000 From 6ef81eea660a091d48ad42201139efbbd769124c Mon Sep 17 00:00:00 2001 From: "Wolfgang A. Mozart" Date: Sat, 27 Oct 2018 16:35:04 +0200 Subject: [PATCH 356/379] removing reference to uesoftmodem from load_configmodule (don't understand why this dependence is there in fist place. Also makes unitary sims break) --- common/config/config_load_configmodule.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/common/config/config_load_configmodule.c b/common/config/config_load_configmodule.c index 2c6700c73e..a41f395edd 100644 --- a/common/config/config_load_configmodule.c +++ b/common/config/config_load_configmodule.c @@ -201,13 +201,9 @@ int i; /* default */ if (cfgparam == NULL) { - tmpflags = tmpflags | CONFIG_NOOOPT; - if (strstr(argv[0],"uesoftmodem") == NULL) { - cfgparam = CONFIG_LIBCONFIGFILE ":" DEFAULT_CFGFILENAME; - } else { - cfgparam = CONFIG_CMDLINEONLY ":dbgl0" ; - } - } + tmpflags = tmpflags | CONFIG_NOOOPT; + cfgparam = CONFIG_CMDLINEONLY ":dbgl0" ; + } /* parse the config parameters to set the config source */ i = sscanf(cfgparam,"%m[^':']:%ms",&cfgmode,&modeparams); From 3545e1394700ea31a573acd4c893c2f176d60096 Mon Sep 17 00:00:00 2001 From: "Wolfgang A. Mozart" Date: Sat, 27 Oct 2018 16:43:35 +0200 Subject: [PATCH 357/379] removing dependence on nr from dlsim --- openair1/SIMULATION/LTE_PHY/dlsim.c | 1 - openair1/SIMULATION/LTE_PHY/dummy_functions.c | 27 ------------------- 2 files changed, 28 deletions(-) diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index 0d04a2b73c..7365ade466 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -40,7 +40,6 @@ #include "PHY/types.h" #include "PHY/defs_eNB.h" #include "PHY/defs_UE.h" -#include "PHY/defs_nr_UE.h" #include "PHY/phy_vars.h" #include "SCHED/sched_eNB.h" diff --git a/openair1/SIMULATION/LTE_PHY/dummy_functions.c b/openair1/SIMULATION/LTE_PHY/dummy_functions.c index ee11233ba2..0bbec0e4b0 100644 --- a/openair1/SIMULATION/LTE_PHY/dummy_functions.c +++ b/openair1/SIMULATION/LTE_PHY/dummy_functions.c @@ -92,30 +92,3 @@ int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { return(0 int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { return(0); } -int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, - uint8_t eNB_id, - uint8_t eNB_offset, - unsigned char Ns, - unsigned char p, - unsigned char l, - unsigned char symbol, - unsigned short bwp_start_subcarrier, - unsigned short nb_rb_pdsch) {return(0);} - -int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, - uint8_t eNB_id, - uint8_t eNB_offset, - unsigned char Ns, - unsigned char p, - unsigned char l, - unsigned char symbol) {return(0);} - -int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, - uint8_t eNB_id, - uint8_t eNB_offset, - unsigned char Ns, - unsigned char p, - unsigned char l, - unsigned char symbol, - unsigned short coreset_start_subcarrier, - unsigned short nb_rb_coreset) {return(0);} From 411d0d6ef08cd15b42a78efa0a07a68e7495682b Mon Sep 17 00:00:00 2001 From: "Wolfgang A. Mozart" Date: Sat, 27 Oct 2018 18:02:17 +0200 Subject: [PATCH 358/379] fixing lots of warnings, but nr-uesoftmodem still crashes --- common/utils/LOG/log.c | 2 +- openair1/PHY/CODING/coding_defs.h | 3 +-- .../CODING/nrPolar_tools/nr_polar_decoder.c | 2 +- .../PHY/CODING/nrPolar_tools/nr_polar_defs.h | 8 +++++++ .../nr_polar_kronecker_power_matrices.c | 22 +++++++++---------- openair1/PHY/CODING/nr_compute_tbs.c | 2 +- openair1/PHY/CODING/nr_segmentation.c | 2 +- openair1/PHY/INIT/nr_parms.c | 2 +- openair1/PHY/LTE_TRANSPORT/transport_proto.h | 5 +++++ openair1/PHY/NR_TRANSPORT/nr_dci.c | 2 +- openair1/PHY/NR_TRANSPORT/nr_pbch.c | 2 +- .../nr_dl_channel_estimation.c | 2 +- openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 10 +++------ openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c | 6 ++--- .../NR_UE_TRANSPORT/nr_transport_proto_ue.h | 4 +++- openair1/PHY/TOOLS/time_meas.h | 3 ++- openair1/PHY/TOOLS/tools_defs.h | 2 ++ openair1/SCHED_NR/phy_procedures_nr_gNB.c | 4 +--- openair1/SIMULATION/NR_PHY/pbchsim.c | 17 +++++++++----- 19 files changed, 57 insertions(+), 43 deletions(-) diff --git a/common/utils/LOG/log.c b/common/utils/LOG/log.c index d6dd97e34f..a92bdf11e4 100644 --- a/common/utils/LOG/log.c +++ b/common/utils/LOG/log.c @@ -468,7 +468,7 @@ return snprintf(log_buffer, buffsize , "%s%s[%s]%c %s %s%s", void logRecord_mt(const char *file, const char *func, int line, int comp, int level, const char* format, ... ) { - char log_buffer[MAX_LOG_TOTAL]; + char log_buffer[MAX_LOG_TOTAL]={0}; va_list args; va_start(args, format); diff --git a/openair1/PHY/CODING/coding_defs.h b/openair1/PHY/CODING/coding_defs.h index daadac366c..1842762cd1 100644 --- a/openair1/PHY/CODING/coding_defs.h +++ b/openair1/PHY/CODING/coding_defs.h @@ -436,8 +436,7 @@ int32_t rate_matching_lte(uint32_t N_coded, uint8_t *inPtr, uint32_t off); - - +void crcTableInit (void); unsigned int crcbit (unsigned char * inputptr, int octetlen, unsigned int poly); diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c index 776cfbbae2..2c9f8ad985 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c @@ -1080,6 +1080,6 @@ int8_t polar_decoder_int16(int16_t *input, } // pack into ceil(payloadBits/32) 32 bit words, lowest index in MSB // nr_byte2bit_uint8_32_t(polarParams->nr_polar_A, polarParams->payloadBits, out); - nr_byte2bit_uint8_32_t(polarParams->nr_polar_B, polarParams->payloadBits, out); + nr_byte2bit_uint8_32_t(polarParams->nr_polar_B, polarParams->payloadBits, (unsigned int *)out); return(0); } diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h index 6d145741b2..30584c7ddc 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h @@ -290,6 +290,9 @@ void nr_free_double_3D_array(double ***input, uint16_t xlen, uint16_t ylen); +void nr_free_double_2D_array(double **input, uint16_t xlen); + + void updateLLR(double ***llr, uint8_t **llrU, uint8_t ***bit, @@ -370,4 +373,9 @@ static inline void nr_polar_deinterleaver(uint8_t *input, } } +void build_decoder_tree(t_nrPolar_params *pp); + +int8_t polar_decoder_int16(int16_t *input, + uint8_t *out, + t_nrPolar_params *polarParams); #endif diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_kronecker_power_matrices.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_kronecker_power_matrices.c index 09892cb791..b0e976c88b 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_kronecker_power_matrices.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_kronecker_power_matrices.c @@ -32,15 +32,15 @@ #include "PHY/CODING/nrPolar_tools/nr_polar_defs.h" -uint8_t (*const(G_N_1[])) = { +uint8_t (*(G_N_1[])) = { (uint8_t[]){ 1, 0 }, (uint8_t[]){ 1, 1 }}; -uint8_t (*const(G_N_2[])) = { +uint8_t (*(G_N_2[])) = { (uint8_t[]){ 1, 0, 0, 0 }, (uint8_t[]){ 1, 1, 0, 0 }, (uint8_t[]){ 1, 0, 1, 0 }, (uint8_t[]){ 1, 1, 1, 1 }}; -uint8_t (*const(G_N_3[])) = { +uint8_t (*(G_N_3[])) = { (uint8_t[]){ 1, 0, 0, 0, 0, 0, 0, 0 }, (uint8_t[]){ 1, 1, 0, 0, 0, 0, 0, 0 }, (uint8_t[]){ 1, 0, 1, 0, 0, 0, 0, 0 }, @@ -49,7 +49,7 @@ uint8_t (*const(G_N_3[])) = { (uint8_t[]){ 1, 1, 0, 0, 1, 1, 0, 0 }, (uint8_t[]){ 1, 0, 1, 0, 1, 0, 1, 0 }, (uint8_t[]){ 1, 1, 1, 1, 1, 1, 1, 1 }}; -uint8_t (*const(G_N_4[])) = { +uint8_t (*(G_N_4[])) = { (uint8_t[]){ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, (uint8_t[]){ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, (uint8_t[]){ 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, @@ -66,7 +66,7 @@ uint8_t (*const(G_N_4[])) = { (uint8_t[]){ 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0 }, (uint8_t[]){ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 }, (uint8_t[]){ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }}; -uint8_t (*const(G_N_5[])) = { +uint8_t (*(G_N_5[])) = { (uint8_t[]){ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, (uint8_t[]){ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, (uint8_t[]){ 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, @@ -99,7 +99,7 @@ uint8_t (*const(G_N_5[])) = { (uint8_t[]){ 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0 }, (uint8_t[]){ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 }, (uint8_t[]){ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }}; -uint8_t (*const(G_N_6[])) = { +uint8_t (*(G_N_6[])) = { (uint8_t[]){ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, (uint8_t[]){ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, (uint8_t[]){ 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, @@ -164,7 +164,7 @@ uint8_t (*const(G_N_6[])) = { (uint8_t[]){ 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0 }, (uint8_t[]){ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 }, (uint8_t[]){ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }}; -uint8_t (*const(G_N_7[])) = { +uint8_t (*(G_N_7[])) = { (uint8_t[]){ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, (uint8_t[]){ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, (uint8_t[]){ 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, @@ -293,7 +293,7 @@ uint8_t (*const(G_N_7[])) = { (uint8_t[]){ 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0 }, (uint8_t[]){ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 }, (uint8_t[]){ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }}; -uint8_t (*const(G_N_8[])) = { +uint8_t (*(G_N_8[])) = { (uint8_t[]){ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, (uint8_t[]){ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, (uint8_t[]){ 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, @@ -550,7 +550,7 @@ uint8_t (*const(G_N_8[])) = { (uint8_t[]){ 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0 }, (uint8_t[]){ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 }, (uint8_t[]){ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }}; -uint8_t (*const(G_N_9[])) = { +uint8_t (*(G_N_9[])) = { (uint8_t[]){ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, (uint8_t[]){ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, (uint8_t[]){ 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, @@ -1063,7 +1063,7 @@ uint8_t (*const(G_N_9[])) = { (uint8_t[]){ 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0 }, (uint8_t[]){ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 }, (uint8_t[]){ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }}; -uint8_t (*const(G_N_10[])) = { +uint8_t (*(G_N_10[])) = { (uint8_t[]){ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, (uint8_t[]){ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, (uint8_t[]){ 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, @@ -2089,7 +2089,7 @@ uint8_t (*const(G_N_10[])) = { (uint8_t[]){ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 }, (uint8_t[]){ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }}; -uint8_t (*const(*const(G_N[]))) = {NULL,G_N_1,G_N_2,G_N_3,G_N_4,G_N_5,G_N_6,G_N_7,G_N_8,G_N_9,G_N_10}; +uint8_t** G_N[] = {NULL,G_N_1,G_N_2,G_N_3,G_N_4,G_N_5,G_N_6,G_N_7,G_N_8,G_N_9,G_N_10}; uint8_t** nr_polar_kronecker_power_matrices(uint8_t n){ return G_N[n]; diff --git a/openair1/PHY/CODING/nr_compute_tbs.c b/openair1/PHY/CODING/nr_compute_tbs.c index ddb82fed04..4db253f56a 100644 --- a/openair1/PHY/CODING/nr_compute_tbs.c +++ b/openair1/PHY/CODING/nr_compute_tbs.c @@ -68,7 +68,7 @@ uint32_t nr_compute_tbs(uint8_t mcs, uint8_t Nl) { uint16_t nbp_re, nb_re, nb_dmrs_prb, nb_rb_oh, Ninfo,Np_info,n,Qm,R,C; - uint32_t nr_tbs; + uint32_t nr_tbs=0; nb_rb_oh = 0; //set to 0 if not configured by higher layer Qm = Mcsindextable1[mcs][0]; diff --git a/openair1/PHY/CODING/nr_segmentation.c b/openair1/PHY/CODING/nr_segmentation.c index ad2e809815..83f7d045f9 100644 --- a/openair1/PHY/CODING/nr_segmentation.c +++ b/openair1/PHY/CODING/nr_segmentation.c @@ -39,7 +39,7 @@ int32_t nr_segmentation(unsigned char *input_buffer, unsigned int *F) { - unsigned int L,Bprime,Bprime_by_C,Z,r,Kb,k,s,crc,Kprime; + unsigned int L,Bprime,Bprime_by_C,Z,r,Kb,k,s,Kprime; if (B<=8448) { L=0; diff --git a/openair1/PHY/INIT/nr_parms.c b/openair1/PHY/INIT/nr_parms.c index d114f0ef60..2692f2d67b 100644 --- a/openair1/PHY/INIT/nr_parms.c +++ b/openair1/PHY/INIT/nr_parms.c @@ -176,7 +176,7 @@ int nr_init_frame_parms0( int nr_init_frame_parms(nfapi_nr_config_request_t* config, NR_DL_FRAME_PARMS *fp) { - nr_init_frame_parms0(fp, + return nr_init_frame_parms0(fp, config->subframe_config.numerology_index_mu.value, config->subframe_config.dl_cyclic_prefix_type.value); } diff --git a/openair1/PHY/LTE_TRANSPORT/transport_proto.h b/openair1/PHY/LTE_TRANSPORT/transport_proto.h index 37ac335d02..9784a83311 100644 --- a/openair1/PHY/LTE_TRANSPORT/transport_proto.h +++ b/openair1/PHY/LTE_TRANSPORT/transport_proto.h @@ -618,5 +618,10 @@ int16_t find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type); int16_t find_uci(uint16_t rnti, int frame, int subframe, PHY_VARS_eNB *eNB,find_type_t type); +uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,lte_frame_type_t frame_type); + +uint32_t lte_gold_generic(uint32_t *x1, uint32_t *x2, uint8_t reset); + + /**@}*/ #endif diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci.c b/openair1/PHY/NR_TRANSPORT/nr_dci.c index 0224d821dc..12f313aee9 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci.c @@ -159,7 +159,7 @@ void nr_pdcch_scrambling(uint32_t *in, } uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars, - t_nrPolar_paramsPtr *nrPolar_params, + t_nrPolar_paramsPtr *nrPolar_params, uint32_t **gold_pdcch_dmrs, int32_t** txdataF, int16_t amp, diff --git a/openair1/PHY/NR_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_TRANSPORT/nr_pbch.c index 99a243e0ae..19765aa477 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_pbch.c @@ -265,7 +265,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch, #endif // Payload interleaving - uint32_t in=0, out=0; + uint32_t in=0; for (int i=0; i>3; i++) in |= (uint32_t)(pbch->pbch_a[i]<<((3-i)<<3)); diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c index 27b11bba7d..ce4f8d4d01 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -491,7 +491,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, // generate pilot - nr_pdsch_dmrs_rx(ue,eNB_offset,Ns,ue->nr_gold_pdsch[eNB_offset][Ns][symbol], &pilot[0],1000,1,nb_rb_pdsch); + nr_pdsch_dmrs_rx(ue,eNB_offset,Ns,ue->nr_gold_pdsch, &pilot[0],1000,1,nb_rb_pdsch); for (aarx=0; aarxframe_parms.nb_antennas_rx; aarx++) { diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index abf7856dbc..78f793ec17 100755 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -34,14 +34,10 @@ #include #include #endif -//#include "PHY/defs.h" -#include "PHY/defs_nr_UE.h" +#include "nr_transport_proto_ue.h" #include "PHY/CODING/nrPolar_tools/nr_polar_dci_defs.h" #include "PHY/phy_extern_nr_ue.h" #include "PHY/CODING/coding_extern.h" -//#include "PHY/extern.h" -//#include "SCHED/defs.h" -//#include "SIMULATION/TOOLS/defs.h" // for taus #include "PHY/sse_intrin.h" #include "assertions.h" @@ -53,7 +49,7 @@ //#define NR_LTE_PDCCH_DCI_SWITCH #define NR_PDCCH_DCI_RUN // activates new nr functions -#define NR_PDCCH_DCI_DEBUG // activates NR_PDCCH_DCI_DEBUG logs +//#define NR_PDCCH_DCI_DEBUG // activates NR_PDCCH_DCI_DEBUG logs #define NR_NBR_CORESET_ACT_BWP 3 // The number of CoreSets per BWP is limited to 3 (including initial CORESET: ControlResourceId 0) #define NR_NBR_SEARCHSPACE_ACT_BWP 10 // The number of SearSpaces per BWP is limited to 10 (including initial SEARCHSPACE: SearchSpaceId 0) #define PDCCH_TEST_POLAR_TEMP_FIX @@ -1191,7 +1187,7 @@ if (do_common){ //uint32_t puissance_2_16 = ((1<<16)*n_rnti)+n_id; //uint32_t puissance_2_31= (1<<30)*2; //uint32_t calc_x2=puissance_2_16%puissance_2_31; - x2 = (((1<<16)*n_rnti)+n_id)%((1<<30)*2); //this is c_init in 38.211 v15.1.0 Section 7.3.2.3 + x2 = (((1<<16)*n_rnti)+n_id); //mod 2^31 is implicit //this is c_init in 38.211 v15.1.0 Section 7.3.2.3 // x2 = (nr_tti_rx << 9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.8.2 #ifndef NR_PDCCH_DCI_DEBUG printf("\t\t<-NR_PDCCH_DCI_DEBUG (nr_pdcch_unscrambling)-> (c_init=%d, n_id=%d, n_rnti=%d, length=%d)\n",x2,n_id,n_rnti,length); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c index 747f3de769..d30b5badf3 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c @@ -274,7 +274,7 @@ void nr_pbch_channel_compensation(int **rxdataF_ext, { short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1}; - short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1}; + //short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1}; #if defined(__x86_64__) || defined(__i386__) __m128i mmtmpP0,mmtmpP1,mmtmpP2,mmtmpP3; #elif defined(__arm__) @@ -441,8 +441,6 @@ void nr_pbch_unscrambling(NR_UE_PBCH *pbch, uint8_t reset, offset; uint32_t x1, x2, s=0; int16_t *demod_pbch_e = pbch->llr; - uint32_t *pbch_a_prime = (uint32_t*)pbch->pbch_a_prime; - uint32_t *pbch_a_interleaved = (uint32_t*)pbch->pbch_a_interleaved; uint32_t unscrambling_mask = 0x100006D; @@ -660,7 +658,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, t_nrPolar_params *currentPtr = nr_polar_params(ue->nrPolar_params, NR_POLAR_PBCH_MESSAGE_TYPE, NR_POLAR_PBCH_PAYLOAD_BITS, NR_POLAR_PBCH_AGGREGATION_LEVEL); - decoderState = polar_decoder_int16(pbch_e_rx,&nr_ue_pbch_vars->pbch_a_prime,currentPtr); + decoderState = polar_decoder_int16(pbch_e_rx,(uint8_t*)&nr_ue_pbch_vars->pbch_a_prime,currentPtr); if(decoderState == -1) diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h index c361daab01..79248b08c6 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h @@ -1637,9 +1637,11 @@ uint8_t get_prach_prb_offset(NR_DL_FRAME_PARMS *frame_parms, uint8_t n_ra_prboffset, uint8_t tdd_mapindex, uint16_t Nf); +void nr_pdcch_unscrambling(uint16_t crnti, NR_DL_FRAME_PARMS *frame_parms, uint8_t nr_tti_rx, + uint16_t *z, uint32_t length, uint16_t pdcch_DMRS_scrambling_id, int do_common); - +uint32_t lte_gold_generic(uint32_t *x1, uint32_t *x2, uint8_t reset); /**@}*/ #endif diff --git a/openair1/PHY/TOOLS/time_meas.h b/openair1/PHY/TOOLS/time_meas.h index eac057095a..a020a1809d 100644 --- a/openair1/PHY/TOOLS/time_meas.h +++ b/openair1/PHY/TOOLS/time_meas.h @@ -128,11 +128,12 @@ static inline void stop_meas(time_stats_t *ts) static inline void reset_meas(time_stats_t *ts) { - ts->trials=0; + ts->in=0; ts->diff=0; ts->p_time=0; ts->diff_square=0; ts->max=0; + ts->trials=0; ts->meas_flag=0; } diff --git a/openair1/PHY/TOOLS/tools_defs.h b/openair1/PHY/TOOLS/tools_defs.h index 5a7874a141..1a73469030 100644 --- a/openair1/PHY/TOOLS/tools_defs.h +++ b/openair1/PHY/TOOLS/tools_defs.h @@ -342,6 +342,8 @@ int8_t dB_fixed2(uint32_t x,uint32_t y); int16_t dB_fixed_times10(uint32_t x); +uint8_t dB_fixed64(uint64_t x); + int32_t phy_phase_compensation_top (uint32_t pilot_type, uint32_t initial_pilot, uint32_t last_pilot, int32_t ignore_prefix); diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index 27b892c425..5ba0ce2223 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -163,8 +163,6 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, NR_DL_FRAME_PARMS *fp=&gNB->frame_parms; nfapi_nr_config_request_t *cfg = &gNB->gNB_config; - int offset = gNB->CC_id; - if ((cfg->subframe_config.duplex_mode.value == TDD) && (nr_subframe_select(cfg,subframe)==SF_UL)) return; VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+offset,1); @@ -190,7 +188,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, if (nfapi_mode == 0 || nfapi_mode == 1) nr_generate_dci_top(gNB->pdcch_vars, - gNB->nrPolar_params, + &gNB->nrPolar_params, gNB->nr_gold_pdcch_dmrs[slot_idx], gNB->common_vars.txdataF, AMP, *fp, *cfg); diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index d67841fb70..a4424044c0 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -26,19 +26,26 @@ #include #include +#include "common/config/config_userapi.h" +#include "common/utils/LOG/log.h" +#include "common/ran_context.h" + #include "SIMULATION/TOOLS/sim.h" #include "SIMULATION/RF/rf.h" #include "PHY/types.h" #include "PHY/defs_nr_common.h" #include "PHY/defs_nr_UE.h" #include "PHY/defs_gNB.h" - +#include "PHY/NR_REFSIG/refsig_defs_ue.h" +#include "PHY/MODULATION/modulation_eNB.h" +#include "PHY/MODULATION/modulation_UE.h" #include "PHY/INIT/phy_init.h" +#include "PHY/NR_TRANSPORT/nr_transport.h" +#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" + #include "SCHED_NR/sched_nr.h" -#include "PHY/MODULATION/modulation_common.h" -#include "common/ran_context.h" PHY_VARS_gNB *gNB; PHY_VARS_NR_UE *UE; @@ -70,7 +77,7 @@ void exit_function(const char* file, const char* function, const int line,const } // needed for some functions -PHY_VARS_NR_UE * PHY_vars_UE_g[1][1]={NULL}; +PHY_VARS_NR_UE * PHY_vars_UE_g[1][1]={{NULL}}; int main(int argc, char **argv) { @@ -126,11 +133,9 @@ int main(int argc, char **argv) cpuf = get_cpu_freq_GHz(); - /* if ( load_configmodule(argc,argv) == 0) { exit_fun("[SOFTMODEM] Error, configuration module init failed\n"); } - */ logInit(); randominit(0); From 7b5152267aa67b4ad185389e0a7e1708c1c1698e Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Sun, 28 Oct 2018 13:03:16 -0700 Subject: [PATCH 359/379] fixing/simplifying slot_fep for single thread, adding support extended CP removing warnings for --emulate-rf mode, tx_frame now also written to binary file so that it can be read by UE in mode --loop-memory --- openair1/SCHED_NR/nr_ru_procedures.c | 142 +++++----------------- openair1/SCHED_NR/phy_procedures_nr_gNB.c | 2 + targets/RT/USER/nr-ru.c | 17 ++- 3 files changed, 45 insertions(+), 116 deletions(-) diff --git a/openair1/SCHED_NR/nr_ru_procedures.c b/openair1/SCHED_NR/nr_ru_procedures.c index 700b3db5b4..89b2b4d136 100644 --- a/openair1/SCHED_NR/nr_ru_procedures.c +++ b/openair1/SCHED_NR/nr_ru_procedures.c @@ -74,11 +74,20 @@ void nr_feptx0(RU_t *ru,int slot) { LOG_D(PHY,"SFN/SF:RU:TX:%d/%d Generating slot %d\n",ru->proc.frame_tx, ru->proc.subframe_tx,slot); for (aa=0; aanb_tx; aa++) { + if (fp->Ncp == 1) { + PHY_ofdm_mod(&ru->common.txdataF_BF[aa][slot*slot_sizeF], + (int*)&ru->common.txdata[aa][slot_offset], + fp->ofdm_symbol_size, + 12, + fp->nb_prefix_samples, + CYCLIC_PREFIX); + } + else { nr_normal_prefix_mod(&ru->common.txdataF_BF[aa][slot*slot_sizeF], (int*)&ru->common.txdata[aa][slot_offset], fp->symbols_per_slot, fp); - + } } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM+slot , 0); } @@ -180,136 +189,41 @@ void nr_init_feptx_thread(RU_t *ru,pthread_attr_t *attr_feptx) { } - +// is this supposed to generate a slot or a subframe??? +// seems to be hardcoded to numerology 1 (2 slots=1 subframe) void nr_feptx_ofdm(RU_t *ru) { NR_DL_FRAME_PARMS *fp=ru->nr_frame_parms; nfapi_nr_config_request_t *cfg = &ru->gNB_list[0]->gNB_config; - unsigned int aa,slot_offset, slot_offset_F; - int dummy_tx_b[7680*4] __attribute__((aligned(32))); - int i,j, tx_offset; + unsigned int aa=0,slot=0; int slot_sizeF = (fp->ofdm_symbol_size)* ((cfg->subframe_config.dl_cyclic_prefix_type.value == 1) ? 12 : 14); - int len,len2; - int16_t *txdata; int subframe = ru->proc.subframe_tx; - -// int CC_id = ru->proc.CC_id; + int *txdata = &ru->common.txdata[aa][subframe*fp->samples_per_subframe]; VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM , 1 ); + start_meas(&ru->ofdm_mod_stats); - slot_offset_F = 0; - - slot_offset = subframe*fp->samples_per_subframe; + // this copy should be done in the precoding thread (currently inactive) + for (int aa=0;aanb_tx;aa++) + memcpy((void*)ru->common.txdataF_BF[aa], + (void*)ru->gNB_list[0]->common_vars.txdataF[aa], fp->samples_per_subframe_wCP*sizeof(int32_t)); if ((nr_subframe_select(cfg,subframe)==SF_DL)|| ((nr_subframe_select(cfg,subframe)==SF_S))) { // LOG_D(HW,"Frame %d: Generating slot %d\n",frame,next_slot); - start_meas(&ru->ofdm_mod_stats); + for (slot=0; slotslots_per_subframe;slot++) + nr_feptx0(ru,slot); - for (aa=0; aanb_tx; aa++) { - if (cfg->subframe_config.dl_cyclic_prefix_type.value == 1) { - PHY_ofdm_mod(&ru->common.txdataF_BF[aa][0], - dummy_tx_b, - fp->ofdm_symbol_size, - 12, - fp->nb_prefix_samples, - CYCLIC_PREFIX); - PHY_ofdm_mod(&ru->common.txdataF_BF[aa][slot_sizeF], - dummy_tx_b+(fp->samples_per_subframe / fp->slots_per_subframe), - fp->ofdm_symbol_size, - 12, - fp->nb_prefix_samples, - CYCLIC_PREFIX); - } else { - nr_normal_prefix_mod(&ru->common.txdataF_BF[aa][slot_offset_F], - dummy_tx_b, - 14, - fp); - // if S-subframe generate first slot only - if (nr_subframe_select(cfg,subframe) == SF_DL) - nr_normal_prefix_mod(&ru->common.txdataF_BF[aa][slot_offset_F+slot_sizeF], - dummy_tx_b+(fp->samples_per_subframe / fp->slots_per_subframe), - 14, - fp); - } - - // if S-subframe generate first slot only - if (nr_subframe_select(cfg,subframe) == SF_S) - len = fp->samples_per_subframe / fp->slots_per_subframe; - else - len = fp->samples_per_subframe; - - if (slot_offset<0) { - txdata = (int16_t*)&ru->common.txdata[aa][(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_subframe)+tx_offset]; - len2 = -(slot_offset); - len2 = (len2>len) ? len : len2; - for (i=0; i<(len2<<1); i++) { - txdata[i] = ((int16_t*)dummy_tx_b)[i]; - } - if (len2common.txdata[aa][0]; - for (j=0; i<(len<<1); i++,j++) { - txdata[j++] = ((int16_t*)dummy_tx_b)[i]; - } - } - } - else if ((slot_offset+len)>(fp->samples_per_frame)) { - tx_offset = (int)slot_offset; - txdata = (int16_t*)&ru->common.txdata[aa][tx_offset]; - len2 = -tx_offset + fp->samples_per_frame; - for (i=0; i<(len2<<1); i++) { - txdata[i] = ((int16_t*)dummy_tx_b)[i]; - } - txdata = (int16_t*)&ru->common.txdata[aa][0]; - for (j=0; i<(len<<1); i++,j++) { - txdata[j++] = ((int16_t*)dummy_tx_b)[i]; - } - } - else { - //LOG_D(PHY,"feptx_ofdm: Writing to position %d\n",slot_offset); - tx_offset = (int)slot_offset; - txdata = (int16_t*)&ru->common.txdata[aa][tx_offset]; - - for (i=0; i<(len<<1); i++) { - txdata[i] = ((int16_t*)dummy_tx_b)[i]; - } - } - - // if S-subframe switch to RX in second subframe - /* - if (subframe_select(fp,subframe) == SF_S) { - for (i=0; icommon_vars.txdata[0][aa][tx_offset++] = 0x00010001; - } - } - */ - /*if ((fp->frame_type == TDD) && - ((fp->tdd_config==0) || - (fp->tdd_config==1) || - (fp->tdd_config==2) || - (fp->tdd_config==6)) && - ((subframe==0) || (subframe==5))) { - // turn on tx switch N_TA_offset before - //LOG_D(HW,"subframe %d, time to switch to tx (N_TA_offset %d, slot_offset %d) \n",subframe,ru->N_TA_offset,slot_offset); - for (i=0; iN_TA_offset; i++) { - tx_offset = (int)slot_offset+i-ru->N_TA_offset/2; - if (tx_offset<0) - tx_offset += fp->samples_per_frame; - - if (tx_offset>=(fp->samples_per_frame)) - tx_offset -= fp->samples_per_frame; - - ru->common.txdata[aa][tx_offset] = 0x00000000; - } - }*/ - stop_meas(&ru->ofdm_mod_stats); - LOG_D(PHY,"feptx_ofdm (TXPATH): frame %d, subframe %d: txp (time %p) %d dB, txp (freq) %d dB\n", - ru->proc.frame_tx,subframe,txdata,dB_fixed(signal_energy((int32_t*)txdata,fp->samples_per_subframe)), - dB_fixed(signal_energy_nodc(ru->common.txdataF_BF[aa],2*slot_sizeF))); - } } + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM , 0 ); + stop_meas(&ru->ofdm_mod_stats); + + LOG_D(PHY,"feptx_ofdm (TXPATH): frame %d, subframe %d: txp (time %p) %d dB, txp (freq) %d dB\n", + ru->proc.frame_tx,subframe,txdata,dB_fixed(signal_energy((int32_t*)txdata,fp->samples_per_subframe)), + dB_fixed(signal_energy_nodc(ru->common.txdataF_BF[aa],2*slot_sizeF))); + } diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index 5ba0ce2223..36c441db26 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -163,6 +163,8 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, NR_DL_FRAME_PARMS *fp=&gNB->frame_parms; nfapi_nr_config_request_t *cfg = &gNB->gNB_config; + int offset = gNB->CC_id; + if ((cfg->subframe_config.duplex_mode.value == TDD) && (nr_subframe_select(cfg,subframe)==SF_UL)) return; VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+offset,1); diff --git a/targets/RT/USER/nr-ru.c b/targets/RT/USER/nr-ru.c index 1c39906d2b..04f2f3cdd4 100644 --- a/targets/RT/USER/nr-ru.c +++ b/targets/RT/USER/nr-ru.c @@ -719,7 +719,8 @@ void rx_rf(RU_t *ru,int *frame,int *subframe) { if(emulate_rf){ wait_on_condition(&proc->mutex_emulateRF,&proc->cond_emulateRF,&proc->instance_cnt_emulateRF,"emulatedRF_thread"); release_thread(&proc->mutex_emulateRF,&proc->instance_cnt_emulateRF,"emulatedRF_thread"); - rxs = fp->samples_per_tti; + rxs = fp->samples_per_subframe; + ts = old_ts + rxs; } else{ rxs = ru->rfdevice.trx_read_func(&ru->rfdevice, @@ -794,7 +795,7 @@ void rx_rf(RU_t *ru,int *frame,int *subframe) { if (rxs != fp->samples_per_subframe) { //exit_fun( "problem receiving samples" ); - LOG_E(PHY, "problem receiving samples"); + LOG_E(PHY, "problem receiving samples\n"); } } @@ -1543,6 +1544,18 @@ static void* ru_thread( void* param ) { { sprintf(filename,"tx%ddata_frame%d.m", i, print_frame); LOG_M(filename,"txdata_frame",&ru->common.txdata[i][0],fp->samples_per_frame, 1, 1); + sprintf(filename,"tx%ddata_frame%d.dat", i, print_frame); + FILE *output_fd = fopen(filename,"w"); + if (output_fd) { + fwrite(&ru->common.txdata[i][0], + sizeof(int32_t), + fp->samples_per_frame, + output_fd); + fclose(output_fd); + } + else { + LOG_E(PHY,"Cannot write to file %s\n",filename); + } } } } From 2b5e9f3bbb4c187d4935d0d1935faea4ccc6b4d0 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Sun, 28 Oct 2018 13:08:01 -0700 Subject: [PATCH 360/379] fixing --loop-memory options plus a few other things --- targets/RT/USER/nr-ue.c | 12 +- targets/RT/USER/nr-uesoftmodem.c | 207 +++++++++++++++---------------- 2 files changed, 105 insertions(+), 114 deletions(-) diff --git a/targets/RT/USER/nr-ue.c b/targets/RT/USER/nr-ue.c index 3453fb7164..80816ba011 100644 --- a/targets/RT/USER/nr-ue.c +++ b/targets/RT/USER/nr-ue.c @@ -47,10 +47,10 @@ #include "LAYER2/NR_MAC_UE/mac_proto.h" #include "RRC/NR_UE/rrc_proto.h" -#include "SCHED_NR/extern.h" //#ifndef NO_RAT_NR #include "SCHED_NR/phy_frame_config_nr.h" //#endif +#include "SCHED_NR_UE/defs.h" #include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" @@ -574,7 +574,8 @@ static void *UE_thread_synch(void *arg) { if (UE->UE_scan_carrier==1) openair0_cfg[UE->rf_map.card].autocal[UE->rf_map.chain+i] = 1; } - UE->rfdevice.trx_set_freq_func(&UE->rfdevice,&openair0_cfg[0],0); + if (UE->mode != loop_through_memory) + UE->rfdevice.trx_set_freq_func(&UE->rfdevice,&openair0_cfg[0],0); }// initial_sync=0 break; case si: @@ -660,7 +661,7 @@ static void *UE_thread_rxn_txnp4(void *arg) { #ifdef UE_SLOT_PARALLELISATION phy_procedures_slot_parallelization_UE_RX( UE, proc, 0, 0, 1, UE->mode, no_relay, NULL ); #else - phy_procedures_nrUE_RX( UE, proc, 0, 0, 1, UE->mode, no_relay, NULL ); + phy_procedures_nrUE_RX( UE, proc, 0, 0, 1, UE->mode, no_relay); printf(">>> nr_ue_pdcch_procedures ended\n"); #endif @@ -814,7 +815,7 @@ void *UE_thread(void *arg) { CPU_SET(threads.iq, &cpuset); init_thread(100000, 500000, FIFO_PRIORITY, &cpuset, "UHD Threads"); - if (oaisim_flag == 0) + if ((oaisim_flag == 0) && (UE->mode !=loop_through_memory)) AssertFatal(0== openair0_device_load(&(UE->rfdevice), &openair0_cfg[0]), ""); UE->rfdevice.host_type = RAU_HOST; sprintf(threadname, "Main UE %d", UE->Mod_id); @@ -829,7 +830,8 @@ void *UE_thread(void *arg) { int tti_nr=-1; //int cumulated_shift=0; - AssertFatal(UE->rfdevice.trx_start_func(&UE->rfdevice) == 0, "Could not start the device\n"); + if ((oaisim_flag == 0) && (UE->mode != loop_through_memory)) + AssertFatal(UE->rfdevice.trx_start_func(&UE->rfdevice) == 0, "Could not start the device\n"); while (!oai_exit) { AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), ""); int instance_cnt_synch = UE->proc.instance_cnt_synch; diff --git a/targets/RT/USER/nr-uesoftmodem.c b/targets/RT/USER/nr-uesoftmodem.c index f6b47d29c4..6505c2a3fc 100644 --- a/targets/RT/USER/nr-uesoftmodem.c +++ b/targets/RT/USER/nr-uesoftmodem.c @@ -510,7 +510,6 @@ static void get_options(void) { paramdef_t cmdline_params[] =CMDLINE_PARAMS_DESC ; paramdef_t cmdline_logparams[] =CMDLINE_LOGPARAMS_DESC ; - set_default_frame_parms(frame_parms); config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL); if (strlen(in_path) > 0) { @@ -543,7 +542,7 @@ static void get_options(void) { config_process_cmdline( cmdline_uemodeparams,sizeof(cmdline_uemodeparams)/sizeof(paramdef_t),NULL); config_process_cmdline( cmdline_ueparams,sizeof(cmdline_ueparams)/sizeof(paramdef_t),NULL); if (loopfile != NULL) { - printf("Input file for hardware emulation: %s",loopfile); + printf("Input file for hardware emulation: %s\n",loopfile); mode=loop_through_memory; input_fd = fopen(loopfile,"r"); AssertFatal(input_fd != NULL,"Please provide a valid input file\n"); @@ -825,6 +824,8 @@ int main( int argc, char **argv ) { int ret; #endif + PHY_VARS_NR_UE *UE[MAX_NUM_CCs]; + start_background_system(); if ( load_configmodule(argc,argv) == NULL) { exit_fun("[SOFTMODEM] Error, configuration module init failed\n"); @@ -836,9 +837,7 @@ int main( int argc, char **argv ) { setvbuf(stderr, NULL, _IONBF, 0); #endif - PHY_VARS_NR_UE *UE[MAX_NUM_CCs]; - UE[0] = malloc(sizeof(PHY_VARS_NR_UE*)); - //UE[1] = (PHY_VARS_NR_UE *)malloc(sizeof(PHY_VARS_NR_UE)); + set_default_frame_parms(frame_parms); mode = normal_txrx; memset(&openair0_cfg[0],0,sizeof(openair0_config_t)*MAX_CARDS); @@ -897,9 +896,6 @@ int main( int argc, char **argv ) { MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX); #endif - // get options and fill parameters from configuration file - get_options (); //Command-line options, enb_properties - if (opt_type != OPT_NONE) { if (init_opt(in_path, in_ip) == -1) LOG_E(OPT,"failed to run OPT \n"); @@ -926,11 +922,10 @@ int main( int argc, char **argv ) { #endif LOG_I(HW, "Version: %s\n", PACKAGE_VERSION); - + // init the parameters for (CC_id=0; CC_idnb_antennas_tx = nb_antenna_tx; frame_parms[CC_id]->nb_antennas_rx = nb_antenna_rx; frame_parms[CC_id]->nb_antenna_ports_eNB = 1; //initial value overwritten by initial sync later @@ -941,108 +936,102 @@ int main( int argc, char **argv ) { //phy_init_nr_top(frame_parms[CC_id]); } - - for (CC_id=0; CC_idprach_config_common.prach_ConfigInfo.prach_ConfigIndex, frame_parms->frame_type); // N_ZC = (prach_fmt <4)?839:139; - } + } - /*NB_UE_INST=1; - NB_INST=1; - PHY_vars_UE_g = malloc(sizeof(PHY_VARS_NR_UE**)); - PHY_vars_UE_g[0] = malloc(sizeof(PHY_VARS_NR_UE*)*MAX_NUM_CCs);*/ - - for (CC_id=0; CC_idofdm_symbol_size); - - PHY_vars_UE_g[0][CC_id] = init_nr_ue_vars(frame_parms[CC_id], 0,abstraction_flag); - UE[CC_id] = PHY_vars_UE_g[0][CC_id]; - - if (phy_test==1) - UE[CC_id]->mac_enabled = 0; - else - UE[CC_id]->mac_enabled = 1; - - if (UE[CC_id]->mac_enabled == 0) { //set default UL parameters for testing mode - for (i=0; ipusch_config_dedicated[i] = malloc(sizeof(PUSCH_CONFIG_DEDICATED)); - - //UE[CC_id]->scheduling_request_config[i] = malloc(sizeof(SCHEDULING_REQUEST_CONFIG)); - - /*UE[CC_id]->pusch_config_dedicated[i].betaOffset_ACK_Index = beta_ACK; - UE[CC_id]->pusch_config_dedicated[i].betaOffset_RI_Index = beta_RI; - UE[CC_id]->pusch_config_dedicated[i].betaOffset_CQI_Index = beta_CQI; - - UE[CC_id]->scheduling_request_config[i].sr_PUCCH_ResourceIndex = 0; - UE[CC_id]->scheduling_request_config[i].sr_ConfigIndex = 7+(0%3); - UE[CC_id]->scheduling_request_config[i].dsr_TransMax = sr_n4;*/ - } - } - - UE[CC_id]->UE_scan = UE_scan; - UE[CC_id]->UE_scan_carrier = UE_scan_carrier; - UE[CC_id]->mode = mode; - printf("UE[%d]->mode = %d\n",CC_id,mode); - - for (uint8_t i=0; ipdcch_vars[i][0]->agregationLevel = agregation_Level; - //UE[CC_id]->pdcch_vars[i][0]->dciFormat = dci_Format; - } - - /*compute_prach_seq(&UE[CC_id]->frame_parms.prach_config_common, - UE[CC_id]->frame_parms.frame_type, - UE[CC_id]->X_u);*/ - - if (UE[CC_id]->mac_enabled == 1) - { - 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][0]->crnti = 0x1235; - UE[CC_id]->pdcch_vars[1][0]->crnti = 0x1235; - } - - rx_gain[CC_id][0] = 81; - tx_max_power[CC_id] = -40; - - 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]; - - if (frame_parms[CC_id]->frame_type==FDD) { - UE[CC_id]->N_TA_offset = 0; - } else { - if (frame_parms[CC_id]->N_RB_DL == 100) - UE[CC_id]->N_TA_offset = 624; - else if (frame_parms[CC_id]->N_RB_DL == 50) - UE[CC_id]->N_TA_offset = 624/2; - else if (frame_parms[CC_id]->N_RB_DL == 25) - UE[CC_id]->N_TA_offset = 624/4; - } - - } - - // printf("tx_max_power = %d -> amp %d\n",tx_max_power[0],get_tx_amp(tx_max_poHwer,tx_max_power)); + NB_UE_INST=1; + NB_INST=1; + PHY_vars_UE_g = malloc(sizeof(PHY_VARS_NR_UE**)); + PHY_vars_UE_g[0] = malloc(sizeof(PHY_VARS_NR_UE*)*MAX_NUM_CCs); + for (CC_id=0; CC_idofdm_symbol_size); - fill_modeled_runtime_table(runtime_phy_rx,runtime_phy_tx); - cpuf=get_cpu_freq_GHz(); - - - //dump_frame_parms(frame_parms[0]); - - init_openair0(); - + nr_init_frame_parms_ue(frame_parms[CC_id],numerology,NORMAL,frame_parms[CC_id]->N_RB_DL,(frame_parms[CC_id]->N_RB_DL-20)>>1,0); + PHY_vars_UE_g[0][CC_id] = init_nr_ue_vars(frame_parms[CC_id], 0,abstraction_flag); + UE[CC_id] = PHY_vars_UE_g[0][CC_id]; + + if (phy_test==1) + UE[CC_id]->mac_enabled = 0; + else + UE[CC_id]->mac_enabled = 1; + + if (UE[CC_id]->mac_enabled == 0) { //set default UL parameters for testing mode + for (i=0; ipusch_config_dedicated[i] = malloc(sizeof(PUSCH_CONFIG_DEDICATED)); + + //UE[CC_id]->scheduling_request_config[i] = malloc(sizeof(SCHEDULING_REQUEST_CONFIG)); + + /*UE[CC_id]->pusch_config_dedicated[i].betaOffset_ACK_Index = beta_ACK; + UE[CC_id]->pusch_config_dedicated[i].betaOffset_RI_Index = beta_RI; + UE[CC_id]->pusch_config_dedicated[i].betaOffset_CQI_Index = beta_CQI; + + UE[CC_id]->scheduling_request_config[i].sr_PUCCH_ResourceIndex = 0; + UE[CC_id]->scheduling_request_config[i].sr_ConfigIndex = 7+(0%3); + UE[CC_id]->scheduling_request_config[i].dsr_TransMax = sr_n4;*/ + } + } + + UE[CC_id]->UE_scan = UE_scan; + UE[CC_id]->UE_scan_carrier = UE_scan_carrier; + UE[CC_id]->mode = mode; + printf("UE[%d]->mode = %d\n",CC_id,mode); + + for (uint8_t i=0; ipdcch_vars[i][0]->agregationLevel = agregation_Level; + //UE[CC_id]->pdcch_vars[i][0]->dciFormat = dci_Format; + } + + /*compute_prach_seq(&UE[CC_id]->frame_parms.prach_config_common, + UE[CC_id]->frame_parms.frame_type, + UE[CC_id]->X_u);*/ + + if (UE[CC_id]->mac_enabled == 1) + { + 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][0]->crnti = 0x1235; + UE[CC_id]->pdcch_vars[1][0]->crnti = 0x1235; + } + + rx_gain[CC_id][0] = 81; + tx_max_power[CC_id] = -40; + + 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]; + + if (frame_parms[CC_id]->frame_type==FDD) { + UE[CC_id]->N_TA_offset = 0; + } else { + if (frame_parms[CC_id]->N_RB_DL == 100) + UE[CC_id]->N_TA_offset = 624; + else if (frame_parms[CC_id]->N_RB_DL == 50) + UE[CC_id]->N_TA_offset = 624/2; + else if (frame_parms[CC_id]->N_RB_DL == 25) + UE[CC_id]->N_TA_offset = 624/4; + } + + } + + // printf("tx_max_power = %d -> amp %d\n",tx_max_power[0],get_tx_amp(tx_max_poHwer,tx_max_power)); + + + fill_modeled_runtime_table(runtime_phy_rx,runtime_phy_tx); + cpuf=get_cpu_freq_GHz(); + + + //dump_frame_parms(frame_parms[0]); + + init_openair0(); + #ifndef DEADLINE_SCHEDULER @@ -1182,11 +1171,11 @@ int main( int argc, char **argv ) { // connect the TX/RX buffers //if (UE_flag==1) { - for (CC_id=0; CC_idhw_timing_advance = timing_advance; + UE[CC_id]->hw_timing_advance = timing_advance; #else UE[CC_id]->hw_timing_advance = 160; #endif From a17ccf0646c48ef2e05abfa34af505e49fbb34a0 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Sun, 28 Oct 2018 13:09:12 -0700 Subject: [PATCH 361/379] adding N_RB_DL to nr_init_params, as it is needed in the gNB and the function is shared between gNB and UE. This should be revisited. --- openair1/PHY/INIT/nr_init_ue.c | 2 +- openair1/PHY/INIT/nr_parms.c | 38 ++++++++++--------- openair1/PHY/INIT/phy_init.h | 2 +- .../PHY/NR_UE_TRANSPORT/nr_initial_sync.c | 32 +++++++--------- 4 files changed, 37 insertions(+), 37 deletions(-) diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c index 4286f4359a..77faeaa0c2 100644 --- a/openair1/PHY/INIT/nr_init_ue.c +++ b/openair1/PHY/INIT/nr_init_ue.c @@ -664,7 +664,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, printf("Initializing UE vars (abstraction %"PRIu8") for eNB TXant %"PRIu8", UE RXant %"PRIu8"\n",abstraction_flag,fp->nb_antennas_tx,fp->nb_antennas_rx); //LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_eNB_INST); - nr_init_frame_parms_ue(&ue->frame_parms,NR_MU_1,NORMAL,n_ssb_crb,0); + nr_init_frame_parms_ue(fp,NR_MU_1,NORMAL,fp->N_RB_DL,n_ssb_crb,0); phy_init_nr_top(ue); // many memory allocation sizes are hard coded diff --git a/openair1/PHY/INIT/nr_parms.c b/openair1/PHY/INIT/nr_parms.c index 2692f2d67b..6b2b09ba0c 100644 --- a/openair1/PHY/INIT/nr_parms.c +++ b/openair1/PHY/INIT/nr_parms.c @@ -27,24 +27,26 @@ uint32_t nr_subcarrier_spacing[MAX_NUM_SUBCARRIER_SPACING] = {15e3, 30e3, 60e3, uint16_t nr_slots_per_subframe[MAX_NUM_SUBCARRIER_SPACING] = {1, 2, 4, 16, 32}; -int nr_init_frame_parms0( - NR_DL_FRAME_PARMS *fp, +int nr_init_frame_parms0(NR_DL_FRAME_PARMS *fp, int mu, - int Ncp) + int Ncp, + int N_RB_DL) { - - #if DISABLE_LOG_X - printf("Initializing frame parms for mu %d, N_RB %d, Ncp %d\n",mu, fp->N_RB_DL, Ncp); + printf("Initializing frame parms for mu %d, N_RB %d, Ncp %d\n",mu, N_RB_DL, Ncp); #else - LOG_I(PHY,"Initializing frame parms for mu %d, N_RB %d, Ncp %d\n",mu, fp->N_RB_DL, Ncp); + LOG_I(PHY,"Initializing frame parms for mu %d, N_RB %d, Ncp %d\n",mu, N_RB_DL, Ncp); #endif if (Ncp == NFAPI_CP_EXTENDED) AssertFatal(mu == NR_MU_2,"Invalid cyclic prefix %d for numerology index %d\n", Ncp, mu); + fp->numerology_index = mu; + fp->Ncp = Ncp; + fp->N_RB_DL = N_RB_DL; + switch(mu) { case NR_MU_0: //15kHz scs @@ -56,7 +58,7 @@ int nr_init_frame_parms0( fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_1]; fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_1]; - switch(fp->N_RB_DL){ + switch(N_RB_DL){ case 11: case 24: case 38: @@ -99,21 +101,21 @@ int nr_init_frame_parms0( break; case 245: - AssertFatal(fp->threequarter_fs==0,"3/4 sampling impossible for N_RB %d and MU %d\n",fp->N_RB_DL,mu); + AssertFatal(fp->threequarter_fs==0,"3/4 sampling impossible for N_RB %d and MU %d\n",N_RB_DL,mu); fp->ofdm_symbol_size = 4096; fp->first_carrier_offset = 2626; //4096 - 1478 fp->nb_prefix_samples0 = 352; fp->nb_prefix_samples = 288; break; case 273: - AssertFatal(fp->threequarter_fs==0,"3/4 sampling impossible for N_RB %d and MU %d\n",fp->N_RB_DL,mu); + AssertFatal(fp->threequarter_fs==0,"3/4 sampling impossible for N_RB %d and MU %d\n",N_RB_DL,mu); fp->ofdm_symbol_size = 4096; fp->first_carrier_offset = 2458; //4096 - 1638 fp->nb_prefix_samples0 = 352; fp->nb_prefix_samples = 288; break; default: - AssertFatal(1==0,"Number of resource blocks %d undefined for mu %d, frame parms = %p\n", fp->N_RB_DL, mu, fp); + AssertFatal(1==0,"Number of resource blocks %d undefined for mu %d, frame parms = %p\n", N_RB_DL, mu, fp); } break; @@ -121,7 +123,7 @@ int nr_init_frame_parms0( fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_2]; fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_2]; - switch(fp->N_RB_DL){ //FR1 bands only + switch(N_RB_DL){ //FR1 bands only case 11: case 18: case 38: @@ -135,7 +137,7 @@ int nr_init_frame_parms0( case 121: case 135: default: - AssertFatal(1==0,"Number of resource blocks %d undefined for mu %d, frame parms = %p\n", fp->N_RB_DL, mu, fp); + AssertFatal(1==0,"Number of resource blocks %d undefined for mu %d, frame parms = %p\n", N_RB_DL, mu, fp); } break; @@ -167,7 +169,7 @@ int nr_init_frame_parms0( fp->initial_bwp_dl.scs = fp->subcarrier_spacing; fp->initial_bwp_dl.location = 0; fp->initial_bwp_dl.N_RB = fp->N_RB_DL; - fp->initial_bwp_dl.cyclic_prefix = Ncp; + fp->initial_bwp_dl.cyclic_prefix = fp->Ncp; fp->initial_bwp_dl.ofdm_symbol_size = fp->ofdm_symbol_size; return 0; @@ -177,18 +179,20 @@ int nr_init_frame_parms(nfapi_nr_config_request_t* config, NR_DL_FRAME_PARMS *fp) { return nr_init_frame_parms0(fp, - config->subframe_config.numerology_index_mu.value, - config->subframe_config.dl_cyclic_prefix_type.value); + config->subframe_config.numerology_index_mu.value, + config->subframe_config.dl_cyclic_prefix_type.value, + config->rf_config.dl_carrier_bandwidth.value); } int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp, int mu, int Ncp, + int N_RB_DL, int n_ssb_crb, int ssb_subcarrier_offset) { - nr_init_frame_parms0(fp,mu,Ncp); + nr_init_frame_parms0(fp,mu,Ncp,N_RB_DL); int start_rb = n_ssb_crb / (1<ssb_start_subcarrier = 12 * start_rb + ssb_subcarrier_offset; return 0; diff --git a/openair1/PHY/INIT/phy_init.h b/openair1/PHY/INIT/phy_init.h index 1631e09188..8e579c69be 100644 --- a/openair1/PHY/INIT/phy_init.h +++ b/openair1/PHY/INIT/phy_init.h @@ -377,7 +377,7 @@ void phy_config_request(PHY_Config_t *phy_config); int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf); void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms); int nr_init_frame_parms(nfapi_nr_config_request_t* config, NR_DL_FRAME_PARMS *frame_parms); -int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *frame_parms,int mu,int Ncp,int n_ssb_crb,int ssb_subcarrier_offset); +int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *frame_parms,int mu,int Ncp,int N_RB_DL,int n_ssb_crb,int ssb_subcarrier_offset); int init_nr_ue_signal(PHY_VARS_NR_UE *ue,int nb_connected_eNB,uint8_t abstraction_flag); void nr_dump_frame_parms(NR_DL_FRAME_PARMS *frame_parms); int phy_init_nr_gNB(PHY_VARS_gNB *gNB, unsigned char is_secondary_gNB, unsigned char abstraction_flag); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c index 52594f9fd2..87e3dd59be 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c @@ -49,7 +49,7 @@ extern openair0_config_t openair0_cfg[]; //static nfapi_nr_config_request_t* config =&config_t; int cnt=0; -//#define DEBUG_INITIAL_SYNCH +#define DEBUG_INITIAL_SYNCH int nr_pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode) { @@ -125,11 +125,7 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode) ue->proc.proc_rxtx[i].frame_tx = ue->proc.proc_rxtx[0].frame_rx; } #ifdef DEBUG_INITIAL_SYNCH - LOG_I(PHY,"[UE%d] Initial sync: pbch decoded sucessfully mode1_flag %d, tx_ant %d, frame %d\n", - ue->Mod_id, - frame_parms->mode1_flag, - pbch_tx_ant, - ue->proc.proc_rxtx[0].frame_rx,); + LOG_I(PHY,"[UE%d] Initial sync: pbch decoded sucessfully\n",ue->Mod_id); #endif return(0); } else { @@ -157,10 +153,11 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode) // First try TDD normal prefix, mu 1 fp->Ncp=NORMAL; fp->frame_type=TDD; - nr_init_frame_parms_ue(fp,NR_MU_1,NORMAL,n_ssb_crb,0); + // FK: added N_RB_DL paramter here as this function shares code with the gNB where it is needed. We should rewrite this function for the UE. + nr_init_frame_parms_ue(fp,NR_MU_1,NORMAL,fp->N_RB_DL,n_ssb_crb,0); LOG_D(PHY,"nr_initial sync ue RB_DL %d\n", fp->N_RB_DL); /* - write_output("rxdata0.m","rxd0",ue->common_vars.rxdata[0],10*fp->samples_per_tti,1,1); + write_output("rxdata0.m","rxd0",ue->common_vars.rxdata[0],10*fp->samples_per_subframe,1,1); exit(-1); */ @@ -187,21 +184,19 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode) if (sync_pos >= fp->nb_prefix_samples) - ue->ssb_offset = sync_pos - fp->nb_prefix_samples; + ue->ssb_offset = sync_pos - fp->nb_prefix_samples; else - ue->ssb_offset = sync_pos + (fp->samples_per_tti * 10) - fp->nb_prefix_samples; + ue->ssb_offset = sync_pos + (fp->samples_per_subframe * 10) - fp->nb_prefix_samples; - LOG_D(PHY,"sync_pos %d ssb_offset %d\n",sync_pos,ue->ssb_offset); - - - // write_output("rxdata1.m","rxd1",ue->common_vars.rxdata[0],10*fp->samples_per_tti,1,1); + //write_output("rxdata1.m","rxd1",ue->common_vars.rxdata[0],10*fp->samples_per_subframe,1,1); #ifdef DEBUG_INITIAL_SYNCH LOG_I(PHY,"[UE%d] Initial sync : Estimated PSS position %d, Nid2 %d\n", ue->Mod_id, sync_pos,ue->common_vars.eNb_id); + LOG_I(PHY,"sync_pos %d ssb_offset %d\n",sync_pos,ue->ssb_offset); #endif /* check that SSS/PBCH block is continuous inside the received buffer */ - if (sync_pos < (10*fp->ttis_per_subframe*fp->samples_per_tti - (NB_SYMBOLS_PBCH * fp->ofdm_symbol_size))) { + if (sync_pos < (10*fp->slots_per_subframe*fp->samples_per_subframe - (NB_SYMBOLS_PBCH * fp->ofdm_symbol_size))) { #ifdef DEBUG_INITIAL_SYNCH LOG_I(PHY,"Calling sss detection (normal CP)\n"); @@ -209,7 +204,8 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode) rx_sss_nr(ue,&metric_tdd_ncp,&phase_tdd_ncp); - nr_init_frame_parms_ue(fp,NR_MU_1,NORMAL,n_ssb_crb,0); + //FK: why do we need to do this again here? + //nr_init_frame_parms_ue(fp,NR_MU_1,NORMAL,n_ssb_crb,0); nr_gold_pbch(ue); ret = nr_pbch_detection(ue,mode); @@ -231,8 +227,8 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode) */ #ifdef DEBUG_INITIAL_SYNCH - LOG_I(PHY,"TDD Normal prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n", - frame_parms->Nid_cell,metric_tdd_ncp,phase_tdd_ncp,flip_tdd_ncp,ret); + LOG_I(PHY,"TDD Normal prefix: CellId %d metric %d, phase %d, pbch %d\n", + fp->Nid_cell,metric_tdd_ncp,phase_tdd_ncp,ret); #endif } else { From 915113ab54e6d9456c4cda3082904a4adfe31d09 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 29 Oct 2018 09:15:44 +0100 Subject: [PATCH 362/379] CI: fix scripting for physical simulators Signed-off-by: Raphael Defosseux --- ci-scripts/buildOnVM.sh | 4 ++-- ci-scripts/reportBuildLocally.sh | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ci-scripts/buildOnVM.sh b/ci-scripts/buildOnVM.sh index d5a0bc373b..f233c224c4 100755 --- a/ci-scripts/buildOnVM.sh +++ b/ci-scripts/buildOnVM.sh @@ -148,7 +148,7 @@ case $key in VM_NAME=ci-phy-sim ARCHIVES_LOC=phy_sim LOG_PATTERN=.Rel15.txt - NB_PATTERN_FILES=5 + NB_PATTERN_FILES=6 BUILD_OPTIONS="--phy_simulators" shift ;; @@ -216,7 +216,7 @@ case $key in VM_NAME=ci-phy-sim ARCHIVES_LOC=phy_sim LOG_PATTERN=.Rel15.txt - NB_PATTERN_FILES=5 + NB_PATTERN_FILES=6 BUILD_OPTIONS="--phy_simulators" ;; cppcheck) diff --git a/ci-scripts/reportBuildLocally.sh b/ci-scripts/reportBuildLocally.sh index 3847f94365..6a97e47d73 100755 --- a/ci-scripts/reportBuildLocally.sh +++ b/ci-scripts/reportBuildLocally.sh @@ -529,13 +529,17 @@ summary_table_header "OAI Build Physical simulators option" summary_table_row "DL Simulator - Release 15" ./archives/phy_sim/dlsim.Rel15.txt "Built target dlsim" ./phy_sim_row1.html summary_table_row "UL Simulator - Release 15" ./archives/phy_sim/ulsim.Rel15.txt "Built target ulsim" ./phy_sim_row2.html summary_table_row "Coding - Release 15" ./archives/phy_sim/coding.Rel15.txt "Built target coding" ./phy_sim_row3.html -if [ -f ./archives/phy_sim/./archives/phy_sim/ldpctest.Rel15.txt ] +if [ -f ./archives/phy_sim/ldpctest.Rel15.txt ] then - summary_table_row "LDPC Test - Release 15" ./archives/phy_sim/ldpctest.Rel15.txt "Built target coding" ./phy_sim_row4.html + summary_table_row "LDPC Test - Release 15" ./archives/phy_sim/ldpctest.Rel15.txt "Built target ldpctest" ./phy_sim_row4.html fi -if [ -f ./archives/phy_sim/./archives/phy_sim/polartest.Rel15.txt ] +if [ -f ./archives/phy_sim/polartest.Rel15.txt ] then - summary_table_row "Polar Test - Release 15" ./archives/phy_sim/polartest.Rel15.txt "Built target coding" ./phy_sim_row5.html + summary_table_row "Polar Test - Release 15" ./archives/phy_sim/polartest.Rel15.txt "Built target polartest" ./phy_sim_row5.html +fi +if [ -f ./archives/phy_sim/nr_pbchsim.Rel15.txt ] +then + summary_table_row "PBCH Test - Release 15" ./archives/phy_sim/nr_pbchsim.Rel15.txt "Built target nr_pbchsim" ./phy_sim_row6.html fi summary_table_footer From 0ecbefd213874bdb5b3898087520a84dd8499b25 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 29 Oct 2018 10:16:52 +0100 Subject: [PATCH 363/379] CI: disabled all but FDD-5MHz on basic simulator fixed pipeline syntax Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 4 +- ci-scripts/conf_files/lte-basic-sim.conf | 259 --------------- ci-scripts/runTestOnVM.sh | 388 ++++++++++++----------- 3 files changed, 198 insertions(+), 453 deletions(-) delete mode 100644 ci-scripts/conf_files/lte-basic-sim.conf diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index 490ebdfa81..982cd0e3cc 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -524,7 +524,9 @@ pipeline { } } } - } + } + } + } } } } diff --git a/ci-scripts/conf_files/lte-basic-sim.conf b/ci-scripts/conf_files/lte-basic-sim.conf deleted file mode 100644 index f0fab0bdcb..0000000000 --- a/ci-scripts/conf_files/lte-basic-sim.conf +++ /dev/null @@ -1,259 +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"; - - tr_s_preference = "local_mac" - - ////////// Physical parameters: - - component_carriers = ( - { - node_function = "3GPP_eNODEB"; - 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 = 90; - rx_gain = 125; - pbch_repetition = "FALSE"; - 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 = 0; - pucch_nCS_AN = 0; - pucch_n1_AN = 0; - pdsch_referenceSignalPower = -27; - 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; - - //Parameters for SIB18 - rxPool_sc_CP_Len = "normal"; - rxPool_sc_Period = "sf40"; - rxPool_data_CP_Len = "normal"; - rxPool_ResourceConfig_prb_Num = 20; - rxPool_ResourceConfig_prb_Start = 5; - rxPool_ResourceConfig_prb_End = 44; - rxPool_ResourceConfig_offsetIndicator_present = "prSmall"; - rxPool_ResourceConfig_offsetIndicator_choice = 0; - rxPool_ResourceConfig_subframeBitmap_present = "prBs40"; - rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000"; - rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5; - rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; -/* rxPool_dataHoppingConfig_hoppingParameter = 0; - rxPool_dataHoppingConfig_numSubbands = "ns1"; - rxPool_dataHoppingConfig_rbOffset = 0; - rxPool_commTxResourceUC-ReqAllowed = "TRUE"; -*/ - // Parameters for SIB19 - discRxPool_cp_Len = "normal" - discRxPool_discPeriod = "rf32" - discRxPool_numRetx = 1; - discRxPool_numRepetition = 2; - discRxPool_ResourceConfig_prb_Num = 5; - discRxPool_ResourceConfig_prb_Start = 3; - discRxPool_ResourceConfig_prb_End = 21; - discRxPool_ResourceConfig_offsetIndicator_present = "prSmall"; - discRxPool_ResourceConfig_offsetIndicator_choice = 0; - discRxPool_ResourceConfig_subframeBitmap_present = "prBs40"; - discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff"; - discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5; - discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; - - } - ); - - - 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 = "CI_MME_IP_ADDR"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); - - NETWORK_INTERFACES : - { - - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; - ENB_PORT_FOR_S1U = 2152; # Spec 2152 - - ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; - ENB_PORT_FOR_X2C = 36422; # Spec 36422 - }; - } -); - -MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - phy_test_mode = 0; - puSch10xSnr = 200; - puCch10xSnr = 200; - } -); - -L1s = ( - { - num_cc = 1; - tr_n_preference = "local_mac"; - } -); - -RUs = ( - { - local_rf = "yes" - nb_tx = 1 - nb_rx = 1 - att_tx = 0 - att_rx = 0; - bands = [7]; - max_pdschReferenceSignalPower = -27; - max_rxgain = 125; - eNB_instances = [0]; - - } -); - -NETWORK_CONTROLLER : -{ - FLEXRAN_ENABLED = "no"; - FLEXRAN_INTERFACE_NAME = "lo"; - FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; - FLEXRAN_PORT = 2210; - FLEXRAN_CACHE = "/mnt/oai_agent_cache"; - FLEXRAN_AWAIT_RECONF = "no"; -}; - - 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/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index efdfcec3e0..63699d8f17 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -751,142 +751,143 @@ then scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC - echo "############################################################" - echo "Starting the eNB in FDD-10MHz mode" - echo "############################################################" - CURRENT_ENB_LOG_FILE=fdd_10MHz_enb.log - start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 lte-fdd-basic-sim.conf - - echo "############################################################" - echo "Starting the UE in FDD-10MHz mode" - echo "############################################################" - CURRENT_UE_LOG_FILE=fdd_10MHz_ue.log - start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 50 2680 - if [ $UE_SYNC -eq 0 ] - then - echo "Problem w/ eNB and UE not syncing" - terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC - recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC - terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR - exit -1 - fi - get_ue_ip_addr $VM_CMDS $VM_IP_ADDR - - echo "############################################################" - echo "Pinging the UE" - echo "############################################################" - PING_LOG_FILE=fdd_10MHz_ping_ue.txt - ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE - scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC - check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 - - echo "############################################################" - echo "Iperf DL" - echo "############################################################" - CURR_IPERF_LOG_BASE=fdd_10MHz_iperf_dl - iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE - scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC - check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15 - - echo "############################################################" - echo "Iperf UL" - echo "############################################################" - CURR_IPERF_LOG_BASE=fdd_10MHz_iperf_ul - iperf_ul $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 2 $CURR_IPERF_LOG_BASE - scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC - check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 2 - - echo "############################################################" - echo "Terminate enb/ue simulators" - echo "############################################################" - terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC - recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC - - echo "############################################################" - echo "Starting the eNB in FDD-20MHz mode" - echo "############################################################" - CURRENT_ENB_LOG_FILE=fdd_20MHz_enb.log - start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 100 lte-fdd-basic-sim.conf - - echo "############################################################" - echo "Starting the UE in FDD-20MHz mode" - echo "############################################################" - CURRENT_UE_LOG_FILE=fdd_20MHz_ue.log - start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 100 2680 - if [ $UE_SYNC -eq 0 ] - then - echo "Problem w/ eNB and UE not syncing" - terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC - recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC - terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR - exit -1 - fi - get_ue_ip_addr $VM_CMDS $VM_IP_ADDR - - echo "############################################################" - echo "Pinging the UE" - echo "############################################################" - PING_LOG_FILE=fdd_20MHz_ping_ue.txt - ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE - scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC - check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 - - echo "############################################################" - echo "Iperf DL" - echo "############################################################" - CURR_IPERF_LOG_BASE=fdd_20MHz_iperf_dl - iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE - scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC - check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15 - - echo "############################################################" - echo "Terminate enb/ue simulators" - echo "############################################################" - terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC - recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC - - echo "############################################################" - echo "Starting the eNB in TDD-5MHz mode" - echo "############################################################" - CURRENT_ENB_LOG_FILE=tdd_05MHz_enb.log - start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 25 lte-tdd-basic-sim.conf - - echo "############################################################" - echo "Starting the UE in TDD-5MHz mode" - echo "############################################################" - CURRENT_UE_LOG_FILE=tdd_05MHz_ue.log - start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 25 2350 - if [ $UE_SYNC -eq 0 ] - then - echo "Problem w/ eNB and UE not syncing" - terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC - recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC - terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR - exit -1 - fi - get_ue_ip_addr $VM_CMDS $VM_IP_ADDR - - echo "############################################################" - echo "Pinging the UE" - echo "############################################################" - PING_LOG_FILE=tdd_05MHz_ping_ue.txt - ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE - scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC - check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 - +# Raphael: Disable any further test in develop-nr to validate CI pipeline +# echo "############################################################" +# echo "Starting the eNB in FDD-10MHz mode" +# echo "############################################################" +# CURRENT_ENB_LOG_FILE=fdd_10MHz_enb.log +# start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 lte-fdd-basic-sim.conf +# +# echo "############################################################" +# echo "Starting the UE in FDD-10MHz mode" +# echo "############################################################" +# CURRENT_UE_LOG_FILE=fdd_10MHz_ue.log +# start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 50 2680 +# if [ $UE_SYNC -eq 0 ] +# then +# echo "Problem w/ eNB and UE not syncing" +# terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC +# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC +# terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR +# exit -1 +# fi +# get_ue_ip_addr $VM_CMDS $VM_IP_ADDR +# +# echo "############################################################" +# echo "Pinging the UE" +# echo "############################################################" +# PING_LOG_FILE=fdd_10MHz_ping_ue.txt +# ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE +# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC +# check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 +# +# echo "############################################################" +# echo "Iperf DL" +# echo "############################################################" +# CURR_IPERF_LOG_BASE=fdd_10MHz_iperf_dl +# iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE +# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC +# check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15 +# +# echo "############################################################" +# echo "Iperf UL" +# echo "############################################################" +# CURR_IPERF_LOG_BASE=fdd_10MHz_iperf_ul +# iperf_ul $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 2 $CURR_IPERF_LOG_BASE +# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC +# check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 2 +# +# echo "############################################################" +# echo "Terminate enb/ue simulators" +# echo "############################################################" +# terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC +# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC +# +# echo "############################################################" +# echo "Starting the eNB in FDD-20MHz mode" +# echo "############################################################" +# CURRENT_ENB_LOG_FILE=fdd_20MHz_enb.log +# start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 100 lte-fdd-basic-sim.conf +# +# echo "############################################################" +# echo "Starting the UE in FDD-20MHz mode" +# echo "############################################################" +# CURRENT_UE_LOG_FILE=fdd_20MHz_ue.log +# start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 100 2680 +# if [ $UE_SYNC -eq 0 ] +# then +# echo "Problem w/ eNB and UE not syncing" +# terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC +# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC +# terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR +# exit -1 +# fi +# get_ue_ip_addr $VM_CMDS $VM_IP_ADDR +# +# echo "############################################################" +# echo "Pinging the UE" +# echo "############################################################" +# PING_LOG_FILE=fdd_20MHz_ping_ue.txt +# ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE +# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC +# check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 +# +# echo "############################################################" +# echo "Iperf DL" +# echo "############################################################" +# CURR_IPERF_LOG_BASE=fdd_20MHz_iperf_dl +# iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE +# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC +# check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15 +# +# echo "############################################################" +# echo "Terminate enb/ue simulators" +# echo "############################################################" +# terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC +# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC +# +# echo "############################################################" +# echo "Starting the eNB in TDD-5MHz mode" +# echo "############################################################" +# CURRENT_ENB_LOG_FILE=tdd_05MHz_enb.log +# start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 25 lte-tdd-basic-sim.conf +# +# echo "############################################################" +# echo "Starting the UE in TDD-5MHz mode" +# echo "############################################################" +# CURRENT_UE_LOG_FILE=tdd_05MHz_ue.log +# start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 25 2350 +# if [ $UE_SYNC -eq 0 ] +# then +# echo "Problem w/ eNB and UE not syncing" +# terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC +# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC +# terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR +# exit -1 +# fi +# get_ue_ip_addr $VM_CMDS $VM_IP_ADDR +# +# echo "############################################################" +# echo "Pinging the UE" +# echo "############################################################" +# PING_LOG_FILE=tdd_05MHz_ping_ue.txt +# ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE +# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC +# check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 +# # Bug in TDD 5Mhz --- not running it # echo "############################################################" # echo "Iperf DL" @@ -896,63 +897,64 @@ then # scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC # scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC # check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6 - - echo "############################################################" - echo "Terminate enb/ue simulators" - echo "############################################################" - terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC - recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC - - echo "############################################################" - echo "Starting the eNB in TDD-10MHz mode" - echo "############################################################" - CURRENT_ENB_LOG_FILE=tdd_10MHz_enb.log - start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 lte-tdd-basic-sim.conf - - echo "############################################################" - echo "Starting the UE in TDD-10MHz mode" - echo "############################################################" - CURRENT_UE_LOG_FILE=tdd_10MHz_ue.log - start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 50 2350 - if [ $UE_SYNC -eq 0 ] - then - echo "Problem w/ eNB and UE not syncing" - terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC - recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC - terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR - exit -1 - fi - get_ue_ip_addr $VM_CMDS $VM_IP_ADDR - - echo "############################################################" - echo "Pinging the UE" - echo "############################################################" - PING_LOG_FILE=tdd_10MHz_ping_ue.txt - ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE - scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC - check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 - - echo "############################################################" - echo "Iperf DL" - echo "############################################################" - CURR_IPERF_LOG_BASE=tdd_10MHz_iperf_dl - iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 6 $CURR_IPERF_LOG_BASE - scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC - check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6 - - echo "############################################################" - echo "Terminate enb/ue simulators" - echo "############################################################" - terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC - scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC - recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC - +# Raphael: Disable any further test in develop-nr to validate CI pipeline +# +# echo "############################################################" +# echo "Terminate enb/ue simulators" +# echo "############################################################" +# terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC +# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC +# +# echo "############################################################" +# echo "Starting the eNB in TDD-10MHz mode" +# echo "############################################################" +# CURRENT_ENB_LOG_FILE=tdd_10MHz_enb.log +# start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 lte-tdd-basic-sim.conf +# +# echo "############################################################" +# echo "Starting the UE in TDD-10MHz mode" +# echo "############################################################" +# CURRENT_UE_LOG_FILE=tdd_10MHz_ue.log +# start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 50 2350 +# if [ $UE_SYNC -eq 0 ] +# then +# echo "Problem w/ eNB and UE not syncing" +# terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC +# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC +# terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR +# exit -1 +# fi +# get_ue_ip_addr $VM_CMDS $VM_IP_ADDR +# +# echo "############################################################" +# echo "Pinging the UE" +# echo "############################################################" +# PING_LOG_FILE=tdd_10MHz_ping_ue.txt +# ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE +# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC +# check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 +# +# echo "############################################################" +# echo "Iperf DL" +# echo "############################################################" +# CURR_IPERF_LOG_BASE=tdd_10MHz_iperf_dl +# iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 6 $CURR_IPERF_LOG_BASE +# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC +# check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6 +# +# echo "############################################################" +# echo "Terminate enb/ue simulators" +# echo "############################################################" +# terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC +# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC +# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC +# # Disabling TDD-20MHz test since it is very unstable # # echo "############################################################" From 63cb7dd5b5dcdde8e8e6abd2c071265e191dbd18 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 29 Oct 2018 11:02:00 +0100 Subject: [PATCH 364/379] CI: missing log files in zip for artifact Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index 982cd0e3cc..3af1a56c6f 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -281,7 +281,7 @@ pipeline { always { script { dir ('archives') { - sh "zip -r -qq vm_build_logs.zip basic_sim enb_usrp phy_sim cppcheck gnb_usrp nrue_usrp red_hat" + sh "zip -r -qq vm_build_logs.zip basic_sim enb_usrp phy_sim cppcheck enb_eth ue_eth gnb_usrp nrue_usrp red_hat" } if(fileExists('archives/vm_build_logs.zip')) { archiveArtifacts artifacts: 'archives/vm_build_logs.zip' From 6bc86f88b3a50fdb71a673184c3f1cafa892aa91 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 29 Oct 2018 12:05:39 +0100 Subject: [PATCH 365/379] CI: executable has moved for python script Signed-off-by: Raphael Defosseux --- ci-scripts/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 52c742fbcb..9ad5dd18f2 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -371,7 +371,7 @@ class SSHConnection(): # Launch eNB with the modified config file self.command('source oaienv', '\$', 5) self.command('cd cmake_targets', '\$', 5) - self.command('echo "ulimit -c unlimited && ./lte_build_oai/build/lte-softmodem -O ' + self.eNBSourceCodePath + '/' + ci_full_config_file + extra_options + '" > ./my-lte-softmodem-run' + str(SSH.eNB_instance) + '.sh ', '\$', 5) + self.command('echo "ulimit -c unlimited && ./ran_build/build/lte-softmodem -O ' + self.eNBSourceCodePath + '/' + ci_full_config_file + extra_options + '" > ./my-lte-softmodem-run' + str(SSH.eNB_instance) + '.sh ', '\$', 5) self.command('chmod 775 ./my-lte-softmodem-run' + str(SSH.eNB_instance) + '.sh ', '\$', 5) self.command('echo ' + self.eNBPassword + ' | sudo -S rm -Rf enb_' + SSH.testCase_id + '.log', '\$', 5) self.command('echo ' + self.eNBPassword + ' | sudo -S -E daemon --inherit --unsafe --name=enb' + str(SSH.eNB_instance) + '_daemon --chdir=' + self.eNBSourceCodePath + '/cmake_targets -o ' + self.eNBSourceCodePath + '/cmake_targets/enb_' + SSH.testCase_id + '.log ./my-lte-softmodem-run' + str(SSH.eNB_instance) + '.sh', '\$', 5) From d4ae319f9fe85f9a2f22c8a4d2cde16e251cfa8e Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Mon, 29 Oct 2018 00:11:25 -0700 Subject: [PATCH 366/379] adding some error checks on trx_read --- targets/RT/USER/nr-ue.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/targets/RT/USER/nr-ue.c b/targets/RT/USER/nr-ue.c index 80816ba011..393fc490ca 100644 --- a/targets/RT/USER/nr-ue.c +++ b/targets/RT/USER/nr-ue.c @@ -337,7 +337,7 @@ static void *UE_thread_synch(void *arg) { if ( threads.iq != -1 ) CPU_SET(threads.iq, &cpuset); // this thread priority must be lower that the main acquisition thread - sprintf(threadname, "sync UE %d\n", UE->Mod_id); + sprintf(threadname, "sync UE %d", UE->Mod_id); init_thread(100000, 500000, FIFO_PRIORITY-1, &cpuset, threadname); UE->is_synchronized = 0; @@ -840,10 +840,10 @@ void *UE_thread(void *arg) { if (is_synchronized == 0) { #if BASIC_SIMULATOR - while (!((instance_cnt_synch = UE->proc.instance_cnt_synch) < 0)) { - printf("ue sync not ready\n"); - usleep(500*1000); - } + while (!((instance_cnt_synch = UE->proc.instance_cnt_synch) < 0)) { + printf("ue sync not ready\n"); + usleep(500*1000); + } #endif if (instance_cnt_synch < 0) { // we can invoke the synch // grab 10 ms of signal and wakeup synch thread @@ -856,7 +856,7 @@ void *UE_thread(void *arg) { ×tamp, rxp, UE->frame_parms.samples_per_subframe*10, - UE->frame_parms.nb_antennas_rx), ""); + UE->frame_parms.nb_antennas_rx), "error reading samples"); AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), ""); instance_cnt_synch = ++UE->proc.instance_cnt_synch; @@ -878,11 +878,12 @@ void *UE_thread(void *arg) { rxp[i] = (void*)&dummy_rx[i][0]; for (int sf=0; sfrfdevice.trx_read_func(&UE->rfdevice, - ×tamp, - rxp, - UE->frame_parms.samples_per_subframe, - UE->frame_parms.nb_antennas_rx); + AssertFatal(UE->frame_parms.samples_per_subframe== + UE->rfdevice.trx_read_func(&UE->rfdevice, + ×tamp, + rxp, + UE->frame_parms.samples_per_subframe, + UE->frame_parms.nb_antennas_rx), "error reading samples"); } #endif } From 99069f4a0d79ba386ff400b43a21786b2f079eb4 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Mon, 29 Oct 2018 12:37:39 -0700 Subject: [PATCH 367/379] updating eNB_usrp.gtkw --- targets/RT/USER/eNB_usrp.gtkw | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/targets/RT/USER/eNB_usrp.gtkw b/targets/RT/USER/eNB_usrp.gtkw index e50c1831b6..2f448dc680 100644 --- a/targets/RT/USER/eNB_usrp.gtkw +++ b/targets/RT/USER/eNB_usrp.gtkw @@ -1,15 +1,15 @@ [*] -[*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI -[*] Thu Feb 22 14:46:40 2018 +[*] GTKWave Analyzer v3.3.66 (w)1999-2015 BSI +[*] Mon Oct 29 17:36:13 2018 [*] -[dumpfile] "/tmp/openair_dump_eNB.vcd" -[dumpfile_mtime] "Thu Feb 22 14:44:26 2018" -[dumpfile_size] 3482761 -[savefile] "/homes/wangts/openairinterface5g/targets/RT/USER/eNB_usrp.gtkw" -[timestart] 4525000000 -[size] 1920 1018 -[pos] 0 22 -*-21.506693 4530514310 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 +[dumpfile] "/mnt/hgfs/Documents/Devel/openair_dump_eNB.vcd" +[dumpfile_mtime] "Mon Oct 29 17:34:25 2018" +[dumpfile_size] 4559568 +[savefile] "/home/kaltenbe/Devel/openairinterface5g/targets/RT/USER/eNB_usrp.gtkw" +[timestart] 7635200000 +[size] 1535 780 +[pos] -1 -1 +*-21.832302 7639830000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 [sst_width] 386 [signals_width] 344 [sst_expanded] 1 @@ -34,9 +34,7 @@ functions.macxface_ue_scheduler functions.phy_eNB_ofdm_mod_l @24 variables.frame_number_RX0_eNB[63:0] -@25 variables.subframe_number_RX0_eNB[63:0] -@24 variables.frame_number_TX0_eNB[63:0] variables.subframe_number_TX0_eNB[63:0] variables.frame_number_RX1_eNB[63:0] @@ -56,11 +54,15 @@ functions.phy_procedures_eNb_rx_uespec1 functions.phy_enb_sfgen functions.phy_procedures_eNb_tx0 functions.phy_procedures_eNb_tx1 +@29 +functions.phy_procedures_ru_feprx0 +@28 functions.phy_procedures_ru_feprx1 functions.phy_procedures_ru_feptx_ofdm0 functions.phy_procedures_ru_feptx_ofdm1 functions.phy_procedures_ru_feptx_prec0 functions.phy_procedures_ru_feptx_prec1 +functions.eNB_thread_rxtx0 functions.eNB_thread_rxtx1 functions.phy_enb_sfgen functions.phy_enb_prach_rx From a3c764499277716015ccb6721144b928549e44f4 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Mon, 29 Oct 2018 21:37:39 +0100 Subject: [PATCH 368/379] adding thread config to gNB --- openair2/GNB_APP/gnb_config.c | 5 +++-- targets/RT/USER/nr-softmodem.c | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index 114fe42732..ac5c8e8b5a 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -290,7 +290,7 @@ void RCconfig_NR_L1(void) { } if(strcmp(*(L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_mac") == 0) { - sf_ahead = 4; // Need 4 subframe gap between RX and TX + sf_ahead = 2; // Need 4 subframe gap between RX and TX }else if (strcmp(*(L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "nfapi") == 0) { RC.gNB[j][0]->eth_params_n.local_if_name = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_IF_NAME_IDX].strptr)); RC.gNB[j][0]->eth_params_n.my_addr = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_ADDRESS_IDX].strptr)); @@ -3016,6 +3016,7 @@ void NRRCConfig(void) { config_getlist( &RUParamList,NULL,0, NULL); RC.nb_RU = RUParamList.numelt; - + RCconfig_parallel(); + } diff --git a/targets/RT/USER/nr-softmodem.c b/targets/RT/USER/nr-softmodem.c index 23c047822a..481386a7c8 100644 --- a/targets/RT/USER/nr-softmodem.c +++ b/targets/RT/USER/nr-softmodem.c @@ -584,6 +584,8 @@ static void get_options(void) { NB_RU = RC.nb_RU; printf("Configuration: nb_rrc_inst %d, nb_nr_L1_inst %d, nb_ru %d\n",NB_gNB_INST,RC.nb_nr_L1_inst,NB_RU); } + if(parallel_config != NULL) set_parallel_conf(parallel_config); + if(worker_config != NULL) set_worker_conf(worker_config); } From d354ededf459d79ded19fbda68b825924773d893 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 30 Oct 2018 12:26:05 +0100 Subject: [PATCH 369/379] CI: optimization to build incrementally in time Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 117 +++++----- ci-scripts/buildOnVM.sh | 61 ++++- ci-scripts/waitBuildOnVM.sh | 406 ++++++++++++++++++++++++++++++++++ 3 files changed, 517 insertions(+), 67 deletions(-) create mode 100755 ci-scripts/waitBuildOnVM.sh diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index 3af1a56c6f..f141b2ffc2 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -115,50 +115,10 @@ pipeline { } } - stage ("Start VM -- cppcheck") { - steps { - timeout (time: 5, unit: 'MINUTES') { - sh "./ci-scripts/createVM.sh --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}" - } - } - } - - stage ("Start VM -- enb-usrp") { - steps { - timeout (time: 5, unit: 'MINUTES') { - sh "./ci-scripts/createVM.sh --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}" - } - } - } - stage ("Start VM -- basic-sim") { steps { timeout (time: 5, unit: 'MINUTES') { - sh "./ci-scripts/createVM.sh --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" - } - } - } - - stage ("Start VM -- phy-sim") { - steps { - timeout (time: 5, unit: 'MINUTES') { - sh "./ci-scripts/createVM.sh --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" - } - } - } - - stage ("Start VM -- enb-ethernet") { - steps { - timeout (time: 5, unit: 'MINUTES') { - sh "./ci-scripts/createVM.sh --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID}" - } - } - } - - stage ("Start VM -- ue-ethernet") { - steps { - timeout (time: 5, unit: 'MINUTES') { - sh "./ci-scripts/createVM.sh --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" } } } @@ -166,16 +126,56 @@ pipeline { stage ("Start VM -- gnb-usrp") { steps { timeout (time: 5, unit: 'MINUTES') { - sh "./ci-scripts/createVM.sh --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}" - } + sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" + } } } stage ("Start VM -- nu-ue-usrp") { steps { timeout (time: 5, unit: 'MINUTES') { - sh "./ci-scripts/createVM.sh --variant nu-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}" - } + sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant nu-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" + } + } + } + + stage ("Start VM -- enb-usrp") { + steps { + timeout (time: 5, unit: 'MINUTES') { + sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" + } + } + } + + stage ("Start VM -- enb-ethernet") { + steps { + timeout (time: 5, unit: 'MINUTES') { + sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" + } + } + } + + stage ("Start VM -- ue-ethernet") { + steps { + timeout (time: 5, unit: 'MINUTES') { + sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" + } + } + } + + stage ("Start VM -- phy-sim") { + steps { + timeout (time: 5, unit: 'MINUTES') { + sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" + } + } + } + + stage ("Start VM -- cppcheck") { + steps { + timeout (time: 5, unit: 'MINUTES') { + sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" + } } } @@ -185,7 +185,7 @@ pipeline { steps { gitlabCommitStatus(name: "Analysis with cppcheck") { timeout (time: 20, unit: 'MINUTES') { - sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + sh "./ci-scripts/waitBuildOnVM.sh --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}" } } } @@ -194,7 +194,7 @@ pipeline { steps { gitlabCommitStatus(name: "Build eNb-USRP") { timeout (time: 20, unit: 'MINUTES') { - sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + sh "./ci-scripts/waitBuildOnVM.sh --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}" } } } @@ -203,7 +203,7 @@ pipeline { steps { gitlabCommitStatus(name: "Build basic-sim") { timeout (time: 20, unit: 'MINUTES') { - sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + sh "./ci-scripts/waitBuildOnVM.sh --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" } } } @@ -212,7 +212,7 @@ pipeline { steps { gitlabCommitStatus(name: "Build eNb-ethernet") { timeout (time: 20, unit: 'MINUTES') { - sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + sh "./ci-scripts/waitBuildOnVM.sh --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" } } } @@ -221,18 +221,17 @@ pipeline { steps { gitlabCommitStatus(name: "Build UE-ethernet") { timeout (time: 20, unit: 'MINUTES') { - sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + sh "./ci-scripts/waitBuildOnVM.sh --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" } } } } - - stage ("Build 5G gNB-USRP") { + stage ("Build 5G gNB-USRP") { steps { gitlabCommitStatus(name: "Build gNb-usrp") { timeout (time: 20, unit: 'MINUTES') { - sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}" - } + sh "./ci-scripts/waitBuildOnVM.sh --workspace $WORKSPACE --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + } } } } @@ -240,8 +239,8 @@ pipeline { steps { gitlabCommitStatus(name: "Build nr-UE-usrp") { timeout (time: 20, unit: 'MINUTES') { - sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant nu-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}" - } + sh "./ci-scripts/waitBuildOnVM.sh --workspace $WORKSPACE --variant nu-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}" + } } } } @@ -249,8 +248,8 @@ pipeline { steps { gitlabCommitStatus(name: "Build phy-sim") { timeout (time: 20, unit: 'MINUTES') { - sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" - } + sh "./ci-scripts/waitBuildOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + } } } } @@ -329,6 +328,7 @@ pipeline { } } } +/* Disabled for the moment: main.py is pulled over from develop branch for the moment.. problem of location stage ("Test on CI bench #1") { stages { stage ("Test FDD - Band 7 - B210") { @@ -529,6 +529,7 @@ pipeline { } } } +*/ } post { always { diff --git a/ci-scripts/buildOnVM.sh b/ci-scripts/buildOnVM.sh index e779e958e8..1540ff7366 100755 --- a/ci-scripts/buildOnVM.sh +++ b/ci-scripts/buildOnVM.sh @@ -57,6 +57,9 @@ function usage { echo " --keep-vm-alive OR -k" echo " Keep the VM alive after the build." echo "" + echo " --daemon OR -D" + echo " Run as daemon" + echo "" echo " --help OR -h" echo " Print this help message." echo "" @@ -96,6 +99,7 @@ LOG_PATTERN=.Rel15.txt NB_PATTERN_FILES=4 BUILD_OPTIONS="--eNB -w USRP" KEEP_VM_ALIVE=0 +DAEMON=0 while [[ $# -gt 0 ]] do @@ -126,6 +130,10 @@ case $key in KEEP_VM_ALIVE=1 shift ;; + -D|--daemon) + DAEMON=1 + shift + ;; -v1) VM_NAME=ci-enb-usrp ARCHIVES_LOC=enb_usrp @@ -331,13 +339,27 @@ echo "sudo cp 01proxy /etc/apt/apt.conf.d/" > $VM_CMDS echo "touch /home/ubuntu/.hushlogin" >> $VM_CMDS if [[ "$VM_NAME" == *"-cppcheck"* ]] then - echo "echo \"sudo apt-get --yes --quiet install zip cppcheck \"" >> $VM_CMDS - echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS - echo "sudo apt-get --yes install zip cppcheck >> zip-install.txt 2>&1" >> $VM_CMDS + if [ $DAEMON -eq 0 ] + then + echo "echo \"sudo apt-get --yes --quiet install zip cppcheck \"" >> $VM_CMDS + echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS + echo "sudo apt-get --yes install zip cppcheck >> zip-install.txt 2>&1" >> $VM_CMDS + else + echo "echo \"sudo apt-get --yes --quiet install zip daemon cppcheck \"" >> $VM_CMDS + echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS + echo "sudo apt-get --yes install zip daemon cppcheck >> zip-install.txt 2>&1" >> $VM_CMDS + fi else - echo "echo \"sudo apt-get --yes --quiet install zip subversion libboost-dev \"" >> $VM_CMDS - echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS - echo "sudo apt-get --yes install zip subversion libboost-dev >> zip-install.txt 2>&1" >> $VM_CMDS + if [ $DAEMON -eq 0 ] + then + echo "echo \"sudo apt-get --yes --quiet install zip subversion libboost-dev \"" >> $VM_CMDS + echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS + echo "sudo apt-get --yes install zip subversion libboost-dev >> zip-install.txt 2>&1" >> $VM_CMDS + else + echo "echo \"sudo apt-get --yes --quiet install zip daemon subversion libboost-dev \"" >> $VM_CMDS + echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS + echo "sudo apt-get --yes install zip daemon subversion libboost-dev >> zip-install.txt 2>&1" >> $VM_CMDS + fi fi echo "mkdir tmp" >> $VM_CMDS echo "cd tmp" >> $VM_CMDS @@ -348,17 +370,38 @@ then echo "mkdir cmake_targets/log" >> $VM_CMDS echo "cp /home/ubuntu/zip-install.txt cmake_targets/log" >> $VM_CMDS echo "echo \"cppcheck $BUILD_OPTIONS . \"" >> $VM_CMDS - echo "cppcheck $BUILD_OPTIONS . 2> cmake_targets/log/cppcheck.xml 1> cmake_targets/log/cppcheck_build.txt" >> $VM_CMDS + if [ $DAEMON -eq 0 ] + then + echo "cppcheck $BUILD_OPTIONS . 2> cmake_targets/log/cppcheck.xml 1> cmake_targets/log/cppcheck_build.txt" >> $VM_CMDS + else + echo "echo \"cppcheck $BUILD_OPTIONS .\" > ./my-vm-build.sh" >> $VM_CMDS + echo "chmod 775 ./my-vm-build.sh " >> $VM_CMDS + echo "sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp -O /home/ubuntu/tmp/cmake_targets/log/cppcheck_build.txt -E /home/ubuntu/tmp/cmake_targets/log/cppcheck.xml ./my-vm-build.sh" >> $VM_CMDS + fi else echo "echo \"source oaienv\"" >> $VM_CMDS echo "source oaienv" >> $VM_CMDS echo "cd cmake_targets/" >> $VM_CMDS echo "mkdir log" >> $VM_CMDS echo "cp /home/ubuntu/zip-install.txt log" >> $VM_CMDS - echo "echo \"./build_oai -I $BUILD_OPTIONS \"" >> $VM_CMDS - echo "./build_oai -I $BUILD_OPTIONS > log/install-build.txt 2>&1" >> $VM_CMDS + if [ $DAEMON -eq 0 ] + then + echo "echo \"./build_oai -I $BUILD_OPTIONS \"" >> $VM_CMDS + echo "./build_oai -I $BUILD_OPTIONS > log/install-build.txt 2>&1" >> $VM_CMDS + else + echo "echo \"./build_oai -I $BUILD_OPTIONS\" > ./my-vm-build.sh" >> $VM_CMDS + echo "chmod 775 ./my-vm-build.sh " >> $VM_CMDS + echo "echo \"sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp/cmake_targets -o /home/ubuntu/tmp/cmake_targets/log/install-build.txt ./my-vm-build.sh\"" >> $VM_CMDS + echo "sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp/cmake_targets -o /home/ubuntu/tmp/cmake_targets/log/install-build.txt ./my-vm-build.sh" >> $VM_CMDS + fi fi ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS +if [ $DAEMON -eq 1 ] +then + rm -f $VM_CMDS + echo "STATUS is OK" + exit 0 +fi echo "############################################################" echo "Creating a tmp folder to store results and artifacts" diff --git a/ci-scripts/waitBuildOnVM.sh b/ci-scripts/waitBuildOnVM.sh new file mode 100755 index 0000000000..011a32bbb9 --- /dev/null +++ b/ci-scripts/waitBuildOnVM.sh @@ -0,0 +1,406 @@ +#!/bin/bash +#/* +# * 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.1 (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 +# */ + +function usage { + echo "OAI VM Build Check script" + echo " Original Author: Raphael Defosseux" + echo " Requirements:" + echo " -- uvtool uvtool-libvirt apt-cacher" + echo " -- xenial image already synced" + echo " Default:" + echo " -- eNB with USRP" + echo "" + echo "Usage:" + echo "------" + echo " waitBuildOnVM.sh [OPTIONS]" + echo "" + echo "Options:" + echo "--------" + echo " --job-name #### OR -jn ####" + echo " Specify the name of the Jenkins job." + echo "" + echo " --build-id #### OR -id ####" + echo " Specify the build ID of the Jenkins job." + echo "" + echo " --workspace #### OR -ws ####" + echo " Specify the workspace." + echo "" + echo " --variant enb-usrp OR -v1" + echo " --variant basic-sim OR -v2" + echo " --variant phy-sim OR -v3" + echo " --variant cppcheck OR -v4" + echo " --variant gnb-usrp OR -v5" + echo " --variant nu-ue-usrp OR -v6" + echo " --variant enb-ethernet OR -v7" + echo " --variant ue-ethernet OR -v8" + echo " Specify the variant to build." + echo "" + echo " --keep-vm-alive OR -k" + echo " Keep the VM alive after the build." + echo "" + echo " --help OR -h" + echo " Print this help message." + echo "" +} + +function variant_usage { + echo "OAI VM Build Check script" + echo " Original Author: Raphael Defosseux" + echo "" + echo " --variant enb-usrp OR -v1" + echo " --variant basic-sim OR -v2" + echo " --variant phy-sim OR -v3" + echo " --variant cppcheck OR -v4" + echo " --variant gnb-usrp OR -v5" + echo " --variant nu-ue-usrp OR -v6" + echo " --variant enb-ethernet OR -v7" + echo " --variant ue-ethernet OR -v8" + echo "" +} + +if [ $# -lt 1 ] || [ $# -gt 9 ] +then + echo "Syntax Error: not the correct number of arguments" + echo "" + usage + exit 1 +fi + +VM_TEMPLATE=ci- +JOB_NAME=XX +BUILD_ID=XX +VM_NAME=ci-enb-usrp +VM_MEMORY=2048 +VM_CPU=4 +ARCHIVES_LOC=enb_usrp +LOG_PATTERN=.Rel15.txt +NB_PATTERN_FILES=4 +BUILD_OPTIONS="--eNB -w USRP" +KEEP_VM_ALIVE=0 + +while [[ $# -gt 0 ]] +do +key="$1" + +case $key in + -h|--help) + shift + usage + exit 0 + ;; + -jn|--job-name) + JOB_NAME="$2" + shift + shift + ;; + -id|--build-id) + BUILD_ID="$2" + shift + shift + ;; + -ws|--workspace) + JENKINS_WKSP="$2" + shift + shift + ;; + -k|--keep-vm-alive) + KEEP_VM_ALIVE=1 + shift + ;; + -v1) + VM_NAME=ci-enb-usrp + ARCHIVES_LOC=enb_usrp + LOG_PATTERN=.Rel15.txt + NB_PATTERN_FILES=4 + BUILD_OPTIONS="--eNB -w USRP --mu" + shift + ;; + -v2) + VM_NAME=ci-basic-sim + ARCHIVES_LOC=basic_sim + LOG_PATTERN=basic_simulator + NB_PATTERN_FILES=2 + BUILD_OPTIONS="--basic-simulator" + VM_MEMORY=8192 + VM_CPU=4 + shift + ;; + -v3) + VM_NAME=ci-phy-sim + ARCHIVES_LOC=phy_sim + LOG_PATTERN=.Rel15.txt + NB_PATTERN_FILES=6 + BUILD_OPTIONS="--phy_simulators" + shift + ;; + -v4) + VM_NAME=ci-cppcheck + VM_MEMORY=8192 + ARCHIVES_LOC=cppcheck + LOG_PATTERN=cppcheck.xml + NB_PATTERN_FILES=1 + BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2 -i openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c" + shift + ;; + -v5) + VM_NAME=ci-gnb-usrp + ARCHIVES_LOC=gnb_usrp + LOG_PATTERN=.Rel15.txt + NB_PATTERN_FILES=4 + BUILD_OPTIONS="--gNB -w USRP" + shift + ;; + -v6) + VM_NAME=ci-ue-nr-usrp + ARCHIVES_LOC=nrue_usrp + LOG_PATTERN=.Rel15.txt + NB_PATTERN_FILES=4 + BUILD_OPTIONS="--nrUE -w USRP" + shift + ;; + -v7) + VM_NAME=ci-enb-ethernet + ARCHIVES_LOC=enb_eth + LOG_PATTERN=.Rel15.txt + NB_PATTERN_FILES=6 + BUILD_OPTIONS="--eNB -t ETHERNET --noS1" + shift + ;; + -v8) + VM_NAME=ci-ue-ethernet + ARCHIVES_LOC=ue_eth + LOG_PATTERN=.Rel15.txt + NB_PATTERN_FILES=6 + BUILD_OPTIONS="--UE -t ETHERNET --noS1" + shift + ;; + --variant) + variant="$2" + case $variant in + enb-usrp) + VM_NAME=ci-enb-usrp + ARCHIVES_LOC=enb_usrp + LOG_PATTERN=.Rel15.txt + NB_PATTERN_FILES=4 + BUILD_OPTIONS="--eNB -w USRP --mu" + ;; + basic-sim) + VM_NAME=ci-basic-sim + ARCHIVES_LOC=basic_sim + LOG_PATTERN=basic_simulator + NB_PATTERN_FILES=2 + BUILD_OPTIONS="--basic-simulator" + VM_MEMORY=8192 + VM_CPU=4 + ;; + phy-sim) + VM_NAME=ci-phy-sim + ARCHIVES_LOC=phy_sim + LOG_PATTERN=.Rel15.txt + NB_PATTERN_FILES=6 + BUILD_OPTIONS="--phy_simulators" + ;; + cppcheck) + VM_NAME=ci-cppcheck + VM_MEMORY=8192 + ARCHIVES_LOC=cppcheck + LOG_PATTERN=cppcheck.xml + NB_PATTERN_FILES=1 + BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2 -i openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c" + ;; + gnb-usrp) + VM_NAME=ci-gnb-usrp + ARCHIVES_LOC=gnb_usrp + LOG_PATTERN=.Rel15.txt + NB_PATTERN_FILES=4 + BUILD_OPTIONS="--gNB -w USRP" + ;; + nu-ue-usrp) + VM_NAME=ci-ue-nr-usrp + ARCHIVES_LOC=nrue_usrp + LOG_PATTERN=.Rel15.txt + NB_PATTERN_FILES=4 + BUILD_OPTIONS="--nrUE -w USRP" + ;; + enb-ethernet) + VM_NAME=ci-enb-ethernet + ARCHIVES_LOC=enb_eth + LOG_PATTERN=.Rel15.txt + NB_PATTERN_FILES=6 + BUILD_OPTIONS="--eNB -t ETHERNET --noS1" + ;; + ue-ethernet) + VM_NAME=ci-ue-ethernet + ARCHIVES_LOC=ue_eth + LOG_PATTERN=.Rel15.txt + NB_PATTERN_FILES=6 + BUILD_OPTIONS="--UE -t ETHERNET --noS1" + ;; + *) + echo "" + echo "Syntax Error: Invalid Variant option -> $variant" + echo "" + variant_usage + exit 1 + esac + shift + shift + ;; + *) + echo "Syntax Error: unknown option: $key" + echo "" + usage + exit 1 +esac +done + +if [ ! -f $JENKINS_WKSP/localZip.zip ] +then + echo "Missing localZip.zip file!" + exit 1 +fi +if [ ! -f /etc/apt/apt.conf.d/01proxy ] +then + echo "Missing /etc/apt/apt.conf.d/01proxy file!" + echo "Is apt-cacher installed and configured?" + exit 1 +fi + +if [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ] +then + VM_TEMPLATE=ci- +else + VM_TEMPLATE=${JOB_NAME}-b${BUILD_ID}- +fi + +VM_NAME=`echo $VM_NAME | sed -e "s#ci-#$VM_TEMPLATE#"` +VM_CMDS=${VM_NAME}_cmds.txt +ARCHIVES_LOC=${JENKINS_WKSP}/archives/${ARCHIVES_LOC} + +echo "VM_NAME = $VM_NAME" +echo "VM_CMD_FILE = $VM_CMDS" +echo "JENKINS_WKSP = $JENKINS_WKSP" +echo "ARCHIVES_LOC = $ARCHIVES_LOC" +echo "BUILD_OPTIONS = $BUILD_OPTIONS" + +IS_VM_ALIVE=`uvt-kvm list | grep -c $VM_NAME` + +if [ $IS_VM_ALIVE -eq 0 ] +then + echo "############################################################" + echo "You should have created the VM before doing anything" + echo "############################################################" + exit 1 +fi + +echo "Waiting for VM to be started" +uvt-kvm wait $VM_NAME --insecure + +VM_IP_ADDR=`uvt-kvm ip $VM_NAME` +echo "$VM_NAME has for IP addr = $VM_IP_ADDR" + +echo "############################################################" +echo "Waiting build process to end on VM ($VM_NAME)" +echo "############################################################" + +if [[ "$VM_NAME" == *"-cppcheck"* ]] +then + echo "echo \"ps -aux | grep cppcheck \"" >> $VM_CMDS + echo "while [ \$(ps -aux | grep --color=never cppcheck | grep -v grep | wc -l) -gt 0 ]; do sleep 3; done" >> $VM_CMDS +else + echo "echo \"ps -aux | grep build \"" >> $VM_CMDS + echo "while [ \$(ps -aux | grep --color=never build_oai | grep -v grep | wc -l) -gt 0 ]; do sleep 3; done" >> $VM_CMDS +fi + +ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS + +echo "############################################################" +echo "Creating a tmp folder to store results and artifacts" +echo "############################################################" +if [ ! -d $JENKINS_WKSP/archives ] +then + mkdir $JENKINS_WKSP/archives +fi + +if [ ! -d $ARCHIVES_LOC ] +then + mkdir $ARCHIVES_LOC +fi + +scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.txt $ARCHIVES_LOC +if [[ "$VM_NAME" == *"-cppcheck"* ]] +then + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.xml $ARCHIVES_LOC +fi + +if [ $KEEP_VM_ALIVE -eq 0 ] +then + echo "############################################################" + echo "Destroying VM" + echo "############################################################" + uvt-kvm destroy $VM_NAME + ssh-keygen -R $VM_IP_ADDR +fi +rm -f $VM_CMDS + +echo "############################################################" +echo "Checking build status" +echo "############################################################" + +LOG_FILES=`ls $ARCHIVES_LOC/*.txt $ARCHIVES_LOC/*.xml` +STATUS=0 +NB_FOUND_FILES=0 + +for FULLFILE in $LOG_FILES +do + if [[ $FULLFILE == *"$LOG_PATTERN"* ]] + then + filename=$(basename -- "$FULLFILE") + if [ "$LOG_PATTERN" == ".Rel15.txt" ] + then + PASS_PATTERN=`echo $filename | sed -e "s#$LOG_PATTERN##"` + fi + if [ "$LOG_PATTERN" == "basic_simulator" ] + then + PASS_PATTERN="lte-" + fi + if [ "$LOG_PATTERN" == "cppcheck.xml" ] + then + PASS_PATTERN="results version" + LOCAL_STAT=`egrep -c "$PASS_PATTERN" $FULLFILE` + else + LOCAL_STAT=`egrep -c "Built target $PASS_PATTERN" $FULLFILE` + fi + if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi + NB_FOUND_FILES=$((NB_FOUND_FILES + 1)) + fi +done + +if [ $NB_PATTERN_FILES -ne $NB_FOUND_FILES ]; then STATUS=-1; fi + +if [ $STATUS -eq 0 ] +then + echo "STATUS seems OK" +else + echo "STATUS failed?" +fi +exit $STATUS From 5d4cde099e44dcaa37fc547e9aa52d200471d307 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 30 Oct 2018 16:07:33 +0100 Subject: [PATCH 370/379] CI: fix basic simulator run Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 2 -- ci-scripts/buildOnVM.sh | 2 ++ ci-scripts/main.py | 13 ++++++++----- ci-scripts/runTestOnVM.sh | 5 ++++- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index f141b2ffc2..971125771e 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -328,7 +328,6 @@ pipeline { } } } -/* Disabled for the moment: main.py is pulled over from develop branch for the moment.. problem of location stage ("Test on CI bench #1") { stages { stage ("Test FDD - Band 7 - B210") { @@ -529,7 +528,6 @@ pipeline { } } } -*/ } post { always { diff --git a/ci-scripts/buildOnVM.sh b/ci-scripts/buildOnVM.sh index 1540ff7366..456d874154 100755 --- a/ci-scripts/buildOnVM.sh +++ b/ci-scripts/buildOnVM.sh @@ -368,6 +368,7 @@ echo "unzip -qq -DD ../localZip.zip" >> $VM_CMDS if [[ "$VM_NAME" == *"-cppcheck"* ]] then echo "mkdir cmake_targets/log" >> $VM_CMDS + echo "chmod 777 cmake_targets/log" >> $VM_CMDS echo "cp /home/ubuntu/zip-install.txt cmake_targets/log" >> $VM_CMDS echo "echo \"cppcheck $BUILD_OPTIONS . \"" >> $VM_CMDS if [ $DAEMON -eq 0 ] @@ -383,6 +384,7 @@ else echo "source oaienv" >> $VM_CMDS echo "cd cmake_targets/" >> $VM_CMDS echo "mkdir log" >> $VM_CMDS + echo "chmod 777 log" >> $VM_CMDS echo "cp /home/ubuntu/zip-install.txt log" >> $VM_CMDS if [ $DAEMON -eq 0 ] then diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 9ad5dd18f2..b54c6f3fab 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -268,12 +268,15 @@ class SSHConnection(): self.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5) self.command('source oaienv', '\$', 5) self.command('cd cmake_targets', '\$', 5) - self.command('mkdir -p log', '\$', 5) + self.command('mkdir -p log', '\$', 5) + self.command('chmod 777 log', '\$', 5) # no need to remove in log (git clean did the trick) - self.command('echo ' + self.eNBPassword + ' | sudo -S stdbuf -o0 ./build_oai ' + self.Build_eNB_args + ' 2>&1 | stdbuf -o0 tee -a compile_oai_enb.log', 'Bypassing the Tests', 600) + self.command('stdbuf -o0 ./build_oai ' + self.Build_eNB_args + ' 2>&1 | stdbuf -o0 tee -a compile_oai_enb.log', 'Bypassing the Tests', 600) self.command('mkdir -p build_log_' + SSH.testCase_id, '\$', 5) - self.command('echo ' + self.eNBPassword + ' | sudo -S mv log/* ' + 'build_log_' + SSH.testCase_id, '\$', 5) - self.command('echo ' + self.eNBPassword + ' | sudo -S mv compile_oai_enb.log ' + 'build_log_' + SSH.testCase_id, '\$', 5) + self.command('mv log/* ' + 'build_log_' + SSH.testCase_id, '\$', 5) + self.command('mv compile_oai_enb.log ' + 'build_log_' + SSH.testCase_id, '\$', 5) + # Workaround to run with develop-nr + self.command('if [ -e ran_build ]; then cp -rf ran_build lte_build_oai; fi', '\$', 30) self.close() self.CreateHtmlTestRow(self.Build_eNB_args, 'OK', ALL_PROCESSES_OK) @@ -371,7 +374,7 @@ class SSHConnection(): # Launch eNB with the modified config file self.command('source oaienv', '\$', 5) self.command('cd cmake_targets', '\$', 5) - self.command('echo "ulimit -c unlimited && ./ran_build/build/lte-softmodem -O ' + self.eNBSourceCodePath + '/' + ci_full_config_file + extra_options + '" > ./my-lte-softmodem-run' + str(SSH.eNB_instance) + '.sh ', '\$', 5) + self.command('echo "ulimit -c unlimited && ./lte_build_oai/build/lte-softmodem -O ' + self.eNBSourceCodePath + '/' + ci_full_config_file + extra_options + '" > ./my-lte-softmodem-run' + str(SSH.eNB_instance) + '.sh ', '\$', 5) self.command('chmod 775 ./my-lte-softmodem-run' + str(SSH.eNB_instance) + '.sh ', '\$', 5) self.command('echo ' + self.eNBPassword + ' | sudo -S rm -Rf enb_' + SSH.testCase_id + '.log', '\$', 5) self.command('echo ' + self.eNBPassword + ' | sudo -S -E daemon --inherit --unsafe --name=enb' + str(SSH.eNB_instance) + '_daemon --chdir=' + self.eNBSourceCodePath + '/cmake_targets -o ' + self.eNBSourceCodePath + '/cmake_targets/enb_' + SSH.testCase_id + '.log ./my-lte-softmodem-run' + str(SSH.eNB_instance) + '.sh', '\$', 5) diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index 63699d8f17..19e1c24934 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -89,6 +89,8 @@ function start_basic_sim_enb { echo "echo \"grep N_RB_DL ci-$LOC_CONF_FILE\"" >> $1 echo "grep N_RB_DL ci-$LOC_CONF_FILE | sed -e 's#N_RB_DL.*=#N_RB_DL =#'" >> $1 echo "echo \"cd /home/ubuntu/tmp/cmake_targets/basic_simulator/enb/\"" >> $1 + echo "sudo chmod 777 /home/ubuntu/tmp/cmake_targets/basic_simulator" >> $1 + echo "sudo chmod 777 /home/ubuntu/tmp/cmake_targets/basic_simulator/enb/" >> $1 echo "cd /home/ubuntu/tmp/cmake_targets/basic_simulator/enb/" >> $1 echo "echo \"ulimit -c unlimited && ./lte-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE\" > ./my-lte-softmodem-run.sh " >> $1 echo "chmod 775 ./my-lte-softmodem-run.sh" >> $1 @@ -105,7 +107,8 @@ function start_basic_sim_ue { local LOC_NB_RBS=$4 local LOC_FREQUENCY=$5 echo "echo \"cd /home/ubuntu/tmp/cmake_targets/basic_simulator/ue\"" > $1 - echo "cd /home/ubuntu/tmp/cmake_targets/basic_simulator/ue" > $1 + echo "sudo chmod 777 /home/ubuntu/tmp/cmake_targets/basic_simulator/ue" >> $1 + echo "cd /home/ubuntu/tmp/cmake_targets/basic_simulator/ue" >> $1 echo "echo \"./lte-uesoftmodem -C ${LOC_FREQUENCY}000000 -r $LOC_NB_RBS --ue-rxgain 140\" > ./my-lte-uesoftmodem-run.sh" >> $1 echo "chmod 775 ./my-lte-uesoftmodem-run.sh" >> $1 echo "cat ./my-lte-uesoftmodem-run.sh" >> $1 From 4929acc0fb86bb979d0adb34cea94a39f4fbef47 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Tue, 30 Oct 2018 17:25:10 +0100 Subject: [PATCH 371/379] removing unused duplicate file --- openair1/PHY/CODING/nrPolar_init.c | 204 ----------------------------- 1 file changed, 204 deletions(-) delete mode 100644 openair1/PHY/CODING/nrPolar_init.c diff --git a/openair1/PHY/CODING/nrPolar_init.c b/openair1/PHY/CODING/nrPolar_init.c deleted file mode 100644 index f606acbe95..0000000000 --- a/openair1/PHY/CODING/nrPolar_init.c +++ /dev/null @@ -1,204 +0,0 @@ -/* - * 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.1 (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 - */ - -#include "nrPolar_tools/nr_polar_defs.h" -#include "nrPolar_tools/nr_polar_pbch_defs.h" -#include "nrPolar_tools/nr_polar_uci_defs.h" - -void nr_polar_init(t_nrPolar_params* polarParams, int messageType) { - -uint32_t poly6 = 0x84000000; // 1000100000... -> D^6+D^5+1 -uint32_t poly11 = 0x63200000; //11000100001000... -> D^11+D^10+D^9+D^5+1 -//uint32_t poly16 = 0x81080000; //100000010000100... - > D^16+D^12+D^5+1 -//uint32_t poly24a = 0x864cfb00; //100001100100110011111011 -> D^24+D^23+D^18+D^17+D^14+D^11+D^10+D^7+D^6+D^5+D^4+D^3+D+1 -//uint32_t poly24b = 0x80006300; //100000000000000001100011 -> D^24+D^23+D^6+D^5+D+1 -uint32_t poly24c = 0xB2B11700; //101100101011000100010111 -> D^24... - - if (messageType == 0) { //DCI - - } else if (messageType == 1) { //PBCH - polarParams->n_max = NR_POLAR_PBCH_N_MAX; - polarParams->i_il = NR_POLAR_PBCH_I_IL; - polarParams->i_seg = NR_POLAR_PBCH_I_SEG; - polarParams->n_pc = NR_POLAR_PBCH_N_PC; - polarParams->n_pc_wm = NR_POLAR_PBCH_N_PC_WM; - polarParams->i_bil = NR_POLAR_PBCH_I_BIL; - polarParams->payloadBits = NR_POLAR_PBCH_PAYLOAD_BITS; - polarParams->encoderLength = NR_POLAR_PBCH_E; - polarParams->crcParityBits = NR_POLAR_PBCH_CRC_PARITY_BITS; - - polarParams->K = polarParams->payloadBits + polarParams->crcParityBits; // Number of bits to encode. - polarParams->N = nr_polar_output_length(polarParams->K, polarParams->encoderLength, polarParams->n_max); - polarParams->n = log2(polarParams->N); - - polarParams->crc_generator_matrix=crc24c_generator_matrix(polarParams->payloadBits); - polarParams->crc_polynomial = poly24c; - polarParams->G_N = nr_polar_kronecker_power_matrices(polarParams->n); - - //polar_encoder vectors: - polarParams->nr_polar_crc = malloc(sizeof(uint8_t) * polarParams->crcParityBits); - polarParams->nr_polar_cPrime = malloc(sizeof(uint8_t) * polarParams->K); - polarParams->nr_polar_d = malloc(sizeof(uint8_t) * polarParams->N); - - //Polar Coding vectors - polarParams->nr_polar_u = malloc(sizeof(uint8_t) * polarParams->N); //Decoder: nr_polar_uHat - polarParams->nr_polar_cPrime = malloc(sizeof(uint8_t) * polarParams->K); //Decoder: nr_polar_cHat - polarParams->nr_polar_b = malloc(sizeof(uint8_t) * polarParams->K); //Decoder: nr_polar_bHat - - polarParams->decoder_kernel = NULL;//polar_decoder_K56_N512_E864; - - - - } else if (messageType == 2) { //UCI - polarParams->payloadBits = NR_POLAR_PUCCH_PAYLOAD_BITS; //A depends on what they carry... - polarParams->encoderLength = NR_POLAR_PUCCH_E ; //E depends on other standards 6.3.1.4 - - if (polarParams->payloadBits <= 11) //Ref. 38-212, Section 6.3.1.2.2 - polarParams->crcParityBits = 0; //K=A - else //Ref. 38-212, Section 6.3.1.2.1 - { - if (polarParams->payloadBits < 20) - polarParams->crcParityBits = NR_POLAR_PUCCH_CRC_PARITY_BITS_SHORT; - else - polarParams->crcParityBits = NR_POLAR_PUCCH_CRC_PARITY_BITS_LONG; - - if (polarParams->payloadBits >= 360 && polarParams->encoderLength >= 1088) - polarParams->i_seg = NR_POLAR_PUCCH_I_SEG_LONG; // -> C=2 - else - polarParams->i_seg = NR_POLAR_PUCCH_I_SEG_SHORT; // -> C=1 - } - - polarParams->K = polarParams->payloadBits + polarParams->crcParityBits; // Number of bits to encode. - - //K_r = K/C ; C = I_seg+1 - if((polarParams->K)/(polarParams->i_seg+1)>=18 && (polarParams->K)/(polarParams->i_seg+1)<=25) //Ref. 38-212, Section 6.3.1.3.1 - { - polarParams->n_max = NR_POLAR_PUCCH_N_MAX; - polarParams->i_il =NR_POLAR_PUCCH_I_IL; - polarParams->n_pc = NR_POLAR_PUCCH_N_PC_SHORT; - - if( (polarParams->encoderLength - polarParams->K)/(polarParams->i_seg + 1) + 3 > 192 ) - polarParams->n_pc_wm = NR_POLAR_PUCCH_N_PC_WM_LONG; - else - polarParams->n_pc_wm = NR_POLAR_PUCCH_N_PC_WM_SHORT; - } - - if( (polarParams->K)/(polarParams->i_seg + 1) > 30 ) //Ref. 38-212, Section 6.3.1.3.1 - { - polarParams->n_max = NR_POLAR_PUCCH_N_MAX; - polarParams->i_il =NR_POLAR_PUCCH_I_IL; - polarParams->n_pc = NR_POLAR_PUCCH_N_PC_LONG; - polarParams->n_pc_wm = NR_POLAR_PUCCH_N_PC_WM_LONG; - } - - polarParams->i_bil = NR_POLAR_PUCCH_I_BIL; //Ref. 38-212, Section 6.3.1.4.1 - - polarParams->N = nr_polar_output_length(polarParams->K, polarParams->encoderLength, polarParams->n_max); - polarParams->n = log2(polarParams->N); - - if((polarParams->payloadBits) <= 19) - { - polarParams->crc_generator_matrix=crc6_generator_matrix(polarParams->payloadBits); - polarParams->crc_polynomial = poly6; - - } - else - { - polarParams->crc_generator_matrix=crc11_generator_matrix(polarParams->payloadBits); - polarParams->crc_polynomial = poly11; - } - polarParams->G_N = nr_polar_kronecker_power_matrices(polarParams->n); - - //polar_encoder vectors: - polarParams->nr_polar_crc = malloc(sizeof(uint8_t) * polarParams->crcParityBits); - polarParams->nr_polar_cPrime = malloc(sizeof(uint8_t) * polarParams->K); - polarParams->nr_polar_d = malloc(sizeof(uint8_t) * polarParams->N); - - //Polar Coding vectors - polarParams->nr_polar_u = malloc(sizeof(uint8_t) * polarParams->N); //Decoder: nr_polar_uHat - polarParams->nr_polar_cPrime = malloc(sizeof(uint8_t) * polarParams->K); //Decoder: nr_polar_cHat - polarParams->nr_polar_b = malloc(sizeof(uint8_t) * polarParams->K); //Decoder: nr_polar_bHat - - } - - polarParams->crcCorrectionBits = NR_POLAR_CRC_ERROR_CORRECTION_BITS; - - polarParams->crc256Table = malloc(sizeof(uint32_t)*256); - crcTable256Init(polarParams->crc_polynomial, polarParams->crc256Table); - polarParams->Q_0_Nminus1 = nr_polar_sequence_pattern(polarParams->n); - - polarParams->interleaving_pattern = malloc(sizeof(uint16_t) * polarParams->K); - nr_polar_interleaving_pattern(polarParams->K, polarParams->i_il, polarParams->interleaving_pattern); - - polarParams->rate_matching_pattern = malloc(sizeof(uint16_t) * polarParams->encoderLength); - uint16_t *J = malloc(sizeof(uint16_t) * polarParams->N); - nr_polar_rate_matching_pattern(polarParams->rate_matching_pattern, J, - nr_polar_subblock_interleaver_pattern, polarParams->K, polarParams->N, polarParams->encoderLength); - - - polarParams->information_bit_pattern = malloc(sizeof(uint8_t) * polarParams->N); - polarParams->Q_I_N = malloc(sizeof(int16_t) * (polarParams->K + polarParams->n_pc)); - polarParams->Q_F_N = malloc(sizeof(int16_t) * (polarParams->N+1)); // Last element shows the final array index assigned a value. - polarParams->Q_PC_N = malloc(sizeof(int16_t) * (polarParams->n_pc)); - for (int i=0; i<=polarParams->N; i++) polarParams->Q_F_N[i] = -1; // Empty array. - nr_polar_info_bit_pattern(polarParams->information_bit_pattern, - polarParams->Q_I_N, polarParams->Q_F_N, J, polarParams->Q_0_Nminus1, - polarParams->K, polarParams->N, polarParams->encoderLength, polarParams->n_pc); - - polarParams->channel_interleaver_pattern = malloc(sizeof(uint16_t) * polarParams->encoderLength); - nr_polar_channel_interleaver_pattern(polarParams->channel_interleaver_pattern, - polarParams->i_bil, polarParams->encoderLength); - - polarParams->extended_crc_generator_matrix = malloc(polarParams->K * sizeof(uint8_t *)); //G_P3 - uint8_t tempECGM[polarParams->K][polarParams->crcParityBits]; - for (int i = 0; i < polarParams->K; i++){ - polarParams->extended_crc_generator_matrix[i] = malloc(polarParams->crcParityBits * sizeof(uint8_t)); - } - - for (int i=0; ipayloadBits; i++) { - for (int j=0; jcrcParityBits; j++) { - tempECGM[i][j]=polarParams->crc_generator_matrix[i][j]; - } - } - for (int i=polarParams->payloadBits; iK; i++) { - for (int j=0; jcrcParityBits; j++) { - if( (i-polarParams->payloadBits) == j ){ - tempECGM[i][j]=1; - } else { - tempECGM[i][j]=0; - } - } - } - - for (int i=0; iK; i++) { - for (int j=0; jcrcParityBits; j++) { - polarParams->extended_crc_generator_matrix[i][j]=tempECGM[polarParams->interleaving_pattern[i]][j]; - } - } - - - build_decoder_tree(polarParams); - printf("decoder tree nodes %d\n",polarParams->tree.num_nodes); - - - - free(J); -} From 915d69ae52e1a6d085081b0fe4c93913ee9f1dde Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Tue, 30 Oct 2018 17:25:44 +0100 Subject: [PATCH 372/379] removing write_output and printf for real-time performance --- openair1/PHY/CODING/nr_polar_init.c | 2 +- targets/RT/USER/nr-ru.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openair1/PHY/CODING/nr_polar_init.c b/openair1/PHY/CODING/nr_polar_init.c index 72e487a738..895bace829 100644 --- a/openair1/PHY/CODING/nr_polar_init.c +++ b/openair1/PHY/CODING/nr_polar_init.c @@ -148,7 +148,7 @@ void nr_polar_init(t_nrPolar_paramsPtr *polarParams, free(J); build_decoder_tree(newPolarInitNode); - printf("decoder tree nodes %d\n",newPolarInitNode->tree.num_nodes); + //printf("decoder tree nodes %d\n",newPolarInitNode->tree.num_nodes); } else { AssertFatal(1 == 0, "[nr_polar_init] New t_nrPolar_paramsPtr could not be created"); diff --git a/targets/RT/USER/nr-ru.c b/targets/RT/USER/nr-ru.c index 04f2f3cdd4..9d74f6b361 100644 --- a/targets/RT/USER/nr-ru.c +++ b/targets/RT/USER/nr-ru.c @@ -844,12 +844,12 @@ void tx_rf(RU_t *ru) { for (i=0; inb_tx; i++) txp[i] = (void*)&ru->common.txdata[i][(proc->subframe_tx*fp->samples_per_subframe)-sf_extension]; - +/* if (proc->subframe_tx == 0){ write_output("txdataF_frame.m","txdataF_frame",&ru->common.txdataF_BF[i],fp->samples_per_subframe_wCP, 1, 1); write_output("txdata_frame.m","txdata_frame",&ru->common.txdata[i],fp->samples_per_subframe, 1, 1); } - +*/ VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (proc->timestamp_tx-ru->openair0_cfg.tx_sample_advance)&0xffffffff ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 ); // prepare tx buffer pointers From d81cd6dab7cf10f1e3d6c6cfc9da93a173a35cfa Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Tue, 30 Oct 2018 18:02:45 +0100 Subject: [PATCH 373/379] replacing nr_tti with nr_subframe --- targets/RT/USER/nr-ue.c | 53 ++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/targets/RT/USER/nr-ue.c b/targets/RT/USER/nr-ue.c index 393fc490ca..604d01deef 100644 --- a/targets/RT/USER/nr-ue.c +++ b/targets/RT/USER/nr-ue.c @@ -796,7 +796,7 @@ void *UE_thread(void *arg) { PHY_VARS_NR_UE *UE = (PHY_VARS_NR_UE *) arg; // int tx_enabled = 0; - int dummy_rx[UE->frame_parms.nb_antennas_rx][UE->frame_parms.samples_per_tti] __attribute__((aligned(32))); + int dummy_rx[UE->frame_parms.nb_antennas_rx][UE->frame_parms.samples_per_subframe] __attribute__((aligned(32))); openair0_timestamp timestamp; void* rxp[NB_ANTENNAS_RX], *txp[NB_ANTENNAS_TX]; int start_rx_stream = 0; @@ -828,7 +828,7 @@ void *UE_thread(void *arg) { //itti_send_msg_to_task (TASK_NAS_UE, UE->Mod_id + NB_eNB_INST, message_p); #endif - int tti_nr=-1; + int subframe_nr=-1; //int cumulated_shift=0; if ((oaisim_flag == 0) && (UE->mode != loop_through_memory)) AssertFatal(UE->rfdevice.trx_start_func(&UE->rfdevice) == 0, "Could not start the device\n"); @@ -926,12 +926,11 @@ void *UE_thread(void *arg) { rt_sleep_ns(1000*1000); } else { - tti_nr++; - int ttis_per_frame = LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*UE->frame_parms.ttis_per_subframe; - tti_nr %= ttis_per_frame; + subframe_nr++; + subframe_nr %= NR_NUMBER_OF_SUBFRAMES_PER_FRAME; UE_nr_rxtx_proc_t *proc = &UE->proc.proc_rxtx[thread_idx]; // update thread index for received subframe - UE->current_thread_id[tti_nr] = thread_idx; + UE->current_thread_id[subframe_nr] = thread_idx; #if BASIC_SIMULATOR { @@ -944,7 +943,7 @@ void *UE_thread(void *arg) { } } #endif - LOG_D(PHY,"Process TTI %d thread Idx %d \n", tti_nr, UE->current_thread_id[tti_nr]); + LOG_D(PHY,"Process subframe %d thread Idx %d \n", subframe_nr, UE->current_thread_id[subframe_nr]); thread_idx++; if(thread_idx>=RX_NB_TH) @@ -955,14 +954,14 @@ void *UE_thread(void *arg) { for (i=0; iframe_parms.nb_antennas_rx; i++) rxp[i] = (void*)&UE->common_vars.rxdata[i][UE->frame_parms.ofdm_symbol_size+ UE->frame_parms.nb_prefix_samples0+ - tti_nr*UE->frame_parms.samples_per_tti]; + subframe_nr*UE->frame_parms.samples_per_subframe]; for (i=0; iframe_parms.nb_antennas_tx; i++) - txp[i] = (void*)&UE->common_vars.txdata[i][((tti_nr+2)%10*UE->frame_parms.ttis_per_subframe)*UE->frame_parms.samples_per_tti]; + txp[i] = (void*)&UE->common_vars.txdata[i][((subframe_nr+2)%NR_NUMBER_OF_SUBFRAMES_PER_FRAME)*UE->frame_parms.samples_per_subframe]; int readBlockSize, writeBlockSize; - if (tti_nr<(ttis_per_frame - 1)) { - readBlockSize=UE->frame_parms.samples_per_tti; - writeBlockSize=UE->frame_parms.samples_per_tti; + if (subframe_nr<(NR_NUMBER_OF_SUBFRAMES_PER_FRAME - 1)) { + readBlockSize=UE->frame_parms.samples_per_subframe; + writeBlockSize=UE->frame_parms.samples_per_subframe; } else { // set TO compensation to zero UE->rx_offset_diff = 0; @@ -971,15 +970,15 @@ void *UE_thread(void *arg) { UE->rx_offset > 0 ) UE->rx_offset_diff = -1 ; if ( UE->rx_offset > 5*UE->frame_parms.samples_per_subframe && - UE->rx_offset < 10*UE->frame_parms.samples_per_tti ) + UE->rx_offset < 10*UE->frame_parms.samples_per_subframe ) UE->rx_offset_diff = 1; - LOG_D(PHY,"AbsSubframe %d.%d TTI SET rx_off_diff to %d rx_offset %d \n",proc->frame_rx,tti_nr,UE->rx_offset_diff,UE->rx_offset); - readBlockSize=UE->frame_parms.samples_per_tti - + LOG_D(PHY,"AbsSubframe %d.%d TTI SET rx_off_diff to %d rx_offset %d \n",proc->frame_rx,subframe_nr,UE->rx_offset_diff,UE->rx_offset); + readBlockSize=UE->frame_parms.samples_per_subframe - UE->frame_parms.ofdm_symbol_size - UE->frame_parms.nb_prefix_samples0 - UE->rx_offset_diff; - writeBlockSize=UE->frame_parms.samples_per_tti - + writeBlockSize=UE->frame_parms.samples_per_subframe - UE->rx_offset_diff; } @@ -992,7 +991,7 @@ void *UE_thread(void *arg) { AssertFatal( writeBlockSize == UE->rfdevice.trx_write_func(&UE->rfdevice, timestamp+ - (2*UE->frame_parms.samples_per_tti) - + (2*UE->frame_parms.samples_per_subframe) - UE->frame_parms.ofdm_symbol_size-UE->frame_parms.nb_prefix_samples0 - openair0_cfg[0].tx_sample_advance, txp, @@ -1000,7 +999,7 @@ void *UE_thread(void *arg) { UE->frame_parms.nb_antennas_tx, 1),""); - if( tti_nr==(ttis_per_frame-1)) { + if( subframe_nr==(NR_NUMBER_OF_SUBFRAMES_PER_FRAME-1)) { // read in first symbol of next frame and adjust for timing drift int first_symbols=writeBlockSize-readBlockSize; if ( first_symbols > 0 ) @@ -1016,7 +1015,7 @@ void *UE_thread(void *arg) { pickTime(gotIQs); // operate on thread sf mod 2 AssertFatal(pthread_mutex_lock(&proc->mutex_rxtx) ==0,""); - if(tti_nr == 0) { + if(subframe_nr == 0) { //UE->proc.proc_rxtx[0].frame_rx++; //UE->proc.proc_rxtx[1].frame_rx++; for (th_id=0; th_id < RX_NB_TH; th_id++) { @@ -1038,18 +1037,18 @@ void *UE_thread(void *arg) { UE->proc.proc_rxtx[th_id].gotIQs=readTime(gotIQs); } - proc->nr_tti_rx=tti_nr; - proc->subframe_rx=tti_nr>>((uint8_t)(log2 (UE->frame_parms.ttis_per_subframe))); + proc->nr_tti_rx=subframe_nr; + proc->subframe_rx=subframe_nr; proc->frame_tx = proc->frame_rx; - proc->nr_tti_tx= tti_nr + DURATION_RX_TO_TX; - if (proc->nr_tti_tx > ttis_per_frame) { + proc->nr_tti_tx= subframe_nr + DURATION_RX_TO_TX; + if (proc->nr_tti_tx > NR_NUMBER_OF_SUBFRAMES_PER_FRAME) { proc->frame_tx = (proc->frame_tx + 1)%MAX_FRAME_NUMBER; - proc->nr_tti_tx %= ttis_per_frame; + proc->nr_tti_tx %= NR_NUMBER_OF_SUBFRAMES_PER_FRAME; } - proc->subframe_tx=(proc->nr_tti_tx)>>((uint8_t)(log2 (UE->frame_parms.ttis_per_subframe))); + proc->subframe_tx=subframe_nr + DURATION_RX_TO_TX; proc->timestamp_tx = timestamp+ - (DURATION_RX_TO_TX*UE->frame_parms.samples_per_tti)- + (DURATION_RX_TO_TX*UE->frame_parms.samples_per_subframe)- UE->frame_parms.ofdm_symbol_size-UE->frame_parms.nb_prefix_samples0; proc->instance_cnt_rxtx++; @@ -1069,7 +1068,7 @@ void *UE_thread(void *arg) { char exit_fun_string[256]; sprintf(exit_fun_string,"[SCHED][UE %d] !!! UE instance_cnt_rxtx > 2 (IC %d) (Proc %d)!!", UE->Mod_id, proc->instance_cnt_rxtx, - UE->current_thread_id[tti_nr]); + UE->current_thread_id[subframe_nr]); printf("%s\n",exit_fun_string); fflush(stdout); sleep(1); From 7dbcd1ffb5d3937c361b264af4ca3a50fa399139 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 31 Oct 2018 10:58:44 +0100 Subject: [PATCH 374/379] CI: adding back all FDD/TDD tests for basic-simulator Signed-off-by: Raphael Defosseux --- ci-scripts/runTestOnVM.sh | 490 +++++++++++++++++++------------------- 1 file changed, 246 insertions(+), 244 deletions(-) diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index 19e1c24934..0d4f116179 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -753,144 +753,146 @@ then scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + sleep 10 + + echo "############################################################" + echo "Starting the eNB in FDD-10MHz mode" + echo "############################################################" + CURRENT_ENB_LOG_FILE=fdd_10MHz_enb.log + start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 lte-fdd-basic-sim.conf + + echo "############################################################" + echo "Starting the UE in FDD-10MHz mode" + echo "############################################################" + CURRENT_UE_LOG_FILE=fdd_10MHz_ue.log + start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 50 2680 + if [ $UE_SYNC -eq 0 ] + then + echo "Problem w/ eNB and UE not syncing" + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR + exit -1 + fi + get_ue_ip_addr $VM_CMDS $VM_IP_ADDR + + echo "############################################################" + echo "Pinging the UE" + echo "############################################################" + PING_LOG_FILE=fdd_10MHz_ping_ue.txt + ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC + check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 + + echo "############################################################" + echo "Iperf DL" + echo "############################################################" + CURR_IPERF_LOG_BASE=fdd_10MHz_iperf_dl + iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC + check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15 + + echo "############################################################" + echo "Iperf UL" + echo "############################################################" + CURR_IPERF_LOG_BASE=fdd_10MHz_iperf_ul + iperf_ul $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 2 $CURR_IPERF_LOG_BASE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC + check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 2 + + echo "############################################################" + echo "Terminate enb/ue simulators" + echo "############################################################" + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + sleep 10 + + echo "############################################################" + echo "Starting the eNB in FDD-20MHz mode" + echo "############################################################" + CURRENT_ENB_LOG_FILE=fdd_20MHz_enb.log + start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 100 lte-fdd-basic-sim.conf + + echo "############################################################" + echo "Starting the UE in FDD-20MHz mode" + echo "############################################################" + CURRENT_UE_LOG_FILE=fdd_20MHz_ue.log + start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 100 2680 + if [ $UE_SYNC -eq 0 ] + then + echo "Problem w/ eNB and UE not syncing" + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR + exit -1 + fi + get_ue_ip_addr $VM_CMDS $VM_IP_ADDR + + echo "############################################################" + echo "Pinging the UE" + echo "############################################################" + PING_LOG_FILE=fdd_20MHz_ping_ue.txt + ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC + check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 + + echo "############################################################" + echo "Iperf DL" + echo "############################################################" + CURR_IPERF_LOG_BASE=fdd_20MHz_iperf_dl + iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC + check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15 + + echo "############################################################" + echo "Terminate enb/ue simulators" + echo "############################################################" + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + sleep 10 + + echo "############################################################" + echo "Starting the eNB in TDD-5MHz mode" + echo "############################################################" + CURRENT_ENB_LOG_FILE=tdd_05MHz_enb.log + start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 25 lte-tdd-basic-sim.conf + + echo "############################################################" + echo "Starting the UE in TDD-5MHz mode" + echo "############################################################" + CURRENT_UE_LOG_FILE=tdd_05MHz_ue.log + start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 25 2350 + if [ $UE_SYNC -eq 0 ] + then + echo "Problem w/ eNB and UE not syncing" + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR + exit -1 + fi + get_ue_ip_addr $VM_CMDS $VM_IP_ADDR + + echo "############################################################" + echo "Pinging the UE" + echo "############################################################" + PING_LOG_FILE=tdd_05MHz_ping_ue.txt + ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC + check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 -# Raphael: Disable any further test in develop-nr to validate CI pipeline -# echo "############################################################" -# echo "Starting the eNB in FDD-10MHz mode" -# echo "############################################################" -# CURRENT_ENB_LOG_FILE=fdd_10MHz_enb.log -# start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 lte-fdd-basic-sim.conf -# -# echo "############################################################" -# echo "Starting the UE in FDD-10MHz mode" -# echo "############################################################" -# CURRENT_UE_LOG_FILE=fdd_10MHz_ue.log -# start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 50 2680 -# if [ $UE_SYNC -eq 0 ] -# then -# echo "Problem w/ eNB and UE not syncing" -# terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC -# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC -# terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR -# exit -1 -# fi -# get_ue_ip_addr $VM_CMDS $VM_IP_ADDR -# -# echo "############################################################" -# echo "Pinging the UE" -# echo "############################################################" -# PING_LOG_FILE=fdd_10MHz_ping_ue.txt -# ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE -# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC -# check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 -# -# echo "############################################################" -# echo "Iperf DL" -# echo "############################################################" -# CURR_IPERF_LOG_BASE=fdd_10MHz_iperf_dl -# iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE -# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC -# check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15 -# -# echo "############################################################" -# echo "Iperf UL" -# echo "############################################################" -# CURR_IPERF_LOG_BASE=fdd_10MHz_iperf_ul -# iperf_ul $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 2 $CURR_IPERF_LOG_BASE -# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC -# check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 2 -# -# echo "############################################################" -# echo "Terminate enb/ue simulators" -# echo "############################################################" -# terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC -# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC -# -# echo "############################################################" -# echo "Starting the eNB in FDD-20MHz mode" -# echo "############################################################" -# CURRENT_ENB_LOG_FILE=fdd_20MHz_enb.log -# start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 100 lte-fdd-basic-sim.conf -# -# echo "############################################################" -# echo "Starting the UE in FDD-20MHz mode" -# echo "############################################################" -# CURRENT_UE_LOG_FILE=fdd_20MHz_ue.log -# start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 100 2680 -# if [ $UE_SYNC -eq 0 ] -# then -# echo "Problem w/ eNB and UE not syncing" -# terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC -# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC -# terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR -# exit -1 -# fi -# get_ue_ip_addr $VM_CMDS $VM_IP_ADDR -# -# echo "############################################################" -# echo "Pinging the UE" -# echo "############################################################" -# PING_LOG_FILE=fdd_20MHz_ping_ue.txt -# ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE -# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC -# check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 -# -# echo "############################################################" -# echo "Iperf DL" -# echo "############################################################" -# CURR_IPERF_LOG_BASE=fdd_20MHz_iperf_dl -# iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE -# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC -# check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15 -# -# echo "############################################################" -# echo "Terminate enb/ue simulators" -# echo "############################################################" -# terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC -# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC -# -# echo "############################################################" -# echo "Starting the eNB in TDD-5MHz mode" -# echo "############################################################" -# CURRENT_ENB_LOG_FILE=tdd_05MHz_enb.log -# start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 25 lte-tdd-basic-sim.conf -# -# echo "############################################################" -# echo "Starting the UE in TDD-5MHz mode" -# echo "############################################################" -# CURRENT_UE_LOG_FILE=tdd_05MHz_ue.log -# start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 25 2350 -# if [ $UE_SYNC -eq 0 ] -# then -# echo "Problem w/ eNB and UE not syncing" -# terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC -# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC -# terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR -# exit -1 -# fi -# get_ue_ip_addr $VM_CMDS $VM_IP_ADDR -# -# echo "############################################################" -# echo "Pinging the UE" -# echo "############################################################" -# PING_LOG_FILE=tdd_05MHz_ping_ue.txt -# ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE -# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC -# check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 -# # Bug in TDD 5Mhz --- not running it # echo "############################################################" # echo "Iperf DL" @@ -900,113 +902,113 @@ then # scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC # scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC # check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6 -# Raphael: Disable any further test in develop-nr to validate CI pipeline -# -# echo "############################################################" -# echo "Terminate enb/ue simulators" -# echo "############################################################" -# terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC -# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC -# -# echo "############################################################" -# echo "Starting the eNB in TDD-10MHz mode" -# echo "############################################################" -# CURRENT_ENB_LOG_FILE=tdd_10MHz_enb.log -# start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 lte-tdd-basic-sim.conf -# -# echo "############################################################" -# echo "Starting the UE in TDD-10MHz mode" -# echo "############################################################" -# CURRENT_UE_LOG_FILE=tdd_10MHz_ue.log -# start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 50 2350 -# if [ $UE_SYNC -eq 0 ] -# then -# echo "Problem w/ eNB and UE not syncing" -# terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC -# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC -# terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR -# exit -1 -# fi -# get_ue_ip_addr $VM_CMDS $VM_IP_ADDR -# -# echo "############################################################" -# echo "Pinging the UE" -# echo "############################################################" -# PING_LOG_FILE=tdd_10MHz_ping_ue.txt -# ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE -# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC -# check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 -# -# echo "############################################################" -# echo "Iperf DL" -# echo "############################################################" -# CURR_IPERF_LOG_BASE=tdd_10MHz_iperf_dl -# iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 6 $CURR_IPERF_LOG_BASE -# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC -# check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6 -# -# echo "############################################################" -# echo "Terminate enb/ue simulators" -# echo "############################################################" -# terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC -# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC -# -# Disabling TDD-20MHz test since it is very unstable -# -# echo "############################################################" -# echo "Starting the eNB in TDD-20MHz mode" -# echo "############################################################" -# CURRENT_ENB_LOG_FILE=tdd_20MHz_enb.log -# start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 100 lte-tdd-basic-sim.conf -# -# echo "############################################################" -# echo "Starting the UE in TDD-20MHz mode" -# echo "############################################################" -# CURRENT_UE_LOG_FILE=tdd_20MHz_ue.log -# start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 100 2350 -# if [ $UE_SYNC -eq 0 ] -# then -# echo "Problem w/ eNB and UE not syncing" -# terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC -# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC -# terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR -# exit -1 -# fi -# get_ue_ip_addr $VM_CMDS $VM_IP_ADDR -# -# echo "############################################################" -# echo "Pinging the UE" -# echo "############################################################" -# PING_LOG_FILE=tdd_20MHz_ping_ue.txt -# ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE -# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC -# check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 -# -# echo "############################################################" -# echo "Iperf DL" -# echo "############################################################" -# CURR_IPERF_LOG_BASE=tdd_20MHz_iperf_dl -# iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 6 $CURR_IPERF_LOG_BASE -# scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC -# check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6 -# -# echo "############################################################" -# echo "Terminate enb/ue simulators" -# echo "############################################################" -# terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC -# scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC -# recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + + echo "############################################################" + echo "Terminate enb/ue simulators" + echo "############################################################" + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + sleep 10 + + echo "############################################################" + echo "Starting the eNB in TDD-10MHz mode" + echo "############################################################" + CURRENT_ENB_LOG_FILE=tdd_10MHz_enb.log + start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 lte-tdd-basic-sim.conf + + echo "############################################################" + echo "Starting the UE in TDD-10MHz mode" + echo "############################################################" + CURRENT_UE_LOG_FILE=tdd_10MHz_ue.log + start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 50 2350 + if [ $UE_SYNC -eq 0 ] + then + echo "Problem w/ eNB and UE not syncing" + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR + exit -1 + fi + get_ue_ip_addr $VM_CMDS $VM_IP_ADDR + + echo "############################################################" + echo "Pinging the UE" + echo "############################################################" + PING_LOG_FILE=tdd_10MHz_ping_ue.txt + ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC + check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 + + echo "############################################################" + echo "Iperf DL" + echo "############################################################" + CURR_IPERF_LOG_BASE=tdd_10MHz_iperf_dl + iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 6 $CURR_IPERF_LOG_BASE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC + check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6 + + echo "############################################################" + echo "Terminate enb/ue simulators" + echo "############################################################" + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + sleep 10 + + echo "############################################################" + echo "Starting the eNB in TDD-20MHz mode" + echo "############################################################" + CURRENT_ENB_LOG_FILE=tdd_20MHz_enb.log + start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 100 lte-tdd-basic-sim.conf + + echo "############################################################" + echo "Starting the UE in TDD-20MHz mode" + echo "############################################################" + CURRENT_UE_LOG_FILE=tdd_20MHz_ue.log + start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 100 2350 + if [ $UE_SYNC -eq 0 ] + then + echo "Problem w/ eNB and UE not syncing" + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR + exit -1 + fi + get_ue_ip_addr $VM_CMDS $VM_IP_ADDR + + echo "############################################################" + echo "Pinging the UE" + echo "############################################################" + PING_LOG_FILE=tdd_20MHz_ping_ue.txt + ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC + check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20 + + echo "############################################################" + echo "Iperf DL" + echo "############################################################" + CURR_IPERF_LOG_BASE=tdd_20MHz_iperf_dl + iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 6 $CURR_IPERF_LOG_BASE + scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC + check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6 + + echo "############################################################" + echo "Terminate enb/ue simulators" + echo "############################################################" + terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC + recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC + sleep 10 echo "############################################################" echo "Terminate EPC" From 00c32c90d7ecbc7ef18fcdcdd051857b80858d38 Mon Sep 17 00:00:00 2001 From: "Wolfgang A. Mozart" Date: Wed, 31 Oct 2018 14:44:57 +0100 Subject: [PATCH 375/379] adding phy_scope to UE bugfixes --- cmake_targets/CMakeLists.txt | 7 +- .../PHY/NR_UE_TRANSPORT/nr_initial_sync.c | 3 +- openair1/PHY/TOOLS/nr_phy_scope.c | 821 ++++++++++++++++++ openair1/PHY/TOOLS/nr_phy_scope.h | 84 ++ targets/RT/USER/nr-ue.c | 12 +- targets/RT/USER/nr-uesoftmodem.c | 95 +- targets/RT/USER/nr-uesoftmodem.h | 6 +- 7 files changed, 960 insertions(+), 68 deletions(-) create mode 100644 openair1/PHY/TOOLS/nr_phy_scope.c create mode 100644 openair1/PHY/TOOLS/nr_phy_scope.h diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 7b1cf2bd4f..e7c6658a77 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -2142,6 +2142,9 @@ if (${XFORMS}) set(XFORMS_SOURCE ${OPENAIR1_DIR}/PHY/TOOLS/lte_phy_scope.c ) + set(XFORMS_SOURCE_NR + ${OPENAIR1_DIR}/PHY/TOOLS/nr_phy_scope.c + ) set(XFORMS_SOURCE_SOFTMODEM ${OPENAIR_TARGETS}/RT/USER/stats.c ) @@ -2444,7 +2447,7 @@ add_executable(nr-uesoftmodem ${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c ${OPENAIR_DIR}/common/utils/utils.c ${OPENAIR_DIR}/common/utils/system.c - ${XFORMS_SOURCE} + ${XFORMS_SOURCE_NR} ${XFORMS_SOURCE_SOFTMODEM} ${T_SOURCE} ${CONFIG_SOURCES} @@ -2478,7 +2481,7 @@ add_executable(nr-uesoftmodem-nos1 ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c ${OPENAIR_DIR}/common/utils/utils.c ${OPENAIR_DIR}/common/utils/system.c - ${XFORMS_SOURCE} + ${XFORMS_SOURCE_NR} ${XFORMS_SOURCE_SOFTMODEM} ${T_SOURCE} ${CONFIG_SOURCES} diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c index 87e3dd59be..1b31575615 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c @@ -156,6 +156,7 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode) // FK: added N_RB_DL paramter here as this function shares code with the gNB where it is needed. We should rewrite this function for the UE. nr_init_frame_parms_ue(fp,NR_MU_1,NORMAL,fp->N_RB_DL,n_ssb_crb,0); LOG_D(PHY,"nr_initial sync ue RB_DL %d\n", fp->N_RB_DL); + /* write_output("rxdata0.m","rxd0",ue->common_vars.rxdata[0],10*fp->samples_per_subframe,1,1); exit(-1); @@ -196,7 +197,7 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode) #endif /* check that SSS/PBCH block is continuous inside the received buffer */ - if (sync_pos < (10*fp->slots_per_subframe*fp->samples_per_subframe - (NB_SYMBOLS_PBCH * fp->ofdm_symbol_size))) { + if (sync_pos < (NR_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_subframe - (NB_SYMBOLS_PBCH * fp->ofdm_symbol_size))) { #ifdef DEBUG_INITIAL_SYNCH LOG_I(PHY,"Calling sss detection (normal CP)\n"); diff --git a/openair1/PHY/TOOLS/nr_phy_scope.c b/openair1/PHY/TOOLS/nr_phy_scope.c new file mode 100644 index 0000000000..aa57629f97 --- /dev/null +++ b/openair1/PHY/TOOLS/nr_phy_scope.c @@ -0,0 +1,821 @@ +/* + * 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.1 (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 + */ + +/* Form definition file generated by fdesign */ + +#include +#include "nr_phy_scope.h" + +#define TPUT_WINDOW_LENGTH 100 +int otg_enabled; + +FL_COLOR rx_antenna_colors[4] = {FL_RED,FL_BLUE,FL_GREEN,FL_YELLOW}; + +float tput_time_enb[NUMBER_OF_UE_MAX][TPUT_WINDOW_LENGTH] = {{0}}; +float tput_enb[NUMBER_OF_UE_MAX][TPUT_WINDOW_LENGTH] = {{0}}; +float tput_time_ue[NUMBER_OF_UE_MAX][TPUT_WINDOW_LENGTH] = {{0}}; +float tput_ue[NUMBER_OF_UE_MAX][TPUT_WINDOW_LENGTH] = {{0}}; +float tput_ue_max[NUMBER_OF_UE_MAX] = {0}; + +static void ia_receiver_on_off( FL_OBJECT *button, long arg) +{ + + if (fl_get_button(button)) { + fl_set_object_label(button, "IA Receiver ON"); + // PHY_vars_UE_g[0][0]->use_ia_receiver = 1; + fl_set_object_color(button, FL_GREEN, FL_GREEN); + } else { + fl_set_object_label(button, "IA Receiver OFF"); + // PHY_vars_UE_g[0][0]->use_ia_receiver = 0; + fl_set_object_color(button, FL_RED, FL_RED); + } +} + +static void dl_traffic_on_off( FL_OBJECT *button, long arg) +{ + + if (fl_get_button(button)) { + fl_set_object_label(button, "DL Traffic ON"); + otg_enabled = 1; + fl_set_object_color(button, FL_GREEN, FL_GREEN); + } else { + fl_set_object_label(button, "DL Traffic OFF"); + otg_enabled = 0; + fl_set_object_color(button, FL_RED, FL_RED); + } +} + +FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void ) +{ + + FL_OBJECT *obj; + FD_lte_phy_scope_enb *fdui = fl_malloc( sizeof *fdui ); + + // Define form + fdui->lte_phy_scope_enb = fl_bgn_form( FL_NO_BOX, 800, 800 ); + + // This the whole UI box + obj = fl_add_box( FL_BORDER_BOX, 0, 0, 800, 800, "" ); + fl_set_object_color( obj, FL_BLACK, FL_BLACK ); + + // Received signal + fdui->rxsig_t = fl_add_xyplot( FL_NORMAL_XYPLOT, 20, 20, 370, 100, "Received Signal (Time-Domain, dB)" ); + fl_set_object_boxtype( fdui->rxsig_t, FL_EMBOSSED_BOX ); + fl_set_object_color( fdui->rxsig_t, FL_BLACK, FL_RED ); + fl_set_object_lcolor( fdui->rxsig_t, FL_WHITE ); // Label color + fl_set_xyplot_ybounds(fdui->rxsig_t,10,70); + + // Time-domain channel response + fdui->chest_t = fl_add_xyplot( FL_NORMAL_XYPLOT, 410, 20, 370, 100, "SRS Frequency Response (samples, abs)" ); + fl_set_object_boxtype( fdui->chest_t, FL_EMBOSSED_BOX ); + fl_set_object_color( fdui->chest_t, FL_BLACK, FL_RED ); + fl_set_object_lcolor( fdui->chest_t, FL_WHITE ); // Label color + + // Frequency-domain channel response + fdui->chest_f = fl_add_xyplot( FL_IMPULSE_XYPLOT, 20, 140, 760, 100, "Channel Frequency Response (RE, dB)" ); + fl_set_object_boxtype( fdui->chest_f, FL_EMBOSSED_BOX ); + fl_set_object_color( fdui->chest_f, FL_BLACK, FL_RED ); + fl_set_object_lcolor( fdui->chest_f, FL_WHITE ); // Label color + fl_set_xyplot_ybounds( fdui->chest_f,30,70); + + // LLR of PUSCH + fdui->pusch_llr = fl_add_xyplot( FL_POINTS_XYPLOT, 20, 260, 500, 200, "PUSCH Log-Likelihood Ratios (LLR, mag)" ); + fl_set_object_boxtype( fdui->pusch_llr, FL_EMBOSSED_BOX ); + fl_set_object_color( fdui->pusch_llr, FL_BLACK, FL_YELLOW ); + fl_set_object_lcolor( fdui->pusch_llr, FL_WHITE ); // Label color + fl_set_xyplot_symbolsize( fdui->pusch_llr,2); + + // I/Q PUSCH comp + fdui->pusch_comp = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 260, 240, 200, "PUSCH I/Q of MF Output" ); + fl_set_object_boxtype( fdui->pusch_comp, FL_EMBOSSED_BOX ); + fl_set_object_color( fdui->pusch_comp, FL_BLACK, FL_YELLOW ); + fl_set_object_lcolor( fdui->pusch_comp, FL_WHITE ); // Label color + fl_set_xyplot_symbolsize( fdui->pusch_comp,2); + fl_set_xyplot_xgrid( fdui->pusch_llr,FL_GRID_MAJOR); + + // I/Q PUCCH comp (format 1) + fdui->pucch_comp1 = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 480, 240, 100, "PUCCH1 Energy (SR)" ); + fl_set_object_boxtype( fdui->pucch_comp1, FL_EMBOSSED_BOX ); + fl_set_object_color( fdui->pucch_comp1, FL_BLACK, FL_YELLOW ); + fl_set_object_lcolor( fdui->pucch_comp1, FL_WHITE ); // Label color + fl_set_xyplot_symbolsize( fdui->pucch_comp1,2); + // fl_set_xyplot_xgrid( fdui->pusch_llr,FL_GRID_MAJOR); + + // I/Q PUCCH comp (fromat 1a/b) + fdui->pucch_comp = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 600, 240, 100, "PUCCH I/Q of MF Output" ); + fl_set_object_boxtype( fdui->pucch_comp, FL_EMBOSSED_BOX ); + fl_set_object_color( fdui->pucch_comp, FL_BLACK, FL_YELLOW ); + fl_set_object_lcolor( fdui->pucch_comp, FL_WHITE ); // Label color + fl_set_xyplot_symbolsize( fdui->pucch_comp,2); + // fl_set_xyplot_xgrid( fdui->pusch_llr,FL_GRID_MAJOR); + + // Throughput on PUSCH + fdui->pusch_tput = fl_add_xyplot( FL_NORMAL_XYPLOT, 20, 480, 500, 100, "PUSCH Throughput [frame]/[kbit/s]" ); + fl_set_object_boxtype( fdui->pusch_tput, FL_EMBOSSED_BOX ); + fl_set_object_color( fdui->pusch_tput, FL_BLACK, FL_WHITE ); + fl_set_object_lcolor( fdui->pusch_tput, FL_WHITE ); // Label color + + // Generic eNB Button + fdui->button_0 = fl_add_button( FL_PUSH_BUTTON, 20, 600, 240, 40, "" ); + fl_set_object_lalign(fdui->button_0, FL_ALIGN_CENTER ); + fl_set_button(fdui->button_0,0); + otg_enabled = 0; + fl_set_object_label(fdui->button_0, "DL Traffic OFF"); + fl_set_object_color(fdui->button_0, FL_RED, FL_RED); + fl_set_object_callback(fdui->button_0, dl_traffic_on_off, 0 ); + + fl_end_form( ); + fdui->lte_phy_scope_enb->fdui = fdui; + + return fdui; +} + +/* +void phy_scope_eNB(FD_lte_phy_scope_enb *form, + PHY_VARS_eNB *phy_vars_enb, + int UE_id) +{ + int eNB_id = 0; + int i,i2,arx,atx,ind,k; + LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_enb->frame_parms; + int nsymb_ce = 12*frame_parms->N_RB_UL*frame_parms->symbols_per_tti; + uint8_t nb_antennas_rx = frame_parms->nb_antennas_rx; + uint8_t nb_antennas_tx = 1; // frame_parms->nb_antennas_tx; // in LTE Rel. 8 and 9 only a single transmit antenna is assumed at the UE + int16_t **rxsig_t; + int16_t **chest_t; + int16_t **chest_f; + int16_t *pusch_llr; + int32_t *pusch_comp; + int32_t *pucch1_comp; + int32_t *pucch1_thres; + int32_t *pucch1ab_comp; + float Re,Im,ymax; + float *llr, *bit; + float I[nsymb_ce*2], Q[nsymb_ce*2]; + float I_pucch[10240],Q_pucch[10240],A_pucch[10240],B_pucch[10240],C_pucch[10240]; + float rxsig_t_dB[nb_antennas_rx][FRAME_LENGTH_COMPLEX_SAMPLES]; + float chest_t_abs[nb_antennas_rx][frame_parms->ofdm_symbol_size]; + float *chest_f_abs; + float time[FRAME_LENGTH_COMPLEX_SAMPLES]; + float time2[2048]; + float freq[nsymb_ce*nb_antennas_rx*nb_antennas_tx]; + int frame = phy_vars_enb->proc.proc_rxtx[0].frame_tx; + uint32_t total_dlsch_bitrate = phy_vars_enb->total_dlsch_bitrate; + int coded_bits_per_codeword = 0; + uint8_t harq_pid; // in TDD config 3 it is sf-2, i.e., can be 0,1,2 + int Qm = 2; + + // choose max MCS to compute coded_bits_per_codeword + if (phy_vars_enb->ulsch[UE_id]!=NULL) { + for (harq_pid=0; harq_pid<3; harq_pid++) { + Qm = cmax(phy_vars_enb->ulsch[UE_id]->harq_processes[harq_pid]->Qm,Qm); + } + } + + coded_bits_per_codeword = frame_parms->N_RB_UL*12*Qm*frame_parms->symbols_per_tti; + + chest_f_abs = (float*) calloc(nsymb_ce*nb_antennas_rx*nb_antennas_tx,sizeof(float)); + llr = (float*) calloc(coded_bits_per_codeword,sizeof(float)); // init to zero + bit = malloc(coded_bits_per_codeword*sizeof(float)); + + rxsig_t = (int16_t**) phy_vars_enb->common_vars.rxdata[eNB_id]; + //chest_t = (int16_t**) phy_vars_enb->pusch_vars[UE_id]->drs_ch_estimates_time[eNB_id]; + chest_t = (int16_t**) phy_vars_enb->srs_vars[UE_id].srs_ch_estimates[eNB_id]; + chest_f = (int16_t**) phy_vars_enb->pusch_vars[UE_id]->drs_ch_estimates[eNB_id]; + pusch_llr = (int16_t*) phy_vars_enb->pusch_vars[UE_id]->llr; + pusch_comp = (int32_t*) phy_vars_enb->pusch_vars[UE_id]->rxdataF_comp[0]; + pucch1_comp = (int32_t*) phy_vars_enb->pucch1_stats[UE_id]; + pucch1_thres = (int32_t*) phy_vars_enb->pucch1_stats_thres[UE_id]; + pucch1ab_comp = (int32_t*) phy_vars_enb->pucch1ab_stats[UE_id]; + + // Received signal in time domain of receive antenna 0 + if (rxsig_t != NULL) { + if (rxsig_t[0] != NULL) { + for (i=0; irxsig_t,time,rxsig_t_dB[0],FRAME_LENGTH_COMPLEX_SAMPLES,"","",""); + } + + for (arx=1; arxrxsig_t,arx,time,rxsig_t_dB[arx],FRAME_LENGTH_COMPLEX_SAMPLES,rx_antenna_colors[arx]); + } + } + } + + // Channel Impulse Response + if (chest_t != NULL) { + ymax = 0; + + if (chest_t[0] !=NULL) { + for (i=0; i<(frame_parms->ofdm_symbol_size); i++) { + //i2 = (i+(frame_parms->ofdm_symbol_size>>1))%frame_parms->ofdm_symbol_size; + i2=i; + //time2[i] = (float)(i-(frame_parms->ofdm_symbol_size>>1)); + time2[i] = (float)i; + chest_t_abs[0][i] = 10*log10((float) (1+chest_t[0][2*i2]*chest_t[0][2*i2]+chest_t[0][2*i2+1]*chest_t[0][2*i2+1])); + + if (chest_t_abs[0][i] > ymax) + ymax = chest_t_abs[0][i]; + } + + fl_set_xyplot_data(form->chest_t,time2,chest_t_abs[0],(frame_parms->ofdm_symbol_size),"","",""); + } + + for (arx=1; arxofdm_symbol_size>>3); i++) { + chest_t_abs[arx][i] = 10*log10((float) (1+chest_t[arx][2*i]*chest_t[arx][2*i]+chest_t[arx][2*i+1]*chest_t[arx][2*i+1])); + + if (chest_t_abs[arx][i] > ymax) + ymax = chest_t_abs[arx][i]; + } + + fl_add_xyplot_overlay(form->chest_t,arx,time,chest_t_abs[arx],(frame_parms->ofdm_symbol_size>>3),rx_antenna_colors[arx]); + fl_set_xyplot_overlay_type(form->chest_t,arx,FL_DASHED_XYPLOT); + } + } + + // Avoid flickering effect + // fl_get_xyplot_ybounds(form->chest_t,&ymin,&ymax); + fl_set_xyplot_ybounds(form->chest_t,0,ymax); + } + + // Channel Frequency Response + if (chest_f != NULL) { + ind = 0; + + for (atx=0; atxchest_f,0,nb_antennas_rx*nb_antennas_tx*nsymb_ce); + fl_set_xyplot_xtics(form->chest_f,nb_antennas_rx*nb_antennas_tx*frame_parms->symbols_per_tti,3); + fl_set_xyplot_xgrid(form->chest_f,FL_GRID_MAJOR); + fl_set_xyplot_data(form->chest_f,freq,chest_f_abs,nsymb_ce,"","",""); + + for (arx=1; arxchest_f,1,&freq[arx*nsymb_ce],&chest_f_abs[arx*nsymb_ce],nsymb_ce,rx_antenna_colors[arx]); + } + + // other tx antennas + if (nb_antennas_tx > 1) { + if (nb_antennas_rx > 1) { + for (atx=1; atxchest_f,(atx<<1)+arx,&freq[((atx<<1)+arx)*nsymb_ce],&chest_f_abs[((atx<<1)+arx)*nsymb_ce],nsymb_ce,rx_antenna_colors[arx]); + } + } + } else { // 1 rx antenna + atx=1; + arx=0; + fl_add_xyplot_overlay(form->chest_f,atx,&freq[atx*nsymb_ce],&chest_f_abs[atx*nsymb_ce],nsymb_ce,rx_antenna_colors[arx]); + } + } + } + + // PUSCH LLRs + if (pusch_llr != NULL) { + for (i=0; ipusch_llr,bit,llr,coded_bits_per_codeword,"","",""); + } + + // PUSCH I/Q of MF Output + if (pusch_comp!=NULL) { + ind=0; + + for (k=0; ksymbols_per_tti; k++) { + for (i=0; i<12*frame_parms->N_RB_UL; i++) { + I[ind] = pusch_comp[(2*frame_parms->N_RB_UL*12*k)+2*i]; + Q[ind] = pusch_comp[(2*frame_parms->N_RB_UL*12*k)+2*i+1]; + ind++; + } + } + + fl_set_xyplot_data(form->pusch_comp,I,Q,ind,"","",""); + } + + // PUSCH I/Q of MF Output + if (pucch1ab_comp!=NULL) { + for (ind=0; ind<10240; ind++) { + + I_pucch[ind] = (float)pucch1ab_comp[2*(ind)]; + Q_pucch[ind] = (float)pucch1ab_comp[2*(ind)+1]; + A_pucch[ind] = 10*log10(pucch1_comp[ind]); + B_pucch[ind] = ind; + C_pucch[ind] = (float)pucch1_thres[ind]; + } + fl_set_xyplot_data(form->pucch_comp,I_pucch,Q_pucch,10240,"","",""); + fl_set_xyplot_data(form->pucch_comp1,B_pucch,A_pucch,1024,"","",""); + fl_add_xyplot_overlay(form->pucch_comp1,1,B_pucch,C_pucch,1024,FL_RED); + fl_set_xyplot_ybounds(form->pucch_comp,-5000,5000); + fl_set_xyplot_xbounds(form->pucch_comp,-5000,5000); + + fl_set_xyplot_ybounds(form->pucch_comp1,0,80); + } + + + // PUSCH Throughput + memmove( tput_time_enb[UE_id], &tput_time_enb[UE_id][1], (TPUT_WINDOW_LENGTH-1)*sizeof(float) ); + memmove( tput_enb[UE_id], &tput_enb[UE_id][1], (TPUT_WINDOW_LENGTH-1)*sizeof(float) ); + + tput_time_enb[UE_id][TPUT_WINDOW_LENGTH-1] = (float) frame; + tput_enb[UE_id][TPUT_WINDOW_LENGTH-1] = ((float) total_dlsch_bitrate)/1000.0; + + fl_set_xyplot_data(form->pusch_tput,tput_time_enb[UE_id],tput_enb[UE_id],TPUT_WINDOW_LENGTH,"","",""); + + // fl_get_xyplot_ybounds(form->pusch_tput,&ymin,&ymax); + // fl_set_xyplot_ybounds(form->pusch_tput,0,ymax); + + fl_check_forms(); + + free(llr); + free(bit); + free(chest_f_abs); +} +*/ + +FD_lte_phy_scope_ue *create_lte_phy_scope_ue( void ) +{ + + FL_OBJECT *obj; + FD_lte_phy_scope_ue *fdui = fl_malloc( sizeof *fdui ); + + // Define form + fdui->lte_phy_scope_ue = fl_bgn_form( FL_NO_BOX, 800, 900 ); + + // This the whole UI box + obj = fl_add_box( FL_BORDER_BOX, 0, 0, 800, 900, "" ); + fl_set_object_color( obj, FL_BLACK, FL_BLACK ); + + // Received signal + fdui->rxsig_t = fl_add_xyplot( FL_NORMAL_XYPLOT, 20, 20, 370, 100, "Received Signal (Time-Domain, dB)" ); + fl_set_object_boxtype( fdui->rxsig_t, FL_EMBOSSED_BOX ); + fl_set_object_color( fdui->rxsig_t, FL_BLACK, FL_RED ); + fl_set_object_lcolor( fdui->rxsig_t, FL_WHITE ); // Label color + fl_set_xyplot_ybounds(fdui->rxsig_t,10,70); + + // Time-domain channel response + fdui->chest_t = fl_add_xyplot( FL_NORMAL_XYPLOT, 410, 20, 370, 100, "Channel Impulse Response (samples, abs)" ); + fl_set_object_boxtype( fdui->chest_t, FL_EMBOSSED_BOX ); + fl_set_object_color( fdui->chest_t, FL_BLACK, FL_RED ); + fl_set_object_lcolor( fdui->chest_t, FL_WHITE ); // Label color + + // Frequency-domain channel response + fdui->chest_f = fl_add_xyplot( FL_IMPULSE_XYPLOT, 20, 140, 760, 100, "Channel Frequency Response (RE, dB)" ); + fl_set_object_boxtype( fdui->chest_f, FL_EMBOSSED_BOX ); + fl_set_object_color( fdui->chest_f, FL_BLACK, FL_RED ); + fl_set_object_lcolor( fdui->chest_f, FL_WHITE ); // Label color + fl_set_xyplot_ybounds( fdui->chest_f,30,70); + + // LLR of PBCH + fdui->pbch_llr = fl_add_xyplot( FL_POINTS_XYPLOT, 20, 260, 500, 100, "PBCH Log-Likelihood Ratios (LLR, mag)" ); + fl_set_object_boxtype( fdui->pbch_llr, FL_EMBOSSED_BOX ); + fl_set_object_color( fdui->pbch_llr, FL_BLACK, FL_GREEN ); + fl_set_object_lcolor( fdui->pbch_llr, FL_WHITE ); // Label color + fl_set_xyplot_symbolsize( fdui->pbch_llr,2); + fl_set_xyplot_xgrid( fdui->pbch_llr,FL_GRID_MAJOR); + fl_set_xyplot_xbounds( fdui->pbch_llr,0,1920); + + // I/Q PBCH comp + fdui->pbch_comp = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 260, 240, 100, "PBCH I/Q of MF Output" ); + fl_set_object_boxtype( fdui->pbch_comp, FL_EMBOSSED_BOX ); + fl_set_object_color( fdui->pbch_comp, FL_BLACK, FL_GREEN ); + fl_set_object_lcolor( fdui->pbch_comp, FL_WHITE ); // Label color + fl_set_xyplot_symbolsize( fdui->pbch_comp,2); + // fl_set_xyplot_xbounds( fdui->pbch_comp,-100,100); + // fl_set_xyplot_ybounds( fdui->pbch_comp,-100,100); + + // LLR of PDCCH + fdui->pdcch_llr = fl_add_xyplot( FL_POINTS_XYPLOT, 20, 380, 500, 100, "PDCCH Log-Likelihood Ratios (LLR, mag)" ); + fl_set_object_boxtype( fdui->pdcch_llr, FL_EMBOSSED_BOX ); + fl_set_object_color( fdui->pdcch_llr, FL_BLACK, FL_CYAN ); + fl_set_object_lcolor( fdui->pdcch_llr, FL_WHITE ); // Label color + fl_set_xyplot_symbolsize( fdui->pdcch_llr,2); + + // I/Q PDCCH comp + fdui->pdcch_comp = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 380, 240, 100, "PDCCH I/Q of MF Output" ); + fl_set_object_boxtype( fdui->pdcch_comp, FL_EMBOSSED_BOX ); + fl_set_object_color( fdui->pdcch_comp, FL_BLACK, FL_CYAN ); + fl_set_object_lcolor( fdui->pdcch_comp, FL_WHITE ); // Label color + fl_set_xyplot_symbolsize( fdui->pdcch_comp,2); + fl_set_xyplot_xgrid( fdui->pdcch_llr,FL_GRID_MAJOR); + + // LLR of PDSCH + fdui->pdsch_llr = fl_add_xyplot( FL_POINTS_XYPLOT, 20, 500, 500, 200, "PDSCH Log-Likelihood Ratios (LLR, mag)" ); + fl_set_object_boxtype( fdui->pdsch_llr, FL_EMBOSSED_BOX ); + fl_set_object_color( fdui->pdsch_llr, FL_BLACK, FL_YELLOW ); + fl_set_object_lcolor( fdui->pdsch_llr, FL_WHITE ); // Label color + fl_set_xyplot_symbolsize( fdui->pdsch_llr,2); + fl_set_xyplot_xgrid( fdui->pdsch_llr,FL_GRID_MAJOR); + + // I/Q PDSCH comp + fdui->pdsch_comp = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 500, 240, 200, "PDSCH I/Q of MF Output" ); + fl_set_object_boxtype( fdui->pdsch_comp, FL_EMBOSSED_BOX ); + fl_set_object_color( fdui->pdsch_comp, FL_BLACK, FL_YELLOW ); + fl_set_object_lcolor( fdui->pdsch_comp, FL_WHITE ); // Label color + fl_set_xyplot_symbolsize( fdui->pdsch_comp,2); + + // Throughput on PDSCH + fdui->pdsch_tput = fl_add_xyplot( FL_NORMAL_XYPLOT, 20, 720, 500, 100, "PDSCH Throughput [frame]/[kbit/s]" ); + fl_set_object_boxtype( fdui->pdsch_tput, FL_EMBOSSED_BOX ); + fl_set_object_color( fdui->pdsch_tput, FL_BLACK, FL_WHITE ); + fl_set_object_lcolor( fdui->pdsch_tput, FL_WHITE ); // Label color + + // Generic UE Button + fdui->button_0 = fl_add_button( FL_PUSH_BUTTON, 540, 720, 240, 40, "" ); + fl_set_object_lalign(fdui->button_0, FL_ALIGN_CENTER ); + //openair_daq_vars.use_ia_receiver = 0; + fl_set_button(fdui->button_0,0); + fl_set_object_label(fdui->button_0, "IA Receiver OFF"); + fl_set_object_color(fdui->button_0, FL_RED, FL_RED); + fl_set_object_callback(fdui->button_0, ia_receiver_on_off, 0 ); + fl_hide_object(fdui->button_0); + + fl_end_form( ); + fdui->lte_phy_scope_ue->fdui = fdui; + + return fdui; +} + +void phy_scope_UE(FD_lte_phy_scope_ue *form, + PHY_VARS_NR_UE *phy_vars_ue, + int eNB_id, + int UE_id, + uint8_t subframe) +{ + int i,arx,atx,ind,k; + NR_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->frame_parms; + int nsymb_ce = frame_parms->ofdm_symbol_size;//*frame_parms->symbols_per_tti; + int samples_per_frame = frame_parms->samples_per_frame; + uint8_t nb_antennas_rx = frame_parms->nb_antennas_rx; + uint8_t nb_antennas_tx = frame_parms->nb_antenna_ports_eNB; + int16_t **rxsig_t; + float **rxsig_t_dB; + float *time; + /* + int16_t **chest_t; + int16_t **chest_f; + int16_t *pdsch_llr; + int16_t *pdsch_comp; + int16_t *pdsch_mag; + int8_t *pdcch_llr; + int16_t *pdcch_comp; + int8_t *pbch_llr; + int16_t *pbch_comp; + float Re,Im,ymax=1; + int num_pdcch_symbols=3; + float *llr, *bit, *chest_f_abs, llr_pbch[1920], bit_pbch[1920], *llr_pdcch, *bit_pdcch; + float *I, *Q; + float **chest_t_abs; + float freq[nsymb_ce*nb_antennas_rx*nb_antennas_tx]; + int frame = phy_vars_ue->proc.proc_rxtx[0].frame_rx; + int coded_bits_per_codeword = 0; + int mcs = 0; + unsigned char harq_pid = 0; + */ + + /* + if (phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]!=NULL) { + harq_pid = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->current_harq_pid; + + if (harq_pid>=8) + return; + + mcs = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->mcs; + + // Button 0 + if(!phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->dl_power_off) { + // we are in TM5 + fl_show_object(form->button_0); + } + } + + if (phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]!=NULL) { + num_pdcch_symbols = phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][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[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]!=NULL) { + coded_bits_per_codeword = get_G(frame_parms, + phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->nb_rb, + phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->rb_alloc_even, + get_Qm(mcs), + phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0]->harq_processes[harq_pid]->Nl, + num_pdcch_symbols, + frame, + subframe, + beamforming_mode); + } else { + coded_bits_per_codeword = 0; //frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti); + } + + I = (float*) calloc(frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti*2,sizeof(float)); + Q = (float*) calloc(frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti*2,sizeof(float)); + chest_t_abs = (float**) malloc(nb_antennas_rx*sizeof(float*)); + + for (arx=0; arxofdm_symbol_size,sizeof(float)); + } + + chest_f_abs = (float*) calloc(nsymb_ce*nb_antennas_rx*nb_antennas_tx,sizeof(float)); + llr = (float*) calloc(coded_bits_per_codeword,sizeof(float)); // init to zero + bit = malloc(coded_bits_per_codeword*sizeof(float)); + llr_pdcch = (float*) calloc(12*frame_parms->N_RB_DL*num_pdcch_symbols*2,sizeof(float)); // init to zero + bit_pdcch = (float*) calloc(12*frame_parms->N_RB_DL*num_pdcch_symbols*2,sizeof(float)); + */ + + rxsig_t = (int16_t**) phy_vars_ue->common_vars.rxdata; + rxsig_t_dB = calloc(nb_antennas_rx,sizeof(float*)); + for (arx=0; arxcommon_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id]; + chest_f = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[subframe]].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[phy_vars_ue->current_thread_id[subframe]][eNB_id]->llr; + pdcch_comp = (int16_t*) phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->rxdataF_comp[0]; + pdsch_llr = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][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[phy_vars_ue->current_thread_id[subframe]][eNB_id]->rxdataF_comp0[0]; + pdsch_mag = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->dl_ch_mag0[0]; + */ + + // Received signal in time domain of receive antenna 0 + if (rxsig_t != NULL) { + if (rxsig_t[0] != NULL) { + for (i=0; irxsig_t,time,rxsig_t_dB[0],samples_per_frame,"","",""); + } + + /* + for (arx=1; arxrxsig_t,arx,time,rxsig_t_dB[arx],FRAME_LENGTH_COMPLEX_SAMPLES,rx_antenna_colors[arx]); + } + } + */ + } + + /* + // Channel Impulse Response (still repeated format) + if (chest_t != NULL) { + ymax = 0; + + if (chest_t[0] !=NULL) { + for (i=0; i<(frame_parms->ofdm_symbol_size>>3); i++) { + chest_t_abs[0][i] = (float) (chest_t[0][4*i]*chest_t[0][4*i]+chest_t[0][4*i+1]*chest_t[0][4*i+1]); + + if (chest_t_abs[0][i] > ymax) + ymax = chest_t_abs[0][i]; + } + + fl_set_xyplot_data(form->chest_t,time,chest_t_abs[0],(frame_parms->ofdm_symbol_size>>3),"","",""); + } + + for (arx=1; arxofdm_symbol_size>>3); i++) { + chest_t_abs[arx][i] = (float) (chest_t[arx][4*i]*chest_t[arx][4*i]+chest_t[arx][4*i+1]*chest_t[arx][4*i+1]); + + if (chest_t_abs[arx][i] > ymax) + ymax = chest_t_abs[arx][i]; + } + + fl_add_xyplot_overlay(form->chest_t,arx,time,chest_t_abs[arx],(frame_parms->ofdm_symbol_size>>3),rx_antenna_colors[arx]); + fl_set_xyplot_overlay_type(form->chest_t,arx,FL_DASHED_XYPLOT); + } + } + + // Avoid flickering effect + // fl_get_xyplot_ybounds(form->chest_t,&ymin,&ymax); // Does not always work... + fl_set_xyplot_ybounds(form->chest_t,0,(double) ymax); + } + + // Channel Frequency Response (includes 5 complex sample for filter) + if (chest_f != NULL) { + ind = 0; + + for (atx=0; atxchest_f,0,nb_antennas_rx*nb_antennas_tx*nsymb_ce); + //fl_set_xyplot_xtics(form->chest_f,nb_antennas_rx*nb_antennas_tx*frame_parms->symbols_per_tti,2); + // fl_set_xyplot_xtics(form->chest_f,nb_antennas_rx*nb_antennas_tx*2,2); + fl_set_xyplot_xgrid(form->chest_f,FL_GRID_MAJOR); + fl_set_xyplot_data(form->chest_f,freq,chest_f_abs,nsymb_ce,"","",""); + + for (arx=1; arxchest_f,1,&freq[arx*nsymb_ce],&chest_f_abs[arx*nsymb_ce],nsymb_ce,rx_antenna_colors[arx]); + } + + // other tx antennas + if (nb_antennas_tx > 1) { + if (nb_antennas_rx > 1) { + for (atx=1; atxchest_f,(atx<<1)+arx,&freq[((atx<<1)+arx)*nsymb_ce],&chest_f_abs[((atx<<1)+arx)*nsymb_ce],nsymb_ce,rx_antenna_colors[arx]); + } + } + } else { // 1 rx antenna + atx=1; + arx=0; + fl_add_xyplot_overlay(form->chest_f,atx,&freq[atx*nsymb_ce],&chest_f_abs[atx*nsymb_ce],nsymb_ce,rx_antenna_colors[arx]); + } + } + } + + // PBCH LLRs + if (pbch_llr != NULL) { + for (i=0; i<1920; i++) { + llr_pbch[i] = (float) pbch_llr[i]; + bit_pbch[i] = (float) i; + } + + fl_set_xyplot_data(form->pbch_llr,bit_pbch,llr_pbch,1920,"","",""); + } + + // PBCH I/Q of MF Output + if (pbch_comp!=NULL) { + for (i=0; i<72*2; i++) { + I[i] = pbch_comp[2*i]; + Q[i] = pbch_comp[2*i+1]; + } + + fl_set_xyplot_data(form->pbch_comp,I,Q,72*2,"","",""); + } + + // PDCCH LLRs + if (pdcch_llr != NULL) { + for (i=0; i<12*frame_parms->N_RB_DL*2*num_pdcch_symbols; i++) { + llr_pdcch[i] = (float) pdcch_llr[i]; + bit_pdcch[i] = (float) i; + } + + fl_set_xyplot_xbounds(form->pdcch_llr,0,12*frame_parms->N_RB_DL*2*3); + 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_D(PHY,"UE PDCCH LLR plot is bugged in 20 MHz BW, to be fixed !!!\n"); + } + } + + // PDCCH I/Q of MF Output + if (pdcch_comp!=NULL) { + for (i=0; i<12*frame_parms->N_RB_DL*num_pdcch_symbols; i++) { + I[i] = pdcch_comp[2*i]; + Q[i] = pdcch_comp[2*i+1]; + } + 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_D(PHY,"UE PDCCH COMP plot is bugged in 20 MHz BW, to be fixed !!!\n"); + } + } + + // PDSCH LLRs + if (pdsch_llr != NULL) { + for (i=0; ipdsch_llr,0,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_D(PHY,"UE PDSCH LLR plot is bugged in 20 MHz BW, to be fixed !!!\n"); + } + } + + // PDSCH I/Q of MF Output + if (pdsch_comp!=NULL) { + ind=0; + + for (k=0; ksymbols_per_tti; k++) { + for (i=0; i<12*frame_parms->N_RB_DL/2; i++) { + int j = (2*frame_parms->N_RB_DL*12*k)+4*i; + I[ind] = (pdsch_mag[j ]!=0? 1.0/pdsch_mag[j ]: 0.0) * pdsch_comp[j ]*1.0; + Q[ind] = (pdsch_mag[j+1]!=0? 1.0/pdsch_mag[j+1]: 0.0) * pdsch_comp[j+1]*1.0; + ind++; + } + } + + fl_set_xyplot_data(form->pdsch_comp,I,Q,ind,"","",""); + } + + // PDSCH Throughput + memmove( tput_time_ue[UE_id], &tput_time_ue[UE_id][1], (TPUT_WINDOW_LENGTH-1)*sizeof(float) ); + memmove( tput_ue[UE_id], &tput_ue[UE_id][1], (TPUT_WINDOW_LENGTH-1)*sizeof(float) ); + + tput_time_ue[UE_id][TPUT_WINDOW_LENGTH-1] = (float) frame; + tput_ue[UE_id][TPUT_WINDOW_LENGTH-1] = ((float) total_dlsch_bitrate)/1000.0; + + if (tput_ue[UE_id][TPUT_WINDOW_LENGTH-1] > tput_ue_max[UE_id]) { + tput_ue_max[UE_id] = tput_ue[UE_id][TPUT_WINDOW_LENGTH-1]; + } + + fl_set_xyplot_data(form->pdsch_tput,tput_time_ue[UE_id],tput_ue[UE_id],TPUT_WINDOW_LENGTH,"","",""); + + fl_set_xyplot_ybounds(form->pdsch_tput,0,tput_ue_max[UE_id]); + */ + + fl_check_forms(); + + free(time); + for (arx=0; arx +//#include "PHY/defs_eNB.h" +//#include "PHY/defs_UE.h" +//#include "PHY/impl_defs_top.h" +#include "PHY/defs_nr_UE.h" + + +/* Forms and Objects */ +typedef struct { + FL_FORM * lte_phy_scope_enb; + FL_OBJECT * rxsig_t; + FL_OBJECT * chest_f; + FL_OBJECT * chest_t; + FL_OBJECT * pusch_comp; + FL_OBJECT * pucch_comp; + FL_OBJECT * pucch_comp1; + FL_OBJECT * pusch_llr; + FL_OBJECT * pusch_tput; + FL_OBJECT * button_0; +} FD_lte_phy_scope_enb; + +typedef struct { + FL_FORM * lte_phy_scope_ue; + FL_OBJECT * rxsig_t; + FL_OBJECT * chest_f; + FL_OBJECT * chest_t; + FL_OBJECT * pbch_comp; + FL_OBJECT * pbch_llr; + FL_OBJECT * pdcch_comp; + FL_OBJECT * pdcch_llr; + FL_OBJECT * pdsch_comp; + FL_OBJECT * pdsch_llr; + FL_OBJECT * pdsch_comp1; + FL_OBJECT * pdsch_llr1; + FL_OBJECT * pdsch_tput; + FL_OBJECT * button_0; + +} FD_lte_phy_scope_ue; + +FD_lte_phy_scope_enb * create_lte_phy_scope_enb( void ); +FD_lte_phy_scope_ue * create_lte_phy_scope_ue( void ); + +/* +void phy_scope_eNB(FD_lte_phy_scope_enb *form, + PHY_VARS_gNB *phy_vars_enb, + int UE_id); +*/ + +void phy_scope_UE(FD_lte_phy_scope_ue *form, + PHY_VARS_NR_UE *phy_vars_ue, + int eNB_id, + int UE_id, + uint8_t subframe); + + + + +#endif /* FD_lte_scope_h_ */ diff --git a/targets/RT/USER/nr-ue.c b/targets/RT/USER/nr-ue.c index 604d01deef..63d5150997 100644 --- a/targets/RT/USER/nr-ue.c +++ b/targets/RT/USER/nr-ue.c @@ -532,6 +532,7 @@ static void *UE_thread_synch(void *arg) { } else { // initial sync failed // calculate new offset and try again + if (UE->UE_scan_carrier == 1) { if (freq_offset >= 0) freq_offset += 100; @@ -553,6 +554,7 @@ static void *UE_thread_synch(void *arg) { return &UE_thread_synch_retval; // not reached } } + #if DISABLE_LOG_X printf("[initial_sync] trying carrier off %d Hz, rxgain %d (DL %u, UL %u)\n", freq_offset, @@ -646,8 +648,8 @@ static void *UE_thread_rxn_txnp4(void *arg) { } // initRefTimes(t2); - initRefTimes(t3); - pickTime(current); +// initRefTimes(t3); +// pickTime(current); // updateTimes(proc->gotIQs, &t2, 10000, "Delay to wake up UE_Thread_Rx (case 2)"); // Process Rx data for one sub-frame @@ -876,7 +878,7 @@ void *UE_thread(void *arg) { if (UE->mode != loop_through_memory) { for (int i=0; iframe_parms.nb_antennas_rx; i++) rxp[i] = (void*)&dummy_rx[i][0]; - for (int sf=0; sfframe_parms.samples_per_subframe== UE->rfdevice.trx_read_func(&UE->rfdevice, @@ -1114,6 +1116,7 @@ void init_UE_threads(PHY_VARS_NR_UE *UE) { pthread_mutex_init(&UE->proc.mutex_synch,NULL); pthread_cond_init(&UE->proc.cond_synch,NULL); + UE->proc.instance_cnt_synch = -1; // the threads are not yet active, therefore access is allowed without locking int nb_threads=RX_NB_TH; @@ -1186,6 +1189,7 @@ void fill_ue_band_info(void) { }*/ #endif +/* int setup_ue_buffers(PHY_VARS_NR_UE **phy_vars_ue, openair0_config_t *openair0_cfg) { int i, CC_id; @@ -1225,4 +1229,4 @@ int setup_ue_buffers(PHY_VARS_NR_UE **phy_vars_ue, openair0_config_t *openair0_c } return 0; } - +*/ diff --git a/targets/RT/USER/nr-uesoftmodem.c b/targets/RT/USER/nr-uesoftmodem.c index 6505c2a3fc..97ee085e2e 100644 --- a/targets/RT/USER/nr-uesoftmodem.c +++ b/targets/RT/USER/nr-uesoftmodem.c @@ -80,7 +80,7 @@ unsigned short config_frames[4] = {2,9,11,13}; #include "system.h" #include "stats.h" #ifdef XFORMS -#include "PHY/TOOLS/lte_phy_scope.h" +#include "PHY/TOOLS/nr_phy_scope.h" //#include "stats.h" // current status is that every UE has a DL scope for a SINGLE eNB (eNB_id=0) // at eNB 0, an UL scope for every UE @@ -111,11 +111,10 @@ volatile int oai_exit = 0; static clock_source_t clock_source = internal; static int wait_for_sync = 0; -static char UE_flag=0; -unsigned int mmapped_dma=0; -int single_thread_flag=1; +unsigned int mmapped_dma=0; +int single_thread_flag=1; -static char threequarter_fs=0; +int threequarter_fs=0; uint32_t downlink_frequency[MAX_NUM_CCs][4]; int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; @@ -149,7 +148,7 @@ double rx_gain_off = 0.0; double sample_rate=30.72e6; double bw = 10.0e6; -static int tx_max_power[MAX_NUM_CCs]; /* = {0,0}*/; +static int tx_max_power[MAX_NUM_CCs] = {0}; char rf_config_file[1024]; @@ -175,7 +174,7 @@ int rx_input_level_dBm; #ifdef XFORMS extern int otg_enabled; -static char do_forms=0; +int do_forms=0; #else int otg_enabled; #endif @@ -415,22 +414,19 @@ static void *scope_thread(void *arg) { #endif while (!oai_exit) { - if (UE_flag==1) { - //len = dump_ue_stats (PHY_vars_UE_g[0][0], &PHY_vars_UE_g[0][0]->proc.proc_rxtx[0],stats_buffer, 0, mode,rx_input_level_dBm); - //fl_set_object_label(form_stats->stats_text, stats_buffer); - fl_clear_browser(form_stats->stats_text); - fl_add_browser_line(form_stats->stats_text, stats_buffer); - - /*phy_scope_UE(form_ue[0], - PHY_vars_UE_g[0][0], - 0, - 0,7);*/ - - } - - //printf("doing forms\n"); - //usleep(100000); // 100 ms - sleep(1); + //len = dump_ue_stats (PHY_vars_UE_g[0][0], &PHY_vars_UE_g[0][0]->proc.proc_rxtx[0],stats_buffer, 0, mode,rx_input_level_dBm); + //fl_set_object_label(form_stats->stats_text, stats_buffer); + fl_clear_browser(form_stats->stats_text); + fl_add_browser_line(form_stats->stats_text, stats_buffer); + + phy_scope_UE(form_ue[0], + PHY_vars_UE_g[0][0], + 0,0,7); + + + //printf("doing forms\n"); + //usleep(100000); // 100 ms + sleep(1); } // printf("%s",stats_buffer); @@ -615,10 +611,6 @@ static void get_options(void) { uecap_xer_in=1; } /* UE with config file */ -#if defined(OAI_USRP) || defined(CPRIGW) || defined(OAI_ADRV9371_ZC706) - int clock_src; -#endif - } #if T_TRACER @@ -1002,8 +994,6 @@ int main( int argc, char **argv ) { UE[CC_id]->pdcch_vars[1][0]->crnti = 0x1235; } - rx_gain[CC_id][0] = 81; - tx_max_power[CC_id] = -40; 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]; @@ -1120,11 +1110,14 @@ int main( int argc, char **argv ) { #ifdef XFORMS int UE_id; + int fl_argc=1; if (do_forms==1) { - fl_initialize (&argc, argv, NULL, 0, 0); - - form_stats = create_form_stats_form(); + // fl_initialize messes with argv and argc, so pretend to not pass any options + fl_initialize (&fl_argc, argv, NULL, 0, 0); + // restore the original command line args + // argv = fl_get_cmdline_args( &argc ); + form_stats = create_form_stats_form(); fl_show_form (form_stats->stats_form, FL_PLACE_HOTSPOT, FL_FULLBORDER, "stats"); UE_id = 0; form_ue[UE_id] = create_lte_phy_scope_ue(); @@ -1155,48 +1148,34 @@ int main( int argc, char **argv ) { rt_sleep_ns(10*100000000ULL); - - - // start the main thread - //if (UE_flag == 1) { - init_UE(1); - number_of_cards = 1; - + init_UE(1); + number_of_cards = 1; + for(CC_id=0; CC_idrf_map.card=0; PHY_vars_UE_g[0][CC_id]->rf_map.chain=CC_id+chain_offset; } - //} - // connect the TX/RX buffers - //if (UE_flag==1) { for (CC_id=0; CC_idhw_timing_advance = timing_advance; #else UE[CC_id]->hw_timing_advance = 160; #endif } - if (setup_ue_buffers(UE,&openair0_cfg[0])!=0) { - printf("Error setting up eNB buffer\n"); - exit(-1); - } + + if (input_fd) { + printf("Reading in from file to antenna buffer %d\n",0); + if (fread(UE[0]->common_vars.rxdata[0], + sizeof(int32_t), + frame_parms[0]->samples_per_subframe*10, + input_fd) != frame_parms[0]->samples_per_subframe*10) + printf("error reading from file\n"); + } - - if (input_fd) { - printf("Reading in from file to antenna buffer %d\n",0); - if (fread(UE[0]->common_vars.rxdata[0], - sizeof(int32_t), - frame_parms[0]->samples_per_subframe*10, - input_fd) != frame_parms[0]->samples_per_subframe*10) - printf("error reading from file\n"); - } - //p_exmimo_config->framing.tdd_config = TXRXSWITCH_TESTRX; - //} sleep(3); diff --git a/targets/RT/USER/nr-uesoftmodem.h b/targets/RT/USER/nr-uesoftmodem.h index 90887fe128..beb4756466 100644 --- a/targets/RT/USER/nr-uesoftmodem.h +++ b/targets/RT/USER/nr-uesoftmodem.h @@ -136,7 +136,7 @@ {"ue-nb-ant-tx", CONFIG_HLP_UENANTT, 0, u8ptr:&nb_antenna_tx, defuintval:1, TYPE_UINT8, 0}, \ {"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&UE_scan_carrier, defintval:0, TYPE_INT, 0}, \ {"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, TYPE_INT, 0}, \ -{"r" , CONFIG_HLP_PRB, 0, u8ptr:&(frame_parms[0]->N_RB_DL), defintval:25, TYPE_UINT8, 0}, \ +{"r" , CONFIG_HLP_PRB, 0, iptr:&(frame_parms[0]->N_RB_DL), defintval:25, TYPE_UINT, 0}, \ {"dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \ {"usrp-args", CONFIG_HLP_USRP_ARGS, 0, strptr:(char **)&usrp_args, defstrval:"type=b200", TYPE_STRING, 0}, \ {"usrp-clksrc", CONFIG_HLP_USRP_CLK_SRC,0, strptr:(char **)&usrp_clksrc, defstrval:"internal", TYPE_STRING, 0} \ @@ -167,8 +167,8 @@ {"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \ {"C" , CONFIG_HLP_DLF, 0, uptr:&(downlink_frequency[0][0]), defuintval:2680000000, TYPE_UINT, 0}, \ {"a" , CONFIG_HLP_CHOFF, 0, iptr:&chain_offset, defintval:0, TYPE_INT, 0}, \ -{"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, uptr:(uint32_t *)&do_forms, defintval:0, TYPE_INT8, 0}, \ -{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, i8ptr:&threequarter_fs, defintval:0, TYPE_INT8, 0}, \ +{"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, iptr:&do_forms, defintval:0, TYPE_INT, 0}, \ +{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, iptr:&threequarter_fs, defintval:0, TYPE_INT, 0}, \ {"K" , CONFIG_HLP_ITTIL, PARAMFLAG_NOFREE, strptr:&itti_dump_file, defstrval:"/tmp/itti.dump", TYPE_STRING, 0}, \ {"m" , CONFIG_HLP_DLMCS, 0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \ {"t" , CONFIG_HLP_ULMCS, 0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \ From cf8b9fed4f55d154a6cbf25d113ca6118dd24665 Mon Sep 17 00:00:00 2001 From: "Wolfgang A. Mozart" Date: Thu, 1 Nov 2018 16:51:01 +0100 Subject: [PATCH 376/379] adding correlation output to scope --- openair1/PHY/TOOLS/nr_phy_scope.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/openair1/PHY/TOOLS/nr_phy_scope.c b/openair1/PHY/TOOLS/nr_phy_scope.c index aa57629f97..4da49702d8 100644 --- a/openair1/PHY/TOOLS/nr_phy_scope.c +++ b/openair1/PHY/TOOLS/nr_phy_scope.c @@ -35,6 +35,9 @@ float tput_time_ue[NUMBER_OF_UE_MAX][TPUT_WINDOW_LENGTH] = {{0}}; float tput_ue[NUMBER_OF_UE_MAX][TPUT_WINDOW_LENGTH] = {{0}}; float tput_ue_max[NUMBER_OF_UE_MAX] = {0}; +extern int64_t *pss_corr_ue[3]; + + static void ia_receiver_on_off( FL_OBJECT *button, long arg) { @@ -494,6 +497,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, int16_t **rxsig_t; float **rxsig_t_dB; float *time; + float *corr; /* int16_t **chest_t; int16_t **chest_f; @@ -572,6 +576,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, rxsig_t_dB[arx] = (float*) calloc(samples_per_frame,sizeof(float)); } time = calloc(samples_per_frame,sizeof(float)); + corr = calloc(samples_per_frame,sizeof(float)); /* chest_t = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id]; @@ -610,6 +615,21 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, */ } + for (ind=0;ind<3;ind++) { + if (pss_corr_ue[ind]) { + for (i=0; ichest_t,time,corr,samples_per_frame,"","",""); + else + fl_add_xyplot_overlay(form->chest_t,ind,time,corr,samples_per_frame,rx_antenna_colors[ind]); + } + } + + /* // Channel Impulse Response (still repeated format) if (chest_t != NULL) { @@ -798,6 +818,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, fl_check_forms(); free(time); + free(corr); for (arx=0; arx Date: Fri, 2 Nov 2018 10:38:16 +0100 Subject: [PATCH 377/379] CI: increasing timeout for phy-sim tests to 30 minutes Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index 971125771e..c5eae34059 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -313,7 +313,7 @@ pipeline { stage ("Test physical simulators") { steps { gitlabCommitStatus(name: "Test phy-sim") { - timeout (time: 20, unit: 'MINUTES') { + timeout (time: 30, unit: 'MINUTES') { sh "./ci-scripts/runTestOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" } } From ec4429c1710280fb9ca9f8871169447d8987007e Mon Sep 17 00:00:00 2001 From: "Wolfgang A. Mozart" Date: Fri, 2 Nov 2018 13:46:46 +0100 Subject: [PATCH 378/379] gNB: making n_ssb_crb a function of n_rb_dl (this should become a config paramerter later) nr-UE: bugfixes pbchsim: adding options to input/output signal files --- openair1/PHY/INIT/nr_init.c | 2 +- openair1/PHY/NR_UE_TRANSPORT/pss_nr.c | 24 +++++----- openair1/SIMULATION/NR_PHY/pbchsim.c | 64 +++++++++++++++++---------- targets/RT/USER/nr-ue.c | 22 ++++----- 4 files changed, 63 insertions(+), 49 deletions(-) diff --git a/openair1/PHY/INIT/nr_init.c b/openair1/PHY/INIT/nr_init.c index 6082cb757c..bce14e4f56 100644 --- a/openair1/PHY/INIT/nr_init.c +++ b/openair1/PHY/INIT/nr_init.c @@ -419,7 +419,7 @@ void nr_phy_config_request(NR_PHY_Config_t *phy_config) gNB_config->rf_config.ul_carrier_bandwidth.value = phy_config->cfg->rf_config.ul_carrier_bandwidth.value;//106; gNB_config->sch_config.half_frame_index.value = 0; gNB_config->sch_config.ssb_subcarrier_offset.value = phy_config->cfg->sch_config.ssb_subcarrier_offset.value;//0; - gNB_config->sch_config.n_ssb_crb.value = 86; + gNB_config->sch_config.n_ssb_crb.value = (phy_config->cfg->rf_config.dl_carrier_bandwidth.value-20)>>1; gNB_config->sch_config.physical_cell_id.value = phy_config->cfg->sch_config.physical_cell_id.value; if (phy_config->cfg->subframe_config.duplex_mode.value == 0) { diff --git a/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c b/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c index de9b90f993..682d0233d8 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c @@ -838,14 +838,15 @@ int pss_search_time_nr(int **rxdata, ///rx data in time domain /* Search pss in the received buffer each 4 samples which ensures a memory alignment on 128 bits (32 bits x 4 ) */ /* This is required by SIMD (single instruction Multiple Data) Extensions of Intel processors. */ /* Correlation computation is based on a a dot product which is realized thank to SIMS extensions */ - for (int pss_index = 0; pss_index < NUMBER_PSS_SEQUENCE; pss_index++) avg[pss_index]=0; + for (int pss_index = 0; pss_index < NUMBER_PSS_SEQUENCE; pss_index++) { + avg[pss_index]=0; + memset(pss_corr_ue[pss_index],0,length*sizeof(int64_t)); + } - for (n=0; n < length; n+=4) { + for (n=0; n < length; n+=4) { // for (int pss_index = 0; pss_index < NUMBER_PSS_SEQUENCE; pss_index++) { - pss_corr_ue[pss_index][n] = 0; /* clean correlation for position n */ - if ( n < (length - frame_parms->ofdm_symbol_size)) { /* calculate dot product of primary_synchro_time_nr and rxdata[ar][n] (ar=0..nb_ant_rx) and store the sum in temp[n]; */ @@ -886,24 +887,19 @@ int pss_search_time_nr(int **rxdata, ///rx data in time domain LOG_I(PHY,"[UE] nr_synchro_time: Sync source = %d, Peak found at pos %d, val = %llu (%d dB) avg %d dB\n", pss_source, peak_position, (unsigned long long)peak_value, dB_fixed64(peak_value),dB_fixed64(avg[pss_source])); -//#ifdef DEBUG_PSS_NR - -#define PSS_DETECTION_FLOOR_NR (31) - if (peak_value < 5*avg[pss_source]) { //PSS_DETECTION_FLOOR_NR) - + if (peak_value < 5*avg[pss_source]) return(-1); - } -//#endif + #ifdef DBG_PSS_NR - static debug_cnt = 0; + static int debug_cnt = 0; if (debug_cnt == 0) { - /* LOG_M("pss_corr_ue0.m","pss_corr_ue0",pss_corr_ue[0],length,1,6); + LOG_M("pss_corr_ue0.m","pss_corr_ue0",pss_corr_ue[0],length,1,6); LOG_M("pss_corr_ue1.m","pss_corr_ue1",pss_corr_ue[1],length,1,6); LOG_M("pss_corr_ue2.m","pss_corr_ue2",pss_corr_ue[2],length,1,6); - LOG_M("rxdata0.m","rxd0",rxdata[0],length,1,1); */ + LOG_M("rxdata0.m","rxd0",rxdata[0],length,1,1); } else { debug_cnt++; } diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index a4424044c0..019ef25194 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -379,7 +379,7 @@ int main(int argc, char **argv) exit(-1); } - frame_length_complex_samples = frame_parms->samples_per_subframe; + frame_length_complex_samples = frame_parms->samples_per_subframe*NR_NUMBER_OF_SUBFRAMES_PER_FRAME; frame_length_complex_samples_no_prefix = frame_parms->samples_per_subframe_wCP; s_re = malloc(2*sizeof(double*)); @@ -432,34 +432,47 @@ int main(int argc, char **argv) gNB->pbch_configured = 1; for (int i=0;i<4;i++) gNB->pbch_pdu[i]=i+1; nr_common_signal_procedures (gNB,frame,subframe); - } - /* - LOG_M("txsigF0.m","txsF0", gNB->common_vars.txdataF[0],frame_length_complex_samples_no_prefix,1,1); - if (gNB->frame_parms.nb_antennas_tx>1) - LOG_M("txsigF1.m","txsF1", gNB->common_vars.txdataF[1],frame_length_complex_samples_no_prefix,1,1); - */ - //TODO: loop over slots - for (aa=0; aaframe_parms.nb_antennas_tx; aa++) { - if (gNB_config->subframe_config.dl_cyclic_prefix_type.value == 1) { - PHY_ofdm_mod(gNB->common_vars.txdataF[aa], - txdata[aa], - frame_parms->ofdm_symbol_size, - 12, - frame_parms->nb_prefix_samples, - CYCLIC_PREFIX); - } else { - nr_normal_prefix_mod(gNB->common_vars.txdataF[aa], - txdata[aa], - 14, - frame_parms); + /* + LOG_M("txsigF0.m","txsF0", gNB->common_vars.txdataF[0],frame_length_complex_samples_no_prefix,1,1); + if (gNB->frame_parms.nb_antennas_tx>1) + LOG_M("txsigF1.m","txsF1", gNB->common_vars.txdataF[1],frame_length_complex_samples_no_prefix,1,1); + */ + //TODO: loop over slots + for (aa=0; aaframe_parms.nb_antennas_tx; aa++) { + if (gNB_config->subframe_config.dl_cyclic_prefix_type.value == 1) { + PHY_ofdm_mod(gNB->common_vars.txdataF[aa], + txdata[aa], + frame_parms->ofdm_symbol_size, + 12, + frame_parms->nb_prefix_samples, + CYCLIC_PREFIX); + } else { + nr_normal_prefix_mod(gNB->common_vars.txdataF[aa], + txdata[aa], + 14, + frame_parms); + } + } + } else { + printf("Reading %d samples from file to antenna buffer %d\n",frame_length_complex_samples,0); + + if (fread(txdata[0], + sizeof(int32_t), + frame_length_complex_samples, + input_fd) != frame_length_complex_samples) { + printf("error reading from file\n"); + exit(-1); } } - /* + LOG_M("txsig0.m","txs0", txdata[0],frame_length_complex_samples,1,1); if (gNB->frame_parms.nb_antennas_tx>1) LOG_M("txsig1.m","txs1", txdata[1],frame_length_complex_samples,1,1); - */ + + if (output_fd) + fwrite(txdata[0],sizeof(int32_t),frame_length_complex_samples,output_fd); + int txlev = signal_energy(&txdata[0][5*frame_parms->ofdm_symbol_size + 4*frame_parms->nb_prefix_samples + frame_parms->nb_prefix_samples0], frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples); @@ -568,9 +581,12 @@ int main(int argc, char **argv) free(r_im); free(txdata); - if (write_output_file) + if (output_fd) fclose(output_fd); + if (input_fd) + fclose(input_fd); + return(n_errors); } diff --git a/targets/RT/USER/nr-ue.c b/targets/RT/USER/nr-ue.c index 63d5150997..7f4739a18a 100644 --- a/targets/RT/USER/nr-ue.c +++ b/targets/RT/USER/nr-ue.c @@ -435,7 +435,7 @@ static void *UE_thread_synch(void *arg) { #endif if (nr_initial_sync( UE, UE->mode ) == 0) { - hw_slot_offset = (UE->rx_offset<<1) / UE->frame_parms.samples_per_tti; + hw_slot_offset = (UE->rx_offset<<1) / UE->frame_parms.samples_per_subframe; printf("Got synch: hw_slot_offset %d, carrier off %d Hz, rxgain %d (DL %u, UL %u), UE_scan_carrier %d\n", hw_slot_offset, freq_offset, @@ -488,15 +488,17 @@ static void *UE_thread_synch(void *arg) { break; } - UE->rfdevice.trx_set_freq_func(&UE->rfdevice,&openair0_cfg[0],0); - //UE->rfdevice.trx_set_gains_func(&openair0,&openair0_cfg[0]); - //UE->rfdevice.trx_stop_func(&UE->rfdevice); - // sleep(1); - //nr_init_frame_parms_ue(&UE->frame_parms); - /*if (UE->rfdevice.trx_start_func(&UE->rfdevice) != 0 ) { - LOG_E(HW,"Could not start the device\n"); - oai_exit=1; - }*/ + if (UE->mode != loop_through_memory) { + UE->rfdevice.trx_set_freq_func(&UE->rfdevice,&openair0_cfg[0],0); + //UE->rfdevice.trx_set_gains_func(&openair0,&openair0_cfg[0]); + //UE->rfdevice.trx_stop_func(&UE->rfdevice); + // sleep(1); + //nr_init_frame_parms_ue(&UE->frame_parms); + /*if (UE->rfdevice.trx_start_func(&UE->rfdevice) != 0 ) { + LOG_E(HW,"Could not start the device\n"); + oai_exit=1; + }*/ + } if (UE->UE_scan_carrier == 1) { From 53417ed1abfa833052ebf53441326195fad9c5e3 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Fri, 2 Nov 2018 14:39:22 +0100 Subject: [PATCH 379/379] init dumpframe, phy_scope_ue during initial_sync, fixes to loop_through_memory --- targets/RT/USER/nr-ue.c | 18 +++++++++++++----- targets/RT/USER/nr-uesoftmodem.c | 15 +++++++++------ 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/targets/RT/USER/nr-ue.c b/targets/RT/USER/nr-ue.c index 7f4739a18a..d61e3c3bad 100644 --- a/targets/RT/USER/nr-ue.c +++ b/targets/RT/USER/nr-ue.c @@ -59,6 +59,8 @@ #include "T.h" +#include "PHY/TOOLS/nr_phy_scope.h" + extern double cpuf; //static nfapi_nr_config_request_t config_t; //static nfapi_nr_config_request_t* config =&config_t; @@ -587,6 +589,12 @@ static void *UE_thread_synch(void *arg) { break; } + extern FD_lte_phy_scope_ue *form_ue[NUMBER_OF_UE_MAX]; + + phy_scope_UE(form_ue[0], + PHY_vars_UE_g[0][0], + 0,0,7); + AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), ""); // indicate readiness UE->proc.instance_cnt_synch--; @@ -1016,6 +1024,10 @@ void *UE_thread(void *arg) { if ( first_symbols <0 ) LOG_E(PHY,"can't compensate: diff =%d\n", first_symbols); } + } //UE->mode != loop_through_memory + else + rt_sleep_ns(1000*1000); + pickTime(gotIQs); // operate on thread sf mod 2 AssertFatal(pthread_mutex_lock(&proc->mutex_rxtx) ==0,""); @@ -1076,7 +1088,7 @@ void *UE_thread(void *arg) { printf("%s\n",exit_fun_string); fflush(stdout); sleep(1); - exit_fun(exit_fun_string); + exit_fun(exit_fun_string); } } @@ -1087,10 +1099,6 @@ void *UE_thread(void *arg) { // updateTimes(lastTime, &t1, 20000, "Delay between two IQ acquisitions (case 1)"); // pickStaticTime(lastTime); - } else { - printf("Processing subframe %d",proc->subframe_rx); - getchar(); - } } // start_rx_stream==1 } // UE->is_synchronized==1 diff --git a/targets/RT/USER/nr-uesoftmodem.c b/targets/RT/USER/nr-uesoftmodem.c index 97ee085e2e..75eacb829a 100644 --- a/targets/RT/USER/nr-uesoftmodem.c +++ b/targets/RT/USER/nr-uesoftmodem.c @@ -419,10 +419,11 @@ static void *scope_thread(void *arg) { fl_clear_browser(form_stats->stats_text); fl_add_browser_line(form_stats->stats_text, stats_buffer); - phy_scope_UE(form_ue[0], - PHY_vars_UE_g[0][0], - 0,0,7); - + if (PHY_vars_UE_g[0][0]->is_synchronized == 1) + phy_scope_UE(form_ue[0], + PHY_vars_UE_g[0][0], + 0,0,7); + //else it is done in the synch thread //printf("doing forms\n"); //usleep(100000); // 100 ms @@ -498,7 +499,7 @@ static void get_options(void) { int CC_id; int tddflag, nonbiotflag; char *loopfile=NULL; - int dumpframe; + int dumpframe=0; uint32_t online_log_messages; uint32_t glog_level, glog_verbosity; uint32_t start_telnetsrv; @@ -1190,16 +1191,18 @@ int main( int argc, char **argv ) { printf("TYPE TO TERMINATE\n"); //getchar(); + /* #if defined(ENABLE_ITTI) printf("Entering ITTI signals handler\n"); itti_wait_tasks_end(); oai_exit=1; #else + */ while (oai_exit==0) rt_sleep_ns(100000000ULL); -#endif + //#endif // stop threads #ifdef XFORMS
Build Start Time (UTC)TEMPLATE_BUILD_TIME
GIT Repository$GIT_URL
' + str(status) + 'KO - eNB process not foundKO - eNB process ended in Segmentation FaultKO - eNB process ended in AssertionKO - eNB process faced Real Time issue(s)/td>\n') + elif (processesStatus == HSS_PROCESS_FAILED): self.htmlFile.write(' KO - HSS process not foundKO - MME process not foundKO - SPGW process not foundKO - Could not retrieve UE IP address' + str(status) + '' + str(status) + '-
' + self.htmleNBFailureMsg + '
-
' + str(status) + '' + str(status) + '
' + self.htmleNBFailureMsg + '