Commit c5f82f6d authored by Francesco Mani's avatar Francesco Mani

Merge remote-tracking branch 'origin/NR_RRC_PRACH_procedures' into NR_RRC_harq_hacks

parents 338c0dbd 3bce9a7b
...@@ -197,7 +197,7 @@ function variant__v4__cppcheck { ...@@ -197,7 +197,7 @@ function variant__v4__cppcheck {
} }
function variant__v5__gnb_usrp { function variant__v5__gnb_usrp {
VM_MEMORY=8192 VM_MEMORY=10240
VM_CPU=8 VM_CPU=8
NB_PATTERN_FILES=9 NB_PATTERN_FILES=9
BUILD_OPTIONS="--gNB -w USRP" BUILD_OPTIONS="--gNB -w USRP"
......
...@@ -89,6 +89,9 @@ function start_basic_sim_enb { ...@@ -89,6 +89,9 @@ function start_basic_sim_enb {
fi fi
done done
ENB_SYNC=0 ENB_SYNC=0
echo "echo \"free -m\"" > $1
echo "free -m" >> $1
ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_VM_IP_ADDR < $1
rm $1 rm $1
if [ $i -lt 50 ] if [ $i -lt 50 ]
then then
...@@ -151,6 +154,9 @@ function start_basic_sim_ue { ...@@ -151,6 +154,9 @@ function start_basic_sim_ue {
i=$[$i+1] i=$[$i+1]
fi fi
done done
echo "echo \"free -m\"" > $1
echo "free -m" >> $1
ssh -T -o StrictHostKeyChecking=no ubuntu@$2 < $1
rm $1 rm $1
if [ $i -lt 50 ] if [ $i -lt 50 ]
then then
...@@ -764,6 +770,9 @@ function start_l2_sim_enb { ...@@ -764,6 +770,9 @@ function start_l2_sim_enb {
i=$[$i+1] i=$[$i+1]
fi fi
done done
echo "echo \"free -m\"" > $1
echo "free -m" >> $1
ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_ENB_VM_IP_ADDR < $1
rm $1 rm $1
ENB_SYNC=1 ENB_SYNC=1
if [ $i -lt 50 ] if [ $i -lt 50 ]
...@@ -872,6 +881,9 @@ function start_l2_sim_ue { ...@@ -872,6 +881,9 @@ function start_l2_sim_ue {
i=$[$i+1] i=$[$i+1]
fi fi
done done
echo "echo \"free -m\"" > $1
echo "free -m" >> $1
ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_UE_VM_IP_ADDR < $1
rm $1 rm $1
UE_SYNC=1 UE_SYNC=1
if [ $i -lt 50 ] if [ $i -lt 50 ]
...@@ -985,6 +997,9 @@ function start_rf_sim_enb { ...@@ -985,6 +997,9 @@ function start_rf_sim_enb {
i=$[$i+1] i=$[$i+1]
fi fi
done done
echo "echo \"free -m\"" > $1
echo "free -m" >> $1
ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_ENB_VM_IP_ADDR < $1
rm $1 rm $1
if [ $i -lt 50 ] if [ $i -lt 50 ]
then then
...@@ -1114,6 +1129,9 @@ function start_rf_sim_ue { ...@@ -1114,6 +1129,9 @@ function start_rf_sim_ue {
i=$[$i+1] i=$[$i+1]
fi fi
done done
echo "echo \"free -m\"" > $1
echo "free -m" >> $1
ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_UE_VM_IP_ADDR < $1
rm $1 rm $1
if [ $i -lt 50 ] if [ $i -lt 50 ]
then then
...@@ -1236,6 +1254,10 @@ function start_rf_sim_gnb { ...@@ -1236,6 +1254,10 @@ function start_rf_sim_gnb {
fi fi
fi fi
sleep 10 sleep 10
echo "echo \"free -m\"" > $1
echo "free -m" >> $1
ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_GNB_VM_IP_ADDR < $1
rm $1
# Copy the RAW files from the gNB run for the NR-UE # Copy the RAW files from the gNB run for the NR-UE
scp -o StrictHostKeyChecking=no ubuntu@$LOC_GNB_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/ran_build/build/rbconfig.raw . scp -o StrictHostKeyChecking=no ubuntu@$LOC_GNB_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/ran_build/build/rbconfig.raw .
scp -o StrictHostKeyChecking=no ubuntu@$LOC_GNB_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/ran_build/build/reconfig.raw . scp -o StrictHostKeyChecking=no ubuntu@$LOC_GNB_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/ran_build/build/reconfig.raw .
...@@ -1310,6 +1332,9 @@ function start_rf_sim_nr_ue { ...@@ -1310,6 +1332,9 @@ function start_rf_sim_nr_ue {
i=$[$i+1] i=$[$i+1]
fi fi
done done
echo "echo \"free -m\"" > $1
echo "free -m" >> $1
ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_NR_UE_VM_IP_ADDR < $1
rm $1 rm $1
if [ $i -lt 50 ] if [ $i -lt 50 ]
then then
......
**Table of Contents** **Table of Contents**
1. [OpenAirInterface eNB Feature Set](#openairinterface-enb-feature-set) 1. [Functional Split Architecture](#functional-split-architecture)
2. [OpenAirInterface Block Diagram](#openairinterface-block-diagram)
2. [OpenAirInterface 4G-LTE eNB Feature Set](#openairinterface-4g-lte-enb-feature-set)
1. [eNB PHY Layer](#enb-phy-layer) 1. [eNB PHY Layer](#enb-phy-layer)
2. [eNB MAC Layer](#enb-mac-layer) 2. [eNB MAC Layer](#enb-mac-layer)
3. [eNB RLC Layer](#enb-rlc-layer) 3. [eNB RLC Layer](#enb-rlc-layer)
...@@ -9,29 +11,38 @@ ...@@ -9,29 +11,38 @@
6. [eNB X2AP](#enb-x2ap) 6. [eNB X2AP](#enb-x2ap)
7. [eNB/MCE M2AP](#enbmce-m2ap) 7. [eNB/MCE M2AP](#enbmce-m2ap)
8. [MCE/MME M3AP](#mcemme-m3ap) 8. [MCE/MME M3AP](#mcemme-m3ap)
9. [eNB Advanced Features](#enb-advanced-features) 3. [OpenAirInterface 4G-LTE UE Feature Set](#openairinterface-4g-lte-ue-feature-set)
2. [OpenAirInterface Functional Split](#openairinterface-functional-split)
3. [OpenAirInterface UE Feature Set](#openairinterface-ue-feature-set)
1. [LTE UE PHY Layer](#lte-ue-phy-layer) 1. [LTE UE PHY Layer](#lte-ue-phy-layer)
2. [LTE UE MAC Layer](#lte-ue-mac-layer) 2. [LTE UE MAC Layer](#lte-ue-mac-layer)
3. [LTE UE RLC Layer](#lte-ue-rlc-layer) 3. [LTE UE RLC Layer](#lte-ue-rlc-layer)
4. [LTE UE PDCP Layer](#lte-ue-pdcp-layer) 4. [LTE UE PDCP Layer](#lte-ue-pdcp-layer)
5. [LTE UE RRC Layer](#lte-ue-rrc-layer) 5. [LTE UE RRC Layer](#lte-ue-rrc-layer)
4. [OpenAirInterface Functional Split](#openairinterface-functional-split) 4. [OpenAirInterface 5G-NR gNB Feature Set](#openairinterface-5g-nr-feature-set)
5. [OpenAirInterface 5G-NR Feature Set](#openairinterface-5g-nr-feature-set)
1. [General Parameters](#general-parameters) 1. [General Parameters](#general-parameters)
2. [gNB Features](#gnb-features) 2. [gNB Physical Layer](#gnb-phy-layer)
1. [gNB Physical Layer](#gnb-phy-layer) 3. [gNB Higher Layers](#gnb-higher-layers)
2. [gNB Higher Layers](#gnb-higher-layers) 5. [OpenAirInterface 5G-NR UE Feature Set](#openairinterface-5g-nr-ue-feature-set)
3. [NR UE Features](#nr-ue-features) 1. [UE Physical Layer](#ue-phy-layer)
1. [NR UE Physical Layer](#nr-ue-phy-layer) 2. [UE Higher Layers](#ue-higher-layers)
2. [NR UE Higher Layers](#nr-ue-higher-layers)
# OpenAirInterface Block diagram #
# Functional Split Architecture #
- RCC: Radio-Cloud Center
- RAU: Radio-Access Unit
- RRU: Remote Radio-Unit
- IF4.5 / IF5 : similar to IEEE P1914.1
- FAPI (IF2) : specified by Small Cell Forum (open-nFAPI implementation)
- IF1 : F1 in 3GPP Release 15
![Functional Split Architecture](./oai_enb_func_split_arch.png)
# OpenAirInterface Block Diagram #
![Block Diagram](./oai_enb_block_diagram.png) ![Block Diagram](./oai_enb_block_diagram.png)
# OpenAirInterface eNB Feature Set # # OpenAirInterface 4G LTE eNB Feature Set #
## eNB PHY Layer ## ## eNB PHY Layer ##
...@@ -82,7 +93,11 @@ TDD UL: 20 MHz, 100 PRBS/ MCS **XX** | 3.0 Mbit/s | TM1: 4.21 Mbits/s ...@@ -82,7 +93,11 @@ TDD UL: 20 MHz, 100 PRBS/ MCS **XX** | 3.0 Mbit/s | TM1: 4.21 Mbits/s
The MAC layer implements a subset of the **3GPP 36.321** release v8.6 in support of BCH, DLSCH, RACH, and ULSCH channels. The MAC layer implements a subset of the **3GPP 36.321** release v8.6 in support of BCH, DLSCH, RACH, and ULSCH channels.
- RRC interface for CCCH, DCCH, and DTCH - RRC interface for CCCH, DCCH, and DTCH
- Proportional fair scheduler (round robin scheduler soon) - Proportional fair scheduler (round robin scheduler soon), with the following improvements:
- Up to 30 users tested in the L2 simulator, CCE allocation in the preprocessor ; the scheduler was also simplified and made more modular
- Adaptative UL-HARQ
- Remove out-of-sync UEs
- No use of the `first_rb` in the UL scheduler ; respects `vrb_map_UL` and `vrb_map` in the DL
- DCI generation - DCI generation
- HARQ Support - HARQ Support
- RA procedures and RNTI management - RA procedures and RNTI management
...@@ -123,7 +138,7 @@ The current PDCP layer is header compliant with **3GPP 36.323** Rel 10.1.0 and i ...@@ -123,7 +138,7 @@ The current PDCP layer is header compliant with **3GPP 36.323** Rel 10.1.0 and i
## eNB RRC Layer ## ## eNB RRC Layer ##
The RRC layer is based on **3GPP 36.331** v14.3.0 and implements the following functions: The RRC layer is based on **3GPP 36.331** v15.6 and implements the following functions:
- System Information broadcast (SIB 1, 2, 3, and 13) - System Information broadcast (SIB 1, 2, 3, and 13)
* SIB1: Up to 6 PLMN IDs broadcast * SIB1: Up to 6 PLMN IDs broadcast
...@@ -150,6 +165,10 @@ The X2AP layer is based on **3GPP 36.423** v14.6.0 and implements the following ...@@ -150,6 +165,10 @@ The X2AP layer is based on **3GPP 36.423** v14.6.0 and implements the following
- X2 timers (t_reloc_prep, tx2_reloc_overall) - X2 timers (t_reloc_prep, tx2_reloc_overall)
- Handover Cancel - Handover Cancel
- X2-U interface implemented - X2-U interface implemented
- EN-DC is implemented
- X2AP : Handling of SgNB Addition Request / Addition Request Acknowledge / Reconfiguration Complete
- RRC : Handling of RRC Connection Reconfiguration with 5G cell info, configuration of 5G-NR measurements
- S1AP : Handling of E-RAB Modification Indication / Confirmation
## eNB/MCE M2AP ## ## eNB/MCE M2AP ##
...@@ -171,11 +190,8 @@ The M3AP layer is based on **3GPP 36.444** v14.0.1: ...@@ -171,11 +190,8 @@ The M3AP layer is based on **3GPP 36.444** v14.0.1:
- M3 Session Start Request - M3 Session Start Request
- M3 Session Start Response - M3 Session Start Response
## eNB Advanced Features ##
**To be completed**
# OpenAirInterface UE Feature Set # # OpenAirInterface 4G LTE UE Feature Set #
## LTE UE PHY Layer ## ## LTE UE PHY Layer ##
...@@ -230,17 +246,6 @@ The NAS layer is based on **3GPP 24.301** and implements the following functions ...@@ -230,17 +246,6 @@ The NAS layer is based on **3GPP 24.301** and implements the following functions
- EMM attach/detach, authentication, tracking area update, and more - EMM attach/detach, authentication, tracking area update, and more
- ESM default/dedicated bearer, PDN connectivity, and more - ESM default/dedicated bearer, PDN connectivity, and more
# OpenAirInterface Functional Split #
- RCC: Radio-Cloud Center
- RAU: Radio-Access Unit
- RRU: Remote Radio-Unit
![Functional Split Architecture](./oai_enb_func_split_arch.png)
- IF4.5 / IF5 : similar to IEEE P1914.1
- FAPI (IF2) : specified by Small Cell Forum (open-nFAPI implementation)
- IF1 : F1 in 3GPP Release 15
# OpenAirInterface 5G-NR Feature Set # # OpenAirInterface 5G-NR Feature Set #
...@@ -258,49 +263,101 @@ The following features are valid for the gNB and the 5G-NR UE. ...@@ -258,49 +263,101 @@ The following features are valid for the gNB and the 5G-NR UE.
* Highly efficient 3GPP compliant polar encoder and decoder * Highly efficient 3GPP compliant polar encoder and decoder
* Encoder and decoder for short blocks * Encoder and decoder for short blocks
## gNB Features ##
### gNB PHY Layer ### ## gNB PHY Layer ##
* Generation of PSS/SSS/PBCH for multiple beams and * 30KHz SCS for FR1 and 120 KHz SCS for FR2
* Generation of PDCCH for SIB1 (including generation of DCI, polar encoding, scrambling, modulation, RB mapping, etc) * Generation of NR-PSS/NR-SSS
* NR-PBCH supports multiple SSBs and flexible periodicity
* Generation of NR-PDCCH for SIB1 (including generation of DCI, polar encoding, scrambling, modulation, RB mapping, etc)
- common search space configured by MIB - common search space configured by MIB
- user-specific search space configured by RRC - user-specific search space configured by RRC
- DCI formats: 00, 10 - DCI formats: 00, 10 (01 and 11 **under integration**)
* Generation of PDSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc). * Generation of NR-PDSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
- Single symbol DMRS, dmrs-TypeA-Position Pos2, DMRS configuration type 1 - Single symbol DMRS, DMRS-TypeA-Position Pos2, DMRS configuration type 1
- PDSCH mapping type A - PDSCH mapping type A
* NR-CSI Generation of sequence at PHY (**under integration**)
* NR-PUSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc). * NR-PUSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
* NR-PUCCH * NR-PUCCH
- Format 0 (ACK/NACK) - Format 0 (2 bits, mainly for ACK/NACK)
- Format 2 (up to 64 bits, mainly for CSI feedback)
* NR-PRACH
- Formats 0,1,2,3, A1-A3, B1-B3
* Highly efficient 3GPP compliant LDPC encoder and decoder (BG1 and BG2 are supported)
* Highly efficient 3GPP compliant polar encoder and decoder
* Encoder and decoder for short block
### gNB higher Layers ### ## gNB Higher Layers ##
**gNB RRC**
- NR RRC (38.331) Rel 15 messages using new asn1c - NR RRC (38.331) Rel 15 messages using new asn1c
- LTE RRC (36.331) also updated to Rel 15 - LTE RRC (36.331) also updated to Rel 15
- Generation of MIB - Generation of CellGroupConfig (for eNB) and MIB
- Application to read configuration file and program gNB RRC - Application to read configuration file and program gNB RRC
- RRC -> MAC configuration - RRC can configure PDCP, RLC, MAC
- MAC -> PHY configuration (using NR FAPI P5 interface)
- FAPI P7 interface for BCH PDU, DCI PDU, PDSCH PDU **gNB X2AP**
- X2 setup with eNB
- Handling of SgNB Addition Request / Addition Request Acknowledge / Reconfiguration Complete
**gNB MAC**
- MAC -> PHY configuration using NR FAPI P5 interface
- MAC <-> PHY data interface using FAPI P7 interface for BCH PDU, DCI PDU, PDSCH PDU
- Scheduler for RA procedure at gNB
- MAC downlink scheduler (fixed allocations)
- MAC header generation (including timing advance)
# OpenAirInterface 5G-NR UE Feature Set #
**as of May 2020** only supporting "noS1" mode (DL):
- Creates TUN interface to PDCP to inject and receive user-place traffic
- Will only work with OAI gNB configured in the same mode
## UE PHY Layer ##
* Initial synchronization
* Time tracking based on PBCH DMRS
* Time tracking based on PBCH DMRS
* Frequency offset estimation
* PBCH RX
* PDCCH RX
* PDSCH RX, including a first version of dual stream receiver for PDSCH
* 30KHz SCS for FR1 and 120 KHz SCS for FR2
* Generation of NR-PSS/NR-SSS
* NR-PBCH supports multiple SSBs and flexible periodicity
* Generation of NR-PDCCH for SIB1 (including generation of DCI, polar encoding, scrambling, modulation, RB mapping, etc)
- common search space configured by MIB
- user-specific search space configured by RRC
- DCI formats: 00, 10 (01 and 11 **under integration**)
* Generation of NR-PDSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
- Single symbol DMRS, DMRS-TypeA-Position Pos2, DMRS configuration type 1
- PDSCH mapping type A
* NR-CSI Generation of sequence at PHY (**under integration**)
* NR-PUSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
* NR-PUCCH
- Format 0 (2 bits, mainly for ACK/NACK)
- Format 2 (up to 64 bits, mainly for CSI feedback)
* NR-PRACH
- Formats 0,1,2,3, A1-A3, B1-B3
* Highly efficient 3GPP compliant LDPC encoder and decoder (BG1 and BG2 are supported)
* Highly efficient 3GPP compliant polar encoder and decoder
* Encoder and decoder for short block
For more details see [this document](https://gitlab.eurecom.fr/oai/openairinterface5g/uploads/ba5368448d627743a28c770c29e8978e/OAI_Software_Architecture_for_Dual_Connectivity_in_E-UTRA_and_5G-NR_and_nFAPI_for_MAC-PHY_Interface.docx) ## UE Higher Layers ##
## NR UE Features ## **gNB MAC**
- Initial sync and MIB detection
- MAC -> PHY configuration of PHY via UE FAPI P5 interface
- Basic MAC to control PHY via UE FAPI P7 interface
- Random access procedure
### NR UE PHY Layer ### **RLC**
- initial synchronization **PDCP**
- Time tracking based on PDCCH DMRS
- Frequency offset estimation
- PBCH RX
- PDCCH RX
- PDSCH RX
- including first version of dual stream receiver for PDSCH
### NR UE higher Layers ###
For more details see [this document](https://gitlab.eurecom.fr/oai/openairinterface5g/uploads/f7386f3a64806fd6b2ac1fc3d0252fff/UE_FAPI-like_interface.docx)
[OAI wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home) [OAI wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
......
...@@ -70,7 +70,7 @@ This setup requires an EPC, an OAI eNB and gNB, and a COTS Phone. A dedicated pa ...@@ -70,7 +70,7 @@ This setup requires an EPC, an OAI eNB and gNB, and a COTS Phone. A dedicated pa
### Launch eNB ### Launch eNB
```bash sudo ./lte-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf ```bash sudo ./lte-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf```
......
...@@ -460,6 +460,9 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, ...@@ -460,6 +460,9 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
} }
//} //}
NR_UL_UE_HARQ_t *harq_process_ulsch=NULL;
harq_process_ulsch = UE->ulsch[thread_id][gNB_id][0]->harq_processes[harq_pid];
harq_process_ulsch->status = SCH_IDLE;
/////////// ///////////
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
......
...@@ -152,6 +152,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ ...@@ -152,6 +152,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
memcpy(pusch_pdu, pusch_config_pdu, sizeof(nfapi_nr_ue_pusch_pdu_t)); memcpy(pusch_pdu, pusch_config_pdu, sizeof(nfapi_nr_ue_pusch_pdu_t));
ulsch0->f_pusch = pusch_config_pdu->absolute_delta_PUSCH; ulsch0->f_pusch = pusch_config_pdu->absolute_delta_PUSCH;
ulsch0->harq_processes[current_harq_pid]->status = ACTIVE;
break; break;
case (FAPI_NR_UL_CONFIG_TYPE_PUCCH): case (FAPI_NR_UL_CONFIG_TYPE_PUCCH):
......
...@@ -2234,7 +2234,9 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue, ...@@ -2234,7 +2234,9 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,
#endif #endif
if (ue->UE_mode[gNB_id] == PUSCH || get_softmodem_params()->phy_test == 1){ if (ue->UE_mode[gNB_id] == PUSCH || get_softmodem_params()->phy_test == 1){
nr_ue_ulsch_procedures(ue, harq_pid, frame_tx, slot_tx, thread_id, gNB_id); if (ue->ulsch[thread_id][gNB_id][0]->harq_processes[harq_pid]->status == ACTIVE)
nr_ue_ulsch_procedures(ue, harq_pid, frame_tx, slot_tx, thread_id, gNB_id);
/* /*
if (ue->UE_mode[eNB_id] == PUSCH) { if (ue->UE_mode[eNB_id] == PUSCH) {
......
...@@ -240,7 +240,7 @@ typedef struct { ...@@ -240,7 +240,7 @@ typedef struct {
#define DL_SCH_LCID_CCCH 0x00 #define DL_SCH_LCID_CCCH 0x00
#define DL_SCH_LCID_DCCH 0x01 #define DL_SCH_LCID_DCCH 0x01
#define DL_SCH_LCID_DCCH1 0x02 #define DL_SCH_LCID_DCCH1 0x02
#define DL_SCH_LCID_DTCH 0x03 #define DL_SCH_LCID_DTCH 0x04
#define DL_SCH_LCID_RECOMMENDED_BITRATE 0x2F #define DL_SCH_LCID_RECOMMENDED_BITRATE 0x2F
#define DL_SCH_LCID_SP_ZP_CSI_RS_RES_SET_ACT 0x30 #define DL_SCH_LCID_SP_ZP_CSI_RS_RES_SET_ACT 0x30
#define DL_SCH_LCID_PUCCH_SPATIAL_RELATION_ACT 0x31 #define DL_SCH_LCID_PUCCH_SPATIAL_RELATION_ACT 0x31
......
...@@ -139,7 +139,7 @@ void nr_ue_process_mac_pdu(module_id_t module_idP, ...@@ -139,7 +139,7 @@ void nr_ue_process_mac_pdu(module_id_t module_idP,
NR_UL_TIME_ALIGNMENT_t *ul_time_alignment); NR_UL_TIME_ALIGNMENT_t *ul_time_alignment);
unsigned char nr_generate_ulsch_pdu(uint8_t *sdus_payload, uint16_t nr_generate_ulsch_pdu(uint8_t *sdus_payload,
uint8_t *pdu, uint8_t *pdu,
uint8_t num_sdus, uint8_t num_sdus,
uint16_t *sdu_lengths, uint16_t *sdu_lengths,
......
...@@ -757,7 +757,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in ...@@ -757,7 +757,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
} }
*/ */
} }
} else if (ul_info) { } else if (ul_info && ul_info->slot_tx == 8) {
module_id_t mod_id = ul_info->module_id; module_id_t mod_id = ul_info->module_id;
uint32_t gNB_index = ul_info->gNB_index; uint32_t gNB_index = ul_info->gNB_index;
int cc_id = ul_info->cc_id; int cc_id = ul_info->cc_id;
...@@ -3809,7 +3809,7 @@ void nr_ue_process_mac_pdu(module_id_t module_idP, ...@@ -3809,7 +3809,7 @@ void nr_ue_process_mac_pdu(module_id_t module_idP,
/////* ULSCH MAC PDU generation (6.1.2 TS 38.321) *///// /////* ULSCH MAC PDU generation (6.1.2 TS 38.321) */////
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
unsigned char nr_generate_ulsch_pdu(uint8_t *sdus_payload, uint16_t nr_generate_ulsch_pdu(uint8_t *sdus_payload,
uint8_t *pdu, uint8_t *pdu,
uint8_t num_sdus, uint8_t num_sdus,
uint16_t *sdu_lengths, uint16_t *sdu_lengths,
...@@ -3824,7 +3824,8 @@ unsigned char nr_generate_ulsch_pdu(uint8_t *sdus_payload, ...@@ -3824,7 +3824,8 @@ unsigned char nr_generate_ulsch_pdu(uint8_t *sdus_payload,
NR_MAC_SUBHEADER_FIXED *mac_pdu_ptr = (NR_MAC_SUBHEADER_FIXED *) pdu; NR_MAC_SUBHEADER_FIXED *mac_pdu_ptr = (NR_MAC_SUBHEADER_FIXED *) pdu;
unsigned char last_size = 0, i, mac_header_control_elements[16], *ce_ptr, bsr = 0; unsigned char last_size = 0, i, mac_header_control_elements[16], *ce_ptr, bsr = 0;
int mac_ce_size, offset; int mac_ce_size;
uint16_t offset = 0;
LOG_D(MAC, "[UE] Generating ULSCH PDU : num_sdus %d\n", num_sdus); LOG_D(MAC, "[UE] Generating ULSCH PDU : num_sdus %d\n", num_sdus);
...@@ -3974,7 +3975,7 @@ unsigned char nr_generate_ulsch_pdu(uint8_t *sdus_payload, ...@@ -3974,7 +3975,7 @@ unsigned char nr_generate_ulsch_pdu(uint8_t *sdus_payload,
// compute final offset // compute final offset
offset = ((unsigned char *) mac_pdu_ptr - pdu); offset = ((unsigned char *) mac_pdu_ptr - pdu);
//printf("Offset %d \n", ((unsigned char *) mac_pdu_ptr - mac_pdu)); //printf("Offset %d \n", ((unsigned char *) mac_pdu_ptr - pdu));
return offset; return offset;
} }
......
...@@ -209,7 +209,7 @@ void nr_process_mac_pdu( ...@@ -209,7 +209,7 @@ void nr_process_mac_pdu(
mac_subheader_len = 2; mac_subheader_len = 2;
} }
LOG_D(MAC, "[UE %d] Frame %d : DLSCH -> DL-DTCH %d (gNB %d, %d bytes)\n", module_idP, frameP, rx_lcid, module_idP, mac_sdu_len); LOG_D(MAC, "[UE %d] Frame %d : ULSCH -> UL-DTCH %d (gNB %d, %d bytes)\n", module_idP, frameP, rx_lcid, module_idP, mac_sdu_len);
#if defined(ENABLE_MAC_PAYLOAD_DEBUG) #if defined(ENABLE_MAC_PAYLOAD_DEBUG)
LOG_T(MAC, "[UE %d] First 32 bytes of DLSCH : \n", module_idP); LOG_T(MAC, "[UE %d] First 32 bytes of DLSCH : \n", module_idP);
...@@ -249,7 +249,7 @@ void nr_process_mac_pdu( ...@@ -249,7 +249,7 @@ void nr_process_mac_pdu(
pdu_len -= ( mac_subheader_len + mac_ce_len + mac_sdu_len ); pdu_len -= ( mac_subheader_len + mac_ce_len + mac_sdu_len );
if (pdu_len < 0) { if (pdu_len < 0) {
LOG_E(MAC, "%s() residual mac pdu length < 0!\n", __func__); LOG_E(MAC, "%s() residual mac pdu length < 0!, pdu_len: %d\n", __func__, pdu_len);
return; return;
} }
} }
......
...@@ -2390,7 +2390,7 @@ void nr_ip_over_LTE_DRB_preconfiguration(void){ ...@@ -2390,7 +2390,7 @@ void nr_ip_over_LTE_DRB_preconfiguration(void){
// 1 + drb_identiy_index; // 1 + drb_identiy_index;
DRB_config->drb_Identity = 1; DRB_config->drb_Identity = 1;
DRB_config->logicalChannelIdentity = CALLOC(1, sizeof(long)); DRB_config->logicalChannelIdentity = CALLOC(1, sizeof(long));
*(DRB_config->logicalChannelIdentity) = DRB_config->drb_Identity + 2; //(long) (ue_context_pP->ue_context.e_rab[i].param.e_rab_id + 2); // value : x+2 *(DRB_config->logicalChannelIdentity) = DRB_config->drb_Identity + 3; //(long) (ue_context_pP->ue_context.e_rab[i].param.e_rab_id + 2); // value : x+2
DRB_rlc_config = CALLOC(1, sizeof(*DRB_rlc_config)); DRB_rlc_config = CALLOC(1, sizeof(*DRB_rlc_config));
DRB_config->rlc_Config = DRB_rlc_config; DRB_config->rlc_Config = DRB_rlc_config;
......
...@@ -72,8 +72,8 @@ void mac_rlc_data_ind ( ...@@ -72,8 +72,8 @@ void mac_rlc_data_ind (
LOG_I(RLC, "RLC instance for the given UE was not found \n"); LOG_I(RLC, "RLC instance for the given UE was not found \n");
switch (channel_idP) { switch (channel_idP) {
case 1 ... 2: rb = ue->srb[channel_idP - 1]; break; case 1 ... 3: rb = ue->srb[channel_idP - 1]; break;
case 3 ... 7: rb = ue->drb[channel_idP - 3]; break; case 4 ... 8: rb = ue->drb[channel_idP - 4]; break;
default: rb = NULL; break; default: rb = NULL; break;
} }
...@@ -113,8 +113,8 @@ tbs_size_t mac_rlc_data_req( ...@@ -113,8 +113,8 @@ tbs_size_t mac_rlc_data_req(
ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rntiP); ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rntiP);
switch (channel_idP) { switch (channel_idP) {
case 1 ... 2: rb = ue->srb[channel_idP - 1]; break; case 1 ... 3: rb = ue->srb[channel_idP - 1]; break;
case 3 ... 7: rb = ue->drb[channel_idP - 3]; break; case 4 ... 8: rb = ue->drb[channel_idP - 4]; break;
default: rb = NULL; break; default: rb = NULL; break;
} }
...@@ -123,7 +123,7 @@ tbs_size_t mac_rlc_data_req( ...@@ -123,7 +123,7 @@ tbs_size_t mac_rlc_data_req(
maxsize = tb_sizeP; maxsize = tb_sizeP;
ret = rb->generate_pdu(rb, buffer_pP, maxsize); ret = rb->generate_pdu(rb, buffer_pP, maxsize);
} else { } else {
LOG_E(RLC, "%s:%d:%s: fatal: data req for unknown RB\n", __FILE__, __LINE__, __FUNCTION__); LOG_E(RLC, "%s:%d:%s: fatal: data req for unknown RB, channel_idP: %d\n", __FILE__, __LINE__, __FUNCTION__, channel_idP);
exit(1); exit(1);
ret = 0; ret = 0;
} }
...@@ -166,8 +166,8 @@ mac_rlc_status_resp_t mac_rlc_status_ind( ...@@ -166,8 +166,8 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rntiP); ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rntiP);
switch (channel_idP) { switch (channel_idP) {
case 1 ... 2: rb = ue->srb[channel_idP - 1]; break; case 1 ... 3: rb = ue->srb[channel_idP - 1]; break;
case 3 ... 7: rb = ue->drb[channel_idP - 3]; break; case 4 ... 8: rb = ue->drb[channel_idP - 4]; break;
default: rb = NULL; break; default: rb = NULL; break;
} }
...@@ -227,8 +227,8 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind( ...@@ -227,8 +227,8 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(
ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rntiP); ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rntiP);
switch (channel_idP) { switch (channel_idP) {
case 1 ... 2: rb = ue->srb[channel_idP - 1]; break; case 1 ... 3: rb = ue->srb[channel_idP - 1]; break;
case 3 ... 7: rb = ue->drb[channel_idP - 3]; break; case 4 ... 8: rb = ue->drb[channel_idP - 4]; break;
default: rb = NULL; break; default: rb = NULL; break;
} }
...@@ -654,7 +654,7 @@ static void add_drb_am(int rnti, struct LTE_DRB_ToAddMod *s) ...@@ -654,7 +654,7 @@ static void add_drb_am(int rnti, struct LTE_DRB_ToAddMod *s)
exit(1); exit(1);
} }
if (channel_id != drb_id + 2) { if (channel_id != drb_id + 3) {
LOG_E(RLC, "%s:%d:%s: todo, remove this limitation\n", LOG_E(RLC, "%s:%d:%s: todo, remove this limitation\n",
__FILE__, __LINE__, __FUNCTION__); __FILE__, __LINE__, __FUNCTION__);
exit(1); exit(1);
...@@ -737,7 +737,7 @@ static void add_drb_um(int rnti, struct LTE_DRB_ToAddMod *s) ...@@ -737,7 +737,7 @@ static void add_drb_um(int rnti, struct LTE_DRB_ToAddMod *s)
exit(1); exit(1);
} }
if (channel_id != drb_id + 2) { if (channel_id != drb_id + 3) {
LOG_E(RLC, "%s:%d:%s: todo, remove this limitation\n", LOG_E(RLC, "%s:%d:%s: todo, remove this limitation\n",
__FILE__, __LINE__, __FUNCTION__); __FILE__, __LINE__, __FUNCTION__);
exit(1); exit(1);
......
...@@ -28,7 +28,7 @@ typedef void nr_rlc_ue_manager_t; ...@@ -28,7 +28,7 @@ typedef void nr_rlc_ue_manager_t;
typedef struct nr_rlc_ue_t { typedef struct nr_rlc_ue_t {
int rnti; int rnti;
nr_rlc_entity_t *srb[2]; nr_rlc_entity_t *srb[3];
nr_rlc_entity_t *drb[5]; nr_rlc_entity_t *drb[5];
} nr_rlc_ue_t; } nr_rlc_ue_t;
......
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