From a8f94e7a84ace1eb4c9ddd699d70dfcf91620828 Mon Sep 17 00:00:00 2001 From: Hongzhi Date: Thu, 11 Oct 2018 17:43:41 +0200 Subject: [PATCH 1/3] 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 1e5c9313f2012dcc180c94b1b367064c587f8481 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Tue, 23 Oct 2018 04:52:47 -0700 Subject: [PATCH 2/3] update README.txt --- README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.txt b/README.txt index edd233830f..64c5cc0f58 100644 --- a/README.txt +++ b/README.txt @@ -2,7 +2,7 @@ OpenAirInterface is under OpenAirInterface Software Alliance license. ├── http://www.openairinterface.org/?page_id=101 ├── http://www.openairinterface.org/?page_id=698 -It is distributed under OAI Public License V1.0. +It is distributed under OAI Public License V1.1. The license information is distributed under LICENSE file in the same directory. Please see NOTICE.txt for third party software that is included in the sources. From 725ba5ec07e5c4c2d9742d401106a9f518590f73 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Tue, 23 Oct 2018 06:28:55 -0700 Subject: [PATCH 3/3] adding Test FDD - Band 7 - B210 to CI --- ci-scripts/Jenkinsfile-gitlab | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index 3d45911208..b844a13127 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -264,7 +264,33 @@ pipeline { } stage ("Test FDD - Band 7 - B210") { steps { - echo '\u2705 \u001B[32mFDD Band7 testing with COTS-UE not done in this pipeline\u001B[0m' + 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 { + 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)), + string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)), + booleanParam(name: 'eNB_mergeRequest', value: false) + ] + } + } + } catch (Exception e) { + currentBuild.result = 'FAILURE' + } + } } } }