Commit 708076f6 authored by laurent's avatar laurent

documentation, bug in UDP timeout, merge develop

parents 2fc63846 4f55943b
...@@ -18,7 +18,7 @@ names like RRH/RRU/RE/RU/PNF. ...@@ -18,7 +18,7 @@ names like RRH/RRU/RE/RU/PNF.
In OpenAir code, the terminology is often RU and BBU. In OpenAir code, the terminology is often RU and BBU.
#Usage # OpenAirUsage
##EPC and general environment ##EPC and general environment
### OAI EPC ### OAI EPC
...@@ -137,36 +137,60 @@ I/Q samples sending. ...@@ -137,36 +137,60 @@ I/Q samples sending.
The main loop uses extensively function pointers to call the right The main loop uses extensively function pointers to call the right
processing function depending on the split case. processing function depending on the split case.
A lot of OAI reduntant global variables contains the same semantic data: time,frame, subframe.
The reworked main loop take care of a uniq variable that comes directly from harware: RF board sampling number.
To use OAI, we need to set all OAI variables that derivates from this timestamp value. The function setAllfromTS() implements this.
### Splitted main level
When FS6 is actived, a main loop for DU (du_fs6()) a main loop for CU case replaces the uniq eNB main loop.
Each of these main loops calls initialization of OAI LTE data and the FS6 transport layer initialization.
Then, it runs a infinite loop on: set time, call UL and DL. The time comes from the RF board, so the DU sends the time to the CU.
This is enough for RF board dialog, but the FS6 is higher in SW layers, This is enough for RF board dialog, but the FS6 is higher in SW layers,
we need to cut higher functions inside downlink and uplink procedures. we need to cut higher functions inside downlink and uplink procedures.
As much as possible, the FS6 code is in the directory OPENAIR_DIR/executables. When a given OAI piece of code is small or need complex changes, it is reworked in the file fs6-main.c. The functions naming keeps the OAI function name, adding suffix _fromsplit() or _tosplit().
When this organization would lead to large code copy, it is better to insert modifications in OAI code. This is done in two files:
- openair1/SCHED/phy_procedures_lte_eNb.c: to send signaling channels computation results
- the function sendFs6Ulharq() centralizes all signaling channels forwarding to CU
- openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c: to deal with FS6 user plane split
- sendFs6Ul() is used once to forward user plane to CU
### DownLink ### DownLink
The main procedure is phy\_procedures\_eNB\_TX The main procedure is phy\_procedures\_eNB\_TX()
This is building the common channels (beacon, multi-UE signaling). This is building the common channels (beacon, multi-UE signaling).
The FS6 split breaks this function into pieces: The FS6 split breaks this function into pieces:
- The multi-UE signals, built by common\_signal\_procedures(), * The multi-UE signals, built by common\_signal\_procedures(),
subframe2harq\_pid(), generate\_dci\_top(), subframe2harq\_pid() subframe2harq\_pid(), generate\_dci\_top(), subframe2harq\_pid()
* These functions run in the DU, nevertheless all context has to be sent
- These functions will be executed in the DU, nevertheless all (it is also needed partially for UL spitting)
context has to be sent (it is also needed partially for * Run in the DU also to meet the requirement of pushing
UL spitting)
- IT should be in the DU also to meet the requirement of pushing
in DU the data encoded with large redundancy (>3 redundancy) in DU the data encoded with large redundancy (>3 redundancy)
- the per UE data: pdsch\_procedures() that needs further splitting:
* the per UE data: pdsch\_procedures() needs further splitting:
- dlsch\_encoding\_all() that makes the encoding: turbo code * dlsch\_encoding\_all() that makes the encoding: turbo code
and lte\_rate\_matching\_turbo() that will be in the DU (some and lte\_rate\_matching\_turbo() that will be in the DU (some
unlikely cases can reach redundancy up to x3, when MCS is very unlikely cases can reach redundancy up to x3, when MCS is very
low (negative SINR cases)). low (negative SINR cases)).
- dlsch\_encoding() output needs to be transmitted between the * dlsch\_encoding() output needs to be transmitted between the
DU and the CU for functional split 6. DU and the CU for functional split 6.
- dlsch\_scrambling() that will go in the DU * dlsch\_scrambling() that will go in the DU
- dlsch\_modulation() that will go in the DU * dlsch\_modulation() that will go in the DU
The du user plane data is made of expanded bit in OAI at FS6 split level. 1 pair of functions compact back these bits into 8bits/byte before sending data and expand it again in the DU data reception (functions: fs6Dl(un)pack()).
### Uplink ### Uplink
...@@ -178,20 +202,36 @@ channels. ...@@ -178,20 +202,36 @@ channels.
Ocp-main.c:rxtx() calls directly the entry procedure Ocp-main.c:rxtx() calls directly the entry procedure
phy\_procedures\_eNB\_uespec\_RX() calls: phy\_procedures\_eNB\_uespec\_RX() calls:
- rx\_ulsch() that demodulate and extract soft bits per UE. * rx\_ulsch() that demodulate and extract soft bits per UE.
- This function runs in the DU * This function runs in the DU
- the output data will be processes in the DU, so it needs to be * the output data will be processes in the DU, so it needs to be
transmitted to the DU transmitted to the DU
- ulsch\_decoding() that do lte\_rate\_matching\_turbo\_rx() * ulsch\_decoding() that do lte\_rate\_matching\_turbo\_rx()
sub\_block\_deinterleaving\_turbo() then turbo decode sub\_block\_deinterleaving\_turbo()
then turbo decode that is in the CU
* fill\_ulsch\_cqi\_indication() fill\_crc\_indication() , fill\_rx\_indication()
* DU performs the signal processing of each channel data, prepare and sent to the CU the computed result
* Random access channel detection runs in the DU
* the DU reports to the CU only the detected temprary identifier for RACH response
### signaling data in each direction (UL and DL)
- it runs * each LTE channel needs to be propagated between CU and DU
- fill\_ulsch\_cqi\_indication() * the simplest are the almost static data such as PSS/SSS, that need only static eNB parameters and primary information (frame numbering)
* all the other channels require data transmission CU to DU and DU to CU
* the general design push all the low level processing for these channels in the DU
* the CU interface transports only signal processing results (UL) or configuration to create the RF signal (DL case)
* HARQ is detected in the DU, then only the ACK or NACK is reported to CU
- TBD: either runs in DU or output needs to be transmitted to DU * the CU have to control the power and MCS (modulation and coding scheme)
- fill\_crc\_indication() , fill\_rx\_indication() results need also * the DU performs the signal processing and report only the decoded data like the CQI
to be transmitted or made in the DU * as the DU performas the modulation, scrambling and puncturing, each data packet is associated with the LTE parameters required for these features
* in DL, the CU associates the control parameters and the user plane data
* in UL, the CU sends upfront the scheduled UL data to the DU. So, the DU have the required knowledge to decode the next subframes in time.
### UDP transport layer ### UDP transport layer
...@@ -233,6 +273,10 @@ Run the CU init of the split 6 eNB. ...@@ -233,6 +273,10 @@ Run the CU init of the split 6 eNB.
`fs6=du ./ocp-softmodem -O $OPENAIR_DIR/enb.fs6.example.conf --rfsim --log_config.phy_log_level debug `fs6=du ./ocp-softmodem -O $OPENAIR_DIR/enb.fs6.example.conf --rfsim --log_config.phy_log_level debug
` `
If the CU and the DU are not on the same machine, the remote address of each side need to be specified as per this example
`fs6=du FS6_REMOTE_IP=192.168.2.211 ./ocp-softmodem -O $OPENAIR_DIR/enb.fs6.example.conf --rfsim --log_config.phy_log_level debug
`
runs the functional split 6 DU runs the functional split 6 DU
...@@ -244,6 +288,9 @@ Runs the UE (to have the UE signal scope, compile it with make uescope) ...@@ -244,6 +288,9 @@ Runs the UE (to have the UE signal scope, compile it with make uescope)
CU and DU IP address and port are configurable in the eNB configuration CU and DU IP address and port are configurable in the eNB configuration
file (as X2, GTP, … interfaces). file (as X2, GTP, … interfaces).
CU+DU+UE can run with option --noS1 to avoid to use a EPC.
##5G and F1 ##5G and F1
Today 5G achievement is limited to physical layer. Today 5G achievement is limited to physical layer.
......
enb_*.log
ue_*.log
ping_*.*
iperf_*.*
phones_list.txt
modules_list.txt
test_results*.html
This diff is collapsed.
This diff is collapsed.
...@@ -56,7 +56,6 @@ ...@@ -56,7 +56,6 @@
<testCase id="040302"> <testCase id="040302">
<class>Attach_UE</class> <class>Attach_UE</class>
<desc>Attach UE</desc> <desc>Attach UE</desc>
<nbMaxUEtoAttach>1</nbMaxUEtoAttach>
</testCase> </testCase>
<testCase id="040401"> <testCase id="040401">
......
<!--
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-start-oai-ue</htmlTabRef>
<htmlTabName>EPC-Start-OAI-UE</htmlTabName>
<htmlTabIcon>log-in</htmlTabIcon>
<TestCaseRequestedList>
050101 000001 060101 000001 070101
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
</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>terminate-enb-oai-ue</htmlTabRef>
<htmlTabName>Terminate-all-eNBs-OAI-UEs</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
030201 090109
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
</testCase>
<testCase id="090109">
<class>Terminate_OAI_UE</class>
<desc>Terminate OAI UE</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-05-tm1-oai-ue</htmlTabRef>
<htmlTabName>Test-05MHz-TM1-OAI-UE</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList>
030201 090109
030102 000001 090102 000002 040503 000002 040603 040604 040643 040644 000002 090109 000001 030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep for 10 sec</desc>
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
</testCase>
<testCase id="000002">
<class>IdleSleep</class>
<desc>Sleep for 3 sec</desc>
<idle_sleep_time_in_sec>3</idle_sleep_time_in_sec>
</testCase>
<testCase id="030102">
<class>Initialize_eNB</class>
<desc>Initialize eNB (FDD/Band7/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --THREAD_STRUCT.[0].parallel_config PARALLEL_RU_L1_TRX_SPLIT</Initialize_eNB_args>
</testCase>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
</testCase>
<testCase id="090102">
<class>Initialize_OAI_UE</class>
<desc>Initialize OAI UE (FDD/Band7/5MHz)</desc>
<Initialize_OAI_UE_args>-C 2680000000 -r 25 --ue-rxgain 130 --ue-txgain 1 --ue-max-power -6 --ue-scan-carrier --nokrnmod 1</Initialize_OAI_UE_args>
</testCase>
<testCase id="090109">
<class>Terminate_OAI_UE</class>
<desc>Terminate OAI UE</desc>
</testCase>
<testCase id="040503">
<class>Ping</class>
<desc>ping (5MHz - 20 sec)</desc>
<ping_args>-I 192.168.248.159 -c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040603">
<class>Iperf</class>
<desc>iperf (5MHz - DL/1Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 1M -t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040604">
<class>Iperf</class>
<desc>iperf (5MHz - DL/12Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 12M -t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040643">
<class>Iperf</class>
<desc>iperf (5MHz - UL/1Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 1M -t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040644">
<class>Iperf</class>
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 2M -t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</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-05-tm1-nos1-tunnel</htmlTabRef>
<htmlTabName>Test-05MHz-TM1-noS1-tunnel</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>2</repeatCount>
<TestCaseRequestedList>
030201 090109
030101 000001 090101 000002 040501 040502 000001 040601 040602 040641 040642 000001 090109 030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
</testCase>
<testCase id="000002">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
</testCase>
<testCase id="000003">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>60</idle_sleep_time_in_sec>
</testCase>
<testCase id="030101">
<class>Initialize_eNB</class>
<desc>Initialize eNB (FDD/Band7/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --noS1 --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --THREAD_STRUCT.[0].parallel_config PARALLEL_RU_L1_TRX_SPLIT</Initialize_eNB_args>
</testCase>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
</testCase>
<testCase id="090101">
<class>Initialize_OAI_UE</class>
<desc>Initialize OAI UE (FDD/Band7/5MHz)</desc>
<Initialize_OAI_UE_args>-C 2680000000 -r 25 --ue-rxgain 130 --ue-txgain 1 --ue-max-power -6 --ue-scan-carrier --nokrnmod 1 --noS1</Initialize_OAI_UE_args>
</testCase>
<testCase id="090109">
<class>Terminate_OAI_UE</class>
<desc>Terminate OAI UE</desc>
</testCase>
<testCase id="040501">
<class>Ping</class>
<desc>ping (5MHz - 20 sec)(from eNB to OAI UE)</desc>
<ping_args>-I oaitun_enb1 -c 20 10.0.1.2</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040502">
<class>Ping</class>
<desc>ping (5MHz - 20 sec)(from OAI UE to eNB)</desc>
<ping_args>-I oaitun_ue1 -c 20 10.0.1.1</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040601">
<class>Iperf</class>
<desc>iperf (5MHz - DL/1Mbps/UDP)(30 sec)</desc>
<iperf_args>-c 10.0.1.2 -u -b 1M -t 30 -i 1 -fm -B 10.0.1.1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040602">
<class>Iperf</class>
<desc>iperf (5MHz - DL/10Mbps/UDP)(30 sec)</desc>
<iperf_args>-c 10.0.1.2 -u -b 10M -t 30 -i 1 -fm -B 10.0.1.1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040641">
<class>Iperf</class>
<desc>iperf (5MHz - UL/1Mbps/UDP)(30 sec)</desc>
<iperf_args>-c 10.0.1.1 -u -b 1M -t 30 -i 1 -fm -B 10.0.1.2 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="040642">
<class>Iperf</class>
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)</desc>
<iperf_args>-c 10.0.1.1 -u -b 2M -t 30 -i 1 -fm -B 10.0.1.2 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</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>build-tab-enb0</htmlTabRef>
<htmlTabName>Build eNB0</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList>
010101
</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>
</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-start</htmlTabRef>
<htmlTabName>EPC-Start</htmlTabName>
<htmlTabIcon>log-in</htmlTabIcon>
<TestCaseRequestedList>
050102 000001 060102 000001 070102
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
</testCase>
<testCase id="050102">
<class>Initialize_HSS</class>
<desc>Initialize HSS</desc>
</testCase>
<testCase id="060102">
<class>Initialize_MME</class>
<desc>Initialize MME</desc>
</testCase>
<testCase id="070102">
<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-stop</htmlTabRef>
<htmlTabName>EPC-Stop</htmlTabName>
<htmlTabIcon>log-out</htmlTabIcon>
<TestCaseRequestedList>
050201 060201 070201
040101
</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>
<testCase id="040101">
<class>Initialize_UE</class>
<desc>Initialize UE</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
030102 000002 040301 000002 040504 040605 040606 040645 040646 000001 040401 000002 030201
-->
<testCaseList>
<htmlTabRef>test-05-tm1</htmlTabRef>
<htmlTabName>Test-05MHz-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>2</repeatCount>
<TestCaseRequestedList>
030201 040101
030102 000002 040301 000002 040504 000001 040401 000002 030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="040101">
<class>Initialize_UE</class>
<desc>Initialize UE</desc>
</testCase>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep for 10 sec</desc>
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
</testCase>
<testCase id="000002">
<class>IdleSleep</class>
<desc>Sleep for 3 sec</desc>
<idle_sleep_time_in_sec>3</idle_sleep_time_in_sec>
</testCase>
<testCase id="030102">
<class>Initialize_eNB</class>
<desc>Initialize eNB (FDD/Band7/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --THREAD_STRUCT.[0].parallel_config PARALLEL_RU_L1_TRX_SPLIT</Initialize_eNB_args>
</testCase>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
</testCase>
<testCase id="040301">
<class>Attach_UE</class>
<desc>Attach UE</desc>
</testCase>
<testCase id="040401">
<class>Detach_UE</class>
<desc>Detach UE</desc>
</testCase>
<testCase id="040504">
<class>Ping</class>
<desc>ping (5MHz - 20 sec)</desc>
<ping_args>-I 192.168.248.159 -c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040605">
<class>Iperf</class>
<desc>iperf (5MHz - DL/1Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 1M -t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040606">
<class>Iperf</class>
<desc>iperf (5MHz - DL/12Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 12M -t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040645">
<class>Iperf</class>
<desc>iperf (5MHz - UL/1Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 1M -t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040646">
<class>Iperf</class>
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 2M -t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</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>build-tab-ue0</htmlTabRef>
<htmlTabName>Build UE0</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList>
090101
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="090101">
<class>Build_OAI_UE</class>
<desc>Build OAI UE</desc>
<Build_OAI_UE_args>-w USRP --UE</Build_OAI_UE_args>
</testCase>
</testCaseList>
...@@ -183,8 +183,8 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CU ...@@ -183,8 +183,8 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CU
######################### #########################
# set a flag for changes in the source code # set a flag for changes in the source code
# these changes are related to hardcoded path to include .h files # these changes are related to hardcoded path to include .h files
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g3 -DMALLOC_CHECK_=3") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g3 -DMALLOC_CHECK_=3")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g3 -DMALLOC_CHECK_=3 -O3") set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g3 -DMALLOC_CHECK_=3 -O2")
set(GIT_BRANCH "UNKNOWN") set(GIT_BRANCH "UNKNOWN")
......
...@@ -12,6 +12,7 @@ void usage(void) ...@@ -12,6 +12,7 @@ void usage(void)
"usage: <number of tags> <input record file> <output curated record file>\n" "usage: <number of tags> <input record file> <output curated record file>\n"
"options:\n" "options:\n"
" -d <database file> this option is mandatory\n" " -d <database file> this option is mandatory\n"
" -e <event name> trace given event (default CALIBRATION_CHANNEL_ESTIMATES)\n"
); );
exit(1); exit(1);
} }
...@@ -88,6 +89,7 @@ int main(int n, char **v) ...@@ -88,6 +89,7 @@ int main(int n, char **v)
int number_of_tags = -1; int number_of_tags = -1;
char *input_filename = NULL; char *input_filename = NULL;
char *output_filename = NULL; char *output_filename = NULL;
char *event_name = "CALIBRATION_CHANNEL_ESTIMATES";
int i; int i;
FILE *in; FILE *in;
FILE *out; FILE *out;
...@@ -107,6 +109,8 @@ int main(int n, char **v) ...@@ -107,6 +109,8 @@ int main(int n, char **v)
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage(); if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
if (!strcmp(v[i], "-d")) { if (i > n-2) usage(); if (!strcmp(v[i], "-d")) { if (i > n-2) usage();
database_filename = v[++i]; continue; } database_filename = v[++i]; continue; }
if (!strcmp(v[i], "-e")) { if (i > n-2) usage();
event_name = v[++i]; continue; }
if (number_of_tags == -1) { number_of_tags = atoi(v[i]); if (number_of_tags == -1) { number_of_tags = atoi(v[i]);
if (number_of_tags <= 0) {usage();} continue; } if (number_of_tags <= 0) {usage();} continue; }
if (input_filename == NULL) { input_filename = v[i]; continue; } if (input_filename == NULL) { input_filename = v[i]; continue; }
...@@ -124,7 +128,7 @@ int main(int n, char **v) ...@@ -124,7 +128,7 @@ int main(int n, char **v)
database = parse_database(database_filename); database = parse_database(database_filename);
channel_estimate_id = event_id_from_name(database, "CALIBRATION_CHANNEL_ESTIMATES"); channel_estimate_id = event_id_from_name(database, event_name);
f = get_format(database, channel_estimate_id); f = get_format(database, channel_estimate_id);
frame_arg = get_field(&f, "frame", "int"); frame_arg = get_field(&f, "frame", "int");
......
...@@ -235,7 +235,7 @@ RUs = ( ...@@ -235,7 +235,7 @@ RUs = (
att_rx = 0; att_rx = 0;
bands = [7]; bands = [7];
max_pdschReferenceSignalPower = -27; max_pdschReferenceSignalPower = -27;
max_rxgain = 120; max_rxgain = 108;
eNB_instances = [0]; eNB_instances = [0];
} }
...@@ -256,7 +256,7 @@ THREAD_STRUCT = ( ...@@ -256,7 +256,7 @@ THREAD_STRUCT = (
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_SINGLE_THREAD"; parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE"; worker_config = "WORKER_DISABLE";
} }
); );
......
...@@ -793,7 +793,7 @@ void recvFs6Ul(uint8_t *bufferZone, int nbBlocks, PHY_VARS_eNB *eNB, ul_propagat ...@@ -793,7 +793,7 @@ void recvFs6Ul(uint8_t *bufferZone, int nbBlocks, PHY_VARS_eNB *eNB, ul_propagat
sizeof(ulsch_harq->o_ACK)); sizeof(ulsch_harq->o_ACK));
memcpy(ulsch_harq->o,hULUE(bufPtr)->o, sizeof(ulsch_harq->o)); memcpy(ulsch_harq->o,hULUE(bufPtr)->o, sizeof(ulsch_harq->o));
ul_propa[hULUE(bufPtr)->UE_id].ta=hULUE(bufPtr)->ta; ul_propa[hULUE(bufPtr)->UE_id].ta=hULUE(bufPtr)->ta;
LOG_D(PHY,"Received ulsch data for: rnti:%d, fsf: %d/%d, cqi_crc_status %d O_ACK: %di, segment: %di, seglen: %d \n", LOG_D(PHY,"Received ulsch data for: rnti:%x, fsf: %d/%d, cqi_crc_status %d O_ACK: %di, segment: %di, seglen: %d \n",
ulsch->rnti, eNB->proc.frame_rx, eNB->proc.subframe_rx, ulsch_harq->cqi_crc_status, ulsch_harq->O_ACK,hULUE(bufPtr)->segment , hULUE(bufPtr)->segLen); ulsch->rnti, eNB->proc.frame_rx, eNB->proc.subframe_rx, ulsch_harq->cqi_crc_status, ulsch_harq->O_ACK,hULUE(bufPtr)->segment , hULUE(bufPtr)->segLen);
} else if ( type == fs6ULcch ) { } else if ( type == fs6ULcch ) {
int nb_uci=hULUEuci(bufPtr)->nb_active_ue; int nb_uci=hULUEuci(bufPtr)->nb_active_ue;
...@@ -1155,7 +1155,7 @@ void appendFs6TxULUE(uint8_t *bufferZone, LTE_DL_FRAME_PARMS *fp, int curUE, LTE ...@@ -1155,7 +1155,7 @@ void appendFs6TxULUE(uint8_t *bufferZone, LTE_DL_FRAME_PARMS *fp, int curUE, LTE
memcpyToDuHarq(delta_TF); memcpyToDuHarq(delta_TF);
memcpyToDuHarq(repetition_number ); memcpyToDuHarq(repetition_number );
memcpyToDuHarq(total_number_of_repetitions); memcpyToDuHarq(total_number_of_repetitions);
LOG_W(PHY,"Added request to perform ulsch for: rnti:%d, fsf: %d/%d\n", ulsch->rnti, frame, subframe); LOG_D(PHY,"Added request to perform ulsch for: rnti:%x, fsf: %d/%d\n", ulsch->rnti, frame, subframe);
} }
void appendFs6DLUE(uint8_t *bufferZone, LTE_DL_FRAME_PARMS *fp, int UE_id, int8_t harq_pid, LTE_eNB_DLSCH_t *dlsch0, LTE_DL_eNB_HARQ_t *harqData, int frame, int subframe) { void appendFs6DLUE(uint8_t *bufferZone, LTE_DL_FRAME_PARMS *fp, int UE_id, int8_t harq_pid, LTE_eNB_DLSCH_t *dlsch0, LTE_DL_eNB_HARQ_t *harqData, int frame, int subframe) {
commonUDP_t *FirstUDPheader=(commonUDP_t *) bufferZone; commonUDP_t *FirstUDPheader=(commonUDP_t *) bufferZone;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#define DU_PORT "8787" #define DU_PORT "8787"
#define MTU 65536 #define MTU 65536
#define UDP_TIMEOUT 100000L // in nano second #define UDP_TIMEOUT 1000L // in micro second (struct timeval, NOT struct timespec)
#define MAX_BLOCKS 16 #define MAX_BLOCKS 16
#define blockAlign 32 //bytes #define blockAlign 32 //bytes
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/udp.h> #include <netinet/udp.h>
#include <netdb.h> #include <netdb.h>
#include <targets/RT/USER/lte-softmodem.h>
bool createUDPsock (char *sourceIP, char *sourcePort, char *destIP, char *destPort, UDPsock_t *result) { bool createUDPsock (char *sourceIP, char *sourcePort, char *destIP, char *destPort, UDPsock_t *result) {
struct addrinfo hints= {0}, *servinfo, *p; struct addrinfo hints= {0}, *servinfo, *p;
...@@ -56,8 +57,9 @@ bool createUDPsock (char *sourceIP, char *sourcePort, char *destIP, char *destPo ...@@ -56,8 +57,9 @@ bool createUDPsock (char *sourceIP, char *sourcePort, char *destIP, char *destPo
int enable=1; int enable=1;
AssertFatal(setsockopt(result->sockHandler, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(enable))==0,""); AssertFatal(setsockopt(result->sockHandler, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(enable))==0,"");
//struct timeval tv= {0,UDP_TIMEOUT}; struct timeval tv= {0,UDP_TIMEOUT};
struct timeval tv= {2,UDP_TIMEOUT}; //debug: wait 2 seconds for human understanding if (IS_SOFTMODEM_RFSIM)
tv.tv_sec=2; //debug: wait 2 seconds for human understanding
AssertFatal(setsockopt(result->sockHandler, SOL_SOCKET, SO_RCVTIMEO,&tv,sizeof(tv)) ==0,""); AssertFatal(setsockopt(result->sockHandler, SOL_SOCKET, SO_RCVTIMEO,&tv,sizeof(tv)) ==0,"");
// Make a send/recv buffer larger than a a couple of subframe // Make a send/recv buffer larger than a a couple of subframe
// so the kernel will store for us in and out paquets // so the kernel will store for us in and out paquets
......
...@@ -59,7 +59,7 @@ int lte_segmentation(unsigned char *input_buffer, ...@@ -59,7 +59,7 @@ int lte_segmentation(unsigned char *input_buffer,
} }
if ((*C)>MAX_NUM_DLSCH_SEGMENTS) { if ((*C)>MAX_NUM_DLSCH_SEGMENTS) {
printf("%d\n",*(int*)0); printf("%d\n",*(int *)0);
LOG_E(PHY,"lte_segmentation.c: too many segments %d, B %d, L %d, Bprime %d\n",*C,B,L,Bprime); LOG_E(PHY,"lte_segmentation.c: too many segments %d, B %d, L %d, Bprime %d\n",*C,B,L,Bprime);
return(-1); return(-1);
} }
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
*/ */
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
#ifdef DEBUG_UCI_TOOLS #ifdef DEBUG_UCI_TOOLS
#include "PHY/vars.h" #include "PHY/vars.h"
#endif #endif
//#define DEBUG_UCI 1 //#define DEBUG_UCI 1
...@@ -41,16 +41,20 @@ int16_t find_uci(uint16_t rnti, int frame, int subframe, PHY_VARS_eNB *eNB,find_ ...@@ -41,16 +41,20 @@ int16_t find_uci(uint16_t rnti, int frame, int subframe, PHY_VARS_eNB *eNB,find_
uint16_t i; uint16_t i;
int16_t first_free_index=-1; int16_t first_free_index=-1;
AssertFatal(eNB!=NULL,"eNB is null\n"); AssertFatal(eNB!=NULL,"eNB is null\n");
for (i=0; i<NUMBER_OF_UCI_VARS_MAX; i++) { for (i=0; i<NUMBER_OF_UCI_VARS_MAX; i++) {
if ((eNB->uci_vars[i].active >0) && if ((eNB->uci_vars[i].active >0) &&
(eNB->uci_vars[i].rnti==rnti) && (eNB->uci_vars[i].rnti==rnti) &&
(eNB->uci_vars[i].frame==frame) && (eNB->uci_vars[i].frame==frame) &&
(eNB->uci_vars[i].subframe==subframe)) return(i); (eNB->uci_vars[i].subframe==subframe)) return(i);
else if ((eNB->uci_vars[i].active == 0) && (first_free_index==-1)) first_free_index=i; else if ((eNB->uci_vars[i].active == 0) && (first_free_index==-1)) first_free_index=i;
} }
if (type == SEARCH_EXIST) return(-1); if (type == SEARCH_EXIST) return(-1);
if (first_free_index==-1) if (first_free_index==-1)
LOG_E(MAC,"UCI table is full\n"); LOG_E(MAC,"UCI table is full\n");
return(first_free_index); return(first_free_index);
} }
......
...@@ -565,8 +565,8 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag) ...@@ -565,8 +565,8 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
else else
tc = *decoder8; tc = *decoder8;
if(ulsch_harq->repetition_number == 1){ if(ulsch_harq->repetition_number == 1) {
memset(pusch_rep_buffer,0,(sizeof(int32_t)*3*(6144+64))) ; // reset the buffer every new repetitions memset(pusch_rep_buffer,0,(sizeof(int32_t)*3*(6144+64))) ; // reset the buffer every new repetitions
} }
for (r=0; r<ulsch_harq->C; r++) { for (r=0; r<ulsch_harq->C; r++) {
...@@ -611,26 +611,22 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag) ...@@ -611,26 +611,22 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
} }
stop_meas(&eNB->ulsch_rate_unmatching_stats); stop_meas(&eNB->ulsch_rate_unmatching_stats);
max_Ncb = 3*ulsch_harq->RTC[r]*32 ; max_Ncb = 3*ulsch_harq->RTC[r]*32 ;
if(ulsch_harq->total_number_of_repetitions > 1) if(ulsch_harq->total_number_of_repetitions > 1) {
{ if (ulsch_harq->rvidx==1) {
if (ulsch_harq->rvidx==1) // Store the result of HARQ combining in the last emtc repetitions of sequence 0,2,3,1
{ // Store the result of HARQ combining in the last emtc repetitions of sequence 0,2,3,1 for (int nn=0; nn<max_Ncb; nn++) {
for (int nn=0;nn<max_Ncb;nn++) pusch_rep_buffer[nn] += ulsch_harq->w[r][nn] ;
{ }
pusch_rep_buffer[nn] += ulsch_harq->w[r][nn] ; }
}
if (ulsch_harq->repetition_number == ulsch_harq->total_number_of_repetitions) {
for (int nn=0; nn<max_Ncb; nn++) {
ulsch_harq->w[r][nn] = pusch_rep_buffer[nn] ;
} }
if (ulsch_harq->repetition_number == ulsch_harq->total_number_of_repetitions)
{
for (int nn=0;nn<max_Ncb;nn++)
{
ulsch_harq->w[r][nn] = pusch_rep_buffer[nn] ;
}
}
} }
}
r_offset += E; r_offset += E;
start_meas(&eNB->ulsch_deinterleaving_stats); start_meas(&eNB->ulsch_deinterleaving_stats);
...@@ -798,18 +794,17 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, ...@@ -798,18 +794,17 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
int frame = proc->frame_rx; int frame = proc->frame_rx;
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 (LTE_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); 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
{ {
harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe); harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
} }
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING0+harq_pid,1); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING0+harq_pid,1);
// x1 is set in lte_gold_generic // x1 is set in lte_gold_generic
x2 = ((uint32_t)ulsch->rnti<<14) + ((uint32_t)subframe<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.3.1 x2 = ((uint32_t)ulsch->rnti<<14) + ((uint32_t)subframe<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.3.1
ulsch_harq = ulsch->harq_processes[harq_pid]; ulsch_harq = ulsch->harq_processes[harq_pid];
......
This diff is collapsed.
...@@ -143,13 +143,14 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t *ra, frame_t frameP, ...@@ -143,13 +143,14 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t *ra, frame_t frameP,
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.size = get_TBS_UL (ra->msg3_mcs, ra->msg3_nb_rb); ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.size = get_TBS_UL (ra->msg3_mcs, ra->msg3_nb_rb);
// Re13 fields // Re13 fields
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.ue_type = ra->rach_resource_type > 2 ? 2 : 1; ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.ue_type = ra->rach_resource_type > 2 ? 2 : 1;
if (ra->rach_resource_type > 0) { if (ra->rach_resource_type > 0) {
pusch_maxNumRepetitionCEmodeA_r13= *(rrc->configuration.pusch_maxNumRepetitionCEmodeA_r13[CC_id]); pusch_maxNumRepetitionCEmodeA_r13= *(rrc->configuration.pusch_maxNumRepetitionCEmodeA_r13[CC_id]);
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions= pusch_repetition_Table8_2_36213[pusch_maxNumRepetitionCEmodeA_r13][ra->pusch_repetition_levels]; ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions= pusch_repetition_Table8_2_36213[pusch_maxNumRepetitionCEmodeA_r13][ra->pusch_repetition_levels];
} } else {
else{ ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions=1;
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions=1;
} }
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.repetition_number = 1; ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.repetition_number = 1;
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.initial_transmission_sf_io = (ra->Msg3_frame * 10) + ra->Msg3_subframe; ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.initial_transmission_sf_io = (ra->Msg3_frame * 10) + ra->Msg3_subframe;
ul_req_body->number_of_pdus++; ul_req_body->number_of_pdus++;
...@@ -273,10 +274,9 @@ void generate_Msg2(module_id_t module_idP, ...@@ -273,10 +274,9 @@ void generate_Msg2(module_id_t module_idP,
uint16_t absSF_Msg2 = (10 * ra->Msg2_frame) + ra->Msg2_subframe; uint16_t absSF_Msg2 = (10 * ra->Msg2_frame) + ra->Msg2_subframe;
if (ra->rach_resource_type > 0) { if (ra->rach_resource_type > 0) {
PUSCH_Rep_Level= *(rrc->configuration.pusch_repetitionLevelCEmodeA_r13[CC_idP]); PUSCH_Rep_Level= *(rrc->configuration.pusch_repetitionLevelCEmodeA_r13[CC_idP]);
} } else {
else { PUSCH_Rep_Level= 0;
PUSCH_Rep_Level= 0;
} }
if (absSF > absSF_Msg2) { if (absSF > absSF_Msg2) {
...@@ -347,9 +347,7 @@ void generate_Msg2(module_id_t module_idP, ...@@ -347,9 +347,7 @@ void generate_Msg2(module_id_t module_idP,
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.mpdcch_tansmission_type = 1; // imposed (9.1.5 in 213) for Type 2 Common search space dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.mpdcch_tansmission_type = 1; // imposed (9.1.5 in 213) for Type 2 Common search space
AssertFatal (cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 != NULL, "cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 is null\n"); AssertFatal (cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 != NULL, "cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 is null\n");
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.start_symbol = cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13; dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.start_symbol = cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13;
LOG_E(MAC, "start_symbol = %d \n", dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.start_symbol); LOG_E(MAC, "start_symbol = %d \n", dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.start_symbol);
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.ecce_index = 0; // Note: this should be dynamic dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.ecce_index = 0; // Note: this should be dynamic
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.aggregation_level = 24; // OK for CEModeA r1-3 (9.1.5-1b) or CEModeB r1-4 dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.aggregation_level = 24; // OK for CEModeA r1-3 (9.1.5-1b) or CEModeB r1-4
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.rnti_type = 2; // RA-RNTI dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.rnti_type = 2; // RA-RNTI
...@@ -421,7 +419,7 @@ void generate_Msg2(module_id_t module_idP, ...@@ -421,7 +419,7 @@ void generate_Msg2(module_id_t module_idP,
} }
ra->pusch_repetition_levels = PUSCH_Rep_Level; ra->pusch_repetition_levels = PUSCH_Rep_Level;
if((ra->Msg2_frame == frameP) && (ra->Msg2_subframe == subframeP)) { if((ra->Msg2_frame == frameP) && (ra->Msg2_subframe == subframeP)) {
/* Program PDSCH */ /* Program PDSCH */
LOG_D(MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : In generate_Msg2, Programming PDSCH\n", LOG_D(MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : In generate_Msg2, Programming PDSCH\n",
...@@ -913,11 +911,10 @@ generate_Msg4(module_id_t module_idP, ...@@ -913,11 +911,10 @@ generate_Msg4(module_id_t module_idP,
ul_req_body->number_of_pdus++; ul_req_body->number_of_pdus++;
T (T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT (module_idP), T_INT (CC_idP), T_INT (ra->rnti), T_INT (frameP), T_INT (subframeP), T (T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT (module_idP), T_INT (CC_idP), T_INT (ra->rnti), T_INT (frameP), T_INT (subframeP),
T_INT (0 /*harq_pid always 0? */ ), T_BUFFER (&mac->UE_list.DLSCH_pdu[CC_idP][0][UE_id].payload[0], ra->msg4_TBsize)); T_INT (0 /*harq_pid always 0? */ ), T_BUFFER (&mac->UE_list.DLSCH_pdu[CC_idP][0][UE_id].payload[0], ra->msg4_TBsize));
trace_pdu (DIRECTION_DOWNLINK, (uint8_t *) mac->UE_list.DLSCH_pdu[CC_idP][0][(unsigned char) UE_id].payload[0],
if (opt_enabled == 1) { ra->msg4_rrc_sdu_length,
trace_pdu (1, (uint8_t *) mac->UE_list.DLSCH_pdu[CC_idP][0][(unsigned char) UE_id].payload[0], ra->msg4_rrc_sdu_length, UE_id, 3, UE_RNTI (module_idP, UE_id), mac->frame, mac->subframe, 0, 0); UE_id, 3, UE_RNTI (module_idP, UE_id),
LOG_D (OPT, "[eNB %d][DLSCH] CC_id %d Frame %d trace pdu for rnti %x with size %d\n", module_idP, CC_idP, frameP, UE_RNTI (module_idP, UE_id), ra->msg4_rrc_sdu_length); mac->frame, mac->subframe, 0, 0);
}
} // Msg4 frame/subframe } // Msg4 frame/subframe
} // rach_resource_type > 0 } // rach_resource_type > 0
else else
...@@ -979,12 +976,10 @@ generate_Msg4(module_id_t module_idP, ...@@ -979,12 +976,10 @@ generate_Msg4(module_id_t module_idP,
1, // tpc, none 1, // tpc, none
getRIV(N_RB_DL, first_rb, 4), // resource_block_coding getRIV(N_RB_DL, first_rb, 4), // resource_block_coding
ra->msg4_mcs, // mcs ra->msg4_mcs, // mcs
1 - UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid], 1 - UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid],
0, // rv 0, // rv
0); // vrb_flag 0); // vrb_flag
UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid] = 1 - UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid];
UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid] = 1 - UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid];
LOG_D(MAC, LOG_D(MAC,
"Frame %d, subframe %d: Msg4 DCI pdu_num %d (rnti %x,rnti_type %d,harq_pid %d, resource_block_coding (%p) %d\n", "Frame %d, subframe %d: Msg4 DCI pdu_num %d (rnti %x,rnti_type %d,harq_pid %d, resource_block_coding (%p) %d\n",
frameP, subframeP, dl_req_body->number_pdu, frameP, subframeP, dl_req_body->number_pdu,
...@@ -1074,7 +1069,7 @@ generate_Msg4(module_id_t module_idP, ...@@ -1074,7 +1069,7 @@ generate_Msg4(module_id_t module_idP,
mac->TX_req[CC_idP].sfn_sf = mac->TX_req[CC_idP].sfn_sf =
fill_nfapi_tx_req(&mac->TX_req[CC_idP].tx_request_body, fill_nfapi_tx_req(&mac->TX_req[CC_idP].tx_request_body,
(frameP * 10) + subframeP, (frameP * 10) + subframeP,
rrc_sdu_length+offset, rrc_sdu_length+offset,
mac->pdu_index[CC_idP], mac->pdu_index[CC_idP],
mac->UE_list. mac->UE_list.
DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0]); DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0]);
...@@ -1094,20 +1089,12 @@ generate_Msg4(module_id_t module_idP, ...@@ -1094,20 +1089,12 @@ generate_Msg4(module_id_t module_idP,
T_INT(subframeP), T_INT(0 /*harq_pid always 0? */ ), T_INT(subframeP), T_INT(0 /*harq_pid always 0? */ ),
T_BUFFER(&mac->UE_list.DLSCH_pdu[CC_idP][0][UE_id]. T_BUFFER(&mac->UE_list.DLSCH_pdu[CC_idP][0][UE_id].
payload[0], ra->msg4_TBsize)); payload[0], ra->msg4_TBsize));
trace_pdu(DIRECTION_DOWNLINK,
if (opt_enabled == 1) { (uint8_t *) mac->
trace_pdu(DIRECTION_DOWNLINK, UE_list.DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0],
(uint8_t *) mac-> rrc_sdu_length, UE_id, WS_C_RNTI,
UE_list.DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0], UE_RNTI(module_idP, UE_id), mac->frame,
rrc_sdu_length, UE_id, WS_C_RNTI, mac->subframe, 0, 0);
UE_RNTI(module_idP, UE_id), mac->frame,
mac->subframe, 0, 0);
LOG_D(OPT,
"[eNB %d][DLSCH] CC_id %d Frame %d trace pdu for rnti %x with size %d\n",
module_idP, CC_idP, frameP, UE_RNTI(module_idP,
UE_id),
rrc_sdu_length);
}
if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_FAIR_RR) { if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_FAIR_RR) {
set_dl_ue_select_msg4(CC_idP, 4, UE_id, ra->rnti); set_dl_ue_select_msg4(CC_idP, 4, UE_id, ra->rnti);
...@@ -1219,7 +1206,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP, ...@@ -1219,7 +1206,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
1, // tpc, none 1, // tpc, none
getRIV(N_RB_DL, first_rb, 4), // resource_block_coding getRIV(N_RB_DL, first_rb, 4), // resource_block_coding
ra->msg4_mcs, // mcs ra->msg4_mcs, // mcs
UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid], UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid],
round & 3, // rv round & 3, // rv
0); // vrb_flag 0); // vrb_flag
......
This diff is collapsed.
...@@ -565,7 +565,6 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -565,7 +565,6 @@ schedule_ue_spec(module_id_t module_idP,
dl_Bandwidth = cc[CC_id].mib->message.dl_Bandwidth; dl_Bandwidth = cc[CC_id].mib->message.dl_Bandwidth;
N_RB_DL[CC_id] = to_prb(dl_Bandwidth); N_RB_DL[CC_id] = to_prb(dl_Bandwidth);
min_rb_unit[CC_id] = get_min_rb_unit(module_idP, CC_id); min_rb_unit[CC_id] = get_min_rb_unit(module_idP, CC_id);
// get number of PRBs less those used by common channels // get number of PRBs less those used by common channels
total_nb_available_rb[CC_id] = N_RB_DL[CC_id]; total_nb_available_rb[CC_id] = N_RB_DL[CC_id];
...@@ -622,7 +621,6 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -622,7 +621,6 @@ schedule_ue_spec(module_id_t module_idP,
LOG_D(MAC, "doing schedule_ue_spec for CC_id %d UE %d\n", LOG_D(MAC, "doing schedule_ue_spec for CC_id %d UE %d\n",
CC_id, CC_id,
UE_id); UE_id);
continue_flag = 0; // reset the flag to allow allocation for the remaining UEs continue_flag = 0; // reset the flag to allow allocation for the remaining UEs
rnti = UE_RNTI(module_idP, UE_id); rnti = UE_RNTI(module_idP, UE_id);
ue_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id]; ue_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
...@@ -776,7 +774,8 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -776,7 +774,8 @@ schedule_ue_spec(module_id_t module_idP,
if (ue_sched_ctrl->cdrx_configured) { if (ue_sched_ctrl->cdrx_configured) {
ue_sched_ctrl->drx_retransmission_timer[harq_pid] = 0; // stop drx retransmission ue_sched_ctrl->drx_retransmission_timer[harq_pid] = 0; // stop drx retransmission
/*
/*
* Note: contrary to the spec drx_retransmission_timer[harq_pid] is reset not stop. * Note: contrary to the spec drx_retransmission_timer[harq_pid] is reset not stop.
*/ */
if (harq_pid == 0) { if (harq_pid == 0) {
...@@ -1011,9 +1010,10 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -1011,9 +1010,10 @@ schedule_ue_spec(module_id_t module_idP,
); );
if((rrc_release_info.num_UEs > 0) && (rlc_am_mui.rrc_mui_num > 0)) { if((rrc_release_info.num_UEs > 0) && (rlc_am_mui.rrc_mui_num > 0)) {
while(pthread_mutex_trylock(&rrc_release_freelist)){ while(pthread_mutex_trylock(&rrc_release_freelist)) {
/* spin... */ /* spin... */
} }
uint16_t release_total = 0; uint16_t release_total = 0;
for (release_num = 0, release_ctrl = &rrc_release_info.RRC_release_ctrl[0]; for (release_num = 0, release_ctrl = &rrc_release_info.RRC_release_ctrl[0];
...@@ -1060,10 +1060,10 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -1060,10 +1060,10 @@ schedule_ue_spec(module_id_t module_idP,
if(release_total >= rrc_release_info.num_UEs) if(release_total >= rrc_release_info.num_UEs)
break; break;
} }
pthread_mutex_unlock(&rrc_release_freelist); pthread_mutex_unlock(&rrc_release_freelist);
} }
for (ra_ii = 0, ra = &eNB->common_channels[CC_id].ra[0]; ra_ii < NB_RA_PROC_MAX; ra_ii++, ra++) { for (ra_ii = 0, ra = &eNB->common_channels[CC_id].ra[0]; ra_ii < NB_RA_PROC_MAX; ra_ii++, ra++) {
if ((ra->rnti == rnti) && (ra->state == MSGCRNTI)) { if ((ra->rnti == rnti) && (ra->state == MSGCRNTI)) {
for (uint16_t mui_num = 0; mui_num < rlc_am_mui.rrc_mui_num; mui_num++) { for (uint16_t mui_num = 0; mui_num < rlc_am_mui.rrc_mui_num; mui_num++) {
...@@ -1254,7 +1254,6 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -1254,7 +1254,6 @@ schedule_ue_spec(module_id_t module_idP,
header_length_total += header_length_last; header_length_total += header_length_last;
num_sdus++; num_sdus++;
ue_sched_ctrl->uplane_inactivity_timer = 0; ue_sched_ctrl->uplane_inactivity_timer = 0;
// reset RRC inactivity timer after uplane activity // reset RRC inactivity timer after uplane activity
ue_contextP = rrc_eNB_get_ue_context(RC.rrc[module_idP], rnti); ue_contextP = rrc_eNB_get_ue_context(RC.rrc[module_idP], rnti);
...@@ -1422,27 +1421,17 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -1422,27 +1421,17 @@ schedule_ue_spec(module_id_t module_idP,
dlsch_pdu->payload[0][offset + sdu_length_total + j] = 0; dlsch_pdu->payload[0][offset + sdu_length_total + j] = 0;
} }
if (opt_enabled == 1) { trace_pdu(DIRECTION_DOWNLINK,
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) dlsch_pdu->payload[0],
(uint8_t *) dlsch_pdu->payload[0], TBS,
TBS, module_idP,
module_idP, WS_C_RNTI,
WS_C_RNTI, UE_RNTI(module_idP,
UE_RNTI(module_idP, UE_id),
UE_id), eNB->frame,
eNB->frame, eNB->subframe,
eNB->subframe, 0,
0, 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);
}
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T(T_ENB_MAC_UE_DL_PDU_WITH_DATA,
T_INT(module_idP), T_INT(module_idP),
T_INT(CC_id), T_INT(CC_id),
...@@ -1578,17 +1567,17 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -1578,17 +1567,17 @@ schedule_ue_spec(module_id_t module_idP,
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG; 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].sfn_sf = frameP << 4 | subframeP;
eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST; eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST;
/* CDRX */ /* CDRX */
ue_sched_ctrl->harq_rtt_timer[CC_id][harq_pid] = 1; // restart HARQ RTT timer ue_sched_ctrl->harq_rtt_timer[CC_id][harq_pid] = 1; // restart HARQ RTT timer
if (ue_sched_ctrl->cdrx_configured) { if (ue_sched_ctrl->cdrx_configured) {
ue_sched_ctrl->drx_inactivity_timer = 1; // restart drx inactivity timer when new transmission ue_sched_ctrl->drx_inactivity_timer = 1; // restart drx inactivity timer when new transmission
ue_sched_ctrl->drx_retransmission_timer[harq_pid] = 0; // stop drx retransmission ue_sched_ctrl->drx_retransmission_timer[harq_pid] = 0; // stop drx retransmission
/* /*
* Note: contrary to the spec drx_retransmission_timer[harq_pid] is reset not stop. * Note: contrary to the spec drx_retransmission_timer[harq_pid] is reset not stop.
*/ */
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_INACTIVITY, (unsigned long) ue_sched_ctrl->drx_inactivity_timer); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_INACTIVITY, (unsigned long) ue_sched_ctrl->drx_inactivity_timer);
if (harq_pid == 0) { if (harq_pid == 0) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_RETRANSMISSION_HARQ0, (unsigned long) ue_sched_ctrl->drx_retransmission_timer[0]); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_RETRANSMISSION_HARQ0, (unsigned long) ue_sched_ctrl->drx_retransmission_timer[0]);
} }
...@@ -2345,25 +2334,16 @@ schedule_ue_spec_br(module_id_t module_idP, ...@@ -2345,25 +2334,16 @@ schedule_ue_spec_br(module_id_t module_idP,
UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset + sdu_length_total + j] = (char)(taus()&0xff); UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset + sdu_length_total + j] = (char)(taus()&0xff);
} }
if (opt_enabled == 1) { trace_pdu(DIRECTION_DOWNLINK,
trace_pdu(1, (uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0],
(uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0], TBS,
TBS, module_idP,
module_idP, 3,
3, UE_RNTI(module_idP,UE_id),
UE_RNTI(module_idP,UE_id), mac->frame,
mac->frame, mac->subframe,
mac->subframe, 0,
0, 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);
}
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T(T_ENB_MAC_UE_DL_PDU_WITH_DATA,
T_INT(module_idP), T_INT(module_idP),
T_INT(CC_id), T_INT(CC_id),
...@@ -2556,25 +2536,16 @@ schedule_ue_spec_br(module_id_t module_idP, ...@@ -2556,25 +2536,16 @@ schedule_ue_spec_br(module_id_t module_idP,
T_INT (subframeP), T_INT (subframeP),
T_INT (0 /* harq_pid always 0? */ ), T_INT (0 /* harq_pid always 0? */ ),
T_BUFFER (&mac->UE_list.DLSCH_pdu[CC_id][0][UE_id].payload[0], TX_req->pdu_length)); T_BUFFER (&mac->UE_list.DLSCH_pdu[CC_id][0][UE_id].payload[0], TX_req->pdu_length));
trace_pdu(1,
if (opt_enabled == 1) { (uint8_t *) mac->UE_list.DLSCH_pdu[CC_id][0][(unsigned char) UE_id].payload[0],
trace_pdu(1, TX_req->pdu_length,
(uint8_t *) mac->UE_list.DLSCH_pdu[CC_id][0][(unsigned char) UE_id].payload[0], UE_id,
TX_req->pdu_length, 3,
UE_id, rnti,
3, frameP,
rnti, subframeP,
frameP, 0,
subframeP, 0);
0,
0);
LOG_D(OPT, "[eNB %d][DLSCH] CC_id %d Frame %d trace pdu for rnti %x with size %d\n",
module_idP,
CC_id,
frameP,
rnti,
TX_req->pdu_length);
}
} // end else if ((subframeP == 7) && (round_DL < 8)) } // end else if ((subframeP == 7) && (round_DL < 8))
} // end loop on UE_id } // end loop on UE_id
} }
...@@ -3089,8 +3060,8 @@ schedule_PCH(module_id_t module_idP, ...@@ -3089,8 +3060,8 @@ schedule_PCH(module_id_t module_idP,
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.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.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.tpc = 1; // no TPC
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 0; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 0;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 0; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 0;
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.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.virtual_resource_block_assignment_flag = 0;
#endif #endif
...@@ -3180,25 +3151,16 @@ schedule_PCH(module_id_t module_idP, ...@@ -3180,25 +3151,16 @@ schedule_PCH(module_id_t module_idP,
continue; continue;
} }
if (opt_enabled == 1) { trace_pdu(DIRECTION_DOWNLINK,
trace_pdu(DIRECTION_DOWNLINK, &eNB->common_channels[CC_id].PCCH_pdu.payload[0],
&eNB->common_channels[CC_id].PCCH_pdu.payload[0], pcch_sdu_length,
pcch_sdu_length, 0xffff,
0xffff, PCCH,
PCCH, P_RNTI,
P_RNTI, eNB->frame,
eNB->frame, eNB->subframe,
eNB->subframe, 0,
0, 0);
0);
LOG_D(OPT,"[eNB %d][PCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP,
frameP,
CC_id,
0xffff,
pcch_sdu_length);
}
eNB->eNB_stats[CC_id].total_num_pcch_pdu++; eNB->eNB_stats[CC_id].total_num_pcch_pdu++;
eNB->eNB_stats[CC_id].pcch_buffer = pcch_sdu_length; eNB->eNB_stats[CC_id].pcch_buffer = pcch_sdu_length;
eNB->eNB_stats[CC_id].total_pcch_buffer += pcch_sdu_length; eNB->eNB_stats[CC_id].total_pcch_buffer += pcch_sdu_length;
......
...@@ -644,16 +644,18 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id, ...@@ -644,16 +644,18 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
// Get total available RBS count and total UE count // Get total available RBS count and total UE count
N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth); N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
temp_total_rbs_count = 0; temp_total_rbs_count = 0;
for(uint8_t rbg_i = 0;rbg_i < N_RBG[CC_id];rbg_i++ ){
if(rballoc_sub[CC_id][rbg_i] == 0){ for(uint8_t rbg_i = 0; rbg_i < N_RBG[CC_id]; rbg_i++ ) {
if(rballoc_sub[CC_id][rbg_i] == 0) {
if((rbg_i == N_RBG[CC_id] -1) && if((rbg_i == N_RBG[CC_id] -1) &&
((N_RB_DL == 25) || (N_RB_DL == 50))){ ((N_RB_DL == 25) || (N_RB_DL == 50))) {
temp_total_rbs_count += (min_rb_unit[CC_id] -1); temp_total_rbs_count += (min_rb_unit[CC_id] -1);
}else{ } else {
temp_total_rbs_count += min_rb_unit[CC_id]; temp_total_rbs_count += min_rb_unit[CC_id];
} }
} }
} }
temp_total_ue_count = dlsch_ue_select[CC_id].ue_num; temp_total_ue_count = dlsch_ue_select[CC_id].ue_num;
for (i = 0; i < dlsch_ue_select[CC_id].ue_num; i++) { for (i = 0; i < dlsch_ue_select[CC_id].ue_num; i++) {
...@@ -1305,10 +1307,11 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -1305,10 +1307,11 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
#endif #endif
); );
if((rrc_release_info.num_UEs > 0) && (rlc_am_mui.rrc_mui_num > 0)){ if((rrc_release_info.num_UEs > 0) && (rlc_am_mui.rrc_mui_num > 0)) {
while(pthread_mutex_trylock(&rrc_release_freelist)) { while(pthread_mutex_trylock(&rrc_release_freelist)) {
/* spin... */ /* spin... */
} }
uint16_t release_total = 0; uint16_t release_total = 0;
for(uint16_t release_num = 0; release_num < NUMBER_OF_UE_MAX; release_num++) { for(uint16_t release_num = 0; release_num < NUMBER_OF_UE_MAX; release_num++) {
...@@ -1345,6 +1348,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -1345,6 +1348,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
if(release_total >= rrc_release_info.num_UEs) if(release_total >= rrc_release_info.num_UEs)
break; break;
} }
pthread_mutex_unlock(&rrc_release_freelist); pthread_mutex_unlock(&rrc_release_freelist);
} }
...@@ -1703,14 +1707,9 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -1703,14 +1707,9 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset+sdu_length_total+j] = (char)(taus()&0xff); UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset+sdu_length_total+j] = (char)(taus()&0xff);
} }
if (opt_enabled == 1) { trace_pdu(DIRECTION_DOWNLINK, (uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0],
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),
TBS, module_idP, WS_RA_RNTI, UE_RNTI(module_idP, UE_id), eNB->frame, eNB->subframe,0,0);
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);
}
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP), T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP),
T_INT(harq_pid), T_BUFFER(UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0], TBS)); 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;
...@@ -2052,6 +2051,7 @@ void ulsch_scheduler_pre_ue_select_fairRR( ...@@ -2052,6 +2051,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
hi_dci0_pdu = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi]; hi_dci0_pdu = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi];
format_flag = 2; format_flag = 2;
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0); aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) { if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) {
cc_id_flag[CC_id] = 1; cc_id_flag[CC_id] = 1;
continue; continue;
...@@ -2130,7 +2130,8 @@ void ulsch_scheduler_pre_ue_select_fairRR( ...@@ -2130,7 +2130,8 @@ void ulsch_scheduler_pre_ue_select_fairRR(
hi_dci0_pdu = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi]; hi_dci0_pdu = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi];
format_flag = 2; format_flag = 2;
rnti = UE_RNTI(module_idP,first_ue_id[CC_id][temp]); rnti = UE_RNTI(module_idP,first_ue_id[CC_id][temp]);
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[first_ue_id[CC_id][temp]].dl_cqi[CC_id],format0); aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[first_ue_id[CC_id][temp]].dl_cqi[CC_id],format0);
if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) { if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) {
cc_id_flag[CC_id] = 1; cc_id_flag[CC_id] = 1;
break; break;
...@@ -2203,6 +2204,7 @@ void ulsch_scheduler_pre_ue_select_fairRR( ...@@ -2203,6 +2204,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
hi_dci0_pdu = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi]; hi_dci0_pdu = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi];
format_flag = 2; format_flag = 2;
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0); aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) { if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) {
cc_id_flag[CC_id] = 1; cc_id_flag[CC_id] = 1;
continue; continue;
...@@ -2256,6 +2258,7 @@ void ulsch_scheduler_pre_ue_select_fairRR( ...@@ -2256,6 +2258,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
format_flag = 2; format_flag = 2;
rnti = UE_RNTI(module_idP,ul_inactivity_id[CC_id][temp]); rnti = UE_RNTI(module_idP,ul_inactivity_id[CC_id][temp]);
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[ul_inactivity_id[CC_id][temp]].dl_cqi[CC_id],format0); aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[ul_inactivity_id[CC_id][temp]].dl_cqi[CC_id],format0);
if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) { if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) {
cc_id_flag[CC_id] = 1; cc_id_flag[CC_id] = 1;
continue; continue;
...@@ -2454,20 +2457,20 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP, ...@@ -2454,20 +2457,20 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
UE_list->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = mcs; UE_list->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = mcs;
} }
} else { } else {
if (mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED){ if (mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) {
// assigne RBS( 6 RBs) // assigne RBS( 6 RBs)
first_rb[CC_id] = first_rb[CC_id] + 6; first_rb[CC_id] = first_rb[CC_id] + 6;
UE_list->UE_template[CC_id][UE_id].pre_allocated_nb_rb_ul[0] = 6; UE_list->UE_template[CC_id][UE_id].pre_allocated_nb_rb_ul[0] = 6;
UE_list->UE_template[CC_id][UE_id].pre_allocated_rb_table_index_ul = 5; UE_list->UE_template[CC_id][UE_id].pre_allocated_rb_table_index_ul = 5;
UE_list->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = 10; UE_list->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = 10;
}else{ } else {
// assigne RBS( 3 RBs) // assigne RBS( 3 RBs)
first_rb[CC_id] = first_rb[CC_id] + 3; first_rb[CC_id] = first_rb[CC_id] + 3;
UE_list->UE_template[CC_id][UE_id].pre_allocated_nb_rb_ul[0] = 3; UE_list->UE_template[CC_id][UE_id].pre_allocated_nb_rb_ul[0] = 3;
UE_list->UE_template[CC_id][UE_id].pre_allocated_rb_table_index_ul = 2; UE_list->UE_template[CC_id][UE_id].pre_allocated_rb_table_index_ul = 2;
UE_list->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = 10; UE_list->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = 10;
} }
} }
} else if ( ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_INACTIVE ) { } else if ( ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_INACTIVE ) {
// assigne RBS( 3 RBs) // assigne RBS( 3 RBs)
first_rb[CC_id] = first_rb[CC_id] + 3; first_rb[CC_id] = first_rb[CC_id] + 3;
...@@ -2766,7 +2769,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, ...@@ -2766,7 +2769,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
UE_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id]; UE_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
harq_pid = subframe2harqpid(cc,sched_frame,sched_subframeP); harq_pid = subframe2harqpid(cc,sched_frame,sched_subframeP);
rnti = UE_RNTI(CC_id,UE_id); rnti = UE_RNTI(CC_id,UE_id);
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0); aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
LOG_D(MAC,"[eNB %d] frame %d subframe %d,Checking PUSCH %d for UE %d/%x CC %d : aggregation level %d, N_RB_UL %d\n", LOG_D(MAC,"[eNB %d] frame %d subframe %d,Checking PUSCH %d for UE %d/%x CC %d : aggregation level %d, N_RB_UL %d\n",
module_idP,frameP,subframeP,harq_pid,UE_id,rnti,CC_id, aggregation,N_RB_UL); module_idP,frameP,subframeP,harq_pid,UE_id,rnti,CC_id, aggregation,N_RB_UL);
int bytes_to_schedule = UE_template->estimated_ul_buffer - UE_template->scheduled_ul_bytes; int bytes_to_schedule = UE_template->estimated_ul_buffer - UE_template->scheduled_ul_bytes;
...@@ -3047,7 +3050,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, ...@@ -3047,7 +3050,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
LOG_D(MAC,"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled UE %d (mcs %d, first rb %d, nb_rb %d, TBS %d, harq_pid %d)\n", LOG_D(MAC,"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled UE %d (mcs %d, first rb %d, nb_rb %d, TBS %d, harq_pid %d)\n",
module_idP,harq_pid,rnti,CC_id,frameP,subframeP,UE_id,mcs_rv,first_rb[CC_id],ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb,UE_template->TBS_UL[harq_pid],harq_pid); module_idP,harq_pid,rnti,CC_id,frameP,subframeP,UE_id,mcs_rv,first_rb[CC_id],ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb,UE_template->TBS_UL[harq_pid],harq_pid);
// bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB) // bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB)
//store for possible retransmission //store for possible retransmission
UE_template->nb_rb_ul[harq_pid] = ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb; UE_template->nb_rb_ul[harq_pid] = ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb;
......
This diff is collapsed.
This diff is collapsed.
...@@ -255,17 +255,11 @@ Msg1_transmitted(module_id_t module_idP, uint8_t CC_id, ...@@ -255,17 +255,11 @@ Msg1_transmitted(module_id_t module_idP, uint8_t CC_id,
"Transmission on secondary CCs is not supported yet\n"); "Transmission on secondary CCs is not supported yet\n");
// start contention resolution timer // start contention resolution timer
UE_mac_inst[module_idP].RA_attempt_number++; UE_mac_inst[module_idP].RA_attempt_number++;
trace_pdu(DIRECTION_UPLINK, NULL, 0, module_idP, WS_NO_RNTI,
if (opt_enabled) { UE_mac_inst[module_idP].RA_prach_resources.
trace_pdu(DIRECTION_UPLINK, NULL, 0, module_idP, WS_NO_RNTI, ra_PreambleIndex, UE_mac_inst[module_idP].txFrame,
UE_mac_inst[module_idP].RA_prach_resources. UE_mac_inst[module_idP].txSubframe, 0,
ra_PreambleIndex, UE_mac_inst[module_idP].txFrame, UE_mac_inst[module_idP].RA_attempt_number);
UE_mac_inst[module_idP].txSubframe, 0,
UE_mac_inst[module_idP].RA_attempt_number);
LOG_D(OPT,
"[UE %d][RAPROC] TX MSG1 Frame %d trace pdu for rnti %x with size %d\n",
module_idP, frameP, 1, UE_mac_inst[module_idP].RA_Msg3_size);
}
} }
...@@ -280,19 +274,11 @@ Msg3_transmitted(module_id_t module_idP, uint8_t CC_id, ...@@ -280,19 +274,11 @@ Msg3_transmitted(module_id_t module_idP, uint8_t CC_id,
module_idP, frameP); module_idP, frameP);
UE_mac_inst[module_idP].RA_contention_resolution_cnt = 0; UE_mac_inst[module_idP].RA_contention_resolution_cnt = 0;
UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 1; UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 1;
trace_pdu(DIRECTION_UPLINK, &UE_mac_inst[module_idP].CCCH_pdu.payload[0],
if (opt_enabled) { // msg3 UE_mac_inst[module_idP].RA_Msg3_size, module_idP, WS_C_RNTI,
trace_pdu(DIRECTION_UPLINK, &UE_mac_inst[module_idP].CCCH_pdu.payload[0], UE_mac_inst[module_idP].crnti,
UE_mac_inst[module_idP].RA_Msg3_size, module_idP, WS_C_RNTI, UE_mac_inst[module_idP].txFrame,
UE_mac_inst[module_idP].crnti, UE_mac_inst[module_idP].txSubframe, 0, 0);
UE_mac_inst[module_idP].txFrame,
UE_mac_inst[module_idP].txSubframe, 0, 0);
LOG_D(OPT,
"[UE %d][RAPROC] MSG3 Frame %d trace pdu Preamble %d with size %d\n",
module_idP, frameP, UE_mac_inst[module_idP].crnti
/*UE_mac_inst[module_idP].RA_prach_resources.ra_PreambleIndex */
, UE_mac_inst[module_idP].RA_Msg3_size);
}
} }
......
...@@ -49,63 +49,54 @@ extern RAN_CONTEXT_t RC; ...@@ -49,63 +49,54 @@ extern RAN_CONTEXT_t RC;
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
unsigned short unsigned short
fill_rar(const module_id_t module_idP, fill_rar(const module_id_t module_idP,
const int CC_id, const int CC_id,
RA_t * ra, RA_t *ra,
const frame_t frameP, const frame_t frameP,
uint8_t * const dlsch_buffer, uint8_t *const dlsch_buffer,
const uint16_t N_RB_UL, const uint8_t input_buffer_length) const uint16_t N_RB_UL, const uint8_t input_buffer_length)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
{ {
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer; uint8_t *rar = (uint8_t *) (dlsch_buffer + 1);
uint8_t *rar = (uint8_t *) (dlsch_buffer + 1); // subheader fixed
rarh->E = 0; // First and last RAR
rarh->T = 1; // 0 for E/T/R/R/BI subheader, 1 for E/T/RAPID subheader
// subheader fixed rarh->RAPID = ra->preamble_index; // Respond to Preamble 0 only for the moment
rarh->E = 0; // First and last RAR rar[4] = (uint8_t) (ra->rnti >> 8);
rarh->T = 1; // 0 for E/T/R/R/BI subheader, 1 for E/T/RAPID subheader rar[5] = (uint8_t) (ra->rnti & 0xff);
rarh->RAPID = ra->preamble_index; // Respond to Preamble 0 only for the moment //ra->timing_offset = 0;
rar[4] = (uint8_t) (ra->rnti >> 8); ra->timing_offset /= 16; //T_A = N_TA/16, where N_TA should be on a 30.72Msps
rar[5] = (uint8_t) (ra->rnti & 0xff); rar[0] = (uint8_t) (ra->timing_offset >> (2 + 4)); // 7 MSBs of timing advance + divide by 4
//ra->timing_offset = 0; rar[1] = (uint8_t) (ra->timing_offset << (4 - 2)) & 0xf0; // 4 LSBs of timing advance + divide by 4
ra->timing_offset /= 16; //T_A = N_TA/16, where N_TA should be on a 30.72Msps COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id];
rar[0] = (uint8_t) (ra->timing_offset >> (2 + 4)); // 7 MSBs of timing advance + divide by 4
rar[1] = (uint8_t) (ra->timing_offset << (4 - 2)) & 0xf0; // 4 LSBs of timing advance + divide by 4 if(N_RB_UL == 25) {
COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id]; ra->msg3_first_rb = 1;
if(N_RB_UL == 25){ } else {
ra->msg3_first_rb = 1; if (cc->tdd_Config && N_RB_UL == 100) {
}else{ ra->msg3_first_rb = 3;
if (cc->tdd_Config && N_RB_UL == 100) { } else {
ra->msg3_first_rb = 3; ra->msg3_first_rb = 2;
} else {
ra->msg3_first_rb = 2;
}
}
ra->msg3_nb_rb = 1;
uint16_t rballoc = mac_computeRIV(N_RB_UL, ra->msg3_first_rb, ra->msg3_nb_rb); // first PRB only for UL Grant
rar[1] |= (rballoc >> 7) & 7; // Hopping = 0 (bit 3), 3 MSBs of rballoc
rar[2] = ((uint8_t) (rballoc & 0xff)) << 1; // 7 LSBs of rballoc
ra->msg3_mcs = 10;
ra->msg3_TPC = 3;
ra->msg3_ULdelay = 0;
ra->msg3_cqireq = 0;
ra->msg3_round = 0;
rar[2] |= ((ra->msg3_mcs & 0x8) >> 3); // mcs 10
rar[3] =
(((ra->msg3_mcs & 0x7) << 5)) | ((ra->msg3_TPC & 7) << 2) |
((ra->msg3_ULdelay & 1) << 1) | (ra->msg3_cqireq & 1);
if (opt_enabled) {
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,
"[eNB %d][RAPROC] CC_id %d RAR Frame %d trace pdu for rnti %x and rapid %d size %d\n",
module_idP, CC_id, frameP, ra->rnti, rarh->RAPID,
input_buffer_length);
} }
}
return (ra->rnti); ra->msg3_nb_rb = 1;
uint16_t rballoc = mac_computeRIV(N_RB_UL, ra->msg3_first_rb, ra->msg3_nb_rb); // first PRB only for UL Grant
rar[1] |= (rballoc >> 7) & 7; // Hopping = 0 (bit 3), 3 MSBs of rballoc
rar[2] = ((uint8_t) (rballoc & 0xff)) << 1; // 7 LSBs of rballoc
ra->msg3_mcs = 10;
ra->msg3_TPC = 3;
ra->msg3_ULdelay = 0;
ra->msg3_cqireq = 0;
ra->msg3_round = 0;
rar[2] |= ((ra->msg3_mcs & 0x8) >> 3); // mcs 10
rar[3] =
(((ra->msg3_mcs & 0x7) << 5)) | ((ra->msg3_TPC & 7) << 2) |
((ra->msg3_ULdelay & 1) << 1) | (ra->msg3_cqireq & 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);
return (ra->rnti);
} }
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
...@@ -118,14 +109,13 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB, ...@@ -118,14 +109,13 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
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 = 0; uint32_t rballoc = 0;
uint32_t ULdelay = 0; uint32_t ULdelay = 0;
uint32_t cqireq = 0; uint32_t cqireq = 0;
...@@ -133,30 +123,24 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB, ...@@ -133,30 +123,24 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
uint32_t TPC = 0; uint32_t TPC = 0;
int input_buffer_length = 0; int input_buffer_length = 0;
int N_NB_index = 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 rarh->RAPID = ra->preamble_index; // Respond to Preamble
/* RAR PDU */ /* RAR PDU */
/* TA Command */ /* TA Command */
ra->timing_offset /= 16; // T_A = N_TA/16, where N_TA should be on a 30.72Msps 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 >> 4) & 0x7f; // 7 MSBs of timing advance 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 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);
/* UL Grant */ /* UL Grant */
ra->msg3_mcs = 7; ra->msg3_mcs = 7;
TPC = 3; // no power increase TPC = 3; // no power increase
...@@ -164,7 +148,6 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB, ...@@ -164,7 +148,6 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
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 & 0x0F) << (12 + (4 - N_NB_index))); buffer |= ((rballoc & 0x0F) << (12 + (4 - N_NB_index)));
...@@ -174,21 +157,15 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB, ...@@ -174,21 +157,15 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
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] |= (uint8_t) (buffer >> 16) & 0x0F; rar[1] |= (uint8_t) (buffer >> 16) & 0x0F;
rar[2] = (uint8_t) (buffer >> 8) & 0xFF; rar[2] = (uint8_t) (buffer >> 8) & 0xFF;
rar[3] = (uint8_t) buffer & 0xFF; rar[3] = (uint8_t) buffer & 0xFF;
/* RA CRNTI */ /* RA CRNTI */
rar[4] = (uint8_t)(ra->rnti >> 8); rar[4] = (uint8_t)(ra->rnti >> 8);
rar[5] = (uint8_t)(ra->rnti & 0xff); rar[5] = (uint8_t)(ra->rnti & 0xff);
} else { // CE level 2, 3 (CEModeB) } else { // CE level 2, 3 (CEModeB)
AssertFatal(1 == 0, "Shouldn't get here ...\n"); AssertFatal(1 == 0, "Shouldn't get here ...\n");
input_buffer_length = 5; input_buffer_length = 5;
rar[3] = (uint8_t)(ra->rnti >> 8); rar[3] = (uint8_t)(ra->rnti >> 8);
rar[4] = (uint8_t)(ra->rnti & 0xff); rar[4] = (uint8_t)(ra->rnti & 0xff);
} }
...@@ -196,7 +173,7 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB, ...@@ -196,7 +173,7 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
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", 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, frameP,
subframeP, subframeP,
*(uint8_t*) rarh, *(uint8_t *) rarh,
rar[0], rar[0],
rar[1], rar[1],
rar[2], rar[2],
...@@ -208,26 +185,16 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB, ...@@ -208,26 +185,16 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
rarh->RAPID, rarh->RAPID,
ra->preamble_index, ra->preamble_index,
ra->timing_offset); ra->timing_offset);
trace_pdu(DIRECTION_DOWNLINK,
if (opt_enabled) { dlsch_buffer,
trace_pdu(DIRECTION_DOWNLINK, input_buffer_length,
dlsch_buffer, eNB->Mod_id,
input_buffer_length, WS_RA_RNTI,
eNB->Mod_id, 1,
WS_RA_RNTI, eNB->frame,
1, eNB->subframe,
eNB->frame, 0,
eNB->subframe, 0);
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);
} }
#endif #endif
......
...@@ -41,103 +41,96 @@ ...@@ -41,103 +41,96 @@
#define DEBUG_RAR #define DEBUG_RAR
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
uint16_t ue_process_rar(const module_id_t module_idP, const int CC_id, const frame_t frameP, const rnti_t ra_rnti, uint8_t * const dlsch_buffer, rnti_t * const t_crnti, const uint8_t preamble_index, uint8_t * selected_rar_buffer // output argument for storing the selected RAR header and RAR payload uint16_t ue_process_rar(const module_id_t module_idP, const int CC_id, const frame_t frameP, const rnti_t ra_rnti, uint8_t *const dlsch_buffer, rnti_t *const t_crnti, const uint8_t preamble_index,
) uint8_t *selected_rar_buffer // output argument for storing the selected RAR header and RAR payload
)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
{ {
uint16_t ret = 0; // return value uint16_t ret = 0; // return value
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer; // RAR_PDU *rar = (RAR_PDU *)(dlsch_buffer+1);
// RAR_PDU *rar = (RAR_PDU *)(dlsch_buffer+1); uint8_t *rar = (uint8_t *) (dlsch_buffer + 1);
uint8_t *rar = (uint8_t *) (dlsch_buffer + 1); // get the last RAR payload for working with CMW500
uint8_t n_rarpy = 0; // number of RAR payloads
// get the last RAR payload for working with CMW500 uint8_t n_rarh = 0; // number of MAC RAR subheaders
uint8_t n_rarpy = 0; // number of RAR payloads uint8_t best_rx_rapid = -1; // the closest RAPID receive from all RARs
uint8_t n_rarh = 0; // number of MAC RAR subheaders
uint8_t best_rx_rapid = -1; // the closest RAPID receive from all RARs while (1) {
while (1) { n_rarh++;
n_rarh++;
if (rarh->T == 1) { if (rarh->T == 1) {
n_rarpy++; n_rarpy++;
LOG_D(MAC, "RAPID %d\n", rarh->RAPID); LOG_D(MAC, "RAPID %d\n", rarh->RAPID);
}
if (rarh->RAPID == preamble_index) {
LOG_D(PHY, "Found RAR with the intended RAPID %d\n",
rarh->RAPID);
rar = (uint8_t *) (dlsch_buffer + n_rarh + (n_rarpy - 1) * 6);
break;
}
if (abs((int) rarh->RAPID - (int) preamble_index) <
abs((int) best_rx_rapid - (int) preamble_index)) {
best_rx_rapid = rarh->RAPID;
rar = (uint8_t *) (dlsch_buffer + n_rarh + (n_rarpy - 1) * 6);
}
if (rarh->E == 0) {
LOG_I(PHY,
"No RAR found with the intended RAPID. The closest RAPID in all RARs is %d\n",
best_rx_rapid);
break;
} else {
rarh++;
}
};
LOG_D(MAC, "number of RAR subheader %d; number of RAR pyloads %d\n",
n_rarh, n_rarpy);
if (CC_id > 0) {
LOG_W(MAC, "Should not have received RAR on secondary CCs! \n");
return (0xffff);
} }
LOG_I(MAC, if (rarh->RAPID == preamble_index) {
"[UE %d][RAPROC] Frame %d Received RAR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for preamble %d/%d\n", LOG_D(PHY, "Found RAR with the intended RAPID %d\n",
module_idP, frameP, *(uint8_t *) rarh, rar[0], rar[1], rar[2], rarh->RAPID);
rar[3], rar[4], rar[5], rarh->RAPID, preamble_index); rar = (uint8_t *) (dlsch_buffer + n_rarh + (n_rarpy - 1) * 6);
#ifdef DEBUG_RAR break;
LOG_D(MAC, "[UE %d][RAPROC] rarh->E %d\n", module_idP, rarh->E); }
LOG_D(MAC, "[UE %d][RAPROC] rarh->T %d\n", module_idP, rarh->T);
LOG_D(MAC, "[UE %d][RAPROC] rarh->RAPID %d\n", module_idP,
rarh->RAPID);
// LOG_I(MAC,"[UE %d][RAPROC] rar->R %d\n",module_idP,rar->R);
LOG_D(MAC, "[UE %d][RAPROC] rar->Timing_Advance_Command %d\n",
module_idP, (((uint16_t) (rar[0] & 0x7f)) << 4) + (rar[1] >> 4));
// LOG_I(MAC,"[UE %d][RAPROC] rar->hopping_flag %d\n",module_idP,rar->hopping_flag);
// LOG_I(MAC,"[UE %d][RAPROC] rar->rb_alloc %d\n",module_idP,rar->rb_alloc);
// LOG_I(MAC,"[UE %d][RAPROC] rar->mcs %d\n",module_idP,rar->mcs);
// LOG_I(MAC,"[UE %d][RAPROC] rar->TPC %d\n",module_idP,rar->TPC);
// LOG_I(MAC,"[UE %d][RAPROC] rar->UL_delay %d\n",module_idP,rar->UL_delay);
// LOG_I(MAC,"[UE %d][RAPROC] rar->cqi_req %d\n",module_idP,rar->cqi_req);
LOG_D(MAC, "[UE %d][RAPROC] rar->t_crnti %x\n", module_idP,
(uint16_t) rar[5] + (rar[4] << 8));
#endif
if (opt_enabled) { if (abs((int) rarh->RAPID - (int) preamble_index) <
LOG_D(OPT, abs((int) best_rx_rapid - (int) preamble_index)) {
"[UE %d][RAPROC] CC_id %d RAR Frame %d trace pdu for ra-RNTI %x\n", best_rx_rapid = rarh->RAPID;
module_idP, CC_id, frameP, ra_rnti); rar = (uint8_t *) (dlsch_buffer + n_rarh + (n_rarpy - 1) * 6);
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);
} }
if (preamble_index == rarh->RAPID) { if (rarh->E == 0) {
*t_crnti = (uint16_t) rar[5] + (rar[4] << 8); //rar->t_crnti; LOG_I(PHY,
UE_mac_inst[module_idP].crnti = *t_crnti; //rar->t_crnti; "No RAR found with the intended RAPID. The closest RAPID in all RARs is %d\n",
//return(rar->Timing_Advance_Command); best_rx_rapid);
ret = ((((uint16_t) (rar[0] & 0x7f)) << 4) + (rar[1] >> 4)); break;
} else { } else {
UE_mac_inst[module_idP].crnti = 0; rarh++;
ret = (0xffff);
} }
};
// move the selected RAR to the front of the RA_PDSCH buffer LOG_D(MAC, "number of RAR subheader %d; number of RAR pyloads %d\n",
memcpy(selected_rar_buffer + 0, (uint8_t *) rarh, 1); n_rarh, n_rarpy);
memcpy(selected_rar_buffer + 1, (uint8_t *) rar, 6);
return ret; if (CC_id > 0) {
LOG_W(MAC, "Should not have received RAR on secondary CCs! \n");
return (0xffff);
}
LOG_I(MAC,
"[UE %d][RAPROC] Frame %d Received RAR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for preamble %d/%d\n",
module_idP, frameP, *(uint8_t *) rarh, rar[0], rar[1], rar[2],
rar[3], rar[4], rar[5], rarh->RAPID, preamble_index);
#ifdef DEBUG_RAR
LOG_D(MAC, "[UE %d][RAPROC] rarh->E %d\n", module_idP, rarh->E);
LOG_D(MAC, "[UE %d][RAPROC] rarh->T %d\n", module_idP, rarh->T);
LOG_D(MAC, "[UE %d][RAPROC] rarh->RAPID %d\n", module_idP,
rarh->RAPID);
// LOG_I(MAC,"[UE %d][RAPROC] rar->R %d\n",module_idP,rar->R);
LOG_D(MAC, "[UE %d][RAPROC] rar->Timing_Advance_Command %d\n",
module_idP, (((uint16_t) (rar[0] & 0x7f)) << 4) + (rar[1] >> 4));
// LOG_I(MAC,"[UE %d][RAPROC] rar->hopping_flag %d\n",module_idP,rar->hopping_flag);
// LOG_I(MAC,"[UE %d][RAPROC] rar->rb_alloc %d\n",module_idP,rar->rb_alloc);
// LOG_I(MAC,"[UE %d][RAPROC] rar->mcs %d\n",module_idP,rar->mcs);
// LOG_I(MAC,"[UE %d][RAPROC] rar->TPC %d\n",module_idP,rar->TPC);
// LOG_I(MAC,"[UE %d][RAPROC] rar->UL_delay %d\n",module_idP,rar->UL_delay);
// LOG_I(MAC,"[UE %d][RAPROC] rar->cqi_req %d\n",module_idP,rar->cqi_req);
LOG_D(MAC, "[UE %d][RAPROC] rar->t_crnti %x\n", module_idP,
(uint16_t) rar[5] + (rar[4] << 8));
#endif
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);
if (preamble_index == rarh->RAPID) {
*t_crnti = (uint16_t) rar[5] + (rar[4] << 8); //rar->t_crnti;
UE_mac_inst[module_idP].crnti = *t_crnti; //rar->t_crnti;
//return(rar->Timing_Advance_Command);
ret = ((((uint16_t) (rar[0] & 0x7f)) << 4) + (rar[1] >> 4));
} else {
UE_mac_inst[module_idP].crnti = 0;
ret = (0xffff);
}
// move the selected RAR to the front of the RA_PDSCH buffer
memcpy(selected_rar_buffer + 0, (uint8_t *) rarh, 1);
memcpy(selected_rar_buffer + 1, (uint8_t *) rar, 6);
return ret;
} }
This diff is collapsed.
This diff is collapsed.
How to configure wireshark for dissecting LTE protocols: How to configure wireshark for dissecting LTE protocols:
- start the wireshark as a sudoers - start the wireshark as a sudoers
- goto analyze->enabled prototols - goto analyze->enabled prototols
=> enable mac_lte_udp and rlc_lte_udp => enable mac_lte_udp and rlc_lte_udp
- goto edit/preferences and expand Protocols - goto edit/preferences and expand Protocols
- select UDP and check "try heuristic sub-dissectors first" - 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 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. - 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 How to use
- start eNB or UE with option -W (or -P if you want to make a pcap file) - start eNB or UE with option --opt.type wireshark
- capture on local interface "lo" --opt options are:
- filter out the ICMP/DNS/TCP messages (e.g. "!icmp && !dns && !tcp") --opt.type none/wireshark/pcap
--opt.ip 127.0.0.1 to specify the output IP address (default: 127.0.0.1)
output port is always: 9999 (to change it, change constant: PACKET_MAC_LTE_DEFAULT_UDP_PORT in OAI code)
--opt.path file_name to specify the file name (pcap)
- capture on local interface "lo"
- filter out the ICMP/DNS/TCP messages (e.g. "!icmp && !dns && !tcp")
...@@ -111,15 +111,17 @@ typedef enum radio_type_e { ...@@ -111,15 +111,17 @@ typedef enum radio_type_e {
* function def * function def
*/ */
void trace_pdu(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size, extern int opt_enabled;
int ueid, int rntiType, int rnti, uint16_t sysFrame, uint8_t subframe, #define trace_pdu(x...) if (opt_enabled) trace_pdu_implementation(x)
int oob_event, int oob_event_value);
void trace_pdu_implementation(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(void); int init_opt(void);
void terminate_opt(void); void terminate_opt(void);
extern int opt_enabled;
//double *timing_analyzer(int index, int direction ); //double *timing_analyzer(int index, int direction );
#endif /* OPT_H_ */ #endif /* OPT_H_ */
...@@ -390,21 +390,22 @@ static int MAC_LTE_PCAP_WritePDU(MAC_Context_Info_t *context, ...@@ -390,21 +390,22 @@ static int MAC_LTE_PCAP_WritePDU(MAC_Context_Info_t *context,
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
#include <openair1/PHY/phy_extern_ue.h> #include <openair1/PHY/phy_extern_ue.h>
/* Remote serveraddress (where Wireshark is running) */ /* Remote serveraddress (where Wireshark is running) */
void trace_pdu(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size, void trace_pdu_implementation(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 ueid, int rntiType, int rnti, uint16_t sysFrameNumber, uint8_t subFrameNumber, int oob_event,
int oob_event_value) { int oob_event_value) {
MAC_Context_Info_t pdu_context; MAC_Context_Info_t pdu_context;
int radioType=FDD_RADIO; int radioType=FDD_RADIO;
LOG_D(OPT,"sending packet to wireshark: direction=%s, size: %d, ueid: %d, rnti: %x, frame/sf: %d.%d\n",
direction?"DL":"UL", pdu_buffer_size, ueid, rnti, sysFrameNumber,subFrameNumber);
if (RC.eNB && RC.eNB[0][0]!=NULL) if (RC.eNB && RC.eNB[0][0]!=NULL)
radioType=RC.eNB[0][0]->frame_parms.frame_type== FDD ? FDD_RADIO:TDD_RADIO; radioType=RC.eNB[0][0]->frame_parms.frame_type== FDD ? FDD_RADIO:TDD_RADIO;
else if (PHY_vars_UE_g && PHY_vars_UE_g[0][0] != NULL) else if (PHY_vars_UE_g && PHY_vars_UE_g[0][0] != NULL)
radioType=PHY_vars_UE_g[0][0]->frame_parms.frame_type== FDD ? FDD_RADIO:TDD_RADIO; radioType=PHY_vars_UE_g[0][0]->frame_parms.frame_type== FDD ? FDD_RADIO:TDD_RADIO;
else { else {
LOG_E(OPT,"not a eNB neither a UE!!! \n"); LOG_E(OPT,"not a eNB neither a UE!!! \n");
return; return;
} }
switch (opt_type) { switch (opt_type) {
case OPT_WIRESHARK : case OPT_WIRESHARK :
......
...@@ -430,6 +430,7 @@ static bool flushInput(rfsimulator_state_t *t, int timeout) { ...@@ -430,6 +430,7 @@ static bool flushInput(rfsimulator_state_t *t, int timeout) {
b->circularBuf[(index*nbAnt+a)%CirSize].i=0; b->circularBuf[(index*nbAnt+a)%CirSize].i=0;
} }
} }
if ( abs(b->th.timestamp-b->lastReceivedTS) > 50 ) if ( abs(b->th.timestamp-b->lastReceivedTS) > 50 )
LOG_W(HW,"gap of: %ld in reception\n", b->th.timestamp-b->lastReceivedTS ); LOG_W(HW,"gap of: %ld in reception\n", b->th.timestamp-b->lastReceivedTS );
} }
......
This diff is collapsed.
This diff is collapsed.
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