Commit 872a99fb authored by Raphael Defosseux's avatar Raphael Defosseux

Merge remote-tracking branch 'origin/eMTC-testing' into develop_integration_2019_w11

parents cb4e2c55 6bdd4e75
...@@ -13,9 +13,9 @@ eNBs = ...@@ -13,9 +13,9 @@ eNBs =
eNB_name = "eNB_Eurecom_LTEBox"; eNB_name = "eNB_Eurecom_LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1"; tracking_area_code = 1;
plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2;} ); plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2;} );
tr_s_preference = "local_mac" tr_s_preference = "local_mac"
...@@ -48,10 +48,10 @@ eNBs = ...@@ -48,10 +48,10 @@ eNBs =
prach_zero_correlation = 1; prach_zero_correlation = 1;
prach_freq_offset = 1; prach_freq_offset = 1;
pucch_delta_shift = 1; pucch_delta_shift = 1;
pucch_nRB_CQI = 1; pucch_nRB_CQI = 0;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 32; pucch_n1_AN = 0;
pdsch_referenceSignalPower = -27; pdsch_referenceSignalPower = -24;
pdsch_p_b = 0; pdsch_p_b = 0;
pusch_n_SB = 1; pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE"; pusch_enable64QAM = "DISABLE";
...@@ -190,7 +190,7 @@ eNBs = ...@@ -190,7 +190,7 @@ eNBs =
prach_freq_offset = 1; prach_freq_offset = 1;
#PDSCH Config Common #PDSCH Config Common
pdsch_referenceSignalPower = -27 pdsch_referenceSignalPower = -24
pdsch_p_b = 0; pdsch_p_b = 0;
...@@ -208,7 +208,7 @@ eNBs = ...@@ -208,7 +208,7 @@ eNBs =
pucch_delta_shift = 1; pucch_delta_shift = 1;
pucch_nRB_CQI = 0; pucch_nRB_CQI = 0;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 32; pucch_n1_AN = 0;
pusch_p0_Nominal = -96; pusch_p0_Nominal = -96;
pusch_alpha = "AL1"; pusch_alpha = "AL1";
...@@ -262,7 +262,7 @@ eNBs = ...@@ -262,7 +262,7 @@ eNBs =
n1PUCCH_AN_InfoList_r13 = n1PUCCH_AN_InfoList_r13 =
( (
{ {
pucch_info_value = 0; pucch_info_value = 33;
} }
); );
...@@ -411,6 +411,7 @@ L1s = ( ...@@ -411,6 +411,7 @@ L1s = (
{ {
num_cc = 1; num_cc = 1;
tr_n_preference = "local_mac"; tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
} }
); );
...@@ -422,12 +423,31 @@ RUs = ( ...@@ -422,12 +423,31 @@ RUs = (
att_tx = 0 att_tx = 0
att_rx = 0; att_rx = 0;
bands = [13]; bands = [13];
max_pdschReferenceSignalPower = -27; max_pdschReferenceSignalPower = -24;
max_rxgain = 125; max_rxgain = 110;
eNB_instances = [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_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";
};
log_config : log_config :
{ {
global_log_level ="info"; global_log_level ="info";
......
This diff is collapsed.
<!--
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
-->
<testCaseList>
<htmlTabRef>build-tab</htmlTabRef>
<htmlTabName>Build</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList>
010101
050101 060101 070101
</TestCaseRequestedList>
<TestCaseExclusionList>
</TestCaseExclusionList>
<testCase id="010101">
<class>Build_eNB</class>
<desc>Build eNB (USRP)</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
</testCase>
<testCase id="050101">
<class>Initialize_HSS</class>
<desc>Initialize HSS</desc>
</testCase>
<testCase id="060101">
<class>Initialize_MME</class>
<desc>Initialize MME</desc>
</testCase>
<testCase id="070101">
<class>Initialize_SPGW</class>
<desc>Initialize SPGW</desc>
</testCase>
</testCaseList>
<!--
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
-->
<testCaseList>
<htmlTabRef>epc-closure</htmlTabRef>
<htmlTabName>EPC-Closure</htmlTabName>
<htmlTabIcon>log-out</htmlTabIcon>
<TestCaseRequestedList>
050201 060201 070201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="050201">
<class>Terminate_HSS</class>
<desc>Terminate HSS</desc>
</testCase>
<testCase id="060201">
<class>Terminate_MME</class>
<desc>Terminate MME</desc>
</testCase>
<testCase id="070201">
<class>Terminate_SPGW</class>
<desc>Terminate SPGW</desc>
</testCase>
</testCaseList>
<!--
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
-->
<testCaseList>
<htmlTabRef>test-10-tm1</htmlTabRef>
<htmlTabName>Test-10MHz-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
040102
030121 000001 040302 000001 040502 000001 040402 040202 000001 030201
</TestCaseRequestedList>
<TestCaseExclusionList>
</TestCaseExclusionList>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Waiting for a moment...</desc>
<idle_sleep_time_in_sec>15</idle_sleep_time_in_sec>
</testCase>
<testCase id="030121">
<class>Initialize_eNB</class>
<desc>Initialize eNB (FDD/Band13/10MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band13.tm1.50PRB.emtc.conf</Initialize_eNB_args>
</testCase>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
</testCase>
<testCase id="040102">
<class>Initialize_CatM_module</class>
<desc>Initialize CAT-M Module</desc>
</testCase>
<testCase id="040202">
<class>Terminate_CatM_module</class>
<desc>Terminate CAT-M Module</desc>
</testCase>
<testCase id="040302">
<class>Attach_CatM_module</class>
<desc>Attach CAT-M Module</desc>
</testCase>
<testCase id="040402">
<class>Detach_CatM_module</class>
<desc>Detach CAT-M Module</desc>
</testCase>
<testCase id="040502">
<class>Ping_CatM_module</class>
<desc>ping (10MHz - 20 sec)</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
</testCaseList>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<testCase id="030105"> <testCase id="030105">
<class>Initialize_eNB</class> <class>Initialize_eNB</class>
<desc>Initialize RCC (TDD/Band40/5MHz)</desc> <desc>Initialize RCC (TDD/Band40/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf</Initialize_eNB_args> <Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf --RUs.[0].max_rxgain 125</Initialize_eNB_args>
<eNB_instance>1</eNB_instance> <eNB_instance>1</eNB_instance>
</testCase> </testCase>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<testCase id="030114"> <testCase id="030114">
<class>Initialize_eNB</class> <class>Initialize_eNB</class>
<desc>Initialize RRU (TDD/Band40)</desc> <desc>Initialize RRU (TDD/Band40)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.tdd.band40.conf</Initialize_eNB_args> <Initialize_eNB_args>-O ci-scripts/conf_files/rru.tdd.band40.conf --RUs.[0].max_rxgain 120</Initialize_eNB_args>
<eNB_instance>0</eNB_instance> <eNB_instance>0</eNB_instance>
</testCase> </testCase>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<testCase id="030101"> <testCase id="030101">
<class>Initialize_eNB</class> <class>Initialize_eNB</class>
<desc>Initialize RRU (FDD/Band7)</desc> <desc>Initialize RRU (FDD/Band7)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.fdd.band7.conf</Initialize_eNB_args> <Initialize_eNB_args>-O ci-scripts/conf_files/rru.fdd.band7.conf --RUs.[0].max_rxgain 125</Initialize_eNB_args>
<eNB_instance>1</eNB_instance> <eNB_instance>1</eNB_instance>
</testCase> </testCase>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<testCase id="030111"> <testCase id="030111">
<class>Initialize_eNB</class> <class>Initialize_eNB</class>
<desc>Initialize RRU (FDD/Band7)</desc> <desc>Initialize RRU (FDD/Band7)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.fdd.band7.conf</Initialize_eNB_args> <Initialize_eNB_args>-O ci-scripts/conf_files/rru.fdd.band7.conf --RUs.[0].max_rxgain 120</Initialize_eNB_args>
<eNB_instance>1</eNB_instance> <eNB_instance>1</eNB_instance>
</testCase> </testCase>
......
...@@ -86,7 +86,7 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB, ...@@ -86,7 +86,7 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32))); int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32)));
#ifdef Rel14 #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (eNB->ulsch[UE_id]->ue_type > 0) harq_pid = 0; if (eNB->ulsch[UE_id]->ue_type > 0) harq_pid = 0;
else else
#endif #endif
......
...@@ -71,28 +71,24 @@ void dci_encoding(uint8_t *a, ...@@ -71,28 +71,24 @@ void dci_encoding(uint8_t *a,
uint8_t w[3*3*(MAX_DCI_SIZE_BITS+16)]; uint8_t w[3*3*(MAX_DCI_SIZE_BITS+16)];
#ifdef DEBUG_DCI_ENCODING #ifdef DEBUG_DCI_ENCODING
int32_t i; int32_t i;
#endif
// encode dci
#ifdef DEBUG_DCI_ENCODING
printf("Doing DCI encoding for %d bits, e %p, rnti %x, E %d\n",A,e,rnti,E); printf("Doing DCI encoding for %d bits, e %p, rnti %x, E %d\n",A,e,rnti,E);
#endif #endif
// encode dci
memset((void *)d,LTE_NULL,96); memset((void *)d,LTE_NULL,96);
ccodelte_encode(A,2,a,d+96,rnti); ccodelte_encode(A,2,a,d+96,rnti);
#ifdef DEBUG_DCI_ENCODING #ifdef DEBUG_DCI_ENCODING
for (i=0; i<16+A; i++) for (i=0; i<16+A; i++)
printf("%d : (%d,%d,%d)\n",i,*(d+96+(3*i)),*(d+97+(3*i)),*(d+98+(3*i))); printf("%d : (%d,%d,%d)\n",i,*(d+96+(3*i)),*(d+97+(3*i)),*(d+98+(3*i)));
#endif
#ifdef DEBUG_DCI_ENCODING
printf("Doing DCI interleaving for %d coded bits, e %p\n",D*3,e); printf("Doing DCI interleaving for %d coded bits, e %p\n",D*3,e);
#endif #endif
RCC = sub_block_interleaving_cc(D,d+96,w); RCC = sub_block_interleaving_cc(D,d+96,w);
//#ifdef DEBUG_DCI_ENCODING #ifdef DEBUG_DCI_ENCODING
if (E>1000) printf("Doing DCI rate matching for %d channel bits, RCC %d, e %p\n",E,RCC,e); if (E>1000) printf("Doing DCI rate matching for %d channel bits, RCC %d, e %p\n",E,RCC,e);
#endif
//#endif
lte_rate_matching_cc(RCC,E,w,e); lte_rate_matching_cc(RCC,E,w,e);
} }
......
...@@ -300,7 +300,8 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t ...@@ -300,7 +300,8 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t
dlsch0 = eNB->dlsch[UE_id][0]; dlsch0 = eNB->dlsch[UE_id][0];
dlsch1 = eNB->dlsch[UE_id][1]; dlsch1 = eNB->dlsch[UE_id][1];
dlsch0->ue_type = 0;
dlsch1->ue_type = 0;
beamforming_mode = eNB->transmission_mode[(uint8_t)UE_id]<7?0:eNB->transmission_mode[(uint8_t)UE_id]; beamforming_mode = eNB->transmission_mode[(uint8_t)UE_id]<7?0:eNB->transmission_mode[(uint8_t)UE_id];
dlsch0_harq = dlsch0->harq_processes[rel8->harq_process]; dlsch0_harq = dlsch0->harq_processes[rel8->harq_process];
dlsch0_harq->codeword = 0; dlsch0_harq->codeword = 0;
...@@ -527,7 +528,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t ...@@ -527,7 +528,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t
dlsch0->harq_mask |= (1 << rel8->harq_process); dlsch0->harq_mask |= (1 << rel8->harq_process);
if (rel8->rnti_type == 1) LOG_I(PHY,"DCI 1A: round %d, mcs %d, rballoc %x, rv %d, rnti %x, harq process %d\n",dlsch0_harq->round,rel8->mcs_1,rel8->resource_block_coding,rel8->redundancy_version_1,rel8->rnti,rel8->harq_process); if (rel8->rnti_type == 1) LOG_D(PHY,"DCI 1A: round %d, mcs %d, rballoc %x, rv %d, rnti %x, harq process %d\n",dlsch0_harq->round,rel8->mcs_1,rel8->resource_block_coding,rel8->redundancy_version_1,rel8->rnti,rel8->harq_process);
break; break;
case NFAPI_DL_DCI_FORMAT_1: case NFAPI_DL_DCI_FORMAT_1:
...@@ -1559,7 +1560,6 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc ...@@ -1559,7 +1560,6 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc
case 10: // Format 6-1A case 10: // Format 6-1A
dci_alloc->format = format6_1A; dci_alloc->format = format6_1A;
dlsch0->active = 1;
switch (fp->N_RB_DL) { switch (fp->N_RB_DL) {
case 25: case 25:
...@@ -1594,7 +1594,7 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc ...@@ -1594,7 +1594,7 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc
((DCI6_1A_10MHz_t *) dci_pdu)->harq_ack_off = rel13->harq_resource_offset; ((DCI6_1A_10MHz_t *) dci_pdu)->harq_ack_off = rel13->harq_resource_offset;
((DCI6_1A_10MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number; ((DCI6_1A_10MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
LOG_I(PHY,"Frame %d, Subframe %d : Programming Format 6-1A DCI, type %d, hopping %d, narrowband %d, rballoc %x, mcs %d, rep %d, harq_pid %d, ndi %d, rv %d, TPC %d, srs_req %d, harq_ack_off %d, dci_rep r%d => %x\n", LOG_D(PHY,"Frame %d, Subframe %d : Programming Format 6-1A DCI, type %d, hopping %d, narrowband %d, rballoc %x, mcs %d, rep %d, harq_pid %d, ndi %d, rv %d, TPC %d, srs_req %d, harq_ack_off %d, dci_rep r%d => %x\n",
frame,subframe, frame,subframe,
((DCI6_1A_10MHz_t *) dci_pdu)->type, ((DCI6_1A_10MHz_t *) dci_pdu)->type,
((DCI6_1A_10MHz_t *) dci_pdu)->hopping, ((DCI6_1A_10MHz_t *) dci_pdu)->hopping,
...@@ -1630,7 +1630,6 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc ...@@ -1630,7 +1630,6 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc
break; break;
case 11: // Format 6-1B case 11: // Format 6-1B
dci_alloc->format = format6_1B; dci_alloc->format = format6_1B;
dlsch0->active = 1;
switch (fp->N_RB_DL) { switch (fp->N_RB_DL) {
case 25: case 25:
...@@ -1670,7 +1669,6 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc ...@@ -1670,7 +1669,6 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc
} }
case 12: // Format 6-2 case 12: // Format 6-2
dci_alloc->format = format6_2; dci_alloc->format = format6_2;
dlsch0->active = 1;
switch (fp->N_RB_DL) { switch (fp->N_RB_DL) {
case 25: case 25:
dci_alloc->dci_length = sizeof_DCI6_2_5MHz_t; dci_alloc->dci_length = sizeof_DCI6_2_5MHz_t;
...@@ -1719,12 +1717,14 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc ...@@ -1719,12 +1717,14 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc
} }
AssertFatal (rel13->harq_process < 8, "ERROR: Format 6_1A: harq_pid=%d >= 8\n", rel13->harq_process); AssertFatal (rel13->harq_process < 8, "ERROR: Format 6_1A: harq_pid=%d >= 8\n", rel13->harq_process);
dlsch0->ue_type = rel13->ce_mode;
dlsch0_harq = dlsch0->harq_processes[rel13->harq_process]; dlsch0_harq = dlsch0->harq_processes[rel13->harq_process];
dlsch0_harq->codeword = 0; dlsch0_harq->codeword = 0;
// printf("DCI: Setting subframe_tx for subframe %d\n",subframe); // printf("DCI: Setting subframe_tx for subframe %d\n",subframe);
dlsch0->subframe_tx[(subframe + 2) % 10] = 1; dlsch0->subframe_tx[(subframe + 2) % 10] = 1;
LOG_I(PHY,"PDSCH : resource_block_coding %x\n",rel13->resource_block_coding); LOG_D(PHY,"PDSCH : resource_block_coding %x\n",rel13->resource_block_coding);
conv_eMTC_rballoc (rel13->resource_block_coding, conv_eMTC_rballoc (rel13->resource_block_coding,
fp->N_RB_DL, fp->N_RB_DL,
...@@ -1768,7 +1768,7 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc ...@@ -1768,7 +1768,7 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc
dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][1]; dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][1];
else if (rel13->tpc == 1) //N1A_PRB=3, get TBS from table using mcs and nb_rb=3 else if (rel13->tpc == 1) //N1A_PRB=3, get TBS from table using mcs and nb_rb=3
dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][2]; dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][2];
LOG_I(PHY,"TBS = %d(%d)\n",dlsch0_harq->TBS,dlsch0_harq->mcs); LOG_D(PHY,"TBS = %d(%d)\n",dlsch0_harq->TBS,dlsch0_harq->mcs);
} }
dlsch0->active = 1; dlsch0->active = 1;
dlsch0->harq_mask |= (1 << rel13->harq_process); dlsch0->harq_mask |= (1 << rel13->harq_process);
...@@ -1776,11 +1776,11 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc ...@@ -1776,11 +1776,11 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc
dlsch0_harq->frame = (subframe >= 8) ? ((frame + 1) & 1023) : frame; dlsch0_harq->frame = (subframe >= 8) ? ((frame + 1) & 1023) : frame;
dlsch0_harq->subframe = (subframe + 2) % 10; dlsch0_harq->subframe = (subframe + 2) % 10;
LOG_I(PHY,"Setting DLSCH harq_ids[%d] to %d\n",dlsch0_harq->subframe,dlsch0->harq_ids[frame%2][dlsch0_harq->subframe]); LOG_D(PHY,"Setting DLSCH UEid %d harq_ids[%d] from %d to %d\n",UE_id,dlsch0_harq->subframe,dlsch0->harq_ids[frame%2][dlsch0_harq->subframe],rel13->harq_process);
dlsch0->harq_ids[frame%2][dlsch0_harq->subframe] = rel13->harq_process; dlsch0->harq_ids[dlsch0_harq->frame%2][dlsch0_harq->subframe] = rel13->harq_process;
dlsch0_harq->pdsch_start = rel13->start_symbol; dlsch0_harq->pdsch_start = rel13->start_symbol;
LOG_I(PHY,"Setting DLSCH harq %d round %d to active for %d.%d\n",rel13->harq_process,dlsch0_harq->round,dlsch0_harq->frame,dlsch0_harq->subframe); LOG_D(PHY,"Setting DLSCH harq %d round %d to active for %d.%d\n",rel13->harq_process,dlsch0_harq->round,dlsch0_harq->frame,dlsch0_harq->subframe);
dlsch0->rnti = rel13->rnti; dlsch0->rnti = rel13->rnti;
...@@ -2011,6 +2011,7 @@ void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu ...@@ -2011,6 +2011,7 @@ void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu
ulsch->harq_mask |= 1 << harq_pid; ulsch->harq_mask |= 1 << harq_pid;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LOG_D(PHY,"Filling ULSCH : ue_type %d, harq_pid %d\n",ulsch->ue_type,harq_pid);
ulsch->ue_type = ulsch_pdu->ulsch_pdu_rel13.ue_type; ulsch->ue_type = ulsch_pdu->ulsch_pdu_rel13.ue_type;
AssertFatal(harq_pid ==0 || ulsch->ue_type == NOCE, "Harq PID is not zero for BL/CE UE\n"); AssertFatal(harq_pid ==0 || ulsch->ue_type == NOCE, "Harq PID is not zero for BL/CE UE\n");
...@@ -2236,7 +2237,7 @@ void fill_mpdcch_dci0 (PHY_VARS_eNB * eNB, L1_rxtx_proc_t * proc, mDCI_ALLOC_t * ...@@ -2236,7 +2237,7 @@ void fill_mpdcch_dci0 (PHY_VARS_eNB * eNB, L1_rxtx_proc_t * proc, mDCI_ALLOC_t *
((DCI6_0A_10MHz_t *) dci_pdu)->csi_req = cqi_req; ((DCI6_0A_10MHz_t *) dci_pdu)->csi_req = cqi_req;
((DCI6_0A_10MHz_t *) dci_pdu)->srs_req = rel13->srs_request; ((DCI6_0A_10MHz_t *) dci_pdu)->srs_req = rel13->srs_request;
((DCI6_0A_10MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number; ((DCI6_0A_10MHz_t *) dci_pdu)->dci_rep = rel13->dci_subframe_repetition_number;
LOG_I(PHY,"Frame %d, Subframe %d : Programming Format 6-0A DCI, type %d, hopping %d, narrowband %d, rballoc %x, mcs %d, rep %d, harq_pid %d, ndi %d, rv %d, TPC %d, csi_req %d, srs_req %d, dci_rep r%d => %x\n", LOG_D(PHY,"Frame %d, Subframe %d : Programming Format 6-0A DCI, type %d, hopping %d, narrowband %d, rballoc %x, mcs %d, rep %d, harq_pid %d, ndi %d, rv %d, TPC %d, csi_req %d, srs_req %d, dci_rep r%d => %x\n",
proc->frame_tx,proc->subframe_tx, proc->frame_tx,proc->subframe_tx,
((DCI6_0A_10MHz_t *) dci_pdu)->type, ((DCI6_0A_10MHz_t *) dci_pdu)->type,
((DCI6_0A_10MHz_t *) dci_pdu)->hopping, ((DCI6_0A_10MHz_t *) dci_pdu)->hopping,
......
...@@ -84,7 +84,7 @@ void mpdcch_scrambling(LTE_DL_FRAME_PARMS * frame_parms, mDCI_ALLOC_t * mdci, ui ...@@ -84,7 +84,7 @@ void mpdcch_scrambling(LTE_DL_FRAME_PARMS * frame_parms, mDCI_ALLOC_t * mdci, ui
// rule for BL/CE UEs from Section 6.8.B2 in 36.211 // rule for BL/CE UEs from Section 6.8.B2 in 36.211
x2 = ((((j0 + j) * Nacc) % 10) << 9) + mdci->dmrs_scrambling_init; x2 = ((((j0 + j) * Nacc) % 10) << 9) + mdci->dmrs_scrambling_init;
LOG_I(PHY,"MPDCCH cinit = %x (mdci->dmrs_scrambling_init = %d), scrambling %d encoded DCI bits\n", LOG_D(PHY,"MPDCCH cinit = %x (mdci->dmrs_scrambling_init = %d), scrambling %d encoded DCI bits\n",
x2,mdci->dmrs_scrambling_init,length); x2,mdci->dmrs_scrambling_init,length);
for (n = 0; n < length; n++) { for (n = 0; n < length; n++) {
if ((n & 0x1f) == 0) { if ((n & 0x1f) == 0) {
...@@ -109,7 +109,7 @@ void init_mpdcch5ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB) ...@@ -109,7 +109,7 @@ void init_mpdcch5ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
{ {
int l, k, kmod, re=0; int l, k, kmod, re=0;
LOG_I(PHY, "Inititalizing mpdcchss15tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n"); LOG_D(PHY, "Inititalizing mpdcchss15tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
for (l = 1; l < 14; l++) { for (l = 1; l < 14; l++) {
for (k = 0; k < 72; k++) { for (k = 0; k < 72; k++) {
...@@ -139,7 +139,7 @@ void init_mpdcch5ss2tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB) ...@@ -139,7 +139,7 @@ void init_mpdcch5ss2tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
int nushift = eNB->frame_parms.Nid_cell % 6; int nushift = eNB->frame_parms.Nid_cell % 6;
int nushiftp3 = (eNB->frame_parms.Nid_cell+3) % 6; int nushiftp3 = (eNB->frame_parms.Nid_cell+3) % 6;
// NOTE : THIS IS FOR TM1 ONLY FOR NOW!!!!!!! // NOTE : THIS IS FOR TM1 ONLY FOR NOW!!!!!!!
LOG_I(PHY, "Inititalizing mpdcch5ss2tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n"); LOG_D(PHY, "Inititalizing mpdcch5ss2tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
for (l = 2; l < 14; l++) { for (l = 2; l < 14; l++) {
for (k = 0; k < 72; k++) { for (k = 0; k < 72; k++) {
kmod = k % 12; kmod = k % 12;
...@@ -168,7 +168,7 @@ void init_mpdcch5ss3tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB) ...@@ -168,7 +168,7 @@ void init_mpdcch5ss3tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
{ {
int l, k, kmod, re=0; int l, k, kmod, re=0;
LOG_I(PHY, "Inititalizing mpdcch5ss3tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n"); LOG_D(PHY, "Inititalizing mpdcch5ss3tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
for (l = 3; l < 14; l++) { for (l = 3; l < 14; l++) {
for (k = 0; k < 72; k++) { for (k = 0; k < 72; k++) {
kmod = k % 12; kmod = k % 12;
...@@ -194,7 +194,7 @@ void init_mpdcch3ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB) ...@@ -194,7 +194,7 @@ void init_mpdcch3ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
{ {
int l, k, kmod, re=0; int l, k, kmod, re=0;
LOG_I(PHY, "Inititalizing mpdcch3ss1tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n"); LOG_D(PHY, "Inititalizing mpdcch3ss1tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
for (l = 1, re = 0; l < 14; l++) { for (l = 1, re = 0; l < 14; l++) {
for (k = 0; k < 48; k++) { for (k = 0; k < 48; k++) {
kmod = k % 12; kmod = k % 12;
...@@ -218,7 +218,7 @@ void init_mpdcch2ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB) ...@@ -218,7 +218,7 @@ void init_mpdcch2ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
{ {
int l, k, kmod, re=0; int l, k, kmod, re=0;
LOG_I(PHY, "Inititalizing mpdcch2ss1tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n"); LOG_D(PHY, "Inititalizing mpdcch2ss1tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
for (l = 1, re = 0; l < 14; l++) { for (l = 1, re = 0; l < 14; l++) {
for (k = 0; k < 24; k++) { for (k = 0; k < 24; k++) {
kmod = k % 12; kmod = k % 12;
...@@ -288,7 +288,7 @@ void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp, ...@@ -288,7 +288,7 @@ void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp,
int wp[2][4] = {{1,1,1,1},{1,-1,1,-1}}; int wp[2][4] = {{1,1,1,1},{1,-1,1,-1}};
int *w; int *w;
LOG_I(PHY, "generate_mdci_top: num_dci %d\n", mpdcch->num_dci); LOG_D(PHY, "generate_mdci_top: num_dci %d\n", mpdcch->num_dci);
for (i = 0; i < mpdcch->num_dci; i++) { for (i = 0; i < mpdcch->num_dci; i++) {
mdci = &mpdcch->mdci_alloc[i]; mdci = &mpdcch->mdci_alloc[i];
...@@ -320,7 +320,7 @@ void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp, ...@@ -320,7 +320,7 @@ void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp,
} else } else
AssertFatal(1 == 0, "Illegal combination start_symbol %d, a_index %d\n", mdci->start_symbol, a_index); AssertFatal(1 == 0, "Illegal combination start_symbol %d, a_index %d\n", mdci->start_symbol, a_index);
LOG_I(PHY, "mdci %d, length %d: rnti %x, L %d, prb_pairs %d, ce_mode %d, transmission type %s, i0 %d, ss %d ,coded_bits %d\n", LOG_D(PHY, "mdci %d, length %d: rnti %x, L %d, prb_pairs %d, ce_mode %d, transmission type %s, i0 %d, ss %d ,coded_bits %d\n",
i, mdci->dci_length,mdci->rnti, i, mdci->dci_length,mdci->rnti,
mdci->L, mdci->number_of_prb_pairs, mdci->L, mdci->number_of_prb_pairs,
mdci->ce_mode, mdci->ce_mode,
...@@ -422,7 +422,7 @@ void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp, ...@@ -422,7 +422,7 @@ void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp,
uint32_t b = ((mdci->dmrs_scrambling_init << 1) + 1) << 16; uint32_t b = ((mdci->dmrs_scrambling_init << 1) + 1) << 16;
x2 = a * b; x2 = a * b;
x2 = x2 + 2; x2 = x2 + 2;
LOG_I(PHY, "mpdcch_dmrs cinit %x (a=%d,b=%d,i0=%d,j0=%d)\n", x2,a,b,i0,j0); LOG_D(PHY, "mpdcch_dmrs cinit %x (a=%d,b=%d,i0=%d,j0=%d)\n", x2,a,b,i0,j0);
// add MPDCCH pilots // add MPDCCH pilots
int reset = 1; int reset = 1;
......
...@@ -507,7 +507,7 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char* buffer, int length ...@@ -507,7 +507,7 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char* buffer, int length
len += sprintf(&buffer[len], "[UE PROC] DLSCH Total %d, Error %d, FER %d\n",ue->dlsch_received[0],ue->dlsch_errors[0],ue->dlsch_fer[0]); len += sprintf(&buffer[len], "[UE PROC] DLSCH Total %d, Error %d, FER %d\n",ue->dlsch_received[0],ue->dlsch_errors[0],ue->dlsch_fer[0]);
len += sprintf(&buffer[len], "[UE PROC] DLSCH (SI) Total %d, Error %d\n",ue->dlsch_SI_received[0],ue->dlsch_SI_errors[0]); len += sprintf(&buffer[len], "[UE PROC] DLSCH (SI) Total %d, Error %d\n",ue->dlsch_SI_received[0],ue->dlsch_SI_errors[0]);
len += sprintf(&buffer[len], "[UE PROC] DLSCH (RA) Total %d, Error %d\n",ue->dlsch_ra_received[0],ue->dlsch_ra_errors[0]); len += sprintf(&buffer[len], "[UE PROC] DLSCH (RA) Total %d, Error %d\n",ue->dlsch_ra_received[0],ue->dlsch_ra_errors[0]);
#if defined(Rel10) || defined(Rel14) #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
int i=0; int i=0;
//len += sprintf(&buffer[len], "[UE PROC] MCH Total %d\n", ue->dlsch_mch_received[0]); //len += sprintf(&buffer[len], "[UE PROC] MCH Total %d\n", ue->dlsch_mch_received[0]);
......
...@@ -719,7 +719,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, ...@@ -719,7 +719,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
int frame, int frame,
uint8_t subframe, uint8_t subframe,
uint8_t pucch1_thres uint8_t pucch1_thres
#ifdef Rel14 #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,uint8_t br_flag ,uint8_t br_flag
#endif #endif
) )
...@@ -978,7 +978,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, ...@@ -978,7 +978,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
m = (n1_pucch < thres) ? NRB2 : (((n1_pucch-thres)/(12*c/deltaPUCCH_Shift))+NRB2+((deltaPUCCH_Shift*Ncs1_div_deltaPUCCH_Shift)>>3)+rem); m = (n1_pucch < thres) ? NRB2 : (((n1_pucch-thres)/(12*c/deltaPUCCH_Shift))+NRB2+((deltaPUCCH_Shift*Ncs1_div_deltaPUCCH_Shift)>>3)+rem);
#ifdef DEBUG_PUCCH_RX #ifdef DEBUG_PUCCH_RX
printf("[eNB] PUCCH: m %d\n",m); printf("[eNB] PUCCH: m %d, thres %d, NRB2 %d\n",m,thres,NRB2);
#endif #endif
nsymb = N_UL_symb<<1; nsymb = N_UL_symb<<1;
...@@ -989,7 +989,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, ...@@ -989,7 +989,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
//for (j=0,l=0;l<(nsymb-1);l++) { //for (j=0,l=0;l<(nsymb-1);l++) {
for (j=0,l=0; l<nsymb; l++) { for (j=0,l=0; l<nsymb; l++) {
#ifdef Rel14 #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag > 0 ) { if (br_flag > 0 ) {
if ((m&1) == 0) if ((m&1) == 0)
re_offset = (m*6) + frame_parms->first_carrier_offset; re_offset = (m*6) + frame_parms->first_carrier_offset;
...@@ -1227,7 +1227,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, ...@@ -1227,7 +1227,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
stat_max/=(12); //normalize to energy per symbol and RE stat_max/=(12); //normalize to energy per symbol and RE
#ifdef DEBUG_PUCCH_RX #ifdef DEBUG_PUCCH_RX
printf("[eNB] PUCCH fmt1a/b: stat_max : %d, phase_max : %d\n",stat_max,phase_max); LOG_I(PHY,"[eNB] PUCCH fmt1a/b: stat_max : %d (%d : sigma2 %d), phase_max : %d\n",stat_max,dB_fixed(stat_max),sigma2_dB,phase_max);
#endif #endif
stat_re=0; stat_re=0;
...@@ -1368,7 +1368,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, ...@@ -1368,7 +1368,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
LOG_D(PHY,"PUCCH 1a/b: subframe %d : stat %d,%d (pos %d)\n",subframe,stat_re,stat_im, LOG_D(PHY,"PUCCH 1a/b: subframe %d : stat %d,%d (pos %d)\n",subframe,stat_re,stat_im,
(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])); (subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe]));
LOG_D(PHY,"PUCCH 1a/b: subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres); LOG_D(PHY,"In pucch.c PUCCH 1a/b: ACK subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
eNB->pucch1ab_stats[UE_id][(subframe<<11) + 2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_re); eNB->pucch1ab_stats[UE_id][(subframe<<11) + 2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_re);
eNB->pucch1ab_stats[UE_id][(subframe<<11) + 1+2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_im); eNB->pucch1ab_stats[UE_id][(subframe<<11) + 1+2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_im);
...@@ -1385,8 +1385,9 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, ...@@ -1385,8 +1385,9 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
#if defined(USRP_REC_PLAY) #if defined(USRP_REC_PLAY)
LOG_D(PHY,"PUCCH 1a/b: NAK subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres); LOG_D(PHY,"PUCCH 1a/b: NAK subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
#else #else
LOG_D(PHY,"PUCCH 1a/b: subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres); LOG_D(PHY,"In pucch.c PUCCH 1a/b: NAK subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
#endif #endif
*payload = 4; // DTX *payload = 4; // DTX
((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[0] = (int16_t)(stat_re); ((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[0] = (int16_t)(stat_re);
((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[1] = (int16_t)(stat_im); ((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[1] = (int16_t)(stat_im);
......
...@@ -153,6 +153,8 @@ typedef struct { ...@@ -153,6 +153,8 @@ typedef struct {
#else #else
uint8_t active; uint8_t active;
#endif #endif
/// indicator of UE type (0 = LTE, 1,2 = Cat-M)
int ue_type;
/// HARQ process mask, indicates which processes are currently active /// HARQ process mask, indicates which processes are currently active
uint16_t harq_mask; uint16_t harq_mask;
/// Indicator of TX activation per subframe. Used during PUCCH detection for ACK/NAK. /// Indicator of TX activation per subframe. Used during PUCCH detection for ACK/NAK.
......
...@@ -553,7 +553,11 @@ uint32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, ...@@ -553,7 +553,11 @@ uint32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
uint8_t *payload, uint8_t *payload,
int frame, int frame,
uint8_t subframe, uint8_t subframe,
uint8_t pucch1_thres); uint8_t pucch1_thres
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,int br_flag
#endif
);
/*! /*!
......
...@@ -738,7 +738,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, ...@@ -738,7 +738,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
int subframe = proc->subframe_rx; int subframe = proc->subframe_rx;
LTE_UL_eNB_HARQ_t *ulsch_harq; LTE_UL_eNB_HARQ_t *ulsch_harq;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LOG_D(PHY,"ue_type %d\n",ulsch->ue_type);
if (ulsch->ue_type>0) harq_pid = 0; if (ulsch->ue_type>0) harq_pid = 0;
else else
#endif #endif
......
...@@ -1127,7 +1127,7 @@ void rx_ulsch(PHY_VARS_eNB *eNB, ...@@ -1127,7 +1127,7 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
int16_t *llrp; int16_t *llrp;
int subframe = proc->subframe_rx; int subframe = proc->subframe_rx;
#ifdef Rel14 #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (ulsch[UE_id]->ue_type > 0) harq_pid =0; if (ulsch[UE_id]->ue_type > 0) harq_pid =0;
else else
#endif #endif
......
...@@ -1361,7 +1361,7 @@ void init_ul_hopping(LTE_DL_FRAME_PARMS *frame_parms); ...@@ -1361,7 +1361,7 @@ void init_ul_hopping(LTE_DL_FRAME_PARMS *frame_parms);
@param nB nB from 36.304 (0=4T,1=2T,2=T,3=T/2,4=T/4,5=T/8,6=T/16,7=T/32*/ @param nB nB from 36.304 (0=4T,1=2T,2=T,3=T/2,4=T/4,5=T/8,6=T/16,7=T/32*/
int init_ue_paging_info(PHY_VARS_UE *ue, long defaultPagingCycle, long nB); int init_ue_paging_info(PHY_VARS_UE *ue, long defaultPagingCycle, long nB);
#ifdef Rel14 #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void init_mpdcch(PHY_VARS_eNB *eNB); void init_mpdcch(PHY_VARS_eNB *eNB);
#endif #endif
......
...@@ -967,6 +967,22 @@ typedef struct PHY_VARS_eNB_s { ...@@ -967,6 +967,22 @@ typedef struct PHY_VARS_eNB_s {
/// mbsfn reference symbols /// mbsfn reference symbols
uint32_t lte_gold_mbsfn_table[10][3][42]; uint32_t lte_gold_mbsfn_table[10][3][42];
// PRACH energy detection parameters
/// Detection threshold for LTE PRACH
int prach_DTX_threshold;
/// Detection threshold for LTE-M PRACH per CE-level
int prach_DTX_threshold_emtc[4];
/// counter to average prach energh over first 100 prach opportunities
int prach_energy_counter;
// PUCCH1 energy detection parameters
int pucch1_DTX_threshold;
// PUCCH1 energy detection parameters for eMTC per CE-level
int pucch1_DTX_threshold_emtc[4];
// PUCCH1a/b energy detection parameters
int pucch1ab_DTX_threshold;
// PUCCH1a/b energy detection parameters for eMTC per CE-level
int pucch1ab_DTX_threshold_emtc[4];
uint32_t X_u[64][839]; uint32_t X_u[64][839];
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint32_t X_u_br[4][64][839]; uint32_t X_u_br[4][64][839];
...@@ -1003,8 +1019,7 @@ typedef struct PHY_VARS_eNB_s { ...@@ -1003,8 +1019,7 @@ typedef struct PHY_VARS_eNB_s {
/// if ==0 enables phy only test mode /// if ==0 enables phy only test mode
int mac_enabled; int mac_enabled;
/// counter to average prach energh over first 100 prach opportunities
int prach_energy_counter;
// PDSCH Varaibles // PDSCH Varaibles
PDSCH_CONFIG_DEDICATED pdsch_config_dedicated[NUMBER_OF_UE_MAX]; PDSCH_CONFIG_DEDICATED pdsch_config_dedicated[NUMBER_OF_UE_MAX];
......
...@@ -397,10 +397,12 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro ...@@ -397,10 +397,12 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
} }
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
dlsch0_harq->pdsch_start = eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols; if (rel13->ue_type>0)
#else dlsch0_harq->pdsch_start = rel10->pdsch_start;
dlsch0_harq->pdsch_start = rel10->pdsch_start; else
#endif #endif
dlsch0_harq->pdsch_start = eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols;
if (dlsch0_harq->round==0) { //get pointer to SDU if this a new SDU if (dlsch0_harq->round==0) { //get pointer to SDU if this a new SDU
AssertFatal(sdu!=NULL,"NFAPI: frame %d, subframe %d: programming dlsch for round 0, rnti %x, UE_id %d, harq_pid %d : sdu is null for pdu_index %d\n", AssertFatal(sdu!=NULL,"NFAPI: frame %d, subframe %d: programming dlsch for round 0, rnti %x, UE_id %d, harq_pid %d : sdu is null for pdu_index %d\n",
proc->frame_tx,proc->subframe_tx,rel8->rnti,UE_id,harq_pid, proc->frame_tx,proc->subframe_tx,rel8->rnti,UE_id,harq_pid,
...@@ -704,9 +706,12 @@ void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, ...@@ -704,9 +706,12 @@ void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
// check if we have received a dci for this ue and ulsch descriptor is configured // check if we have received a dci for this ue and ulsch descriptor is configured
if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_PDU_TYPE) { if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_PDU_TYPE) {
//if (UE_id == find_ulsch(ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE)<0)
//for (int i=0;i<16;i++) if (eNB->ulsch[i]->harq_mask>0) LOG_I(PHY,"rnti %x, mask %x\n",eNB->ulsch[i]->rnti,eNB->ulsch[i]->harq_mask >0);
AssertFatal((UE_id = find_ulsch(ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE))>=0, AssertFatal((UE_id = find_ulsch(ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE))>=0,
"No existing UE ULSCH for rnti %x\n",rel8->rnti); "No existing UE ULSCH for rnti %x\n",rel8->rnti);
LOG_D(PHY,"Applying UL config for UE %d, rnti %x for frame %d, subframe %d, modulation %d, rvidx %d\n", UE_id,rel8->rnti,frame,subframe,rel8->modulation_type,rel8->redundancy_version); LOG_D(PHY,"Applying UL config for UE %d, rnti %x for frame %d, subframe %d, modulation %d, rvidx %d, first_rb %d, nb_rb %d\n", UE_id,rel8->rnti,frame,subframe,rel8->modulation_type,rel8->redundancy_version,
rel8->resource_block_start,rel8->number_of_resource_blocks);
fill_ulsch(eNB,UE_id,&ul_config_pdu->ulsch_pdu,frame,subframe); fill_ulsch(eNB,UE_id,&ul_config_pdu->ulsch_pdu,frame,subframe);
......
This diff is collapsed.
...@@ -102,6 +102,7 @@ void prach_procedures(PHY_VARS_eNB *eNB ...@@ -102,6 +102,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
} }
} }
// run PRACH detection for CE-level 0 only for now when br_flag is set
rx_prach(eNB, rx_prach(eNB,
eNB->RU_list[0], eNB->RU_list[0],
&max_preamble[0], &max_preamble[0],
...@@ -114,8 +115,8 @@ void prach_procedures(PHY_VARS_eNB *eNB ...@@ -114,8 +115,8 @@ void prach_procedures(PHY_VARS_eNB *eNB
#endif #endif
); );
LOG_D(PHY,"[RAPROC] Frame %d, subframe %d : Most likely preamble %d, energy %d dB delay %d (prach_energy counter %d)\n", LOG_D(PHY,"[RAPROC] Frame %d, subframe %d : BR %d Most likely preamble %d, energy %d dB delay %d (prach_energy counter %d)\n",
frame,subframe, frame,subframe,br_flag,
max_preamble[0], max_preamble[0],
max_preamble_energy[0]/10, max_preamble_energy[0]/10,
max_preamble_delay[0], max_preamble_delay[0],
...@@ -141,7 +142,7 @@ void prach_procedures(PHY_VARS_eNB *eNB ...@@ -141,7 +142,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
*/ */
if (eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[0] == 1) { if (eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[0] == 1) {
if ((eNB->prach_energy_counter == 100) && (max_preamble_energy[0] > eNB->measurements.prach_I0 + 200)) { if ((eNB->prach_energy_counter == 100) && (max_preamble_energy[0] > eNB->measurements.prach_I0 + eNB->prach_DTX_threshold_emtc[0])) {
eNB->UL_INFO.rach_ind_br.rach_indication_body.number_of_preambles++; eNB->UL_INFO.rach_ind_br.rach_indication_body.number_of_preambles++;
eNB->preamble_list_br[ind].preamble_rel8.timing_advance = max_preamble_delay[ind]; // eNB->preamble_list_br[ind].preamble_rel8.timing_advance = max_preamble_delay[ind]; //
...@@ -168,7 +169,7 @@ void prach_procedures(PHY_VARS_eNB *eNB ...@@ -168,7 +169,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
{ {
if ((eNB->prach_energy_counter == 100) && if ((eNB->prach_energy_counter == 100) &&
(max_preamble_energy[0] > eNB->measurements.prach_I0+100)) { (max_preamble_energy[0] > eNB->measurements.prach_I0+eNB->prach_DTX_threshold)) {
LOG_I(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n", LOG_I(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n",
eNB->Mod_id, eNB->Mod_id,
......
...@@ -236,9 +236,7 @@ typedef struct protocol_ctxt_s { ...@@ -236,9 +236,7 @@ typedef struct protocol_ctxt_s {
sub_frame_t subframe; /*!< \brief LTE sub frame number.*/ sub_frame_t subframe; /*!< \brief LTE sub frame number.*/
eNB_index_t eNB_index; /*!< \brief valid for UE indicating the index of connected eNB(s) */ eNB_index_t eNB_index; /*!< \brief valid for UE indicating the index of connected eNB(s) */
boolean_t configured; /*!< \brief flag indicating whether the instance is configured or not */ boolean_t configured; /*!< \brief flag indicating whether the instance is configured or not */
#ifdef Rel14
boolean_t brOption; boolean_t brOption;
#endif
} protocol_ctxt_t; } protocol_ctxt_t;
// warning time hardcoded // warning time hardcoded
#define PROTOCOL_CTXT_TIME_MILLI_SECONDS(CtXt_h) ((CtXt_h)->frame*10+(CtXt_h)->subframe) #define PROTOCOL_CTXT_TIME_MILLI_SECONDS(CtXt_h) ((CtXt_h)->frame*10+(CtXt_h)->subframe)
......
...@@ -148,7 +148,7 @@ typedef struct RadioResourceConfig_s { ...@@ -148,7 +148,7 @@ typedef struct RadioResourceConfig_s {
long ue_TimersAndConstants_n311; long ue_TimersAndConstants_n311;
long ue_TransmissionMode; long ue_TransmissionMode;
long ue_multiple_max; long ue_multiple_max;
#ifdef Rel14 #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
//SIB2 BR Options //SIB2 BR Options
long* preambleTransMax_CE_r13; long* preambleTransMax_CE_r13;
BOOLEAN_t prach_ConfigCommon_v1310; BOOLEAN_t prach_ConfigCommon_v1310;
......
...@@ -44,7 +44,21 @@ ...@@ -44,7 +44,21 @@
#define CONFIG_STRING_L1_LOCAL_N_PORTD "local_n_portd" #define CONFIG_STRING_L1_LOCAL_N_PORTD "local_n_portd"
#define CONFIG_STRING_L1_REMOTE_N_PORTD "remote_n_portd" #define CONFIG_STRING_L1_REMOTE_N_PORTD "remote_n_portd"
#define CONFIG_STRING_L1_TRANSPORT_N_PREFERENCE "tr_n_preference" #define CONFIG_STRING_L1_TRANSPORT_N_PREFERENCE "tr_n_preference"
#define CONFIG_STRING_L1_PRACH_DTX_THRESHOLD "prach_dtx_threshold"
#define CONFIG_STRING_L1_PUCCH1_DTX_THRESHOLD "pucch1_dtx_threshold"
#define CONFIG_STRING_L1_PUCCH1AB_DTX_THRESHOLD "pucch1ab_dtx_threshold"
#define CONFIG_STRING_L1_PRACH_DTX_EMTC0_THRESHOLD "prach_dtx_emtc0_threshold"
#define CONFIG_STRING_L1_PUCCH1_DTX_EMTC0_THRESHOLD "pucch1_dtx_emtc0_threshold"
#define CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC0_THRESHOLD "pucch1ab_dtx_emtc0_threshold"
#define CONFIG_STRING_L1_PRACH_DTX_EMTC1_THRESHOLD "prach_dtx_emtc1_threshold"
#define CONFIG_STRING_L1_PUCCH1_DTX_EMTC1_THRESHOLD "pucch1_dtx_emtc1_threshold"
#define CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC1_THRESHOLD "pucch1ab_dtx_emtc1_threshold"
#define CONFIG_STRING_L1_PRACH_DTX_EMTC2_THRESHOLD "prach_dtx_emtc2_threshold"
#define CONFIG_STRING_L1_PUCCH1_DTX_EMTC2_THRESHOLD "pucch1_dtx_emtc2_threshold"
#define CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC2_THRESHOLD "pucch1ab_dtx_emtc2_threshold"
#define CONFIG_STRING_L1_PRACH_DTX_EMTC3_THRESHOLD "prach_dtx_emtc3_threshold"
#define CONFIG_STRING_L1_PUCCH1_DTX_EMTC3_THRESHOLD "pucch1_dtx_emtc3_threshold"
#define CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC3_THRESHOLD "pucch1ab_dtx_emtc3_threshold"
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* L1 configuration parameters */ /* L1 configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt */ /* optname helpstr paramflags XXXptr defXXXval type numelt */
...@@ -59,7 +73,22 @@ ...@@ -59,7 +73,22 @@
{CONFIG_STRING_L1_REMOTE_N_PORTC, NULL, 0, uptr:NULL, defintval:50030, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_REMOTE_N_PORTC, NULL, 0, uptr:NULL, defintval:50030, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_LOCAL_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_LOCAL_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_REMOTE_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_REMOTE_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \
} {CONFIG_STRING_L1_PRACH_DTX_THRESHOLD, NULL, 0, iptr:NULL, defintval:100, TYPE_INT, 0}, \
{CONFIG_STRING_L1_PUCCH1_DTX_THRESHOLD, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
{CONFIG_STRING_L1_PUCCH1AB_DTX_THRESHOLD, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0}, \
{CONFIG_STRING_L1_PRACH_DTX_EMTC0_THRESHOLD, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
{CONFIG_STRING_L1_PUCCH1_DTX_EMTC0_THRESHOLD, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
{CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC0_THRESHOLD, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0}, \
{CONFIG_STRING_L1_PRACH_DTX_EMTC1_THRESHOLD, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
{CONFIG_STRING_L1_PUCCH1_DTX_EMTC1_THRESHOLD, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
{CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC1_THRESHOLD, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0}, \
{CONFIG_STRING_L1_PRACH_DTX_EMTC2_THRESHOLD, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
{CONFIG_STRING_L1_PUCCH1_DTX_EMTC2_THRESHOLD, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
{CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC2_THRESHOLD, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0}, \
{CONFIG_STRING_L1_PRACH_DTX_EMTC3_THRESHOLD, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
{CONFIG_STRING_L1_PUCCH1_DTX_EMTC3_THRESHOLD, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
{CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC3_THRESHOLD, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0} \
}
#define L1_CC_IDX 0 #define L1_CC_IDX 0
#define L1_TRANSPORT_N_PREFERENCE_IDX 1 #define L1_TRANSPORT_N_PREFERENCE_IDX 1
#define L1_LOCAL_N_IF_NAME_IDX 2 #define L1_LOCAL_N_IF_NAME_IDX 2
...@@ -69,5 +98,19 @@ ...@@ -69,5 +98,19 @@
#define L1_REMOTE_N_PORTC_IDX 6 #define L1_REMOTE_N_PORTC_IDX 6
#define L1_LOCAL_N_PORTD_IDX 7 #define L1_LOCAL_N_PORTD_IDX 7
#define L1_REMOTE_N_PORTD_IDX 8 #define L1_REMOTE_N_PORTD_IDX 8
#define L1_PRACH_DTX_THRESHOLD_IDX 9
#define L1_PUCCH1_DTX_THRESHOLD_IDX 10
#define L1_PUCCH1AB_DTX_THRESHOLD_IDX 11
#define L1_PRACH_DTX_EMTC0_THRESHOLD_IDX 12
#define L1_PUCCH1_DTX_EMTC0_THRESHOLD_IDX 13
#define L1_PUCCH1AB_DTX_EMTC0_THRESHOLD_IDX 14
#define L1_PRACH_DTX_EMTC1_THRESHOLD_IDX 15
#define L1_PUCCH1_DTX_EMTC1_THRESHOLD_IDX 16
#define L1_PUCCH1AB_DTX_EMTC1_THRESHOLD_IDX 17
#define L1_PRACH_DTX_EMTC2_THRESHOLD_IDX 18
#define L1_PUCCH1_DTX_EMTC2_THRESHOLD_IDX 19
#define L1_PUCCH1AB_DTX_EMTC2_THRESHOLD_IDX 20
#define L1_PRACH_DTX_EMTC3_THRESHOLD_IDX 21
#define L1_PUCCH1_DTX_EMTC3_THRESHOLD_IDX 22
#define L1_PUCCH1AB_DTX_EMTC3_THRESHOLD_IDX 23
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------------------------------------------------------------------------------*/
...@@ -236,6 +236,16 @@ void RCconfig_L1(void) { ...@@ -236,6 +236,16 @@ void RCconfig_L1(void) {
RC.eNB[j][0]->eth_params_n .remote_portd); RC.eNB[j][0]->eth_params_n .remote_portd);
} else { // other midhaul } else { // other midhaul
} }
// PRACH/PUCCH parameters
RC.eNB[j][0]->prach_DTX_threshold = *(L1_ParamList.paramarray[j][L1_PRACH_DTX_THRESHOLD_IDX].iptr);
RC.eNB[j][0]->pucch1_DTX_threshold = *(L1_ParamList.paramarray[j][L1_PUCCH1_DTX_THRESHOLD_IDX].iptr);
RC.eNB[j][0]->pucch1ab_DTX_threshold = *(L1_ParamList.paramarray[j][L1_PUCCH1AB_DTX_THRESHOLD_IDX].iptr);
for (int ce_level=0;ce_level<4;ce_level++) {
RC.eNB[j][0]->prach_DTX_threshold_emtc[ce_level] = *(L1_ParamList.paramarray[j][L1_PRACH_DTX_EMTC0_THRESHOLD_IDX+ce_level].iptr);
RC.eNB[j][0]->pucch1_DTX_threshold_emtc[ce_level] = *(L1_ParamList.paramarray[j][L1_PUCCH1_DTX_EMTC0_THRESHOLD_IDX+ce_level].iptr);
RC.eNB[j][0]->pucch1ab_DTX_threshold_emtc[ce_level] = *(L1_ParamList.paramarray[j][L1_PUCCH1AB_DTX_EMTC0_THRESHOLD_IDX+ce_level].iptr);
}
}// j=0..num_inst }// j=0..num_inst
LOG_I(ENB_APP,"Initializing northbound interface for L1\n"); LOG_I(ENB_APP,"Initializing northbound interface for L1\n");
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
#define ENB_CONFIG_STRING_LAST_PREAMBLE_R13 "lastPreamble_r13" #define ENB_CONFIG_STRING_LAST_PREAMBLE_R13 "lastPreamble_r13"
#define ENB_CONFIG_STRING_RA_RESPONSE_WINDOW_SIZE_R13 "ra_ResponseWindowSize_r13" #define ENB_CONFIG_STRING_RA_RESPONSE_WINDOW_SIZE_R13 "ra_ResponseWindowSize_r13"
#define ENB_CONFIG_STRING_MAC_CONTENTION_RESOLUTION_TIMER_R13 "mac_ContentionResolutionTimer_r13" #define ENB_CONFIG_STRING_MAC_CONTENTION_RESOLUTION_TIMER_R13 "mac_ContentionResolutionTimer_r13"
#define ENB_CONFIG_STRING_RAR_HOPPING_CONFIG_R13 "rar_HoppingConfig_r13 " #define ENB_CONFIG_STRING_RAR_HOPPING_CONFIG_R13 "rar_HoppingConfig_r13"
#define ENB_CONFIG_STRING_RACH_CE_LEVELINFOLIST_R13 "rach_CE_LevelInfoList_r13" #define ENB_CONFIG_STRING_RACH_CE_LEVELINFOLIST_R13 "rach_CE_LevelInfoList_r13"
#define ENB_CONFIG_STRING_PRACH_CONFIG_INDEX_BR "prach_config_index_br" #define ENB_CONFIG_STRING_PRACH_CONFIG_INDEX_BR "prach_config_index_br"
#define ENB_CONFIG_STRING_PRACH_FREQ_OFFSET_BR "prach_freq_offset_br" #define ENB_CONFIG_STRING_PRACH_FREQ_OFFSET_BR "prach_freq_offset_br"
......
...@@ -61,13 +61,13 @@ ...@@ -61,13 +61,13 @@
#include "RACH-ConfigCommon.h" #include "RACH-ConfigCommon.h"
#include "MeasObjectToAddModList.h" #include "MeasObjectToAddModList.h"
#include "MobilityControlInfo.h" #include "MobilityControlInfo.h"
#if defined(Rel10) || defined(Rel14) #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#include "MBSFN-AreaInfoList-r9.h" #include "MBSFN-AreaInfoList-r9.h"
#include "MBSFN-SubframeConfigList.h" #include "MBSFN-SubframeConfigList.h"
#include "PMCH-InfoList-r9.h" #include "PMCH-InfoList-r9.h"
#include "SCellToAddMod-r10.h" #include "SCellToAddMod-r10.h"
#endif #endif
#ifdef Rel14 #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#include "SystemInformationBlockType1-v1310-IEs.h" #include "SystemInformationBlockType1-v1310-IEs.h"
#endif #endif
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
#define SCH_PAYLOAD_SIZE_MAX 4096 #define SCH_PAYLOAD_SIZE_MAX 4096
/// Logical channel ids from 36-311 (Note BCCH is not specified in 36-311, uses the same as first DRB) /// Logical channel ids from 36-311 (Note BCCH is not specified in 36-311, uses the same as first DRB)
#if defined(Rel10) || defined(Rel14) #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
// Mask for identifying subframe for MBMS // Mask for identifying subframe for MBMS
#define MBSFN_TDD_SF3 0x80// for TDD #define MBSFN_TDD_SF3 0x80// for TDD
...@@ -283,7 +283,7 @@ typedef struct { ...@@ -283,7 +283,7 @@ typedef struct {
uint8_t payload[PCCH_PAYLOAD_SIZE_MAX] ; uint8_t payload[PCCH_PAYLOAD_SIZE_MAX] ;
} __attribute__((__packed__))PCCH_PDU; } __attribute__((__packed__))PCCH_PDU;
#if defined(Rel10) || defined(Rel14) #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
/*! \brief MCCH payload */ /*! \brief MCCH payload */
typedef struct { typedef struct {
uint8_t payload[MCCH_PAYLOAD_SIZE_MAX] ; uint8_t payload[MCCH_PAYLOAD_SIZE_MAX] ;
...@@ -340,7 +340,7 @@ typedef struct { ...@@ -340,7 +340,7 @@ typedef struct {
/*!\brief LCID of padding LCID for DLSCH */ /*!\brief LCID of padding LCID for DLSCH */
#define SHORT_PADDING 31 #define SHORT_PADDING 31
#if defined(Rel10) || defined(Rel14) #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
// MCH LCHAN IDs (table6.2.1-4 TS36.321) // MCH LCHAN IDs (table6.2.1-4 TS36.321)
/*!\brief LCID of MCCH for DL */ /*!\brief LCID of MCCH for DL */
#define MCCH_LCHANID 0 #define MCCH_LCHANID 0
...@@ -759,7 +759,7 @@ typedef struct { ...@@ -759,7 +759,7 @@ typedef struct {
eNB_UE_estimated_distances distance; eNB_UE_estimated_distances distance;
#endif #endif
#ifdef Rel14 #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint8_t rach_resource_type; uint8_t rach_resource_type;
uint16_t mpdcch_repetition_cnt; uint16_t mpdcch_repetition_cnt;
...@@ -923,7 +923,7 @@ typedef struct { ...@@ -923,7 +923,7 @@ typedef struct {
uint8_t msg4_rrc_sdu_length; uint8_t msg4_rrc_sdu_length;
uint32_t msg4_delay; uint32_t msg4_delay;
#ifdef Rel14 #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint8_t rach_resource_type; uint8_t rach_resource_type;
uint8_t msg2_mpdcch_repetition_cnt; uint8_t msg2_mpdcch_repetition_cnt;
uint8_t msg2_mpdcch_done; uint8_t msg2_mpdcch_done;
...@@ -985,7 +985,7 @@ typedef struct { ...@@ -985,7 +985,7 @@ typedef struct {
uint32_t dl_CarrierFreq; uint32_t dl_CarrierFreq;
BCCH_BCH_Message_t *mib; BCCH_BCH_Message_t *mib;
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon; RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
#ifdef Rel14 #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR; RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR;
#endif #endif
TDD_Config_t *tdd_Config; TDD_Config_t *tdd_Config;
...@@ -1012,7 +1012,7 @@ typedef struct { ...@@ -1012,7 +1012,7 @@ typedef struct {
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8];
/// number of subframe allocation pattern available for MBSFN sync area /// number of subframe allocation pattern available for MBSFN sync area
uint8_t num_sf_allocation_pattern; uint8_t num_sf_allocation_pattern;
#if defined(Rel10) || defined(Rel14) #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
/// MBMS Flag /// MBMS Flag
uint8_t MBMS_flag; uint8_t MBMS_flag;
/// Outgoing MCCH pdu for PHY /// Outgoing MCCH pdu for PHY
...@@ -1034,7 +1034,7 @@ typedef struct { ...@@ -1034,7 +1034,7 @@ typedef struct {
/// Outgoing MCH pdu for PHY /// Outgoing MCH pdu for PHY
MCH_PDU MCH_pdu; MCH_PDU MCH_pdu;
#endif #endif
#ifdef Rel14 #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// Rel13 parameters from SIB1 /// Rel13 parameters from SIB1
SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext; SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext;
/// Counter for SIB1-BR scheduling /// Counter for SIB1-BR scheduling
...@@ -1222,7 +1222,7 @@ typedef struct { ...@@ -1222,7 +1222,7 @@ typedef struct {
struct RACH_ConfigDedicated *rach_ConfigDedicated; struct RACH_ConfigDedicated *rach_ConfigDedicated;
/// pointer to RRC PHY configuration /// pointer to RRC PHY configuration
struct PhysicalConfigDedicated *physicalConfigDedicated; struct PhysicalConfigDedicated *physicalConfigDedicated;
#if defined(Rel10) || defined(Rel14) #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
/// pointer to RRC PHY configuration SCEll /// pointer to RRC PHY configuration SCEll
struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10; struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10;
#endif #endif
...@@ -1298,7 +1298,7 @@ typedef struct { ...@@ -1298,7 +1298,7 @@ typedef struct {
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA? struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA?
/// number of subframe allocation pattern available for MBSFN sync area /// number of subframe allocation pattern available for MBSFN sync area
uint8_t num_sf_allocation_pattern; uint8_t num_sf_allocation_pattern;
#if defined(Rel10) || defined(Rel14) #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
/// number of active MBSFN area /// number of active MBSFN area
uint8_t num_active_mbsfn_area; uint8_t num_active_mbsfn_area;
/// MBSFN Area Info /// MBSFN Area Info
......
...@@ -261,12 +261,9 @@ schedule_SR(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) ...@@ -261,12 +261,9 @@ schedule_SR(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
ul_req_body = &ul_req->ul_config_request_body; ul_req_body = &ul_req->ul_config_request_body;
// drop the allocation if the UE hasn't send RRCConnectionSetupComplete yet // drop the allocation if the UE hasn't send RRCConnectionSetupComplete yet
if (mac_eNB_get_rrc_status(module_idP, UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) continue; //if (mac_eNB_get_rrc_status(module_idP, UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) continue;
AssertFatal(UE_list-> if (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated== NULL) continue;
UE_template[CC_id][UE_id].physicalConfigDedicated!= NULL,
"physicalConfigDedicated is null for UE %d\n",
UE_id);
if ((SRconfig = UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->schedulingRequestConfig) != NULL) { if ((SRconfig = UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->schedulingRequestConfig) != NULL) {
if (SRconfig->present == LTE_SchedulingRequestConfig_PR_setup) { if (SRconfig->present == LTE_SchedulingRequestConfig_PR_setup) {
...@@ -681,9 +678,9 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, ...@@ -681,9 +678,9 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
schedule_SR(module_idP, frameP, subframeP); schedule_SR(module_idP, frameP, subframeP);
// This schedules UCI_CSI in subframeP // This schedules UCI_CSI in subframeP
schedule_CSI(module_idP, frameP, subframeP); schedule_CSI(module_idP, frameP, subframeP);
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
// This schedules DLSCH in subframeP // This schedules DLSCH in subframeP
schedule_ue_spec_br(module_idP,frameP,subframeP); schedule_ue_spec_br(module_idP, frameP, subframeP);
#endif #endif
// This schedules DLSCH in subframeP // This schedules DLSCH in subframeP
if (schedule_ue_spec_p != NULL) { if (schedule_ue_spec_p != NULL) {
......
This diff is collapsed.
This diff is collapsed.
...@@ -1451,7 +1451,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -1451,7 +1451,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
MBMS_FLAG_NO, MBMS_FLAG_NO,
lcid, lcid,
TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch
#ifdef Rel14 #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
, 0, 0 , 0, 0
#endif #endif
); );
...@@ -1472,7 +1472,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -1472,7 +1472,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
lcid, lcid,
TBS, //not used TBS, //not used
(char *)&dlsch_buffer[sdu_length_total] (char *)&dlsch_buffer[sdu_length_total]
#ifdef Rel14 #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
, 0, 0 , 0, 0
#endif #endif
); );
......
...@@ -1951,8 +1951,7 @@ find_UE_id(module_id_t mod_idP, ...@@ -1951,8 +1951,7 @@ find_UE_id(module_id_t mod_idP,
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) { for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (UE_list->active[UE_id] == TRUE) { if (UE_list->active[UE_id] == TRUE) {
if (UE_list->UE_template[UE_PCCID(mod_idP, if (UE_list->UE_template[UE_PCCID(mod_idP, UE_id)][UE_id].rnti == rntiP) {
UE_id)][UE_id].rnti == rntiP) {
return UE_id; return UE_id;
} }
} }
...@@ -4075,6 +4074,8 @@ extract_harq(module_id_t mod_idP, ...@@ -4075,6 +4074,8 @@ extract_harq(module_id_t mod_idP,
} }
} }
LOG_D(MAC, "In extract_harq(): pdu[0] = %d for harq_pid = %d\n", pdu[0], harq_pid);
if (pdu[0] == 1) { // ACK if (pdu[0] == 1) { // ACK
sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process
sched_ctl->tbcnt[CC_idP][harq_pid] = 0; sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
......
This diff is collapsed.
...@@ -110,98 +110,124 @@ fill_rar(const module_id_t module_idP, ...@@ -110,98 +110,124 @@ fill_rar(const module_id_t module_idP,
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
/*
* Fill the RAR buffer (header + PDU) for LTE-M devices
*/
unsigned short fill_rar_br(eNB_MAC_INST *eNB, unsigned short fill_rar_br(eNB_MAC_INST *eNB,
int CC_id, int CC_id,
RA_t *ra, RA_t *ra,
const frame_t frameP, const frame_t frameP,
const sub_frame_t subframeP, const sub_frame_t subframeP,
uint8_t* const dlsch_buffer, uint8_t* const dlsch_buffer,
const uint8_t ce_level const uint8_t ce_level)
)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
{ {
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *)dlsch_buffer;
COMMON_channels_t *cc = &eNB->common_channels[CC_id]; COMMON_channels_t *cc = &eNB->common_channels[CC_id];
uint8_t *rar = (uint8_t *)(dlsch_buffer+1); uint8_t *rar = (uint8_t *)(dlsch_buffer + 1);
uint32_t rballoc,reps;
uint32_t TPC,ULdelay,cqireq,mpdcch_nb_index;
int input_buffer_length;
uint32_t rballoc = 0;
uint32_t reps = 0;
uint32_t ULdelay = 0;
uint32_t cqireq = 0;
uint32_t mpdcch_nb_index = 0;
uint32_t TPC = 0;
int input_buffer_length = 0;
int N_NB_index = 0;
AssertFatal(ra != NULL, "RA is null \n"); AssertFatal(ra != NULL, "RA is null \n");
// subheader fixed /* Subheader fixed */
rarh->E = 0; // First and last RAR rarh->E = 0; // First and last RAR
rarh->T = 1; // 0 for E/T/R/R/BI subheader, 1 for E/T/RAPID subheader rarh->T = 1; // 0 for E/T/R/R/BI subheader, 1 for E/T/RAPID subheader
rarh->RAPID = ra->preamble_index; // Respond to Preamble 0 only for the moment rarh->RAPID = ra->preamble_index; // Respond to Preamble
ra->timing_offset /= 16; //T_A = N_TA/16, where N_TA should be on a 30.72Msps
rar[0] = (uint8_t) (ra->timing_offset >> (2 + 4)); // 7 MSBs of timing advance + divide by 4 /* RAR PDU */
rar[1] = (uint8_t) (ra->timing_offset << (4 - 2)) & 0xf0; // 4 LSBs of timing advance + divide by 4 /* TA Command */
ra->timing_offset /= 16; // T_A = N_TA/16, where N_TA should be on a 30.72Msps
int N_NB_index; rar[0] = (uint8_t) (ra->timing_offset >> 4) & 0x7f; // 7 MSBs of timing advance
rar[1] = (uint8_t) (ra->timing_offset & 0x0f) << 4; // 4 LSBs of timing advance
// Copy the Msg2 narrowband /* Copy the Msg2 narrowband */
ra->msg34_narrowband = ra->msg2_narrowband; ra->msg34_narrowband = ra->msg2_narrowband;
ra->msg3_first_rb = 0; ra->msg3_first_rb = 0;
ra->msg3_nb_rb = 2; ra->msg3_nb_rb = 2;
if (ce_level < 2) { // CE Level 0, 1 (CEmodeA)
if (ce_level < 2) { //CE Level 0,1, CEmodeA
input_buffer_length = 6; input_buffer_length = 6;
N_NB_index = get_numnarrowbandbits(cc->mib->message.dl_Bandwidth); N_NB_index = get_numnarrowbandbits(cc->mib->message.dl_Bandwidth);
rar[4] = (uint8_t)(ra->rnti>>8); /* UL Grant */
rar[5] = (uint8_t)(ra->rnti&0xff);
//cc->ra[ra_idx].timing_offset = 0;
reps = 0; reps = 0;
ra->msg3_mcs = 7; ra->msg3_mcs = 7;
TPC = 3; // no power increase TPC = 3; // no power increase
ULdelay = 0; ULdelay = 0;
cqireq = 0; cqireq = 0;
mpdcch_nb_index = 0; mpdcch_nb_index = 0;
rballoc = mac_computeRIV(6,ra->msg3_first_rb,ra->msg3_nb_rb); rballoc = mac_computeRIV(6, ra->msg3_first_rb, ra->msg3_nb_rb);
uint32_t buffer = 0; uint32_t buffer = 0;
buffer |= ra->msg34_narrowband << (16 + (4 - N_NB_index)); buffer |= ra->msg34_narrowband << (16 + (4 - N_NB_index));
buffer |= ((rballoc & 0xFF) << (12 + (4 - N_NB_index))); buffer |= ((rballoc & 0x0F) << (12 + (4 - N_NB_index)));
buffer |= ((reps & 0x03) << (10 + (4 - N_NB_index))); buffer |= ((reps & 0x03) << (10 + (4 - N_NB_index)));
buffer |= ((ra->msg3_mcs & 0x07) << (7 + (4 - N_NB_index))); buffer |= ((ra->msg3_mcs & 0x07) << (7 + (4 - N_NB_index)));
buffer |= ((TPC & 0x07) << (4 + (4 - N_NB_index))); buffer |= ((TPC & 0x07) << (4 + (4 - N_NB_index)));
buffer |= ((cqireq & 0x01) << (3 + (4 - N_NB_index))); buffer |= ((cqireq & 0x01) << (3 + (4 - N_NB_index)));
buffer |= ((ULdelay & 0x01) << (2 + (4 - N_NB_index))); buffer |= ((ULdelay & 0x01) << (2 + (4 - N_NB_index)));
buffer |= (mpdcch_nb_index << (4 - N_NB_index)); buffer |= (mpdcch_nb_index << (4 - N_NB_index));
rar[1] = (buffer>>16) & 0x0F;
rar[2] = (buffer>>8) & 0xFF;
rar[3] = buffer&0xFF;
}
else { // CE level 2,3 => CEModeB
AssertFatal(1==0,"Shouldn't get here ...\n"); rar[1] |= (uint8_t) (buffer >> 16) & 0x0F;
input_buffer_length =5; rar[2] = (uint8_t) (buffer >> 8) & 0xFF;
rar[3] = (uint8_t) buffer & 0xFF;
/* RA CRNTI */
rar[4] = (uint8_t)(ra->rnti >> 8);
rar[5] = (uint8_t)(ra->rnti & 0xff);
} else { // CE level 2, 3 (CEModeB)
rar[3] = (uint8_t)(ra->rnti>>8); AssertFatal(1 == 0, "Shouldn't get here ...\n");
rar[4] = (uint8_t)(ra->rnti&0xff);
input_buffer_length = 5;
rar[3] = (uint8_t)(ra->rnti >> 8);
rar[4] = (uint8_t)(ra->rnti & 0xff);
} }
LOG_I(MAC,"[RAPROC] Frame %d Subframe %d : Generating RAR BR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for ce_level %d, CRNTI %x,preamble %d/%d,TIMING OFFSET %d\n",
frameP,subframeP, LOG_I(MAC, "[RAPROC] Frame %d Subframe %d : Generating RAR BR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for ce_level %d, CRNTI %x, preamble %d/%d, TIMING OFFSET %d\n",
*(uint8_t*)rarh,rar[0],rar[1],rar[2],rar[3],rar[4],rar[5], frameP,
subframeP,
*(uint8_t*) rarh,
rar[0],
rar[1],
rar[2],
rar[3],
rar[4],
rar[5],
ce_level, ce_level,
ra->rnti, ra->rnti,
rarh->RAPID,ra->preamble_index, rarh->RAPID,
ra->preamble_index,
ra->timing_offset); ra->timing_offset);
if (opt_enabled) { if (opt_enabled) {
trace_pdu(DIRECTION_DOWNLINK , dlsch_buffer, input_buffer_length, eNB->Mod_id, WS_RA_RNTI , 1, trace_pdu(DIRECTION_DOWNLINK,
eNB->frame, eNB->subframe, 0, 0); dlsch_buffer,
LOG_D(OPT, input_buffer_length,
"[RAPROC] RAR Frame %d trace pdu for rnti %x and rapid %d size %d\n", eNB->Mod_id,
frameP, ra->rnti, rarh->RAPID, input_buffer_length); 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",
frameP,
ra->rnti,
rarh->RAPID,
input_buffer_length);
} }
return (ra->rnti); return (ra->rnti);
......
...@@ -135,7 +135,7 @@ rrc_data_ind( ...@@ -135,7 +135,7 @@ rrc_data_ind(
LOG_I(RRC, "[UE %x] Frame %d: received a DCCH %d message on SRB %d with Size %d from eNB %d\n", LOG_I(RRC, "[UE %x] Frame %d: received a DCCH %d message on SRB %d with Size %d from eNB %d\n",
ctxt_pP->module_id, ctxt_pP->frame, DCCH_index,Srb_id,sdu_sizeP, ctxt_pP->eNB_index); ctxt_pP->module_id, ctxt_pP->frame, DCCH_index,Srb_id,sdu_sizeP, ctxt_pP->eNB_index);
} else { } else {
LOG_I(RRC, "[eNB %d] Frame %d: received a DCCH %d message on SRB %d with Size %d from UE %x\n", LOG_D(RRC, "[eNB %d] Frame %d: received a DCCH %d message on SRB %d with Size %d from UE %x\n",
ctxt_pP->module_id, ctxt_pP->module_id,
ctxt_pP->frame, ctxt_pP->frame,
DCCH_index, DCCH_index,
......
...@@ -3083,6 +3083,27 @@ uint8_t do_RRCConnectionSetup_BR( ...@@ -3083,6 +3083,27 @@ uint8_t do_RRCConnectionSetup_BR(
physicalConfigDedicated2->ext7->csi_RS_ConfigNZPToReleaseListExt_r13 = NULL; physicalConfigDedicated2->ext7->csi_RS_ConfigNZPToReleaseListExt_r13 = NULL;
rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.mac_MainConfig = CALLOC(1,sizeof(struct LTE_RadioResourceConfigDedicated__mac_MainConfig));
rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.mac_MainConfig->present = LTE_RadioResourceConfigDedicated__mac_MainConfig_PR_explicitValue;
LTE_MAC_MainConfig_t *mac_MainConfig = &rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.mac_MainConfig->choice.explicitValue;
mac_MainConfig->ul_SCH_Config = CALLOC(1, sizeof(*mac_MainConfig->ul_SCH_Config));
//long *maxHARQ_Tx = CALLOC(1, sizeof(long));
//*maxHARQ_Tx = LTE_MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
long *periodicBSR_Timer = CALLOC(1, sizeof(long));
*periodicBSR_Timer = LTE_PeriodicBSR_Timer_r12_sf64;
//mac_MainConfig->ul_SCH_Config->maxHARQ_Tx = maxHARQ_Tx;
mac_MainConfig->ul_SCH_Config->periodicBSR_Timer = periodicBSR_Timer;
mac_MainConfig->ul_SCH_Config->retxBSR_Timer = LTE_RetxBSR_Timer_r12_sf320;
mac_MainConfig->ul_SCH_Config->ttiBundling = 0; // FALSE
mac_MainConfig->timeAlignmentTimerDedicated = LTE_TimeAlignmentTimer_infinity;
mac_MainConfig->drx_Config = NULL;
mac_MainConfig->phr_Config = CALLOC(1, sizeof(*mac_MainConfig->phr_Config));
mac_MainConfig->phr_Config->present = LTE_MAC_MainConfig__phr_Config_PR_setup;
mac_MainConfig->phr_Config->choice.setup.periodicPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf20; // sf20 = 20 subframes
mac_MainConfig->phr_Config->choice.setup.prohibitPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf20; // sf20 = 20 subframes
mac_MainConfig->phr_Config->choice.setup.dl_PathlossChange = LTE_MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB3; // Value dB1 =1 dB, dB3 = 3 dB
rrcConnectionSetup->rrc_TransactionIdentifier = Transaction_id; rrcConnectionSetup->rrc_TransactionIdentifier = Transaction_id;
rrcConnectionSetup->criticalExtensions.present = LTE_RRCConnectionSetup__criticalExtensions_PR_c1; rrcConnectionSetup->criticalExtensions.present = LTE_RRCConnectionSetup__criticalExtensions_PR_c1;
rrcConnectionSetup->criticalExtensions.choice.c1.present =LTE_RRCConnectionSetup__criticalExtensions__c1_PR_rrcConnectionSetup_r8 ; rrcConnectionSetup->criticalExtensions.choice.c1.present =LTE_RRCConnectionSetup__criticalExtensions__c1_PR_rrcConnectionSetup_r8 ;
...@@ -3091,7 +3112,7 @@ uint8_t do_RRCConnectionSetup_BR( ...@@ -3091,7 +3112,7 @@ uint8_t do_RRCConnectionSetup_BR(
rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.drb_ToReleaseList = NULL; rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.drb_ToReleaseList = NULL;
rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.sps_Config = NULL; rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.sps_Config = NULL;
rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.physicalConfigDedicated = physicalConfigDedicated2; rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.physicalConfigDedicated = physicalConfigDedicated2;
rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.mac_MainConfig = NULL; // rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.mac_MainConfig = NULL;
#ifdef XER_PRINT #ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg); xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
......
...@@ -3204,7 +3204,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t *cons ...@@ -3204,7 +3204,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t *cons
} }
LOG_I(RRC, LOG_I(RRC,
"[eNB %d] Frame %d, Logical Channel DL-DCCH, Generate LTE_RRCConnectionReconfiguration (bytes %d, UE id %x)\n", "[eNB %d] Frame %d, Hello there! Logical Channel DL-DCCH, Generate LTE_RRCConnectionReconfiguration (bytes %d, UE id %x)\n",
ctxt_pP->module_id, ctxt_pP->frame, size, ue_context_pP->ue_context.rnti); ctxt_pP->module_id, ctxt_pP->frame, size, ue_context_pP->ue_context.rnti);
LOG_D(RRC, LOG_D(RRC,
"[FRAME %05d][RRC_eNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (rrcConnectionReconfiguration to UE %x MUI %d) --->][PDCP][MOD %u][RB %u]\n", "[FRAME %05d][RRC_eNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (rrcConnectionReconfiguration to UE %x MUI %d) --->][PDCP][MOD %u][RB %u]\n",
...@@ -5175,7 +5175,7 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc ...@@ -5175,7 +5175,7 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc
NULL, NULL,
NULL, NULL,
NULL NULL
#if defined(Rel10) || defined(Rel14) #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
, (LTE_PMCH_InfoList_r9_t *) NULL , (LTE_PMCH_InfoList_r9_t *) NULL
#endif #endif
, NULL); , NULL);
...@@ -5183,7 +5183,7 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc ...@@ -5183,7 +5183,7 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc
ue_context_p->ue_context.SRB_configList, ue_context_p->ue_context.SRB_configList,
(LTE_DRB_ToAddModList_t *) NULL, (LTE_DRB_ToAddModList_t *) NULL,
(LTE_DRB_ToReleaseList_t *) NULL (LTE_DRB_ToReleaseList_t *) NULL
#if defined(Rel10) || defined(Rel14) #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
, (LTE_PMCH_InfoList_r9_t *) NULL , (LTE_PMCH_InfoList_r9_t *) NULL
, 0, 0 , 0, 0
#endif #endif
...@@ -5571,43 +5571,44 @@ void rrc_eNB_generate_RRCConnectionSetup(const protocol_ctxt_t *const ctxt_pP, ...@@ -5571,43 +5571,44 @@ void rrc_eNB_generate_RRCConnectionSetup(const protocol_ctxt_t *const ctxt_pP,
{ {
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size = RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size =
do_RRCConnectionSetup(ctxt_pP, do_RRCConnectionSetup(ctxt_pP,
ue_context_pP, ue_context_pP,
CC_id, CC_id,
(uint8_t *) RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload, (uint8_t *) RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload,
(uint8_t) RC.rrc[ctxt_pP->module_id]->carrier[CC_id].p_eNB, //at this point we do not have the UE capability information, so it can only be TM1 or TM2 (uint8_t) RC.rrc[ctxt_pP->module_id]->carrier[CC_id].p_eNB, //at this point we do not have the UE capability information, so it can only be TM1 or TM2
rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id), rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id),
SRB_configList, SRB_configList,
&ue_context_pP->ue_context.physicalConfigDedicated); &ue_context_pP->ue_context.physicalConfigDedicated);
LOG_DUMPMSG(RRC,DEBUG_RRC, }
(char *)(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload), LOG_DUMPMSG(RRC,DEBUG_RRC,
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size, (char *)(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload),
"[MSG] RRC Connection Setup\n"); RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size,
"[MSG] RRC Connection Setup\n");
// configure SRB1/SRB2, PhysicalConfigDedicated, LTE_MAC_MainConfig for UE // configure SRB1/SRB2, PhysicalConfigDedicated, LTE_MAC_MainConfig for UE
if (*SRB_configList != NULL) { if (*SRB_configList != NULL) {
for (cnt = 0; cnt < (*SRB_configList)->list.count; cnt++) { for (cnt = 0; cnt < (*SRB_configList)->list.count; cnt++) {
if ((*SRB_configList)->list.array[cnt]->srb_Identity == 1) { if ((*SRB_configList)->list.array[cnt]->srb_Identity == 1) {
SRB1_config = (*SRB_configList)->list.array[cnt]; SRB1_config = (*SRB_configList)->list.array[cnt];
if (SRB1_config->logicalChannelConfig) { if (SRB1_config->logicalChannelConfig) {
if (SRB1_config->logicalChannelConfig->present == if (SRB1_config->logicalChannelConfig->present ==
LTE_SRB_ToAddMod__logicalChannelConfig_PR_explicitValue) { LTE_SRB_ToAddMod__logicalChannelConfig_PR_explicitValue) {
SRB1_logicalChannelConfig = &SRB1_config->logicalChannelConfig->choice.explicitValue; SRB1_logicalChannelConfig = &SRB1_config->logicalChannelConfig->choice.explicitValue;
} else { } else {
SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue; SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue;
} }
} else { } else {
SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue; SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue;
} }
LOG_D(RRC, LOG_D(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ (SRB1) ---> MAC_eNB\n", PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ (SRB1) ---> MAC_eNB\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
rrc_mac_config_req_eNB( rrc_mac_config_req_eNB(
ctxt_pP->module_id, ctxt_pP->module_id,
ue_context_pP->ue_context.primaryCC_id, ue_context_pP->ue_context.primaryCC_id,
0,0,0,0,0, 0,0,0,0,0,
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
0, 0,
#endif #endif
...@@ -5642,8 +5643,7 @@ void rrc_eNB_generate_RRCConnectionSetup(const protocol_ctxt_t *const ctxt_pP, ...@@ -5642,8 +5643,7 @@ void rrc_eNB_generate_RRCConnectionSetup(const protocol_ctxt_t *const ctxt_pP,
break; break;
} }
} }
}
MSC_LOG_TX_MESSAGE( MSC_LOG_TX_MESSAGE(
MSC_RRC_ENB, MSC_RRC_ENB,
MSC_RRC_UE, MSC_RRC_UE,
...@@ -7332,7 +7332,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) { ...@@ -7332,7 +7332,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
RRC_DCCH_DATA_IND(msg_p).rnti, RRC_DCCH_DATA_IND(msg_p).rnti,
msg_p->ittiMsgHeader.lte_time.frame, msg_p->ittiMsgHeader.lte_time.frame,
msg_p->ittiMsgHeader.lte_time.slot); msg_p->ittiMsgHeader.lte_time.slot);
LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Received on DCCH %d %s\n", LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Received on DCCH %d %s\n",
PROTOCOL_RRC_CTXT_UE_ARGS(&ctxt), PROTOCOL_RRC_CTXT_UE_ARGS(&ctxt),
RRC_DCCH_DATA_IND(msg_p).dcch_index, RRC_DCCH_DATA_IND(msg_p).dcch_index,
msg_name_p); msg_name_p);
......
...@@ -48,9 +48,9 @@ eNBs = ...@@ -48,9 +48,9 @@ eNBs =
prach_zero_correlation = 1; prach_zero_correlation = 1;
prach_freq_offset = 1; prach_freq_offset = 1;
pucch_delta_shift = 1; pucch_delta_shift = 1;
pucch_nRB_CQI = 1; pucch_nRB_CQI = 0;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 32; pucch_n1_AN = 0;
pdsch_referenceSignalPower = -27; pdsch_referenceSignalPower = -27;
pdsch_p_b = 0; pdsch_p_b = 0;
pusch_n_SB = 1; pusch_n_SB = 1;
...@@ -262,7 +262,7 @@ eNBs = ...@@ -262,7 +262,7 @@ eNBs =
n1PUCCH_AN_InfoList_r13 = n1PUCCH_AN_InfoList_r13 =
( (
{ {
pucch_info_value = 0; pucch_info_value = 33;
} }
); );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment